@aws/amazon-location-client 1.2.1 → 1.2.3

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.
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).amazonLocationClient={})}(this,(function(e){"use strict";const t=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler:()=>e.httpHandler,updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs:()=>e.httpHandler.httpHandlerConfigs()}),n=e=>({httpHandler:e.httpHandler()});var i,r,o,s,a;!function(e){e.HEADER="header",e.QUERY="query"}(i||(i={})),function(e){e.HEADER="header",e.QUERY="query"}(r||(r={})),function(e){e.HTTP="http",e.HTTPS="https"}(o||(o={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(s||(s={})),function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"}(a||(a={}));const c="__smithy_context";var d,u;!function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"}(d||(d={})),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(u||(u={}));class l{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new l({...e,headers:{...e.headers}});var n;return t.query&&(t.query=(n=t.query,Object.keys(n).reduce(((e,t)=>{const i=n[t];return{...e,[t]:Array.isArray(i)?[...i]:i}}),{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return l.clone(this)}}class p{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}function h(e){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(e)}const f={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},m=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{if(!l.isInstance(n.request))return t(n);const{request:i}=n,{handlerProtocol:r=""}=e.requestHandler.metadata||{};if(r.indexOf("h2")>=0&&!i.headers[":authority"])delete i.headers.host,i.headers[":authority"]=i.hostname+(i.port?":"+i.port:"");else if(!i.headers.host){let e=i.hostname;null!=i.port&&(e+=`:${i.port}`),i.headers.host=e}return t(n)})(e),f)}}),g={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},y=e=>({applyToStack:e=>{e.add(((e,t)=>async n=>{try{const i=await e(n),{clientName:r,commandName:o,logger:s,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:d}=a,u=c??t.inputFilterSensitiveLog,l=d??t.outputFilterSensitiveLog,{$metadata:p,...h}=i.output;return s?.info?.({clientName:r,commandName:o,input:u(n.input),output:l(h),metadata:p}),i}catch(e){const{clientName:i,commandName:r,logger:o,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:a}=s,c=a??t.inputFilterSensitiveLog;throw o?.error?.({clientName:i,commandName:r,input:c(n.input),error:e,metadata:e.$metadata}),e}}),g)}}),b="X-Amzn-Trace-Id",S={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},v=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{const{request:i}=n;if(!l.isInstance(i)||"node"!==e.runtime)return t(n);const r=Object.keys(i.headers??{}).find((e=>e.toLowerCase()===b.toLowerCase()))??b;if(i.headers.hasOwnProperty(r))return t(n);const o=process.env.AWS_LAMBDA_FUNCTION_NAME,s=process.env._X_AMZN_TRACE_ID,a=e=>"string"==typeof e&&e.length>0;return a(o)&&a(s)&&(i.headers[b]=s),t({...n,request:i})})(e),S)}}),w=e=>e[c]||(e[c]={}),P=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const E=(e,t)=>(n,i)=>async r=>{const o=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,i,r.input)),s=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),a=w(i),c=[];for(const n of o){const r=s.get(n.schemeId);if(!r){c.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const o=r.identityProvider(await t.identityProviderConfigProvider(e));if(!o){c.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:d={},signingProperties:u={}}=n.propertiesExtractor?.(e,i)||{};n.identityProperties=Object.assign(n.identityProperties||{},d),n.signingProperties=Object.assign(n.signingProperties||{},u),a.selectedHttpAuthScheme={httpAuthOption:n,identity:await o(n.identityProperties),signer:r.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(c.join("\n"));return n(r)},C={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},T=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:i=>{i.addRelativeTo(E(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),C)}}),A={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},R={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function x(e,t,n){return{applyToStack:i=>{i.add(((e,t)=>(n,i)=>async r=>{const{response:o}=await n(r);try{return{response:o,output:await t(o,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:o}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{e.message+="\n "+t}catch(e){i.logger&&"NoOpLogger"!==i.logger?.constructor?.name?i.logger?.warn?.(t):console.warn(t)}void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText)}throw e}})(e,n),A),i.add(((e,t)=>(n,i)=>async r=>{const o=i.endpointV2?.url&&e.urlParser?async()=>e.urlParser(i.endpointV2.url):e.endpoint;if(!o)throw new Error("No valid endpoint provider available.");const s=await t(r.input,{...e,endpoint:o});return n({...r,request:s})})(e,t),R)}}}const O=e=>e=>{throw e},I=(e,t)=>{},N={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},D=e=>({applyToStack:e=>{e.addRelativeTo(((e,t)=>async n=>{if(!l.isInstance(n.request))return e(n);const i=w(t).selectedHttpAuthScheme;if(!i)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:r={}},identity:o,signer:s}=i,a=await e({...n,request:await s.sign(n.request,o,r)}).catch((s.errorHandler||O)(r));return(s.successHandler||I)(a.response,r),a}),N)}}),M=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},L=async(e,t,n,i=e=>e,...r)=>{let o=new e(n);return o=i(o)??o,await t.send(o,...r)};function k(e,t,n,i,r){return async function*(o,s,...a){const c=s;let d,u=o.startingToken??c[n],l=!0;for(;l;){if(c[n]=u,c[r]=c[r]??o.pageSize,!(o.client instanceof e))throw new Error(`Invalid client, expected instance of ${e.name}`);d=await L(t,o.client,s,o.withCommand,...a),yield d;const p=u;u=_(d,i),l=!(!u||o.stopOnSameToken&&u===p)}}}const _=(e,t)=>{let n=e;const i=t.split(".");for(const e of i){if(!n||"object"!=typeof n)return;n=n[e]}return n},F={},$=new Array(64);for(let e=0,t="A".charCodeAt(0),n="Z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t);F[n]=e,$[e]=n}for(let e=0,t="a".charCodeAt(0),n="z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t),i=e+26;F[n]=i,$[i]=n}for(let e=0;e<10;e++){F[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;F[t]=n,$[n]=t}F["+"]=62,$[62]="+",F["/"]=63,$[63]="/";const U=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),i=new DataView(n);for(let t=0;t<e.length;t+=4){let n=0,r=0;for(let i=t,o=t+3;i<=o;i++)if("="!==e[i]){if(!(e[i]in F))throw new TypeError(`Invalid character ${e[i]} in base64 string.`);n|=F[e[i]]<<6*(o-i),r+=6}else n>>=6;const o=t/4*3;n>>=r%8;const s=Math.floor(r/8);for(let e=0;e<s;e++){const t=8*(s-e-1);i.setUint8(o+e,(n&255<<t)>>t)}}return new Uint8Array(n)},B=e=>(new TextEncoder).encode(e),G=e=>"string"==typeof e?B(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),j=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};function z(e){let t;t="string"==typeof e?B(e):e;const n="object"==typeof t&&"number"==typeof t.length,i="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!i)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let r="";for(let e=0;e<t.length;e+=3){let n=0,i=0;for(let r=e,o=Math.min(e+3,t.length);r<o;r++)n|=t[r]<<8*(o-r-1),i+=8;const o=Math.ceil(i/6);n<<=6*o-i;for(let e=1;e<=o;e++){const t=6*(o-e);r+=$[(n&63<<t)>>t]}r+="==".slice(0,4-o)}return r}class H extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?H.mutate(U(e)):H.mutate(B(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,H.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?z(e):j(e)}(this,e)}}const V=e=>"function"==typeof ReadableStream&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),q=e=>encodeURIComponent(e).replace(/[!'()*]/g,W),W=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function K(e,t){return new Request(e,t)}function Y(e=0){return new Promise(((t,n)=>{e&&setTimeout((()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",n(t)}),e)}))}const Z={supported:void 0};class Q{static create(e){return"function"==typeof e?.handle?e:new Q(e)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===Z.supported&&(Z.supported=Boolean("undefined"!=typeof Request&&"keepalive"in K("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t}={}){this.config||(this.config=await this.configProvider);const n=this.config.requestTimeout,i=!0===this.config.keepAlive,r=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let o=e.path;const s=function(e){const t=[];for(let n of Object.keys(e).sort()){const i=e[n];if(n=q(n),Array.isArray(i))for(let e=0,r=i.length;e<r;e++)t.push(`${n}=${q(i[e])}`);else{let e=n;(i||"string"==typeof i)&&(e+=`=${q(i)}`),t.push(e)}}return t.join("&")}(e.query||{});s&&(o+=`?${s}`),e.fragment&&(o+=`#${e.fragment}`);let a="";if(null!=e.username||null!=e.password){a=`${e.username??""}:${e.password??""}@`}const{port:c,method:d}=e,u=`${e.protocol}//${a}${e.hostname}${c?`:${c}`:""}${o}`,l="GET"===d||"HEAD"===d?void 0:e.body,h={body:l,headers:new Headers(e.headers),method:d,credentials:r};this.config?.cache&&(h.cache=this.config.cache),l&&(h.duplex="half"),"undefined"!=typeof AbortController&&(h.signal=t),Z.supported&&(h.keepalive=i),"function"==typeof this.config.requestInit&&Object.assign(h,this.config.requestInit(e));let f=()=>{};const m=K(u,h),g=[fetch(m).then((e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new p({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new p({headers:n,reason:e.statusText,statusCode:e.status,body:t})})))})),Y(n)];return t&&g.push(new Promise(((e,n)=>{const i=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",i,{once:!0}),f=()=>e.removeEventListener("abort",i)}else t.onabort=i}))),Promise.race(g).finally(f)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n=>(n[e]=t,n)))}httpHandlerConfigs(){return this.config??{}}}const J=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise(((t,n)=>{const i=new FileReader;i.onloadend=()=>{if(2!==i.readyState)return n(new Error("Reader aborted too early"));const e=i.result??"",r=e.indexOf(","),o=r>-1?r+1:e.length;t(e.substring(o))},i.onabort=()=>n(new Error("Read aborted")),i.onerror=()=>n(i.error),i.readAsDataURL(e)}))}(e),n=U(t);return new Uint8Array(n)}(e):async function(e){const t=[],n=e.getReader();let i=!1,r=0;for(;!i;){const{done:e,value:o}=await n.read();o&&(t.push(o),r+=o.length),i=e}const o=new Uint8Array(r);let s=0;for(const e of t)o.set(e,s),s+=e.length;return o}(e);const X={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),X[e]=t}const ee="The stream has already been transformed.",te=e=>{if(!ne(e)&&!V(e)){throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${e?.__proto__?.constructor?.name||e}`)}let t=!1;const n=async()=>{if(t)throw new Error(ee);return t=!0,await J(e)};return Object.assign(e,{transformToByteArray:n,transformToString:async e=>{const t=await n();if("base64"===e)return z(t);if("hex"===e)return function(e){let t="";for(let n=0;n<e.byteLength;n++)t+=X[e[n]];return t}(t);if(void 0===e||"utf8"===e||"utf-8"===e)return j(t);if("function"==typeof TextDecoder)return new TextDecoder(e).decode(t);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(ee);if(t=!0,ne(e))return(e=>{if("function"!=typeof e.stream)throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return e.stream()})(e);if(V(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},ne=e=>"function"==typeof Blob&&e instanceof Blob,ie=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return H.mutate(e);if(!e)return H.mutate(new Uint8Array);const n=t.streamCollector(e);return H.mutate(await n)};function re(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function oe(e,t){return new se(e,t)}class se{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:n,path:i}=await this.context.endpoint();this.path=i;for(const e of this.resolvePathStack)e(this.path);return new l({protocol:t,hostname:this.hostname||e,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push((t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e})),this}p(e,t,n,i){return this.resolvePathStack.push((r=>{this.path=((e,t,n,i,r,o)=>{if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");{const t=i();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");e=e.replace(r,o?t.split("/").map((e=>re(e))).join("/"):re(t))}return e})(r,this.input,e,t,n,i)})),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}class ae{constructor(e){this.authSchemes=new Map;for(const[t,n]of Object.entries(e))void 0!==n&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}class ce{async sign(e,t,n){return e}}const de=(ue=3e5,e=>le(e)&&e.expiration.getTime()-Date.now()<ue);var ue;const le=e=>void 0!==e.expiration;function pe(e){const t=M(e.userAgentAppId??undefined),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:"string"==typeof n?[[n]]:n,userAgentAppId:async()=>{const n=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(n)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof n?t?.warn("userAgentAppId must be a string or undefined."):n.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}class he{constructor({size:e,params:t}){this.data=new Map,this.parameters=[],this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const n=this.hash(e);if(!1===n)return t();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:n,done:i}=e.next();if(this.data.delete(n),i||++t>10)break}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t="";const{parameters:n}=this;if(0===n.length)return!1;for(const i of n){const n=String(e[i]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}const fe=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}$"),me=e=>fe.test(e)||e.startsWith("[")&&e.endsWith("]"),ge=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),ye=(e,t=!1)=>{if(!t)return ge.test(e);const n=e.split(".");for(const e of n)if(!ye(e))return!1;return!0},be={},Se="endpoints";function ve(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${ve(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(ve).join(", ")})`:JSON.stringify(e,null,2)}class we extends Error{constructor(e){super(e),this.name="EndpointError"}}const Pe=(e,t)=>(e=>{const t=e.split("."),n=[];for(const i of t){const t=i.indexOf("[");if(-1!==t){if(i.indexOf("]")!==i.length-1)throw new we(`Path: '${e}' does not end with ']'`);const r=i.slice(t+1,-1);if(Number.isNaN(parseInt(r)))throw new we(`Invalid array index: '${r}' in path: '${e}'`);0!==t&&n.push(i.slice(0,t)),n.push(r)}else n.push(i)}return n})(t).reduce(((n,i)=>{if("object"!=typeof n)throw new we(`Index '${i}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(i)]:n[i]}),e),Ee={[o.HTTP]:80,[o.HTTPS]:443},Ce={booleanEquals:(e,t)=>e===t,getAttr:Pe,isSet:e=>null!=e,isValidHostLabel:ye,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:n,protocol:i="",path:r="",query:o={}}=e,s=new URL(`${i}//${t}${n?`:${n}`:""}${r}`);return s.search=Object.entries(o).map((([e,t])=>`${e}=${t}`)).join("&"),s}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:i,hostname:r,pathname:s,protocol:a,search:c}=t;if(c)return null;const d=a.slice(0,-1);if(!Object.values(o).includes(d))return null;const u=me(r);return{scheme:d,authority:`${i}${n.includes(`${i}:${Ee[d]}`)||"string"==typeof e&&e.includes(`${i}:${Ee[d]}`)?`:${Ee[d]}`:""}`,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:u}},stringEquals:(e,t)=>e===t,substring:(e,t,n,i)=>t>=n||e.length<n?null:i?e.substring(e.length-n,e.length-t):e.substring(t,n),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},Te=(e,t)=>{const n=[],i={...t.endpointParams,...t.referenceRecord};let r=0;for(;r<e.length;){const t=e.indexOf("{",r);if(-1===t){n.push(e.slice(r));break}n.push(e.slice(r,t));const o=e.indexOf("}",t);if(-1===o){n.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[o+1]&&(n.push(e.slice(t+1,o)),r=o+2);const s=e.substring(t+1,o);if(s.includes("#")){const[e,t]=s.split("#");n.push(Pe(i[e],t))}else n.push(i[s]);r=o+1}return n.join("")},Ae=(e,t,n)=>{if("string"==typeof e)return Te(e,n);if(e.fn)return Re(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new we(`'${t}': ${String(e)} is not a string, function or reference.`)},Re=({fn:e,argv:t},n)=>{const i=t.map((e=>["boolean","number"].includes(typeof e)?e:Ae(e,"arg",n))),r=e.split(".");return r[0]in be&&null!=r[1]?be[r[0]][r[1]](...i):Ce[e](...i)},xe=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new we(`'${e}' is already defined in Reference Record.`);const i=Re(t,n);return n.logger?.debug?.(`${Se} evaluateCondition: ${ve(t)} = ${ve(i)}`),{result:""===i||!!i,...null!=e&&{toAssign:{name:e,value:i}}}},Oe=(e=[],t)=>{const n={};for(const i of e){const{result:e,toAssign:r}=xe(i,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};r&&(n[r.name]=r.value,t.logger?.debug?.(`${Se} assign: ${r.name} := ${ve(r.value)}`))}return{result:!0,referenceRecord:n}},Ie=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>({...e,[n]:i.map((e=>{const i=Ae(e,"Header value entry",t);if("string"!=typeof i)throw new we(`Header '${n}' value '${i}' is not a string`);return i}))})),{}),Ne=(e,t)=>{if(Array.isArray(e))return e.map((e=>Ne(e,t)));switch(typeof e){case"string":return Te(e,t);case"object":if(null===e)throw new we(`Unexpected endpoint property: ${e}`);return De(e,t);case"boolean":return e;default:throw new we("Unexpected endpoint property type: "+typeof e)}},De=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>({...e,[n]:Ne(i,t)})),{}),Me=(e,t)=>{const n=Ae(e,"Endpoint URL",t);if("string"==typeof n)try{return new URL(n)}catch(e){throw console.error(`Failed to construct URL with ${n}`,e),e}throw new we("Endpoint URL must be a string, got "+typeof n)},Le=(e,t)=>{const{conditions:n,endpoint:i}=e,{result:r,referenceRecord:o}=Oe(n,t);if(!r)return;const s={...t,referenceRecord:{...t.referenceRecord,...o}},{url:a,properties:c,headers:d}=i;return t.logger?.debug?.(`${Se} Resolving endpoint from template: ${ve(i)}`),{...null!=d&&{headers:Ie(d,s)},...null!=c&&{properties:De(c,s)},url:Me(a,s)}},ke=(e,t)=>{const{conditions:n,error:i}=e,{result:r,referenceRecord:o}=Oe(n,t);if(r)throw new we(Ae(i,"Error",{...t,referenceRecord:{...t.referenceRecord,...o}}))},_e=(e,t)=>{const{conditions:n,rules:i}=e,{result:r,referenceRecord:o}=Oe(n,t);if(r)return Fe(i,{...t,referenceRecord:{...t.referenceRecord,...o}})},Fe=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=Le(n,t);if(e)return e}else if("error"===n.type)ke(n,t);else{if("tree"!==n.type)throw new we(`Unknown endpoint rule: ${n}`);{const e=_e(n,t);if(e)return e}}throw new we("Rules evaluation failed")},$e=(e,t)=>{const{endpointParams:n,logger:i}=t,{parameters:r,rules:o}=e;t.logger?.debug?.(`${Se} Initial EndpointParams: ${ve(n)}`);const s=Object.entries(r).filter((([,e])=>null!=e.default)).map((([e,t])=>[e,t.default]));if(s.length>0)for(const[e,t]of s)n[e]=n[e]??t;const a=Object.entries(r).filter((([,e])=>e.required)).map((([e])=>e));for(const e of a)if(null==n[e])throw new we(`Missing required parameter: '${e}'`);const c=Fe(o,{endpointParams:n,logger:i,referenceRecord:{}});return t.logger?.debug?.(`${Se} Resolved endpoint: ${ve(c)}`),c},Ue=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Ue(t))return!1;return!0}return!!ye(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!me(e)))};let Be={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"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 China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"AWS ISOF global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"amazonaws.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"EU (Germany)"}}}]};const Ge={isVirtualHostableS3Bucket:Ue,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,i,r,o,s,...a]=t;if("arn"!==n||""===i||""===r||""===a.join(":"))return null;return{partition:i,service:r,region:o,accountId:s,resourceId:a.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=Be;for(const n of t){const{regions:t,outputs:i}=n;for(const[n,r]of Object.entries(t))if(n===e)return{...i,...r}}for(const n of t){const{regionRegex:t,outputs:i}=n;if(new RegExp(t).test(e))return{...i}}const n=t.find((e=>"aws"===e.id));if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};function je(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}function ze(e,t,n){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]=n}be.aws=Ge;const He=e=>p.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Ve=e=>new Date(Date.now()+e),qe=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(Ve(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},We=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class Ke{async sign(e,t,n){if(!l.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await(async e=>{const t=We("context",e.context),n=We("config",e.config),i=t.endpointV2?.properties?.authSchemes?.[0],r=We("signer",n.signer),o=await r(i),s=e?.signingRegion,a=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:o,signingRegion:s,signingRegionSet:a,signingName:c}})(n),{config:r,signer:o}=i;let{signingRegion:s,signingName:a}=i;const c=n.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(s=t?.signingRegion??s,a=t?.signingName??a)}return await o.sign(e,{signingDate:Ve(r.systemClockOffset),signingRegion:s,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??He(t.$response);if(n){const i=We("config",e.config),r=i.systemClockOffset;i.systemClockOffset=qe(n,i.systemClockOffset);i.systemClockOffset!==r&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=He(e);if(n){const e=We("config",t.config);e.systemClockOffset=qe(n,e.systemClockOffset)}}}class Ye extends Error{constructor(e,t=!0){let n,i=!0;"boolean"==typeof t?(n=void 0,i=t):null!=t&&"object"==typeof t&&(n=t.logger,i=t.tryNextLink??!0),super(e),this.name="ProviderError",this.tryNextLink=i,Object.setPrototypeOf(this,Ye.prototype),n?.debug?.(`@smithy/property-provider ${i?"->":"(!)"} ${e}`)}static from(e,t=!0){return Object.assign(new this(e.message,t),e)}}class Ze extends Ye{constructor(e,t=!0){super(e,t),this.name="CredentialsProviderError",Object.setPrototypeOf(this,Ze.prototype)}}const Qe=(e,t,n)=>{let i,r,o,s=!1;return async t=>(o&&!t?.forceRefresh||(i=await(async()=>{r||(r=e());try{i=await r,o=!0,s=!1}finally{r=void 0}return i})()),i)},Je={},Xe={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),Je[e]=t,Xe[t]=e}function et(e){let t="";for(let n=0;n<e.byteLength;n++)t+=Je[e[n]];return t}const tt="X-Amz-Date",nt="X-Amz-Signature",it="X-Amz-Security-Token",rt="authorization",ot=tt.toLowerCase(),st=[rt,ot,"date"],at=nt.toLowerCase(),ct="x-amz-content-sha256",dt=it.toLowerCase(),ut={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},lt=/^proxy-/,pt=/^sec-/,ht="AWS4-HMAC-SHA256",ft="AWS4-HMAC-SHA256-PAYLOAD",mt="aws4_request",gt={},yt=[],bt=(e,t,n)=>`${e}/${t}/${n}/${mt}`,St=(e,t,n)=>{const i=new e(t);return i.update(G(n)),i.digest()},vt=({headers:e},t,n)=>{const i={};for(const r of Object.keys(e).sort()){if(null==e[r])continue;const o=r.toLowerCase();(o in ut||t?.has(o)||lt.test(o)||pt.test(o))&&(!n||n&&!n.has(o))||(i[o]=e[r].trim().replace(/\s+/g," "))}return i},wt=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===ct)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(i=t,"function"==typeof ArrayBuffer&&i instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(i))){const e=new n;return e.update(G(t)),et(await e.digest())}var i;return"UNSIGNED-PAYLOAD"};class Pt{format(e){const t=[];for(const n of Object.keys(e)){const i=B(n);t.push(Uint8Array.from([i.byteLength]),i,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let i=0;for(const e of t)n.set(e,i),i+=e.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 t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.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 i=new Uint8Array(9);return i[0]=5,i.set(e.value.bytes,1),i;case"binary":const r=new DataView(new ArrayBuffer(3+e.value.byteLength));r.setUint8(0,6),r.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(r.buffer);return o.set(e.value,3),o;case"string":const s=B(e.value),a=new DataView(new ArrayBuffer(3+s.byteLength));a.setUint8(0,7),a.setUint16(1,s.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(s,3),c;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(Tt.fromNumber(e.value.valueOf()).bytes,1),d;case"uuid":if(!Ct.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const u=new Uint8Array(17);return u[0]=9,u.set(function(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const i=e.slice(n,n+2).toLowerCase();if(!(i in Xe))throw new Error(`Cannot decode unrecognized sequence ${i} as hexadecimal`);t[n/2]=Xe[i]}return t}(e.value.replace(/\-/g,"")),1),u}}}var Et;!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(Et||(Et={}));const Ct=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Tt{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,i=Math.abs(Math.round(e));n>-1&&i>0;n--,i/=256)t[n]=i;return e<0&&At(t),new Tt(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&At(e),parseInt(et(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function At(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const Rt=e=>{e=l.clone(e);for(const t of Object.keys(e.headers))st.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},xt=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class Ot{constructor({applyChecksum:e,credentials:t,region:n,service:i,sha256:r,uriEscapePath:o=!0}){this.headerFormatter=new Pt,this.service=i,this.sha256=r,this.uriEscapePath=o,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=P(n),this.credentialProvider=P(t)}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:i=3600,unsignableHeaders:r,unhoistableHeaders:o,signableHeaders:s,hoistableHeaders:a,signingRegion:c,signingService:d}=t,u=await this.credentialProvider();this.validateResolvedCredentials(u);const p=c??await this.regionProvider(),{longDate:h,shortDate:f}=It(n);if(i>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const m=bt(f,p,d??this.service),g=((e,t={})=>{const{headers:n,query:i={}}=l.clone(e);for(const e of Object.keys(n)){const r=e.toLowerCase();("x-amz-"===r.slice(0,6)&&!t.unhoistableHeaders?.has(r)||t.hoistableHeaders?.has(r))&&(i[e]=n[e],delete n[e])}return{...e,headers:n,query:i}})(Rt(e),{unhoistableHeaders:o,hoistableHeaders:a});u.sessionToken&&(g.query[it]=u.sessionToken),g.query["X-Amz-Algorithm"]=ht,g.query["X-Amz-Credential"]=`${u.accessKeyId}/${m}`,g.query[tt]=h,g.query["X-Amz-Expires"]=i.toString(10);const y=vt(g,r,s);return g.query["X-Amz-SignedHeaders"]=Nt(y),g.query[nt]=await this.getSignature(h,m,this.getSigningKey(u,p,f,d),this.createCanonicalRequest(g,y,await wt(e,this.sha256))),g}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:i,signingRegion:r,signingService:o}){const s=r??await this.regionProvider(),{shortDate:a,longDate:c}=It(n),d=bt(a,s,o??this.service),u=await wt({headers:{},body:t},this.sha256),l=new this.sha256;l.update(e);const p=et(await l.digest()),h=[ft,c,d,i,p,u].join("\n");return this.signString(h,{signingDate:n,signingRegion:s,signingService:o})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:i}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:i,priorSignature:e.priorSignature}).then((t=>({message:e.message,signature:t})))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:i}={}){const r=await this.credentialProvider();this.validateResolvedCredentials(r);const o=n??await this.regionProvider(),{shortDate:s}=It(t),a=new this.sha256(await this.getSigningKey(r,o,s,i));return a.update(G(e)),et(await a.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:i,signingRegion:r,signingService:o}={}){const s=await this.credentialProvider();this.validateResolvedCredentials(s);const a=r??await this.regionProvider(),c=Rt(e),{longDate:d,shortDate:u}=It(t),l=bt(u,a,o??this.service);c.headers[ot]=d,s.sessionToken&&(c.headers[dt]=s.sessionToken);const p=await wt(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(ct,c.headers)&&this.applyChecksum&&(c.headers[ct]=p);const h=vt(c,i,n),f=await this.getSignature(d,l,this.getSigningKey(s,a,u,o),this.createCanonicalRequest(c,h,p));return c.headers[rt]=`${ht} Credential=${s.accessKeyId}/${l}, SignedHeaders=${Nt(h)}, Signature=${f}`,c}createCanonicalRequest(e,t,n){const i=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],n={};for(const i of Object.keys(e)){if(i.toLowerCase()===at)continue;const r=q(i);t.push(r);const o=e[i];"string"==typeof o?n[r]=`${r}=${q(o)}`:Array.isArray(o)&&(n[r]=o.slice(0).reduce(((e,t)=>e.concat([`${r}=${q(t)}`])),[]).sort().join("&"))}return t.sort().map((e=>n[e])).filter((e=>e)).join("&")})(e)}\n${i.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${i.join(";")}\n${n}`}async createStringToSign(e,t,n){const i=new this.sha256;i.update(G(n));const r=await i.digest();return`${ht}\n${e}\n${t}\n${et(r)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const n of e.split("/"))0!==n?.length&&"."!==n&&(".."===n?t.pop():t.push(n));const n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return q(n).replace(/%2F/g,"/")}return e}async getSignature(e,t,n,i){const r=await this.createStringToSign(e,t,i),o=new this.sha256(await n);return o.update(G(r)),et(await o.digest())}getSigningKey(e,t,n,i){return(async(e,t,n,i,r)=>{const o=`${n}:${i}:${r}:${et(await St(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(o in gt)return gt[o];for(yt.push(o);yt.length>50;)delete gt[yt.shift()];let s=`AWS4${t.secretAccessKey}`;for(const t of[n,i,r,mt])s=await St(e,s,t);return gt[o]=s})(this.sha256,e,n,t,i||this.service)}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}}const It=e=>{const t=(n=e,xt(n).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var n;return{longDate:t,shortDate:t.slice(0,8)}},Nt=e=>Object.keys(e).sort().join(";"),Dt=e=>{let t,n=e.credentials,i=!!e.credentials;Object.defineProperty(e,"credentials",{set(r){r&&r!==n&&r!==t&&(i=!0),n=r;const o=function(e,{credentials:t,credentialDefaultProvider:n}){let i;i=t?t?.memoized?t:((e,t,n)=>{if(void 0===e)return;const i="function"!=typeof e?async()=>Promise.resolve(e):e;let r,o,s,a=!1;const c=async e=>{o||(o=i(e));try{r=await o,s=!0,a=!1}finally{o=void 0}return r};return void 0===t?async e=>(s&&!e?.forceRefresh||(r=await c(e)),r):async e=>(s&&!e?.forceRefresh||(r=await c(e)),a?r:n(r)?t(r)?(await c(e),r):r:(a=!0,r))})(t,de,le):n?M(n(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")};return i.memoized=!0,i}(e,{credentials:n,credentialDefaultProvider:e.credentialDefaultProvider}),s=function(e,t){if(t.configBound)return t;const n=async n=>t({...n,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}(e,o);i&&!s.attributed?(t=async e=>s(e).then((e=>je(e,"CREDENTIALS_CODE","e"))),t.memoized=s.memoized,t.configBound=s.configBound,t.attributed=!0):t=s},get:()=>t,enumerable:!0,configurable:!0}),e.credentials=n;const{signingEscapePath:r=!0,systemClockOffset:o=e.systemClockOffset||0,sha256:s}=e;let a;a=e.signer?M(e.signer):e.regionInfoProvider?()=>M(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([t,n])=>{const{signingRegion:i,signingService:o}=t;e.signingRegion=e.signingRegion||i||n,e.signingName=e.signingName||o||e.serviceId;const a={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:s,uriEscapePath:r};return new(e.signerConstructor||Ot)(a)})):async t=>{const n=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await M(e.region)(),properties:{}},t)).signingRegion,i=t.signingName;e.signingRegion=e.signingRegion||n,e.signingName=e.signingName||i||e.serviceId;const o={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:s,uriEscapePath:r};return new(e.signerConstructor||Ot)(o)};return Object.assign(e,{systemClockOffset:o,signingEscapePath:r,signer:a})};const Mt=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},Lt=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,kt=()=>{let e=[],t=[],n=!1;const i=new Set,r=n=>(e.forEach((e=>{n.add(e.middleware,{...e})})),t.forEach((e=>{n.addRelativeTo(e.middleware,{...e})})),n.identifyOnResolve?.(a.identifyOnResolve()),n),o=e=>{const t=[];return e.before.forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))})),t.push(e),e.after.reverse().forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))})),t},s=(n=!1)=>{const i=[],r=[],s={};e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of Mt(t.name,t.aliases))s[e]=t;i.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of Mt(t.name,t.aliases))s[e]=t;r.push(t)})),r.forEach((e=>{if(e.toMiddleware){const t=s[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${Lt(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}}));const a=(c=i,c.sort(((e,t)=>_t[t.step]-_t[e.step]||Ft[t.priority||"normal"]-Ft[e.priority||"normal"]))).map(o).reduce(((e,t)=>(e.push(...t),e)),[]);var c;return a},a={add:(t,n={})=>{const{name:r,override:o,aliases:s}=n,a={step:"initialize",priority:"normal",middleware:t,...n},c=Mt(r,s);if(c.length>0){if(c.some((e=>i.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${Lt(r,s)}'`);for(const t of c){const n=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(-1===n)continue;const i=e[n];if(i.step!==a.step||a.priority!==i.priority)throw new Error(`"${Lt(i.name,i.aliases)}" middleware with ${i.priority} priority in ${i.step} step cannot be overridden by "${Lt(r,s)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(n,1)}}for(const e of c)i.add(e)}e.push(a)},addRelativeTo:(e,n)=>{const{name:r,override:o,aliases:s}=n,a={middleware:e,...n},c=Mt(r,s);if(c.length>0){if(c.some((e=>i.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${Lt(r,s)}'`);for(const e of c){const n=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(-1===n)continue;const i=t[n];if(i.toMiddleware!==a.toMiddleware||i.relation!==a.relation)throw new Error(`"${Lt(i.name,i.aliases)}" middleware ${i.relation} "${i.toMiddleware}" middleware cannot be overridden by "${Lt(r,s)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)i.add(e)}t.push(a)},clone:()=>r(kt()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let r=!1;const o=e=>{const t=Mt(e.name,e.aliases);if(t.includes(n)){r=!0;for(const e of t)i.delete(e);return!1}return!0};return e=e.filter(o),t=t.filter(o),r})(n):(n=>{let r=!1;const o=e=>{if(e.middleware===n){r=!0;for(const t of Mt(e.name,e.aliases))i.delete(t);return!1}return!0};return e=e.filter(o),t=t.filter(o),r})(n),removeByTag:n=>{let r=!1;const o=e=>{const{tags:t,name:o,aliases:s}=e;if(t&&t.includes(n)){const e=Mt(o,s);for(const t of e)i.delete(t);return r=!0,!1}return!0};return e=e.filter(o),t=t.filter(o),r},concat:e=>{const t=r(kt());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:r,identify:()=>s(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return Lt(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of s().map((e=>e.middleware)).reverse())e=n(e,t);return n&&console.log(a.identify()),e}};return a},_t={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Ft={high:3,normal:2,low:1};class $t{constructor(e){this.config=e,this.middlewareStack=kt()}send(e,t,n){const i="function"!=typeof t?t:void 0,r="function"==typeof t?t:n;let o;if(void 0===i&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?o=t.get(e.constructor):(o=e.resolveMiddleware(this.middlewareStack,this.config,i),t.set(e.constructor,o))}else delete this.handlers,o=e.resolveMiddleware(this.middlewareStack,this.config,i);if(!r)return o(e).then((e=>e.output));o(e).then((e=>r(null,e.output)),(e=>r(e))).catch((()=>{}))}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}class Ut{constructor(){this.middlewareStack=kt()}static classBuilder(){return new Bt}resolveMiddlewareWithContext(e,t,n,{middlewareFn:i,clientName:r,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,smithyContext:d,additionalContext:u,CommandCtor:l}){for(const r of i.bind(this)(l,e,t,n))this.middlewareStack.use(r);const p=e.concat(this.middlewareStack),{logger:h}=t,f={logger:h,clientName:r,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,[c]:{commandInstance:this,...d},...u},{requestHandler:m}=t;return p.resolve((e=>m.handle(e.request,n||{})),f)}}class Bt{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,n={}){return this._smithyContext={service:e,operation:t,...n},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){const e=this;let t;return t=class extends Ut{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this)}resolveMiddleware(n,i,r){return this.resolveMiddlewareWithContext(n,i,r,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const Gt="***SensitiveInformation***",jt=(e,t)=>{for(const n of Object.keys(e)){const i=e[n],r=async function(e,t,n){const r=new i(e);if("function"==typeof t)this.send(r,t);else{if("function"!=typeof n)return this.send(r,t);if("object"!=typeof t)throw new Error("Expected http options but got "+typeof t);this.send(r,t||{},n)}},o=(n[0].toLowerCase()+n.slice(1)).replace(/Command$/,"");t.prototype[o]=r}},zt=e=>{if(null!=e){if("number"==typeof e){if(0!==e&&1!==e||un.warn(dn(`Expected boolean, got ${typeof e}: ${e}`)),0===e)return!1;if(1===e)return!0}if("string"==typeof e){const t=e.toLowerCase();if("false"!==t&&"true"!==t||un.warn(dn(`Expected boolean, got ${typeof e}: ${e}`)),"false"===t)return!1;if("true"===t)return!0}if("boolean"==typeof e)return e;throw new TypeError(`Expected boolean, got ${typeof e}: ${e}`)}},Ht=e=>{if(null!=e){if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&un.warn(dn(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},Vt=Math.ceil(2**127*(2-2**-23)),qt=e=>{const t=Ht(e);if(void 0!==t&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>Vt)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},Wt=e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},Kt=e=>Qt(e,32),Yt=e=>Qt(e,16),Zt=e=>Qt(e,8),Qt=(e,t)=>{const n=Wt(e);if(void 0!==n&&Jt(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},Jt=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},Xt=(e,t)=>{if(null==e){if(t)throw new TypeError(`Expected a non-null value for ${t}`);throw new TypeError("Expected a non-null value")}return e},en=e=>{if(null==e)return;if("object"==typeof e&&!Array.isArray(e))return e;const t=Array.isArray(e)?"array":typeof e;throw new TypeError(`Expected object, got ${t}: ${e}`)},tn=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return un.warn(dn(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},nn=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,rn=e=>{const t=e.match(nn);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},on=e=>"string"==typeof e?sn(e):Ht(e),sn=e=>{switch(e){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${e}`)}},an=e=>Kt("string"==typeof e?rn(e):e),cn=e=>Yt("string"==typeof e?rn(e):e),dn=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),un={warn:console.warn},ln=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],pn=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),hn=e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=pn.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[n,i,r,o,s,a,c,d]=t,u=cn(Cn(i)),l=wn(r,"month",1,12),p=wn(o,"day",1,31);return yn(u,l,p,{hours:s,minutes:a,seconds:c,fractionalMilliseconds:d})},fn=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),mn=e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=fn.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[n,i,r,o,s,a,c,d,u]=t,l=cn(Cn(i)),p=wn(r,"month",1,12),h=wn(o,"day",1,31),f=yn(l,p,h,{hours:s,minutes:a,seconds:c,fractionalMilliseconds:d});return"Z"!=u.toUpperCase()&&f.setTime(f.getTime()-En(u)),f},gn=e=>{if(null==e)return;let t;if("number"==typeof e)t=e;else if("string"==typeof e)t=(e=>Ht("string"==typeof e?rn(e):e))(e);else{if("object"!=typeof e||1!==e.tag)throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");t=e.value}if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(1e3*t))},yn=(e,t,n,i)=>{const r=t-1;return Sn(e,r,n),new Date(Date.UTC(e,r,n,wn(i.hours,"hour",0,23),wn(i.minutes,"minute",0,59),wn(i.seconds,"seconds",0,60),Pn(i.fractionalMilliseconds)))},bn=[31,28,31,30,31,30,31,31,30,31,30,31],Sn=(e,t,n)=>{let i=bn[t];if(1===t&&vn(e)&&(i=29),n>i)throw new TypeError(`Invalid day for ${ln[t]} in ${e}: ${n}`)},vn=e=>e%4==0&&(e%100!=0||e%400==0),wn=(e,t,n,i)=>{const r=(e=>Zt("string"==typeof e?rn(e):e))(Cn(e));if(r<n||r>i)throw new TypeError(`${t} must be between ${n} and ${i}, inclusive`);return r},Pn=e=>null==e?0:1e3*(e=>qt("string"==typeof e?rn(e):e))("0."+e),En=e=>{const t=e[0];let n=1;if("+"==t)n=1;else{if("-"!=t)throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);n=-1}return n*(60*Number(e.substring(1,3))+Number(e.substring(4,6)))*60*1e3},Cn=e=>{let t=0;for(;t<e.length-1&&"0"===e.charAt(t);)t++;return 0===t?e:e.slice(t)};class Tn extends Error{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 t=e;return Tn.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}static[Symbol.hasInstance](e){if(!e)return!1;const t=e;return this===Tn?Tn.isInstance(e):!!Tn.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const An=(e,t={})=>{Object.entries(t).filter((([,e])=>void 0!==e)).forEach((([t,n])=>{null!=e[t]&&""!==e[t]||(e[t]=n)}));const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},Rn=e=>({output:t,parsedBody:n,errorCode:i})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:i})=>{const r=xn(e),o=r.httpStatusCode?r.httpStatusCode+"":void 0,s=new n({name:t?.code||t?.Code||i||o||"UnknownError",$fault:"client",$metadata:r});throw An(s,t)})({output:t,parsedBody:n,exceptionCtor:e,errorCode:i})},xn=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),On=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},In=e=>Object.assign((e=>{const t=[];for(const n in s){const i=s[n];void 0!==e[i]&&t.push({algorithmId:()=>i,checksumConstructor:()=>e[i]})}return{addChecksumAlgorithm(e){t.push(e)},checksumAlgorithms:()=>t}})(e),(e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy:()=>e.retryStrategy}))(e)),Nn=e=>Object.assign((e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t})(e),(e=>{const t={};return t.retryStrategy=e.retryStrategy(),t})(e)),Dn=e=>{const t="#text";for(const n in e)e.hasOwnProperty(n)&&void 0!==e[n][t]?e[n]=e[n][t]:"object"==typeof e[n]&&null!==e[n]&&(e[n]=Dn(e[n]));return e};class Mn{trace(){}debug(){}info(){}warn(){}error(){}}function Ln(e,t,n){let i,r;i={},r=e;for(const e of Object.keys(r))Array.isArray(r[e])?_n(i,null,r,e):i[e]=r[e];return i}const kn=(e,t)=>{const n={};for(const i in t)_n(n,e,t,i);return n},_n=(e,t,n,i)=>{if(null!==t){let r=n[i];"function"==typeof r&&(r=[,r]);const[o=Fn,s=$n,a=i]=r;return void(("function"==typeof o&&o(t[a])||"function"!=typeof o&&o)&&(e[i]=s(t[a])))}let[r,o]=n[i];if("function"==typeof o){let t;const n=void 0===r&&null!=(t=o()),s="function"==typeof r&&!!r(void 0)||"function"!=typeof r&&!!r;n?e[i]=t:s&&(e[i]=o())}else{const t=void 0===r&&null!=o,n="function"==typeof r&&!!r(o)||"function"!=typeof r&&!!r;(t||n)&&(e[i]=o)}},Fn=e=>null!=e,$n=e=>e,Un=e=>{if(e!=e)return"NaN";switch(e){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return e}},Bn=e=>e.toISOString().replace(".000Z","Z"),Gn=e=>{if(null==e)return{};if(Array.isArray(e))return e.filter((e=>null!=e)).map(Gn);if("object"==typeof e){const t={};for(const n of Object.keys(e))null!=e[n]&&(t[n]=Gn(e[n]));return t}return e},jn=(e,t)=>ie(e,t).then((e=>t.utf8Encoder(e))),zn=(e,t)=>jn(e,t).then((e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}})),Hn=async(e,t)=>{const n=await zn(e,t);return n.message=n.message??n.Message,n},Vn=(e,t)=>{const n=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=(r=e.headers,o="x-amzn-errortype",Object.keys(r).find((e=>e.toLowerCase()===o.toLowerCase())));var r,o;return void 0!==i?n(e.headers[i]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):void 0};var qn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Wn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kn,Yn,Zn={},Qn={};function Jn(){return Kn||(Kn=1,function(e){const t=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n="["+t+"]["+(t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*",i=new RegExp("^"+n+"$");e.isExist=function(e){return void 0!==e},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,n){if(t){const i=Object.keys(t),r=i.length;for(let o=0;o<r;o++)e[i[o]]="strict"===n?[t[i[o]]]:t[i[o]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(e){const t=i.exec(e);return!(null==t)},e.getAllMatches=function(e,t){const n=[];let i=t.exec(e);for(;i;){const r=[];r.startIndex=t.lastIndex-i[0].length;const o=i.length;for(let e=0;e<o;e++)r.push(i[e]);n.push(r),i=t.exec(e)}return n},e.nameRegexp=n}(Qn)),Qn}function Xn(){if(Yn)return Zn;Yn=1;const e=Jn(),t={allowBooleanAttributes:!1,unpairedTags:[]};function n(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function i(e,t){const n=t;for(;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{const i=e.substr(n,t-n);if(t>5&&"xml"===i)return l("InvalidXml","XML declaration allowed only at the start of the document.",h(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function r(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let n=1;for(t+=8;t<e.length;t++)if("<"===e[t])n++;else if(">"===e[t]&&(n--,0===n))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}Zn.validate=function(o,s){s=Object.assign({},t,s);const c=[];let p=!1,f=!1;"\ufeff"===o[0]&&(o=o.substr(1));for(let t=0;t<o.length;t++)if("<"===o[t]&&"?"===o[t+1]){if(t+=2,t=i(o,t),t.err)return t}else{if("<"!==o[t]){if(n(o[t]))continue;return l("InvalidChar","char '"+o[t]+"' is not expected.",h(o,t))}{let g=t;if(t++,"!"===o[t]){t=r(o,t);continue}{let y=!1;"/"===o[t]&&(y=!0,t++);let b="";for(;t<o.length&&">"!==o[t]&&" "!==o[t]&&"\t"!==o[t]&&"\n"!==o[t]&&"\r"!==o[t];t++)b+=o[t];if(b=b.trim(),"/"===b[b.length-1]&&(b=b.substring(0,b.length-1),t--),m=b,!e.isName(m)){let e;return e=0===b.trim().length?"Invalid space after '<'.":"Tag '"+b+"' is an invalid name.",l("InvalidTag",e,h(o,t))}const S=a(o,t);if(!1===S)return l("InvalidAttr","Attributes for '"+b+"' have open quote.",h(o,t));let v=S.value;if(t=S.index,"/"===v[v.length-1]){const e=t-v.length;v=v.substring(0,v.length-1);const n=d(v,s);if(!0!==n)return l(n.err.code,n.err.msg,h(o,e+n.err.line));p=!0}else if(y){if(!S.tagClosed)return l("InvalidTag","Closing tag '"+b+"' doesn't have proper closing.",h(o,t));if(v.trim().length>0)return l("InvalidTag","Closing tag '"+b+"' can't have attributes or invalid starting.",h(o,g));if(0===c.length)return l("InvalidTag","Closing tag '"+b+"' has not been opened.",h(o,g));{const e=c.pop();if(b!==e.tagName){let t=h(o,e.tagStartPos);return l("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+t.line+", col "+t.col+") instead of closing tag '"+b+"'.",h(o,g))}0==c.length&&(f=!0)}}else{const e=d(v,s);if(!0!==e)return l(e.err.code,e.err.msg,h(o,t-v.length+e.err.line));if(!0===f)return l("InvalidXml","Multiple possible root nodes found.",h(o,t));-1!==s.unpairedTags.indexOf(b)||c.push({tagName:b,tagStartPos:g}),p=!0}for(t++;t<o.length;t++)if("<"===o[t]){if("!"===o[t+1]){t++,t=r(o,t);continue}if("?"!==o[t+1])break;if(t=i(o,++t),t.err)return t}else if("&"===o[t]){const e=u(o,t);if(-1==e)return l("InvalidChar","char '&' is not expected.",h(o,t));t=e}else if(!0===f&&!n(o[t]))return l("InvalidXml","Extra text at the end",h(o,t));"<"===o[t]&&t--}}}var m;return p?1==c.length?l("InvalidTag","Unclosed tag '"+c[0].tagName+"'.",h(o,c[0].tagStartPos)):!(c.length>0)||l("InvalidXml","Invalid '"+JSON.stringify(c.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):l("InvalidXml","Start tag expected.",1)};const o='"',s="'";function a(e,t){let n="",i="",r=!1;for(;t<e.length;t++){if(e[t]===o||e[t]===s)""===i?i=e[t]:i!==e[t]||(i="");else if(">"===e[t]&&""===i){r=!0;break}n+=e[t]}return""===i&&{value:n,index:t,tagClosed:r}}const c=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function d(t,n){const i=e.getAllMatches(t,c),r={};for(let e=0;e<i.length;e++){if(0===i[e][1].length)return l("InvalidAttr","Attribute '"+i[e][2]+"' has no space in starting.",f(i[e]));if(void 0!==i[e][3]&&void 0===i[e][4])return l("InvalidAttr","Attribute '"+i[e][2]+"' is without value.",f(i[e]));if(void 0===i[e][3]&&!n.allowBooleanAttributes)return l("InvalidAttr","boolean attribute '"+i[e][2]+"' is not allowed.",f(i[e]));const t=i[e][2];if(!p(t))return l("InvalidAttr","Attribute '"+t+"' is an invalid name.",f(i[e]));if(r.hasOwnProperty(t))return l("InvalidAttr","Attribute '"+t+"' is repeated.",f(i[e]));r[t]=1}return!0}function u(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let n=/\d/;for("x"===e[t]&&(t++,n=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(n))break}return-1}(e,++t);let n=0;for(;t<e.length;t++,n++)if(!(e[t].match(/\w/)&&n<20)){if(";"===e[t])break;return-1}return t}function l(e,t,n){return{err:{code:e,msg:t,line:n.line||n,col:n.col}}}function p(t){return e.isName(t)}function h(e,t){const n=e.substring(0,t).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function f(e){return e.startIndex+e[1].length}return Zn}var ei,ti,ni,ii,ri,oi,si,ai,ci,di={};function ui(){if(ni)return ti;ni=1;return ti=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}}function li(){if(si)return oi;si=1;const e=/^[-+]?0x[a-fA-F0-9]+$/,t=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,n={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};return oi=function(i,r={}){if(r=Object.assign({},n,r),!i||"string"!=typeof i)return i;let o=i.trim();if(void 0!==r.skipLike&&r.skipLike.test(o))return i;if("0"===i)return 0;if(r.hex&&e.test(o))return function(e,t){if(parseInt)return parseInt(e,t);if(Number.parseInt)return Number.parseInt(e,t);if(window&&window.parseInt)return window.parseInt(e,t);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(o,16);if(-1!==o.search(/[eE]/)){const e=o.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(e){if(r.leadingZeros)o=(e[1]||"")+e[3];else if("0"!==e[2]||"."!==e[3][0])return i;return r.eNotation?Number(o):i}return i}{const e=t.exec(o);if(e){const t=e[1],n=e[2];let s=function(e){if(e&&-1!==e.indexOf("."))return"."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1)),e;return e}(e[3]);if(!r.leadingZeros&&n.length>0&&t&&"."!==o[2])return i;if(!r.leadingZeros&&n.length>0&&!t&&"."!==o[1])return i;if(r.leadingZeros&&n===i)return 0;{const e=Number(o),a=""+e;return-1!==a.search(/[eE]/)?r.eNotation?e:i:-1!==o.indexOf(".")?"0"===a&&""===s||a===s||t&&a==="-"+s?e:i:n?s===a||t+s===a?e:i:o===a||o===t+a?e:i}}return i}}}function pi(){if(ci)return ai;ci=1;const e=Jn(),t=ui(),n=function(){if(ri)return ii;ri=1;const e=Jn();function t(e,t){let n="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)n+=e[t];if(n=n.trim(),-1!==n.indexOf(" "))throw new Error("External entites are not supported");const i=e[t++];let r="";for(;t<e.length&&e[t]!==i;t++)r+=e[t];return[n,r,t]}function n(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function i(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function r(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function o(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function s(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function a(t){if(e.isName(t))return t;throw new Error(`Invalid entity name ${t}`)}return ii=function(e,c){const d={};if("O"!==e[c+3]||"C"!==e[c+4]||"T"!==e[c+5]||"Y"!==e[c+6]||"P"!==e[c+7]||"E"!==e[c+8])throw new Error("Invalid Tag instead of DOCTYPE");{c+=9;let u=1,l=!1,p=!1,h="";for(;c<e.length;c++)if("<"!==e[c]||p)if(">"===e[c]){if(p?"-"===e[c-1]&&"-"===e[c-2]&&(p=!1,u--):u--,0===u)break}else"["===e[c]?l=!0:h+=e[c];else{if(l&&i(e,c))c+=7,[entityName,val,c]=t(e,c+1),-1===val.indexOf("&")&&(d[a(entityName)]={regx:RegExp(`&${entityName};`,"g"),val:val});else if(l&&r(e,c))c+=8;else if(l&&o(e,c))c+=8;else if(l&&s(e,c))c+=9;else{if(!n)throw new Error("Invalid DOCTYPE");p=!0}u++,h=""}if(0!==u)throw new Error("Unclosed DOCTYPE")}return{entities:d,i:c}},ii}(),i=li();function r(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const i=t[n];this.lastEntities[i]={regex:new RegExp("&"+i+";","g"),val:e[i]}}}function o(e,t,n,i,r,o,s){if(void 0!==e&&(this.options.trimValues&&!i&&(e=e.trim()),e.length>0)){s||(e=this.replaceEntitiesValue(e));const i=this.options.tagValueProcessor(t,e,n,r,o);if(null==i)return e;if(typeof i!=typeof e||i!==e)return i;if(this.options.trimValues)return y(e,this.options.parseTagValue,this.options.numberParseOptions);return e.trim()===e?y(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function s(e){if(this.options.removeNSPrefix){const t=e.split(":"),n="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=n+t[1])}return e}const a=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function c(t,n,i){if(!this.options.ignoreAttributes&&"string"==typeof t){const i=e.getAllMatches(t,a),r=i.length,o={};for(let e=0;e<r;e++){const t=this.resolveNameSpace(i[e][1]);let r=i[e][4],s=this.options.attributeNamePrefix+t;if(t.length)if(this.options.transformAttributeName&&(s=this.options.transformAttributeName(s)),"__proto__"===s&&(s="#__proto__"),void 0!==r){this.options.trimValues&&(r=r.trim()),r=this.replaceEntitiesValue(r);const e=this.options.attributeValueProcessor(t,r,n);o[s]=null==e?r:typeof e!=typeof r||e!==r?e:y(r,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[s]=!0)}if(!Object.keys(o).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=o,e}return o}}const d=function(e){e=e.replace(/\r\n?/g,"\n");const i=new t("!xml");let r=i,o="",s="";for(let a=0;a<e.length;a++){if("<"===e[a])if("/"===e[a+1]){const t=f(e,">",a,"Closing Tag is not closed.");let n=e.substring(a+2,t).trim();if(this.options.removeNSPrefix){const e=n.indexOf(":");-1!==e&&(n=n.substr(e+1))}this.options.transformTagName&&(n=this.options.transformTagName(n)),r&&(o=this.saveTextToParentTag(o,r,s));const i=s.substring(s.lastIndexOf(".")+1);if(n&&-1!==this.options.unpairedTags.indexOf(n))throw new Error(`Unpaired tag can not be used as closing tag: </${n}>`);let c=0;i&&-1!==this.options.unpairedTags.indexOf(i)?(c=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=s.lastIndexOf("."),s=s.substring(0,c),r=this.tagsNodeStack.pop(),o="",a=t}else if("?"===e[a+1]){let n=m(e,a,!1,"?>");if(!n)throw new Error("Pi Tag is not closed.");if(o=this.saveTextToParentTag(o,r,s),this.options.ignoreDeclaration&&"?xml"===n.tagName||this.options.ignorePiTags);else{const e=new t(n.tagName);e.add(this.options.textNodeName,""),n.tagName!==n.tagExp&&n.attrExpPresent&&(e[":@"]=this.buildAttributesMap(n.tagExp,s,n.tagName)),this.addChild(r,e,s)}a=n.closeIndex+1}else if("!--"===e.substr(a+1,3)){const t=f(e,"--\x3e",a+4,"Comment is not closed.");if(this.options.commentPropName){const n=e.substring(a+4,t-2);o=this.saveTextToParentTag(o,r,s),r.add(this.options.commentPropName,[{[this.options.textNodeName]:n}])}a=t}else if("!D"===e.substr(a+1,2)){const t=n(e,a);this.docTypeEntities=t.entities,a=t.i}else if("!["===e.substr(a+1,2)){const t=f(e,"]]>",a,"CDATA is not closed.")-2,n=e.substring(a+9,t);o=this.saveTextToParentTag(o,r,s);let i=this.parseTextData(n,r.tagname,s,!0,!1,!0,!0);null==i&&(i=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:n}]):r.add(this.options.textNodeName,i),a=t+2}else{let n=m(e,a,this.options.removeNSPrefix),c=n.tagName;const d=n.rawTagName;let u=n.tagExp,l=n.attrExpPresent,p=n.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&o&&"!xml"!==r.tagname&&(o=this.saveTextToParentTag(o,r,s,!1));const h=r;if(h&&-1!==this.options.unpairedTags.indexOf(h.tagname)&&(r=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),c!==i.tagname&&(s+=s?"."+c:c),this.isItStopNode(this.options.stopNodes,s,c)){let i="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)"/"===c[c.length-1]?(c=c.substr(0,c.length-1),s=s.substr(0,s.length-1),u=c):u=u.substr(0,u.length-1),a=n.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))a=n.closeIndex;else{const t=this.readStopNodeData(e,d,p+1);if(!t)throw new Error(`Unexpected end of ${d}`);a=t.i,i=t.tagContent}const o=new t(c);c!==u&&l&&(o[":@"]=this.buildAttributesMap(u,s,c)),i&&(i=this.parseTextData(i,c,s,!0,l,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),o.add(this.options.textNodeName,i),this.addChild(r,o,s)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),s=s.substr(0,s.length-1),u=c):u=u.substr(0,u.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const e=new t(c);c!==u&&l&&(e[":@"]=this.buildAttributesMap(u,s,c)),this.addChild(r,e,s),s=s.substr(0,s.lastIndexOf("."))}else{const e=new t(c);this.tagsNodeStack.push(r),c!==u&&l&&(e[":@"]=this.buildAttributesMap(u,s,c)),this.addChild(r,e,s),r=e}o="",a=p}}else o+=e[a]}return i.child};function u(e,t,n){const i=this.options.updateTag(t.tagname,n,t[":@"]);!1===i||("string"==typeof i?(t.tagname=i,e.addChild(t)):e.addChild(t))}const l=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){const n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function p(e,t,n,i){return e&&(void 0===i&&(i=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,n,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,i))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function h(e,t,n){const i="*."+n;for(const n in e){const r=e[n];if(i===r||t===r)return!0}return!1}function f(e,t,n,i){const r=e.indexOf(t,n);if(-1===r)throw new Error(i);return r+t.length-1}function m(e,t,n,i=">"){const r=function(e,t,n=">"){let i,r="";for(let o=t;o<e.length;o++){let t=e[o];if(i)t===i&&(i="");else if('"'===t||"'"===t)i=t;else if(t===n[0]){if(!n[1])return{data:r,index:o};if(e[o+1]===n[1])return{data:r,index:o}}else"\t"===t&&(t=" ");r+=t}}(e,t+1,i);if(!r)return;let o=r.data;const s=r.index,a=o.search(/\s/);let c=o,d=!0;-1!==a&&(c=o.substring(0,a),o=o.substring(a+1).trimStart());const u=c;if(n){const e=c.indexOf(":");-1!==e&&(c=c.substr(e+1),d=c!==r.data.substr(e+1))}return{tagName:c,tagExp:o,closeIndex:s,attrExpPresent:d,rawTagName:u}}function g(e,t,n){const i=n;let r=1;for(;n<e.length;n++)if("<"===e[n])if("/"===e[n+1]){const o=f(e,">",n,`${t} is not closed`);if(e.substring(n+2,o).trim()===t&&(r--,0===r))return{tagContent:e.substring(i,n),i:o};n=o}else if("?"===e[n+1]){n=f(e,"?>",n+1,"StopNode is not closed.")}else if("!--"===e.substr(n+1,3)){n=f(e,"--\x3e",n+3,"StopNode is not closed.")}else if("!["===e.substr(n+1,2)){n=f(e,"]]>",n,"StopNode is not closed.")-2}else{const i=m(e,n,">");if(i){(i&&i.tagName)===t&&"/"!==i.tagExp[i.tagExp.length-1]&&r++,n=i.closeIndex}}}function y(t,n,r){if(n&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&i(t,r)}return e.isExist(t)?t:""}return ai=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=r,this.parseXml=d,this.parseTextData=o,this.resolveNameSpace=s,this.buildAttributesMap=c,this.isItStopNode=h,this.replaceEntitiesValue=l,this.readStopNodeData=g,this.saveTextToParentTag=p,this.addChild=u}}}var hi,fi,mi,gi,yi,bi,Si,vi,wi,Pi={};function Ei(){if(hi)return Pi;function e(r,o,s){let a;const c={};for(let d=0;d<r.length;d++){const u=r[d],l=t(u);let p="";if(p=void 0===s?l:s+"."+l,l===o.textNodeName)void 0===a?a=u[l]:a+=""+u[l];else{if(void 0===l)continue;if(u[l]){let t=e(u[l],o,p);const r=i(t,o);u[":@"]?n(t,u[":@"],p,o):1!==Object.keys(t).length||void 0===t[o.textNodeName]||o.alwaysCreateTextNode?0===Object.keys(t).length&&(o.alwaysCreateTextNode?t[o.textNodeName]="":t=""):t=t[o.textNodeName],void 0!==c[l]&&c.hasOwnProperty(l)?(Array.isArray(c[l])||(c[l]=[c[l]]),c[l].push(t)):o.isArray(l,p,r)?c[l]=[t]:c[l]=t}}}return"string"==typeof a?a.length>0&&(c[o.textNodeName]=a):void 0!==a&&(c[o.textNodeName]=a),c}function t(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const n=t[e];if(":@"!==n)return n}}function n(e,t,n,i){if(t){const r=Object.keys(t),o=r.length;for(let s=0;s<o;s++){const o=r[s];i.isArray(o,n+"."+o,!0,!0)?e[o]=[t[o]]:e[o]=t[o]}}}function i(e,t){const{textNodeName:n}=t,i=Object.keys(e).length;return 0===i||!(1!==i||!e[n]&&"boolean"!=typeof e[n]&&0!==e[n])}return hi=1,Pi.prettify=function(t,n){return e(t,n)},Pi}function Ci(){if(mi)return fi;mi=1;const{buildOptions:e}=function(){if(ei)return di;ei=1;const e={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e}};return di.buildOptions=function(t){return Object.assign({},e,t)},di.defaultOptions=e,di}(),t=pi(),{prettify:n}=Ei(),i=Xn();return fi=class{constructor(t){this.externalEntities={},this.options=e(t)}parse(e,r){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(r){!0===r&&(r={});const t=i.validate(e,r);if(!0!==t)throw Error(`${t.err.msg}:${t.err.line}:${t.err.col}`)}const o=new t(this.options);o.addExternalEntities(this.externalEntities);const s=o.parseXml(e);return this.options.preserveOrder||void 0===s?s:n(s,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}}function Ti(){if(yi)return gi;yi=1;function e(o,s,a,c){let d="",u=!1;for(let l=0;l<o.length;l++){const p=o[l],h=t(p);if(void 0===h)continue;let f="";if(f=0===a.length?h:`${a}.${h}`,h===s.textNodeName){let e=p[h];i(f,s)||(e=s.tagValueProcessor(h,e),e=r(e,s)),u&&(d+=c),d+=e,u=!1;continue}if(h===s.cdataPropName){u&&(d+=c),d+=`<![CDATA[${p[h][0][s.textNodeName]}]]>`,u=!1;continue}if(h===s.commentPropName){d+=c+`\x3c!--${p[h][0][s.textNodeName]}--\x3e`,u=!0;continue}if("?"===h[0]){const e=n(p[":@"],s),t="?xml"===h?"":c;let i=p[h][0][s.textNodeName];i=0!==i.length?" "+i:"",d+=t+`<${h}${i}${e}?>`,u=!0;continue}let m=c;""!==m&&(m+=s.indentBy);const g=c+`<${h}${n(p[":@"],s)}`,y=e(p[h],s,f,m);-1!==s.unpairedTags.indexOf(h)?s.suppressUnpairedNode?d+=g+">":d+=g+"/>":y&&0!==y.length||!s.suppressEmptyNode?y&&y.endsWith(">")?d+=g+`>${y}${c}</${h}>`:(d+=g+">",y&&""!==c&&(y.includes("/>")||y.includes("</"))?d+=c+s.indentBy+y+c:d+=y,d+=`</${h}>`):d+=g+"/>",u=!0}return d}function t(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const i=t[n];if(e.hasOwnProperty(i)&&":@"!==i)return i}}function n(e,t){let n="";if(e&&!t.ignoreAttributes)for(let i in e){if(!e.hasOwnProperty(i))continue;let o=t.attributeValueProcessor(i,e[i]);o=r(o,t),!0===o&&t.suppressBooleanAttributes?n+=` ${i.substr(t.attributeNamePrefix.length)}`:n+=` ${i.substr(t.attributeNamePrefix.length)}="${o}"`}return n}function i(e,t){let n=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let i in t.stopNodes)if(t.stopNodes[i]===e||t.stopNodes[i]==="*."+n)return!0;return!1}function r(e,t){if(e&&e.length>0&&t.processEntities)for(let n=0;n<t.entities.length;n++){const i=t.entities[n];e=e.replace(i.regex,i.val)}return e}return gi=function(t,n){let i="";return n.format&&n.indentBy.length>0&&(i="\n"),e(t,n,"",i)}}var Ai=function(){if(wi)return vi;wi=1;const e=Xn(),t=Ci(),n=function(){if(Si)return bi;Si=1;const e=Ti(),t={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function n(e){this.options=Object.assign({},t,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=o),this.processTextOrObjNode=i,this.options.format?(this.indentate=r,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function i(e,t,n){const i=this.j2x(e,n+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,i.attrStr,n):this.buildObjectNode(i.val,t,i.attrStr,n)}function r(e){return this.options.indentBy.repeat(e)}function o(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}return n.prototype.build=function(t){return this.options.preserveOrder?e(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},n.prototype.j2x=function(e,t){let n="",i="";for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r))if(void 0===e[r])this.isAttribute(r)&&(i+="");else if(null===e[r])this.isAttribute(r)?i+="":"?"===r[0]?i+=this.indentate(t)+"<"+r+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+r+"/"+this.tagEndChar;else if(e[r]instanceof Date)i+=this.buildTextValNode(e[r],r,"",t);else if("object"!=typeof e[r]){const o=this.isAttribute(r);if(o)n+=this.buildAttrPairStr(o,""+e[r]);else if(r===this.options.textNodeName){let t=this.options.tagValueProcessor(r,""+e[r]);i+=this.replaceEntitiesValue(t)}else i+=this.buildTextValNode(e[r],r,"",t)}else if(Array.isArray(e[r])){const n=e[r].length;let o="",s="";for(let a=0;a<n;a++){const n=e[r][a];if(void 0===n);else if(null===n)"?"===r[0]?i+=this.indentate(t)+"<"+r+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+r+"/"+this.tagEndChar;else if("object"==typeof n)if(this.options.oneListGroup){const e=this.j2x(n,t+1);o+=e.val,this.options.attributesGroupName&&n.hasOwnProperty(this.options.attributesGroupName)&&(s+=e.attrStr)}else o+=this.processTextOrObjNode(n,r,t);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(r,n);e=this.replaceEntitiesValue(e),o+=e}else o+=this.buildTextValNode(n,r,"",t)}this.options.oneListGroup&&(o=this.buildObjectNode(o,r,s,t)),i+=o}else if(this.options.attributesGroupName&&r===this.options.attributesGroupName){const t=Object.keys(e[r]),i=t.length;for(let o=0;o<i;o++)n+=this.buildAttrPairStr(t[o],""+e[r][t[o]])}else i+=this.processTextOrObjNode(e[r],r,t);return{attrStr:n,val:i}},n.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},n.prototype.buildObjectNode=function(e,t,n,i){if(""===e)return"?"===t[0]?this.indentate(i)+"<"+t+n+"?"+this.tagEndChar:this.indentate(i)+"<"+t+n+this.closeTag(t)+this.tagEndChar;{let r="</"+t+this.tagEndChar,o="";return"?"===t[0]&&(o="?",r=""),!n&&""!==n||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===o.length?this.indentate(i)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(i)+"<"+t+n+o+this.tagEndChar+e+this.indentate(i)+r:this.indentate(i)+"<"+t+n+o+">"+e+r}},n.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},n.prototype.buildTextValNode=function(e,t,n,i){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(i)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(i)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(i)+"<"+t+n+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(t,e);return r=this.replaceEntitiesValue(r),""===r?this.indentate(i)+"<"+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(i)+"<"+t+n+">"+r+"</"+t+this.tagEndChar}},n.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const n=this.options.entities[t];e=e.replace(n.regex,n.val)}return e},bi=n}();return vi={XMLParser:t,XMLValidator:e,XMLBuilder:n}}();const Ri=(e,t)=>jn(e,t).then((e=>{if(e.length){const t=new Ai.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(e,t)=>""===t.trim()&&t.includes("\n")?"":void 0});let n;t.addEntity("#xD","\r"),t.addEntity("#10","\n");try{n=t.parse(e,!0)}catch(t){throw t&&"object"==typeof t&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}const i="#text",r=Object.keys(n)[0],o=n[r];return o[i]&&(o[r]=o[i],delete o[i]),Dn(o)}return{}})),xi=async(e,t)=>{const n=await Ri(e,t);return n.Error&&(n.Error.message=n.Error.message??n.Error.Message),n},Oi=/\d{12}\.ddb/;const Ii="user-agent",Ni="x-amz-user-agent",Di=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Mi=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const Li=e=>(t,n)=>async i=>{const{request:r}=i;if(!l.isInstance(r))return t(i);const{headers:o}=r,s=n?.userAgent?.map(ki)||[],a=(await e.defaultUserAgentProvider()).map(ki);await async function(e,t,n){const i=n.request;if("rpc-v2-cbor"===i?.headers?.["smithy-protocol"]&&ze(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?ze(e,"RETRY_MODE_ADAPTIVE","F"):ze(e,"RETRY_MODE_STANDARD","E"):ze(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(Oi)&&ze(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":ze(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":ze(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":ze(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const r=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(r?.$source){const t=r;t.accountId&&ze(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,i]of Object.entries(t.$source??{}))ze(e,n,i)}}(n,e,i);const c=n;a.push(`m/${function(e){let t="";for(const n in e){const i=e[n];if(!(t.length+i.length+1<=1024))break;t.length?t+=","+i:t+=i}return t}(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const d=e?.customUserAgent?.map(ki)||[],u=await e.userAgentAppId();u&&a.push(ki([`app/${u}`]));const p=[].concat([...a,...s,...d]).join(" "),h=[...a.filter((e=>e.startsWith("aws-sdk-"))),...d].join(" ");return"browser"!==e.runtime?(h&&(o[Ni]=o[Ni]?`${o[Ii]} ${h}`:h),o[Ii]=p):o[Ni]=p,t({...i,request:r})},ki=e=>{const t=e[0].split("/").map((e=>e.replace(Di,"-"))).join("/"),n=e[1]?.replace(Mi,"-"),i=t.indexOf("/"),r=t.substring(0,i);let o=t.substring(i+1);return"api"===r&&(o=o.toLowerCase()),[r,o,n].filter((e=>e&&e.length>0)).reduce(((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},_i={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Fi=e=>({applyToStack:t=>{t.add(Li(e),_i)}});var $i;!function(e){e.ENV="env",e.CONFIG="shared config entry"}($i||($i={}));const Ui=!1,Bi=!1,Gi=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),ji=e=>Gi(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,zi=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{if("string"==typeof t)return ji(t);const e=await t();return ji(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!Gi(e)||("function"!=typeof n?Promise.resolve(!!n):n())}})},Hi="content-length";const Vi={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},qi=e=>({applyToStack:t=>{var n;t.add((n=e.bodyLengthChecker,e=>async t=>{const i=t.request;if(l.isInstance(i)){const{body:e,headers:t}=i;if(e&&-1===Object.keys(t).map((e=>e.toLowerCase())).indexOf(Hi))try{const t=n(e);i.headers={...i.headers,[Hi]:String(t)}}catch(e){}}return e({...t,request:i})}),Vi)}}),Wi=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Ki=/(\d+\.){3}\d+/,Yi=/\.\./,Zi=e=>Wi.test(e)&&!Ki.test(e)&&!Yi.test(e),Qi=e=>{const[t,n,i,,,r]=e.split(":"),o="arn"===t&&e.split(":").length>=6,s=Boolean(o&&n&&i&&r);if(o&&!s)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return s},Ji=(e,t,n)=>{const i=async()=>{const i=n[e]??n[t];return"function"==typeof i?i():i};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{const e=await i();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:i,path:r}=e;return`${t}//${n}${i?":"+i:""}${r}`}}return e}:i},Xi=async e=>{};const er=e=>{if("string"==typeof e)return er(new URL(e));const{hostname:t,pathname:n,port:i,protocol:r,search:o}=e;let s;return o&&(s=function(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,i=null]=n.split("=");e=decodeURIComponent(e),i&&(i=decodeURIComponent(i)),e in t?Array.isArray(t[e])?t[e].push(i):t[e]=[t[e],i]:t[e]=i}return t}(o)),{hostname:t,port:i?parseInt(i):void 0,protocol:r,path:n,query:s}},tr=e=>"object"==typeof e?"url"in e?er(e.url):e:er(e),nr=async(e,t,n)=>{const i={},r=t?.getEndpointParameterInstructions?.()||{};for(const[t,o]of Object.entries(r))switch(o.type){case"staticContextParams":i[t]=o.value;break;case"contextParams":i[t]=e[o.name];break;case"clientContextParams":case"builtInParams":i[t]=await Ji(o.name,t,n)();break;case"operationContextParams":i[t]=o.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(o))}return 0===Object.keys(r).length&&Object.assign(i,n),"s3"===String(n.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Qi(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Zi(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(i),i},ir=({config:e,instructions:t})=>(n,i)=>async r=>{e.endpoint&&function(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}(i,"ENDPOINT_OVERRIDE","N");const o=await(async(e,t,n,i)=>{if(!n.endpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await Xi(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(tr(e)))}const r=await nr(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(r,i)})(r.input,{getEndpointParameterInstructions:()=>t},{...e},i);i.endpointV2=o,i.authSchemes=o.properties?.authSchemes;const s=i.authSchemes?.[0];if(s){i.signing_region=s.signingRegion,i.signing_service=s.signingName;const e=w(i),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:s.signingRegion,signingRegion:s.signingRegion,signing_service:s.signingName,signingName:s.signingName,signingRegionSet:s.signingRegionSet},s.properties))}return n({...r})},rr={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:R.name},or=(e,t)=>({applyToStack:n=>{n.addRelativeTo(ir({config:e,instructions:t}),rr)}}),sr=e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:i,useFipsEndpoint:r}=e,o=null!=n?async()=>tr(await P(n)()):void 0,s=!!n,a=Object.assign(e,{endpoint:o,tls:t,isCustomEndpoint:s,useDualstackEndpoint:P(i??!1),useFipsEndpoint:P(r??!1)});let c;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=Xi(e.serviceId)),c),a};var ar;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(ar||(ar={}));const cr=ar.STANDARD,dr=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],ur=["TimeoutError","RequestTimeout","RequestTimeoutException"],lr=[500,502,503,504],pr=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],hr=e=>429===e.$metadata?.httpStatusCode||dr.includes(e.name)||1==e.$retryable?.throttling,fr=(e,t=0)=>(e=>e.$metadata?.clockSkewCorrected)(e)||ur.includes(e.name)||pr.includes(e?.code||"")||lr.includes(e.$metadata?.httpStatusCode||0)||void 0!==e.cause&&t<=10&&fr(e.cause,t+1);class mr{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,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 t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,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 t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise((e=>mr.setTimeoutFn(e,t)))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),hr(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(t,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(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}mr.setTimeoutFn=setTimeout;const gr=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(2e4,e),getRetryCost:()=>n});class yr{constructor(e){this.maxAttempts=e,this.mode=ar.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=100;return{computeNextBackoffDelay:t=>Math.floor(Math.min(2e4,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return gr({retryDelay:100,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===n?500:100);const i=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),r=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,i):i,o=this.getCapacityCost(n);return this.capacity-=o,gr({retryDelay:r,retryCount:e.getRetryCount()+1,retryCost:o})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn("Max attempts provider could not resolve. Using default of 3"),3}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class br{constructor(e,t){this.maxAttemptsProvider=e,this.mode=ar.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new mr,this.standardRetryStrategy=new yr(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}let Sr;const vr=new Uint8Array(16);function wr(){if(!Sr&&(Sr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Sr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Sr(vr)}const Pr=[];for(let e=0;e<256;++e)Pr.push((e+256).toString(16).slice(1));var Er={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Cr(e,t,n){if(Er.randomUUID&&!e)return Er.randomUUID();const i=(e=e||{}).random||(e.rng||wr)();return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(e,t=0){return Pr[e[t+0]]+Pr[e[t+1]]+Pr[e[t+2]]+Pr[e[t+3]]+"-"+Pr[e[t+4]]+Pr[e[t+5]]+"-"+Pr[e[t+6]]+Pr[e[t+7]]+"-"+Pr[e[t+8]]+Pr[e[t+9]]+"-"+Pr[e[t+10]]+Pr[e[t+11]]+Pr[e[t+12]]+Pr[e[t+13]]+Pr[e[t+14]]+Pr[e[t+15]]}(i)}const Tr=e=>{const{retryStrategy:t,retryMode:n,maxAttempts:i}=e,r=P(i??3);return Object.assign(e,{maxAttempts:r,retryStrategy:async()=>{if(t)return t;return await P(n)()===ar.ADAPTIVE?new br(r):new yr(r)}})},Ar=e=>e?.body instanceof ReadableStream,Rr=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,xr=e=>{const t={error:e,errorType:Or(e)},n=Dr(e.$response);return n&&(t.retryAfterHint=n),t},Or=e=>hr(e)?"THROTTLING":fr(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!fr(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",Ir={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Nr=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async i=>{let r=await e.retryStrategy();const o=await e.maxAttempts();if(!Rr(r))return r?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",r.mode]]),r.retry(t,i);{let e=await r.acquireInitialRetryToken(n.partition_id),a=new Error,c=0,d=0;const{request:u}=i,p=l.isInstance(u);for(p&&(u.headers["amz-sdk-invocation-id"]=Cr());;)try{p&&(u.headers["amz-sdk-request"]=`attempt=${c+1}; max=${o}`);const{response:n,output:s}=await t(i);return r.recordSuccess(e),s.$metadata.attempts=c+1,s.$metadata.totalRetryDelay=d,{response:n,output:s}}catch(t){const i=xr(t);if(a=(s=t)instanceof Error?s:s instanceof Object?Object.assign(new Error,s):"string"==typeof s?new Error(s):new Error(`AWS SDK error wrapper for ${s}`),p&&Ar(u))throw(n.logger instanceof Mn?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),a;try{e=await r.refreshRetryTokenForRetry(e,i)}catch(e){throw a.$metadata||(a.$metadata={}),a.$metadata.attempts=c+1,a.$metadata.totalRetryDelay=d,a}c=e.getRetryCount();const o=e.getRetryDelay();d+=o,await new Promise((e=>setTimeout(e,o)))}}var s})(e),Ir)}}),Dr=e=>{if(!p.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const n=e.headers[t],i=Number(n);if(!Number.isNaN(i))return new Date(1e3*i);return new Date(n)},Mr=async(e,t,n)=>({operation:w(t).operation,region:await P(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Lr=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"geo",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},kr={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var _r="3.782.0";var Fr="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function $r(e){return e instanceof Uint8Array?e:"string"==typeof e?Fr(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function Ur(e){return"string"==typeof e?0===e.length:0===e.byteLength}var Br={name:"SHA-256"},Gr={name:"HMAC",hash:Br},jr=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 zr={};function Hr(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:zr}var Vr=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!Ur(e)){var t=$r(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return Hr().crypto.subtle.sign(Gr,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):Ur(this.toHash)?Promise.resolve(jr):Promise.resolve().then((function(){return Hr().crypto.subtle.digest(Br,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise((function(t,n){Hr().crypto.subtle.importKey("raw",$r(e.secret),Gr,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))},e}();function qr(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))}function Wr(e,t){var n,i,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}"function"==typeof SuppressedError&&SuppressedError;var Kr=64,Yr=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]),Zr=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],Qr=Math.pow(2,53)-1,Jr=function(){function e(){this.state=Int32Array.from(Zr),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>Qr)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===Kr&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%Kr>=56){for(var i=this.bufferLength;i<Kr;i++)t.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(i=this.bufferLength;i<56;i++)t.setUint8(i,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}var r=new Uint8Array(32);for(i=0;i<8;i++)r[4*i]=this.state[i]>>>24&255,r[4*i+1]=this.state[i]>>>16&255,r[4*i+2]=this.state[i]>>>8&255,r[4*i+3]=this.state[i]>>>0&255;return r},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],i=t[1],r=t[2],o=t[3],s=t[4],a=t[5],c=t[6],d=t[7],u=0;u<Kr;u++){if(u<16)this.temp[u]=(255&e[4*u])<<24|(255&e[4*u+1])<<16|(255&e[4*u+2])<<8|255&e[4*u+3];else{var l=this.temp[u-2],p=(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10,h=((l=this.temp[u-15])>>>7|l<<25)^(l>>>18|l<<14)^l>>>3;this.temp[u]=(p+this.temp[u-7]|0)+(h+this.temp[u-16]|0)}var f=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&a^~s&c)|0)+(d+(Yr[u]+this.temp[u]|0)|0)|0,m=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&i^n&r^i&r)|0;d=c,c=a,a=s,s=o+f|0,o=r,r=i,i=n,n=f+m|0}t[0]+=n,t[1]+=i,t[2]+=r,t[3]+=o,t[4]+=s,t[5]+=a,t[6]+=c,t[7]+=d},e}(),Xr=function(){function e(e){this.secret=e,this.hash=new Jr,this.reset()}return e.prototype.update=function(e){if(!Ur(e)&&!this.error)try{this.hash.update($r(e))}catch(e){this.error=e}},e.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()},e.prototype.digest=function(){return qr(this,void 0,void 0,(function(){return Wr(this,(function(e){return[2,this.digestSync()]}))}))},e.prototype.reset=function(){if(this.hash=new Jr,this.secret){this.outer=new Jr;var e=function(e){var t=$r(e);if(t.byteLength>Kr){var n=new Jr;n.update(t),t=n.digest()}var i=new Uint8Array(Kr);return i.set(t),i}(this.secret),t=new Uint8Array(Kr);t.set(e);for(var n=0;n<Kr;n++)e[n]^=54,t[n]^=92;this.hash.update(e),this.outer.update(t);for(n=0;n<e.byteLength;n++)e[n]=0}},e}();var eo=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function to(e){return!(!function(e){if("object"==typeof e&&"object"==typeof e.crypto){return"function"==typeof e.crypto.getRandomValues}return!1}(e)||"object"!=typeof e.crypto.subtle)&&function(e){return e&&eo.every((function(t){return"function"==typeof e[t]}))}(e.crypto.subtle)}var no,io=function(){function e(e){to(Hr())?this.hash=new Vr(e):this.hash=new Xr(e)}return e.prototype.update=function(e,t){this.hash.update($r(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),ro={exports:{}};var oo=(no||(no=1,function(e){e.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){t.__esModule=!0,t.default=void 0;var i=n(18),r=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,i){void 0===i&&(i=!1);var r=e.getVersionPrecision(t),o=e.getVersionPrecision(n),s=Math.max(r,o),a=0,c=e.map([t,n],(function(t){var n=s-e.getVersionPrecision(t),i=t+new Array(n+1).join(".0");return e.map(i.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(i&&(a=s-Math.min(r,o)),s-=1;s>=a;){if(c[0][s]>c[1][s])return 1;if(c[0][s]===c[1][s]){if(s===a)return 0;s-=1}else if(c[0][s]<c[1][s])return-1}},e.map=function(e,t){var n,i=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)i.push(t(e[n]));return i},e.find=function(e,t){var n,i;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,i=e.length;n<i;n+=1){var r=e[n];if(t(r,n))return r}},e.assign=function(e){for(var t,n,i=e,r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){i[t]=e[t]}))};for(t=0,n=o.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return i.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return i.BROWSER_MAP[e]||""},e}();t.default=r,e.exports=t.default},18:function(e,t,n){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,r=(i=n(91))&&i.__esModule?i:{default:i},o=n(18);function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var a=function(){function e(){}var t,n,i;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new r.default(e,t)},e.parse=function(e){return new r.default(e).getResult()},t=e,i=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],(n=null)&&s(t.prototype,n),i&&s(t,i),e}();t.default=a,e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var i=c(n(92)),r=c(n(93)),o=c(n(94)),s=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var d=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},i=0,r={},o=0;if(Object.keys(e).forEach((function(t){var s=e[t];"string"==typeof s?(r[t]=s,o+=1):"object"==typeof s&&(n[t]=s,i+=1)})),i>0){var s=Object.keys(n),c=a.default.find(s,(function(e){return t.isOS(e)}));if(c){var d=this.satisfies(n[c]);if(void 0!==d)return d}var u=a.default.find(s,(function(e){return t.isPlatform(e)}));if(u){var l=this.satisfies(n[u]);if(void 0!==l)return l}}if(o>0){var p=Object.keys(r),h=a.default.find(p,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(r[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),i=e.toLowerCase(),r=a.default.getBrowserTypeByAlias(i);return t&&r&&(i=r.toLowerCase()),i===n},t.compareVersion=function(e){var t=[0],n=e,i=!1,r=this.getBrowserVersion();if("string"==typeof r)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(i=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(i=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(r,n,i))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=d,e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=r.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=r.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=r.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=r.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=r.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=r.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=r.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=r.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=r.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=r.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=r.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=r.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=r.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=r.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=r.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=r.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=r.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=r.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=r.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=r.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=r.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=r.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=r.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=r.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=r.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=r.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=r.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:r.default.getFirstMatch(t,e),version:r.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},o=n(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=r.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=r.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=r.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=r.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},n=r.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=r.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=r.default.getMacOSVersionName(t),i={name:o.OS_MAP.MacOS,version:t};return n&&(i.versionName=n),i}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=r.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=r.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=r.default.getAndroidVersionName(t),i={name:o.OS_MAP.Android,version:t};return n&&(i.versionName=n),i}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=r.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:o.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=r.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||r.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||r.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=r.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=r.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=r.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},o=n(18),s=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=r.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=r.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},o=n(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=r.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},n=r.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},n=r.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},n=r.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},n=r.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=s,e.exports=t.default}})}(ro)),ro.exports),so=Wn(oo);const ao=({serviceId:e,clientVersion:t})=>async n=>{const i="undefined"!=typeof window&&window?.navigator?.userAgent?so.parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",t],["ua","2.1"],[`os/${i?.os?.name||"other"}`,i?.os?.version],["lang/js"],["md/browser",`${i?.browser?.name??"unknown"}_${i?.browser?.version??"unknown"}`]];e&&r.push([`api/${e}`,t]);const o=await(n?.userAgentAppId?.());return o&&r.push([`app/${o}`]),r},co=e=>()=>Promise.reject(e),uo="function"==typeof TextEncoder?new TextEncoder:null,lo=e=>{if("string"==typeof e){if(uo)return uo.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const i=e.charCodeAt(n);i>127&&i<=2047?t++:i>2047&&i<=65535&&(t+=2),i>=56320&&i<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)},po="required",ho="fn",fo="argv",mo="ref",go=!0,yo="isSet",bo="booleanEquals",So="error",vo="endpoint",wo="tree",Po="PartitionResult",Eo={[po]:!1,type:"String"},Co={[po]:!0,default:!1,type:"Boolean"},To={[mo]:"Endpoint"},Ao={[ho]:bo,[fo]:[{[mo]:"UseFIPS"},!0]},Ro={[ho]:bo,[fo]:[{[mo]:"UseDualStack"},!0]},xo={},Oo={[ho]:"getAttr",[fo]:[{[mo]:Po},"supportsFIPS"]},Io={[ho]:bo,[fo]:[!0,{[ho]:"getAttr",[fo]:[{[mo]:Po},"supportsDualStack"]}]},No=[Ao],Do=[Ro],Mo=[{[mo]:"Region"}],Lo={parameters:{Region:Eo,UseDualStack:Co,UseFIPS:Co,Endpoint:Eo},rules:[{conditions:[{[ho]:yo,[fo]:[To]}],rules:[{conditions:No,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:So},{conditions:Do,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:So},{endpoint:{url:To,properties:xo,headers:xo},type:vo}],type:wo},{conditions:[{[ho]:yo,[fo]:Mo}],rules:[{conditions:[{[ho]:"aws.partition",[fo]:Mo,assign:Po}],rules:[{conditions:[Ao,Ro],rules:[{conditions:[{[ho]:bo,[fo]:[go,Oo]},Io],rules:[{endpoint:{url:"https://geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:xo,headers:xo},type:vo}],type:wo},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:So}],type:wo},{conditions:No,rules:[{conditions:[{[ho]:bo,[fo]:[Oo,go]}],rules:[{endpoint:{url:"https://geo-fips.{Region}.{PartitionResult#dnsSuffix}",properties:xo,headers:xo},type:vo}],type:wo},{error:"FIPS is enabled but this partition does not support FIPS",type:So}],type:wo},{conditions:Do,rules:[{conditions:[Io],rules:[{endpoint:{url:"https://geo.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:xo,headers:xo},type:vo}],type:wo},{error:"DualStack is enabled but this partition does not support DualStack",type:So}],type:wo},{endpoint:{url:"https://geo.{Region}.{PartitionResult#dnsSuffix}",properties:xo,headers:xo},type:vo}],type:wo}],type:wo},{error:"Invalid Configuration: Missing Region",type:So}]},ko=new he({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),_o=(e,t={})=>ko.get(e,(()=>$e(Lo,{endpointParams:e,logger:t.logger})));be.aws=Ge;const Fo=["in-region","cross-region","mobile","standard","legacy"],$o=({defaultsMode:e}={})=>Qe((async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(Uo()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Fo.join(", ")}, got ${t}`)}})),Uo=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?so.parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},Bo=e=>{const t=$o(e),n=()=>t().then(On),i=(e=>({apiVersion:"2020-11-19",base64Decoder:e?.base64Decoder??U,base64Encoder:e?.base64Encoder??z,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??_o,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Lr,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Ke}],logger:e?.logger??new Mn,serviceId:e?.serviceId??"Location",urlParser:e?.urlParser??er,utf8Decoder:e?.utf8Decoder??B,utf8Encoder:e?.utf8Encoder??j}))(e);return{...i,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??lo,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ao({serviceId:i.serviceId,clientVersion:_r}),maxAttempts:e?.maxAttempts??3,region:e?.region??co("Region is missing"),requestHandler:Q.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||cr),sha256:e?.sha256??io,streamCollector:e?.streamCollector??J,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Ui)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Bi))}},Go=e=>({setRegion(t){e.region=t},region:()=>e.region}),jo=e=>({region:e.region()});class zo extends $t{config;constructor(...[e]){const i=Bo(e||{});super(i),this.initConfig=i;var r;const o=pe((r=i,Object.assign(r,{useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"geo"}))),s=Tr(o),a=zi(s),c=((e,i)=>{const r=Object.assign(Go(e),In(e),t(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,i=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){i=e},credentials:()=>i}})(e));return i.forEach((e=>e.configure(r))),Object.assign(e,jo(r),Nn(r),n(r),{httpAuthSchemes:(o=r).httpAuthSchemes(),httpAuthSchemeProvider:o.httpAuthSchemeProvider(),credentials:o.credentials()});var o})((e=>{const t=Dt(e);return Object.assign(t,{})})(sr(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use(Fi(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(qi(this.config)),this.middlewareStack.use(m(this.config)),this.middlewareStack.use(y(this.config)),this.middlewareStack.use(v(this.config)),this.middlewareStack.use(T(this.config,{httpAuthSchemeParametersProvider:Mr,identityProviderConfigProvider:async e=>new ae({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(D(this.config))}destroy(){super.destroy()}}class Ho extends Tn{constructor(e){super(e),Object.setPrototypeOf(this,Ho.prototype)}}let Vo=class e extends Ho{name="AccessDeniedException";$fault="client";Message;constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};class qo extends Ho{name="ConflictException";$fault="client";Message;constructor(e){super({name:"ConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,qo.prototype),this.Message=e.Message}}let Wo=class e extends Ho{name="InternalServerException";$fault="server";$retryable={};Message;constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};class Ko extends Ho{name="ServiceQuotaExceededException";$fault="client";Message;constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,Ko.prototype),this.Message=e.Message}}let Yo=class e extends Ho{name="ThrottlingException";$fault="client";$retryable={};Message;constructor(t){super({name:"ThrottlingException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},Zo=class e extends Ho{name="ValidationException";$fault="client";Message;Reason;FieldList;constructor(t){super({name:"ValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message,this.Reason=t.Reason,this.FieldList=t.FieldList}},Qo=class e extends Ho{name="ResourceNotFoundException";$fault="client";Message;constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};const Jo=e=>({...e,...e.Key&&{Key:Gt}}),Xo=e=>({...e,...e.Key&&{Key:Gt}}),es=e=>({...e,...e.Position&&{Position:Gt},...e.PositionProperties&&{PositionProperties:Gt}}),ts=e=>({...e,...e.DevicePositionUpdates&&{DevicePositionUpdates:e.DevicePositionUpdates.map((e=>es(e)))}}),ns=e=>({...e,...e.Position&&{Position:Gt},...e.PositionProperties&&{PositionProperties:Gt}}),is=e=>({...e,...e.DevicePositions&&{DevicePositions:e.DevicePositions.map((e=>ns(e)))}}),rs=e=>({...e,...e.Polygon&&{Polygon:e.Polygon.map((e=>Gt))},...e.Circle&&{Circle:Gt},...e.Geobuf&&{Geobuf:Gt}}),os=e=>({...e,...e.Geometry&&{Geometry:rs(e.Geometry)},...e.GeofenceProperties&&{GeofenceProperties:Gt}}),ss=e=>({...e,...e.Entries&&{Entries:e.Entries.map((e=>os(e)))}}),as=e=>({...e,...e.Updates&&{Updates:e.Updates.map((e=>es(e)))}}),cs=e=>({...e,...e.DeparturePosition&&{DeparturePosition:Gt},...e.DestinationPosition&&{DestinationPosition:Gt},...e.WaypointPositions&&{WaypointPositions:Gt},...e.Key&&{Key:Gt}}),ds=e=>({...e,...e.LineString&&{LineString:Gt}}),us=e=>({...e,...e.StartPosition&&{StartPosition:Gt},...e.EndPosition&&{EndPosition:Gt}}),ls=e=>({...e,...e.StartPosition&&{StartPosition:Gt},...e.EndPosition&&{EndPosition:Gt},...e.Geometry&&{Geometry:ds(e.Geometry)},...e.Steps&&{Steps:e.Steps.map((e=>us(e)))}}),ps=e=>({...e,...e.RouteBBox&&{RouteBBox:Gt}}),hs=e=>({...e,...e.Legs&&{Legs:e.Legs.map((e=>ls(e)))},...e.Summary&&{Summary:ps(e.Summary)}}),fs=e=>({...e,...e.DeparturePositions&&{DeparturePositions:Gt},...e.DestinationPositions&&{DestinationPositions:Gt},...e.Key&&{Key:Gt}}),ms=e=>({...e,...e.SnappedDeparturePositions&&{SnappedDeparturePositions:Gt},...e.SnappedDestinationPositions&&{SnappedDestinationPositions:Gt}}),gs=e=>({...e,...e.Position&&{Position:Gt}}),ys=e=>({...e,...e.GeofenceProperties&&{GeofenceProperties:Gt}}),bs=e=>({...e,...e.Position&&{Position:Gt}}),Ss=e=>({...e,...e.DeviceState&&{DeviceState:bs(e.DeviceState)}}),vs=e=>({...e,...e.ForecastedEvents&&{ForecastedEvents:e.ForecastedEvents.map((e=>ys(e)))}}),ws=e=>({...e,...e.Geometry&&{Geometry:rs(e.Geometry)},...e.GeofenceProperties&&{GeofenceProperties:Gt}}),Ps=e=>({...e,...e.Geometry&&{Geometry:rs(e.Geometry)},...e.GeofenceProperties&&{GeofenceProperties:Gt}}),Es=e=>({...e,...e.Entries&&{Entries:e.Entries.map((e=>Ps(e)))}}),Cs=e=>({...e,...e.Geometry&&{Geometry:rs(e.Geometry)},...e.GeofenceProperties&&{GeofenceProperties:Gt}}),Ts=e=>({...e,...e.Position&&{Position:Gt},...e.PositionProperties&&{PositionProperties:Gt}}),As=e=>({...e,...e.DevicePositions&&{DevicePositions:e.DevicePositions.map((e=>ns(e)))}}),Rs=e=>({...e,...e.Key&&{Key:Gt}}),xs=e=>({...e,...e.Key&&{Key:Gt}}),Os=e=>({...e,...e.Key&&{Key:Gt}}),Is=e=>({...e,...e.Key&&{Key:Gt}}),Ns=e=>({...e,...e.Key&&{Key:Gt}}),Ds=e=>({...e,...e.Point&&{Point:Gt}}),Ms=e=>({...e,...e.Geometry&&{Geometry:Ds(e.Geometry)}}),Ls=e=>({...e,...e.Place&&{Place:Ms(e.Place)}}),ks=e=>({...e,...e.Position&&{Position:Gt}}),_s=e=>({...e,...e.Polygon&&{Polygon:e.Polygon.map((e=>Gt))}}),Fs=e=>({...e,...e.FilterGeometry&&{FilterGeometry:_s(e.FilterGeometry)}}),$s=e=>({...e,...e.Position&&{Position:Gt},...e.PositionProperties&&{PositionProperties:Gt}}),Us=e=>({...e,...e.Entries&&{Entries:e.Entries.map((e=>$s(e)))}}),Bs=e=>({...e,...e.Position&&{Position:Gt},...e.Key&&{Key:Gt}}),Gs=e=>({...e,...e.Place&&{Place:Ms(e.Place)}}),js=e=>({...e,...e.Position&&{Position:Gt}}),zs=e=>({...e,...e.Summary&&{Summary:js(e.Summary)},...e.Results&&{Results:e.Results.map((e=>Gs(e)))}}),Hs=e=>({...e,...e.Text&&{Text:Gt},...e.BiasPosition&&{BiasPosition:Gt},...e.FilterBBox&&{FilterBBox:Gt},...e.Key&&{Key:Gt}}),Vs=e=>({...e,...e.Text&&{Text:Gt},...e.BiasPosition&&{BiasPosition:Gt},...e.FilterBBox&&{FilterBBox:Gt}}),qs=e=>({...e,...e.Summary&&{Summary:Vs(e.Summary)}}),Ws=e=>({...e,...e.Text&&{Text:Gt},...e.BiasPosition&&{BiasPosition:Gt},...e.FilterBBox&&{FilterBBox:Gt},...e.Key&&{Key:Gt}}),Ks=e=>({...e,...e.Place&&{Place:Ms(e.Place)}}),Ys=e=>({...e,...e.Text&&{Text:Gt},...e.BiasPosition&&{BiasPosition:Gt},...e.FilterBBox&&{FilterBBox:Gt},...e.ResultBBox&&{ResultBBox:Gt}}),Zs=e=>({...e,...e.Summary&&{Summary:Ys(e.Summary)},...e.Results&&{Results:e.Results.map((e=>Ks(e)))}}),Qs=e=>({...e,...e.DeviceState&&{DeviceState:gs(e.DeviceState)}}),Js=e=>({...e,...e.InferredState&&{InferredState:ks(e.InferredState)}}),Xs=async(e,t)=>{const n=oe(e,t);let i;n.bp("/tracking/v0/trackers/{TrackerName}/consumers"),n.p("TrackerName",(()=>e.TrackerName),"{TrackerName}",!1),i=JSON.stringify(kn(e,{ConsumerArn:[]}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="cp.tracking."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},ea=async(e,t)=>{const n=oe(e,t);let i;n.bp("/tracking/v0/trackers/{TrackerName}/delete-positions"),n.p("TrackerName",(()=>e.TrackerName),"{TrackerName}",!1),i=JSON.stringify(kn(e,{DeviceIds:e=>Gn(e)}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="tracking."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},ta=async(e,t)=>{const n=oe(e,t);let i;n.bp("/geofencing/v0/collections/{CollectionName}/delete-geofences"),n.p("CollectionName",(()=>e.CollectionName),"{CollectionName}",!1),i=JSON.stringify(kn(e,{GeofenceIds:e=>Gn(e)}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="geofencing."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},na=async(e,t)=>{const n=oe(e,t);let i;n.bp("/geofencing/v0/collections/{CollectionName}/positions"),n.p("CollectionName",(()=>e.CollectionName),"{CollectionName}",!1),i=JSON.stringify(kn(e,{DevicePositionUpdates:e=>Ed(e)}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="geofencing."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},ia=async(e,t)=>{const n=oe(e,t);let i;n.bp("/tracking/v0/trackers/{TrackerName}/get-positions"),n.p("TrackerName",(()=>e.TrackerName),"{TrackerName}",!1),i=JSON.stringify(kn(e,{DeviceIds:e=>Gn(e)}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="tracking."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},ra=async(e,t)=>{const n=oe(e,t);let i;n.bp("/geofencing/v0/collections/{CollectionName}/put-geofences"),n.p("CollectionName",(()=>e.CollectionName),"{CollectionName}",!1),i=JSON.stringify(kn(e,{Entries:e=>vd(e,t)}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="geofencing."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},oa=async(e,t)=>{const n=oe(e,t);let i;n.bp("/tracking/v0/trackers/{TrackerName}/positions"),n.p("TrackerName",(()=>e.TrackerName),"{TrackerName}",!1),i=JSON.stringify(kn(e,{Updates:e=>Ed(e)}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="tracking."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},sa=async(e,t)=>{const n=oe(e,t);n.bp("/routes/v0/calculators/{CalculatorName}/calculate/route"),n.p("CalculatorName",(()=>e.CalculatorName),"{CalculatorName}",!1);const i=Ln({[xu]:[,e[Pu]]});let r;r=JSON.stringify(kn(e,{ArrivalTime:e=>Bn(e),CarModeOptions:e=>Gn(e),DepartNow:[],DeparturePosition:e=>Id(e),DepartureTime:e=>Bn(e),DestinationPosition:e=>Id(e),DistanceUnit:[],IncludeLegGeometry:[],OptimizeFor:[],TravelMode:[],TruckModeOptions:e=>Pd(e),WaypointPositions:e=>_d(e)}));let{hostname:o}=await t.endpoint();if(!0!==t.disableHostPrefix&&(o="routes."+o,!h(o)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(o),n.m("POST").h({"content-type":"application/json"}).q(i).b(r),n.build()},aa=async(e,t)=>{const n=oe(e,t);n.bp("/routes/v0/calculators/{CalculatorName}/calculate/route-matrix"),n.p("CalculatorName",(()=>e.CalculatorName),"{CalculatorName}",!1);const i=Ln({[xu]:[,e[Pu]]});let r;r=JSON.stringify(kn(e,{CarModeOptions:e=>Gn(e),DepartNow:[],DeparturePositions:e=>Dd(e),DepartureTime:e=>Bn(e),DestinationPositions:e=>Dd(e),DistanceUnit:[],TravelMode:[],TruckModeOptions:e=>Pd(e)}));let{hostname:o}=await t.endpoint();if(!0!==t.disableHostPrefix&&(o="routes."+o,!h(o)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(o),n.m("POST").h({"content-type":"application/json"}).q(i).b(r),n.build()},ca=async(e,t)=>{const n=oe(e,t);let i;n.bp("/geofencing/v0/collections"),i=JSON.stringify(kn(e,{CollectionName:[],Description:[],KmsKeyId:[],PricingPlan:[],PricingPlanDataSource:[],Tags:e=>Gn(e)}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="cp.geofencing."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},da=async(e,t)=>{const n=oe(e,t);let i;n.bp("/metadata/v0/keys"),i=JSON.stringify(kn(e,{Description:[],ExpireTime:e=>Bn(e),KeyName:[],NoExpiry:[],Restrictions:e=>Gn(e),Tags:e=>Gn(e)}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="cp.metadata."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},ua=async(e,t)=>{const n=oe(e,t);let i;n.bp("/maps/v0/maps"),i=JSON.stringify(kn(e,{Configuration:e=>Gn(e),Description:[],MapName:[],PricingPlan:[],Tags:e=>Gn(e)}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="cp.maps."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},la=async(e,t)=>{const n=oe(e,t);let i;n.bp("/places/v0/indexes"),i=JSON.stringify(kn(e,{DataSource:[],DataSourceConfiguration:e=>Gn(e),Description:[],IndexName:[],PricingPlan:[],Tags:e=>Gn(e)}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="cp.places."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},pa=async(e,t)=>{const n=oe(e,t);let i;n.bp("/routes/v0/calculators"),i=JSON.stringify(kn(e,{CalculatorName:[],DataSource:[],Description:[],PricingPlan:[],Tags:e=>Gn(e)}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="cp.routes."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},ha=async(e,t)=>{const n=oe(e,t);let i;n.bp("/tracking/v0/trackers"),i=JSON.stringify(kn(e,{Description:[],EventBridgeEnabled:[],KmsKeyEnableGeospatialQueries:[],KmsKeyId:[],PositionFiltering:[],PricingPlan:[],PricingPlanDataSource:[],Tags:e=>Gn(e),TrackerName:[]}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="cp.tracking."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},fa=async(e,t)=>{const n=oe(e,t);n.bp("/geofencing/v0/collections/{CollectionName}"),n.p("CollectionName",(()=>e.CollectionName),"{CollectionName}",!1);let{hostname:i}=await t.endpoint();if(!0!==t.disableHostPrefix&&(i="cp.geofencing."+i,!h(i)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(i),n.m("DELETE").h({}).b(undefined),n.build()},ma=async(e,t)=>{const n=oe(e,t);n.bp("/metadata/v0/keys/{KeyName}"),n.p("KeyName",(()=>e.KeyName),"{KeyName}",!1);const i=Ln({[Ru]:[()=>void 0!==e.ForceDelete,()=>e[wu].toString()]});let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="cp.metadata."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("DELETE").h({}).q(i).b(undefined),n.build()},ga=async(e,t)=>{const n=oe(e,t);n.bp("/maps/v0/maps/{MapName}"),n.p("MapName",(()=>e.MapName),"{MapName}",!1);let{hostname:i}=await t.endpoint();if(!0!==t.disableHostPrefix&&(i="cp.maps."+i,!h(i)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(i),n.m("DELETE").h({}).b(undefined),n.build()},ya=async(e,t)=>{const n=oe(e,t);n.bp("/places/v0/indexes/{IndexName}"),n.p("IndexName",(()=>e.IndexName),"{IndexName}",!1);let{hostname:i}=await t.endpoint();if(!0!==t.disableHostPrefix&&(i="cp.places."+i,!h(i)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(i),n.m("DELETE").h({}).b(undefined),n.build()},ba=async(e,t)=>{const n=oe(e,t);n.bp("/routes/v0/calculators/{CalculatorName}"),n.p("CalculatorName",(()=>e.CalculatorName),"{CalculatorName}",!1);let{hostname:i}=await t.endpoint();if(!0!==t.disableHostPrefix&&(i="cp.routes."+i,!h(i)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(i),n.m("DELETE").h({}).b(undefined),n.build()},Sa=async(e,t)=>{const n=oe(e,t);n.bp("/tracking/v0/trackers/{TrackerName}"),n.p("TrackerName",(()=>e.TrackerName),"{TrackerName}",!1);let{hostname:i}=await t.endpoint();if(!0!==t.disableHostPrefix&&(i="cp.tracking."+i,!h(i)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(i),n.m("DELETE").h({}).b(undefined),n.build()},va=async(e,t)=>{const n=oe(e,t);n.bp("/geofencing/v0/collections/{CollectionName}"),n.p("CollectionName",(()=>e.CollectionName),"{CollectionName}",!1);let{hostname:i}=await t.endpoint();if(!0!==t.disableHostPrefix&&(i="cp.geofencing."+i,!h(i)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(i),n.m("GET").h({}).b(undefined),n.build()},wa=async(e,t)=>{const n=oe(e,t);n.bp("/metadata/v0/keys/{KeyName}"),n.p("KeyName",(()=>e.KeyName),"{KeyName}",!1);let{hostname:i}=await t.endpoint();if(!0!==t.disableHostPrefix&&(i="cp.metadata."+i,!h(i)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(i),n.m("GET").h({}).b(undefined),n.build()},Pa=async(e,t)=>{const n=oe(e,t);n.bp("/maps/v0/maps/{MapName}"),n.p("MapName",(()=>e.MapName),"{MapName}",!1);let{hostname:i}=await t.endpoint();if(!0!==t.disableHostPrefix&&(i="cp.maps."+i,!h(i)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(i),n.m("GET").h({}).b(undefined),n.build()},Ea=async(e,t)=>{const n=oe(e,t);n.bp("/places/v0/indexes/{IndexName}"),n.p("IndexName",(()=>e.IndexName),"{IndexName}",!1);let{hostname:i}=await t.endpoint();if(!0!==t.disableHostPrefix&&(i="cp.places."+i,!h(i)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(i),n.m("GET").h({}).b(undefined),n.build()},Ca=async(e,t)=>{const n=oe(e,t);n.bp("/routes/v0/calculators/{CalculatorName}"),n.p("CalculatorName",(()=>e.CalculatorName),"{CalculatorName}",!1);let{hostname:i}=await t.endpoint();if(!0!==t.disableHostPrefix&&(i="cp.routes."+i,!h(i)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(i),n.m("GET").h({}).b(undefined),n.build()},Ta=async(e,t)=>{const n=oe(e,t);n.bp("/tracking/v0/trackers/{TrackerName}"),n.p("TrackerName",(()=>e.TrackerName),"{TrackerName}",!1);let{hostname:i}=await t.endpoint();if(!0!==t.disableHostPrefix&&(i="cp.tracking."+i,!h(i)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(i),n.m("GET").h({}).b(undefined),n.build()},Aa=async(e,t)=>{const n=oe(e,t);n.bp("/tracking/v0/trackers/{TrackerName}/consumers/{ConsumerArn}"),n.p("TrackerName",(()=>e.TrackerName),"{TrackerName}",!1),n.p("ConsumerArn",(()=>e.ConsumerArn),"{ConsumerArn}",!1);let{hostname:i}=await t.endpoint();if(!0!==t.disableHostPrefix&&(i="cp.tracking."+i,!h(i)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(i),n.m("DELETE").h({}).b(undefined),n.build()},Ra=async(e,t)=>{const n=oe(e,t);let i;n.bp("/geofencing/v0/collections/{CollectionName}/forecast-geofence-events"),n.p("CollectionName",(()=>e.CollectionName),"{CollectionName}",!1),i=JSON.stringify(kn(e,{DeviceState:e=>Td(e),DistanceUnit:[],MaxResults:[],NextToken:[],SpeedUnit:[],TimeHorizonMinutes:e=>Un(e)}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="geofencing."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},xa=async(e,t)=>{const n=oe(e,t);n.bp("/tracking/v0/trackers/{TrackerName}/devices/{DeviceId}/positions/latest"),n.p("TrackerName",(()=>e.TrackerName),"{TrackerName}",!1),n.p("DeviceId",(()=>e.DeviceId),"{DeviceId}",!1);let{hostname:i}=await t.endpoint();if(!0!==t.disableHostPrefix&&(i="tracking."+i,!h(i)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(i),n.m("GET").h({}).b(undefined),n.build()},Oa=async(e,t)=>{const n=oe(e,t);let i;n.bp("/tracking/v0/trackers/{TrackerName}/devices/{DeviceId}/list-positions"),n.p("TrackerName",(()=>e.TrackerName),"{TrackerName}",!1),n.p("DeviceId",(()=>e.DeviceId),"{DeviceId}",!1),i=JSON.stringify(kn(e,{EndTimeExclusive:e=>Bn(e),MaxResults:[],NextToken:[],StartTimeInclusive:e=>Bn(e)}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="tracking."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},Ia=async(e,t)=>{const n=oe(e,t);n.bp("/geofencing/v0/collections/{CollectionName}/geofences/{GeofenceId}"),n.p("CollectionName",(()=>e.CollectionName),"{CollectionName}",!1),n.p("GeofenceId",(()=>e.GeofenceId),"{GeofenceId}",!1);let{hostname:i}=await t.endpoint();if(!0!==t.disableHostPrefix&&(i="geofencing."+i,!h(i)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(i),n.m("GET").h({}).b(undefined),n.build()},Na=async(e,t)=>{const n=oe(e,t);n.bp("/maps/v0/maps/{MapName}/glyphs/{FontStack}/{FontUnicodeRange}"),n.p("MapName",(()=>e.MapName),"{MapName}",!1),n.p("FontStack",(()=>e.FontStack),"{FontStack}",!1),n.p("FontUnicodeRange",(()=>e.FontUnicodeRange),"{FontUnicodeRange}",!1);const i=Ln({[xu]:[,e[Pu]]});let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="maps."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("GET").h({}).q(i).b(undefined),n.build()},Da=async(e,t)=>{const n=oe(e,t);n.bp("/maps/v0/maps/{MapName}/sprites/{FileName}"),n.p("MapName",(()=>e.MapName),"{MapName}",!1),n.p("FileName",(()=>e.FileName),"{FileName}",!1);const i=Ln({[xu]:[,e[Pu]]});let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="maps."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("GET").h({}).q(i).b(undefined),n.build()},Ma=async(e,t)=>{const n=oe(e,t);n.bp("/maps/v0/maps/{MapName}/style-descriptor"),n.p("MapName",(()=>e.MapName),"{MapName}",!1);const i=Ln({[xu]:[,e[Pu]]});let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="maps."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("GET").h({}).q(i).b(undefined),n.build()},La=async(e,t)=>{const n=oe(e,t);n.bp("/maps/v0/maps/{MapName}/tiles/{Z}/{X}/{Y}"),n.p("MapName",(()=>e.MapName),"{MapName}",!1),n.p("Z",(()=>e.Z),"{Z}",!1),n.p("X",(()=>e.X),"{X}",!1),n.p("Y",(()=>e.Y),"{Y}",!1);const i=Ln({[xu]:[,e[Pu]]});let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="maps."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("GET").h({}).q(i).b(undefined),n.build()},ka=async(e,t)=>{const n=oe(e,t);n.bp("/places/v0/indexes/{IndexName}/places/{PlaceId}"),n.p("IndexName",(()=>e.IndexName),"{IndexName}",!1),n.p("PlaceId",(()=>e.PlaceId),"{PlaceId}",!1);const i=Ln({[Ou]:[,e[Eu]],[xu]:[,e[Pu]]});let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="places."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("GET").h({}).q(i).b(undefined),n.build()},_a=async(e,t)=>{const n=oe(e,t);let i;n.bp("/tracking/v0/trackers/{TrackerName}/list-positions"),n.p("TrackerName",(()=>e.TrackerName),"{TrackerName}",!1),i=JSON.stringify(kn(e,{FilterGeometry:e=>Md(e),MaxResults:[],NextToken:[]}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="tracking."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},Fa=async(e,t)=>{const n=oe(e,t);let i;n.bp("/geofencing/v0/list-collections"),i=JSON.stringify(kn(e,{MaxResults:[],NextToken:[]}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="cp.geofencing."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},$a=async(e,t)=>{const n=oe(e,t);let i;n.bp("/geofencing/v0/collections/{CollectionName}/list-geofences"),n.p("CollectionName",(()=>e.CollectionName),"{CollectionName}",!1),i=JSON.stringify(kn(e,{MaxResults:[],NextToken:[]}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="geofencing."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},Ua=async(e,t)=>{const n=oe(e,t);let i;n.bp("/metadata/v0/list-keys"),i=JSON.stringify(kn(e,{Filter:e=>Gn(e),MaxResults:[],NextToken:[]}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="cp.metadata."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},Ba=async(e,t)=>{const n=oe(e,t);let i;n.bp("/maps/v0/list-maps"),i=JSON.stringify(kn(e,{MaxResults:[],NextToken:[]}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="cp.maps."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},Ga=async(e,t)=>{const n=oe(e,t);let i;n.bp("/places/v0/list-indexes"),i=JSON.stringify(kn(e,{MaxResults:[],NextToken:[]}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="cp.places."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},ja=async(e,t)=>{const n=oe(e,t);let i;n.bp("/routes/v0/list-calculators"),i=JSON.stringify(kn(e,{MaxResults:[],NextToken:[]}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="cp.routes."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},za=async(e,t)=>{const n=oe(e,t);n.bp("/tags/{ResourceArn}"),n.p("ResourceArn",(()=>e.ResourceArn),"{ResourceArn}",!1);let{hostname:i}=await t.endpoint();if(!0!==t.disableHostPrefix&&(i="cp.metadata."+i,!h(i)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(i),n.m("GET").h({}).b(undefined),n.build()},Ha=async(e,t)=>{const n=oe(e,t);let i;n.bp("/tracking/v0/trackers/{TrackerName}/list-consumers"),n.p("TrackerName",(()=>e.TrackerName),"{TrackerName}",!1),i=JSON.stringify(kn(e,{MaxResults:[],NextToken:[]}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="cp.tracking."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},Va=async(e,t)=>{const n=oe(e,t);let i;n.bp("/tracking/v0/list-trackers"),i=JSON.stringify(kn(e,{MaxResults:[],NextToken:[]}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="cp.tracking."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},qa=async(e,t)=>{const n=oe(e,t);let i;n.bp("/geofencing/v0/collections/{CollectionName}/geofences/{GeofenceId}"),n.p("CollectionName",(()=>e.CollectionName),"{CollectionName}",!1),n.p("GeofenceId",(()=>e.GeofenceId),"{GeofenceId}",!1),i=JSON.stringify(kn(e,{GeofenceProperties:e=>Gn(e),Geometry:e=>Ad(e,t)}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="geofencing."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("PUT").h({"content-type":"application/json"}).b(i),n.build()},Wa=async(e,t)=>{const n=oe(e,t);n.bp("/places/v0/indexes/{IndexName}/search/position"),n.p("IndexName",(()=>e.IndexName),"{IndexName}",!1);const i=Ln({[xu]:[,e[Pu]]});let r;r=JSON.stringify(kn(e,{Language:[],MaxResults:[],Position:e=>Id(e)}));let{hostname:o}=await t.endpoint();if(!0!==t.disableHostPrefix&&(o="places."+o,!h(o)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(o),n.m("POST").h({"content-type":"application/json"}).q(i).b(r),n.build()},Ka=async(e,t)=>{const n=oe(e,t);n.bp("/places/v0/indexes/{IndexName}/search/suggestions"),n.p("IndexName",(()=>e.IndexName),"{IndexName}",!1);const i=Ln({[xu]:[,e[Pu]]});let r;r=JSON.stringify(kn(e,{BiasPosition:e=>Id(e),FilterBBox:e=>wd(e),FilterCategories:e=>Gn(e),FilterCountries:e=>Gn(e),Language:[],MaxResults:[],Text:[]}));let{hostname:o}=await t.endpoint();if(!0!==t.disableHostPrefix&&(o="places."+o,!h(o)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(o),n.m("POST").h({"content-type":"application/json"}).q(i).b(r),n.build()},Ya=async(e,t)=>{const n=oe(e,t);n.bp("/places/v0/indexes/{IndexName}/search/text"),n.p("IndexName",(()=>e.IndexName),"{IndexName}",!1);const i=Ln({[xu]:[,e[Pu]]});let r;r=JSON.stringify(kn(e,{BiasPosition:e=>Id(e),FilterBBox:e=>wd(e),FilterCategories:e=>Gn(e),FilterCountries:e=>Gn(e),Language:[],MaxResults:[],Text:[]}));let{hostname:o}=await t.endpoint();if(!0!==t.disableHostPrefix&&(o="places."+o,!h(o)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(o),n.m("POST").h({"content-type":"application/json"}).q(i).b(r),n.build()},Za=async(e,t)=>{const n=oe(e,t);let i;n.bp("/tags/{ResourceArn}"),n.p("ResourceArn",(()=>e.ResourceArn),"{ResourceArn}",!1),i=JSON.stringify(kn(e,{Tags:e=>Gn(e)}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="cp.metadata."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},Qa=async(e,t)=>{const n=oe(e,t);n.bp("/tags/{ResourceArn}"),n.p("ResourceArn",(()=>e.ResourceArn),"{ResourceArn}",!1);const i=Ln({[Iu]:[null!=Xt(e.TagKeys,"TagKeys"),()=>e[Cu]||[]]});let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="cp.metadata."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("DELETE").h({}).q(i).b(undefined),n.build()},Ja=async(e,t)=>{const n=oe(e,t);let i;n.bp("/geofencing/v0/collections/{CollectionName}"),n.p("CollectionName",(()=>e.CollectionName),"{CollectionName}",!1),i=JSON.stringify(kn(e,{Description:[],PricingPlan:[],PricingPlanDataSource:[]}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="cp.geofencing."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("PATCH").h({"content-type":"application/json"}).b(i),n.build()},Xa=async(e,t)=>{const n=oe(e,t);let i;n.bp("/metadata/v0/keys/{KeyName}"),n.p("KeyName",(()=>e.KeyName),"{KeyName}",!1),i=JSON.stringify(kn(e,{Description:[],ExpireTime:e=>Bn(e),ForceUpdate:[],NoExpiry:[],Restrictions:e=>Gn(e)}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="cp.metadata."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("PATCH").h({"content-type":"application/json"}).b(i),n.build()},ec=async(e,t)=>{const n=oe(e,t);let i;n.bp("/maps/v0/maps/{MapName}"),n.p("MapName",(()=>e.MapName),"{MapName}",!1),i=JSON.stringify(kn(e,{ConfigurationUpdate:e=>Gn(e),Description:[],PricingPlan:[]}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="cp.maps."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("PATCH").h({"content-type":"application/json"}).b(i),n.build()},tc=async(e,t)=>{const n=oe(e,t);let i;n.bp("/places/v0/indexes/{IndexName}"),n.p("IndexName",(()=>e.IndexName),"{IndexName}",!1),i=JSON.stringify(kn(e,{DataSourceConfiguration:e=>Gn(e),Description:[],PricingPlan:[]}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="cp.places."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("PATCH").h({"content-type":"application/json"}).b(i),n.build()},nc=async(e,t)=>{const n=oe(e,t);let i;n.bp("/routes/v0/calculators/{CalculatorName}"),n.p("CalculatorName",(()=>e.CalculatorName),"{CalculatorName}",!1),i=JSON.stringify(kn(e,{Description:[],PricingPlan:[]}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="cp.routes."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("PATCH").h({"content-type":"application/json"}).b(i),n.build()},ic=async(e,t)=>{const n=oe(e,t);let i;n.bp("/tracking/v0/trackers/{TrackerName}"),n.p("TrackerName",(()=>e.TrackerName),"{TrackerName}",!1),i=JSON.stringify(kn(e,{Description:[],EventBridgeEnabled:[],KmsKeyEnableGeospatialQueries:[],PositionFiltering:[],PricingPlan:[],PricingPlanDataSource:[]}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="cp.tracking."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("PATCH").h({"content-type":"application/json"}).b(i),n.build()},rc=async(e,t)=>{const n=oe(e,t);let i;n.bp("/tracking/v0/trackers/{TrackerName}/positions/verify"),n.p("TrackerName",(()=>e.TrackerName),"{TrackerName}",!1),i=JSON.stringify(kn(e,{DeviceState:e=>Cd(e),DistanceUnit:[]}));let{hostname:r}=await t.endpoint();if(!0!==t.disableHostPrefix&&(r="tracking."+r,!h(r)))throw new Error("ValidationError: prefixed hostname must be hostname compatible.");return n.hn(r),n.m("POST").h({"content-type":"application/json"}).b(i),n.build()},oc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)});return await ie(e.body,t),n},sc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{Errors:Gn});return Object.assign(n,r),n},ac=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{Errors:Gn});return Object.assign(n,r),n},cc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{Errors:e=>Fd(e)});return Object.assign(n,r),n},dc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{DevicePositions:e=>jd(e),Errors:Gn});return Object.assign(n,r),n},uc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{Errors:Gn,Successes:e=>$d(e)});return Object.assign(n,r),n},lc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{Errors:e=>Ud(e)});return Object.assign(n,r),n},pc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{Legs:e=>Wd(e),Summary:e=>Gd(e)});return Object.assign(n,r),n},hc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{RouteMatrix:e=>du(e),SnappedDeparturePositions:e=>cu(e),SnappedDestinationPositions:e=>cu(e),Summary:Gn});return Object.assign(n,r),n},fc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{CollectionArn:tn,CollectionName:tn,CreateTime:e=>Xt(mn(e))});return Object.assign(n,r),n},mc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{CreateTime:e=>Xt(mn(e)),Key:tn,KeyArn:tn,KeyName:tn});return Object.assign(n,r),n},gc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{CreateTime:e=>Xt(mn(e)),MapArn:tn,MapName:tn});return Object.assign(n,r),n},yc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{CreateTime:e=>Xt(mn(e)),IndexArn:tn,IndexName:tn});return Object.assign(n,r),n},bc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{CalculatorArn:tn,CalculatorName:tn,CreateTime:e=>Xt(mn(e))});return Object.assign(n,r),n},Sc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{CreateTime:e=>Xt(mn(e)),TrackerArn:tn,TrackerName:tn});return Object.assign(n,r),n},vc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)});return await ie(e.body,t),n},wc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)});return await ie(e.body,t),n},Pc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)});return await ie(e.body,t),n},Ec=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)});return await ie(e.body,t),n},Cc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)});return await ie(e.body,t),n},Tc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)});return await ie(e.body,t),n},Ac=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{CollectionArn:tn,CollectionName:tn,CreateTime:e=>Xt(mn(e)),Description:tn,GeofenceCount:Kt,KmsKeyId:tn,PricingPlan:tn,PricingPlanDataSource:tn,Tags:Gn,UpdateTime:e=>Xt(mn(e))});return Object.assign(n,r),n},Rc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{CreateTime:e=>Xt(mn(e)),Description:tn,ExpireTime:e=>Xt(mn(e)),Key:tn,KeyArn:tn,KeyName:tn,Restrictions:Gn,Tags:Gn,UpdateTime:e=>Xt(mn(e))});return Object.assign(n,r),n},xc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{Configuration:Gn,CreateTime:e=>Xt(mn(e)),DataSource:tn,Description:tn,MapArn:tn,MapName:tn,PricingPlan:tn,Tags:Gn,UpdateTime:e=>Xt(mn(e))});return Object.assign(n,r),n},Oc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{CreateTime:e=>Xt(mn(e)),DataSource:tn,DataSourceConfiguration:Gn,Description:tn,IndexArn:tn,IndexName:tn,PricingPlan:tn,Tags:Gn,UpdateTime:e=>Xt(mn(e))});return Object.assign(n,r),n},Ic=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{CalculatorArn:tn,CalculatorName:tn,CreateTime:e=>Xt(mn(e)),DataSource:tn,Description:tn,PricingPlan:tn,Tags:Gn,UpdateTime:e=>Xt(mn(e))});return Object.assign(n,r),n},Nc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{CreateTime:e=>Xt(mn(e)),Description:tn,EventBridgeEnabled:zt,KmsKeyEnableGeospatialQueries:zt,KmsKeyId:tn,PositionFiltering:tn,PricingPlan:tn,PricingPlanDataSource:tn,Tags:Gn,TrackerArn:tn,TrackerName:tn,UpdateTime:e=>Xt(mn(e))});return Object.assign(n,r),n},Dc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)});return await ie(e.body,t),n},Mc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{DistanceUnit:tn,ForecastedEvents:e=>zd(e),NextToken:tn,SpeedUnit:tn});return Object.assign(n,r),n},Lc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{Accuracy:e=>au(e),DeviceId:tn,Position:e=>su(e),PositionProperties:Gn,ReceivedTime:e=>Xt(mn(e)),SampleTime:e=>Xt(mn(e))});return Object.assign(n,r),n},kc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{DevicePositions:e=>jd(e),NextToken:tn});return Object.assign(n,r),n},_c=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{CreateTime:e=>Xt(mn(e)),GeofenceId:tn,GeofenceProperties:Gn,Geometry:e=>Hd(e,t),Status:tn,UpdateTime:e=>Xt(mn(e))});return Object.assign(n,r),n},Fc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e),[vu]:[,e.headers[Au]],[Su]:[,e.headers[Tu]]}),i=await ie(e.body,t);return n.Blob=i,n},$c=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e),[vu]:[,e.headers[Au]],[Su]:[,e.headers[Tu]]}),i=await ie(e.body,t);return n.Blob=i,n},Uc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e),[vu]:[,e.headers[Au]],[Su]:[,e.headers[Tu]]}),i=await ie(e.body,t);return n.Blob=i,n},Bc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e),[vu]:[,e.headers[Au]],[Su]:[,e.headers[Tu]]}),i=await ie(e.body,t);return n.Blob=i,n},Gc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{Place:e=>ru(e)});return Object.assign(n,r),n},jc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{Entries:e=>Zd(e),NextToken:tn});return Object.assign(n,r),n},zc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{Entries:e=>Qd(e),NextToken:tn});return Object.assign(n,r),n},Hc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{Entries:e=>Jd(e,t),NextToken:tn});return Object.assign(n,r),n},Vc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{Entries:e=>Xd(e),NextToken:tn});return Object.assign(n,r),n},qc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{Entries:e=>eu(e),NextToken:tn});return Object.assign(n,r),n},Wc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{Entries:e=>tu(e),NextToken:tn});return Object.assign(n,r),n},Kc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{Entries:e=>nu(e),NextToken:tn});return Object.assign(n,r),n},Yc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{Tags:Gn});return Object.assign(n,r),n},Zc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{ConsumerArns:Gn,NextToken:tn});return Object.assign(n,r),n},Qc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{Entries:e=>iu(e),NextToken:tn});return Object.assign(n,r),n},Jc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{CreateTime:e=>Xt(mn(e)),GeofenceId:tn,UpdateTime:e=>Xt(mn(e))});return Object.assign(n,r),n},Xc=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{Results:e=>lu(e),Summary:e=>hu(e)});return Object.assign(n,r),n},ed=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{Results:Gn,Summary:e=>fu(e)});return Object.assign(n,r),n},td=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{Results:e=>pu(e),Summary:e=>mu(e)});return Object.assign(n,r),n},nd=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)});return await ie(e.body,t),n},id=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)});return await ie(e.body,t),n},rd=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{CollectionArn:tn,CollectionName:tn,UpdateTime:e=>Xt(mn(e))});return Object.assign(n,r),n},od=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{KeyArn:tn,KeyName:tn,UpdateTime:e=>Xt(mn(e))});return Object.assign(n,r),n},sd=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{MapArn:tn,MapName:tn,UpdateTime:e=>Xt(mn(e))});return Object.assign(n,r),n},ad=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{IndexArn:tn,IndexName:tn,UpdateTime:e=>Xt(mn(e))});return Object.assign(n,r),n},cd=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{CalculatorArn:tn,CalculatorName:tn,UpdateTime:e=>Xt(mn(e))});return Object.assign(n,r),n},dd=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{TrackerArn:tn,TrackerName:tn,UpdateTime:e=>Xt(mn(e))});return Object.assign(n,r),n},ud=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ld(e,t);const n=Ln({$metadata:bu(e)}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{DeviceId:tn,DistanceUnit:tn,InferredState:e=>Vd(e),ReceivedTime:e=>Xt(mn(e)),SampleTime:e=>Xt(mn(e))});return Object.assign(n,r),n},ld=async(e,t)=>{const n={...e,body:await Hn(e.body,t)},i=Vn(e,n.body);switch(i){case"AccessDeniedException":case"com.amazonaws.location#AccessDeniedException":throw await hd(n);case"ConflictException":case"com.amazonaws.location#ConflictException":throw await fd(n);case"InternalServerException":case"com.amazonaws.location#InternalServerException":throw await md(n);case"ResourceNotFoundException":case"com.amazonaws.location#ResourceNotFoundException":throw await gd(n);case"ServiceQuotaExceededException":case"com.amazonaws.location#ServiceQuotaExceededException":throw await yd(n);case"ThrottlingException":case"com.amazonaws.location#ThrottlingException":throw await bd(n);case"ValidationException":case"com.amazonaws.location#ValidationException":throw await Sd(n);default:const t=n.body;return pd({output:e,parsedBody:t,errorCode:i})}},pd=Rn(Ho),hd=async(e,t)=>{const n=Ln({}),i=e.body,r=kn(i,{Message:[,tn,"message"]});Object.assign(n,r);const o=new Vo({$metadata:bu(e),...n});return An(o,e.body)},fd=async(e,t)=>{const n=Ln({}),i=e.body,r=kn(i,{Message:[,tn,"message"]});Object.assign(n,r);const o=new qo({$metadata:bu(e),...n});return An(o,e.body)},md=async(e,t)=>{const n=Ln({}),i=e.body,r=kn(i,{Message:[,tn,"message"]});Object.assign(n,r);const o=new Wo({$metadata:bu(e),...n});return An(o,e.body)},gd=async(e,t)=>{const n=Ln({}),i=e.body,r=kn(i,{Message:[,tn,"message"]});Object.assign(n,r);const o=new Qo({$metadata:bu(e),...n});return An(o,e.body)},yd=async(e,t)=>{const n=Ln({}),i=e.body,r=kn(i,{Message:[,tn,"message"]});Object.assign(n,r);const o=new Ko({$metadata:bu(e),...n});return An(o,e.body)},bd=async(e,t)=>{const n=Ln({}),i=e.body,r=kn(i,{Message:[,tn,"message"]});Object.assign(n,r);const o=new Yo({$metadata:bu(e),...n});return An(o,e.body)},Sd=async(e,t)=>{const n=Ln({}),i=e.body,r=kn(i,{FieldList:[,e=>yu(e),"fieldList"],Message:[,tn,"message"],Reason:[,tn,"reason"]});Object.assign(n,r);const o=new Zo({$metadata:bu(e),...n});return An(o,e.body)},vd=(e,t)=>e.filter((e=>null!=e)).map((e=>((e,t)=>kn(e,{GeofenceId:[],GeofenceProperties:Gn,Geometry:e=>Ad(e,t)}))(e,t))),wd=(e,t)=>e.filter((e=>null!=e)).map((e=>Un(e))),Pd=(e,t)=>kn(e,{AvoidFerries:[],AvoidTolls:[],Dimensions:e=>Ld(e),Weight:e=>kd(e)}),Ed=(e,t)=>e.filter((e=>null!=e)).map((e=>(e=>kn(e,{Accuracy:e=>Nd(e),DeviceId:[],Position:e=>Id(e),PositionProperties:Gn,SampleTime:Bn}))(e))),Cd=(e,t)=>kn(e,{Accuracy:e=>Nd(e),CellSignals:e=>(e=>kn(e,{LteCellDetails:e=>xd(e)}))(e),DeviceId:[],Ipv4Address:[],Position:e=>Id(e),SampleTime:Bn,WiFiAccessPoints:Gn}),Td=(e,t)=>kn(e,{Position:e=>Id(e),Speed:Un}),Ad=(e,t)=>kn(e,{Circle:e=>(e=>kn(e,{Center:e=>Id(e),Radius:Un}))(e),Geobuf:t.base64Encoder,Polygon:e=>Rd(e)}),Rd=(e,t)=>e.filter((e=>null!=e)).map((e=>(e=>e.filter((e=>null!=e)).map((e=>Id(e))))(e))),xd=(e,t)=>e.filter((e=>null!=e)).map((e=>(e=>kn(e,{CellId:[],LocalId:Gn,Mcc:[],Mnc:[],NetworkMeasurements:e=>Od(e),NrCapable:[],Rsrp:[],Rsrq:Un,Tac:[],TimingAdvance:[]}))(e))),Od=(e,t)=>e.filter((e=>null!=e)).map((e=>(e=>kn(e,{CellId:[],Earfcn:[],Pci:[],Rsrp:[],Rsrq:Un}))(e))),Id=(e,t)=>e.filter((e=>null!=e)).map((e=>Un(e))),Nd=(e,t)=>kn(e,{Horizontal:Un}),Dd=(e,t)=>e.filter((e=>null!=e)).map((e=>Id(e))),Md=(e,t)=>kn(e,{Polygon:e=>Rd(e)}),Ld=(e,t)=>kn(e,{Height:Un,Length:Un,Unit:[],Width:Un}),kd=(e,t)=>kn(e,{Total:Un,Unit:[]}),_d=(e,t)=>e.filter((e=>null!=e)).map((e=>Id(e))),Fd=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{DeviceId:tn,Error:Gn,SampleTime:e=>Xt(mn(e))}))(e)));return n},$d=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{CreateTime:e=>Xt(mn(e)),GeofenceId:tn,UpdateTime:e=>Xt(mn(e))}))(e)));return n},Ud=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{DeviceId:tn,Error:Gn,SampleTime:e=>Xt(mn(e))}))(e)));return n},Bd=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>on(e)));return n},Gd=(e,t)=>kn(e,{DataSource:tn,Distance:on,DistanceUnit:tn,DurationSeconds:on,RouteBBox:e=>Bd(e)}),jd=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{Accuracy:e=>au(e),DeviceId:tn,Position:e=>su(e),PositionProperties:Gn,ReceivedTime:e=>Xt(mn(e)),SampleTime:e=>Xt(mn(e))}))(e)));return n},zd=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{EventId:tn,EventType:tn,ForecastedBreachTime:e=>Xt(mn(e)),GeofenceId:tn,GeofenceProperties:Gn,IsDeviceInGeofence:zt,NearestDistance:on}))(e)));return n},Hd=(e,t)=>kn(e,{Circle:e=>(e=>kn(e,{Center:e=>su(e),Radius:on}))(e),Geobuf:t.base64Decoder,Polygon:e=>Kd(e)}),Vd=(e,t)=>kn(e,{Accuracy:e=>au(e),DeviationDistance:on,Position:e=>su(e),ProxyDetected:zt}),qd=(e,t)=>kn(e,{LineString:e=>Yd(e)}),Wd=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{Distance:on,DurationSeconds:on,EndPosition:e=>su(e),Geometry:e=>qd(e),StartPosition:e=>su(e),Steps:e=>gu(e)}))(e)));return n},Kd=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t=(e||[]).filter((e=>null!=e)).map((e=>su(e)));return t})(e)));return n},Yd=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>su(e)));return n},Zd=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{Accuracy:e=>au(e),DeviceId:tn,Position:e=>su(e),PositionProperties:Gn,SampleTime:e=>Xt(mn(e))}))(e)));return n},Qd=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{CollectionName:tn,CreateTime:e=>Xt(mn(e)),Description:tn,PricingPlan:tn,PricingPlanDataSource:tn,UpdateTime:e=>Xt(mn(e))}))(e)));return n},Jd=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>((e,t)=>kn(e,{CreateTime:e=>Xt(mn(e)),GeofenceId:tn,GeofenceProperties:Gn,Geometry:e=>Hd(e,t),Status:tn,UpdateTime:e=>Xt(mn(e))}))(e,t)));return n},Xd=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{CreateTime:e=>Xt(mn(e)),Description:tn,ExpireTime:e=>Xt(mn(e)),KeyName:tn,Restrictions:Gn,UpdateTime:e=>Xt(mn(e))}))(e)));return n},eu=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{CreateTime:e=>Xt(mn(e)),DataSource:tn,Description:tn,MapName:tn,PricingPlan:tn,UpdateTime:e=>Xt(mn(e))}))(e)));return n},tu=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{CreateTime:e=>Xt(mn(e)),DataSource:tn,Description:tn,IndexName:tn,PricingPlan:tn,UpdateTime:e=>Xt(mn(e))}))(e)));return n},nu=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{CalculatorName:tn,CreateTime:e=>Xt(mn(e)),DataSource:tn,Description:tn,PricingPlan:tn,UpdateTime:e=>Xt(mn(e))}))(e)));return n},iu=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{CreateTime:e=>Xt(mn(e)),Description:tn,PricingPlan:tn,PricingPlanDataSource:tn,TrackerName:tn,UpdateTime:e=>Xt(mn(e))}))(e)));return n},ru=(e,t)=>kn(e,{AddressNumber:tn,Categories:Gn,Country:tn,Geometry:e=>ou(e),Interpolated:zt,Label:tn,Municipality:tn,Neighborhood:tn,PostalCode:tn,Region:tn,Street:tn,SubMunicipality:tn,SubRegion:tn,SupplementalCategories:Gn,TimeZone:Gn,UnitNumber:tn,UnitType:tn}),ou=(e,t)=>kn(e,{Point:e=>su(e)}),su=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>on(e)));return n},au=(e,t)=>kn(e,{Horizontal:on}),cu=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>su(e)));return n},du=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>uu(e)));return n},uu=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{Distance:on,DurationSeconds:on,Error:Gn}))(e)));return n},lu=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{Distance:on,Place:e=>ru(e),PlaceId:tn}))(e)));return n},pu=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{Distance:on,Place:e=>ru(e),PlaceId:tn,Relevance:on}))(e)));return n},hu=(e,t)=>kn(e,{DataSource:tn,Language:tn,MaxResults:Kt,Position:e=>su(e)}),fu=(e,t)=>kn(e,{BiasPosition:e=>su(e),DataSource:tn,FilterBBox:e=>Bd(e),FilterCategories:Gn,FilterCountries:Gn,Language:tn,MaxResults:Kt,Text:tn}),mu=(e,t)=>kn(e,{BiasPosition:e=>su(e),DataSource:tn,FilterBBox:e=>Bd(e),FilterCategories:Gn,FilterCountries:Gn,Language:tn,MaxResults:Kt,ResultBBox:e=>Bd(e),Text:tn}),gu=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{Distance:on,DurationSeconds:on,EndPosition:e=>su(e),GeometryOffset:Kt,StartPosition:e=>su(e)}))(e)));return n},yu=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{Message:[,tn,"message"],Name:[,tn,"name"]}))(e)));return n},bu=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Su="CacheControl",vu="ContentType",wu="ForceDelete",Pu="Key",Eu="Language",Cu="TagKeys",Tu="cache-control",Au="content-type",Ru="forceDelete",xu="key",Ou="language",Iu="tagKeys";class Nu extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","AssociateTrackerConsumer",{}).n("LocationClient","AssociateTrackerConsumerCommand").f(void 0,void 0).ser(Xs).de(oc).build()){}class Du extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","BatchDeleteDevicePositionHistory",{}).n("LocationClient","BatchDeleteDevicePositionHistoryCommand").f(void 0,void 0).ser(ea).de(sc).build()){}class Mu extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","BatchDeleteGeofence",{}).n("LocationClient","BatchDeleteGeofenceCommand").f(void 0,void 0).ser(ta).de(ac).build()){}class Lu extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","BatchEvaluateGeofences",{}).n("LocationClient","BatchEvaluateGeofencesCommand").f(ts,void 0).ser(na).de(cc).build()){}class ku extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","BatchGetDevicePosition",{}).n("LocationClient","BatchGetDevicePositionCommand").f(void 0,is).ser(ia).de(dc).build()){}class _u extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","BatchPutGeofence",{}).n("LocationClient","BatchPutGeofenceCommand").f(ss,void 0).ser(ra).de(uc).build()){}class Fu extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","BatchUpdateDevicePosition",{}).n("LocationClient","BatchUpdateDevicePositionCommand").f(as,void 0).ser(oa).de(lc).build()){}class $u extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","CalculateRoute",{}).n("LocationClient","CalculateRouteCommand").f(cs,hs).ser(sa).de(pc).build()){}let Uu=class extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","CalculateRouteMatrix",{}).n("LocationClient","CalculateRouteMatrixCommand").f(fs,ms).ser(aa).de(hc).build()){};class Bu extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","CreateGeofenceCollection",{}).n("LocationClient","CreateGeofenceCollectionCommand").f(void 0,void 0).ser(ca).de(fc).build()){}class Gu extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","CreateKey",{}).n("LocationClient","CreateKeyCommand").f(void 0,Jo).ser(da).de(mc).build()){}class ju extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","CreateMap",{}).n("LocationClient","CreateMapCommand").f(void 0,void 0).ser(ua).de(gc).build()){}class zu extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","CreatePlaceIndex",{}).n("LocationClient","CreatePlaceIndexCommand").f(void 0,void 0).ser(la).de(yc).build()){}class Hu extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","CreateRouteCalculator",{}).n("LocationClient","CreateRouteCalculatorCommand").f(void 0,void 0).ser(pa).de(bc).build()){}class Vu extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","CreateTracker",{}).n("LocationClient","CreateTrackerCommand").f(void 0,void 0).ser(ha).de(Sc).build()){}class qu extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","DeleteGeofenceCollection",{}).n("LocationClient","DeleteGeofenceCollectionCommand").f(void 0,void 0).ser(fa).de(vc).build()){}class Wu extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","DeleteKey",{}).n("LocationClient","DeleteKeyCommand").f(void 0,void 0).ser(ma).de(wc).build()){}class Ku extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","DeleteMap",{}).n("LocationClient","DeleteMapCommand").f(void 0,void 0).ser(ga).de(Pc).build()){}class Yu extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","DeletePlaceIndex",{}).n("LocationClient","DeletePlaceIndexCommand").f(void 0,void 0).ser(ya).de(Ec).build()){}class Zu extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","DeleteRouteCalculator",{}).n("LocationClient","DeleteRouteCalculatorCommand").f(void 0,void 0).ser(ba).de(Cc).build()){}class Qu extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","DeleteTracker",{}).n("LocationClient","DeleteTrackerCommand").f(void 0,void 0).ser(Sa).de(Tc).build()){}class Ju extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","DescribeGeofenceCollection",{}).n("LocationClient","DescribeGeofenceCollectionCommand").f(void 0,void 0).ser(va).de(Ac).build()){}class Xu extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","DescribeKey",{}).n("LocationClient","DescribeKeyCommand").f(void 0,Xo).ser(wa).de(Rc).build()){}class el extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","DescribeMap",{}).n("LocationClient","DescribeMapCommand").f(void 0,void 0).ser(Pa).de(xc).build()){}class tl extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","DescribePlaceIndex",{}).n("LocationClient","DescribePlaceIndexCommand").f(void 0,void 0).ser(Ea).de(Oc).build()){}class nl extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","DescribeRouteCalculator",{}).n("LocationClient","DescribeRouteCalculatorCommand").f(void 0,void 0).ser(Ca).de(Ic).build()){}class il extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","DescribeTracker",{}).n("LocationClient","DescribeTrackerCommand").f(void 0,void 0).ser(Ta).de(Nc).build()){}class rl extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","DisassociateTrackerConsumer",{}).n("LocationClient","DisassociateTrackerConsumerCommand").f(void 0,void 0).ser(Aa).de(Dc).build()){}class ol extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","ForecastGeofenceEvents",{}).n("LocationClient","ForecastGeofenceEventsCommand").f(Ss,vs).ser(Ra).de(Mc).build()){}class sl extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetDevicePosition",{}).n("LocationClient","GetDevicePositionCommand").f(void 0,Ts).ser(xa).de(Lc).build()){}class al extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetDevicePositionHistory",{}).n("LocationClient","GetDevicePositionHistoryCommand").f(void 0,As).ser(Oa).de(kc).build()){}class cl extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetGeofence",{}).n("LocationClient","GetGeofenceCommand").f(void 0,ws).ser(Ia).de(_c).build()){}class dl extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetMapGlyphs",{}).n("LocationClient","GetMapGlyphsCommand").f(Rs,void 0).ser(Na).de(Fc).build()){}class ul extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetMapSprites",{}).n("LocationClient","GetMapSpritesCommand").f(xs,void 0).ser(Da).de($c).build()){}class ll extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetMapStyleDescriptor",{}).n("LocationClient","GetMapStyleDescriptorCommand").f(Os,void 0).ser(Ma).de(Uc).build()){}class pl extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetMapTile",{}).n("LocationClient","GetMapTileCommand").f(Is,void 0).ser(La).de(Bc).build()){}let hl=class extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetPlace",{}).n("LocationClient","GetPlaceCommand").f(Ns,Ls).ser(ka).de(Gc).build()){};class fl extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListDevicePositions",{}).n("LocationClient","ListDevicePositionsCommand").f(Fs,Us).ser(_a).de(jc).build()){}class ml extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListGeofenceCollections",{}).n("LocationClient","ListGeofenceCollectionsCommand").f(void 0,void 0).ser(Fa).de(zc).build()){}class gl extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListGeofences",{}).n("LocationClient","ListGeofencesCommand").f(void 0,Es).ser($a).de(Hc).build()){}class yl extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListKeys",{}).n("LocationClient","ListKeysCommand").f(void 0,void 0).ser(Ua).de(Vc).build()){}class bl extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListMaps",{}).n("LocationClient","ListMapsCommand").f(void 0,void 0).ser(Ba).de(qc).build()){}class Sl extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListPlaceIndexes",{}).n("LocationClient","ListPlaceIndexesCommand").f(void 0,void 0).ser(Ga).de(Wc).build()){}class vl extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListRouteCalculators",{}).n("LocationClient","ListRouteCalculatorsCommand").f(void 0,void 0).ser(ja).de(Kc).build()){}class wl extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListTagsForResource",{}).n("LocationClient","ListTagsForResourceCommand").f(void 0,void 0).ser(za).de(Yc).build()){}class Pl extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListTrackerConsumers",{}).n("LocationClient","ListTrackerConsumersCommand").f(void 0,void 0).ser(Ha).de(Zc).build()){}class El extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListTrackers",{}).n("LocationClient","ListTrackersCommand").f(void 0,void 0).ser(Va).de(Qc).build()){}class Cl extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","PutGeofence",{}).n("LocationClient","PutGeofenceCommand").f(Cs,void 0).ser(qa).de(Jc).build()){}class Tl extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","SearchPlaceIndexForPosition",{}).n("LocationClient","SearchPlaceIndexForPositionCommand").f(Bs,zs).ser(Wa).de(Xc).build()){}class Al extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","SearchPlaceIndexForSuggestions",{}).n("LocationClient","SearchPlaceIndexForSuggestionsCommand").f(Hs,qs).ser(Ka).de(ed).build()){}class Rl extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","SearchPlaceIndexForText",{}).n("LocationClient","SearchPlaceIndexForTextCommand").f(Ws,Zs).ser(Ya).de(td).build()){}class xl extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","TagResource",{}).n("LocationClient","TagResourceCommand").f(void 0,void 0).ser(Za).de(nd).build()){}class Ol extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","UntagResource",{}).n("LocationClient","UntagResourceCommand").f(void 0,void 0).ser(Qa).de(id).build()){}class Il extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","UpdateGeofenceCollection",{}).n("LocationClient","UpdateGeofenceCollectionCommand").f(void 0,void 0).ser(Ja).de(rd).build()){}class Nl extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","UpdateKey",{}).n("LocationClient","UpdateKeyCommand").f(void 0,void 0).ser(Xa).de(od).build()){}class Dl extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","UpdateMap",{}).n("LocationClient","UpdateMapCommand").f(void 0,void 0).ser(ec).de(sd).build()){}class Ml extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","UpdatePlaceIndex",{}).n("LocationClient","UpdatePlaceIndexCommand").f(void 0,void 0).ser(tc).de(ad).build()){}class Ll extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","UpdateRouteCalculator",{}).n("LocationClient","UpdateRouteCalculatorCommand").f(void 0,void 0).ser(nc).de(cd).build()){}class kl extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","UpdateTracker",{}).n("LocationClient","UpdateTrackerCommand").f(void 0,void 0).ser(ic).de(dd).build()){}class _l extends(Ut.classBuilder().ep(kr).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("LocationService","VerifyDevicePosition",{}).n("LocationClient","VerifyDevicePositionCommand").f(Qs,Js).ser(rc).de(ud).build()){}const Fl={AssociateTrackerConsumerCommand:Nu,BatchDeleteDevicePositionHistoryCommand:Du,BatchDeleteGeofenceCommand:Mu,BatchEvaluateGeofencesCommand:Lu,BatchGetDevicePositionCommand:ku,BatchPutGeofenceCommand:_u,BatchUpdateDevicePositionCommand:Fu,CalculateRouteCommand:$u,CalculateRouteMatrixCommand:Uu,CreateGeofenceCollectionCommand:Bu,CreateKeyCommand:Gu,CreateMapCommand:ju,CreatePlaceIndexCommand:zu,CreateRouteCalculatorCommand:Hu,CreateTrackerCommand:Vu,DeleteGeofenceCollectionCommand:qu,DeleteKeyCommand:Wu,DeleteMapCommand:Ku,DeletePlaceIndexCommand:Yu,DeleteRouteCalculatorCommand:Zu,DeleteTrackerCommand:Qu,DescribeGeofenceCollectionCommand:Ju,DescribeKeyCommand:Xu,DescribeMapCommand:el,DescribePlaceIndexCommand:tl,DescribeRouteCalculatorCommand:nl,DescribeTrackerCommand:il,DisassociateTrackerConsumerCommand:rl,ForecastGeofenceEventsCommand:ol,GetDevicePositionCommand:sl,GetDevicePositionHistoryCommand:al,GetGeofenceCommand:cl,GetMapGlyphsCommand:dl,GetMapSpritesCommand:ul,GetMapStyleDescriptorCommand:ll,GetMapTileCommand:pl,GetPlaceCommand:hl,ListDevicePositionsCommand:fl,ListGeofenceCollectionsCommand:ml,ListGeofencesCommand:gl,ListKeysCommand:yl,ListMapsCommand:bl,ListPlaceIndexesCommand:Sl,ListRouteCalculatorsCommand:vl,ListTagsForResourceCommand:wl,ListTrackerConsumersCommand:Pl,ListTrackersCommand:El,PutGeofenceCommand:Cl,SearchPlaceIndexForPositionCommand:Tl,SearchPlaceIndexForSuggestionsCommand:Al,SearchPlaceIndexForTextCommand:Rl,TagResourceCommand:xl,UntagResourceCommand:Ol,UpdateGeofenceCollectionCommand:Il,UpdateKeyCommand:Nl,UpdateMapCommand:Dl,UpdatePlaceIndexCommand:Ml,UpdateRouteCalculatorCommand:Ll,UpdateTrackerCommand:kl,VerifyDevicePositionCommand:_l};class $l extends zo{}jt(Fl,$l);const Ul=k(zo,ol,"NextToken","NextToken","MaxResults"),Bl=k(zo,al,"NextToken","NextToken","MaxResults"),Gl=k(zo,fl,"NextToken","NextToken","MaxResults"),jl=k(zo,ml,"NextToken","NextToken","MaxResults"),zl=k(zo,gl,"NextToken","NextToken","MaxResults"),Hl=k(zo,yl,"NextToken","NextToken","MaxResults"),Vl=k(zo,bl,"NextToken","NextToken","MaxResults"),ql=k(zo,Sl,"NextToken","NextToken","MaxResults"),Wl=k(zo,vl,"NextToken","NextToken","MaxResults"),Kl=k(zo,Pl,"NextToken","NextToken","MaxResults"),Yl=k(zo,El,"NextToken","NextToken","MaxResults");function Zl(e){return Promise.all(Object.keys(e).reduce(((t,n)=>{const i=e[n];return"string"==typeof i?t.push([n,i]):t.push(i().then((e=>[n,e]))),t}),[])).then((e=>e.reduce(((e,[t,n])=>(e[t]=n,e)),{})))}function Ql(e){return async t=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:n,CognitoIdentityClient:i}=await Promise.resolve().then((function(){return fP})),r=n=>e.clientConfig?.[n]??e.parentClientConfig?.[n]??t?.callerClientConfig?.[n],{Credentials:{AccessKeyId:o=Jl(e.logger),Expiration:s,SecretKey:a=ep(e.logger),SessionToken:c}=Xl(e.logger)}=await(e.client??new i(Object.assign({},e.clientConfig??{},{region:r("region"),profile:r("profile")}))).send(new n({CustomRoleArn:e.customRoleArn,IdentityId:e.identityId,Logins:e.logins?await Zl(e.logins):void 0}));return{identityId:e.identityId,accessKeyId:o,secretAccessKey:a,sessionToken:c,expiration:s}}}function Jl(e){throw new Ze("Response from Amazon Cognito contained no access key ID",{logger:e})}function Xl(e){throw new Ze("Response from Amazon Cognito contained no credentials",{logger:e})}function ep(e){throw new Ze("Response from Amazon Cognito contained no secret key",{logger:e})}const tp="IdentityIds";class np{dbName;constructor(e="aws:cognito-identity-ids"){this.dbName=e}getItem(e){return this.withObjectStore("readonly",(t=>{const n=t.get(e);return new Promise((e=>{n.onerror=()=>e(null),n.onsuccess=()=>e(n.result?n.result.value:null)}))})).catch((()=>null))}removeItem(e){return this.withObjectStore("readwrite",(t=>{const n=t.delete(e);return new Promise(((e,t)=>{n.onerror=()=>t(n.error),n.onsuccess=()=>e()}))}))}setItem(e,t){return this.withObjectStore("readwrite",(n=>{const i=n.put({id:e,value:t});return new Promise(((e,t)=>{i.onerror=()=>t(i.error),i.onsuccess=()=>e()}))}))}getDb(){const e=self.indexedDB.open(this.dbName,1);return new Promise(((t,n)=>{e.onsuccess=()=>{t(e.result)},e.onerror=()=>{n(e.error)},e.onblocked=()=>{n(new Error("Unable to access DB"))},e.onupgradeneeded=()=>{const t=e.result;t.onerror=()=>{n(new Error("Failed to create object store"))},t.createObjectStore(tp,{keyPath:"id"})}}))}withObjectStore(e,t){return this.getDb().then((n=>{const i=n.transaction(tp,e);return i.oncomplete=()=>n.close(),new Promise(((e,n)=>{i.onerror=()=>n(i.error),e(t(i.objectStore(tp)))})).catch((e=>{throw n.close(),e}))}))}}const ip=new class{store;constructor(e={}){this.store=e}getItem(e){return e in this.store?this.store[e]:null}removeItem(e){delete this.store[e]}setItem(e,t){this.store[e]=t}};function rp(){return"object"==typeof self&&self.indexedDB?new np:"object"==typeof window&&window.localStorage?window.localStorage:ip}function op(e){throw new Ze("Response from Amazon Cognito contained no identity ID",{logger:e})}const sp=e=>"h2"===e?.metadata?.handlerProtocol?void 0:e,ap=e=>{for(const t of e)if(void 0!==t)return t};var cp,dp={};var up=(cp||(cp=1,function(e){"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.withAPIKey=Nt,e.withIdentityPoolId=It;class t extends Error{constructor(e){let n,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!0;"boolean"==typeof i?(n=void 0,r=i):null!=i&&"object"==typeof i&&(n=i.logger,r=i.tryNextLink??!0),super(e),this.name="ProviderError",this.tryNextLink=r,Object.setPrototypeOf(this,t.prototype),n?.debug?.(`@smithy/property-provider ${r?"->":"(!)"} ${e}`)}static from(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Object.assign(new this(e.message,t),e)}}class n extends t{constructor(e){super(e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1]),this.name="CredentialsProviderError",Object.setPrototypeOf(this,n.prototype)}}const i=(e,t,n)=>{let i,r,o,s=!1;const a=async()=>{r||(r=e());try{i=await r,o=!0,s=!1}finally{r=void 0}return i};return async e=>(o&&!e?.forceRefresh||(i=await a()),i)};function r(e){return Promise.all(Object.keys(e).reduce(((t,n)=>{const i=e[n];return"string"==typeof i?t.push([n,i]):t.push(i().then((e=>[n,e]))),t}),[])).then((e=>e.reduce(((e,t)=>{let[n,i]=t;return e[n]=i,e}),{})))}function o(e){return async()=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:t,CognitoIdentityClient:n}=await Promise.resolve().then((function(){return ec})),{Credentials:{AccessKeyId:i=s(e.logger),Expiration:o,SecretKey:d=c(e.logger),SessionToken:u}=a(e.logger)}=await(e.client??new n(Object.assign({},e.clientConfig??{},{region:e.clientConfig?.region??e.parentClientConfig?.region}))).send(new t({CustomRoleArn:e.customRoleArn,IdentityId:e.identityId,Logins:e.logins?await r(e.logins):void 0}));return{identityId:e.identityId,accessKeyId:i,secretAccessKey:d,sessionToken:u,expiration:o}}}function s(e){throw new n("Response from Amazon Cognito contained no access key ID",{logger:e})}function a(e){throw new n("Response from Amazon Cognito contained no credentials",{logger:e})}function c(e){throw new n("Response from Amazon Cognito contained no secret key",{logger:e})}const d="IdentityIds";class u{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"aws:cognito-identity-ids";this.dbName=e}getItem(e){return this.withObjectStore("readonly",(t=>{const n=t.get(e);return new Promise((e=>{n.onerror=()=>e(null),n.onsuccess=()=>e(n.result?n.result.value:null)}))})).catch((()=>null))}removeItem(e){return this.withObjectStore("readwrite",(t=>{const n=t.delete(e);return new Promise(((e,t)=>{n.onerror=()=>t(n.error),n.onsuccess=()=>e()}))}))}setItem(e,t){return this.withObjectStore("readwrite",(n=>{const i=n.put({id:e,value:t});return new Promise(((e,t)=>{i.onerror=()=>t(i.error),i.onsuccess=()=>e()}))}))}getDb(){const e=self.indexedDB.open(this.dbName,1);return new Promise(((t,n)=>{e.onsuccess=()=>{t(e.result)},e.onerror=()=>{n(e.error)},e.onblocked=()=>{n(new Error("Unable to access DB"))},e.onupgradeneeded=()=>{const t=e.result;t.onerror=()=>{n(new Error("Failed to create object store"))},t.createObjectStore(d,{keyPath:"id"})}}))}withObjectStore(e,t){return this.getDb().then((n=>{const i=n.transaction(d,e);return i.oncomplete=()=>n.close(),new Promise(((e,n)=>{i.onerror=()=>n(i.error),e(t(i.objectStore(d)))})).catch((e=>{throw n.close(),e}))}))}}class l{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.store=e}getItem(e){return e in this.store?this.store[e]:null}removeItem(e){delete this.store[e]}setItem(e,t){this.store[e]=t}}const p=new l;function h(){return"object"==typeof self&&self.indexedDB?new u:"object"==typeof window&&window.localStorage?window.localStorage:p}function f(e){let{accountId:t,cache:n=h(),client:i,clientConfig:s,customRoleArn:a,identityPoolId:c,logins:d,userIdentifier:u=(d&&0!==Object.keys(d).length?void 0:"ANONYMOUS"),logger:l,parentClientConfig:p}=e;l?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const f=u?`aws:cognito-identity-credentials:${c}:${u}`:void 0;let g=async()=>{const{GetIdCommand:e,CognitoIdentityClient:u}=await Promise.resolve().then((function(){return ec})),h=i??new u(Object.assign({},s??{},{region:s?.region??p?.region}));let y=f&&await n.getItem(f);if(!y){const{IdentityId:i=m(l)}=await h.send(new e({AccountId:t,IdentityPoolId:c,Logins:d?await r(d):void 0}));y=i,f&&Promise.resolve(n.setItem(f,y)).catch((()=>{}))}return g=o({client:h,customRoleArn:a,logins:d,identityId:y}),g()};return()=>g().catch((async e=>{throw f&&Promise.resolve(n.removeItem(f)).catch((()=>{})),e}))}function m(e){throw new n("Response from Amazon Cognito contained no identity ID",{logger:e})}const g=e=>f({...e}),y=e=>{let t=e.httpHandler;return{setHttpHandler(e){t=e},httpHandler:()=>t,updateHttpClientConfig(e,n){t.updateHttpClientConfig(e,n)},httpHandlerConfigs:()=>t.httpHandlerConfigs()}},b=e=>({httpHandler:e.httpHandler()});var S,v,w,P,E;(function(e){e.HEADER="header",e.QUERY="query"})(S||(S={})),function(e){e.HEADER="header",e.QUERY="query"}(v||(v={})),function(e){e.HTTP="http",e.HTTPS="https"}(w||(w={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(P||(P={})),function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"}(E||(E={}));const C="__smithy_context";var T,A;(function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"})(T||(T={})),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(A||(A={}));class R{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new R({...e,headers:{...e.headers}});return t.query&&(t.query=x(t.query)),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return R.clone(this)}}function x(e){return Object.keys(e).reduce(((t,n)=>{const i=e[n];return{...t,[n]:Array.isArray(i)?[...i]:i}}),{})}class O{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const I=e=>encodeURIComponent(e).replace(/[!'()*]/g,N),N=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function D(e){const t=[];for(let n of Object.keys(e).sort()){const i=e[n];if(n=I(n),Array.isArray(i))for(let e=0,r=i.length;e<r;e++)t.push(`${n}=${I(i[e])}`);else{let e=n;(i||"string"==typeof i)&&(e+=`=${I(i)}`),t.push(e)}}return t.join("&")}function M(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise(((t,n)=>{e&&setTimeout((()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",n(t)}),e)}))}const L={supported:void 0};class k{static create(e){return"function"==typeof e?.handle?e:new k(e)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===L.supported&&(L.supported=Boolean("undefined"!=typeof Request&&"keepalive"in new Request("https://[::1]")))}destroy(){}async handle(e){let{abortSignal:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.config||(this.config=await this.configProvider);const n=this.config.requestTimeout,i=!0===this.config.keepAlive,r=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let o=e.path;const s=D(e.query||{});s&&(o+=`?${s}`),e.fragment&&(o+=`#${e.fragment}`);let a="";null==e.username&&null==e.password||(a=`${e.username??""}:${e.password??""}@`);const{port:c,method:d}=e,u=`${e.protocol}//${a}${e.hostname}${c?`:${c}`:""}${o}`,l="GET"===d||"HEAD"===d?void 0:e.body,p={body:l,headers:new Headers(e.headers),method:d,credentials:r};this.config?.cache&&(p.cache=this.config.cache),l&&(p.duplex="half"),"undefined"!=typeof AbortController&&(p.signal=t),L.supported&&(p.keepalive=i),"function"==typeof this.config.requestInit&&Object.assign(p,this.config.requestInit(e));let h=()=>{};const f=new Request(u,p),m=[fetch(f).then((e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new O({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new O({headers:n,reason:e.statusText,statusCode:e.status,body:t})})))})),M(n)];return t&&m.push(new Promise(((e,n)=>{const i=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",i,{once:!0}),h=()=>e.removeEventListener("abort",i)}else t.onabort=i}))),Promise.race(m).finally(h)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n=>(n[e]=t,n)))}httpHandlerConfigs(){return this.config??{}}}const _={},F=new Array(64);for(let e=0,t="A".charCodeAt(0),n="Z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t);_[n]=e,F[e]=n}for(let e=0,t="a".charCodeAt(0),n="z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t),i=e+26;_[n]=i,F[i]=n}for(let e=0;e<10;e++){_[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;_[t]=n,F[n]=t}_["+"]=62,F[62]="+",_["/"]=63,F[63]="/";const $=6,U=8,B=63,G=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),i=new DataView(n);for(let t=0;t<e.length;t+=4){let n=0,r=0;for(let i=t,o=t+3;i<=o;i++)if("="!==e[i]){if(!(e[i]in _))throw new TypeError(`Invalid character ${e[i]} in base64 string.`);n|=_[e[i]]<<(o-i)*$,r+=$}else n>>=$;const o=t/4*3;n>>=r%U;const s=Math.floor(r/U);for(let e=0;e<s;e++){const t=(s-e-1)*U;i.setUint8(o+e,(n&255<<t)>>t)}}return new Uint8Array(n)},j=e=>(new TextEncoder).encode(e);function z(e){let t;t="string"==typeof e?j(e):e;const n="object"==typeof t&&"number"==typeof t.length,i="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!i)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let r="";for(let e=0;e<t.length;e+=3){let n=0,i=0;for(let r=e,o=Math.min(e+3,t.length);r<o;r++)n|=t[r]<<(o-r-1)*U,i+=U;const o=Math.ceil(i/$);n<<=o*$-i;for(let e=1;e<=o;e++){const t=(o-e)*$;r+=F[(n&B<<t)>>t]}r+="==".slice(0,4-o)}return r}const H=e=>"function"==typeof Blob&&e instanceof Blob?V(e):q(e);async function V(e){const t=await W(e),n=G(t);return new Uint8Array(n)}async function q(e){const t=[],n=e.getReader();let i=!1,r=0;for(;!i;){const{done:e,value:o}=await n.read();o&&(t.push(o),r+=o.length),i=e}const o=new Uint8Array(r);let s=0;for(const e of t)o.set(e,s),s+=e.length;return o}function W(e){return new Promise(((t,n)=>{const i=new FileReader;i.onloadend=()=>{if(2!==i.readyState)return n(new Error("Reader aborted too early"));const e=i.result??"",r=e.indexOf(","),o=r>-1?r+1:e.length;t(e.substring(o))},i.onabort=()=>n(new Error("Read aborted")),i.onerror=()=>n(i.error),i.readAsDataURL(e)}))}const K=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},Y=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,Z=()=>{let e=[],t=[],n=!1;const i=new Set,r=e=>e.sort(((e,t)=>Q[t.step]-Q[e.step]||J[t.priority||"normal"]-J[e.priority||"normal"])),o=n=>{let r=!1;const o=e=>{const t=K(e.name,e.aliases);if(t.includes(n)){r=!0;for(const e of t)i.delete(e);return!1}return!0};return e=e.filter(o),t=t.filter(o),r},s=n=>{let r=!1;const o=e=>{if(e.middleware===n){r=!0;for(const t of K(e.name,e.aliases))i.delete(t);return!1}return!0};return e=e.filter(o),t=t.filter(o),r},a=n=>(e.forEach((e=>{n.add(e.middleware,{...e})})),t.forEach((e=>{n.addRelativeTo(e.middleware,{...e})})),n.identifyOnResolve?.(u.identifyOnResolve()),n),c=e=>{const t=[];return e.before.forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...c(e))})),t.push(e),e.after.reverse().forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...c(e))})),t},d=function(){let n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const i=[],o=[],s={};return e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of K(t.name,t.aliases))s[e]=t;i.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of K(t.name,t.aliases))s[e]=t;o.push(t)})),o.forEach((e=>{if(e.toMiddleware){const t=s[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${Y(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}})),r(i).map(c).reduce(((e,t)=>(e.push(...t),e)),[])},u={add:function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{name:r,override:o,aliases:s}=n,a={step:"initialize",priority:"normal",middleware:t,...n},c=K(r,s);if(c.length>0){if(c.some((e=>i.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${Y(r,s)}'`);for(const t of c){const n=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(-1===n)continue;const i=e[n];if(i.step!==a.step||a.priority!==i.priority)throw new Error(`"${Y(i.name,i.aliases)}" middleware with ${i.priority} priority in ${i.step} step cannot be overridden by "${Y(r,s)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(n,1)}}for(const e of c)i.add(e)}e.push(a)},addRelativeTo:(e,n)=>{const{name:r,override:o,aliases:s}=n,a={middleware:e,...n},c=K(r,s);if(c.length>0){if(c.some((e=>i.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${Y(r,s)}'`);for(const e of c){const n=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(-1===n)continue;const i=t[n];if(i.toMiddleware!==a.toMiddleware||i.relation!==a.relation)throw new Error(`"${Y(i.name,i.aliases)}" middleware ${i.relation} "${i.toMiddleware}" middleware cannot be overridden by "${Y(r,s)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)i.add(e)}t.push(a)},clone:()=>a(Z()),use:e=>{e.applyToStack(u)},remove:e=>"string"==typeof e?o(e):s(e),removeByTag:n=>{let r=!1;const o=e=>{const{tags:t,name:o,aliases:s}=e;if(t&&t.includes(n)){const e=K(o,s);for(const t of e)i.delete(t);return r=!0,!1}return!0};return e=e.filter(o),t=t.filter(o),r},concat:e=>{const t=a(Z());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:a,identify:()=>d(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return Y(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of d().map((e=>e.middleware)).reverse())e=n(e,t);return n&&console.log(u.identify()),e}};return u},Q={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},J={high:3,normal:2,low:1};class X{constructor(e){this.config=e,this.middlewareStack=Z()}send(e,t,n){const i="function"!=typeof t?t:void 0,r="function"==typeof t?t:n;let o;if(void 0===i&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?o=t.get(e.constructor):(o=e.resolveMiddleware(this.middlewareStack,this.config,i),t.set(e.constructor,o))}else delete this.handlers,o=e.resolveMiddleware(this.middlewareStack,this.config,i);if(!r)return o(e).then((e=>e.output));o(e).then((e=>r(null,e.output)),(e=>r(e))).catch((()=>{}))}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const ee=e=>(new TextEncoder).encode(e),te=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};function ne(e){return"base64"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf-8")?z(e):te(e)}function ie(e,t){return"base64"===t?re.mutate(G(e)):re.mutate(ee(e))}class re extends Uint8Array{static fromString(e){if("string"==typeof e)return ie(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf-8");throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,re.prototype),e}transformToString(){return ne(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:"utf-8")}}for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`)}const oe=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Uint8Array,t=arguments.length>1?arguments[1]:void 0;if(e instanceof Uint8Array)return re.mutate(e);if(!e)return re.mutate(new Uint8Array);const n=t.streamCollector(e);return re.mutate(await n)};class se{constructor(){this.middlewareStack=Z()}static classBuilder(){return new ae}resolveMiddlewareWithContext(e,t,n,i){let{middlewareFn:r,clientName:o,commandName:s,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,smithyContext:d,additionalContext:u,CommandCtor:l}=i;for(const i of r.bind(this)(l,e,t,n))this.middlewareStack.use(i);const p=e.concat(this.middlewareStack),{logger:h}=t,f={logger:h,clientName:o,commandName:s,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,[C]:{commandInstance:this,...d},...u},{requestHandler:m}=t;return p.resolve((e=>m.handle(e.request,n||{})),f)}}class ae{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._smithyContext={service:e,operation:t,...n},this}c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e=>e,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e;return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){const e=this;let t;return t=class extends se{static getEndpointParameterInstructions(){return e._ep}constructor(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];let[r]=n;super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=r??{},e._init(this)}resolveMiddleware(n,i,r){return this.resolveMiddlewareWithContext(n,i,r,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const ce="***SensitiveInformation***",de=e=>{if(null!=e){if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&ge.warn(me(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},ue=(e,t)=>{if(null==e)throw new TypeError("Expected a non-null value");return e},le=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return ge.warn(me(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},pe=e=>de("string"==typeof e?fe(e):e),he=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,fe=e=>{const t=e.match(he);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},me=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),ge={warn:console.warn},ye=e=>{if(null==e)return;let t;if("number"==typeof e)t=e;else if("string"==typeof e)t=pe(e);else{if("object"!=typeof e||1!==e.tag)throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");t=e.value}if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(1e3*t))};class be extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,be.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}}const Se=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.entries(t).filter((e=>{let[,t]=e;return void 0!==t})).forEach((t=>{let[n,i]=t;null!=e[n]&&""!==e[n]||(e[n]=i)}));const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},ve=e=>{let{output:t,parsedBody:n,exceptionCtor:i,errorCode:r}=e;const o=Pe(t),s=o.httpStatusCode?o.httpStatusCode+"":void 0,a=new i({name:n?.code||n?.Code||r||s||"UnknownError",$fault:"client",$metadata:o});throw Se(a,n)},we=e=>t=>{let{output:n,parsedBody:i,errorCode:r}=t;ve({output:n,parsedBody:i,exceptionCtor:e,errorCode:r})},Pe=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Ee=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},Ce=e=>{const t=[];for(const n in P){const i=P[n];void 0!==e[i]&&t.push({algorithmId:()=>i,checksumConstructor:()=>e[i]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(e){this._checksumAlgorithms.push(e)},checksumAlgorithms(){return this._checksumAlgorithms}}},Te=e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t},Ae=e=>{let t=e.retryStrategy;return{setRetryStrategy(e){t=e},retryStrategy:()=>t}},Re=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},xe=e=>({...Ce(e),...Ae(e)}),Oe=e=>({...Te(e),...Re(e)}),Ie=function(){const e=Object.getPrototypeOf(this).constructor,t=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(t,e.prototype),t};Ie.prototype=Object.create(String.prototype,{constructor:{value:Ie,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(Ie,String);class Ne{trace(){}debug(){}info(){}warn(){}error(){}}const De=(e,t)=>{const n={};for(const i in t)Me(n,e,t,i);return n},Me=(e,t,n,i)=>{if(null!==t){let r=n[i];"function"==typeof r&&(r=[,r]);const[o=Le,s=ke,a=i]=r;return void(("function"==typeof o&&o(t[a])||"function"!=typeof o&&o)&&(e[i]=s(t[a])))}let[r,o]=n[i];if("function"==typeof o){let t;const n=void 0===r&&null!=(t=o()),s="function"==typeof r&&!!r(void 0)||"function"!=typeof r&&!!r;n?e[i]=t:s&&(e[i]=o())}else{const t=void 0===r&&null!=o,n="function"==typeof r&&!!r(o)||"function"!=typeof r&&!!r;(t||n)&&(e[i]=o)}},Le=e=>null!=e,ke=e=>e,_e=e=>{if(null==e)return{};if(Array.isArray(e))return e.filter((e=>null!=e)).map(_e);if("object"==typeof e){const t={};for(const n of Object.keys(e))null!=e[n]&&(t[n]=_e(e[n]));return t}return e};function Fe(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(t,n){function o(e){try{a(i.next(e))}catch(e){n(e)}}function s(e){try{a(i.throw(e))}catch(e){n(e)}}function a(e){e.done?t(e.value):r(e.value).then(o,s)}a((i=i.apply(e,[])).next())}))}function $e(e,t){var n,i,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return c([e,t])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}"function"==typeof SuppressedError&&SuppressedError;var Ue=64,Be=32,Ge=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]),je=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],ze=Math.pow(2,53)-1,He=function(){function e(){this.state=Int32Array.from(je),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>ze)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===Ue&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%Ue>=Ue-8){for(var i=this.bufferLength;i<Ue;i++)t.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(i=this.bufferLength;i<Ue-8;i++)t.setUint8(i,0);t.setUint32(Ue-8,Math.floor(e/4294967296),!0),t.setUint32(Ue-4,e),this.hashBuffer(),this.finished=!0}var r=new Uint8Array(Be);for(i=0;i<8;i++)r[4*i]=this.state[i]>>>24&255,r[4*i+1]=this.state[i]>>>16&255,r[4*i+2]=this.state[i]>>>8&255,r[4*i+3]=this.state[i]>>>0&255;return r},e.prototype.hashBuffer=function(){for(var e=this,t=e.buffer,n=e.state,i=n[0],r=n[1],o=n[2],s=n[3],a=n[4],c=n[5],d=n[6],u=n[7],l=0;l<Ue;l++){if(l<16)this.temp[l]=(255&t[4*l])<<24|(255&t[4*l+1])<<16|(255&t[4*l+2])<<8|255&t[4*l+3];else{var p=this.temp[l-2],h=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,f=((p=this.temp[l-15])>>>7|p<<25)^(p>>>18|p<<14)^p>>>3;this.temp[l]=(h+this.temp[l-7]|0)+(f+this.temp[l-16]|0)}var m=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&c^~a&d)|0)+(u+(Ge[l]+this.temp[l]|0)|0)|0,g=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&r^i&o^r&o)|0;u=d,d=c,c=a,a=s+m|0,s=o,o=r,r=i,i=m+g|0}n[0]+=i,n[1]+=r,n[2]+=o,n[3]+=s,n[4]+=a,n[5]+=c,n[6]+=d,n[7]+=u},e}();const Ve=e=>(new TextEncoder).encode(e);var qe="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:Ve;function We(e){return e instanceof Uint8Array?e:"string"==typeof e?qe(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function Ke(e){return"string"==typeof e?0===e.length:0===e.byteLength}var Ye=function(){function e(e){this.secret=e,this.hash=new He,this.reset()}return e.prototype.update=function(e){if(!Ke(e)&&!this.error)try{this.hash.update(We(e))}catch(e){this.error=e}},e.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()},e.prototype.digest=function(){return Fe(this,void 0,void 0,(function(){return $e(this,(function(e){return[2,this.digestSync()]}))}))},e.prototype.reset=function(){if(this.hash=new He,this.secret){this.outer=new He;var e=Ze(this.secret),t=new Uint8Array(Ue);t.set(e);for(var n=0;n<Ue;n++)e[n]^=54,t[n]^=92;for(this.hash.update(e),this.outer.update(t),n=0;n<e.byteLength;n++)e[n]=0}},e}();function Ze(e){var t=We(e);if(t.byteLength>Ue){var n=new He;n.update(t),t=n.digest()}var i=new Uint8Array(Ue);return i.set(t),i}const Qe={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),Qe[e]=t}function Je(e){let t="";for(let n=0;n<e.byteLength;n++)t+=Qe[e[n]];return t}var Xe=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};const et="X-Amz-Algorithm",tt="X-Amz-Date",nt="X-Amz-Credential",it="X-Amz-Signature",rt="X-Amz-SignedHeaders",ot="X-Amz-Security-Token",st="host",at="aws4_request",ct="AWS4-HMAC-SHA256",dt="AWS4",ut="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";class lt{static signUrl(e,t,n,i){let r;const o={body:r,method:"GET",url:new URL(e)},s=pt(e,t,n,i);return ht(o,s).toString()}}const pt=(e,t,n,i)=>{const{access_key:r,secret_key:o,session_token:s}=null!=i?i:{};return{credentials:{accessKeyId:r,secretAccessKey:o,sessionToken:s},signingDate:new Date,signingRegion:t,signingService:n}},ht=(e,t)=>{let{body:n,method:i="GET",url:r}=e;var o=Xe(t,[]);const s=ft(o),{accessKeyId:a,credentialScope:c,longDate:d,sessionToken:u}=s,l=new URL(r);Object.entries(Object.assign({[et]:ct,[nt]:`${a}/${c}`,[tt]:d,[rt]:st},u&&{[ot]:u})).forEach((e=>{let[t,n]=e;l.searchParams.append(t,n)}));const p={body:n,headers:{[st]:r.host},method:i,url:l},h=yt(p,s);return l.searchParams.append(it,h),l},ft=e=>{let{credentials:t,signingDate:n=new Date,signingRegion:i,signingService:r,uriEscapePath:o=!0}=e;const{accessKeyId:s,secretAccessKey:a,sessionToken:c}=t,{longDate:d,shortDate:u}=mt(n);return{accessKeyId:s,credentialScope:gt(u,i,r),longDate:d,secretAccessKey:a,sessionToken:c,shortDate:u,signingRegion:i,signingService:r,uriEscapePath:o}},mt=e=>{const t=e.toISOString().replace(/[:-]|\.\d{3}/g,"");return{longDate:t,shortDate:t.slice(0,8)}},gt=(e,t,n)=>`${e}/${t}/${n}/${at}`,yt=(e,t)=>{let{credentialScope:n,longDate:i,secretAccessKey:r,shortDate:o,signingRegion:s,signingService:a,uriEscapePath:c}=t;const d=bt(e,c),u=Rt(null,d),l=xt(i,n,u);return Rt(Ot(r,o,s,a),l)},bt=function(e){let{body:t,headers:n,method:i,url:r}=e,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return[i,St(r.pathname,o),vt(r.searchParams),Et(n),Ct(n),Tt()].join("\n")},St=function(e){return e?arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?e:encodeURIComponent(e).replace(/%2F/g,"/"):"/"},vt=e=>Array.from(e).sort(((e,t)=>{let[n,i]=e,[r,o]=t;return n===r?i<o?-1:1:n<r?-1:1})).map((e=>{let[t,n]=e;return`${wt(t)}=${wt(n)}`})).join("&"),wt=e=>encodeURIComponent(e).replace(/[!'()*]/g,Pt),Pt=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`,Et=e=>Object.entries(e).map((e=>{let[t,n]=e;var i;return{key:t.toLowerCase(),value:null!==(i=null==n?void 0:n.trim().replace(/\s+/g," "))&&void 0!==i?i:""}})).sort(((e,t)=>e.key<t.key?-1:1)).map((e=>`${e.key}:${e.value}\n`)).join(""),Ct=e=>Object.keys(e).map((e=>e.toLowerCase())).sort().join(";"),Tt=e=>ut,At=(e,t)=>{const n=new Ye(null!=e?e:void 0);return n.update(t),n.digestSync()},Rt=(e,t)=>Je(At(e,t)),xt=(e,t,n)=>[ct,e,t,n].join("\n"),Ot=(e,t,n,i)=>{const r=At(`${dt}${e}`,t),o=At(r,n),s=At(o,i);return At(s,at)};async function It(e,t){const n=e.split(":")[0],i=g(Object.assign(Object.assign({},t||{}),{identityPoolId:e,clientConfig:Object.assign(Object.assign({},t&&t.clientConfig?t.clientConfig:{}),{region:n})}));let r;async function o(){r=await i();let e=36e5;r.expiration&&(e=r.expiration.getTime()-(new Date).getTime()),setTimeout(o,e-6e4)}await o();const s={credentials:i,region:n};return{getMapAuthenticationOptions:()=>({transformRequest:(e,t)=>{if(e.match(/^https:\/\/maps\.(geo|geo-fips)\.[a-z0-9-]+\.(amazonaws\.com|api\.aws)/)){const i=new URL(e).pathname.split("/").filter(Boolean);let o="geo-maps";if("v2"==(null==i?void 0:i[0])){if(!t||"Tile"!==t)return{url:e}}else o="geo";return{url:lt.signUrl(e,n,o,{access_key:r.accessKeyId,secret_key:r.secretAccessKey,session_token:r.sessionToken})}}return{url:e}}}),getLocationClientConfig:()=>s,getClientConfig:()=>s,getCredentials:()=>r}}function Nt(e,t){const n={signer:{sign:async t=>{var n;return t.query=Object.assign({key:e},null!==(n=t.query)&&void 0!==n?n:{}),t}},credentials:async()=>({})};return t&&(n.region=t),{getLocationClientConfig:()=>n,getClientConfig:()=>n}}function Dt(e){return e}const Mt=e=>t=>async n=>{if(!R.isInstance(n.request))return t(n);const{request:i}=n,{handlerProtocol:r=""}=e.requestHandler.metadata||{};if(r.indexOf("h2")>=0&&!i.headers[":authority"])delete i.headers.host,i.headers[":authority"]=i.hostname+(i.port?":"+i.port:"");else if(!i.headers.host){let e=i.hostname;null!=i.port&&(e+=`:${i.port}`),i.headers.host=e}return t(n)},Lt={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},kt=e=>({applyToStack:t=>{t.add(Mt(e),Lt)}}),_t=()=>(e,t)=>async n=>{try{const i=await e(n),{clientName:r,commandName:o,logger:s,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:d}=a,u=c??t.inputFilterSensitiveLog,l=d??t.outputFilterSensitiveLog,{$metadata:p,...h}=i.output;return s?.info?.({clientName:r,commandName:o,input:u(n.input),output:l(h),metadata:p}),i}catch(e){const{clientName:i,commandName:r,logger:o,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:a}=s,c=a??t.inputFilterSensitiveLog;throw o?.error?.({clientName:i,commandName:r,input:c(n.input),error:e,metadata:e.$metadata}),e}},Ft={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},$t=e=>({applyToStack:e=>{e.add(_t(),Ft)}}),Ut="X-Amzn-Trace-Id",Bt="AWS_LAMBDA_FUNCTION_NAME",Gt="_X_AMZN_TRACE_ID",jt=e=>t=>async n=>{const{request:i}=n;if(!R.isInstance(i)||"node"!==e.runtime||i.headers.hasOwnProperty(Ut))return t(n);const r=process.env[Bt],o=process.env[Gt],s=e=>"string"==typeof e&&e.length>0;return s(r)&&s(o)&&(i.headers[Ut]=o),t({...n,request:i})},zt={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Ht=e=>({applyToStack:t=>{t.add(jt(e),zt)}}),Vt=e=>e[C]||(e[C]={}),qt=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};function Wt(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}const Kt=(e,t)=>(n,i)=>async r=>{const o=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,i,r.input)),s=Wt(e.httpAuthSchemes),a=Vt(i),c=[];for(const n of o){const r=s.get(n.schemeId);if(!r){c.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const o=r.identityProvider(await t.identityProviderConfigProvider(e));if(!o){c.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:d={},signingProperties:u={}}=n.propertiesExtractor?.(e,i)||{};n.identityProperties=Object.assign(n.identityProperties||{},d),n.signingProperties=Object.assign(n.signingProperties||{},u),a.selectedHttpAuthScheme={httpAuthOption:n,identity:await o(n.identityProperties),signer:r.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(c.join("\n"));return n(r)},Yt={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},Zt=(e,t)=>{let{httpAuthSchemeParametersProvider:n,identityProviderConfigProvider:i}=t;return{applyToStack:t=>{t.addRelativeTo(Kt(e,{httpAuthSchemeParametersProvider:n,identityProviderConfigProvider:i}),Yt)}}},Qt=(e,t)=>n=>async i=>{const{response:r}=await n(i);try{return{response:r,output:await t(r,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:r}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";e.message+="\n "+t,void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText)}throw e}},Jt=(e,t)=>(n,i)=>async r=>{const o=i.endpointV2?.url&&e.urlParser?async()=>e.urlParser(i.endpointV2.url):e.endpoint;if(!o)throw new Error("No valid endpoint provider available.");const s=await t(r.input,{...e,endpoint:o});return n({...r,request:s})},Xt={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},en={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function tn(e,t,n){return{applyToStack:i=>{i.add(Qt(e,n),Xt),i.add(Jt(e,t),en)}}}en.name;const nn=e=>e=>{throw e},rn=(e,t)=>{},on=e=>(e,t)=>async n=>{if(!R.isInstance(n.request))return e(n);const i=Vt(t).selectedHttpAuthScheme;if(!i)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:r={}},identity:o,signer:s}=i,a=await e({...n,request:await s.sign(n.request,o,r)}).catch((s.errorHandler||nn)(r));return(s.successHandler||rn)(a.response,r),a},sn={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},an=e=>({applyToStack:e=>{e.addRelativeTo(on(),sn)}}),cn=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};function dn(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}class un{constructor(e){this.authSchemes=new Map;for(const[t,n]of Object.entries(e))void 0!==n&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}class ln{async sign(e,t,n){return e}}const pn=e=>t=>mn(t)&&t.expiration.getTime()-Date.now()<e,hn=3e5,fn=pn(hn),mn=e=>void 0!==e.expiration,gn=(e,t,n)=>{if(void 0===e)return;const i="function"!=typeof e?async()=>Promise.resolve(e):e;let r,o,s,a=!1;const c=async e=>{o||(o=i(e));try{r=await o,s=!0,a=!1}finally{o=void 0}return r};return void 0===t?async e=>(s&&!e?.forceRefresh||(r=await c(e)),r):async e=>(s&&!e?.forceRefresh||(r=await c(e)),a?r:n(r)?t(r)?(await c(e),r):r:(a=!0,r))},yn=void 0;function bn(e){return void 0===e||"string"==typeof e&&e.length<=50}function Sn(e){const t=cn(e.userAgentAppId??yn);return{...e,customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent,userAgentAppId:async()=>{const n=await t();if(!bn(n)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof n?t?.warn("userAgentAppId must be a string or undefined."):n.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}}}class vn{constructor(e){let{size:t,params:n}=e;this.data=new Map,this.parameters=[],this.capacity=t??50,n&&(this.parameters=n)}get(e,t){const n=this.hash(e);if(!1===n)return t();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:n,done:i}=e.next();if(this.data.delete(n),i||++t>10)break}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t="";const{parameters:n}=this;if(0===n.length)return!1;for(const i of n){const n=String(e[i]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}const wn=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}$"),Pn=e=>wn.test(e)||e.startsWith("[")&&e.endsWith("]"),En=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Cn=function(e){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))return En.test(e);const t=e.split(".");for(const e of t)if(!Cn(e))return!1;return!0},Tn={},An="endpoints";function Rn(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${Rn(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(Rn).join(", ")})`:JSON.stringify(e,null,2)}class xn extends Error{constructor(e){super(e),this.name="EndpointError"}}const On=(e,t)=>e===t,In=e=>{const t=e.split("."),n=[];for(const i of t){const t=i.indexOf("[");if(-1!==t){if(i.indexOf("]")!==i.length-1)throw new xn(`Path: '${e}' does not end with ']'`);const r=i.slice(t+1,-1);if(Number.isNaN(parseInt(r)))throw new xn(`Invalid array index: '${r}' in path: '${e}'`);0!==t&&n.push(i.slice(0,t)),n.push(r)}else n.push(i)}return n},Nn=(e,t)=>In(t).reduce(((n,i)=>{if("object"!=typeof n)throw new xn(`Index '${i}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(i)]:n[i]}),e),Dn=e=>null!=e,Mn=e=>!e,Ln={[w.HTTP]:80,[w.HTTPS]:443},kn=e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:n,protocol:i="",path:r="",query:o={}}=e,s=new URL(`${i}//${t}${n?`:${n}`:""}${r}`);return s.search=Object.entries(o).map((e=>{let[t,n]=e;return`${t}=${n}`})).join("&"),s}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:i,hostname:r,pathname:o,protocol:s,search:a}=t;if(a)return null;const c=s.slice(0,-1);if(!Object.values(w).includes(c))return null;const d=Pn(r);return{scheme:c,authority:`${i}${n.includes(`${i}:${Ln[c]}`)||"string"==typeof e&&e.includes(`${i}:${Ln[c]}`)?`:${Ln[c]}`:""}`,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:d}},_n=(e,t)=>e===t,Fn=(e,t,n,i)=>t>=n||e.length<n?null:i?e.substring(e.length-n,e.length-t):e.substring(t,n),$n=e=>encodeURIComponent(e).replace(/[!*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),Un={booleanEquals:On,getAttr:Nn,isSet:Dn,isValidHostLabel:Cn,not:Mn,parseURL:kn,stringEquals:_n,substring:Fn,uriEncode:$n},Bn=(e,t)=>{const n=[],i={...t.endpointParams,...t.referenceRecord};let r=0;for(;r<e.length;){const t=e.indexOf("{",r);if(-1===t){n.push(e.slice(r));break}n.push(e.slice(r,t));const o=e.indexOf("}",t);if(-1===o){n.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[o+1]&&(n.push(e.slice(t+1,o)),r=o+2);const s=e.substring(t+1,o);if(s.includes("#")){const[e,t]=s.split("#");n.push(Nn(i[e],t))}else n.push(i[s]);r=o+1}return n.join("")},Gn=(e,t)=>{let{ref:n}=e;return{...t.endpointParams,...t.referenceRecord}[n]},jn=(e,t,n)=>{if("string"==typeof e)return Bn(e,n);if(e.fn)return zn(e,n);if(e.ref)return Gn(e,n);throw new xn(`'${t}': ${String(e)} is not a string, function or reference.`)},zn=(e,t)=>{let{fn:n,argv:i}=e;const r=i.map((e=>["boolean","number"].includes(typeof e)?e:jn(e,"arg",t))),o=n.split(".");return o[0]in Tn&&null!=o[1]?Tn[o[0]][o[1]](...r):Un[n](...r)},Hn=(e,t)=>{let{assign:n,...i}=e;if(n&&n in t.referenceRecord)throw new xn(`'${n}' is already defined in Reference Record.`);const r=zn(i,t);return t.logger?.debug?.(`${An} evaluateCondition: ${Rn(i)} = ${Rn(r)}`),{result:""===r||!!r,...null!=n&&{toAssign:{name:n,value:r}}}},Vn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;const n={};for(const i of e){const{result:e,toAssign:r}=Hn(i,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};r&&(n[r.name]=r.value,t.logger?.debug?.(`${An} assign: ${r.name} := ${Rn(r.value)}`))}return{result:!0,referenceRecord:n}},Wn=(e,t)=>Object.entries(e).reduce(((e,n)=>{let[i,r]=n;return{...e,[i]:r.map((e=>{const n=jn(e,"Header value entry",t);if("string"!=typeof n)throw new xn(`Header '${i}' value '${n}' is not a string`);return n}))}}),{}),Kn=(e,t)=>{if(Array.isArray(e))return e.map((e=>Kn(e,t)));switch(typeof e){case"string":return Bn(e,t);case"object":if(null===e)throw new xn(`Unexpected endpoint property: ${e}`);return Yn(e,t);case"boolean":return e;default:throw new xn("Unexpected endpoint property type: "+typeof e)}},Yn=(e,t)=>Object.entries(e).reduce(((e,n)=>{let[i,r]=n;return{...e,[i]:Kn(r,t)}}),{}),Zn=(e,t)=>{const n=jn(e,"Endpoint URL",t);if("string"==typeof n)try{return new URL(n)}catch(e){throw console.error(`Failed to construct URL with ${n}`,e),e}throw new xn("Endpoint URL must be a string, got "+typeof n)},Qn=(e,t)=>{const{conditions:n,endpoint:i}=e,{result:r,referenceRecord:o}=Vn(n,t);if(!r)return;const s={...t,referenceRecord:{...t.referenceRecord,...o}},{url:a,properties:c,headers:d}=i;return t.logger?.debug?.(`${An} Resolving endpoint from template: ${Rn(i)}`),{...null!=d&&{headers:Wn(d,s)},...null!=c&&{properties:Yn(c,s)},url:Zn(a,s)}},Jn=(e,t)=>{const{conditions:n,error:i}=e,{result:r,referenceRecord:o}=Vn(n,t);if(r)throw new xn(jn(i,"Error",{...t,referenceRecord:{...t.referenceRecord,...o}}))},Xn=(e,t)=>{const{conditions:n,rules:i}=e,{result:r,referenceRecord:o}=Vn(n,t);if(r)return ei(i,{...t,referenceRecord:{...t.referenceRecord,...o}})},ei=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=Qn(n,t);if(e)return e}else if("error"===n.type)Jn(n,t);else{if("tree"!==n.type)throw new xn(`Unknown endpoint rule: ${n}`);{const e=Xn(n,t);if(e)return e}}throw new xn("Rules evaluation failed")},ti=(e,t)=>{const{endpointParams:n,logger:i}=t,{parameters:r,rules:o}=e;t.logger?.debug?.(`${An} Initial EndpointParams: ${Rn(n)}`);const s=Object.entries(r).filter((e=>{let[,t]=e;return null!=t.default})).map((e=>{let[t,n]=e;return[t,n.default]}));if(s.length>0)for(const[e,t]of s)n[e]=n[e]??t;const a=Object.entries(r).filter((e=>{let[,t]=e;return t.required})).map((e=>{let[t]=e;return t}));for(const e of a)if(null==n[e])throw new xn(`Missing required parameter: '${e}'`);const c=ei(o,{endpointParams:n,logger:i,referenceRecord:{}});return t.logger?.debug?.(`${An} Resolved endpoint: ${Rn(c)}`),c},ni=function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){for(const t of e.split("."))if(!ni(t))return!1;return!0}return!(!Cn(e)||e.length<3||e.length>63||e!==e.toLowerCase()||Pn(e))},ii=":",ri="/",oi=e=>{const t=e.split(ii);if(t.length<6)return null;const[n,i,r,o,s,...a]=t;return"arn"!==n||""===i||""===r||""===a.join(ii)?null:{partition:i,service:r,region:o,accountId:s,resourceId:a.map((e=>e.split(ri))).flat()}};var si=[{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-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)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],ai={partitions:si};let ci=ai;const di=e=>{const{partitions:t}=ci;for(const n of t){const{regions:t,outputs:i}=n;for(const[n,r]of Object.entries(t))if(n===e)return{...i,...r}}for(const n of t){const{regionRegex:t,outputs:i}=n;if(new RegExp(t).test(e))return{...i}}const n=t.find((e=>"aws"===e.id));if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}},ui={isVirtualHostableS3Bucket:ni,parseArn:oi,partition:di};function li(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}function pi(e,t,n){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]=n}Tn.aws=ui;const hi=e=>O.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,fi=e=>new Date(Date.now()+e),mi=(e,t)=>Math.abs(fi(t).getTime()-e)>=3e5,gi=(e,t)=>{const n=Date.parse(e);return mi(n,t)?n-Date.now():t},yi=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},bi=async e=>{const t=yi("context",e.context),n=yi("config",e.config),i=t.endpointV2?.properties?.authSchemes?.[0],r=yi("signer",n.signer),o=await r(i),s=e?.signingRegion,a=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:o,signingRegion:s,signingRegionSet:a,signingName:c}};class Si{async sign(e,t,n){if(!R.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await bi(n),{config:r,signer:o}=i;let{signingRegion:s,signingName:a}=i;const c=n.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(s=t?.signingRegion??s,a=t?.signingName??a)}return await o.sign(e,{signingDate:fi(r.systemClockOffset),signingRegion:s,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??hi(t.$response);if(n){const i=yi("config",e.config),r=i.systemClockOffset;i.systemClockOffset=gi(n,i.systemClockOffset),i.systemClockOffset!==r&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=hi(e);if(n){const e=yi("config",t.config);e.systemClockOffset=gi(n,e.systemClockOffset)}}}const vi={},wi={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),vi[e]=t,wi[t]=e}function Pi(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const i=e.slice(n,n+2).toLowerCase();if(!(i in wi))throw new Error(`Cannot decode unrecognized sequence ${i} as hexadecimal`);t[n/2]=wi[i]}return t}function Ei(e){let t="";for(let n=0;n<e.byteLength;n++)t+=vi[e[n]];return t}const Ci=e=>(new TextEncoder).encode(e),Ti=e=>"string"==typeof e?Ci(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),Ai="X-Amz-Algorithm",Ri="X-Amz-Credential",xi="X-Amz-Date",Oi="X-Amz-SignedHeaders",Ii="X-Amz-Expires",Ni="X-Amz-Signature",Di="X-Amz-Security-Token",Mi="authorization",Li=xi.toLowerCase(),ki="date",_i=[Mi,Li,ki],Fi=Ni.toLowerCase(),$i="x-amz-content-sha256",Ui=Di.toLowerCase(),Bi={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},Gi=/^proxy-/,ji=/^sec-/,zi="AWS4-HMAC-SHA256",Hi="AWS4-HMAC-SHA256-PAYLOAD",Vi="UNSIGNED-PAYLOAD",qi=50,Wi="aws4_request",Ki=604800,Yi={},Zi=[],Qi=(e,t,n)=>`${e}/${t}/${n}/${Wi}`,Ji=async(e,t,n,i,r)=>{const o=`${n}:${i}:${r}:${Ei(await Xi(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(o in Yi)return Yi[o];for(Zi.push(o);Zi.length>qi;)delete Yi[Zi.shift()];let s=`AWS4${t.secretAccessKey}`;for(const t of[n,i,r,Wi])s=await Xi(e,s,t);return Yi[o]=s},Xi=(e,t,n)=>{const i=new e(t);return i.update(Ti(n)),i.digest()},er=(e,t,n)=>{let{headers:i}=e;const r={};for(const e of Object.keys(i).sort()){if(null==i[e])continue;const o=e.toLowerCase();(o in Bi||t?.has(o)||Gi.test(o)||ji.test(o))&&(!n||n&&!n.has(o))||(r[o]=i[e].trim().replace(/\s+/g," "))}return r},tr=e=>{let{query:t={}}=e;const n=[],i={};for(const e of Object.keys(t)){if(e.toLowerCase()===Fi)continue;const r=I(e);n.push(r);const o=t[e];"string"==typeof o?i[r]=`${r}=${I(o)}`:Array.isArray(o)&&(i[r]=o.slice(0).reduce(((e,t)=>e.concat([`${r}=${I(t)}`])),[]).sort().join("&"))}return n.sort().map((e=>i[e])).filter((e=>e)).join("&")},nr=e=>"function"==typeof ArrayBuffer&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e),ir=async(e,t)=>{let{headers:n,body:i}=e;for(const e of Object.keys(n))if(e.toLowerCase()===$i)return n[e];if(null==i)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof i||ArrayBuffer.isView(i)||nr(i)){const e=new t;return e.update(Ti(i)),Ei(await e.digest())}return Vi};class rr{format(e){const t=[];for(const n of Object.keys(e)){const i=Ci(n);t.push(Uint8Array.from([i.byteLength]),i,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let i=0;for(const e of t)n.set(e,i),i+=e.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 t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.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 i=new Uint8Array(9);return i[0]=5,i.set(e.value.bytes,1),i;case"binary":const r=new DataView(new ArrayBuffer(3+e.value.byteLength));r.setUint8(0,6),r.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(r.buffer);return o.set(e.value,3),o;case"string":const s=Ci(e.value),a=new DataView(new ArrayBuffer(3+s.byteLength));a.setUint8(0,7),a.setUint16(1,s.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(s,3),c;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(ar.fromNumber(e.value.valueOf()).bytes,1),d;case"uuid":if(!sr.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const u=new Uint8Array(17);return u[0]=9,u.set(Pi(e.value.replace(/\-/g,"")),1),u}}}var or;!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(or||(or={}));const sr=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class ar{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,i=Math.abs(Math.round(e));n>-1&&i>0;n--,i/=256)t[n]=i;return e<0&&cr(t),new ar(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&cr(e),parseInt(Ei(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function cr(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const dr=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1},ur=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{headers:n,query:i={}}=R.clone(e);for(const e of Object.keys(n)){const r=e.toLowerCase();("x-amz-"===r.slice(0,6)&&!t.unhoistableHeaders?.has(r)||t.hoistableHeaders?.has(r))&&(i[e]=n[e],delete n[e])}return{...e,headers:n,query:i}},lr=e=>{e=R.clone(e);for(const t of Object.keys(e.headers))_i.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},pr=e=>hr(e).toISOString().replace(/\.\d{3}Z$/,"Z"),hr=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class fr{constructor(e){let{applyChecksum:t,credentials:n,region:i,service:r,sha256:o,uriEscapePath:s=!0}=e;this.headerFormatter=new rr,this.service=r,this.sha256=o,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=qt(i),this.credentialProvider=qt(n)}async presign(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{signingDate:n=new Date,expiresIn:i=3600,unsignableHeaders:r,unhoistableHeaders:o,signableHeaders:s,hoistableHeaders:a,signingRegion:c,signingService:d}=t,u=await this.credentialProvider();this.validateResolvedCredentials(u);const l=c??await this.regionProvider(),{longDate:p,shortDate:h}=mr(n);if(i>Ki)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const f=Qi(h,l,d??this.service),m=ur(lr(e),{unhoistableHeaders:o,hoistableHeaders:a});u.sessionToken&&(m.query[Di]=u.sessionToken),m.query[Ai]=zi,m.query[Ri]=`${u.accessKeyId}/${f}`,m.query[xi]=p,m.query[Ii]=i.toString(10);const g=er(m,r,s);return m.query[Oi]=gr(g),m.query[Ni]=await this.getSignature(p,f,this.getSigningKey(u,l,h,d),this.createCanonicalRequest(m,g,await ir(e,this.sha256))),m}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent(e,t){let{headers:n,payload:i}=e,{signingDate:r=new Date,priorSignature:o,signingRegion:s,signingService:a}=t;const c=s??await this.regionProvider(),{shortDate:d,longDate:u}=mr(r),l=Qi(d,c,a??this.service),p=await ir({headers:{},body:i},this.sha256),h=new this.sha256;h.update(n);const f=Ei(await h.digest()),m=[Hi,u,l,o,f,p].join("\n");return this.signString(m,{signingDate:r,signingRegion:c,signingService:a})}async signMessage(e,t){let{signingDate:n=new Date,signingRegion:i,signingService:r}=t;return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:n,signingRegion:i,signingService:r,priorSignature:e.priorSignature}).then((t=>({message:e.message,signature:t})))}async signString(e){let{signingDate:t=new Date,signingRegion:n,signingService:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=await this.credentialProvider();this.validateResolvedCredentials(r);const o=n??await this.regionProvider(),{shortDate:s}=mr(t),a=new this.sha256(await this.getSigningKey(r,o,s,i));return a.update(Ti(e)),Ei(await a.digest())}async signRequest(e){let{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:i,signingRegion:r,signingService:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=await this.credentialProvider();this.validateResolvedCredentials(s);const a=r??await this.regionProvider(),c=lr(e),{longDate:d,shortDate:u}=mr(t),l=Qi(u,a,o??this.service);c.headers[Li]=d,s.sessionToken&&(c.headers[Ui]=s.sessionToken);const p=await ir(c,this.sha256);!dr($i,c.headers)&&this.applyChecksum&&(c.headers[$i]=p);const h=er(c,i,n),f=await this.getSignature(d,l,this.getSigningKey(s,a,u,o),this.createCanonicalRequest(c,h,p));return c.headers[Mi]=`${zi} Credential=${s.accessKeyId}/${l}, SignedHeaders=${gr(h)}, Signature=${f}`,c}createCanonicalRequest(e,t,n){const i=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${tr(e)}\n${i.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${i.join(";")}\n${n}`}async createStringToSign(e,t,n){const i=new this.sha256;i.update(Ti(n));const r=await i.digest();return`${zi}\n${e}\n${t}\n${Ei(r)}`}getCanonicalPath(e){let{path:t}=e;if(this.uriEscapePath){const e=[];for(const n of t.split("/"))0!==n?.length&&"."!==n&&(".."===n?e.pop():e.push(n));const n=`${t?.startsWith("/")?"/":""}${e.join("/")}${e.length>0&&t?.endsWith("/")?"/":""}`;return I(n).replace(/%2F/g,"/")}return t}async getSignature(e,t,n,i){const r=await this.createStringToSign(e,t,i),o=new this.sha256(await n);return o.update(Ti(r)),Ei(await o.digest())}getSigningKey(e,t,n,i){return Ji(this.sha256,e,n,t,i||this.service)}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}}const mr=e=>{const t=pr(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}},gr=e=>Object.keys(e).sort().join(";"),yr=e=>{let t,n=!1;e.credentials&&(n=!0,t=gn(e.credentials,fn,mn)),t||(t=e.credentialDefaultProvider?cn(e.credentialDefaultProvider(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("`credentials` is missing")});const{signingEscapePath:i=!0,systemClockOffset:r=e.systemClockOffset||0,sha256:o}=e;let s;return s=e.signer?cn(e.signer):e.regionInfoProvider?()=>cn(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((n=>{let[r,s]=n;const{signingRegion:a,signingService:c}=r;e.signingRegion=e.signingRegion||a||s,e.signingName=e.signingName||c||e.serviceId;const d={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||fr)(d)})):async n=>{const r=(n=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await cn(e.region)(),properties:{}},n)).signingRegion,s=n.signingName;e.signingRegion=e.signingRegion||r,e.signingName=e.signingName||s||e.serviceId;const a={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||fr)(a)},{...e,systemClockOffset:r,signingEscapePath:i,credentials:n?async()=>t().then((e=>li(e,"CREDENTIALS_CODE","e"))):t,signer:s}},br=(e,t)=>oe(e,t).then((e=>t.utf8Encoder(e))),Sr=(e,t)=>br(e,t).then((e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}})),vr=async(e,t)=>{const n=await Sr(e,t);return n.message=n.message??n.Message,n},wr=(e,t)=>{const n=(e,t)=>Object.keys(e).find((e=>e.toLowerCase()===t.toLowerCase())),i=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},r=n(e.headers,"x-amzn-errortype");return void 0!==r?i(e.headers[r]):void 0!==t.code?i(t.code):void 0!==t.__type?i(t.__type):void 0};function Pr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==qn||"undefined"!=typeof self&&self;const Er=/\d{12}\.ddb/;async function Cr(e,t,n){const i=n.request;if("rpc-v2-cbor"===i?.headers?.["smithy-protocol"]&&pi(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?pi(e,"RETRY_MODE_ADAPTIVE","F"):pi(e,"RETRY_MODE_STANDARD","E"):pi(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(Er)&&pi(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":pi(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":pi(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":pi(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const r=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(r?.$source){const t=r;t.accountId&&pi(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,i]of Object.entries(t.$source??{}))pi(e,n,i)}}const Tr="user-agent",Ar="x-amz-user-agent",Rr=" ",xr="/",Or=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Ir=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,Nr="-",Dr=1024;function Mr(e){let t="";for(const n in e){const i=e[n];if(!(t.length+i.length+1<=Dr))break;t.length?t+=","+i:t+=i}return t}const Lr=e=>(t,n)=>async i=>{const{request:r}=i;if(!R.isInstance(r))return t(i);const{headers:o}=r,s=n?.userAgent?.map(kr)||[],a=(await e.defaultUserAgentProvider()).map(kr);await Cr(n,e,i);const c=n;a.push(`m/${Mr(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const d=e?.customUserAgent?.map(kr)||[],u=await e.userAgentAppId();u&&a.push(kr([`app/${u}`]));const l=[].concat([...a,...s,...d]).join(Rr),p=[...a.filter((e=>e.startsWith("aws-sdk-"))),...d].join(Rr);return"browser"!==e.runtime?(p&&(o[Ar]=o[Ar]?`${o[Tr]} ${p}`:p),o[Tr]=l):o[Ar]=l,t({...i,request:r})},kr=e=>{const t=e[0].split(xr).map((e=>e.replace(Or,Nr))).join(xr),n=e[1]?.replace(Ir,Nr),i=t.indexOf(xr),r=t.substring(0,i);let o=t.substring(i+1);return"api"===r&&(o=o.toLowerCase()),[r,o,n].filter((e=>e&&e.length>0)).reduce(((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},_r={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Fr=e=>({applyToStack:t=>{t.add(Lr(e),_r)}});var $r;!function(e){e.ENV="env",e.CONFIG="shared config entry"}($r||($r={}));const Ur=!1,Br=!1,Gr=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),jr=e=>Gr(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,zr=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if("string"==typeof t)return jr(t);const e=await t();return jr(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!Gr(e)||("function"!=typeof n?Promise.resolve(!!n):n())}}},Hr="content-length";function Vr(e){return t=>async n=>{const i=n.request;if(R.isInstance(i)){const{body:t,headers:n}=i;if(t&&-1===Object.keys(n).map((e=>e.toLowerCase())).indexOf(Hr))try{const n=e(t);i.headers={...i.headers,[Hr]:String(n)}}catch(e){}}return t({...n,request:i})}}const qr={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Wr=e=>({applyToStack:t=>{t.add(Vr(e.bodyLengthChecker),qr)}}),Kr=async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Xr(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Jr(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},Yr=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Zr=/(\d+\.){3}\d+/,Qr=/\.\./,Jr=e=>Yr.test(e)&&!Zr.test(e)&&!Qr.test(e),Xr=e=>{const[t,n,i,,,r]=e.split(":"),o="arn"===t&&e.split(":").length>=6,s=Boolean(o&&n&&i&&r);if(o&&!s)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return s},eo=(e,t,n)=>{const i=async()=>{const i=n[e]??n[t];return"function"==typeof i?i():i};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{const e=await i();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:i,path:r}=e;return`${t}//${n}${i?":"+i:""}${r}`}}return e}:i},to=async e=>{};function no(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,i=null]=n.split("=");e=decodeURIComponent(e),i&&(i=decodeURIComponent(i)),e in t?Array.isArray(t[e])?t[e].push(i):t[e]=[t[e],i]:t[e]=i}return t}const io=e=>{if("string"==typeof e)return io(new URL(e));const{hostname:t,pathname:n,port:i,protocol:r,search:o}=e;let s;return o&&(s=no(o)),{hostname:t,port:i?parseInt(i):void 0,protocol:r,path:n,query:s}},ro=e=>"object"==typeof e?"url"in e?io(e.url):e:io(e),oo=async(e,t,n,i)=>{if(!n.endpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await to(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(ro(e)))}const r=await so(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(r,i)},so=async(e,t,n)=>{const i={},r=t?.getEndpointParameterInstructions?.()||{};for(const[t,o]of Object.entries(r))switch(o.type){case"staticContextParams":i[t]=o.value;break;case"contextParams":i[t]=e[o.name];break;case"clientContextParams":case"builtInParams":i[t]=await eo(o.name,t,n)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(o))}return 0===Object.keys(r).length&&Object.assign(i,n),"s3"===String(n.serviceId).toLowerCase()&&await Kr(i),i},ao=e=>{let{config:t,instructions:n}=e;return(e,i)=>async r=>{t.endpoint&&dn(i,"ENDPOINT_OVERRIDE","N");const o=await oo(r.input,{getEndpointParameterInstructions:()=>n},{...t},i);i.endpointV2=o,i.authSchemes=o.properties?.authSchemes;const s=i.authSchemes?.[0];if(s){i.signing_region=s.signingRegion,i.signing_service=s.signingName;const e=Vt(i),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:s.signingRegion,signingRegion:s.signingRegion,signing_service:s.signingName,signingName:s.signingName,signingRegionSet:s.signingRegionSet},s.properties))}return e({...r})}},co={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:en.name},uo=(e,t)=>({applyToStack:n=>{n.addRelativeTo(ao({config:e,instructions:t}),co)}}),lo=e=>{const t=e.tls??!0,{endpoint:n}=e,i=null!=n?async()=>ro(await qt(n)()):void 0,r=!!n,o={...e,endpoint:i,tls:t,isCustomEndpoint:r,useDualstackEndpoint:qt(e.useDualstackEndpoint??!1),useFipsEndpoint:qt(e.useFipsEndpoint??!1)};let s;return o.serviceConfiguredEndpoint=async()=>(e.serviceId&&!s&&(s=to(e.serviceId)),s),o};var po;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(po||(po={}));const ho=3,fo=po.STANDARD,mo=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],go=["TimeoutError","RequestTimeout","RequestTimeoutException"],yo=[500,502,503,504],bo=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],So=e=>e.$metadata?.clockSkewCorrected,vo=e=>429===e.$metadata?.httpStatusCode||mo.includes(e.name)||1==e.$retryable?.throttling,wo=e=>So(e)||go.includes(e.name)||bo.includes(e?.code||"")||yo.includes(e.$metadata?.httpStatusCode||0),Po=e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!wo(e)}return!1};class Eo{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,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 t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,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 t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise((e=>setTimeout(e,t)))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),vo(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(t,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(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}const Co=100,To=2e4,Ao=500,Ro=500,xo=5,Oo=10,Io=1,No="amz-sdk-invocation-id",Do="amz-sdk-request",Mo=()=>{let e=Co;return{computeNextBackoffDelay:t=>Math.floor(Math.min(To,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}},Lo=e=>{let{retryDelay:t,retryCount:n,retryCost:i}=e;return{getRetryCount:()=>n,getRetryDelay:()=>Math.min(To,t),getRetryCost:()=>i}};class ko{constructor(e){this.maxAttempts=e,this.mode=po.STANDARD,this.capacity=Ro,this.retryBackoffStrategy=Mo(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return Lo({retryDelay:Co,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===n?Ao:Co);const i=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),r=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,i):i,o=this.getCapacityCost(n);return this.capacity-=o,Lo({retryDelay:r,retryCount:e.getRetryCount()+1,retryCost:o})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(Ro,this.capacity+(e.getRetryCost()??Io))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn(`Max attempts provider could not resolve. Using default of ${ho}`),ho}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?Oo:xo}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class _o{constructor(e,t){this.maxAttemptsProvider=e,this.mode=po.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new Eo,this.standardRetryStrategy=new ko(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}let Fo;const $o=new Uint8Array(16);function Uo(){if(!Fo&&(Fo="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Fo))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Fo($o)}const Bo=[];for(let e=0;e<256;++e)Bo.push((e+256).toString(16).slice(1));function Go(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Bo[e[t+0]]+Bo[e[t+1]]+Bo[e[t+2]]+Bo[e[t+3]]+"-"+Bo[e[t+4]]+Bo[e[t+5]]+"-"+Bo[e[t+6]]+Bo[e[t+7]]+"-"+Bo[e[t+8]]+Bo[e[t+9]]+"-"+Bo[e[t+10]]+Bo[e[t+11]]+Bo[e[t+12]]+Bo[e[t+13]]+Bo[e[t+14]]+Bo[e[t+15]]}const jo="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var zo={randomUUID:jo};function Ho(e,t,n){if(zo.randomUUID&&!e)return zo.randomUUID();const i=(e=e||{}).random||(e.rng||Uo)();return i[6]=15&i[6]|64,i[8]=63&i[8]|128,Go(i)}const Vo=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),qo=e=>{const{retryStrategy:t}=e,n=qt(e.maxAttempts??ho);return{...e,maxAttempts:n,retryStrategy:async()=>t||(await qt(e.retryMode)()===po.ADAPTIVE?new _o(n):new ko(n))}},Wo=e=>e?.body instanceof ReadableStream,Ko=e=>(t,n)=>async i=>{let r=await e.retryStrategy();const o=await e.maxAttempts();if(!Yo(r))return r?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",r.mode]]),r.retry(t,i);{let e=await r.acquireInitialRetryToken(n.partition_id),s=new Error,a=0,c=0;const{request:d}=i,u=R.isInstance(d);for(u&&(d.headers[No]=Ho());;)try{u&&(d.headers[Do]=`attempt=${a+1}; max=${o}`);const{response:n,output:s}=await t(i);return r.recordSuccess(e),s.$metadata.attempts=a+1,s.$metadata.totalRetryDelay=c,{response:n,output:s}}catch(t){const i=Zo(t);if(s=Vo(t),u&&Wo(d))throw(n.logger instanceof Ne?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),s;try{e=await r.refreshRetryTokenForRetry(e,i)}catch(e){throw s.$metadata||(s.$metadata={}),s.$metadata.attempts=a+1,s.$metadata.totalRetryDelay=c,s}a=e.getRetryCount();const o=e.getRetryDelay();c+=o,await new Promise((e=>setTimeout(e,o)))}}},Yo=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,Zo=e=>{const t={error:e,errorType:Qo(e)},n=es(e.$response);return n&&(t.retryAfterHint=n),t},Qo=e=>vo(e)?"THROTTLING":wo(e)?"TRANSIENT":Po(e)?"SERVER_ERROR":"CLIENT_ERROR",Jo={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Xo=e=>({applyToStack:t=>{t.add(Ko(e),Jo)}}),es=e=>{if(!O.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const n=e.headers[t],i=Number(n);return Number.isNaN(i)?new Date(n):new Date(1e3*i)},ts=async(e,t,n)=>({operation:Vt(t).operation,region:await qt(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function ns(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function is(e){return{schemeId:"smithy.api#noAuth"}}const rs=e=>{const t=[];switch(e.operation){case"GetCredentialsForIdentity":case"GetId":case"GetOpenIdToken":case"UnlinkIdentity":t.push(is());break;default:t.push(ns(e))}return t},os=e=>({...yr(e)}),ss=e=>({...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}),as={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var cs="3.682.0",ds={version:cs},us={name:"SHA-256"},ls={name:"HMAC",hash:us},ps=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 hs={};function fs(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:hs}var ms=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!Ke(e)){var t=We(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return fs().crypto.subtle.sign(ls,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):Ke(this.toHash)?Promise.resolve(ps):Promise.resolve().then((function(){return fs().crypto.subtle.digest(us,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise((function(t,n){fs().crypto.subtle.importKey("raw",We(e.secret),ls,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))},e}(),gs=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function ys(e){return!(!bs(e)||"object"!=typeof e.crypto.subtle)&&Ss(e.crypto.subtle)}function bs(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function Ss(e){return e&&gs.every((function(t){return"function"==typeof e[t]}))}var vs=function(){function e(e){ys(fs())?this.hash=new ms(e):this.hash=new Ye(e)}return e.prototype.update=function(e,t){this.hash.update(We(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),ws={exports:{}};!function(e){!function(t,n){e.exports=n()}(0,(function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){t.__esModule=!0,t.default=void 0;var i=n(18),r=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,i){void 0===i&&(i=!1);var r=e.getVersionPrecision(t),o=e.getVersionPrecision(n),s=Math.max(r,o),a=0,c=e.map([t,n],(function(t){var n=s-e.getVersionPrecision(t),i=t+new Array(n+1).join(".0");return e.map(i.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(i&&(a=s-Math.min(r,o)),s-=1;s>=a;){if(c[0][s]>c[1][s])return 1;if(c[0][s]===c[1][s]){if(s===a)return 0;s-=1}else if(c[0][s]<c[1][s])return-1}},e.map=function(e,t){var n,i=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)i.push(t(e[n]));return i},e.find=function(e,t){var n,i;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,i=e.length;n<i;n+=1){var r=e[n];if(t(r,n))return r}},e.assign=function(e){for(var t,n,i=e,r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){i[t]=e[t]}))};for(t=0,n=o.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return i.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return i.BROWSER_MAP[e]||""},e}();t.default=r,e.exports=t.default},18:function(e,t,n){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,r=(i=n(91))&&i.__esModule?i:{default:i},o=n(18);function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var a=function(){function e(){}var t,n,i;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new r.default(e,t)},e.parse=function(e){return new r.default(e).getResult()},t=e,i=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],(n=null)&&s(t.prototype,n),i&&s(t,i),e}();t.default=a,e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var i=c(n(92)),r=c(n(93)),o=c(n(94)),s=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var d=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},i=0,r={},o=0;if(Object.keys(e).forEach((function(t){var s=e[t];"string"==typeof s?(r[t]=s,o+=1):"object"==typeof s&&(n[t]=s,i+=1)})),i>0){var s=Object.keys(n),c=a.default.find(s,(function(e){return t.isOS(e)}));if(c){var d=this.satisfies(n[c]);if(void 0!==d)return d}var u=a.default.find(s,(function(e){return t.isPlatform(e)}));if(u){var l=this.satisfies(n[u]);if(void 0!==l)return l}}if(o>0){var p=Object.keys(r),h=a.default.find(p,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(r[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),i=e.toLowerCase(),r=a.default.getBrowserTypeByAlias(i);return t&&r&&(i=r.toLowerCase()),i===n},t.compareVersion=function(e){var t=[0],n=e,i=!1,r=this.getBrowserVersion();if("string"==typeof r)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(i=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(i=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(r,n,i))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=d,e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=r.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=r.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=r.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=r.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=r.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=r.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=r.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=r.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=r.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=r.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=r.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=r.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=r.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=r.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=r.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=r.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=r.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=r.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=r.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=r.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=r.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=r.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=r.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=r.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=r.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=r.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=r.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:r.default.getFirstMatch(t,e),version:r.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},o=n(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=r.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=r.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=r.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=r.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},n=r.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=r.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=r.default.getMacOSVersionName(t),i={name:o.OS_MAP.MacOS,version:t};return n&&(i.versionName=n),i}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=r.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=r.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=r.default.getAndroidVersionName(t),i={name:o.OS_MAP.Android,version:t};return n&&(i.versionName=n),i}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=r.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:o.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=r.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||r.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||r.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=r.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=r.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=r.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},o=n(18),s=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=r.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=r.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},o=n(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=r.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},n=r.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},n=r.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},n=r.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},n=r.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=s,e.exports=t.default}})}))}(ws);var Ps=ws.exports,Es=Pr(Ps);const Cs=e=>{let{serviceId:t,clientVersion:n}=e;return async e=>{const i="undefined"!=typeof window&&window?.navigator?.userAgent?Es.parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",n],["ua","2.1"],[`os/${i?.os?.name||"other"}`,i?.os?.version],["lang/js"],["md/browser",`${i?.browser?.name??"unknown"}_${i?.browser?.version??"unknown"}`]];t&&r.push([`api/${t}`,n]);const o=await(e?.userAgentAppId?.());return o&&r.push([`app/${o}`]),r}},Ts=e=>()=>Promise.reject(e),As="function"==typeof TextEncoder?new TextEncoder:null,Rs=e=>{if("string"==typeof e){if(As)return As.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const i=e.charCodeAt(n);i>127&&i<=2047?t++:i>2047&&i<=65535&&(t+=2),i>=56320&&i<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)},xs=e=>(new TextEncoder).encode(e),Os=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)},Is="required",Ns="fn",Ds="argv",Ms="ref",Ls=!0,ks="isSet",_s="booleanEquals",Fs="error",$s="endpoint",Us="tree",Bs="PartitionResult",Gs={[Is]:!1,type:"String"},js={[Is]:!0,default:!1,type:"Boolean"},zs={[Ms]:"Endpoint"},Hs={[Ns]:_s,[Ds]:[{[Ms]:"UseFIPS"},!0]},Vs={[Ns]:_s,[Ds]:[{[Ms]:"UseDualStack"},!0]},qs={},Ws={[Ns]:"getAttr",[Ds]:[{[Ms]:Bs},"supportsFIPS"]},Ks={[Ns]:_s,[Ds]:[!0,{[Ns]:"getAttr",[Ds]:[{[Ms]:Bs},"supportsDualStack"]}]},Ys=[Hs],Zs=[Vs],Qs=[{[Ms]:"Region"}],Js={parameters:{Region:Gs,UseDualStack:js,UseFIPS:js,Endpoint:Gs},rules:[{conditions:[{[Ns]:ks,[Ds]:[zs]}],rules:[{conditions:Ys,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Fs},{conditions:Zs,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Fs},{endpoint:{url:zs,properties:qs,headers:qs},type:$s}],type:Us},{conditions:[{[Ns]:ks,[Ds]:Qs}],rules:[{conditions:[{[Ns]:"aws.partition",[Ds]:Qs,assign:Bs}],rules:[{conditions:[Hs,Vs],rules:[{conditions:[{[Ns]:_s,[Ds]:[Ls,Ws]},Ks],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:qs,headers:qs},type:$s}],type:Us},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Fs}],type:Us},{conditions:Ys,rules:[{conditions:[{[Ns]:_s,[Ds]:[Ws,Ls]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:qs,headers:qs},type:$s}],type:Us},{error:"FIPS is enabled but this partition does not support FIPS",type:Fs}],type:Us},{conditions:Zs,rules:[{conditions:[Ks],rules:[{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:qs,headers:qs},type:$s}],type:Us},{error:"DualStack is enabled but this partition does not support DualStack",type:Fs}],type:Us},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:qs,headers:qs},type:$s}],type:Us}],type:Us},{error:"Invalid Configuration: Missing Region",type:Fs}]},Xs=Js,ea=new vn({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ta=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ea.get(e,(()=>ti(Xs,{endpointParams:e,logger:t.logger})))};Tn.aws=ui;const na=e=>({apiVersion:"2014-06-30",base64Decoder:e?.base64Decoder??G,base64Encoder:e?.base64Encoder??z,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ta,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??rs,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Si},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ln}],logger:e?.logger??new Ne,serviceId:e?.serviceId??"Cognito Identity",urlParser:e?.urlParser??io,utf8Decoder:e?.utf8Decoder??xs,utf8Encoder:e?.utf8Encoder??Os}),ia=["in-region","cross-region","mobile","standard","legacy"],ra=function(){let{defaultsMode:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i((async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(oa()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${ia.join(", ")}, got ${t}`)}}))},oa=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?Es.parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},sa=e=>{const t=ra(e),n=()=>t().then(Ee),i=na(e);return{...i,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Rs,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Cs({serviceId:i.serviceId,clientVersion:ds.version}),maxAttempts:e?.maxAttempts??ho,region:e?.region??Ts("Region is missing"),requestHandler:k.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||fo),sha256:e?.sha256??vs,streamCollector:e?.streamCollector??H,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Ur)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Br))}},aa=e=>{let t=async()=>{if(void 0===e.region)throw new Error("Region is missing from runtimeConfig");const t=e.region;return"string"==typeof t?t:t()};return{setRegion(e){t=e},region:()=>t}},ca=e=>({region:e.region()}),da=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,i=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){i=e},credentials:()=>i}},ua=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),la=e=>e,pa=(e,t)=>{const n={...la(aa(e)),...la(xe(e)),...la(y(e)),...la(da(e))};return t.forEach((e=>e.configure(n))),{...e,...ca(n),...Oe(n),...b(n),...ua(n)}};class ha extends X{constructor(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];let[i]=t;const r=sa(i||{}),o=Sn(ss(r)),s=qo(o),a=Dt(zr(s)),c=lo(a),d=os(c),u=pa(d,i?.extensions||[]);super(u),this.config=u,this.middlewareStack.use(Fr(this.config)),this.middlewareStack.use(Xo(this.config)),this.middlewareStack.use(Wr(this.config)),this.middlewareStack.use(kt(this.config)),this.middlewareStack.use($t(this.config)),this.middlewareStack.use(Ht(this.config)),this.middlewareStack.use(Zt(this.config,{httpAuthSchemeParametersProvider:ts,identityProviderConfigProvider:async e=>new un({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(an(this.config))}destroy(){super.destroy()}}class fa extends be{constructor(e){super(e),Object.setPrototypeOf(this,fa.prototype)}}class ma extends fa{constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),this.name="InternalErrorException",this.$fault="server",Object.setPrototypeOf(this,ma.prototype)}}class ga extends fa{constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),this.name="InvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,ga.prototype)}}class ya extends fa{constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,ya.prototype)}}class ba extends fa{constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),this.name="NotAuthorizedException",this.$fault="client",Object.setPrototypeOf(this,ba.prototype)}}class Sa extends fa{constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),this.name="ResourceConflictException",this.$fault="client",Object.setPrototypeOf(this,Sa.prototype)}}class va extends fa{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,va.prototype)}}class wa extends fa{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,wa.prototype)}}class Pa extends fa{constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),this.name="ExternalServiceException",this.$fault="client",Object.setPrototypeOf(this,Pa.prototype)}}class Ea extends fa{constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),this.name="InvalidIdentityPoolConfigurationException",this.$fault="client",Object.setPrototypeOf(this,Ea.prototype)}}class Ca extends fa{constructor(e){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...e}),this.name="DeveloperUserAlreadyRegisteredException",this.$fault="client",Object.setPrototypeOf(this,Ca.prototype)}}class Ta extends fa{constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),this.name="ConcurrentModificationException",this.$fault="client",Object.setPrototypeOf(this,Ta.prototype)}}const Aa=e=>({...e,...e.Logins&&{Logins:ce}}),Ra=e=>({...e,...e.SecretKey&&{SecretKey:ce}}),xa=e=>({...e,...e.Credentials&&{Credentials:Ra(e.Credentials)}}),Oa=e=>({...e,...e.Logins&&{Logins:ce}}),Ia=async(e,t)=>{const n=Qa("GetCredentialsForIdentity");let i;return i=JSON.stringify(_e(e)),Za(t,n,"/",void 0,i)},Na=async(e,t)=>{const n=Qa("GetId");let i;return i=JSON.stringify(_e(e)),Za(t,n,"/",void 0,i)},Da=async(e,t)=>{if(e.statusCode>=300)return La(e,t);const n=await Sr(e.body,t);let i={};return i=Wa(n),{$metadata:Ka(e),...i}},Ma=async(e,t)=>{if(e.statusCode>=300)return La(e,t);const n=await Sr(e.body,t);let i={};return i=_e(n),{$metadata:Ka(e),...i}},La=async(e,t)=>{const n={...e,body:await vr(e.body,t)},i=wr(e,n.body);switch(i){case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":throw await $a(n);case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":throw await Ba(n);case"LimitExceededException":case"com.amazonaws.cognitoidentity#LimitExceededException":throw await Ga(n);case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":throw await ja(n);case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":throw await za(n);case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":throw await Va(n);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":throw await Ha(n);case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":throw await Fa(n);case"InvalidIdentityPoolConfigurationException":case"com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException":throw await Ua(n);case"DeveloperUserAlreadyRegisteredException":case"com.amazonaws.cognitoidentity#DeveloperUserAlreadyRegisteredException":throw await _a(n);case"ConcurrentModificationException":case"com.amazonaws.cognitoidentity#ConcurrentModificationException":throw await ka(n);default:const t=n.body;return Ya({output:e,parsedBody:t,errorCode:i})}},ka=async(e,t)=>{const n=e.body,i=_e(n),r=new Ta({$metadata:Ka(e),...i});return Se(r,n)},_a=async(e,t)=>{const n=e.body,i=_e(n),r=new Ca({$metadata:Ka(e),...i});return Se(r,n)},Fa=async(e,t)=>{const n=e.body,i=_e(n),r=new Pa({$metadata:Ka(e),...i});return Se(r,n)},$a=async(e,t)=>{const n=e.body,i=_e(n),r=new ma({$metadata:Ka(e),...i});return Se(r,n)},Ua=async(e,t)=>{const n=e.body,i=_e(n),r=new Ea({$metadata:Ka(e),...i});return Se(r,n)},Ba=async(e,t)=>{const n=e.body,i=_e(n),r=new ga({$metadata:Ka(e),...i});return Se(r,n)},Ga=async(e,t)=>{const n=e.body,i=_e(n),r=new ya({$metadata:Ka(e),...i});return Se(r,n)},ja=async(e,t)=>{const n=e.body,i=_e(n),r=new ba({$metadata:Ka(e),...i});return Se(r,n)},za=async(e,t)=>{const n=e.body,i=_e(n),r=new Sa({$metadata:Ka(e),...i});return Se(r,n)},Ha=async(e,t)=>{const n=e.body,i=_e(n),r=new wa({$metadata:Ka(e),...i});return Se(r,n)},Va=async(e,t)=>{const n=e.body,i=_e(n),r=new va({$metadata:Ka(e),...i});return Se(r,n)},qa=(e,t)=>De(e,{AccessKeyId:le,Expiration:e=>ue(ye(de(e))),SecretKey:le,SessionToken:le}),Wa=(e,t)=>De(e,{Credentials:e=>qa(e),IdentityId:le}),Ka=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Ya=we(fa),Za=async(e,t,n,i,r)=>{const{hostname:o,protocol:s="https",port:a,path:c}=await e.endpoint(),d={protocol:s,hostname:o,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:t};return void 0!==r&&(d.body=r),new R(d)};function Qa(e){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${e}`}}class Ja extends(se.classBuilder().ep(as).m((function(e,t,n,i){return[tn(n,this.serialize,this.deserialize),uo(n,e.getEndpointParameterInstructions())]})).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").f(Aa,xa).ser(Ia).de(Da).build()){}class Xa extends(se.classBuilder().ep(as).m((function(e,t,n,i){return[tn(n,this.serialize,this.deserialize),uo(n,e.getEndpointParameterInstructions())]})).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").f(Oa,void 0).ser(Na).de(Ma).build()){}var ec=Object.freeze({__proto__:null,CognitoIdentityClient:ha,GetCredentialsForIdentityCommand:Ja,GetIdCommand:Xa})}(e)}(dp)),dp);const lp=async(e,t,n)=>({operation:w(t).operation,region:await P(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const pp=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"geo-maps",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},hp={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var fp="3.782.0";const mp="required",gp="fn",yp="argv",bp="ref",Sp="url",vp="properties",wp="headers",Pp=!0,Ep="isSet",Cp="booleanEquals",Tp="error",Ap="endpoint",Rp="tree",xp="PartitionResult",Op={[mp]:!0,default:!1,type:"Boolean"},Ip={[mp]:!1,type:"String"},Np={[bp]:"Endpoint"},Dp={[gp]:Cp,[yp]:[{[bp]:"UseFIPS"},!0]},Mp={[gp]:Cp,[yp]:[{[bp]:"UseDualStack"},!0]},Lp={},kp={[gp]:"stringEquals",[yp]:[{[gp]:"getAttr",[yp]:[{[bp]:xp},"name"]},"aws"]},_p={[gp]:Cp,[yp]:[{[bp]:"UseFIPS"},!1]},Fp={[gp]:Cp,[yp]:[{[bp]:"UseDualStack"},!1]},$p={[Sp]:"https://maps.geo.{Region}.{PartitionResult#dnsSuffix}/v2",[vp]:{},[wp]:{}},Up={[Sp]:"https://maps.geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",[vp]:{},[wp]:{}},Bp={[Sp]:"https://maps.geo-fips.{Region}.{PartitionResult#dnsSuffix}/v2",[vp]:{},[wp]:{}},Gp={[Sp]:"https://maps.geo.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",[vp]:{},[wp]:{}},jp={[gp]:"stringEquals",[yp]:[{[gp]:"getAttr",[yp]:[{[bp]:xp},"name"]},"aws-us-gov"]},zp={[gp]:"getAttr",[yp]:[{[bp]:xp},"supportsFIPS"]},Hp={[gp]:Cp,[yp]:[!0,{[gp]:"getAttr",[yp]:[{[bp]:xp},"supportsDualStack"]}]},Vp=[{[bp]:"Region"}],qp={parameters:{UseDualStack:Op,UseFIPS:Op,Endpoint:Ip,Region:Ip},rules:[{conditions:[{[gp]:Ep,[yp]:[Np]}],rules:[{conditions:[Dp],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Tp},{rules:[{conditions:[Mp],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Tp},{endpoint:{[Sp]:Np,[vp]:Lp,[wp]:Lp},type:Ap}],type:Rp}],type:Rp},{rules:[{conditions:[{[gp]:Ep,[yp]:Vp}],rules:[{conditions:[{[gp]:"aws.partition",[yp]:Vp,assign:xp}],rules:[{conditions:[kp,_p,Fp],endpoint:$p,type:Ap},{conditions:[kp,Dp,Mp],endpoint:Up,type:Ap},{conditions:[kp,Dp,Fp],endpoint:Bp,type:Ap},{conditions:[kp,_p,Mp],endpoint:Gp,type:Ap},{conditions:[jp,_p,Fp],endpoint:$p,type:Ap},{conditions:[jp,Dp,Mp],endpoint:Up,type:Ap},{conditions:[jp,Dp,Fp],endpoint:Bp,type:Ap},{conditions:[jp,_p,Mp],endpoint:Gp,type:Ap},{conditions:[Dp,Mp],rules:[{conditions:[{[gp]:Cp,[yp]:[Pp,zp]},Hp],rules:[{endpoint:{[Sp]:"https://geo-maps-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[vp]:Lp,[wp]:Lp},type:Ap}],type:Rp},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Tp}],type:Rp},{conditions:[Dp,Fp],rules:[{conditions:[{[gp]:Cp,[yp]:[zp,Pp]}],rules:[{endpoint:{[Sp]:"https://geo-maps-fips.{Region}.{PartitionResult#dnsSuffix}",[vp]:Lp,[wp]:Lp},type:Ap}],type:Rp},{error:"FIPS is enabled but this partition does not support FIPS",type:Tp}],type:Rp},{conditions:[_p,Mp],rules:[{conditions:[Hp],rules:[{endpoint:{[Sp]:"https://geo-maps.{Region}.{PartitionResult#dualStackDnsSuffix}",[vp]:Lp,[wp]:Lp},type:Ap}],type:Rp},{error:"DualStack is enabled but this partition does not support DualStack",type:Tp}],type:Rp},{endpoint:{[Sp]:"https://geo-maps.{Region}.{PartitionResult#dnsSuffix}",[vp]:Lp,[wp]:Lp},type:Ap}],type:Rp}],type:Rp},{error:"Invalid Configuration: Missing Region",type:Tp}],type:Rp}]},Wp=new he({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Kp=(e,t={})=>Wp.get(e,(()=>$e(qp,{endpointParams:e,logger:t.logger})));be.aws=Ge;const Yp=e=>{const t=$o(e),n=()=>t().then(On),i=(e=>({apiVersion:"2020-11-19",base64Decoder:e?.base64Decoder??U,base64Encoder:e?.base64Encoder??z,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Kp,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??pp,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Ke}],logger:e?.logger??new Mn,serviceId:e?.serviceId??"Geo Maps",urlParser:e?.urlParser??er,utf8Decoder:e?.utf8Decoder??B,utf8Encoder:e?.utf8Encoder??j}))(e);return{...i,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??lo,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ao({serviceId:i.serviceId,clientVersion:fp}),maxAttempts:e?.maxAttempts??3,region:e?.region??co("Region is missing"),requestHandler:Q.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||cr),sha256:e?.sha256??io,streamCollector:e?.streamCollector??J,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Ui)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Bi))}};class Zp extends $t{config;constructor(...[e]){const i=Yp(e||{});super(i),this.initConfig=i;var r;const o=pe((r=i,Object.assign(r,{useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"geo-maps"}))),s=Tr(o),a=zi(s),c=((e,i)=>{const r=Object.assign(Go(e),In(e),t(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,i=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){i=e},credentials:()=>i}})(e));return i.forEach((e=>e.configure(r))),Object.assign(e,jo(r),Nn(r),n(r),{httpAuthSchemes:(o=r).httpAuthSchemes(),httpAuthSchemeProvider:o.httpAuthSchemeProvider(),credentials:o.credentials()});var o})((e=>{const t=Dt(e);return Object.assign(t,{})})(sr(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use(Fi(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(qi(this.config)),this.middlewareStack.use(m(this.config)),this.middlewareStack.use(y(this.config)),this.middlewareStack.use(v(this.config)),this.middlewareStack.use(T(this.config,{httpAuthSchemeParametersProvider:lp,identityProviderConfigProvider:async e=>new ae({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(D(this.config))}destroy(){super.destroy()}}class Qp extends Tn{constructor(e){super(e),Object.setPrototypeOf(this,Qp.prototype)}}let Jp=class e extends Qp{name="AccessDeniedException";$fault="client";Message;constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};let Xp=class e extends Qp{name="InternalServerException";$fault="server";$retryable={};Message;constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},eh=class e extends Qp{name="ThrottlingException";$fault="client";$retryable={};Message;constructor(t){super({name:"ThrottlingException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};let th=class e extends Qp{name="ValidationException";$fault="client";Message;Reason;FieldList;constructor(t){super({name:"ValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message,this.Reason=t.Reason,this.FieldList=t.FieldList}};const nh=e=>({...e,...e.Key&&{Key:Gt}}),ih=e=>({...e,...e.Key&&{Key:Gt}}),rh=e=>({...e,...e.Key&&{Key:Gt}}),oh=async(e,t)=>{const n=oe(e,t);return n.bp("/glyphs/{FontStack}/{FontUnicodeRange}"),n.p("FontStack",(()=>e.FontStack),"{FontStack}",!1),n.p("FontUnicodeRange",(()=>e.FontUnicodeRange),"{FontUnicodeRange}",!1),n.m("GET").h({}).b(undefined),n.build()},sh=async(e,t)=>{const n=oe(e,t);return n.bp("/styles/{Style}/{ColorScheme}/{Variant}/sprites/{FileName}"),n.p("FileName",(()=>e.FileName),"{FileName}",!1),n.p("Style",(()=>e.Style),"{Style}",!1),n.p("ColorScheme",(()=>e.ColorScheme),"{ColorScheme}",!1),n.p("Variant",(()=>e.Variant),"{Variant}",!1),n.m("GET").h({}).b(undefined),n.build()},ah=async(e,t)=>{const n=oe(e,t);n.bp("/static/{FileName}"),n.p("FileName",(()=>e.FileName),"{FileName}",!1);const i=Ln({[qh]:[,e[Eh]],[Wh]:[,e[Ch]],[Kh]:[,e[Th]],[Jh]:[,e[Oh]],[Qh]:[,e[xh]],[Zh]:[()=>void 0!==e.CropLabels,()=>e[Rh].toString()],[tf]:[,e[Dh]],[nf]:[null!=Xt(e.Height,"Height"),()=>e[Mh].toString()],[rf]:[,e[Lh]],[sf]:[,e[_h]],[of]:[,e[kh]],[af]:[()=>void 0!==e.Padding,()=>e[Fh].toString()],[df]:[,e[Bh]],[cf]:[,e[Uh]],[uf]:[()=>void 0!==e.Radius,()=>e[Gh].toString()],[pf]:[,e[zh]],[lf]:[,e[jh]],[hf]:[null!=Xt(e.Width,"Width"),()=>e[Hh].toString()],[mf]:[()=>void 0!==e.Zoom,()=>e[Vh]%1==0?e[Vh]+".0":e[Vh].toString()]});return n.m("GET").h({}).q(i).b(undefined),n.build()},ch=async(e,t)=>{const n=oe(e,t);n.bp("/styles/{Style}/descriptor"),n.p("Style",(()=>e.Style),"{Style}",!1);const i=Ln({[Jh]:[,e[Oh]],[df]:[,e[Bh]],[rf]:[,e[Lh]]});return n.m("GET").h({}).q(i).b(undefined),n.build()},dh=async(e,t)=>{const n=oe(e,t);n.bp("/tiles/{Tileset}/{Z}/{X}/{Y}"),n.p("Tileset",(()=>e.Tileset),"{Tileset}",!1),n.p("Z",(()=>e.Z),"{Z}",!1),n.p("X",(()=>e.X),"{X}",!1),n.p("Y",(()=>e.Y),"{Y}",!1);const i=Ln({[rf]:[,e[Lh]]});return n.m("GET").h({}).q(i).b(undefined),n.build()},uh=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return mh(e,t);const n=Ln({$metadata:Ph(e),[Ih]:[,e.headers[Xh]],[Ah]:[,e.headers[Yh]],[Nh]:[,e.headers[ef]]}),i=await ie(e.body,t);return n.Blob=i,n},lh=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return mh(e,t);const n=Ln({$metadata:Ph(e),[Ih]:[,e.headers[Xh]],[Ah]:[,e.headers[Yh]],[Nh]:[,e.headers[ef]]}),i=await ie(e.body,t);return n.Blob=i,n},ph=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return mh(e,t);const n=Ln({$metadata:Ph(e),[Ih]:[,e.headers[Xh]],[Ah]:[,e.headers[Yh]],[Nh]:[,e.headers[ef]],[$h]:[,e.headers[ff]]}),i=await ie(e.body,t);return n.Blob=i,n},hh=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return mh(e,t);const n=Ln({$metadata:Ph(e),[Ih]:[,e.headers[Xh]],[Ah]:[,e.headers[Yh]],[Nh]:[,e.headers[ef]]}),i=await ie(e.body,t);return n.Blob=i,n},fh=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return mh(e,t);const n=Ln({$metadata:Ph(e),[Ih]:[,e.headers[Xh]],[Ah]:[,e.headers[Yh]],[Nh]:[,e.headers[ef]],[$h]:[,e.headers[ff]]}),i=await ie(e.body,t);return n.Blob=i,n},mh=async(e,t)=>{const n={...e,body:await Hn(e.body,t)},i=Vn(e,n.body);switch(i){case"AccessDeniedException":case"com.amazonaws.geomaps#AccessDeniedException":throw await yh(n);case"InternalServerException":case"com.amazonaws.geomaps#InternalServerException":throw await bh(n);case"ThrottlingException":case"com.amazonaws.geomaps#ThrottlingException":throw await Sh(n);case"ValidationException":case"com.amazonaws.geomaps#ValidationException":throw await vh(n);default:const t=n.body;return gh({output:e,parsedBody:t,errorCode:i})}},gh=Rn(Qp),yh=async(e,t)=>{const n=Ln({}),i=e.body,r=kn(i,{Message:[,tn,"message"]});Object.assign(n,r);const o=new Jp({$metadata:Ph(e),...n});return An(o,e.body)},bh=async(e,t)=>{const n=Ln({}),i=e.body,r=kn(i,{Message:[,tn,"message"]});Object.assign(n,r);const o=new Xp({$metadata:Ph(e),...n});return An(o,e.body)},Sh=async(e,t)=>{const n=Ln({}),i=e.body,r=kn(i,{Message:[,tn,"message"]});Object.assign(n,r);const o=new eh({$metadata:Ph(e),...n});return An(o,e.body)},vh=async(e,t)=>{const n=Ln({}),i=e.body,r=kn(i,{FieldList:[,e=>wh(e),"fieldList"],Message:[,tn,"message"],Reason:[,tn,"reason"]});Object.assign(n,r);const o=new th({$metadata:Ph(e),...n});return An(o,e.body)},wh=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{Message:[,tn,"message"],Name:[,tn,"name"]}))(e)));return n},Ph=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Eh="BoundingBox",Ch="BoundedPositions",Th="Center",Ah="CacheControl",Rh="CropLabels",xh="CompactOverlay",Oh="ColorScheme",Ih="ContentType",Nh="ETag",Dh="GeoJsonOverlay",Mh="Height",Lh="Key",kh="Language",_h="LabelSize",Fh="Padding",$h="PricingBucket",Uh="PointsOfInterests",Bh="PoliticalView",Gh="Radius",jh="Style",zh="ScaleBarUnit",Hh="Width",Vh="Zoom",qh="bounding-box",Wh="bounded-positions",Kh="center",Yh="cache-control",Zh="crop-labels",Qh="compact-overlay",Jh="color-scheme",Xh="content-type",ef="etag",tf="geojson-overlay",nf="height",rf="key",of="lang",sf="label-size",af="padding",cf="pois",df="political-view",uf="radius",lf="style",pf="scale-unit",hf="width",ff="x-amz-geo-pricing-bucket",mf="zoom";class gf extends(Ut.classBuilder().ep(hp).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("MapsService","GetGlyphs",{}).n("GeoMapsClient","GetGlyphsCommand").f(void 0,void 0).ser(oh).de(uh).build()){}class yf extends(Ut.classBuilder().ep(hp).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("MapsService","GetSprites",{}).n("GeoMapsClient","GetSpritesCommand").f(void 0,void 0).ser(sh).de(lh).build()){}class bf extends(Ut.classBuilder().ep(hp).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("MapsService","GetStaticMap",{}).n("GeoMapsClient","GetStaticMapCommand").f(nh,void 0).ser(ah).de(ph).build()){}class Sf extends(Ut.classBuilder().ep(hp).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("MapsService","GetStyleDescriptor",{}).n("GeoMapsClient","GetStyleDescriptorCommand").f(ih,void 0).ser(ch).de(hh).build()){}class vf extends(Ut.classBuilder().ep(hp).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("MapsService","GetTile",{}).n("GeoMapsClient","GetTileCommand").f(rh,void 0).ser(dh).de(fh).build()){}const wf={GetGlyphsCommand:gf,GetSpritesCommand:yf,GetStaticMapCommand:bf,GetStyleDescriptorCommand:Sf,GetTileCommand:vf};class Pf extends Zp{}jt(wf,Pf);var Ef=Object.freeze({__proto__:null,$Command:Ut,AccessDeniedException:Jp,ColorScheme:{DARK:"Dark",LIGHT:"Light"},GeoMaps:Pf,GeoMapsClient:Zp,GeoMapsServiceException:Qp,GetGlyphsCommand:gf,GetSpritesCommand:yf,GetStaticMapCommand:bf,GetStaticMapRequestFilterSensitiveLog:nh,GetStyleDescriptorCommand:Sf,GetStyleDescriptorRequestFilterSensitiveLog:ih,GetTileCommand:vf,GetTileRequestFilterSensitiveLog:rh,InternalServerException:Xp,LabelSize:{LARGE:"Large",SMALL:"Small"},MapFeatureMode:{DISABLED:"Disabled",ENABLED:"Enabled"},MapStyle:{HYBRID:"Hybrid",MONOCHROME:"Monochrome",SATELLITE:"Satellite",STANDARD:"Standard"},ScaleBarUnit:{KILOMETERS:"Kilometers",KILOMETERS_MILES:"KilometersMiles",MILES:"Miles",MILES_KILOMETERS:"MilesKilometers"},StaticMapStyle:{SATELLITE:"Satellite",STANDARD:"Standard"},ThrottlingException:eh,ValidationException:th,ValidationExceptionReason:{CANNOT_PARSE:"CannotParse",FIELD_VALIDATION_FAILED:"FieldValidationFailed",MISSING:"Missing",OTHER:"Other",UNKNOWN_FIELD:"UnknownField",UNKNOWN_OPERATION:"UnknownOperation"},Variant:{DEFAULT:"Default"},__Client:$t});const Cf=async(e,t,n)=>({operation:w(t).operation,region:await P(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Tf=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"geo-places",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Af={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Rf="3.782.0";const xf="required",Of="fn",If="argv",Nf="ref",Df=!0,Mf="isSet",Lf="booleanEquals",kf="error",_f="endpoint",Ff="tree",$f="PartitionResult",Uf={[xf]:!0,default:!1,type:"Boolean"},Bf={[xf]:!1,type:"String"},Gf={[Nf]:"Endpoint"},jf={[Of]:Lf,[If]:[{[Nf]:"UseFIPS"},!0]},zf={[Of]:Lf,[If]:[{[Nf]:"UseDualStack"},!0]},Hf={},Vf={[Of]:"stringEquals",[If]:[{[Of]:"getAttr",[If]:[{[Nf]:$f},"name"]},"aws"]},qf={[Of]:Lf,[If]:[{[Nf]:"UseFIPS"},!1]},Wf={[Of]:Lf,[If]:[{[Nf]:"UseDualStack"},!1]},Kf={[Of]:"stringEquals",[If]:[{[Of]:"getAttr",[If]:[{[Nf]:$f},"name"]},"aws-us-gov"]},Yf={[Of]:"getAttr",[If]:[{[Nf]:$f},"supportsFIPS"]},Zf={[Of]:Lf,[If]:[!0,{[Of]:"getAttr",[If]:[{[Nf]:$f},"supportsDualStack"]}]},Qf=[{[Nf]:"Region"}],Jf={parameters:{UseDualStack:Uf,UseFIPS:Uf,Endpoint:Bf,Region:Bf},rules:[{conditions:[{[Of]:Mf,[If]:[Gf]}],rules:[{conditions:[jf],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:kf},{rules:[{conditions:[zf],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:kf},{endpoint:{url:Gf,properties:Hf,headers:Hf},type:_f}],type:Ff}],type:Ff},{rules:[{conditions:[{[Of]:Mf,[If]:Qf}],rules:[{conditions:[{[Of]:"aws.partition",[If]:Qf,assign:$f}],rules:[{conditions:[Vf,qf,Wf],endpoint:{url:"https://places.geo.{Region}.{PartitionResult#dnsSuffix}/v2",properties:Hf,headers:Hf},type:_f},{conditions:[Vf,jf,zf],endpoint:{url:"https://places.geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",properties:Hf,headers:Hf},type:_f},{conditions:[Vf,jf,Wf],endpoint:{url:"https://places.geo-fips.{Region}.{PartitionResult#dnsSuffix}/v2",properties:Hf,headers:Hf},type:_f},{conditions:[Vf,qf,zf],endpoint:{url:"https://places.geo.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",properties:Hf,headers:Hf},type:_f},{conditions:[Kf,qf,Wf],endpoint:{url:"https://places.geo.{Region}.us-gov.{PartitionResult#dnsSuffix}/v2",properties:Hf,headers:Hf},type:_f},{conditions:[Kf,jf,zf],endpoint:{url:"https://places.geo-fips.{Region}.us-gov.{PartitionResult#dualStackDnsSuffix}/v2",properties:Hf,headers:Hf},type:_f},{conditions:[Kf,jf,Wf],endpoint:{url:"https://places.geo-fips.{Region}.us-gov.{PartitionResult#dnsSuffix}/v2",properties:Hf,headers:Hf},type:_f},{conditions:[Kf,qf,zf],endpoint:{url:"https://places.geo.{Region}.us-gov.{PartitionResult#dualStackDnsSuffix}/v2",properties:Hf,headers:Hf},type:_f},{conditions:[jf,zf],rules:[{conditions:[{[Of]:Lf,[If]:[Df,Yf]},Zf],rules:[{endpoint:{url:"https://geo-places-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Hf,headers:Hf},type:_f}],type:Ff},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:kf}],type:Ff},{conditions:[jf,Wf],rules:[{conditions:[{[Of]:Lf,[If]:[Yf,Df]}],rules:[{endpoint:{url:"https://geo-places-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Hf,headers:Hf},type:_f}],type:Ff},{error:"FIPS is enabled but this partition does not support FIPS",type:kf}],type:Ff},{conditions:[qf,zf],rules:[{conditions:[Zf],rules:[{endpoint:{url:"https://geo-places.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Hf,headers:Hf},type:_f}],type:Ff},{error:"DualStack is enabled but this partition does not support DualStack",type:kf}],type:Ff},{endpoint:{url:"https://geo-places.{Region}.{PartitionResult#dnsSuffix}",properties:Hf,headers:Hf},type:_f}],type:Ff}],type:Ff},{error:"Invalid Configuration: Missing Region",type:kf}],type:Ff}]},Xf=new he({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),em=(e,t={})=>Xf.get(e,(()=>$e(Jf,{endpointParams:e,logger:t.logger})));be.aws=Ge;const tm=e=>{const t=$o(e),n=()=>t().then(On),i=(e=>({apiVersion:"2020-11-19",base64Decoder:e?.base64Decoder??U,base64Encoder:e?.base64Encoder??z,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??em,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Tf,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Ke}],logger:e?.logger??new Mn,serviceId:e?.serviceId??"Geo Places",urlParser:e?.urlParser??er,utf8Decoder:e?.utf8Decoder??B,utf8Encoder:e?.utf8Encoder??j}))(e);return{...i,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??lo,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ao({serviceId:i.serviceId,clientVersion:Rf}),maxAttempts:e?.maxAttempts??3,region:e?.region??co("Region is missing"),requestHandler:Q.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||cr),sha256:e?.sha256??io,streamCollector:e?.streamCollector??J,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Ui)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Bi))}};class nm extends $t{config;constructor(...[e]){const i=tm(e||{});super(i),this.initConfig=i;var r;const o=pe((r=i,Object.assign(r,{useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"geo-places"}))),s=Tr(o),a=zi(s),c=((e,i)=>{const r=Object.assign(Go(e),In(e),t(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,i=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){i=e},credentials:()=>i}})(e));return i.forEach((e=>e.configure(r))),Object.assign(e,jo(r),Nn(r),n(r),{httpAuthSchemes:(o=r).httpAuthSchemes(),httpAuthSchemeProvider:o.httpAuthSchemeProvider(),credentials:o.credentials()});var o})((e=>{const t=Dt(e);return Object.assign(t,{})})(sr(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use(Fi(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(qi(this.config)),this.middlewareStack.use(m(this.config)),this.middlewareStack.use(y(this.config)),this.middlewareStack.use(v(this.config)),this.middlewareStack.use(T(this.config,{httpAuthSchemeParametersProvider:Cf,identityProviderConfigProvider:async e=>new ae({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(D(this.config))}destroy(){super.destroy()}}class im extends Tn{constructor(e){super(e),Object.setPrototypeOf(this,im.prototype)}}let rm=class e extends im{name="AccessDeniedException";$fault="client";Message;constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};let om=class e extends im{name="InternalServerException";$fault="server";$retryable={};Message;constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},sm=class e extends im{name="ThrottlingException";$fault="client";$retryable={};Message;constructor(t){super({name:"ThrottlingException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};let am=class e extends im{name="ValidationException";$fault="client";Message;Reason;FieldList;constructor(t){super({name:"ValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message,this.Reason=t.Reason,this.FieldList=t.FieldList}};const cm=e=>({...e,...e.Position&&{Position:Gt}}),dm=e=>({...e,...e.BoundingBox&&{BoundingBox:Gt},...e.Circle&&{Circle:Gt}}),um=e=>({...e,...e.QueryText&&{QueryText:Gt},...e.BiasPosition&&{BiasPosition:Gt},...e.Filter&&{Filter:dm(e.Filter)},...e.Key&&{Key:Gt}}),lm=e=>({...e,...e.Country&&{Country:Gt},...e.Region&&{Region:Gt},...e.SubRegion&&{SubRegion:Gt},...e.Locality&&{Locality:Gt},...e.District&&{District:Gt},...e.Street&&{Street:Gt},...e.AddressNumber&&{AddressNumber:Gt},...e.PostalCode&&{PostalCode:Gt}}),pm=e=>({...e,...e.QueryText&&{QueryText:Gt},...e.QueryComponents&&{QueryComponents:lm(e.QueryComponents)},...e.BiasPosition&&{BiasPosition:Gt},...e.Key&&{Key:Gt}}),hm=e=>({...e,...e.Position&&{Position:Gt},...e.MapView&&{MapView:Gt},...e.AccessPoints&&{AccessPoints:e.AccessPoints.map((e=>cm(e)))}}),fm=e=>({...e,...e.ResultItems&&{ResultItems:e.ResultItems.map((e=>hm(e)))}}),mm=e=>({...e,...e.PlaceId&&{PlaceId:Gt},...e.Key&&{Key:Gt}}),gm=e=>({...e,...e.Position&&{Position:Gt},...e.MapView&&{MapView:Gt},...e.AccessPoints&&{AccessPoints:e.AccessPoints.map((e=>cm(e)))}}),ym=e=>({...e,...e.QueryPosition&&{QueryPosition:Gt},...e.Key&&{Key:Gt}}),bm=e=>({...e,...e.Position&&{Position:Gt},...e.MapView&&{MapView:Gt},...e.AccessPoints&&{AccessPoints:e.AccessPoints.map((e=>cm(e)))}}),Sm=e=>({...e,...e.ResultItems&&{ResultItems:e.ResultItems.map((e=>bm(e)))}}),vm=e=>({...e,...e.BoundingBox&&{BoundingBox:Gt}}),wm=e=>({...e,...e.QueryPosition&&{QueryPosition:Gt},...e.Filter&&{Filter:vm(e.Filter)},...e.Key&&{Key:Gt}}),Pm=e=>({...e,...e.Position&&{Position:Gt},...e.MapView&&{MapView:Gt},...e.AccessPoints&&{AccessPoints:e.AccessPoints.map((e=>cm(e)))}}),Em=e=>({...e,...e.ResultItems&&{ResultItems:e.ResultItems.map((e=>Pm(e)))}}),Cm=e=>({...e,...e.BoundingBox&&{BoundingBox:Gt},...e.Circle&&{Circle:Gt}}),Tm=e=>({...e,...e.QueryText&&{QueryText:Gt},...e.QueryId&&{QueryId:Gt},...e.BiasPosition&&{BiasPosition:Gt},...e.Filter&&{Filter:Cm(e.Filter)},...e.Key&&{Key:Gt}}),Am=e=>({...e,...e.Position&&{Position:Gt},...e.MapView&&{MapView:Gt},...e.AccessPoints&&{AccessPoints:e.AccessPoints.map((e=>cm(e)))}}),Rm=e=>({...e,...e.ResultItems&&{ResultItems:e.ResultItems.map((e=>Am(e)))}}),xm=e=>({...e,...e.BoundingBox&&{BoundingBox:Gt},...e.Circle&&{Circle:Gt}}),Om=e=>({...e,...e.QueryText&&{QueryText:Gt},...e.BiasPosition&&{BiasPosition:Gt},...e.Filter&&{Filter:xm(e.Filter)},...e.Key&&{Key:Gt}}),Im=e=>({...e,...e.Position&&{Position:Gt},...e.MapView&&{MapView:Gt},...e.AccessPoints&&{AccessPoints:e.AccessPoints.map((e=>cm(e)))}}),Nm=e=>({...e,...e.Place&&{Place:Im(e.Place)}}),Dm=e=>({...e,...e.ResultItems&&{ResultItems:e.ResultItems.map((e=>Nm(e)))}}),Mm=async(e,t)=>{const n=oe(e,t);n.bp("/autocomplete");const i=Ln({[xg]:[,e[Pg]]});let r;return r=JSON.stringify(kn(e,{AdditionalFeatures:e=>Gn(e),BiasPosition:e=>ng(e),Filter:e=>Xm(e),IntendedUse:[],Language:[],MaxResults:[],PoliticalView:[],PostalCodeMode:[],QueryText:[]})),n.m("POST").h({"content-type":"application/json"}).q(i).b(r),n.build()},Lm=async(e,t)=>{const n=oe(e,t);n.bp("/geocode");const i=Ln({[xg]:[,e[Pg]]});let r;return r=JSON.stringify(kn(e,{AdditionalFeatures:e=>Gn(e),BiasPosition:e=>ng(e),Filter:e=>Gn(e),IntendedUse:[],Language:[],MaxResults:[],PoliticalView:[],QueryComponents:e=>Gn(e),QueryText:[]})),n.m("POST").h({"content-type":"application/json"}).q(i).b(r),n.build()},km=async(e,t)=>{const n=oe(e,t);n.bp("/place/{PlaceId}"),n.p("PlaceId",(()=>e.PlaceId),"{PlaceId}",!1);const i=Ln({[Ag]:[()=>void 0!==e.AdditionalFeatures,()=>e[vg]||[]],[Og]:[,e[Eg]],[Ig]:[,e[Tg]],[Rg]:[,e[wg]],[xg]:[,e[Pg]]});return n.m("GET").h({}).q(i).b(undefined),n.build()},_m=async(e,t)=>{const n=oe(e,t);n.bp("/reverse-geocode");const i=Ln({[xg]:[,e[Pg]]});let r;return r=JSON.stringify(kn(e,{AdditionalFeatures:e=>Gn(e),Filter:e=>Gn(e),IntendedUse:[],Language:[],MaxResults:[],PoliticalView:[],QueryPosition:e=>ng(e),QueryRadius:[]})),n.m("POST").h({"content-type":"application/json"}).q(i).b(r),n.build()},Fm=async(e,t)=>{const n=oe(e,t);n.bp("/search-nearby");const i=Ln({[xg]:[,e[Pg]]});let r;return r=JSON.stringify(kn(e,{AdditionalFeatures:e=>Gn(e),Filter:e=>ig(e),IntendedUse:[],Language:[],MaxResults:[],NextToken:[],PoliticalView:[],QueryPosition:e=>ng(e),QueryRadius:[]})),n.m("POST").h({"content-type":"application/json"}).q(i).b(r),n.build()},$m=async(e,t)=>{const n=oe(e,t);n.bp("/search-text");const i=Ln({[xg]:[,e[Pg]]});let r;return r=JSON.stringify(kn(e,{AdditionalFeatures:e=>Gn(e),BiasPosition:e=>ng(e),Filter:e=>rg(e),IntendedUse:[],Language:[],MaxResults:[],NextToken:[],PoliticalView:[],QueryId:[],QueryText:[]})),n.m("POST").h({"content-type":"application/json"}).q(i).b(r),n.build()},Um=async(e,t)=>{const n=oe(e,t);n.bp("/suggest");const i=Ln({[xg]:[,e[Pg]]});let r;return r=JSON.stringify(kn(e,{AdditionalFeatures:e=>Gn(e),BiasPosition:e=>ng(e),Filter:e=>og(e),IntendedUse:[],Language:[],MaxQueryRefinements:[],MaxResults:[],PoliticalView:[],QueryText:[]})),n.m("POST").h({"content-type":"application/json"}).q(i).b(r),n.build()},Bm=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Wm(e,t);const n=Ln({$metadata:Sg(e),[Cg]:[,e.headers[Ng]]}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{ResultItems:Gn});return Object.assign(n,r),n},Gm=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Wm(e,t);const n=Ln({$metadata:Sg(e),[Cg]:[,e.headers[Ng]]}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{ResultItems:e=>dg(e)});return Object.assign(n,r),n},jm=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Wm(e,t);const n=Ln({$metadata:Sg(e),[Cg]:[,e.headers[Ng]]}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{AccessPoints:e=>sg(e),AccessRestrictions:Gn,Address:Gn,AddressNumberCorrected:zt,BusinessChains:Gn,Categories:Gn,Contacts:Gn,FoodTypes:Gn,MapView:e=>ag(e),OpeningHours:Gn,Phonemes:Gn,PlaceId:tn,PlaceType:tn,PoliticalView:tn,Position:e=>pg(e),PostalCodeDetails:Gn,TimeZone:Gn,Title:tn});return Object.assign(n,r),n},zm=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Wm(e,t);const n=Ln({$metadata:Sg(e),[Cg]:[,e.headers[Ng]]}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{ResultItems:e=>hg(e)});return Object.assign(n,r),n},Hm=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Wm(e,t);const n=Ln({$metadata:Sg(e),[Cg]:[,e.headers[Ng]]}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{NextToken:tn,ResultItems:e=>fg(e)});return Object.assign(n,r),n},Vm=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Wm(e,t);const n=Ln({$metadata:Sg(e),[Cg]:[,e.headers[Ng]]}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{NextToken:tn,ResultItems:e=>mg(e)});return Object.assign(n,r),n},qm=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Wm(e,t);const n=Ln({$metadata:Sg(e),[Cg]:[,e.headers[Ng]]}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{QueryRefinements:Gn,ResultItems:e=>yg(e)});return Object.assign(n,r),n},Wm=async(e,t)=>{const n={...e,body:await Hn(e.body,t)},i=Vn(e,n.body);switch(i){case"AccessDeniedException":case"com.amazonaws.geoplaces#AccessDeniedException":throw await Ym(n);case"InternalServerException":case"com.amazonaws.geoplaces#InternalServerException":throw await Zm(n);case"ThrottlingException":case"com.amazonaws.geoplaces#ThrottlingException":throw await Qm(n);case"ValidationException":case"com.amazonaws.geoplaces#ValidationException":throw await Jm(n);default:const t=n.body;return Km({output:e,parsedBody:t,errorCode:i})}},Km=Rn(im),Ym=async(e,t)=>{const n=Ln({}),i=e.body,r=kn(i,{Message:[,tn,"message"]});Object.assign(n,r);const o=new rm({$metadata:Sg(e),...n});return An(o,e.body)},Zm=async(e,t)=>{const n=Ln({}),i=e.body,r=kn(i,{Message:[,tn,"message"]});Object.assign(n,r);const o=new om({$metadata:Sg(e),...n});return An(o,e.body)},Qm=async(e,t)=>{const n=Ln({}),i=e.body,r=kn(i,{Message:[,tn,"message"]});Object.assign(n,r);const o=new sm({$metadata:Sg(e),...n});return An(o,e.body)},Jm=async(e,t)=>{const n=Ln({}),i=e.body,r=kn(i,{FieldList:[,e=>bg(e),"fieldList"],Message:[,tn,"message"],Reason:[,tn,"reason"]});Object.assign(n,r);const o=new am({$metadata:Sg(e),...n});return An(o,e.body)},Xm=(e,t)=>kn(e,{BoundingBox:e=>eg(e),Circle:e=>tg(e),IncludeCountries:Gn,IncludePlaceTypes:Gn}),eg=(e,t)=>e.filter((e=>null!=e)).map((e=>Un(e))),tg=(e,t)=>kn(e,{Center:e=>ng(e),Radius:[]}),ng=(e,t)=>e.filter((e=>null!=e)).map((e=>Un(e))),ig=(e,t)=>kn(e,{BoundingBox:e=>eg(e),ExcludeBusinessChains:Gn,ExcludeCategories:Gn,ExcludeFoodTypes:Gn,IncludeBusinessChains:Gn,IncludeCategories:Gn,IncludeCountries:Gn,IncludeFoodTypes:Gn}),rg=(e,t)=>kn(e,{BoundingBox:e=>eg(e),Circle:e=>tg(e),IncludeCountries:Gn}),og=(e,t)=>kn(e,{BoundingBox:e=>eg(e),Circle:e=>tg(e),IncludeCountries:Gn}),sg=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{Position:e=>pg(e)}))(e)));return n},ag=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>on(e)));return n},cg=(e,t)=>kn(e,{Address:e=>(e=>kn(e,{AddressNumber:on,Block:on,Building:on,Country:on,District:on,Intersection:e=>lg(e),Locality:on,PostalCode:on,Region:on,SubBlock:on,SubDistrict:on,SubRegion:on}))(e),Title:on}),dg=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{AccessPoints:e=>sg(e),Address:Gn,AddressNumberCorrected:zt,Categories:Gn,Distance:Wt,FoodTypes:Gn,MapView:e=>ag(e),MatchScores:e=>ug(e),PlaceId:tn,PlaceType:tn,PoliticalView:tn,Position:e=>pg(e),PostalCodeDetails:Gn,TimeZone:Gn,Title:tn}))(e)));return n},ug=(e,t)=>kn(e,{Components:e=>cg(e),Overall:on}),lg=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>on(e)));return n},pg=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>on(e)));return n},hg=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{AccessPoints:e=>sg(e),Address:Gn,AddressNumberCorrected:zt,Categories:Gn,Distance:Wt,FoodTypes:Gn,MapView:e=>ag(e),PlaceId:tn,PlaceType:tn,PoliticalView:tn,Position:e=>pg(e),PostalCodeDetails:Gn,TimeZone:Gn,Title:tn}))(e)));return n},fg=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{AccessPoints:e=>sg(e),AccessRestrictions:Gn,Address:Gn,AddressNumberCorrected:zt,BusinessChains:Gn,Categories:Gn,Contacts:Gn,Distance:Wt,FoodTypes:Gn,MapView:e=>ag(e),OpeningHours:Gn,Phonemes:Gn,PlaceId:tn,PlaceType:tn,PoliticalView:tn,Position:e=>pg(e),TimeZone:Gn,Title:tn}))(e)));return n},mg=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{AccessPoints:e=>sg(e),AccessRestrictions:Gn,Address:Gn,AddressNumberCorrected:zt,BusinessChains:Gn,Categories:Gn,Contacts:Gn,Distance:Wt,FoodTypes:Gn,MapView:e=>ag(e),OpeningHours:Gn,Phonemes:Gn,PlaceId:tn,PlaceType:tn,PoliticalView:tn,Position:e=>pg(e),TimeZone:Gn,Title:tn}))(e)));return n},gg=(e,t)=>kn(e,{Highlights:Gn,Place:e=>(e=>kn(e,{AccessPoints:e=>sg(e),AccessRestrictions:Gn,Address:Gn,BusinessChains:Gn,Categories:Gn,Distance:Wt,FoodTypes:Gn,MapView:e=>ag(e),Phonemes:Gn,PlaceId:tn,PlaceType:tn,PoliticalView:tn,Position:e=>pg(e),TimeZone:Gn}))(e),Query:Gn,SuggestResultItemType:tn,Title:tn}),yg=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>gg(e)));return n},bg=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{Message:[,tn,"message"],Name:[,tn,"name"]}))(e)));return n},Sg=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),vg="AdditionalFeatures",wg="IntendedUse",Pg="Key",Eg="Language",Cg="PricingBucket",Tg="PoliticalView",Ag="additional-features",Rg="intended-use",xg="key",Og="language",Ig="political-view",Ng="x-amz-geo-pricing-bucket";class Dg extends(Ut.classBuilder().ep(Af).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("PlacesService","Autocomplete",{}).n("GeoPlacesClient","AutocompleteCommand").f(um,void 0).ser(Mm).de(Bm).build()){}class Mg extends(Ut.classBuilder().ep(Af).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("PlacesService","Geocode",{}).n("GeoPlacesClient","GeocodeCommand").f(pm,fm).ser(Lm).de(Gm).build()){}class Lg extends(Ut.classBuilder().ep(Af).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("PlacesService","GetPlace",{}).n("GeoPlacesClient","GetPlaceCommand").f(mm,gm).ser(km).de(jm).build()){}class kg extends(Ut.classBuilder().ep(Af).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("PlacesService","ReverseGeocode",{}).n("GeoPlacesClient","ReverseGeocodeCommand").f(ym,Sm).ser(_m).de(zm).build()){}class _g extends(Ut.classBuilder().ep(Af).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("PlacesService","SearchNearby",{}).n("GeoPlacesClient","SearchNearbyCommand").f(wm,Em).ser(Fm).de(Hm).build()){}class Fg extends(Ut.classBuilder().ep(Af).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("PlacesService","SearchText",{}).n("GeoPlacesClient","SearchTextCommand").f(Tm,Rm).ser($m).de(Vm).build()){}class $g extends(Ut.classBuilder().ep(Af).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("PlacesService","Suggest",{}).n("GeoPlacesClient","SuggestCommand").f(Om,Dm).ser(Um).de(qm).build()){}const Ug={AutocompleteCommand:Dg,GeocodeCommand:Mg,GetPlaceCommand:Lg,ReverseGeocodeCommand:kg,SearchNearbyCommand:_g,SearchTextCommand:Fg,SuggestCommand:$g};class Bg extends nm{}jt(Ug,Bg);var Gg=Object.freeze({__proto__:null,$Command:Ut,AccessDeniedException:rm,AccessPointFilterSensitiveLog:cm,AutocompleteAdditionalFeature:{CORE:"Core"},AutocompleteCommand:Dg,AutocompleteFilterFilterSensitiveLog:dm,AutocompleteFilterPlaceType:{LOCALITY:"Locality",POSTAL_CODE:"PostalCode"},AutocompleteIntendedUse:{SINGLE_USE:"SingleUse"},AutocompleteRequestFilterSensitiveLog:um,FilterCircleFilterSensitiveLog:e=>({...e,...e.Center&&{Center:Gt}}),GeoPlaces:Bg,GeoPlacesClient:nm,GeoPlacesServiceException:im,GeocodeAdditionalFeature:{ACCESS:"Access",TIME_ZONE:"TimeZone"},GeocodeCommand:Mg,GeocodeFilterPlaceType:{INTERPOLATED_ADDRESS:"InterpolatedAddress",INTERSECTION:"Intersection",LOCALITY:"Locality",POINT_ADDRESS:"PointAddress",POSTAL_CODE:"PostalCode",STREET:"Street"},GeocodeIntendedUse:{SINGLE_USE:"SingleUse",STORAGE:"Storage"},GeocodeQueryComponentsFilterSensitiveLog:lm,GeocodeRequestFilterSensitiveLog:pm,GeocodeResponseFilterSensitiveLog:fm,GeocodeResultItemFilterSensitiveLog:hm,GetPlaceAdditionalFeature:{ACCESS:"Access",CONTACT:"Contact",PHONEMES:"Phonemes",TIME_ZONE:"TimeZone"},GetPlaceCommand:Lg,GetPlaceIntendedUse:{SINGLE_USE:"SingleUse",STORAGE:"Storage"},GetPlaceRequestFilterSensitiveLog:mm,GetPlaceResponseFilterSensitiveLog:gm,InternalServerException:om,PlaceType:{BLOCK:"Block",COUNTRY:"Country",DISTRICT:"District",INTERPOLATED_ADDRESS:"InterpolatedAddress",INTERSECTION:"Intersection",LOCALITY:"Locality",POINT_ADDRESS:"PointAddress",POINT_OF_INTEREST:"PointOfInterest",POSTAL_CODE:"PostalCode",REGION:"Region",STREET:"Street",SUB_BLOCK:"SubBlock",SUB_DISTRICT:"SubDistrict",SUB_REGION:"SubRegion"},PostalAuthority:{USPS:"Usps"},PostalCodeMode:{ENUMERATE_SPANNED_LOCALITIES:"EnumerateSpannedLocalities",MERGE_ALL_SPANNED_LOCALITIES:"MergeAllSpannedLocalities"},PostalCodeType:{USPS_ZIP:"UspsZip",USPS_ZIP_PLUS_4:"UspsZipPlus4"},QueryType:{BUSINESS_CHAIN:"BusinessChain",CATEGORY:"Category"},RecordTypeCode:{FIRM:"Firm",GENERAL:"General",HIGH_RISE:"HighRise",POST_OFFICE_BOX:"PostOfficeBox",RURAL:"Rural",STREET:"Street"},ReverseGeocodeAdditionalFeature:{ACCESS:"Access",TIME_ZONE:"TimeZone"},ReverseGeocodeCommand:kg,ReverseGeocodeFilterPlaceType:{INTERPOLATED_ADDRESS:"InterpolatedAddress",INTERSECTION:"Intersection",LOCALITY:"Locality",POINT_ADDRESS:"PointAddress",STREET:"Street"},ReverseGeocodeIntendedUse:{SINGLE_USE:"SingleUse",STORAGE:"Storage"},ReverseGeocodeRequestFilterSensitiveLog:ym,ReverseGeocodeResponseFilterSensitiveLog:Sm,ReverseGeocodeResultItemFilterSensitiveLog:bm,SearchNearbyAdditionalFeature:{ACCESS:"Access",CONTACT:"Contact",PHONEMES:"Phonemes",TIME_ZONE:"TimeZone"},SearchNearbyCommand:_g,SearchNearbyFilterFilterSensitiveLog:vm,SearchNearbyIntendedUse:{SINGLE_USE:"SingleUse",STORAGE:"Storage"},SearchNearbyRequestFilterSensitiveLog:wm,SearchNearbyResponseFilterSensitiveLog:Em,SearchNearbyResultItemFilterSensitiveLog:Pm,SearchTextAdditionalFeature:{ACCESS:"Access",CONTACT:"Contact",PHONEMES:"Phonemes",TIME_ZONE:"TimeZone"},SearchTextCommand:Fg,SearchTextFilterFilterSensitiveLog:Cm,SearchTextIntendedUse:{SINGLE_USE:"SingleUse",STORAGE:"Storage"},SearchTextRequestFilterSensitiveLog:Tm,SearchTextResponseFilterSensitiveLog:Rm,SearchTextResultItemFilterSensitiveLog:Am,SuggestAdditionalFeature:{ACCESS:"Access",CORE:"Core",PHONEMES:"Phonemes",TIME_ZONE:"TimeZone"},SuggestCommand:$g,SuggestFilterFilterSensitiveLog:xm,SuggestIntendedUse:{SINGLE_USE:"SingleUse"},SuggestPlaceResultFilterSensitiveLog:Im,SuggestRequestFilterSensitiveLog:Om,SuggestResponseFilterSensitiveLog:Dm,SuggestResultItemFilterSensitiveLog:Nm,SuggestResultItemType:{PLACE:"Place",QUERY:"Query"},ThrottlingException:sm,TypePlacement:{AFTER_BASE_NAME:"AfterBaseName",BEFORE_BASE_NAME:"BeforeBaseName"},ValidationException:am,ValidationExceptionReason:{CANNOT_PARSE:"CannotParse",FIELD_VALIDATION_FAILED:"FieldValidationFailed",MISSING:"Missing",OTHER:"Other",UNKNOWN_FIELD:"UnknownField",UNKNOWN_OPERATION:"UnknownOperation"},ZipClassificationCode:{MILITARY:"Military",POST_OFFICE_BOXES:"PostOfficeBoxes",UNIQUE:"Unique"},__Client:$t});const jg=async(e,t,n)=>({operation:w(t).operation,region:await P(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const zg=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"geo-routes",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Hg={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Vg="3.782.0";const qg="required",Wg="fn",Kg="argv",Yg="ref",Zg=!0,Qg="isSet",Jg="booleanEquals",Xg="error",ey="endpoint",ty="tree",ny="PartitionResult",iy={[qg]:!0,default:!1,type:"Boolean"},ry={[qg]:!1,type:"String"},oy={[Yg]:"Endpoint"},sy={[Wg]:Jg,[Kg]:[{[Yg]:"UseFIPS"},!0]},ay={[Wg]:Jg,[Kg]:[{[Yg]:"UseDualStack"},!0]},cy={},dy={[Wg]:"stringEquals",[Kg]:[{[Wg]:"getAttr",[Kg]:[{[Yg]:ny},"name"]},"aws"]},uy={[Wg]:Jg,[Kg]:[{[Yg]:"UseFIPS"},!1]},ly={[Wg]:Jg,[Kg]:[{[Yg]:"UseDualStack"},!1]},py={[Wg]:"stringEquals",[Kg]:[{[Wg]:"getAttr",[Kg]:[{[Yg]:ny},"name"]},"aws-us-gov"]},hy={[Wg]:"getAttr",[Kg]:[{[Yg]:ny},"supportsFIPS"]},fy={[Wg]:Jg,[Kg]:[!0,{[Wg]:"getAttr",[Kg]:[{[Yg]:ny},"supportsDualStack"]}]},my=[{[Yg]:"Region"}],gy={parameters:{UseDualStack:iy,UseFIPS:iy,Endpoint:ry,Region:ry},rules:[{conditions:[{[Wg]:Qg,[Kg]:[oy]}],rules:[{conditions:[sy],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Xg},{rules:[{conditions:[ay],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Xg},{endpoint:{url:oy,properties:cy,headers:cy},type:ey}],type:ty}],type:ty},{rules:[{conditions:[{[Wg]:Qg,[Kg]:my}],rules:[{conditions:[{[Wg]:"aws.partition",[Kg]:my,assign:ny}],rules:[{conditions:[dy,uy,ly],endpoint:{url:"https://routes.geo.{Region}.{PartitionResult#dnsSuffix}/v2",properties:cy,headers:cy},type:ey},{conditions:[dy,sy,ay],endpoint:{url:"https://routes.geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",properties:cy,headers:cy},type:ey},{conditions:[dy,sy,ly],endpoint:{url:"https://routes.geo-fips.{Region}.{PartitionResult#dnsSuffix}/v2",properties:cy,headers:cy},type:ey},{conditions:[dy,uy,ay],endpoint:{url:"https://routes.geo.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",properties:cy,headers:cy},type:ey},{conditions:[py,uy,ly],endpoint:{url:"https://routes.geo.{Region}.us-gov.{PartitionResult#dnsSuffix}/v2",properties:cy,headers:cy},type:ey},{conditions:[py,sy,ay],endpoint:{url:"https://routes.geo-fips.{Region}.us-gov.{PartitionResult#dualStackDnsSuffix}/v2",properties:cy,headers:cy},type:ey},{conditions:[py,sy,ly],endpoint:{url:"https://routes.geo-fips.{Region}.us-gov.{PartitionResult#dnsSuffix}/v2",properties:cy,headers:cy},type:ey},{conditions:[py,uy,ay],endpoint:{url:"https://routes.geo.{Region}.us-gov.{PartitionResult#dualStackDnsSuffix}/v2",properties:cy,headers:cy},type:ey},{conditions:[sy,ay],rules:[{conditions:[{[Wg]:Jg,[Kg]:[Zg,hy]},fy],rules:[{endpoint:{url:"https://geo-routes-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:cy,headers:cy},type:ey}],type:ty},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Xg}],type:ty},{conditions:[sy,ly],rules:[{conditions:[{[Wg]:Jg,[Kg]:[hy,Zg]}],rules:[{endpoint:{url:"https://geo-routes-fips.{Region}.{PartitionResult#dnsSuffix}",properties:cy,headers:cy},type:ey}],type:ty},{error:"FIPS is enabled but this partition does not support FIPS",type:Xg}],type:ty},{conditions:[uy,ay],rules:[{conditions:[fy],rules:[{endpoint:{url:"https://geo-routes.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:cy,headers:cy},type:ey}],type:ty},{error:"DualStack is enabled but this partition does not support DualStack",type:Xg}],type:ty},{endpoint:{url:"https://geo-routes.{Region}.{PartitionResult#dnsSuffix}",properties:cy,headers:cy},type:ey}],type:ty}],type:ty},{error:"Invalid Configuration: Missing Region",type:Xg}],type:ty}]},yy=new he({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),by=(e,t={})=>yy.get(e,(()=>$e(gy,{endpointParams:e,logger:t.logger})));be.aws=Ge;const Sy=e=>{const t=$o(e),n=()=>t().then(On),i=(e=>({apiVersion:"2020-11-19",base64Decoder:e?.base64Decoder??U,base64Encoder:e?.base64Encoder??z,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??by,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??zg,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Ke}],logger:e?.logger??new Mn,serviceId:e?.serviceId??"Geo Routes",urlParser:e?.urlParser??er,utf8Decoder:e?.utf8Decoder??B,utf8Encoder:e?.utf8Encoder??j}))(e);return{...i,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??lo,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ao({serviceId:i.serviceId,clientVersion:Vg}),maxAttempts:e?.maxAttempts??3,region:e?.region??co("Region is missing"),requestHandler:Q.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||cr),sha256:e?.sha256??io,streamCollector:e?.streamCollector??J,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Ui)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Bi))}};class vy extends $t{config;constructor(...[e]){const i=Sy(e||{});super(i),this.initConfig=i;var r;const o=pe((r=i,Object.assign(r,{useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"geo-routes"}))),s=Tr(o),a=zi(s),c=((e,i)=>{const r=Object.assign(Go(e),In(e),t(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,i=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){i=e},credentials:()=>i}})(e));return i.forEach((e=>e.configure(r))),Object.assign(e,jo(r),Nn(r),n(r),{httpAuthSchemes:(o=r).httpAuthSchemes(),httpAuthSchemeProvider:o.httpAuthSchemeProvider(),credentials:o.credentials()});var o})((e=>{const t=Dt(e);return Object.assign(t,{})})(sr(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use(Fi(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(qi(this.config)),this.middlewareStack.use(m(this.config)),this.middlewareStack.use(y(this.config)),this.middlewareStack.use(v(this.config)),this.middlewareStack.use(T(this.config,{httpAuthSchemeParametersProvider:jg,identityProviderConfigProvider:async e=>new ae({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(D(this.config))}destroy(){super.destroy()}}class wy extends Tn{constructor(e){super(e),Object.setPrototypeOf(this,wy.prototype)}}class Py extends wy{name="AccessDeniedException";$fault="client";Message;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,Py.prototype),this.Message=e.Message}}class Ey extends wy{name="InternalServerException";$fault="server";$retryable={};Message;constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,Ey.prototype),this.Message=e.Message}}class Cy extends wy{name="ThrottlingException";$fault="client";$retryable={};Message;constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),Object.setPrototypeOf(this,Cy.prototype),this.Message=e.Message}}class Ty extends wy{name="ValidationException";$fault="client";Message;Reason;FieldList;constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,Ty.prototype),this.Message=e.Message,this.Reason=e.Reason,this.FieldList=e.FieldList}}const Ay=e=>({...e,...e.BoundingBox&&{BoundingBox:Gt},...e.Corridor&&{Corridor:Gt},...e.Polygon&&{Polygon:e.Polygon.map((e=>Gt))},...e.PolylineCorridor&&{PolylineCorridor:Gt},...e.PolylinePolygon&&{PolylinePolygon:Gt}}),Ry=e=>({...e,...e.Except&&{Except:e.Except.map((e=>Ay(e)))},...e.Geometry&&{Geometry:Ay(e.Geometry)}}),xy=e=>({...e,...e.Areas&&{Areas:e.Areas.map((e=>Ry(e)))}}),Oy=e=>({...e,...e.NameHint&&{NameHint:Gt}}),Iy=e=>({...e,...e.Position&&{Position:Gt}}),Ny=e=>({...e,...e.Matching&&{Matching:Oy(e.Matching)},...e.SideOfStreet&&{SideOfStreet:Iy(e.SideOfStreet)}}),Dy=e=>({...e,...e.Matching&&{Matching:Oy(e.Matching)},...e.SideOfStreet&&{SideOfStreet:Iy(e.SideOfStreet)}}),My=e=>({...e,...e.Avoid&&{Avoid:xy(e.Avoid)},...e.Destination&&{Destination:Gt},...e.DestinationOptions&&{DestinationOptions:Ny(e.DestinationOptions)},...e.Key&&{Key:Gt},...e.Origin&&{Origin:Gt},...e.OriginOptions&&{OriginOptions:Dy(e.OriginOptions)}}),Ly=e=>({...e,...e.LineString&&{LineString:Gt},...e.Polyline&&{Polyline:Gt}}),ky=e=>({...e,...e.Geometry&&{Geometry:Ly(e.Geometry)}}),_y=e=>({...e,...e.Polygon&&{Polygon:e.Polygon.map((e=>Gt))},...e.PolylinePolygon&&{PolylinePolygon:Gt}}),Fy=e=>({...e,...e.SnappedDestination&&{SnappedDestination:Gt},...e.SnappedOrigin&&{SnappedOrigin:Gt}}),$y=e=>({...e,...e.BoundingBox&&{BoundingBox:Gt},...e.Polygon&&{Polygon:e.Polygon.map((e=>Gt))},...e.PolylinePolygon&&{PolylinePolygon:Gt}}),Uy=e=>({...e,...e.Geometry&&{Geometry:$y(e.Geometry)}}),By=e=>({...e,...e.Areas&&{Areas:e.Areas.map((e=>Uy(e)))}}),Gy=e=>({...e,...e.NameHint&&{NameHint:Gt}}),jy=e=>({...e,...e.Position&&{Position:Gt}}),zy=e=>({...e,...e.Matching&&{Matching:Gy(e.Matching)},...e.SideOfStreet&&{SideOfStreet:jy(e.SideOfStreet)}}),Hy=e=>({...e,...e.Options&&{Options:zy(e.Options)},...e.Position&&{Position:Gt}}),Vy=e=>({...e,...e.Matching&&{Matching:Gy(e.Matching)},...e.SideOfStreet&&{SideOfStreet:jy(e.SideOfStreet)}}),qy=e=>({...e,...e.Options&&{Options:Vy(e.Options)},...e.Position&&{Position:Gt}}),Wy=e=>({...e,...e.Circle&&{Circle:Gt},...e.BoundingBox&&{BoundingBox:Gt},...e.Polygon&&{Polygon:e.Polygon.map((e=>Gt))}}),Ky=e=>({...e,...e.Geometry&&{Geometry:Wy(e.Geometry)}}),Yy=e=>({...e,...e.Avoid&&{Avoid:By(e.Avoid)},...e.Destinations&&{Destinations:e.Destinations.map((e=>Hy(e)))},...e.Key&&{Key:Gt},...e.Origins&&{Origins:e.Origins.map((e=>qy(e)))},...e.RoutingBoundary&&{RoutingBoundary:Ky(e.RoutingBoundary)}}),Zy=e=>({...e,...e.RoutingBoundary&&{RoutingBoundary:Ky(e.RoutingBoundary)}}),Qy=e=>({...e,...e.Corridor&&{Corridor:Gt},...e.BoundingBox&&{BoundingBox:Gt},...e.Polygon&&{Polygon:e.Polygon.map((e=>Gt))},...e.PolylineCorridor&&{PolylineCorridor:Gt},...e.PolylinePolygon&&{PolylinePolygon:Gt}}),Jy=e=>({...e,...e.Except&&{Except:e.Except.map((e=>Qy(e)))},...e.Geometry&&{Geometry:Qy(e.Geometry)}}),Xy=e=>({...e,...e.Areas&&{Areas:e.Areas.map((e=>Jy(e)))}}),eb=e=>({...e,...e.NameHint&&{NameHint:Gt}}),tb=e=>({...e,...e.Position&&{Position:Gt}}),nb=e=>({...e,...e.Matching&&{Matching:eb(e.Matching)},...e.SideOfStreet&&{SideOfStreet:tb(e.SideOfStreet)}}),ib=e=>({...e,...e.Matching&&{Matching:eb(e.Matching)},...e.SideOfStreet&&{SideOfStreet:tb(e.SideOfStreet)}}),rb=e=>({...e,...e.Matching&&{Matching:eb(e.Matching)},...e.Position&&{Position:Gt},...e.SideOfStreet&&{SideOfStreet:tb(e.SideOfStreet)}}),ob=e=>({...e,...e.Avoid&&{Avoid:Xy(e.Avoid)},...e.Destination&&{Destination:Gt},...e.DestinationOptions&&{DestinationOptions:nb(e.DestinationOptions)},...e.Key&&{Key:Gt},...e.Origin&&{Origin:Gt},...e.OriginOptions&&{OriginOptions:ib(e.OriginOptions)},...e.Waypoints&&{Waypoints:e.Waypoints.map((e=>rb(e)))}}),sb=e=>({...e,...e.OriginalPosition&&{OriginalPosition:Gt},...e.Position&&{Position:Gt}}),ab=e=>({...e,...e.Place&&{Place:sb(e.Place)}}),cb=e=>({...e,...e.Place&&{Place:sb(e.Place)}}),db=e=>({...e,...e.OriginalPosition&&{OriginalPosition:Gt},...e.Position&&{Position:Gt}}),ub=e=>({...e,...e.Place&&{Place:db(e.Place)}}),lb=e=>({...e,...e.Arrival&&{Arrival:ab(e.Arrival)},...e.Departure&&{Departure:cb(e.Departure)},...e.PassThroughWaypoints&&{PassThroughWaypoints:e.PassThroughWaypoints.map((e=>ub(e)))}}),pb=e=>({...e,...e.LineString&&{LineString:Gt},...e.Polyline&&{Polyline:Gt}}),hb=e=>({...e,...e.OriginalPosition&&{OriginalPosition:Gt},...e.Position&&{Position:Gt}}),fb=e=>({...e,...e.Place&&{Place:hb(e.Place)}}),mb=e=>({...e,...e.Place&&{Place:hb(e.Place)}}),gb=e=>({...e,...e.Arrival&&{Arrival:fb(e.Arrival)},...e.Departure&&{Departure:mb(e.Departure)},...e.PassThroughWaypoints&&{PassThroughWaypoints:e.PassThroughWaypoints.map((e=>ub(e)))}}),yb=e=>({...e,...e.OriginalPosition&&{OriginalPosition:Gt},...e.Position&&{Position:Gt}}),bb=e=>({...e,...e.Place&&{Place:yb(e.Place)}}),Sb=e=>({...e,...e.Place&&{Place:yb(e.Place)}}),vb=e=>({...e,...e.Position&&{Position:Gt}}),wb=e=>({...e,...e.Arrival&&{Arrival:bb(e.Arrival)},...e.Departure&&{Departure:Sb(e.Departure)},...e.PassThroughWaypoints&&{PassThroughWaypoints:e.PassThroughWaypoints.map((e=>ub(e)))}}),Pb=e=>({...e,...e.FerryLegDetails&&{FerryLegDetails:lb(e.FerryLegDetails)},...e.Geometry&&{Geometry:pb(e.Geometry)},...e.PedestrianLegDetails&&{PedestrianLegDetails:gb(e.PedestrianLegDetails)},...e.VehicleLegDetails&&{VehicleLegDetails:wb(e.VehicleLegDetails)}}),Eb=e=>({...e}),Cb=e=>({...e,...e.BoundingBox&&{BoundingBox:Gt}}),Tb=e=>({...e,...e.Geometry&&{Geometry:Cb(e.Geometry)}}),Ab=e=>({...e,...e.Areas&&{Areas:e.Areas.map((e=>Tb(e)))}}),Rb=e=>({...e,...e.Position&&{Position:Gt}}),xb=e=>({...e,...e.SideOfStreet&&{SideOfStreet:Rb(e.SideOfStreet)}}),Ob=e=>({...e,...e.Position&&{Position:Gt},...e.SideOfStreet&&{SideOfStreet:Rb(e.SideOfStreet)}}),Ib=e=>({...e,...e.Avoid&&{Avoid:Ab(e.Avoid)},...e.Destination&&{Destination:Gt},...e.DestinationOptions&&{DestinationOptions:xb(e.DestinationOptions)},...e.Key&&{Key:Gt},...e.Origin&&{Origin:Gt},...e.Waypoints&&{Waypoints:e.Waypoints.map((e=>Ob(e)))}}),Nb=e=>({...e,...e.Position&&{Position:Gt}}),Db=e=>({...e,...e.Position&&{Position:Gt}}),Mb=e=>({...e,...e.ImpedingWaypoints&&{ImpedingWaypoints:e.ImpedingWaypoints.map((e=>Nb(e)))},...e.OptimizedWaypoints&&{OptimizedWaypoints:e.OptimizedWaypoints.map((e=>Db(e)))}}),Lb=e=>({...e,...e.Position&&{Position:Gt}}),kb=e=>({...e,...e.Key&&{Key:Gt},...e.TracePoints&&{TracePoints:e.TracePoints.map((e=>Lb(e)))}}),_b=e=>({...e,...e.LineString&&{LineString:Gt},...e.Polyline&&{Polyline:Gt}}),Fb=e=>({...e,...e.OriginalPosition&&{OriginalPosition:Gt},...e.SnappedPosition&&{SnappedPosition:Gt}}),$b=e=>({...e,...e.SnappedGeometry&&{SnappedGeometry:_b(e.SnappedGeometry)},...e.SnappedTracePoints&&{SnappedTracePoints:e.SnappedTracePoints.map((e=>Fb(e)))}}),Ub=async(e,t)=>{const n=oe(e,t);n.bp("/isolines");const i=Ln({[Uv]:[,e[Fv]]});let r;return r=JSON.stringify(kn(e,{Allow:e=>Gn(e),ArrivalTime:[],Avoid:e=>sS(e),DepartNow:[],DepartureTime:[],Destination:e=>fS(e),DestinationOptions:e=>aS(e),IsolineGeometryFormat:[],IsolineGranularity:e=>Gn(e),OptimizeIsolineFor:[],OptimizeRoutingFor:[],Origin:e=>fS(e),OriginOptions:e=>cS(e),Thresholds:e=>Gn(e),Traffic:e=>Gn(e),TravelMode:[],TravelModeOptions:e=>uS(e)})),n.m("POST").h({"content-type":"application/json"}).q(i).b(r),n.build()},Bb=async(e,t)=>{const n=oe(e,t);n.bp("/route-matrix");const i=Ln({[Uv]:[,e[Fv]]});let r;return r=JSON.stringify(kn(e,{Allow:e=>Gn(e),Avoid:e=>ES(e),DepartNow:[],DepartureTime:[],Destinations:e=>AS(e),Exclude:e=>Gn(e),OptimizeRoutingFor:[],Origins:e=>xS(e),RoutingBoundary:e=>CS(e),Traffic:e=>Gn(e),TravelMode:[],TravelModeOptions:e=>NS(e)})),n.m("POST").h({"content-type":"application/json"}).q(i).b(r),n.build()},Gb=async(e,t)=>{const n=oe(e,t);n.bp("/routes");const i=Ln({[Uv]:[,e[Fv]]});let r;return r=JSON.stringify(kn(e,{Allow:e=>Gn(e),ArrivalTime:[],Avoid:e=>SS(e),DepartNow:[],DepartureTime:[],Destination:e=>fS(e),DestinationOptions:e=>vS(e),Driver:e=>Gn(e),Exclude:e=>Gn(e),InstructionsMeasurementSystem:[],Languages:e=>Gn(e),LegAdditionalFeatures:e=>Gn(e),LegGeometryFormat:[],MaxAlternatives:[],OptimizeRoutingFor:[],Origin:e=>fS(e),OriginOptions:e=>MS(e),SpanAdditionalFeatures:e=>Gn(e),Tolls:e=>Gn(e),Traffic:e=>Gn(e),TravelMode:[],TravelModeOptions:e=>kS(e),TravelStepType:[],Waypoints:e=>FS(e)})),n.m("POST").h({"content-type":"application/json"}).q(i).b(r),n.build()},jb=async(e,t)=>{const n=oe(e,t);n.bp("/optimize-waypoints");const i=Ln({[Uv]:[,e[Fv]]});let r;return r=JSON.stringify(kn(e,{Avoid:e=>BS(e),Clustering:e=>Gn(e),DepartureTime:[],Destination:e=>fS(e),DestinationOptions:e=>GS(e),Driver:e=>Gn(e),Exclude:e=>Gn(e),OptimizeSequencingFor:[],Origin:e=>fS(e),OriginOptions:e=>Gn(e),Traffic:e=>Gn(e),TravelMode:[],TravelModeOptions:e=>zS(e),Waypoints:e=>HS(e)})),n.m("POST").h({"content-type":"application/json"}).q(i).b(r),n.build()},zb=async(e,t)=>{const n=oe(e,t);n.bp("/snap-to-roads");const i=Ln({[Uv]:[,e[Fv]]});let r;return r=JSON.stringify(kn(e,{SnapRadius:[],SnappedGeometryFormat:[],TracePoints:e=>mS(e),TravelMode:[],TravelModeOptions:e=>Gn(e)})),n.m("POST").h({"content-type":"application/json"}).q(i).b(r),n.build()},Hb=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Yb(e,t);const n=Ln({$metadata:_v(e),[$v]:[,e.headers[Bv]]}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{ArrivalTime:tn,DepartureTime:tn,IsolineGeometryFormat:tn,Isolines:e=>WS(e),SnappedDestination:e=>QS(e),SnappedOrigin:e=>QS(e)});return Object.assign(n,r),n},Vb=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Yb(e,t);const n=Ln({$metadata:_v(e),[$v]:[,e.headers[Bv]]}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{ErrorCount:Kt,RouteMatrix:Gn,RoutingBoundary:e=>av(e)});return Object.assign(n,r),n},qb=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Yb(e,t);const n=Ln({$metadata:_v(e),[$v]:[,e.headers[Bv]]}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{LegGeometryFormat:tn,Notices:Gn,Routes:e=>sv(e)});return Object.assign(n,r),n},Wb=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Yb(e,t);const n=Ln({$metadata:_v(e),[$v]:[,e.headers[Bv]]}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{Connections:Gn,Distance:Wt,Duration:Wt,ImpedingWaypoints:e=>Lv(e),OptimizedWaypoints:e=>kv(e),TimeBreakdown:Gn});return Object.assign(n,r),n},Kb=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Yb(e,t);const n=Ln({$metadata:_v(e),[$v]:[,e.headers[Bv]]}),i=Xt(en(await zn(e.body,t)),"body"),r=kn(i,{Notices:Gn,SnappedGeometry:e=>XS(e),SnappedGeometryFormat:tn,SnappedTracePoints:e=>ev(e)});return Object.assign(n,r),n},Yb=async(e,t)=>{const n={...e,body:await Hn(e.body,t)},i=Vn(e,n.body);switch(i){case"AccessDeniedException":case"com.amazonaws.georoutes#AccessDeniedException":throw await Qb(n);case"InternalServerException":case"com.amazonaws.georoutes#InternalServerException":throw await Jb(n);case"ThrottlingException":case"com.amazonaws.georoutes#ThrottlingException":throw await Xb(n);case"ValidationException":case"com.amazonaws.georoutes#ValidationException":throw await eS(n);default:const t=n.body;return Zb({output:e,parsedBody:t,errorCode:i})}},Zb=Rn(wy),Qb=async(e,t)=>{const n=Ln({}),i=e.body,r=kn(i,{Message:[,tn,"message"]});Object.assign(n,r);const o=new Py({$metadata:_v(e),...n});return An(o,e.body)},Jb=async(e,t)=>{const n=Ln({}),i=e.body,r=kn(i,{Message:[,tn,"message"]});Object.assign(n,r);const o=new Ey({$metadata:_v(e),...n});return An(o,e.body)},Xb=async(e,t)=>{const n=Ln({}),i=e.body,r=kn(i,{Message:[,tn,"message"]});Object.assign(n,r);const o=new Cy({$metadata:_v(e),...n});return An(o,e.body)},eS=async(e,t)=>{const n=Ln({}),i=e.body,r=kn(i,{FieldList:[,e=>Mv(e),"fieldList"],Message:[,tn,"message"],Reason:[,tn,"reason"]});Object.assign(n,r);const o=new Ty({$metadata:_v(e),...n});return An(o,e.body)},tS=(e,t)=>e.filter((e=>null!=e)).map((e=>Un(e))),nS=(e,t)=>kn(e,{LineString:e=>hS(e),Radius:[]}),iS=(e,t)=>kn(e,{BoundingBox:e=>tS(e),Corridor:e=>nS(e),Polygon:e=>pS(e),PolylineCorridor:Gn,PolylinePolygon:Gn}),rS=(e,t)=>e.filter((e=>null!=e)).map((e=>iS(e))),oS=(e,t)=>e.filter((e=>null!=e)).map((e=>(e=>kn(e,{Except:e=>rS(e),Geometry:e=>iS(e)}))(e))),sS=(e,t)=>kn(e,{Areas:e=>oS(e),CarShuttleTrains:[],ControlledAccessHighways:[],DirtRoads:[],Ferries:[],SeasonalClosure:[],TollRoads:[],TollTransponders:[],TruckRoadTypes:Gn,Tunnels:[],UTurns:[],ZoneCategories:Gn}),aS=(e,t)=>kn(e,{AvoidActionsForDistance:[],Heading:Un,Matching:Gn,SideOfStreet:e=>dS(e)}),cS=(e,t)=>kn(e,{AvoidActionsForDistance:[],Heading:Un,Matching:Gn,SideOfStreet:e=>dS(e)}),dS=(e,t)=>kn(e,{Position:e=>fS(e),UseWith:[]}),uS=(e,t)=>kn(e,{Car:e=>(e=>kn(e,{EngineType:[],LicensePlate:Gn,MaxSpeed:Un,Occupancy:[]}))(e),Scooter:e=>(e=>kn(e,{EngineType:[],LicensePlate:Gn,MaxSpeed:Un,Occupancy:[]}))(e),Truck:e=>lS(e)}),lS=(e,t)=>kn(e,{AxleCount:[],EngineType:[],GrossWeight:[],HazardousCargos:Gn,Height:[],HeightAboveFirstAxle:[],KpraLength:[],Length:[],LicensePlate:Gn,MaxSpeed:Un,Occupancy:[],PayloadCapacity:[],TireCount:[],Trailer:Gn,TruckType:[],TunnelRestrictionCode:[],WeightPerAxle:[],WeightPerAxleGroup:Gn,Width:[]}),pS=(e,t)=>e.filter((e=>null!=e)).map((e=>(e=>e.filter((e=>null!=e)).map((e=>fS(e))))(e))),hS=(e,t)=>e.filter((e=>null!=e)).map((e=>fS(e))),fS=(e,t)=>e.filter((e=>null!=e)).map((e=>Un(e))),mS=(e,t)=>e.filter((e=>null!=e)).map((e=>(e=>kn(e,{Heading:Un,Position:e=>fS(e),Speed:Un,Timestamp:[]}))(e))),gS=(e,t)=>kn(e,{BoundingBox:e=>tS(e),Corridor:e=>nS(e),Polygon:e=>pS(e),PolylineCorridor:Gn,PolylinePolygon:Gn}),yS=(e,t)=>e.filter((e=>null!=e)).map((e=>gS(e))),bS=(e,t)=>e.filter((e=>null!=e)).map((e=>(e=>kn(e,{Except:e=>yS(e),Geometry:e=>gS(e)}))(e))),SS=(e,t)=>kn(e,{Areas:e=>bS(e),CarShuttleTrains:[],ControlledAccessHighways:[],DirtRoads:[],Ferries:[],SeasonalClosure:[],TollRoads:[],TollTransponders:[],TruckRoadTypes:Gn,Tunnels:[],UTurns:[],ZoneCategories:Gn}),vS=(e,t)=>kn(e,{AvoidActionsForDistance:[],AvoidUTurns:[],Heading:Un,Matching:Gn,SideOfStreet:e=>LS(e),StopDuration:[]}),wS=(e,t)=>kn(e,{BoundingBox:e=>tS(e),Polygon:e=>pS(e),PolylinePolygon:Gn}),PS=(e,t)=>e.filter((e=>null!=e)).map((e=>(e=>kn(e,{Geometry:e=>wS(e)}))(e))),ES=(e,t)=>kn(e,{Areas:e=>PS(e),CarShuttleTrains:[],ControlledAccessHighways:[],DirtRoads:[],Ferries:[],TollRoads:[],TollTransponders:[],TruckRoadTypes:Gn,Tunnels:[],UTurns:[],ZoneCategories:Gn}),CS=(e,t)=>kn(e,{Geometry:e=>TS(e),Unbounded:[]}),TS=(e,t)=>kn(e,{AutoCircle:Gn,BoundingBox:e=>tS(e),Circle:e=>(e=>kn(e,{Center:e=>fS(e),Radius:Un}))(e),Polygon:e=>pS(e)}),AS=(e,t)=>e.filter((e=>null!=e)).map((e=>(e=>kn(e,{Options:e=>RS(e),Position:e=>fS(e)}))(e))),RS=(e,t)=>kn(e,{AvoidActionsForDistance:[],Heading:Un,Matching:Gn,SideOfStreet:e=>IS(e)}),xS=(e,t)=>e.filter((e=>null!=e)).map((e=>(e=>kn(e,{Options:e=>OS(e),Position:e=>fS(e)}))(e))),OS=(e,t)=>kn(e,{AvoidActionsForDistance:[],Heading:Un,Matching:Gn,SideOfStreet:e=>IS(e)}),IS=(e,t)=>kn(e,{Position:e=>fS(e),UseWith:[]}),NS=(e,t)=>kn(e,{Car:e=>(e=>kn(e,{LicensePlate:Gn,MaxSpeed:Un,Occupancy:[]}))(e),Scooter:e=>(e=>kn(e,{LicensePlate:Gn,MaxSpeed:Un,Occupancy:[]}))(e),Truck:e=>DS(e)}),DS=(e,t)=>kn(e,{AxleCount:[],GrossWeight:[],HazardousCargos:Gn,Height:[],KpraLength:[],Length:[],LicensePlate:Gn,MaxSpeed:Un,Occupancy:[],PayloadCapacity:[],Trailer:Gn,TruckType:[],TunnelRestrictionCode:[],WeightPerAxle:[],WeightPerAxleGroup:Gn,Width:[]}),MS=(e,t)=>kn(e,{AvoidActionsForDistance:[],AvoidUTurns:[],Heading:Un,Matching:Gn,SideOfStreet:e=>LS(e)}),LS=(e,t)=>kn(e,{Position:e=>fS(e),UseWith:[]}),kS=(e,t)=>kn(e,{Car:e=>(e=>kn(e,{EngineType:[],LicensePlate:Gn,MaxSpeed:Un,Occupancy:[]}))(e),Pedestrian:e=>(e=>kn(e,{Speed:Un}))(e),Scooter:e=>(e=>kn(e,{EngineType:[],LicensePlate:Gn,MaxSpeed:Un,Occupancy:[]}))(e),Truck:e=>_S(e)}),_S=(e,t)=>kn(e,{AxleCount:[],EngineType:[],GrossWeight:[],HazardousCargos:Gn,Height:[],HeightAboveFirstAxle:[],KpraLength:[],Length:[],LicensePlate:Gn,MaxSpeed:Un,Occupancy:[],PayloadCapacity:[],TireCount:[],Trailer:Gn,TruckType:[],TunnelRestrictionCode:[],WeightPerAxle:[],WeightPerAxleGroup:Gn,Width:[]}),FS=(e,t)=>e.filter((e=>null!=e)).map((e=>(e=>kn(e,{AvoidActionsForDistance:[],AvoidUTurns:[],Heading:Un,Matching:Gn,PassThrough:[],Position:e=>fS(e),SideOfStreet:e=>LS(e),StopDuration:[]}))(e))),$S=(e,t)=>kn(e,{BoundingBox:e=>tS(e)}),US=(e,t)=>e.filter((e=>null!=e)).map((e=>(e=>kn(e,{Geometry:e=>$S(e)}))(e))),BS=(e,t)=>kn(e,{Areas:e=>US(e),CarShuttleTrains:[],ControlledAccessHighways:[],DirtRoads:[],Ferries:[],TollRoads:[],Tunnels:[],UTurns:[]}),GS=(e,t)=>kn(e,{AccessHours:Gn,AppointmentTime:[],Heading:Un,Id:[],ServiceDuration:[],SideOfStreet:e=>jS(e)}),jS=(e,t)=>kn(e,{Position:e=>fS(e),UseWith:[]}),zS=(e,t)=>kn(e,{Pedestrian:e=>(e=>kn(e,{Speed:Un}))(e),Truck:Gn}),HS=(e,t)=>e.filter((e=>null!=e)).map((e=>(e=>kn(e,{AccessHours:Gn,AppointmentTime:[],Before:Gn,Heading:Un,Id:[],Position:e=>fS(e),ServiceDuration:[],SideOfStreet:e=>jS(e)}))(e))),VS=(e,t)=>kn(e,{LineString:e=>ZS(e),Polyline:tn}),qS=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{FromPolygonIndex:Kt,Geometry:e=>VS(e),ToPolygonIndex:Kt}))(e)));return n},WS=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{Connections:e=>qS(e),DistanceThreshold:Wt,Geometries:e=>KS(e),TimeThreshold:Wt}))(e)));return n},KS=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{Polygon:e=>YS(e),PolylinePolygon:Gn}))(e)));return n},YS=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t=(e||[]).filter((e=>null!=e)).map((e=>QS(e)));return t})(e)));return n},ZS=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>QS(e)));return n},QS=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>on(e)));return n},JS=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>on(e)));return n},XS=(e,t)=>kn(e,{LineString:e=>ZS(e),Polyline:tn}),ev=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{Confidence:on,OriginalPosition:e=>QS(e),SnappedPosition:e=>QS(e)}))(e)));return n},tv=(e,t)=>kn(e,{AfterTravelSteps:Gn,Arrival:e=>(e=>kn(e,{Place:e=>nv(e),Time:tn}))(e),BeforeTravelSteps:Gn,Departure:e=>(e=>kn(e,{Place:e=>nv(e),Time:tn}))(e),Notices:Gn,PassThroughWaypoints:e=>uv(e),RouteName:tn,Spans:Gn,Summary:Gn,TravelSteps:Gn}),nv=(e,t)=>kn(e,{Name:tn,OriginalPosition:e=>JS(e),Position:e=>JS(e),WaypointIndex:Kt}),iv=(e,t)=>kn(e,{Intersection:Gn,SteeringDirection:tn,TurnAngle:on,TurnIntensity:tn}),rv=(e,t)=>kn(e,{LineString:e=>ZS(e),Polyline:tn}),ov=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{FerryLegDetails:e=>tv(e),Geometry:e=>rv(e),Language:tn,PedestrianLegDetails:e=>lv(e),TravelMode:tn,Type:tn,VehicleLegDetails:e=>xv(e)}))(e)));return n},sv=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{Legs:e=>ov(e),MajorRoadLabels:Gn,Summary:e=>vv(e)}))(e)));return n},av=(e,t)=>kn(e,{Geometry:e=>cv(e),Unbounded:zt}),cv=(e,t)=>kn(e,{AutoCircle:Gn,BoundingBox:e=>(e=>{const t=(e||[]).filter((e=>null!=e)).map((e=>on(e)));return t})(e),Circle:e=>(e=>kn(e,{Center:e=>QS(e),Radius:on}))(e),Polygon:e=>YS(e)}),dv=(e,t)=>kn(e,{GeometryOffset:Kt,Place:e=>(e=>kn(e,{OriginalPosition:e=>JS(e),Position:e=>JS(e),WaypointIndex:Kt}))(e)}),uv=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>dv(e)));return n},lv=(e,t)=>kn(e,{Arrival:e=>(e=>kn(e,{Place:e=>pv(e),Time:tn}))(e),Departure:e=>(e=>kn(e,{Place:e=>pv(e),Time:tn}))(e),Notices:Gn,PassThroughWaypoints:e=>uv(e),Spans:e=>hv(e),Summary:Gn,TravelSteps:e=>fv(e)}),pv=(e,t)=>kn(e,{Name:tn,OriginalPosition:e=>JS(e),Position:e=>JS(e),SideOfStreet:tn,WaypointIndex:Kt}),hv=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{BestCaseDuration:Wt,Country:tn,Distance:Wt,Duration:Wt,DynamicSpeed:e=>bv(e),FunctionalClassification:Kt,GeometryOffset:Kt,Incidents:Gn,Names:Gn,PedestrianAccess:Gn,Region:tn,RoadAttributes:Gn,RouteNumbers:Gn,SpeedLimit:e=>Sv(e),TypicalDuration:Wt}))(e)));return n},fv=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{ContinueStepDetails:Gn,CurrentRoad:Gn,Distance:Wt,Duration:Wt,ExitNumber:Gn,GeometryOffset:Kt,Instruction:tn,KeepStepDetails:e=>iv(e),NextRoad:Gn,RoundaboutEnterStepDetails:e=>mv(e),RoundaboutExitStepDetails:e=>gv(e),RoundaboutPassStepDetails:e=>yv(e),Signpost:Gn,TurnStepDetails:e=>Rv(e),Type:tn}))(e)));return n},mv=(e,t)=>kn(e,{Intersection:Gn,SteeringDirection:tn,TurnAngle:on,TurnIntensity:tn}),gv=(e,t)=>kn(e,{Intersection:Gn,RelativeExit:Kt,RoundaboutAngle:on,SteeringDirection:tn}),yv=(e,t)=>kn(e,{Intersection:Gn,SteeringDirection:tn,TurnAngle:on,TurnIntensity:tn}),bv=(e,t)=>kn(e,{BestCaseSpeed:on,TurnDuration:Wt,TypicalSpeed:on}),Sv=(e,t)=>kn(e,{MaxSpeed:on,Unlimited:zt}),vv=(e,t)=>kn(e,{Distance:Wt,Duration:Wt,Tolls:e=>Av(e)}),wv=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{Country:tn,PaymentSites:e=>Pv(e),Rates:e=>Tv(e),Systems:Gn}))(e)));return n},Pv=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{Name:tn,Position:e=>JS(e)}))(e)));return n},Ev=(e,t)=>kn(e,{Currency:tn,Estimate:zt,PerDuration:Wt,Range:zt,RangeValue:e=>Cv(e),Value:on}),Cv=(e,t)=>kn(e,{Max:on,Min:on}),Tv=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{ApplicableTimes:tn,ConvertedPrice:e=>Ev(e),Id:tn,LocalPrice:e=>Ev(e),Name:tn,Pass:Gn,PaymentMethods:Gn,Transponders:Gn}))(e)));return n},Av=(e,t)=>kn(e,{Total:e=>(e=>kn(e,{Currency:tn,Estimate:zt,Range:zt,RangeValue:e=>Cv(e),Value:on}))(e)}),Rv=(e,t)=>kn(e,{Intersection:Gn,SteeringDirection:tn,TurnAngle:on,TurnIntensity:tn}),xv=(e,t)=>kn(e,{Arrival:e=>(e=>kn(e,{Place:e=>Ov(e),Time:tn}))(e),Departure:e=>(e=>kn(e,{Place:e=>Ov(e),Time:tn}))(e),Incidents:Gn,Notices:Gn,PassThroughWaypoints:e=>uv(e),Spans:e=>Iv(e),Summary:Gn,TollSystems:Gn,Tolls:e=>wv(e),TravelSteps:e=>Dv(e),TruckRoadTypes:Gn,Zones:Gn}),Ov=(e,t)=>kn(e,{Name:tn,OriginalPosition:e=>JS(e),Position:e=>JS(e),SideOfStreet:tn,WaypointIndex:Kt}),Iv=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{BestCaseDuration:Wt,CarAccess:Gn,Country:tn,Distance:Wt,Duration:Wt,DynamicSpeed:e=>bv(e),FunctionalClassification:Kt,Gate:tn,GeometryOffset:Kt,Incidents:Gn,Names:Gn,Notices:Gn,RailwayCrossing:tn,Region:tn,RoadAttributes:Gn,RouteNumbers:Gn,ScooterAccess:Gn,SpeedLimit:e=>Sv(e),TollSystems:Gn,TruckAccess:Gn,TruckRoadTypes:Gn,TypicalDuration:Wt,Zones:Gn}))(e)));return n},Nv=(e,t)=>kn(e,{ContinueHighwayStepDetails:e=>(e=>kn(e,{Intersection:Gn,SteeringDirection:tn,TurnAngle:on,TurnIntensity:tn}))(e),ContinueStepDetails:Gn,CurrentRoad:Gn,Distance:Wt,Duration:Wt,EnterHighwayStepDetails:e=>(e=>kn(e,{Intersection:Gn,SteeringDirection:tn,TurnAngle:on,TurnIntensity:tn}))(e),ExitNumber:Gn,ExitStepDetails:e=>(e=>kn(e,{Intersection:Gn,RelativeExit:Kt,SteeringDirection:tn,TurnAngle:on,TurnIntensity:tn}))(e),GeometryOffset:Kt,Instruction:tn,KeepStepDetails:e=>iv(e),NextRoad:Gn,RampStepDetails:e=>(e=>kn(e,{Intersection:Gn,SteeringDirection:tn,TurnAngle:on,TurnIntensity:tn}))(e),RoundaboutEnterStepDetails:e=>mv(e),RoundaboutExitStepDetails:e=>gv(e),RoundaboutPassStepDetails:e=>yv(e),Signpost:Gn,TurnStepDetails:e=>Rv(e),Type:tn,UTurnStepDetails:e=>(e=>kn(e,{Intersection:Gn,SteeringDirection:tn,TurnAngle:on,TurnIntensity:tn}))(e)}),Dv=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>Nv(e)));return n},Mv=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{Message:[,tn,"message"],Name:[,tn,"name"]}))(e)));return n},Lv=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{FailedConstraints:Gn,Id:tn,Position:e=>QS(e)}))(e)));return n},kv=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>(e=>kn(e,{ArrivalTime:tn,ClusterIndex:Kt,DepartureTime:tn,Id:tn,Position:e=>QS(e)}))(e)));return n},_v=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Fv="Key",$v="PricingBucket",Uv="key",Bv="x-amz-geo-pricing-bucket";class Gv extends(Ut.classBuilder().ep(Hg).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("RoutesService","CalculateIsolines",{}).n("GeoRoutesClient","CalculateIsolinesCommand").f(My,Fy).ser(Ub).de(Hb).build()){}class jv extends(Ut.classBuilder().ep(Hg).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("RoutesService","CalculateRouteMatrix",{}).n("GeoRoutesClient","CalculateRouteMatrixCommand").f(Yy,Zy).ser(Bb).de(Vb).build()){}class zv extends(Ut.classBuilder().ep(Hg).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("RoutesService","CalculateRoutes",{}).n("GeoRoutesClient","CalculateRoutesCommand").f(ob,Eb).ser(Gb).de(qb).build()){}class Hv extends(Ut.classBuilder().ep(Hg).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("RoutesService","OptimizeWaypoints",{}).n("GeoRoutesClient","OptimizeWaypointsCommand").f(Ib,Mb).ser(jb).de(Wb).build()){}class Vv extends(Ut.classBuilder().ep(Hg).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("RoutesService","SnapToRoads",{}).n("GeoRoutesClient","SnapToRoadsCommand").f(kb,$b).ser(zb).de(Kb).build()){}const qv={CalculateIsolinesCommand:Gv,CalculateRouteMatrixCommand:jv,CalculateRoutesCommand:zv,OptimizeWaypointsCommand:Hv,SnapToRoadsCommand:Vv};class Wv extends vy{}jt(qv,Wv);var Kv=Object.freeze({__proto__:null,$Command:Ut,AccessDeniedException:Py,CalculateIsolinesCommand:Gv,CalculateIsolinesRequestFilterSensitiveLog:My,CalculateIsolinesResponseFilterSensitiveLog:Fy,CalculateRouteMatrixCommand:jv,CalculateRouteMatrixRequestFilterSensitiveLog:Yy,CalculateRouteMatrixResponseFilterSensitiveLog:Zy,CalculateRoutesCommand:zv,CalculateRoutesRequestFilterSensitiveLog:ob,CalculateRoutesResponseFilterSensitiveLog:Eb,CircleFilterSensitiveLog:e=>({...e,...e.Center&&{Center:Gt}}),CorridorFilterSensitiveLog:e=>({...e,...e.LineString&&{LineString:Gt}}),DayOfWeek:{FRIDAY:"Friday",MONDAY:"Monday",SATURDAY:"Saturday",SUNDAY:"Sunday",THURSDAY:"Thursday",TUESDAY:"Tuesday",WEDNESDAY:"Wednesday"},GeoRoutes:Wv,GeoRoutesClient:vy,GeoRoutesServiceException:wy,GeometryFormat:{FLEXIBLE_POLYLINE:"FlexiblePolyline",SIMPLE:"Simple"},InternalServerException:Ey,IsolineAvoidanceAreaFilterSensitiveLog:Ry,IsolineAvoidanceAreaGeometryFilterSensitiveLog:Ay,IsolineAvoidanceOptionsFilterSensitiveLog:xy,IsolineConnectionFilterSensitiveLog:ky,IsolineConnectionGeometryFilterSensitiveLog:Ly,IsolineDestinationOptionsFilterSensitiveLog:Ny,IsolineEngineType:{ELECTRIC:"Electric",INTERNAL_COMBUSTION:"InternalCombustion",PLUGIN_HYBRID:"PluginHybrid"},IsolineFilterSensitiveLog:e=>({...e,...e.Connections&&{Connections:e.Connections.map((e=>ky(e)))},...e.Geometries&&{Geometries:e.Geometries.map((e=>_y(e)))}}),IsolineHazardousCargoType:{COMBUSTIBLE:"Combustible",CORROSIVE:"Corrosive",EXPLOSIVE:"Explosive",FLAMMABLE:"Flammable",GAS:"Gas",HARMFUL_TO_WATER:"HarmfulToWater",ORGANIC:"Organic",OTHER:"Other",POISON:"Poison",POISONOUS_INHALATION:"PoisonousInhalation",RADIOACTIVE:"Radioactive"},IsolineMatchingOptionsFilterSensitiveLog:Oy,IsolineOptimizationObjective:{ACCURATE_CALCULATION:"AccurateCalculation",BALANCED_CALCULATION:"BalancedCalculation",FAST_CALCULATION:"FastCalculation"},IsolineOriginOptionsFilterSensitiveLog:Dy,IsolineShapeGeometryFilterSensitiveLog:_y,IsolineSideOfStreetOptionsFilterSensitiveLog:Iy,IsolineTravelMode:{CAR:"Car",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},IsolineTruckType:{LIGHT_TRUCK:"LightTruck",STRAIGHT_TRUCK:"StraightTruck",TRACTOR:"Tractor"},IsolineZoneCategory:{CONGESTION_PRICING:"CongestionPricing",ENVIRONMENTAL:"Environmental",VIGNETTE:"Vignette"},MatchingStrategy:{MATCH_ANY:"MatchAny",MATCH_MOST_SIGNIFICANT_ROAD:"MatchMostSignificantRoad"},MeasurementSystem:{IMPERIAL:"Imperial",METRIC:"Metric"},OptimizeWaypointsCommand:Hv,OptimizeWaypointsRequestFilterSensitiveLog:Ib,OptimizeWaypointsResponseFilterSensitiveLog:Mb,PolylineCorridorFilterSensitiveLog:e=>({...e,...e.Polyline&&{Polyline:Gt}}),RoadSnapHazardousCargoType:{COMBUSTIBLE:"Combustible",CORROSIVE:"Corrosive",EXPLOSIVE:"Explosive",FLAMMABLE:"Flammable",GAS:"Gas",HARMFUL_TO_WATER:"HarmfulToWater",ORGANIC:"Organic",OTHER:"Other",POISON:"Poison",POISONOUS_INHALATION:"PoisonousInhalation",RADIOACTIVE:"Radioactive"},RoadSnapNoticeCode:{TRACE_POINTS_HEADING_IGNORED:"TracePointsHeadingIgnored",TRACE_POINTS_IGNORED:"TracePointsIgnored",TRACE_POINTS_MOVED_BY_LARGE_DISTANCE:"TracePointsMovedByLargeDistance",TRACE_POINTS_NOT_MATCHED:"TracePointsNotMatched",TRACE_POINTS_OUT_OF_SEQUENCE:"TracePointsOutOfSequence",TRACE_POINTS_SPEED_ESTIMATED:"TracePointsSpeedEstimated",TRACE_POINTS_SPEED_IGNORED:"TracePointsSpeedIgnored"},RoadSnapSnappedGeometryFilterSensitiveLog:_b,RoadSnapSnappedTracePointFilterSensitiveLog:Fb,RoadSnapTracePointFilterSensitiveLog:Lb,RoadSnapTravelMode:{CAR:"Car",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},RouteAvoidanceAreaFilterSensitiveLog:Jy,RouteAvoidanceAreaGeometryFilterSensitiveLog:Qy,RouteAvoidanceOptionsFilterSensitiveLog:Xy,RouteDestinationOptionsFilterSensitiveLog:nb,RouteDirection:{EAST:"East",NORTH:"North",SOUTH:"South",WEST:"West"},RouteEngineType:{ELECTRIC:"Electric",INTERNAL_COMBUSTION:"InternalCombustion",PLUGIN_HYBRID:"PluginHybrid"},RouteFerryAfterTravelStepType:{DEBOARD:"Deboard"},RouteFerryArrivalFilterSensitiveLog:ab,RouteFerryBeforeTravelStepType:{BOARD:"Board"},RouteFerryDepartureFilterSensitiveLog:cb,RouteFerryLegDetailsFilterSensitiveLog:lb,RouteFerryNoticeCode:{ACCURATE_POLYLINE_UNAVAILABLE:"AccuratePolylineUnavailable",NO_SCHEDULE:"NoSchedule",OTHER:"Other",SEASONAL_CLOSURE:"SeasonalClosure",VIOLATED_AVOID_FERRY:"ViolatedAvoidFerry",VIOLATED_AVOID_RAIL_FERRY:"ViolatedAvoidRailFerry"},RouteFerryPlaceFilterSensitiveLog:sb,RouteFerryTravelStepType:{ARRIVE:"Arrive",CONTINUE:"Continue",DEPART:"Depart"},RouteFilterSensitiveLog:e=>({...e,...e.Legs&&{Legs:e.Legs.map((e=>Pb(e)))}}),RouteHazardousCargoType:{COMBUSTIBLE:"Combustible",CORROSIVE:"Corrosive",EXPLOSIVE:"Explosive",FLAMMABLE:"Flammable",GAS:"Gas",HARMFUL_TO_WATER:"HarmfulToWater",ORGANIC:"Organic",OTHER:"Other",POISON:"Poison",POISONOUS_INHALATION:"PoisonousInhalation",RADIOACTIVE:"Radioactive"},RouteLegAdditionalFeature:{ELEVATION:"Elevation",INCIDENTS:"Incidents",PASS_THROUGH_WAYPOINTS:"PassThroughWaypoints",SUMMARY:"Summary",TOLLS:"Tolls",TRAVEL_STEP_INSTRUCTIONS:"TravelStepInstructions",TRUCK_ROAD_TYPES:"TruckRoadTypes",TYPICAL_DURATION:"TypicalDuration",ZONES:"Zones"},RouteLegFilterSensitiveLog:Pb,RouteLegGeometryFilterSensitiveLog:pb,RouteLegTravelMode:{CAR:"Car",CAR_SHUTTLE_TRAIN:"CarShuttleTrain",FERRY:"Ferry",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},RouteLegType:{FERRY:"Ferry",PEDESTRIAN:"Pedestrian",VEHICLE:"Vehicle"},RouteMatchingOptionsFilterSensitiveLog:eb,RouteMatrixAvoidanceAreaFilterSensitiveLog:Uy,RouteMatrixAvoidanceAreaGeometryFilterSensitiveLog:$y,RouteMatrixAvoidanceOptionsFilterSensitiveLog:By,RouteMatrixBoundaryFilterSensitiveLog:Ky,RouteMatrixBoundaryGeometryFilterSensitiveLog:Wy,RouteMatrixDestinationFilterSensitiveLog:Hy,RouteMatrixDestinationOptionsFilterSensitiveLog:zy,RouteMatrixErrorCode:{NO_MATCH:"NoMatch",NO_MATCH_DESTINATION:"NoMatchDestination",NO_MATCH_ORIGIN:"NoMatchOrigin",NO_ROUTE:"NoRoute",OTHER:"Other",OUT_OF_BOUNDS:"OutOfBounds",OUT_OF_BOUNDS_DESTINATION:"OutOfBoundsDestination",OUT_OF_BOUNDS_ORIGIN:"OutOfBoundsOrigin",VIOLATION:"Violation"},RouteMatrixHazardousCargoType:{COMBUSTIBLE:"Combustible",CORROSIVE:"Corrosive",EXPLOSIVE:"Explosive",FLAMMABLE:"Flammable",GAS:"Gas",HARMFUL_TO_WATER:"HarmfulToWater",ORGANIC:"Organic",OTHER:"Other",POISON:"Poison",POISONOUS_INHALATION:"PoisonousInhalation",RADIOACTIVE:"Radioactive"},RouteMatrixMatchingOptionsFilterSensitiveLog:Gy,RouteMatrixOriginFilterSensitiveLog:qy,RouteMatrixOriginOptionsFilterSensitiveLog:Vy,RouteMatrixSideOfStreetOptionsFilterSensitiveLog:jy,RouteMatrixTravelMode:{CAR:"Car",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},RouteMatrixTruckType:{LIGHT_TRUCK:"LightTruck",STRAIGHT_TRUCK:"StraightTruck",TRACTOR:"Tractor"},RouteMatrixZoneCategory:{CONGESTION_PRICING:"CongestionPricing",ENVIRONMENTAL:"Environmental",VIGNETTE:"Vignette"},RouteNoticeImpact:{HIGH:"High",LOW:"Low"},RouteOriginOptionsFilterSensitiveLog:ib,RoutePassThroughPlaceFilterSensitiveLog:db,RoutePassThroughWaypointFilterSensitiveLog:ub,RoutePedestrianArrivalFilterSensitiveLog:fb,RoutePedestrianDepartureFilterSensitiveLog:mb,RoutePedestrianLegDetailsFilterSensitiveLog:gb,RoutePedestrianNoticeCode:{ACCURATE_POLYLINE_UNAVAILABLE:"AccuratePolylineUnavailable",OTHER:"Other",VIOLATED_AVOID_DIRT_ROAD:"ViolatedAvoidDirtRoad",VIOLATED_AVOID_TUNNEL:"ViolatedAvoidTunnel",VIOLATED_PEDESTRIAN_OPTION:"ViolatedPedestrianOption"},RoutePedestrianPlaceFilterSensitiveLog:hb,RoutePedestrianTravelStepType:{ARRIVE:"Arrive",CONTINUE:"Continue",DEPART:"Depart",EXIT:"Exit",KEEP:"Keep",RAMP:"Ramp",ROUNDABOUT_ENTER:"RoundaboutEnter",ROUNDABOUT_EXIT:"RoundaboutExit",ROUNDABOUT_PASS:"RoundaboutPass",TURN:"Turn",U_TURN:"UTurn"},RouteResponseNoticeCode:{MAIN_LANGUAGE_NOT_FOUND:"MainLanguageNotFound",OTHER:"Other",TRAVEL_TIME_EXCEEDS_DRIVER_WORK_HOURS:"TravelTimeExceedsDriverWorkHours"},RouteRoadType:{HIGHWAY:"Highway",RURAL:"Rural",URBAN:"Urban"},RouteSideOfStreet:{LEFT:"Left",RIGHT:"Right"},RouteSideOfStreetOptionsFilterSensitiveLog:tb,RouteSpanAdditionalFeature:{BEST_CASE_DURATION:"BestCaseDuration",CAR_ACCESS:"CarAccess",CONSUMPTION:"Consumption",COUNTRY:"Country",DISTANCE:"Distance",DURATION:"Duration",DYNAMIC_SPEED:"DynamicSpeed",FUNCTIONAL_CLASSIFICATION:"FunctionalClassification",GATES:"Gates",INCIDENTS:"Incidents",NAMES:"Names",NOTICES:"Notices",PEDESTRIAN_ACCESS:"PedestrianAccess",RAILWAY_CROSSINGS:"RailwayCrossings",REGION:"Region",ROAD_ATTRIBUTES:"RoadAttributes",ROUTE_NUMBERS:"RouteNumbers",SCOOTER_ACCESS:"ScooterAccess",SPEED_LIMIT:"SpeedLimit",TOLL_SYSTEMS:"TollSystems",TRUCK_ACCESS:"TruckAccess",TRUCK_ROAD_TYPES:"TruckRoadTypes",TYPICAL_DURATION:"TypicalDuration",ZONES:"Zones"},RouteSpanCarAccessAttribute:{ALLOWED:"Allowed",NO_THROUGH_TRAFFIC:"NoThroughTraffic",TOLL_ROAD:"TollRoad"},RouteSpanGateAttribute:{EMERGENCY:"Emergency",KEY_ACCESS:"KeyAccess",PERMISSION_REQUIRED:"PermissionRequired"},RouteSpanPedestrianAccessAttribute:{ALLOWED:"Allowed",INDOORS:"Indoors",NO_THROUGH_TRAFFIC:"NoThroughTraffic",PARK:"Park",STAIRS:"Stairs",TOLL_ROAD:"TollRoad"},RouteSpanRailwayCrossingAttribute:{PROTECTED:"Protected",UNPROTECTED:"Unprotected"},RouteSpanRoadAttribute:{BRIDGE:"Bridge",BUILT_UP_AREA:"BuiltUpArea",CONTROLLED_ACCESS_HIGHWAY:"ControlledAccessHighway",DIRT_ROAD:"DirtRoad",DIVIDED_ROAD:"DividedRoad",MOTORWAY:"Motorway",PRIVATE_ROAD:"PrivateRoad",RAMP:"Ramp",RIGHT_HAND_TRAFFIC:"RightHandTraffic",ROUNDABOUT:"Roundabout",TUNNEL:"Tunnel",UNDER_CONSTRUCTION:"UnderConstruction"},RouteSpanScooterAccessAttribute:{ALLOWED:"Allowed",NO_THROUGH_TRAFFIC:"NoThroughTraffic",TOLL_ROAD:"TollRoad"},RouteSpanTruckAccessAttribute:{ALLOWED:"Allowed",NO_THROUGH_TRAFFIC:"NoThroughTraffic",TOLL_ROAD:"TollRoad"},RouteSteeringDirection:{LEFT:"Left",RIGHT:"Right",STRAIGHT:"Straight"},RouteTollFilterSensitiveLog:e=>({...e,...e.PaymentSites&&{PaymentSites:e.PaymentSites.map((e=>vb(e)))}}),RouteTollPassValidityPeriodType:{ANNUAL:"Annual",DAYS:"Days",EXTENDED_ANNUAL:"ExtendedAnnual",MINUTES:"Minutes",MONTHS:"Months"},RouteTollPaymentMethod:{BANK_CARD:"BankCard",CASH:"Cash",CASH_EXACT:"CashExact",CREDIT_CARD:"CreditCard",PASS_SUBSCRIPTION:"PassSubscription",TRANSPONDER:"Transponder",TRAVEL_CARD:"TravelCard",VIDEO_TOLL:"VideoToll"},RouteTollPaymentSiteFilterSensitiveLog:vb,RouteTollVehicleCategory:{MINIBUS:"Minibus"},RouteTravelMode:{CAR:"Car",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},RouteTravelStepType:{DEFAULT:"Default",TURN_BY_TURN:"TurnByTurn"},RouteTruckType:{LIGHT_TRUCK:"LightTruck",STRAIGHT_TRUCK:"StraightTruck",TRACTOR:"Tractor"},RouteTurnIntensity:{SHARP:"Sharp",SLIGHT:"Slight",TYPICAL:"Typical"},RouteVehicleArrivalFilterSensitiveLog:bb,RouteVehicleDepartureFilterSensitiveLog:Sb,RouteVehicleIncidentSeverity:{CRITICAL:"Critical",HIGH:"High",LOW:"Low",MEDIUM:"Medium"},RouteVehicleIncidentType:{ACCIDENT:"Accident",CONGESTION:"Congestion",CONSTRUCTION:"Construction",DISABLED_VEHICLE:"DisabledVehicle",LANE_RESTRICTION:"LaneRestriction",MASS_TRANSIT:"MassTransit",OTHER:"Other",PLANNED_EVENT:"PlannedEvent",ROAD_CLOSURE:"RoadClosure",ROAD_HAZARD:"RoadHazard",WEATHER:"Weather"},RouteVehicleLegDetailsFilterSensitiveLog:wb,RouteVehicleNoticeCode:{ACCURATE_POLYLINE_UNAVAILABLE:"AccuratePolylineUnavailable",OTHER:"Other",POTENTIAL_VIOLATED_AVOID_TOLL_ROAD_USAGE:"PotentialViolatedAvoidTollRoadUsage",POTENTIAL_VIOLATED_CARPOOL_USAGE:"PotentialViolatedCarpoolUsage",POTENTIAL_VIOLATED_TURN_RESTRICTION_USAGE:"PotentialViolatedTurnRestrictionUsage",POTENTIAL_VIOLATED_VEHICLE_RESTRICTION_USAGE:"PotentialViolatedVehicleRestrictionUsage",POTENTIAL_VIOLATED_ZONE_RESTRICTION_USAGE:"PotentialViolatedZoneRestrictionUsage",SEASONAL_CLOSURE:"SeasonalClosure",TOLLS_DATA_TEMPORARILY_UNAVAILABLE:"TollsDataTemporarilyUnavailable",TOLLS_DATA_UNAVAILABLE:"TollsDataUnavailable",TOLL_TRANSPONDER:"TollTransponder",VIOLATED_AVOID_CONTROLLED_ACCESS_HIGHWAY:"ViolatedAvoidControlledAccessHighway",VIOLATED_AVOID_DIFFICULT_TURNS:"ViolatedAvoidDifficultTurns",VIOLATED_AVOID_DIRT_ROAD:"ViolatedAvoidDirtRoad",VIOLATED_AVOID_SEASONAL_CLOSURE:"ViolatedAvoidSeasonalClosure",VIOLATED_AVOID_TOLL_ROAD:"ViolatedAvoidTollRoad",VIOLATED_AVOID_TOLL_TRANSPONDER:"ViolatedAvoidTollTransponder",VIOLATED_AVOID_TRUCK_ROAD_TYPE:"ViolatedAvoidTruckRoadType",VIOLATED_AVOID_TUNNEL:"ViolatedAvoidTunnel",VIOLATED_AVOID_U_TURNS:"ViolatedAvoidUTurns",VIOLATED_BLOCKED_ROAD:"ViolatedBlockedRoad",VIOLATED_CARPOOL:"ViolatedCarpool",VIOLATED_EMERGENCY_GATE:"ViolatedEmergencyGate",VIOLATED_START_DIRECTION:"ViolatedStartDirection",VIOLATED_TURN_RESTRICTION:"ViolatedTurnRestriction",VIOLATED_VEHICLE_RESTRICTION:"ViolatedVehicleRestriction",VIOLATED_ZONE_RESTRICTION:"ViolatedZoneRestriction"},RouteVehiclePlaceFilterSensitiveLog:yb,RouteVehicleTravelStepType:{ARRIVE:"Arrive",CONTINUE:"Continue",CONTINUE_HIGHWAY:"ContinueHighway",DEPART:"Depart",ENTER_HIGHWAY:"EnterHighway",EXIT:"Exit",KEEP:"Keep",RAMP:"Ramp",ROUNDABOUT_ENTER:"RoundaboutEnter",ROUNDABOUT_EXIT:"RoundaboutExit",ROUNDABOUT_PASS:"RoundaboutPass",TURN:"Turn",U_TURN:"UTurn"},RouteWaypointFilterSensitiveLog:rb,RouteWeightConstraintType:{CURRENT:"Current",GROSS:"Gross",UNKNOWN:"Unknown"},RouteZoneCategory:{CONGESTION_PRICING:"CongestionPricing",ENVIRONMENTAL:"Environmental",VIGNETTE:"Vignette"},RoutingObjective:{FASTEST_ROUTE:"FastestRoute",SHORTEST_ROUTE:"ShortestRoute"},SideOfStreetMatchingStrategy:{ANY_STREET:"AnyStreet",DIVIDED_STREET_ONLY:"DividedStreetOnly"},SnapToRoadsCommand:Vv,SnapToRoadsRequestFilterSensitiveLog:kb,SnapToRoadsResponseFilterSensitiveLog:$b,ThrottlingException:Cy,TrafficUsage:{IGNORE_TRAFFIC_DATA:"IgnoreTrafficData",USE_TRAFFIC_DATA:"UseTrafficData"},ValidationException:Ty,ValidationExceptionReason:{CANNOT_PARSE:"CannotParse",FIELD_VALIDATION_FAILED:"FieldValidationFailed",MISSING:"Missing",OTHER:"Other",UNKNOWN_FIELD:"UnknownField",UNKNOWN_OPERATION:"UnknownOperation"},WaypointOptimizationAvoidanceAreaFilterSensitiveLog:Tb,WaypointOptimizationAvoidanceAreaGeometryFilterSensitiveLog:Cb,WaypointOptimizationAvoidanceOptionsFilterSensitiveLog:Ab,WaypointOptimizationClusteringAlgorithm:{DRIVING_DISTANCE:"DrivingDistance",TOPOLOGY_SEGMENT:"TopologySegment"},WaypointOptimizationConstraint:{ACCESS_HOURS:"AccessHours",APPOINTMENT_TIME:"AppointmentTime",BEFORE:"Before",HEADING:"Heading",SERVICE_DURATION:"ServiceDuration",SIDE_OF_STREET:"SideOfStreet"},WaypointOptimizationDestinationOptionsFilterSensitiveLog:xb,WaypointOptimizationHazardousCargoType:{COMBUSTIBLE:"Combustible",CORROSIVE:"Corrosive",EXPLOSIVE:"Explosive",FLAMMABLE:"Flammable",GAS:"Gas",HARMFUL_TO_WATER:"HarmfulToWater",ORGANIC:"Organic",OTHER:"Other",POISON:"Poison",POISONOUS_INHALATION:"PoisonousInhalation",RADIOACTIVE:"Radioactive"},WaypointOptimizationImpedingWaypointFilterSensitiveLog:Nb,WaypointOptimizationOptimizedWaypointFilterSensitiveLog:Db,WaypointOptimizationSequencingObjective:{FASTEST_ROUTE:"FastestRoute",SHORTEST_ROUTE:"ShortestRoute"},WaypointOptimizationServiceTimeTreatment:{REST:"Rest",WORK:"Work"},WaypointOptimizationSideOfStreetOptionsFilterSensitiveLog:Rb,WaypointOptimizationTravelMode:{CAR:"Car",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},WaypointOptimizationTruckType:{STRAIGHT_TRUCK:"StraightTruck",TRACTOR:"Tractor"},WaypointOptimizationWaypointFilterSensitiveLog:Ob,__Client:$t});const Yv=async(e,t,n)=>({operation:w(t).operation,region:await P(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Zv=e=>{const t=[];switch(e.operation){case"GetCredentialsForIdentity":case"GetId":case"GetOpenIdToken":case"UnlinkIdentity":t.push({schemeId:"smithy.api#noAuth"});break;default:t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e))}return t},Qv={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Jv="3.782.0";const Xv="required",ew="fn",tw="argv",nw="ref",iw=!0,rw="isSet",ow="booleanEquals",sw="error",aw="endpoint",cw="tree",dw="PartitionResult",uw="getAttr",lw="stringEquals",pw={[Xv]:!1,type:"String"},hw={[Xv]:!0,default:!1,type:"Boolean"},fw={[nw]:"Endpoint"},mw={[ew]:ow,[tw]:[{[nw]:"UseFIPS"},!0]},gw={[ew]:ow,[tw]:[{[nw]:"UseDualStack"},!0]},yw={},bw={[nw]:"Region"},Sw={[ew]:uw,[tw]:[{[nw]:dw},"supportsFIPS"]},vw={[nw]:dw},ww={[ew]:ow,[tw]:[!0,{[ew]:uw,[tw]:[vw,"supportsDualStack"]}]},Pw=[mw],Ew=[gw],Cw=[bw],Tw={parameters:{Region:pw,UseDualStack:hw,UseFIPS:hw,Endpoint:pw},rules:[{conditions:[{[ew]:rw,[tw]:[fw]}],rules:[{conditions:Pw,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:sw},{conditions:Ew,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:sw},{endpoint:{url:fw,properties:yw,headers:yw},type:aw}],type:cw},{conditions:[{[ew]:rw,[tw]:Cw}],rules:[{conditions:[{[ew]:"aws.partition",[tw]:Cw,assign:dw}],rules:[{conditions:[mw,gw],rules:[{conditions:[{[ew]:ow,[tw]:[iw,Sw]},ww],rules:[{conditions:[{[ew]:lw,[tw]:[bw,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:yw,headers:yw},type:aw},{conditions:[{[ew]:lw,[tw]:[bw,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:yw,headers:yw},type:aw},{conditions:[{[ew]:lw,[tw]:[bw,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:yw,headers:yw},type:aw},{conditions:[{[ew]:lw,[tw]:[bw,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:yw,headers:yw},type:aw},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:yw,headers:yw},type:aw}],type:cw},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:sw}],type:cw},{conditions:Pw,rules:[{conditions:[{[ew]:ow,[tw]:[Sw,iw]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:yw,headers:yw},type:aw}],type:cw},{error:"FIPS is enabled but this partition does not support FIPS",type:sw}],type:cw},{conditions:Ew,rules:[{conditions:[ww],rules:[{conditions:[{[ew]:lw,[tw]:["aws",{[ew]:uw,[tw]:[vw,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:yw,headers:yw},type:aw},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:yw,headers:yw},type:aw}],type:cw},{error:"DualStack is enabled but this partition does not support DualStack",type:sw}],type:cw},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:yw,headers:yw},type:aw}],type:cw}],type:cw},{error:"Invalid Configuration: Missing Region",type:sw}]},Aw=new he({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Rw=(e,t={})=>Aw.get(e,(()=>$e(Tw,{endpointParams:e,logger:t.logger})));be.aws=Ge;const xw=e=>{const t=$o(e),n=()=>t().then(On),i=(e=>({apiVersion:"2014-06-30",base64Decoder:e?.base64Decoder??U,base64Encoder:e?.base64Encoder??z,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Rw,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Zv,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Ke},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ce}],logger:e?.logger??new Mn,serviceId:e?.serviceId??"Cognito Identity",urlParser:e?.urlParser??er,utf8Decoder:e?.utf8Decoder??B,utf8Encoder:e?.utf8Encoder??j}))(e);return{...i,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??lo,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ao({serviceId:i.serviceId,clientVersion:Jv}),maxAttempts:e?.maxAttempts??3,region:e?.region??co("Region is missing"),requestHandler:Q.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||cr),sha256:e?.sha256??io,streamCollector:e?.streamCollector??J,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Ui)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Bi))}};class Ow extends Tn{constructor(e){super(e),Object.setPrototypeOf(this,Ow.prototype)}}class Iw extends Ow{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,Iw.prototype)}}class Nw extends Ow{name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,Nw.prototype)}}class Dw extends Ow{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,Dw.prototype)}}class Mw extends Ow{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,Mw.prototype)}}class Lw extends Ow{name="ResourceConflictException";$fault="client";constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,Lw.prototype)}}class kw extends Ow{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,kw.prototype)}}class _w extends Ow{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,_w.prototype)}}class Fw extends Ow{name="ExternalServiceException";$fault="client";constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),Object.setPrototypeOf(this,Fw.prototype)}}class $w extends Ow{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,$w.prototype)}}class Uw extends Ow{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(e){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...e}),Object.setPrototypeOf(this,Uw.prototype)}}class Bw extends Ow{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,Bw.prototype)}}const Gw=e=>({...e,...e.Logins&&{Logins:Gt}}),jw=e=>({...e,...e.SecretKey&&{SecretKey:Gt}}),zw=e=>({...e,...e.Credentials&&{Credentials:jw(e.Credentials)}}),Hw=e=>({...e,...e.Logins&&{Logins:Gt}}),Vw=async(e,t)=>{const n=lP("GetCredentialsForIdentity");let i;return i=JSON.stringify(Gn(e)),uP(t,n,"/",void 0,i)},qw=async(e,t)=>{const n=lP("GetId");let i;return i=JSON.stringify(Gn(e)),uP(t,n,"/",void 0,i)},Ww=async(e,t)=>{if(e.statusCode>=300)return Yw(e,t);const n=await zn(e.body,t);let i={};i=aP(n);return{$metadata:cP(e),...i}},Kw=async(e,t)=>{if(e.statusCode>=300)return Yw(e,t);const n=await zn(e.body,t);let i={};i=Gn(n);return{$metadata:cP(e),...i}},Yw=async(e,t)=>{const n={...e,body:await Hn(e.body,t)},i=Vn(e,n.body);switch(i){case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":throw await Xw(n);case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":throw await tP(n);case"LimitExceededException":case"com.amazonaws.cognitoidentity#LimitExceededException":throw await nP(n);case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":throw await iP(n);case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":throw await rP(n);case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":throw await sP(n);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":throw await oP(n);case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":throw await Jw(n);case"InvalidIdentityPoolConfigurationException":case"com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException":throw await eP(n);case"DeveloperUserAlreadyRegisteredException":case"com.amazonaws.cognitoidentity#DeveloperUserAlreadyRegisteredException":throw await Qw(n);case"ConcurrentModificationException":case"com.amazonaws.cognitoidentity#ConcurrentModificationException":throw await Zw(n);default:const t=n.body;return dP({output:e,parsedBody:t,errorCode:i})}},Zw=async(e,t)=>{const n=e.body,i=Gn(n),r=new Bw({$metadata:cP(e),...i});return An(r,n)},Qw=async(e,t)=>{const n=e.body,i=Gn(n),r=new Uw({$metadata:cP(e),...i});return An(r,n)},Jw=async(e,t)=>{const n=e.body,i=Gn(n),r=new Fw({$metadata:cP(e),...i});return An(r,n)},Xw=async(e,t)=>{const n=e.body,i=Gn(n),r=new Iw({$metadata:cP(e),...i});return An(r,n)},eP=async(e,t)=>{const n=e.body,i=Gn(n),r=new $w({$metadata:cP(e),...i});return An(r,n)},tP=async(e,t)=>{const n=e.body,i=Gn(n),r=new Nw({$metadata:cP(e),...i});return An(r,n)},nP=async(e,t)=>{const n=e.body,i=Gn(n),r=new Dw({$metadata:cP(e),...i});return An(r,n)},iP=async(e,t)=>{const n=e.body,i=Gn(n),r=new Mw({$metadata:cP(e),...i});return An(r,n)},rP=async(e,t)=>{const n=e.body,i=Gn(n),r=new Lw({$metadata:cP(e),...i});return An(r,n)},oP=async(e,t)=>{const n=e.body,i=Gn(n),r=new _w({$metadata:cP(e),...i});return An(r,n)},sP=async(e,t)=>{const n=e.body,i=Gn(n),r=new kw({$metadata:cP(e),...i});return An(r,n)},aP=(e,t)=>kn(e,{Credentials:e=>(e=>kn(e,{AccessKeyId:tn,Expiration:e=>Xt(gn(Ht(e))),SecretKey:tn,SessionToken:tn}))(e),IdentityId:tn}),cP=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),dP=Rn(Ow),uP=async(e,t,n,i,r)=>{const{hostname:o,protocol:s="https",port:a,path:c}=await e.endpoint(),d={protocol:s,hostname:o,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:t};return void 0!==r&&(d.body=r),new l(d)};function lP(e){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${e}`}}class pP extends(Ut.classBuilder().ep(Qv).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").f(Gw,zw).ser(Vw).de(Ww).build()){}class hP extends(Ut.classBuilder().ep(Qv).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").f(Hw,void 0).ser(qw).de(Kw).build()){}var fP=Object.freeze({__proto__:null,CognitoIdentityClient:class extends $t{config;constructor(...[e]){const i=xw(e||{});super(i),this.initConfig=i;var r;const o=pe((r=i,Object.assign(r,{useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}))),s=Tr(o),a=zi(s),c=((e,i)=>{const r=Object.assign(Go(e),In(e),t(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,i=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){i=e},credentials:()=>i}})(e));return i.forEach((e=>e.configure(r))),Object.assign(e,jo(r),Nn(r),n(r),{httpAuthSchemes:(o=r).httpAuthSchemes(),httpAuthSchemeProvider:o.httpAuthSchemeProvider(),credentials:o.credentials()});var o})((e=>{const t=Dt(e);return Object.assign(t,{})})(sr(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use(Fi(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(qi(this.config)),this.middlewareStack.use(m(this.config)),this.middlewareStack.use(y(this.config)),this.middlewareStack.use(v(this.config)),this.middlewareStack.use(T(this.config,{httpAuthSchemeParametersProvider:Yv,identityProviderConfigProvider:async e=>new ae({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(D(this.config))}destroy(){super.destroy()}},GetCredentialsForIdentityCommand:pP,GetIdCommand:hP});const mP=async(e,t,n)=>({operation:w(t).operation,region:await P(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const gP=e=>{const t=[];if("AssumeRoleWithWebIdentity"===e.operation)t.push({schemeId:"smithy.api#noAuth"});else t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e));return t},yP=e=>{const t=(n=e,Object.assign(n,{stsClientCtor:oE}));var n;const i=Dt(t);return Object.assign(i,{})},bP={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"}};var SP="3.782.0";const vP="required",wP="type",PP="fn",EP="argv",CP="ref",TP=!1,AP=!0,RP="booleanEquals",xP="stringEquals",OP="sigv4",IP="us-east-1",NP="endpoint",DP="https://sts.{Region}.{PartitionResult#dnsSuffix}",MP="tree",LP="error",kP="getAttr",_P={[vP]:!1,[wP]:"String"},FP={[vP]:!0,default:!1,[wP]:"Boolean"},$P={[CP]:"Endpoint"},UP={[PP]:"isSet",[EP]:[{[CP]:"Region"}]},BP={[CP]:"Region"},GP={[PP]:"aws.partition",[EP]:[BP],assign:"PartitionResult"},jP={[CP]:"UseFIPS"},zP={[CP]:"UseDualStack"},HP={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:OP,signingName:"sts",signingRegion:IP}]},headers:{}},VP={},qP={conditions:[{[PP]:xP,[EP]:[BP,"aws-global"]}],[NP]:HP,[wP]:NP},WP={[PP]:RP,[EP]:[jP,!0]},KP={[PP]:RP,[EP]:[zP,!0]},YP={[PP]:kP,[EP]:[{[CP]:"PartitionResult"},"supportsFIPS"]},ZP={[CP]:"PartitionResult"},QP={[PP]:RP,[EP]:[!0,{[PP]:kP,[EP]:[ZP,"supportsDualStack"]}]},JP=[{[PP]:"isSet",[EP]:[$P]}],XP=[WP],eE=[KP],tE={parameters:{Region:_P,UseDualStack:FP,UseFIPS:FP,Endpoint:_P,UseGlobalEndpoint:FP},rules:[{conditions:[{[PP]:RP,[EP]:[{[CP]:"UseGlobalEndpoint"},AP]},{[PP]:"not",[EP]:JP},UP,GP,{[PP]:RP,[EP]:[jP,TP]},{[PP]:RP,[EP]:[zP,TP]}],rules:[{conditions:[{[PP]:xP,[EP]:[BP,"ap-northeast-1"]}],endpoint:HP,[wP]:NP},{conditions:[{[PP]:xP,[EP]:[BP,"ap-south-1"]}],endpoint:HP,[wP]:NP},{conditions:[{[PP]:xP,[EP]:[BP,"ap-southeast-1"]}],endpoint:HP,[wP]:NP},{conditions:[{[PP]:xP,[EP]:[BP,"ap-southeast-2"]}],endpoint:HP,[wP]:NP},qP,{conditions:[{[PP]:xP,[EP]:[BP,"ca-central-1"]}],endpoint:HP,[wP]:NP},{conditions:[{[PP]:xP,[EP]:[BP,"eu-central-1"]}],endpoint:HP,[wP]:NP},{conditions:[{[PP]:xP,[EP]:[BP,"eu-north-1"]}],endpoint:HP,[wP]:NP},{conditions:[{[PP]:xP,[EP]:[BP,"eu-west-1"]}],endpoint:HP,[wP]:NP},{conditions:[{[PP]:xP,[EP]:[BP,"eu-west-2"]}],endpoint:HP,[wP]:NP},{conditions:[{[PP]:xP,[EP]:[BP,"eu-west-3"]}],endpoint:HP,[wP]:NP},{conditions:[{[PP]:xP,[EP]:[BP,"sa-east-1"]}],endpoint:HP,[wP]:NP},{conditions:[{[PP]:xP,[EP]:[BP,IP]}],endpoint:HP,[wP]:NP},{conditions:[{[PP]:xP,[EP]:[BP,"us-east-2"]}],endpoint:HP,[wP]:NP},{conditions:[{[PP]:xP,[EP]:[BP,"us-west-1"]}],endpoint:HP,[wP]:NP},{conditions:[{[PP]:xP,[EP]:[BP,"us-west-2"]}],endpoint:HP,[wP]:NP},{endpoint:{url:DP,properties:{authSchemes:[{name:OP,signingName:"sts",signingRegion:"{Region}"}]},headers:VP},[wP]:NP}],[wP]:MP},{conditions:JP,rules:[{conditions:XP,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[wP]:LP},{conditions:eE,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[wP]:LP},{endpoint:{url:$P,properties:VP,headers:VP},[wP]:NP}],[wP]:MP},{conditions:[UP],rules:[{conditions:[GP],rules:[{conditions:[WP,KP],rules:[{conditions:[{[PP]:RP,[EP]:[AP,YP]},QP],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:VP,headers:VP},[wP]:NP}],[wP]:MP},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[wP]:LP}],[wP]:MP},{conditions:XP,rules:[{conditions:[{[PP]:RP,[EP]:[YP,AP]}],rules:[{conditions:[{[PP]:xP,[EP]:[{[PP]:kP,[EP]:[ZP,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:VP,headers:VP},[wP]:NP},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:VP,headers:VP},[wP]:NP}],[wP]:MP},{error:"FIPS is enabled but this partition does not support FIPS",[wP]:LP}],[wP]:MP},{conditions:eE,rules:[{conditions:[QP],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:VP,headers:VP},[wP]:NP}],[wP]:MP},{error:"DualStack is enabled but this partition does not support DualStack",[wP]:LP}],[wP]:MP},qP,{endpoint:{url:DP,properties:VP,headers:VP},[wP]:NP}],[wP]:MP}],[wP]:MP},{error:"Invalid Configuration: Missing Region",[wP]:LP}]},nE=new he({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),iE=(e,t={})=>nE.get(e,(()=>$e(tE,{endpointParams:e,logger:t.logger})));be.aws=Ge;const rE=e=>{const t=$o(e),n=()=>t().then(On),i=(e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??U,base64Encoder:e?.base64Encoder??z,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??iE,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??gP,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Ke},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ce}],logger:e?.logger??new Mn,serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??er,utf8Decoder:e?.utf8Decoder??B,utf8Encoder:e?.utf8Encoder??j}))(e);return{...i,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??lo,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ao({serviceId:i.serviceId,clientVersion:SP}),maxAttempts:e?.maxAttempts??3,region:e?.region??co("Region is missing"),requestHandler:Q.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||cr),sha256:e?.sha256??io,streamCollector:e?.streamCollector??J,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Ui)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Bi))}};class oE extends $t{config;constructor(...[e]){const i=rE(e||{});super(i),this.initConfig=i;var r;const o=pe((r=i,Object.assign(r,{useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,useGlobalEndpoint:r.useGlobalEndpoint??!1,defaultSigningName:"sts"}))),s=Tr(o),a=zi(s),c=sr(a),d=((e,i)=>{const r=Object.assign(Go(e),In(e),t(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,i=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){i=e},credentials:()=>i}})(e));return i.forEach((e=>e.configure(r))),Object.assign(e,jo(r),Nn(r),n(r),{httpAuthSchemes:(o=r).httpAuthSchemes(),httpAuthSchemeProvider:o.httpAuthSchemeProvider(),credentials:o.credentials()});var o})(yP(c),e?.extensions||[]);this.config=d,this.middlewareStack.use(Fi(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(qi(this.config)),this.middlewareStack.use(m(this.config)),this.middlewareStack.use(y(this.config)),this.middlewareStack.use(v(this.config)),this.middlewareStack.use(T(this.config,{httpAuthSchemeParametersProvider:mP,identityProviderConfigProvider:async e=>new ae({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(D(this.config))}destroy(){super.destroy()}}class sE extends Tn{constructor(e){super(e),Object.setPrototypeOf(this,sE.prototype)}}const aE=e=>({...e,...e.SecretAccessKey&&{SecretAccessKey:Gt}}),cE=e=>({...e,...e.Credentials&&{Credentials:aE(e.Credentials)}});class dE extends sE{name="ExpiredTokenException";$fault="client";constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,dE.prototype)}}class uE extends sE{name="MalformedPolicyDocumentException";$fault="client";constructor(e){super({name:"MalformedPolicyDocumentException",$fault:"client",...e}),Object.setPrototypeOf(this,uE.prototype)}}class lE extends sE{name="PackedPolicyTooLargeException";$fault="client";constructor(e){super({name:"PackedPolicyTooLargeException",$fault:"client",...e}),Object.setPrototypeOf(this,lE.prototype)}}class pE extends sE{name="RegionDisabledException";$fault="client";constructor(e){super({name:"RegionDisabledException",$fault:"client",...e}),Object.setPrototypeOf(this,pE.prototype)}}class hE extends sE{name="IDPRejectedClaimException";$fault="client";constructor(e){super({name:"IDPRejectedClaimException",$fault:"client",...e}),Object.setPrototypeOf(this,hE.prototype)}}class fE extends sE{name="InvalidIdentityTokenException";$fault="client";constructor(e){super({name:"InvalidIdentityTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,fE.prototype)}}const mE=e=>({...e,...e.WebIdentityToken&&{WebIdentityToken:Gt}}),gE=e=>({...e,...e.Credentials&&{Credentials:aE(e.Credentials)}});class yE extends sE{name="IDPCommunicationErrorException";$fault="client";constructor(e){super({name:"IDPCommunicationErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,yE.prototype)}}const bE=async(e,t)=>{const n=XE;let i;return i=FC({...IE(e),[tC]:iC,[DC]:eC}),JE(t,n,"/",void 0,i)},SE=async(e,t)=>{const n=XE;let i;return i=FC({...NE(e),[tC]:sC,[DC]:eC}),JE(t,n,"/",void 0,i)},vE=async(e,t)=>{if(e.statusCode>=300)return PE(e,t);const n=await Ri(e.body,t);let i={};i=BE(n.AssumeRoleResult);return{$metadata:ZE(e),...i}},wE=async(e,t)=>{if(e.statusCode>=300)return PE(e,t);const n=await Ri(e.body,t);let i={};i=GE(n.AssumeRoleWithWebIdentityResult);return{$metadata:ZE(e),...i}},PE=async(e,t)=>{const n={...e,body:await xi(e.body,t)},i=$C(e,n.body);switch(i){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await EE(n);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await RE(n);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await xE(n);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await OE(n);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await CE(n);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await TE(n);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await AE(n);default:const t=n.body;return QE({output:e,parsedBody:t.Error,errorCode:i})}},EE=async(e,t)=>{const n=e.body,i=zE(n.Error),r=new dE({$metadata:ZE(e),...i});return An(r,n)},CE=async(e,t)=>{const n=e.body,i=HE(n.Error),r=new yE({$metadata:ZE(e),...i});return An(r,n)},TE=async(e,t)=>{const n=e.body,i=VE(n.Error),r=new hE({$metadata:ZE(e),...i});return An(r,n)},AE=async(e,t)=>{const n=e.body,i=qE(n.Error),r=new fE({$metadata:ZE(e),...i});return An(r,n)},RE=async(e,t)=>{const n=e.body,i=WE(n.Error),r=new uE({$metadata:ZE(e),...i});return An(r,n)},xE=async(e,t)=>{const n=e.body,i=KE(n.Error),r=new lE({$metadata:ZE(e),...i});return An(r,n)},OE=async(e,t)=>{const n=e.body,i=YE(n.Error),r=new pE({$metadata:ZE(e),...i});return An(r,n)},IE=(e,t)=>{const n={};if(null!=e[PC]&&(n[PC]=e[PC]),null!=e[EC]&&(n[EC]=e[EC]),null!=e[gC]){const t=DE(e[gC]);0===e[gC]?.length&&(n.PolicyArns=[]),Object.entries(t).forEach((([e,t])=>{n[`PolicyArns.${e}`]=t}))}if(null!=e[mC]&&(n[mC]=e[mC]),null!=e[lC]&&(n[lC]=e[lC]),null!=e[OC]){const t=$E(e[OC]);0===e[OC]?.length&&(n.Tags=[]),Object.entries(t).forEach((([e,t])=>{n[`Tags.${e}`]=t}))}if(null!=e[NC]){const t=FE(e[NC]);0===e[NC]?.length&&(n.TransitiveTagKeys=[]),Object.entries(t).forEach((([e,t])=>{n[`TransitiveTagKeys.${e}`]=t}))}if(null!=e[hC]&&(n[hC]=e[hC]),null!=e[RC]&&(n[RC]=e[RC]),null!=e[IC]&&(n[IC]=e[IC]),null!=e[AC]&&(n[AC]=e[AC]),null!=e[bC]){const t=kE(e[bC]);0===e[bC]?.length&&(n.ProvidedContexts=[]),Object.entries(t).forEach((([e,t])=>{n[`ProvidedContexts.${e}`]=t}))}return n},NE=(e,t)=>{const n={};if(null!=e[PC]&&(n[PC]=e[PC]),null!=e[EC]&&(n[EC]=e[EC]),null!=e[LC]&&(n[LC]=e[LC]),null!=e[SC]&&(n[SC]=e[SC]),null!=e[gC]){const t=DE(e[gC]);0===e[gC]?.length&&(n.PolicyArns=[]),Object.entries(t).forEach((([e,t])=>{n[`PolicyArns.${e}`]=t}))}return null!=e[mC]&&(n[mC]=e[mC]),null!=e[lC]&&(n[lC]=e[lC]),n},DE=(e,t)=>{const n={};let i=1;for(const t of e){if(null===t)continue;const e=ME(t);Object.entries(e).forEach((([e,t])=>{n[`member.${i}.${e}`]=t})),i++}return n},ME=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=e[kC]),n},LE=(e,t)=>{const n={};return null!=e[yC]&&(n[yC]=e[yC]),null!=e[uC]&&(n[uC]=e[uC]),n},kE=(e,t)=>{const n={};let i=1;for(const t of e){if(null===t)continue;const e=LE(t);Object.entries(e).forEach((([e,t])=>{n[`member.${i}.${e}`]=t})),i++}return n},_E=(e,t)=>{const n={};return null!=e[fC]&&(n[fC]=e[fC]),null!=e[MC]&&(n[MC]=e[MC]),n},FE=(e,t)=>{const n={};let i=1;for(const t of e)null!==t&&(n[`member.${i}`]=t,i++);return n},$E=(e,t)=>{const n={};let i=1;for(const t of e){if(null===t)continue;const e=_E(t);Object.entries(e).forEach((([e,t])=>{n[`member.${i}.${e}`]=t})),i++}return n},UE=(e,t)=>{const n={};return null!=e[rC]&&(n[rC]=tn(e[rC])),null!=e[aC]&&(n[aC]=tn(e[aC])),n},BE=(e,t)=>{const n={};return null!=e[dC]&&(n[dC]=jE(e[dC])),null!=e[oC]&&(n[oC]=UE(e[oC])),null!=e[vC]&&(n[vC]=an(e[vC])),null!=e[AC]&&(n[AC]=tn(e[AC])),n},GE=(e,t)=>{const n={};return null!=e[dC]&&(n[dC]=jE(e[dC])),null!=e[TC]&&(n[TC]=tn(e[TC])),null!=e[oC]&&(n[oC]=UE(e[oC])),null!=e[vC]&&(n[vC]=an(e[vC])),null!=e[wC]&&(n[wC]=tn(e[wC])),null!=e[cC]&&(n[cC]=tn(e[cC])),null!=e[AC]&&(n[AC]=tn(e[AC])),n},jE=(e,t)=>{const n={};return null!=e[nC]&&(n[nC]=tn(e[nC])),null!=e[CC]&&(n[CC]=tn(e[CC])),null!=e[xC]&&(n[xC]=tn(e[xC])),null!=e[pC]&&(n[pC]=Xt(mn(e[pC]))),n},zE=(e,t)=>{const n={};return null!=e[_C]&&(n[_C]=tn(e[_C])),n},HE=(e,t)=>{const n={};return null!=e[_C]&&(n[_C]=tn(e[_C])),n},VE=(e,t)=>{const n={};return null!=e[_C]&&(n[_C]=tn(e[_C])),n},qE=(e,t)=>{const n={};return null!=e[_C]&&(n[_C]=tn(e[_C])),n},WE=(e,t)=>{const n={};return null!=e[_C]&&(n[_C]=tn(e[_C])),n},KE=(e,t)=>{const n={};return null!=e[_C]&&(n[_C]=tn(e[_C])),n},YE=(e,t)=>{const n={};return null!=e[_C]&&(n[_C]=tn(e[_C])),n},ZE=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),QE=Rn(sE),JE=async(e,t,n,i,r)=>{const{hostname:o,protocol:s="https",port:a,path:c}=await e.endpoint(),d={protocol:s,hostname:o,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:t};return void 0!==r&&(d.body=r),new l(d)},XE={"content-type":"application/x-www-form-urlencoded"},eC="2011-06-15",tC="Action",nC="AccessKeyId",iC="AssumeRole",rC="AssumedRoleId",oC="AssumedRoleUser",sC="AssumeRoleWithWebIdentity",aC="Arn",cC="Audience",dC="Credentials",uC="ContextAssertion",lC="DurationSeconds",pC="Expiration",hC="ExternalId",fC="Key",mC="Policy",gC="PolicyArns",yC="ProviderArn",bC="ProvidedContexts",SC="ProviderId",vC="PackedPolicySize",wC="Provider",PC="RoleArn",EC="RoleSessionName",CC="SecretAccessKey",TC="SubjectFromWebIdentityToken",AC="SourceIdentity",RC="SerialNumber",xC="SessionToken",OC="Tags",IC="TokenCode",NC="TransitiveTagKeys",DC="Version",MC="Value",LC="WebIdentityToken",kC="arn",_C="message",FC=e=>Object.entries(e).map((([e,t])=>re(e)+"="+re(t))).join("&"),$C=(e,t)=>void 0!==t.Error?.Code?t.Error.Code:404==e.statusCode?"NotFound":void 0;class UC extends(Ut.classBuilder().ep(bP).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,cE).ser(bE).de(vE).build()){}class BC extends(Ut.classBuilder().ep(bP).m((function(e,t,n,i){return[x(n,this.serialize,this.deserialize),or(n,e.getEndpointParameterInstructions())]})).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(mE,gE).ser(SE).de(wE).build()){}const GC={AssumeRoleCommand:UC,AssumeRoleWithWebIdentityCommand:BC};class jC extends oE{}jt(GC,jC);const zC="us-east-1",HC=(e,t)=>{let n;return async i=>{if(!n){const{logger:i=e?.parentClientConfig?.logger,region:r,requestHandler:o=e?.parentClientConfig?.requestHandler,credentialProviderLogger:s}=e,a=await(async(e,t,n)=>{const i="function"==typeof e?await e():e,r="function"==typeof t?await t():t;return n?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${i} (provider)`,`${r} (parent client)`,`${zC} (STS default)`),i??r??zC})(r,e?.parentClientConfig?.region,s),c=!VC(o);n=new t({profile:e?.parentClientConfig?.profile,region:a,requestHandler:c?o:void 0,logger:i})}const{Credentials:r,AssumedRoleUser:o}=await n.send(new BC(i));if(!r||!r.AccessKeyId||!r.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${i.RoleArn}`);const s=(e=>{if("string"==typeof e?.Arn){const t=e.Arn.split(":");if(t.length>4&&""!==t[4])return t[4]}})(o),a={accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,sessionToken:r.SessionToken,expiration:r.Expiration,...r.CredentialScope&&{credentialScope:r.CredentialScope},...s&&{accountId:s}};return s&&je(a,"RESOLVED_ACCOUNT_ID","T"),je(a,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),a}},VC=e=>"h2"===e?.metadata?.handlerProtocol,qC=(e,t)=>t?class extends e{constructor(e){super(e);for(const e of t)this.middlewareStack.use(e)}}:e;var WC=Object.freeze({__proto__:null,$Command:Ut,AssumeRoleCommand:UC,AssumeRoleResponseFilterSensitiveLog:cE,AssumeRoleWithWebIdentityCommand:BC,AssumeRoleWithWebIdentityRequestFilterSensitiveLog:mE,AssumeRoleWithWebIdentityResponseFilterSensitiveLog:gE,CredentialsFilterSensitiveLog:aE,ExpiredTokenException:dE,IDPCommunicationErrorException:yE,IDPRejectedClaimException:hE,InvalidIdentityTokenException:fE,MalformedPolicyDocumentException:uE,PackedPolicyTooLargeException:lE,RegionDisabledException:pE,STS:jC,STSClient:oE,STSServiceException:sE,__Client:$t,getDefaultRoleAssumerWithWebIdentity:(e={},t)=>HC(e,qC(oE,t))}),KC=Object.freeze({__proto__:null,AssumeRoleCommand:UC,STSClient:oE});e.$Command=Ut,e.AccessDeniedException=Vo,e.AssociateTrackerConsumerCommand=Nu,e.BatchDeleteDevicePositionHistoryCommand=Du,e.BatchDeleteGeofenceCommand=Mu,e.BatchEvaluateGeofencesCommand=Lu,e.BatchEvaluateGeofencesRequestFilterSensitiveLog=ts,e.BatchGetDevicePositionCommand=ku,e.BatchGetDevicePositionResponseFilterSensitiveLog=is,e.BatchPutGeofenceCommand=_u,e.BatchPutGeofenceRequestEntryFilterSensitiveLog=os,e.BatchPutGeofenceRequestFilterSensitiveLog=ss,e.BatchUpdateDevicePositionCommand=Fu,e.BatchUpdateDevicePositionRequestFilterSensitiveLog=as,e.CalculateRouteCommand=$u,e.CalculateRouteMatrixCommand=Uu,e.CalculateRouteMatrixRequestFilterSensitiveLog=fs,e.CalculateRouteMatrixResponseFilterSensitiveLog=ms,e.CalculateRouteRequestFilterSensitiveLog=cs,e.CalculateRouteResponseFilterSensitiveLog=hs,e.CalculateRouteSummaryFilterSensitiveLog=ps,e.CircleFilterSensitiveLog=e=>({...e,...e.Center&&{Center:Gt}}),e.ConflictException=qo,e.CreateGeofenceCollectionCommand=Bu,e.CreateKeyCommand=Gu,e.CreateKeyResponseFilterSensitiveLog=Jo,e.CreateMapCommand=ju,e.CreatePlaceIndexCommand=zu,e.CreateRouteCalculatorCommand=Hu,e.CreateTrackerCommand=Vu,e.DeleteGeofenceCollectionCommand=qu,e.DeleteKeyCommand=Wu,e.DeleteMapCommand=Ku,e.DeletePlaceIndexCommand=Yu,e.DeleteRouteCalculatorCommand=Zu,e.DeleteTrackerCommand=Qu,e.DescribeGeofenceCollectionCommand=Ju,e.DescribeKeyCommand=Xu,e.DescribeKeyResponseFilterSensitiveLog=Xo,e.DescribeMapCommand=el,e.DescribePlaceIndexCommand=tl,e.DescribeRouteCalculatorCommand=nl,e.DescribeTrackerCommand=il,e.DevicePositionFilterSensitiveLog=ns,e.DevicePositionUpdateFilterSensitiveLog=es,e.DeviceStateFilterSensitiveLog=gs,e.DisassociateTrackerConsumerCommand=rl,e.ForecastGeofenceEventsCommand=ol,e.ForecastGeofenceEventsDeviceStateFilterSensitiveLog=bs,e.ForecastGeofenceEventsRequestFilterSensitiveLog=Ss,e.ForecastGeofenceEventsResponseFilterSensitiveLog=vs,e.ForecastedEventFilterSensitiveLog=ys,e.GeoMapsClient=Zp,e.GeoPlacesClient=nm,e.GeoRoutesClient=vy,e.GeofenceGeometryFilterSensitiveLog=rs,e.GetDevicePositionCommand=sl,e.GetDevicePositionHistoryCommand=al,e.GetDevicePositionHistoryResponseFilterSensitiveLog=As,e.GetDevicePositionResponseFilterSensitiveLog=Ts,e.GetGeofenceCommand=cl,e.GetGeofenceResponseFilterSensitiveLog=ws,e.GetMapGlyphsCommand=dl,e.GetMapGlyphsRequestFilterSensitiveLog=Rs,e.GetMapSpritesCommand=ul,e.GetMapSpritesRequestFilterSensitiveLog=xs,e.GetMapStyleDescriptorCommand=ll,e.GetMapStyleDescriptorRequestFilterSensitiveLog=Os,e.GetMapTileCommand=pl,e.GetMapTileRequestFilterSensitiveLog=Is,e.GetPlaceCommand=hl,e.GetPlaceRequestFilterSensitiveLog=Ns,e.GetPlaceResponseFilterSensitiveLog=Ls,e.InferredStateFilterSensitiveLog=ks,e.InternalServerException=Wo,e.LegFilterSensitiveLog=ls,e.LegGeometryFilterSensitiveLog=ds,e.ListDevicePositionsCommand=fl,e.ListDevicePositionsRequestFilterSensitiveLog=Fs,e.ListDevicePositionsResponseEntryFilterSensitiveLog=$s,e.ListDevicePositionsResponseFilterSensitiveLog=Us,e.ListGeofenceCollectionsCommand=ml,e.ListGeofenceResponseEntryFilterSensitiveLog=Ps,e.ListGeofencesCommand=gl,e.ListGeofencesResponseFilterSensitiveLog=Es,e.ListKeysCommand=yl,e.ListMapsCommand=bl,e.ListPlaceIndexesCommand=Sl,e.ListRouteCalculatorsCommand=vl,e.ListTagsForResourceCommand=wl,e.ListTrackerConsumersCommand=Pl,e.ListTrackersCommand=El,e.Location=$l,e.LocationClient=zo,e.LocationServiceException=Ho,e.PlaceFilterSensitiveLog=Ms,e.PlaceGeometryFilterSensitiveLog=Ds,e.PutGeofenceCommand=Cl,e.PutGeofenceRequestFilterSensitiveLog=Cs,e.ResourceNotFoundException=Qo,e.SearchForPositionResultFilterSensitiveLog=Gs,e.SearchForTextResultFilterSensitiveLog=Ks,e.SearchPlaceIndexForPositionCommand=Tl,e.SearchPlaceIndexForPositionRequestFilterSensitiveLog=Bs,e.SearchPlaceIndexForPositionResponseFilterSensitiveLog=zs,e.SearchPlaceIndexForPositionSummaryFilterSensitiveLog=js,e.SearchPlaceIndexForSuggestionsCommand=Al,e.SearchPlaceIndexForSuggestionsRequestFilterSensitiveLog=Hs,e.SearchPlaceIndexForSuggestionsResponseFilterSensitiveLog=qs,e.SearchPlaceIndexForSuggestionsSummaryFilterSensitiveLog=Vs,e.SearchPlaceIndexForTextCommand=Rl,e.SearchPlaceIndexForTextRequestFilterSensitiveLog=Ws,e.SearchPlaceIndexForTextResponseFilterSensitiveLog=Zs,e.SearchPlaceIndexForTextSummaryFilterSensitiveLog=Ys,e.ServiceQuotaExceededException=Ko,e.StepFilterSensitiveLog=us,e.TagResourceCommand=xl,e.ThrottlingException=Yo,e.TrackingFilterGeometryFilterSensitiveLog=_s,e.UntagResourceCommand=Ol,e.UpdateGeofenceCollectionCommand=Il,e.UpdateKeyCommand=Nl,e.UpdateMapCommand=Dl,e.UpdatePlaceIndexCommand=Ml,e.UpdateRouteCalculatorCommand=Ll,e.UpdateTrackerCommand=kl,e.ValidationException=Zo,e.VerifyDevicePositionCommand=_l,e.VerifyDevicePositionRequestFilterSensitiveLog=Qs,e.VerifyDevicePositionResponseFilterSensitiveLog=Js,e.__Client=$t,e.fromCognitoIdentity=e=>Ql({...e}),e.fromCognitoIdentityPool=e=>function({accountId:e,cache:t=rp(),client:n,clientConfig:i,customRoleArn:r,identityPoolId:o,logins:s,userIdentifier:a=(s&&0!==Object.keys(s).length?void 0:"ANONYMOUS"),logger:c,parentClientConfig:d}){c?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const u=a?`aws:cognito-identity-credentials:${o}:${a}`:void 0;let l=async a=>{const{GetIdCommand:p,CognitoIdentityClient:h}=await Promise.resolve().then((function(){return fP})),f=e=>i?.[e]??d?.[e]??a?.callerClientConfig?.[e],m=n??new h(Object.assign({},i??{},{region:f("region"),profile:f("profile")}));let g=u&&await t.getItem(u);if(!g){const{IdentityId:n=op(c)}=await m.send(new p({AccountId:e,IdentityPoolId:o,Logins:s?await Zl(s):void 0}));g=n,u&&Promise.resolve(t.setItem(u,g)).catch((()=>{}))}return l=Ql({client:m,customRoleArn:r,logins:s,identityId:g}),l(a)};return e=>l(e).catch((async e=>{throw u&&Promise.resolve(t.removeItem(u)).catch((()=>{})),e}))}({...e}),e.fromHttp=(e={})=>{let t;e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");const n=e.credentialsFullUri;if(!n)throw new Ze("No HTTP credential provider host provided.",{logger:e.logger});t=n;const i=new URL(t);((e,t)=>{if("https:"!==e.protocol&&"169.254.170.2"!==e.hostname&&"169.254.170.23"!==e.hostname&&"[fd00:ec2::23]"!==e.hostname){if(e.hostname.includes("[")){if("[::1]"===e.hostname||"[0000:0000:0000:0000:0000:0000:0000:0001]"===e.hostname)return}else{if("localhost"===e.hostname)return;const t=e.hostname.split("."),n=e=>{const t=parseInt(e,10);return 0<=t&&t<=255};if("127"===t[0]&&n(t[1])&&n(t[2])&&n(t[3])&&4===t.length)return}throw new Ze("URL not accepted. It must either be HTTPS or match one of the following:\n - loopback CIDR 127.0.0.0/8 or [::1/128]\n - ECS container host 169.254.170.2\n - EKS container host 169.254.170.23 or [fd00:ec2::23]",{logger:t})}})(i,e.logger);const r=new Q;return o=async()=>{const t=function(e){return new l({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce(((e,[t,n])=>(e[t]=n,e)),{}),fragment:e.hash})}(i);return e.authorizationToken&&(t.headers.Authorization=e.authorizationToken),async function(e,t){const n=te(e.body),i=await n.transformToString();if(200===e.statusCode){const e=JSON.parse(i);if("string"!=typeof e.AccessKeyId||"string"!=typeof e.SecretAccessKey||"string"!=typeof e.Token||"string"!=typeof e.Expiration)throw new Ze("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:t});return{accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:hn(e.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let n={};try{n=JSON.parse(i)}catch(e){}throw Object.assign(new Ze(`Server responded with status: ${e.statusCode}`,{logger:t}),{Code:n.Code,Message:n.Message})}throw new Ze(`Server responded with status: ${e.statusCode}`,{logger:t})}((await r.handle(t)).response)},s=e.maxRetries??3,a=e.timeout??1e3,async()=>{for(let e=0;e<s;++e)try{return await o()}catch(e){await new Promise((e=>setTimeout(e,a)))}return await o()};var o,s,a},e.fromTemporaryCredentials=(e,t,n)=>{let i;return async(r={})=>{const{callerClientConfig:o}=r,s=e.clientConfig?.profile??o?.profile,a=e.logger??o?.logger;a?.debug("@aws-sdk/credential-providers - fromTemporaryCredentials (STS)");const c={...e.params,RoleSessionName:e.params.RoleSessionName??"aws-sdk-js-"+Date.now()};if(c?.SerialNumber){if(!e.mfaCodeProvider)throw new Ze("Temporary credential requires multi-factor authentication, but no MFA code callback was provided.",{tryNextLink:!1,logger:a});c.TokenCode=await e.mfaCodeProvider(c?.SerialNumber)}const{AssumeRoleCommand:d,STSClient:u}=await Promise.resolve().then((function(){return KC}));if(!i){const r="function"==typeof t?t():void 0,c=[e.masterCredentials,e.clientConfig?.credentials,void 0,o?.credentialDefaultProvider?.(),r];let d="STS client default credentials";if(c[0])d="options.masterCredentials";else if(c[1])d="options.clientConfig.credentials";else{if(c[2])throw d="caller client's credentials",new Error("fromTemporaryCredentials recursion in callerClientConfig.credentials");c[3]?d="caller client's credentialDefaultProvider":c[4]&&(d="AWS SDK default credentials")}const l=[e.clientConfig?.region,o?.region,await(n?.({profile:s})),"us-east-1"];let p="default partition's default region";l[0]?p="options.clientConfig.region":l[1]?p="caller client's region":l[2]&&(p="file or env region");const h=[sp(e.clientConfig?.requestHandler),sp(o?.requestHandler)];let f="STS default requestHandler";h[0]?f="options.clientConfig.requestHandler":h[1]&&(f="caller client's requestHandler"),a?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ${p}=${await M(ap(l))()}, ${d}, ${f}.`),i=new u({...e.clientConfig,credentials:ap(c),logger:a,profile:s,region:ap(l),requestHandler:ap(h)})}if(e.clientPlugins)for(const t of e.clientPlugins)i.middlewareStack.use(t);const{Credentials:l}=await i.send(new d(c));if(!l||!l.AccessKeyId||!l.SecretAccessKey)throw new Ze(`Invalid response from STS.assumeRole call with role ${c.RoleArn}`,{logger:a});return{accessKeyId:l.AccessKeyId,secretAccessKey:l.SecretAccessKey,sessionToken:l.SessionToken,expiration:l.Expiration,credentialScope:l.CredentialScope}}},e.fromWebToken=e=>(e=>async t=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:n,roleSessionName:i,webIdentityToken:r,providerId:o,policyArns:s,policy:a,durationSeconds:c}=e;let{roleAssumerWithWebIdentity:d}=e;if(!d){const{getDefaultRoleAssumerWithWebIdentity:n}=await Promise.resolve().then((function(){return WC}));d=n({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...t?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return d({RoleArn:n,RoleSessionName:i??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:r,ProviderId:o,PolicyArns:s,Policy:a,DurationSeconds:c})})({...e}),e.maps=Ef,e.paginateForecastGeofenceEvents=Ul,e.paginateGetDevicePositionHistory=Bl,e.paginateListDevicePositions=Gl,e.paginateListGeofenceCollections=jl,e.paginateListGeofences=zl,e.paginateListKeys=Hl,e.paginateListMaps=Vl,e.paginateListPlaceIndexes=ql,e.paginateListRouteCalculators=Wl,e.paginateListTrackerConsumers=Kl,e.paginateListTrackers=Yl,e.places=Gg,e.routes=Kv,e.withAPIKey=up.withAPIKey,e.withIdentityPoolId=up.withIdentityPoolId}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).amazonLocationClient={})}(this,(function(e){"use strict";const t=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler:()=>e.httpHandler,updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs:()=>e.httpHandler.httpHandlerConfigs()}),n=e=>({httpHandler:e.httpHandler()});var r,i;!function(e){e.HTTP="http",e.HTTPS="https"}(r||(r={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(i||(i={}));const s="__smithy_context";class o{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 t=new o({...e,headers:{...e.headers}});var n;return t.query&&(t.query=(n=t.query,Object.keys(n).reduce(((e,t)=>{const r=n[t];return{...e,[t]:Array.isArray(r)?[...r]:r}}),{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return o.clone(this)}}class a{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 t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const c={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},u=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{if(!o.isInstance(n.request))return t(n);const{request:r}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.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 e=r.hostname;null!=r.port&&(e+=`:${r.port}`),r.headers.host=e}return t(n)})(e),c)}}),l={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},d=e=>({applyToStack:e=>{e.add(((e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:s,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,l=c??t.inputFilterSensitiveLog,d=u??t.outputFilterSensitiveLog,{$metadata:p,...h}=r.output;return o?.info?.({clientName:i,commandName:s,input:l(n.input),output:d(h),metadata:p}),r}catch(e){const{clientName:r,commandName:i,logger:s,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:a}=o,c=a??t.inputFilterSensitiveLog;throw s?.error?.({clientName:r,commandName:i,input:c(n.input),error:e,metadata:e.$metadata}),e}}),l)}}),p={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},h=e=>({applyToStack:e=>{e.add((e=>async t=>e(t)),p)}}),f=e=>e[s]||(e[s]={}),g=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const m=(e,t)=>(n,r)=>async i=>{const s=((e,t)=>{if(!t||0===t.length)return e;const n=[];for(const r of t)for(const t of e)t.schemeId.split("#")[1]===r&&n.push(t);for(const t of e)n.find((({schemeId:e})=>e===t.schemeId))||n.push(t);return n})(e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),e.authSchemePreference?await e.authSchemePreference():[]),o=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),a=f(r),c=[];for(const n of s){const i=o.get(n.schemeId);if(!i){c.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const s=i.identityProvider(await t.identityProviderConfigProvider(e));if(!s){c.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:u={},signingProperties:l={}}=n.propertiesExtractor?.(e,r)||{};n.identityProperties=Object.assign(n.identityProperties||{},u),n.signingProperties=Object.assign(n.signingProperties||{},l),a.selectedHttpAuthScheme={httpAuthOption:n,identity:await s(n.identityProperties),signer:i.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(c.join("\n"));return n(i)},y={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},S=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(m(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),y)}}),R=e=>e=>{throw e},w=(e,t)=>{},v={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},E=e=>({applyToStack:e=>{e.addRelativeTo(((e,t)=>async n=>{if(!o.isInstance(n.request))return e(n);const r=f(t).selectedHttpAuthScheme;if(!r)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:s,signer:a}=r,c=await e({...n,request:await a.sign(n.request,s,i)}).catch((a.errorHandler||R)(i));return(a.successHandler||w)(c.response,i),c}),v)}}),C=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},b=async(e,t,n,r=e=>e,...i)=>{let s=new e(n);return s=r(s)??s,await t.send(s,...i)};function T(e,t,n,r,i){return async function*(s,o,...a){const c=o;let u,l=s.startingToken??c[n],d=!0;for(;d;){if(c[n]=l,c[i]=c[i]??s.pageSize,!(s.client instanceof e))throw new Error(`Invalid client, expected instance of ${e.name}`);u=await b(t,s.client,o,s.withCommand,...a),yield u;const p=l;l=P(u,r),d=!(!l||s.stopOnSameToken&&l===p)}}}const P=(e,t)=>{let n=e;const r=t.split(".");for(const e of r){if(!n||"object"!=typeof n)return;n=n[e]}return n},A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",I=Object.entries(A).reduce(((e,[t,n])=>(e[n]=Number(t),e)),{}),x=A.split(""),O=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let t=0;t<e.length;t+=4){let n=0,i=0;for(let r=t,s=t+3;r<=s;r++)if("="!==e[r]){if(!(e[r]in I))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);n|=I[e[r]]<<6*(s-r),i+=6}else n>>=6;const s=t/4*3;n>>=i%8;const o=Math.floor(i/8);for(let e=0;e<o;e++){const t=8*(o-e-1);r.setUint8(s+e,(n&255<<t)>>t)}}return new Uint8Array(n)},D=e=>(new TextEncoder).encode(e),$=e=>"string"==typeof e?D(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),M=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};function L(e){let t;t="string"==typeof e?D(e):e;const n="object"==typeof t&&"number"==typeof t.length,r="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let e=0;e<t.length;e+=3){let n=0,r=0;for(let i=e,s=Math.min(e+3,t.length);i<s;i++)n|=t[i]<<8*(s-i-1),r+=8;const s=Math.ceil(r/6);n<<=6*s-r;for(let e=1;e<=s;e++){const t=6*(s-e);i+=x[(n&63<<t)>>t]}i+="==".slice(0,4-s)}return i}class k extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return"base64"===t?k.mutate(O(e)):k.mutate(D(e));throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,k.prototype),e}transformToString(e="utf-8"){return"base64"===e?L(this):M(this)}}const N=e=>"function"==typeof ReadableStream&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),_=e=>encodeURIComponent(e).replace(/[!'()*]/g,U),U=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function F(e,t){return new Request(e,t)}function G(e=0){return new Promise(((t,n)=>{e&&setTimeout((()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",n(t)}),e)}))}const B={supported:void 0};class H{config;configProvider;static create(e){return"function"==typeof e?.handle?e:new H(e)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===B.supported&&(B.supported=Boolean("undefined"!=typeof Request&&"keepalive"in F("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const r=n??this.config.requestTimeout,i=!0===this.config.keepAlive,s=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let o=e.path;const c=function(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=_(n),Array.isArray(r))for(let e=0,i=r.length;e<i;e++)t.push(`${n}=${_(r[e])}`);else{let e=n;(r||"string"==typeof r)&&(e+=`=${_(r)}`),t.push(e)}}return t.join("&")}(e.query||{});c&&(o+=`?${c}`),e.fragment&&(o+=`#${e.fragment}`);let u="";if(null!=e.username||null!=e.password){u=`${e.username??""}:${e.password??""}@`}const{port:l,method:d}=e,p=`${e.protocol}//${u}${e.hostname}${l?`:${l}`:""}${o}`,h="GET"===d||"HEAD"===d?void 0:e.body,f={body:h,headers:new Headers(e.headers),method:d,credentials:s};this.config?.cache&&(f.cache=this.config.cache),h&&(f.duplex="half"),"undefined"!=typeof AbortController&&(f.signal=t),B.supported&&(f.keepalive=i),"function"==typeof this.config.requestInit&&Object.assign(f,this.config.requestInit(e));let g=()=>{};const m=F(p,f),y=[fetch(m).then((e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new a({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new a({headers:n,reason:e.statusText,statusCode:e.status,body:t})})))})),G(r)];return t&&y.push(new Promise(((e,n)=>{const r=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",r,{once:!0}),g=()=>e.removeEventListener("abort",r)}else t.onabort=r}))),Promise.race(y).finally(g)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n=>(n[e]=t,n)))}httpHandlerConfigs(){return this.config??{}}}const z=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise(((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(2!==r.readyState)return n(new Error("Reader aborted too early"));const e=r.result??"",i=e.indexOf(","),s=i>-1?i+1:e.length;t(e.substring(s))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)}))}(e),n=O(t);return new Uint8Array(n)}(e):async function(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:e,value:s}=await n.read();s&&(t.push(s),i+=s.length),r=e}const s=new Uint8Array(i);let o=0;for(const e of t)s.set(e,o),o+=e.length;return s}(e);const j={},q={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),j[e]=t,q[t]=e}function V(e){let t="";for(let n=0;n<e.byteLength;n++)t+=j[e[n]];return t}const W="The stream has already been transformed.",K=e=>{if(!Q(e)&&!N(e)){throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${e?.__proto__?.constructor?.name||e}`)}let t=!1;const n=async()=>{if(t)throw new Error(W);return t=!0,await z(e)};return Object.assign(e,{transformToByteArray:n,transformToString:async e=>{const t=await n();if("base64"===e)return L(t);if("hex"===e)return V(t);if(void 0===e||"utf8"===e||"utf-8"===e)return M(t);if("function"==typeof TextDecoder)return new TextDecoder(e).decode(t);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(W);if(t=!0,Q(e))return(e=>{if("function"!=typeof e.stream)throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return e.stream()})(e);if(N(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},Q=e=>"function"==typeof Blob&&e instanceof Blob,Z=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return k.mutate(e);if(!e)return k.mutate(new Uint8Array);const n=t.streamCollector(e);return k.mutate(await n)};function Y(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}const J=e=>"function"==typeof e?e():e,X=(e,t,n,r,i)=>({name:t,namespace:e,traits:n,input:r,output:i}),ee=(e,t)=>(t.find((([t])=>t.match(e)))||[void 0,void 0])[1],te={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},ne={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function re(e){return{applyToStack:t=>{t.add((e=>(t,n)=>async r=>{const{operationSchema:i}=f(n),[,s,o,a,c,u]=i??[],l=n.endpointV2?.url&&e.urlParser?async()=>e.urlParser(n.endpointV2.url):e.endpoint,d=await e.protocol.serializeRequest(X(s,o,a,c,u),r.input,{...e,...n,endpoint:l});return t({...r,request:d})})(e),ne),t.add((e=>(t,n)=>async r=>{const{response:i}=await t(r),{operationSchema:s}=f(n),[,o,c,u,l,d]=s??[];try{return{response:i,output:await e.protocol.deserializeResponse(X(o,c,u,l,d),{...e,...n},i)}}catch(e){if(Object.defineProperty(e,"$response",{value:i,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{e.message+="\n "+t}catch(e){n.logger&&"NoOpLogger"!==n.logger?.constructor?.name?n.logger?.warn?.(t):console.warn(t)}void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText);try{if(a.isInstance(i)){const{headers:t={}}=i,n=Object.entries(t);e.$metadata={httpStatusCode:i.statusCode,requestId:ee(/^x-[\w-]+-request-?id$/,n),extendedRequestId:ee(/^x-[\w-]+-id-2$/,n),cfId:ee(/^x-[\w-]+-cf-id$/,n)}}}catch(e){}}throw e}})(e),te),e.protocol.setSerdeContext(e)}}}function ie(e){if("object"==typeof e)return e;e|=0;const t={};let n=0;for(const r of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])1==(e>>n++&1)&&(t[r]=1);return t}const se=Symbol.for("@smithy/nor-struct-it");class oe{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=oe.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(e,t){this.ref=e,this.memberName=t;const n=[];let r=e,i=e;for(this._isMemberSchema=!1;ce(r);)n.push(r[1]),r=r[0],i=J(r),this._isMemberSchema=!0;if(n.length>0){this.memberTraits={};for(let e=n.length-1;e>=0;--e){const t=n[e];Object.assign(this.memberTraits,ie(t))}}else this.memberTraits=0;if(i instanceof oe){const e=this.memberTraits;return Object.assign(this,i),this.memberTraits=Object.assign({},e,i.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,void(this.memberName=t??i.memberName)}if(this.schema=J(i),ue(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&&!t)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](e){const t=this.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===this.symbol}return t}static of(e){const t=J(e);if(t instanceof oe)return t;if(ce(t)){const[n,r]=t;if(n instanceof oe)return Object.assign(n.getMergedTraits(),ie(r)),n;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(e,null,2)}.`)}return new oe(t)}getSchema(){const e=this.schema;return Array.isArray(e)&&0===e[0]?e[4]:e}getName(e=!1){const{name:t}=this;return!e&&t&&t.includes("#")?t.split("#")[1]:t||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const e=this.getSchema();return"number"==typeof e?e>=64&&e<128:1===e[0]}isMapSchema(){const e=this.getSchema();return"number"==typeof e?e>=128&&e<=255:2===e[0]}isStructSchema(){const e=this.getSchema();if("object"!=typeof e)return!1;const t=e[0];return 3===t||-3===t||4===t}isUnionSchema(){const e=this.getSchema();return"object"==typeof e&&4===e[0]}isBlobSchema(){const e=this.getSchema();return 21===e||42===e}isTimestampSchema(){const e=this.getSchema();return"number"==typeof e&&e>=4&&e<=7}isUnitSchema(){return"unit"===this.getSchema()}isDocumentSchema(){return 15===this.getSchema()}isStringSchema(){return 0===this.getSchema()}isBooleanSchema(){return 2===this.getSchema()}isNumericSchema(){return 1===this.getSchema()}isBigIntegerSchema(){return 17===this.getSchema()}isBigDecimalSchema(){return 19===this.getSchema()}isStreaming(){const{streaming:e}=this.getMergedTraits();return!!e||42===this.getSchema()}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return ie(this.memberTraits)}getOwnTraits(){return ie(this.traits)}getKeySchema(){const[e,t]=[this.isDocumentSchema(),this.isMapSchema()];if(!e&&!t)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const n=this.getSchema();return ae([e?15:n[4]??0,0],"key")}getValueSchema(){const e=this.getSchema(),[t,n,r]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],i="number"==typeof e?63&e:e&&"object"==typeof e&&(n||r)?e[3+e[0]]:t?15:void 0;if(null!=i)return ae([i,0],n?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(e){const t=this.getSchema();if(this.isStructSchema()&&t[4].includes(e)){const n=t[4].indexOf(e),r=t[5][n];return ae(ce(r)?r:[r,0],e)}if(this.isDocumentSchema())return ae([15,0],e);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no no member=${e}.`)}getMemberSchemas(){const e={};try{for(const[t,n]of this.structIterator())e[t]=n}catch(e){}return e}getEventStreamMember(){if(this.isStructSchema())for(const[e,t]of this.structIterator())if(t.isStreaming()&&t.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(),t=e[4].length;let n=e[se];if(n&&t===n.length)yield*n;else{n=Array(t);for(let r=0;r<t;++r){const t=e[4][r],i=ae([e[5][r],0],t);yield n[r]=[t,i]}e[se]=n}}}function ae(e,t){if(e instanceof oe)return Object.assign(e,{memberName:t,_isMemberSchema:!0});return new oe(e,t)}const ce=e=>Array.isArray(e)&&2===e.length,ue=e=>Array.isArray(e)&&e.length>=5;class le{namespace;schemas;exceptions;static registries=new Map;constructor(e,t=new Map,n=new Map){this.namespace=e,this.schemas=t,this.exceptions=n}static for(e){return le.registries.has(e)||le.registries.set(e,new le(e)),le.registries.get(e)}register(e,t){const n=this.normalizeShapeId(e);le.for(n.split("#")[0]).schemas.set(n,t)}getSchema(e){const t=this.normalizeShapeId(e);if(!this.schemas.has(t))throw new Error(`@smithy/core/schema - schema not found for ${t}`);return this.schemas.get(t)}registerError(e,t){const n=e,r=le.for(n[1]);r.schemas.set(n[1]+"#"+n[2],n),r.exceptions.set(n,t)}getErrorCtor(e){const t=e;return le.for(t[1]).exceptions.get(t)}getBaseException(){for(const e of this.exceptions.keys())if(Array.isArray(e)){const[,t,n]=e,r=t+"#"+n;if(r.startsWith("smithy.ts.sdk.synthetic.")&&r.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 de=e=>{if(null!=e){if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&Ee.warn(ve(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},pe=Math.ceil(2**127*(2-2**-23)),he=e=>{const t=de(e);if(void 0!==t&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>pe)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},fe=e=>me(e,16),ge=e=>me(e,8),me=(e,t)=>{const n=(e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}})(e);if(void 0!==n&&ye(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},ye=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},Se=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Re=e=>{const t=e.match(Se);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},we=e=>fe("string"==typeof e?Re(e):e),ve=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),Ee={warn:console.warn},Ce=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],be=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Te(e){const t=e.getUTCFullYear(),n=e.getUTCMonth(),r=e.getUTCDay(),i=e.getUTCDate(),s=e.getUTCHours(),o=e.getUTCMinutes(),a=e.getUTCSeconds(),c=s<10?`0${s}`:`${s}`,u=o<10?`0${o}`:`${o}`,l=a<10?`0${a}`:`${a}`;return`${Ce[r]}, ${i<10?`0${i}`:`${i}`} ${be[n]} ${t} ${c}:${u}:${l} GMT`}const Pe=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Ae=e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=Pe.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[n,r,i,s,o,a,c,u]=t,l=we(ze(r)),d=Ge(i,"month",1,12),p=Ge(s,"day",1,31);return Me(l,d,p,{hours:o,minutes:a,seconds:c,fractionalMilliseconds:u})},Ie=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),xe=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$/),Oe=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$/),De=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})$/),$e=e=>{if(null==e)return;let t;if("number"==typeof e)t=e;else if("string"==typeof e)t=(e=>de("string"==typeof e?Re(e):e))(e);else{if("object"!=typeof e||1!==e.tag)throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");t=e.value}if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(1e3*t))},Me=(e,t,n,r)=>{const i=t-1;return Ue(e,i,n),new Date(Date.UTC(e,i,n,Ge(r.hours,"hour",0,23),Ge(r.minutes,"minute",0,59),Ge(r.seconds,"seconds",0,60),Be(r.fractionalMilliseconds)))},Le=e=>{const t=(new Date).getUTCFullYear(),n=100*Math.floor(t/100)+we(ze(e));return n<t?n+100:n},ke=e=>e.getTime()-(new Date).getTime()>15768e8?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,Ne=e=>{const t=be.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},_e=[31,28,31,30,31,30,31,31,30,31,30,31],Ue=(e,t,n)=>{let r=_e[t];if(1===t&&Fe(e)&&(r=29),n>r)throw new TypeError(`Invalid day for ${be[t]} in ${e}: ${n}`)},Fe=e=>e%4==0&&(e%100!=0||e%400==0),Ge=(e,t,n,r)=>{const i=(e=>ge("string"==typeof e?Re(e):e))(ze(e));if(i<n||i>r)throw new TypeError(`${t} must be between ${n} and ${r}, inclusive`);return i},Be=e=>null==e?0:1e3*(e=>he("string"==typeof e?Re(e):e))("0."+e),He=e=>{const t=e[0];let n=1;if("+"==t)n=1;else{if("-"!=t)throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);n=-1}return n*(60*Number(e.substring(1,3))+Number(e.substring(4,6)))*60*1e3},ze=e=>{let t=0;for(;t<e.length-1&&"0"===e.charAt(t);)t++;return 0===t?e:e.slice(t)},je="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),qe=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0"))),Ve=()=>{if(je)return je();const e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128,qe[e[0]]+qe[e[1]]+qe[e[2]]+qe[e[3]]+"-"+qe[e[4]]+qe[e[5]]+"-"+qe[e[6]]+qe[e[7]]+"-"+qe[e[8]]+qe[e[9]]+"-"+qe[e[10]]+qe[e[11]]+qe[e[12]]+qe[e[13]]+qe[e[14]]+qe[e[15]]},We=function(e){return Object.assign(new String(e),{deserializeJSON:()=>JSON.parse(String(e)),toString:()=>String(e),toJSON:()=>String(e)})};We.from=e=>e&&"object"==typeof e&&(e instanceof We||"deserializeJSON"in e)?e:"string"==typeof e||Object.getPrototypeOf(e)===String.prototype?We(String(e)):We(JSON.stringify(e)),We.fromObject=We.from;const Ke="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",Qe="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",Ze="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",Ye="(\\d?\\d)",Je="(\\d{4})",Xe=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),et=new RegExp(`^${Ke}, ${Ye} ${Qe} ${Je} ${Ze} GMT$`),tt=new RegExp(`^${Ke}, ${Ye}-${Qe}-(\\d\\d) ${Ze} GMT$`),nt=new RegExp(`^${Ke} ${Qe} ( [1-9]|\\d\\d) ${Ze} ${Je}$`),rt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function it(e,t,n){const r=Number(e);if(r<t||r>n)throw new Error(`Value ${r} out of range [${t}, ${n}]`)}function st(e,t,n){if(!Number.isInteger(n))throw new Error("Invalid number of delimiters ("+n+") for splitEvery.");const r=e.split(t),i=[];let s="";for(let e=0;e<r.length;e++)""===s?s=r[e]:s+=t+r[e],(e+1)%n==0&&(i.push(s),s="");return""!==s&&i.push(s),i}const ot=e=>{const t=e.length,n=[];let r,i=!1,s=0;for(let o=0;o<t;++o){const t=e[o];switch(t){case'"':"\\"!==r&&(i=!i);break;case",":i||(n.push(e.slice(s,o)),s=o+1)}r=t}return n.push(e.slice(s)),n.map((e=>{const t=(e=e.trim()).length;return t<2?e:('"'===e[0]&&'"'===e[t-1]&&(e=e.slice(1,t-1)),e.replace(/\\"/g,'"'))}))},at=/^-?\d*(\.\d+)?$/;class ct{string;type;constructor(e,t){if(this.string=e,this.type=t,!at.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||"object"!=typeof e)return!1;const t=e;return ct.prototype.isPrototypeOf(e)||"bigDecimal"===t.type&&at.test(t.string)}}class ut{serdeContext;setSerdeContext(e){this.serdeContext=e}}class lt extends ut{options;constructor(e){super(),this.options=e}getRequestType(){return o}getResponseType(){return a}setSerdeContext(e){this.serdeContext=e,this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(e)}updateServiceEndpoint(e,t){if("url"in t){e.protocol=t.url.protocol,e.hostname=t.url.hostname,e.port=t.url.port?Number(t.url.port):void 0,e.path=t.url.pathname,e.fragment=t.url.hash||void 0,e.username=t.url.username||void 0,e.password=t.url.password||void 0,e.query||(e.query={});for(const[n,r]of t.url.searchParams.entries())e.query[n]=r;return e}return e.protocol=t.protocol,e.hostname=t.hostname,e.port=t.port?Number(t.port):void 0,e.path=t.path,e.query={...t.query},e}setHostPrefix(e,t,n){if(this.serdeContext?.disableHostPrefix)return;const r=oe.of(t.input),i=ie(t.traits??{});if(i.endpoint){let t=i.endpoint?.[0];if("string"==typeof t){const i=[...r.structIterator()].filter((([,e])=>e.getMergedTraits().hostLabel));for(const[e]of i){const r=n[e];if("string"!=typeof r)throw new Error(`@smithy/core/schema - ${e} in input must be a string as hostLabel.`);t=t.replace(`{${e}}`,r)}e.hostname=t+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:t,initialRequest:n}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:e,requestSchema:t,initialRequest:n})}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:n}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:n})}async loadEventStreamCapability(){const{EventStreamSerde:e}=await Promise.resolve().then((function(){return V$}));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,t,n,r,i){return[]}getEventStreamMarshaller(){const e=this.serdeContext;if(!e.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return e.eventStreamMarshaller}}class dt extends lt{async serializeRequest(e,t,n){const r={...t??{}},i=this.serializer,s={},a={},c=await n.endpoint(),u=oe.of(e?.input),l=u.getSchema();let d,p=!1;const h=new o({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:s,headers:a,body:void 0});if(c){this.updateServiceEndpoint(h,c),this.setHostPrefix(h,e,r);const t=ie(e.traits);if(t.http){h.method=t.http[0];const[e,n]=t.http[1].split("?");"/"==h.path?h.path=e:h.path+=e;const r=new URLSearchParams(n??"");Object.assign(s,Object.fromEntries(r))}}for(const[e,t]of u.structIterator()){const n=t.getMergedTraits()??{},o=r[e];if(null!=o||t.isIdempotencyToken())if(n.httpPayload){if(t.isStreaming()){t.isStructSchema()?r[e]&&(d=await this.serializeEventStream({eventStream:r[e],requestSchema:u})):d=o}else i.write(t,o),d=i.flush();delete r[e]}else if(n.httpLabel){i.write(t,o);const n=i.flush();h.path.includes(`{${e}+}`)?h.path=h.path.replace(`{${e}+}`,n.split("/").map(Y).join("/")):h.path.includes(`{${e}}`)&&(h.path=h.path.replace(`{${e}}`,Y(n))),delete r[e]}else if(n.httpHeader)i.write(t,o),a[n.httpHeader.toLowerCase()]=String(i.flush()),delete r[e];else if("string"==typeof n.httpPrefixHeaders){for(const[e,r]of Object.entries(o)){const s=n.httpPrefixHeaders+e;i.write([t.getValueSchema(),{httpHeader:s}],r),a[s.toLowerCase()]=i.flush()}delete r[e]}else n.httpQuery||n.httpQueryParams?(this.serializeQuery(t,o,s),delete r[e]):p=!0;else if(n.httpLabel&&(h.path.includes(`{${e}+}`)||h.path.includes(`{${e}}`)))throw new Error(`No value provided for input HTTP label: ${e}.`)}return p&&r&&(i.write(l,r),d=i.flush()),h.headers=a,h.query=s,h.body=d,h}serializeQuery(e,t,n){const r=this.serializer,i=e.getMergedTraits();if(i.httpQueryParams){for(const[r,s]of Object.entries(t))if(!(r in n)){const t=e.getValueSchema();Object.assign(t.getMergedTraits(),{...i,httpQuery:r,httpQueryParams:void 0}),this.serializeQuery(t,s,n)}}else if(e.isListSchema()){const s=!!e.getMergedTraits().sparse,o=[];for(const n of t){r.write([e.getValueSchema(),i],n);const t=r.flush();(s||void 0!==t)&&o.push(t)}n[i.httpQuery]=o}else r.write([e,i],t),n[i.httpQuery]=r.flush()}async deserializeResponse(e,t,n){const r=this.deserializer,i=oe.of(e.output),s={};if(n.statusCode>=300){const i=await Z(n.body,t);throw i.byteLength>0&&Object.assign(s,await r.read(15,i)),await this.handleError(e,t,n,s,this.deserializeMetadata(n)),new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(const e in n.headers){const t=n.headers[e];delete n.headers[e],n.headers[e.toLowerCase()]=t}const o=await this.deserializeHttpMessage(i,t,n,s);if(o.length){const e=await Z(n.body,t);if(e.byteLength>0){const t=await r.read(i,e);for(const e of o)s[e]=t[e]}}else o.discardResponseBody&&await Z(n.body,t);return s.$metadata=this.deserializeMetadata(n),s}async deserializeHttpMessage(e,t,n,r,i){let s;s=r instanceof Set?i:r;let o=!0;const a=this.deserializer,c=oe.of(e),u=[];for(const[e,r]of c.structIterator()){const i=r.getMemberTraits();if(i.httpPayload){o=!1;if(r.isStreaming()){const t=r.isStructSchema();s[e]=t?await this.deserializeEventStream({response:n,responseSchema:c}):K(n.body)}else if(n.body){const i=await Z(n.body,t);i.byteLength>0&&(s[e]=await a.read(r,i))}}else if(i.httpHeader){const t=String(i.httpHeader).toLowerCase(),o=n.headers[t];if(null!=o)if(r.isListSchema()){const n=r.getValueSchema();let i;n.getMergedTraits().httpHeader=t,i=n.isTimestampSchema()&&4===n.getSchema()?st(o,",",2):ot(o);const c=[];for(const e of i)c.push(await a.read(n,e.trim()));s[e]=c}else s[e]=await a.read(r,o)}else if(void 0!==i.httpPrefixHeaders){s[e]={};for(const[t,o]of Object.entries(n.headers))if(t.startsWith(i.httpPrefixHeaders)){const n=r.getValueSchema();n.getMergedTraits().httpHeader=t,s[e][t.slice(i.httpPrefixHeaders.length)]=await a.read(n,o)}}else i.httpResponseCode?s[e]=n.statusCode:u.push(e)}return u.discardResponseBody=o,u}}class pt extends lt{async serializeRequest(e,t,n){const r=this.serializer,i={},s={},a=await n.endpoint(),c=oe.of(e?.input),u=c.getSchema();let l;const d=new o({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:i,headers:s,body:void 0});a&&(this.updateServiceEndpoint(d,a),this.setHostPrefix(d,e,t));const p={...t};if(t){const e=c.getEventStreamMember();if(e){if(p[e]){const t={};for(const[n,i]of c.structIterator())n!==e&&p[n]&&(r.write(i,p[n]),t[n]=r.flush());l=await this.serializeEventStream({eventStream:p[e],requestSchema:c,initialRequest:t})}}else r.write(u,p),l=r.flush()}return d.headers=s,d.query=i,d.body=l,d.method="POST",d}async deserializeResponse(e,t,n){const r=this.deserializer,i=oe.of(e.output),s={};if(n.statusCode>=300){const i=await Z(n.body,t);throw i.byteLength>0&&Object.assign(s,await r.read(15,i)),await this.handleError(e,t,n,s,this.deserializeMetadata(n)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const e in n.headers){const t=n.headers[e];delete n.headers[e],n.headers[e.toLowerCase()]=t}const o=i.getEventStreamMember();if(o)s[o]=await this.deserializeEventStream({response:n,responseSchema:i,initialResponseContainer:s});else{const e=await Z(n.body,t);e.byteLength>0&&Object.assign(s,await r.read(i,e))}return s.$metadata=this.deserializeMetadata(n),s}}function ht(e,t){if(t.timestampFormat.useTrait&&e.isTimestampSchema()&&(5===e.getSchema()||6===e.getSchema()||7===e.getSchema()))return e.getSchema();const{httpLabel:n,httpPrefixHeaders:r,httpHeader:i,httpQuery:s}=e.getMergedTraits();return(t.httpBindings?"string"==typeof r||Boolean(i)?6:Boolean(s)||Boolean(n)?5:void 0:void 0)??t.timestampFormat.default}class ft extends ut{settings;constructor(e){super(),this.settings=e}read(e,t){const n=oe.of(e);if(n.isListSchema())return ot(t).map((e=>this.read(n.getValueSchema(),e)));if(n.isBlobSchema())return(this.serdeContext?.base64Decoder??O)(t);if(n.isTimestampSchema()){switch(ht(n,this.settings)){case 5:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC3339 timestamps must be strings");const t=Xe.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,n,r,i,s,o,a,,c,u]=t;it(r,1,12),it(i,1,31),it(s,0,23),it(o,0,59),it(a,0,60);const l=new Date(Date.UTC(Number(n),Number(r)-1,Number(i),Number(s),Number(o),Number(a),Number(c)?Math.round(1e3*parseFloat(`0.${c}`)):0));if(l.setUTCFullYear(Number(n)),"Z"!=u.toUpperCase()){const[,e,t,n]=/([+-])(\d\d):(\d\d)/.exec(u)||[void 0,"+",0,0],r="-"===e?1:-1;l.setTime(l.getTime()+r*(60*Number(t)*60*1e3+60*Number(n)*1e3))}return l})(t);case 6:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC7231 timestamps must be strings.");let t,n,r,i,s,o,a,c;if((c=et.exec(e))?[,t,n,r,i,s,o,a]=c:(c=tt.exec(e))?([,t,n,r,i,s,o,a]=c,r=(Number(r)+1900).toString()):(c=nt.exec(e))&&([,n,t,i,s,o,a,r]=c),r&&o){const e=Date.UTC(Number(r),rt.indexOf(n),Number(t),Number(i),Number(s),Number(o),a?Math.round(1e3*parseFloat(`0.${a}`)):0);it(t,1,31),it(i,0,23),it(s,0,59),it(o,0,60);const c=new Date(e);return c.setUTCFullYear(Number(r)),c}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)})(t);case 7:return(e=>{if(null==e)return;let t=NaN;if("number"==typeof e)t=e;else if("string"==typeof e){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else"object"==typeof e&&1===e.tag&&(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(1e3*t))})(t);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",t),new Date(t)}}if(n.isStringSchema()){const e=n.getMergedTraits().mediaType;let r=t;if(e){n.getMergedTraits().httpHeader&&(r=this.base64ToUtf8(r));return("application/json"===e||e.endsWith("+json"))&&(r=We.from(r)),r}}return n.isNumericSchema()?Number(t):n.isBigIntegerSchema()?BigInt(t):n.isBigDecimalSchema()?new ct(t,"bigDecimal"):n.isBooleanSchema()?"true"===String(t).toLowerCase():t}base64ToUtf8(e){return(this.serdeContext?.utf8Encoder??M)((this.serdeContext?.base64Decoder??O)(e))}}class gt extends ut{codecDeserializer;stringDeserializer;constructor(e,t){super(),this.codecDeserializer=e,this.stringDeserializer=new ft(t)}setSerdeContext(e){this.stringDeserializer.setSerdeContext(e),this.codecDeserializer.setSerdeContext(e),this.serdeContext=e}read(e,t){const n=oe.of(e),r=n.getMergedTraits(),i=this.serdeContext?.utf8Encoder??M;if(r.httpHeader||r.httpResponseCode)return this.stringDeserializer.read(n,i(t));if(r.httpPayload){if(n.isBlobSchema()){const e=this.serdeContext?.utf8Decoder??D;return"string"==typeof t?e(t):t}if(n.isStringSchema())return"byteLength"in t?i(t):t}return this.codecDeserializer.read(n,t)}}class mt extends ut{settings;stringBuffer="";constructor(e){super(),this.settings=e}write(e,t){const n=oe.of(e);switch(typeof t){case"object":if(null===t)return void(this.stringBuffer="null");if(n.isTimestampSchema()){if(!(t instanceof Date))throw new Error(`@smithy/core/protocols - received non-Date value ${t} when schema expected Date in ${n.getName(!0)}`);switch(ht(n,this.settings)){case 5:this.stringBuffer=t.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=Te(t);break;case 7:this.stringBuffer=String(t.getTime()/1e3);break;default:console.warn("Missing timestamp format, using epoch seconds",t),this.stringBuffer=String(t.getTime()/1e3)}return}if(n.isBlobSchema()&&"byteLength"in t)return void(this.stringBuffer=(this.serdeContext?.base64Encoder??L)(t));if(n.isListSchema()&&Array.isArray(t)){let e="";for(const i of t){this.write([n.getValueSchema(),n.getMergedTraits()],i);const t=this.flush();""!==e&&(e+=", "),e+=n.getValueSchema().isTimestampSchema()?t:(((r=t).includes(",")||r.includes('"'))&&(r=`"${r.replace(/"/g,'\\"')}"`),r)}return void(this.stringBuffer=e)}this.stringBuffer=JSON.stringify(t,null,2);break;case"string":const e=n.getMergedTraits().mediaType;let i=t;if(e){if(("application/json"===e||e.endsWith("+json"))&&(i=We.from(i)),n.getMergedTraits().httpHeader)return void(this.stringBuffer=(this.serdeContext?.base64Encoder??L)(i.toString()))}this.stringBuffer=t;break;default:n.isIdempotencyToken()?this.stringBuffer=Ve():this.stringBuffer=String(t)}var r}flush(){const e=this.stringBuffer;return this.stringBuffer="",e}}class yt{codecSerializer;stringSerializer;buffer;constructor(e,t,n=new mt(t)){this.codecSerializer=e,this.stringSerializer=n}setSerdeContext(e){this.codecSerializer.setSerdeContext(e),this.stringSerializer.setSerdeContext(e)}write(e,t){const n=oe.of(e),r=n.getMergedTraits();return r.httpHeader||r.httpLabel||r.httpQuery?(this.stringSerializer.write(n,t),void(this.buffer=this.stringSerializer.flush())):this.codecSerializer.write(n,t)}flush(){if(void 0!==this.buffer){const e=this.buffer;return this.buffer=void 0,e}return this.codecSerializer.flush()}}class St{authSchemes=new Map;constructor(e){for(const[t,n]of Object.entries(e))void 0!==n&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}class Rt{async sign(e,t,n){return e}}const wt=(vt=3e5,function(e){return Et(e)&&e.expiration.getTime()-Date.now()<vt});var vt;const Et=e=>void 0!==e.expiration;function Ct(e){const t=C(e.userAgentAppId??undefined),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:"string"==typeof n?[[n]]:n,userAgentAppId:async()=>{const n=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(n)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof n?t?.warn("userAgentAppId must be a string or undefined."):n.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}class bt{capacity;data=new Map;parameters=[];constructor({size:e,params:t}){this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const n=this.hash(e);if(!1===n)return t();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:n,done:r}=e.next();if(this.data.delete(n),r||++t>10)break}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t="";const{parameters:n}=this;if(0===n.length)return!1;for(const r of n){const n=String(e[r]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}const Tt=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}$"),Pt=e=>Tt.test(e)||e.startsWith("[")&&e.endsWith("]"),At=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),It=(e,t=!1)=>{if(!t)return At.test(e);const n=e.split(".");for(const e of n)if(!It(e))return!1;return!0},xt={},Ot="endpoints";function Dt(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${Dt(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(Dt).join(", ")})`:JSON.stringify(e,null,2)}class $t extends Error{constructor(e){super(e),this.name="EndpointError"}}const Mt=(e,t)=>(e=>{const t=e.split("."),n=[];for(const r of t){const t=r.indexOf("[");if(-1!==t){if(r.indexOf("]")!==r.length-1)throw new $t(`Path: '${e}' does not end with ']'`);const i=r.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new $t(`Invalid array index: '${i}' in path: '${e}'`);0!==t&&n.push(r.slice(0,t)),n.push(i)}else n.push(r)}return n})(t).reduce(((n,r)=>{if("object"!=typeof n)throw new $t(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]}),e),Lt={[r.HTTP]:80,[r.HTTPS]:443},kt={booleanEquals:(e,t)=>e===t,getAttr:Mt,isSet:e=>null!=e,isValidHostLabel:It,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:n,protocol:r="",path:i="",query:s={}}=e,o=new URL(`${r}//${t}${n?`:${n}`:""}${i}`);return o.search=Object.entries(s).map((([e,t])=>`${e}=${t}`)).join("&"),o}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:i,hostname:s,pathname:o,protocol:a,search:c}=t;if(c)return null;const u=a.slice(0,-1);if(!Object.values(r).includes(u))return null;const l=Pt(s);return{scheme:u,authority:`${i}${n.includes(`${i}:${Lt[u]}`)||"string"==typeof e&&e.includes(`${i}:${Lt[u]}`)?`:${Lt[u]}`:""}`,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:l}},stringEquals:(e,t)=>e===t,substring:(e,t,n,r)=>t>=n||e.length<n?null:r?e.substring(e.length-n,e.length-t):e.substring(t,n),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},Nt=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i<e.length;){const t=e.indexOf("{",i);if(-1===t){n.push(e.slice(i));break}n.push(e.slice(i,t));const s=e.indexOf("}",t);if(-1===s){n.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[s+1]&&(n.push(e.slice(t+1,s)),i=s+2);const o=e.substring(t+1,s);if(o.includes("#")){const[e,t]=o.split("#");n.push(Mt(r[e],t))}else n.push(r[o]);i=s+1}return n.join("")},_t=(e,t,n)=>{if("string"==typeof e)return Nt(e,n);if(e.fn)return Ft.callFunction(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new $t(`'${t}': ${String(e)} is not a string, function or reference.`)},Ut=({fn:e,argv:t},n)=>{const r=t.map((e=>["boolean","number"].includes(typeof e)?e:Ft.evaluateExpression(e,"arg",n))),i=e.split(".");return i[0]in xt&&null!=i[1]?xt[i[0]][i[1]](...r):kt[e](...r)},Ft={evaluateExpression:_t,callFunction:Ut},Gt=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new $t(`'${e}' is already defined in Reference Record.`);const r=Ut(t,n);return n.logger?.debug?.(`${Ot} evaluateCondition: ${Dt(t)} = ${Dt(r)}`),{result:""===r||!!r,...null!=e&&{toAssign:{name:e,value:r}}}},Bt=(e=[],t)=>{const n={};for(const r of e){const{result:e,toAssign:i}=Gt(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${Ot} assign: ${i.name} := ${Dt(i.value)}`))}return{result:!0,referenceRecord:n}},Ht=(e,t)=>Object.entries(e).reduce(((e,[n,r])=>({...e,[n]:r.map((e=>{const r=_t(e,"Header value entry",t);if("string"!=typeof r)throw new $t(`Header '${n}' value '${r}' is not a string`);return r}))})),{}),zt=(e,t)=>Object.entries(e).reduce(((e,[n,r])=>({...e,[n]:qt.getEndpointProperty(r,t)})),{}),jt=(e,t)=>{if(Array.isArray(e))return e.map((e=>jt(e,t)));switch(typeof e){case"string":return Nt(e,t);case"object":if(null===e)throw new $t(`Unexpected endpoint property: ${e}`);return qt.getEndpointProperties(e,t);case"boolean":return e;default:throw new $t("Unexpected endpoint property type: "+typeof e)}},qt={getEndpointProperty:jt,getEndpointProperties:zt},Vt=(e,t)=>{const n=_t(e,"Endpoint URL",t);if("string"==typeof n)try{return new URL(n)}catch(e){throw console.error(`Failed to construct URL with ${n}`,e),e}throw new $t("Endpoint URL must be a string, got "+typeof n)},Wt=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:s}=Bt(n,t);if(!i)return;const o={...t,referenceRecord:{...t.referenceRecord,...s}},{url:a,properties:c,headers:u}=r;return t.logger?.debug?.(`${Ot} Resolving endpoint from template: ${Dt(r)}`),{...null!=u&&{headers:Ht(u,o)},...null!=c&&{properties:zt(c,o)},url:Vt(a,o)}},Kt=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:s}=Bt(n,t);if(i)throw new $t(_t(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))},Qt=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=Wt(n,t);if(e)return e}else if("error"===n.type)Kt(n,t);else{if("tree"!==n.type)throw new $t(`Unknown endpoint rule: ${n}`);{const e=Zt.evaluateTreeRule(n,t);if(e)return e}}throw new $t("Rules evaluation failed")},Zt={evaluateRules:Qt,evaluateTreeRule:(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:s}=Bt(n,t);if(i)return Zt.evaluateRules(r,{...t,referenceRecord:{...t.referenceRecord,...s}})}},Yt=(e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:s}=e;t.logger?.debug?.(`${Ot} Initial EndpointParams: ${Dt(n)}`);const o=Object.entries(i).filter((([,e])=>null!=e.default)).map((([e,t])=>[e,t.default]));if(o.length>0)for(const[e,t]of o)n[e]=n[e]??t;const a=Object.entries(i).filter((([,e])=>e.required)).map((([e])=>e));for(const e of a)if(null==n[e])throw new $t(`Missing required parameter: '${e}'`);const c=Qt(s,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${Ot} Resolved endpoint: ${Dt(c)}`),c},Jt=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Jt(t))return!1;return!0}return!!It(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!Pt(e)))};let Xt={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}]};const en={isVirtualHostableS3Bucket:Jt,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,s,o,...a]=t;if("arn"!==n||""===r||""===i||""===a.join(":"))return null;return{partition:r,service:i,region:s,accountId:o,resourceId:a.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=Xt;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}const n=t.find((e=>"aws"===e.id));if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};xt.aws=en;const tn=e=>{if("string"==typeof e)return tn(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:s}=e;let o;return s&&(o=function(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,r=null]=n.split("=");e=decodeURIComponent(e),r&&(r=decodeURIComponent(r)),e in t?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r}return t}(s)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:o}};function nn(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}function rn(e,t,n){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]=n}const sn=e=>a.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,on=e=>new Date(Date.now()+e),an=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(on(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},cn=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class un{async sign(e,t,n){if(!o.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await(async e=>{const t=cn("context",e.context),n=cn("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=cn("signer",n.signer),s=await i(r),o=e?.signingRegion,a=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:s,signingRegion:o,signingRegionSet:a,signingName:c}})(n),{config:i,signer:s}=r;let{signingRegion:a,signingName:c}=r;const u=n.context;if(u?.authSchemes?.length){const[e,t]=u.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(a=t?.signingRegion??a,c=t?.signingName??c)}return await s.sign(e,{signingDate:on(i.systemClockOffset),signingRegion:a,signingService:c})}errorHandler(e){return t=>{const n=t.ServerTime??sn(t.$response);if(n){const r=cn("config",e.config),i=r.systemClockOffset;r.systemClockOffset=an(n,r.systemClockOffset);r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=sn(e);if(n){const e=cn("config",t.config);e.systemClockOffset=an(n,e.systemClockOffset)}}}class ln extends Error{name="ProviderError";tryNextLink;constructor(e,t=!0){let n,r=!0;"boolean"==typeof t?(n=void 0,r=t):null!=t&&"object"==typeof t&&(n=t.logger,r=t.tryNextLink??!0),super(e),this.tryNextLink=r,Object.setPrototypeOf(this,ln.prototype),n?.debug?.(`@smithy/property-provider ${r?"->":"(!)"} ${e}`)}static from(e,t=!0){return Object.assign(new this(e.message,t),e)}}class dn extends ln{name="CredentialsProviderError";constructor(e,t=!0){super(e,t),Object.setPrototypeOf(this,dn.prototype)}}const pn=(e,t,n)=>{let r,i,s,o=!1;return async t=>(s&&!t?.forceRefresh||(r=await(async()=>{i||(i=e());try{r=await i,s=!0,o=!1}finally{i=void 0}return r})()),r)},hn="X-Amz-Date",fn="X-Amz-Signature",gn="X-Amz-Security-Token",mn="authorization",yn=hn.toLowerCase(),Sn=[mn,yn,"date"],Rn=fn.toLowerCase(),wn="x-amz-content-sha256",vn=gn.toLowerCase(),En={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},Cn=/^proxy-/,bn=/^sec-/,Tn="AWS4-HMAC-SHA256",Pn="AWS4-HMAC-SHA256-PAYLOAD",An="aws4_request",In={},xn=[],On=(e,t,n)=>`${e}/${t}/${n}/${An}`,Dn=(e,t,n)=>{const r=new e(t);return r.update($(n)),r.digest()},$n=({headers:e},t,n)=>{const r={};for(const i of Object.keys(e).sort()){if(null==e[i])continue;const s=i.toLowerCase();(s in En||t?.has(s)||Cn.test(s)||bn.test(s))&&(!n||n&&!n.has(s))||(r[s]=e[i].trim().replace(/\s+/g," "))}return r},Mn=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===wn)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(r=t,"function"==typeof ArrayBuffer&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(r))){const e=new n;return e.update($(t)),V(await e.digest())}var r;return"UNSIGNED-PAYLOAD"};class Ln{format(e){const t=[];for(const n of Object.keys(e)){const r=D(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let r=0;for(const e of t)n.set(e,r),r+=e.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 t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.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 r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(i.buffer);return s.set(e.value,3),s;case"string":const o=D(e.value),a=new DataView(new ArrayBuffer(3+o.byteLength));a.setUint8(0,7),a.setUint16(1,o.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(_n.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Nn.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const l=new Uint8Array(17);return l[0]=9,l.set(function(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.slice(n,n+2).toLowerCase();if(!(r in q))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[n/2]=q[r]}return t}(e.value.replace(/\-/g,"")),1),l}}}var kn;!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(kn||(kn={}));const Nn=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class _n{bytes;constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&Un(t),new _n(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Un(e),parseInt(V(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Un(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const Fn=e=>{e=o.clone(e);for(const t of Object.keys(e.headers))Sn.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Gn=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class Bn{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s=!0}){this.service=r,this.sha256=i,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=g(n),this.credentialProvider=g(t)}createCanonicalRequest(e,t,n){const r=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===Rn)continue;const i=_(r);t.push(i);const s=e[r];"string"==typeof s?n[i]=`${i}=${_(s)}`:Array.isArray(s)&&(n[i]=s.slice(0).reduce(((e,t)=>e.concat([`${i}=${_(t)}`])),[]).sort().join("&"))}return t.sort().map((e=>n[e])).filter((e=>e)).join("&")})(e)}\n${r.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${r.join(";")}\n${n}`}async createStringToSign(e,t,n,r){const i=new this.sha256;i.update($(n));return`${r}\n${e}\n${t}\n${V(await i.digest())}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const n of e.split("/"))0!==n?.length&&"."!==n&&(".."===n?t.pop():t.push(n));const n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return _(n).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}formatDate(e){const t=(e=>Gn(e).toISOString().replace(/\.\d{3}Z$/,"Z"))(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class Hn extends Bn{headerFormatter=new Ln;constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s=!0}){super({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s})}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:i,unhoistableHeaders:s,signableHeaders:a,hoistableHeaders:c,signingRegion:u,signingService:l}=t,d=await this.credentialProvider();this.validateResolvedCredentials(d);const p=u??await this.regionProvider(),{longDate:h,shortDate:f}=this.formatDate(n);if(r>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const g=On(f,p,l??this.service),m=((e,t={})=>{const{headers:n,query:r={}}=o.clone(e);for(const e of Object.keys(n)){const i=e.toLowerCase();("x-amz-"===i.slice(0,6)&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i))&&(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}})(Fn(e),{unhoistableHeaders:s,hoistableHeaders:c});d.sessionToken&&(m.query[gn]=d.sessionToken),m.query["X-Amz-Algorithm"]=Tn,m.query["X-Amz-Credential"]=`${d.accessKeyId}/${g}`,m.query[hn]=h,m.query["X-Amz-Expires"]=r.toString(10);const y=$n(m,i,a);return m.query["X-Amz-SignedHeaders"]=this.getCanonicalHeaderList(y),m.query[fn]=await this.getSignature(h,g,this.getSigningKey(d,p,f,l),this.createCanonicalRequest(m,y,await Mn(e,this.sha256))),m}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:r,signingRegion:i,signingService:s}){const o=i??await this.regionProvider(),{shortDate:a,longDate:c}=this.formatDate(n),u=On(a,o,s??this.service),l=await Mn({headers:{},body:t},this.sha256),d=new this.sha256;d.update(e);const p=V(await d.digest()),h=[Pn,c,u,r,p,l].join("\n");return this.signString(h,{signingDate:n,signingRegion:o,signingService:s})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature}).then((t=>({message:e.message,signature:t})))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:r}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const s=n??await this.regionProvider(),{shortDate:o}=this.formatDate(t),a=new this.sha256(await this.getSigningKey(i,s,o,r));return a.update($(e)),V(await a.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:i,signingService:s}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const a=i??await this.regionProvider(),c=Fn(e),{longDate:u,shortDate:l}=this.formatDate(t),d=On(l,a,s??this.service);c.headers[yn]=u,o.sessionToken&&(c.headers[vn]=o.sessionToken);const p=await Mn(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(wn,c.headers)&&this.applyChecksum&&(c.headers[wn]=p);const h=$n(c,r,n),f=await this.getSignature(u,d,this.getSigningKey(o,a,l,s),this.createCanonicalRequest(c,h,p));return c.headers[mn]=`${Tn} Credential=${o.accessKeyId}/${d}, SignedHeaders=${this.getCanonicalHeaderList(h)}, Signature=${f}`,c}async getSignature(e,t,n,r){const i=await this.createStringToSign(e,t,r,Tn),s=new this.sha256(await n);return s.update($(i)),V(await s.digest())}getSigningKey(e,t,n,r){return(async(e,t,n,r,i)=>{const s=`${n}:${r}:${i}:${V(await Dn(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(s in In)return In[s];for(xn.push(s);xn.length>50;)delete In[xn.shift()];let o=`AWS4${t.secretAccessKey}`;for(const t of[n,r,i,An])o=await Dn(e,o,t);return In[s]=o})(this.sha256,e,n,t,r||this.service)}}const zn=e=>{let t,n=e.credentials,r=!!e.credentials;Object.defineProperty(e,"credentials",{set(i){i&&i!==n&&i!==t&&(r=!0),n=i;const s=function(e,{credentials:t,credentialDefaultProvider:n}){let r;r=t?t?.memoized?t:((e,t,n)=>{if(void 0===e)return;const r="function"!=typeof e?async()=>Promise.resolve(e):e;let i,s,o,a=!1;const c=async e=>{s||(s=r(e));try{i=await s,o=!0,a=!1}finally{s=void 0}return i};return void 0===t?async e=>(o&&!e?.forceRefresh||(i=await c(e)),i):async e=>(o&&!e?.forceRefresh||(i=await c(e)),a?i:n(i)?t(i)?(await c(e),i):i:(a=!0,i))})(t,wt,Et):n?C(n(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")};return r.memoized=!0,r}(e,{credentials:n,credentialDefaultProvider:e.credentialDefaultProvider}),o=function(e,t){if(t.configBound)return t;const n=async n=>t({...n,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}(e,s);if(r&&!o.attributed){const e="object"==typeof n&&null!==n;t=async t=>{const n=await o(t);return!e||n.$source&&0!==Object.keys(n.$source).length?n:nn(n,"CREDENTIALS_CODE","e")},t.memoized=o.memoized,t.configBound=o.configBound,t.attributed=!0}else t=o},get:()=>t,enumerable:!0,configurable:!0}),e.credentials=n;const{signingEscapePath:i=!0,systemClockOffset:s=e.systemClockOffset||0,sha256:o}=e;let a;a=e.signer?C(e.signer):e.regionInfoProvider?()=>C(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([t,n])=>{const{signingRegion:r,signingService:s}=t;e.signingRegion=e.signingRegion||r||n,e.signingName=e.signingName||s||e.serviceId;const a={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Hn)(a)})):async t=>{const n=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await C(e.region)(),properties:{}},t)).signingRegion,r=t.signingName;e.signingRegion=e.signingRegion||n,e.signingName=e.signingName||r||e.serviceId;const s={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Hn)(s)};return Object.assign(e,{systemClockOffset:s,signingEscapePath:i,signer:a})};const jn="function"==typeof TextEncoder?new TextEncoder:null,qn=e=>{if("string"==typeof e){if(jn)return jn.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)},Vn=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},Wn=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,Kn=()=>{let e=[],t=[],n=!1;const r=new Set,i=n=>(e.forEach((e=>{n.add(e.middleware,{...e})})),t.forEach((e=>{n.addRelativeTo(e.middleware,{...e})})),n.identifyOnResolve?.(a.identifyOnResolve()),n),s=e=>{const t=[];return e.before.forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...s(e))})),t.push(e),e.after.reverse().forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...s(e))})),t},o=(n=!1)=>{const r=[],i=[],o={};e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of Vn(t.name,t.aliases))o[e]=t;r.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of Vn(t.name,t.aliases))o[e]=t;i.push(t)})),i.forEach((e=>{if(e.toMiddleware){const t=o[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${Wn(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}}));const a=(c=r,c.sort(((e,t)=>Qn[t.step]-Qn[e.step]||Zn[t.priority||"normal"]-Zn[e.priority||"normal"]))).map(s).reduce(((e,t)=>(e.push(...t),e)),[]);var c;return a},a={add:(t,n={})=>{const{name:i,override:s,aliases:o}=n,a={step:"initialize",priority:"normal",middleware:t,...n},c=Vn(i,o);if(c.length>0){if(c.some((e=>r.has(e)))){if(!s)throw new Error(`Duplicate middleware name '${Wn(i,o)}'`);for(const t of c){const n=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(-1===n)continue;const r=e[n];if(r.step!==a.step||a.priority!==r.priority)throw new Error(`"${Wn(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${Wn(i,o)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(n,1)}}for(const e of c)r.add(e)}e.push(a)},addRelativeTo:(e,n)=>{const{name:i,override:s,aliases:o}=n,a={middleware:e,...n},c=Vn(i,o);if(c.length>0){if(c.some((e=>r.has(e)))){if(!s)throw new Error(`Duplicate middleware name '${Wn(i,o)}'`);for(const e of c){const n=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(-1===n)continue;const r=t[n];if(r.toMiddleware!==a.toMiddleware||r.relation!==a.relation)throw new Error(`"${Wn(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${Wn(i,o)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)r.add(e)}t.push(a)},clone:()=>i(Kn()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let i=!1;const s=e=>{const t=Vn(e.name,e.aliases);if(t.includes(n)){i=!0;for(const e of t)r.delete(e);return!1}return!0};return e=e.filter(s),t=t.filter(s),i})(n):(n=>{let i=!1;const s=e=>{if(e.middleware===n){i=!0;for(const t of Vn(e.name,e.aliases))r.delete(t);return!1}return!0};return e=e.filter(s),t=t.filter(s),i})(n),removeByTag:n=>{let i=!1;const s=e=>{const{tags:t,name:s,aliases:o}=e;if(t&&t.includes(n)){const e=Vn(s,o);for(const t of e)r.delete(t);return i=!0,!1}return!0};return e=e.filter(s),t=t.filter(s),i},concat:e=>{const t=i(Kn());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:i,identify:()=>o(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return Wn(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of o().map((e=>e.middleware)).reverse())e=n(e,t);return n&&console.log(a.identify()),e}};return a},Qn={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Zn={high:3,normal:2,low:1};class Yn{config;middlewareStack=Kn();initConfig;handlers;constructor(e){this.config=e;const{protocol:t,protocolSettings:n}=e;n&&"function"==typeof t&&(e.protocol=new t(n))}send(e,t,n){const r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n;let s;if(void 0===r&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?s=t.get(e.constructor):(s=e.resolveMiddleware(this.middlewareStack,this.config,r),t.set(e.constructor,s))}else delete this.handlers,s=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!i)return s(e).then((e=>e.output));s(e).then((e=>i(null,e.output)),(e=>i(e))).catch((()=>{}))}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const Jn="***SensitiveInformation***";function Xn(e,t){if(null==t)return t;const n=oe.of(e);if(n.getMergedTraits().sensitive)return Jn;if(n.isListSchema()){if(!!n.getValueSchema().getMergedTraits().sensitive)return Jn}else if(n.isMapSchema()){if(!!n.getKeySchema().getMergedTraits().sensitive||!!n.getValueSchema().getMergedTraits().sensitive)return Jn}else if(n.isStructSchema()&&"object"==typeof t){const e=t,r={};for(const[t,i]of n.structIterator())null!=e[t]&&(r[t]=Xn(i,e[t]));return r}return t}class er{middlewareStack=Kn();schema;static classBuilder(){return new tr}resolveMiddlewareWithContext(e,t,n,{middlewareFn:r,clientName:i,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,smithyContext:u,additionalContext:l,CommandCtor:d}){for(const i of r.bind(this)(d,e,t,n))this.middlewareStack.use(i);const p=e.concat(this.middlewareStack),{logger:h}=t,f={logger:h,clientName:i,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,[s]:{commandInstance:this,...u},...l},{requestHandler:g}=t;return p.resolve((e=>g.handle(e.request,n||{})),f)}}class tr{_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,t,n={}){return this._smithyContext={service:e,operation:t,...n},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,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 t;return t=class extends er{input;static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.input=t??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(n,r,i){const s=e._operationSchema,o=s?.[4]??s?.input,a=s?.[5]??s?.output;return this.resolveMiddlewareWithContext(n,r,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(s?Xn.bind(null,o):e=>e),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(s?Xn.bind(null,a):e=>e),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}serialize=e._serializer;deserialize=e._deserializer}}}const nr=(e,t,n)=>{for(const[n,r]of Object.entries(e)){const e=async function(e,t,n){const i=new r(e);if("function"==typeof t)this.send(i,t);else{if("function"!=typeof n)return this.send(i,t);if("object"!=typeof t)throw new Error("Expected http options but got "+typeof t);this.send(i,t||{},n)}},i=(n[0].toLowerCase()+n.slice(1)).replace(/Command$/,"");t.prototype[i]=e}const{paginators:r={},waiters:i={}}=n??{};for(const[e,n]of Object.entries(r))void 0===t.prototype[e]&&(t.prototype[e]=function(e={},t,...r){return n({...t,client:this},e,...r)});for(const[e,n]of Object.entries(i))void 0===t.prototype[e]&&(t.prototype[e]=async function(e={},t,...r){let i=t;return"number"==typeof t&&(i={maxWaitTime:t}),n({...i,client:this},e,...r)})};class rr 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 t=e;return rr.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}static[Symbol.hasInstance](e){if(!e)return!1;const t=e;return this===rr?rr.isInstance(e):!!rr.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const ir=(e,t={})=>{Object.entries(t).filter((([,e])=>void 0!==e)).forEach((([t,n])=>{null!=e[t]&&""!==e[t]||(e[t]=n)}));const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},sr=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},or=e=>Object.assign((e=>{const t=[];for(const n in i){const r=i[n];void 0!==e[r]&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(e){t.push(e)},checksumAlgorithms:()=>t}})(e),(e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy:()=>e.retryStrategy}))(e)),ar=e=>Object.assign((e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t})(e),(e=>{const t={};return t.retryStrategy=e.retryStrategy(),t})(e)),cr=e=>{const t="#text";for(const n in e)e.hasOwnProperty(n)&&void 0!==e[n][t]?e[n]=e[n][t]:"object"==typeof e[n]&&null!==e[n]&&(e[n]=cr(e[n]));return e};class ur{trace(){}debug(){}info(){}warn(){}error(){}}class lr{queryCompat;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,t){const n=t.getMemberSchemas(),r=Object.values(n).find((e=>!!e.getMergedTraits().httpPayload));if(r){const t=r.getMergedTraits().mediaType;return t||(r.isStringSchema()?"text/plain":r.isBlobSchema()?"application/octet-stream":e)}if(!t.isUnitSchema()){const t=Object.values(n).find((e=>{const{httpQuery:t,httpQueryParams:n,httpHeader:r,httpLabel:i,httpPrefixHeaders:s}=e.getMergedTraits();return!t&&!n&&!r&&!i&&void 0===s}));if(t)return e}}async getErrorSchemaOrThrowBaseException(e,t,n,r,i,s){let o=t,a=e;e.includes("#")&&([o,a]=e.split("#"));const c={$metadata:i,$fault:n.statusCode<500?"client":"server"},u=le.for(o);try{return{errorSchema:s?.(u,a)??u.getSchema(e),errorMetadata:c}}catch(e){r.message=r.message??r.Message??"UnknownError";const t=le.for("smithy.ts.sdk.synthetic."+o),n=t.getBaseException();if(n){const e=t.getErrorCtor(n)??Error;throw this.decorateServiceException(Object.assign(new e({name:a}),c),r)}throw this.decorateServiceException(Object.assign(new Error(a),c),r)}}decorateServiceException(e,t={}){if(this.queryCompat){const n=e.Message??t.Message,r=ir(e,t);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 ir(e,t)}setQueryCompatError(e,t){const n=t.headers?.["x-amzn-query-error"];if(void 0!==e&&null!=n){const[t,r]=n.split(";"),i=Object.entries(e),s={Code:t,Type:r};Object.assign(e,s);for(const[e,t]of i)s["message"===e?"Message":e]=t;delete s.__type,e.Error=s}}queryCompatOutput(e,t){e.Error&&(t.Error=e.Error),e.Type&&(t.Type=e.Type),e.Code&&(t.Code=e.Code)}findQueryCompatibleError(e,t){try{return e.getSchema(t)}catch(n){return e.find((e=>oe.of(e).getMergedTraits().awsQueryError?.[0]===t))}}}class dr{serdeContext;setSerdeContext(e){this.serdeContext=e}}class pr{from;to;keys;constructor(e,t){this.from=e,this.to=t,this.keys=new Set(Object.keys(this.from).filter((e=>"__type"!==e)))}mark(e){this.keys.delete(e)}hasUnknown(){return 1===this.keys.size&&0===Object.keys(this.to).length}writeUnknown(){if(this.hasUnknown()){const e=this.keys.values().next().value,t=this.from[e];this.to.$unknown=[e,t]}}}function hr(e,t,n){if(n?.source){const e=n.source;if("number"==typeof t&&(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER||e!==String(t))){return e.includes(".")?new ct(e,"bigDecimal"):BigInt(e)}}return t}const fr=(e,t)=>((e,t)=>Z(e,t).then((e=>(t?.utf8Encoder??M)(e))))(e,t).then((e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}})),gr=(e,t)=>{const n=(e,t)=>Object.keys(e).find((e=>e.toLowerCase()===t.toLowerCase())),r=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=n(e.headers,"x-amzn-errortype");if(void 0!==i)return r(e.headers[i]);if(t&&"object"==typeof t){const e=n(t,"code");if(e&&void 0!==t[e])return r(t[e]);if(void 0!==t.__type)return r(t.__type)}};class mr extends dr{settings;constructor(e){super(),this.settings=e}async read(e,t){return this._read(e,"string"==typeof t?JSON.parse(t,hr):await fr(t,this.serdeContext))}readObject(e,t){return this._read(e,t)}_read(e,t){const n=null!==t&&"object"==typeof t,r=oe.of(e);if(n){if(r.isStructSchema()){const e=t,n=r.isUnionSchema(),i={};let s;const{jsonName:o}=this.settings;let a;o&&(s={}),n&&(a=new pr(e,i));for(const[t,c]of r.structIterator()){let r=t;o&&(r=c.getMergedTraits().jsonName??r,s[r]=t),n&&a.mark(r),null!=e[r]&&(i[t]=this._read(c,e[r]))}if(n)a.writeUnknown();else if("string"==typeof e.__type)for(const[t,n]of Object.entries(e)){const e=o?s[t]??t:t;e in i||(i[e]=n)}return i}if(Array.isArray(t)&&r.isListSchema()){const e=r.getValueSchema(),n=[],i=!!r.getMergedTraits().sparse;for(const r of t)(i||null!=r)&&n.push(this._read(e,r));return n}if(r.isMapSchema()){const e=r.getValueSchema(),n={},i=!!r.getMergedTraits().sparse;for(const[r,s]of Object.entries(t))(i||null!=s)&&(n[r]=this._read(e,s));return n}}if(r.isBlobSchema()&&"string"==typeof t)return O(t);const i=r.getMergedTraits().mediaType;if(r.isStringSchema()&&"string"==typeof t&&i){return"application/json"===i||i.endsWith("+json")?We.from(t):t}if(r.isTimestampSchema()&&null!=t){switch(ht(r,this.settings)){case 5:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=Ie.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[n,r,i,s,o,a,c,u,l]=t,d=we(ze(r)),p=Ge(i,"month",1,12),h=Ge(s,"day",1,31),f=Me(d,p,h,{hours:o,minutes:a,seconds:c,fractionalMilliseconds:u});return"Z"!=l.toUpperCase()&&f.setTime(f.getTime()-He(l)),f})(t);case 6:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=xe.exec(e);if(t){const[e,n,r,i,s,o,a,c]=t;return Me(we(ze(i)),Ne(r),Ge(n,"day",1,31),{hours:s,minutes:o,seconds:a,fractionalMilliseconds:c})}if(t=Oe.exec(e),t){const[e,n,r,i,s,o,a,c]=t;return ke(Me(Le(i),Ne(r),Ge(n,"day",1,31),{hours:s,minutes:o,seconds:a,fractionalMilliseconds:c}))}if(t=De.exec(e),t){const[e,n,r,i,s,o,a,c]=t;return Me(we(ze(c)),Ne(n),Ge(r.trimLeft(),"day",1,31),{hours:i,minutes:s,seconds:o,fractionalMilliseconds:a})}throw new TypeError("Invalid RFC-7231 date-time value")})(t);case 7:return $e(t);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",t),new Date(t)}}if(r.isBigIntegerSchema()&&("number"==typeof t||"string"==typeof t))return BigInt(t);if(r.isBigDecimalSchema()&&null!=t){if(t instanceof ct)return t;const e=t;return"bigDecimal"===e.type&&"string"in e?new ct(e.string,e.type):new ct(String(t),"bigDecimal")}if(r.isNumericSchema()&&"string"==typeof t){switch(t){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return t}if(r.isDocumentSchema()){if(n){const e=Array.isArray(t)?[]:{};for(const[n,i]of Object.entries(t))e[n]=i instanceof ct?i:this._read(r,i);return e}return structuredClone(t)}return t}}const yr=String.fromCharCode(925);class Sr{values=new Map;counter=0;stage=0;createReplacer(){if(1===this.stage)throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(2===this.stage)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(e,t)=>{if(t instanceof ct){const e=yr+"nv"+this.counter+++"_"+t.string;return this.values.set(`"${e}"`,t.string),e}if("bigint"==typeof t){const e=t.toString(),n=yr+"b"+this.counter+++"_"+e;return this.values.set(`"${n}"`,e),n}return t}}replaceInJson(e){if(0===this.stage)throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(2===this.stage)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,0===this.counter)return e;for(const[t,n]of this.values)e=e.replace(t,n);return e}}class Rr extends dr{settings;buffer;useReplacer=!1;rootSchema;constructor(e){super(),this.settings=e}write(e,t){this.rootSchema=oe.of(e),this.buffer=this._write(this.rootSchema,t)}writeDiscriminatedDocument(e,t){this.write(e,t),"object"==typeof this.buffer&&(this.buffer.__type=oe.of(e).getName(!0))}flush(){const{rootSchema:e,useReplacer:t}=this;if(this.rootSchema=void 0,this.useReplacer=!1,e?.isStructSchema()||e?.isDocumentSchema()){if(!t)return JSON.stringify(this.buffer);const e=new Sr;return e.replaceInJson(JSON.stringify(this.buffer,e.createReplacer(),0))}return this.buffer}_write(e,t,n){const r=null!==t&&"object"==typeof t,i=oe.of(e);if(r){if(i.isStructSchema()){const e=t,n={},{jsonName:r}=this.settings;let s;r&&(s={});for(const[t,o]of i.structIterator()){const a=this._write(o,e[t],i);if(void 0!==a){let e=t;r&&(e=o.getMergedTraits().jsonName??t,s[t]=e),n[e]=a}}if(i.isUnionSchema()&&0===Object.keys(n).length){const{$unknown:t}=e;if(Array.isArray(t)){const[e,r]=t;n[e]=this._write(15,r)}}else if("string"==typeof e.__type)for(const[t,i]of Object.entries(e)){const e=r?s[t]??t:t;e in n||(n[e]=this._write(15,i))}return n}if(Array.isArray(t)&&i.isListSchema()){const e=i.getValueSchema(),n=[],r=!!i.getMergedTraits().sparse;for(const i of t)(r||null!=i)&&n.push(this._write(e,i));return n}if(i.isMapSchema()){const e=i.getValueSchema(),n={},r=!!i.getMergedTraits().sparse;for(const[i,s]of Object.entries(t))(r||null!=s)&&(n[i]=this._write(e,s));return n}if(t instanceof Uint8Array&&(i.isBlobSchema()||i.isDocumentSchema()))return i===this.rootSchema?t:(this.serdeContext?.base64Encoder??L)(t);if(t instanceof Date&&(i.isTimestampSchema()||i.isDocumentSchema())){switch(ht(i,this.settings)){case 5:return t.toISOString().replace(".000Z","Z");case 6:return Te(t);case 7:return t.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",t),t.getTime()/1e3}}t instanceof ct&&(this.useReplacer=!0)}if(null!==t||!n?.isStructSchema()){if(i.isStringSchema()){if(void 0===t&&i.isIdempotencyToken())return Ve();const e=i.getMergedTraits().mediaType;if(null!=t&&e){if("application/json"===e||e.endsWith("+json"))return We.from(t)}return t}if("number"==typeof t&&i.isNumericSchema())return Math.abs(t)===1/0||isNaN(t)?String(t):t;if("string"==typeof t&&i.isBlobSchema())return i===this.rootSchema?t:(this.serdeContext?.base64Encoder??L)(t);if("bigint"==typeof t&&(this.useReplacer=!0),i.isDocumentSchema()){if(r){const e=Array.isArray(t)?[]:{};for(const[n,r]of Object.entries(t))r instanceof ct?(this.useReplacer=!0,e[n]=r):e[n]=this._write(i,r);return e}return structuredClone(t)}return t}}}class wr extends dr{settings;constructor(e){super(),this.settings=e}createSerializer(){const e=new Rr(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){const e=new mr(this.settings);return e.setSerdeContext(this.serdeContext),e}}class vr extends pt{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:r}){super({defaultNamespace:e}),this.serviceTarget=t,this.codec=r??new wr({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!n,this.mixin=new lr(this.awsQueryCompatible)}async serializeRequest(e,t,n){const r=await super.serializeRequest(e,t,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"),"unit"!==J(e.input)&&r.body||(r.body="{}"),r}getPayloadCodec(){return this.codec}async handleError(e,t,n,r,i){this.awsQueryCompatible&&this.mixin.setQueryCompatError(r,n);const s=gr(n,r)??"Unknown",{errorSchema:o,errorMetadata:a}=await this.mixin.getErrorSchemaOrThrowBaseException(s,this.options.defaultNamespace,n,r,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),c=oe.of(o),u=r.message??r.Message??"Unknown",l=new(le.for(o[1]).getErrorCtor(o)??Error)(u),d={};for(const[e,t]of c.structIterator())null!=r[e]&&(d[e]=this.codec.createDeserializer().readObject(t,r[e]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(r,d),this.mixin.decorateServiceException(Object.assign(l,a,{$fault:c.getMergedTraits().error,message:u},d),r)}}class Er extends vr{constructor({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:r}){super({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:r})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}class Cr extends dt{serializer;deserializer;codec;mixin=new lr;constructor({defaultNamespace:e}){super({defaultNamespace:e});const t={timestampFormat:{useTrait:!0,default:7},httpBindings:!0,jsonName:!0};this.codec=new wr(t),this.serializer=new yt(this.codec.createSerializer(),t),this.deserializer=new gt(this.codec.createDeserializer(),t)}getShapeId(){return"aws.protocols#restJson1"}getPayloadCodec(){return this.codec}setSerdeContext(e){this.codec.setSerdeContext(e),super.setSerdeContext(e)}async serializeRequest(e,t,n){const r=await super.serializeRequest(e,t,n),i=oe.of(e.input);if(!r.headers["content-type"]){const e=this.mixin.resolveRestContentType(this.getDefaultContentType(),i);e&&(r.headers["content-type"]=e)}return null==r.body&&r.headers["content-type"]===this.getDefaultContentType()&&(r.body="{}"),r}async deserializeResponse(e,t,n){const r=await super.deserializeResponse(e,t,n),i=oe.of(e.output);for(const[e,t]of i.structIterator())t.getMemberTraits().httpPayload&&!(e in r)&&(r[e]=null);return r}async handleError(e,t,n,r,i){const s=gr(n,r)??"Unknown",{errorSchema:o,errorMetadata:a}=await this.mixin.getErrorSchemaOrThrowBaseException(s,this.options.defaultNamespace,n,r,i),c=oe.of(o),u=r.message??r.Message??"Unknown",l=new(le.for(o[1]).getErrorCtor(o)??Error)(u);await this.deserializeHttpMessage(o,t,n,r);const d={};for(const[e,t]of c.structIterator()){const n=t.getMergedTraits().jsonName??e;d[e]=this.codec.createDeserializer().readObject(t,r[n])}throw this.mixin.decorateServiceException(Object.assign(l,a,{$fault:c.getMergedTraits().error,message:u},d),r)}getDefaultContentType(){return"application/json"}}let br;class Tr extends dr{settings;stringDeserializer;constructor(e){super(),this.settings=e,this.stringDeserializer=new ft(e)}setSerdeContext(e){this.serdeContext=e,this.stringDeserializer.setSerdeContext(e)}read(e,t,n){const r=oe.of(e),i=r.getMemberSchemas();if(r.isStructSchema()&&r.isMemberSchema()&&!!Object.values(i).find((e=>!!e.getMemberTraits().eventPayload))){const e={},n=Object.keys(i)[0];return i[n].isBlobSchema()?e[n]=t:e[n]=this.read(i[n],t),e}const s=(this.serdeContext?.utf8Encoder??M)(t),o=this.parseXml(s);return this.readSchema(e,n?o[n]:o)}readSchema(e,t){const n=oe.of(e);if(n.isUnitSchema())return;const r=n.getMergedTraits();if(n.isListSchema()&&!Array.isArray(t))return this.readSchema(n,[t]);if(null==t)return t;if("object"==typeof t){const e=!!r.sparse,i=!!r.xmlFlattened;if(n.isListSchema()){const r=n.getValueSchema(),s=[],o=r.getMergedTraits().xmlName??"member",a=i?t:(t[0]??t)[o],c=Array.isArray(a)?a:[a];for(const t of c)(null!=t||e)&&s.push(this.readSchema(r,t));return s}const s={};if(n.isMapSchema()){const r=n.getKeySchema(),o=n.getValueSchema();let a;a=i?Array.isArray(t)?t:[t]:Array.isArray(t.entry)?t.entry:[t.entry];const c=r.getMergedTraits().xmlName??"key",u=o.getMergedTraits().xmlName??"value";for(const t of a){const n=t[c],r=t[u];(null!=r||e)&&(s[n]=this.readSchema(o,r))}return s}if(n.isStructSchema()){const e=n.isUnionSchema();let r;e&&(r=new pr(t,s));for(const[i,o]of n.structIterator()){const n=o.getMergedTraits(),a=n.httpPayload?n.xmlName??o.getName():o.getMemberTraits().xmlName??i;e&&r.mark(a),null!=t[a]&&(s[i]=this.readSchema(o,t[a]))}return e&&r.writeUnknown(),s}if(n.isDocumentSchema())return t;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${n.getName(!0)}`)}return n.isListSchema()?[]:n.isMapSchema()||n.isStructSchema()?{}:this.stringDeserializer.read(n,t)}parseXml(e){if(e.length){let t;try{t=function(e){br||(br=new DOMParser);const t=br.parseFromString(e,"application/xml");if(t.getElementsByTagName("parsererror").length>0)throw new Error("DOMParser XML parsing error.");const n=e=>{if(e.nodeType===Node.TEXT_NODE&&e.textContent?.trim())return e.textContent;if(e.nodeType===Node.ELEMENT_NODE){const t=e;if(0===t.attributes.length&&0===t.childNodes.length)return"";const r={},i=Array.from(t.attributes);for(const e of i)r[`${e.name}`]=e.value;const s=Array.from(t.childNodes);for(const e of s){const o=n(e);if(null!=o){const t=e.nodeName;if(1===s.length&&0===i.length&&"#text"===t)return o;r[t]?Array.isArray(r[t])?r[t].push(o):r[t]=[r[t],o]:r[t]=o}else if(1===s.length&&0===i.length)return t.textContent}return r}return null};return{[t.documentElement.nodeName]:n(t.documentElement)}}(e)}catch(t){throw t&&"object"==typeof t&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}const n="#text",r=Object.keys(t)[0],i=t[r];return i[n]&&(i[r]=i[n],delete i[n]),cr(i)}return{}}}class Pr extends dr{settings;buffer;constructor(e){super(),this.settings=e}write(e,t,n=""){void 0===this.buffer&&(this.buffer="");const r=oe.of(e);if(n&&!n.endsWith(".")&&(n+="."),r.isBlobSchema())("string"==typeof t||t instanceof Uint8Array)&&(this.writeKey(n),this.writeValue((this.serdeContext?.base64Encoder??L)(t)));else if(r.isBooleanSchema()||r.isNumericSchema()||r.isStringSchema())null!=t?(this.writeKey(n),this.writeValue(String(t))):r.isIdempotencyToken()&&(this.writeKey(n),this.writeValue(Ve()));else if(r.isBigIntegerSchema())null!=t&&(this.writeKey(n),this.writeValue(String(t)));else if(r.isBigDecimalSchema())null!=t&&(this.writeKey(n),this.writeValue(t instanceof ct?t.string:String(t)));else if(r.isTimestampSchema()){if(t instanceof Date){this.writeKey(n);switch(ht(r,this.settings)){case 5:this.writeValue(t.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(Te(t));break;case 7:this.writeValue(String(t.getTime()/1e3))}}}else if(r.isDocumentSchema())Array.isArray(t)?this.write(79,t,n):t instanceof Date?this.write(4,t,n):t instanceof Uint8Array?this.write(21,t,n):t&&"object"==typeof t?this.write(143,t,n):(this.writeKey(n),this.writeValue(String(t)));else if(r.isListSchema()){if(Array.isArray(t))if(0===t.length)this.settings.serializeEmptyLists&&(this.writeKey(n),this.writeValue(""));else{const e=r.getValueSchema(),i=this.settings.flattenLists||r.getMergedTraits().xmlFlattened;let s=1;for(const r of t){if(null==r)continue;const t=this.getKey("member",e.getMergedTraits().xmlName),o=i?`${n}${s}`:`${n}${t}.${s}`;this.write(e,r,o),++s}}}else if(r.isMapSchema()){if(t&&"object"==typeof t){const e=r.getKeySchema(),i=r.getValueSchema(),s=r.getMergedTraits().xmlFlattened;let o=1;for(const[r,a]of Object.entries(t)){if(null==a)continue;const t=this.getKey("key",e.getMergedTraits().xmlName),c=s?`${n}${o}.${t}`:`${n}entry.${o}.${t}`,u=this.getKey("value",i.getMergedTraits().xmlName),l=s?`${n}${o}.${u}`:`${n}entry.${o}.${u}`;this.write(e,r,c),this.write(i,a,l),++o}}}else if(r.isStructSchema()){if(t&&"object"==typeof t){let e=!1;for(const[i,s]of r.structIterator()){if(null==t[i]&&!s.isIdempotencyToken())continue;const r=`${n}${this.getKey(i,s.getMergedTraits().xmlName)}`;this.write(s,t[i],r),e=!0}if(!e&&r.isUnionSchema()){const{$unknown:e}=t;if(Array.isArray(e)){const[t,r]=e,i=`${n}${t}`;this.write(15,r,i)}}}}else if(!r.isUnitSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${r.getName(!0)}`)}flush(){if(void 0===this.buffer)throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");const e=this.buffer;return delete this.buffer,e}getKey(e,t){const n=t??e;return this.settings.capitalizeKeys?n[0].toUpperCase()+n.slice(1):n}writeKey(e){e.endsWith(".")&&(e=e.slice(0,e.length-1)),this.buffer+=`&${Y(e)}=`}writeValue(e){this.buffer+=Y(e)}}class Ar extends pt{options;serializer;deserializer;mixin=new lr;constructor(e){super({defaultNamespace:e.defaultNamespace}),this.options=e;const t={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:e.xmlNamespace,serviceNamespace:e.defaultNamespace,serializeEmptyLists:!0};this.serializer=new Pr(t),this.deserializer=new Tr(t)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(e){this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(e,t,n){const r=await super.serializeRequest(e,t,n);r.path.endsWith("/")||(r.path+="/"),Object.assign(r.headers,{"content-type":"application/x-www-form-urlencoded"}),"unit"!==J(e.input)&&r.body||(r.body="");const i=e.name.split("#")[1]??e.name;return r.body=`Action=${i}&Version=${this.options.version}`+r.body,r.body.endsWith("&")&&(r.body=r.body.slice(-1)),r}async deserializeResponse(e,t,n){const r=this.deserializer,i=oe.of(e.output),s={};if(n.statusCode>=300){const i=await Z(n.body,t);i.byteLength>0&&Object.assign(s,await r.read(15,i)),await this.handleError(e,t,n,s,this.deserializeMetadata(n))}for(const e in n.headers){const t=n.headers[e];delete n.headers[e],n.headers[e.toLowerCase()]=t}const o=e.name.split("#")[1]??e.name,a=i.isStructSchema()&&this.useNestedResult()?o+"Result":void 0,c=await Z(n.body,t);c.byteLength>0&&Object.assign(s,await r.read(i,c,a));return{$metadata:this.deserializeMetadata(n),...s}}useNestedResult(){return!0}async handleError(e,t,n,r,i){const s=this.loadQueryErrorCode(n,r)??"Unknown",o=this.loadQueryError(r),a=this.loadQueryErrorMessage(r);o.message=a,o.Error={Type:o.Type,Code:o.Code,Message:a};const{errorSchema:c,errorMetadata:u}=await this.mixin.getErrorSchemaOrThrowBaseException(s,this.options.defaultNamespace,n,o,i,this.mixin.findQueryCompatibleError),l=oe.of(c),d=new(le.for(c[1]).getErrorCtor(c)??Error)(a),p={Type:o.Error.Type,Code:o.Error.Code,Error:o.Error};for(const[e,t]of l.structIterator()){const n=t.getMergedTraits().xmlName??e,i=o[n]??r[n];p[e]=this.deserializer.readSchema(t,i)}throw this.mixin.decorateServiceException(Object.assign(d,u,{$fault:l.getMergedTraits().error,message:a},p),r)}loadQueryErrorCode(e,t){const n=(t.Errors?.[0]?.Error??t.Errors?.Error??t.Error)?.Code;return void 0!==n?n:404==e.statusCode?"NotFound":void 0}loadQueryError(e){return e.Errors?.[0]?.Error??e.Errors?.Error??e.Error}loadQueryErrorMessage(e){const t=this.loadQueryError(e);return t?.message??t?.Message??e.message??e.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}const Ir=/\d{12}\.ddb/;const xr="user-agent",Or="x-amz-user-agent",Dr=/[^!$%&'*+\-.^_`|~\w]/g,$r=/[^!$%&'*+\-.^_`|~\w#]/g;const Mr=e=>(t,n)=>async r=>{const{request:i}=r;if(!o.isInstance(i))return t(r);const{headers:s}=i,a=n?.userAgent?.map(Lr)||[],c=(await e.defaultUserAgentProvider()).map(Lr);await async function(e,t,n){const r=n.request;if("rpc-v2-cbor"===r?.headers?.["smithy-protocol"]&&rn(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?rn(e,"RETRY_MODE_ADAPTIVE","F"):rn(e,"RETRY_MODE_STANDARD","E"):rn(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(Ir)&&rn(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":rn(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":rn(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":rn(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const t=i;t.accountId&&rn(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,r]of Object.entries(t.$source??{}))rn(e,n,r)}}(n,e,r);const u=n;c.push(`m/${function(e){let t="";for(const n in e){const r=e[n];if(!(t.length+r.length+1<=1024))break;t.length?t+=","+r:t+=r}return t}(Object.assign({},n.__smithy_context?.features,u.__aws_sdk_context?.features))}`);const l=e?.customUserAgent?.map(Lr)||[],d=await e.userAgentAppId();d&&c.push(Lr(["app",`${d}`]));const p=[].concat([...c,...a,...l]).join(" "),h=[...c.filter((e=>e.startsWith("aws-sdk-"))),...l].join(" ");return"browser"!==e.runtime?(h&&(s[Or]=s[Or]?`${s[xr]} ${h}`:h),s[xr]=p):s[Or]=p,t({...r,request:i})},Lr=e=>{const t=e[0].split("/").map((e=>e.replace(Dr,"-"))).join("/"),n=e[1]?.replace($r,"-"),r=t.indexOf("/"),i=t.substring(0,r);let s=t.substring(r+1);return"api"===i&&(s=s.toLowerCase()),[i,s,n].filter((e=>e&&e.length>0)).reduce(((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},kr={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Nr=e=>({applyToStack:t=>{t.add(Mr(e),kr)}}),_r=!1,Ur=!1,Fr=new Set,Gr=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),Br=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{const e=(e=>Gr(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e)("function"==typeof t?await t():t);return((e,t=It)=>{if(Fr.has(e)||t(e))Fr.add(e);else{if("*"!==e)throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`);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.')}})(e),e},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!Gr(e)||("function"!=typeof n?Promise.resolve(!!n):n())}})},Hr="content-length";const zr={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},jr=e=>({applyToStack:t=>{var n;t.add((n=e.bodyLengthChecker,e=>async t=>{const r=t.request;if(o.isInstance(r)){const{body:e,headers:t}=r;if(e&&-1===Object.keys(t).map((e=>e.toLowerCase())).indexOf(Hr))try{const t=n(e);r.headers={...r.headers,[Hr]:String(t)}}catch(e){}}return e({...t,request:r})}),zr)}}),qr=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Vr=/(\d+\.){3}\d+/,Wr=/\.\./,Kr=e=>qr.test(e)&&!Vr.test(e)&&!Wr.test(e),Qr=e=>{const[t,n,r,,,i]=e.split(":"),s="arn"===t&&e.split(":").length>=6,o=Boolean(s&&n&&r&&i);if(s&&!o)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return o},Zr=(e,t,n,r=!1)=>{const i=async()=>{let i;if(r){const r=n.clientContextParams,s=r?.[e];i=s??n[e]??n[t]}else i=n[e]??n[t];return"function"==typeof i?i():i};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{if(!1===n.isCustomEndpoint)return;const e=await i();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:r,path:i}=e;return`${t}//${n}${r?":"+r:""}${i}`}}return e}:i},Yr=async e=>{},Jr=e=>"object"==typeof e?"url"in e?tn(e.url):e:tn(e),Xr=async(e,t,n)=>{const r={},i=t?.getEndpointParameterInstructions?.()||{};for(const[t,s]of Object.entries(i))switch(s.type){case"staticContextParams":r[t]=s.value;break;case"contextParams":r[t]=e[s.name];break;case"clientContextParams":case"builtInParams":r[t]=await Zr(s.name,t,n,"builtInParams"!==s.type)();break;case"operationContextParams":r[t]=s.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(s))}return 0===Object.keys(i).length&&Object.assign(r,n),"s3"===String(n.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Qr(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Kr(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(r),r},ei=({config:e,instructions:t})=>(n,r)=>async i=>{e.isCustomEndpoint&&function(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}(r,"ENDPOINT_OVERRIDE","N");const s=await(async(e,t,n,r)=>{if(!n.isCustomEndpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await Yr(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(Jr(e)),n.isCustomEndpoint=!0)}const i=await Xr(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)})(i.input,{getEndpointParameterInstructions:()=>t},{...e},r);r.endpointV2=s,r.authSchemes=s.properties?.authSchemes;const o=r.authSchemes?.[0];if(o){r.signing_region=o.signingRegion,r.signing_service=o.signingName;const e=f(r),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return n({...i})},ti={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:"serializerMiddleware"},ni=(e,t)=>({applyToStack:n=>{n.addRelativeTo(ei({config:e,instructions:t}),ti)}}),ri=e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:i}=e,s=null!=n?async()=>Jr(await g(n)()):void 0,o=!!n,a=Object.assign(e,{endpoint:s,tls:t,isCustomEndpoint:o,useDualstackEndpoint:g(r??!1),useFipsEndpoint:g(i??!1)});let c;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=Yr(e.serviceId)),c),a};var ii;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(ii||(ii={}));const si=ii.STANDARD,oi=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],ai=["TimeoutError","RequestTimeout","RequestTimeoutException"],ci=[500,502,503,504],ui=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],li=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],di=e=>429===e.$metadata?.httpStatusCode||oi.includes(e.name)||1==e.$retryable?.throttling,pi=(e,t=0)=>(e=>void 0!==e?.$retryable)(e)||(e=>e.$metadata?.clockSkewCorrected)(e)||ai.includes(e.name)||ui.includes(e?.code||"")||li.includes(e?.code||"")||ci.includes(e.$metadata?.httpStatusCode||0)||(e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return!!(e&&e instanceof TypeError)&&t.has(e.message)})(e)||void 0!==e.cause&&t<=10&&pi(e.cause,t+1);class hi{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 t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,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 t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise((e=>hi.setTimeoutFn(e,t)))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),di(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(t,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(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}const fi=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(2e4,e),getRetryCost:()=>n});class gi{maxAttempts;mode=ii.STANDARD;capacity=500;retryBackoffStrategy=(()=>{let e=100;return{computeNextBackoffDelay:t=>Math.floor(Math.min(2e4,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})();maxAttemptsProvider;constructor(e){this.maxAttempts=e,this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return fi({retryDelay:100,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===n?500:100);const r=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),i=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,r):r,s=this.getCapacityCost(n);return this.capacity-=s,fi({retryDelay:i,retryCount:e.getRetryCount()+1,retryCost:s})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn("Max attempts provider could not resolve. Using default of 3"),3}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class mi{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=ii.ADAPTIVE;constructor(e,t){this.maxAttemptsProvider=e;const{rateLimiter:n}=t??{};this.rateLimiter=n??new hi,this.standardRetryStrategy=new gi(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}const yi=e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,i=g(r??3);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>{if(t)return t;return await g(n)()===ii.ADAPTIVE?new mi(i):new gi(i)}})},Si=e=>e?.body instanceof ReadableStream,Ri=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,wi=e=>{const t={error:e,errorType:vi(e)},n=bi(e.$response);return n&&(t.retryAfterHint=n),t},vi=e=>di(e)?"THROTTLING":pi(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!pi(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",Ei={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Ci=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async r=>{let i=await e.retryStrategy();const s=await e.maxAttempts();if(!Ri(i))return i?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,r);{let e=await i.acquireInitialRetryToken(n.partition_id),c=new Error,u=0,l=0;const{request:d}=r,p=o.isInstance(d);for(p&&(d.headers["amz-sdk-invocation-id"]=Ve());;)try{p&&(d.headers["amz-sdk-request"]=`attempt=${u+1}; max=${s}`);const{response:n,output:o}=await t(r);return i.recordSuccess(e),o.$metadata.attempts=u+1,o.$metadata.totalRetryDelay=l,{response:n,output:o}}catch(t){const r=wi(t);if(c=(a=t)instanceof Error?a:a instanceof Object?Object.assign(new Error,a):"string"==typeof a?new Error(a):new Error(`AWS SDK error wrapper for ${a}`),p&&Si(d))throw(n.logger instanceof ur?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),c;try{e=await i.refreshRetryTokenForRetry(e,r)}catch(e){throw c.$metadata||(c.$metadata={}),c.$metadata.attempts=u+1,c.$metadata.totalRetryDelay=l,c}u=e.getRetryCount();const s=e.getRetryDelay();l+=s,await new Promise((e=>setTimeout(e,s)))}}var a})(e),Ei)}}),bi=e=>{if(!a.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const n=e.headers[t],r=Number(n);if(!Number.isNaN(r))return new Date(1e3*r);return new Date(n)},Ti=async(e,t,n)=>({operation:f(t).operation,region:await g(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Pi=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"geo",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Ai={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Ii="3.986.0";var xi="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function Oi(e){return e instanceof Uint8Array?e:"string"==typeof e?xi(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function Di(e){return"string"==typeof e?0===e.length:0===e.byteLength}var $i={name:"SHA-256"},Mi={name:"HMAC",hash:$i},Li=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 ki={};function Ni(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:ki}var _i=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!Di(e)){var t=Oi(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return Ni().crypto.subtle.sign(Mi,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):Di(this.toHash)?Promise.resolve(Li):Promise.resolve().then((function(){return Ni().crypto.subtle.digest($i,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise((function(t,n){Ni().crypto.subtle.importKey("raw",Oi(e.secret),Mi,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))},e}();function Ui(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))}function Fi(e,t){var n,r,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}"function"==typeof SuppressedError&&SuppressedError;var Gi=64,Bi=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]),Hi=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],zi=Math.pow(2,53)-1,ji=function(){function e(){this.state=Int32Array.from(Hi),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>zi)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===Gi&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%Gi>=56){for(var r=this.bufferLength;r<Gi;r++)t.setUint8(r,0);this.hashBuffer(),this.bufferLength=0}for(r=this.bufferLength;r<56;r++)t.setUint8(r,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(32);for(r=0;r<8;r++)i[4*r]=this.state[r]>>>24&255,i[4*r+1]=this.state[r]>>>16&255,i[4*r+2]=this.state[r]>>>8&255,i[4*r+3]=this.state[r]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],r=t[1],i=t[2],s=t[3],o=t[4],a=t[5],c=t[6],u=t[7],l=0;l<Gi;l++){if(l<16)this.temp[l]=(255&e[4*l])<<24|(255&e[4*l+1])<<16|(255&e[4*l+2])<<8|255&e[4*l+3];else{var d=this.temp[l-2],p=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,h=((d=this.temp[l-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[l]=(p+this.temp[l-7]|0)+(h+this.temp[l-16]|0)}var f=(((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+(o&a^~o&c)|0)+(u+(Bi[l]+this.temp[l]|0)|0)|0,g=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&r^n&i^r&i)|0;u=c,c=a,a=o,o=s+f|0,s=i,i=r,r=n,n=f+g|0}t[0]+=n,t[1]+=r,t[2]+=i,t[3]+=s,t[4]+=o,t[5]+=a,t[6]+=c,t[7]+=u},e}(),qi=function(){function e(e){this.secret=e,this.hash=new ji,this.reset()}return e.prototype.update=function(e){if(!Di(e)&&!this.error)try{this.hash.update(Oi(e))}catch(e){this.error=e}},e.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()},e.prototype.digest=function(){return Ui(this,void 0,void 0,(function(){return Fi(this,(function(e){return[2,this.digestSync()]}))}))},e.prototype.reset=function(){if(this.hash=new ji,this.secret){this.outer=new ji;var e=function(e){var t=Oi(e);if(t.byteLength>Gi){var n=new ji;n.update(t),t=n.digest()}var r=new Uint8Array(Gi);return r.set(t),r}(this.secret),t=new Uint8Array(Gi);t.set(e);for(var n=0;n<Gi;n++)e[n]^=54,t[n]^=92;this.hash.update(e),this.outer.update(t);for(n=0;n<e.byteLength;n++)e[n]=0}},e}();var Vi=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function Wi(e){return!(!function(e){if("object"==typeof e&&"object"==typeof e.crypto){return"function"==typeof e.crypto.getRandomValues}return!1}(e)||"object"!=typeof e.crypto.subtle)&&function(e){return e&&Vi.every((function(t){return"function"==typeof e[t]}))}(e.crypto.subtle)}var Ki=function(){function e(e){Wi(Ni())?this.hash=new _i(e):this.hash=new qi(e)}return e.prototype.update=function(e,t){this.hash.update(Oi(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}();const Qi=({serviceId:e,clientVersion:t})=>async n=>{const r="undefined"!=typeof window?window.navigator:void 0,i=r?.userAgent??"",s=r?.userAgentData?.platform??Zi.os(i)??"other",o=r?.userAgentData?.brands??[],a=o[o.length-1],c=a?.brand??Zi.browser(i)??"unknown",u=[["aws-sdk-js",t],["ua","2.1"],[`os/${s}`,undefined],["lang/js"],["md/browser",`${c}_${a?.version??"unknown"}`]];e&&u.push([`api/${e}`,t]);const l=await(n?.userAgentAppId?.());return l&&u.push([`app/${l}`]),u},Zi={os:e=>/iPhone|iPad|iPod/.test(e)?"iOS":/Macintosh|Mac OS X/.test(e)?"macOS":/Windows NT/.test(e)?"Windows":/Android/.test(e)?"Android":/Linux/.test(e)?"Linux":void 0,browser:e=>/EdgiOS|EdgA|Edg\//.test(e)?"Microsoft Edge":/Firefox\//.test(e)?"Firefox":/Chrome\//.test(e)?"Chrome":/Safari\//.test(e)?"Safari":void 0},Yi=e=>()=>Promise.reject(e),Ji=["in-region","cross-region","mobile","standard","legacy"],Xi=({defaultsMode:e}={})=>pn((async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(es()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Ji.join(", ")}, got ${t}`)}})),es=()=>{const e=window?.navigator;if(e?.connection){const{effectiveType:t,rtt:n,downlink:r}=e?.connection;if("string"==typeof t&&"4g"!==t||Number(n)>100||Number(r)<10)return!0}return e?.userAgentData?.mobile||"number"==typeof e?.maxTouchPoints&&e?.maxTouchPoints>1},ts=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!ts(t))return!1;return!0}return!!It(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!Pt(e)))};let ns={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}]};const rs={isVirtualHostableS3Bucket:ts,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,s,o,...a]=t;if("arn"!==n||""===r||""===i||""===a.join(":"))return null;return{partition:r,service:i,region:s,accountId:o,resourceId:a.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=ns;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}const n=t.find((e=>"aws"===e.id));if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};xt.aws=rs;const is="required",ss="fn",os="argv",as="ref",cs=!0,us="isSet",ls="booleanEquals",ds="error",ps="endpoint",hs="tree",fs="PartitionResult",gs={[is]:!1,type:"string"},ms={[is]:!0,default:!1,type:"boolean"},ys={[as]:"Endpoint"},Ss={[ss]:ls,[os]:[{[as]:"UseFIPS"},!0]},Rs={[ss]:ls,[os]:[{[as]:"UseDualStack"},!0]},ws={},vs={[ss]:"getAttr",[os]:[{[as]:fs},"supportsFIPS"]},Es={[ss]:ls,[os]:[!0,{[ss]:"getAttr",[os]:[{[as]:fs},"supportsDualStack"]}]},Cs=[Ss],bs=[Rs],Ts=[{[as]:"Region"}],Ps={parameters:{Region:gs,UseDualStack:ms,UseFIPS:ms,Endpoint:gs},rules:[{conditions:[{[ss]:us,[os]:[ys]}],rules:[{conditions:Cs,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:ds},{conditions:bs,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:ds},{endpoint:{url:ys,properties:ws,headers:ws},type:ps}],type:hs},{conditions:[{[ss]:us,[os]:Ts}],rules:[{conditions:[{[ss]:"aws.partition",[os]:Ts,assign:fs}],rules:[{conditions:[Ss,Rs],rules:[{conditions:[{[ss]:ls,[os]:[cs,vs]},Es],rules:[{endpoint:{url:"https://geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ws,headers:ws},type:ps}],type:hs},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:ds}],type:hs},{conditions:Cs,rules:[{conditions:[{[ss]:ls,[os]:[vs,cs]}],rules:[{endpoint:{url:"https://geo-fips.{Region}.{PartitionResult#dnsSuffix}",properties:ws,headers:ws},type:ps}],type:hs},{error:"FIPS is enabled but this partition does not support FIPS",type:ds}],type:hs},{conditions:bs,rules:[{conditions:[Es],rules:[{endpoint:{url:"https://geo.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ws,headers:ws},type:ps}],type:hs},{error:"DualStack is enabled but this partition does not support DualStack",type:ds}],type:hs},{endpoint:{url:"https://geo.{Region}.{PartitionResult#dnsSuffix}",properties:ws,headers:ws},type:ps}],type:hs}],type:hs},{error:"Invalid Configuration: Missing Region",type:ds}]},As=new bt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Is=(e,t={})=>As.get(e,(()=>Yt(Ps,{endpointParams:e,logger:t.logger})));xt.aws=rs;const xs=e=>{const t=Xi(e),n=()=>t().then(sr),r=(e=>({apiVersion:"2020-11-19",base64Decoder:e?.base64Decoder??O,base64Encoder:e?.base64Encoder??L,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Is,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Pi,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new un}],logger:e?.logger??new ur,protocol:e?.protocol??Cr,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.location",version:"2020-11-19",serviceTarget:"LocationService"},serviceId:e?.serviceId??"Location",urlParser:e?.urlParser??tn,utf8Decoder:e?.utf8Decoder??D,utf8Encoder:e?.utf8Encoder??M}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qn,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Qi({serviceId:r.serviceId,clientVersion:Ii}),maxAttempts:e?.maxAttempts??3,region:e?.region??Yi("Region is missing"),requestHandler:H.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||si),sha256:e?.sha256??Ki,streamCollector:e?.streamCollector??z,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(_r)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Ur))}},Os=e=>({setRegion(t){e.region=t},region:()=>e.region}),Ds=e=>({region:e.region()});class $s extends Yn{config;constructor(...[e]){const r=xs(e||{});super(r),this.initConfig=r;var i;const s=Ct((i=r,Object.assign(i,{useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,defaultSigningName:"geo"}))),o=yi(s),a=Br(o),c=((e,r)=>{const i=Object.assign(Os(e),or(e),t(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}})(e));return r.forEach((e=>e.configure(i))),Object.assign(e,Ds(i),ar(i),n(i),{httpAuthSchemes:(s=i).httpAuthSchemes(),httpAuthSchemeProvider:s.httpAuthSchemeProvider(),credentials:s.credentials()});var s})((e=>{const t=zn(e);return Object.assign(t,{authSchemePreference:g(e.authSchemePreference??[])})})(ri(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use(re(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(Ci(this.config)),this.middlewareStack.use(jr(this.config)),this.middlewareStack.use(u(this.config)),this.middlewareStack.use(d(this.config)),this.middlewareStack.use(h(this.config)),this.middlewareStack.use(S(this.config,{httpAuthSchemeParametersProvider:Ti,identityProviderConfigProvider:async e=>new St({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(E(this.config))}destroy(){super.destroy()}}class Ms extends rr{constructor(e){super(e),Object.setPrototypeOf(this,Ms.prototype)}}let Ls=class e extends Ms{name="AccessDeniedException";$fault="client";Message;constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};class ks extends Ms{name="ConflictException";$fault="client";Message;constructor(e){super({name:"ConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,ks.prototype),this.Message=e.Message}}let Ns=class e extends Ms{name="InternalServerException";$fault="server";$retryable={};Message;constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};class _s extends Ms{name="ServiceQuotaExceededException";$fault="client";Message;constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,_s.prototype),this.Message=e.Message}}let Us=class e extends Ms{name="ThrottlingException";$fault="client";$retryable={};Message;constructor(t){super({name:"ThrottlingException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},Fs=class e extends Ms{name="ValidationException";$fault="client";Message;Reason;FieldList;constructor(t){super({name:"ValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message,this.Reason=t.Reason,this.FieldList=t.FieldList}},Gs=class e extends Ms{name="ResourceNotFoundException";$fault="client";Message;constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};const Bs="Accuracy",Hs="AvoidFerries",zs="AvoidTolls",js="Blob",qs="BiasPosition",Vs="Code",Ws="ConsumerArn",Ks="CalculatorArn",Qs="CollectionArn",Zs="Cache-Control",Ys="CacheControl",Js="CellId",Xs="CustomLayers",eo="CarModeOptions",to="CollectionName",no="CalculatorName",ro="CellSignals",io="CreateTime",so="Content-Type",oo="ContentType",ao="Categories",co="Circle",uo="Configuration",lo="Distance",po="DeviceId",ho="DeviceIds",fo="DepartNow",go="DevicePositions",mo="DataSource",yo="DataSourceConfiguration",So="DeviceState",Ro="DurationSeconds",wo="DepartureTime",vo="DistanceUnit",Eo="Description",Co="Error",bo="EventBridgeEnabled",To="EndPosition",Po="ExpireTime",Ao="Earfcn",Io="Entries",xo="Errors",Oo="FilterBBox",Do="FilterCountries",$o="FilterCategories",Mo="Geometry",Lo="GeofenceId",ko="GeofenceProperties",No="IndexArn",_o="IndexName",Uo="InferredState",Fo="Key",Go="KeyArn",Bo="KmsKeyEnableGeospatialQueries",Ho="KmsKeyId",zo="KeyName",jo="LteCellDetails",qo="LineString",Vo="Language",Wo="Message",Ko="MapArn",Qo="MapName",Zo="MaxResults",Yo="NoExpiry",Jo="NextToken",Xo="Name",ea="PositionFiltering",ta="PlaceId",na="PricingPlan",ra="PricingPlanDataSource",ia="PositionProperties",sa="PoliticalView",oa="Place",aa="Position",ca="Polygon",ua="ResourceArn",la="RouteMatrix",da="ReceivedTime",pa="Restrictions",ha="Results",fa="Rsrp",ga="Rsrq",ma="SupplementalCategories",ya="StartPosition",Sa="SampleTime",Ra="SpeedUnit",wa="Status",va="Summary",Ea="TrackerArn",Ca="TravelMode",ba="TruckModeOptions",Ta="TrackerName",Pa="TimeZone",Aa="Tags",Ia="Text",xa="UpdateTime",Oa="Unit",Da="client",$a="error",Ma="endpoint",La="http",ka="httpError",Na="httpHeader",_a="httpQuery",Ua="jsonName",Fa="key",Ga="message",Ba="smithy.ts.sdk.synthetic.com.amazonaws.location",Ha="com.amazonaws.location";var za=[0,Ha,"ApiKey",8,0],ja=[0,Ha,"Base64EncodedGeobuf",8,21],qa=[0,Ha,"CountryCode3",8,0],Va=[0,Ha,"CountryCode3OrEmpty",8,0],Wa=[0,Ha,"PlaceCategory",8,0],Ka=[0,Ha,ta,8,0],Qa=[0,Ha,"PlaceSupplementalCategory",8,0],Za=[0,Ha,"RefererPattern",8,0],Ya=[0,Ha,"SensitiveBoolean",8,2],Ja=[0,Ha,"SensitiveDouble",8,1],Xa=[0,Ha,"SensitiveInteger",8,1],ec=[0,Ha,"SensitiveString",8,0],tc=[0,Ha,"Timestamp",8,5],nc=[-3,Ha,"AccessDeniedException",{[$a]:Da,[ka]:403},[Wo],[[0,{[Ua]:Ga}]],1];le.for(Ha).registerError(nc,Ls);var rc=[3,Ha,"AndroidApp",0,["Package","CertificateFingerprint"],[0,0],2],ic=[3,Ha,"ApiKeyFilter",0,["KeyStatus"],[0]],sc=[3,Ha,"ApiKeyRestrictions",0,["AllowActions","AllowResources","AllowReferers","AllowAndroidApps","AllowAppleApps"],[64,64,[()=>up,0],()=>Id,()=>xd],2],oc=[3,Ha,"AppleApp",0,["BundleId"],[0],1],ac=[3,Ha,"AssociateTrackerConsumerRequest",0,[Ta,Ws],[[0,1],0],2],cc=[3,Ha,"AssociateTrackerConsumerResponse",0,[],[]],uc=[3,Ha,"BatchDeleteDevicePositionHistoryError",0,[po,Co],[0,()=>vc],2],lc=[3,Ha,"BatchDeleteDevicePositionHistoryRequest",0,[Ta,ho],[[0,1],64],2],dc=[3,Ha,"BatchDeleteDevicePositionHistoryResponse",0,[xo],[()=>Od],1],pc=[3,Ha,"BatchDeleteGeofenceError",0,[Lo,Co],[0,()=>vc],2],hc=[3,Ha,"BatchDeleteGeofenceRequest",0,[to,"GeofenceIds"],[[0,1],64],2],fc=[3,Ha,"BatchDeleteGeofenceResponse",0,[xo],[()=>Dd],1],gc=[3,Ha,"BatchEvaluateGeofencesError",0,[po,Sa,Co],[0,[()=>tc,0],()=>vc],3],mc=[3,Ha,"BatchEvaluateGeofencesRequest",0,[to,"DevicePositionUpdates"],[[0,1],[()=>Bd,0]],2],yc=[3,Ha,"BatchEvaluateGeofencesResponse",0,[xo],[[()=>$d,0]],1],Sc=[3,Ha,"BatchGetDevicePositionError",0,[po,Co],[0,()=>vc],2],Rc=[3,Ha,"BatchGetDevicePositionRequest",0,[Ta,ho],[[0,1],64],2],wc=[3,Ha,"BatchGetDevicePositionResponse",0,[xo,go],[()=>Md,[()=>Gd,0]],2],vc=[3,Ha,"BatchItemError",0,[Vs,Wo],[0,0]],Ec=[3,Ha,"BatchPutGeofenceError",0,[Lo,Co],[0,()=>vc],2],Cc=[3,Ha,"BatchPutGeofenceRequest",0,[to,Io],[[0,1],[()=>kd,0]],2],bc=[3,Ha,"BatchPutGeofenceRequestEntry",0,[Lo,Mo,ko],[0,[()=>Mu,0],[()=>wp,0]],2],Tc=[3,Ha,"BatchPutGeofenceResponse",0,["Successes",xo],[[()=>Nd,0],()=>Ld],2],Pc=[3,Ha,"BatchPutGeofenceSuccess",0,[Lo,io,xa],[0,[()=>tc,0],[()=>tc,0]],3],Ac=[3,Ha,"BatchUpdateDevicePositionError",0,[po,Sa,Co],[0,[()=>tc,0],()=>vc],3],Ic=[3,Ha,"BatchUpdateDevicePositionRequest",0,[Ta,"Updates"],[[0,1],[()=>Bd,0]],2],xc=[3,Ha,"BatchUpdateDevicePositionResponse",0,[xo],[[()=>_d,0]],1],Oc=[3,Ha,"CalculateRouteCarModeOptions",0,[Hs,zs],[[()=>Ya,0],[()=>Ya,0]]],Dc=[3,Ha,"CalculateRouteMatrixRequest",0,[no,"DeparturePositions","DestinationPositions",Ca,wo,fo,vo,eo,ba,Fo],[[0,1],[()=>cp,0],[()=>cp,0],0,[()=>tc,0],[()=>Ya,0],0,[()=>Oc,0],[()=>_c,0],[()=>za,{[_a]:Fa}]],3],$c=[3,Ha,"CalculateRouteMatrixResponse",0,[la,va,"SnappedDeparturePositions","SnappedDestinationPositions"],[[()=>lp,0],()=>Mc,[()=>cp,0],[()=>cp,0]],2],Mc=[3,Ha,"CalculateRouteMatrixSummary",0,[mo,"RouteCount","ErrorCount",vo],[0,1,1,0],4],Lc=[3,Ha,"CalculateRouteRequest",0,[no,"DeparturePosition","DestinationPosition","WaypointPositions",Ca,wo,fo,vo,"IncludeLegGeometry",eo,ba,"ArrivalTime","OptimizeFor",Fo],[[0,1],[()=>ap,0],[()=>ap,0],[()=>yp,0],0,[()=>tc,0],[()=>Ya,0],0,[()=>Ya,0],[()=>Oc,0],[()=>_c,0],[()=>tc,0],0,[()=>za,{[_a]:Fa}]],3],kc=[3,Ha,"CalculateRouteResponse",0,["Legs",va],[[()=>jd,0],[()=>Nc,0]],2],Nc=[3,Ha,"CalculateRouteSummary",0,["RouteBBox",mo,lo,Ro,vo],[[()=>Ud,0],0,[()=>Ja,0],[()=>Ja,0],0],5],_c=[3,Ha,"CalculateRouteTruckModeOptions",0,[Hs,zs,"Dimensions","Weight"],[[()=>Ya,0],[()=>Ya,0],[()=>od,0],[()=>ad,0]]],Uc=[3,Ha,ro,0,[jo],[()=>np],1],Fc=[3,Ha,co,8,["Center","Radius"],[[()=>ap,0],[()=>Ja,0]],2],Gc=[-3,Ha,"ConflictException",{[$a]:Da,[ka]:409},[Wo],[[0,{[Ua]:Ga}]],1];le.for(Ha).registerError(Gc,ks);var Bc=[3,Ha,"CreateGeofenceCollectionRequest",0,[to,na,ra,Eo,Aa,Ho],[0,0,0,0,128,0],1],Hc=[3,Ha,"CreateGeofenceCollectionResponse",0,[to,Qs,io],[0,0,[()=>tc,0]],3],zc=[3,Ha,"CreateKeyRequest",0,[zo,pa,Eo,Po,Yo,Aa],[0,[()=>sc,0],0,[()=>tc,0],2,128],2],jc=[3,Ha,"CreateKeyResponse",0,[Fo,Go,zo,io],[[()=>za,0],0,0,[()=>tc,0]],4],qc=[3,Ha,"CreateMapRequest",0,[Qo,uo,na,Eo,Aa],[0,[()=>Dl,0],0,0,128],2],Vc=[3,Ha,"CreateMapResponse",0,[Qo,Ko,io],[0,0,[()=>tc,0]],3],Wc=[3,Ha,"CreatePlaceIndexRequest",0,[_o,mo,na,Eo,yo,Aa],[0,0,0,0,()=>Xc,128],2],Kc=[3,Ha,"CreatePlaceIndexResponse",0,[_o,No,io],[0,0,[()=>tc,0]],3],Qc=[3,Ha,"CreateRouteCalculatorRequest",0,[no,mo,na,Eo,Aa],[0,0,0,0,128],2],Zc=[3,Ha,"CreateRouteCalculatorResponse",0,[no,Ks,io],[0,0,[()=>tc,0]],3],Yc=[3,Ha,"CreateTrackerRequest",0,[Ta,na,Ho,ra,Eo,Aa,ea,bo,Bo],[0,0,0,0,0,128,0,2,2],1],Jc=[3,Ha,"CreateTrackerResponse",0,[Ta,Ea,io],[0,0,[()=>tc,0]],3],Xc=[3,Ha,yo,0,["IntendedUse"],[0]],eu=[3,Ha,"DeleteGeofenceCollectionRequest",0,[to],[[0,1]],1],tu=[3,Ha,"DeleteGeofenceCollectionResponse",0,[],[]],nu=[3,Ha,"DeleteKeyRequest",0,[zo,"ForceDelete"],[[0,1],[2,{[_a]:"forceDelete"}]],1],ru=[3,Ha,"DeleteKeyResponse",0,[],[]],iu=[3,Ha,"DeleteMapRequest",0,[Qo],[[0,1]],1],su=[3,Ha,"DeleteMapResponse",0,[],[]],ou=[3,Ha,"DeletePlaceIndexRequest",0,[_o],[[0,1]],1],au=[3,Ha,"DeletePlaceIndexResponse",0,[],[]],cu=[3,Ha,"DeleteRouteCalculatorRequest",0,[no],[[0,1]],1],uu=[3,Ha,"DeleteRouteCalculatorResponse",0,[],[]],lu=[3,Ha,"DeleteTrackerRequest",0,[Ta],[[0,1]],1],du=[3,Ha,"DeleteTrackerResponse",0,[],[]],pu=[3,Ha,"DescribeGeofenceCollectionRequest",0,[to],[[0,1]],1],hu=[3,Ha,"DescribeGeofenceCollectionResponse",0,[to,Qs,Eo,io,xa,na,ra,Ho,Aa,"GeofenceCount"],[0,0,0,[()=>tc,0],[()=>tc,0],0,0,0,128,1],5],fu=[3,Ha,"DescribeKeyRequest",0,[zo],[[0,1]],1],gu=[3,Ha,"DescribeKeyResponse",0,[Fo,Go,zo,pa,io,Po,xa,Eo,Aa],[[()=>za,0],0,0,[()=>sc,0],[()=>tc,0],[()=>tc,0],[()=>tc,0],0,128],7],mu=[3,Ha,"DescribeMapRequest",0,[Qo],[[0,1]],1],yu=[3,Ha,"DescribeMapResponse",0,[Qo,Ko,mo,uo,Eo,io,xa,na,Aa],[0,0,0,[()=>Dl,0],0,[()=>tc,0],[()=>tc,0],0,128],7],Su=[3,Ha,"DescribePlaceIndexRequest",0,[_o],[[0,1]],1],Ru=[3,Ha,"DescribePlaceIndexResponse",0,[_o,No,Eo,io,xa,mo,yo,na,Aa],[0,0,0,[()=>tc,0],[()=>tc,0],0,()=>Xc,0,128],7],wu=[3,Ha,"DescribeRouteCalculatorRequest",0,[no],[[0,1]],1],vu=[3,Ha,"DescribeRouteCalculatorResponse",0,[no,Ks,Eo,io,xa,mo,na,Aa],[0,0,0,[()=>tc,0],[()=>tc,0],0,0,128],6],Eu=[3,Ha,"DescribeTrackerRequest",0,[Ta],[[0,1]],1],Cu=[3,Ha,"DescribeTrackerResponse",0,[Ta,Ea,Eo,io,xa,na,ra,Aa,Ho,ea,bo,Bo],[0,0,0,[()=>tc,0],[()=>tc,0],0,0,128,0,0,2,2],5],bu=[3,Ha,"DevicePosition",0,[Sa,da,aa,po,Bs,ia],[[()=>tc,0],[()=>tc,0],[()=>ap,0],0,[()=>kl,0],[()=>Rp,0]],3],Tu=[3,Ha,"DevicePositionUpdate",0,[po,Sa,aa,Bs,ia],[0,[()=>tc,0],[()=>ap,0],[()=>kl,0],[()=>Rp,0]],3],Pu=[3,Ha,So,0,[po,Sa,aa,Bs,"Ipv4Address","WiFiAccessPoints",ro],[0,[()=>tc,0],[()=>ap,0],[()=>kl,0],0,()=>Sp,()=>Uc],3],Au=[3,Ha,"DisassociateTrackerConsumerRequest",0,[Ta,Ws],[[0,1],[0,1]],2],Iu=[3,Ha,"DisassociateTrackerConsumerResponse",0,[],[]],xu=[3,Ha,"ForecastedEvent",0,["EventId",Lo,"IsDeviceInGeofence","NearestDistance","EventType","ForecastedBreachTime",ko],[0,0,2,1,0,[()=>tc,0],[()=>wp,0]],5],Ou=[3,Ha,"ForecastGeofenceEventsDeviceState",0,[aa,"Speed"],[[()=>ap,0],1],1],Du=[3,Ha,"ForecastGeofenceEventsRequest",0,[to,So,"TimeHorizonMinutes",vo,Ra,Jo,Zo],[[0,1],[()=>Ou,0],1,0,0,0,1],2],$u=[3,Ha,"ForecastGeofenceEventsResponse",0,["ForecastedEvents",vo,Ra,Jo],[[()=>zd,0],0,0,0],3],Mu=[3,Ha,"GeofenceGeometry",0,[ca,co,"Geobuf","MultiPolygon"],[[()=>Vd,0],[()=>Fc,0],[()=>ja,0],[()=>ip,0]]],Lu=[3,Ha,"GetDevicePositionHistoryRequest",0,[Ta,po,Jo,"StartTimeInclusive","EndTimeExclusive",Zo],[[0,1],[0,1],0,[()=>tc,0],[()=>tc,0],1],2],ku=[3,Ha,"GetDevicePositionHistoryResponse",0,[go,Jo],[[()=>Gd,0],0],1],Nu=[3,Ha,"GetDevicePositionRequest",0,[Ta,po],[[0,1],[0,1]],2],_u=[3,Ha,"GetDevicePositionResponse",0,[Sa,da,aa,po,Bs,ia],[[()=>tc,0],[()=>tc,0],[()=>ap,0],0,[()=>kl,0],[()=>Rp,0]],3],Uu=[3,Ha,"GetGeofenceRequest",0,[to,Lo],[[0,1],[0,1]],2],Fu=[3,Ha,"GetGeofenceResponse",0,[Lo,Mo,wa,io,xa,ko],[0,[()=>Mu,0],0,[()=>tc,0],[()=>tc,0],[()=>wp,0]],5],Gu=[3,Ha,"GetMapGlyphsRequest",0,[Qo,"FontStack","FontUnicodeRange",Fo],[[0,1],[0,1],[0,1],[()=>za,{[_a]:Fa}]],3],Bu=[3,Ha,"GetMapGlyphsResponse",0,[js,oo,Ys],[[21,16],[0,{[Na]:so}],[0,{[Na]:Zs}]]],Hu=[3,Ha,"GetMapSpritesRequest",0,[Qo,"FileName",Fo],[[0,1],[0,1],[()=>za,{[_a]:Fa}]],2],zu=[3,Ha,"GetMapSpritesResponse",0,[js,oo,Ys],[[21,16],[0,{[Na]:so}],[0,{[Na]:Zs}]]],ju=[3,Ha,"GetMapStyleDescriptorRequest",0,[Qo,Fo],[[0,1],[()=>za,{[_a]:Fa}]],1],qu=[3,Ha,"GetMapStyleDescriptorResponse",0,[js,oo,Ys],[[21,16],[0,{[Na]:so}],[0,{[Na]:Zs}]]],Vu=[3,Ha,"GetMapTileRequest",0,[Qo,"Z","X","Y",Fo],[[0,1],[()=>ec,1],[()=>ec,1],[()=>ec,1],[()=>za,{[_a]:Fa}]],4],Wu=[3,Ha,"GetMapTileResponse",0,[js,oo,Ys],[[21,16],[0,{[Na]:so}],[0,{[Na]:Zs}]]],Ku=[3,Ha,"GetPlaceRequest",0,[_o,ta,Vo,Fo],[[0,1],[()=>Ka,1],[0,{[_a]:"language"}],[()=>za,{[_a]:Fa}]],2],Qu=[3,Ha,"GetPlaceResponse",0,[oa],[[()=>Ml,0]],1],Zu=[3,Ha,Uo,0,["ProxyDetected",aa,Bs,"DeviationDistance"],[2,[()=>ap,0],[()=>kl,0],1],1],Yu=[-3,Ha,"InternalServerException",{[$a]:"server",[ka]:500},[Wo],[[0,{[Ua]:Ga}]],1];le.for(Ha).registerError(Yu,Ns);var Ju=[3,Ha,"Leg",0,[ya,To,lo,Ro,"Steps",Mo],[[()=>ap,0],[()=>ap,0],[()=>Ja,0],[()=>Ja,0],[()=>gp,0],[()=>Xu,0]],5],Xu=[3,Ha,"LegGeometry",0,[qo],[[()=>Wd,0]]],el=[3,Ha,"ListDevicePositionsRequest",0,[Ta,Zo,Jo,"FilterGeometry"],[[0,1],1,0,[()=>sd,0]],1],tl=[3,Ha,"ListDevicePositionsResponse",0,[Io,Jo],[[()=>Kd,0],0],1],nl=[3,Ha,"ListDevicePositionsResponseEntry",0,[po,Sa,aa,Bs,ia],[0,[()=>tc,0],[()=>ap,0],[()=>kl,0],[()=>Rp,0]],3],rl=[3,Ha,"ListGeofenceCollectionsRequest",0,[Zo,Jo],[1,0]],il=[3,Ha,"ListGeofenceCollectionsResponse",0,[Io,Jo],[[()=>Qd,0],0],1],sl=[3,Ha,"ListGeofenceCollectionsResponseEntry",0,[to,Eo,io,xa,na,ra],[0,0,[()=>tc,0],[()=>tc,0],0,0],4],ol=[3,Ha,"ListGeofenceResponseEntry",0,[Lo,Mo,wa,io,xa,ko],[0,[()=>Mu,0],0,[()=>tc,0],[()=>tc,0],[()=>wp,0]],5],al=[3,Ha,"ListGeofencesRequest",0,[to,Jo,Zo],[[0,1],0,1],1],cl=[3,Ha,"ListGeofencesResponse",0,[Io,Jo],[[()=>Zd,0],0],1],ul=[3,Ha,"ListKeysRequest",0,[Zo,Jo,"Filter"],[1,0,()=>ic]],ll=[3,Ha,"ListKeysResponse",0,[Io,Jo],[[()=>Yd,0],0],1],dl=[3,Ha,"ListKeysResponseEntry",0,[zo,Po,pa,io,xa,Eo],[0,[()=>tc,0],[()=>sc,0],[()=>tc,0],[()=>tc,0],0],5],pl=[3,Ha,"ListMapsRequest",0,[Zo,Jo],[1,0]],hl=[3,Ha,"ListMapsResponse",0,[Io,Jo],[[()=>Jd,0],0],1],fl=[3,Ha,"ListMapsResponseEntry",0,[Qo,Eo,mo,io,xa,na],[0,0,0,[()=>tc,0],[()=>tc,0],0],5],gl=[3,Ha,"ListPlaceIndexesRequest",0,[Zo,Jo],[1,0]],ml=[3,Ha,"ListPlaceIndexesResponse",0,[Io,Jo],[[()=>Xd,0],0],1],yl=[3,Ha,"ListPlaceIndexesResponseEntry",0,[_o,Eo,mo,io,xa,na],[0,0,0,[()=>tc,0],[()=>tc,0],0],5],Sl=[3,Ha,"ListRouteCalculatorsRequest",0,[Zo,Jo],[1,0]],Rl=[3,Ha,"ListRouteCalculatorsResponse",0,[Io,Jo],[[()=>ep,0],0],1],wl=[3,Ha,"ListRouteCalculatorsResponseEntry",0,[no,Eo,mo,io,xa,na],[0,0,0,[()=>tc,0],[()=>tc,0],0],5],vl=[3,Ha,"ListTagsForResourceRequest",0,[ua],[[0,1]],1],El=[3,Ha,"ListTagsForResourceResponse",0,[Aa],[128]],Cl=[3,Ha,"ListTrackerConsumersRequest",0,[Ta,Zo,Jo],[[0,1],1,0],1],bl=[3,Ha,"ListTrackerConsumersResponse",0,["ConsumerArns",Jo],[64,0],1],Tl=[3,Ha,"ListTrackersRequest",0,[Zo,Jo],[1,0]],Pl=[3,Ha,"ListTrackersResponse",0,[Io,Jo],[[()=>tp,0],0],1],Al=[3,Ha,"ListTrackersResponseEntry",0,[Ta,Eo,io,xa,na,ra],[0,0,[()=>tc,0],[()=>tc,0],0,0],4],Il=[3,Ha,jo,0,[Js,"Mcc","Mnc","LocalId","NetworkMeasurements","TimingAdvance","NrCapable",fa,ga,"Tac"],[1,1,1,()=>xl,()=>rp,1,2,1,1,1],3],xl=[3,Ha,"LteLocalId",0,[Ao,"Pci"],[1,1],2],Ol=[3,Ha,"LteNetworkMeasurements",0,[Ao,Js,"Pci",fa,ga],[1,1,1,1,1],3],Dl=[3,Ha,"MapConfiguration",0,["Style",sa,Xs],[0,[()=>qa,0],64],1],$l=[3,Ha,"MapConfigurationUpdate",0,[sa,Xs],[[()=>Va,0],64]],Ml=[3,Ha,oa,0,[Mo,"Label","AddressNumber","Street","Neighborhood","Municipality","SubRegion","Region","Country","PostalCode","Interpolated",Pa,"UnitType","UnitNumber",ao,ma,"SubMunicipality"],[[()=>Ll,0],[()=>ec,0],[()=>ec,0],[()=>ec,0],[()=>ec,0],[()=>ec,0],[()=>ec,0],[()=>ec,0],[()=>ec,0],[()=>ec,0],[()=>Ya,0],[()=>id,0],[()=>ec,0],[()=>ec,0],[()=>sp,0],[()=>op,0],[()=>ec,0]],1],Ll=[3,Ha,"PlaceGeometry",0,["Point"],[[()=>ap,0]]],kl=[3,Ha,"PositionalAccuracy",0,["Horizontal"],[[()=>Ja,0]],1],Nl=[3,Ha,"PutGeofenceRequest",0,[to,Lo,Mo,ko],[[0,1],[0,1],[()=>Mu,0],[()=>wp,0]],3],_l=[3,Ha,"PutGeofenceResponse",0,[Lo,io,xa],[0,[()=>tc,0],[()=>tc,0]],3],Ul=[-3,Ha,"ResourceNotFoundException",{[$a]:Da,[ka]:404},[Wo],[[0,{[Ua]:Ga}]],1];le.for(Ha).registerError(Ul,Gs);var Fl=[3,Ha,"RouteMatrixEntry",0,[lo,Ro,Co],[[()=>Ja,0],[()=>Ja,0],()=>Gl]],Gl=[3,Ha,"RouteMatrixEntryError",0,[Vs,Wo],[0,0],1],Bl=[3,Ha,"SearchForPositionResult",0,[oa,lo,ta],[[()=>Ml,0],[()=>Ja,0],[()=>Ka,0]],2],Hl=[3,Ha,"SearchForSuggestionsResult",0,[Ia,ta,ao,ma],[[()=>ec,0],[()=>Ka,0],[()=>sp,0],[()=>op,0]],1],zl=[3,Ha,"SearchForTextResult",0,[oa,lo,"Relevance",ta],[[()=>Ml,0],[()=>Ja,0],[()=>Ja,0],[()=>Ka,0]],1],jl=[3,Ha,"SearchPlaceIndexForPositionRequest",0,[_o,aa,Zo,Vo,Fo],[[0,1],[()=>ap,0],1,0,[()=>za,{[_a]:Fa}]],2],ql=[3,Ha,"SearchPlaceIndexForPositionResponse",0,[va,ha],[[()=>Vl,0],[()=>pp,0]],2],Vl=[3,Ha,"SearchPlaceIndexForPositionSummary",0,[aa,mo,Zo,Vo],[[()=>ap,0],0,1,0],2],Wl=[3,Ha,"SearchPlaceIndexForSuggestionsRequest",0,[_o,Ia,qs,Oo,Do,Zo,Vo,$o,Fo],[[0,1],[()=>ec,0],[()=>ap,0],[()=>Ud,0],[()=>Fd,0],1,0,[()=>Hd,0],[()=>za,{[_a]:Fa}]],2],Kl=[3,Ha,"SearchPlaceIndexForSuggestionsResponse",0,[va,ha],[[()=>Ql,0],[()=>hp,0]],2],Ql=[3,Ha,"SearchPlaceIndexForSuggestionsSummary",0,[Ia,mo,qs,Oo,Do,Zo,Vo,$o],[[()=>ec,0],0,[()=>ap,0],[()=>Ud,0],[()=>Fd,0],1,0,[()=>Hd,0]],2],Zl=[3,Ha,"SearchPlaceIndexForTextRequest",0,[_o,Ia,qs,Oo,Do,Zo,Vo,$o,Fo],[[0,1],[()=>ec,0],[()=>ap,0],[()=>Ud,0],[()=>Fd,0],1,0,[()=>Hd,0],[()=>za,{[_a]:Fa}]],2],Yl=[3,Ha,"SearchPlaceIndexForTextResponse",0,[va,ha],[[()=>Jl,0],[()=>fp,0]],2],Jl=[3,Ha,"SearchPlaceIndexForTextSummary",0,[Ia,mo,qs,Oo,Do,Zo,"ResultBBox",Vo,$o],[[()=>ec,0],0,[()=>ap,0],[()=>Ud,0],[()=>Fd,0],1,[()=>Ud,0],0,[()=>Hd,0]],2],Xl=[-3,Ha,"ServiceQuotaExceededException",{[$a]:Da,[ka]:402},[Wo],[[0,{[Ua]:Ga}]],1];le.for(Ha).registerError(Xl,_s);var ed=[3,Ha,"Step",0,[ya,To,lo,Ro,"GeometryOffset"],[[()=>ap,0],[()=>ap,0],[()=>Ja,0],[()=>Ja,0],1],4],td=[3,Ha,"TagResourceRequest",0,[ua,Aa],[[0,1],128],2],nd=[3,Ha,"TagResourceResponse",0,[],[]],rd=[-3,Ha,"ThrottlingException",{[$a]:Da,[ka]:429},[Wo],[[0,{[Ua]:Ga}]],1];le.for(Ha).registerError(rd,Us);var id=[3,Ha,Pa,0,[Xo,"Offset"],[[()=>ec,0],[()=>Xa,0]],1],sd=[3,Ha,"TrackingFilterGeometry",0,[ca],[[()=>Vd,0]]],od=[3,Ha,"TruckDimensions",0,["Length","Height","Width",Oa],[[()=>Ja,0],[()=>Ja,0],[()=>Ja,0],0]],ad=[3,Ha,"TruckWeight",0,["Total",Oa],[[()=>Ja,0],0]],cd=[3,Ha,"UntagResourceRequest",0,[ua,"TagKeys"],[[0,1],[64,{[_a]:"tagKeys"}]],2],ud=[3,Ha,"UntagResourceResponse",0,[],[]],ld=[3,Ha,"UpdateGeofenceCollectionRequest",0,[to,na,ra,Eo],[[0,1],0,0,0],1],dd=[3,Ha,"UpdateGeofenceCollectionResponse",0,[to,Qs,xa],[0,0,[()=>tc,0]],3],pd=[3,Ha,"UpdateKeyRequest",0,[zo,Eo,Po,Yo,"ForceUpdate",pa],[[0,1],0,[()=>tc,0],2,2,[()=>sc,0]],1],hd=[3,Ha,"UpdateKeyResponse",0,[Go,zo,xa],[0,0,[()=>tc,0]],3],fd=[3,Ha,"UpdateMapRequest",0,[Qo,na,Eo,"ConfigurationUpdate"],[[0,1],0,0,[()=>$l,0]],1],gd=[3,Ha,"UpdateMapResponse",0,[Qo,Ko,xa],[0,0,[()=>tc,0]],3],md=[3,Ha,"UpdatePlaceIndexRequest",0,[_o,na,Eo,yo],[[0,1],0,0,()=>Xc],1],yd=[3,Ha,"UpdatePlaceIndexResponse",0,[_o,No,xa],[0,0,[()=>tc,0]],3],Sd=[3,Ha,"UpdateRouteCalculatorRequest",0,[no,na,Eo],[[0,1],0,0],1],Rd=[3,Ha,"UpdateRouteCalculatorResponse",0,[no,Ks,xa],[0,0,[()=>tc,0]],3],wd=[3,Ha,"UpdateTrackerRequest",0,[Ta,na,ra,Eo,ea,bo,Bo],[[0,1],0,0,0,0,2,2],1],vd=[3,Ha,"UpdateTrackerResponse",0,[Ta,Ea,xa],[0,0,[()=>tc,0]],3],Ed=[-3,Ha,"ValidationException",{[$a]:Da,[ka]:400},[Wo,"Reason","FieldList"],[[0,{[Ua]:Ga}],[0,{[Ua]:"reason"}],[()=>mp,{[Ua]:"fieldList"}]],3];le.for(Ha).registerError(Ed,Fs);var Cd=[3,Ha,"ValidationExceptionField",0,[Xo,Wo],[[0,{[Ua]:"name"}],[0,{[Ua]:Ga}]],2],bd=[3,Ha,"VerifyDevicePositionRequest",0,[Ta,So,vo],[[0,1],[()=>Pu,0],0],2],Td=[3,Ha,"VerifyDevicePositionResponse",0,[Uo,po,Sa,da,vo],[[()=>Zu,0],0,[()=>tc,0],[()=>tc,0],0],5],Pd=[3,Ha,"WiFiAccessPoint",0,["MacAddress","Rss"],[0,1],2],Ad=[-3,Ba,"LocationServiceException",0,[],[]];le.for(Ba).registerError(Ad,Ms);var Id=[1,Ha,"AndroidAppList",0,()=>rc],xd=[1,Ha,"AppleAppList",0,()=>oc],Od=[1,Ha,"BatchDeleteDevicePositionHistoryErrorList",0,()=>uc],Dd=[1,Ha,"BatchDeleteGeofenceErrorList",0,()=>pc],$d=[1,Ha,"BatchEvaluateGeofencesErrorList",0,[()=>gc,0]],Md=[1,Ha,"BatchGetDevicePositionErrorList",0,()=>Sc],Ld=[1,Ha,"BatchPutGeofenceErrorList",0,()=>Ec],kd=[1,Ha,"BatchPutGeofenceRequestEntryList",0,[()=>bc,0]],Nd=[1,Ha,"BatchPutGeofenceSuccessList",0,[()=>Pc,0]],_d=[1,Ha,"BatchUpdateDevicePositionErrorList",0,[()=>Ac,0]],Ud=[1,Ha,"BoundingBox",8,1],Fd=[1,Ha,"CountryCodeList",0,[()=>qa,0]],Gd=[1,Ha,"DevicePositionList",0,[()=>bu,0]],Bd=[1,Ha,"DevicePositionUpdateList",0,[()=>Tu,0]],Hd=[1,Ha,"FilterPlaceCategoryList",0,[()=>Wa,0]],zd=[1,Ha,"ForecastedEventsList",0,[()=>xu,0]],jd=[1,Ha,"LegList",0,[()=>Ju,0]],qd=[1,Ha,"LinearRing",0,[()=>ap,0]],Vd=[1,Ha,"LinearRings",0,[()=>qd,0]],Wd=[1,Ha,qo,0,[()=>ap,0]],Kd=[1,Ha,"ListDevicePositionsResponseEntryList",0,[()=>nl,0]],Qd=[1,Ha,"ListGeofenceCollectionsResponseEntryList",0,[()=>sl,0]],Zd=[1,Ha,"ListGeofenceResponseEntryList",0,[()=>ol,0]],Yd=[1,Ha,"ListKeysResponseEntryList",0,[()=>dl,0]],Jd=[1,Ha,"ListMapsResponseEntryList",0,[()=>fl,0]],Xd=[1,Ha,"ListPlaceIndexesResponseEntryList",0,[()=>yl,0]],ep=[1,Ha,"ListRouteCalculatorsResponseEntryList",0,[()=>wl,0]],tp=[1,Ha,"ListTrackersResponseEntryList",0,[()=>Al,0]],np=[1,Ha,"LteCellDetailsList",0,()=>Il],rp=[1,Ha,"LteNetworkMeasurementsList",0,()=>Ol],ip=[1,Ha,"MultiLinearRings",0,[()=>Vd,0]],sp=[1,Ha,"PlaceCategoryList",0,[()=>Wa,0]],op=[1,Ha,"PlaceSupplementalCategoryList",0,[()=>Qa,0]],ap=[1,Ha,aa,8,1],cp=[1,Ha,"PositionList",0,[()=>ap,0]],up=[1,Ha,"RefererPatternList",0,[()=>Za,0]],lp=[1,Ha,la,0,[()=>dp,0]],dp=[1,Ha,"RouteMatrixRow",0,[()=>Fl,0]],pp=[1,Ha,"SearchForPositionResultList",0,[()=>Bl,0]],hp=[1,Ha,"SearchForSuggestionsResultList",0,[()=>Hl,0]],fp=[1,Ha,"SearchForTextResultList",0,[()=>zl,0]],gp=[1,Ha,"StepList",0,[()=>ed,0]],mp=[1,Ha,"ValidationExceptionFieldList",0,[()=>Cd,0]],yp=[1,Ha,"WaypointPositionList",0,[()=>ap,0]],Sp=[1,Ha,"WiFiAccessPointList",0,()=>Pd],Rp=[2,Ha,"PositionPropertyMap",8,0,0],wp=[2,Ha,"PropertyMap",8,0,0],vp=[9,Ha,"AssociateTrackerConsumer",{[Ma]:["cp.tracking."],[La]:["POST","/tracking/v0/trackers/{TrackerName}/consumers",200]},()=>ac,()=>cc],Ep=[9,Ha,"BatchDeleteDevicePositionHistory",{[Ma]:["tracking."],[La]:["POST","/tracking/v0/trackers/{TrackerName}/delete-positions",200]},()=>lc,()=>dc],Cp=[9,Ha,"BatchDeleteGeofence",{[Ma]:["geofencing."],[La]:["POST","/geofencing/v0/collections/{CollectionName}/delete-geofences",200]},()=>hc,()=>fc],bp=[9,Ha,"BatchEvaluateGeofences",{[Ma]:["geofencing."],[La]:["POST","/geofencing/v0/collections/{CollectionName}/positions",200]},()=>mc,()=>yc],Tp=[9,Ha,"BatchGetDevicePosition",{[Ma]:["tracking."],[La]:["POST","/tracking/v0/trackers/{TrackerName}/get-positions",200]},()=>Rc,()=>wc],Pp=[9,Ha,"BatchPutGeofence",{[Ma]:["geofencing."],[La]:["POST","/geofencing/v0/collections/{CollectionName}/put-geofences",200]},()=>Cc,()=>Tc],Ap=[9,Ha,"BatchUpdateDevicePosition",{[Ma]:["tracking."],[La]:["POST","/tracking/v0/trackers/{TrackerName}/positions",200]},()=>Ic,()=>xc],Ip=[9,Ha,"CalculateRoute",{[Ma]:["routes."],[La]:["POST","/routes/v0/calculators/{CalculatorName}/calculate/route",200]},()=>Lc,()=>kc],xp=[9,Ha,"CalculateRouteMatrix",{[Ma]:["routes."],[La]:["POST","/routes/v0/calculators/{CalculatorName}/calculate/route-matrix",200]},()=>Dc,()=>$c],Op=[9,Ha,"CreateGeofenceCollection",{[Ma]:["cp.geofencing."],[La]:["POST","/geofencing/v0/collections",200]},()=>Bc,()=>Hc],Dp=[9,Ha,"CreateKey",{[Ma]:["cp.metadata."],[La]:["POST","/metadata/v0/keys",200]},()=>zc,()=>jc],$p=[9,Ha,"CreateMap",{[Ma]:["cp.maps."],[La]:["POST","/maps/v0/maps",200]},()=>qc,()=>Vc],Mp=[9,Ha,"CreatePlaceIndex",{[Ma]:["cp.places."],[La]:["POST","/places/v0/indexes",200]},()=>Wc,()=>Kc],Lp=[9,Ha,"CreateRouteCalculator",{[Ma]:["cp.routes."],[La]:["POST","/routes/v0/calculators",200]},()=>Qc,()=>Zc],kp=[9,Ha,"CreateTracker",{[Ma]:["cp.tracking."],[La]:["POST","/tracking/v0/trackers",200]},()=>Yc,()=>Jc],Np=[9,Ha,"DeleteGeofenceCollection",{[Ma]:["cp.geofencing."],[La]:["DELETE","/geofencing/v0/collections/{CollectionName}",200]},()=>eu,()=>tu],_p=[9,Ha,"DeleteKey",{[Ma]:["cp.metadata."],[La]:["DELETE","/metadata/v0/keys/{KeyName}",200]},()=>nu,()=>ru],Up=[9,Ha,"DeleteMap",{[Ma]:["cp.maps."],[La]:["DELETE","/maps/v0/maps/{MapName}",200]},()=>iu,()=>su],Fp=[9,Ha,"DeletePlaceIndex",{[Ma]:["cp.places."],[La]:["DELETE","/places/v0/indexes/{IndexName}",200]},()=>ou,()=>au],Gp=[9,Ha,"DeleteRouteCalculator",{[Ma]:["cp.routes."],[La]:["DELETE","/routes/v0/calculators/{CalculatorName}",200]},()=>cu,()=>uu],Bp=[9,Ha,"DeleteTracker",{[Ma]:["cp.tracking."],[La]:["DELETE","/tracking/v0/trackers/{TrackerName}",200]},()=>lu,()=>du],Hp=[9,Ha,"DescribeGeofenceCollection",{[Ma]:["cp.geofencing."],[La]:["GET","/geofencing/v0/collections/{CollectionName}",200]},()=>pu,()=>hu],zp=[9,Ha,"DescribeKey",{[Ma]:["cp.metadata."],[La]:["GET","/metadata/v0/keys/{KeyName}",200]},()=>fu,()=>gu],jp=[9,Ha,"DescribeMap",{[Ma]:["cp.maps."],[La]:["GET","/maps/v0/maps/{MapName}",200]},()=>mu,()=>yu],qp=[9,Ha,"DescribePlaceIndex",{[Ma]:["cp.places."],[La]:["GET","/places/v0/indexes/{IndexName}",200]},()=>Su,()=>Ru],Vp=[9,Ha,"DescribeRouteCalculator",{[Ma]:["cp.routes."],[La]:["GET","/routes/v0/calculators/{CalculatorName}",200]},()=>wu,()=>vu],Wp=[9,Ha,"DescribeTracker",{[Ma]:["cp.tracking."],[La]:["GET","/tracking/v0/trackers/{TrackerName}",200]},()=>Eu,()=>Cu],Kp=[9,Ha,"DisassociateTrackerConsumer",{[Ma]:["cp.tracking."],[La]:["DELETE","/tracking/v0/trackers/{TrackerName}/consumers/{ConsumerArn}",200]},()=>Au,()=>Iu],Qp=[9,Ha,"ForecastGeofenceEvents",{[Ma]:["geofencing."],[La]:["POST","/geofencing/v0/collections/{CollectionName}/forecast-geofence-events",200]},()=>Du,()=>$u],Zp=[9,Ha,"GetDevicePosition",{[Ma]:["tracking."],[La]:["GET","/tracking/v0/trackers/{TrackerName}/devices/{DeviceId}/positions/latest",200]},()=>Nu,()=>_u],Yp=[9,Ha,"GetDevicePositionHistory",{[Ma]:["tracking."],[La]:["POST","/tracking/v0/trackers/{TrackerName}/devices/{DeviceId}/list-positions",200]},()=>Lu,()=>ku],Jp=[9,Ha,"GetGeofence",{[Ma]:["geofencing."],[La]:["GET","/geofencing/v0/collections/{CollectionName}/geofences/{GeofenceId}",200]},()=>Uu,()=>Fu],Xp=[9,Ha,"GetMapGlyphs",{[Ma]:["maps."],[La]:["GET","/maps/v0/maps/{MapName}/glyphs/{FontStack}/{FontUnicodeRange}",200]},()=>Gu,()=>Bu],eh=[9,Ha,"GetMapSprites",{[Ma]:["maps."],[La]:["GET","/maps/v0/maps/{MapName}/sprites/{FileName}",200]},()=>Hu,()=>zu],th=[9,Ha,"GetMapStyleDescriptor",{[Ma]:["maps."],[La]:["GET","/maps/v0/maps/{MapName}/style-descriptor",200]},()=>ju,()=>qu],nh=[9,Ha,"GetMapTile",{[Ma]:["maps."],[La]:["GET","/maps/v0/maps/{MapName}/tiles/{Z}/{X}/{Y}",200]},()=>Vu,()=>Wu],rh=[9,Ha,"GetPlace",{[Ma]:["places."],[La]:["GET","/places/v0/indexes/{IndexName}/places/{PlaceId}",200]},()=>Ku,()=>Qu],ih=[9,Ha,"ListDevicePositions",{[Ma]:["tracking."],[La]:["POST","/tracking/v0/trackers/{TrackerName}/list-positions",200]},()=>el,()=>tl],sh=[9,Ha,"ListGeofenceCollections",{[Ma]:["cp.geofencing."],[La]:["POST","/geofencing/v0/list-collections",200]},()=>rl,()=>il],oh=[9,Ha,"ListGeofences",{[Ma]:["geofencing."],[La]:["POST","/geofencing/v0/collections/{CollectionName}/list-geofences",200]},()=>al,()=>cl],ah=[9,Ha,"ListKeys",{[Ma]:["cp.metadata."],[La]:["POST","/metadata/v0/list-keys",200]},()=>ul,()=>ll],ch=[9,Ha,"ListMaps",{[Ma]:["cp.maps."],[La]:["POST","/maps/v0/list-maps",200]},()=>pl,()=>hl],uh=[9,Ha,"ListPlaceIndexes",{[Ma]:["cp.places."],[La]:["POST","/places/v0/list-indexes",200]},()=>gl,()=>ml],lh=[9,Ha,"ListRouteCalculators",{[Ma]:["cp.routes."],[La]:["POST","/routes/v0/list-calculators",200]},()=>Sl,()=>Rl],dh=[9,Ha,"ListTagsForResource",{[Ma]:["cp.metadata."],[La]:["GET","/tags/{ResourceArn}",200]},()=>vl,()=>El],ph=[9,Ha,"ListTrackerConsumers",{[Ma]:["cp.tracking."],[La]:["POST","/tracking/v0/trackers/{TrackerName}/list-consumers",200]},()=>Cl,()=>bl],hh=[9,Ha,"ListTrackers",{[Ma]:["cp.tracking."],[La]:["POST","/tracking/v0/list-trackers",200]},()=>Tl,()=>Pl],fh=[9,Ha,"PutGeofence",{[Ma]:["geofencing."],[La]:["PUT","/geofencing/v0/collections/{CollectionName}/geofences/{GeofenceId}",200]},()=>Nl,()=>_l],gh=[9,Ha,"SearchPlaceIndexForPosition",{[Ma]:["places."],[La]:["POST","/places/v0/indexes/{IndexName}/search/position",200]},()=>jl,()=>ql],mh=[9,Ha,"SearchPlaceIndexForSuggestions",{[Ma]:["places."],[La]:["POST","/places/v0/indexes/{IndexName}/search/suggestions",200]},()=>Wl,()=>Kl],yh=[9,Ha,"SearchPlaceIndexForText",{[Ma]:["places."],[La]:["POST","/places/v0/indexes/{IndexName}/search/text",200]},()=>Zl,()=>Yl],Sh=[9,Ha,"TagResource",{[Ma]:["cp.metadata."],[La]:["POST","/tags/{ResourceArn}",200]},()=>td,()=>nd],Rh=[9,Ha,"UntagResource",{[Ma]:["cp.metadata."],[La]:["DELETE","/tags/{ResourceArn}",200]},()=>cd,()=>ud],wh=[9,Ha,"UpdateGeofenceCollection",{[Ma]:["cp.geofencing."],[La]:["PATCH","/geofencing/v0/collections/{CollectionName}",200]},()=>ld,()=>dd],vh=[9,Ha,"UpdateKey",{[Ma]:["cp.metadata."],[La]:["PATCH","/metadata/v0/keys/{KeyName}",200]},()=>pd,()=>hd],Eh=[9,Ha,"UpdateMap",{[Ma]:["cp.maps."],[La]:["PATCH","/maps/v0/maps/{MapName}",200]},()=>fd,()=>gd],Ch=[9,Ha,"UpdatePlaceIndex",{[Ma]:["cp.places."],[La]:["PATCH","/places/v0/indexes/{IndexName}",200]},()=>md,()=>yd],bh=[9,Ha,"UpdateRouteCalculator",{[Ma]:["cp.routes."],[La]:["PATCH","/routes/v0/calculators/{CalculatorName}",200]},()=>Sd,()=>Rd],Th=[9,Ha,"UpdateTracker",{[Ma]:["cp.tracking."],[La]:["PATCH","/tracking/v0/trackers/{TrackerName}",200]},()=>wd,()=>vd],Ph=[9,Ha,"VerifyDevicePosition",{[Ma]:["tracking."],[La]:["POST","/tracking/v0/trackers/{TrackerName}/positions/verify",200]},()=>bd,()=>Td];class Ah extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","AssociateTrackerConsumer",{}).n("LocationClient","AssociateTrackerConsumerCommand").sc(vp).build()){}class Ih extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","BatchDeleteDevicePositionHistory",{}).n("LocationClient","BatchDeleteDevicePositionHistoryCommand").sc(Ep).build()){}class xh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","BatchDeleteGeofence",{}).n("LocationClient","BatchDeleteGeofenceCommand").sc(Cp).build()){}class Oh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","BatchEvaluateGeofences",{}).n("LocationClient","BatchEvaluateGeofencesCommand").sc(bp).build()){}class Dh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","BatchGetDevicePosition",{}).n("LocationClient","BatchGetDevicePositionCommand").sc(Tp).build()){}class $h extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","BatchPutGeofence",{}).n("LocationClient","BatchPutGeofenceCommand").sc(Pp).build()){}class Mh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","BatchUpdateDevicePosition",{}).n("LocationClient","BatchUpdateDevicePositionCommand").sc(Ap).build()){}class Lh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","CalculateRoute",{}).n("LocationClient","CalculateRouteCommand").sc(Ip).build()){}let kh=class extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","CalculateRouteMatrix",{}).n("LocationClient","CalculateRouteMatrixCommand").sc(xp).build()){};class Nh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","CreateGeofenceCollection",{}).n("LocationClient","CreateGeofenceCollectionCommand").sc(Op).build()){}class _h extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","CreateKey",{}).n("LocationClient","CreateKeyCommand").sc(Dp).build()){}class Uh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","CreateMap",{}).n("LocationClient","CreateMapCommand").sc($p).build()){}class Fh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","CreatePlaceIndex",{}).n("LocationClient","CreatePlaceIndexCommand").sc(Mp).build()){}class Gh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","CreateRouteCalculator",{}).n("LocationClient","CreateRouteCalculatorCommand").sc(Lp).build()){}class Bh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","CreateTracker",{}).n("LocationClient","CreateTrackerCommand").sc(kp).build()){}class Hh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DeleteGeofenceCollection",{}).n("LocationClient","DeleteGeofenceCollectionCommand").sc(Np).build()){}class zh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DeleteKey",{}).n("LocationClient","DeleteKeyCommand").sc(_p).build()){}class jh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DeleteMap",{}).n("LocationClient","DeleteMapCommand").sc(Up).build()){}class qh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DeletePlaceIndex",{}).n("LocationClient","DeletePlaceIndexCommand").sc(Fp).build()){}class Vh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DeleteRouteCalculator",{}).n("LocationClient","DeleteRouteCalculatorCommand").sc(Gp).build()){}class Wh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DeleteTracker",{}).n("LocationClient","DeleteTrackerCommand").sc(Bp).build()){}class Kh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DescribeGeofenceCollection",{}).n("LocationClient","DescribeGeofenceCollectionCommand").sc(Hp).build()){}class Qh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DescribeKey",{}).n("LocationClient","DescribeKeyCommand").sc(zp).build()){}class Zh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DescribeMap",{}).n("LocationClient","DescribeMapCommand").sc(jp).build()){}class Yh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DescribePlaceIndex",{}).n("LocationClient","DescribePlaceIndexCommand").sc(qp).build()){}class Jh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DescribeRouteCalculator",{}).n("LocationClient","DescribeRouteCalculatorCommand").sc(Vp).build()){}class Xh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DescribeTracker",{}).n("LocationClient","DescribeTrackerCommand").sc(Wp).build()){}class ef extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DisassociateTrackerConsumer",{}).n("LocationClient","DisassociateTrackerConsumerCommand").sc(Kp).build()){}class tf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","ForecastGeofenceEvents",{}).n("LocationClient","ForecastGeofenceEventsCommand").sc(Qp).build()){}class nf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetDevicePosition",{}).n("LocationClient","GetDevicePositionCommand").sc(Zp).build()){}class rf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetDevicePositionHistory",{}).n("LocationClient","GetDevicePositionHistoryCommand").sc(Yp).build()){}class sf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetGeofence",{}).n("LocationClient","GetGeofenceCommand").sc(Jp).build()){}class of extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetMapGlyphs",{}).n("LocationClient","GetMapGlyphsCommand").sc(Xp).build()){}class af extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetMapSprites",{}).n("LocationClient","GetMapSpritesCommand").sc(eh).build()){}class cf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetMapStyleDescriptor",{}).n("LocationClient","GetMapStyleDescriptorCommand").sc(th).build()){}class uf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetMapTile",{}).n("LocationClient","GetMapTileCommand").sc(nh).build()){}let lf=class extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetPlace",{}).n("LocationClient","GetPlaceCommand").sc(rh).build()){};class df extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListDevicePositions",{}).n("LocationClient","ListDevicePositionsCommand").sc(ih).build()){}class pf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListGeofenceCollections",{}).n("LocationClient","ListGeofenceCollectionsCommand").sc(sh).build()){}class hf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListGeofences",{}).n("LocationClient","ListGeofencesCommand").sc(oh).build()){}class ff extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListKeys",{}).n("LocationClient","ListKeysCommand").sc(ah).build()){}class gf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListMaps",{}).n("LocationClient","ListMapsCommand").sc(ch).build()){}class mf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListPlaceIndexes",{}).n("LocationClient","ListPlaceIndexesCommand").sc(uh).build()){}class yf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListRouteCalculators",{}).n("LocationClient","ListRouteCalculatorsCommand").sc(lh).build()){}class Sf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListTagsForResource",{}).n("LocationClient","ListTagsForResourceCommand").sc(dh).build()){}class Rf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListTrackerConsumers",{}).n("LocationClient","ListTrackerConsumersCommand").sc(ph).build()){}class wf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListTrackers",{}).n("LocationClient","ListTrackersCommand").sc(hh).build()){}class vf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","PutGeofence",{}).n("LocationClient","PutGeofenceCommand").sc(fh).build()){}class Ef extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","SearchPlaceIndexForPosition",{}).n("LocationClient","SearchPlaceIndexForPositionCommand").sc(gh).build()){}class Cf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","SearchPlaceIndexForSuggestions",{}).n("LocationClient","SearchPlaceIndexForSuggestionsCommand").sc(mh).build()){}class bf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","SearchPlaceIndexForText",{}).n("LocationClient","SearchPlaceIndexForTextCommand").sc(yh).build()){}class Tf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","TagResource",{}).n("LocationClient","TagResourceCommand").sc(Sh).build()){}class Pf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","UntagResource",{}).n("LocationClient","UntagResourceCommand").sc(Rh).build()){}class Af extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","UpdateGeofenceCollection",{}).n("LocationClient","UpdateGeofenceCollectionCommand").sc(wh).build()){}class If extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","UpdateKey",{}).n("LocationClient","UpdateKeyCommand").sc(vh).build()){}class xf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","UpdateMap",{}).n("LocationClient","UpdateMapCommand").sc(Eh).build()){}class Of extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","UpdatePlaceIndex",{}).n("LocationClient","UpdatePlaceIndexCommand").sc(Ch).build()){}class Df extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","UpdateRouteCalculator",{}).n("LocationClient","UpdateRouteCalculatorCommand").sc(bh).build()){}class $f extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","UpdateTracker",{}).n("LocationClient","UpdateTrackerCommand").sc(Th).build()){}class Mf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","VerifyDevicePosition",{}).n("LocationClient","VerifyDevicePositionCommand").sc(Ph).build()){}const Lf=T($s,tf,"NextToken","NextToken","MaxResults"),kf=T($s,rf,"NextToken","NextToken","MaxResults"),Nf=T($s,df,"NextToken","NextToken","MaxResults"),_f=T($s,pf,"NextToken","NextToken","MaxResults"),Uf=T($s,hf,"NextToken","NextToken","MaxResults"),Ff=T($s,ff,"NextToken","NextToken","MaxResults"),Gf=T($s,gf,"NextToken","NextToken","MaxResults"),Bf=T($s,mf,"NextToken","NextToken","MaxResults"),Hf=T($s,yf,"NextToken","NextToken","MaxResults"),zf=T($s,Rf,"NextToken","NextToken","MaxResults"),jf=T($s,wf,"NextToken","NextToken","MaxResults"),qf={AssociateTrackerConsumerCommand:Ah,BatchDeleteDevicePositionHistoryCommand:Ih,BatchDeleteGeofenceCommand:xh,BatchEvaluateGeofencesCommand:Oh,BatchGetDevicePositionCommand:Dh,BatchPutGeofenceCommand:$h,BatchUpdateDevicePositionCommand:Mh,CalculateRouteCommand:Lh,CalculateRouteMatrixCommand:kh,CreateGeofenceCollectionCommand:Nh,CreateKeyCommand:_h,CreateMapCommand:Uh,CreatePlaceIndexCommand:Fh,CreateRouteCalculatorCommand:Gh,CreateTrackerCommand:Bh,DeleteGeofenceCollectionCommand:Hh,DeleteKeyCommand:zh,DeleteMapCommand:jh,DeletePlaceIndexCommand:qh,DeleteRouteCalculatorCommand:Vh,DeleteTrackerCommand:Wh,DescribeGeofenceCollectionCommand:Kh,DescribeKeyCommand:Qh,DescribeMapCommand:Zh,DescribePlaceIndexCommand:Yh,DescribeRouteCalculatorCommand:Jh,DescribeTrackerCommand:Xh,DisassociateTrackerConsumerCommand:ef,ForecastGeofenceEventsCommand:tf,GetDevicePositionCommand:nf,GetDevicePositionHistoryCommand:rf,GetGeofenceCommand:sf,GetMapGlyphsCommand:of,GetMapSpritesCommand:af,GetMapStyleDescriptorCommand:cf,GetMapTileCommand:uf,GetPlaceCommand:lf,ListDevicePositionsCommand:df,ListGeofenceCollectionsCommand:pf,ListGeofencesCommand:hf,ListKeysCommand:ff,ListMapsCommand:gf,ListPlaceIndexesCommand:mf,ListRouteCalculatorsCommand:yf,ListTagsForResourceCommand:Sf,ListTrackerConsumersCommand:Rf,ListTrackersCommand:wf,PutGeofenceCommand:vf,SearchPlaceIndexForPositionCommand:Ef,SearchPlaceIndexForSuggestionsCommand:Cf,SearchPlaceIndexForTextCommand:bf,TagResourceCommand:Tf,UntagResourceCommand:Pf,UpdateGeofenceCollectionCommand:Af,UpdateKeyCommand:If,UpdateMapCommand:xf,UpdatePlaceIndexCommand:Of,UpdateRouteCalculatorCommand:Df,UpdateTrackerCommand:$f,VerifyDevicePositionCommand:Mf},Vf={paginateForecastGeofenceEvents:Lf,paginateGetDevicePositionHistory:kf,paginateListDevicePositions:Nf,paginateListGeofenceCollections:_f,paginateListGeofences:Uf,paginateListKeys:Ff,paginateListMaps:Gf,paginateListPlaceIndexes:Bf,paginateListRouteCalculators:Hf,paginateListTrackerConsumers:zf,paginateListTrackers:jf};class Wf extends $s{}function Kf(e){return Promise.all(Object.keys(e).reduce(((t,n)=>{const r=e[n];return"string"==typeof r?t.push([n,r]):t.push(r().then((e=>[n,e]))),t}),[])).then((e=>e.reduce(((e,[t,n])=>(e[t]=n,e)),{})))}function Qf(e){return async t=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:n,CognitoIdentityClient:r}=await Promise.resolve().then((function(){return vL})),i=n=>e.clientConfig?.[n]??e.parentClientConfig?.[n]??t?.callerClientConfig?.[n],{Credentials:{AccessKeyId:s=Zf(e.logger),Expiration:o,SecretKey:a=Jf(e.logger),SessionToken:c}=Yf(e.logger)}=await(e.client??new r(Object.assign({},e.clientConfig??{},{region:i("region"),profile:i("profile"),userAgentAppId:i("userAgentAppId")}))).send(new n({CustomRoleArn:e.customRoleArn,IdentityId:e.identityId,Logins:e.logins?await Kf(e.logins):void 0}));return{identityId:e.identityId,accessKeyId:s,secretAccessKey:a,sessionToken:c,expiration:o}}}function Zf(e){throw new dn("Response from Amazon Cognito contained no access key ID",{logger:e})}function Yf(e){throw new dn("Response from Amazon Cognito contained no credentials",{logger:e})}function Jf(e){throw new dn("Response from Amazon Cognito contained no secret key",{logger:e})}nr(qf,Wf,{paginators:Vf});const Xf="IdentityIds";class eg{dbName;constructor(e="aws:cognito-identity-ids"){this.dbName=e}getItem(e){return this.withObjectStore("readonly",(t=>{const n=t.get(e);return new Promise((e=>{n.onerror=()=>e(null),n.onsuccess=()=>e(n.result?n.result.value:null)}))})).catch((()=>null))}removeItem(e){return this.withObjectStore("readwrite",(t=>{const n=t.delete(e);return new Promise(((e,t)=>{n.onerror=()=>t(n.error),n.onsuccess=()=>e()}))}))}setItem(e,t){return this.withObjectStore("readwrite",(n=>{const r=n.put({id:e,value:t});return new Promise(((e,t)=>{r.onerror=()=>t(r.error),r.onsuccess=()=>e()}))}))}getDb(){const e=self.indexedDB.open(this.dbName,1);return new Promise(((t,n)=>{e.onsuccess=()=>{t(e.result)},e.onerror=()=>{n(e.error)},e.onblocked=()=>{n(new Error("Unable to access DB"))},e.onupgradeneeded=()=>{const t=e.result;t.onerror=()=>{n(new Error("Failed to create object store"))},t.createObjectStore(Xf,{keyPath:"id"})}}))}withObjectStore(e,t){return this.getDb().then((n=>{const r=n.transaction(Xf,e);return r.oncomplete=()=>n.close(),new Promise(((e,n)=>{r.onerror=()=>n(r.error),e(t(r.objectStore(Xf)))})).catch((e=>{throw n.close(),e}))}))}}const tg=new class{store;constructor(e={}){this.store=e}getItem(e){return e in this.store?this.store[e]:null}removeItem(e){delete this.store[e]}setItem(e,t){this.store[e]=t}};function ng(){return"object"==typeof self&&self.indexedDB?new eg:"object"==typeof window&&window.localStorage?window.localStorage:tg}function rg(e){throw new dn("Response from Amazon Cognito contained no identity ID",{logger:e})}const ig=e=>"h2"===e?.metadata?.handlerProtocol?void 0:e,sg=e=>{for(const t of e)if(void 0!==t)return t};var og,ag={};var cg=(og||(og=1,function(e){"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.withAPIKey=on,e.withIdentityPoolId=sn;class t extends Error{constructor(e){let n,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!0;"boolean"==typeof r?(n=void 0,i=r):null!=r&&"object"==typeof r&&(n=r.logger,i=r.tryNextLink??!0),super(e),this.name="ProviderError",this.tryNextLink=i,Object.setPrototypeOf(this,t.prototype),n?.debug?.(`@smithy/property-provider ${i?"->":"(!)"} ${e}`)}static from(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Object.assign(new this(e.message,t),e)}}class n extends t{constructor(e){super(e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1]),this.name="CredentialsProviderError",Object.setPrototypeOf(this,n.prototype)}}const r=(e,t,n)=>{let r,i,s,o=!1;const a=async()=>{i||(i=e());try{r=await i,s=!0,o=!1}finally{i=void 0}return r};return async e=>(s&&!e?.forceRefresh||(r=await a()),r)};function i(e){return Promise.all(Object.keys(e).reduce(((t,n)=>{const r=e[n];return"string"==typeof r?t.push([n,r]):t.push(r().then((e=>[n,e]))),t}),[])).then((e=>e.reduce(((e,t)=>{let[n,r]=t;return e[n]=r,e}),{})))}function s(e){return async t=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:n,CognitoIdentityClient:r}=await Promise.resolve().then((function(){return ic})),s=n=>e.clientConfig?.[n]??e.parentClientConfig?.[n]??t?.callerClientConfig?.[n],{Credentials:{AccessKeyId:u=o(e.logger),Expiration:l,SecretKey:d=c(e.logger),SessionToken:p}=a(e.logger)}=await(e.client??new r(Object.assign({},e.clientConfig??{},{region:s("region"),profile:s("profile")}))).send(new n({CustomRoleArn:e.customRoleArn,IdentityId:e.identityId,Logins:e.logins?await i(e.logins):void 0}));return{identityId:e.identityId,accessKeyId:u,secretAccessKey:d,sessionToken:p,expiration:l}}}function o(e){throw new n("Response from Amazon Cognito contained no access key ID",{logger:e})}function a(e){throw new n("Response from Amazon Cognito contained no credentials",{logger:e})}function c(e){throw new n("Response from Amazon Cognito contained no secret key",{logger:e})}const u="IdentityIds";class l{dbName;constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"aws:cognito-identity-ids";this.dbName=e}getItem(e){return this.withObjectStore("readonly",(t=>{const n=t.get(e);return new Promise((e=>{n.onerror=()=>e(null),n.onsuccess=()=>e(n.result?n.result.value:null)}))})).catch((()=>null))}removeItem(e){return this.withObjectStore("readwrite",(t=>{const n=t.delete(e);return new Promise(((e,t)=>{n.onerror=()=>t(n.error),n.onsuccess=()=>e()}))}))}setItem(e,t){return this.withObjectStore("readwrite",(n=>{const r=n.put({id:e,value:t});return new Promise(((e,t)=>{r.onerror=()=>t(r.error),r.onsuccess=()=>e()}))}))}getDb(){const e=self.indexedDB.open(this.dbName,1);return new Promise(((t,n)=>{e.onsuccess=()=>{t(e.result)},e.onerror=()=>{n(e.error)},e.onblocked=()=>{n(new Error("Unable to access DB"))},e.onupgradeneeded=()=>{const t=e.result;t.onerror=()=>{n(new Error("Failed to create object store"))},t.createObjectStore(u,{keyPath:"id"})}}))}withObjectStore(e,t){return this.getDb().then((n=>{const r=n.transaction(u,e);return r.oncomplete=()=>n.close(),new Promise(((e,n)=>{r.onerror=()=>n(r.error),e(t(r.objectStore(u)))})).catch((e=>{throw n.close(),e}))}))}}class d{store;constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.store=e}getItem(e){return e in this.store?this.store[e]:null}removeItem(e){delete this.store[e]}setItem(e,t){this.store[e]=t}}const p=new d;function h(){return"object"==typeof self&&self.indexedDB?new l:"object"==typeof window&&window.localStorage?window.localStorage:p}function f(e){let{accountId:t,cache:n=h(),client:r,clientConfig:o,customRoleArn:a,identityPoolId:c,logins:u,userIdentifier:l=(u&&0!==Object.keys(u).length?void 0:"ANONYMOUS"),logger:d,parentClientConfig:p}=e;d?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const f=l?`aws:cognito-identity-credentials:${c}:${l}`:void 0;let m=async e=>{const{GetIdCommand:l,CognitoIdentityClient:h}=await Promise.resolve().then((function(){return ic})),y=t=>o?.[t]??p?.[t]??e?.callerClientConfig?.[t],S=r??new h(Object.assign({},o??{},{region:y("region"),profile:y("profile")}));let R=f&&await n.getItem(f);if(!R){const{IdentityId:e=g(d)}=await S.send(new l({AccountId:t,IdentityPoolId:c,Logins:u?await i(u):void 0}));R=e,f&&Promise.resolve(n.setItem(f,R)).catch((()=>{}))}return m=s({client:S,customRoleArn:a,logins:u,identityId:R}),m(e)};return e=>m(e).catch((async e=>{throw f&&Promise.resolve(n.removeItem(f)).catch((()=>{})),e}))}function g(e){throw new n("Response from Amazon Cognito contained no identity ID",{logger:e})}const m=e=>f({...e}),y=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler:()=>e.httpHandler,updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs:()=>e.httpHandler.httpHandlerConfigs()}),S=e=>({httpHandler:e.httpHandler()});var R,w,v,E,C;(function(e){e.HEADER="header",e.QUERY="query"})(R||(R={})),function(e){e.HEADER="header",e.QUERY="query"}(w||(w={})),function(e){e.HTTP="http",e.HTTPS="https"}(v||(v={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(E||(E={})),function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"}(C||(C={}));const b="__smithy_context";var T,P;(function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"})(T||(T={})),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(P||(P={}));class A{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new A({...e,headers:{...e.headers}});return t.query&&(t.query=I(t.query)),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return A.clone(this)}}function I(e){return Object.keys(e).reduce(((t,n)=>{const r=e[n];return{...t,[n]:Array.isArray(r)?[...r]:r}}),{})}class x{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const O=e=>encodeURIComponent(e).replace(/[!'()*]/g,D),D=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function $(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=O(n),Array.isArray(r))for(let e=0,i=r.length;e<i;e++)t.push(`${n}=${O(r[e])}`);else{let e=n;(r||"string"==typeof r)&&(e+=`=${O(r)}`),t.push(e)}}return t.join("&")}function M(e,t){return new Request(e,t)}function L(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise(((t,n)=>{e&&setTimeout((()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",n(t)}),e)}))}const k={supported:void 0};class N{static create(e){return"function"==typeof e?.handle?e:new N(e)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===k.supported&&(k.supported=Boolean("undefined"!=typeof Request&&"keepalive"in M("https://[::1]")))}destroy(){}async handle(e){let{abortSignal:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.config||(this.config=await this.configProvider);const n=this.config.requestTimeout,r=!0===this.config.keepAlive,i=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let s=e.path;const o=$(e.query||{});o&&(s+=`?${o}`),e.fragment&&(s+=`#${e.fragment}`);let a="";null==e.username&&null==e.password||(a=`${e.username??""}:${e.password??""}@`);const{port:c,method:u}=e,l=`${e.protocol}//${a}${e.hostname}${c?`:${c}`:""}${s}`,d="GET"===u||"HEAD"===u?void 0:e.body,p={body:d,headers:new Headers(e.headers),method:u,credentials:i};this.config?.cache&&(p.cache=this.config.cache),d&&(p.duplex="half"),"undefined"!=typeof AbortController&&(p.signal=t),k.supported&&(p.keepalive=r),"function"==typeof this.config.requestInit&&Object.assign(p,this.config.requestInit(e));let h=()=>{};const f=M(l,p),g=[fetch(f).then((e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new x({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new x({headers:n,reason:e.statusText,statusCode:e.status,body:t})})))})),L(n)];return t&&g.push(new Promise(((e,n)=>{const r=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",r,{once:!0}),h=()=>e.removeEventListener("abort",r)}else t.onabort=r}))),Promise.race(g).finally(h)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n=>(n[e]=t,n)))}httpHandlerConfigs(){return this.config??{}}}const _={},U=new Array(64);for(let e=0,t="A".charCodeAt(0),n="Z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t);_[n]=e,U[e]=n}for(let e=0,t="a".charCodeAt(0),n="z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t),r=e+26;_[n]=r,U[r]=n}for(let e=0;e<10;e++){_[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;_[t]=n,U[n]=t}_["+"]=62,U[62]="+",_["/"]=63,U[63]="/";const F=6,G=8,B=63,H=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let t=0;t<e.length;t+=4){let n=0,i=0;for(let r=t,s=t+3;r<=s;r++)if("="!==e[r]){if(!(e[r]in _))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);n|=_[e[r]]<<(s-r)*F,i+=F}else n>>=F;const s=t/4*3;n>>=i%G;const o=Math.floor(i/G);for(let e=0;e<o;e++){const t=(o-e-1)*G;r.setUint8(s+e,(n&255<<t)>>t)}}return new Uint8Array(n)},z=e=>(new TextEncoder).encode(e);function j(e){let t;t="string"==typeof e?z(e):e;const n="object"==typeof t&&"number"==typeof t.length,r="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let e=0;e<t.length;e+=3){let n=0,r=0;for(let i=e,s=Math.min(e+3,t.length);i<s;i++)n|=t[i]<<(s-i-1)*G,r+=G;const s=Math.ceil(r/F);n<<=s*F-r;for(let e=1;e<=s;e++){const t=(s-e)*F;i+=U[(n&B<<t)>>t]}i+="==".slice(0,4-s)}return i}const q=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):V(e):W(e);async function V(e){const t=await K(e),n=H(t);return new Uint8Array(n)}async function W(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:e,value:s}=await n.read();s&&(t.push(s),i+=s.length),r=e}const s=new Uint8Array(i);let o=0;for(const e of t)s.set(e,o),o+=e.length;return s}function K(e){return new Promise(((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(2!==r.readyState)return n(new Error("Reader aborted too early"));const e=r.result??"",i=e.indexOf(","),s=i>-1?i+1:e.length;t(e.substring(s))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)}))}const Q=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},Z=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,Y=()=>{let e=[],t=[],n=!1;const r=new Set,i=e=>e.sort(((e,t)=>J[t.step]-J[e.step]||X[t.priority||"normal"]-X[e.priority||"normal"])),s=n=>{let i=!1;const s=e=>{const t=Q(e.name,e.aliases);if(t.includes(n)){i=!0;for(const e of t)r.delete(e);return!1}return!0};return e=e.filter(s),t=t.filter(s),i},o=n=>{let i=!1;const s=e=>{if(e.middleware===n){i=!0;for(const t of Q(e.name,e.aliases))r.delete(t);return!1}return!0};return e=e.filter(s),t=t.filter(s),i},a=n=>(e.forEach((e=>{n.add(e.middleware,{...e})})),t.forEach((e=>{n.addRelativeTo(e.middleware,{...e})})),n.identifyOnResolve?.(l.identifyOnResolve()),n),c=e=>{const t=[];return e.before.forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...c(e))})),t.push(e),e.after.reverse().forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...c(e))})),t},u=function(){let n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const r=[],s=[],o={};return e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of Q(t.name,t.aliases))o[e]=t;r.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of Q(t.name,t.aliases))o[e]=t;s.push(t)})),s.forEach((e=>{if(e.toMiddleware){const t=o[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${Z(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}})),i(r).map(c).reduce(((e,t)=>(e.push(...t),e)),[])},l={add:function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{name:i,override:s,aliases:o}=n,a={step:"initialize",priority:"normal",middleware:t,...n},c=Q(i,o);if(c.length>0){if(c.some((e=>r.has(e)))){if(!s)throw new Error(`Duplicate middleware name '${Z(i,o)}'`);for(const t of c){const n=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(-1===n)continue;const r=e[n];if(r.step!==a.step||a.priority!==r.priority)throw new Error(`"${Z(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${Z(i,o)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(n,1)}}for(const e of c)r.add(e)}e.push(a)},addRelativeTo:(e,n)=>{const{name:i,override:s,aliases:o}=n,a={middleware:e,...n},c=Q(i,o);if(c.length>0){if(c.some((e=>r.has(e)))){if(!s)throw new Error(`Duplicate middleware name '${Z(i,o)}'`);for(const e of c){const n=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(-1===n)continue;const r=t[n];if(r.toMiddleware!==a.toMiddleware||r.relation!==a.relation)throw new Error(`"${Z(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${Z(i,o)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)r.add(e)}t.push(a)},clone:()=>a(Y()),use:e=>{e.applyToStack(l)},remove:e=>"string"==typeof e?s(e):o(e),removeByTag:n=>{let i=!1;const s=e=>{const{tags:t,name:s,aliases:o}=e;if(t&&t.includes(n)){const e=Q(s,o);for(const t of e)r.delete(t);return i=!0,!1}return!0};return e=e.filter(s),t=t.filter(s),i},concat:e=>{const t=a(Y());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:a,identify:()=>u(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return Z(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of u().map((e=>e.middleware)).reverse())e=n(e,t);return n&&console.log(l.identify()),e}};return l},J={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},X={high:3,normal:2,low:1};class ee{constructor(e){this.config=e,this.middlewareStack=Y()}send(e,t,n){const r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n;let s;if(void 0===r&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?s=t.get(e.constructor):(s=e.resolveMiddleware(this.middlewareStack,this.config,r),t.set(e.constructor,s))}else delete this.handlers,s=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!i)return s(e).then((e=>e.output));s(e).then((e=>i(null,e.output)),(e=>i(e))).catch((()=>{}))}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const te=e=>(new TextEncoder).encode(e),ne=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};function re(e){return"base64"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf-8")?j(e):ne(e)}function ie(e,t){return"base64"===t?se.mutate(H(e)):se.mutate(te(e))}class se extends Uint8Array{static fromString(e){if("string"==typeof e)return ie(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf-8");throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,se.prototype),e}transformToString(){return re(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:"utf-8")}}const oe={},ae={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),oe[e]=t,ae[t]=e}function ce(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.slice(n,n+2).toLowerCase();if(!(r in ae))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[n/2]=ae[r]}return t}function ue(e){let t="";for(let n=0;n<e.byteLength;n++)t+=oe[e[n]];return t}const le=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Uint8Array,t=arguments.length>1?arguments[1]:void 0;if(e instanceof Uint8Array)return se.mutate(e);if(!e)return se.mutate(new Uint8Array);const n=t.streamCollector(e);return se.mutate(await n)};class de{constructor(){this.middlewareStack=Y()}static classBuilder(){return new pe}resolveMiddlewareWithContext(e,t,n,r){let{middlewareFn:i,clientName:s,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,smithyContext:u,additionalContext:l,CommandCtor:d}=r;for(const r of i.bind(this)(d,e,t,n))this.middlewareStack.use(r);const p=e.concat(this.middlewareStack),{logger:h}=t,f={logger:h,clientName:s,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,[b]:{commandInstance:this,...u},...l},{requestHandler:g}=t;return p.resolve((e=>g.handle(e.request,n||{})),f)}}class pe{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._smithyContext={service:e,operation:t,...n},this}c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e=>e,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e;return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){const e=this;let t;return t=class extends de{static getEndpointParameterInstructions(){return e._ep}constructor(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];let[i]=n;super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=i??{},e._init(this)}resolveMiddleware(n,r,i){return this.resolveMiddlewareWithContext(n,r,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const he="***SensitiveInformation***",fe=e=>{if(null!=e){if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&ve.warn(we(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},ge=(e,t)=>{if(null==e)throw new TypeError("Expected a non-null value");return e},me=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return ve.warn(we(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},ye=e=>fe("string"==typeof e?Re(e):e),Se=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Re=e=>{const t=e.match(Se);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},we=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),ve={warn:console.warn},Ee=e=>{if(null==e)return;let t;if("number"==typeof e)t=e;else if("string"==typeof e)t=ye(e);else{if("object"!=typeof e||1!==e.tag)throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");t=e.value}if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(1e3*t))};class Ce extends Error{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 t=e;return Ce.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}static[Symbol.hasInstance](e){if(!e)return!1;const t=e;return this===Ce?Ce.isInstance(e):!!Ce.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const be=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.entries(t).filter((e=>{let[,t]=e;return void 0!==t})).forEach((t=>{let[n,r]=t;null!=e[n]&&""!==e[n]||(e[n]=r)}));const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},Te=e=>{let{output:t,parsedBody:n,exceptionCtor:r,errorCode:i}=e;const s=Ae(t),o=s.httpStatusCode?s.httpStatusCode+"":void 0,a=new r({name:n?.code||n?.Code||i||o||"UnknownError",$fault:"client",$metadata:s});throw be(a,n)},Pe=e=>t=>{let{output:n,parsedBody:r,errorCode:i}=t;Te({output:n,parsedBody:r,exceptionCtor:e,errorCode:i})},Ae=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Ie=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},xe=e=>{const t=[];for(const n in E){const r=E[n];void 0!==e[r]&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(e){t.push(e)},checksumAlgorithms:()=>t}},Oe=e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t},De=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy:()=>e.retryStrategy}),$e=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},Me=e=>Object.assign(xe(e),De(e)),Le=e=>Object.assign(Oe(e),$e(e));class ke{trace(){}debug(){}info(){}warn(){}error(){}}const Ne=(e,t)=>{const n={};for(const r in t)_e(n,e,t,r);return n},_e=(e,t,n,r)=>{if(null!==t){let i=n[r];"function"==typeof i&&(i=[,i]);const[s=Ue,o=Fe,a=r]=i;return void(("function"==typeof s&&s(t[a])||"function"!=typeof s&&s)&&(e[r]=o(t[a])))}let[i,s]=n[r];if("function"==typeof s){let t;const n=void 0===i&&null!=(t=s()),o="function"==typeof i&&!!i(void 0)||"function"!=typeof i&&!!i;n?e[r]=t:o&&(e[r]=s())}else{const t=void 0===i&&null!=s,n="function"==typeof i&&!!i(s)||"function"!=typeof i&&!!i;(t||n)&&(e[r]=s)}},Ue=e=>null!=e,Fe=e=>e,Ge=e=>{if(null==e)return{};if(Array.isArray(e))return e.filter((e=>null!=e)).map(Ge);if("object"==typeof e){const t={};for(const n of Object.keys(e))null!=e[n]&&(t[n]=Ge(e[n]));return t}return e},Be=e=>e[b]||(e[b]={}),He=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},ze=(e,t)=>{if(!t||0===t.length)return e;const n=[];for(const r of t)for(const t of e)t.schemeId.split("#")[1]===r&&n.push(t);for(const t of e)n.find((e=>{let{schemeId:n}=e;return n===t.schemeId}))||n.push(t);return n};function je(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}const qe=(e,t)=>(n,r)=>async i=>{const s=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),o=e.authSchemePreference?await e.authSchemePreference():[],a=ze(s,o),c=je(e.httpAuthSchemes),u=Be(r),l=[];for(const n of a){const i=c.get(n.schemeId);if(!i){l.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const s=i.identityProvider(await t.identityProviderConfigProvider(e));if(!s){l.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:o={},signingProperties:a={}}=n.propertiesExtractor?.(e,r)||{};n.identityProperties=Object.assign(n.identityProperties||{},o),n.signingProperties=Object.assign(n.signingProperties||{},a),u.selectedHttpAuthScheme={httpAuthOption:n,identity:await s(n.identityProperties),signer:i.signer};break}if(!u.selectedHttpAuthScheme)throw new Error(l.join("\n"));return n(i)},Ve={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},We=(e,t)=>{let{httpAuthSchemeParametersProvider:n,identityProviderConfigProvider:r}=t;return{applyToStack:t=>{t.addRelativeTo(qe(e,{httpAuthSchemeParametersProvider:n,identityProviderConfigProvider:r}),Ve)}}},Ke=(e,t)=>(n,r)=>async i=>{const{response:s}=await n(i);try{return{response:s,output:await t(s,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:s}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{e.message+="\n "+t}catch(e){r.logger&&"NoOpLogger"!==r.logger?.constructor?.name?r.logger?.warn?.(t):console.warn(t)}void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText)}throw e}},Qe=(e,t)=>(n,r)=>async i=>{const s=r.endpointV2?.url&&e.urlParser?async()=>e.urlParser(r.endpointV2.url):e.endpoint;if(!s)throw new Error("No valid endpoint provider available.");const o=await t(i.input,{...e,endpoint:s});return n({...i,request:o})},Ze={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Ye={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Je(e,t,n){return{applyToStack:r=>{r.add(Ke(e,n),Ze),r.add(Qe(e,t),Ye)}}}Ye.name;const Xe=e=>e=>{throw e},et=(e,t)=>{},tt=e=>(e,t)=>async n=>{if(!A.isInstance(n.request))return e(n);const r=Be(t).selectedHttpAuthScheme;if(!r)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:s,signer:o}=r,a=await e({...n,request:await o.sign(n.request,s,i)}).catch((o.errorHandler||Xe)(i));return(o.successHandler||et)(a.response,i),a},nt={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},rt=e=>({applyToStack:e=>{e.addRelativeTo(tt(),nt)}}),it=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};function st(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}class ot{constructor(e){this.authSchemes=new Map;for(const[t,n]of Object.entries(e))void 0!==n&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}class at{async sign(e,t,n){return e}}const ct=e=>t=>dt(t)&&t.expiration.getTime()-Date.now()<e,ut=3e5,lt=ct(ut),dt=e=>void 0!==e.expiration,pt=(e,t,n)=>{if(void 0===e)return;const r="function"!=typeof e?async()=>Promise.resolve(e):e;let i,s,o,a=!1;const c=async e=>{s||(s=r(e));try{i=await s,o=!0,a=!1}finally{s=void 0}return i};return void 0===t?async e=>(o&&!e?.forceRefresh||(i=await c(e)),i):async e=>(o&&!e?.forceRefresh||(i=await c(e)),a?i:n(i)?t(i)?(await c(e),i):i:(a=!0,i))};function ht(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(t,n){function s(e){try{a(r.next(e))}catch(e){n(e)}}function o(e){try{a(r.throw(e))}catch(e){n(e)}}function a(e){e.done?t(e.value):i(e.value).then(s,o)}a((r=r.apply(e,[])).next())}))}function ft(e,t){var n,r,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return c([e,t])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}"function"==typeof SuppressedError&&SuppressedError;var gt=64,mt=32,yt=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]),St=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],Rt=Math.pow(2,53)-1,wt=function(){function e(){this.state=Int32Array.from(St),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>Rt)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===gt&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%gt>=gt-8){for(var r=this.bufferLength;r<gt;r++)t.setUint8(r,0);this.hashBuffer(),this.bufferLength=0}for(r=this.bufferLength;r<gt-8;r++)t.setUint8(r,0);t.setUint32(gt-8,Math.floor(e/4294967296),!0),t.setUint32(gt-4,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(mt);for(r=0;r<8;r++)i[4*r]=this.state[r]>>>24&255,i[4*r+1]=this.state[r]>>>16&255,i[4*r+2]=this.state[r]>>>8&255,i[4*r+3]=this.state[r]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this,t=e.buffer,n=e.state,r=n[0],i=n[1],s=n[2],o=n[3],a=n[4],c=n[5],u=n[6],l=n[7],d=0;d<gt;d++){if(d<16)this.temp[d]=(255&t[4*d])<<24|(255&t[4*d+1])<<16|(255&t[4*d+2])<<8|255&t[4*d+3];else{var p=this.temp[d-2],h=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,f=((p=this.temp[d-15])>>>7|p<<25)^(p>>>18|p<<14)^p>>>3;this.temp[d]=(h+this.temp[d-7]|0)+(f+this.temp[d-16]|0)}var g=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&c^~a&u)|0)+(l+(yt[d]+this.temp[d]|0)|0)|0,m=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&s^i&s)|0;l=u,u=c,c=a,a=o+g|0,o=s,s=i,i=r,r=g+m|0}n[0]+=r,n[1]+=i,n[2]+=s,n[3]+=o,n[4]+=a,n[5]+=c,n[6]+=u,n[7]+=l},e}();const vt=e=>(new TextEncoder).encode(e);var Et="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:vt;function Ct(e){return e instanceof Uint8Array?e:"string"==typeof e?Et(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function bt(e){return"string"==typeof e?0===e.length:0===e.byteLength}var Tt=function(){function e(e){this.secret=e,this.hash=new wt,this.reset()}return e.prototype.update=function(e){if(!bt(e)&&!this.error)try{this.hash.update(Ct(e))}catch(e){this.error=e}},e.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()},e.prototype.digest=function(){return ht(this,void 0,void 0,(function(){return ft(this,(function(e){return[2,this.digestSync()]}))}))},e.prototype.reset=function(){if(this.hash=new wt,this.secret){this.outer=new wt;var e=Pt(this.secret),t=new Uint8Array(gt);t.set(e);for(var n=0;n<gt;n++)e[n]^=54,t[n]^=92;for(this.hash.update(e),this.outer.update(t),n=0;n<e.byteLength;n++)e[n]=0}},e}();function Pt(e){var t=Ct(e);if(t.byteLength>gt){var n=new wt;n.update(t),t=n.digest()}var r=new Uint8Array(gt);return r.set(t),r}var At=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const It="X-Amz-Algorithm",xt="X-Amz-Date",Ot="X-Amz-Credential",Dt="X-Amz-Signature",$t="X-Amz-SignedHeaders",Mt="X-Amz-Security-Token",Lt="host",kt="aws4_request",Nt="AWS4-HMAC-SHA256",_t="AWS4",Ut="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";class Ft{static signUrl(e,t,n,r){let i;const s={body:i,method:"GET",url:new URL(e)},o=Gt(e,t,n,r);return Bt(s,o).toString()}}const Gt=(e,t,n,r)=>{const{access_key:i,secret_key:s,session_token:o}=null!=r?r:{};return{credentials:{accessKeyId:i,secretAccessKey:s,sessionToken:o},signingDate:new Date,signingRegion:t,signingService:n}},Bt=(e,t)=>{let{body:n,method:r="GET",url:i}=e;var s=At(t,[]);const o=Ht(s),{accessKeyId:a,credentialScope:c,longDate:u,sessionToken:l}=o,d=new URL(i);Object.entries(Object.assign({[It]:Nt,[Ot]:`${a}/${c}`,[xt]:u,[$t]:Lt},l&&{[Mt]:l})).forEach((e=>{let[t,n]=e;d.searchParams.append(t,n)}));const p={body:n,headers:{[Lt]:i.host},method:r,url:d},h=qt(p,o);return d.searchParams.append(Dt,h),d},Ht=e=>{let{credentials:t,signingDate:n=new Date,signingRegion:r,signingService:i,uriEscapePath:s=!0}=e;const{accessKeyId:o,secretAccessKey:a,sessionToken:c}=t,{longDate:u,shortDate:l}=zt(n);return{accessKeyId:o,credentialScope:jt(l,r,i),longDate:u,secretAccessKey:a,sessionToken:c,shortDate:l,signingRegion:r,signingService:i,uriEscapePath:s}},zt=e=>{const t=e.toISOString().replace(/[:-]|\.\d{3}/g,"");return{longDate:t,shortDate:t.slice(0,8)}},jt=(e,t,n)=>`${e}/${t}/${n}/${kt}`,qt=(e,t)=>{let{credentialScope:n,longDate:r,secretAccessKey:i,shortDate:s,signingRegion:o,signingService:a,uriEscapePath:c}=t;const u=Vt(e,c),l=tn(null,u),d=nn(r,n,l);return tn(rn(i,s,o,a),d)},Vt=function(e){let{body:t,headers:n,method:r,url:i}=e,s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return[r,Wt(i.pathname,s),Kt(i.searchParams),Yt(n),Jt(n),Xt()].join("\n")},Wt=function(e){return e?arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?e:encodeURIComponent(e).replace(/%2F/g,"/"):"/"},Kt=e=>Array.from(e).sort(((e,t)=>{let[n,r]=e,[i,s]=t;return n===i?r<s?-1:1:n<i?-1:1})).map((e=>{let[t,n]=e;return`${Qt(t)}=${Qt(n)}`})).join("&"),Qt=e=>encodeURIComponent(e).replace(/[!'()*]/g,Zt),Zt=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`,Yt=e=>Object.entries(e).map((e=>{let[t,n]=e;var r;return{key:t.toLowerCase(),value:null!==(r=null==n?void 0:n.trim().replace(/\s+/g," "))&&void 0!==r?r:""}})).sort(((e,t)=>e.key<t.key?-1:1)).map((e=>`${e.key}:${e.value}\n`)).join(""),Jt=e=>Object.keys(e).map((e=>e.toLowerCase())).sort().join(";"),Xt=e=>Ut,en=(e,t)=>{const n=new Tt(null!=e?e:void 0);return n.update(t),n.digestSync()},tn=(e,t)=>ue(en(e,t)),nn=(e,t,n)=>[Nt,e,t,n].join("\n"),rn=(e,t,n,r)=>{const i=en(`${_t}${e}`,t),s=en(i,n),o=en(s,r);return en(o,kt)};async function sn(e,t){const n=e.split(":")[0],r=m(Object.assign(Object.assign({},t||{}),{identityPoolId:e,clientConfig:Object.assign(Object.assign({},t&&t.clientConfig?t.clientConfig:{}),{region:n})}));let i;async function s(){i=await r();let e=36e5;i.expiration&&(e=i.expiration.getTime()-(new Date).getTime()),setTimeout(s,e-6e4)}await s();const o={credentials:r,region:n};return{getMapAuthenticationOptions:()=>({transformRequest:(e,t)=>{if(e.match(/^https:\/\/maps\.(geo|geo-fips)\.[a-z0-9-]+\.(amazonaws\.com|api\.aws)/)){const r=new URL(e).pathname.split("/").filter(Boolean);let s="geo-maps";if("v2"==(null==r?void 0:r[0])){if(!t||"Tile"!==t)return{url:e}}else s="geo";return{url:Ft.signUrl(e,n,s,{access_key:i.accessKeyId,secret_key:i.secretAccessKey,session_token:i.sessionToken})}}return{url:e}}}),getLocationClientConfig:()=>o,getClientConfig:()=>o,getCredentials:()=>i}}function on(e,t){const n={signer:{sign:async t=>{var n;return t.query=Object.assign({key:e},null!==(n=t.query)&&void 0!==n?n:{}),t}},credentials:async()=>({})};return t&&(n.region=t),{getLocationClientConfig:()=>n,getClientConfig:()=>n}}function an(e){return e}const cn=e=>t=>async n=>{if(!A.isInstance(n.request))return t(n);const{request:r}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.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 e=r.hostname;null!=r.port&&(e+=`:${r.port}`),r.headers.host=e}return t(n)},un={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},ln=e=>({applyToStack:t=>{t.add(cn(e),un)}}),dn=()=>(e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:s,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,l=c??t.inputFilterSensitiveLog,d=u??t.outputFilterSensitiveLog,{$metadata:p,...h}=r.output;return o?.info?.({clientName:i,commandName:s,input:l(n.input),output:d(h),metadata:p}),r}catch(e){const{clientName:r,commandName:i,logger:s,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:a}=o,c=a??t.inputFilterSensitiveLog;throw s?.error?.({clientName:r,commandName:i,input:c(n.input),error:e,metadata:e.$metadata}),e}},pn={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},hn=e=>({applyToStack:e=>{e.add(dn(),pn)}}),fn="X-Amzn-Trace-Id",gn="AWS_LAMBDA_FUNCTION_NAME",mn="_X_AMZN_TRACE_ID",yn=e=>t=>async n=>{const{request:r}=n;if(!A.isInstance(r)||"node"!==e.runtime)return t(n);const i=Object.keys(r.headers??{}).find((e=>e.toLowerCase()===fn.toLowerCase()))??fn;if(r.headers.hasOwnProperty(i))return t(n);const s=process.env[gn],o=process.env[mn],a=e=>"string"==typeof e&&e.length>0;return a(s)&&a(o)&&(r.headers[fn]=o),t({...n,request:r})},Sn={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Rn=e=>({applyToStack:t=>{t.add(yn(e),Sn)}}),wn=void 0;function vn(e){return void 0===e||"string"==typeof e&&e.length<=50}function En(e){const t=it(e.userAgentAppId??wn),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:"string"==typeof n?[[n]]:n,userAgentAppId:async()=>{const n=await t();if(!vn(n)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof n?t?.warn("userAgentAppId must be a string or undefined."):n.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}class Cn{constructor(e){let{size:t,params:n}=e;this.data=new Map,this.parameters=[],this.capacity=t??50,n&&(this.parameters=n)}get(e,t){const n=this.hash(e);if(!1===n)return t();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:n,done:r}=e.next();if(this.data.delete(n),r||++t>10)break}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t="";const{parameters:n}=this;if(0===n.length)return!1;for(const r of n){const n=String(e[r]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}const bn=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}$"),Tn=e=>bn.test(e)||e.startsWith("[")&&e.endsWith("]"),Pn=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),An=function(e){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))return Pn.test(e);const t=e.split(".");for(const e of t)if(!An(e))return!1;return!0},In={},xn="endpoints";function On(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${On(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(On).join(", ")})`:JSON.stringify(e,null,2)}class Dn extends Error{constructor(e){super(e),this.name="EndpointError"}}const $n=(e,t)=>e===t,Mn=e=>{const t=e.split("."),n=[];for(const r of t){const t=r.indexOf("[");if(-1!==t){if(r.indexOf("]")!==r.length-1)throw new Dn(`Path: '${e}' does not end with ']'`);const i=r.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new Dn(`Invalid array index: '${i}' in path: '${e}'`);0!==t&&n.push(r.slice(0,t)),n.push(i)}else n.push(r)}return n},Ln=(e,t)=>Mn(t).reduce(((n,r)=>{if("object"!=typeof n)throw new Dn(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]}),e),kn=e=>null!=e,Nn=e=>!e,_n={[v.HTTP]:80,[v.HTTPS]:443},Un=e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:n,protocol:r="",path:i="",query:s={}}=e,o=new URL(`${r}//${t}${n?`:${n}`:""}${i}`);return o.search=Object.entries(s).map((e=>{let[t,n]=e;return`${t}=${n}`})).join("&"),o}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:r,hostname:i,pathname:s,protocol:o,search:a}=t;if(a)return null;const c=o.slice(0,-1);if(!Object.values(v).includes(c))return null;const u=Tn(i);return{scheme:c,authority:`${r}${n.includes(`${r}:${_n[c]}`)||"string"==typeof e&&e.includes(`${r}:${_n[c]}`)?`:${_n[c]}`:""}`,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:u}},Fn=(e,t)=>e===t,Gn=(e,t,n,r)=>t>=n||e.length<n?null:r?e.substring(e.length-n,e.length-t):e.substring(t,n),Bn=e=>encodeURIComponent(e).replace(/[!*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),Hn={booleanEquals:$n,getAttr:Ln,isSet:kn,isValidHostLabel:An,not:Nn,parseURL:Un,stringEquals:Fn,substring:Gn,uriEncode:Bn},zn=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i<e.length;){const t=e.indexOf("{",i);if(-1===t){n.push(e.slice(i));break}n.push(e.slice(i,t));const s=e.indexOf("}",t);if(-1===s){n.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[s+1]&&(n.push(e.slice(t+1,s)),i=s+2);const o=e.substring(t+1,s);if(o.includes("#")){const[e,t]=o.split("#");n.push(Ln(r[e],t))}else n.push(r[o]);i=s+1}return n.join("")},jn=(e,t)=>{let{ref:n}=e;return{...t.endpointParams,...t.referenceRecord}[n]},qn=(e,t,n)=>{if("string"==typeof e)return zn(e,n);if(e.fn)return Vn(e,n);if(e.ref)return jn(e,n);throw new Dn(`'${t}': ${String(e)} is not a string, function or reference.`)},Vn=(e,t)=>{let{fn:n,argv:r}=e;const i=r.map((e=>["boolean","number"].includes(typeof e)?e:qn(e,"arg",t))),s=n.split(".");return s[0]in In&&null!=s[1]?In[s[0]][s[1]](...i):Hn[n](...i)},Wn=(e,t)=>{let{assign:n,...r}=e;if(n&&n in t.referenceRecord)throw new Dn(`'${n}' is already defined in Reference Record.`);const i=Vn(r,t);return t.logger?.debug?.(`${xn} evaluateCondition: ${On(r)} = ${On(i)}`),{result:""===i||!!i,...null!=n&&{toAssign:{name:n,value:i}}}},Kn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;const n={};for(const r of e){const{result:e,toAssign:i}=Wn(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${xn} assign: ${i.name} := ${On(i.value)}`))}return{result:!0,referenceRecord:n}},Qn=(e,t)=>Object.entries(e).reduce(((e,n)=>{let[r,i]=n;return{...e,[r]:i.map((e=>{const n=qn(e,"Header value entry",t);if("string"!=typeof n)throw new Dn(`Header '${r}' value '${n}' is not a string`);return n}))}}),{}),Zn=(e,t)=>{if(Array.isArray(e))return e.map((e=>Zn(e,t)));switch(typeof e){case"string":return zn(e,t);case"object":if(null===e)throw new Dn(`Unexpected endpoint property: ${e}`);return Yn(e,t);case"boolean":return e;default:throw new Dn("Unexpected endpoint property type: "+typeof e)}},Yn=(e,t)=>Object.entries(e).reduce(((e,n)=>{let[r,i]=n;return{...e,[r]:Zn(i,t)}}),{}),Jn=(e,t)=>{const n=qn(e,"Endpoint URL",t);if("string"==typeof n)try{return new URL(n)}catch(e){throw console.error(`Failed to construct URL with ${n}`,e),e}throw new Dn("Endpoint URL must be a string, got "+typeof n)},Xn=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:s}=Kn(n,t);if(!i)return;const o={...t,referenceRecord:{...t.referenceRecord,...s}},{url:a,properties:c,headers:u}=r;return t.logger?.debug?.(`${xn} Resolving endpoint from template: ${On(r)}`),{...null!=u&&{headers:Qn(u,o)},...null!=c&&{properties:Yn(c,o)},url:Jn(a,o)}},er=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:s}=Kn(n,t);if(i)throw new Dn(qn(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))},tr=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:s}=Kn(n,t);if(i)return nr(r,{...t,referenceRecord:{...t.referenceRecord,...s}})},nr=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=Xn(n,t);if(e)return e}else if("error"===n.type)er(n,t);else{if("tree"!==n.type)throw new Dn(`Unknown endpoint rule: ${n}`);{const e=tr(n,t);if(e)return e}}throw new Dn("Rules evaluation failed")},rr=(e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:s}=e;t.logger?.debug?.(`${xn} Initial EndpointParams: ${On(n)}`);const o=Object.entries(i).filter((e=>{let[,t]=e;return null!=t.default})).map((e=>{let[t,n]=e;return[t,n.default]}));if(o.length>0)for(const[e,t]of o)n[e]=n[e]??t;const a=Object.entries(i).filter((e=>{let[,t]=e;return t.required})).map((e=>{let[t]=e;return t}));for(const e of a)if(null==n[e])throw new Dn(`Missing required parameter: '${e}'`);const c=nr(s,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${xn} Resolved endpoint: ${On(c)}`),c},ir=function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){for(const t of e.split("."))if(!ir(t))return!1;return!0}return!(!An(e)||e.length<3||e.length>63||e!==e.toLowerCase()||Tn(e))},sr=":",or="/",ar=e=>{const t=e.split(sr);if(t.length<6)return null;const[n,r,i,s,o,...a]=t;return"arn"!==n||""===r||""===i||""===a.join(sr)?null:{partition:r,service:i,region:s,accountId:o,resourceId:a.map((e=>e.split(or))).flat()}};var cr=[{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-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-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"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 China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"AWS ISOE (Europe) global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"AWS ISOF global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"amazonaws.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"EU (Germany)"}}}],ur={partitions:cr};let lr=ur;const dr=e=>{const{partitions:t}=lr;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}const n=t.find((e=>"aws"===e.id));if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}},pr={isVirtualHostableS3Bucket:ir,parseArn:ar,partition:dr};function hr(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}function fr(e,t,n){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]=n}In.aws=pr;const gr=e=>x.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,mr=e=>new Date(Date.now()+e),yr=(e,t)=>Math.abs(mr(t).getTime()-e)>=3e5,Sr=(e,t)=>{const n=Date.parse(e);return yr(n,t)?n-Date.now():t},Rr=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},wr=async e=>{const t=Rr("context",e.context),n=Rr("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=Rr("signer",n.signer),s=await i(r),o=e?.signingRegion,a=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:s,signingRegion:o,signingRegionSet:a,signingName:c}};class vr{async sign(e,t,n){if(!A.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await wr(n),{config:i,signer:s}=r;let{signingRegion:o,signingName:a}=r;const c=n.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(o=t?.signingRegion??o,a=t?.signingName??a)}return await s.sign(e,{signingDate:mr(i.systemClockOffset),signingRegion:o,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??gr(t.$response);if(n){const r=Rr("config",e.config),i=r.systemClockOffset;r.systemClockOffset=Sr(n,r.systemClockOffset),r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=gr(e);if(n){const e=Rr("config",t.config);e.systemClockOffset=Sr(n,e.systemClockOffset)}}}const Er=e=>(new TextEncoder).encode(e),Cr=e=>"string"==typeof e?Er(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),br="X-Amz-Algorithm",Tr="X-Amz-Credential",Pr="X-Amz-Date",Ar="X-Amz-SignedHeaders",Ir="X-Amz-Expires",xr="X-Amz-Signature",Or="X-Amz-Security-Token",Dr="authorization",$r=Pr.toLowerCase(),Mr="date",Lr=[Dr,$r,Mr],kr=xr.toLowerCase(),Nr="x-amz-content-sha256",_r=Or.toLowerCase(),Ur={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},Fr=/^proxy-/,Gr=/^sec-/,Br="AWS4-HMAC-SHA256",Hr="AWS4-HMAC-SHA256-PAYLOAD",zr="UNSIGNED-PAYLOAD",jr=50,qr="aws4_request",Vr=604800,Wr={},Kr=[],Qr=(e,t,n)=>`${e}/${t}/${n}/${qr}`,Zr=async(e,t,n,r,i)=>{const s=`${n}:${r}:${i}:${ue(await Yr(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(s in Wr)return Wr[s];for(Kr.push(s);Kr.length>jr;)delete Wr[Kr.shift()];let o=`AWS4${t.secretAccessKey}`;for(const t of[n,r,i,qr])o=await Yr(e,o,t);return Wr[s]=o},Yr=(e,t,n)=>{const r=new e(t);return r.update(Cr(n)),r.digest()},Jr=(e,t,n)=>{let{headers:r}=e;const i={};for(const e of Object.keys(r).sort()){if(null==r[e])continue;const s=e.toLowerCase();(s in Ur||t?.has(s)||Fr.test(s)||Gr.test(s))&&(!n||n&&!n.has(s))||(i[s]=r[e].trim().replace(/\s+/g," "))}return i},Xr=e=>"function"==typeof ArrayBuffer&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e),ei=async(e,t)=>{let{headers:n,body:r}=e;for(const e of Object.keys(n))if(e.toLowerCase()===Nr)return n[e];if(null==r)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof r||ArrayBuffer.isView(r)||Xr(r)){const e=new t;return e.update(Cr(r)),ue(await e.digest())}return zr};class ti{format(e){const t=[];for(const n of Object.keys(e)){const r=Er(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let r=0;for(const e of t)n.set(e,r),r+=e.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 t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.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 r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(i.buffer);return s.set(e.value,3),s;case"string":const o=Er(e.value),a=new DataView(new ArrayBuffer(3+o.byteLength));a.setUint8(0,7),a.setUint16(1,o.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(ii.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!ri.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const l=new Uint8Array(17);return l[0]=9,l.set(ce(e.value.replace(/\-/g,"")),1),l}}}var ni;!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(ni||(ni={}));const ri=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class ii{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&si(t),new ii(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&si(e),parseInt(ue(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function si(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const oi=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1},ai=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{headers:n,query:r={}}=A.clone(e);for(const e of Object.keys(n)){const i=e.toLowerCase();("x-amz-"===i.slice(0,6)&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i))&&(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}},ci=e=>{e=A.clone(e);for(const t of Object.keys(e.headers))Lr.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},ui=e=>{let{query:t={}}=e;const n=[],r={};for(const e of Object.keys(t)){if(e.toLowerCase()===kr)continue;const i=O(e);n.push(i);const s=t[e];"string"==typeof s?r[i]=`${i}=${O(s)}`:Array.isArray(s)&&(r[i]=s.slice(0).reduce(((e,t)=>e.concat([`${i}=${O(t)}`])),[]).sort().join("&"))}return n.sort().map((e=>r[e])).filter((e=>e)).join("&")},li=e=>di(e).toISOString().replace(/\.\d{3}Z$/,"Z"),di=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class pi{constructor(e){let{applyChecksum:t,credentials:n,region:r,service:i,sha256:s,uriEscapePath:o=!0}=e;this.service=i,this.sha256=s,this.uriEscapePath=o,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=He(r),this.credentialProvider=He(n)}createCanonicalRequest(e,t,n){const r=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${ui(e)}\n${r.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${r.join(";")}\n${n}`}async createStringToSign(e,t,n,r){const i=new this.sha256;return i.update(Cr(n)),`${r}\n${e}\n${t}\n${ue(await i.digest())}`}getCanonicalPath(e){let{path:t}=e;if(this.uriEscapePath){const e=[];for(const n of t.split("/"))0!==n?.length&&"."!==n&&(".."===n?e.pop():e.push(n));const n=`${t?.startsWith("/")?"/":""}${e.join("/")}${e.length>0&&t?.endsWith("/")?"/":""}`;return O(n).replace(/%2F/g,"/")}return t}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}formatDate(e){const t=li(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class hi extends pi{constructor(e){let{applyChecksum:t,credentials:n,region:r,service:i,sha256:s,uriEscapePath:o=!0}=e;super({applyChecksum:t,credentials:n,region:r,service:i,sha256:s,uriEscapePath:o}),this.headerFormatter=new ti}async presign(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:i,unhoistableHeaders:s,signableHeaders:o,hoistableHeaders:a,signingRegion:c,signingService:u}=t,l=await this.credentialProvider();this.validateResolvedCredentials(l);const d=c??await this.regionProvider(),{longDate:p,shortDate:h}=this.formatDate(n);if(r>Vr)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const f=Qr(h,d,u??this.service),g=ai(ci(e),{unhoistableHeaders:s,hoistableHeaders:a});l.sessionToken&&(g.query[Or]=l.sessionToken),g.query[br]=Br,g.query[Tr]=`${l.accessKeyId}/${f}`,g.query[Pr]=p,g.query[Ir]=r.toString(10);const m=Jr(g,i,o);return g.query[Ar]=this.getCanonicalHeaderList(m),g.query[xr]=await this.getSignature(p,f,this.getSigningKey(l,d,h,u),this.createCanonicalRequest(g,m,await ei(e,this.sha256))),g}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent(e,t){let{headers:n,payload:r}=e,{signingDate:i=new Date,priorSignature:s,signingRegion:o,signingService:a}=t;const c=o??await this.regionProvider(),{shortDate:u,longDate:l}=this.formatDate(i),d=Qr(u,c,a??this.service),p=await ei({headers:{},body:r},this.sha256),h=new this.sha256;h.update(n);const f=ue(await h.digest()),g=[Hr,l,d,s,f,p].join("\n");return this.signString(g,{signingDate:i,signingRegion:c,signingService:a})}async signMessage(e,t){let{signingDate:n=new Date,signingRegion:r,signingService:i}=t;return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:n,signingRegion:r,signingService:i,priorSignature:e.priorSignature}).then((t=>({message:e.message,signature:t})))}async signString(e){let{signingDate:t=new Date,signingRegion:n,signingService:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=await this.credentialProvider();this.validateResolvedCredentials(i);const s=n??await this.regionProvider(),{shortDate:o}=this.formatDate(t),a=new this.sha256(await this.getSigningKey(i,s,o,r));return a.update(Cr(e)),ue(await a.digest())}async signRequest(e){let{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:i,signingService:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=await this.credentialProvider();this.validateResolvedCredentials(o);const a=i??await this.regionProvider(),c=ci(e),{longDate:u,shortDate:l}=this.formatDate(t),d=Qr(l,a,s??this.service);c.headers[$r]=u,o.sessionToken&&(c.headers[_r]=o.sessionToken);const p=await ei(c,this.sha256);!oi(Nr,c.headers)&&this.applyChecksum&&(c.headers[Nr]=p);const h=Jr(c,r,n),f=await this.getSignature(u,d,this.getSigningKey(o,a,l,s),this.createCanonicalRequest(c,h,p));return c.headers[Dr]=`${Br} Credential=${o.accessKeyId}/${d}, SignedHeaders=${this.getCanonicalHeaderList(h)}, Signature=${f}`,c}async getSignature(e,t,n,r){const i=await this.createStringToSign(e,t,r,Br),s=new this.sha256(await n);return s.update(Cr(i)),ue(await s.digest())}getSigningKey(e,t,n,r){return Zr(this.sha256,e,n,t,r||this.service)}}const fi=e=>{let t,n=e.credentials,r=!!e.credentials;Object.defineProperty(e,"credentials",{set(i){i&&i!==n&&i!==t&&(r=!0),n=i;const s=gi(e,{credentials:n,credentialDefaultProvider:e.credentialDefaultProvider}),o=mi(e,s);r&&!o.attributed?(t=async e=>o(e).then((e=>hr(e,"CREDENTIALS_CODE","e"))),t.memoized=o.memoized,t.configBound=o.configBound,t.attributed=!0):t=o},get:()=>t,enumerable:!0,configurable:!0}),e.credentials=n;const{signingEscapePath:i=!0,systemClockOffset:s=e.systemClockOffset||0,sha256:o}=e;let a;return a=e.signer?it(e.signer):e.regionInfoProvider?()=>it(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((t=>{let[n,r]=t;const{signingRegion:s,signingService:a}=n;e.signingRegion=e.signingRegion||s||r,e.signingName=e.signingName||a||e.serviceId;const c={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||hi)(c)})):async t=>{const n=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await it(e.region)(),properties:{}},t)).signingRegion,r=t.signingName;e.signingRegion=e.signingRegion||n,e.signingName=e.signingName||r||e.serviceId;const s={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||hi)(s)},Object.assign(e,{systemClockOffset:s,signingEscapePath:i,signer:a})};function gi(e,t){let n,{credentials:r,credentialDefaultProvider:i}=t;return n=r?r?.memoized?r:pt(r,lt,dt):i?it(i(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},n.memoized=!0,n}function mi(e,t){if(t.configBound)return t;const n=async n=>t({...n,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}const yi=(e,t)=>le(e,t).then((e=>t.utf8Encoder(e))),Si=(e,t)=>yi(e,t).then((e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}})),Ri=async(e,t)=>{const n=await Si(e,t);return n.message=n.message??n.Message,n},wi=(e,t)=>{const n=(e,t)=>Object.keys(e).find((e=>e.toLowerCase()===t.toLowerCase())),r=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=n(e.headers,"x-amzn-errortype");return void 0!==i?r(e.headers[i]):void 0!==t.code?r(t.code):void 0!==t.__type?r(t.__type):void 0};function vi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const Ei=/\d{12}\.ddb/;async function Ci(e,t,n){const r=n.request;if("rpc-v2-cbor"===r?.headers?.["smithy-protocol"]&&fr(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?fr(e,"RETRY_MODE_ADAPTIVE","F"):fr(e,"RETRY_MODE_STANDARD","E"):fr(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(Ei)&&fr(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":fr(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":fr(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":fr(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const t=i;t.accountId&&fr(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,r]of Object.entries(t.$source??{}))fr(e,n,r)}}const bi="user-agent",Ti="x-amz-user-agent",Pi=" ",Ai="/",Ii=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,xi=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,Oi="-",Di=1024;function $i(e){let t="";for(const n in e){const r=e[n];if(!(t.length+r.length+1<=Di))break;t.length?t+=","+r:t+=r}return t}const Mi=e=>(t,n)=>async r=>{const{request:i}=r;if(!A.isInstance(i))return t(r);const{headers:s}=i,o=n?.userAgent?.map(Li)||[],a=(await e.defaultUserAgentProvider()).map(Li);await Ci(n,e,r);const c=n;a.push(`m/${$i(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(Li)||[],l=await e.userAgentAppId();l&&a.push(Li([`app/${l}`]));const d=[].concat([...a,...o,...u]).join(Pi),p=[...a.filter((e=>e.startsWith("aws-sdk-"))),...u].join(Pi);return"browser"!==e.runtime?(p&&(s[Ti]=s[Ti]?`${s[bi]} ${p}`:p),s[bi]=d):s[Ti]=d,t({...r,request:i})},Li=e=>{const t=e[0].split(Ai).map((e=>e.replace(Ii,Oi))).join(Ai),n=e[1]?.replace(xi,Oi),r=t.indexOf(Ai),i=t.substring(0,r);let s=t.substring(r+1);return"api"===i&&(s=s.toLowerCase()),[i,s,n].filter((e=>e&&e.length>0)).reduce(((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},ki={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Ni=e=>({applyToStack:t=>{t.add(Mi(e),ki)}});var _i;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(_i||(_i={}));const Ui=!1,Fi=!1,Gi=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),Bi=e=>Gi(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,Hi=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{if("string"==typeof t)return Bi(t);const e=await t();return Bi(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!Gi(e)||("function"!=typeof n?Promise.resolve(!!n):n())}})},zi="content-length";function ji(e){return t=>async n=>{const r=n.request;if(A.isInstance(r)){const{body:t,headers:n}=r;if(t&&-1===Object.keys(n).map((e=>e.toLowerCase())).indexOf(zi))try{const n=e(t);r.headers={...r.headers,[zi]:String(n)}}catch(e){}}return t({...n,request:r})}}const qi={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Vi=e=>({applyToStack:t=>{t.add(ji(e.bodyLengthChecker),qi)}}),Wi=async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Ji(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Yi(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},Ki=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Qi=/(\d+\.){3}\d+/,Zi=/\.\./,Yi=e=>Ki.test(e)&&!Qi.test(e)&&!Zi.test(e),Ji=e=>{const[t,n,r,,,i]=e.split(":"),s="arn"===t&&e.split(":").length>=6,o=Boolean(s&&n&&r&&i);if(s&&!o)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return o},Xi=(e,t,n)=>{const r=async()=>{const r=n[e]??n[t];return"function"==typeof r?r():r};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{const e=await r();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:r,path:i}=e;return`${t}//${n}${r?":"+r:""}${i}`}}return e}:r},es=async e=>{};function ts(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,r=null]=n.split("=");e=decodeURIComponent(e),r&&(r=decodeURIComponent(r)),e in t?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r}return t}const ns=e=>{if("string"==typeof e)return ns(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:s}=e;let o;return s&&(o=ts(s)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:o}},rs=e=>"object"==typeof e?"url"in e?ns(e.url):e:ns(e),is=async(e,t,n,r)=>{if(!n.endpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await es(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(rs(e)))}const i=await ss(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)},ss=async(e,t,n)=>{const r={},i=t?.getEndpointParameterInstructions?.()||{};for(const[t,s]of Object.entries(i))switch(s.type){case"staticContextParams":r[t]=s.value;break;case"contextParams":r[t]=e[s.name];break;case"clientContextParams":case"builtInParams":r[t]=await Xi(s.name,t,n)();break;case"operationContextParams":r[t]=s.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(s))}return 0===Object.keys(i).length&&Object.assign(r,n),"s3"===String(n.serviceId).toLowerCase()&&await Wi(r),r},os=e=>{let{config:t,instructions:n}=e;return(e,r)=>async i=>{t.endpoint&&st(r,"ENDPOINT_OVERRIDE","N");const s=await is(i.input,{getEndpointParameterInstructions:()=>n},{...t},r);r.endpointV2=s,r.authSchemes=s.properties?.authSchemes;const o=r.authSchemes?.[0];if(o){r.signing_region=o.signingRegion,r.signing_service=o.signingName;const e=Be(r),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return e({...i})}},as={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Ye.name},cs=(e,t)=>({applyToStack:n=>{n.addRelativeTo(os({config:e,instructions:t}),as)}}),us=e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:i}=e,s=null!=n?async()=>rs(await He(n)()):void 0,o=!!n,a=Object.assign(e,{endpoint:s,tls:t,isCustomEndpoint:o,useDualstackEndpoint:He(r??!1),useFipsEndpoint:He(i??!1)});let c;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=es(e.serviceId)),c),a};var ls;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(ls||(ls={}));const ds=3,ps=ls.STANDARD,hs=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],fs=["TimeoutError","RequestTimeout","RequestTimeoutException"],gs=[500,502,503,504],ms=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],ys=e=>e.$metadata?.clockSkewCorrected,Ss=e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return!!(e&&e instanceof TypeError)&&t.has(e.message)},Rs=e=>429===e.$metadata?.httpStatusCode||hs.includes(e.name)||1==e.$retryable?.throttling,ws=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return ys(e)||fs.includes(e.name)||ms.includes(e?.code||"")||gs.includes(e.$metadata?.httpStatusCode||0)||Ss(e)||void 0!==e.cause&&t<=10&&ws(e.cause,t+1)},vs=e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!ws(e)}return!1};class Es{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,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 t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,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 t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise((e=>Es.setTimeoutFn(e,t)))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),Rs(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(t,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(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}Es.setTimeoutFn=setTimeout;const Cs=100,bs=2e4,Ts=500,Ps=500,As=5,Is=10,xs=1,Os="amz-sdk-invocation-id",Ds="amz-sdk-request",$s=()=>{let e=Cs;return{computeNextBackoffDelay:t=>Math.floor(Math.min(bs,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}},Ms=e=>{let{retryDelay:t,retryCount:n,retryCost:r}=e;return{getRetryCount:()=>n,getRetryDelay:()=>Math.min(bs,t),getRetryCost:()=>r}};class Ls{constructor(e){this.maxAttempts=e,this.mode=ls.STANDARD,this.capacity=Ps,this.retryBackoffStrategy=$s(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return Ms({retryDelay:Cs,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===n?Ts:Cs);const r=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),i=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,r):r,s=this.getCapacityCost(n);return this.capacity-=s,Ms({retryDelay:i,retryCount:e.getRetryCount()+1,retryCost:s})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(Ps,this.capacity+(e.getRetryCost()??xs))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn(`Max attempts provider could not resolve. Using default of ${ds}`),ds}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?Is:As}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class ks{constructor(e,t){this.maxAttemptsProvider=e,this.mode=ls.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new Es,this.standardRetryStrategy=new Ls(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}let Ns;const _s=new Uint8Array(16);function Us(){if(!Ns&&(Ns="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ns))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ns(_s)}const Fs=[];for(let e=0;e<256;++e)Fs.push((e+256).toString(16).slice(1));function Gs(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Fs[e[t+0]]+Fs[e[t+1]]+Fs[e[t+2]]+Fs[e[t+3]]+"-"+Fs[e[t+4]]+Fs[e[t+5]]+"-"+Fs[e[t+6]]+Fs[e[t+7]]+"-"+Fs[e[t+8]]+Fs[e[t+9]]+"-"+Fs[e[t+10]]+Fs[e[t+11]]+Fs[e[t+12]]+Fs[e[t+13]]+Fs[e[t+14]]+Fs[e[t+15]]}const Bs="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Hs={randomUUID:Bs};function zs(e,t,n){if(Hs.randomUUID&&!e)return Hs.randomUUID();const r=(e=e||{}).random||(e.rng||Us)();return r[6]=15&r[6]|64,r[8]=63&r[8]|128,Gs(r)}const js=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),qs=e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,i=He(r??ds);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await He(n)()===ls.ADAPTIVE?new ks(i):new Ls(i))})},Vs=e=>e?.body instanceof ReadableStream,Ws=e=>(t,n)=>async r=>{let i=await e.retryStrategy();const s=await e.maxAttempts();if(!Ks(i))return i?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,r);{let e=await i.acquireInitialRetryToken(n.partition_id),o=new Error,a=0,c=0;const{request:u}=r,l=A.isInstance(u);for(l&&(u.headers[Os]=zs());;)try{l&&(u.headers[Ds]=`attempt=${a+1}; max=${s}`);const{response:n,output:o}=await t(r);return i.recordSuccess(e),o.$metadata.attempts=a+1,o.$metadata.totalRetryDelay=c,{response:n,output:o}}catch(t){const r=Qs(t);if(o=js(t),l&&Vs(u))throw(n.logger instanceof ke?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),o;try{e=await i.refreshRetryTokenForRetry(e,r)}catch(e){throw o.$metadata||(o.$metadata={}),o.$metadata.attempts=a+1,o.$metadata.totalRetryDelay=c,o}a=e.getRetryCount();const s=e.getRetryDelay();c+=s,await new Promise((e=>setTimeout(e,s)))}}},Ks=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,Qs=e=>{const t={error:e,errorType:Zs(e)},n=Xs(e.$response);return n&&(t.retryAfterHint=n),t},Zs=e=>Rs(e)?"THROTTLING":ws(e)?"TRANSIENT":vs(e)?"SERVER_ERROR":"CLIENT_ERROR",Ys={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Js=e=>({applyToStack:t=>{t.add(Ws(e),Ys)}}),Xs=e=>{if(!x.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const n=e.headers[t],r=Number(n);return Number.isNaN(r)?new Date(n):new Date(1e3*r)},eo=async(e,t,n)=>({operation:Be(t).operation,region:await He(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function to(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function no(e){return{schemeId:"smithy.api#noAuth"}}const ro=e=>{const t=[];switch(e.operation){case"GetCredentialsForIdentity":case"GetId":case"GetOpenIdToken":case"UnlinkIdentity":t.push(no());break;default:t.push(to(e))}return t},io=e=>{const t=fi(e);return Object.assign(t,{authSchemePreference:He(e.authSchemePreference??[])})},so=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}),oo={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var ao="3.806.0",co={version:ao},uo={name:"SHA-256"},lo={name:"HMAC",hash:uo},po=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 ho={};function fo(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:ho}var go=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!bt(e)){var t=Ct(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return fo().crypto.subtle.sign(lo,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):bt(this.toHash)?Promise.resolve(po):Promise.resolve().then((function(){return fo().crypto.subtle.digest(uo,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise((function(t,n){fo().crypto.subtle.importKey("raw",Ct(e.secret),lo,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))},e}(),mo=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function yo(e){return!(!So(e)||"object"!=typeof e.crypto.subtle)&&Ro(e.crypto.subtle)}function So(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function Ro(e){return e&&mo.every((function(t){return"function"==typeof e[t]}))}var wo,vo=function(){function e(e){yo(fo())?this.hash=new go(e):this.hash=new Tt(e)}return e.prototype.update=function(e,t){this.hash.update(Ct(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),Eo={exports:{}};function Co(){return wo||(wo=1,function(e){!function(t,n){e.exports=n()}(0,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),s=e.getVersionPrecision(n),o=Math.max(i,s),a=0,c=e.map([t,n],(function(t){var n=o-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(a=o-Math.min(i,s)),o-=1;o>=a;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===a)return 0;o-=1}else if(c[0][o]<c[1][o])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(s));var a=function(){var e=s[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=s.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},s=n(18);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return s.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return s.ENGINE_MAP}},{key:"OS_MAP",get:function(){return s.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return s.PLATFORMS_MAP}}],(n=null)&&o(t.prototype,n),r&&o(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),s=c(n(94)),o=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},s=0;if(Object.keys(e).forEach((function(t){var o=e[t];"string"==typeof o?(i[t]=o,s+=1):"object"==typeof o&&(n[t]=o,r+=1)})),r>0){var o=Object.keys(n),c=a.default.find(o,(function(e){return t.isOS(e)}));if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var l=a.default.find(o,(function(e){return t.isPlatform(e)}));if(l){var d=this.satisfies(n[l]);if(void 0!==d)return d}}if(s>0){var p=Object.keys(i),h=a.default.find(p,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(i[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=u,e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:s.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:s.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:s.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:s.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:s.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:s.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:s.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:s.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:s.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:s.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:s.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:s.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:s.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:s.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:s.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:s.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:s.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:s.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:s.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})}))}(Eo)),Eo.exports}Eo.exports;var bo=vi(Co());const To=e=>{let{serviceId:t,clientVersion:n}=e;return async e=>{const r="undefined"!=typeof window&&window?.navigator?.userAgent?bo.parse(window.navigator.userAgent):void 0,i=[["aws-sdk-js",n],["ua","2.1"],[`os/${r?.os?.name||"other"}`,r?.os?.version],["lang/js"],["md/browser",`${r?.browser?.name??"unknown"}_${r?.browser?.version??"unknown"}`]];t&&i.push([`api/${t}`,n]);const s=await(e?.userAgentAppId?.());return s&&i.push([`app/${s}`]),i}},Po=e=>()=>Promise.reject(e),Ao="function"==typeof TextEncoder?new TextEncoder:null,Io=e=>{if("string"==typeof e){if(Ao)return Ao.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)},xo=e=>(new TextEncoder).encode(e),Oo=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)},Do="required",$o="fn",Mo="argv",Lo="ref",ko=!0,No="isSet",_o="booleanEquals",Uo="error",Fo="endpoint",Go="tree",Bo="PartitionResult",Ho="getAttr",zo="stringEquals",jo={[Do]:!1,type:"String"},qo={[Do]:!0,default:!1,type:"Boolean"},Vo={[Lo]:"Endpoint"},Wo={[$o]:_o,[Mo]:[{[Lo]:"UseFIPS"},!0]},Ko={[$o]:_o,[Mo]:[{[Lo]:"UseDualStack"},!0]},Qo={},Zo={[Lo]:"Region"},Yo={[$o]:Ho,[Mo]:[{[Lo]:Bo},"supportsFIPS"]},Jo={[Lo]:Bo},Xo={[$o]:_o,[Mo]:[!0,{[$o]:Ho,[Mo]:[Jo,"supportsDualStack"]}]},ea=[Wo],ta=[Ko],na=[Zo],ra={parameters:{Region:jo,UseDualStack:qo,UseFIPS:qo,Endpoint:jo},rules:[{conditions:[{[$o]:No,[Mo]:[Vo]}],rules:[{conditions:ea,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Uo},{conditions:ta,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Uo},{endpoint:{url:Vo,properties:Qo,headers:Qo},type:Fo}],type:Go},{conditions:[{[$o]:No,[Mo]:na}],rules:[{conditions:[{[$o]:"aws.partition",[Mo]:na,assign:Bo}],rules:[{conditions:[Wo,Ko],rules:[{conditions:[{[$o]:_o,[Mo]:[ko,Yo]},Xo],rules:[{conditions:[{[$o]:zo,[Mo]:[Zo,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:Qo,headers:Qo},type:Fo},{conditions:[{[$o]:zo,[Mo]:[Zo,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:Qo,headers:Qo},type:Fo},{conditions:[{[$o]:zo,[Mo]:[Zo,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:Qo,headers:Qo},type:Fo},{conditions:[{[$o]:zo,[Mo]:[Zo,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:Qo,headers:Qo},type:Fo},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Qo,headers:Qo},type:Fo}],type:Go},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Uo}],type:Go},{conditions:ea,rules:[{conditions:[{[$o]:_o,[Mo]:[Yo,ko]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Qo,headers:Qo},type:Fo}],type:Go},{error:"FIPS is enabled but this partition does not support FIPS",type:Uo}],type:Go},{conditions:ta,rules:[{conditions:[Xo],rules:[{conditions:[{[$o]:zo,[Mo]:["aws",{[$o]:Ho,[Mo]:[Jo,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:Qo,headers:Qo},type:Fo},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Qo,headers:Qo},type:Fo}],type:Go},{error:"DualStack is enabled but this partition does not support DualStack",type:Uo}],type:Go},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:Qo,headers:Qo},type:Fo}],type:Go}],type:Go},{error:"Invalid Configuration: Missing Region",type:Uo}]},ia=ra,sa=new Cn({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),oa=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return sa.get(e,(()=>rr(ia,{endpointParams:e,logger:t.logger})))};In.aws=pr;const aa=e=>({apiVersion:"2014-06-30",base64Decoder:e?.base64Decoder??H,base64Encoder:e?.base64Encoder??j,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??oa,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ro,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new vr},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new at}],logger:e?.logger??new ke,serviceId:e?.serviceId??"Cognito Identity",urlParser:e?.urlParser??ns,utf8Decoder:e?.utf8Decoder??xo,utf8Encoder:e?.utf8Encoder??Oo}),ca=["in-region","cross-region","mobile","standard","legacy"],ua=function(){let{defaultsMode:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r((async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(la()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${ca.join(", ")}, got ${t}`)}}))},la=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?bo.parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},da=e=>{const t=ua(e),n=()=>t().then(Ie),r=aa(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Io,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??To({serviceId:r.serviceId,clientVersion:co.version}),maxAttempts:e?.maxAttempts??ds,region:e?.region??Po("Region is missing"),requestHandler:N.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||ps),sha256:e?.sha256??vo,streamCollector:e?.streamCollector??q,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Ui)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Fi))}},pa=e=>({setRegion(t){e.region=t},region:()=>e.region}),ha=e=>({region:e.region()}),fa=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}},ga=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),ma=(e,t)=>{const n=Object.assign(pa(e),Me(e),y(e),fa(e));return t.forEach((e=>e.configure(n))),Object.assign(e,ha(n),Le(n),S(n),ga(n))};class ya extends ee{config;constructor(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];let[r]=t;const i=da(r||{});super(i),this.initConfig=i;const s=En(so(i)),o=qs(s),a=an(Hi(o)),c=us(a),u=io(c),l=ma(u,r?.extensions||[]);this.config=l,this.middlewareStack.use(Ni(this.config)),this.middlewareStack.use(Js(this.config)),this.middlewareStack.use(Vi(this.config)),this.middlewareStack.use(ln(this.config)),this.middlewareStack.use(hn(this.config)),this.middlewareStack.use(Rn(this.config)),this.middlewareStack.use(We(this.config,{httpAuthSchemeParametersProvider:eo,identityProviderConfigProvider:async e=>new ot({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(rt(this.config))}destroy(){super.destroy()}}class Sa extends Ce{constructor(e){super(e),Object.setPrototypeOf(this,Sa.prototype)}}class Ra extends Sa{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,Ra.prototype)}}class wa extends Sa{name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,wa.prototype)}}class va extends Sa{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,va.prototype)}}class Ea extends Sa{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,Ea.prototype)}}class Ca extends Sa{name="ResourceConflictException";$fault="client";constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,Ca.prototype)}}class ba extends Sa{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,ba.prototype)}}class Ta extends Sa{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Ta.prototype)}}class Pa extends Sa{name="ExternalServiceException";$fault="client";constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),Object.setPrototypeOf(this,Pa.prototype)}}class Aa extends Sa{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,Aa.prototype)}}class Ia extends Sa{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(e){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...e}),Object.setPrototypeOf(this,Ia.prototype)}}class xa extends Sa{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,xa.prototype)}}const Oa=e=>({...e,...e.Logins&&{Logins:he}}),Da=e=>({...e,...e.SecretKey&&{SecretKey:he}}),$a=e=>({...e,...e.Credentials&&{Credentials:Da(e.Credentials)}}),Ma=e=>({...e,...e.Logins&&{Logins:he}}),La=async(e,t)=>{const n=tc("GetCredentialsForIdentity");let r;return r=JSON.stringify(Ge(e)),ec(t,n,"/",void 0,r)},ka=async(e,t)=>{const n=tc("GetId");let r;return r=JSON.stringify(Ge(e)),ec(t,n,"/",void 0,r)},Na=async(e,t)=>{if(e.statusCode>=300)return Ua(e,t);const n=await Si(e.body,t);let r={};return r=Ya(n),{$metadata:Ja(e),...r}},_a=async(e,t)=>{if(e.statusCode>=300)return Ua(e,t);const n=await Si(e.body,t);let r={};return r=Ge(n),{$metadata:Ja(e),...r}},Ua=async(e,t)=>{const n={...e,body:await Ri(e.body,t)},r=wi(e,n.body);switch(r){case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":throw await Ha(n);case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":throw await ja(n);case"LimitExceededException":case"com.amazonaws.cognitoidentity#LimitExceededException":throw await qa(n);case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":throw await Va(n);case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":throw await Wa(n);case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":throw await Qa(n);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":throw await Ka(n);case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":throw await Ba(n);case"InvalidIdentityPoolConfigurationException":case"com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException":throw await za(n);case"DeveloperUserAlreadyRegisteredException":case"com.amazonaws.cognitoidentity#DeveloperUserAlreadyRegisteredException":throw await Ga(n);case"ConcurrentModificationException":case"com.amazonaws.cognitoidentity#ConcurrentModificationException":throw await Fa(n);default:const t=n.body;return Xa({output:e,parsedBody:t,errorCode:r})}},Fa=async(e,t)=>{const n=e.body,r=Ge(n),i=new xa({$metadata:Ja(e),...r});return be(i,n)},Ga=async(e,t)=>{const n=e.body,r=Ge(n),i=new Ia({$metadata:Ja(e),...r});return be(i,n)},Ba=async(e,t)=>{const n=e.body,r=Ge(n),i=new Pa({$metadata:Ja(e),...r});return be(i,n)},Ha=async(e,t)=>{const n=e.body,r=Ge(n),i=new Ra({$metadata:Ja(e),...r});return be(i,n)},za=async(e,t)=>{const n=e.body,r=Ge(n),i=new Aa({$metadata:Ja(e),...r});return be(i,n)},ja=async(e,t)=>{const n=e.body,r=Ge(n),i=new wa({$metadata:Ja(e),...r});return be(i,n)},qa=async(e,t)=>{const n=e.body,r=Ge(n),i=new va({$metadata:Ja(e),...r});return be(i,n)},Va=async(e,t)=>{const n=e.body,r=Ge(n),i=new Ea({$metadata:Ja(e),...r});return be(i,n)},Wa=async(e,t)=>{const n=e.body,r=Ge(n),i=new Ca({$metadata:Ja(e),...r});return be(i,n)},Ka=async(e,t)=>{const n=e.body,r=Ge(n),i=new Ta({$metadata:Ja(e),...r});return be(i,n)},Qa=async(e,t)=>{const n=e.body,r=Ge(n),i=new ba({$metadata:Ja(e),...r});return be(i,n)},Za=(e,t)=>Ne(e,{AccessKeyId:me,Expiration:e=>ge(Ee(fe(e))),SecretKey:me,SessionToken:me}),Ya=(e,t)=>Ne(e,{Credentials:e=>Za(e),IdentityId:me}),Ja=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Xa=Pe(Sa),ec=async(e,t,n,r,i)=>{const{hostname:s,protocol:o="https",port:a,path:c}=await e.endpoint(),u={protocol:o,hostname:s,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:t};return void 0!==i&&(u.body=i),new A(u)};function tc(e){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${e}`}}class nc extends(de.classBuilder().ep(oo).m((function(e,t,n,r){return[Je(n,this.serialize,this.deserialize),cs(n,e.getEndpointParameterInstructions())]})).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").f(Oa,$a).ser(La).de(Na).build()){}class rc extends(de.classBuilder().ep(oo).m((function(e,t,n,r){return[Je(n,this.serialize,this.deserialize),cs(n,e.getEndpointParameterInstructions())]})).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").f(Ma,void 0).ser(ka).de(_a).build()){}var ic=Object.freeze({__proto__:null,CognitoIdentityClient:ya,GetCredentialsForIdentityCommand:nc,GetIdCommand:rc})}(e)}(ag)),ag);const ug=async(e,t,n)=>({operation:f(t).operation,region:await g(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const lg=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"geo-maps",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},dg={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var pg="3.986.0";const hg="required",fg="fn",gg="argv",mg="ref",yg="url",Sg="properties",Rg="headers",wg=!0,vg="isSet",Eg="booleanEquals",Cg="error",bg="endpoint",Tg="tree",Pg="PartitionResult",Ag={[hg]:!0,default:!1,type:"boolean"},Ig={[hg]:!1,type:"string"},xg={[mg]:"Endpoint"},Og={[fg]:Eg,[gg]:[{[mg]:"UseFIPS"},!0]},Dg={[fg]:Eg,[gg]:[{[mg]:"UseDualStack"},!0]},$g={},Mg={[fg]:"stringEquals",[gg]:[{[fg]:"getAttr",[gg]:[{[mg]:Pg},"name"]},"aws"]},Lg={[fg]:Eg,[gg]:[{[mg]:"UseFIPS"},!1]},kg={[fg]:Eg,[gg]:[{[mg]:"UseDualStack"},!1]},Ng={[yg]:"https://maps.geo.{Region}.{PartitionResult#dnsSuffix}/v2",[Sg]:{},[Rg]:{}},_g={[yg]:"https://maps.geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",[Sg]:{},[Rg]:{}},Ug={[yg]:"https://maps.geo-fips.{Region}.{PartitionResult#dnsSuffix}/v2",[Sg]:{},[Rg]:{}},Fg={[yg]:"https://maps.geo.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",[Sg]:{},[Rg]:{}},Gg={[fg]:"stringEquals",[gg]:[{[fg]:"getAttr",[gg]:[{[mg]:Pg},"name"]},"aws-us-gov"]},Bg={[fg]:"getAttr",[gg]:[{[mg]:Pg},"supportsFIPS"]},Hg={[fg]:Eg,[gg]:[!0,{[fg]:"getAttr",[gg]:[{[mg]:Pg},"supportsDualStack"]}]},zg=[{[mg]:"Region"}],jg={parameters:{UseDualStack:Ag,UseFIPS:Ag,Endpoint:Ig,Region:Ig},rules:[{conditions:[{[fg]:vg,[gg]:[xg]}],rules:[{conditions:[Og],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Cg},{rules:[{conditions:[Dg],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Cg},{endpoint:{[yg]:xg,[Sg]:$g,[Rg]:$g},type:bg}],type:Tg}],type:Tg},{rules:[{conditions:[{[fg]:vg,[gg]:zg}],rules:[{conditions:[{[fg]:"aws.partition",[gg]:zg,assign:Pg}],rules:[{conditions:[Mg,Lg,kg],endpoint:Ng,type:bg},{conditions:[Mg,Og,Dg],endpoint:_g,type:bg},{conditions:[Mg,Og,kg],endpoint:Ug,type:bg},{conditions:[Mg,Lg,Dg],endpoint:Fg,type:bg},{conditions:[Gg,Lg,kg],endpoint:Ng,type:bg},{conditions:[Gg,Og,Dg],endpoint:_g,type:bg},{conditions:[Gg,Og,kg],endpoint:Ug,type:bg},{conditions:[Gg,Lg,Dg],endpoint:Fg,type:bg},{conditions:[Og,Dg],rules:[{conditions:[{[fg]:Eg,[gg]:[wg,Bg]},Hg],rules:[{endpoint:{[yg]:"https://geo-maps-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[Sg]:$g,[Rg]:$g},type:bg}],type:Tg},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Cg}],type:Tg},{conditions:[Og,kg],rules:[{conditions:[{[fg]:Eg,[gg]:[Bg,wg]}],rules:[{endpoint:{[yg]:"https://geo-maps-fips.{Region}.{PartitionResult#dnsSuffix}",[Sg]:$g,[Rg]:$g},type:bg}],type:Tg},{error:"FIPS is enabled but this partition does not support FIPS",type:Cg}],type:Tg},{conditions:[Lg,Dg],rules:[{conditions:[Hg],rules:[{endpoint:{[yg]:"https://geo-maps.{Region}.{PartitionResult#dualStackDnsSuffix}",[Sg]:$g,[Rg]:$g},type:bg}],type:Tg},{error:"DualStack is enabled but this partition does not support DualStack",type:Cg}],type:Tg},{endpoint:{[yg]:"https://geo-maps.{Region}.{PartitionResult#dnsSuffix}",[Sg]:$g,[Rg]:$g},type:bg}],type:Tg}],type:Tg},{error:"Invalid Configuration: Missing Region",type:Cg}],type:Tg}]},qg=new bt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Vg=(e,t={})=>qg.get(e,(()=>Yt(jg,{endpointParams:e,logger:t.logger})));xt.aws=rs;const Wg=e=>{const t=Xi(e),n=()=>t().then(sr),r=(e=>({apiVersion:"2020-11-19",base64Decoder:e?.base64Decoder??O,base64Encoder:e?.base64Encoder??L,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Vg,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??lg,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new un}],logger:e?.logger??new ur,protocol:e?.protocol??Cr,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.geomaps",version:"2020-11-19",serviceTarget:"MapsService"},serviceId:e?.serviceId??"Geo Maps",urlParser:e?.urlParser??tn,utf8Decoder:e?.utf8Decoder??D,utf8Encoder:e?.utf8Encoder??M}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qn,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Qi({serviceId:r.serviceId,clientVersion:pg}),maxAttempts:e?.maxAttempts??3,region:e?.region??Yi("Region is missing"),requestHandler:H.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||si),sha256:e?.sha256??Ki,streamCollector:e?.streamCollector??z,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(_r)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Ur))}};class Kg extends Yn{config;constructor(...[e]){const r=Wg(e||{});super(r),this.initConfig=r;var i;const s=Ct((i=r,Object.assign(i,{useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,defaultSigningName:"geo-maps"}))),o=yi(s),a=Br(o),c=((e,r)=>{const i=Object.assign(Os(e),or(e),t(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}})(e));return r.forEach((e=>e.configure(i))),Object.assign(e,Ds(i),ar(i),n(i),{httpAuthSchemes:(s=i).httpAuthSchemes(),httpAuthSchemeProvider:s.httpAuthSchemeProvider(),credentials:s.credentials()});var s})((e=>{const t=zn(e);return Object.assign(t,{authSchemePreference:g(e.authSchemePreference??[])})})(ri(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use(re(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(Ci(this.config)),this.middlewareStack.use(jr(this.config)),this.middlewareStack.use(u(this.config)),this.middlewareStack.use(d(this.config)),this.middlewareStack.use(h(this.config)),this.middlewareStack.use(S(this.config,{httpAuthSchemeParametersProvider:ug,identityProviderConfigProvider:async e=>new St({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(E(this.config))}destroy(){super.destroy()}}class Qg extends rr{constructor(e){super(e),Object.setPrototypeOf(this,Qg.prototype)}}let Zg=class e extends Qg{name="AccessDeniedException";$fault="client";Message;constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},Yg=class e extends Qg{name="InternalServerException";$fault="server";$retryable={};Message;constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},Jg=class e extends Qg{name="ThrottlingException";$fault="client";$retryable={};Message;constructor(t){super({name:"ThrottlingException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},Xg=class e extends Qg{name="ValidationException";$fault="client";Message;Reason;FieldList;constructor(t){super({name:"ValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message,this.Reason=t.Reason,this.FieldList=t.FieldList}},em=class e extends Qg{name="ResourceNotFoundException";$fault="client";Message;constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};const tm="Blob",nm="Cache-Control",rm="CacheControl",im="CompactOverlay",sm="ColorScheme",om="ContentType",am="Content-Type",cm="ETag",um="FileName",lm="GeoJsonOverlay",dm="Key",pm="Message",hm="PricingBucket",fm="PoliticalView",gm="Style",mm="client",ym="color-scheme",Sm="error",Rm="httpError",wm="httpHeader",vm="httpQuery",Em="http",Cm="jsonName",bm="key",Tm="message",Pm="political-view",Am="smithy.ts.sdk.synthetic.com.amazonaws.geomaps",Im="x-amz-geo-pricing-bucket",xm="com.amazonaws.geomaps";var Om=[0,xm,"ApiKey",8,0],Dm=[0,xm,im,8,0],$m=[0,xm,"CountryCode",8,0],Mm=[0,xm,"DistanceMeters",8,1],Lm=[0,xm,lm,8,0],km=[0,xm,"PositionListString",8,0],Nm=[0,xm,"PositionString",8,0],_m=[0,xm,"SensitiveFloat",8,1],Um=[0,xm,"SensitiveInteger",8,1],Fm=[0,xm,"SensitiveString",8,0],Gm=[-3,xm,"AccessDeniedException",{[Sm]:mm,[Rm]:403},[pm],[[0,{[Cm]:Tm}]],1];le.for(xm).registerError(Gm,Zg);var Bm=[3,xm,"GetGlyphsRequest",0,["FontStack","FontUnicodeRange"],[[0,1],[0,1]],2],Hm=[3,xm,"GetGlyphsResponse",0,[tm,om,rm,cm],[[21,16],[0,{[wm]:am}],[0,{[wm]:nm}],[0,{[wm]:cm}]]],zm=[3,xm,"GetSpritesRequest",0,[um,gm,sm,"Variant"],[[0,1],[0,1],[0,1],[0,1]],4],jm=[3,xm,"GetSpritesResponse",0,[tm,om,rm,cm],[[21,16],[0,{[wm]:am}],[0,{[wm]:nm}],[0,{[wm]:cm}]]],qm=[3,xm,"GetStaticMapRequest",0,["Height",um,"Width","BoundingBox","BoundedPositions","Center",sm,im,"CropLabels",lm,dm,"LabelSize","Language","Padding",fm,"PointsOfInterests","Radius","ScaleBarUnit",gm,"Zoom"],[[()=>Um,{[vm]:"height"}],[0,1],[()=>Um,{[vm]:"width"}],[()=>km,{[vm]:"bounding-box"}],[()=>km,{[vm]:"bounded-positions"}],[()=>Nm,{[vm]:"center"}],[0,{[vm]:ym}],[()=>Dm,{[vm]:"compact-overlay"}],[2,{[vm]:"crop-labels"}],[()=>Lm,{[vm]:"geojson-overlay"}],[()=>Om,{[vm]:bm}],[0,{[vm]:"label-size"}],[0,{[vm]:"lang"}],[()=>Um,{[vm]:"padding"}],[()=>$m,{[vm]:Pm}],[0,{[vm]:"pois"}],[()=>Mm,{[vm]:"radius"}],[0,{[vm]:"scale-unit"}],[0,{[vm]:"style"}],[()=>_m,{[vm]:"zoom"}]],3],Vm=[3,xm,"GetStaticMapResponse",0,[hm,tm,om,rm,cm],[[0,{[wm]:Im}],[21,16],[0,{[wm]:am}],[0,{[wm]:nm}],[0,{[wm]:cm}]],1],Wm=[3,xm,"GetStyleDescriptorRequest",0,[gm,sm,fm,"Terrain","ContourDensity","Traffic","TravelModes","Buildings",dm],[[0,1],[0,{[vm]:ym}],[()=>$m,{[vm]:Pm}],[0,{[vm]:"terrain"}],[0,{[vm]:"contour-density"}],[0,{[vm]:"traffic"}],[64,{[vm]:"travel-modes"}],[0,{[vm]:"buildings"}],[()=>Om,{[vm]:bm}]],1],Km=[3,xm,"GetStyleDescriptorResponse",0,[tm,om,rm,cm],[[21,16],[0,{[wm]:am}],[0,{[wm]:nm}],[0,{[wm]:cm}]]],Qm=[3,xm,"GetTileRequest",0,["Tileset","Z","X","Y","AdditionalFeatures",dm],[[0,1],[()=>Fm,1],[()=>Fm,1],[()=>Fm,1],[64,{[vm]:"additional-features"}],[()=>Om,{[vm]:bm}]],4],Zm=[3,xm,"GetTileResponse",0,[hm,tm,om,rm,cm],[[0,{[wm]:Im}],[21,16],[0,{[wm]:am}],[0,{[wm]:nm}],[0,{[wm]:cm}]],1],Ym=[-3,xm,"InternalServerException",{[Sm]:"server",[Rm]:500},[pm],[[0,{[Cm]:Tm}]],1];le.for(xm).registerError(Ym,Yg);var Jm=[-3,xm,"ResourceNotFoundException",{[Sm]:mm,[Rm]:404},[pm],[[0,{[Cm]:Tm}]],1];le.for(xm).registerError(Jm,em);var Xm=[-3,xm,"ThrottlingException",{[Sm]:mm,[Rm]:429},[pm],[[0,{[Cm]:Tm}]],1];le.for(xm).registerError(Xm,Jg);var ey=[-3,xm,"ValidationException",{[Sm]:mm,[Rm]:400},[pm,"Reason","FieldList"],[[0,{[Cm]:Tm}],[0,{[Cm]:"reason"}],[()=>ry,{[Cm]:"fieldList"}]],3];le.for(xm).registerError(ey,Xg);var ty=[3,xm,"ValidationExceptionField",0,["Name",pm],[[0,{[Cm]:"name"}],[0,{[Cm]:Tm}]],2],ny=[-3,Am,"GeoMapsServiceException",0,[],[]];le.for(Am).registerError(ny,Qg);var ry=[1,xm,"ValidationExceptionFieldList",0,[()=>ty,0]],iy=[9,xm,"GetGlyphs",{[Em]:["GET","/glyphs/{FontStack}/{FontUnicodeRange}",200]},()=>Bm,()=>Hm],sy=[9,xm,"GetSprites",{[Em]:["GET","/styles/{Style}/{ColorScheme}/{Variant}/sprites/{FileName}",200]},()=>zm,()=>jm],oy=[9,xm,"GetStaticMap",{[Em]:["GET","/static/{FileName}",200]},()=>qm,()=>Vm],ay=[9,xm,"GetStyleDescriptor",{[Em]:["GET","/styles/{Style}/descriptor",200]},()=>Wm,()=>Km],cy=[9,xm,"GetTile",{[Em]:["GET","/tiles/{Tileset}/{Z}/{X}/{Y}",200]},()=>Qm,()=>Zm];class uy extends(er.classBuilder().ep(dg).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("MapsService","GetGlyphs",{}).n("GeoMapsClient","GetGlyphsCommand").sc(iy).build()){}class ly extends(er.classBuilder().ep(dg).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("MapsService","GetSprites",{}).n("GeoMapsClient","GetSpritesCommand").sc(sy).build()){}class dy extends(er.classBuilder().ep(dg).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("MapsService","GetStaticMap",{}).n("GeoMapsClient","GetStaticMapCommand").sc(oy).build()){}class py extends(er.classBuilder().ep(dg).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("MapsService","GetStyleDescriptor",{}).n("GeoMapsClient","GetStyleDescriptorCommand").sc(ay).build()){}class hy extends(er.classBuilder().ep(dg).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("MapsService","GetTile",{}).n("GeoMapsClient","GetTileCommand").sc(cy).build()){}const fy={GetGlyphsCommand:uy,GetSpritesCommand:ly,GetStaticMapCommand:dy,GetStyleDescriptorCommand:py,GetTileCommand:hy};class gy extends Kg{}nr(fy,gy);var my=Object.freeze({__proto__:null,$Command:er,AccessDeniedException:Zg,AccessDeniedException$:Gm,Buildings:{BUILDINGS_3D:"Buildings3D"},ColorScheme:{DARK:"Dark",LIGHT:"Light"},ContourDensity:{MEDIUM:"Medium"},GeoMaps:gy,GeoMapsClient:Kg,GeoMapsServiceException:Qg,GeoMapsServiceException$:ny,GetGlyphs$:iy,GetGlyphsCommand:uy,GetGlyphsRequest$:Bm,GetGlyphsResponse$:Hm,GetSprites$:sy,GetSpritesCommand:ly,GetSpritesRequest$:zm,GetSpritesResponse$:jm,GetStaticMap$:oy,GetStaticMapCommand:dy,GetStaticMapRequest$:qm,GetStaticMapResponse$:Vm,GetStyleDescriptor$:ay,GetStyleDescriptorCommand:py,GetStyleDescriptorRequest$:Wm,GetStyleDescriptorResponse$:Km,GetTile$:cy,GetTileCommand:hy,GetTileRequest$:Qm,GetTileResponse$:Zm,InternalServerException:Yg,InternalServerException$:Ym,LabelSize:{LARGE:"Large",SMALL:"Small"},MapFeatureMode:{DISABLED:"Disabled",ENABLED:"Enabled"},MapStyle:{HYBRID:"Hybrid",MONOCHROME:"Monochrome",SATELLITE:"Satellite",STANDARD:"Standard"},ResourceNotFoundException:em,ResourceNotFoundException$:Jm,ScaleBarUnit:{KILOMETERS:"Kilometers",KILOMETERS_MILES:"KilometersMiles",MILES:"Miles",MILES_KILOMETERS:"MilesKilometers"},StaticMapStyle:{SATELLITE:"Satellite",STANDARD:"Standard"},Terrain:{HILLSHADE:"Hillshade",TERRAIN_3D:"Terrain3D"},ThrottlingException:Jg,ThrottlingException$:Xm,TileAdditionalFeature:{CONTOUR_LINES:"ContourLines",HILLSHADE:"Hillshade",LOGISTICS:"Logistics",TRANSIT:"Transit"},Traffic:{ALL:"All"},TravelMode:{TRANSIT:"Transit",TRUCK:"Truck"},ValidationException:Xg,ValidationException$:ey,ValidationExceptionField$:ty,ValidationExceptionReason:{CANNOT_PARSE:"CannotParse",FIELD_VALIDATION_FAILED:"FieldValidationFailed",MISSING:"Missing",OTHER:"Other",UNKNOWN_FIELD:"UnknownField",UNKNOWN_OPERATION:"UnknownOperation"},Variant:{DEFAULT:"Default"},__Client:Yn});const yy=async(e,t,n)=>({operation:f(t).operation,region:await g(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Sy=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"geo-places",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Ry={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var wy="3.986.0";const vy="required",Ey="fn",Cy="argv",by="ref",Ty="url",Py="properties",Ay="headers",Iy=!0,xy="isSet",Oy="booleanEquals",Dy="error",$y="endpoint",My="tree",Ly="PartitionResult",ky={[vy]:!0,default:!1,type:"boolean"},Ny={[vy]:!1,type:"string"},_y={[by]:"Endpoint"},Uy={[Ey]:Oy,[Cy]:[{[by]:"UseFIPS"},!0]},Fy={[Ey]:Oy,[Cy]:[{[by]:"UseDualStack"},!0]},Gy={},By={[Ey]:"stringEquals",[Cy]:[{[Ey]:"getAttr",[Cy]:[{[by]:Ly},"name"]},"aws"]},Hy={[Ey]:Oy,[Cy]:[{[by]:"UseFIPS"},!1]},zy={[Ey]:Oy,[Cy]:[{[by]:"UseDualStack"},!1]},jy={[Ty]:"https://places.geo.{Region}.{PartitionResult#dnsSuffix}/v2",[Py]:{},[Ay]:{}},qy={[Ty]:"https://places.geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",[Py]:{},[Ay]:{}},Vy={[Ty]:"https://places.geo-fips.{Region}.{PartitionResult#dnsSuffix}/v2",[Py]:{},[Ay]:{}},Wy={[Ty]:"https://places.geo.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",[Py]:{},[Ay]:{}},Ky={[Ey]:"stringEquals",[Cy]:[{[Ey]:"getAttr",[Cy]:[{[by]:Ly},"name"]},"aws-us-gov"]},Qy={[Ey]:"getAttr",[Cy]:[{[by]:Ly},"supportsFIPS"]},Zy={[Ey]:Oy,[Cy]:[!0,{[Ey]:"getAttr",[Cy]:[{[by]:Ly},"supportsDualStack"]}]},Yy=[{[by]:"Region"}],Jy={parameters:{UseDualStack:ky,UseFIPS:ky,Endpoint:Ny,Region:Ny},rules:[{conditions:[{[Ey]:xy,[Cy]:[_y]}],rules:[{conditions:[Uy],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Dy},{rules:[{conditions:[Fy],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Dy},{endpoint:{[Ty]:_y,[Py]:Gy,[Ay]:Gy},type:$y}],type:My}],type:My},{rules:[{conditions:[{[Ey]:xy,[Cy]:Yy}],rules:[{conditions:[{[Ey]:"aws.partition",[Cy]:Yy,assign:Ly}],rules:[{conditions:[By,Hy,zy],endpoint:jy,type:$y},{conditions:[By,Uy,Fy],endpoint:qy,type:$y},{conditions:[By,Uy,zy],endpoint:Vy,type:$y},{conditions:[By,Hy,Fy],endpoint:Wy,type:$y},{conditions:[Ky,Hy,zy],endpoint:jy,type:$y},{conditions:[Ky,Uy,Fy],endpoint:qy,type:$y},{conditions:[Ky,Uy,zy],endpoint:Vy,type:$y},{conditions:[Ky,Hy,Fy],endpoint:Wy,type:$y},{conditions:[Uy,Fy],rules:[{conditions:[{[Ey]:Oy,[Cy]:[Iy,Qy]},Zy],rules:[{endpoint:{[Ty]:"https://geo-places-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[Py]:Gy,[Ay]:Gy},type:$y}],type:My},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Dy}],type:My},{conditions:[Uy,zy],rules:[{conditions:[{[Ey]:Oy,[Cy]:[Qy,Iy]}],rules:[{endpoint:{[Ty]:"https://geo-places-fips.{Region}.{PartitionResult#dnsSuffix}",[Py]:Gy,[Ay]:Gy},type:$y}],type:My},{error:"FIPS is enabled but this partition does not support FIPS",type:Dy}],type:My},{conditions:[Hy,Fy],rules:[{conditions:[Zy],rules:[{endpoint:{[Ty]:"https://geo-places.{Region}.{PartitionResult#dualStackDnsSuffix}",[Py]:Gy,[Ay]:Gy},type:$y}],type:My},{error:"DualStack is enabled but this partition does not support DualStack",type:Dy}],type:My},{endpoint:{[Ty]:"https://geo-places.{Region}.{PartitionResult#dnsSuffix}",[Py]:Gy,[Ay]:Gy},type:$y}],type:My}],type:My},{error:"Invalid Configuration: Missing Region",type:Dy}],type:My}]},Xy=new bt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),eS=(e,t={})=>Xy.get(e,(()=>Yt(Jy,{endpointParams:e,logger:t.logger})));xt.aws=rs;const tS=e=>{const t=Xi(e),n=()=>t().then(sr),r=(e=>({apiVersion:"2020-11-19",base64Decoder:e?.base64Decoder??O,base64Encoder:e?.base64Encoder??L,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??eS,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Sy,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new un}],logger:e?.logger??new ur,protocol:e?.protocol??Cr,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.geoplaces",version:"2020-11-19",serviceTarget:"PlacesService"},serviceId:e?.serviceId??"Geo Places",urlParser:e?.urlParser??tn,utf8Decoder:e?.utf8Decoder??D,utf8Encoder:e?.utf8Encoder??M}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qn,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Qi({serviceId:r.serviceId,clientVersion:wy}),maxAttempts:e?.maxAttempts??3,region:e?.region??Yi("Region is missing"),requestHandler:H.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||si),sha256:e?.sha256??Ki,streamCollector:e?.streamCollector??z,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(_r)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Ur))}};class nS extends Yn{config;constructor(...[e]){const r=tS(e||{});super(r),this.initConfig=r;var i;const s=Ct((i=r,Object.assign(i,{useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,defaultSigningName:"geo-places"}))),o=yi(s),a=Br(o),c=((e,r)=>{const i=Object.assign(Os(e),or(e),t(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}})(e));return r.forEach((e=>e.configure(i))),Object.assign(e,Ds(i),ar(i),n(i),{httpAuthSchemes:(s=i).httpAuthSchemes(),httpAuthSchemeProvider:s.httpAuthSchemeProvider(),credentials:s.credentials()});var s})((e=>{const t=zn(e);return Object.assign(t,{authSchemePreference:g(e.authSchemePreference??[])})})(ri(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use(re(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(Ci(this.config)),this.middlewareStack.use(jr(this.config)),this.middlewareStack.use(u(this.config)),this.middlewareStack.use(d(this.config)),this.middlewareStack.use(h(this.config)),this.middlewareStack.use(S(this.config,{httpAuthSchemeParametersProvider:yy,identityProviderConfigProvider:async e=>new St({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(E(this.config))}destroy(){super.destroy()}}class rS extends rr{constructor(e){super(e),Object.setPrototypeOf(this,rS.prototype)}}let iS=class e extends rS{name="AccessDeniedException";$fault="client";Message;constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},sS=class e extends rS{name="InternalServerException";$fault="server";$retryable={};Message;constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},oS=class e extends rS{name="ThrottlingException";$fault="client";$retryable={};Message;constructor(t){super({name:"ThrottlingException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},aS=class e extends rS{name="ValidationException";$fault="client";Message;Reason;FieldList;constructor(t){super({name:"ValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message,this.Reason=t.Reason,this.FieldList=t.FieldList}};const cS="Address",uS="AdditionalFeatures",lS="AddressNumber",dS="AddressNumberCorrected",pS="AccessPoints",hS="AccessRestrictions",fS="Block",gS="BoundingBox",mS="BusinessChains",yS="BiasPosition",SS="Building",RS="Categories",wS="Circle",vS="Country",ES="Code",CS="Components",bS="Contacts",TS="District",PS="Designator",AS="Distance",IS="EndIndex",xS="Filter",OS="FoodTypes",DS="Heading",$S="Highlights",MS="Intersection",LS="IncludeCountries",kS="IncludePlaceTypes",NS="IntendedUse",_S="Id",US="Intersections",FS="Key",GS="Label",BS="LocalizedName",HS="Language",zS="Locality",jS="Message",qS="MainAddress",VS="MaxResults",WS="MapView",KS="Name",QS="NextToken",ZS="Number",YS="OpeningHours",JS="Position",XS="PostalAuthority",eR="PricingBucket",tR="PostalCode",nR="PostalCodeDetails",rR="PostalCodeType",iR="PlaceId",sR="PlaceType",oR="PoliticalView",aR="Phonemes",cR="Primary",uR="QueryId",lR="QueryPosition",dR="QueryRadius",pR="QueryText",hR="ResultItems",fR="RecordTypeCode",gR="Region",mR="Street",yR="SecondaryAddresses",SR="SecondaryAddressComponents",RR="SubBlock",wR="StreetComponents",vR="SubDistrict",ER="StartIndex",CR="SubRegion",bR="Title",TR="TimeZone",PR="UspsZip",AR="UspsZipPlus4",IR="Value",xR="ZipClassificationCode",OR="client",DR="error",$R="http",MR="httpError",LR="httpHeader",kR="httpQuery",NR="jsonName",_R="key",UR="message",FR="smithy.ts.sdk.synthetic.com.amazonaws.geoplaces",GR="x-amz-geo-pricing-bucket",BR="com.amazonaws.geoplaces";var HR=[0,BR,"ApiKey",8,0],zR=[0,BR,"CountryCode",8,0],jR=[0,BR,"CountryCode2",8,0],qR=[0,BR,"CountryCode3",8,0],VR=[0,BR,"DistanceMeters",8,1],WR=[0,BR,"DurationSeconds",8,1],KR=[0,BR,"GeocodeFilterPlaceType",8,0],QR=[0,BR,DS,8,1],ZR=[0,BR,"OpeningHoursDisplay",8,0],YR=[0,BR,sR,8,0],JR=[0,BR,XS,8,0],XR=[0,BR,rR,8,0],ew=[0,BR,fR,8,0],tw=[0,BR,"SensitiveBoolean",8,2],nw=[0,BR,"SensitiveString",8,0],rw=[0,BR,xR,8,0],iw=[-3,BR,"AccessDeniedException",{[DR]:OR,[MR]:403},[jS],[[0,{[NR]:UR}]],1];le.for(BR).registerError(iw,iS);var sw=[3,BR,"AccessPoint",0,[JS],[[()=>Zv,0]]],ow=[3,BR,"AccessRestriction",0,["Restricted",RS],[[()=>tw,0],[()=>$v,0]]],aw=[3,BR,cS,0,[GS,vS,gR,CR,zS,TS,vR,tR,fS,RR,MS,mR,wR,lS,SS,SR],[[()=>nw,0],[()=>vw,0],[()=>Vw,0],[()=>lv,0],[()=>nw,0],[()=>nw,0],[()=>nw,0],[()=>nw,0],[()=>nw,0],[()=>nw,0],64,[()=>nw,0],[()=>sE,0],[()=>nw,0],[()=>nw,0],[()=>rE,0]]],cw=[3,BR,"AddressComponentMatchScores",0,[vS,gR,CR,zS,TS,vR,tR,fS,RR,MS,lS,SS,SR],[1,1,1,1,1,1,1,1,1,65,1,1,()=>iE]],uw=[3,BR,"AddressComponentPhonemes",0,[vS,gR,CR,zS,TS,vR,fS,RR,mR],[[()=>Qv,0],[()=>Qv,0],[()=>Qv,0],[()=>Qv,0],[()=>Qv,0],[()=>Qv,0],[()=>Qv,0],[()=>Qv,0],[()=>Qv,0]]],lw=[3,BR,"AutocompleteAddressHighlights",0,[GS,vS,gR,CR,zS,TS,vR,mR,fS,RR,MS,tR,lS,SS],[[()=>Bv,0],[()=>Ew,0],[()=>Ww,0],[()=>dv,0],[()=>Bv,0],[()=>Bv,0],[()=>Bv,0],[()=>Bv,0],[()=>Bv,0],[()=>Bv,0],[()=>Hv,0],[()=>Bv,0],[()=>Bv,0],[()=>Bv,0]]],dw=[3,BR,"AutocompleteFilter",0,[gS,wS,LS,kS],[[()=>Ov,0],[()=>Cw,0],[()=>Lv,0],64]],pw=[3,BR,"AutocompleteHighlights",0,[bR,cS],[[()=>Bv,0],[()=>lw,0]]],hw=[3,BR,"AutocompleteRequest",0,[pR,VS,yS,xS,"PostalCodeMode",uS,HS,oR,NS,FS],[[()=>nw,0],1,[()=>Zv,0],[()=>dw,0],0,64,0,[()=>zR,0],0,[()=>HR,{[kR]:_R}]],1],fw=[3,BR,"AutocompleteResponse",0,[eR,hR],[[0,{[LR]:GR}],[()=>xv,0]],1],gw=[3,BR,"AutocompleteResultItem",0,[iR,sR,bR,cS,AS,HS,oR,$S],[[()=>nw,0],[()=>YR,0],[()=>nw,0],[()=>aw,0],[()=>VR,0],0,[()=>qR,0],[()=>pw,0]],3],mw=[3,BR,"BusinessChain",0,[KS,_S],[[()=>nw,0],[()=>nw,0]]],yw=[3,BR,"Category",0,[_S,KS,BS,cR],[[()=>nw,0],[()=>nw,0],[()=>nw,0],[()=>tw,0]],2],Sw=[3,BR,"ComponentMatchScores",0,[bR,cS],[1,()=>cw]],Rw=[3,BR,"ContactDetails",0,[GS,IR,RS],[[()=>nw,0],[()=>nw,0],[()=>$v,0]]],ww=[3,BR,bS,0,["Phones","Faxes","Websites","Emails"],[[()=>Mv,0],[()=>Mv,0],[()=>Mv,0],[()=>Mv,0]]],vw=[3,BR,vS,0,["Code2","Code3",KS],[[()=>jR,0],[()=>qR,0],[()=>nw,0]]],Ew=[3,BR,"CountryHighlights",0,[ES,KS],[[()=>Bv,0],[()=>Bv,0]]],Cw=[3,BR,"FilterCircle",8,["Center","Radius"],[[()=>Zv,0],[()=>VR,0]],2],bw=[3,BR,"FoodType",0,[BS,_S,cR],[[()=>nw,0],[()=>nw,0],[()=>tw,0]],1],Tw=[3,BR,"GeocodeFilter",0,[LS,kS],[[()=>Lv,0],[()=>Fv,0]]],Pw=[3,BR,"GeocodeParsedQuery",0,[bR,cS],[[()=>Wv,0],[()=>Aw,0]]],Aw=[3,BR,"GeocodeParsedQueryAddressComponents",0,[vS,gR,CR,zS,TS,vR,tR,fS,RR,mR,lS,SS,SR],[[()=>Wv,0],[()=>Wv,0],[()=>Wv,0],[()=>Wv,0],[()=>Wv,0],[()=>Wv,0],[()=>Wv,0],[()=>Wv,0],[()=>Wv,0],[()=>Wv,0],[()=>Wv,0],[()=>Wv,0],[()=>Kv,0]]],Iw=[3,BR,"GeocodeQueryComponents",0,[vS,gR,CR,zS,TS,mR,lS,tR],[[()=>nw,0],[()=>nw,0],[()=>nw,0],[()=>nw,0],[()=>nw,0],[()=>nw,0],[()=>nw,0],[()=>nw,0]]],xw=[3,BR,"GeocodeRequest",0,[pR,"QueryComponents",VS,yS,xS,uS,HS,oR,NS,FS],[[()=>nw,0],[()=>Iw,0],1,[()=>Zv,0],[()=>Tw,0],64,0,[()=>zR,0],0,[()=>HR,{[kR]:_R}]]],Ow=[3,BR,"GeocodeResponse",0,[eR,hR],[[0,{[LR]:GR}],[()=>Gv,0]],1],Dw=[3,BR,"GeocodeResultItem",0,[iR,sR,bR,cS,dS,nR,JS,AS,WS,RS,OS,pS,TR,oR,"MatchScores","ParsedQuery",US,qS,yR],[[()=>nw,0],[()=>YR,0],[()=>nw,0],[()=>aw,0],[()=>tw,0],[()=>Yv,0],[()=>Zv,0],[()=>VR,0],[()=>Ov,0],[()=>$v,0],[()=>Uv,0],[()=>Av,0],[()=>vv,0],[()=>qR,0],()=>_w,[()=>Pw,0],[()=>zv,0],[()=>Kw,0],[()=>Xv,0]],3],$w=[3,BR,"GetPlaceRequest",0,[iR,uS,HS,oR,NS,FS],[[()=>nw,1],[64,{[kR]:"additional-features"}],[0,{[kR]:"language"}],[()=>zR,{[kR]:"political-view"}],[0,{[kR]:"intended-use"}],[()=>HR,{[kR]:_R}]],1],Mw=[3,BR,"GetPlaceResponse",0,[iR,sR,bR,eR,cS,dS,nR,JS,WS,RS,OS,mS,bS,YS,pS,hS,TR,oR,aR,qS,yR],[[()=>nw,0],[()=>YR,0],[()=>nw,0],[0,{[LR]:GR}],[()=>aw,0],[()=>tw,0],[()=>Yv,0],[()=>Zv,0],[()=>Ov,0],[()=>$v,0],[()=>Uv,0],[()=>Dv,0],[()=>ww,0],[()=>Vv,0],[()=>Av,0],[()=>Iv,0],[()=>vv,0],[()=>qR,0],[()=>Hw,0],[()=>Kw,0],[()=>Xv,0]],4],Lw=[3,BR,"Highlight",0,[ER,IS,IR],[1,1,[()=>nw,0]]],kw=[-3,BR,"InternalServerException",{[DR]:"server",[MR]:500},[jS],[[0,{[NR]:UR}]],1];le.for(BR).registerError(kw,sS);var Nw=[3,BR,MS,0,[iR,bR,cS,JS,AS,"RouteDistance",WS,pS],[[()=>nw,0],[()=>nw,0],[()=>aw,0],[()=>Zv,0],[()=>VR,0],[()=>VR,0],[()=>Ov,0],[()=>Av,0]],2],_w=[3,BR,"MatchScoreDetails",0,["Overall",CS],[1,()=>Sw]],Uw=[3,BR,YS,0,["Display","OpenNow",CS,RS],[[()=>qv,0],[()=>tw,0],[()=>jv,0],[()=>$v,0]]],Fw=[3,BR,"OpeningHoursComponents",0,["OpenTime","OpenDuration","Recurrence"],[[()=>nw,0],[()=>nw,0],[()=>nw,0]]],Gw=[3,BR,"ParsedQueryComponent",0,[ER,IS,IR,"QueryComponent"],[1,1,[()=>nw,0],[()=>nw,0]]],Bw=[3,BR,"ParsedQuerySecondaryAddressComponent",0,[ER,IS,IR,ZS,PS],[1,1,[()=>nw,0],[()=>nw,0],[()=>nw,0]],5],Hw=[3,BR,"PhonemeDetails",0,[bR,cS],[[()=>Qv,0],[()=>uw,0]]],zw=[3,BR,"PhonemeTranscription",0,[IR,HS,"Preferred"],[[()=>nw,0],0,[()=>tw,0]]],jw=[3,BR,nR,0,[tR,XS,rR,PR,AR],[[()=>nw,0],[()=>JR,0],[()=>XR,0],[()=>Ev,0],[()=>Cv,0]]],qw=[3,BR,"QueryRefinement",0,["RefinedTerm","OriginalTerm",ER,IS],[[()=>nw,0],[()=>nw,0],1,1],4],Vw=[3,BR,gR,0,[ES,KS],[[()=>nw,0],[()=>nw,0]]],Ww=[3,BR,"RegionHighlights",0,[ES,KS],[[()=>Bv,0],[()=>Bv,0]]],Kw=[3,BR,"RelatedPlace",0,[iR,sR,bR,cS,JS,pS],[[()=>nw,0],[()=>YR,0],[()=>nw,0],[()=>aw,0],[()=>Zv,0],[()=>Av,0]],3],Qw=[3,BR,"ReverseGeocodeFilter",0,[kS],[64]],Zw=[3,BR,"ReverseGeocodeRequest",0,[lR,dR,VS,xS,uS,HS,oR,NS,FS,DS],[[()=>Zv,0],[()=>VR,0],1,()=>Qw,64,0,[()=>zR,0],0,[()=>HR,{[kR]:_R}],[()=>QR,0]],1],Yw=[3,BR,"ReverseGeocodeResponse",0,[eR,hR],[[0,{[LR]:GR}],[()=>eE,0]],1],Jw=[3,BR,"ReverseGeocodeResultItem",0,[iR,sR,bR,cS,dS,nR,JS,AS,WS,RS,OS,pS,TR,oR,US],[[()=>nw,0],[()=>YR,0],[()=>nw,0],[()=>aw,0],[()=>tw,0],[()=>Yv,0],[()=>Zv,0],[()=>VR,0],[()=>Ov,0],[()=>$v,0],[()=>Uv,0],[()=>Av,0],[()=>vv,0],[()=>qR,0],[()=>zv,0]],3],Xw=[3,BR,"SearchNearbyFilter",0,[gS,LS,"IncludeCategories","ExcludeCategories","IncludeBusinessChains","ExcludeBusinessChains","IncludeFoodTypes","ExcludeFoodTypes"],[[()=>Ov,0],[()=>Lv,0],[()=>Nv,0],[()=>Nv,0],[()=>kv,0],[()=>kv,0],[()=>_v,0],[()=>_v,0]]],ev=[3,BR,"SearchNearbyRequest",0,[lR,dR,VS,xS,uS,HS,oR,NS,QS,FS],[[()=>Zv,0],[()=>VR,0],1,[()=>Xw,0],64,0,[()=>zR,0],0,0,[()=>HR,{[kR]:_R}]],1],tv=[3,BR,"SearchNearbyResponse",0,[eR,hR,QS],[[0,{[LR]:GR}],[()=>tE,0],0],1],nv=[3,BR,"SearchNearbyResultItem",0,[iR,sR,bR,cS,dS,JS,AS,WS,RS,OS,mS,bS,YS,pS,hS,TR,oR,aR],[[()=>nw,0],[()=>YR,0],[()=>nw,0],[()=>aw,0],[()=>tw,0],[()=>Zv,0],[()=>VR,0],[()=>Ov,0],[()=>$v,0],[()=>Uv,0],[()=>Dv,0],[()=>ww,0],[()=>Vv,0],[()=>Av,0],[()=>Iv,0],[()=>vv,0],[()=>qR,0],[()=>Hw,0]],3],rv=[3,BR,"SearchTextFilter",0,[gS,wS,LS],[[()=>Ov,0],[()=>Cw,0],[()=>Lv,0]]],iv=[3,BR,"SearchTextRequest",0,[pR,uR,VS,yS,xS,uS,HS,oR,NS,QS,FS],[[()=>nw,0],[()=>nw,0],1,[()=>Zv,0],[()=>rv,0],64,0,[()=>zR,0],0,0,[()=>HR,{[kR]:_R}]]],sv=[3,BR,"SearchTextResponse",0,[eR,hR,QS],[[0,{[LR]:GR}],[()=>nE,0],0],1],ov=[3,BR,"SearchTextResultItem",0,[iR,sR,bR,cS,dS,JS,AS,WS,RS,OS,mS,bS,YS,pS,hS,TR,oR,aR],[[()=>nw,0],[()=>YR,0],[()=>nw,0],[()=>aw,0],[()=>tw,0],[()=>Zv,0],[()=>VR,0],[()=>Ov,0],[()=>$v,0],[()=>Uv,0],[()=>Dv,0],[()=>ww,0],[()=>Vv,0],[()=>Av,0],[()=>Iv,0],[()=>vv,0],[()=>qR,0],[()=>Hw,0]],3],av=[3,BR,"SecondaryAddressComponent",0,[ZS,PS],[[()=>nw,0],[()=>nw,0]],1],cv=[3,BR,"SecondaryAddressComponentMatchScore",0,[ZS],[1]],uv=[3,BR,wR,0,["BaseName","Type","TypePlacement","TypeSeparator","Prefix","Suffix","Direction",HS],[[()=>nw,0],[()=>nw,0],0,0,[()=>nw,0],[()=>nw,0],[()=>nw,0],0]],lv=[3,BR,CR,0,[ES,KS],[[()=>nw,0],[()=>nw,0]]],dv=[3,BR,"SubRegionHighlights",0,[ES,KS],[[()=>Bv,0],[()=>Bv,0]]],pv=[3,BR,"SuggestAddressHighlights",0,[GS],[[()=>Bv,0]]],hv=[3,BR,"SuggestFilter",0,[gS,wS,LS],[[()=>Ov,0],[()=>Cw,0],[()=>Lv,0]]],fv=[3,BR,"SuggestHighlights",0,[bR,cS],[[()=>Bv,0],[()=>pv,0]]],gv=[3,BR,"SuggestPlaceResult",0,[iR,sR,cS,JS,AS,WS,RS,OS,mS,pS,hS,TR,oR,aR],[[()=>nw,0],[()=>YR,0],[()=>aw,0],[()=>Zv,0],[()=>VR,0],[()=>Ov,0],[()=>$v,0],[()=>Uv,0],[()=>Dv,0],[()=>Av,0],[()=>Iv,0],[()=>vv,0],[()=>qR,0],[()=>Hw,0]]],mv=[3,BR,"SuggestQueryResult",0,[uR,"QueryType"],[[()=>nw,0],0]],yv=[3,BR,"SuggestRequest",0,[pR,VS,"MaxQueryRefinements",yS,xS,uS,HS,oR,NS,FS],[[()=>nw,0],1,1,[()=>Zv,0],[()=>hv,0],64,0,[()=>zR,0],0,[()=>HR,{[kR]:_R}]],1],Sv=[3,BR,"SuggestResponse",0,[eR,hR,"QueryRefinements"],[[0,{[LR]:GR}],[()=>oE,0],[()=>Jv,0]],1],Rv=[3,BR,"SuggestResultItem",0,[bR,"SuggestResultItemType","Place","Query",$S],[[()=>nw,0],0,[()=>gv,0],[()=>mv,0],[()=>fv,0]],2],wv=[-3,BR,"ThrottlingException",{[DR]:OR,[MR]:429},[jS],[[0,{[NR]:UR}]],1];le.for(BR).registerError(wv,oS);var vv=[3,BR,TR,0,[KS,"Offset","OffsetSeconds"],[[()=>nw,0],[()=>nw,0],[()=>WR,0]],1],Ev=[3,BR,PR,0,[xR],[[()=>rw,0]]],Cv=[3,BR,AR,0,[fR],[[()=>ew,0]]],bv=[-3,BR,"ValidationException",{[DR]:OR,[MR]:400},[jS,"Reason","FieldList"],[[0,{[NR]:UR}],[0,{[NR]:"reason"}],[()=>aE,{[NR]:"fieldList"}]],3];le.for(BR).registerError(bv,aS);var Tv=[3,BR,"ValidationExceptionField",0,[KS,jS],[[0,{[NR]:"name"}],[0,{[NR]:UR}]],2],Pv=[-3,FR,"GeoPlacesServiceException",0,[],[]];le.for(FR).registerError(Pv,rS);var Av=[1,BR,"AccessPointList",0,[()=>sw,0]],Iv=[1,BR,"AccessRestrictionList",0,[()=>ow,0]],xv=[1,BR,"AutocompleteResultItemList",0,[()=>gw,0]],Ov=[1,BR,gS,8,1],Dv=[1,BR,"BusinessChainList",0,[()=>mw,0]],$v=[1,BR,"CategoryList",0,[()=>yw,0]],Mv=[1,BR,"ContactDetailsList",0,[()=>Rw,0]],Lv=[1,BR,"CountryCodeList",0,[()=>zR,0]],kv=[1,BR,"FilterBusinessChainList",0,[()=>nw,0]],Nv=[1,BR,"FilterCategoryList",0,[()=>nw,0]],_v=[1,BR,"FilterFoodTypeList",0,[()=>nw,0]],Uv=[1,BR,"FoodTypeList",0,[()=>bw,0]],Fv=[1,BR,"GeocodeFilterPlaceTypeList",0,[()=>KR,0]],Gv=[1,BR,"GeocodeResultItemList",0,[()=>Dw,0]],Bv=[1,BR,"HighlightList",0,[()=>Lw,0]],Hv=[1,BR,"IntersectionHighlightsList",0,[()=>Bv,0]],zv=[1,BR,"IntersectionList",0,[()=>Nw,0]],jv=[1,BR,"OpeningHoursComponentsList",0,[()=>Fw,0]],qv=[1,BR,"OpeningHoursDisplayList",0,[()=>ZR,0]],Vv=[1,BR,"OpeningHoursList",0,[()=>Uw,0]],Wv=[1,BR,"ParsedQueryComponentList",0,[()=>Gw,0]],Kv=[1,BR,"ParsedQuerySecondaryAddressComponentList",0,[()=>Bw,0]],Qv=[1,BR,"PhonemeTranscriptionList",0,[()=>zw,0]],Zv=[1,BR,JS,8,1],Yv=[1,BR,"PostalCodeDetailsList",0,[()=>jw,0]],Jv=[1,BR,"QueryRefinementList",0,[()=>qw,0]],Xv=[1,BR,"RelatedPlaceList",0,[()=>Kw,0]],eE=[1,BR,"ReverseGeocodeResultItemList",0,[()=>Jw,0]],tE=[1,BR,"SearchNearbyResultItemList",0,[()=>nv,0]],nE=[1,BR,"SearchTextResultItemList",0,[()=>ov,0]],rE=[1,BR,"SecondaryAddressComponentList",0,[()=>av,0]],iE=[1,BR,"SecondaryAddressComponentMatchScoreList",0,()=>cv],sE=[1,BR,"StreetComponentsList",0,[()=>uv,0]],oE=[1,BR,"SuggestResultItemList",0,[()=>Rv,0]],aE=[1,BR,"ValidationExceptionFieldList",0,[()=>Tv,0]],cE=[9,BR,"Autocomplete",{[$R]:["POST","/autocomplete",200]},()=>hw,()=>fw],uE=[9,BR,"Geocode",{[$R]:["POST","/geocode",200]},()=>xw,()=>Ow],lE=[9,BR,"GetPlace",{[$R]:["GET","/place/{PlaceId}",200]},()=>$w,()=>Mw],dE=[9,BR,"ReverseGeocode",{[$R]:["POST","/reverse-geocode",200]},()=>Zw,()=>Yw],pE=[9,BR,"SearchNearby",{[$R]:["POST","/search-nearby",200]},()=>ev,()=>tv],hE=[9,BR,"SearchText",{[$R]:["POST","/search-text",200]},()=>iv,()=>sv],fE=[9,BR,"Suggest",{[$R]:["POST","/suggest",200]},()=>yv,()=>Sv];class gE extends(er.classBuilder().ep(Ry).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("PlacesService","Autocomplete",{}).n("GeoPlacesClient","AutocompleteCommand").sc(cE).build()){}class mE extends(er.classBuilder().ep(Ry).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("PlacesService","Geocode",{}).n("GeoPlacesClient","GeocodeCommand").sc(uE).build()){}class yE extends(er.classBuilder().ep(Ry).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("PlacesService","GetPlace",{}).n("GeoPlacesClient","GetPlaceCommand").sc(lE).build()){}class SE extends(er.classBuilder().ep(Ry).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("PlacesService","ReverseGeocode",{}).n("GeoPlacesClient","ReverseGeocodeCommand").sc(dE).build()){}class RE extends(er.classBuilder().ep(Ry).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("PlacesService","SearchNearby",{}).n("GeoPlacesClient","SearchNearbyCommand").sc(pE).build()){}class wE extends(er.classBuilder().ep(Ry).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("PlacesService","SearchText",{}).n("GeoPlacesClient","SearchTextCommand").sc(hE).build()){}class vE extends(er.classBuilder().ep(Ry).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("PlacesService","Suggest",{}).n("GeoPlacesClient","SuggestCommand").sc(fE).build()){}const EE={AutocompleteCommand:gE,GeocodeCommand:mE,GetPlaceCommand:yE,ReverseGeocodeCommand:SE,SearchNearbyCommand:RE,SearchTextCommand:wE,SuggestCommand:vE};class CE extends nS{}nr(EE,CE);var bE=Object.freeze({__proto__:null,$Command:er,AccessDeniedException:iS,AccessDeniedException$:iw,AccessPoint$:sw,AccessRestriction$:ow,Address$:aw,AddressComponentMatchScores$:cw,AddressComponentPhonemes$:uw,Autocomplete$:cE,AutocompleteAdditionalFeature:{CORE:"Core"},AutocompleteAddressHighlights$:lw,AutocompleteCommand:gE,AutocompleteFilter$:dw,AutocompleteFilterPlaceType:{LOCALITY:"Locality",POSTAL_CODE:"PostalCode"},AutocompleteHighlights$:pw,AutocompleteIntendedUse:{SINGLE_USE:"SingleUse"},AutocompleteRequest$:hw,AutocompleteResponse$:fw,AutocompleteResultItem$:gw,BusinessChain$:mw,Category$:yw,ComponentMatchScores$:Sw,ContactDetails$:Rw,Contacts$:ww,Country$:vw,CountryHighlights$:Ew,FilterCircle$:Cw,FoodType$:bw,GeoPlaces:CE,GeoPlacesClient:nS,GeoPlacesServiceException:rS,GeoPlacesServiceException$:Pv,Geocode$:uE,GeocodeAdditionalFeature:{ACCESS:"Access",INTERSECTIONS:"Intersections",SECONDARY_ADDRESSES:"SecondaryAddresses",TIME_ZONE:"TimeZone"},GeocodeCommand:mE,GeocodeFilter$:Tw,GeocodeFilterPlaceType:{INTERPOLATED_ADDRESS:"InterpolatedAddress",INTERSECTION:"Intersection",LOCALITY:"Locality",POINT_ADDRESS:"PointAddress",POSTAL_CODE:"PostalCode",STREET:"Street"},GeocodeIntendedUse:{SINGLE_USE:"SingleUse",STORAGE:"Storage"},GeocodeParsedQuery$:Pw,GeocodeParsedQueryAddressComponents$:Aw,GeocodeQueryComponents$:Iw,GeocodeRequest$:xw,GeocodeResponse$:Ow,GeocodeResultItem$:Dw,GetPlace$:lE,GetPlaceAdditionalFeature:{ACCESS:"Access",CONTACT:"Contact",PHONEMES:"Phonemes",SECONDARY_ADDRESSES:"SecondaryAddresses",TIME_ZONE:"TimeZone"},GetPlaceCommand:yE,GetPlaceIntendedUse:{SINGLE_USE:"SingleUse",STORAGE:"Storage"},GetPlaceRequest$:$w,GetPlaceResponse$:Mw,Highlight$:Lw,InternalServerException:sS,InternalServerException$:kw,Intersection$:Nw,MatchScoreDetails$:_w,OpeningHours$:Uw,OpeningHoursComponents$:Fw,ParsedQueryComponent$:Gw,ParsedQuerySecondaryAddressComponent$:Bw,PhonemeDetails$:Hw,PhonemeTranscription$:zw,PlaceType:{BLOCK:"Block",COUNTRY:"Country",DISTRICT:"District",INFERRED_SECONDARY_ADDRESS:"InferredSecondaryAddress",INTERPOLATED_ADDRESS:"InterpolatedAddress",INTERSECTION:"Intersection",LOCALITY:"Locality",POINT_ADDRESS:"PointAddress",POINT_OF_INTEREST:"PointOfInterest",POSTAL_CODE:"PostalCode",REGION:"Region",SECONDARY_ADDRESS:"SecondaryAddress",STREET:"Street",SUB_BLOCK:"SubBlock",SUB_DISTRICT:"SubDistrict",SUB_REGION:"SubRegion"},PostalAuthority:{USPS:"Usps"},PostalCodeDetails$:jw,PostalCodeMode:{ENUMERATE_SPANNED_LOCALITIES:"EnumerateSpannedLocalities",MERGE_ALL_SPANNED_LOCALITIES:"MergeAllSpannedLocalities"},PostalCodeType:{USPS_ZIP:"UspsZip",USPS_ZIP_PLUS_4:"UspsZipPlus4"},QueryRefinement$:qw,QueryType:{BUSINESS_CHAIN:"BusinessChain",CATEGORY:"Category"},RecordTypeCode:{FIRM:"Firm",GENERAL:"General",HIGH_RISE:"HighRise",POST_OFFICE_BOX:"PostOfficeBox",RURAL:"Rural",STREET:"Street"},Region$:Vw,RegionHighlights$:Ww,RelatedPlace$:Kw,ReverseGeocode$:dE,ReverseGeocodeAdditionalFeature:{ACCESS:"Access",INTERSECTIONS:"Intersections",TIME_ZONE:"TimeZone"},ReverseGeocodeCommand:SE,ReverseGeocodeFilter$:Qw,ReverseGeocodeFilterPlaceType:{INTERPOLATED_ADDRESS:"InterpolatedAddress",INTERSECTION:"Intersection",LOCALITY:"Locality",POINT_ADDRESS:"PointAddress",STREET:"Street"},ReverseGeocodeIntendedUse:{SINGLE_USE:"SingleUse",STORAGE:"Storage"},ReverseGeocodeRequest$:Zw,ReverseGeocodeResponse$:Yw,ReverseGeocodeResultItem$:Jw,SearchNearby$:pE,SearchNearbyAdditionalFeature:{ACCESS:"Access",CONTACT:"Contact",PHONEMES:"Phonemes",TIME_ZONE:"TimeZone"},SearchNearbyCommand:RE,SearchNearbyFilter$:Xw,SearchNearbyIntendedUse:{SINGLE_USE:"SingleUse",STORAGE:"Storage"},SearchNearbyRequest$:ev,SearchNearbyResponse$:tv,SearchNearbyResultItem$:nv,SearchText$:hE,SearchTextAdditionalFeature:{ACCESS:"Access",CONTACT:"Contact",PHONEMES:"Phonemes",TIME_ZONE:"TimeZone"},SearchTextCommand:wE,SearchTextFilter$:rv,SearchTextIntendedUse:{SINGLE_USE:"SingleUse",STORAGE:"Storage"},SearchTextRequest$:iv,SearchTextResponse$:sv,SearchTextResultItem$:ov,SecondaryAddressComponent$:av,SecondaryAddressComponentMatchScore$:cv,StreetComponents$:uv,SubRegion$:lv,SubRegionHighlights$:dv,Suggest$:fE,SuggestAdditionalFeature:{ACCESS:"Access",CORE:"Core",PHONEMES:"Phonemes",TIME_ZONE:"TimeZone"},SuggestAddressHighlights$:pv,SuggestCommand:vE,SuggestFilter$:hv,SuggestHighlights$:fv,SuggestIntendedUse:{SINGLE_USE:"SingleUse"},SuggestPlaceResult$:gv,SuggestQueryResult$:mv,SuggestRequest$:yv,SuggestResponse$:Sv,SuggestResultItem$:Rv,SuggestResultItemType:{PLACE:"Place",QUERY:"Query"},ThrottlingException:oS,ThrottlingException$:wv,TimeZone$:vv,TypePlacement:{AFTER_BASE_NAME:"AfterBaseName",BEFORE_BASE_NAME:"BeforeBaseName"},UspsZip$:Ev,UspsZipPlus4$:Cv,ValidationException:aS,ValidationException$:bv,ValidationExceptionField$:Tv,ValidationExceptionReason:{CANNOT_PARSE:"CannotParse",FIELD_VALIDATION_FAILED:"FieldValidationFailed",MISSING:"Missing",OTHER:"Other",UNKNOWN_FIELD:"UnknownField",UNKNOWN_OPERATION:"UnknownOperation"},ZipClassificationCode:{MILITARY:"Military",POST_OFFICE_BOXES:"PostOfficeBoxes",UNIQUE:"Unique"},__Client:Yn});const TE=async(e,t,n)=>({operation:f(t).operation,region:await g(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const PE=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"geo-routes",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},AE={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var IE="3.986.0";const xE="required",OE="fn",DE="argv",$E="ref",ME=!0,LE="isSet",kE="booleanEquals",NE="error",_E="endpoint",UE="tree",FE="PartitionResult",GE={[xE]:!0,default:!1,type:"boolean"},BE={[xE]:!1,type:"string"},HE={[$E]:"Endpoint"},zE={[OE]:kE,[DE]:[{[$E]:"UseFIPS"},!0]},jE={[OE]:kE,[DE]:[{[$E]:"UseDualStack"},!0]},qE={},VE={[OE]:"stringEquals",[DE]:[{[OE]:"getAttr",[DE]:[{[$E]:FE},"name"]},"aws"]},WE={[OE]:kE,[DE]:[{[$E]:"UseFIPS"},!1]},KE={[OE]:kE,[DE]:[{[$E]:"UseDualStack"},!1]},QE={[OE]:"stringEquals",[DE]:[{[OE]:"getAttr",[DE]:[{[$E]:FE},"name"]},"aws-us-gov"]},ZE={[OE]:"getAttr",[DE]:[{[$E]:FE},"supportsFIPS"]},YE={[OE]:kE,[DE]:[!0,{[OE]:"getAttr",[DE]:[{[$E]:FE},"supportsDualStack"]}]},JE=[{[$E]:"Region"}],XE={parameters:{UseDualStack:GE,UseFIPS:GE,Endpoint:BE,Region:BE},rules:[{conditions:[{[OE]:LE,[DE]:[HE]}],rules:[{conditions:[zE],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:NE},{rules:[{conditions:[jE],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:NE},{endpoint:{url:HE,properties:qE,headers:qE},type:_E}],type:UE}],type:UE},{rules:[{conditions:[{[OE]:LE,[DE]:JE}],rules:[{conditions:[{[OE]:"aws.partition",[DE]:JE,assign:FE}],rules:[{conditions:[VE,WE,KE],endpoint:{url:"https://routes.geo.{Region}.{PartitionResult#dnsSuffix}/v2",properties:qE,headers:qE},type:_E},{conditions:[VE,zE,jE],endpoint:{url:"https://routes.geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",properties:qE,headers:qE},type:_E},{conditions:[VE,zE,KE],endpoint:{url:"https://routes.geo-fips.{Region}.{PartitionResult#dnsSuffix}/v2",properties:qE,headers:qE},type:_E},{conditions:[VE,WE,jE],endpoint:{url:"https://routes.geo.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",properties:qE,headers:qE},type:_E},{conditions:[QE,WE,KE],endpoint:{url:"https://routes.geo.{Region}.us-gov.{PartitionResult#dnsSuffix}/v2",properties:qE,headers:qE},type:_E},{conditions:[QE,zE,jE],endpoint:{url:"https://routes.geo-fips.{Region}.us-gov.{PartitionResult#dualStackDnsSuffix}/v2",properties:qE,headers:qE},type:_E},{conditions:[QE,zE,KE],endpoint:{url:"https://routes.geo-fips.{Region}.us-gov.{PartitionResult#dnsSuffix}/v2",properties:qE,headers:qE},type:_E},{conditions:[QE,WE,jE],endpoint:{url:"https://routes.geo.{Region}.us-gov.{PartitionResult#dualStackDnsSuffix}/v2",properties:qE,headers:qE},type:_E},{conditions:[zE,jE],rules:[{conditions:[{[OE]:kE,[DE]:[ME,ZE]},YE],rules:[{endpoint:{url:"https://geo-routes-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:qE,headers:qE},type:_E}],type:UE},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:NE}],type:UE},{conditions:[zE,KE],rules:[{conditions:[{[OE]:kE,[DE]:[ZE,ME]}],rules:[{endpoint:{url:"https://geo-routes-fips.{Region}.{PartitionResult#dnsSuffix}",properties:qE,headers:qE},type:_E}],type:UE},{error:"FIPS is enabled but this partition does not support FIPS",type:NE}],type:UE},{conditions:[WE,jE],rules:[{conditions:[YE],rules:[{endpoint:{url:"https://geo-routes.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:qE,headers:qE},type:_E}],type:UE},{error:"DualStack is enabled but this partition does not support DualStack",type:NE}],type:UE},{endpoint:{url:"https://geo-routes.{Region}.{PartitionResult#dnsSuffix}",properties:qE,headers:qE},type:_E}],type:UE}],type:UE},{error:"Invalid Configuration: Missing Region",type:NE}],type:UE}]},eC=new bt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),tC=(e,t={})=>eC.get(e,(()=>Yt(XE,{endpointParams:e,logger:t.logger})));xt.aws=rs;const nC=e=>{const t=Xi(e),n=()=>t().then(sr),r=(e=>({apiVersion:"2020-11-19",base64Decoder:e?.base64Decoder??O,base64Encoder:e?.base64Encoder??L,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??tC,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??PE,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new un}],logger:e?.logger??new ur,protocol:e?.protocol??Cr,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.georoutes",version:"2020-11-19",serviceTarget:"RoutesService"},serviceId:e?.serviceId??"Geo Routes",urlParser:e?.urlParser??tn,utf8Decoder:e?.utf8Decoder??D,utf8Encoder:e?.utf8Encoder??M}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qn,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Qi({serviceId:r.serviceId,clientVersion:IE}),maxAttempts:e?.maxAttempts??3,region:e?.region??Yi("Region is missing"),requestHandler:H.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||si),sha256:e?.sha256??Ki,streamCollector:e?.streamCollector??z,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(_r)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Ur))}};class rC extends Yn{config;constructor(...[e]){const r=nC(e||{});super(r),this.initConfig=r;var i;const s=Ct((i=r,Object.assign(i,{useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,defaultSigningName:"geo-routes"}))),o=yi(s),a=Br(o),c=((e,r)=>{const i=Object.assign(Os(e),or(e),t(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}})(e));return r.forEach((e=>e.configure(i))),Object.assign(e,Ds(i),ar(i),n(i),{httpAuthSchemes:(s=i).httpAuthSchemes(),httpAuthSchemeProvider:s.httpAuthSchemeProvider(),credentials:s.credentials()});var s})((e=>{const t=zn(e);return Object.assign(t,{authSchemePreference:g(e.authSchemePreference??[])})})(ri(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use(re(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(Ci(this.config)),this.middlewareStack.use(jr(this.config)),this.middlewareStack.use(u(this.config)),this.middlewareStack.use(d(this.config)),this.middlewareStack.use(h(this.config)),this.middlewareStack.use(S(this.config,{httpAuthSchemeParametersProvider:TE,identityProviderConfigProvider:async e=>new St({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(E(this.config))}destroy(){super.destroy()}}class iC extends rr{constructor(e){super(e),Object.setPrototypeOf(this,iC.prototype)}}class sC extends iC{name="AccessDeniedException";$fault="client";Message;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,sC.prototype),this.Message=e.Message}}class oC extends iC{name="InternalServerException";$fault="server";$retryable={};Message;constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,oC.prototype),this.Message=e.Message}}class aC extends iC{name="ThrottlingException";$fault="client";$retryable={};Message;constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),Object.setPrototypeOf(this,aC.prototype),this.Message=e.Message}}class cC extends iC{name="ValidationException";$fault="client";Message;Reason;FieldList;constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,cC.prototype),this.Message=e.Message,this.Reason=e.Reason,this.FieldList=e.FieldList}}const uC="Allow",lC="AvoidActionsForDistance",dC="AxleCount",pC="AccessHours",hC="ArrivalTime",fC="AppointmentTime",gC="AvoidUTurns",mC="Areas",yC="Arrival",SC="Avoid",RC="BoundingBox",wC="BestCaseDuration",vC="Circle",EC="ControlledAccessHighways",CC="CurrentRoad",bC="ContinueStepDetails",TC="CarShuttleTrains",PC="Category",AC="Car",IC="Corridor",xC="Code",OC="Connections",DC="Countries",$C="Country",MC="Currency",LC="Destination",kC="DepartNow",NC="DestinationOptions",_C="DayOfWeek",UC="DirtRoads",FC="DynamicSpeed",GC="DepartureTime",BC="Departure",HC="Distance",zC="Driver",jC="Duration",qC="Exclude",VC="ExitNumber",WC="EngineType",KC="Estimate",QC="Except",ZC="Ferries",YC="FunctionalClassification",JC="FlowEventThresholdOverride",XC="From",eb="GeometryOffset",tb="GrossWeight",nb="Geometry",rb="Heading",ib="HeightAboveFirstAxle",sb="HazardousCargos",ob="Height",ab="Hot",cb="Hov",ub="IsolineGeometryFormat",lb="Id",db="Impact",pb="Intersection",hb="Incidents",fb="Instruction",gb="Key",mb="KpraLength",yb="KeepStepDetails",Sb="LastCharacter",Rb="LegGeometryFormat",wb="LicensePlate",vb="LineString",Eb="Language",Cb="Length",bb="Message",Tb="MaxSpeed",Pb="Matching",Ab="Notices",Ib="NameHint",xb="NextRoad",Ob="Name",Db="Names",$b="Origin",Mb="OriginOptions",Lb="OriginalPosition",kb="OptimizeRoutingFor",Nb="OnRoadThreshold",_b="Occupancy",Ub="Options",Fb="Overview",Gb="Polyline",Bb="PricingBucket",Hb="PolylineCorridor",zb="PayloadCapacity",jb="PolylinePolygon",qb="PassThroughWaypoints",Vb="Pedestrian",Wb="Place",Kb="Polygon",Qb="Position",Zb="RoadAttributes",Yb="RoutingBoundary",Jb="RestDuration",Xb="RelativeExit",eT="RoundaboutEnterStepDetails",tT="RoundaboutExitStepDetails",nT="RouteMatrix",rT="RoadName",iT="RouteNumber",sT="RouteNumbers",oT="RoundaboutPassStepDetails",aT="RangeValue",cT="Radius",uT="Range",lT="Region",dT="Reason",pT="Strategy",hT="SeasonalClosure",fT="ServiceDuration",gT="SteeringDirection",mT="StopDuration",yT="SnappedGeometryFormat",ST="SpeedLimit",RT="SideOfStreet",wT="Scooter",vT="Signpost",ET="Speed",CT="Spans",bT="Summary",TT="TurnAngle",PT="TrailerCount",AT="TireCount",IT="TypicalDuration",xT="TravelDuration",OT="TurnIntensity",DT="TravelMode",$T="TravelModeOptions",MT="TravelOnly",LT="TimeOfDay",kT="TollRoads",NT="TunnelRestrictionCode",_T="TruckRoadType",UT="TruckRoadTypes",FT="TravelSteps",GT="TurnStepDetails",BT="TollSystems",HT="TollTransponders",zT="TruckType",jT="Time",qT="Title",VT="Tolls",WT="Traffic",KT="Trailer",QT="Truck",ZT="Tunnels",YT="Type",JT="Usage",XT="UTurns",eP="UseWith",tP="Value",nP="Waypoints",rP="WaitDuration",iP="WaypointIndex",sP="WeightPerAxle",oP="WeightPerAxleGroup",aP="Width",cP="Zones",uP="ZoneCategories",lP="client",dP="error",pP="http",hP="httpError",fP="httpHeader",gP="httpQuery",mP="jsonName",yP="key",SP="message",RP="smithy.ts.sdk.synthetic.com.amazonaws.georoutes",wP="x-amz-geo-pricing-bucket",vP="com.amazonaws.georoutes";var EP=[0,vP,"ApiKey",8,0],CP=[0,vP,"CountryCode",8,0],bP=[0,vP,"CountryCode3",8,0],TP=[0,vP,_C,8,0],PP=[0,vP,"DimensionCentimeters",8,1],AP=[0,vP,"DistanceMeters",8,1],IP=[0,vP,"DurationSeconds",8,1],xP=[0,vP,rb,8,1],OP=[0,vP,"IsolineEngineType",8,0],DP=[0,vP,"IsolineHazardousCargoType",8,0],$P=[0,vP,Gb,8,0],MP=[0,vP,"PolylineRing",8,0],LP=[0,vP,"RoadSnapHazardousCargoType",8,0],kP=[0,vP,"RoadSnapNoticeCode",8,0],NP=[0,vP,"RouteDirection",8,0],_P=[0,vP,"RouteEngineType",8,0],UP=[0,vP,"RouteFerryAfterTravelStepType",8,0],FP=[0,vP,"RouteFerryBeforeTravelStepType",8,0],GP=[0,vP,"RouteFerryTravelStepType",8,0],BP=[0,vP,"RouteHazardousCargoType",8,0],HP=[0,vP,"RouteLegAdditionalFeature",8,0],zP=[0,vP,"RouteLegTravelMode",8,0],jP=[0,vP,"RouteLegType",8,0],qP=[0,vP,"RouteMatrixHazardousCargoType",8,0],VP=[0,vP,"RouteMatrixTruckType",8,0],WP=[0,vP,"RouteMatrixZoneCategory",8,0],KP=[0,vP,"RoutePedestrianTravelStepType",8,0],QP=[0,vP,"RouteRoadType",8,0],ZP=[0,vP,"RouteSideOfStreet",8,0],YP=[0,vP,"RouteSpanCarAccessAttribute",8,0],JP=[0,vP,"RouteSpanGateAttribute",8,0],XP=[0,vP,"RouteSpanPedestrianAccessAttribute",8,0],eA=[0,vP,"RouteSpanRailwayCrossingAttribute",8,0],tA=[0,vP,"RouteSpanRoadAttribute",8,0],nA=[0,vP,"RouteSpanScooterAccessAttribute",8,0],rA=[0,vP,"RouteSpanTruckAccessAttribute",8,0],iA=[0,vP,"RouteSteeringDirection",8,0],sA=[0,vP,"RouteTollPassValidityPeriodType",8,0],oA=[0,vP,"RouteTollPaymentMethod",8,0],aA=[0,vP,"RouteTollVehicleCategory",8,0],cA=[0,vP,"RouteTruckType",8,0],uA=[0,vP,"RouteTurnIntensity",8,0],lA=[0,vP,"RouteVehicleIncidentSeverity",8,0],dA=[0,vP,"RouteVehicleIncidentType",8,0],pA=[0,vP,"RouteVehicleTravelStepType",8,0],hA=[0,vP,"RouteZoneCategory",8,0],fA=[0,vP,"SensitiveBoolean",8,2],gA=[0,vP,"SensitiveDouble",8,1],mA=[0,vP,"SensitiveInteger",8,1],yA=[0,vP,"SensitiveString",8,0],SA=[0,vP,"SpeedKilometersPerHour",8,1],RA=[0,vP,LT,8,0],wA=[0,vP,"TimestampWithTimezoneOffset",8,0],vA=[0,vP,_T,8,0],EA=[0,vP,NT,8,0],CA=[0,vP,"WaypointOptimizationClusteringAlgorithm",8,0],bA=[0,vP,"WaypointOptimizationConstraint",8,0],TA=[0,vP,"WaypointOptimizationHazardousCargoType",8,0],PA=[0,vP,"WaypointOptimizationServiceTimeTreatment",8,0],AA=[0,vP,"WaypointOptimizationTruckType",8,0],IA=[0,vP,"WeightKilograms",8,1],xA=[-3,vP,"AccessDeniedException",{[dP]:lP,[hP]:403},[bb],[[0,{[mP]:SP}]],1];le.for(vP).registerError(xA,sC);var OA=[3,vP,"CalculateIsolinesRequest",0,["Thresholds",uC,hC,SC,kC,GC,LC,NC,ub,"IsolineGranularity",gb,"OptimizeIsolineFor",kb,$b,Mb,WT,DT,$T],[[()=>tI,0],[()=>GA,0],[()=>wA,0],[()=>zA,0],[()=>fA,0],[()=>wA,0],[()=>bD,0],[()=>KA,0],0,[()=>QA,0],[()=>EP,{[gP]:yP}],0,0,[()=>bD,0],[()=>YA,0],[()=>nI,0],0,[()=>iI,0]],1],DA=[3,vP,"CalculateIsolinesResponse",0,[ub,"Isolines",Bb,hC,GC,"SnappedDestination","SnappedOrigin"],[0,[()=>yD,0],[0,{[fP]:wP}],[()=>wA,0],[()=>wA,0],[()=>bD,0],[()=>bD,0]],3],$A=[3,vP,"CalculateRouteMatrixRequest",0,["Destinations","Origins",Yb,uC,SC,kC,GC,qC,gb,kb,WT,DT,$T],[[()=>KD,0],[()=>ZD,0],[()=>rx,0],[()=>YI,0],[()=>tx,0],[()=>fA,0],[()=>wA,0],[()=>ux,0],[()=>EP,{[gP]:yP}],0,[()=>gx,0],0,[()=>yx,0]],3],MA=[3,vP,"CalculateRouteMatrixResponse",0,["ErrorCount",Bb,nT,Yb],[1,[0,{[fP]:wP}],[()=>qD,0],[()=>rx,0]],4],LA=[3,vP,"CalculateRoutesRequest",0,[LC,$b,uC,hC,SC,kC,GC,NC,zC,qC,"InstructionsMeasurementSystem",gb,"Languages","LegAdditionalFeatures",Rb,"MaxAlternatives",kb,Mb,"SpanAdditionalFeatures",VT,WT,DT,$T,"TravelStepType",nP],[[()=>bD,0],[()=>bD,0],[()=>RI,0],[()=>wA,0],[()=>EI,0],[()=>fA,0],[()=>wA,0],[()=>AI,0],[()=>II,0],[()=>$I,0],0,[()=>EP,{[gP]:yP}],64,[()=>BD,0],0,1,0,[()=>Ex,0],64,[()=>Zx,0],[()=>oO,0],0,[()=>uO,0],0,[()=>v$,0]],2],kA=[3,vP,"CalculateRoutesResponse",0,[Rb,Ab,Bb,"Routes"],[0,()=>r$,[0,{[fP]:wP}],[()=>zD,0]],4],NA=[3,vP,vC,8,["Center",cT],[[()=>bD,0],[()=>gA,0]],2],_A=[3,vP,IC,8,[vb,cT],[[()=>vD,0],1],2],UA=[-3,vP,"InternalServerException",{[dP]:"server",[hP]:500},[bb],[[0,{[mP]:SP}]],1];le.for(vP).registerError(UA,oC);var FA=[3,vP,"Isoline",0,[OC,"Geometries","DistanceThreshold","TimeThreshold"],[[()=>gD,0],[()=>SD,0],[()=>AP,0],[()=>IP,0]],2],GA=[3,vP,"IsolineAllowOptions",0,[ab,cb],[[()=>fA,0],[()=>fA,0]]],BA=[3,vP,"IsolineAvoidanceArea",0,[nb,QC],[[()=>HA,0],[()=>pD,0]],1],HA=[3,vP,"IsolineAvoidanceAreaGeometry",0,[RC,IC,Kb,Hb,jb],[[()=>uD,0],[()=>_A,0],[()=>wD,0],[()=>lI,0],[()=>CD,0]]],zA=[3,vP,"IsolineAvoidanceOptions",0,[mC,TC,EC,UC,ZC,hT,kT,HT,UT,ZT,XT,uP],[[()=>hD,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>b$,0],[()=>fA,0],[()=>fA,0],()=>fD]],jA=[3,vP,"IsolineAvoidanceZoneCategory",0,[PC],[0]],qA=[3,vP,"IsolineCarOptions",0,[WC,wb,Tb,_b],[[()=>OP,0],[()=>oI,0],[()=>SA,0],[()=>mA,0]]],VA=[3,vP,"IsolineConnection",0,["FromPolygonIndex",nb,"ToPolygonIndex"],[1,[()=>WA,0],1],3],WA=[3,vP,"IsolineConnectionGeometry",0,[vb,Gb],[[()=>vD,0],[()=>$P,0]]],KA=[3,vP,"IsolineDestinationOptions",0,[lC,rb,Pb,RT],[[()=>AP,0],[()=>xP,0],[()=>ZA,0],[()=>eI,0]]],QA=[3,vP,"IsolineGranularityOptions",0,["MaxPoints","MaxResolution"],[1,[()=>AP,0]]],ZA=[3,vP,"IsolineMatchingOptions",0,[Ib,Nb,cT,pT],[[()=>yA,0],[()=>AP,0],[()=>AP,0],0]],YA=[3,vP,"IsolineOriginOptions",0,[lC,rb,Pb,RT],[[()=>AP,0],[()=>xP,0],[()=>ZA,0],[()=>eI,0]]],JA=[3,vP,"IsolineScooterOptions",0,[WC,wb,Tb,_b],[[()=>OP,0],[()=>oI,0],[()=>SA,0],[()=>mA,0]]],XA=[3,vP,"IsolineShapeGeometry",0,[Kb,jb],[[()=>wD,0],[()=>CD,0]]],eI=[3,vP,"IsolineSideOfStreetOptions",0,[Qb,eP],[[()=>bD,0],0],1],tI=[3,vP,"IsolineThresholds",0,[HC,jT],[[()=>dD,0],[()=>C$,0]]],nI=[3,vP,"IsolineTrafficOptions",0,[JC,JT],[[()=>IP,0],0]],rI=[3,vP,"IsolineTrailerOptions",0,[dC,PT],[[()=>mA,0],[()=>mA,0]]],iI=[3,vP,"IsolineTravelModeOptions",0,[AC,wT,QT],[[()=>qA,0],[()=>JA,0],[()=>sI,0]]],sI=[3,vP,"IsolineTruckOptions",0,[dC,WC,tb,sb,ob,ib,mb,Cb,wb,Tb,_b,zb,AT,KT,zT,NT,sP,oP,aP],[[()=>mA,0],[()=>OP,0],[()=>IA,0],[()=>mD,0],[()=>PP,0],[()=>PP,0],[()=>PP,0],[()=>PP,0],[()=>oI,0],[()=>SA,0],[()=>mA,0],[()=>IA,0],[()=>mA,0],[()=>rI,0],0,[()=>EA,0],[()=>IA,0],[()=>aD,0],[()=>PP,0]]],oI=[3,vP,"IsolineVehicleLicensePlate",8,[Sb],[0]],aI=[3,vP,"LocalizedString",0,[tP,Eb],[[()=>yA,0],0],1],cI=[3,vP,"OptimizeWaypointsRequest",0,[$b,SC,"Clustering",GC,LC,NC,zC,qC,gb,"OptimizeSequencingFor",Mb,WT,DT,$T,nP],[[()=>bD,0],[()=>FO,0],[()=>GO,0],[()=>wA,0],[()=>bD,0],[()=>HO,0],[()=>zO,0],[()=>qO,0],[()=>EP,{[gP]:yP}],0,()=>QO,()=>nD,0,[()=>iD,0],[()=>$$,0]],1],uI=[3,vP,"OptimizeWaypointsResponse",0,[OC,HC,jC,"ImpedingWaypoints","OptimizedWaypoints",Bb,"TimeBreakdown"],[[()=>A$,0],[()=>AP,0],[()=>IP,0],[()=>O$,0],[()=>D$,0],[0,{[fP]:wP}],[()=>tD,0]],7],lI=[3,vP,Hb,8,[Gb,cT],[[()=>$P,0],1],2],dI=[3,vP,"RoadSnapNotice",0,[xC,qT,"TracePointIndexes"],[[()=>kP,0],[()=>yA,0],[()=>xD,0]],3],pI=[3,vP,"RoadSnapSnappedGeometry",0,[vb,Gb],[[()=>vD,0],[()=>$P,0]]],hI=[3,vP,"RoadSnapSnappedTracePoint",0,["Confidence",Lb,"SnappedPosition"],[[()=>gA,0],[()=>bD,0],[()=>bD,0]],3],fI=[3,vP,"RoadSnapTracePoint",0,[Qb,rb,ET,"Timestamp"],[[()=>bD,0],[()=>xP,0],[()=>SA,0],[()=>wA,0]],1],gI=[3,vP,"RoadSnapTrailerOptions",0,[PT],[[()=>mA,0]]],mI=[3,vP,"RoadSnapTravelModeOptions",0,[QT],[[()=>yI,0]]],yI=[3,vP,"RoadSnapTruckOptions",0,[tb,sb,ob,Cb,KT,NT,aP],[[()=>IA,0],[()=>PD,0],[()=>PP,0],[()=>PP,0],[()=>gI,0],[()=>EA,0],[()=>PP,0]]],SI=[3,vP,"Route",0,["Legs","MajorRoadLabels",bT],[[()=>HD,0],[()=>jD,0],[()=>Kx,0]],2],RI=[3,vP,"RouteAllowOptions",0,[ab,cb],[[()=>fA,0],[()=>fA,0]]],wI=[3,vP,"RouteAvoidanceArea",0,[nb,QC],[[()=>vI,0],[()=>DD,0]],1],vI=[3,vP,"RouteAvoidanceAreaGeometry",0,[IC,RC,Kb,Hb,jb],[[()=>_A,0],[()=>uD,0],[()=>wD,0],[()=>lI,0],[()=>CD,0]]],EI=[3,vP,"RouteAvoidanceOptions",0,[mC,TC,EC,UC,ZC,hT,kT,HT,UT,ZT,XT,uP],[[()=>$D,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>b$,0],[()=>fA,0],[()=>fA,0],[()=>MD,0]]],CI=[3,vP,"RouteAvoidanceZoneCategory",0,[PC],[[()=>hA,0]],1],bI=[3,vP,"RouteCarOptions",0,[WC,wb,Tb,_b],[[()=>_P,0],[()=>yO,0],[()=>SA,0],[()=>mA,0]]],TI=[3,vP,"RouteContinueHighwayStepDetails",0,[pb,gT,TT,OT],[[()=>ED,0],[()=>iA,0],1,[()=>uA,0]],1],PI=[3,vP,"RouteContinueStepDetails",0,[pb],[[()=>ED,0]],1],AI=[3,vP,"RouteDestinationOptions",0,[lC,gC,rb,Pb,RT,mT],[[()=>AP,0],[()=>fA,0],[()=>xP,0],[()=>ZI,0],[()=>zx,0],[()=>IP,0]]],II=[3,vP,"RouteDriverOptions",0,["Schedule"],[[()=>LD,0]]],xI=[3,vP,"RouteDriverScheduleInterval",0,["DriveDuration",Jb],[[()=>IP,0],[()=>IP,0]],2],OI=[3,vP,"RouteEmissionType",0,[YT,"Co2EmissionClass"],[[()=>yA,0],[()=>yA,0]],1],DI=[3,vP,"RouteEnterHighwayStepDetails",0,[pb,gT,TT,OT],[[()=>ED,0],[()=>iA,0],1,[()=>uA,0]],1],$I=[3,vP,"RouteExclusionOptions",0,[DC],[[()=>lD,0]],1],MI=[3,vP,"RouteExitStepDetails",0,[pb,Xb,gT,TT,OT],[[()=>ED,0],[()=>mA,0],[()=>iA,0],1,[()=>uA,0]],1],LI=[3,vP,"RouteFerryAfterTravelStep",0,[jC,YT,fb],[[()=>IP,0],[()=>UP,0],[()=>yA,0]],2],kI=[3,vP,"RouteFerryArrival",0,[Wb,jT],[[()=>BI,0],[()=>wA,0]],1],NI=[3,vP,"RouteFerryBeforeTravelStep",0,[jC,YT,fb],[[()=>IP,0],[()=>FP,0],[()=>yA,0]],2],_I=[3,vP,"RouteFerryDeparture",0,[Wb,jT],[[()=>BI,0],[()=>wA,0]],1],UI=[3,vP,"RouteFerryLegDetails",0,["AfterTravelSteps",yC,"BeforeTravelSteps",BC,Ab,qb,CT,FT,"RouteName",bT],[[()=>kD,0],[()=>kI,0],[()=>ND,0],[()=>_I,0],()=>_D,[()=>XD,0],[()=>UD,0],[()=>FD,0],[()=>yA,0],[()=>zI,0]],8],FI=[3,vP,"RouteFerryNotice",0,[xC,db],[0,0],1],GI=[3,vP,"RouteFerryOverviewSummary",0,[HC,jC],[[()=>AP,0],[()=>IP,0]],2],BI=[3,vP,"RouteFerryPlace",0,[Qb,Ob,Lb,iP],[[()=>TD,0],[()=>yA,0],[()=>TD,0],[()=>mA,0]],1],HI=[3,vP,"RouteFerrySpan",0,[$C,HC,jC,eb,Db,lT],[[()=>bP,0],[()=>AP,0],[()=>IP,0],1,[()=>ED,0],[()=>yA,0]]],zI=[3,vP,"RouteFerrySummary",0,[Fb,MT],[[()=>GI,0],[()=>jI,0]]],jI=[3,vP,"RouteFerryTravelOnlySummary",0,[jC],[[()=>IP,0]],1],qI=[3,vP,"RouteFerryTravelStep",0,[jC,YT,HC,eb,fb],[[()=>IP,0],[()=>GP,0],[()=>AP,0],1,[()=>yA,0]],2],VI=[3,vP,"RouteKeepStepDetails",0,[pb,gT,TT,OT],[[()=>ED,0],[()=>iA,0],1,[()=>uA,0]],1],WI=[3,vP,"RouteLeg",0,[nb,DT,YT,"FerryLegDetails",Eb,"PedestrianLegDetails","VehicleLegDetails"],[[()=>KI,0],[()=>zP,0],[()=>jP,0],[()=>UI,0],0,[()=>Ax,0],[()=>mO,0]],3],KI=[3,vP,"RouteLegGeometry",0,[vb,Gb],[[()=>vD,0],[()=>$P,0]]],QI=[3,vP,"RouteMajorRoadLabel",0,[rT,iT],[[()=>aI,0],[()=>vx,0]]],ZI=[3,vP,"RouteMatchingOptions",0,[Ib,Nb,cT,pT],[[()=>yA,0],[()=>AP,0],[()=>AP,0],0]],YI=[3,vP,"RouteMatrixAllowOptions",8,[ab,cb],[[()=>fA,0],[()=>fA,0]]],JI=[3,vP,"RouteMatrixAutoCircle",0,["Margin","MaxRadius"],[[()=>AP,0],[()=>AP,0]]],XI=[3,vP,"RouteMatrixAvoidanceArea",0,[nb],[[()=>ex,0]],1],ex=[3,vP,"RouteMatrixAvoidanceAreaGeometry",0,[RC,Kb,jb],[[()=>uD,0],[()=>wD,0],[()=>CD,0]]],tx=[3,vP,"RouteMatrixAvoidanceOptions",0,[mC,TC,EC,UC,ZC,kT,HT,UT,ZT,XT,uP],[[()=>VD,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>b$,0],[()=>fA,0],[()=>fA,0],[()=>WD,0]]],nx=[3,vP,"RouteMatrixAvoidanceZoneCategory",0,[PC],[[()=>WP,0]]],rx=[3,vP,"RouteMatrixBoundary",0,[nb,"Unbounded"],[[()=>ix,0],[()=>fA,0]]],ix=[3,vP,"RouteMatrixBoundaryGeometry",0,["AutoCircle",vC,RC,Kb],[[()=>JI,0],[()=>NA,0],[()=>uD,0],[()=>wD,0]]],sx=[3,vP,"RouteMatrixCarOptions",0,[wb,Tb,_b],[[()=>Rx,0],[()=>SA,0],[()=>mA,0]]],ox=[3,vP,"RouteMatrixDestination",0,[Qb,Ub],[[()=>bD,0],[()=>ax,0]],1],ax=[3,vP,"RouteMatrixDestinationOptions",0,[lC,rb,Pb,RT],[[()=>AP,0],[()=>xP,0],[()=>lx,0],[()=>fx,0]]],cx=[3,vP,"RouteMatrixEntry",0,[HC,jC,"Error"],[[()=>AP,0],[()=>IP,0],0],2],ux=[3,vP,"RouteMatrixExclusionOptions",0,[DC],[[()=>lD,0]],1],lx=[3,vP,"RouteMatrixMatchingOptions",0,[Ib,Nb,cT,pT],[[()=>yA,0],[()=>AP,0],[()=>AP,0],0]],dx=[3,vP,"RouteMatrixOrigin",0,[Qb,Ub],[[()=>bD,0],[()=>px,0]],1],px=[3,vP,"RouteMatrixOriginOptions",0,[lC,rb,Pb,RT],[[()=>AP,0],[()=>xP,0],[()=>lx,0],[()=>fx,0]]],hx=[3,vP,"RouteMatrixScooterOptions",0,[wb,Tb,_b],[[()=>Rx,0],[()=>SA,0],[()=>mA,0]]],fx=[3,vP,"RouteMatrixSideOfStreetOptions",0,[Qb,eP],[[()=>bD,0],0],1],gx=[3,vP,"RouteMatrixTrafficOptions",0,[JC,JT],[[()=>IP,0],0]],mx=[3,vP,"RouteMatrixTrailerOptions",0,[PT],[[()=>mA,0]]],yx=[3,vP,"RouteMatrixTravelModeOptions",0,[AC,wT,QT],[[()=>sx,0],[()=>hx,0],[()=>Sx,0]]],Sx=[3,vP,"RouteMatrixTruckOptions",0,[dC,tb,sb,ob,mb,Cb,wb,Tb,_b,zb,KT,zT,NT,sP,oP,aP],[[()=>mA,0],[()=>IA,0],[()=>QD,0],[()=>PP,0],[()=>PP,0],[()=>PP,0],[()=>Rx,0],[()=>SA,0],[()=>mA,0],[()=>IA,0],[()=>mx,0],[()=>VP,0],[()=>EA,0],[()=>IA,0],[()=>aD,0],[()=>PP,0]]],Rx=[3,vP,"RouteMatrixVehicleLicensePlate",8,[Sb],[0]],wx=[3,vP,"RouteNoticeDetailRange",0,["Min","Max"],[1,1]],vx=[3,vP,iT,0,[tP,"Direction",Eb],[[()=>yA,0],[()=>NP,0],0],1],Ex=[3,vP,"RouteOriginOptions",0,[lC,gC,rb,Pb,RT],[[()=>AP,0],[()=>fA,0],[()=>xP,0],[()=>ZI,0],[()=>zx,0]]],Cx=[3,vP,"RoutePassThroughPlace",0,[Qb,Lb,iP],[[()=>TD,0],[()=>TD,0],[()=>mA,0]],1],bx=[3,vP,"RoutePassThroughWaypoint",0,[Wb,eb],[[()=>Cx,0],1],1],Tx=[3,vP,"RoutePedestrianArrival",0,[Wb,jT],[[()=>Dx,0],[()=>wA,0]],1],Px=[3,vP,"RoutePedestrianDeparture",0,[Wb,jT],[[()=>Dx,0],[()=>wA,0]],1],Ax=[3,vP,"RoutePedestrianLegDetails",0,[yC,BC,Ab,qb,CT,FT,bT],[[()=>Tx,0],[()=>Px,0],()=>e$,[()=>XD,0],[()=>t$,0],[()=>n$,0],[()=>Mx,0]],6],Ix=[3,vP,"RoutePedestrianNotice",0,[xC,db],[0,0],1],xx=[3,vP,"RoutePedestrianOptions",0,[ET],[[()=>SA,0]]],Ox=[3,vP,"RoutePedestrianOverviewSummary",0,[HC,jC],[[()=>AP,0],[()=>IP,0]],2],Dx=[3,vP,"RoutePedestrianPlace",0,[Qb,Ob,Lb,RT,iP],[[()=>TD,0],[()=>yA,0],[()=>TD,0],[()=>ZP,0],[()=>mA,0]],1],$x=[3,vP,"RoutePedestrianSpan",0,[wC,$C,HC,jC,FC,YC,eb,hb,Db,"PedestrianAccess",lT,Zb,sT,ST,IT],[[()=>IP,0],[()=>bP,0],[()=>AP,0],[()=>IP,0],[()=>Vx,0],[()=>mA,0],1,65,[()=>ED,0],[()=>o$,0],[()=>yA,0],[()=>a$,0],[()=>JD,0],[()=>Wx,0],[()=>IP,0]]],Mx=[3,vP,"RoutePedestrianSummary",0,[Fb,MT],[[()=>Ox,0],[()=>Lx,0]]],Lx=[3,vP,"RoutePedestrianTravelOnlySummary",0,[jC],[[()=>IP,0]],1],kx=[3,vP,"RoutePedestrianTravelStep",0,[jC,YT,bC,CC,HC,VC,eb,fb,yb,xb,eT,tT,oT,vT,GT],[[()=>IP,0],[()=>KP,0],[()=>PI,0],[()=>Ux,0],[()=>AP,0],[()=>ED,0],1,[()=>yA,0],[()=>VI,0],[()=>Ux,0],[()=>Fx,0],[()=>Gx,0],[()=>Bx,0],[()=>jx,0],[()=>dO,0]],2],Nx=[3,vP,"RouteRampStepDetails",0,[pb,gT,TT,OT],[[()=>ED,0],[()=>iA,0],1,[()=>uA,0]],1],_x=[3,vP,"RouteResponseNotice",0,[xC,db],[0,0],1],Ux=[3,vP,"RouteRoad",0,[rT,iT,"Towards",YT],[[()=>ED,0],[()=>JD,0],[()=>ED,0],[()=>QP,0]],3],Fx=[3,vP,"RouteRoundaboutEnterStepDetails",0,[pb,gT,TT,OT],[[()=>ED,0],[()=>iA,0],1,[()=>uA,0]],1],Gx=[3,vP,"RouteRoundaboutExitStepDetails",0,[pb,Xb,"RoundaboutAngle",gT],[[()=>ED,0],[()=>mA,0],1,[()=>iA,0]],1],Bx=[3,vP,"RouteRoundaboutPassStepDetails",0,[pb,gT,TT,OT],[[()=>ED,0],[()=>iA,0],1,[()=>uA,0]],1],Hx=[3,vP,"RouteScooterOptions",0,[WC,wb,Tb,_b],[[()=>_P,0],[()=>yO,0],[()=>SA,0],[()=>mA,0]]],zx=[3,vP,"RouteSideOfStreetOptions",0,[Qb,eP],[[()=>bD,0],0],1],jx=[3,vP,"RouteSignpost",0,["Labels"],[[()=>i$,0]],1],qx=[3,vP,"RouteSignpostLabel",0,[iT,"Text"],[[()=>vx,0],[()=>aI,0]]],Vx=[3,vP,"RouteSpanDynamicSpeedDetails",0,["BestCaseSpeed","TurnDuration","TypicalSpeed"],[[()=>SA,0],[()=>IP,0],[()=>SA,0]]],Wx=[3,vP,"RouteSpanSpeedLimitDetails",0,[Tb,"Unlimited"],[[()=>SA,0],[()=>fA,0]]],Kx=[3,vP,"RouteSummary",0,[HC,jC,VT],[[()=>AP,0],[()=>IP,0],[()=>iO,0]]],Qx=[3,vP,"RouteToll",0,["PaymentSites","Rates","Systems",$C],[[()=>p$,0],[()=>h$,0],65,[()=>bP,0]],3],Zx=[3,vP,"RouteTollOptions",0,["AllTransponders","AllVignettes",MC,"EmissionType","VehicleCategory"],[[()=>fA,0],[()=>fA,0],0,[()=>OI,0],[()=>aA,0]]],Yx=[3,vP,"RouteTollPass",0,["IncludesReturnTrip","SeniorPass","TransferCount","TripCount","ValidityPeriod"],[[()=>fA,0],[()=>fA,0],[()=>mA,0],[()=>mA,0],[()=>Jx,0]]],Jx=[3,vP,"RouteTollPassValidityPeriod",0,["Period","PeriodCount"],[[()=>sA,0],[()=>mA,0]],1],Xx=[3,vP,"RouteTollPaymentSite",0,[Qb,Ob],[[()=>TD,0],0],1],eO=[3,vP,"RouteTollPrice",0,[MC,KC,uT,tP,"PerDuration",aT],[0,[()=>fA,0],[()=>fA,0],[()=>gA,0],[()=>IP,0],[()=>nO,0]],4],tO=[3,vP,"RouteTollPriceSummary",0,[MC,KC,uT,tP,aT],[0,[()=>fA,0],[()=>fA,0],[()=>gA,0],[()=>nO,0]],4],nO=[3,vP,"RouteTollPriceValueRange",0,["Min","Max"],[[()=>gA,0],[()=>gA,0]],2],rO=[3,vP,"RouteTollRate",0,[lb,"LocalPrice",Ob,"PaymentMethods","Transponders","ApplicableTimes","ConvertedPrice","Pass"],[[()=>yA,0],[()=>eO,0],[()=>yA,0],[()=>d$,0],[()=>g$,0],[()=>yA,0],[()=>eO,0],[()=>Yx,0]],5],iO=[3,vP,"RouteTollSummary",0,["Total"],[[()=>tO,0]]],sO=[3,vP,"RouteTollSystem",0,[Ob],[[()=>yA,0]]],oO=[3,vP,"RouteTrafficOptions",0,[JC,JT],[[()=>IP,0],0]],aO=[3,vP,"RouteTrailerOptions",0,[dC,PT],[[()=>mA,0],[()=>mA,0]]],cO=[3,vP,"RouteTransponder",0,["SystemName"],[[()=>yA,0]]],uO=[3,vP,"RouteTravelModeOptions",0,[AC,Vb,wT,QT],[[()=>bI,0],[()=>xx,0],[()=>Hx,0],[()=>lO,0]]],lO=[3,vP,"RouteTruckOptions",0,[dC,WC,tb,sb,ob,ib,mb,Cb,wb,Tb,_b,zb,AT,KT,zT,NT,sP,oP,aP],[[()=>mA,0],[()=>_P,0],[()=>IA,0],[()=>GD,0],[()=>PP,0],[()=>PP,0],[()=>PP,0],[()=>PP,0],[()=>yO,0],[()=>SA,0],[()=>mA,0],[()=>IA,0],[()=>mA,0],[()=>aO,0],[()=>cA,0],[()=>EA,0],[()=>IA,0],[()=>aD,0],[()=>PP,0]]],dO=[3,vP,"RouteTurnStepDetails",0,[pb,gT,TT,OT],[[()=>ED,0],[()=>iA,0],1,[()=>uA,0]],1],pO=[3,vP,"RouteUTurnStepDetails",0,[pb,gT,TT,OT],[[()=>ED,0],[()=>iA,0],1,[()=>uA,0]],1],hO=[3,vP,"RouteVehicleArrival",0,[Wb,jT],[[()=>vO,0],[()=>wA,0]],1],fO=[3,vP,"RouteVehicleDeparture",0,[Wb,jT],[[()=>vO,0],[()=>wA,0]],1],gO=[3,vP,"RouteVehicleIncident",0,["Description","EndTime","Severity","StartTime",YT],[[()=>yA,0],[()=>wA,0],[()=>lA,0],[()=>wA,0],[()=>dA,0]]],mO=[3,vP,"RouteVehicleLegDetails",0,[yC,BC,hb,Ab,qb,CT,VT,BT,FT,UT,cP,bT],[[()=>hO,0],[()=>fO,0],[()=>m$,0],[()=>S$,0],[()=>XD,0],[()=>R$,0],[()=>l$,0],[()=>f$,0],[()=>w$,0],[()=>b$,0],[()=>E$,0],[()=>CO,0]],11],yO=[3,vP,"RouteVehicleLicensePlate",0,[Sb],[[()=>yA,0]]],SO=[3,vP,"RouteVehicleNotice",0,[xC,"Details",db],[0,[()=>y$,0],0],2],RO=[3,vP,"RouteVehicleNoticeDetail",0,[qT,"ViolatedConstraints"],[[()=>yA,0],[()=>PO,0]]],wO=[3,vP,"RouteVehicleOverviewSummary",0,[HC,jC,wC,IT],[[()=>AP,0],[()=>IP,0],[()=>IP,0],[()=>IP,0]],2],vO=[3,vP,"RouteVehiclePlace",0,[Qb,Ob,Lb,RT,iP],[[()=>TD,0],[()=>yA,0],[()=>TD,0],[()=>ZP,0],[()=>mA,0]],1],EO=[3,vP,"RouteVehicleSpan",0,[wC,"CarAccess",$C,HC,jC,FC,YC,"Gate",eb,hb,Db,Ab,"RailwayCrossing",lT,Zb,sT,"ScooterAccess",ST,BT,"TruckAccess",UT,IT,cP],[[()=>IP,0],[()=>s$,0],[()=>bP,0],[()=>AP,0],[()=>IP,0],[()=>Vx,0],[()=>mA,0],[()=>JP,0],1,65,[()=>ED,0],65,[()=>eA,0],[()=>yA,0],[()=>a$,0],[()=>JD,0],[()=>c$,0],[()=>Wx,0],65,[()=>u$,0],65,[()=>IP,0],65]],CO=[3,vP,"RouteVehicleSummary",0,[Fb,MT],[[()=>wO,0],[()=>bO,0]]],bO=[3,vP,"RouteVehicleTravelOnlySummary",0,[jC,wC,IT],[[()=>IP,0],[()=>IP,0],[()=>IP,0]],1],TO=[3,vP,"RouteVehicleTravelStep",0,[jC,YT,"ContinueHighwayStepDetails",bC,CC,HC,"EnterHighwayStepDetails",VC,"ExitStepDetails",eb,fb,yb,xb,"RampStepDetails",eT,tT,oT,vT,GT,"UTurnStepDetails"],[[()=>IP,0],[()=>pA,0],[()=>TI,0],[()=>PI,0],[()=>Ux,0],[()=>AP,0],[()=>DI,0],[()=>ED,0],[()=>MI,0],1,[()=>yA,0],[()=>VI,0],[()=>Ux,0],[()=>Nx,0],[()=>Fx,0],[()=>Gx,0],[()=>Bx,0],[()=>jx,0],[()=>dO,0],[()=>pO,0]],2],PO=[3,vP,"RouteViolatedConstraints",0,[sb,"AllHazardsRestricted",dC,"MaxHeight","MaxKpraLength","MaxLength","MaxPayloadCapacity","MaxWeight","MaxWeightPerAxle","MaxWeightPerAxleGroup","MaxWidth",_b,"RestrictedTimes","TimeDependent",PT,DT,_T,zT,NT],[[()=>GD,0],[()=>fA,0],()=>wx,[()=>PP,0],[()=>PP,0],[()=>PP,0],[()=>IA,0],[()=>IO,0],[()=>IA,0],[()=>aD,0],[()=>PP,0],()=>wx,0,[()=>fA,0],()=>wx,[()=>fA,0],0,[()=>cA,0],[()=>EA,0]],1],AO=[3,vP,"RouteWaypoint",0,[Qb,lC,gC,rb,Pb,"PassThrough",RT,mT],[[()=>bD,0],[()=>AP,0],[()=>fA,0],[()=>xP,0],[()=>ZI,0],[()=>fA,0],[()=>zx,0],[()=>IP,0]],1],IO=[3,vP,"RouteWeightConstraint",0,[YT,tP],[0,[()=>IA,0]],2],xO=[3,vP,"RouteZone",0,[PC,Ob],[[()=>hA,0],[()=>yA,0]]],OO=[3,vP,"SnapToRoadsRequest",0,["TracePoints",gb,yT,"SnapRadius",DT,$T],[[()=>OD,0],[()=>EP,{[gP]:yP}],0,[()=>AP,0],0,[()=>mI,0]],1],DO=[3,vP,"SnapToRoadsResponse",0,[Ab,Bb,yT,"SnappedTracePoints","SnappedGeometry"],[[()=>AD,0],[0,{[fP]:wP}],0,[()=>ID,0],[()=>pI,0]],4],$O=[-3,vP,"ThrottlingException",{[dP]:lP,[hP]:429},[bb],[[0,{[mP]:SP}]],1];le.for(vP).registerError($O,aC);var MO=[-3,vP,"ValidationException",{[dP]:lP,[hP]:400},[bb,dT,"FieldList"],[[0,{[mP]:SP}],[0,{[mP]:"reason"}],[()=>T$,{[mP]:"fieldList"}]],3];le.for(vP).registerError(MO,cC);var LO=[3,vP,"ValidationExceptionField",0,[Ob,bb],[[0,{[mP]:"name"}],[0,{[mP]:SP}]],2],kO=[3,vP,"WaypointOptimizationAccessHours",0,[XC,"To"],[[()=>NO,0],[()=>NO,0]],2],NO=[3,vP,"WaypointOptimizationAccessHoursEntry",0,[_C,LT],[[()=>TP,0],[()=>RA,0]],2],_O=[3,vP,"WaypointOptimizationAvoidanceArea",0,[nb],[[()=>UO,0]],1],UO=[3,vP,"WaypointOptimizationAvoidanceAreaGeometry",0,[RC],[[()=>uD,0]]],FO=[3,vP,"WaypointOptimizationAvoidanceOptions",0,[mC,TC,EC,UC,ZC,kT,ZT,XT],[[()=>P$,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0]]],GO=[3,vP,"WaypointOptimizationClusteringOptions",0,["Algorithm","DrivingDistanceOptions"],[[()=>CA,0],[()=>jO,0]],1],BO=[3,vP,"WaypointOptimizationConnection",0,[HC,XC,Jb,"To",xT,rP],[[()=>AP,0],0,[()=>IP,0],0,[()=>IP,0],[()=>IP,0]],6],HO=[3,vP,"WaypointOptimizationDestinationOptions",0,[pC,fC,rb,lb,fT,RT],[[()=>kO,0],[()=>wA,0],[()=>xP,0],0,[()=>IP,0],[()=>eD,0]]],zO=[3,vP,"WaypointOptimizationDriverOptions",0,["RestCycles","RestProfile","TreatServiceTimeAs"],[[()=>JO,0],[()=>XO,0],[()=>PA,0]]],jO=[3,vP,"WaypointOptimizationDrivingDistanceOptions",0,["DrivingDistance"],[[()=>AP,0]],1],qO=[3,vP,"WaypointOptimizationExclusionOptions",0,[DC],[[()=>lD,0]],1],VO=[3,vP,"WaypointOptimizationFailedConstraint",0,["Constraint",dT],[[()=>bA,0],[()=>yA,0]]],WO=[3,vP,"WaypointOptimizationImpedingWaypoint",0,["FailedConstraints",lb,Qb],[[()=>I$,0],0,[()=>bD,0]],3],KO=[3,vP,"WaypointOptimizationOptimizedWaypoint",0,[GC,lb,Qb,hC,"ClusterIndex"],[[()=>wA,0],0,[()=>bD,0],[()=>wA,0],1],3],QO=[3,vP,"WaypointOptimizationOriginOptions",0,[lb],[0]],ZO=[3,vP,"WaypointOptimizationPedestrianOptions",0,[ET],[[()=>SA,0]]],YO=[3,vP,"WaypointOptimizationRestCycleDurations",0,[Jb,"WorkDuration"],[[()=>IP,0],[()=>IP,0]],2],JO=[3,vP,"WaypointOptimizationRestCycles",0,["LongCycle","ShortCycle"],[[()=>YO,0],[()=>YO,0]],2],XO=[3,vP,"WaypointOptimizationRestProfile",0,["Profile"],[[()=>yA,0]],1],eD=[3,vP,"WaypointOptimizationSideOfStreetOptions",0,[Qb,eP],[[()=>bD,0],0],1],tD=[3,vP,"WaypointOptimizationTimeBreakdown",0,[Jb,fT,xT,rP],[[()=>IP,0],[()=>IP,0],[()=>IP,0],[()=>IP,0]],4],nD=[3,vP,"WaypointOptimizationTrafficOptions",0,[JT],[0]],rD=[3,vP,"WaypointOptimizationTrailerOptions",0,[PT],[[()=>mA,0]]],iD=[3,vP,"WaypointOptimizationTravelModeOptions",0,[Vb,QT],[[()=>ZO,0],[()=>sD,0]]],sD=[3,vP,"WaypointOptimizationTruckOptions",0,[tb,sb,ob,Cb,KT,zT,NT,sP,aP],[[()=>IA,0],[()=>x$,0],[()=>PP,0],[()=>PP,0],[()=>rD,0],[()=>AA,0],[()=>EA,0],[()=>IA,0],[()=>PP,0]]],oD=[3,vP,"WaypointOptimizationWaypoint",0,[Qb,pC,fC,"Before",rb,lb,fT,RT],[[()=>bD,0],[()=>kO,0],[()=>wA,0],65,[()=>xP,0],0,[()=>IP,0],[()=>eD,0]],1],aD=[3,vP,oP,0,["Single","Tandem","Triple","Quad","Quint"],[[()=>IA,0],[()=>IA,0],[()=>IA,0],[()=>IA,0],[()=>IA,0]]],cD=[-3,RP,"GeoRoutesServiceException",0,[],[]];le.for(RP).registerError(cD,iC);var uD=[1,vP,RC,8,1],lD=[1,vP,"CountryCodeList",0,[()=>CP,0]],dD=[1,vP,"DistanceThresholdList",0,[()=>AP,0]],pD=[1,vP,"IsolineAvoidanceAreaGeometryList",0,[()=>HA,0]],hD=[1,vP,"IsolineAvoidanceAreaList",0,[()=>BA,0]],fD=[1,vP,"IsolineAvoidanceZoneCategoryList",0,()=>jA],gD=[1,vP,"IsolineConnectionList",0,[()=>VA,0]],mD=[1,vP,"IsolineHazardousCargoTypeList",0,[()=>DP,0]],yD=[1,vP,"IsolineList",0,[()=>FA,0]],SD=[1,vP,"IsolineShapeGeometryList",0,[()=>XA,0]],RD=[1,vP,"LinearRing",0,[()=>bD,0]],wD=[1,vP,"LinearRings",0,[()=>RD,0]],vD=[1,vP,vb,0,[()=>bD,0]],ED=[1,vP,"LocalizedStringList",0,[()=>aI,0]],CD=[1,vP,"PolylineRingList",0,[()=>MP,0]],bD=[1,vP,Qb,8,1],TD=[1,vP,"Position23",8,1],PD=[1,vP,"RoadSnapHazardousCargoTypeList",0,[()=>LP,0]],AD=[1,vP,"RoadSnapNoticeList",0,[()=>dI,0]],ID=[1,vP,"RoadSnapSnappedTracePointList",0,[()=>hI,0]],xD=[1,vP,"RoadSnapTracePointIndexList",8,1],OD=[1,vP,"RoadSnapTracePointList",0,[()=>fI,0]],DD=[1,vP,"RouteAvoidanceAreaGeometryList",0,[()=>vI,0]],$D=[1,vP,"RouteAvoidanceAreaList",0,[()=>wI,0]],MD=[1,vP,"RouteAvoidanceZoneCategoryList",0,[()=>CI,0]],LD=[1,vP,"RouteDriverScheduleIntervalList",0,[()=>xI,0]],kD=[1,vP,"RouteFerryAfterTravelStepList",0,[()=>LI,0]],ND=[1,vP,"RouteFerryBeforeTravelStepList",0,[()=>NI,0]],_D=[1,vP,"RouteFerryNoticeList",0,()=>FI],UD=[1,vP,"RouteFerrySpanList",0,[()=>HI,0]],FD=[1,vP,"RouteFerryTravelStepList",0,[()=>qI,0]],GD=[1,vP,"RouteHazardousCargoTypeList",0,[()=>BP,0]],BD=[1,vP,"RouteLegAdditionalFeatureList",0,[()=>HP,0]],HD=[1,vP,"RouteLegList",0,[()=>WI,0]],zD=[1,vP,"RouteList",0,[()=>SI,0]],jD=[1,vP,"RouteMajorRoadLabelList",0,[()=>QI,0]],qD=[1,vP,nT,0,[()=>YD,0]],VD=[1,vP,"RouteMatrixAvoidanceAreaList",0,[()=>XI,0]],WD=[1,vP,"RouteMatrixAvoidanceZoneCategoryList",0,[()=>nx,0]],KD=[1,vP,"RouteMatrixDestinationList",0,[()=>ox,0]],QD=[1,vP,"RouteMatrixHazardousCargoTypeList",0,[()=>qP,0]],ZD=[1,vP,"RouteMatrixOriginList",0,[()=>dx,0]],YD=[1,vP,"RouteMatrixRow",0,[()=>cx,0]],JD=[1,vP,"RouteNumberList",0,[()=>vx,0]],XD=[1,vP,"RoutePassThroughWaypointList",0,[()=>bx,0]],e$=[1,vP,"RoutePedestrianNoticeList",0,()=>Ix],t$=[1,vP,"RoutePedestrianSpanList",0,[()=>$x,0]],n$=[1,vP,"RoutePedestrianTravelStepList",0,[()=>kx,0]],r$=[1,vP,"RouteResponseNoticeList",0,()=>_x],i$=[1,vP,"RouteSignpostLabelList",0,[()=>qx,0]],s$=[1,vP,"RouteSpanCarAccessAttributeList",0,[()=>YP,0]],o$=[1,vP,"RouteSpanPedestrianAccessAttributeList",0,[()=>XP,0]],a$=[1,vP,"RouteSpanRoadAttributeList",0,[()=>tA,0]],c$=[1,vP,"RouteSpanScooterAccessAttributeList",0,[()=>nA,0]],u$=[1,vP,"RouteSpanTruckAccessAttributeList",0,[()=>rA,0]],l$=[1,vP,"RouteTollList",0,[()=>Qx,0]],d$=[1,vP,"RouteTollPaymentMethodList",0,[()=>oA,0]],p$=[1,vP,"RouteTollPaymentSiteList",0,[()=>Xx,0]],h$=[1,vP,"RouteTollRateList",0,[()=>rO,0]],f$=[1,vP,"RouteTollSystemList",0,[()=>sO,0]],g$=[1,vP,"RouteTransponderList",0,[()=>cO,0]],m$=[1,vP,"RouteVehicleIncidentList",0,[()=>gO,0]],y$=[1,vP,"RouteVehicleNoticeDetailList",0,[()=>RO,0]],S$=[1,vP,"RouteVehicleNoticeList",0,[()=>SO,0]],R$=[1,vP,"RouteVehicleSpanList",0,[()=>EO,0]],w$=[1,vP,"RouteVehicleTravelStepList",0,[()=>TO,0]],v$=[1,vP,"RouteWaypointList",0,[()=>AO,0]],E$=[1,vP,"RouteZoneList",0,[()=>xO,0]],C$=[1,vP,"TimeThresholdList",0,[()=>IP,0]],b$=[1,vP,"TruckRoadTypeList",0,[()=>vA,0]],T$=[1,vP,"ValidationExceptionFieldList",0,[()=>LO,0]],P$=[1,vP,"WaypointOptimizationAvoidanceAreaList",0,[()=>_O,0]],A$=[1,vP,"WaypointOptimizationConnectionList",0,[()=>BO,0]],I$=[1,vP,"WaypointOptimizationFailedConstraintList",0,[()=>VO,0]],x$=[1,vP,"WaypointOptimizationHazardousCargoTypeList",0,[()=>TA,0]],O$=[1,vP,"WaypointOptimizationImpedingWaypointList",0,[()=>WO,0]],D$=[1,vP,"WaypointOptimizationOptimizedWaypointList",0,[()=>KO,0]],$$=[1,vP,"WaypointOptimizationWaypointList",0,[()=>oD,0]],M$=[9,vP,"CalculateIsolines",{[pP]:["POST","/isolines",200]},()=>OA,()=>DA],L$=[9,vP,"CalculateRouteMatrix",{[pP]:["POST","/route-matrix",200]},()=>$A,()=>MA],k$=[9,vP,"CalculateRoutes",{[pP]:["POST","/routes",200]},()=>LA,()=>kA],N$=[9,vP,"OptimizeWaypoints",{[pP]:["POST","/optimize-waypoints",200]},()=>cI,()=>uI],_$=[9,vP,"SnapToRoads",{[pP]:["POST","/snap-to-roads",200]},()=>OO,()=>DO];class U$ extends(er.classBuilder().ep(AE).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("RoutesService","CalculateIsolines",{}).n("GeoRoutesClient","CalculateIsolinesCommand").sc(M$).build()){}class F$ extends(er.classBuilder().ep(AE).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("RoutesService","CalculateRouteMatrix",{}).n("GeoRoutesClient","CalculateRouteMatrixCommand").sc(L$).build()){}class G$ extends(er.classBuilder().ep(AE).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("RoutesService","CalculateRoutes",{}).n("GeoRoutesClient","CalculateRoutesCommand").sc(k$).build()){}class B$ extends(er.classBuilder().ep(AE).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("RoutesService","OptimizeWaypoints",{}).n("GeoRoutesClient","OptimizeWaypointsCommand").sc(N$).build()){}class H$ extends(er.classBuilder().ep(AE).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("RoutesService","SnapToRoads",{}).n("GeoRoutesClient","SnapToRoadsCommand").sc(_$).build()){}const z$={CalculateIsolinesCommand:U$,CalculateRouteMatrixCommand:F$,CalculateRoutesCommand:G$,OptimizeWaypointsCommand:B$,SnapToRoadsCommand:H$};class j$ extends rC{}nr(z$,j$);var q$=Object.freeze({__proto__:null,$Command:er,AccessDeniedException:sC,AccessDeniedException$:xA,CalculateIsolines$:M$,CalculateIsolinesCommand:U$,CalculateIsolinesRequest$:OA,CalculateIsolinesResponse$:DA,CalculateRouteMatrix$:L$,CalculateRouteMatrixCommand:F$,CalculateRouteMatrixRequest$:$A,CalculateRouteMatrixResponse$:MA,CalculateRoutes$:k$,CalculateRoutesCommand:G$,CalculateRoutesRequest$:LA,CalculateRoutesResponse$:kA,Circle$:NA,Corridor$:_A,DayOfWeek:{FRIDAY:"Friday",MONDAY:"Monday",SATURDAY:"Saturday",SUNDAY:"Sunday",THURSDAY:"Thursday",TUESDAY:"Tuesday",WEDNESDAY:"Wednesday"},GeoRoutes:j$,GeoRoutesClient:rC,GeoRoutesServiceException:iC,GeoRoutesServiceException$:cD,GeometryFormat:{FLEXIBLE_POLYLINE:"FlexiblePolyline",SIMPLE:"Simple"},InternalServerException:oC,InternalServerException$:UA,Isoline$:FA,IsolineAllowOptions$:GA,IsolineAvoidanceArea$:BA,IsolineAvoidanceAreaGeometry$:HA,IsolineAvoidanceOptions$:zA,IsolineAvoidanceZoneCategory$:jA,IsolineCarOptions$:qA,IsolineConnection$:VA,IsolineConnectionGeometry$:WA,IsolineDestinationOptions$:KA,IsolineEngineType:{ELECTRIC:"Electric",INTERNAL_COMBUSTION:"InternalCombustion",PLUGIN_HYBRID:"PluginHybrid"},IsolineGranularityOptions$:QA,IsolineHazardousCargoType:{COMBUSTIBLE:"Combustible",CORROSIVE:"Corrosive",EXPLOSIVE:"Explosive",FLAMMABLE:"Flammable",GAS:"Gas",HARMFUL_TO_WATER:"HarmfulToWater",ORGANIC:"Organic",OTHER:"Other",POISON:"Poison",POISONOUS_INHALATION:"PoisonousInhalation",RADIOACTIVE:"Radioactive"},IsolineMatchingOptions$:ZA,IsolineOptimizationObjective:{ACCURATE_CALCULATION:"AccurateCalculation",BALANCED_CALCULATION:"BalancedCalculation",FAST_CALCULATION:"FastCalculation"},IsolineOriginOptions$:YA,IsolineScooterOptions$:JA,IsolineShapeGeometry$:XA,IsolineSideOfStreetOptions$:eI,IsolineThresholds$:tI,IsolineTrafficOptions$:nI,IsolineTrailerOptions$:rI,IsolineTravelMode:{CAR:"Car",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},IsolineTravelModeOptions$:iI,IsolineTruckOptions$:sI,IsolineTruckType:{LIGHT_TRUCK:"LightTruck",STRAIGHT_TRUCK:"StraightTruck",TRACTOR:"Tractor"},IsolineVehicleLicensePlate$:oI,IsolineZoneCategory:{CONGESTION_PRICING:"CongestionPricing",ENVIRONMENTAL:"Environmental",VIGNETTE:"Vignette"},LocalizedString$:aI,MatchingStrategy:{MATCH_ANY:"MatchAny",MATCH_MOST_SIGNIFICANT_ROAD:"MatchMostSignificantRoad"},MeasurementSystem:{IMPERIAL:"Imperial",METRIC:"Metric"},OptimizeWaypoints$:N$,OptimizeWaypointsCommand:B$,OptimizeWaypointsRequest$:cI,OptimizeWaypointsResponse$:uI,PolylineCorridor$:lI,RoadSnapHazardousCargoType:{COMBUSTIBLE:"Combustible",CORROSIVE:"Corrosive",EXPLOSIVE:"Explosive",FLAMMABLE:"Flammable",GAS:"Gas",HARMFUL_TO_WATER:"HarmfulToWater",ORGANIC:"Organic",OTHER:"Other",POISON:"Poison",POISONOUS_INHALATION:"PoisonousInhalation",RADIOACTIVE:"Radioactive"},RoadSnapNotice$:dI,RoadSnapNoticeCode:{TRACE_POINTS_HEADING_IGNORED:"TracePointsHeadingIgnored",TRACE_POINTS_IGNORED:"TracePointsIgnored",TRACE_POINTS_MOVED_BY_LARGE_DISTANCE:"TracePointsMovedByLargeDistance",TRACE_POINTS_NOT_MATCHED:"TracePointsNotMatched",TRACE_POINTS_OUT_OF_SEQUENCE:"TracePointsOutOfSequence",TRACE_POINTS_SPEED_ESTIMATED:"TracePointsSpeedEstimated",TRACE_POINTS_SPEED_IGNORED:"TracePointsSpeedIgnored"},RoadSnapSnappedGeometry$:pI,RoadSnapSnappedTracePoint$:hI,RoadSnapTracePoint$:fI,RoadSnapTrailerOptions$:gI,RoadSnapTravelMode:{CAR:"Car",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},RoadSnapTravelModeOptions$:mI,RoadSnapTruckOptions$:yI,Route$:SI,RouteAllowOptions$:RI,RouteAvoidanceArea$:wI,RouteAvoidanceAreaGeometry$:vI,RouteAvoidanceOptions$:EI,RouteAvoidanceZoneCategory$:CI,RouteCarOptions$:bI,RouteContinueHighwayStepDetails$:TI,RouteContinueStepDetails$:PI,RouteDestinationOptions$:AI,RouteDirection:{EAST:"East",NORTH:"North",SOUTH:"South",WEST:"West"},RouteDriverOptions$:II,RouteDriverScheduleInterval$:xI,RouteEmissionType$:OI,RouteEngineType:{ELECTRIC:"Electric",INTERNAL_COMBUSTION:"InternalCombustion",PLUGIN_HYBRID:"PluginHybrid"},RouteEnterHighwayStepDetails$:DI,RouteExclusionOptions$:$I,RouteExitStepDetails$:MI,RouteFerryAfterTravelStep$:LI,RouteFerryAfterTravelStepType:{DEBOARD:"Deboard"},RouteFerryArrival$:kI,RouteFerryBeforeTravelStep$:NI,RouteFerryBeforeTravelStepType:{BOARD:"Board"},RouteFerryDeparture$:_I,RouteFerryLegDetails$:UI,RouteFerryNotice$:FI,RouteFerryNoticeCode:{ACCURATE_POLYLINE_UNAVAILABLE:"AccuratePolylineUnavailable",NO_SCHEDULE:"NoSchedule",OTHER:"Other",POTENTIAL_VIOLATED_VEHICLE_RESTRICTION_USAGE:"PotentialViolatedVehicleRestrictionUsage",SEASONAL_CLOSURE:"SeasonalClosure",VIOLATED_AVOID_FERRY:"ViolatedAvoidFerry",VIOLATED_AVOID_RAIL_FERRY:"ViolatedAvoidRailFerry"},RouteFerryOverviewSummary$:GI,RouteFerryPlace$:BI,RouteFerrySpan$:HI,RouteFerrySummary$:zI,RouteFerryTravelOnlySummary$:jI,RouteFerryTravelStep$:qI,RouteFerryTravelStepType:{ARRIVE:"Arrive",CONTINUE:"Continue",DEPART:"Depart"},RouteHazardousCargoType:{COMBUSTIBLE:"Combustible",CORROSIVE:"Corrosive",EXPLOSIVE:"Explosive",FLAMMABLE:"Flammable",GAS:"Gas",HARMFUL_TO_WATER:"HarmfulToWater",ORGANIC:"Organic",OTHER:"Other",POISON:"Poison",POISONOUS_INHALATION:"PoisonousInhalation",RADIOACTIVE:"Radioactive"},RouteKeepStepDetails$:VI,RouteLeg$:WI,RouteLegAdditionalFeature:{ELEVATION:"Elevation",INCIDENTS:"Incidents",PASS_THROUGH_WAYPOINTS:"PassThroughWaypoints",SUMMARY:"Summary",TOLLS:"Tolls",TRAVEL_STEP_INSTRUCTIONS:"TravelStepInstructions",TRUCK_ROAD_TYPES:"TruckRoadTypes",TYPICAL_DURATION:"TypicalDuration",ZONES:"Zones"},RouteLegGeometry$:KI,RouteLegTravelMode:{CAR:"Car",CAR_SHUTTLE_TRAIN:"CarShuttleTrain",FERRY:"Ferry",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},RouteLegType:{FERRY:"Ferry",PEDESTRIAN:"Pedestrian",VEHICLE:"Vehicle"},RouteMajorRoadLabel$:QI,RouteMatchingOptions$:ZI,RouteMatrixAllowOptions$:YI,RouteMatrixAutoCircle$:JI,RouteMatrixAvoidanceArea$:XI,RouteMatrixAvoidanceAreaGeometry$:ex,RouteMatrixAvoidanceOptions$:tx,RouteMatrixAvoidanceZoneCategory$:nx,RouteMatrixBoundary$:rx,RouteMatrixBoundaryGeometry$:ix,RouteMatrixCarOptions$:sx,RouteMatrixDestination$:ox,RouteMatrixDestinationOptions$:ax,RouteMatrixEntry$:cx,RouteMatrixErrorCode:{NO_MATCH:"NoMatch",NO_MATCH_DESTINATION:"NoMatchDestination",NO_MATCH_ORIGIN:"NoMatchOrigin",NO_ROUTE:"NoRoute",OTHER:"Other",OUT_OF_BOUNDS:"OutOfBounds",OUT_OF_BOUNDS_DESTINATION:"OutOfBoundsDestination",OUT_OF_BOUNDS_ORIGIN:"OutOfBoundsOrigin",VIOLATION:"Violation"},RouteMatrixExclusionOptions$:ux,RouteMatrixHazardousCargoType:{COMBUSTIBLE:"Combustible",CORROSIVE:"Corrosive",EXPLOSIVE:"Explosive",FLAMMABLE:"Flammable",GAS:"Gas",HARMFUL_TO_WATER:"HarmfulToWater",ORGANIC:"Organic",OTHER:"Other",POISON:"Poison",POISONOUS_INHALATION:"PoisonousInhalation",RADIOACTIVE:"Radioactive"},RouteMatrixMatchingOptions$:lx,RouteMatrixOrigin$:dx,RouteMatrixOriginOptions$:px,RouteMatrixScooterOptions$:hx,RouteMatrixSideOfStreetOptions$:fx,RouteMatrixTrafficOptions$:gx,RouteMatrixTrailerOptions$:mx,RouteMatrixTravelMode:{CAR:"Car",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},RouteMatrixTravelModeOptions$:yx,RouteMatrixTruckOptions$:Sx,RouteMatrixTruckType:{LIGHT_TRUCK:"LightTruck",STRAIGHT_TRUCK:"StraightTruck",TRACTOR:"Tractor"},RouteMatrixVehicleLicensePlate$:Rx,RouteMatrixZoneCategory:{CONGESTION_PRICING:"CongestionPricing",ENVIRONMENTAL:"Environmental",VIGNETTE:"Vignette"},RouteNoticeDetailRange$:wx,RouteNoticeImpact:{HIGH:"High",LOW:"Low"},RouteNumber$:vx,RouteOriginOptions$:Ex,RoutePassThroughPlace$:Cx,RoutePassThroughWaypoint$:bx,RoutePedestrianArrival$:Tx,RoutePedestrianDeparture$:Px,RoutePedestrianLegDetails$:Ax,RoutePedestrianNotice$:Ix,RoutePedestrianNoticeCode:{ACCURATE_POLYLINE_UNAVAILABLE:"AccuratePolylineUnavailable",OTHER:"Other",VIOLATED_AVOID_DIRT_ROAD:"ViolatedAvoidDirtRoad",VIOLATED_AVOID_TUNNEL:"ViolatedAvoidTunnel",VIOLATED_PEDESTRIAN_OPTION:"ViolatedPedestrianOption"},RoutePedestrianOptions$:xx,RoutePedestrianOverviewSummary$:Ox,RoutePedestrianPlace$:Dx,RoutePedestrianSpan$:$x,RoutePedestrianSummary$:Mx,RoutePedestrianTravelOnlySummary$:Lx,RoutePedestrianTravelStep$:kx,RoutePedestrianTravelStepType:{ARRIVE:"Arrive",CONTINUE:"Continue",DEPART:"Depart",EXIT:"Exit",KEEP:"Keep",RAMP:"Ramp",ROUNDABOUT_ENTER:"RoundaboutEnter",ROUNDABOUT_EXIT:"RoundaboutExit",ROUNDABOUT_PASS:"RoundaboutPass",TURN:"Turn",U_TURN:"UTurn"},RouteRampStepDetails$:Nx,RouteResponseNotice$:_x,RouteResponseNoticeCode:{MAIN_LANGUAGE_NOT_FOUND:"MainLanguageNotFound",OTHER:"Other",TRAVEL_TIME_EXCEEDS_DRIVER_WORK_HOURS:"TravelTimeExceedsDriverWorkHours"},RouteRoad$:Ux,RouteRoadType:{HIGHWAY:"Highway",RURAL:"Rural",URBAN:"Urban"},RouteRoundaboutEnterStepDetails$:Fx,RouteRoundaboutExitStepDetails$:Gx,RouteRoundaboutPassStepDetails$:Bx,RouteScooterOptions$:Hx,RouteSideOfStreet:{LEFT:"Left",RIGHT:"Right"},RouteSideOfStreetOptions$:zx,RouteSignpost$:jx,RouteSignpostLabel$:qx,RouteSpanAdditionalFeature:{BEST_CASE_DURATION:"BestCaseDuration",CAR_ACCESS:"CarAccess",CONSUMPTION:"Consumption",COUNTRY:"Country",DISTANCE:"Distance",DURATION:"Duration",DYNAMIC_SPEED:"DynamicSpeed",FUNCTIONAL_CLASSIFICATION:"FunctionalClassification",GATES:"Gates",INCIDENTS:"Incidents",NAMES:"Names",NOTICES:"Notices",PEDESTRIAN_ACCESS:"PedestrianAccess",RAILWAY_CROSSINGS:"RailwayCrossings",REGION:"Region",ROAD_ATTRIBUTES:"RoadAttributes",ROUTE_NUMBERS:"RouteNumbers",SCOOTER_ACCESS:"ScooterAccess",SPEED_LIMIT:"SpeedLimit",TOLL_SYSTEMS:"TollSystems",TRUCK_ACCESS:"TruckAccess",TRUCK_ROAD_TYPES:"TruckRoadTypes",TYPICAL_DURATION:"TypicalDuration",ZONES:"Zones"},RouteSpanCarAccessAttribute:{ALLOWED:"Allowed",NO_THROUGH_TRAFFIC:"NoThroughTraffic",TOLL_ROAD:"TollRoad"},RouteSpanDynamicSpeedDetails$:Vx,RouteSpanGateAttribute:{EMERGENCY:"Emergency",KEY_ACCESS:"KeyAccess",PERMISSION_REQUIRED:"PermissionRequired"},RouteSpanPedestrianAccessAttribute:{ALLOWED:"Allowed",INDOORS:"Indoors",NO_THROUGH_TRAFFIC:"NoThroughTraffic",PARK:"Park",STAIRS:"Stairs",TOLL_ROAD:"TollRoad"},RouteSpanRailwayCrossingAttribute:{PROTECTED:"Protected",UNPROTECTED:"Unprotected"},RouteSpanRoadAttribute:{BRIDGE:"Bridge",BUILT_UP_AREA:"BuiltUpArea",CONTROLLED_ACCESS_HIGHWAY:"ControlledAccessHighway",DIRT_ROAD:"DirtRoad",DIVIDED_ROAD:"DividedRoad",MOTORWAY:"Motorway",PRIVATE_ROAD:"PrivateRoad",RAMP:"Ramp",RIGHT_HAND_TRAFFIC:"RightHandTraffic",ROUNDABOUT:"Roundabout",TUNNEL:"Tunnel",UNDER_CONSTRUCTION:"UnderConstruction"},RouteSpanScooterAccessAttribute:{ALLOWED:"Allowed",NO_THROUGH_TRAFFIC:"NoThroughTraffic",TOLL_ROAD:"TollRoad"},RouteSpanSpeedLimitDetails$:Wx,RouteSpanTruckAccessAttribute:{ALLOWED:"Allowed",NO_THROUGH_TRAFFIC:"NoThroughTraffic",TOLL_ROAD:"TollRoad"},RouteSteeringDirection:{LEFT:"Left",RIGHT:"Right",STRAIGHT:"Straight"},RouteSummary$:Kx,RouteToll$:Qx,RouteTollOptions$:Zx,RouteTollPass$:Yx,RouteTollPassValidityPeriod$:Jx,RouteTollPassValidityPeriodType:{ANNUAL:"Annual",DAYS:"Days",EXTENDED_ANNUAL:"ExtendedAnnual",MINUTES:"Minutes",MONTHS:"Months"},RouteTollPaymentMethod:{BANK_CARD:"BankCard",CASH:"Cash",CASH_EXACT:"CashExact",CREDIT_CARD:"CreditCard",PASS_SUBSCRIPTION:"PassSubscription",TRANSPONDER:"Transponder",TRAVEL_CARD:"TravelCard",VIDEO_TOLL:"VideoToll"},RouteTollPaymentSite$:Xx,RouteTollPrice$:eO,RouteTollPriceSummary$:tO,RouteTollPriceValueRange$:nO,RouteTollRate$:rO,RouteTollSummary$:iO,RouteTollSystem$:sO,RouteTollVehicleCategory:{MINIBUS:"Minibus"},RouteTrafficOptions$:oO,RouteTrailerOptions$:aO,RouteTransponder$:cO,RouteTravelMode:{CAR:"Car",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},RouteTravelModeOptions$:uO,RouteTravelStepType:{DEFAULT:"Default",TURN_BY_TURN:"TurnByTurn"},RouteTruckOptions$:lO,RouteTruckType:{LIGHT_TRUCK:"LightTruck",STRAIGHT_TRUCK:"StraightTruck",TRACTOR:"Tractor"},RouteTurnIntensity:{SHARP:"Sharp",SLIGHT:"Slight",TYPICAL:"Typical"},RouteTurnStepDetails$:dO,RouteUTurnStepDetails$:pO,RouteVehicleArrival$:hO,RouteVehicleDeparture$:fO,RouteVehicleIncident$:gO,RouteVehicleIncidentSeverity:{CRITICAL:"Critical",HIGH:"High",LOW:"Low",MEDIUM:"Medium"},RouteVehicleIncidentType:{ACCIDENT:"Accident",CONGESTION:"Congestion",CONSTRUCTION:"Construction",DISABLED_VEHICLE:"DisabledVehicle",LANE_RESTRICTION:"LaneRestriction",MASS_TRANSIT:"MassTransit",OTHER:"Other",PLANNED_EVENT:"PlannedEvent",ROAD_CLOSURE:"RoadClosure",ROAD_HAZARD:"RoadHazard",WEATHER:"Weather"},RouteVehicleLegDetails$:mO,RouteVehicleLicensePlate$:yO,RouteVehicleNotice$:SO,RouteVehicleNoticeCode:{ACCURATE_POLYLINE_UNAVAILABLE:"AccuratePolylineUnavailable",OTHER:"Other",POTENTIAL_VIOLATED_AVOID_TOLL_ROAD_USAGE:"PotentialViolatedAvoidTollRoadUsage",POTENTIAL_VIOLATED_CARPOOL_USAGE:"PotentialViolatedCarpoolUsage",POTENTIAL_VIOLATED_TURN_RESTRICTION_USAGE:"PotentialViolatedTurnRestrictionUsage",POTENTIAL_VIOLATED_VEHICLE_RESTRICTION_USAGE:"PotentialViolatedVehicleRestrictionUsage",POTENTIAL_VIOLATED_ZONE_RESTRICTION_USAGE:"PotentialViolatedZoneRestrictionUsage",SEASONAL_CLOSURE:"SeasonalClosure",TOLLS_DATA_TEMPORARILY_UNAVAILABLE:"TollsDataTemporarilyUnavailable",TOLLS_DATA_UNAVAILABLE:"TollsDataUnavailable",TOLL_TRANSPONDER:"TollTransponder",VIOLATED_AVOID_CONTROLLED_ACCESS_HIGHWAY:"ViolatedAvoidControlledAccessHighway",VIOLATED_AVOID_DIFFICULT_TURNS:"ViolatedAvoidDifficultTurns",VIOLATED_AVOID_DIRT_ROAD:"ViolatedAvoidDirtRoad",VIOLATED_AVOID_SEASONAL_CLOSURE:"ViolatedAvoidSeasonalClosure",VIOLATED_AVOID_TOLL_ROAD:"ViolatedAvoidTollRoad",VIOLATED_AVOID_TOLL_TRANSPONDER:"ViolatedAvoidTollTransponder",VIOLATED_AVOID_TRUCK_ROAD_TYPE:"ViolatedAvoidTruckRoadType",VIOLATED_AVOID_TUNNEL:"ViolatedAvoidTunnel",VIOLATED_AVOID_U_TURNS:"ViolatedAvoidUTurns",VIOLATED_BLOCKED_ROAD:"ViolatedBlockedRoad",VIOLATED_CARPOOL:"ViolatedCarpool",VIOLATED_EMERGENCY_GATE:"ViolatedEmergencyGate",VIOLATED_START_DIRECTION:"ViolatedStartDirection",VIOLATED_TURN_RESTRICTION:"ViolatedTurnRestriction",VIOLATED_VEHICLE_RESTRICTION:"ViolatedVehicleRestriction",VIOLATED_ZONE_RESTRICTION:"ViolatedZoneRestriction"},RouteVehicleNoticeDetail$:RO,RouteVehicleOverviewSummary$:wO,RouteVehiclePlace$:vO,RouteVehicleSpan$:EO,RouteVehicleSummary$:CO,RouteVehicleTravelOnlySummary$:bO,RouteVehicleTravelStep$:TO,RouteVehicleTravelStepType:{ARRIVE:"Arrive",CONTINUE:"Continue",CONTINUE_HIGHWAY:"ContinueHighway",DEPART:"Depart",ENTER_HIGHWAY:"EnterHighway",EXIT:"Exit",KEEP:"Keep",RAMP:"Ramp",ROUNDABOUT_ENTER:"RoundaboutEnter",ROUNDABOUT_EXIT:"RoundaboutExit",ROUNDABOUT_PASS:"RoundaboutPass",TURN:"Turn",U_TURN:"UTurn"},RouteViolatedConstraints$:PO,RouteWaypoint$:AO,RouteWeightConstraint$:IO,RouteWeightConstraintType:{CURRENT:"Current",GROSS:"Gross",UNKNOWN:"Unknown"},RouteZone$:xO,RouteZoneCategory:{CONGESTION_PRICING:"CongestionPricing",ENVIRONMENTAL:"Environmental",VIGNETTE:"Vignette"},RoutingObjective:{FASTEST_ROUTE:"FastestRoute",SHORTEST_ROUTE:"ShortestRoute"},SideOfStreetMatchingStrategy:{ANY_STREET:"AnyStreet",DIVIDED_STREET_ONLY:"DividedStreetOnly"},SnapToRoads$:_$,SnapToRoadsCommand:H$,SnapToRoadsRequest$:OO,SnapToRoadsResponse$:DO,ThrottlingException:aC,ThrottlingException$:$O,TrafficUsage:{IGNORE_TRAFFIC_DATA:"IgnoreTrafficData",USE_TRAFFIC_DATA:"UseTrafficData"},ValidationException:cC,ValidationException$:MO,ValidationExceptionField$:LO,ValidationExceptionReason:{CANNOT_PARSE:"CannotParse",FIELD_VALIDATION_FAILED:"FieldValidationFailed",MISSING:"Missing",OTHER:"Other",UNKNOWN_FIELD:"UnknownField",UNKNOWN_OPERATION:"UnknownOperation"},WaypointOptimizationAccessHours$:kO,WaypointOptimizationAccessHoursEntry$:NO,WaypointOptimizationAvoidanceArea$:_O,WaypointOptimizationAvoidanceAreaGeometry$:UO,WaypointOptimizationAvoidanceOptions$:FO,WaypointOptimizationClusteringAlgorithm:{DRIVING_DISTANCE:"DrivingDistance",TOPOLOGY_SEGMENT:"TopologySegment"},WaypointOptimizationClusteringOptions$:GO,WaypointOptimizationConnection$:BO,WaypointOptimizationConstraint:{ACCESS_HOURS:"AccessHours",APPOINTMENT_TIME:"AppointmentTime",BEFORE:"Before",HEADING:"Heading",SERVICE_DURATION:"ServiceDuration",SIDE_OF_STREET:"SideOfStreet"},WaypointOptimizationDestinationOptions$:HO,WaypointOptimizationDriverOptions$:zO,WaypointOptimizationDrivingDistanceOptions$:jO,WaypointOptimizationExclusionOptions$:qO,WaypointOptimizationFailedConstraint$:VO,WaypointOptimizationHazardousCargoType:{COMBUSTIBLE:"Combustible",CORROSIVE:"Corrosive",EXPLOSIVE:"Explosive",FLAMMABLE:"Flammable",GAS:"Gas",HARMFUL_TO_WATER:"HarmfulToWater",ORGANIC:"Organic",OTHER:"Other",POISON:"Poison",POISONOUS_INHALATION:"PoisonousInhalation",RADIOACTIVE:"Radioactive"},WaypointOptimizationImpedingWaypoint$:WO,WaypointOptimizationOptimizedWaypoint$:KO,WaypointOptimizationOriginOptions$:QO,WaypointOptimizationPedestrianOptions$:ZO,WaypointOptimizationRestCycleDurations$:YO,WaypointOptimizationRestCycles$:JO,WaypointOptimizationRestProfile$:XO,WaypointOptimizationSequencingObjective:{FASTEST_ROUTE:"FastestRoute",SHORTEST_ROUTE:"ShortestRoute"},WaypointOptimizationServiceTimeTreatment:{REST:"Rest",WORK:"Work"},WaypointOptimizationSideOfStreetOptions$:eD,WaypointOptimizationTimeBreakdown$:tD,WaypointOptimizationTrafficOptions$:nD,WaypointOptimizationTrailerOptions$:rD,WaypointOptimizationTravelMode:{CAR:"Car",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},WaypointOptimizationTravelModeOptions$:iD,WaypointOptimizationTruckOptions$:sD,WaypointOptimizationTruckType:{STRAIGHT_TRUCK:"StraightTruck",TRACTOR:"Tractor"},WaypointOptimizationWaypoint$:oD,WeightPerAxleGroup$:aD,__Client:Yn});var V$=Object.freeze({__proto__:null,EventStreamSerde:class{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:e,serializer:t,deserializer:n,serdeContext:r,defaultContentType:i}){this.marshaller=e,this.serializer=t,this.deserializer=n,this.serdeContext=r,this.defaultContentType=i}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:n}){const r=this.marshaller,i=t.getEventStreamMember(),s=t.getMemberSchema(i),o=this.serializer,a=this.defaultContentType,c=Symbol("initialRequestMarker"),u={async*[Symbol.asyncIterator](){if(n){const e={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:a}};o.write(t,n);const r=o.flush();yield{[c]:!0,headers:e,body:r}}for await(const t of e)yield t}};return r.serialize(u,(e=>{if(e[c])return{headers:e.headers,body:e.body};const t=Object.keys(e).find((e=>"__type"!==e))??"",{additionalHeaders:n,body:r,eventType:i,explicitPayloadContentType:o}=this.writeEventBody(t,s,e);return{headers:{":event-type":{type:"string",value:i},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:o??a},...n},body:r}}))}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:n}){const r=this.marshaller,i=t.getEventStreamMember(),s=t.getMemberSchema(i).getMemberSchemas(),o=Symbol("initialResponseMarker"),a=r.deserialize(e.body,(async e=>{const n=Object.keys(e).find((e=>"__type"!==e))??"",r=e[n].body;if("initial-response"===n){const e=await this.deserializer.read(t,r);return delete e[i],{[o]:!0,...e}}if(n in s){const t=s[n];if(t.isStructSchema()){const i={};let s=!1;for(const[o,a]of t.structIterator()){const{eventHeader:t,eventPayload:c}=a.getMergedTraits();if(s=s||Boolean(t||c),c)a.isBlobSchema()?i[o]=r:a.isStringSchema()?i[o]=(this.serdeContext?.utf8Encoder??M)(r):a.isStructSchema()&&(i[o]=await this.deserializer.read(a,r));else if(t){const t=e[n].headers[o]?.value;null!=t&&(a.isNumericSchema()?i[o]=t&&"object"==typeof t&&"bytes"in t?BigInt(t.toString()):Number(t):i[o]=t)}}if(s)return{[n]:i};if(0===r.byteLength)return{[n]:{}}}return{[n]:await this.deserializer.read(t,r)}}return{$unknown:e}})),c=a[Symbol.asyncIterator](),u=await c.next();if(u.done)return a;if(u.value?.[o]){if(!t)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(const[e,t]of Object.entries(u.value))n[e]=t}return{async*[Symbol.asyncIterator](){for(u?.value?.[o]||(yield u.value);;){const{done:e,value:t}=await c.next();if(e)break;yield t}}}}writeEventBody(e,t,n){const r=this.serializer;let i,s=e,o=null;const a={};if(t.getSchema()[4].includes(e)){const s=t.getMemberSchema(e);if(!s.isStructSchema())throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.");for(const[t,r]of s.structIterator()){const{eventHeader:i,eventPayload:s}=r.getMergedTraits();if(s)o=t;else if(i){const i=n[e][t];let s="binary";r.isNumericSchema()?s=(-2)**31<=i&&i<=2**31-1?"integer":"long":r.isTimestampSchema()?s="timestamp":r.isStringSchema()?s="string":r.isBooleanSchema()&&(s="boolean"),null!=i&&(a[t]={type:s,value:i},delete n[e][t])}}if(null!==o){const t=s.getMemberSchema(o);t.isBlobSchema()?i="application/octet-stream":t.isStringSchema()&&(i="text/plain"),r.write(t,n[e][o])}else r.write(s,n[e])}else{const[t,i]=n[e];s=t,r.write(15,i)}const c=r.flush();return{body:"string"==typeof c?(this.serdeContext?.utf8Decoder??D)(c):c,eventType:s,explicitPayloadContentType:i,additionalHeaders:a}}}});const W$=async(e,t,n)=>({operation:f(t).operation,region:await g(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const K$=e=>{const t=[];switch(e.operation){case"GetCredentialsForIdentity":case"GetId":case"GetOpenIdToken":case"UnlinkIdentity":t.push({schemeId:"smithy.api#noAuth"});break;default:t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e))}return t},Q$={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Z$="3.980.0";const Y$=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Y$(t))return!1;return!0}return!!It(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!Pt(e)))};let J$={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}]};const X$={isVirtualHostableS3Bucket:Y$,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,s,o,...a]=t;if("arn"!==n||""===r||""===i||""===a.join(":"))return null;return{partition:r,service:i,region:s,accountId:o,resourceId:a.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=J$;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}const n=t.find((e=>"aws"===e.id));if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};xt.aws=X$;const eM="required",tM="fn",nM="argv",rM="ref",iM=!0,sM="isSet",oM="booleanEquals",aM="error",cM="endpoint",uM="tree",lM="PartitionResult",dM="getAttr",pM="stringEquals",hM={[eM]:!1,type:"string"},fM={[eM]:!0,default:!1,type:"boolean"},gM={[rM]:"Endpoint"},mM={[tM]:oM,[nM]:[{[rM]:"UseFIPS"},!0]},yM={[tM]:oM,[nM]:[{[rM]:"UseDualStack"},!0]},SM={},RM={[rM]:"Region"},wM={[tM]:dM,[nM]:[{[rM]:lM},"supportsFIPS"]},vM={[rM]:lM},EM={[tM]:oM,[nM]:[!0,{[tM]:dM,[nM]:[vM,"supportsDualStack"]}]},CM=[mM],bM=[yM],TM=[RM],PM={parameters:{Region:hM,UseDualStack:fM,UseFIPS:fM,Endpoint:hM},rules:[{conditions:[{[tM]:sM,[nM]:[gM]}],rules:[{conditions:CM,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:aM},{conditions:bM,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:aM},{endpoint:{url:gM,properties:SM,headers:SM},type:cM}],type:uM},{conditions:[{[tM]:sM,[nM]:TM}],rules:[{conditions:[{[tM]:"aws.partition",[nM]:TM,assign:lM}],rules:[{conditions:[mM,yM],rules:[{conditions:[{[tM]:oM,[nM]:[iM,wM]},EM],rules:[{conditions:[{[tM]:pM,[nM]:[RM,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:SM,headers:SM},type:cM},{conditions:[{[tM]:pM,[nM]:[RM,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:SM,headers:SM},type:cM},{conditions:[{[tM]:pM,[nM]:[RM,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:SM,headers:SM},type:cM},{conditions:[{[tM]:pM,[nM]:[RM,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:SM,headers:SM},type:cM},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:SM,headers:SM},type:cM}],type:uM},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:aM}],type:uM},{conditions:CM,rules:[{conditions:[{[tM]:oM,[nM]:[wM,iM]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:SM,headers:SM},type:cM}],type:uM},{error:"FIPS is enabled but this partition does not support FIPS",type:aM}],type:uM},{conditions:bM,rules:[{conditions:[EM],rules:[{conditions:[{[tM]:pM,[nM]:["aws",{[tM]:dM,[nM]:[vM,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:SM,headers:SM},type:cM},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:SM,headers:SM},type:cM}],type:uM},{error:"DualStack is enabled but this partition does not support DualStack",type:aM}],type:uM},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:SM,headers:SM},type:cM}],type:uM}],type:uM},{error:"Invalid Configuration: Missing Region",type:aM}]},AM=new bt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),IM=(e,t={})=>AM.get(e,(()=>Yt(PM,{endpointParams:e,logger:t.logger})));xt.aws=X$;const xM=e=>{const t=Xi(e),n=()=>t().then(sr),r=(e=>({apiVersion:"2014-06-30",base64Decoder:e?.base64Decoder??O,base64Encoder:e?.base64Encoder??L,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??IM,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??K$,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new un},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Rt}],logger:e?.logger??new ur,protocol:e?.protocol??Er,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentity",xmlNamespace:"http://cognito-identity.amazonaws.com/doc/2014-06-30/",version:"2014-06-30",serviceTarget:"AWSCognitoIdentityService"},serviceId:e?.serviceId??"Cognito Identity",urlParser:e?.urlParser??tn,utf8Decoder:e?.utf8Decoder??D,utf8Encoder:e?.utf8Encoder??M}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qn,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Qi({serviceId:r.serviceId,clientVersion:Z$}),maxAttempts:e?.maxAttempts??3,region:e?.region??Yi("Region is missing"),requestHandler:H.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||si),sha256:e?.sha256??Ki,streamCollector:e?.streamCollector??z,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(_r)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Ur))}};class OM extends rr{constructor(e){super(e),Object.setPrototypeOf(this,OM.prototype)}}class DM extends OM{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,DM.prototype)}}class $M extends OM{name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,$M.prototype)}}class MM extends OM{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,MM.prototype)}}class LM extends OM{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,LM.prototype)}}class kM extends OM{name="ResourceConflictException";$fault="client";constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,kM.prototype)}}class NM extends OM{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,NM.prototype)}}class _M extends OM{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,_M.prototype)}}class UM extends OM{name="ExternalServiceException";$fault="client";constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),Object.setPrototypeOf(this,UM.prototype)}}class FM extends OM{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,FM.prototype)}}class GM extends OM{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(e){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...e}),Object.setPrototypeOf(this,GM.prototype)}}class BM extends OM{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,BM.prototype)}}const HM="Credentials",zM="IdentityId",jM="Logins",qM="client",VM="error",WM="httpError",KM="message",QM="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",ZM="com.amazonaws.cognitoidentity";var YM=[0,ZM,"IdentityProviderToken",8,0],JM=[0,ZM,"SecretKeyString",8,0],XM=[-3,ZM,"ConcurrentModificationException",{[VM]:qM,[WM]:400},[KM],[0]];le.for(ZM).registerError(XM,BM);var eL=[3,ZM,HM,0,["AccessKeyId","SecretKey","SessionToken","Expiration"],[0,[()=>JM,0],0,4]],tL=[-3,ZM,"DeveloperUserAlreadyRegisteredException",{[VM]:qM,[WM]:400},[KM],[0]];le.for(ZM).registerError(tL,GM);var nL=[-3,ZM,"ExternalServiceException",{[VM]:qM,[WM]:400},[KM],[0]];le.for(ZM).registerError(nL,UM);var rL=[3,ZM,"GetCredentialsForIdentityInput",0,[zM,jM,"CustomRoleArn"],[0,[()=>mL,0],0],1],iL=[3,ZM,"GetCredentialsForIdentityResponse",0,[zM,HM],[0,[()=>eL,0]]],sL=[3,ZM,"GetIdInput",0,["IdentityPoolId","AccountId",jM],[0,0,[()=>mL,0]],1],oL=[3,ZM,"GetIdResponse",0,[zM],[0]],aL=[-3,ZM,"InternalErrorException",{[VM]:"server"},[KM],[0]];le.for(ZM).registerError(aL,DM);var cL=[-3,ZM,"InvalidIdentityPoolConfigurationException",{[VM]:qM,[WM]:400},[KM],[0]];le.for(ZM).registerError(cL,FM);var uL=[-3,ZM,"InvalidParameterException",{[VM]:qM,[WM]:400},[KM],[0]];le.for(ZM).registerError(uL,$M);var lL=[-3,ZM,"LimitExceededException",{[VM]:qM,[WM]:400},[KM],[0]];le.for(ZM).registerError(lL,MM);var dL=[-3,ZM,"NotAuthorizedException",{[VM]:qM,[WM]:403},[KM],[0]];le.for(ZM).registerError(dL,LM);var pL=[-3,ZM,"ResourceConflictException",{[VM]:qM,[WM]:409},[KM],[0]];le.for(ZM).registerError(pL,kM);var hL=[-3,ZM,"ResourceNotFoundException",{[VM]:qM,[WM]:404},[KM],[0]];le.for(ZM).registerError(hL,_M);var fL=[-3,ZM,"TooManyRequestsException",{[VM]:qM,[WM]:429},[KM],[0]];le.for(ZM).registerError(fL,NM);var gL=[-3,QM,"CognitoIdentityServiceException",0,[],[]];le.for(QM).registerError(gL,OM);var mL=[2,ZM,"LoginsMap",0,[0,0],[()=>YM,0]],yL=[9,ZM,"GetCredentialsForIdentity",0,()=>rL,()=>iL],SL=[9,ZM,"GetId",0,()=>sL,()=>oL];class RL extends(er.classBuilder().ep(Q$).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(yL).build()){}class wL extends(er.classBuilder().ep(Q$).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(SL).build()){}var vL=Object.freeze({__proto__:null,CognitoIdentityClient:class extends Yn{config;constructor(...[e]){const r=xM(e||{});super(r),this.initConfig=r;var i;const s=Ct((i=r,Object.assign(i,{useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}))),o=yi(s),a=Br(o),c=((e,r)=>{const i=Object.assign(Os(e),or(e),t(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}})(e));return r.forEach((e=>e.configure(i))),Object.assign(e,Ds(i),ar(i),n(i),{httpAuthSchemes:(s=i).httpAuthSchemes(),httpAuthSchemeProvider:s.httpAuthSchemeProvider(),credentials:s.credentials()});var s})((e=>{const t=zn(e);return Object.assign(t,{authSchemePreference:g(e.authSchemePreference??[])})})(ri(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use(re(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(Ci(this.config)),this.middlewareStack.use(jr(this.config)),this.middlewareStack.use(u(this.config)),this.middlewareStack.use(d(this.config)),this.middlewareStack.use(h(this.config)),this.middlewareStack.use(S(this.config,{httpAuthSchemeParametersProvider:W$,identityProviderConfigProvider:async e=>new St({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(E(this.config))}destroy(){super.destroy()}},GetCredentialsForIdentityCommand:RL,GetIdCommand:wL});const EL=async(e,t,n)=>({operation:f(t).operation,region:await g(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const CL=e=>{const t=[];if("AssumeRoleWithWebIdentity"===e.operation)t.push({schemeId:"smithy.api#noAuth"});else t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e));return t},bL=e=>{const t=(n=e,Object.assign(n,{stsClientCtor:pk}));var n;const r=zn(t);return Object.assign(r,{authSchemePreference:g(e.authSchemePreference??[])})},TL={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"}};var PL="3.986.0";const AL="required",IL="type",xL="fn",OL="argv",DL="ref",$L=!1,ML=!0,LL="booleanEquals",kL="stringEquals",NL="sigv4",_L="us-east-1",UL="endpoint",FL="https://sts.{Region}.{PartitionResult#dnsSuffix}",GL="tree",BL="error",HL="getAttr",zL={[AL]:!1,[IL]:"string"},jL={[AL]:!0,default:!1,[IL]:"boolean"},qL={[DL]:"Endpoint"},VL={[xL]:"isSet",[OL]:[{[DL]:"Region"}]},WL={[DL]:"Region"},KL={[xL]:"aws.partition",[OL]:[WL],assign:"PartitionResult"},QL={[DL]:"UseFIPS"},ZL={[DL]:"UseDualStack"},YL={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:NL,signingName:"sts",signingRegion:_L}]},headers:{}},JL={},XL={conditions:[{[xL]:kL,[OL]:[WL,"aws-global"]}],[UL]:YL,[IL]:UL},ek={[xL]:LL,[OL]:[QL,!0]},tk={[xL]:LL,[OL]:[ZL,!0]},nk={[xL]:HL,[OL]:[{[DL]:"PartitionResult"},"supportsFIPS"]},rk={[DL]:"PartitionResult"},ik={[xL]:LL,[OL]:[!0,{[xL]:HL,[OL]:[rk,"supportsDualStack"]}]},sk=[{[xL]:"isSet",[OL]:[qL]}],ok=[ek],ak=[tk],ck={parameters:{Region:zL,UseDualStack:jL,UseFIPS:jL,Endpoint:zL,UseGlobalEndpoint:jL},rules:[{conditions:[{[xL]:LL,[OL]:[{[DL]:"UseGlobalEndpoint"},ML]},{[xL]:"not",[OL]:sk},VL,KL,{[xL]:LL,[OL]:[QL,$L]},{[xL]:LL,[OL]:[ZL,$L]}],rules:[{conditions:[{[xL]:kL,[OL]:[WL,"ap-northeast-1"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"ap-south-1"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"ap-southeast-1"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"ap-southeast-2"]}],endpoint:YL,[IL]:UL},XL,{conditions:[{[xL]:kL,[OL]:[WL,"ca-central-1"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"eu-central-1"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"eu-north-1"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"eu-west-1"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"eu-west-2"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"eu-west-3"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"sa-east-1"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,_L]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"us-east-2"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"us-west-1"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"us-west-2"]}],endpoint:YL,[IL]:UL},{endpoint:{url:FL,properties:{authSchemes:[{name:NL,signingName:"sts",signingRegion:"{Region}"}]},headers:JL},[IL]:UL}],[IL]:GL},{conditions:sk,rules:[{conditions:ok,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[IL]:BL},{conditions:ak,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[IL]:BL},{endpoint:{url:qL,properties:JL,headers:JL},[IL]:UL}],[IL]:GL},{conditions:[VL],rules:[{conditions:[KL],rules:[{conditions:[ek,tk],rules:[{conditions:[{[xL]:LL,[OL]:[ML,nk]},ik],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:JL,headers:JL},[IL]:UL}],[IL]:GL},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[IL]:BL}],[IL]:GL},{conditions:ok,rules:[{conditions:[{[xL]:LL,[OL]:[nk,ML]}],rules:[{conditions:[{[xL]:kL,[OL]:[{[xL]:HL,[OL]:[rk,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:JL,headers:JL},[IL]:UL},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:JL,headers:JL},[IL]:UL}],[IL]:GL},{error:"FIPS is enabled but this partition does not support FIPS",[IL]:BL}],[IL]:GL},{conditions:ak,rules:[{conditions:[ik],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:JL,headers:JL},[IL]:UL}],[IL]:GL},{error:"DualStack is enabled but this partition does not support DualStack",[IL]:BL}],[IL]:GL},XL,{endpoint:{url:FL,properties:JL,headers:JL},[IL]:UL}],[IL]:GL}],[IL]:GL},{error:"Invalid Configuration: Missing Region",[IL]:BL}]},uk=new bt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),lk=(e,t={})=>uk.get(e,(()=>Yt(ck,{endpointParams:e,logger:t.logger})));xt.aws=rs;const dk=e=>{const t=Xi(e),n=()=>t().then(sr),r=(e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??O,base64Encoder:e?.base64Encoder??L,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??lk,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??CL,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new un},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Rt}],logger:e?.logger??new ur,protocol:e?.protocol??Ar,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??tn,utf8Decoder:e?.utf8Decoder??D,utf8Encoder:e?.utf8Encoder??M}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qn,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Qi({serviceId:r.serviceId,clientVersion:PL}),maxAttempts:e?.maxAttempts??3,region:e?.region??Yi("Region is missing"),requestHandler:H.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||si),sha256:e?.sha256??Ki,streamCollector:e?.streamCollector??z,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(_r)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Ur))}};let pk=class extends Yn{config;constructor(...[e]){const r=dk(e||{});super(r),this.initConfig=r;var i;const s=Ct((i=r,Object.assign(i,{useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,useGlobalEndpoint:i.useGlobalEndpoint??!1,defaultSigningName:"sts"}))),o=yi(s),a=Br(o),c=ri(a),l=((e,r)=>{const i=Object.assign(Os(e),or(e),t(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}})(e));return r.forEach((e=>e.configure(i))),Object.assign(e,Ds(i),ar(i),n(i),{httpAuthSchemes:(s=i).httpAuthSchemes(),httpAuthSchemeProvider:s.httpAuthSchemeProvider(),credentials:s.credentials()});var s})(bL(c),e?.extensions||[]);this.config=l,this.middlewareStack.use(re(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(Ci(this.config)),this.middlewareStack.use(jr(this.config)),this.middlewareStack.use(u(this.config)),this.middlewareStack.use(d(this.config)),this.middlewareStack.use(h(this.config)),this.middlewareStack.use(S(this.config,{httpAuthSchemeParametersProvider:EL,identityProviderConfigProvider:async e=>new St({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(E(this.config))}destroy(){super.destroy()}},hk=class e extends rr{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};const fk="AssumedRoleUser",gk="Credentials",mk="SourceIdentity",yk="awsQueryError",Sk="client",Rk="error",wk="httpError",vk="message",Ek="smithy.ts.sdk.synthetic.com.amazonaws.sts",Ck="com.amazonaws.sts";var bk=[0,Ck,"accessKeySecretType",8,0],Tk=[3,Ck,fk,0,["AssumedRoleId","Arn"],[0,0],2],Pk=[3,Ck,"AssumeRoleRequest",0,["RoleArn","RoleSessionName","PolicyArns","Policy","DurationSeconds","Tags","TransitiveTagKeys","ExternalId","SerialNumber","TokenCode",mk,"ProvidedContexts"],[0,0,()=>Gk,0,1,()=>Hk,64,0,0,0,0,()=>Bk],2],Ak=[3,Ck,"AssumeRoleResponse",0,[gk,fk,"PackedPolicySize",mk],[[()=>Ik,0],()=>Tk,1,0]],Ik=[3,Ck,gk,0,["AccessKeyId","SecretAccessKey","SessionToken","Expiration"],[0,[()=>bk,0],0,4],4],xk=[-3,Ck,"ExpiredTokenException",{[yk]:["ExpiredTokenException",400],[Rk]:Sk,[wk]:400},[vk],[0]];le.for(Ck).registerError(xk,class e extends hk{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}});var Ok=[-3,Ck,"IDPCommunicationErrorException",{[yk]:["IDPCommunicationError",400],[Rk]:Sk,[wk]:400},[vk],[0]];le.for(Ck).registerError(Ok,class e extends hk{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}});var Dk=[-3,Ck,"IDPRejectedClaimException",{[yk]:["IDPRejectedClaim",403],[Rk]:Sk,[wk]:403},[vk],[0]];le.for(Ck).registerError(Dk,class e extends hk{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}});var $k=[-3,Ck,"InvalidIdentityTokenException",{[yk]:["InvalidIdentityToken",400],[Rk]:Sk,[wk]:400},[vk],[0]];le.for(Ck).registerError($k,class e extends hk{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}});var Mk=[-3,Ck,"MalformedPolicyDocumentException",{[yk]:["MalformedPolicyDocument",400],[Rk]:Sk,[wk]:400},[vk],[0]];le.for(Ck).registerError(Mk,class e extends hk{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}});var Lk=[-3,Ck,"PackedPolicyTooLargeException",{[yk]:["PackedPolicyTooLarge",400],[Rk]:Sk,[wk]:400},[vk],[0]];le.for(Ck).registerError(Lk,class e extends hk{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}});var kk=[3,Ck,"PolicyDescriptorType",0,["arn"],[0]],Nk=[3,Ck,"ProvidedContext",0,["ProviderArn","ContextAssertion"],[0,0]],_k=[-3,Ck,"RegionDisabledException",{[yk]:["RegionDisabledException",403],[Rk]:Sk,[wk]:403},[vk],[0]];le.for(Ck).registerError(_k,class e extends hk{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}});var Uk=[3,Ck,"Tag",0,["Key","Value"],[0,0],2],Fk=[-3,Ek,"STSServiceException",0,[],[]];le.for(Ek).registerError(Fk,hk);var Gk=[1,Ck,"policyDescriptorListType",0,()=>kk],Bk=[1,Ck,"ProvidedContextsListType",0,()=>Nk],Hk=[1,Ck,"tagListType",0,()=>Uk],zk=[9,Ck,"AssumeRole",0,()=>Pk,()=>Ak];class jk extends(er.classBuilder().ep(TL).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(zk).build()){}var qk=Object.freeze({__proto__:null,AssumeRoleCommand:jk,STSClient:pk});const Vk=async(e,t,n)=>({operation:f(t).operation,region:await g(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Wk=e=>{const t=[];if("AssumeRoleWithWebIdentity"===e.operation)t.push({schemeId:"smithy.api#noAuth"});else t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e));return t},Kk=e=>{const t=(n=e,Object.assign(n,{stsClientCtor:FN}));var n;const r=zn(t);return Object.assign(r,{authSchemePreference:g(e.authSchemePreference??[])})},Qk={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"}};var Zk="3.985.0";const Yk=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Yk(t))return!1;return!0}return!!It(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!Pt(e)))};let Jk={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}]};const Xk={isVirtualHostableS3Bucket:Yk,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,s,o,...a]=t;if("arn"!==n||""===r||""===i||""===a.join(":"))return null;return{partition:r,service:i,region:s,accountId:o,resourceId:a.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=Jk;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}const n=t.find((e=>"aws"===e.id));if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};xt.aws=Xk;const eN="required",tN="type",nN="fn",rN="argv",iN="ref",sN=!1,oN=!0,aN="booleanEquals",cN="stringEquals",uN="sigv4",lN="us-east-1",dN="endpoint",pN="https://sts.{Region}.{PartitionResult#dnsSuffix}",hN="tree",fN="error",gN="getAttr",mN={[eN]:!1,[tN]:"string"},yN={[eN]:!0,default:!1,[tN]:"boolean"},SN={[iN]:"Endpoint"},RN={[nN]:"isSet",[rN]:[{[iN]:"Region"}]},wN={[iN]:"Region"},vN={[nN]:"aws.partition",[rN]:[wN],assign:"PartitionResult"},EN={[iN]:"UseFIPS"},CN={[iN]:"UseDualStack"},bN={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:uN,signingName:"sts",signingRegion:lN}]},headers:{}},TN={},PN={conditions:[{[nN]:cN,[rN]:[wN,"aws-global"]}],[dN]:bN,[tN]:dN},AN={[nN]:aN,[rN]:[EN,!0]},IN={[nN]:aN,[rN]:[CN,!0]},xN={[nN]:gN,[rN]:[{[iN]:"PartitionResult"},"supportsFIPS"]},ON={[iN]:"PartitionResult"},DN={[nN]:aN,[rN]:[!0,{[nN]:gN,[rN]:[ON,"supportsDualStack"]}]},$N=[{[nN]:"isSet",[rN]:[SN]}],MN=[AN],LN=[IN],kN={parameters:{Region:mN,UseDualStack:yN,UseFIPS:yN,Endpoint:mN,UseGlobalEndpoint:yN},rules:[{conditions:[{[nN]:aN,[rN]:[{[iN]:"UseGlobalEndpoint"},oN]},{[nN]:"not",[rN]:$N},RN,vN,{[nN]:aN,[rN]:[EN,sN]},{[nN]:aN,[rN]:[CN,sN]}],rules:[{conditions:[{[nN]:cN,[rN]:[wN,"ap-northeast-1"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"ap-south-1"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"ap-southeast-1"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"ap-southeast-2"]}],endpoint:bN,[tN]:dN},PN,{conditions:[{[nN]:cN,[rN]:[wN,"ca-central-1"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"eu-central-1"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"eu-north-1"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"eu-west-1"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"eu-west-2"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"eu-west-3"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"sa-east-1"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,lN]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"us-east-2"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"us-west-1"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"us-west-2"]}],endpoint:bN,[tN]:dN},{endpoint:{url:pN,properties:{authSchemes:[{name:uN,signingName:"sts",signingRegion:"{Region}"}]},headers:TN},[tN]:dN}],[tN]:hN},{conditions:$N,rules:[{conditions:MN,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[tN]:fN},{conditions:LN,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[tN]:fN},{endpoint:{url:SN,properties:TN,headers:TN},[tN]:dN}],[tN]:hN},{conditions:[RN],rules:[{conditions:[vN],rules:[{conditions:[AN,IN],rules:[{conditions:[{[nN]:aN,[rN]:[oN,xN]},DN],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:TN,headers:TN},[tN]:dN}],[tN]:hN},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[tN]:fN}],[tN]:hN},{conditions:MN,rules:[{conditions:[{[nN]:aN,[rN]:[xN,oN]}],rules:[{conditions:[{[nN]:cN,[rN]:[{[nN]:gN,[rN]:[ON,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:TN,headers:TN},[tN]:dN},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:TN,headers:TN},[tN]:dN}],[tN]:hN},{error:"FIPS is enabled but this partition does not support FIPS",[tN]:fN}],[tN]:hN},{conditions:LN,rules:[{conditions:[DN],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:TN,headers:TN},[tN]:dN}],[tN]:hN},{error:"DualStack is enabled but this partition does not support DualStack",[tN]:fN}],[tN]:hN},PN,{endpoint:{url:pN,properties:TN,headers:TN},[tN]:dN}],[tN]:hN}],[tN]:hN},{error:"Invalid Configuration: Missing Region",[tN]:fN}]},NN=new bt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),_N=(e,t={})=>NN.get(e,(()=>Yt(kN,{endpointParams:e,logger:t.logger})));xt.aws=Xk;const UN=e=>{const t=Xi(e),n=()=>t().then(sr),r=(e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??O,base64Encoder:e?.base64Encoder??L,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??_N,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Wk,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new un},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Rt}],logger:e?.logger??new ur,protocol:e?.protocol??Ar,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??tn,utf8Decoder:e?.utf8Decoder??D,utf8Encoder:e?.utf8Encoder??M}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qn,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Qi({serviceId:r.serviceId,clientVersion:Zk}),maxAttempts:e?.maxAttempts??3,region:e?.region??Yi("Region is missing"),requestHandler:H.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||si),sha256:e?.sha256??Ki,streamCollector:e?.streamCollector??z,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(_r)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Ur))}};class FN extends Yn{config;constructor(...[e]){const r=UN(e||{});super(r),this.initConfig=r;var i;const s=Ct((i=r,Object.assign(i,{useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,useGlobalEndpoint:i.useGlobalEndpoint??!1,defaultSigningName:"sts"}))),o=yi(s),a=Br(o),c=ri(a),l=((e,r)=>{const i=Object.assign(Os(e),or(e),t(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}})(e));return r.forEach((e=>e.configure(i))),Object.assign(e,Ds(i),ar(i),n(i),{httpAuthSchemes:(s=i).httpAuthSchemes(),httpAuthSchemeProvider:s.httpAuthSchemeProvider(),credentials:s.credentials()});var s})(Kk(c),e?.extensions||[]);this.config=l,this.middlewareStack.use(re(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(Ci(this.config)),this.middlewareStack.use(jr(this.config)),this.middlewareStack.use(u(this.config)),this.middlewareStack.use(d(this.config)),this.middlewareStack.use(h(this.config)),this.middlewareStack.use(S(this.config,{httpAuthSchemeParametersProvider:Vk,identityProviderConfigProvider:async e=>new St({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(E(this.config))}destroy(){super.destroy()}}class GN extends rr{constructor(e){super(e),Object.setPrototypeOf(this,GN.prototype)}}class BN extends GN{name="ExpiredTokenException";$fault="client";constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,BN.prototype)}}class HN extends GN{name="MalformedPolicyDocumentException";$fault="client";constructor(e){super({name:"MalformedPolicyDocumentException",$fault:"client",...e}),Object.setPrototypeOf(this,HN.prototype)}}class zN extends GN{name="PackedPolicyTooLargeException";$fault="client";constructor(e){super({name:"PackedPolicyTooLargeException",$fault:"client",...e}),Object.setPrototypeOf(this,zN.prototype)}}class jN extends GN{name="RegionDisabledException";$fault="client";constructor(e){super({name:"RegionDisabledException",$fault:"client",...e}),Object.setPrototypeOf(this,jN.prototype)}}class qN extends GN{name="IDPRejectedClaimException";$fault="client";constructor(e){super({name:"IDPRejectedClaimException",$fault:"client",...e}),Object.setPrototypeOf(this,qN.prototype)}}class VN extends GN{name="InvalidIdentityTokenException";$fault="client";constructor(e){super({name:"InvalidIdentityTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,VN.prototype)}}class WN extends GN{name="IDPCommunicationErrorException";$fault="client";constructor(e){super({name:"IDPCommunicationErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,WN.prototype)}}const KN="AssumedRoleUser",QN="Credentials",ZN="awsQueryError",YN="client",JN="error",XN="httpError",e_="message",t_="smithy.ts.sdk.synthetic.com.amazonaws.sts",n_="com.amazonaws.sts";var r_=[0,n_,"accessKeySecretType",8,0],i_=[0,n_,"clientTokenType",8,0],s_=[3,n_,KN,0,["AssumedRoleId","Arn"],[0,0],2],o_=[3,n_,"AssumeRoleWithWebIdentityRequest",0,["RoleArn","RoleSessionName","WebIdentityToken","ProviderId","PolicyArns","Policy","DurationSeconds"],[0,0,[()=>i_,0],0,()=>S_,0,1],3],a_=[3,n_,"AssumeRoleWithWebIdentityResponse",0,[QN,"SubjectFromWebIdentityToken",KN,"PackedPolicySize","Provider","Audience","SourceIdentity"],[[()=>c_,0],0,()=>s_,1,0,0,0]],c_=[3,n_,QN,0,["AccessKeyId","SecretAccessKey","SessionToken","Expiration"],[0,[()=>r_,0],0,4],4],u_=[-3,n_,"ExpiredTokenException",{[ZN]:["ExpiredTokenException",400],[JN]:YN,[XN]:400},[e_],[0]];le.for(n_).registerError(u_,BN);var l_=[-3,n_,"IDPCommunicationErrorException",{[ZN]:["IDPCommunicationError",400],[JN]:YN,[XN]:400},[e_],[0]];le.for(n_).registerError(l_,WN);var d_=[-3,n_,"IDPRejectedClaimException",{[ZN]:["IDPRejectedClaim",403],[JN]:YN,[XN]:403},[e_],[0]];le.for(n_).registerError(d_,qN);var p_=[-3,n_,"InvalidIdentityTokenException",{[ZN]:["InvalidIdentityToken",400],[JN]:YN,[XN]:400},[e_],[0]];le.for(n_).registerError(p_,VN);var h_=[-3,n_,"MalformedPolicyDocumentException",{[ZN]:["MalformedPolicyDocument",400],[JN]:YN,[XN]:400},[e_],[0]];le.for(n_).registerError(h_,HN);var f_=[-3,n_,"PackedPolicyTooLargeException",{[ZN]:["PackedPolicyTooLarge",400],[JN]:YN,[XN]:400},[e_],[0]];le.for(n_).registerError(f_,zN);var g_=[3,n_,"PolicyDescriptorType",0,["arn"],[0]],m_=[-3,n_,"RegionDisabledException",{[ZN]:["RegionDisabledException",403],[JN]:YN,[XN]:403},[e_],[0]];le.for(n_).registerError(m_,jN);var y_=[-3,t_,"STSServiceException",0,[],[]];le.for(t_).registerError(y_,GN);var S_=[1,n_,"policyDescriptorListType",0,()=>g_],R_=[9,n_,"AssumeRoleWithWebIdentity",0,()=>o_,()=>a_];class w_ extends(er.classBuilder().ep(Qk).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(R_).build()){}const v_=e=>"h2"===e?.metadata?.handlerProtocol,E_=(e,t)=>t?class extends e{constructor(e){super(e);for(const e of t)this.middlewareStack.use(e)}}:e;var C_=Object.freeze({__proto__:null,$Command:er,AssumeRoleWithWebIdentity$:R_,AssumeRoleWithWebIdentityCommand:w_,AssumeRoleWithWebIdentityRequest$:o_,AssumeRoleWithWebIdentityResponse$:a_,AssumedRoleUser$:s_,Credentials$:c_,ExpiredTokenException:BN,ExpiredTokenException$:u_,IDPCommunicationErrorException:WN,IDPCommunicationErrorException$:l_,IDPRejectedClaimException:qN,IDPRejectedClaimException$:d_,InvalidIdentityTokenException:VN,InvalidIdentityTokenException$:p_,MalformedPolicyDocumentException:HN,MalformedPolicyDocumentException$:h_,PackedPolicyTooLargeException:zN,PackedPolicyTooLargeException$:f_,PolicyDescriptorType$:g_,RegionDisabledException:jN,RegionDisabledException$:m_,STSClient:FN,STSServiceException:GN,STSServiceException$:y_,__Client:Yn,getDefaultRoleAssumerWithWebIdentity:(e={},t)=>((e,t)=>{let n;return async r=>{if(!n){const{logger:r=e?.parentClientConfig?.logger,profile:i=e?.parentClientConfig?.profile,region:s,requestHandler:o=e?.parentClientConfig?.requestHandler,credentialProviderLogger:a,userAgentAppId:c=e?.parentClientConfig?.userAgentAppId}=e,u=await(async(e,t,n)=>{const r="function"==typeof e?await e():e,i="function"==typeof t?await t():t;let s="";const o=r??i??(s=await(async()=>"us-east-1")());return n?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${r} (credential provider clientConfig)`,`${i} (contextual client)`,`${s} (STS default: AWS_REGION, profile region, or us-east-1)`),o})(s,e?.parentClientConfig?.region,a),l=!v_(o);n=new t({...e,userAgentAppId:c,profile:i,region:u,requestHandler:l?o:void 0,logger:r})}const{Credentials:i,AssumedRoleUser:s}=await n.send(new w_(r));if(!i||!i.AccessKeyId||!i.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${r.RoleArn}`);const o=(e=>{if("string"==typeof e?.Arn){const t=e.Arn.split(":");if(t.length>4&&""!==t[4])return t[4]}})(s),a={accessKeyId:i.AccessKeyId,secretAccessKey:i.SecretAccessKey,sessionToken:i.SessionToken,expiration:i.Expiration,...i.CredentialScope&&{credentialScope:i.CredentialScope},...o&&{accountId:o}};return o&&nn(a,"RESOLVED_ACCOUNT_ID","T"),nn(a,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),a}})(e,E_(FN,t))});e.$Command=er,e.AccessDeniedException=Ls,e.AccessDeniedException$=nc,e.AndroidApp$=rc,e.ApiKeyFilter$=ic,e.ApiKeyRestrictions$=sc,e.AppleApp$=oc,e.AssociateTrackerConsumer$=vp,e.AssociateTrackerConsumerCommand=Ah,e.AssociateTrackerConsumerRequest$=ac,e.AssociateTrackerConsumerResponse$=cc,e.BatchDeleteDevicePositionHistory$=Ep,e.BatchDeleteDevicePositionHistoryCommand=Ih,e.BatchDeleteDevicePositionHistoryError$=uc,e.BatchDeleteDevicePositionHistoryRequest$=lc,e.BatchDeleteDevicePositionHistoryResponse$=dc,e.BatchDeleteGeofence$=Cp,e.BatchDeleteGeofenceCommand=xh,e.BatchDeleteGeofenceError$=pc,e.BatchDeleteGeofenceRequest$=hc,e.BatchDeleteGeofenceResponse$=fc,e.BatchEvaluateGeofences$=bp,e.BatchEvaluateGeofencesCommand=Oh,e.BatchEvaluateGeofencesError$=gc,e.BatchEvaluateGeofencesRequest$=mc,e.BatchEvaluateGeofencesResponse$=yc,e.BatchGetDevicePosition$=Tp,e.BatchGetDevicePositionCommand=Dh,e.BatchGetDevicePositionError$=Sc,e.BatchGetDevicePositionRequest$=Rc,e.BatchGetDevicePositionResponse$=wc,e.BatchItemError$=vc,e.BatchPutGeofence$=Pp,e.BatchPutGeofenceCommand=$h,e.BatchPutGeofenceError$=Ec,e.BatchPutGeofenceRequest$=Cc,e.BatchPutGeofenceRequestEntry$=bc,e.BatchPutGeofenceResponse$=Tc,e.BatchPutGeofenceSuccess$=Pc,e.BatchUpdateDevicePosition$=Ap,e.BatchUpdateDevicePositionCommand=Mh,e.BatchUpdateDevicePositionError$=Ac,e.BatchUpdateDevicePositionRequest$=Ic,e.BatchUpdateDevicePositionResponse$=xc,e.CalculateRoute$=Ip,e.CalculateRouteCarModeOptions$=Oc,e.CalculateRouteCommand=Lh,e.CalculateRouteMatrix$=xp,e.CalculateRouteMatrixCommand=kh,e.CalculateRouteMatrixRequest$=Dc,e.CalculateRouteMatrixResponse$=$c,e.CalculateRouteMatrixSummary$=Mc,e.CalculateRouteRequest$=Lc,e.CalculateRouteResponse$=kc,e.CalculateRouteSummary$=Nc,e.CalculateRouteTruckModeOptions$=_c,e.CellSignals$=Uc,e.Circle$=Fc,e.ConflictException=ks,e.ConflictException$=Gc,e.CreateGeofenceCollection$=Op,e.CreateGeofenceCollectionCommand=Nh,e.CreateGeofenceCollectionRequest$=Bc,e.CreateGeofenceCollectionResponse$=Hc,e.CreateKey$=Dp,e.CreateKeyCommand=_h,e.CreateKeyRequest$=zc,e.CreateKeyResponse$=jc,e.CreateMap$=$p,e.CreateMapCommand=Uh,e.CreateMapRequest$=qc,e.CreateMapResponse$=Vc,e.CreatePlaceIndex$=Mp,e.CreatePlaceIndexCommand=Fh,e.CreatePlaceIndexRequest$=Wc,e.CreatePlaceIndexResponse$=Kc,e.CreateRouteCalculator$=Lp,e.CreateRouteCalculatorCommand=Gh,e.CreateRouteCalculatorRequest$=Qc,e.CreateRouteCalculatorResponse$=Zc,e.CreateTracker$=kp,e.CreateTrackerCommand=Bh,e.CreateTrackerRequest$=Yc,e.CreateTrackerResponse$=Jc,e.DataSourceConfiguration$=Xc,e.DeleteGeofenceCollection$=Np,e.DeleteGeofenceCollectionCommand=Hh,e.DeleteGeofenceCollectionRequest$=eu,e.DeleteGeofenceCollectionResponse$=tu,e.DeleteKey$=_p,e.DeleteKeyCommand=zh,e.DeleteKeyRequest$=nu,e.DeleteKeyResponse$=ru,e.DeleteMap$=Up,e.DeleteMapCommand=jh,e.DeleteMapRequest$=iu,e.DeleteMapResponse$=su,e.DeletePlaceIndex$=Fp,e.DeletePlaceIndexCommand=qh,e.DeletePlaceIndexRequest$=ou,e.DeletePlaceIndexResponse$=au,e.DeleteRouteCalculator$=Gp,e.DeleteRouteCalculatorCommand=Vh,e.DeleteRouteCalculatorRequest$=cu,e.DeleteRouteCalculatorResponse$=uu,e.DeleteTracker$=Bp,e.DeleteTrackerCommand=Wh,e.DeleteTrackerRequest$=lu,e.DeleteTrackerResponse$=du,e.DescribeGeofenceCollection$=Hp,e.DescribeGeofenceCollectionCommand=Kh,e.DescribeGeofenceCollectionRequest$=pu,e.DescribeGeofenceCollectionResponse$=hu,e.DescribeKey$=zp,e.DescribeKeyCommand=Qh,e.DescribeKeyRequest$=fu,e.DescribeKeyResponse$=gu,e.DescribeMap$=jp,e.DescribeMapCommand=Zh,e.DescribeMapRequest$=mu,e.DescribeMapResponse$=yu,e.DescribePlaceIndex$=qp,e.DescribePlaceIndexCommand=Yh,e.DescribePlaceIndexRequest$=Su,e.DescribePlaceIndexResponse$=Ru,e.DescribeRouteCalculator$=Vp,e.DescribeRouteCalculatorCommand=Jh,e.DescribeRouteCalculatorRequest$=wu,e.DescribeRouteCalculatorResponse$=vu,e.DescribeTracker$=Wp,e.DescribeTrackerCommand=Xh,e.DescribeTrackerRequest$=Eu,e.DescribeTrackerResponse$=Cu,e.DevicePosition$=bu,e.DevicePositionUpdate$=Tu,e.DeviceState$=Pu,e.DisassociateTrackerConsumer$=Kp,e.DisassociateTrackerConsumerCommand=ef,e.DisassociateTrackerConsumerRequest$=Au,e.DisassociateTrackerConsumerResponse$=Iu,e.ForecastGeofenceEvents$=Qp,e.ForecastGeofenceEventsCommand=tf,e.ForecastGeofenceEventsDeviceState$=Ou,e.ForecastGeofenceEventsRequest$=Du,e.ForecastGeofenceEventsResponse$=$u,e.ForecastedEvent$=xu,e.GeoMapsClient=Kg,e.GeoPlacesClient=nS,e.GeoRoutesClient=rC,e.GeofenceGeometry$=Mu,e.GetDevicePosition$=Zp,e.GetDevicePositionCommand=nf,e.GetDevicePositionHistory$=Yp,e.GetDevicePositionHistoryCommand=rf,e.GetDevicePositionHistoryRequest$=Lu,e.GetDevicePositionHistoryResponse$=ku,e.GetDevicePositionRequest$=Nu,e.GetDevicePositionResponse$=_u,e.GetGeofence$=Jp,e.GetGeofenceCommand=sf,e.GetGeofenceRequest$=Uu,e.GetGeofenceResponse$=Fu,e.GetMapGlyphs$=Xp,e.GetMapGlyphsCommand=of,e.GetMapGlyphsRequest$=Gu,e.GetMapGlyphsResponse$=Bu,e.GetMapSprites$=eh,e.GetMapSpritesCommand=af,e.GetMapSpritesRequest$=Hu,e.GetMapSpritesResponse$=zu,e.GetMapStyleDescriptor$=th,e.GetMapStyleDescriptorCommand=cf,e.GetMapStyleDescriptorRequest$=ju,e.GetMapStyleDescriptorResponse$=qu,e.GetMapTile$=nh,e.GetMapTileCommand=uf,e.GetMapTileRequest$=Vu,e.GetMapTileResponse$=Wu,e.GetPlace$=rh,e.GetPlaceCommand=lf,e.GetPlaceRequest$=Ku,e.GetPlaceResponse$=Qu,e.InferredState$=Zu,e.InternalServerException=Ns,e.InternalServerException$=Yu,e.Leg$=Ju,e.LegGeometry$=Xu,e.ListDevicePositions$=ih,e.ListDevicePositionsCommand=df,e.ListDevicePositionsRequest$=el,e.ListDevicePositionsResponse$=tl,e.ListDevicePositionsResponseEntry$=nl,e.ListGeofenceCollections$=sh,e.ListGeofenceCollectionsCommand=pf,e.ListGeofenceCollectionsRequest$=rl,e.ListGeofenceCollectionsResponse$=il,e.ListGeofenceCollectionsResponseEntry$=sl,e.ListGeofenceResponseEntry$=ol,e.ListGeofences$=oh,e.ListGeofencesCommand=hf,e.ListGeofencesRequest$=al,e.ListGeofencesResponse$=cl,e.ListKeys$=ah,e.ListKeysCommand=ff,e.ListKeysRequest$=ul,e.ListKeysResponse$=ll,e.ListKeysResponseEntry$=dl,e.ListMaps$=ch,e.ListMapsCommand=gf,e.ListMapsRequest$=pl,e.ListMapsResponse$=hl,e.ListMapsResponseEntry$=fl,e.ListPlaceIndexes$=uh,e.ListPlaceIndexesCommand=mf,e.ListPlaceIndexesRequest$=gl,e.ListPlaceIndexesResponse$=ml,e.ListPlaceIndexesResponseEntry$=yl,e.ListRouteCalculators$=lh,e.ListRouteCalculatorsCommand=yf,e.ListRouteCalculatorsRequest$=Sl,e.ListRouteCalculatorsResponse$=Rl,e.ListRouteCalculatorsResponseEntry$=wl,e.ListTagsForResource$=dh,e.ListTagsForResourceCommand=Sf,e.ListTagsForResourceRequest$=vl,e.ListTagsForResourceResponse$=El,e.ListTrackerConsumers$=ph,e.ListTrackerConsumersCommand=Rf,e.ListTrackerConsumersRequest$=Cl,e.ListTrackerConsumersResponse$=bl,e.ListTrackers$=hh,e.ListTrackersCommand=wf,e.ListTrackersRequest$=Tl,e.ListTrackersResponse$=Pl,e.ListTrackersResponseEntry$=Al,e.Location=Wf,e.LocationClient=$s,e.LocationServiceException=Ms,e.LocationServiceException$=Ad,e.LteCellDetails$=Il,e.LteLocalId$=xl,e.LteNetworkMeasurements$=Ol,e.MapConfiguration$=Dl,e.MapConfigurationUpdate$=$l,e.Place$=Ml,e.PlaceGeometry$=Ll,e.PositionalAccuracy$=kl,e.PutGeofence$=fh,e.PutGeofenceCommand=vf,e.PutGeofenceRequest$=Nl,e.PutGeofenceResponse$=_l,e.ResourceNotFoundException=Gs,e.ResourceNotFoundException$=Ul,e.RouteMatrixEntry$=Fl,e.RouteMatrixEntryError$=Gl,e.SearchForPositionResult$=Bl,e.SearchForSuggestionsResult$=Hl,e.SearchForTextResult$=zl,e.SearchPlaceIndexForPosition$=gh,e.SearchPlaceIndexForPositionCommand=Ef,e.SearchPlaceIndexForPositionRequest$=jl,e.SearchPlaceIndexForPositionResponse$=ql,e.SearchPlaceIndexForPositionSummary$=Vl,e.SearchPlaceIndexForSuggestions$=mh,e.SearchPlaceIndexForSuggestionsCommand=Cf,e.SearchPlaceIndexForSuggestionsRequest$=Wl,e.SearchPlaceIndexForSuggestionsResponse$=Kl,e.SearchPlaceIndexForSuggestionsSummary$=Ql,e.SearchPlaceIndexForText$=yh,e.SearchPlaceIndexForTextCommand=bf,e.SearchPlaceIndexForTextRequest$=Zl,e.SearchPlaceIndexForTextResponse$=Yl,e.SearchPlaceIndexForTextSummary$=Jl,e.ServiceQuotaExceededException=_s,e.ServiceQuotaExceededException$=Xl,e.Step$=ed,e.TagResource$=Sh,e.TagResourceCommand=Tf,e.TagResourceRequest$=td,e.TagResourceResponse$=nd,e.ThrottlingException=Us,e.ThrottlingException$=rd,e.TimeZone$=id,e.TrackingFilterGeometry$=sd,e.TruckDimensions$=od,e.TruckWeight$=ad,e.UntagResource$=Rh,e.UntagResourceCommand=Pf,e.UntagResourceRequest$=cd,e.UntagResourceResponse$=ud,e.UpdateGeofenceCollection$=wh,e.UpdateGeofenceCollectionCommand=Af,e.UpdateGeofenceCollectionRequest$=ld,e.UpdateGeofenceCollectionResponse$=dd,e.UpdateKey$=vh,e.UpdateKeyCommand=If,e.UpdateKeyRequest$=pd,e.UpdateKeyResponse$=hd,e.UpdateMap$=Eh,e.UpdateMapCommand=xf,e.UpdateMapRequest$=fd,e.UpdateMapResponse$=gd,e.UpdatePlaceIndex$=Ch,e.UpdatePlaceIndexCommand=Of,e.UpdatePlaceIndexRequest$=md,e.UpdatePlaceIndexResponse$=yd,e.UpdateRouteCalculator$=bh,e.UpdateRouteCalculatorCommand=Df,e.UpdateRouteCalculatorRequest$=Sd,e.UpdateRouteCalculatorResponse$=Rd,e.UpdateTracker$=Th,e.UpdateTrackerCommand=$f,e.UpdateTrackerRequest$=wd,e.UpdateTrackerResponse$=vd,e.ValidationException=Fs,e.ValidationException$=Ed,e.ValidationExceptionField$=Cd,e.VerifyDevicePosition$=Ph,e.VerifyDevicePositionCommand=Mf,e.VerifyDevicePositionRequest$=bd,e.VerifyDevicePositionResponse$=Td,e.WiFiAccessPoint$=Pd,e.__Client=Yn,e.fromCognitoIdentity=e=>Qf({...e}),e.fromCognitoIdentityPool=e=>function({accountId:e,cache:t=ng(),client:n,clientConfig:r,customRoleArn:i,identityPoolId:s,logins:o,userIdentifier:a=(o&&0!==Object.keys(o).length?void 0:"ANONYMOUS"),logger:c,parentClientConfig:u}){c?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const l=a?`aws:cognito-identity-credentials:${s}:${a}`:void 0;let d=async a=>{const{GetIdCommand:p,CognitoIdentityClient:h}=await Promise.resolve().then((function(){return vL})),f=e=>r?.[e]??u?.[e]??a?.callerClientConfig?.[e],g=n??new h(Object.assign({},r??{},{region:f("region"),profile:f("profile"),userAgentAppId:f("userAgentAppId")}));let m=l&&await t.getItem(l);if(!m){const{IdentityId:n=rg(c)}=await g.send(new p({AccountId:e,IdentityPoolId:s,Logins:o?await Kf(o):void 0}));m=n,l&&Promise.resolve(t.setItem(l,m)).catch((()=>{}))}return d=Qf({client:g,customRoleArn:i,logins:o,identityId:m}),d(a)};return e=>d(e).catch((async e=>{throw l&&Promise.resolve(t.removeItem(l)).catch((()=>{})),e}))}({...e}),e.fromHttp=(e={})=>{let t;e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");const n=e.credentialsFullUri;if(!n)throw new dn("No HTTP credential provider host provided.",{logger:e.logger});t=n;const r=new URL(t);((e,t)=>{if("https:"!==e.protocol&&"169.254.170.2"!==e.hostname&&"169.254.170.23"!==e.hostname&&"[fd00:ec2::23]"!==e.hostname){if(e.hostname.includes("[")){if("[::1]"===e.hostname||"[0000:0000:0000:0000:0000:0000:0000:0001]"===e.hostname)return}else{if("localhost"===e.hostname)return;const t=e.hostname.split("."),n=e=>{const t=parseInt(e,10);return 0<=t&&t<=255};if("127"===t[0]&&n(t[1])&&n(t[2])&&n(t[3])&&4===t.length)return}throw new dn("URL not accepted. It must either be HTTPS or match one of the following:\n - loopback CIDR 127.0.0.0/8 or [::1/128]\n - ECS container host 169.254.170.2\n - EKS container host 169.254.170.23 or [fd00:ec2::23]",{logger:t})}})(r,e.logger);const i=new H;return s=async()=>{const t=function(e){return new o({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce(((e,[t,n])=>(e[t]=n,e)),{}),fragment:e.hash})}(r);return e.authorizationToken&&(t.headers.Authorization=e.authorizationToken),async function(e,t){const n=K(e.body),r=await n.transformToString();if(200===e.statusCode){const e=JSON.parse(r);if("string"!=typeof e.AccessKeyId||"string"!=typeof e.SecretAccessKey||"string"!=typeof e.Token||"string"!=typeof e.Expiration)throw new dn("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:t});return{accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:Ae(e.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let n={};try{n=JSON.parse(r)}catch(e){}throw Object.assign(new dn(`Server responded with status: ${e.statusCode}`,{logger:t}),{Code:n.Code,Message:n.Message})}throw new dn(`Server responded with status: ${e.statusCode}`,{logger:t})}((await i.handle(t)).response)},a=e.maxRetries??3,c=e.timeout??1e3,async()=>{for(let e=0;e<a;++e)try{return await s()}catch(e){await new Promise((e=>setTimeout(e,c)))}return await s()};var s,a,c},e.fromTemporaryCredentials=(e,t,n)=>{let r;return async(i={})=>{const{callerClientConfig:s}=i,o=e.clientConfig?.profile??s?.profile,a=e.logger??s?.logger;a?.debug("@aws-sdk/credential-providers - fromTemporaryCredentials (STS)");const c={...e.params,RoleSessionName:e.params.RoleSessionName??"aws-sdk-js-"+Date.now()};if(c?.SerialNumber){if(!e.mfaCodeProvider)throw new dn("Temporary credential requires multi-factor authentication, but no MFA code callback was provided.",{tryNextLink:!1,logger:a});c.TokenCode=await e.mfaCodeProvider(c?.SerialNumber)}const{AssumeRoleCommand:u,STSClient:l}=await Promise.resolve().then((function(){return qk}));if(!r){const i="function"==typeof t?t():void 0,c=[e.masterCredentials,e.clientConfig?.credentials,void 0,s?.credentialDefaultProvider?.(),i];let u="STS client default credentials";if(c[0])u="options.masterCredentials";else if(c[1])u="options.clientConfig.credentials";else{if(c[2])throw u="caller client's credentials",new Error("fromTemporaryCredentials recursion in callerClientConfig.credentials");c[3]?u="caller client's credentialDefaultProvider":c[4]&&(u="AWS SDK default credentials")}const d=[e.clientConfig?.region,s?.region,await(n?.({profile:o})),"us-east-1"];let p="default partition's default region";d[0]?p="options.clientConfig.region":d[1]?p="caller client's region":d[2]&&(p="file or env region");const h=[ig(e.clientConfig?.requestHandler),ig(s?.requestHandler)];let f="STS default requestHandler";h[0]?f="options.clientConfig.requestHandler":h[1]&&(f="caller client's requestHandler"),a?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ${p}=${await C(sg(d))()}, ${u}, ${f}.`),r=new l({userAgentAppId:s?.userAgentAppId,...e.clientConfig,credentials:sg(c),logger:a,profile:o,region:sg(d),requestHandler:sg(h)})}if(e.clientPlugins)for(const t of e.clientPlugins)r.middlewareStack.use(t);const{Credentials:d}=await r.send(new u(c));if(!d||!d.AccessKeyId||!d.SecretAccessKey)throw new dn(`Invalid response from STS.assumeRole call with role ${c.RoleArn}`,{logger:a});return{accessKeyId:d.AccessKeyId,secretAccessKey:d.SecretAccessKey,sessionToken:d.SessionToken,expiration:d.Expiration,credentialScope:d.CredentialScope}}},e.fromWebToken=e=>(e=>async t=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:n,roleSessionName:r,webIdentityToken:i,providerId:s,policyArns:o,policy:a,durationSeconds:c}=e;let{roleAssumerWithWebIdentity:u}=e;if(!u){const{getDefaultRoleAssumerWithWebIdentity:n}=await Promise.resolve().then((function(){return C_}));u=n({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...t?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return u({RoleArn:n,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:i,ProviderId:s,PolicyArns:o,Policy:a,DurationSeconds:c})})({...e}),e.maps=my,e.paginateForecastGeofenceEvents=Lf,e.paginateGetDevicePositionHistory=kf,e.paginateListDevicePositions=Nf,e.paginateListGeofenceCollections=_f,e.paginateListGeofences=Uf,e.paginateListKeys=Ff,e.paginateListMaps=Gf,e.paginateListPlaceIndexes=Bf,e.paginateListRouteCalculators=Hf,e.paginateListTrackerConsumers=zf,e.paginateListTrackers=jf,e.places=bE,e.routes=q$,e.withAPIKey=cg.withAPIKey,e.withIdentityPoolId=cg.withIdentityPoolId}));