@allthings/cloud-toolkit 1.3.0-dev.2 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -10
- package/dist/lib.cjs.js +201 -6
- package/dist/lib.esm.js +201 -7
- package/dist/lib.umd.min.js +1 -1
- package/dist/src/aws/dynamodb.d.ts +47 -0
- package/dist/src/aws/dynamodb.test.d.ts +1 -0
- package/dist/src/aws/index.d.ts +1 -0
- package/dist/src/aws/parameterStore.d.ts +6 -2
- package/dist/src/index.d.ts +1 -1
- package/dist/src/logger/logger.d.ts +2 -1
- package/dist/src/logger/logger.test.d.ts +1 -0
- package/dist/src/utils.d.ts +2 -0
- package/package.json +7 -6
package/dist/lib.umd.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("events"),require("url"),require("util"),require("fs"),require("http"),require("https"),require("zlib"),require("stream"),require("net"),require("dns"),require("os"),require("path"),require("crypto"),require("tls"),require("child_process"),require("buffer"),require("string_decoder")):"function"==typeof define&&define.amd?define(["exports","events","url","util","fs","http","https","zlib","stream","net","dns","os","path","crypto","tls","child_process","buffer","string_decoder"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).allthings={},e.require$$0$9,e.require$$0$2,e.require$$0$7,e.require$$0$5,e.require$$0$4,e.require$$1,e.require$$3$1,e.require$$0$3,e.require$$7,e.require$$4,e.require$$0$6,e.require$$0$8,e.require$$2$1,e.require$$1$1,e.require$$0$a,e.require$$0$b,e.require$$1$2)}(this,(function(e,t,n,i,r,o,s,a,c,l,u,p,d,m,h,f,g,y){"use strict";const v=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 x,w,E,S,_;!function(e){e.HEADER="header",e.QUERY="query"}(x||(x={})),function(e){e.HEADER="header",e.QUERY="query"}(w||(w={})),function(e){e.HTTP="http",e.HTTPS="https"}(E||(E={})),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"}(_||(_={}));const O="__smithy_context";var C,k;!function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"}(C||(C={})),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(k||(k={}));class T{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 T({...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 T.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}}const A={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},I=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{if(!T.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),A)}}),R={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},M=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:l}=a,u=c??t.inputFilterSensitiveLog,p=l??t.outputFilterSensitiveLog,{$metadata:d,...m}=i.output;return s?.info?.({clientName:r,commandName:o,input:u(n.input),output:p(m),metadata:d}),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}}),R)}}),j="X-Amzn-Trace-Id",$={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},N=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{const{request:i}=n;if(!T.isInstance(i)||"node"!==e.runtime||i.headers.hasOwnProperty(j))return t(n);const r=[]._X_AMZN_TRACE_ID,o=e=>"string"==typeof e&&e.length>0;return o([].AWS_LAMBDA_FUNCTION_NAME)&&o(r)&&(i.headers[j]=r),t({...n,request:i})})(e),$)}}),D=e=>e[O]||(e[O]={}),L=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const z=(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=D(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:l={},signingProperties:u={}}=n.propertiesExtractor?.(e,i)||{};n.identityProperties=Object.assign(n.identityProperties||{},l),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)},F={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},U=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:i=>{i.addRelativeTo(z(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),F)}}),B={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},H={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function q(e,t,n){return{applyToStack:i=>{i.add(((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}})(e,n),B),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),H)}}}const V=e=>e=>{throw e},G=(e,t)=>{},W={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},K=e=>({applyToStack:e=>{e.addRelativeTo(((e,t)=>async n=>{if(!T.isInstance(n.request))return e(n);const i=D(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||V)(r));return(s.successHandler||G)(a.response,r),a}),W)}}),Y=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},Q=async(e,t,n,...i)=>await t.send(new e(n),...i);function J(e,t,n,i,r){return async function*(o,s,...a){let c,l=o.startingToken||void 0,u=!0;for(;u;){if(s[n]=l,r&&(s[r]=s[r]??o.pageSize),!(o.client instanceof e))throw new Error(`Invalid client, expected instance of ${e.name}`);c=await Q(t,o.client,s,...a),yield c;const p=l;l=X(c,i),u=!(!l||o.stopOnSameToken&&l===p)}}}const X=(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},Z={},ee=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);Z[n]=e,ee[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;Z[n]=i,ee[i]=n}for(let e=0;e<10;e++){Z[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;Z[t]=n,ee[n]=t}Z["+"]=62,ee[62]="+",Z["/"]=63,ee[63]="/";const te=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 Z))throw new TypeError(`Invalid character ${e[i]} in base64 string.`);n|=Z[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)},ne=e=>(new TextEncoder).encode(e),ie=e=>"string"==typeof e?ne(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),re=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 oe(e){let t;t="string"==typeof e?ne(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+=ee[(n&63<<t)>>t]}r+="==".slice(0,4-o)}return r}class se extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?se.mutate(te(e)):se.mutate(ne(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,se.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?oe(e):re(e)}(this,e)}}const ae=e=>encodeURIComponent(e).replace(/[!'()*]/g,ce),ce=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function le(e){const t=[];for(let n of Object.keys(e).sort()){const i=e[n];if(n=ae(n),Array.isArray(i))for(let e=0,r=i.length;e<r;e++)t.push(`${n}=${ae(i[e])}`);else{let e=n;(i||"string"==typeof i)&&(e+=`=${ae(i)}`),t.push(e)}}return t.join("&")}function ue(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 pe={supported:void 0};let de=class e{static create(t){return"function"==typeof t?.handle?t:new e(t)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===pe.supported&&(pe.supported=Boolean("undefined"!=typeof Request&&"keepalive"in new Request("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=le(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:l}=e,u=`${e.protocol}//${a}${e.hostname}${c?`:${c}`:""}${o}`,p="GET"===l||"HEAD"===l?void 0:e.body,d={body:p,headers:new Headers(e.headers),method:l,credentials:r};this.config?.cache&&(d.cache=this.config.cache),p&&(d.duplex="half"),"undefined"!=typeof AbortController&&(d.signal=t),pe.supported&&(d.keepalive=i),"function"==typeof this.config.requestInit&&Object.assign(d,this.config.requestInit(e));let m=()=>{};const h=new Request(u,d),f=[fetch(h).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})})))})),ue(n)];return t&&f.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}),m=()=>e.removeEventListener("abort",i)}else t.onabort=i}))),Promise.race(f).finally(m)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n=>(n[e]=t,n)))}httpHandlerConfigs(){return this.config??{}}};const me=async e=>"function"==typeof Blob&&e instanceof Blob?new Uint8Array(await e.arrayBuffer()):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 he={},fe={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),he[e]=t,fe[t]=e}function ge(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 fe))throw new Error(`Cannot decode unrecognized sequence ${i} as hexadecimal`);t[n/2]=fe[i]}return t}function ye(e){let t="";for(let n=0;n<e.byteLength;n++)t+=he[e[n]];return t}const ve=async(e=new Uint8Array,t)=>{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)};function be(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}class xe{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 T({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=we(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}}const we=(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=>be(e))).join("/"):be(t))}return e};class Ee{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)}}const Se=(_e=3e5,e=>Oe(e)&&e.expiration.getTime()-Date.now()<_e);var _e;const Oe=e=>void 0!==e.expiration,Ce=(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))};function ke(e){const t=Y(e.userAgentAppId??undefined);return{...e,customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent,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 Te{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 Pe=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}$"),Ae=e=>Pe.test(e)||e.startsWith("[")&&e.endsWith("]"),Ie=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Re=(e,t=!1)=>{if(!t)return Ie.test(e);const n=e.split(".");for(const e of n)if(!Re(e))return!1;return!0},Me={},je="endpoints";function $e(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${$e(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map($e).join(", ")})`:JSON.stringify(e,null,2)}class Ne extends Error{constructor(e){super(e),this.name="EndpointError"}}const De=(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 Ne(`Path: '${e}' does not end with ']'`);const r=i.slice(t+1,-1);if(Number.isNaN(parseInt(r)))throw new Ne(`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 Ne(`Index '${i}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(i)]:n[i]}),e),Le={[E.HTTP]:80,[E.HTTPS]:443},ze={booleanEquals:(e,t)=>e===t,getAttr:De,isSet:e=>null!=e,isValidHostLabel:Re,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:o,protocol:s,search:a}=t;if(a)return null;const c=s.slice(0,-1);if(!Object.values(E).includes(c))return null;const l=Ae(r);return{scheme:c,authority:`${i}${n.includes(`${i}:${Le[c]}`)||"string"==typeof e&&e.includes(`${i}:${Le[c]}`)?`:${Le[c]}`:""}`,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:l}},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()}`))},Fe=(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(De(i[e],t))}else n.push(i[s]);r=o+1}return n.join("")},Ue=(e,t,n)=>{if("string"==typeof e)return Fe(e,n);if(e.fn)return Be(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new Ne(`'${t}': ${String(e)} is not a string, function or reference.`)},Be=({fn:e,argv:t},n)=>{const i=t.map((e=>["boolean","number"].includes(typeof e)?e:Ue(e,"arg",n))),r=e.split(".");return r[0]in Me&&null!=r[1]?Me[r[0]][r[1]](...i):ze[e](...i)},He=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new Ne(`'${e}' is already defined in Reference Record.`);const i=Be(t,n);return n.logger?.debug?.(`${je} evaluateCondition: ${$e(t)} = ${$e(i)}`),{result:""===i||!!i,...null!=e&&{toAssign:{name:e,value:i}}}},qe=(e=[],t)=>{const n={};for(const i of e){const{result:e,toAssign:r}=He(i,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};r&&(n[r.name]=r.value,t.logger?.debug?.(`${je} assign: ${r.name} := ${$e(r.value)}`))}return{result:!0,referenceRecord:n}},Ve=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>({...e,[n]:i.map((e=>{const i=Ue(e,"Header value entry",t);if("string"!=typeof i)throw new Ne(`Header '${n}' value '${i}' is not a string`);return i}))})),{}),Ge=(e,t)=>{if(Array.isArray(e))return e.map((e=>Ge(e,t)));switch(typeof e){case"string":return Fe(e,t);case"object":if(null===e)throw new Ne(`Unexpected endpoint property: ${e}`);return We(e,t);case"boolean":return e;default:throw new Ne("Unexpected endpoint property type: "+typeof e)}},We=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>({...e,[n]:Ge(i,t)})),{}),Ke=(e,t)=>{const n=Ue(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 Ne("Endpoint URL must be a string, got "+typeof n)},Ye=(e,t)=>{const{conditions:n,endpoint:i}=e,{result:r,referenceRecord:o}=qe(n,t);if(!r)return;const s={...t,referenceRecord:{...t.referenceRecord,...o}},{url:a,properties:c,headers:l}=i;return t.logger?.debug?.(`${je} Resolving endpoint from template: ${$e(i)}`),{...null!=l&&{headers:Ve(l,s)},...null!=c&&{properties:We(c,s)},url:Ke(a,s)}},Qe=(e,t)=>{const{conditions:n,error:i}=e,{result:r,referenceRecord:o}=qe(n,t);if(r)throw new Ne(Ue(i,"Error",{...t,referenceRecord:{...t.referenceRecord,...o}}))},Je=(e,t)=>{const{conditions:n,rules:i}=e,{result:r,referenceRecord:o}=qe(n,t);if(r)return Xe(i,{...t,referenceRecord:{...t.referenceRecord,...o}})},Xe=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=Ye(n,t);if(e)return e}else if("error"===n.type)Qe(n,t);else{if("tree"!==n.type)throw new Ne(`Unknown endpoint rule: ${n}`);{const e=Je(n,t);if(e)return e}}throw new Ne("Rules evaluation failed")},Ze=(e,t)=>{const{endpointParams:n,logger:i}=t,{parameters:r,rules:o}=e;t.logger?.debug?.(`${je} Initial EndpointParams: ${$e(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 Ne(`Missing required parameter: '${e}'`);const c=Xe(o,{endpointParams:n,logger:i,referenceRecord:{}});return t.logger?.debug?.(`${je} Resolved endpoint: ${$e(c)}`),c},et=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!et(t))return!1;return!0}return!!Re(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!Ae(e)))};let tt={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)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"};const nt={isVirtualHostableS3Bucket:et,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}=tt;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 it(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}Me.aws=nt;const rt=e=>P.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,ot=e=>new Date(Date.now()+e),st=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(ot(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},at=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};let ct=class{async sign(e,t,n){if(!T.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await(async e=>{const t=at("context",e.context),n=at("config",e.config),i=t.endpointV2?.properties?.authSchemes?.[0],r=at("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:ot(r.systemClockOffset),signingRegion:s,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??rt(t.$response);if(n){const i=at("config",e.config),r=i.systemClockOffset;i.systemClockOffset=st(n,i.systemClockOffset);i.systemClockOffset!==r&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=rt(e);if(n){const e=at("config",t.config);e.systemClockOffset=st(n,e.systemClockOffset)}}};const lt=(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)},ut="X-Amz-Date",pt="X-Amz-Signature",dt="X-Amz-Security-Token",mt="authorization",ht=ut.toLowerCase(),ft=[mt,ht,"date"],gt=pt.toLowerCase(),yt="x-amz-content-sha256",vt=dt.toLowerCase(),bt={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},xt=/^proxy-/,wt=/^sec-/,Et="AWS4-HMAC-SHA256",St="AWS4-HMAC-SHA256-PAYLOAD",_t="aws4_request",Ot={},Ct=[],kt=(e,t,n)=>`${e}/${t}/${n}/${_t}`,Tt=(e,t,n)=>{const i=new e(t);return i.update(ie(n)),i.digest()},Pt=({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 bt||t?.has(o)||xt.test(o)||wt.test(o))&&(!n||n&&!n.has(o))||(i[o]=e[r].trim().replace(/\s+/g," "))}return i},At=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===yt)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(ie(t)),ye(await e.digest())}var i;return"UNSIGNED-PAYLOAD"};class It{format(e){const t=[];for(const n of Object.keys(e)){const i=ne(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=ne(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 l=new Uint8Array(9);return l[0]=8,l.set(jt.fromNumber(e.value.valueOf()).bytes,1),l;case"uuid":if(!Mt.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const u=new Uint8Array(17);return u[0]=9,u.set(ge(e.value.replace(/\-/g,"")),1),u}}}var Rt;!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"}(Rt||(Rt={}));const Mt=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let jt=class e{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>0x8000000000000000||t<-0x8000000000000000)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let e=7,i=Math.abs(Math.round(t));e>-1&&i>0;e--,i/=256)n[e]=i;return t<0&&$t(n),new e(n)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&$t(e),parseInt(ye(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}};function $t(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const Nt=e=>{e=T.clone(e);for(const t of Object.keys(e.headers))ft.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Dt=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class Lt{constructor({applyChecksum:e,credentials:t,region:n,service:i,sha256:r,uriEscapePath:o=!0}){this.headerFormatter=new It,this.service=i,this.sha256=r,this.uriEscapePath=o,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=L(n),this.credentialProvider=L(t)}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:i=3600,unsignableHeaders:r,unhoistableHeaders:o,signableHeaders:s,hoistableHeaders:a,signingRegion:c,signingService:l}=t,u=await this.credentialProvider();this.validateResolvedCredentials(u);const p=c??await this.regionProvider(),{longDate:d,shortDate:m}=zt(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 h=kt(m,p,l??this.service),f=((e,t={})=>{const{headers:n,query:i={}}=T.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}})(Nt(e),{unhoistableHeaders:o,hoistableHeaders:a});u.sessionToken&&(f.query[dt]=u.sessionToken),f.query["X-Amz-Algorithm"]=Et,f.query["X-Amz-Credential"]=`${u.accessKeyId}/${h}`,f.query[ut]=d,f.query["X-Amz-Expires"]=i.toString(10);const g=Pt(f,r,s);return f.query["X-Amz-SignedHeaders"]=Ft(g),f.query[pt]=await this.getSignature(d,h,this.getSigningKey(u,p,m,l),this.createCanonicalRequest(f,g,await At(e,this.sha256))),f}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}=zt(n),l=kt(a,s,o??this.service),u=await At({headers:{},body:t},this.sha256),p=new this.sha256;p.update(e);const d=ye(await p.digest()),m=[St,c,l,i,d,u].join("\n");return this.signString(m,{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}=zt(t),a=new this.sha256(await this.getSigningKey(r,o,s,i));return a.update(ie(e)),ye(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=Nt(e),{longDate:l,shortDate:u}=zt(t),p=kt(u,a,o??this.service);c.headers[ht]=l,s.sessionToken&&(c.headers[vt]=s.sessionToken);const d=await At(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(yt,c.headers)&&this.applyChecksum&&(c.headers[yt]=d);const m=Pt(c,i,n),h=await this.getSignature(l,p,this.getSigningKey(s,a,u,o),this.createCanonicalRequest(c,m,d));return c.headers[mt]=`${Et} Credential=${s.accessKeyId}/${p}, SignedHeaders=${Ft(m)}, Signature=${h}`,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()===gt)continue;const r=ae(i);t.push(r);const o=e[i];"string"==typeof o?n[r]=`${r}=${ae(o)}`:Array.isArray(o)&&(n[r]=o.slice(0).reduce(((e,t)=>e.concat([`${r}=${ae(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(ie(n));const r=await i.digest();return`${Et}\n${e}\n${t}\n${ye(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 ae(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(ie(r)),ye(await o.digest())}getSigningKey(e,t,n,i){return(async(e,t,n,i,r)=>{const o=`${n}:${i}:${r}:${ye(await Tt(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(o in Ot)return Ot[o];for(Ct.push(o);Ct.length>50;)delete Ot[Ct.shift()];let s=`AWS4${t.secretAccessKey}`;for(const t of[n,i,r,_t])s=await Tt(e,s,t);return Ot[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 zt=e=>{const t=(n=e,Dt(n).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var n;return{longDate:t,shortDate:t.slice(0,8)}},Ft=e=>Object.keys(e).sort().join(";"),Ut=e=>{let t,n=!1;e.credentials&&(n=!0,t=Ce(e.credentials,Se,Oe)),t||(t=e.credentialDefaultProvider?Y(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?Y(e.signer):e.regionInfoProvider?()=>Y(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([n,r])=>{const{signingRegion:s,signingService:a}=n;e.signingRegion=e.signingRegion||s||r,e.signingName=e.signingName||a||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Lt)(c)})):async n=>{const r=(n=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await Y(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||Lt)(a)},{...e,systemClockOffset:r,signingEscapePath:i,credentials:n?async()=>t().then((e=>{return n="CREDENTIALS_CODE",i="e",(t=e).$source||(t.$source={}),t.$source[n]=i,t;var t,n,i})):t,signer:s}},Bt=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},Ht=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,qt=()=>{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 Bt(t.name,t.aliases))s[e]=t;i.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of Bt(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 ${Ht(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)=>Vt[t.step]-Vt[e.step]||Gt[t.priority||"normal"]-Gt[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=Bt(r,s);if(c.length>0){if(c.some((e=>i.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${Ht(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(`"${Ht(i.name,i.aliases)}" middleware with ${i.priority} priority in ${i.step} step cannot be overridden by "${Ht(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=Bt(r,s);if(c.length>0){if(c.some((e=>i.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${Ht(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(`"${Ht(i.name,i.aliases)}" middleware ${i.relation} "${i.toMiddleware}" middleware cannot be overridden by "${Ht(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(qt()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let r=!1;const o=e=>{const t=Bt(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 Bt(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=Bt(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(qt());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 Ht(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},Vt={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Gt={high:3,normal:2,low:1};class Wt{constructor(e){this.config=e,this.middlewareStack=qt()}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 Kt{constructor(){this.middlewareStack=qt()}static classBuilder(){return new Yt}resolveMiddlewareWithContext(e,t,n,{middlewareFn:i,clientName:r,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,smithyContext:c,additionalContext:l,CommandCtor:u}){for(const r of i.bind(this)(u,e,t,n))this.middlewareStack.use(r);const p=e.concat(this.middlewareStack),{logger:d}=t,m={logger:d,clientName:r,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,[O]:{commandInstance:this,...c},...l},{requestHandler:h}=t;return p.resolve((e=>h.handle(e.request,n||{})),m)}}class Yt{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 Kt{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 Qt="***SensitiveInformation***",Jt=e=>{switch(e){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${e}"`)}},Xt=e=>{if(null!=e){if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&fn.warn(hn(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},Zt=Math.ceil(2**127*(2-2**-23)),en=e=>{const t=Xt(e);if(void 0!==t&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>Zt)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},tn=e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},nn=e=>on(e,16),rn=e=>on(e,8),on=(e,t)=>{const n=tn(e);if(void 0!==n&&sn(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},sn=(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]}},an=(e,t)=>{if(null==e)throw new TypeError("Expected a non-null value");return e},cn=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return fn.warn(hn(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},ln=e=>Xt("string"==typeof e?dn(e):e),un=ln,pn=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,dn=e=>{const t=e.match(pn);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},mn=e=>tn("string"==typeof e?dn(e):e),hn=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),fn={warn:console.warn},gn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],yn=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),vn=e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=yn.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[n,i,r,o,s,a,c,l,u]=t,p=(e=>nn("string"==typeof e?dn(e):e))(Cn(i)),d=Sn(r,"month",1,12),m=Sn(o,"day",1,31),h=bn(p,d,m,{hours:s,minutes:a,seconds:c,fractionalMilliseconds:l});return"Z"!=u.toUpperCase()&&h.setTime(h.getTime()-On(u)),h},bn=(e,t,n,i)=>{const r=t-1;return wn(e,r,n),new Date(Date.UTC(e,r,n,Sn(i.hours,"hour",0,23),Sn(i.minutes,"minute",0,59),Sn(i.seconds,"seconds",0,60),_n(i.fractionalMilliseconds)))},xn=[31,28,31,30,31,30,31,31,30,31,30,31],wn=(e,t,n)=>{let i=xn[t];if(1===t&&En(e)&&(i=29),n>i)throw new TypeError(`Invalid day for ${gn[t]} in ${e}: ${n}`)},En=e=>e%4==0&&(e%100!=0||e%400==0),Sn=(e,t,n,i)=>{const r=(e=>rn("string"==typeof e?dn(e):e))(Cn(e));if(r<n||r>i)throw new TypeError(`${t} must be between ${n} and ${i}, inclusive`);return r},_n=e=>null==e?0:1e3*(e=>en("string"==typeof e?dn(e):e))("0."+e),On=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)};let kn=class e extends Error{constructor(t){super(t.message),Object.setPrototypeOf(this,e.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}};const Tn=(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},Pn=e=>({output:t,parsedBody:n,errorCode:i})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:i})=>{const r=An(e),o=r.httpStatusCode?r.httpStatusCode+"":void 0,s=new n({name:t?.code||t?.Code||i||o||"UnknownError",$fault:"client",$metadata:r});throw Tn(s,t)})({output:t,parsedBody:n,exceptionCtor:e,errorCode:i})},An=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"]}),In=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{}}},Rn=e=>{const t=[];for(const n in S){const i=S[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}}},Mn=e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t},jn=e=>{let t=e.retryStrategy;return{setRetryStrategy(e){t=e},retryStrategy:()=>t}},$n=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},Nn=e=>({...Rn(e),...jn(e)}),Dn=e=>({...Mn(e),...$n(e)}),Ln=e=>Array.isArray(e)?e:[e],zn=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]=zn(e[n]));return e},Fn=e=>null!=e,Un=function(){const e=Object.getPrototypeOf(this).constructor,t=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(t,e.prototype),t};Un.prototype=Object.create(String.prototype,{constructor:{value:Un,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(Un,String);class Bn{trace(){}debug(){}info(){}warn(){}error(){}}function Hn(e,t,n){let i,r,o;if(void 0===t&&void 0===n)i={},o=e;else{if(i=e,"function"==typeof t)return r=t,o=n,Vn(i,r,o);o=t}for(const e of Object.keys(o))Array.isArray(o[e])?Gn(i,null,o,e):i[e]=o[e];return i}const qn=(e,t)=>{const n={};for(const i in t)Gn(n,e,t,i);return n},Vn=(e,t,n)=>Hn(e,Object.entries(n).reduce(((e,[n,i])=>(Array.isArray(i)?e[n]=i:e[n]="function"==typeof i?[t,i()]:[t,i],e)),{})),Gn=(e,t,n,i)=>{if(null!==t){let r=n[i];"function"==typeof r&&(r=[,r]);const[o=Wn,s=Kn,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)}},Wn=e=>null!=e,Kn=e=>e,Yn=e=>e.toISOString().replace(".000Z","Z"),Qn=e=>{if(null==e)return{};if(Array.isArray(e))return e.filter((e=>null!=e)).map(Qn);if("object"==typeof e){const t={};for(const n of Object.keys(e))null!=e[n]&&(t[n]=Qn(e[n]));return t}return e},Jn=(e,t)=>ve(e,t).then((e=>t.utf8Encoder(e))),Xn=async(e,t)=>{const n=await((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{}})))(e,t);return n.message=n.message??n.Message,n};var Zn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ei(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ti(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})})),n}var ni,ii,ri={},oi={};function si(){return ni||(ni=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}(oi)),oi}function ai(){if(ii)return ri;ii=1;const e=si(),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 p("InvalidXml","XML declaration allowed only at the start of the document.",m(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}ri.validate=function(o,s){s=Object.assign({},t,s);const c=[];let d=!1,h=!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 p("InvalidChar","char '"+o[t]+"' is not expected.",m(o,t))}{let g=t;if(t++,"!"===o[t]){t=r(o,t);continue}{let y=!1;"/"===o[t]&&(y=!0,t++);let v="";for(;t<o.length&&">"!==o[t]&&" "!==o[t]&&"\t"!==o[t]&&"\n"!==o[t]&&"\r"!==o[t];t++)v+=o[t];if(v=v.trim(),"/"===v[v.length-1]&&(v=v.substring(0,v.length-1),t--),f=v,!e.isName(f)){let e;return e=0===v.trim().length?"Invalid space after '<'.":"Tag '"+v+"' is an invalid name.",p("InvalidTag",e,m(o,t))}const b=a(o,t);if(!1===b)return p("InvalidAttr","Attributes for '"+v+"' have open quote.",m(o,t));let x=b.value;if(t=b.index,"/"===x[x.length-1]){const e=t-x.length;x=x.substring(0,x.length-1);const n=l(x,s);if(!0!==n)return p(n.err.code,n.err.msg,m(o,e+n.err.line));d=!0}else if(y){if(!b.tagClosed)return p("InvalidTag","Closing tag '"+v+"' doesn't have proper closing.",m(o,t));if(x.trim().length>0)return p("InvalidTag","Closing tag '"+v+"' can't have attributes or invalid starting.",m(o,g));if(0===c.length)return p("InvalidTag","Closing tag '"+v+"' has not been opened.",m(o,g));{const e=c.pop();if(v!==e.tagName){let t=m(o,e.tagStartPos);return p("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+t.line+", col "+t.col+") instead of closing tag '"+v+"'.",m(o,g))}0==c.length&&(h=!0)}}else{const e=l(x,s);if(!0!==e)return p(e.err.code,e.err.msg,m(o,t-x.length+e.err.line));if(!0===h)return p("InvalidXml","Multiple possible root nodes found.",m(o,t));-1!==s.unpairedTags.indexOf(v)||c.push({tagName:v,tagStartPos:g}),d=!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 p("InvalidChar","char '&' is not expected.",m(o,t));t=e}else if(!0===h&&!n(o[t]))return p("InvalidXml","Extra text at the end",m(o,t));"<"===o[t]&&t--}}}var f;return d?1==c.length?p("InvalidTag","Unclosed tag '"+c[0].tagName+"'.",m(o,c[0].tagStartPos)):!(c.length>0)||p("InvalidXml","Invalid '"+JSON.stringify(c.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):p("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 l(t,n){const i=e.getAllMatches(t,c),r={};for(let e=0;e<i.length;e++){if(0===i[e][1].length)return p("InvalidAttr","Attribute '"+i[e][2]+"' has no space in starting.",h(i[e]));if(void 0!==i[e][3]&&void 0===i[e][4])return p("InvalidAttr","Attribute '"+i[e][2]+"' is without value.",h(i[e]));if(void 0===i[e][3]&&!n.allowBooleanAttributes)return p("InvalidAttr","boolean attribute '"+i[e][2]+"' is not allowed.",h(i[e]));const t=i[e][2];if(!d(t))return p("InvalidAttr","Attribute '"+t+"' is an invalid name.",h(i[e]));if(r.hasOwnProperty(t))return p("InvalidAttr","Attribute '"+t+"' is repeated.",h(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 p(e,t,n){return{err:{code:e,msg:t,line:n.line||n,col:n.col}}}function d(t){return e.isName(t)}function m(e,t){const n=e.substring(0,t).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function h(e){return e.startIndex+e[1].length}return ri}var ci,li,ui,pi,di,mi,hi,fi,gi,yi={};function vi(){if(ui)return li;ui=1;return li=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 bi(){if(gi)return fi;gi=1;const e=si(),t=vi(),n=function(){if(di)return pi;di=1;const e=si();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 pi=function(e,c){const l={};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,p=!1,d=!1,m="";for(;c<e.length;c++)if("<"!==e[c]||d)if(">"===e[c]){if(d?"-"===e[c-1]&&"-"===e[c-2]&&(d=!1,u--):u--,0===u)break}else"["===e[c]?p=!0:m+=e[c];else{if(p&&i(e,c))c+=7,[entityName,val,c]=t(e,c+1),-1===val.indexOf("&")&&(l[a(entityName)]={regx:RegExp(`&${entityName};`,"g"),val:val});else if(p&&r(e,c))c+=8;else if(p&&o(e,c))c+=8;else if(p&&s(e,c))c+=9;else{if(!n)throw new Error("Invalid DOCTYPE");d=!0}u++,m=""}if(0!==u)throw new Error("Unclosed DOCTYPE")}return{entities:l,i:c}},pi}(),i=function(){if(hi)return mi;hi=1;const e=/^[-+]?0x[a-fA-F0-9]+$/,t=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const n={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};return mi=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(r.hex&&e.test(o))return Number.parseInt(o,16);{const e=t.exec(o);if(e){const t=e[1],n=e[2];let a=(s=e[3])&&-1!==s.indexOf(".")?("."===(s=s.replace(/0+$/,""))?s="0":"."===s[0]?s="0"+s:"."===s[s.length-1]&&(s=s.substr(0,s.length-1)),s):s;const c=e[4]||e[6];if(!r.leadingZeros&&n.length>0&&t&&"."!==o[2])return i;if(!r.leadingZeros&&n.length>0&&!t&&"."!==o[1])return i;{const e=Number(o),s=""+e;return-1!==s.search(/[eE]/)||c?r.eNotation?e:i:-1!==o.indexOf(".")?"0"===s&&""===a||s===a||t&&s==="-"+a?e:i:n?a===s||t+a===s?e:i:o===s||o===t+s?e:i}}return i}var s},mi}();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 l=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=h(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=f(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=h(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=h(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=f(e,a,this.options.removeNSPrefix),c=n.tagName;const l=n.rawTagName;let u=n.tagExp,p=n.attrExpPresent,d=n.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&o&&"!xml"!==r.tagname&&(o=this.saveTextToParentTag(o,r,s,!1));const m=r;if(m&&-1!==this.options.unpairedTags.indexOf(m.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,l,d+1);if(!t)throw new Error(`Unexpected end of ${l}`);a=t.i,i=t.tagContent}const o=new t(c);c!==u&&p&&(o[":@"]=this.buildAttributesMap(u,s,c)),i&&(i=this.parseTextData(i,c,s,!0,p,!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&&p&&(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&&p&&(e[":@"]=this.buildAttributesMap(u,s,c)),this.addChild(r,e,s),r=e}o="",a=d}}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 p=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 d(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 m(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 h(e,t,n,i){const r=e.indexOf(t,n);if(-1===r)throw new Error(i);return r+t.length-1}function f(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,l=!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),l=c!==r.data.substr(e+1))}return{tagName:c,tagExp:o,closeIndex:s,attrExpPresent:l,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=h(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=h(e,"?>",n+1,"StopNode is not closed.")}else if("!--"===e.substr(n+1,3)){n=h(e,"--\x3e",n+3,"StopNode is not closed.")}else if("!["===e.substr(n+1,2)){n=h(e,"]]>",n,"StopNode is not closed.")-2}else{const i=f(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 fi=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=l,this.parseTextData=o,this.resolveNameSpace=s,this.buildAttributesMap=c,this.isItStopNode=m,this.replaceEntitiesValue=p,this.readStopNodeData=g,this.saveTextToParentTag=d,this.addChild=u}}}var xi,wi,Ei,Si,_i,Oi,Ci,ki,Ti,Pi={};function Ai(){if(xi)return Pi;function e(r,o,s){let a;const c={};for(let l=0;l<r.length;l++){const u=r[l],p=t(u);let d="";if(d=void 0===s?p:s+"."+p,p===o.textNodeName)void 0===a?a=u[p]:a+=""+u[p];else{if(void 0===p)continue;if(u[p]){let t=e(u[p],o,d);const r=i(t,o);u[":@"]?n(t,u[":@"],d,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[p]&&c.hasOwnProperty(p)?(Array.isArray(c[p])||(c[p]=[c[p]]),c[p].push(t)):o.isArray(p,d,r)?c[p]=[t]:c[p]=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 xi=1,Pi.prettify=function(t,n){return e(t,n)},Pi}function Ii(){if(Ei)return wi;Ei=1;const{buildOptions:e}=function(){if(ci)return yi;ci=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 yi.buildOptions=function(t){return Object.assign({},e,t)},yi.defaultOptions=e,yi}(),t=bi(),{prettify:n}=Ai(),i=ai();return wi=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 '
'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}}function Ri(){if(_i)return Si;_i=1;function e(o,s,a,c){let l="",u=!1;for(let p=0;p<o.length;p++){const d=o[p],m=t(d);if(void 0===m)continue;let h="";if(h=0===a.length?m:`${a}.${m}`,m===s.textNodeName){let e=d[m];i(h,s)||(e=s.tagValueProcessor(m,e),e=r(e,s)),u&&(l+=c),l+=e,u=!1;continue}if(m===s.cdataPropName){u&&(l+=c),l+=`<![CDATA[${d[m][0][s.textNodeName]}]]>`,u=!1;continue}if(m===s.commentPropName){l+=c+`\x3c!--${d[m][0][s.textNodeName]}--\x3e`,u=!0;continue}if("?"===m[0]){const e=n(d[":@"],s),t="?xml"===m?"":c;let i=d[m][0][s.textNodeName];i=0!==i.length?" "+i:"",l+=t+`<${m}${i}${e}?>`,u=!0;continue}let f=c;""!==f&&(f+=s.indentBy);const g=c+`<${m}${n(d[":@"],s)}`,y=e(d[m],s,h,f);-1!==s.unpairedTags.indexOf(m)?s.suppressUnpairedNode?l+=g+">":l+=g+"/>":y&&0!==y.length||!s.suppressEmptyNode?y&&y.endsWith(">")?l+=g+`>${y}${c}</${m}>`:(l+=g+">",y&&""!==c&&(y.includes("/>")||y.includes("</"))?l+=c+s.indentBy+y+c:l+=y,l+=`</${m}>`):l+=g+"/>",u=!0}return l}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 Si=function(t,n){let i="";return n.format&&n.indentBy.length>0&&(i="\n"),e(t,n,"",i)}}var Mi=function(){if(Ti)return ki;Ti=1;const e=ai(),t=Ii(),n=function(){if(Ci)return Oi;Ci=1;const e=Ri(),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:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],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},Oi=n}();return ki={XMLParser:t,XMLValidator:e,XMLBuilder:n}}();const ji=(e,t)=>Jn(e,t).then((e=>{if(e.length){const t=new Mi.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]),zn(o)}return{}})),$i=async(e,t)=>{const n=await ji(e,t);return n.Error&&(n.Error.message=n.Error.message??n.Error.Message),n},Ni=/\d{12}\.ddb/;const Di="user-agent",Li="x-amz-user-agent",zi=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Fi=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const Ui=e=>(t,n)=>async i=>{const{request:r}=i;if(!T.isInstance(r))return t(i);const{headers:o}=r,s=n?.userAgent?.map(Bi)||[],a=(await e.defaultUserAgentProvider()).map(Bi);await async function(e,t,n){const i=n.request;if("rpc-v2-cbor"===i?.headers?.["smithy-protocol"]&&it(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?it(e,"RETRY_MODE_ADAPTIVE","F"):it(e,"RETRY_MODE_STANDARD","E"):it(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(Ni)&&it(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":it(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":it(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":it(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const r=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(r?.$source){const t=r;t.accountId&&it(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,i]of Object.entries(t.$source??{}))it(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 l=e?.customUserAgent?.map(Bi)||[],u=await e.userAgentAppId();u&&a.push(Bi([`app/${u}`]));const p=[].concat([...a,...s,...l]).join(" "),d=[...a.filter((e=>e.startsWith("aws-sdk-"))),...l].join(" ");return"browser"!==e.runtime?(d&&(o[Li]=o[Li]?`${o[Di]} ${d}`:d),o[Di]=p):o[Li]=p,t({...i,request:r})},Bi=e=>{const t=e[0].split("/").map((e=>e.replace(zi,"-"))).join("/"),n=e[1]?.replace(Fi,"-"),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}`}}),"")},Hi={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},qi=e=>({applyToStack:t=>{t.add(Ui(e),Hi)}});var Vi;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(Vi||(Vi={}));const Gi=!1,Wi=!1,Ki=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),Yi=e=>Ki(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,Qi=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if("string"==typeof t)return Yi(t);const e=await t();return Yi(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!Ki(e)||("function"!=typeof n?Promise.resolve(!!n):n())}}},Ji="content-length";const Xi={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Zi=e=>({applyToStack:t=>{var n;t.add((n=e.bodyLengthChecker,e=>async t=>{const i=t.request;if(T.isInstance(i)){const{body:e,headers:t}=i;if(e&&-1===Object.keys(t).map((e=>e.toLowerCase())).indexOf(Ji))try{const t=n(e);i.headers={...i.headers,[Ji]:String(t)}}catch(e){}}return e({...t,request:i})}),Xi)}}),er=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,tr=/(\d+\.){3}\d+/,nr=/\.\./,ir=e=>er.test(e)&&!tr.test(e)&&!nr.test(e),rr=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},or=(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},sr=async e=>{};const ar=e=>{if("string"==typeof e)return ar(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}},cr=e=>"object"==typeof e?"url"in e?ar(e.url):e:ar(e),lr=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 or(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(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),rr(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!ir(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},ur=({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 sr(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(cr(e)))}const r=await lr(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=D(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})},pr={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:H.name},dr=(e,t)=>({applyToStack:n=>{n.addRelativeTo(ur({config:e,instructions:t}),pr)}}),mr=e=>{const t=e.tls??!0,{endpoint:n}=e,i=null!=n?async()=>cr(await L(n)()):void 0,r=!!n,o={...e,endpoint:i,tls:t,isCustomEndpoint:r,useDualstackEndpoint:L(e.useDualstackEndpoint??!1),useFipsEndpoint:L(e.useFipsEndpoint??!1)};let s;return o.serviceConfiguredEndpoint=async()=>(e.serviceId&&!s&&(s=sr(e.serviceId)),s),o};var hr;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(hr||(hr={}));const fr=hr.STANDARD,gr=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],yr=["TimeoutError","RequestTimeout","RequestTimeoutException"],vr=[500,502,503,504],br=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],xr=e=>429===e.$metadata?.httpStatusCode||gr.includes(e.name)||1==e.$retryable?.throttling,wr=e=>(e=>e.$metadata?.clockSkewCorrected)(e)||yr.includes(e.name)||br.includes(e?.code||"")||vr.includes(e.$metadata?.httpStatusCode||0);class Er{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(),xr(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 Sr=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(2e4,e),getRetryCost:()=>n});class _r{constructor(e){this.maxAttempts=e,this.mode=hr.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 Sr({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,Sr({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 Or{constructor(e,t){this.maxAttemptsProvider=e,this.mode=hr.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new Er,this.standardRetryStrategy=new _r(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 Cr;const kr=new Uint8Array(16);function Tr(){if(!Cr&&(Cr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Cr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Cr(kr)}const Pr=[];for(let e=0;e<256;++e)Pr.push((e+256).toString(16).slice(1));var Ar={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ir(e,t,n){if(Ar.randomUUID&&!t&&!e)return Ar.randomUUID();const i=(e=e||{}).random||(e.rng||Tr)();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 Rr=e=>{const{retryStrategy:t}=e,n=L(e.maxAttempts??3);return{...e,maxAttempts:n,retryStrategy:async()=>{if(t)return t;return await L(e.retryMode)()===hr.ADAPTIVE?new Or(n):new _r(n)}}},Mr=e=>e?.body instanceof ReadableStream,jr=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,$r=e=>{const t={error:e,errorType:Nr(e)},n=zr(e.$response);return n&&(t.retryAfterHint=n),t},Nr=e=>xr(e)?"THROTTLING":wr(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!wr(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",Dr={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Lr=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async i=>{let r=await e.retryStrategy();const o=await e.maxAttempts();if(!jr(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,l=0;const{request:u}=i,p=T.isInstance(u);for(p&&(u.headers["amz-sdk-invocation-id"]=Ir());;)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=l,{response:n,output:s}}catch(t){const i=$r(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&&Mr(u))throw(n.logger instanceof Bn?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=l,a}c=e.getRetryCount();const o=e.getRetryDelay();l+=o,await new Promise((e=>setTimeout(e,o)))}}var s})(e),Dr)}}),zr=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)},Fr=async(e,t,n)=>({operation:D(t).operation,region:await L(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Ur=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"lambda",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Br={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Hr="3.688.0";var qr="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function Vr(e){return e instanceof Uint8Array?e:"string"==typeof e?qr(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function Gr(e){return"string"==typeof e?0===e.length:0===e.byteLength}var Wr={name:"SHA-256"},Kr={name:"HMAC",hash:Wr},Yr=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 Qr={};function Jr(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:Qr}var Xr=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!Gr(e)){var t=Vr(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 Jr().crypto.subtle.sign(Kr,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):Gr(this.toHash)?Promise.resolve(Yr):Promise.resolve().then((function(){return Jr().crypto.subtle.digest(Wr,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){Jr().crypto.subtle.importKey("raw",Vr(e.secret),Kr,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))},e}();function Zr(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 eo(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 to=64,no=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]),io=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],ro=Math.pow(2,53)-1,oo=function(){function e(){this.state=Int32Array.from(io),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>ro)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===to&&(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%to>=56){for(var i=this.bufferLength;i<to;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],l=t[7],u=0;u<to;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 p=this.temp[u-2],d=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,m=((p=this.temp[u-15])>>>7|p<<25)^(p>>>18|p<<14)^p>>>3;this.temp[u]=(d+this.temp[u-7]|0)+(m+this.temp[u-16]|0)}var h=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&a^~s&c)|0)+(l+(no[u]+this.temp[u]|0)|0)|0,f=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&i^n&r^i&r)|0;l=c,c=a,a=s,s=o+h|0,o=r,r=i,i=n,n=h+f|0}t[0]+=n,t[1]+=i,t[2]+=r,t[3]+=o,t[4]+=s,t[5]+=a,t[6]+=c,t[7]+=l},e}(),so=function(){function e(e){this.secret=e,this.hash=new oo,this.reset()}return e.prototype.update=function(e){if(!Gr(e)&&!this.error)try{this.hash.update(Vr(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 Zr(this,void 0,void 0,(function(){return eo(this,(function(e){return[2,this.digestSync()]}))}))},e.prototype.reset=function(){if(this.hash=new oo,this.secret){this.outer=new oo;var e=function(e){var t=Vr(e);if(t.byteLength>to){var n=new oo;n.update(t),t=n.digest()}var i=new Uint8Array(to);return i.set(t),i}(this.secret),t=new Uint8Array(to);t.set(e);for(var n=0;n<to;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 ao=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function co(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&&ao.every((function(t){return"function"==typeof e[t]}))}(e.crypto.subtle)}var lo,uo=function(){function e(e){co(Jr())?this.hash=new Xr(e):this.hash=new so(e)}return e.prototype.update=function(e,t){this.hash.update(Vr(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),po={exports:{}};var mo=(lo||(lo=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 l=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 l=this.satisfies(n[c]);if(void 0!==l)return l}var u=a.default.find(s,(function(e){return t.isPlatform(e)}));if(u){var p=this.satisfies(n[u]);if(void 0!==p)return p}}if(o>0){var d=Object.keys(r),m=a.default.find(d,(function(e){return t.isBrowser(e,!0)}));if(void 0!==m)return this.compareVersion(r[m])}},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=l,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}})}(po)),po.exports),ho=ei(mo);const fo=({serviceId:e,clientVersion:t})=>async n=>{const i="undefined"!=typeof window&&window?.navigator?.userAgent?ho.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};var go,yo=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),r=i.next();!r.done;r=i.next()){var o=r.value;this.checksum=this.checksum>>>8^vo[255&(this.checksum^o)]}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),vo=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n<e.length;)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);class bo{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&&xo(t),new bo(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&xo(e),parseInt(ye(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function xo(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class wo{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const n of Object.keys(e)){const i=this.fromUtf8(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=this.fromUtf8(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 l=new Uint8Array(9);return l[0]=8,l.set(bo.fromNumber(e.value.valueOf()).bytes,1),l;case"uuid":if(!Io.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const u=new Uint8Array(17);return u[0]=9,u.set(ge(e.value.replace(/\-/g,"")),1),u}}parse(e){const t={};let n=0;for(;n<e.byteLength;){const i=e.getUint8(n++),r=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,i));switch(n+=i,e.getUint8(n++)){case 0:t[r]={type:Eo,value:!0};break;case 1:t[r]={type:Eo,value:!1};break;case 2:t[r]={type:So,value:e.getInt8(n++)};break;case 3:t[r]={type:_o,value:e.getInt16(n,!1)},n+=2;break;case 4:t[r]={type:Oo,value:e.getInt32(n,!1)},n+=4;break;case 5:t[r]={type:Co,value:new bo(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const i=e.getUint16(n,!1);n+=2,t[r]={type:ko,value:new Uint8Array(e.buffer,e.byteOffset+n,i)},n+=i;break;case 7:const o=e.getUint16(n,!1);n+=2,t[r]={type:To,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,o))},n+=o;break;case 8:t[r]={type:Po,value:new Date(new bo(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:const s=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,t[r]={type:Ao,value:`${ye(s.subarray(0,4))}-${ye(s.subarray(4,6))}-${ye(s.subarray(6,8))}-${ye(s.subarray(8,10))}-${ye(s.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}!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"}(go||(go={}));const Eo="boolean",So="byte",_o="short",Oo="integer",Co="long",ko="binary",To="string",Po="timestamp",Ao="uuid",Io=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Ro{constructor(e,t){this.headerMarshaller=new wo(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const n=this.headerMarshaller.format(e),i=n.byteLength+t.byteLength+16,r=new Uint8Array(i),o=new DataView(r.buffer,r.byteOffset,r.byteLength),s=new yo;return o.setUint32(0,i,!1),o.setUint32(4,n.byteLength,!1),o.setUint32(8,s.update(r.subarray(0,8)).digest(),!1),r.set(n,12),r.set(t,n.byteLength+12),o.setUint32(i-4,s.update(r.subarray(8,i-4)).digest(),!1),r}decode(e){const{headers:t,body:n}=function({byteLength:e,byteOffset:t,buffer:n}){if(e<16)throw new Error("Provided message too short to accommodate event stream message overhead");const i=new DataView(n,t,e),r=i.getUint32(0,!1);if(e!==r)throw new Error("Reported message length does not match received message length");const o=i.getUint32(4,!1),s=i.getUint32(8,!1),a=i.getUint32(e-4,!1),c=(new yo).update(new Uint8Array(n,t,8));if(s!==c.digest())throw new Error(`The prelude checksum specified in the message (${s}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(n,t+8,e-12)),a!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${a}`);return{headers:new DataView(n,t+8+4,o),body:new Uint8Array(n,t+8+4+o,r-o-16)}}(e);return{headers:this.headerMarshaller.parse(t),body:n}}formatHeaders(e){return this.headerMarshaller.format(e)}}class Mo{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.decoder.decode(e);yield t}}}class jo{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}class $o{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}class No{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}function Do(e,t){return async function(n){const{value:i}=n.headers[":message-type"];if("error"===i){const e=new Error(n.headers[":error-message"].value||"UnknownError");throw e.name=n.headers[":error-code"].value,e}if("exception"===i){const i=n.headers[":exception-type"].value,r={[i]:n},o=await e(r);if(o.$unknown){const e=new Error(t(n.body));throw e.name=i,e}throw o[i]}if("event"===i){const t={[n.headers[":event-type"].value]:n},i=await e(t);if(i.$unknown)return;return i}throw Error(`Unrecognizable event type: ${n.headers[":event-type"].value}`)}}let Lo=class{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new Ro(e,t),this.utfEncoder=e}deserialize(e,t){const n=function(e){let t=0,n=0,i=null,r=null;const o=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,n=4,i=new Uint8Array(e),new DataView(i.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const s=e[Symbol.asyncIterator]();for(;;){const{value:e,done:a}=await s.next();if(a){if(!t)return;if(t!==n)throw new Error("Truncated event message received.");return void(yield i)}const c=e.length;let l=0;for(;l<c;){if(!i){const t=c-l;r||(r=new Uint8Array(4));const i=Math.min(4-n,t);if(r.set(e.slice(l,l+i),n),n+=i,l+=i,n<4)break;o(new DataView(r.buffer).getUint32(0,!1)),r=null}const s=Math.min(t-n,c-l);i.set(e.slice(l,l+s),n),n+=s,l+=s,t&&t===n&&(yield i,i=null,t=0,n=0)}}}}}(e);return new $o({messageStream:new Mo({inputStream:n,decoder:this.eventStreamCodec}),deserializer:Do(t,this.utfEncoder)})}serialize(e,t){return new jo({messageStream:new No({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}};class zo{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new Lo({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n=Fo(e)?(i=e,{[Symbol.asyncIterator]:async function*(){const e=i.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)return;yield n}}finally{e.releaseLock()}}}):e;var i;return this.universalMarshaller.deserialize(n,t)}serialize(e,t){const n=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){const{done:n,value:i}=await t.next();if(n)return e.close();e.enqueue(i)}})})(n):n}}const Fo=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,Uo=e=>new zo(e),Bo=e=>()=>Promise.reject(e),Ho="function"==typeof TextEncoder?new TextEncoder:null,qo=e=>{if("string"==typeof e){if(Ho)return Ho.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}`)},Vo="required",Go="fn",Wo="argv",Ko="ref",Yo=!0,Qo="isSet",Jo="booleanEquals",Xo="error",Zo="endpoint",es="tree",ts="PartitionResult",ns={[Vo]:!1,type:"String"},is={[Vo]:!0,default:!1,type:"Boolean"},rs={[Ko]:"Endpoint"},os={[Go]:Jo,[Wo]:[{[Ko]:"UseFIPS"},!0]},ss={[Go]:Jo,[Wo]:[{[Ko]:"UseDualStack"},!0]},as={},cs={[Go]:"getAttr",[Wo]:[{[Ko]:ts},"supportsFIPS"]},ls={[Go]:Jo,[Wo]:[!0,{[Go]:"getAttr",[Wo]:[{[Ko]:ts},"supportsDualStack"]}]},us=[os],ps=[ss],ds=[{[Ko]:"Region"}],ms={version:"1.0",parameters:{Region:ns,UseDualStack:is,UseFIPS:is,Endpoint:ns},rules:[{conditions:[{[Go]:Qo,[Wo]:[rs]}],rules:[{conditions:us,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Xo},{conditions:ps,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Xo},{endpoint:{url:rs,properties:as,headers:as},type:Zo}],type:es},{conditions:[{[Go]:Qo,[Wo]:ds}],rules:[{conditions:[{[Go]:"aws.partition",[Wo]:ds,assign:ts}],rules:[{conditions:[os,ss],rules:[{conditions:[{[Go]:Jo,[Wo]:[Yo,cs]},ls],rules:[{endpoint:{url:"https://lambda-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:as,headers:as},type:Zo}],type:es},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Xo}],type:es},{conditions:us,rules:[{conditions:[{[Go]:Jo,[Wo]:[cs,Yo]}],rules:[{endpoint:{url:"https://lambda-fips.{Region}.{PartitionResult#dnsSuffix}",properties:as,headers:as},type:Zo}],type:es},{error:"FIPS is enabled but this partition does not support FIPS",type:Xo}],type:es},{conditions:ps,rules:[{conditions:[ls],rules:[{endpoint:{url:"https://lambda.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:as,headers:as},type:Zo}],type:es},{error:"DualStack is enabled but this partition does not support DualStack",type:Xo}],type:es},{endpoint:{url:"https://lambda.{Region}.{PartitionResult#dnsSuffix}",properties:as,headers:as},type:Zo}],type:es}],type:es},{error:"Invalid Configuration: Missing Region",type:Xo}]},hs=new Te({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),fs=(e,t={})=>hs.get(e,(()=>Ze(ms,{endpointParams:e,logger:t.logger})));Me.aws=nt;const gs=["in-region","cross-region","mobile","standard","legacy"],ys=({defaultsMode:e}={})=>lt((async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(vs()?"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 ${gs.join(", ")}, got ${t}`)}})),vs=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?ho.parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},bs=e=>{const t=ys(e),n=()=>t().then(In),i=(e=>({apiVersion:"2015-03-31",base64Decoder:e?.base64Decoder??te,base64Encoder:e?.base64Encoder??oe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??fs,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Ur,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new ct}],logger:e?.logger??new Bn,serviceId:e?.serviceId??"Lambda",urlParser:e?.urlParser??ar,utf8Decoder:e?.utf8Decoder??ne,utf8Encoder:e?.utf8Encoder??re}))(e);return{...i,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qo,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??fo({serviceId:i.serviceId,clientVersion:Hr}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??Uo,maxAttempts:e?.maxAttempts??3,region:e?.region??Bo("Region is missing"),requestHandler:de.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||fr),sha256:e?.sha256??uo,streamCollector:e?.streamCollector??me,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Gi)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Wi))}},xs=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}},ws=e=>({region:e.region()}),Es=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}},Ss=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});class _s extends Wt{constructor(...[e]){const t=bs(e||{});var n;const i=ke((n=t,{...n,useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,defaultSigningName:"lambda"})),r=Rr(i),o=Qi(r),s=mr(o);var a;const c=(e=>({...Ut(e)}))((a=s,{...a,eventStreamMarshaller:a.eventStreamSerdeProvider(a)})),l=((e,t)=>{const n={...xs(e),...Nn(e),...v(e),...Es(e)};return t.forEach((e=>e.configure(n))),{...e,...ws(n),...Dn(n),...b(n),...Ss(n)}})(c,e?.extensions||[]);super(l),this.config=l,this.middlewareStack.use(qi(this.config)),this.middlewareStack.use(Lr(this.config)),this.middlewareStack.use(Zi(this.config)),this.middlewareStack.use(I(this.config)),this.middlewareStack.use(M(this.config)),this.middlewareStack.use(N(this.config)),this.middlewareStack.use(U(this.config,{httpAuthSchemeParametersProvider:Fr,identityProviderConfigProvider:async e=>new Ee({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(K(this.config))}destroy(){super.destroy()}}class Os extends kn{constructor(e){super(e),Object.setPrototypeOf(this,Os.prototype)}}class Cs extends Os{constructor(e){super({name:"InvalidParameterValueException",$fault:"client",...e}),this.name="InvalidParameterValueException",this.$fault="client",Object.setPrototypeOf(this,Cs.prototype),this.Type=e.Type}}class ks extends Os{constructor(e){super({name:"PolicyLengthExceededException",$fault:"client",...e}),this.name="PolicyLengthExceededException",this.$fault="client",Object.setPrototypeOf(this,ks.prototype),this.Type=e.Type}}class Ts extends Os{constructor(e){super({name:"PreconditionFailedException",$fault:"client",...e}),this.name="PreconditionFailedException",this.$fault="client",Object.setPrototypeOf(this,Ts.prototype),this.Type=e.Type}}class Ps extends Os{constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),this.name="ResourceConflictException",this.$fault="client",Object.setPrototypeOf(this,Ps.prototype),this.Type=e.Type}}let As=class e extends Os{constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.Type=t.Type,this.Message=t.Message}};class Is extends Os{constructor(e){super({name:"ServiceException",$fault:"server",...e}),this.name="ServiceException",this.$fault="server",Object.setPrototypeOf(this,Is.prototype),this.Type=e.Type,this.Message=e.Message}}class Rs extends Os{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,Rs.prototype),this.retryAfterSeconds=e.retryAfterSeconds,this.Type=e.Type,this.Reason=e.Reason}}class Ms extends Os{constructor(e){super({name:"CodeSigningConfigNotFoundException",$fault:"client",...e}),this.name="CodeSigningConfigNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Ms.prototype),this.Type=e.Type,this.Message=e.Message}}class js extends Os{constructor(e){super({name:"CodeStorageExceededException",$fault:"client",...e}),this.name="CodeStorageExceededException",this.$fault="client",Object.setPrototypeOf(this,js.prototype),this.Type=e.Type}}class $s extends Os{constructor(e){super({name:"CodeVerificationFailedException",$fault:"client",...e}),this.name="CodeVerificationFailedException",this.$fault="client",Object.setPrototypeOf(this,$s.prototype),this.Type=e.Type,this.Message=e.Message}}class Ns extends Os{constructor(e){super({name:"InvalidCodeSignatureException",$fault:"client",...e}),this.name="InvalidCodeSignatureException",this.$fault="client",Object.setPrototypeOf(this,Ns.prototype),this.Type=e.Type,this.Message=e.Message}}let Ds=class e extends Os{constructor(t){super({name:"ResourceInUseException",$fault:"client",...t}),this.name="ResourceInUseException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.Type=t.Type,this.Message=t.Message}};class Ls extends Os{constructor(e){super({name:"ProvisionedConcurrencyConfigNotFoundException",$fault:"client",...e}),this.name="ProvisionedConcurrencyConfigNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Ls.prototype),this.Type=e.Type}}class zs extends Os{constructor(e){super({name:"EC2AccessDeniedException",$fault:"server",...e}),this.name="EC2AccessDeniedException",this.$fault="server",Object.setPrototypeOf(this,zs.prototype),this.Type=e.Type,this.Message=e.Message}}class Fs extends Os{constructor(e){super({name:"EC2ThrottledException",$fault:"server",...e}),this.name="EC2ThrottledException",this.$fault="server",Object.setPrototypeOf(this,Fs.prototype),this.Type=e.Type,this.Message=e.Message}}class Us extends Os{constructor(e){super({name:"EC2UnexpectedException",$fault:"server",...e}),this.name="EC2UnexpectedException",this.$fault="server",Object.setPrototypeOf(this,Us.prototype),this.Type=e.Type,this.Message=e.Message,this.EC2ErrorCode=e.EC2ErrorCode}}class Bs extends Os{constructor(e){super({name:"EFSIOException",$fault:"client",...e}),this.name="EFSIOException",this.$fault="client",Object.setPrototypeOf(this,Bs.prototype),this.Type=e.Type,this.Message=e.Message}}class Hs extends Os{constructor(e){super({name:"EFSMountConnectivityException",$fault:"client",...e}),this.name="EFSMountConnectivityException",this.$fault="client",Object.setPrototypeOf(this,Hs.prototype),this.Type=e.Type,this.Message=e.Message}}class qs extends Os{constructor(e){super({name:"EFSMountFailureException",$fault:"client",...e}),this.name="EFSMountFailureException",this.$fault="client",Object.setPrototypeOf(this,qs.prototype),this.Type=e.Type,this.Message=e.Message}}class Vs extends Os{constructor(e){super({name:"EFSMountTimeoutException",$fault:"client",...e}),this.name="EFSMountTimeoutException",this.$fault="client",Object.setPrototypeOf(this,Vs.prototype),this.Type=e.Type,this.Message=e.Message}}class Gs extends Os{constructor(e){super({name:"ENILimitReachedException",$fault:"server",...e}),this.name="ENILimitReachedException",this.$fault="server",Object.setPrototypeOf(this,Gs.prototype),this.Type=e.Type,this.Message=e.Message}}class Ws extends Os{constructor(e){super({name:"InvalidRequestContentException",$fault:"client",...e}),this.name="InvalidRequestContentException",this.$fault="client",Object.setPrototypeOf(this,Ws.prototype),this.Type=e.Type}}class Ks extends Os{constructor(e){super({name:"InvalidRuntimeException",$fault:"server",...e}),this.name="InvalidRuntimeException",this.$fault="server",Object.setPrototypeOf(this,Ks.prototype),this.Type=e.Type,this.Message=e.Message}}class Ys extends Os{constructor(e){super({name:"InvalidSecurityGroupIDException",$fault:"server",...e}),this.name="InvalidSecurityGroupIDException",this.$fault="server",Object.setPrototypeOf(this,Ys.prototype),this.Type=e.Type,this.Message=e.Message}}class Qs extends Os{constructor(e){super({name:"InvalidSubnetIDException",$fault:"server",...e}),this.name="InvalidSubnetIDException",this.$fault="server",Object.setPrototypeOf(this,Qs.prototype),this.Type=e.Type,this.Message=e.Message}}class Js extends Os{constructor(e){super({name:"InvalidZipFileException",$fault:"server",...e}),this.name="InvalidZipFileException",this.$fault="server",Object.setPrototypeOf(this,Js.prototype),this.Type=e.Type,this.Message=e.Message}}class Xs extends Os{constructor(e){super({name:"KMSAccessDeniedException",$fault:"server",...e}),this.name="KMSAccessDeniedException",this.$fault="server",Object.setPrototypeOf(this,Xs.prototype),this.Type=e.Type,this.Message=e.Message}}class Zs extends Os{constructor(e){super({name:"KMSDisabledException",$fault:"server",...e}),this.name="KMSDisabledException",this.$fault="server",Object.setPrototypeOf(this,Zs.prototype),this.Type=e.Type,this.Message=e.Message}}class ea extends Os{constructor(e){super({name:"KMSInvalidStateException",$fault:"server",...e}),this.name="KMSInvalidStateException",this.$fault="server",Object.setPrototypeOf(this,ea.prototype),this.Type=e.Type,this.Message=e.Message}}class ta extends Os{constructor(e){super({name:"KMSNotFoundException",$fault:"server",...e}),this.name="KMSNotFoundException",this.$fault="server",Object.setPrototypeOf(this,ta.prototype),this.Type=e.Type,this.Message=e.Message}}class na extends Os{constructor(e){super({name:"RecursiveInvocationException",$fault:"client",...e}),this.name="RecursiveInvocationException",this.$fault="client",Object.setPrototypeOf(this,na.prototype),this.Type=e.Type,this.Message=e.Message}}class ia extends Os{constructor(e){super({name:"RequestTooLargeException",$fault:"client",...e}),this.name="RequestTooLargeException",this.$fault="client",Object.setPrototypeOf(this,ia.prototype),this.Type=e.Type}}class ra extends Os{constructor(e){super({name:"ResourceNotReadyException",$fault:"server",...e}),this.name="ResourceNotReadyException",this.$fault="server",Object.setPrototypeOf(this,ra.prototype),this.Type=e.Type}}class oa extends Os{constructor(e){super({name:"SnapStartException",$fault:"client",...e}),this.name="SnapStartException",this.$fault="client",Object.setPrototypeOf(this,oa.prototype),this.Type=e.Type,this.Message=e.Message}}class sa extends Os{constructor(e){super({name:"SnapStartNotReadyException",$fault:"client",...e}),this.name="SnapStartNotReadyException",this.$fault="client",Object.setPrototypeOf(this,sa.prototype),this.Type=e.Type,this.Message=e.Message}}class aa extends Os{constructor(e){super({name:"SnapStartTimeoutException",$fault:"client",...e}),this.name="SnapStartTimeoutException",this.$fault="client",Object.setPrototypeOf(this,aa.prototype),this.Type=e.Type,this.Message=e.Message}}class ca extends Os{constructor(e){super({name:"SubnetIPAddressLimitReachedException",$fault:"server",...e}),this.name="SubnetIPAddressLimitReachedException",this.$fault="server",Object.setPrototypeOf(this,ca.prototype),this.Type=e.Type,this.Message=e.Message}}class la extends Os{constructor(e){super({name:"UnsupportedMediaTypeException",$fault:"client",...e}),this.name="UnsupportedMediaTypeException",this.$fault="client",Object.setPrototypeOf(this,la.prototype),this.Type=e.Type}}var ua;!function(e){e.visit=(e,t)=>void 0!==e.PayloadChunk?t.PayloadChunk(e.PayloadChunk):void 0!==e.InvokeComplete?t.InvokeComplete(e.InvokeComplete):t._(e.$unknown[0],e.$unknown[1])}(ua||(ua={}));const pa=e=>({...e,...e.Payload&&{Payload:Qt}}),da=e=>({...e,...e.Payload&&{Payload:Qt}}),ma=async(e,t)=>{const n=function(e,t){return new xe(e,t)}(e,t),i=Hn({},Fn,{"content-type":"application/octet-stream",[hc]:e[oc],[gc]:e[ac],[pc]:e[nc]});n.bp("/2015-03-31/functions/{FunctionName}/invocations"),n.p("FunctionName",(()=>e.FunctionName),"{FunctionName}",!1);const r=Hn({[cc]:[,e[cc]]});let o;return void 0!==e.Payload&&(o=e.Payload),n.m("POST").h(i).q(r).b(o),n.build()},ha=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return fa(e,t);const n=Hn({$metadata:tc(e),[rc]:[,e.headers[mc]],[sc]:[,e.headers[fc]],[ic]:[,e.headers[dc]]}),i=await ve(e.body,t);return n.Payload=i,Hn(n,{StatusCode:[,e.statusCode]}),n},fa=async(e,t)=>{const n={...e,body:await Xn(e.body,t)},i=((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})(e,n.body);switch(i){case"InvalidParameterValueException":case"com.amazonaws.lambda#InvalidParameterValueException":throw await Pa(n);case"PolicyLengthExceededException":case"com.amazonaws.lambda#PolicyLengthExceededException":throw await za(n);case"PreconditionFailedException":case"com.amazonaws.lambda#PreconditionFailedException":throw await Fa(n);case"ResourceConflictException":case"com.amazonaws.lambda#ResourceConflictException":throw await qa(n);case"ResourceNotFoundException":case"com.amazonaws.lambda#ResourceNotFoundException":throw await Ga(n);case"ServiceException":case"com.amazonaws.lambda#ServiceException":throw await Ka(n);case"TooManyRequestsException":case"com.amazonaws.lambda#TooManyRequestsException":throw await Za(n);case"CodeSigningConfigNotFoundException":case"com.amazonaws.lambda#CodeSigningConfigNotFoundException":throw await ya(n);case"CodeStorageExceededException":case"com.amazonaws.lambda#CodeStorageExceededException":throw await va(n);case"CodeVerificationFailedException":case"com.amazonaws.lambda#CodeVerificationFailedException":throw await ba(n);case"InvalidCodeSignatureException":case"com.amazonaws.lambda#InvalidCodeSignatureException":throw await Ta(n);case"ResourceInUseException":case"com.amazonaws.lambda#ResourceInUseException":throw await Va(n);case"ProvisionedConcurrencyConfigNotFoundException":case"com.amazonaws.lambda#ProvisionedConcurrencyConfigNotFoundException":throw await Ua(n);case"EC2AccessDeniedException":case"com.amazonaws.lambda#EC2AccessDeniedException":throw await xa(n);case"EC2ThrottledException":case"com.amazonaws.lambda#EC2ThrottledException":throw await wa(n);case"EC2UnexpectedException":case"com.amazonaws.lambda#EC2UnexpectedException":throw await Ea(n);case"EFSIOException":case"com.amazonaws.lambda#EFSIOException":throw await Sa(n);case"EFSMountConnectivityException":case"com.amazonaws.lambda#EFSMountConnectivityException":throw await _a(n);case"EFSMountFailureException":case"com.amazonaws.lambda#EFSMountFailureException":throw await Oa(n);case"EFSMountTimeoutException":case"com.amazonaws.lambda#EFSMountTimeoutException":throw await Ca(n);case"ENILimitReachedException":case"com.amazonaws.lambda#ENILimitReachedException":throw await ka(n);case"InvalidRequestContentException":case"com.amazonaws.lambda#InvalidRequestContentException":throw await Aa(n);case"InvalidRuntimeException":case"com.amazonaws.lambda#InvalidRuntimeException":throw await Ia(n);case"InvalidSecurityGroupIDException":case"com.amazonaws.lambda#InvalidSecurityGroupIDException":throw await Ra(n);case"InvalidSubnetIDException":case"com.amazonaws.lambda#InvalidSubnetIDException":throw await Ma(n);case"InvalidZipFileException":case"com.amazonaws.lambda#InvalidZipFileException":throw await ja(n);case"KMSAccessDeniedException":case"com.amazonaws.lambda#KMSAccessDeniedException":throw await $a(n);case"KMSDisabledException":case"com.amazonaws.lambda#KMSDisabledException":throw await Na(n);case"KMSInvalidStateException":case"com.amazonaws.lambda#KMSInvalidStateException":throw await Da(n);case"KMSNotFoundException":case"com.amazonaws.lambda#KMSNotFoundException":throw await La(n);case"RecursiveInvocationException":case"com.amazonaws.lambda#RecursiveInvocationException":throw await Ba(n);case"RequestTooLargeException":case"com.amazonaws.lambda#RequestTooLargeException":throw await Ha(n);case"ResourceNotReadyException":case"com.amazonaws.lambda#ResourceNotReadyException":throw await Wa(n);case"SnapStartException":case"com.amazonaws.lambda#SnapStartException":throw await Ya(n);case"SnapStartNotReadyException":case"com.amazonaws.lambda#SnapStartNotReadyException":throw await Qa(n);case"SnapStartTimeoutException":case"com.amazonaws.lambda#SnapStartTimeoutException":throw await Ja(n);case"SubnetIPAddressLimitReachedException":case"com.amazonaws.lambda#SubnetIPAddressLimitReachedException":throw await Xa(n);case"UnsupportedMediaTypeException":case"com.amazonaws.lambda#UnsupportedMediaTypeException":throw await ec(n);default:const t=n.body;return ga({output:e,parsedBody:t,errorCode:i})}},ga=Pn(Os),ya=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Ms({$metadata:tc(e),...n});return Tn(o,e.body)},va=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new js({$metadata:tc(e),...n});return Tn(o,e.body)},ba=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new $s({$metadata:tc(e),...n});return Tn(o,e.body)},xa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new zs({$metadata:tc(e),...n});return Tn(o,e.body)},wa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Fs({$metadata:tc(e),...n});return Tn(o,e.body)},Ea=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{EC2ErrorCode:cn,Message:cn,Type:cn});Object.assign(n,r);const o=new Us({$metadata:tc(e),...n});return Tn(o,e.body)},Sa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Bs({$metadata:tc(e),...n});return Tn(o,e.body)},_a=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Hs({$metadata:tc(e),...n});return Tn(o,e.body)},Oa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new qs({$metadata:tc(e),...n});return Tn(o,e.body)},Ca=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Vs({$metadata:tc(e),...n});return Tn(o,e.body)},ka=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Gs({$metadata:tc(e),...n});return Tn(o,e.body)},Ta=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Ns({$metadata:tc(e),...n});return Tn(o,e.body)},Pa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new Cs({$metadata:tc(e),...n});return Tn(o,e.body)},Aa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new Ws({$metadata:tc(e),...n});return Tn(o,e.body)},Ia=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Ks({$metadata:tc(e),...n});return Tn(o,e.body)},Ra=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Ys({$metadata:tc(e),...n});return Tn(o,e.body)},Ma=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Qs({$metadata:tc(e),...n});return Tn(o,e.body)},ja=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Js({$metadata:tc(e),...n});return Tn(o,e.body)},$a=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Xs({$metadata:tc(e),...n});return Tn(o,e.body)},Na=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Zs({$metadata:tc(e),...n});return Tn(o,e.body)},Da=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new ea({$metadata:tc(e),...n});return Tn(o,e.body)},La=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new ta({$metadata:tc(e),...n});return Tn(o,e.body)},za=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new ks({$metadata:tc(e),...n});return Tn(o,e.body)},Fa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new Ts({$metadata:tc(e),...n});return Tn(o,e.body)},Ua=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new Ls({$metadata:tc(e),...n});return Tn(o,e.body)},Ba=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new na({$metadata:tc(e),...n});return Tn(o,e.body)},Ha=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new ia({$metadata:tc(e),...n});return Tn(o,e.body)},qa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new Ps({$metadata:tc(e),...n});return Tn(o,e.body)},Va=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Ds({$metadata:tc(e),...n});return Tn(o,e.body)},Ga=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new As({$metadata:tc(e),...n});return Tn(o,e.body)},Wa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new ra({$metadata:tc(e),...n});return Tn(o,e.body)},Ka=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Is({$metadata:tc(e),...n});return Tn(o,e.body)},Ya=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new oa({$metadata:tc(e),...n});return Tn(o,e.body)},Qa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new sa({$metadata:tc(e),...n});return Tn(o,e.body)},Ja=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new aa({$metadata:tc(e),...n});return Tn(o,e.body)},Xa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new ca({$metadata:tc(e),...n});return Tn(o,e.body)},Za=async(e,t)=>{const n=Hn({[lc]:[,e.headers[uc]]}),i=e.body,r=qn(i,{Reason:cn,Type:cn,message:cn});Object.assign(n,r);const o=new Rs({$metadata:tc(e),...n});return Tn(o,e.body)},ec=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new la({$metadata:tc(e),...n});return Tn(o,e.body)},tc=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"]}),nc="ClientContext",ic="ExecutedVersion",rc="FunctionError",oc="InvocationType",sc="LogResult",ac="LogType",cc="Qualifier",lc="retryAfterSeconds",uc="retry-after",pc="x-amz-client-context",dc="x-amz-executed-version",mc="x-amz-function-error",hc="x-amz-invocation-type",fc="x-amz-log-result",gc="x-amz-log-type";class yc extends(Kt.classBuilder().ep(Br).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("AWSGirApiService","Invoke",{}).n("LambdaClient","InvokeCommand").f(pa,da).ser(ma).de(ha).build()){}const vc=e=>new Promise((t=>setTimeout(t,1e3*e))),bc={minDelay:2,maxDelay:120};var xc;!function(e){e.ABORTED="ABORTED",e.FAILURE="FAILURE",e.SUCCESS="SUCCESS",e.RETRY="RETRY",e.TIMEOUT="TIMEOUT"}(xc||(xc={}));const wc=(e,t,n,i)=>{if(i>n)return t;return Ec(e,e*2**(i-1))},Ec=(e,t)=>e+Math.random()*(t-e),Sc=async({minDelay:e,maxDelay:t,maxWaitTime:n,abortController:i,client:r,abortSignal:o},s,a)=>{const{state:c,reason:l}=await a(r,s);if(c!==xc.RETRY)return{state:c,reason:l};let u=1;const p=Date.now()+1e3*n,d=Math.log(t/e)/Math.log(2)+1;for(;;){if(i?.signal?.aborted||o?.aborted)return{state:xc.ABORTED};const n=wc(e,t,d,u);if(Date.now()+1e3*n>p)return{state:xc.TIMEOUT};await vc(n);const{state:c,reason:l}=await a(r,s);if(c!==xc.RETRY)return{state:c,reason:l};u+=1}},_c=async e=>new Promise((t=>{const n=()=>t({state:xc.ABORTED});"function"==typeof e.addEventListener?e.addEventListener("abort",n):e.onabort=n})),Oc=async(e,t,n)=>{const i={...bc,...e};(e=>{if(e.maxWaitTime<1)throw new Error("WaiterConfiguration.maxWaitTime must be greater than 0");if(e.minDelay<1)throw new Error("WaiterConfiguration.minDelay must be greater than 0");if(e.maxDelay<1)throw new Error("WaiterConfiguration.maxDelay must be greater than 0");if(e.maxWaitTime<=e.minDelay)throw new Error(`WaiterConfiguration.maxWaitTime [${e.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`);if(e.maxDelay<e.minDelay)throw new Error(`WaiterConfiguration.maxDelay [${e.maxDelay}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`)})(i);const r=[Sc(i,t,n)];return e.abortController&&r.push(_c(e.abortController.signal)),e.abortSignal&&r.push(_c(e.abortSignal)),Promise.race(r)},Cc={region:"eu-central-2"};const kc={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Tc=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{if(!T.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),kc)}}),Pc={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Ac="X-Amzn-Trace-Id",Ic={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Rc=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{const{request:i}=n;if(!T.isInstance(i)||"node"!==e.runtime||i.headers.hasOwnProperty(Ac))return t(n);const r=[]._X_AMZN_TRACE_ID,o=e=>"string"==typeof e&&e.length>0;return o([].AWS_LAMBDA_FUNCTION_NAME)&&o(r)&&(i.headers[Ac]=r),t({...n,request:i})})(e),Ic)}});const Mc=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Mc(t))return!1;return!0}return!!Re(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!Ae(e)))};let jc={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)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"};const $c={isVirtualHostableS3Bucket:Mc,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}=jc;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 Nc(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}Me.aws=$c;const Dc=e=>P.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Lc=e=>new Date(Date.now()+e),zc=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(Lc(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},Fc=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class Uc{async sign(e,t,n){if(!T.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await(async e=>{const t=Fc("context",e.context),n=Fc("config",e.config),i=t.endpointV2?.properties?.authSchemes?.[0],r=Fc("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:Lc(r.systemClockOffset),signingRegion:s,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??Dc(t.$response);if(n){const i=Fc("config",e.config),r=i.systemClockOffset;i.systemClockOffset=zc(n,i.systemClockOffset);i.systemClockOffset!==r&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=Dc(e);if(n){const e=Fc("config",t.config);e.systemClockOffset=zc(n,e.systemClockOffset)}}}const Bc=(e,t)=>((e,t)=>ve(e,t).then((e=>t.utf8Encoder(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{}})),Hc=async(e,t)=>{const n=await Bc(e,t);return n.message=n.message??n.Message,n},qc=/\d{12}\.ddb/;const Vc="user-agent",Gc="x-amz-user-agent",Wc=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Kc=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const Yc=e=>(t,n)=>async i=>{const{request:r}=i;if(!T.isInstance(r))return t(i);const{headers:o}=r,s=n?.userAgent?.map(Qc)||[],a=(await e.defaultUserAgentProvider()).map(Qc);await async function(e,t,n){const i=n.request;if("rpc-v2-cbor"===i?.headers?.["smithy-protocol"]&&Nc(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?Nc(e,"RETRY_MODE_ADAPTIVE","F"):Nc(e,"RETRY_MODE_STANDARD","E"):Nc(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(qc)&&Nc(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":Nc(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Nc(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Nc(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const r=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(r?.$source){const t=r;t.accountId&&Nc(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,i]of Object.entries(t.$source??{}))Nc(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 l=e?.customUserAgent?.map(Qc)||[],u=await e.userAgentAppId();u&&a.push(Qc([`app/${u}`]));const p=[].concat([...a,...s,...l]).join(" "),d=[...a.filter((e=>e.startsWith("aws-sdk-"))),...l].join(" ");return"browser"!==e.runtime?(d&&(o[Gc]=o[Gc]?`${o[Vc]} ${d}`:d),o[Vc]=p):o[Gc]=p,t({...i,request:r})},Qc=e=>{const t=e[0].split("/").map((e=>e.replace(Wc,"-"))).join("/"),n=e[1]?.replace(Kc,"-"),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}`}}),"")},Jc={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Xc=async(e,t,n)=>({operation:D(t).operation,region:await L(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Zc=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ssm",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},el=e=>{const t=(e=>{let t,n=!1;e.credentials&&(n=!0,t=Ce(e.credentials,Se,Oe)),t||(t=e.credentialDefaultProvider?Y(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?Y(e.signer):e.regionInfoProvider?()=>Y(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([n,r])=>{const{signingRegion:s,signingService:a}=n;e.signingRegion=e.signingRegion||s||r,e.signingName=e.signingName||a||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Lt)(c)})):async n=>{const r=(n=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await Y(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||Lt)(a)},{...e,systemClockOffset:r,signingEscapePath:i,credentials:n?async()=>t().then((e=>{return n="CREDENTIALS_CODE",i="e",(t=e).$source||(t.$source={}),t.$source[n]=i,t;var t,n,i})):t,signer:s}})(e);return{...t}},tl={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var nl="3.682.0";const il=({serviceId:e,clientVersion:t})=>async n=>{const i="undefined"!=typeof window&&window?.navigator?.userAgent?ho.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};function rl(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 ol={supported:void 0};class sl{static create(e){return"function"==typeof e?.handle?e:new sl(e)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===ol.supported&&(ol.supported=Boolean("undefined"!=typeof Request&&"keepalive"in new Request("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=le(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:l}=e,u=`${e.protocol}//${a}${e.hostname}${c?`:${c}`:""}${o}`,p="GET"===l||"HEAD"===l?void 0:e.body,d={body:p,headers:new Headers(e.headers),method:l,credentials:r};this.config?.cache&&(d.cache=this.config.cache),p&&(d.duplex="half"),"undefined"!=typeof AbortController&&(d.signal=t),ol.supported&&(d.keepalive=i),"function"==typeof this.config.requestInit&&Object.assign(d,this.config.requestInit(e));let m=()=>{};const h=new Request(u,d),f=[fetch(h).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})})))})),rl(n)];return t&&f.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}),m=()=>e.removeEventListener("abort",i)}else t.onabort=i}))),Promise.race(f).finally(m)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n=>(n[e]=t,n)))}httpHandlerConfigs(){return this.config??{}}}const al=e=>"function"==typeof Blob&&e instanceof Blob?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=te(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 cl="required",ll="fn",ul="argv",pl="ref",dl=!0,ml="isSet",hl="booleanEquals",fl="error",gl="endpoint",yl="tree",vl="PartitionResult",bl="getAttr",xl={[cl]:!1,type:"String"},wl={[cl]:!0,default:!1,type:"Boolean"},El={[pl]:"Endpoint"},Sl={[ll]:hl,[ul]:[{[pl]:"UseFIPS"},!0]},_l={[ll]:hl,[ul]:[{[pl]:"UseDualStack"},!0]},Ol={},Cl={[ll]:bl,[ul]:[{[pl]:vl},"supportsFIPS"]},kl={[pl]:vl},Tl={[ll]:hl,[ul]:[!0,{[ll]:bl,[ul]:[kl,"supportsDualStack"]}]},Pl=[Sl],Al=[_l],Il=[{[pl]:"Region"}],Rl={version:"1.0",parameters:{Region:xl,UseDualStack:wl,UseFIPS:wl,Endpoint:xl},rules:[{conditions:[{[ll]:ml,[ul]:[El]}],rules:[{conditions:Pl,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:fl},{conditions:Al,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:fl},{endpoint:{url:El,properties:Ol,headers:Ol},type:gl}],type:yl},{conditions:[{[ll]:ml,[ul]:Il}],rules:[{conditions:[{[ll]:"aws.partition",[ul]:Il,assign:vl}],rules:[{conditions:[Sl,_l],rules:[{conditions:[{[ll]:hl,[ul]:[dl,Cl]},Tl],rules:[{endpoint:{url:"https://ssm-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ol,headers:Ol},type:gl}],type:yl},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:fl}],type:yl},{conditions:Pl,rules:[{conditions:[{[ll]:hl,[ul]:[Cl,dl]}],rules:[{conditions:[{[ll]:"stringEquals",[ul]:[{[ll]:bl,[ul]:[kl,"name"]},"aws-us-gov"]}],endpoint:{url:"https://ssm.{Region}.amazonaws.com",properties:Ol,headers:Ol},type:gl},{endpoint:{url:"https://ssm-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ol,headers:Ol},type:gl}],type:yl},{error:"FIPS is enabled but this partition does not support FIPS",type:fl}],type:yl},{conditions:Al,rules:[{conditions:[Tl],rules:[{endpoint:{url:"https://ssm.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ol,headers:Ol},type:gl}],type:yl},{error:"DualStack is enabled but this partition does not support DualStack",type:fl}],type:yl},{endpoint:{url:"https://ssm.{Region}.{PartitionResult#dnsSuffix}",properties:Ol,headers:Ol},type:gl}],type:yl}],type:yl},{error:"Invalid Configuration: Missing Region",type:fl}]},Ml=new Te({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),jl=(e,t={})=>Ml.get(e,(()=>Ze(Rl,{endpointParams:e,logger:t.logger})));Me.aws=$c;const $l=e=>{const t=ys(e),n=()=>t().then(In),i=(e=>({apiVersion:"2014-11-06",base64Decoder:e?.base64Decoder??te,base64Encoder:e?.base64Encoder??oe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??jl,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Zc,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Uc}],logger:e?.logger??new Bn,serviceId:e?.serviceId??"SSM",urlParser:e?.urlParser??ar,utf8Decoder:e?.utf8Decoder??ne,utf8Encoder:e?.utf8Encoder??re}))(e);return{...i,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qo,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??il({serviceId:i.serviceId,clientVersion:nl}),maxAttempts:e?.maxAttempts??3,region:e?.region??Bo("Region is missing"),requestHandler:sl.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||fr),sha256:e?.sha256??uo,streamCollector:e?.streamCollector??al,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Gi)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Wi))}},Nl=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}},Dl=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}},Ll=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});class zl extends Wt{constructor(...[e]){const t=$l(e||{});var n;const i=function(e){const t=Y(e.userAgentAppId??void 0);return{...e,customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent,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}}}((n=t,{...n,useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,defaultSigningName:"ssm"})),r=Rr(i),o=Qi(r),s=mr(o),a=((e,t)=>{const n={...Nl(e),...Nn(e),...v(e),...Dl(e)};return t.forEach((e=>e.configure(n))),{...e,...(i=n,{region:i.region()}),...Dn(n),...b(n),...Ll(n)};var i})(el(s),e?.extensions||[]);super(a),this.config=a,this.middlewareStack.use((e=>({applyToStack:t=>{t.add(Yc(e),Jc)}}))(this.config)),this.middlewareStack.use(Lr(this.config)),this.middlewareStack.use(Zi(this.config)),this.middlewareStack.use(Tc(this.config)),this.middlewareStack.use((this.config,{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:l}=a,u=c??t.inputFilterSensitiveLog,p=l??t.outputFilterSensitiveLog,{$metadata:d,...m}=i.output;return s?.info?.({clientName:r,commandName:o,input:u(n.input),output:p(m),metadata:d}),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}}),Pc)}})),this.middlewareStack.use(Rc(this.config)),this.middlewareStack.use(U(this.config,{httpAuthSchemeParametersProvider:Xc,identityProviderConfigProvider:async e=>new Ee({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(K(this.config))}destroy(){super.destroy()}}class Fl extends kn{constructor(e){super(e),Object.setPrototypeOf(this,Fl.prototype)}}class Ul extends Fl{constructor(e){super({name:"InternalServerError",$fault:"server",...e}),this.name="InternalServerError",this.$fault="server",Object.setPrototypeOf(this,Ul.prototype),this.Message=e.Message}}class Bl extends Fl{constructor(e){super({name:"InvalidResourceId",$fault:"client",...e}),this.name="InvalidResourceId",this.$fault="client",Object.setPrototypeOf(this,Bl.prototype)}}class Hl extends Fl{constructor(e){super({name:"InvalidResourceType",$fault:"client",...e}),this.name="InvalidResourceType",this.$fault="client",Object.setPrototypeOf(this,Hl.prototype)}}class ql extends Fl{constructor(e){super({name:"TooManyTagsError",$fault:"client",...e}),this.name="TooManyTagsError",this.$fault="client",Object.setPrototypeOf(this,ql.prototype)}}class Vl extends Fl{constructor(e){super({name:"TooManyUpdates",$fault:"client",...e}),this.name="TooManyUpdates",this.$fault="client",Object.setPrototypeOf(this,Vl.prototype),this.Message=e.Message}}let Gl=class e extends Fl{constructor(t){super({name:"AlreadyExistsException",$fault:"client",...t}),this.name="AlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};class Wl extends Fl{constructor(e){super({name:"OpsItemConflictException",$fault:"client",...e}),this.name="OpsItemConflictException",this.$fault="client",Object.setPrototypeOf(this,Wl.prototype),this.Message=e.Message}}class Kl extends Fl{constructor(e){super({name:"OpsItemInvalidParameterException",$fault:"client",...e}),this.name="OpsItemInvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,Kl.prototype),this.ParameterNames=e.ParameterNames,this.Message=e.Message}}class Yl extends Fl{constructor(e){super({name:"OpsItemLimitExceededException",$fault:"client",...e}),this.name="OpsItemLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Yl.prototype),this.ResourceTypes=e.ResourceTypes,this.Limit=e.Limit,this.LimitType=e.LimitType,this.Message=e.Message}}class Ql extends Fl{constructor(e){super({name:"OpsItemNotFoundException",$fault:"client",...e}),this.name="OpsItemNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Ql.prototype),this.Message=e.Message}}class Jl extends Fl{constructor(e){super({name:"OpsItemRelatedItemAlreadyExistsException",$fault:"client",...e}),this.name="OpsItemRelatedItemAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Jl.prototype),this.Message=e.Message,this.ResourceUri=e.ResourceUri,this.OpsItemId=e.OpsItemId}}class Xl extends Fl{constructor(e){super({name:"DuplicateInstanceId",$fault:"client",...e}),this.name="DuplicateInstanceId",this.$fault="client",Object.setPrototypeOf(this,Xl.prototype)}}class Zl extends Fl{constructor(e){super({name:"InvalidCommandId",$fault:"client",...e}),this.name="InvalidCommandId",this.$fault="client",Object.setPrototypeOf(this,Zl.prototype)}}class eu extends Fl{constructor(e){super({name:"InvalidInstanceId",$fault:"client",...e}),this.name="InvalidInstanceId",this.$fault="client",Object.setPrototypeOf(this,eu.prototype),this.Message=e.Message}}class tu extends Fl{constructor(e){super({name:"DoesNotExistException",$fault:"client",...e}),this.name="DoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,tu.prototype),this.Message=e.Message}}class nu extends Fl{constructor(e){super({name:"InvalidParameters",$fault:"client",...e}),this.name="InvalidParameters",this.$fault="client",Object.setPrototypeOf(this,nu.prototype),this.Message=e.Message}}class iu extends Fl{constructor(e){super({name:"AssociationAlreadyExists",$fault:"client",...e}),this.name="AssociationAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,iu.prototype)}}class ru extends Fl{constructor(e){super({name:"AssociationLimitExceeded",$fault:"client",...e}),this.name="AssociationLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,ru.prototype)}}class ou extends Fl{constructor(e){super({name:"InvalidDocument",$fault:"client",...e}),this.name="InvalidDocument",this.$fault="client",Object.setPrototypeOf(this,ou.prototype),this.Message=e.Message}}class su extends Fl{constructor(e){super({name:"InvalidDocumentVersion",$fault:"client",...e}),this.name="InvalidDocumentVersion",this.$fault="client",Object.setPrototypeOf(this,su.prototype),this.Message=e.Message}}class au extends Fl{constructor(e){super({name:"InvalidOutputLocation",$fault:"client",...e}),this.name="InvalidOutputLocation",this.$fault="client",Object.setPrototypeOf(this,au.prototype)}}class cu extends Fl{constructor(e){super({name:"InvalidSchedule",$fault:"client",...e}),this.name="InvalidSchedule",this.$fault="client",Object.setPrototypeOf(this,cu.prototype),this.Message=e.Message}}class lu extends Fl{constructor(e){super({name:"InvalidTag",$fault:"client",...e}),this.name="InvalidTag",this.$fault="client",Object.setPrototypeOf(this,lu.prototype),this.Message=e.Message}}class uu extends Fl{constructor(e){super({name:"InvalidTarget",$fault:"client",...e}),this.name="InvalidTarget",this.$fault="client",Object.setPrototypeOf(this,uu.prototype),this.Message=e.Message}}class pu extends Fl{constructor(e){super({name:"InvalidTargetMaps",$fault:"client",...e}),this.name="InvalidTargetMaps",this.$fault="client",Object.setPrototypeOf(this,pu.prototype),this.Message=e.Message}}class du extends Fl{constructor(e){super({name:"UnsupportedPlatformType",$fault:"client",...e}),this.name="UnsupportedPlatformType",this.$fault="client",Object.setPrototypeOf(this,du.prototype),this.Message=e.Message}}class mu extends Fl{constructor(e){super({name:"DocumentAlreadyExists",$fault:"client",...e}),this.name="DocumentAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,mu.prototype),this.Message=e.Message}}class hu extends Fl{constructor(e){super({name:"DocumentLimitExceeded",$fault:"client",...e}),this.name="DocumentLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,hu.prototype),this.Message=e.Message}}class fu extends Fl{constructor(e){super({name:"InvalidDocumentContent",$fault:"client",...e}),this.name="InvalidDocumentContent",this.$fault="client",Object.setPrototypeOf(this,fu.prototype),this.Message=e.Message}}class gu extends Fl{constructor(e){super({name:"InvalidDocumentSchemaVersion",$fault:"client",...e}),this.name="InvalidDocumentSchemaVersion",this.$fault="client",Object.setPrototypeOf(this,gu.prototype),this.Message=e.Message}}class yu extends Fl{constructor(e){super({name:"MaxDocumentSizeExceeded",$fault:"client",...e}),this.name="MaxDocumentSizeExceeded",this.$fault="client",Object.setPrototypeOf(this,yu.prototype),this.Message=e.Message}}class vu extends Fl{constructor(e){super({name:"IdempotentParameterMismatch",$fault:"client",...e}),this.name="IdempotentParameterMismatch",this.$fault="client",Object.setPrototypeOf(this,vu.prototype),this.Message=e.Message}}class bu extends Fl{constructor(e){super({name:"ResourceLimitExceededException",$fault:"client",...e}),this.name="ResourceLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,bu.prototype),this.Message=e.Message}}class xu extends Fl{constructor(e){super({name:"OpsItemAccessDeniedException",$fault:"client",...e}),this.name="OpsItemAccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,xu.prototype),this.Message=e.Message}}class wu extends Fl{constructor(e){super({name:"OpsItemAlreadyExistsException",$fault:"client",...e}),this.name="OpsItemAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,wu.prototype),this.Message=e.Message,this.OpsItemId=e.OpsItemId}}class Eu extends Fl{constructor(e){super({name:"OpsMetadataAlreadyExistsException",$fault:"client",...e}),this.name="OpsMetadataAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Eu.prototype)}}class Su extends Fl{constructor(e){super({name:"OpsMetadataInvalidArgumentException",$fault:"client",...e}),this.name="OpsMetadataInvalidArgumentException",this.$fault="client",Object.setPrototypeOf(this,Su.prototype)}}class _u extends Fl{constructor(e){super({name:"OpsMetadataLimitExceededException",$fault:"client",...e}),this.name="OpsMetadataLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,_u.prototype)}}class Ou extends Fl{constructor(e){super({name:"OpsMetadataTooManyUpdatesException",$fault:"client",...e}),this.name="OpsMetadataTooManyUpdatesException",this.$fault="client",Object.setPrototypeOf(this,Ou.prototype)}}class Cu extends Fl{constructor(e){super({name:"ResourceDataSyncAlreadyExistsException",$fault:"client",...e}),this.name="ResourceDataSyncAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Cu.prototype),this.SyncName=e.SyncName}}class ku extends Fl{constructor(e){super({name:"ResourceDataSyncCountExceededException",$fault:"client",...e}),this.name="ResourceDataSyncCountExceededException",this.$fault="client",Object.setPrototypeOf(this,ku.prototype),this.Message=e.Message}}class Tu extends Fl{constructor(e){super({name:"ResourceDataSyncInvalidConfigurationException",$fault:"client",...e}),this.name="ResourceDataSyncInvalidConfigurationException",this.$fault="client",Object.setPrototypeOf(this,Tu.prototype),this.Message=e.Message}}class Pu extends Fl{constructor(e){super({name:"InvalidActivation",$fault:"client",...e}),this.name="InvalidActivation",this.$fault="client",Object.setPrototypeOf(this,Pu.prototype),this.Message=e.Message}}class Au extends Fl{constructor(e){super({name:"InvalidActivationId",$fault:"client",...e}),this.name="InvalidActivationId",this.$fault="client",Object.setPrototypeOf(this,Au.prototype),this.Message=e.Message}}class Iu extends Fl{constructor(e){super({name:"AssociationDoesNotExist",$fault:"client",...e}),this.name="AssociationDoesNotExist",this.$fault="client",Object.setPrototypeOf(this,Iu.prototype),this.Message=e.Message}}class Ru extends Fl{constructor(e){super({name:"AssociatedInstances",$fault:"client",...e}),this.name="AssociatedInstances",this.$fault="client",Object.setPrototypeOf(this,Ru.prototype)}}class Mu extends Fl{constructor(e){super({name:"InvalidDocumentOperation",$fault:"client",...e}),this.name="InvalidDocumentOperation",this.$fault="client",Object.setPrototypeOf(this,Mu.prototype),this.Message=e.Message}}class ju extends Fl{constructor(e){super({name:"InvalidDeleteInventoryParametersException",$fault:"client",...e}),this.name="InvalidDeleteInventoryParametersException",this.$fault="client",Object.setPrototypeOf(this,ju.prototype),this.Message=e.Message}}class $u extends Fl{constructor(e){super({name:"InvalidInventoryRequestException",$fault:"client",...e}),this.name="InvalidInventoryRequestException",this.$fault="client",Object.setPrototypeOf(this,$u.prototype),this.Message=e.Message}}class Nu extends Fl{constructor(e){super({name:"InvalidOptionException",$fault:"client",...e}),this.name="InvalidOptionException",this.$fault="client",Object.setPrototypeOf(this,Nu.prototype),this.Message=e.Message}}class Du extends Fl{constructor(e){super({name:"InvalidTypeNameException",$fault:"client",...e}),this.name="InvalidTypeNameException",this.$fault="client",Object.setPrototypeOf(this,Du.prototype),this.Message=e.Message}}class Lu extends Fl{constructor(e){super({name:"OpsMetadataNotFoundException",$fault:"client",...e}),this.name="OpsMetadataNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Lu.prototype)}}class zu extends Fl{constructor(e){super({name:"ParameterNotFound",$fault:"client",...e}),this.name="ParameterNotFound",this.$fault="client",Object.setPrototypeOf(this,zu.prototype)}}class Fu extends Fl{constructor(e){super({name:"ResourceInUseException",$fault:"client",...e}),this.name="ResourceInUseException",this.$fault="client",Object.setPrototypeOf(this,Fu.prototype),this.Message=e.Message}}class Uu extends Fl{constructor(e){super({name:"ResourceDataSyncNotFoundException",$fault:"client",...e}),this.name="ResourceDataSyncNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Uu.prototype),this.SyncName=e.SyncName,this.SyncType=e.SyncType,this.Message=e.Message}}class Bu extends Fl{constructor(e){super({name:"MalformedResourcePolicyDocumentException",$fault:"client",...e}),this.name="MalformedResourcePolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,Bu.prototype),this.Message=e.Message}}class Hu extends Fl{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Hu.prototype),this.Message=e.Message}}class qu extends Fl{constructor(e){super({name:"ResourcePolicyConflictException",$fault:"client",...e}),this.name="ResourcePolicyConflictException",this.$fault="client",Object.setPrototypeOf(this,qu.prototype),this.Message=e.Message}}class Vu extends Fl{constructor(e){super({name:"ResourcePolicyInvalidParameterException",$fault:"client",...e}),this.name="ResourcePolicyInvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,Vu.prototype),this.ParameterNames=e.ParameterNames,this.Message=e.Message}}class Gu extends Fl{constructor(e){super({name:"ResourcePolicyNotFoundException",$fault:"client",...e}),this.name="ResourcePolicyNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Gu.prototype),this.Message=e.Message}}class Wu extends Fl{constructor(e){super({name:"TargetInUseException",$fault:"client",...e}),this.name="TargetInUseException",this.$fault="client",Object.setPrototypeOf(this,Wu.prototype),this.Message=e.Message}}class Ku extends Fl{constructor(e){super({name:"InvalidFilter",$fault:"client",...e}),this.name="InvalidFilter",this.$fault="client",Object.setPrototypeOf(this,Ku.prototype),this.Message=e.Message}}class Yu extends Fl{constructor(e){super({name:"InvalidNextToken",$fault:"client",...e}),this.name="InvalidNextToken",this.$fault="client",Object.setPrototypeOf(this,Yu.prototype),this.Message=e.Message}}class Qu extends Fl{constructor(e){super({name:"InvalidAssociationVersion",$fault:"client",...e}),this.name="InvalidAssociationVersion",this.$fault="client",Object.setPrototypeOf(this,Qu.prototype),this.Message=e.Message}}class Ju extends Fl{constructor(e){super({name:"AssociationExecutionDoesNotExist",$fault:"client",...e}),this.name="AssociationExecutionDoesNotExist",this.$fault="client",Object.setPrototypeOf(this,Ju.prototype),this.Message=e.Message}}class Xu extends Fl{constructor(e){super({name:"InvalidFilterKey",$fault:"client",...e}),this.name="InvalidFilterKey",this.$fault="client",Object.setPrototypeOf(this,Xu.prototype)}}class Zu extends Fl{constructor(e){super({name:"InvalidFilterValue",$fault:"client",...e}),this.name="InvalidFilterValue",this.$fault="client",Object.setPrototypeOf(this,Zu.prototype),this.Message=e.Message}}class ep extends Fl{constructor(e){super({name:"AutomationExecutionNotFoundException",$fault:"client",...e}),this.name="AutomationExecutionNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ep.prototype),this.Message=e.Message}}class tp extends Fl{constructor(e){super({name:"InvalidPermissionType",$fault:"client",...e}),this.name="InvalidPermissionType",this.$fault="client",Object.setPrototypeOf(this,tp.prototype),this.Message=e.Message}}class np extends Fl{constructor(e){super({name:"UnsupportedOperatingSystem",$fault:"client",...e}),this.name="UnsupportedOperatingSystem",this.$fault="client",Object.setPrototypeOf(this,np.prototype),this.Message=e.Message}}class ip extends Fl{constructor(e){super({name:"InvalidInstanceInformationFilterValue",$fault:"client",...e}),this.name="InvalidInstanceInformationFilterValue",this.$fault="client",Object.setPrototypeOf(this,ip.prototype)}}class rp extends Fl{constructor(e){super({name:"InvalidInstancePropertyFilterValue",$fault:"client",...e}),this.name="InvalidInstancePropertyFilterValue",this.$fault="client",Object.setPrototypeOf(this,rp.prototype)}}class op extends Fl{constructor(e){super({name:"InvalidDeletionIdException",$fault:"client",...e}),this.name="InvalidDeletionIdException",this.$fault="client",Object.setPrototypeOf(this,op.prototype),this.Message=e.Message}}class sp extends Fl{constructor(e){super({name:"InvalidFilterOption",$fault:"client",...e}),this.name="InvalidFilterOption",this.$fault="client",Object.setPrototypeOf(this,sp.prototype)}}class ap extends Fl{constructor(e){super({name:"OpsItemRelatedItemAssociationNotFoundException",$fault:"client",...e}),this.name="OpsItemRelatedItemAssociationNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ap.prototype),this.Message=e.Message}}class cp extends Fl{constructor(e){super({name:"InvalidDocumentType",$fault:"client",...e}),this.name="InvalidDocumentType",this.$fault="client",Object.setPrototypeOf(this,cp.prototype),this.Message=e.Message}}class lp extends Fl{constructor(e){super({name:"UnsupportedCalendarException",$fault:"client",...e}),this.name="UnsupportedCalendarException",this.$fault="client",Object.setPrototypeOf(this,lp.prototype),this.Message=e.Message}}class up extends Fl{constructor(e){super({name:"InvalidPluginName",$fault:"client",...e}),this.name="InvalidPluginName",this.$fault="client",Object.setPrototypeOf(this,up.prototype)}}class pp extends Fl{constructor(e){super({name:"InvocationDoesNotExist",$fault:"client",...e}),this.name="InvocationDoesNotExist",this.$fault="client",Object.setPrototypeOf(this,pp.prototype)}}class dp extends Fl{constructor(e){super({name:"UnsupportedFeatureRequiredException",$fault:"client",...e}),this.name="UnsupportedFeatureRequiredException",this.$fault="client",Object.setPrototypeOf(this,dp.prototype),this.Message=e.Message}}class mp extends Fl{constructor(e){super({name:"InvalidAggregatorException",$fault:"client",...e}),this.name="InvalidAggregatorException",this.$fault="client",Object.setPrototypeOf(this,mp.prototype),this.Message=e.Message}}class hp extends Fl{constructor(e){super({name:"InvalidInventoryGroupException",$fault:"client",...e}),this.name="InvalidInventoryGroupException",this.$fault="client",Object.setPrototypeOf(this,hp.prototype),this.Message=e.Message}}class fp extends Fl{constructor(e){super({name:"InvalidResultAttributeException",$fault:"client",...e}),this.name="InvalidResultAttributeException",this.$fault="client",Object.setPrototypeOf(this,fp.prototype),this.Message=e.Message}}class gp extends Fl{constructor(e){super({name:"InvalidKeyId",$fault:"client",...e}),this.name="InvalidKeyId",this.$fault="client",Object.setPrototypeOf(this,gp.prototype)}}class yp extends Fl{constructor(e){super({name:"ParameterVersionNotFound",$fault:"client",...e}),this.name="ParameterVersionNotFound",this.$fault="client",Object.setPrototypeOf(this,yp.prototype)}}class vp extends Fl{constructor(e){super({name:"ServiceSettingNotFound",$fault:"client",...e}),this.name="ServiceSettingNotFound",this.$fault="client",Object.setPrototypeOf(this,vp.prototype),this.Message=e.Message}}class bp extends Fl{constructor(e){super({name:"ParameterVersionLabelLimitExceeded",$fault:"client",...e}),this.name="ParameterVersionLabelLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,bp.prototype)}}class xp extends Fl{constructor(e){super({name:"DocumentPermissionLimit",$fault:"client",...e}),this.name="DocumentPermissionLimit",this.$fault="client",Object.setPrototypeOf(this,xp.prototype),this.Message=e.Message}}class wp extends Fl{constructor(e){super({name:"ComplianceTypeCountLimitExceededException",$fault:"client",...e}),this.name="ComplianceTypeCountLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,wp.prototype),this.Message=e.Message}}class Ep extends Fl{constructor(e){super({name:"InvalidItemContentException",$fault:"client",...e}),this.name="InvalidItemContentException",this.$fault="client",Object.setPrototypeOf(this,Ep.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class Sp extends Fl{constructor(e){super({name:"ItemSizeLimitExceededException",$fault:"client",...e}),this.name="ItemSizeLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Sp.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class _p extends Fl{constructor(e){super({name:"TotalSizeLimitExceededException",$fault:"client",...e}),this.name="TotalSizeLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,_p.prototype),this.Message=e.Message}}class Op extends Fl{constructor(e){super({name:"CustomSchemaCountLimitExceededException",$fault:"client",...e}),this.name="CustomSchemaCountLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Op.prototype),this.Message=e.Message}}class Cp extends Fl{constructor(e){super({name:"InvalidInventoryItemContextException",$fault:"client",...e}),this.name="InvalidInventoryItemContextException",this.$fault="client",Object.setPrototypeOf(this,Cp.prototype),this.Message=e.Message}}class kp extends Fl{constructor(e){super({name:"ItemContentMismatchException",$fault:"client",...e}),this.name="ItemContentMismatchException",this.$fault="client",Object.setPrototypeOf(this,kp.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class Tp extends Fl{constructor(e){super({name:"SubTypeCountLimitExceededException",$fault:"client",...e}),this.name="SubTypeCountLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Tp.prototype),this.Message=e.Message}}class Pp extends Fl{constructor(e){super({name:"UnsupportedInventoryItemContextException",$fault:"client",...e}),this.name="UnsupportedInventoryItemContextException",this.$fault="client",Object.setPrototypeOf(this,Pp.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class Ap extends Fl{constructor(e){super({name:"UnsupportedInventorySchemaVersionException",$fault:"client",...e}),this.name="UnsupportedInventorySchemaVersionException",this.$fault="client",Object.setPrototypeOf(this,Ap.prototype),this.Message=e.Message}}class Ip extends Fl{constructor(e){super({name:"HierarchyLevelLimitExceededException",$fault:"client",...e}),this.name="HierarchyLevelLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Ip.prototype)}}class Rp extends Fl{constructor(e){super({name:"HierarchyTypeMismatchException",$fault:"client",...e}),this.name="HierarchyTypeMismatchException",this.$fault="client",Object.setPrototypeOf(this,Rp.prototype)}}class Mp extends Fl{constructor(e){super({name:"IncompatiblePolicyException",$fault:"client",...e}),this.name="IncompatiblePolicyException",this.$fault="client",Object.setPrototypeOf(this,Mp.prototype)}}class jp extends Fl{constructor(e){super({name:"InvalidAllowedPatternException",$fault:"client",...e}),this.name="InvalidAllowedPatternException",this.$fault="client",Object.setPrototypeOf(this,jp.prototype)}}class $p extends Fl{constructor(e){super({name:"InvalidPolicyAttributeException",$fault:"client",...e}),this.name="InvalidPolicyAttributeException",this.$fault="client",Object.setPrototypeOf(this,$p.prototype)}}class Np extends Fl{constructor(e){super({name:"InvalidPolicyTypeException",$fault:"client",...e}),this.name="InvalidPolicyTypeException",this.$fault="client",Object.setPrototypeOf(this,Np.prototype)}}class Dp extends Fl{constructor(e){super({name:"ParameterAlreadyExists",$fault:"client",...e}),this.name="ParameterAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,Dp.prototype)}}class Lp extends Fl{constructor(e){super({name:"ParameterLimitExceeded",$fault:"client",...e}),this.name="ParameterLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,Lp.prototype)}}class zp extends Fl{constructor(e){super({name:"ParameterMaxVersionLimitExceeded",$fault:"client",...e}),this.name="ParameterMaxVersionLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,zp.prototype)}}class Fp extends Fl{constructor(e){super({name:"ParameterPatternMismatchException",$fault:"client",...e}),this.name="ParameterPatternMismatchException",this.$fault="client",Object.setPrototypeOf(this,Fp.prototype)}}class Up extends Fl{constructor(e){super({name:"PoliciesLimitExceededException",$fault:"client",...e}),this.name="PoliciesLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Up.prototype)}}class Bp extends Fl{constructor(e){super({name:"UnsupportedParameterType",$fault:"client",...e}),this.name="UnsupportedParameterType",this.$fault="client",Object.setPrototypeOf(this,Bp.prototype)}}class Hp extends Fl{constructor(e){super({name:"ResourcePolicyLimitExceededException",$fault:"client",...e}),this.name="ResourcePolicyLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Hp.prototype),this.Limit=e.Limit,this.LimitType=e.LimitType,this.Message=e.Message}}class qp extends Fl{constructor(e){super({name:"FeatureNotAvailableException",$fault:"client",...e}),this.name="FeatureNotAvailableException",this.$fault="client",Object.setPrototypeOf(this,qp.prototype),this.Message=e.Message}}class Vp extends Fl{constructor(e){super({name:"AutomationStepNotFoundException",$fault:"client",...e}),this.name="AutomationStepNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Vp.prototype),this.Message=e.Message}}class Gp extends Fl{constructor(e){super({name:"InvalidAutomationSignalException",$fault:"client",...e}),this.name="InvalidAutomationSignalException",this.$fault="client",Object.setPrototypeOf(this,Gp.prototype),this.Message=e.Message}}class Wp extends Fl{constructor(e){super({name:"InvalidNotificationConfig",$fault:"client",...e}),this.name="InvalidNotificationConfig",this.$fault="client",Object.setPrototypeOf(this,Wp.prototype),this.Message=e.Message}}class Kp extends Fl{constructor(e){super({name:"InvalidOutputFolder",$fault:"client",...e}),this.name="InvalidOutputFolder",this.$fault="client",Object.setPrototypeOf(this,Kp.prototype)}}class Yp extends Fl{constructor(e){super({name:"InvalidRole",$fault:"client",...e}),this.name="InvalidRole",this.$fault="client",Object.setPrototypeOf(this,Yp.prototype),this.Message=e.Message}}class Qp extends Fl{constructor(e){super({name:"InvalidAssociation",$fault:"client",...e}),this.name="InvalidAssociation",this.$fault="client",Object.setPrototypeOf(this,Qp.prototype),this.Message=e.Message}}class Jp extends Fl{constructor(e){super({name:"AutomationDefinitionNotFoundException",$fault:"client",...e}),this.name="AutomationDefinitionNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Jp.prototype),this.Message=e.Message}}class Xp extends Fl{constructor(e){super({name:"AutomationDefinitionVersionNotFoundException",$fault:"client",...e}),this.name="AutomationDefinitionVersionNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Xp.prototype),this.Message=e.Message}}class Zp extends Fl{constructor(e){super({name:"AutomationExecutionLimitExceededException",$fault:"client",...e}),this.name="AutomationExecutionLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Zp.prototype),this.Message=e.Message}}class ed extends Fl{constructor(e){super({name:"InvalidAutomationExecutionParametersException",$fault:"client",...e}),this.name="InvalidAutomationExecutionParametersException",this.$fault="client",Object.setPrototypeOf(this,ed.prototype),this.Message=e.Message}}const td=e=>({...e,...e.Value&&{Value:Qt}}),nd=e=>({...e,...e.Parameter&&{Parameter:td(e.Parameter)}}),id=e=>({...e,...e.Parameters&&{Parameters:e.Parameters.map((e=>td(e)))}});class rd extends Fl{constructor(e){super({name:"AutomationDefinitionNotApprovedException",$fault:"client",...e}),this.name="AutomationDefinitionNotApprovedException",this.$fault="client",Object.setPrototypeOf(this,rd.prototype),this.Message=e.Message}}class od extends Fl{constructor(e){super({name:"TargetNotConnected",$fault:"client",...e}),this.name="TargetNotConnected",this.$fault="client",Object.setPrototypeOf(this,od.prototype),this.Message=e.Message}}class sd extends Fl{constructor(e){super({name:"InvalidAutomationStatusUpdateException",$fault:"client",...e}),this.name="InvalidAutomationStatusUpdateException",this.$fault="client",Object.setPrototypeOf(this,sd.prototype),this.Message=e.Message}}class ad extends Fl{constructor(e){super({name:"AssociationVersionLimitExceeded",$fault:"client",...e}),this.name="AssociationVersionLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,ad.prototype),this.Message=e.Message}}class cd extends Fl{constructor(e){super({name:"InvalidUpdate",$fault:"client",...e}),this.name="InvalidUpdate",this.$fault="client",Object.setPrototypeOf(this,cd.prototype),this.Message=e.Message}}class ld extends Fl{constructor(e){super({name:"StatusUnchanged",$fault:"client",...e}),this.name="StatusUnchanged",this.$fault="client",Object.setPrototypeOf(this,ld.prototype)}}class ud extends Fl{constructor(e){super({name:"DocumentVersionLimitExceeded",$fault:"client",...e}),this.name="DocumentVersionLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,ud.prototype),this.Message=e.Message}}class pd extends Fl{constructor(e){super({name:"DuplicateDocumentContent",$fault:"client",...e}),this.name="DuplicateDocumentContent",this.$fault="client",Object.setPrototypeOf(this,pd.prototype),this.Message=e.Message}}class dd extends Fl{constructor(e){super({name:"DuplicateDocumentVersionName",$fault:"client",...e}),this.name="DuplicateDocumentVersionName",this.$fault="client",Object.setPrototypeOf(this,dd.prototype),this.Message=e.Message}}class md extends Fl{constructor(e){super({name:"OpsMetadataKeyLimitExceededException",$fault:"client",...e}),this.name="OpsMetadataKeyLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,md.prototype)}}class hd extends Fl{constructor(e){super({name:"ResourceDataSyncConflictException",$fault:"client",...e}),this.name="ResourceDataSyncConflictException",this.$fault="client",Object.setPrototypeOf(this,hd.prototype),this.Message=e.Message}}const fd=async(e,t)=>{const n=Xh("GetParameter");let i;return i=JSON.stringify(Qn(e)),Jh(t,n,"/",void 0,i)},gd=async(e,t)=>{const n=Xh("GetParameters");let i;return i=JSON.stringify(Qn(e)),Jh(t,n,"/",void 0,i)},yd=async(e,t)=>{if(e.statusCode>=300)return bd(e,t);const n=await Bc(e.body,t);let i={};i=Vh(n);return{$metadata:Yh(e),...i}},vd=async(e,t)=>{if(e.statusCode>=300)return bd(e,t);const n=await Bc(e.body,t);let i={};i=Gh(n);return{$metadata:Yh(e),...i}},bd=async(e,t)=>{const n={...e,body:await Hc(e.body,t)},i=((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})(e,n.body);switch(i){case"InternalServerError":case"com.amazonaws.ssm#InternalServerError":throw await Kd(n);case"InvalidResourceId":case"com.amazonaws.ssm#InvalidResourceId":throw await $m(n);case"InvalidResourceType":case"com.amazonaws.ssm#InvalidResourceType":throw await Nm(n);case"TooManyTagsError":case"com.amazonaws.ssm#TooManyTagsError":throw await $h(n);case"TooManyUpdates":case"com.amazonaws.ssm#TooManyUpdates":throw await Nh(n);case"OpsItemConflictException":case"com.amazonaws.ssm#OpsItemConflictException":throw await Xm(n);case"OpsItemInvalidParameterException":case"com.amazonaws.ssm#OpsItemInvalidParameterException":throw await Zm(n);case"OpsItemLimitExceededException":case"com.amazonaws.ssm#OpsItemLimitExceededException":throw await eh(n);case"OpsItemNotFoundException":case"com.amazonaws.ssm#OpsItemNotFoundException":throw await th(n);case"OpsItemRelatedItemAlreadyExistsException":case"com.amazonaws.ssm#OpsItemRelatedItemAlreadyExistsException":throw await nh(n);case"DuplicateInstanceId":case"com.amazonaws.ssm#DuplicateInstanceId":throw await Bd(n);case"InvalidCommandId":case"com.amazonaws.ssm#InvalidCommandId":throw await rm(n);case"InvalidInstanceId":case"com.amazonaws.ssm#InvalidInstanceId":throw await ym(n);case"DoesNotExistException":case"com.amazonaws.ssm#DoesNotExistException":throw await zd(n);case"InvalidParameters":case"com.amazonaws.ssm#InvalidParameters":throw await Am(n);case"AssociationAlreadyExists":case"com.amazonaws.ssm#AssociationAlreadyExists":throw await Ed(n);case"AssociationLimitExceeded":case"com.amazonaws.ssm#AssociationLimitExceeded":throw await Od(n);case"InvalidDocument":case"com.amazonaws.ssm#InvalidDocument":throw await am(n);case"InvalidDocumentVersion":case"com.amazonaws.ssm#InvalidDocumentVersion":throw await dm(n);case"InvalidOutputLocation":case"com.amazonaws.ssm#InvalidOutputLocation":throw await Pm(n);case"InvalidSchedule":case"com.amazonaws.ssm#InvalidSchedule":throw await zm(n);case"InvalidTag":case"com.amazonaws.ssm#InvalidTag":throw await Fm(n);case"InvalidTarget":case"com.amazonaws.ssm#InvalidTarget":throw await Um(n);case"InvalidTargetMaps":case"com.amazonaws.ssm#InvalidTargetMaps":throw await Bm(n);case"UnsupportedPlatformType":case"com.amazonaws.ssm#UnsupportedPlatformType":throw await qh(n);case"DocumentAlreadyExists":case"com.amazonaws.ssm#DocumentAlreadyExists":throw await $d(n);case"DocumentLimitExceeded":case"com.amazonaws.ssm#DocumentLimitExceeded":throw await Nd(n);case"InvalidDocumentContent":case"com.amazonaws.ssm#InvalidDocumentContent":throw await cm(n);case"InvalidDocumentSchemaVersion":case"com.amazonaws.ssm#InvalidDocumentSchemaVersion":throw await um(n);case"MaxDocumentSizeExceeded":case"com.amazonaws.ssm#MaxDocumentSizeExceeded":throw await Ym(n);case"IdempotentParameterMismatch":case"com.amazonaws.ssm#IdempotentParameterMismatch":throw await Gd(n);case"ResourceLimitExceededException":case"com.amazonaws.ssm#ResourceLimitExceededException":throw await _h(n);case"OpsItemAccessDeniedException":case"com.amazonaws.ssm#OpsItemAccessDeniedException":throw await Qm(n);case"OpsItemAlreadyExistsException":case"com.amazonaws.ssm#OpsItemAlreadyExistsException":throw await Jm(n);case"OpsMetadataAlreadyExistsException":case"com.amazonaws.ssm#OpsMetadataAlreadyExistsException":throw await rh(n);case"OpsMetadataInvalidArgumentException":case"com.amazonaws.ssm#OpsMetadataInvalidArgumentException":throw await oh(n);case"OpsMetadataLimitExceededException":case"com.amazonaws.ssm#OpsMetadataLimitExceededException":throw await ah(n);case"OpsMetadataTooManyUpdatesException":case"com.amazonaws.ssm#OpsMetadataTooManyUpdatesException":throw await lh(n);case"ResourceDataSyncAlreadyExistsException":case"com.amazonaws.ssm#ResourceDataSyncAlreadyExistsException":throw await vh(n);case"ResourceDataSyncCountExceededException":case"com.amazonaws.ssm#ResourceDataSyncCountExceededException":throw await xh(n);case"ResourceDataSyncInvalidConfigurationException":case"com.amazonaws.ssm#ResourceDataSyncInvalidConfigurationException":throw await wh(n);case"InvalidActivation":case"com.amazonaws.ssm#InvalidActivation":throw await Yd(n);case"InvalidActivationId":case"com.amazonaws.ssm#InvalidActivationId":throw await Qd(n);case"AssociationDoesNotExist":case"com.amazonaws.ssm#AssociationDoesNotExist":throw await Sd(n);case"AssociatedInstances":case"com.amazonaws.ssm#AssociatedInstances":throw await wd(n);case"InvalidDocumentOperation":case"com.amazonaws.ssm#InvalidDocumentOperation":throw await lm(n);case"InvalidDeleteInventoryParametersException":case"com.amazonaws.ssm#InvalidDeleteInventoryParametersException":throw await om(n);case"InvalidInventoryRequestException":case"com.amazonaws.ssm#InvalidInventoryRequestException":throw await Em(n);case"InvalidOptionException":case"com.amazonaws.ssm#InvalidOptionException":throw await km(n);case"InvalidTypeNameException":case"com.amazonaws.ssm#InvalidTypeNameException":throw await Hm(n);case"OpsMetadataNotFoundException":case"com.amazonaws.ssm#OpsMetadataNotFoundException":throw await ch(n);case"ParameterNotFound":case"com.amazonaws.ssm#ParameterNotFound":throw await mh(n);case"ResourceInUseException":case"com.amazonaws.ssm#ResourceInUseException":throw await Sh(n);case"ResourceDataSyncNotFoundException":case"com.amazonaws.ssm#ResourceDataSyncNotFoundException":throw await Eh(n);case"MalformedResourcePolicyDocumentException":case"com.amazonaws.ssm#MalformedResourcePolicyDocumentException":throw await Km(n);case"ResourceNotFoundException":case"com.amazonaws.ssm#ResourceNotFoundException":throw await Oh(n);case"ResourcePolicyConflictException":case"com.amazonaws.ssm#ResourcePolicyConflictException":throw await Ch(n);case"ResourcePolicyInvalidParameterException":case"com.amazonaws.ssm#ResourcePolicyInvalidParameterException":throw await kh(n);case"ResourcePolicyNotFoundException":case"com.amazonaws.ssm#ResourcePolicyNotFoundException":throw await Ph(n);case"TargetInUseException":case"com.amazonaws.ssm#TargetInUseException":throw await Mh(n);case"InvalidFilter":case"com.amazonaws.ssm#InvalidFilter":throw await mm(n);case"InvalidNextToken":case"com.amazonaws.ssm#InvalidNextToken":throw await Om(n);case"InvalidAssociationVersion":case"com.amazonaws.ssm#InvalidAssociationVersion":throw await em(n);case"AssociationExecutionDoesNotExist":case"com.amazonaws.ssm#AssociationExecutionDoesNotExist":throw await _d(n);case"InvalidFilterKey":case"com.amazonaws.ssm#InvalidFilterKey":throw await hm(n);case"InvalidFilterValue":case"com.amazonaws.ssm#InvalidFilterValue":throw await gm(n);case"AutomationExecutionNotFoundException":case"com.amazonaws.ssm#AutomationExecutionNotFoundException":throw await Id(n);case"InvalidPermissionType":case"com.amazonaws.ssm#InvalidPermissionType":throw await Im(n);case"UnsupportedOperatingSystem":case"com.amazonaws.ssm#UnsupportedOperatingSystem":throw await Bh(n);case"InvalidInstanceInformationFilterValue":case"com.amazonaws.ssm#InvalidInstanceInformationFilterValue":throw await vm(n);case"InvalidInstancePropertyFilterValue":case"com.amazonaws.ssm#InvalidInstancePropertyFilterValue":throw await bm(n);case"InvalidDeletionIdException":case"com.amazonaws.ssm#InvalidDeletionIdException":throw await sm(n);case"InvalidFilterOption":case"com.amazonaws.ssm#InvalidFilterOption":throw await fm(n);case"OpsItemRelatedItemAssociationNotFoundException":case"com.amazonaws.ssm#OpsItemRelatedItemAssociationNotFoundException":throw await ih(n);case"InvalidDocumentType":case"com.amazonaws.ssm#InvalidDocumentType":throw await pm(n);case"UnsupportedCalendarException":case"com.amazonaws.ssm#UnsupportedCalendarException":throw await Lh(n);case"InvalidPluginName":case"com.amazonaws.ssm#InvalidPluginName":throw await Rm(n);case"InvocationDoesNotExist":case"com.amazonaws.ssm#InvocationDoesNotExist":throw await Vm(n);case"UnsupportedFeatureRequiredException":case"com.amazonaws.ssm#UnsupportedFeatureRequiredException":throw await zh(n);case"InvalidAggregatorException":case"com.amazonaws.ssm#InvalidAggregatorException":throw await Jd(n);case"InvalidInventoryGroupException":case"com.amazonaws.ssm#InvalidInventoryGroupException":throw await xm(n);case"InvalidResultAttributeException":case"com.amazonaws.ssm#InvalidResultAttributeException":throw await Dm(n);case"InvalidKeyId":case"com.amazonaws.ssm#InvalidKeyId":throw await _m(n);case"ParameterVersionNotFound":case"com.amazonaws.ssm#ParameterVersionNotFound":throw await gh(n);case"ServiceSettingNotFound":case"com.amazonaws.ssm#ServiceSettingNotFound":throw await Ah(n);case"ParameterVersionLabelLimitExceeded":case"com.amazonaws.ssm#ParameterVersionLabelLimitExceeded":throw await fh(n);case"DocumentPermissionLimit":case"com.amazonaws.ssm#DocumentPermissionLimit":throw await Dd(n);case"ComplianceTypeCountLimitExceededException":case"com.amazonaws.ssm#ComplianceTypeCountLimitExceededException":throw await Md(n);case"InvalidItemContentException":case"com.amazonaws.ssm#InvalidItemContentException":throw await Sm(n);case"ItemSizeLimitExceededException":case"com.amazonaws.ssm#ItemSizeLimitExceededException":throw await Wm(n);case"TotalSizeLimitExceededException":case"com.amazonaws.ssm#TotalSizeLimitExceededException":throw await Dh(n);case"CustomSchemaCountLimitExceededException":case"com.amazonaws.ssm#CustomSchemaCountLimitExceededException":throw await jd(n);case"InvalidInventoryItemContextException":case"com.amazonaws.ssm#InvalidInventoryItemContextException":throw await wm(n);case"ItemContentMismatchException":case"com.amazonaws.ssm#ItemContentMismatchException":throw await Gm(n);case"SubTypeCountLimitExceededException":case"com.amazonaws.ssm#SubTypeCountLimitExceededException":throw await Rh(n);case"UnsupportedInventoryItemContextException":case"com.amazonaws.ssm#UnsupportedInventoryItemContextException":throw await Fh(n);case"UnsupportedInventorySchemaVersionException":case"com.amazonaws.ssm#UnsupportedInventorySchemaVersionException":throw await Uh(n);case"HierarchyLevelLimitExceededException":case"com.amazonaws.ssm#HierarchyLevelLimitExceededException":throw await qd(n);case"HierarchyTypeMismatchException":case"com.amazonaws.ssm#HierarchyTypeMismatchException":throw await Vd(n);case"IncompatiblePolicyException":case"com.amazonaws.ssm#IncompatiblePolicyException":throw await Wd(n);case"InvalidAllowedPatternException":case"com.amazonaws.ssm#InvalidAllowedPatternException":throw await Xd(n);case"InvalidPolicyAttributeException":case"com.amazonaws.ssm#InvalidPolicyAttributeException":throw await Mm(n);case"InvalidPolicyTypeException":case"com.amazonaws.ssm#InvalidPolicyTypeException":throw await jm(n);case"ParameterAlreadyExists":case"com.amazonaws.ssm#ParameterAlreadyExists":throw await uh(n);case"ParameterLimitExceeded":case"com.amazonaws.ssm#ParameterLimitExceeded":throw await ph(n);case"ParameterMaxVersionLimitExceeded":case"com.amazonaws.ssm#ParameterMaxVersionLimitExceeded":throw await dh(n);case"ParameterPatternMismatchException":case"com.amazonaws.ssm#ParameterPatternMismatchException":throw await hh(n);case"PoliciesLimitExceededException":case"com.amazonaws.ssm#PoliciesLimitExceededException":throw await yh(n);case"UnsupportedParameterType":case"com.amazonaws.ssm#UnsupportedParameterType":throw await Hh(n);case"ResourcePolicyLimitExceededException":case"com.amazonaws.ssm#ResourcePolicyLimitExceededException":throw await Th(n);case"AlreadyExistsException":case"com.amazonaws.ssm#AlreadyExistsException":throw await xd(n);case"FeatureNotAvailableException":case"com.amazonaws.ssm#FeatureNotAvailableException":throw await Hd(n);case"AutomationStepNotFoundException":case"com.amazonaws.ssm#AutomationStepNotFoundException":throw await Rd(n);case"InvalidAutomationSignalException":case"com.amazonaws.ssm#InvalidAutomationSignalException":throw await nm(n);case"InvalidNotificationConfig":case"com.amazonaws.ssm#InvalidNotificationConfig":throw await Cm(n);case"InvalidOutputFolder":case"com.amazonaws.ssm#InvalidOutputFolder":throw await Tm(n);case"InvalidRole":case"com.amazonaws.ssm#InvalidRole":throw await Lm(n);case"InvalidAssociation":case"com.amazonaws.ssm#InvalidAssociation":throw await Zd(n);case"AutomationDefinitionNotFoundException":case"com.amazonaws.ssm#AutomationDefinitionNotFoundException":throw await Td(n);case"AutomationDefinitionVersionNotFoundException":case"com.amazonaws.ssm#AutomationDefinitionVersionNotFoundException":throw await Pd(n);case"AutomationExecutionLimitExceededException":case"com.amazonaws.ssm#AutomationExecutionLimitExceededException":throw await Ad(n);case"InvalidAutomationExecutionParametersException":case"com.amazonaws.ssm#InvalidAutomationExecutionParametersException":throw await tm(n);case"AutomationDefinitionNotApprovedException":case"com.amazonaws.ssm#AutomationDefinitionNotApprovedException":throw await kd(n);case"TargetNotConnected":case"com.amazonaws.ssm#TargetNotConnected":throw await jh(n);case"InvalidAutomationStatusUpdateException":case"com.amazonaws.ssm#InvalidAutomationStatusUpdateException":throw await im(n);case"AssociationVersionLimitExceeded":case"com.amazonaws.ssm#AssociationVersionLimitExceeded":throw await Cd(n);case"InvalidUpdate":case"com.amazonaws.ssm#InvalidUpdate":throw await qm(n);case"StatusUnchanged":case"com.amazonaws.ssm#StatusUnchanged":throw await Ih(n);case"DocumentVersionLimitExceeded":case"com.amazonaws.ssm#DocumentVersionLimitExceeded":throw await Ld(n);case"DuplicateDocumentContent":case"com.amazonaws.ssm#DuplicateDocumentContent":throw await Fd(n);case"DuplicateDocumentVersionName":case"com.amazonaws.ssm#DuplicateDocumentVersionName":throw await Ud(n);case"OpsMetadataKeyLimitExceededException":case"com.amazonaws.ssm#OpsMetadataKeyLimitExceededException":throw await sh(n);case"ResourceDataSyncConflictException":case"com.amazonaws.ssm#ResourceDataSyncConflictException":throw await bh(n);default:const t=n.body;return Qh({output:e,parsedBody:t,errorCode:i})}},xd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Gl({$metadata:Yh(e),...i});return Tn(r,n)},wd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ru({$metadata:Yh(e),...i});return Tn(r,n)},Ed=async(e,t)=>{const n=e.body,i=Qn(n),r=new iu({$metadata:Yh(e),...i});return Tn(r,n)},Sd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Iu({$metadata:Yh(e),...i});return Tn(r,n)},_d=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ju({$metadata:Yh(e),...i});return Tn(r,n)},Od=async(e,t)=>{const n=e.body,i=Qn(n),r=new ru({$metadata:Yh(e),...i});return Tn(r,n)},Cd=async(e,t)=>{const n=e.body,i=Qn(n),r=new ad({$metadata:Yh(e),...i});return Tn(r,n)},kd=async(e,t)=>{const n=e.body,i=Qn(n),r=new rd({$metadata:Yh(e),...i});return Tn(r,n)},Td=async(e,t)=>{const n=e.body,i=Qn(n),r=new Jp({$metadata:Yh(e),...i});return Tn(r,n)},Pd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Xp({$metadata:Yh(e),...i});return Tn(r,n)},Ad=async(e,t)=>{const n=e.body,i=Qn(n),r=new Zp({$metadata:Yh(e),...i});return Tn(r,n)},Id=async(e,t)=>{const n=e.body,i=Qn(n),r=new ep({$metadata:Yh(e),...i});return Tn(r,n)},Rd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Vp({$metadata:Yh(e),...i});return Tn(r,n)},Md=async(e,t)=>{const n=e.body,i=Qn(n),r=new wp({$metadata:Yh(e),...i});return Tn(r,n)},jd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Op({$metadata:Yh(e),...i});return Tn(r,n)},$d=async(e,t)=>{const n=e.body,i=Qn(n),r=new mu({$metadata:Yh(e),...i});return Tn(r,n)},Nd=async(e,t)=>{const n=e.body,i=Qn(n),r=new hu({$metadata:Yh(e),...i});return Tn(r,n)},Dd=async(e,t)=>{const n=e.body,i=Qn(n),r=new xp({$metadata:Yh(e),...i});return Tn(r,n)},Ld=async(e,t)=>{const n=e.body,i=Qn(n),r=new ud({$metadata:Yh(e),...i});return Tn(r,n)},zd=async(e,t)=>{const n=e.body,i=Qn(n),r=new tu({$metadata:Yh(e),...i});return Tn(r,n)},Fd=async(e,t)=>{const n=e.body,i=Qn(n),r=new pd({$metadata:Yh(e),...i});return Tn(r,n)},Ud=async(e,t)=>{const n=e.body,i=Qn(n),r=new dd({$metadata:Yh(e),...i});return Tn(r,n)},Bd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Xl({$metadata:Yh(e),...i});return Tn(r,n)},Hd=async(e,t)=>{const n=e.body,i=Qn(n),r=new qp({$metadata:Yh(e),...i});return Tn(r,n)},qd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ip({$metadata:Yh(e),...i});return Tn(r,n)},Vd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Rp({$metadata:Yh(e),...i});return Tn(r,n)},Gd=async(e,t)=>{const n=e.body,i=Qn(n),r=new vu({$metadata:Yh(e),...i});return Tn(r,n)},Wd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Mp({$metadata:Yh(e),...i});return Tn(r,n)},Kd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ul({$metadata:Yh(e),...i});return Tn(r,n)},Yd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Pu({$metadata:Yh(e),...i});return Tn(r,n)},Qd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Au({$metadata:Yh(e),...i});return Tn(r,n)},Jd=async(e,t)=>{const n=e.body,i=Qn(n),r=new mp({$metadata:Yh(e),...i});return Tn(r,n)},Xd=async(e,t)=>{const n=e.body,i=Qn(n),r=new jp({$metadata:Yh(e),...i});return Tn(r,n)},Zd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Qp({$metadata:Yh(e),...i});return Tn(r,n)},em=async(e,t)=>{const n=e.body,i=Qn(n),r=new Qu({$metadata:Yh(e),...i});return Tn(r,n)},tm=async(e,t)=>{const n=e.body,i=Qn(n),r=new ed({$metadata:Yh(e),...i});return Tn(r,n)},nm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Gp({$metadata:Yh(e),...i});return Tn(r,n)},im=async(e,t)=>{const n=e.body,i=Qn(n),r=new sd({$metadata:Yh(e),...i});return Tn(r,n)},rm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Zl({$metadata:Yh(e),...i});return Tn(r,n)},om=async(e,t)=>{const n=e.body,i=Qn(n),r=new ju({$metadata:Yh(e),...i});return Tn(r,n)},sm=async(e,t)=>{const n=e.body,i=Qn(n),r=new op({$metadata:Yh(e),...i});return Tn(r,n)},am=async(e,t)=>{const n=e.body,i=Qn(n),r=new ou({$metadata:Yh(e),...i});return Tn(r,n)},cm=async(e,t)=>{const n=e.body,i=Qn(n),r=new fu({$metadata:Yh(e),...i});return Tn(r,n)},lm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Mu({$metadata:Yh(e),...i});return Tn(r,n)},um=async(e,t)=>{const n=e.body,i=Qn(n),r=new gu({$metadata:Yh(e),...i});return Tn(r,n)},pm=async(e,t)=>{const n=e.body,i=Qn(n),r=new cp({$metadata:Yh(e),...i});return Tn(r,n)},dm=async(e,t)=>{const n=e.body,i=Qn(n),r=new su({$metadata:Yh(e),...i});return Tn(r,n)},mm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ku({$metadata:Yh(e),...i});return Tn(r,n)},hm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Xu({$metadata:Yh(e),...i});return Tn(r,n)},fm=async(e,t)=>{const n=e.body,i=Qn(n),r=new sp({$metadata:Yh(e),...i});return Tn(r,n)},gm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Zu({$metadata:Yh(e),...i});return Tn(r,n)},ym=async(e,t)=>{const n=e.body,i=Qn(n),r=new eu({$metadata:Yh(e),...i});return Tn(r,n)},vm=async(e,t)=>{const n=e.body,i=Qn(n),r=new ip({$metadata:Yh(e),...i});return Tn(r,n)},bm=async(e,t)=>{const n=e.body,i=Qn(n),r=new rp({$metadata:Yh(e),...i});return Tn(r,n)},xm=async(e,t)=>{const n=e.body,i=Qn(n),r=new hp({$metadata:Yh(e),...i});return Tn(r,n)},wm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Cp({$metadata:Yh(e),...i});return Tn(r,n)},Em=async(e,t)=>{const n=e.body,i=Qn(n),r=new $u({$metadata:Yh(e),...i});return Tn(r,n)},Sm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ep({$metadata:Yh(e),...i});return Tn(r,n)},_m=async(e,t)=>{const n=e.body,i=Qn(n),r=new gp({$metadata:Yh(e),...i});return Tn(r,n)},Om=async(e,t)=>{const n=e.body,i=Qn(n),r=new Yu({$metadata:Yh(e),...i});return Tn(r,n)},Cm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Wp({$metadata:Yh(e),...i});return Tn(r,n)},km=async(e,t)=>{const n=e.body,i=Qn(n),r=new Nu({$metadata:Yh(e),...i});return Tn(r,n)},Tm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Kp({$metadata:Yh(e),...i});return Tn(r,n)},Pm=async(e,t)=>{const n=e.body,i=Qn(n),r=new au({$metadata:Yh(e),...i});return Tn(r,n)},Am=async(e,t)=>{const n=e.body,i=Qn(n),r=new nu({$metadata:Yh(e),...i});return Tn(r,n)},Im=async(e,t)=>{const n=e.body,i=Qn(n),r=new tp({$metadata:Yh(e),...i});return Tn(r,n)},Rm=async(e,t)=>{const n=e.body,i=Qn(n),r=new up({$metadata:Yh(e),...i});return Tn(r,n)},Mm=async(e,t)=>{const n=e.body,i=Qn(n),r=new $p({$metadata:Yh(e),...i});return Tn(r,n)},jm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Np({$metadata:Yh(e),...i});return Tn(r,n)},$m=async(e,t)=>{const n=e.body,i=Qn(n),r=new Bl({$metadata:Yh(e),...i});return Tn(r,n)},Nm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Hl({$metadata:Yh(e),...i});return Tn(r,n)},Dm=async(e,t)=>{const n=e.body,i=Qn(n),r=new fp({$metadata:Yh(e),...i});return Tn(r,n)},Lm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Yp({$metadata:Yh(e),...i});return Tn(r,n)},zm=async(e,t)=>{const n=e.body,i=Qn(n),r=new cu({$metadata:Yh(e),...i});return Tn(r,n)},Fm=async(e,t)=>{const n=e.body,i=Qn(n),r=new lu({$metadata:Yh(e),...i});return Tn(r,n)},Um=async(e,t)=>{const n=e.body,i=Qn(n),r=new uu({$metadata:Yh(e),...i});return Tn(r,n)},Bm=async(e,t)=>{const n=e.body,i=Qn(n),r=new pu({$metadata:Yh(e),...i});return Tn(r,n)},Hm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Du({$metadata:Yh(e),...i});return Tn(r,n)},qm=async(e,t)=>{const n=e.body,i=Qn(n),r=new cd({$metadata:Yh(e),...i});return Tn(r,n)},Vm=async(e,t)=>{const n=e.body,i=Qn(n),r=new pp({$metadata:Yh(e),...i});return Tn(r,n)},Gm=async(e,t)=>{const n=e.body,i=Qn(n),r=new kp({$metadata:Yh(e),...i});return Tn(r,n)},Wm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Sp({$metadata:Yh(e),...i});return Tn(r,n)},Km=async(e,t)=>{const n=e.body,i=Qn(n),r=new Bu({$metadata:Yh(e),...i});return Tn(r,n)},Ym=async(e,t)=>{const n=e.body,i=Qn(n),r=new yu({$metadata:Yh(e),...i});return Tn(r,n)},Qm=async(e,t)=>{const n=e.body,i=Qn(n),r=new xu({$metadata:Yh(e),...i});return Tn(r,n)},Jm=async(e,t)=>{const n=e.body,i=Qn(n),r=new wu({$metadata:Yh(e),...i});return Tn(r,n)},Xm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Wl({$metadata:Yh(e),...i});return Tn(r,n)},Zm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Kl({$metadata:Yh(e),...i});return Tn(r,n)},eh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Yl({$metadata:Yh(e),...i});return Tn(r,n)},th=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ql({$metadata:Yh(e),...i});return Tn(r,n)},nh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Jl({$metadata:Yh(e),...i});return Tn(r,n)},ih=async(e,t)=>{const n=e.body,i=Qn(n),r=new ap({$metadata:Yh(e),...i});return Tn(r,n)},rh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Eu({$metadata:Yh(e),...i});return Tn(r,n)},oh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Su({$metadata:Yh(e),...i});return Tn(r,n)},sh=async(e,t)=>{const n=e.body,i=Qn(n),r=new md({$metadata:Yh(e),...i});return Tn(r,n)},ah=async(e,t)=>{const n=e.body,i=Qn(n),r=new _u({$metadata:Yh(e),...i});return Tn(r,n)},ch=async(e,t)=>{const n=e.body,i=Qn(n),r=new Lu({$metadata:Yh(e),...i});return Tn(r,n)},lh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ou({$metadata:Yh(e),...i});return Tn(r,n)},uh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Dp({$metadata:Yh(e),...i});return Tn(r,n)},ph=async(e,t)=>{const n=e.body,i=Qn(n),r=new Lp({$metadata:Yh(e),...i});return Tn(r,n)},dh=async(e,t)=>{const n=e.body,i=Qn(n),r=new zp({$metadata:Yh(e),...i});return Tn(r,n)},mh=async(e,t)=>{const n=e.body,i=Qn(n),r=new zu({$metadata:Yh(e),...i});return Tn(r,n)},hh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Fp({$metadata:Yh(e),...i});return Tn(r,n)},fh=async(e,t)=>{const n=e.body,i=Qn(n),r=new bp({$metadata:Yh(e),...i});return Tn(r,n)},gh=async(e,t)=>{const n=e.body,i=Qn(n),r=new yp({$metadata:Yh(e),...i});return Tn(r,n)},yh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Up({$metadata:Yh(e),...i});return Tn(r,n)},vh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Cu({$metadata:Yh(e),...i});return Tn(r,n)},bh=async(e,t)=>{const n=e.body,i=Qn(n),r=new hd({$metadata:Yh(e),...i});return Tn(r,n)},xh=async(e,t)=>{const n=e.body,i=Qn(n),r=new ku({$metadata:Yh(e),...i});return Tn(r,n)},wh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Tu({$metadata:Yh(e),...i});return Tn(r,n)},Eh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Uu({$metadata:Yh(e),...i});return Tn(r,n)},Sh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Fu({$metadata:Yh(e),...i});return Tn(r,n)},_h=async(e,t)=>{const n=e.body,i=Qn(n),r=new bu({$metadata:Yh(e),...i});return Tn(r,n)},Oh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Hu({$metadata:Yh(e),...i});return Tn(r,n)},Ch=async(e,t)=>{const n=e.body,i=Qn(n),r=new qu({$metadata:Yh(e),...i});return Tn(r,n)},kh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Vu({$metadata:Yh(e),...i});return Tn(r,n)},Th=async(e,t)=>{const n=e.body,i=Qn(n),r=new Hp({$metadata:Yh(e),...i});return Tn(r,n)},Ph=async(e,t)=>{const n=e.body,i=Qn(n),r=new Gu({$metadata:Yh(e),...i});return Tn(r,n)},Ah=async(e,t)=>{const n=e.body,i=Qn(n),r=new vp({$metadata:Yh(e),...i});return Tn(r,n)},Ih=async(e,t)=>{const n=e.body,i=Qn(n),r=new ld({$metadata:Yh(e),...i});return Tn(r,n)},Rh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Tp({$metadata:Yh(e),...i});return Tn(r,n)},Mh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Wu({$metadata:Yh(e),...i});return Tn(r,n)},jh=async(e,t)=>{const n=e.body,i=Qn(n),r=new od({$metadata:Yh(e),...i});return Tn(r,n)},$h=async(e,t)=>{const n=e.body,i=Qn(n),r=new ql({$metadata:Yh(e),...i});return Tn(r,n)},Nh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Vl({$metadata:Yh(e),...i});return Tn(r,n)},Dh=async(e,t)=>{const n=e.body,i=Qn(n),r=new _p({$metadata:Yh(e),...i});return Tn(r,n)},Lh=async(e,t)=>{const n=e.body,i=Qn(n),r=new lp({$metadata:Yh(e),...i});return Tn(r,n)},zh=async(e,t)=>{const n=e.body,i=Qn(n),r=new dp({$metadata:Yh(e),...i});return Tn(r,n)},Fh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Pp({$metadata:Yh(e),...i});return Tn(r,n)},Uh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ap({$metadata:Yh(e),...i});return Tn(r,n)},Bh=async(e,t)=>{const n=e.body,i=Qn(n),r=new np({$metadata:Yh(e),...i});return Tn(r,n)},Hh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Bp({$metadata:Yh(e),...i});return Tn(r,n)},qh=async(e,t)=>{const n=e.body,i=Qn(n),r=new du({$metadata:Yh(e),...i});return Tn(r,n)},Vh=(e,t)=>qn(e,{Parameter:e=>Wh(e)}),Gh=(e,t)=>qn(e,{InvalidParameters:Qn,Parameters:e=>Kh(e)}),Wh=(e,t)=>qn(e,{ARN:cn,DataType:cn,LastModifiedDate:e=>an((e=>{if(null==e)return;let t;if("number"==typeof e)t=e;else if("string"==typeof e)t=ln(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))})(Xt(e))),Name:cn,Selector:cn,SourceResult:cn,Type:cn,Value:cn,Version:tn}),Kh=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>Wh(e)));return n},Yh=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"]}),Qh=Pn(Fl),Jh=async(e,t,n,i,r)=>{const{hostname:o,protocol:s="https",port:a,path:c}=await e.endpoint(),l={protocol:s,hostname:o,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:t};return void 0!==r&&(l.body=r),new T(l)};function Xh(e){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AmazonSSM.${e}`}}class Zh extends(Kt.classBuilder().ep(tl).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("AmazonSSM","GetParameter",{}).n("SSMClient","GetParameterCommand").f(void 0,nd).ser(fd).de(yd).build()){}class ef extends(Kt.classBuilder().ep(tl).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("AmazonSSM","GetParameters",{}).n("SSMClient","GetParametersCommand").f(void 0,id).ser(gd).de(vd).build()){}const tf={clientConfig:Cc,onlyDefault:!1,prefix:process.env.SSM_PARAM_PATH},nf=async(e,t,n)=>({operation:D(t).operation,region:await L(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const rf=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ses",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},of={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var sf="3.687.0";const af="required",cf="fn",lf="argv",uf="ref",pf=!0,df="isSet",mf="booleanEquals",hf="error",ff="endpoint",gf="tree",yf="PartitionResult",vf={[af]:!1,type:"String"},bf={[af]:!0,default:!1,type:"Boolean"},xf={[uf]:"Endpoint"},wf={[cf]:mf,[lf]:[{[uf]:"UseFIPS"},!0]},Ef={[cf]:mf,[lf]:[{[uf]:"UseDualStack"},!0]},Sf={},_f={[cf]:"getAttr",[lf]:[{[uf]:yf},"supportsFIPS"]},Of={[cf]:mf,[lf]:[!0,{[cf]:"getAttr",[lf]:[{[uf]:yf},"supportsDualStack"]}]},Cf=[wf],kf=[Ef],Tf=[{[uf]:"Region"}],Pf={version:"1.0",parameters:{Region:vf,UseDualStack:bf,UseFIPS:bf,Endpoint:vf},rules:[{conditions:[{[cf]:df,[lf]:[xf]}],rules:[{conditions:Cf,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:hf},{conditions:kf,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:hf},{endpoint:{url:xf,properties:Sf,headers:Sf},type:ff}],type:gf},{conditions:[{[cf]:df,[lf]:Tf}],rules:[{conditions:[{[cf]:"aws.partition",[lf]:Tf,assign:yf}],rules:[{conditions:[wf,Ef],rules:[{conditions:[{[cf]:mf,[lf]:[pf,_f]},Of],rules:[{endpoint:{url:"https://email-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Sf,headers:Sf},type:ff}],type:gf},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:hf}],type:gf},{conditions:Cf,rules:[{conditions:[{[cf]:mf,[lf]:[_f,pf]}],rules:[{endpoint:{url:"https://email-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Sf,headers:Sf},type:ff}],type:gf},{error:"FIPS is enabled but this partition does not support FIPS",type:hf}],type:gf},{conditions:kf,rules:[{conditions:[Of],rules:[{endpoint:{url:"https://email.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Sf,headers:Sf},type:ff}],type:gf},{error:"DualStack is enabled but this partition does not support DualStack",type:hf}],type:gf},{endpoint:{url:"https://email.{Region}.{PartitionResult#dnsSuffix}",properties:Sf,headers:Sf},type:ff}],type:gf}],type:gf},{error:"Invalid Configuration: Missing Region",type:hf}]},Af=new Te({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),If=(e,t={})=>Af.get(e,(()=>Ze(Pf,{endpointParams:e,logger:t.logger})));Me.aws=nt;const Rf=e=>{const t=ys(e),n=()=>t().then(In),i=(e=>({apiVersion:"2010-12-01",base64Decoder:e?.base64Decoder??te,base64Encoder:e?.base64Encoder??oe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??If,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??rf,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new ct}],logger:e?.logger??new Bn,serviceId:e?.serviceId??"SES",urlParser:e?.urlParser??ar,utf8Decoder:e?.utf8Decoder??ne,utf8Encoder:e?.utf8Encoder??re}))(e);return{...i,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qo,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??fo({serviceId:i.serviceId,clientVersion:sf}),maxAttempts:e?.maxAttempts??3,region:e?.region??Bo("Region is missing"),requestHandler:de.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||fr),sha256:e?.sha256??uo,streamCollector:e?.streamCollector??me,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Gi)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Wi))}},Mf=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}},jf=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});class $f extends Wt{constructor(...[e]){const t=Rf(e||{});var n;const i=ke((n=t,{...n,useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,defaultSigningName:"ses"})),r=Rr(i),o=Qi(r),s=(e=>({...Ut(e)}))(mr(o)),a=((e,t)=>{const n={...xs(e),...Nn(e),...v(e),...Mf(e)};return t.forEach((e=>e.configure(n))),{...e,...ws(n),...Dn(n),...b(n),...jf(n)}})(s,e?.extensions||[]);super(a),this.config=a,this.middlewareStack.use(qi(this.config)),this.middlewareStack.use(Lr(this.config)),this.middlewareStack.use(Zi(this.config)),this.middlewareStack.use(I(this.config)),this.middlewareStack.use(M(this.config)),this.middlewareStack.use(N(this.config)),this.middlewareStack.use(U(this.config,{httpAuthSchemeParametersProvider:nf,identityProviderConfigProvider:async e=>new Ee({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(K(this.config))}destroy(){super.destroy()}}class Nf extends kn{constructor(e){super(e),Object.setPrototypeOf(this,Nf.prototype)}}class Df extends Nf{constructor(e){super({name:"AccountSendingPausedException",$fault:"client",...e}),this.name="AccountSendingPausedException",this.$fault="client",Object.setPrototypeOf(this,Df.prototype)}}class Lf extends Nf{constructor(e){super({name:"AlreadyExistsException",$fault:"client",...e}),this.name="AlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Lf.prototype),this.Name=e.Name}}class zf extends Nf{constructor(e){super({name:"CannotDeleteException",$fault:"client",...e}),this.name="CannotDeleteException",this.$fault="client",Object.setPrototypeOf(this,zf.prototype),this.Name=e.Name}}class Ff extends Nf{constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Ff.prototype)}}class Uf extends Nf{constructor(e){super({name:"RuleSetDoesNotExistException",$fault:"client",...e}),this.name="RuleSetDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,Uf.prototype),this.Name=e.Name}}class Bf extends Nf{constructor(e){super({name:"ConfigurationSetAlreadyExistsException",$fault:"client",...e}),this.name="ConfigurationSetAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Bf.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class Hf extends Nf{constructor(e){super({name:"ConfigurationSetDoesNotExistException",$fault:"client",...e}),this.name="ConfigurationSetDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,Hf.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class qf extends Nf{constructor(e){super({name:"ConfigurationSetSendingPausedException",$fault:"client",...e}),this.name="ConfigurationSetSendingPausedException",this.$fault="client",Object.setPrototypeOf(this,qf.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class Vf extends Nf{constructor(e){super({name:"InvalidConfigurationSetException",$fault:"client",...e}),this.name="InvalidConfigurationSetException",this.$fault="client",Object.setPrototypeOf(this,Vf.prototype)}}class Gf extends Nf{constructor(e){super({name:"EventDestinationAlreadyExistsException",$fault:"client",...e}),this.name="EventDestinationAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Gf.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class Wf extends Nf{constructor(e){super({name:"InvalidCloudWatchDestinationException",$fault:"client",...e}),this.name="InvalidCloudWatchDestinationException",this.$fault="client",Object.setPrototypeOf(this,Wf.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class Kf extends Nf{constructor(e){super({name:"InvalidFirehoseDestinationException",$fault:"client",...e}),this.name="InvalidFirehoseDestinationException",this.$fault="client",Object.setPrototypeOf(this,Kf.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class Yf extends Nf{constructor(e){super({name:"InvalidSNSDestinationException",$fault:"client",...e}),this.name="InvalidSNSDestinationException",this.$fault="client",Object.setPrototypeOf(this,Yf.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class Qf extends Nf{constructor(e){super({name:"InvalidTrackingOptionsException",$fault:"client",...e}),this.name="InvalidTrackingOptionsException",this.$fault="client",Object.setPrototypeOf(this,Qf.prototype)}}class Jf extends Nf{constructor(e){super({name:"TrackingOptionsAlreadyExistsException",$fault:"client",...e}),this.name="TrackingOptionsAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Jf.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class Xf extends Nf{constructor(e){super({name:"CustomVerificationEmailInvalidContentException",$fault:"client",...e}),this.name="CustomVerificationEmailInvalidContentException",this.$fault="client",Object.setPrototypeOf(this,Xf.prototype)}}class Zf extends Nf{constructor(e){super({name:"CustomVerificationEmailTemplateAlreadyExistsException",$fault:"client",...e}),this.name="CustomVerificationEmailTemplateAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Zf.prototype),this.CustomVerificationEmailTemplateName=e.CustomVerificationEmailTemplateName}}class eg extends Nf{constructor(e){super({name:"FromEmailAddressNotVerifiedException",$fault:"client",...e}),this.name="FromEmailAddressNotVerifiedException",this.$fault="client",Object.setPrototypeOf(this,eg.prototype),this.FromEmailAddress=e.FromEmailAddress}}class tg extends Nf{constructor(e){super({name:"InvalidLambdaFunctionException",$fault:"client",...e}),this.name="InvalidLambdaFunctionException",this.$fault="client",Object.setPrototypeOf(this,tg.prototype),this.FunctionArn=e.FunctionArn}}class ng extends Nf{constructor(e){super({name:"InvalidS3ConfigurationException",$fault:"client",...e}),this.name="InvalidS3ConfigurationException",this.$fault="client",Object.setPrototypeOf(this,ng.prototype),this.Bucket=e.Bucket}}class ig extends Nf{constructor(e){super({name:"InvalidSnsTopicException",$fault:"client",...e}),this.name="InvalidSnsTopicException",this.$fault="client",Object.setPrototypeOf(this,ig.prototype),this.Topic=e.Topic}}class rg extends Nf{constructor(e){super({name:"RuleDoesNotExistException",$fault:"client",...e}),this.name="RuleDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,rg.prototype),this.Name=e.Name}}class og extends Nf{constructor(e){super({name:"InvalidTemplateException",$fault:"client",...e}),this.name="InvalidTemplateException",this.$fault="client",Object.setPrototypeOf(this,og.prototype),this.TemplateName=e.TemplateName}}class sg extends Nf{constructor(e){super({name:"CustomVerificationEmailTemplateDoesNotExistException",$fault:"client",...e}),this.name="CustomVerificationEmailTemplateDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,sg.prototype),this.CustomVerificationEmailTemplateName=e.CustomVerificationEmailTemplateName}}class ag extends Nf{constructor(e){super({name:"EventDestinationDoesNotExistException",$fault:"client",...e}),this.name="EventDestinationDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,ag.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class cg extends Nf{constructor(e){super({name:"TrackingOptionsDoesNotExistException",$fault:"client",...e}),this.name="TrackingOptionsDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,cg.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class lg extends Nf{constructor(e){super({name:"TemplateDoesNotExistException",$fault:"client",...e}),this.name="TemplateDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,lg.prototype),this.TemplateName=e.TemplateName}}class ug extends Nf{constructor(e){super({name:"InvalidDeliveryOptionsException",$fault:"client",...e}),this.name="InvalidDeliveryOptionsException",this.$fault="client",Object.setPrototypeOf(this,ug.prototype)}}class pg extends Nf{constructor(e){super({name:"InvalidPolicyException",$fault:"client",...e}),this.name="InvalidPolicyException",this.$fault="client",Object.setPrototypeOf(this,pg.prototype)}}class dg extends Nf{constructor(e){super({name:"InvalidRenderingParameterException",$fault:"client",...e}),this.name="InvalidRenderingParameterException",this.$fault="client",Object.setPrototypeOf(this,dg.prototype),this.TemplateName=e.TemplateName}}class mg extends Nf{constructor(e){super({name:"MailFromDomainNotVerifiedException",$fault:"client",...e}),this.name="MailFromDomainNotVerifiedException",this.$fault="client",Object.setPrototypeOf(this,mg.prototype)}}class hg extends Nf{constructor(e){super({name:"MessageRejected",$fault:"client",...e}),this.name="MessageRejected",this.$fault="client",Object.setPrototypeOf(this,hg.prototype)}}class fg extends Nf{constructor(e){super({name:"MissingRenderingAttributeException",$fault:"client",...e}),this.name="MissingRenderingAttributeException",this.$fault="client",Object.setPrototypeOf(this,fg.prototype),this.TemplateName=e.TemplateName}}class gg extends Nf{constructor(e){super({name:"ProductionAccessNotGrantedException",$fault:"client",...e}),this.name="ProductionAccessNotGrantedException",this.$fault="client",Object.setPrototypeOf(this,gg.prototype)}}const yg=async(e,t)=>{const n=GS;let i;return i=TT({...$b(e),[KS]:x_,[hT]:WS}),VS(t,n,"/",void 0,i)},vg=async(e,t)=>{const n=GS;let i;return i=TT({...Fb(e),[KS]:m_,[hT]:WS}),VS(t,n,"/",void 0,i)},bg=async(e,t)=>{const n=GS;let i;return i=TT({...zb(e),[KS]:h_,[hT]:WS}),VS(t,n,"/",void 0,i)},xg=async(e,t)=>{const n=GS;let i;return i=TT({...Ub(e),[KS]:f_,[hT]:WS}),VS(t,n,"/",void 0,i)},wg=async(e,t)=>{const n=GS;let i;return i=TT({...Bb(e),[KS]:g_,[hT]:WS}),VS(t,n,"/",void 0,i)},Eg=async(e,t)=>{const n=GS;let i;return i=TT({...Hb(e),[KS]:v_,[hT]:WS}),VS(t,n,"/",void 0,i)},Sg=async(e,t)=>{const n=GS;let i;return i=TT({...qb(e),[KS]:b_,[hT]:WS}),VS(t,n,"/",void 0,i)},_g=async(e,t)=>{const n=GS;let i;return i=TT({...Vb(e),[KS]:w_,[hT]:WS}),VS(t,n,"/",void 0,i)},Og=async(e,t)=>{const n=GS;let i;return i=TT({...Gb(e),[KS]:C_,[hT]:WS}),VS(t,n,"/",void 0,i)},Cg=async(e,t)=>{const n=GS;let i;return i=TT({...Kb(e),[KS]:z_,[hT]:WS}),VS(t,n,"/",void 0,i)},kg=async(e,t)=>{const n=GS;let i;return i=TT({...Wb(e),[KS]:F_,[hT]:WS}),VS(t,n,"/",void 0,i)},Tg=async(e,t)=>{const n=GS;let i;return i=TT({...Yb(e),[KS]:U_,[hT]:WS}),VS(t,n,"/",void 0,i)},Pg=async(e,t)=>{const n=GS;let i;return i=TT({...Qb(e),[KS]:H_,[hT]:WS}),VS(t,n,"/",void 0,i)},Ag=async(e,t)=>{const n=GS;let i;return i=TT({...Xb(e),[KS]:W_,[hT]:WS}),VS(t,n,"/",void 0,i)},Ig=async(e,t)=>{const n=GS;let i;return i=TT({...Jb(e),[KS]:K_,[hT]:WS}),VS(t,n,"/",void 0,i)},Rg=async(e,t)=>{const n=GS;let i;return i=TT({...Zb(e),[KS]:J_,[hT]:WS}),VS(t,n,"/",void 0,i)},Mg=async(e,t)=>{const n=GS;let i;return i=TT({...ex(e),[KS]:X_,[hT]:WS}),VS(t,n,"/",void 0,i)},jg=async(e,t)=>{const n=GS;let i;return i=TT({...tx(e),[KS]:Z_,[hT]:WS}),VS(t,n,"/",void 0,i)},$g=async(e,t)=>{const n=GS;let i;return i=TT({...nx(e),[KS]:iO,[hT]:WS}),VS(t,n,"/",void 0,i)},Ng=async(e,t)=>{const n=GS;let i;return i=TT({...ix(e),[KS]:cO,[hT]:WS}),VS(t,n,"/",void 0,i)},Dg=async(e,t)=>{const n=GS;let i;return i=TT({...rx(),[KS]:N_,[hT]:WS}),VS(t,n,"/",void 0,i)},Lg=async(e,t)=>{const n=GS;let i;return i=TT({...ox(e),[KS]:B_,[hT]:WS}),VS(t,n,"/",void 0,i)},zg=async(e,t)=>{const n=GS;let i;return i=TT({...sx(e),[KS]:tO,[hT]:WS}),VS(t,n,"/",void 0,i)},Fg=async(e,t)=>{const n=GS;let i;return i=TT({...ax(e),[KS]:eO,[hT]:WS}),VS(t,n,"/",void 0,i)},Ug=async(e,t)=>{const n=GS,i=TT({[KS]:RO,[hT]:WS});return VS(t,n,"/",void 0,i)},Bg=async(e,t)=>{const n=GS;let i;return i=TT({...mx(e),[KS]:MO,[hT]:WS}),VS(t,n,"/",void 0,i)},Hg=async(e,t)=>{const n=GS;let i;return i=TT({...hx(e),[KS]:jO,[hT]:WS}),VS(t,n,"/",void 0,i)},qg=async(e,t)=>{const n=GS;let i;return i=TT({...fx(e),[KS]:$O,[hT]:WS}),VS(t,n,"/",void 0,i)},Vg=async(e,t)=>{const n=GS;let i;return i=TT({...gx(e),[KS]:NO,[hT]:WS}),VS(t,n,"/",void 0,i)},Gg=async(e,t)=>{const n=GS;let i;return i=TT({...yx(e),[KS]:DO,[hT]:WS}),VS(t,n,"/",void 0,i)},Wg=async(e,t)=>{const n=GS;let i;return i=TT({...vx(e),[KS]:LO,[hT]:WS}),VS(t,n,"/",void 0,i)},Kg=async(e,t)=>{const n=GS,i=TT({[KS]:zO,[hT]:WS});return VS(t,n,"/",void 0,i)},Yg=async(e,t)=>{const n=GS,i=TT({[KS]:FO,[hT]:WS});return VS(t,n,"/",void 0,i)},Qg=async(e,t)=>{const n=GS;let i;return i=TT({...bx(e),[KS]:UO,[hT]:WS}),VS(t,n,"/",void 0,i)},Jg=async(e,t)=>{const n=GS;let i;return i=TT({...Ex(e),[KS]:sC,[hT]:WS}),VS(t,n,"/",void 0,i)},Xg=async(e,t)=>{const n=GS;let i;return i=TT({...Sx(e),[KS]:aC,[hT]:WS}),VS(t,n,"/",void 0,i)},Zg=async(e,t)=>{const n=GS;let i;return i=TT({..._x(e),[KS]:lC,[hT]:WS}),VS(t,n,"/",void 0,i)},ey=async(e,t)=>{const n=GS;let i;return i=TT({...Ox(e),[KS]:uC,[hT]:WS}),VS(t,n,"/",void 0,i)},ty=async(e,t)=>{const n=GS;let i;return i=TT({...Cx(),[KS]:pC,[hT]:WS}),VS(t,n,"/",void 0,i)},ny=async(e,t)=>{const n=GS;let i;return i=TT({...kx(e),[KS]:dC,[hT]:WS}),VS(t,n,"/",void 0,i)},iy=async(e,t)=>{const n=GS;let i;return i=TT({...Tx(e),[KS]:mC,[hT]:WS}),VS(t,n,"/",void 0,i)},ry=async(e,t)=>{const n=GS,i=TT({[KS]:hC,[hT]:WS});return VS(t,n,"/",void 0,i)},oy=async(e,t)=>{const n=GS;let i;return i=TT({...Mx(e),[KS]:NC,[hT]:WS}),VS(t,n,"/",void 0,i)},sy=async(e,t)=>{const n=GS;let i;return i=TT({...jx(e),[KS]:DC,[hT]:WS}),VS(t,n,"/",void 0,i)},ay=async(e,t)=>{const n=GS;let i;return i=TT({...Ux(e),[KS]:ZC,[hT]:WS}),VS(t,n,"/",void 0,i)},cy=async(e,t)=>{const n=GS;let i;return i=TT({...Hx(e),[KS]:fk,[hT]:WS}),VS(t,n,"/",void 0,i)},ly=async(e,t)=>{const n=GS;let i;return i=TT({...qx(e),[KS]:gk,[hT]:WS}),VS(t,n,"/",void 0,i)},uy=async(e,t)=>{const n=GS;let i;return i=TT({...Vx(e),[KS]:vk,[hT]:WS}),VS(t,n,"/",void 0,i)},py=async(e,t)=>{const n=GS;let i;return i=TT({...Gx(e),[KS]:xk,[hT]:WS}),VS(t,n,"/",void 0,i)},dy=async(e,t)=>{const n=GS;let i;return i=TT({...Wx(e,t),[KS]:Mk,[hT]:WS}),VS(t,n,"/",void 0,i)},my=async(e,t)=>{const n=GS;let i;return i=TT({...Kx(e),[KS]:Dk,[hT]:WS}),VS(t,n,"/",void 0,i)},hy=async(e,t)=>{const n=GS;let i;return i=TT({...Yx(e),[KS]:dk,[hT]:WS}),VS(t,n,"/",void 0,i)},fy=async(e,t)=>{const n=GS;let i;return i=TT({...Qx(e),[KS]:Sk,[hT]:WS}),VS(t,n,"/",void 0,i)},gy=async(e,t)=>{const n=GS;let i;return i=TT({...Jx(e),[KS]:_k,[hT]:WS}),VS(t,n,"/",void 0,i)},yy=async(e,t)=>{const n=GS;let i;return i=TT({...Xx(e),[KS]:Ok,[hT]:WS}),VS(t,n,"/",void 0,i)},vy=async(e,t)=>{const n=GS;let i;return i=TT({...Zx(e),[KS]:Ck,[hT]:WS}),VS(t,n,"/",void 0,i)},by=async(e,t)=>{const n=GS;let i;return i=TT({...ew(e),[KS]:kk,[hT]:WS}),VS(t,n,"/",void 0,i)},xy=async(e,t)=>{const n=GS;let i;return i=TT({...tw(e),[KS]:jk,[hT]:WS}),VS(t,n,"/",void 0,i)},wy=async(e,t)=>{const n=GS;let i;return i=TT({...sw(e),[KS]:eT,[hT]:WS}),VS(t,n,"/",void 0,i)},Ey=async(e,t)=>{const n=GS;let i;return i=TT({...cw(e),[KS]:sT,[hT]:WS}),VS(t,n,"/",void 0,i)},Sy=async(e,t)=>{const n=GS;let i;return i=TT({...lw(e),[KS]:aT,[hT]:WS}),VS(t,n,"/",void 0,i)},_y=async(e,t)=>{const n=GS;let i;return i=TT({...uw(e),[KS]:cT,[hT]:WS}),VS(t,n,"/",void 0,i)},Oy=async(e,t)=>{const n=GS;let i;return i=TT({...pw(e),[KS]:lT,[hT]:WS}),VS(t,n,"/",void 0,i)},Cy=async(e,t)=>{const n=GS;let i;return i=TT({...dw(e),[KS]:uT,[hT]:WS}),VS(t,n,"/",void 0,i)},ky=async(e,t)=>{const n=GS;let i;return i=TT({...mw(e),[KS]:pT,[hT]:WS}),VS(t,n,"/",void 0,i)},Ty=async(e,t)=>{const n=GS;let i;return i=TT({...hw(e),[KS]:dT,[hT]:WS}),VS(t,n,"/",void 0,i)},Py=async(e,t)=>{const n=GS;let i;return i=TT({...fw(e),[KS]:mT,[hT]:WS}),VS(t,n,"/",void 0,i)},Ay=async(e,t)=>{const n=GS;let i;return i=TT({...gw(e),[KS]:gT,[hT]:WS}),VS(t,n,"/",void 0,i)},Iy=async(e,t)=>{const n=GS;let i;return i=TT({...yw(e),[KS]:yT,[hT]:WS}),VS(t,n,"/",void 0,i)},Ry=async(e,t)=>{const n=GS;let i;return i=TT({...vw(e),[KS]:vT,[hT]:WS}),VS(t,n,"/",void 0,i)},My=async(e,t)=>{const n=GS;let i;return i=TT({...bw(e),[KS]:xT,[hT]:WS}),VS(t,n,"/",void 0,i)},jy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Ow(n.CloneReceiptRuleSetResult);return{$metadata:HS(e),...i}},$y=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Rw(n.CreateConfigurationSetResult);return{$metadata:HS(e),...i}},Ny=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Iw(n.CreateConfigurationSetEventDestinationResult);return{$metadata:HS(e),...i}},Dy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Mw(n.CreateConfigurationSetTrackingOptionsResult);return{$metadata:HS(e),...i}},Ly=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},zy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=jw(n.CreateReceiptFilterResult);return{$metadata:HS(e),...i}},Fy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=$w(n.CreateReceiptRuleResult);return{$metadata:HS(e),...i}},Uy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Nw(n.CreateReceiptRuleSetResult);return{$metadata:HS(e),...i}},By=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Dw(n.CreateTemplateResult);return{$metadata:HS(e),...i}},Hy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Hw(n.DeleteConfigurationSetResult);return{$metadata:HS(e),...i}},qy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Bw(n.DeleteConfigurationSetEventDestinationResult);return{$metadata:HS(e),...i}},Vy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=qw(n.DeleteConfigurationSetTrackingOptionsResult);return{$metadata:HS(e),...i}},Gy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},Wy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Gw(n.DeleteIdentityResult);return{$metadata:HS(e),...i}},Ky=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Vw(n.DeleteIdentityPolicyResult);return{$metadata:HS(e),...i}},Yy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Ww(n.DeleteReceiptFilterResult);return{$metadata:HS(e),...i}},Qy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Kw(n.DeleteReceiptRuleResult);return{$metadata:HS(e),...i}},Jy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Yw(n.DeleteReceiptRuleSetResult);return{$metadata:HS(e),...i}},Xy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Qw(n.DeleteTemplateResult);return{$metadata:HS(e),...i}},Zy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},ev=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Jw(n.DescribeActiveReceiptRuleSetResult);return{$metadata:HS(e),...i}},tv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Xw(n.DescribeConfigurationSetResult);return{$metadata:HS(e),...i}},nv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Zw(n.DescribeReceiptRuleResult);return{$metadata:HS(e),...i}},iv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=eE(n.DescribeReceiptRuleSetResult);return{$metadata:HS(e),...i}},rv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=aE(n.GetAccountSendingEnabledResult);return{$metadata:HS(e),...i}},ov=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=cE(n.GetCustomVerificationEmailTemplateResult);return{$metadata:HS(e),...i}},sv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=lE(n.GetIdentityDkimAttributesResult);return{$metadata:HS(e),...i}},av=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=uE(n.GetIdentityMailFromDomainAttributesResult);return{$metadata:HS(e),...i}},cv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=pE(n.GetIdentityNotificationAttributesResult);return{$metadata:HS(e),...i}},lv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=dE(n.GetIdentityPoliciesResult);return{$metadata:HS(e),...i}},uv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=mE(n.GetIdentityVerificationAttributesResult);return{$metadata:HS(e),...i}},pv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=hE(n.GetSendQuotaResult);return{$metadata:HS(e),...i}},dv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=fE(n.GetSendStatisticsResult);return{$metadata:HS(e),...i}},mv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=gE(n.GetTemplateResult);return{$metadata:HS(e),...i}},hv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=RE(n.ListConfigurationSetsResult);return{$metadata:HS(e),...i}},fv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=ME(n.ListCustomVerificationEmailTemplatesResult);return{$metadata:HS(e),...i}},gv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=jE(n.ListIdentitiesResult);return{$metadata:HS(e),...i}},yv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=$E(n.ListIdentityPoliciesResult);return{$metadata:HS(e),...i}},vv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=NE(n.ListReceiptFiltersResult);return{$metadata:HS(e),...i}},bv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=DE(n.ListReceiptRuleSetsResult);return{$metadata:HS(e),...i}},xv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=LE(n.ListTemplatesResult);return{$metadata:HS(e),...i}},wv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=zE(n.ListVerifiedEmailAddressesResult);return{$metadata:HS(e),...i}},Ev=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=KE(n.PutConfigurationSetDeliveryOptionsResult);return{$metadata:HS(e),...i}},Sv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=YE(n.PutIdentityPolicyResult);return{$metadata:HS(e),...i}},_v=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=rS(n.ReorderReceiptRuleSetResult);return{$metadata:HS(e),...i}},Ov=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=lS(n.SendBounceResult);return{$metadata:HS(e),...i}},Cv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=uS(n.SendBulkTemplatedEmailResult);return{$metadata:HS(e),...i}},kv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=pS(n.SendCustomVerificationEmailResult);return{$metadata:HS(e),...i}},Tv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=mS(n.SendEmailResult);return{$metadata:HS(e),...i}},Pv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=hS(n.SendRawEmailResult);return{$metadata:HS(e),...i}},Av=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=fS(n.SendTemplatedEmailResult);return{$metadata:HS(e),...i}},Iv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=gS(n.SetActiveReceiptRuleSetResult);return{$metadata:HS(e),...i}},Rv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=yS(n.SetIdentityDkimEnabledResult);return{$metadata:HS(e),...i}},Mv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=vS(n.SetIdentityFeedbackForwardingEnabledResult);return{$metadata:HS(e),...i}},jv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=bS(n.SetIdentityHeadersInNotificationsEnabledResult);return{$metadata:HS(e),...i}},$v=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=xS(n.SetIdentityMailFromDomainResult);return{$metadata:HS(e),...i}},Nv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=wS(n.SetIdentityNotificationTopicResult);return{$metadata:HS(e),...i}},Dv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=ES(n.SetReceiptRulePositionResult);return{$metadata:HS(e),...i}},Lv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=PS(n.TestRenderTemplateResult);return{$metadata:HS(e),...i}},zv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},Fv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=MS(n.UpdateConfigurationSetEventDestinationResult);return{$metadata:HS(e),...i}},Uv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},Bv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},Hv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=jS(n.UpdateConfigurationSetTrackingOptionsResult);return{$metadata:HS(e),...i}},qv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},Vv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=$S(n.UpdateReceiptRuleResult);return{$metadata:HS(e),...i}},Gv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=NS(n.UpdateTemplateResult);return{$metadata:HS(e),...i}},Wv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=zS(n.VerifyDomainDkimResult);return{$metadata:HS(e),...i}},Kv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=FS(n.VerifyDomainIdentityResult);return{$metadata:HS(e),...i}},Yv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},Qv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=US(n.VerifyEmailIdentityResult);return{$metadata:HS(e),...i}},Jv=async(e,t)=>{const n={...e,body:await $i(e.body,t)},i=PT(e,n.body);switch(i){case"AlreadyExists":case"com.amazonaws.ses#AlreadyExistsException":throw await Zv(n);case"LimitExceeded":case"com.amazonaws.ses#LimitExceededException":throw await Eb(n);case"RuleSetDoesNotExist":case"com.amazonaws.ses#RuleSetDoesNotExistException":throw await Tb(n);case"ConfigurationSetAlreadyExists":case"com.amazonaws.ses#ConfigurationSetAlreadyExistsException":throw await tb(n);case"InvalidConfigurationSet":case"com.amazonaws.ses#InvalidConfigurationSetException":throw await pb(n);case"ConfigurationSetDoesNotExist":case"com.amazonaws.ses#ConfigurationSetDoesNotExistException":throw await nb(n);case"EventDestinationAlreadyExists":case"com.amazonaws.ses#EventDestinationAlreadyExistsException":throw await ab(n);case"InvalidCloudWatchDestination":case"com.amazonaws.ses#InvalidCloudWatchDestinationException":throw await ub(n);case"InvalidFirehoseDestination":case"com.amazonaws.ses#InvalidFirehoseDestinationException":throw await mb(n);case"InvalidSNSDestination":case"com.amazonaws.ses#InvalidSNSDestinationException":throw await vb(n);case"InvalidTrackingOptions":case"com.amazonaws.ses#InvalidTrackingOptionsException":throw await wb(n);case"TrackingOptionsAlreadyExistsException":case"com.amazonaws.ses#TrackingOptionsAlreadyExistsException":throw await Ab(n);case"CustomVerificationEmailInvalidContent":case"com.amazonaws.ses#CustomVerificationEmailInvalidContentException":throw await rb(n);case"CustomVerificationEmailTemplateAlreadyExists":case"com.amazonaws.ses#CustomVerificationEmailTemplateAlreadyExistsException":throw await ob(n);case"FromEmailAddressNotVerified":case"com.amazonaws.ses#FromEmailAddressNotVerifiedException":throw await lb(n);case"InvalidLambdaFunction":case"com.amazonaws.ses#InvalidLambdaFunctionException":throw await hb(n);case"InvalidS3Configuration":case"com.amazonaws.ses#InvalidS3ConfigurationException":throw await yb(n);case"InvalidSnsTopic":case"com.amazonaws.ses#InvalidSnsTopicException":throw await bb(n);case"RuleDoesNotExist":case"com.amazonaws.ses#RuleDoesNotExistException":throw await kb(n);case"InvalidTemplate":case"com.amazonaws.ses#InvalidTemplateException":throw await xb(n);case"EventDestinationDoesNotExist":case"com.amazonaws.ses#EventDestinationDoesNotExistException":throw await cb(n);case"TrackingOptionsDoesNotExistException":case"com.amazonaws.ses#TrackingOptionsDoesNotExistException":throw await Ib(n);case"CannotDelete":case"com.amazonaws.ses#CannotDeleteException":throw await eb(n);case"CustomVerificationEmailTemplateDoesNotExist":case"com.amazonaws.ses#CustomVerificationEmailTemplateDoesNotExistException":throw await sb(n);case"TemplateDoesNotExist":case"com.amazonaws.ses#TemplateDoesNotExistException":throw await Pb(n);case"InvalidDeliveryOptions":case"com.amazonaws.ses#InvalidDeliveryOptionsException":throw await db(n);case"InvalidPolicy":case"com.amazonaws.ses#InvalidPolicyException":throw await fb(n);case"MessageRejected":case"com.amazonaws.ses#MessageRejected":throw await _b(n);case"AccountSendingPausedException":case"com.amazonaws.ses#AccountSendingPausedException":throw await Xv(n);case"ConfigurationSetSendingPausedException":case"com.amazonaws.ses#ConfigurationSetSendingPausedException":throw await ib(n);case"MailFromDomainNotVerifiedException":case"com.amazonaws.ses#MailFromDomainNotVerifiedException":throw await Sb(n);case"ProductionAccessNotGranted":case"com.amazonaws.ses#ProductionAccessNotGrantedException":throw await Cb(n);case"InvalidRenderingParameter":case"com.amazonaws.ses#InvalidRenderingParameterException":throw await gb(n);case"MissingRenderingAttribute":case"com.amazonaws.ses#MissingRenderingAttributeException":throw await Ob(n);default:const t=n.body;return qS({output:e,parsedBody:t.Error,errorCode:i})}},Xv=async(e,t)=>{const n=e.body,i=ww(n.Error),r=new Df({$metadata:HS(e),...i});return Tn(r,n)},Zv=async(e,t)=>{const n=e.body,i=Ew(n.Error),r=new Lf({$metadata:HS(e),...i});return Tn(r,n)},eb=async(e,t)=>{const n=e.body,i=_w(n.Error),r=new zf({$metadata:HS(e),...i});return Tn(r,n)},tb=async(e,t)=>{const n=e.body,i=Tw(n.Error),r=new Bf({$metadata:HS(e),...i});return Tn(r,n)},nb=async(e,t)=>{const n=e.body,i=Pw(n.Error),r=new Hf({$metadata:HS(e),...i});return Tn(r,n)},ib=async(e,t)=>{const n=e.body,i=Aw(n.Error),r=new qf({$metadata:HS(e),...i});return Tn(r,n)},rb=async(e,t)=>{const n=e.body,i=Lw(n.Error),r=new Xf({$metadata:HS(e),...i});return Tn(r,n)},ob=async(e,t)=>{const n=e.body,i=zw(n.Error),r=new Zf({$metadata:HS(e),...i});return Tn(r,n)},sb=async(e,t)=>{const n=e.body,i=Fw(n.Error),r=new sg({$metadata:HS(e),...i});return Tn(r,n)},ab=async(e,t)=>{const n=e.body,i=nE(n.Error),r=new Gf({$metadata:HS(e),...i});return Tn(r,n)},cb=async(e,t)=>{const n=e.body,i=iE(n.Error),r=new ag({$metadata:HS(e),...i});return Tn(r,n)},lb=async(e,t)=>{const n=e.body,i=sE(n.Error),r=new eg({$metadata:HS(e),...i});return Tn(r,n)},ub=async(e,t)=>{const n=e.body,i=vE(n.Error),r=new Wf({$metadata:HS(e),...i});return Tn(r,n)},pb=async(e,t)=>{const n=e.body,i=bE(n.Error),r=new Vf({$metadata:HS(e),...i});return Tn(r,n)},db=async(e,t)=>{const n=e.body,i=xE(n.Error),r=new ug({$metadata:HS(e),...i});return Tn(r,n)},mb=async(e,t)=>{const n=e.body,i=wE(n.Error),r=new Kf({$metadata:HS(e),...i});return Tn(r,n)},hb=async(e,t)=>{const n=e.body,i=EE(n.Error),r=new tg({$metadata:HS(e),...i});return Tn(r,n)},fb=async(e,t)=>{const n=e.body,i=SE(n.Error),r=new pg({$metadata:HS(e),...i});return Tn(r,n)},gb=async(e,t)=>{const n=e.body,i=_E(n.Error),r=new dg({$metadata:HS(e),...i});return Tn(r,n)},yb=async(e,t)=>{const n=e.body,i=OE(n.Error),r=new ng({$metadata:HS(e),...i});return Tn(r,n)},vb=async(e,t)=>{const n=e.body,i=CE(n.Error),r=new Yf({$metadata:HS(e),...i});return Tn(r,n)},bb=async(e,t)=>{const n=e.body,i=kE(n.Error),r=new ig({$metadata:HS(e),...i});return Tn(r,n)},xb=async(e,t)=>{const n=e.body,i=TE(n.Error),r=new og({$metadata:HS(e),...i});return Tn(r,n)},wb=async(e,t)=>{const n=e.body,i=PE(n.Error),r=new Qf({$metadata:HS(e),...i});return Tn(r,n)},Eb=async(e,t)=>{const n=e.body,i=IE(n.Error),r=new Ff({$metadata:HS(e),...i});return Tn(r,n)},Sb=async(e,t)=>{const n=e.body,i=UE(n.Error),r=new mg({$metadata:HS(e),...i});return Tn(r,n)},_b=async(e,t)=>{const n=e.body,i=BE(n.Error),r=new hg({$metadata:HS(e),...i});return Tn(r,n)},Ob=async(e,t)=>{const n=e.body,i=HE(n.Error),r=new fg({$metadata:HS(e),...i});return Tn(r,n)},Cb=async(e,t)=>{const n=e.body,i=WE(n.Error),r=new gg({$metadata:HS(e),...i});return Tn(r,n)},kb=async(e,t)=>{const n=e.body,i=sS(n.Error),r=new rg({$metadata:HS(e),...i});return Tn(r,n)},Tb=async(e,t)=>{const n=e.body,i=aS(n.Error),r=new Uf({$metadata:HS(e),...i});return Tn(r,n)},Pb=async(e,t)=>{const n=e.body,i=kS(n.Error),r=new lg({$metadata:HS(e),...i});return Tn(r,n)},Ab=async(e,t)=>{const n=e.body,i=IS(n.Error),r=new Jf({$metadata:HS(e),...i});return Tn(r,n)},Ib=async(e,t)=>{const n=e.body,i=RS(n.Error),r=new cg({$metadata:HS(e),...i});return Tn(r,n)},Rb=(e,t)=>{const n={};let i=1;for(const t of e)null!==t&&(n[`member.${i}`]=t,i++);return n},Mb=(e,t)=>{const n={};if(null!=e[UC]&&(n[UC]=e[UC]),null!=e[BC]&&(n[BC]=e[BC]),null!=e[a_]&&(n[a_]=e[a_]),null!=e[HC]){const t=zx(e[HC]);Object.entries(t).forEach((([e,t])=>{n[`RecipientDsnFields.${e}`]=t}))}return n},jb=(e,t)=>{const n={};if(null!=e[j_]){const t=cx(e[j_]);Object.entries(t).forEach((([e,t])=>{n[`Destination.${e}`]=t}))}if(null!=e[nk]){const t=Ix(e[nk]);0===e[nk]?.length&&(n.ReplacementTags=[]),Object.entries(t).forEach((([e,t])=>{n[`ReplacementTags.${e}`]=t}))}return null!=e[rk]&&(n[rk]=e[rk]),n},$b=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),null!=e[jC]&&(n[jC]=e[jC]),n},Nb=(e,t)=>{const n={};return null!=e[Y_]&&(n[Y_]=e[Y_]),null!=e[lO]&&(n[lO]=e[lO]),null!=e[V_]&&(n[V_]=e[V_]),n},Db=(e,t)=>{const n={};let i=1;for(const t of e){if(null===t)continue;const e=Nb(t);Object.entries(e).forEach((([e,t])=>{n[`member.${i}.${e}`]=t})),i++}return n},Lb=(e,t)=>{const n={};return null!=e[pO]&&(n[pO]=e[pO]),null!=e[p_]&&(n[p_]=e[p_]),n},zb=(e,t)=>{const n={};if(null!=e[__]&&(n[__]=e[__]),null!=e[gO]){const t=lx(e[gO]);Object.entries(t).forEach((([e,t])=>{n[`EventDestination.${e}`]=t}))}return n},Fb=(e,t)=>{const n={};if(null!=e[E_]){const t=(e=>{const t={};return null!=e[kC]&&(t[kC]=e[kC]),t})(e[E_]);Object.entries(t).forEach((([e,t])=>{n[`ConfigurationSet.${e}`]=t}))}return n},Ub=(e,t)=>{const n={};if(null!=e[__]&&(n[__]=e[__]),null!=e[Jk]){const t=aw(e[Jk]);Object.entries(t).forEach((([e,t])=>{n[`TrackingOptions.${e}`]=t}))}return n},Bb=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),null!=e[kO]&&(n[kO]=e[kO]),null!=e[tT]&&(n[tT]=e[tT]),null!=e[Wk]&&(n[Wk]=e[Wk]),null!=e[$k]&&(n[$k]=e[$k]),null!=e[AO]&&(n[AO]=e[AO]),n},Hb=(e,t)=>{const n={};if(null!=e[SO]){const t=Nx(e[SO]);Object.entries(t).forEach((([e,t])=>{n[`Filter.${e}`]=t}))}return n},qb=(e,t)=>{const n={};if(null!=e[tk]&&(n[tk]=e[tk]),null!=e[XS]&&(n[XS]=e[XS]),null!=e[ck]){const t=Lx(e[ck]);Object.entries(t).forEach((([e,t])=>{n[`Rule.${e}`]=t}))}return n},Vb=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),n},Gb=(e,t)=>{const n={};if(null!=e[iT]){const t=ow(e[iT]);Object.entries(t).forEach((([e,t])=>{n[`Template.${e}`]=t}))}return n},Wb=(e,t)=>{const n={};return null!=e[__]&&(n[__]=e[__]),null!=e[yO]&&(n[yO]=e[yO]),n},Kb=(e,t)=>{const n={};return null!=e[__]&&(n[__]=e[__]),n},Yb=(e,t)=>{const n={};return null!=e[__]&&(n[__]=e[__]),n},Qb=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),n},Jb=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),null!=e[LC]&&(n[LC]=e[LC]),n},Xb=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),n},Zb=(e,t)=>{const n={};return null!=e[TO]&&(n[TO]=e[TO]),n},ex=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),null!=e[KC]&&(n[KC]=e[KC]),n},tx=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),n},nx=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),n},ix=(e,t)=>{const n={};return null!=e[fO]&&(n[fO]=e[fO]),n},rx=(e,t)=>({}),ox=(e,t)=>{const n={};if(null!=e[__]&&(n[__]=e[__]),null!=e[S_]){const t=(e=>{const t={};let n=1;for(const i of e)null!==i&&(t[`member.${n}`]=i,n++);return t})(e[S_]);0===e[S_]?.length&&(n.ConfigurationSetAttributeNames=[]),Object.entries(t).forEach((([e,t])=>{n[`ConfigurationSetAttributeNames.${e}`]=t}))}return n},sx=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),null!=e[KC]&&(n[KC]=e[KC]),n},ax=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),n},cx=(e,t)=>{const n={};if(null!=e[Gk]){const t=Rb(e[Gk]);0===e[Gk]?.length&&(n.ToAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`ToAddresses.${e}`]=t}))}if(null!=e[d_]){const t=Rb(e[d_]);0===e[d_]?.length&&(n.CcAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`CcAddresses.${e}`]=t}))}if(null!=e[e_]){const t=Rb(e[e_]);0===e[e_]?.length&&(n.BccAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`BccAddresses.${e}`]=t}))}return n},lx=(e,t)=>{const n={};if(null!=e[kC]&&(n[kC]=e[kC]),null!=e[hO]&&(n[hO]=e[hO]),null!=e[yC]){const t=ux(e[yC]);0===e[yC]?.length&&(n.MatchingEventTypes=[]),Object.entries(t).forEach((([e,t])=>{n[`MatchingEventTypes.${e}`]=t}))}if(null!=e[nC]){const t=wx(e[nC]);Object.entries(t).forEach((([e,t])=>{n[`KinesisFirehoseDestination.${e}`]=t}))}if(null!=e[I_]){const t=(e=>{const t={};if(null!=e[L_]){const n=Db(e[L_]);0===e[L_]?.length&&(t.DimensionConfigurations=[]),Object.entries(n).forEach((([e,n])=>{t[`DimensionConfigurations.${e}`]=n}))}return t})(e[I_]);Object.entries(t).forEach((([e,t])=>{n[`CloudWatchDestination.${e}`]=t}))}if(null!=e[Ak]){const t=iw(e[Ak]);Object.entries(t).forEach((([e,t])=>{n[`SNSDestination.${e}`]=t}))}return n},ux=(e,t)=>{const n={};let i=1;for(const t of e)null!==t&&(n[`member.${i}`]=t,i++);return n},px=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=e[kC]),null!=e[ST]&&(n[ST]=e[ST]),n},dx=(e,t)=>{const n={};let i=1;for(const t of e){if(null===t)continue;const e=px(t);Object.entries(e).forEach((([e,t])=>{n[`member.${i}.${e}`]=t})),i++}return n},mx=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),n},hx=(e,t)=>{const n={};if(null!=e[tC]){const t=xx(e[tC]);0===e[tC]?.length&&(n.Identities=[]),Object.entries(t).forEach((([e,t])=>{n[`Identities.${e}`]=t}))}return n},fx=(e,t)=>{const n={};if(null!=e[tC]){const t=xx(e[tC]);0===e[tC]?.length&&(n.Identities=[]),Object.entries(t).forEach((([e,t])=>{n[`Identities.${e}`]=t}))}return n},gx=(e,t)=>{const n={};if(null!=e[tC]){const t=xx(e[tC]);0===e[tC]?.length&&(n.Identities=[]),Object.entries(t).forEach((([e,t])=>{n[`Identities.${e}`]=t}))}return n},yx=(e,t)=>{const n={};if(null!=e[YO]&&(n[YO]=e[YO]),null!=e[zC]){const t=Rx(e[zC]);0===e[zC]?.length&&(n.PolicyNames=[]),Object.entries(t).forEach((([e,t])=>{n[`PolicyNames.${e}`]=t}))}return n},vx=(e,t)=>{const n={};if(null!=e[tC]){const t=xx(e[tC]);0===e[tC]?.length&&(n.Identities=[]),Object.entries(t).forEach((([e,t])=>{n[`Identities.${e}`]=t}))}return n},bx=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),n},xx=(e,t)=>{const n={};let i=1;for(const t of e)null!==t&&(n[`member.${i}`]=t,i++);return n},wx=(e,t)=>{const n={};return null!=e[QO]&&(n[QO]=e[QO]),null!=e[nO]&&(n[nO]=e[nO]),n},Ex=(e,t)=>{const n={};return null!=e[PC]&&(n[PC]=e[PC]),null!=e[EC]&&(n[EC]=e[EC]),n},Sx=(e,t)=>{const n={};return null!=e[PC]&&(n[PC]=e[PC]),null!=e[_C]&&(n[_C]=e[_C]),n},_x=(e,t)=>{const n={};return null!=e[eC]&&(n[eC]=e[eC]),null!=e[PC]&&(n[PC]=e[PC]),null!=e[EC]&&(n[EC]=e[EC]),n},Ox=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),n},Cx=(e,t)=>({}),kx=(e,t)=>{const n={};return null!=e[PC]&&(n[PC]=e[PC]),n},Tx=(e,t)=>{const n={};return null!=e[PC]&&(n[PC]=e[PC]),null!=e[EC]&&(n[EC]=e[EC]),n},Px=(e,t)=>{const n={};if(null!=e[Uk]){const t=Lb(e[Uk]);Object.entries(t).forEach((([e,t])=>{n[`Subject.${e}`]=t}))}if(null!=e[ZS]){const t=(e=>{const t={};if(null!=e[Bk]){const n=Lb(e[Bk]);Object.entries(n).forEach((([e,n])=>{t[`Text.${e}`]=n}))}if(null!=e[BO]){const n=Lb(e[BO]);Object.entries(n).forEach((([e,n])=>{t[`Html.${e}`]=n}))}return t})(e[ZS]);Object.entries(t).forEach((([e,t])=>{n[`Body.${e}`]=t}))}return n},Ax=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=e[kC]),null!=e[ST]&&(n[ST]=e[ST]),n},Ix=(e,t)=>{const n={};let i=1;for(const t of e){if(null===t)continue;const e=Ax(t);Object.entries(e).forEach((([e,t])=>{n[`member.${i}.${e}`]=t})),i++}return n},Rx=(e,t)=>{const n={};let i=1;for(const t of e)null!==t&&(n[`member.${i}`]=t,i++);return n},Mx=(e,t)=>{const n={};if(null!=e[__]&&(n[__]=e[__]),null!=e[Q_]){const t=(e=>{const t={};return null!=e[Xk]&&(t[Xk]=e[Xk]),t})(e[Q_]);Object.entries(t).forEach((([e,t])=>{n[`DeliveryOptions.${e}`]=t}))}return n},jx=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),null!=e[LC]&&(n[LC]=e[LC]),null!=e[$C]&&(n[$C]=e[$C]),n},$x=(e,t)=>{const n={};if(null!=e[pk]){const t=Bx(e[pk]);Object.entries(t).forEach((([e,t])=>{n[`S3Action.${e}`]=t}))}if(null!=e[t_]){const t=(e=>{const t={};return null!=e[Hk]&&(t[Hk]=e[Hk]),null!=e[Rk]&&(t[Rk]=e[Rk]),null!=e[yk]&&(t[yk]=e[yk]),null!=e[fC]&&(t[fC]=e[fC]),null!=e[uk]&&(t[uk]=e[uk]),t})(e[t_]);Object.entries(t).forEach((([e,t])=>{n[`BounceAction.${e}`]=t}))}if(null!=e[_T]){const t=xw(e[_T]);Object.entries(t).forEach((([e,t])=>{n[`WorkmailAction.${e}`]=t}))}if(null!=e[rC]){const t=(e=>{const t={};return null!=e[Hk]&&(t[Hk]=e[Hk]),null!=e[_O]&&(t[_O]=e[_O]),null!=e[ZO]&&(t[ZO]=e[ZO]),t})(e[rC]);Object.entries(t).forEach((([e,t])=>{n[`LambdaAction.${e}`]=t}))}if(null!=e[hk]){const t=rw(e[hk]);Object.entries(t).forEach((([e,t])=>{n[`StopAction.${e}`]=t}))}if(null!=e[QS]){const t=(e=>{const t={};return null!=e[GO]&&(t[GO]=e[GO]),null!=e[KO]&&(t[KO]=e[KO]),t})(e[QS]);Object.entries(t).forEach((([e,t])=>{n[`AddHeaderAction.${e}`]=t}))}if(null!=e[Pk]){const t=nw(e[Pk]);Object.entries(t).forEach((([e,t])=>{n[`SNSAction.${e}`]=t}))}return n},Nx=(e,t)=>{const n={};if(null!=e[kC]&&(n[kC]=e[kC]),null!=e[JO]){const t=Dx(e[JO]);Object.entries(t).forEach((([e,t])=>{n[`IpFilter.${e}`]=t}))}return n},Dx=(e,t)=>{const n={};return null!=e[$C]&&(n[$C]=e[$C]),null!=e[R_]&&(n[R_]=e[R_]),n},Lx=(e,t)=>{const n={};if(null!=e[kC]&&(n[kC]=e[kC]),null!=e[hO]&&(n[hO]=e[hO]),null!=e[Xk]&&(n[Xk]=e[Xk]),null!=e[sk]){const t=Fx(e[sk]);0===e[sk]?.length&&(n.Recipients=[]),Object.entries(t).forEach((([e,t])=>{n[`Recipients.${e}`]=t}))}if(null!=e[JS]){const t=(e=>{const t={};let n=1;for(const i of e){if(null===i)continue;const e=$x(i);Object.entries(e).forEach((([e,i])=>{t[`member.${n}.${e}`]=i})),n++}return t})(e[JS]);0===e[JS]?.length&&(n.Actions=[]),Object.entries(t).forEach((([e,t])=>{n[`Actions.${e}`]=t}))}return null!=e[wk]&&(n[wk]=e[wk]),n},zx=(e,t)=>{const n={};if(null!=e[PO]&&(n[PO]=e[PO]),null!=e[KS]&&(n[KS]=e[KS]),null!=e[WC]&&(n[WC]=e[WC]),null!=e[Fk]&&(n[Fk]=e[Fk]),null!=e[q_]&&(n[q_]=e[q_]),null!=e[oC]&&(n[oC]=Yn(e[oC])),null!=e[bO]){const t=dx(e[bO]);0===e[bO]?.length&&(n.ExtensionFields=[]),Object.entries(t).forEach((([e,t])=>{n[`ExtensionFields.${e}`]=t}))}return n},Fx=(e,t)=>{const n={};let i=1;for(const t of e)null!==t&&(n[`member.${i}`]=t,i++);return n},Ux=(e,t)=>{const n={};if(null!=e[tk]&&(n[tk]=e[tk]),null!=e[YC]){const t=(e=>{const t={};let n=1;for(const i of e)null!==i&&(t[`member.${n}`]=i,n++);return t})(e[YC]);0===e[YC]?.length&&(n.RuleNames=[]),Object.entries(t).forEach((([e,t])=>{n[`RuleNames.${e}`]=t}))}return n},Bx=(e,t)=>{const n={};return null!=e[Hk]&&(n[Hk]=e[Hk]),null!=e[n_]&&(n[n_]=e[n_]),null!=e[RC]&&(n[RC]=e[RC]),null!=e[iC]&&(n[iC]=e[iC]),null!=e[XO]&&(n[XO]=e[XO]),n},Hx=(e,t)=>{const n={};if(null!=e[MC]&&(n[MC]=e[MC]),null!=e[o_]&&(n[o_]=e[o_]),null!=e[EO]&&(n[EO]=e[EO]),null!=e[gC]){const t=(e=>{const t={};if(null!=e[qC]&&(t[qC]=e[qC]),null!=e[YS]&&(t[YS]=Yn(e[YS])),null!=e[bO]){const n=dx(e[bO]);0===e[bO]?.length&&(t.ExtensionFields=[]),Object.entries(n).forEach((([e,n])=>{t[`ExtensionFields.${e}`]=n}))}return t})(e[gC]);Object.entries(t).forEach((([e,t])=>{n[`MessageDsn.${e}`]=t}))}if(null!=e[r_]){const t=(e=>{const t={};let n=1;for(const i of e){if(null===i)continue;const e=Mb(i);Object.entries(e).forEach((([e,i])=>{t[`member.${n}.${e}`]=i})),n++}return t})(e[r_]);0===e[r_]?.length&&(n.BouncedRecipientInfoList=[]),Object.entries(t).forEach((([e,t])=>{n[`BouncedRecipientInfoList.${e}`]=t}))}return null!=e[s_]&&(n[s_]=e[s_]),n},qx=(e,t)=>{const n={};if(null!=e[zk]&&(n[zk]=e[zk]),null!=e[mk]&&(n[mk]=e[mk]),null!=e[ik]){const t=Rb(e[ik]);0===e[ik]?.length&&(n.ReplyToAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`ReplyToAddresses.${e}`]=t}))}if(null!=e[JC]&&(n[JC]=e[JC]),null!=e[XC]&&(n[XC]=e[XC]),null!=e[__]&&(n[__]=e[__]),null!=e[oO]){const t=Ix(e[oO]);0===e[oO]?.length&&(n.DefaultTags=[]),Object.entries(t).forEach((([e,t])=>{n[`DefaultTags.${e}`]=t}))}if(null!=e[iT]&&(n[iT]=e[iT]),null!=e[Vk]&&(n[Vk]=e[Vk]),null!=e[rO]&&(n[rO]=e[rO]),null!=e[dO]){const t=(e=>{const t={};let n=1;for(const i of e){if(null===i)continue;const e=jb(i);Object.entries(e).forEach((([e,i])=>{t[`member.${n}.${e}`]=i})),n++}return t})(e[dO]);0===e[dO]?.length&&(n.Destinations=[]),Object.entries(t).forEach((([e,t])=>{n[`Destinations.${e}`]=t}))}return n},Vx=(e,t)=>{const n={};return null!=e[fO]&&(n[fO]=e[fO]),null!=e[Qk]&&(n[Qk]=e[Qk]),null!=e[__]&&(n[__]=e[__]),n},Gx=(e,t)=>{const n={};if(null!=e[zk]&&(n[zk]=e[zk]),null!=e[j_]){const t=cx(e[j_]);Object.entries(t).forEach((([e,t])=>{n[`Destination.${e}`]=t}))}if(null!=e[fC]){const t=Px(e[fC]);Object.entries(t).forEach((([e,t])=>{n[`Message.${e}`]=t}))}if(null!=e[ik]){const t=Rb(e[ik]);0===e[ik]?.length&&(n.ReplyToAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`ReplyToAddresses.${e}`]=t}))}if(null!=e[JC]&&(n[JC]=e[JC]),null!=e[mk]&&(n[mk]=e[mk]),null!=e[XC]&&(n[XC]=e[XC]),null!=e[nT]){const t=Ix(e[nT]);0===e[nT]?.length&&(n.Tags=[]),Object.entries(t).forEach((([e,t])=>{n[`Tags.${e}`]=t}))}return null!=e[__]&&(n[__]=e[__]),n},Wx=(e,t)=>{const n={};if(null!=e[zk]&&(n[zk]=e[zk]),null!=e[dO]){const t=Rb(e[dO]);0===e[dO]?.length&&(n.Destinations=[]),Object.entries(t).forEach((([e,t])=>{n[`Destinations.${e}`]=t}))}if(null!=e[GC]){const i=((e,t)=>{const n={};return null!=e[pO]&&(n[pO]=t.base64Encoder(e[pO])),n})(e[GC],t);Object.entries(i).forEach((([e,t])=>{n[`RawMessage.${e}`]=t}))}if(null!=e[OO]&&(n[OO]=e[OO]),null!=e[mk]&&(n[mk]=e[mk]),null!=e[XC]&&(n[XC]=e[XC]),null!=e[nT]){const t=Ix(e[nT]);0===e[nT]?.length&&(n.Tags=[]),Object.entries(t).forEach((([e,t])=>{n[`Tags.${e}`]=t}))}return null!=e[__]&&(n[__]=e[__]),n},Kx=(e,t)=>{const n={};if(null!=e[zk]&&(n[zk]=e[zk]),null!=e[j_]){const t=cx(e[j_]);Object.entries(t).forEach((([e,t])=>{n[`Destination.${e}`]=t}))}if(null!=e[ik]){const t=Rb(e[ik]);0===e[ik]?.length&&(n.ReplyToAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`ReplyToAddresses.${e}`]=t}))}if(null!=e[JC]&&(n[JC]=e[JC]),null!=e[mk]&&(n[mk]=e[mk]),null!=e[XC]&&(n[XC]=e[XC]),null!=e[nT]){const t=Ix(e[nT]);0===e[nT]?.length&&(n.Tags=[]),Object.entries(t).forEach((([e,t])=>{n[`Tags.${e}`]=t}))}return null!=e[__]&&(n[__]=e[__]),null!=e[iT]&&(n[iT]=e[iT]),null!=e[Vk]&&(n[Vk]=e[Vk]),null!=e[Kk]&&(n[Kk]=e[Kk]),n},Yx=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),n},Qx=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),null!=e[G_]&&(n[G_]=e[G_]),n},Jx=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),null!=e[CO]&&(n[CO]=e[CO]),n},Xx=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),null!=e[AC]&&(n[AC]=e[AC]),null!=e[hO]&&(n[hO]=e[hO]),n},Zx=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),null!=e[vC]&&(n[vC]=e[vC]),null!=e[i_]&&(n[i_]=e[i_]),n},ew=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),null!=e[AC]&&(n[AC]=e[AC]),null!=e[Nk]&&(n[Nk]=e[Nk]),n},tw=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),null!=e[KC]&&(n[KC]=e[KC]),null!=e[XS]&&(n[XS]=e[XS]),n},nw=(e,t)=>{const n={};return null!=e[Hk]&&(n[Hk]=e[Hk]),null!=e[xO]&&(n[xO]=e[xO]),n},iw=(e,t)=>{const n={};return null!=e[qk]&&(n[qk]=e[qk]),n},rw=(e,t)=>{const n={};return null!=e[Lk]&&(n[Lk]=e[Lk]),null!=e[Hk]&&(n[Hk]=e[Hk]),n},ow=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),null!=e[Ik]&&(n[Ik]=e[Ik]),null!=e[Zk]&&(n[Zk]=e[Zk]),null!=e[WO]&&(n[WO]=e[WO]),n},sw=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),null!=e[Kk]&&(n[Kk]=e[Kk]),n},aw=(e,t)=>{const n={};return null!=e[y_]&&(n[y_]=e[y_]),n},cw=(e,t)=>{const n={};return null!=e[hO]&&(n[hO]=e[hO]),n},lw=(e,t)=>{const n={};if(null!=e[__]&&(n[__]=e[__]),null!=e[gO]){const t=lx(e[gO]);Object.entries(t).forEach((([e,t])=>{n[`EventDestination.${e}`]=t}))}return n},uw=(e,t)=>{const n={};return null!=e[__]&&(n[__]=e[__]),null!=e[hO]&&(n[hO]=e[hO]),n},pw=(e,t)=>{const n={};return null!=e[__]&&(n[__]=e[__]),null!=e[hO]&&(n[hO]=e[hO]),n},dw=(e,t)=>{const n={};if(null!=e[__]&&(n[__]=e[__]),null!=e[Jk]){const t=aw(e[Jk]);Object.entries(t).forEach((([e,t])=>{n[`TrackingOptions.${e}`]=t}))}return n},mw=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),null!=e[kO]&&(n[kO]=e[kO]),null!=e[tT]&&(n[tT]=e[tT]),null!=e[Wk]&&(n[Wk]=e[Wk]),null!=e[$k]&&(n[$k]=e[$k]),null!=e[AO]&&(n[AO]=e[AO]),n},hw=(e,t)=>{const n={};if(null!=e[tk]&&(n[tk]=e[tk]),null!=e[ck]){const t=Lx(e[ck]);Object.entries(t).forEach((([e,t])=>{n[`Rule.${e}`]=t}))}return n},fw=(e,t)=>{const n={};if(null!=e[iT]){const t=ow(e[iT]);Object.entries(t).forEach((([e,t])=>{n[`Template.${e}`]=t}))}return n},gw=(e,t)=>{const n={};return null!=e[mO]&&(n[mO]=e[mO]),n},yw=(e,t)=>{const n={};return null!=e[mO]&&(n[mO]=e[mO]),n},vw=(e,t)=>{const n={};return null!=e[fO]&&(n[fO]=e[fO]),n},bw=(e,t)=>{const n={};return null!=e[fO]&&(n[fO]=e[fO]),n},xw=(e,t)=>{const n={};return null!=e[Hk]&&(n[Hk]=e[Hk]),null!=e[IC]&&(n[IC]=e[IC]),n},ww=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},Ew=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},Sw=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[Fk]&&(t[Fk]=cn(e[Fk])),null!=e[wO]&&(t[wO]=cn(e[wO])),null!=e[SC]&&(t[SC]=cn(e[SC])),t})(e))),_w=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},Ow=(e,t)=>({}),Cw=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[Y_]&&(t[Y_]=cn(e[Y_])),null!=e[lO]&&(t[lO]=cn(e[lO])),null!=e[V_]&&(t[V_]=cn(e[V_])),t})(e))),kw=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),n},Tw=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},Pw=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},Aw=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},Iw=(e,t)=>({}),Rw=(e,t)=>({}),Mw=(e,t)=>({}),jw=(e,t)=>({}),$w=(e,t)=>({}),Nw=(e,t)=>({}),Dw=(e,t)=>({}),Lw=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},zw=(e,t)=>{const n={};return null!=e[A_]&&(n[A_]=cn(e[A_])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},Fw=(e,t)=>{const n={};return null!=e[A_]&&(n[A_]=cn(e[A_])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},Uw=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[Qk]&&(t[Qk]=cn(e[Qk])),null!=e[kO]&&(t[kO]=cn(e[kO])),null!=e[tT]&&(t[tT]=cn(e[tT])),null!=e[$k]&&(t[$k]=cn(e[$k])),null!=e[AO]&&(t[AO]=cn(e[AO])),t})(e))),Bw=(e,t)=>({}),Hw=(e,t)=>({}),qw=(e,t)=>({}),Vw=(e,t)=>({}),Gw=(e,t)=>({}),Ww=(e,t)=>({}),Kw=(e,t)=>({}),Yw=(e,t)=>({}),Qw=(e,t)=>({}),Jw=(e,t)=>{const n={};return null!=e[CC]&&(n[CC]=eS(e[CC])),""===e.Rules?n[lk]=[]:null!=e[lk]&&null!=e[lk][kT]&&(n[lk]=nS(Ln(e[lk][kT]))),n},Xw=(e,t)=>{const n={};return null!=e[E_]&&(n[E_]=kw(e[E_])),""===e.EventDestinations?n[vO]=[]:null!=e[vO]&&null!=e[vO][kT]&&(n[vO]=rE(Ln(e[vO][kT]))),null!=e[Jk]&&(n[Jk]=AS(e[Jk])),null!=e[Q_]&&(n[Q_]=(e=>{const t={};return null!=e[Xk]&&(t[Xk]=cn(e[Xk])),t})(e[Q_])),null!=e[QC]&&(n[QC]=oS(e[QC])),n},Zw=(e,t)=>{const n={};return null!=e[ck]&&(n[ck]=ZE(e[ck])),n},eE=(e,t)=>{const n={};return null!=e[CC]&&(n[CC]=eS(e[CC])),""===e.Rules?n[lk]=[]:null!=e[lk]&&null!=e[lk][kT]&&(n[lk]=nS(Ln(e[lk][kT]))),n},tE=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),null!=e[hO]&&(n[hO]=Jt(e[hO])),""===e.MatchingEventTypes?n[yC]=[]:null!=e[yC]&&null!=e[yC][kT]&&(n[yC]=oE(Ln(e[yC][kT]))),null!=e[nC]&&(n[nC]=AE(e[nC])),null!=e[I_]&&(n[I_]=(e=>{const t={};return""===e.DimensionConfigurations?t[L_]=[]:null!=e[L_]&&null!=e[L_][kT]&&(t[L_]=Cw(Ln(e[L_][kT]))),t})(e[I_])),null!=e[Ak]&&(n[Ak]=_S(e[Ak])),n},nE=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[yO]&&(n[yO]=cn(e[yO])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},iE=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[yO]&&(n[yO]=cn(e[yO])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},rE=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>tE(e))),oE=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>cn(e))),sE=(e,t)=>{const n={};return null!=e[kO]&&(n[kO]=cn(e[kO])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},aE=(e,t)=>{const n={};return null!=e[hO]&&(n[hO]=Jt(e[hO])),n},cE=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=cn(e[Qk])),null!=e[kO]&&(n[kO]=cn(e[kO])),null!=e[tT]&&(n[tT]=cn(e[tT])),null!=e[Wk]&&(n[Wk]=cn(e[Wk])),null!=e[$k]&&(n[$k]=cn(e[$k])),null!=e[AO]&&(n[AO]=cn(e[AO])),n},lE=(e,t)=>{const n={};return""===e.DkimAttributes?n[$_]={}:null!=e[$_]&&null!=e[$_][OT]&&(n[$_]=(e=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=yE(t.value)),e)),{}))(Ln(e[$_][OT]))),n},uE=(e,t)=>{const n={};return""===e.MailFromDomainAttributes?n[bC]={}:null!=e[bC]&&null!=e[bC][OT]&&(n[bC]=FE(Ln(e[bC][OT]))),n},pE=(e,t)=>{const n={};return""===e.NotificationAttributes?n[TC]={}:null!=e[TC]&&null!=e[TC][OT]&&(n[TC]=qE(Ln(e[TC][OT]))),n},dE=(e,t)=>{const n={};return""===e.Policies?n[FC]={}:null!=e[FC]&&null!=e[FC][OT]&&(n[FC]=VE(Ln(e[FC][OT]))),n},mE=(e,t)=>{const n={};return""===e.VerificationAttributes?n[fT]={}:null!=e[fT]&&null!=e[fT][OT]&&(n[fT]=DS(Ln(e[fT][OT]))),n},hE=(e,t)=>{const n={};return null!=e[wC]&&(n[wC]=un(e[wC])),null!=e[OC]&&(n[OC]=un(e[OC])),null!=e[Tk]&&(n[Tk]=un(e[Tk])),n},fE=(e,t)=>{const n={};return""===e.SendDataPoints?n[bk]=[]:null!=e[bk]&&null!=e[bk][kT]&&(n[bk]=dS(Ln(e[bk][kT]))),n},gE=(e,t)=>{const n={};return null!=e[iT]&&(n[iT]=CS(e[iT])),n},yE=(e,t)=>{const n={};return null!=e[G_]&&(n[G_]=Jt(e[G_])),null!=e[uO]&&(n[uO]=cn(e[uO])),""===e.DkimTokens?n[aO]=[]:null!=e[aO]&&null!=e[aO][kT]&&(n[aO]=LS(Ln(e[aO][kT]))),n},vE=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[yO]&&(n[yO]=cn(e[yO])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},bE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},xE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},wE=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[yO]&&(n[yO]=cn(e[yO])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},EE=(e,t)=>{const n={};return null!=e[_O]&&(n[_O]=cn(e[_O])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},SE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},_E=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=cn(e[Qk])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},OE=(e,t)=>{const n={};return null!=e[u_]&&(n[u_]=cn(e[u_])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},CE=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[yO]&&(n[yO]=cn(e[yO])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},kE=(e,t)=>{const n={};return null!=e[oT]&&(n[oT]=cn(e[oT])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},TE=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=cn(e[Qk])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},PE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},AE=(e,t)=>{const n={};return null!=e[QO]&&(n[QO]=cn(e[QO])),null!=e[nO]&&(n[nO]=cn(e[nO])),n},IE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},RE=(e,t)=>{const n={};return""===e.ConfigurationSets?n[O_]=[]:null!=e[O_]&&null!=e[O_][kT]&&(n[O_]=(e=>(e||[]).filter((e=>null!=e)).map((e=>kw(e))))(Ln(e[O_][kT]))),null!=e[PC]&&(n[PC]=cn(e[PC])),n},ME=(e,t)=>{const n={};return""===e.CustomVerificationEmailTemplates?n[P_]=[]:null!=e[P_]&&null!=e[P_][kT]&&(n[P_]=Uw(Ln(e[P_][kT]))),null!=e[PC]&&(n[PC]=cn(e[PC])),n},jE=(e,t)=>{const n={};return""===e.Identities?n[tC]=[]:null!=e[tC]&&null!=e[tC][kT]&&(n[tC]=(e=>(e||[]).filter((e=>null!=e)).map((e=>cn(e))))(Ln(e[tC][kT]))),null!=e[PC]&&(n[PC]=cn(e[PC])),n},$E=(e,t)=>{const n={};return""===e.PolicyNames?n[zC]=[]:null!=e[zC]&&null!=e[zC][kT]&&(n[zC]=GE(Ln(e[zC][kT]))),n},NE=(e,t)=>{const n={};return""===e.Filters?n[IO]=[]:null!=e[IO]&&null!=e[IO][kT]&&(n[IO]=JE(Ln(e[IO][kT]))),n},DE=(e,t)=>{const n={};return""===e.RuleSets?n[ek]=[]:null!=e[ek]&&null!=e[ek][kT]&&(n[ek]=tS(Ln(e[ek][kT]))),null!=e[PC]&&(n[PC]=cn(e[PC])),n},LE=(e,t)=>{const n={};return""===e.TemplatesMetadata?n[Yk]=[]:null!=e[Yk]&&null!=e[Yk][kT]&&(n[Yk]=TS(Ln(e[Yk][kT]))),null!=e[PC]&&(n[PC]=cn(e[PC])),n},zE=(e,t)=>{const n={};return""===e.VerifiedEmailAddresses?n[bT]=[]:null!=e[bT]&&null!=e[bT][kT]&&(n[bT]=(e=>(e||[]).filter((e=>null!=e)).map((e=>cn(e))))(Ln(e[bT][kT]))),n},FE=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=(e=>{const t={};return null!=e[vC]&&(t[vC]=cn(e[vC])),null!=e[xC]&&(t[xC]=cn(e[xC])),null!=e[i_]&&(t[i_]=cn(e[i_])),t})(t.value)),e)),{}),UE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},BE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},HE=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=cn(e[Qk])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},qE=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=(e=>{const t={};return null!=e[c_]&&(t[c_]=cn(e[c_])),null!=e[k_]&&(t[k_]=cn(e[k_])),null!=e[sO]&&(t[sO]=cn(e[sO])),null!=e[CO]&&(t[CO]=Jt(e[CO])),null!=e[HO]&&(t[HO]=Jt(e[HO])),null!=e[qO]&&(t[qO]=Jt(e[qO])),null!=e[VO]&&(t[VO]=Jt(e[VO])),t})(t.value)),e)),{}),VE=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=cn(t.value)),e)),{}),GE=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>cn(e))),WE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},KE=(e,t)=>({}),YE=(e,t)=>({}),QE=(e,t)=>{const n={};return null!=e[pk]&&(n[pk]=cS(e[pk])),null!=e[t_]&&(n[t_]=(e=>{const t={};return null!=e[Hk]&&(t[Hk]=cn(e[Hk])),null!=e[Rk]&&(t[Rk]=cn(e[Rk])),null!=e[yk]&&(t[yk]=cn(e[yk])),null!=e[fC]&&(t[fC]=cn(e[fC])),null!=e[uk]&&(t[uk]=cn(e[uk])),t})(e[t_])),null!=e[_T]&&(n[_T]=BS(e[_T])),null!=e[rC]&&(n[rC]=(e=>{const t={};return null!=e[Hk]&&(t[Hk]=cn(e[Hk])),null!=e[_O]&&(t[_O]=cn(e[_O])),null!=e[ZO]&&(t[ZO]=cn(e[ZO])),t})(e[rC])),null!=e[hk]&&(n[hk]=OS(e[hk])),null!=e[QS]&&(n[QS]=(e=>{const t={};return null!=e[GO]&&(t[GO]=cn(e[GO])),null!=e[KO]&&(t[KO]=cn(e[KO])),t})(e[QS])),null!=e[Pk]&&(n[Pk]=SS(e[Pk])),n},JE=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[kC]&&(t[kC]=cn(e[kC])),null!=e[JO]&&(t[JO]=XE(e[JO])),t})(e))),XE=(e,t)=>{const n={};return null!=e[$C]&&(n[$C]=cn(e[$C])),null!=e[R_]&&(n[R_]=cn(e[R_])),n},ZE=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),null!=e[hO]&&(n[hO]=Jt(e[hO])),null!=e[Xk]&&(n[Xk]=cn(e[Xk])),""===e.Recipients?n[sk]=[]:null!=e[sk]&&null!=e[sk][kT]&&(n[sk]=iS(Ln(e[sk][kT]))),""===e.Actions?n[JS]=[]:null!=e[JS]&&null!=e[JS][kT]&&(n[JS]=(e=>(e||[]).filter((e=>null!=e)).map((e=>QE(e))))(Ln(e[JS][kT]))),null!=e[wk]&&(n[wk]=Jt(e[wk])),n},eS=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),null!=e[T_]&&(n[T_]=an(vn(e[T_]))),n},tS=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>eS(e))),nS=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>ZE(e))),iS=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>cn(e))),rS=(e,t)=>({}),oS=(e,t)=>{const n={};return null!=e[Ek]&&(n[Ek]=Jt(e[Ek])),null!=e[VC]&&(n[VC]=Jt(e[VC])),null!=e[cC]&&(n[cC]=an(vn(e[cC]))),n},sS=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},aS=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},cS=(e,t)=>{const n={};return null!=e[Hk]&&(n[Hk]=cn(e[Hk])),null!=e[n_]&&(n[n_]=cn(e[n_])),null!=e[RC]&&(n[RC]=cn(e[RC])),null!=e[iC]&&(n[iC]=cn(e[iC])),null!=e[XO]&&(n[XO]=cn(e[XO])),n},lS=(e,t)=>{const n={};return null!=e[SC]&&(n[SC]=cn(e[SC])),n},uS=(e,t)=>{const n={};return""===e.Status?n[Fk]=[]:null!=e[Fk]&&null!=e[Fk][kT]&&(n[Fk]=Sw(Ln(e[Fk][kT]))),n},pS=(e,t)=>{const n={};return null!=e[SC]&&(n[SC]=cn(e[SC])),n},dS=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[rT]&&(t[rT]=an(vn(e[rT]))),null!=e[D_]&&(t[D_]=mn(e[D_])),null!=e[l_]&&(t[l_]=mn(e[l_])),null!=e[M_]&&(t[M_]=mn(e[M_])),null!=e[ak]&&(t[ak]=mn(e[ak])),t})(e))),mS=(e,t)=>{const n={};return null!=e[SC]&&(n[SC]=cn(e[SC])),n},hS=(e,t)=>{const n={};return null!=e[SC]&&(n[SC]=cn(e[SC])),n},fS=(e,t)=>{const n={};return null!=e[SC]&&(n[SC]=cn(e[SC])),n},gS=(e,t)=>({}),yS=(e,t)=>({}),vS=(e,t)=>({}),bS=(e,t)=>({}),xS=(e,t)=>({}),wS=(e,t)=>({}),ES=(e,t)=>({}),SS=(e,t)=>{const n={};return null!=e[Hk]&&(n[Hk]=cn(e[Hk])),null!=e[xO]&&(n[xO]=cn(e[xO])),n},_S=(e,t)=>{const n={};return null!=e[qk]&&(n[qk]=cn(e[qk])),n},OS=(e,t)=>{const n={};return null!=e[Lk]&&(n[Lk]=cn(e[Lk])),null!=e[Hk]&&(n[Hk]=cn(e[Hk])),n},CS=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=cn(e[Qk])),null!=e[Ik]&&(n[Ik]=cn(e[Ik])),null!=e[Zk]&&(n[Zk]=cn(e[Zk])),null!=e[WO]&&(n[WO]=cn(e[WO])),n},kS=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=cn(e[Qk])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},TS=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[kC]&&(t[kC]=cn(e[kC])),null!=e[T_]&&(t[T_]=an(vn(e[T_]))),t})(e))),PS=(e,t)=>{const n={};return null!=e[ok]&&(n[ok]=cn(e[ok])),n},AS=(e,t)=>{const n={};return null!=e[y_]&&(n[y_]=cn(e[y_])),n},IS=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},RS=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},MS=(e,t)=>({}),jS=(e,t)=>({}),$S=(e,t)=>({}),NS=(e,t)=>({}),DS=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=(e=>{const t={};return null!=e[wT]&&(t[wT]=cn(e[wT])),null!=e[ET]&&(t[ET]=cn(e[ET])),t})(t.value)),e)),{}),LS=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>cn(e))),zS=(e,t)=>{const n={};return""===e.DkimTokens?n[aO]=[]:null!=e[aO]&&null!=e[aO][kT]&&(n[aO]=LS(Ln(e[aO][kT]))),n},FS=(e,t)=>{const n={};return null!=e[ET]&&(n[ET]=cn(e[ET])),n},US=(e,t)=>({}),BS=(e,t)=>{const n={};return null!=e[Hk]&&(n[Hk]=cn(e[Hk])),null!=e[IC]&&(n[IC]=cn(e[IC])),n},HS=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"]}),qS=Pn(Nf),VS=async(e,t,n,i,r)=>{const{hostname:o,protocol:s="https",port:a,path:c}=await e.endpoint(),l={protocol:s,hostname:o,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:t};return void 0!==r&&(l.body=r),new T(l)},GS={"content-type":"application/x-www-form-urlencoded"},WS="2010-12-01",KS="Action",YS="ArrivalDate",QS="AddHeaderAction",JS="Actions",XS="After",ZS="Body",e_="BccAddresses",t_="BounceAction",n_="BucketName",i_="BehaviorOnMXFailure",r_="BouncedRecipientInfoList",o_="BounceSender",s_="BounceSenderArn",a_="BounceType",c_="BounceTopic",l_="Bounces",u_="Bucket",p_="Charset",d_="CcAddresses",m_="CreateConfigurationSet",h_="CreateConfigurationSetEventDestination",f_="CreateConfigurationSetTrackingOptions",g_="CreateCustomVerificationEmailTemplate",y_="CustomRedirectDomain",v_="CreateReceiptFilter",b_="CreateReceiptRule",x_="CloneReceiptRuleSet",w_="CreateReceiptRuleSet",E_="ConfigurationSet",S_="ConfigurationSetAttributeNames",__="ConfigurationSetName",O_="ConfigurationSets",C_="CreateTemplate",k_="ComplaintTopic",T_="CreatedTimestamp",P_="CustomVerificationEmailTemplates",A_="CustomVerificationEmailTemplateName",I_="CloudWatchDestination",R_="Cidr",M_="Complaints",j_="Destination",$_="DkimAttributes",N_="DescribeActiveReceiptRuleSet",D_="DeliveryAttempts",L_="DimensionConfigurations",z_="DeleteConfigurationSet",F_="DeleteConfigurationSetEventDestination",U_="DeleteConfigurationSetTrackingOptions",B_="DescribeConfigurationSet",H_="DeleteCustomVerificationEmailTemplate",q_="DiagnosticCode",V_="DefaultDimensionValue",G_="DkimEnabled",W_="DeleteIdentity",K_="DeleteIdentityPolicy",Y_="DimensionName",Q_="DeliveryOptions",J_="DeleteReceiptFilter",X_="DeleteReceiptRule",Z_="DeleteReceiptRuleSet",eO="DescribeReceiptRuleSet",tO="DescribeReceiptRule",nO="DeliveryStreamARN",iO="DeleteTemplate",rO="DefaultTemplateData",oO="DefaultTags",sO="DeliveryTopic",aO="DkimTokens",cO="DeleteVerifiedEmailAddress",lO="DimensionValueSource",uO="DkimVerificationStatus",pO="Data",dO="Destinations",mO="Domain",hO="Enabled",fO="EmailAddress",gO="EventDestination",yO="EventDestinationName",vO="EventDestinations",bO="ExtensionFields",xO="Encoding",wO="Error",EO="Explanation",SO="Filter",_O="FunctionArn",OO="FromArn",CO="ForwardingEnabled",kO="FromEmailAddress",TO="FilterName",PO="FinalRecipient",AO="FailureRedirectionURL",IO="Filters",RO="GetAccountSendingEnabled",MO="GetCustomVerificationEmailTemplate",jO="GetIdentityDkimAttributes",$O="GetIdentityMailFromDomainAttributes",NO="GetIdentityNotificationAttributes",DO="GetIdentityPolicies",LO="GetIdentityVerificationAttributes",zO="GetSendQuota",FO="GetSendStatistics",UO="GetTemplate",BO="Html",HO="HeadersInBounceNotificationsEnabled",qO="HeadersInComplaintNotificationsEnabled",VO="HeadersInDeliveryNotificationsEnabled",GO="HeaderName",WO="HtmlPart",KO="HeaderValue",YO="Identity",QO="IAMRoleARN",JO="IpFilter",XO="IamRoleArn",ZO="InvocationType",eC="IdentityType",tC="Identities",nC="KinesisFirehoseDestination",iC="KmsKeyArn",rC="LambdaAction",oC="LastAttemptDate",sC="ListConfigurationSets",aC="ListCustomVerificationEmailTemplates",cC="LastFreshStart",lC="ListIdentities",uC="ListIdentityPolicies",pC="ListReceiptFilters",dC="ListReceiptRuleSets",mC="ListTemplates",hC="ListVerifiedEmailAddresses",fC="Message",gC="MessageDsn",yC="MatchingEventTypes",vC="MailFromDomain",bC="MailFromDomainAttributes",xC="MailFromDomainStatus",wC="Max24HourSend",EC="MaxItems",SC="MessageId",_C="MaxResults",OC="MaxSendRate",CC="Metadata",kC="Name",TC="NotificationAttributes",PC="NextToken",AC="NotificationType",IC="OrganizationArn",RC="ObjectKeyPrefix",MC="OriginalMessageId",jC="OriginalRuleSetName",$C="Policy",NC="PutConfigurationSetDeliveryOptions",DC="PutIdentityPolicy",LC="PolicyName",zC="PolicyNames",FC="Policies",UC="Recipient",BC="RecipientArn",HC="RecipientDsnFields",qC="ReportingMta",VC="ReputationMetricsEnabled",GC="RawMessage",WC="RemoteMta",KC="RuleName",YC="RuleNames",QC="ReputationOptions",JC="ReturnPath",XC="ReturnPathArn",ZC="ReorderReceiptRuleSet",ek="RuleSets",tk="RuleSetName",nk="ReplacementTags",ik="ReplyToAddresses",rk="ReplacementTemplateData",ok="RenderedTemplate",sk="Recipients",ak="Rejects",ck="Rule",lk="Rules",uk="Sender",pk="S3Action",dk="SetActiveReceiptRuleSet",mk="SourceArn",hk="StopAction",fk="SendBounce",gk="SendBulkTemplatedEmail",yk="StatusCode",vk="SendCustomVerificationEmail",bk="SendDataPoints",xk="SendEmail",wk="ScanEnabled",Ek="SendingEnabled",Sk="SetIdentityDkimEnabled",_k="SetIdentityFeedbackForwardingEnabled",Ok="SetIdentityHeadersInNotificationsEnabled",Ck="SetIdentityMailFromDomain",kk="SetIdentityNotificationTopic",Tk="SentLast24Hours",Pk="SNSAction",Ak="SNSDestination",Ik="SubjectPart",Rk="SmtpReplyCode",Mk="SendRawEmail",jk="SetReceiptRulePosition",$k="SuccessRedirectionURL",Nk="SnsTopic",Dk="SendTemplatedEmail",Lk="Scope",zk="Source",Fk="Status",Uk="Subject",Bk="Text",Hk="TopicArn",qk="TopicARN",Vk="TemplateArn",Gk="ToAddresses",Wk="TemplateContent",Kk="TemplateData",Yk="TemplatesMetadata",Qk="TemplateName",Jk="TrackingOptions",Xk="TlsPolicy",Zk="TextPart",eT="TestRenderTemplate",tT="TemplateSubject",nT="Tags",iT="Template",rT="Timestamp",oT="Topic",sT="UpdateAccountSendingEnabled",aT="UpdateConfigurationSetEventDestination",cT="UpdateConfigurationSetReputationMetricsEnabled",lT="UpdateConfigurationSetSendingEnabled",uT="UpdateConfigurationSetTrackingOptions",pT="UpdateCustomVerificationEmailTemplate",dT="UpdateReceiptRule",mT="UpdateTemplate",hT="Version",fT="VerificationAttributes",gT="VerifyDomainDkim",yT="VerifyDomainIdentity",vT="VerifyEmailAddress",bT="VerifiedEmailAddresses",xT="VerifyEmailIdentity",wT="VerificationStatus",ET="VerificationToken",ST="Value",_T="WorkmailAction",OT="entry",CT="message",kT="member",TT=e=>Object.entries(e).map((([e,t])=>be(e)+"="+be(t))).join("&"),PT=(e,t)=>void 0!==t.Error?.Code?t.Error.Code:404==e.statusCode?"NotFound":void 0;class AT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CloneReceiptRuleSet",{}).n("SESClient","CloneReceiptRuleSetCommand").f(void 0,void 0).ser(yg).de(jy).build()){}class IT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateConfigurationSet",{}).n("SESClient","CreateConfigurationSetCommand").f(void 0,void 0).ser(vg).de($y).build()){}class RT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateConfigurationSetEventDestination",{}).n("SESClient","CreateConfigurationSetEventDestinationCommand").f(void 0,void 0).ser(bg).de(Ny).build()){}class MT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateConfigurationSetTrackingOptions",{}).n("SESClient","CreateConfigurationSetTrackingOptionsCommand").f(void 0,void 0).ser(xg).de(Dy).build()){}class jT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateCustomVerificationEmailTemplate",{}).n("SESClient","CreateCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(wg).de(Ly).build()){}class $T extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateReceiptFilter",{}).n("SESClient","CreateReceiptFilterCommand").f(void 0,void 0).ser(Eg).de(zy).build()){}class NT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateReceiptRule",{}).n("SESClient","CreateReceiptRuleCommand").f(void 0,void 0).ser(Sg).de(Fy).build()){}class DT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateReceiptRuleSet",{}).n("SESClient","CreateReceiptRuleSetCommand").f(void 0,void 0).ser(_g).de(Uy).build()){}class LT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateTemplate",{}).n("SESClient","CreateTemplateCommand").f(void 0,void 0).ser(Og).de(By).build()){}class zT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteConfigurationSet",{}).n("SESClient","DeleteConfigurationSetCommand").f(void 0,void 0).ser(Cg).de(Hy).build()){}class FT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteConfigurationSetEventDestination",{}).n("SESClient","DeleteConfigurationSetEventDestinationCommand").f(void 0,void 0).ser(kg).de(qy).build()){}class UT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteConfigurationSetTrackingOptions",{}).n("SESClient","DeleteConfigurationSetTrackingOptionsCommand").f(void 0,void 0).ser(Tg).de(Vy).build()){}class BT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteCustomVerificationEmailTemplate",{}).n("SESClient","DeleteCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(Pg).de(Gy).build()){}class HT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteIdentity",{}).n("SESClient","DeleteIdentityCommand").f(void 0,void 0).ser(Ag).de(Wy).build()){}class qT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteIdentityPolicy",{}).n("SESClient","DeleteIdentityPolicyCommand").f(void 0,void 0).ser(Ig).de(Ky).build()){}class VT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteReceiptFilter",{}).n("SESClient","DeleteReceiptFilterCommand").f(void 0,void 0).ser(Rg).de(Yy).build()){}class GT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteReceiptRule",{}).n("SESClient","DeleteReceiptRuleCommand").f(void 0,void 0).ser(Mg).de(Qy).build()){}class WT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteReceiptRuleSet",{}).n("SESClient","DeleteReceiptRuleSetCommand").f(void 0,void 0).ser(jg).de(Jy).build()){}class KT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteTemplate",{}).n("SESClient","DeleteTemplateCommand").f(void 0,void 0).ser($g).de(Xy).build()){}class YT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteVerifiedEmailAddress",{}).n("SESClient","DeleteVerifiedEmailAddressCommand").f(void 0,void 0).ser(Ng).de(Zy).build()){}class QT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeActiveReceiptRuleSet",{}).n("SESClient","DescribeActiveReceiptRuleSetCommand").f(void 0,void 0).ser(Dg).de(ev).build()){}class JT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeConfigurationSet",{}).n("SESClient","DescribeConfigurationSetCommand").f(void 0,void 0).ser(Lg).de(tv).build()){}class XT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeReceiptRule",{}).n("SESClient","DescribeReceiptRuleCommand").f(void 0,void 0).ser(zg).de(nv).build()){}class ZT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeReceiptRuleSet",{}).n("SESClient","DescribeReceiptRuleSetCommand").f(void 0,void 0).ser(Fg).de(iv).build()){}class eP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetAccountSendingEnabled",{}).n("SESClient","GetAccountSendingEnabledCommand").f(void 0,void 0).ser(Ug).de(rv).build()){}class tP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetCustomVerificationEmailTemplate",{}).n("SESClient","GetCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(Bg).de(ov).build()){}class nP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityDkimAttributes",{}).n("SESClient","GetIdentityDkimAttributesCommand").f(void 0,void 0).ser(Hg).de(sv).build()){}class iP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityMailFromDomainAttributes",{}).n("SESClient","GetIdentityMailFromDomainAttributesCommand").f(void 0,void 0).ser(qg).de(av).build()){}class rP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityNotificationAttributes",{}).n("SESClient","GetIdentityNotificationAttributesCommand").f(void 0,void 0).ser(Vg).de(cv).build()){}class oP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityPolicies",{}).n("SESClient","GetIdentityPoliciesCommand").f(void 0,void 0).ser(Gg).de(lv).build()){}class sP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityVerificationAttributes",{}).n("SESClient","GetIdentityVerificationAttributesCommand").f(void 0,void 0).ser(Wg).de(uv).build()){}class aP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetSendQuota",{}).n("SESClient","GetSendQuotaCommand").f(void 0,void 0).ser(Kg).de(pv).build()){}class cP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetSendStatistics",{}).n("SESClient","GetSendStatisticsCommand").f(void 0,void 0).ser(Yg).de(dv).build()){}class lP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetTemplate",{}).n("SESClient","GetTemplateCommand").f(void 0,void 0).ser(Qg).de(mv).build()){}class uP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListConfigurationSets",{}).n("SESClient","ListConfigurationSetsCommand").f(void 0,void 0).ser(Jg).de(hv).build()){}class pP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListCustomVerificationEmailTemplates",{}).n("SESClient","ListCustomVerificationEmailTemplatesCommand").f(void 0,void 0).ser(Xg).de(fv).build()){}class dP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListIdentities",{}).n("SESClient","ListIdentitiesCommand").f(void 0,void 0).ser(Zg).de(gv).build()){}class mP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListIdentityPolicies",{}).n("SESClient","ListIdentityPoliciesCommand").f(void 0,void 0).ser(ey).de(yv).build()){}class hP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListReceiptFilters",{}).n("SESClient","ListReceiptFiltersCommand").f(void 0,void 0).ser(ty).de(vv).build()){}class fP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListReceiptRuleSets",{}).n("SESClient","ListReceiptRuleSetsCommand").f(void 0,void 0).ser(ny).de(bv).build()){}class gP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListTemplates",{}).n("SESClient","ListTemplatesCommand").f(void 0,void 0).ser(iy).de(xv).build()){}class yP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListVerifiedEmailAddresses",{}).n("SESClient","ListVerifiedEmailAddressesCommand").f(void 0,void 0).ser(ry).de(wv).build()){}class vP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","PutConfigurationSetDeliveryOptions",{}).n("SESClient","PutConfigurationSetDeliveryOptionsCommand").f(void 0,void 0).ser(oy).de(Ev).build()){}class bP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","PutIdentityPolicy",{}).n("SESClient","PutIdentityPolicyCommand").f(void 0,void 0).ser(sy).de(Sv).build()){}class xP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ReorderReceiptRuleSet",{}).n("SESClient","ReorderReceiptRuleSetCommand").f(void 0,void 0).ser(ay).de(_v).build()){}class wP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendBounce",{}).n("SESClient","SendBounceCommand").f(void 0,void 0).ser(cy).de(Ov).build()){}class EP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendBulkTemplatedEmail",{}).n("SESClient","SendBulkTemplatedEmailCommand").f(void 0,void 0).ser(ly).de(Cv).build()){}class SP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendCustomVerificationEmail",{}).n("SESClient","SendCustomVerificationEmailCommand").f(void 0,void 0).ser(uy).de(kv).build()){}class _P extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendEmail",{}).n("SESClient","SendEmailCommand").f(void 0,void 0).ser(py).de(Tv).build()){}class OP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendRawEmail",{}).n("SESClient","SendRawEmailCommand").f(void 0,void 0).ser(dy).de(Pv).build()){}class CP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendTemplatedEmail",{}).n("SESClient","SendTemplatedEmailCommand").f(void 0,void 0).ser(my).de(Av).build()){}class kP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetActiveReceiptRuleSet",{}).n("SESClient","SetActiveReceiptRuleSetCommand").f(void 0,void 0).ser(hy).de(Iv).build()){}class TP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityDkimEnabled",{}).n("SESClient","SetIdentityDkimEnabledCommand").f(void 0,void 0).ser(fy).de(Rv).build()){}class PP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityFeedbackForwardingEnabled",{}).n("SESClient","SetIdentityFeedbackForwardingEnabledCommand").f(void 0,void 0).ser(gy).de(Mv).build()){}class AP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityHeadersInNotificationsEnabled",{}).n("SESClient","SetIdentityHeadersInNotificationsEnabledCommand").f(void 0,void 0).ser(yy).de(jv).build()){}class IP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityMailFromDomain",{}).n("SESClient","SetIdentityMailFromDomainCommand").f(void 0,void 0).ser(vy).de($v).build()){}class RP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityNotificationTopic",{}).n("SESClient","SetIdentityNotificationTopicCommand").f(void 0,void 0).ser(by).de(Nv).build()){}class MP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetReceiptRulePosition",{}).n("SESClient","SetReceiptRulePositionCommand").f(void 0,void 0).ser(xy).de(Dv).build()){}class jP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","TestRenderTemplate",{}).n("SESClient","TestRenderTemplateCommand").f(void 0,void 0).ser(wy).de(Lv).build()){}class $P extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateAccountSendingEnabled",{}).n("SESClient","UpdateAccountSendingEnabledCommand").f(void 0,void 0).ser(Ey).de(zv).build()){}class NP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetEventDestination",{}).n("SESClient","UpdateConfigurationSetEventDestinationCommand").f(void 0,void 0).ser(Sy).de(Fv).build()){}class DP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetReputationMetricsEnabled",{}).n("SESClient","UpdateConfigurationSetReputationMetricsEnabledCommand").f(void 0,void 0).ser(_y).de(Uv).build()){}class LP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetSendingEnabled",{}).n("SESClient","UpdateConfigurationSetSendingEnabledCommand").f(void 0,void 0).ser(Oy).de(Bv).build()){}class zP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetTrackingOptions",{}).n("SESClient","UpdateConfigurationSetTrackingOptionsCommand").f(void 0,void 0).ser(Cy).de(Hv).build()){}class FP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateCustomVerificationEmailTemplate",{}).n("SESClient","UpdateCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(ky).de(qv).build()){}class UP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateReceiptRule",{}).n("SESClient","UpdateReceiptRuleCommand").f(void 0,void 0).ser(Ty).de(Vv).build()){}class BP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateTemplate",{}).n("SESClient","UpdateTemplateCommand").f(void 0,void 0).ser(Py).de(Gv).build()){}class HP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyDomainDkim",{}).n("SESClient","VerifyDomainDkimCommand").f(void 0,void 0).ser(Ay).de(Wv).build()){}class qP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyDomainIdentity",{}).n("SESClient","VerifyDomainIdentityCommand").f(void 0,void 0).ser(Iy).de(Kv).build()){}class VP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyEmailAddress",{}).n("SESClient","VerifyEmailAddressCommand").f(void 0,void 0).ser(Ry).de(Yv).build()){}class GP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyEmailIdentity",{}).n("SESClient","VerifyEmailIdentityCommand").f(void 0,void 0).ser(My).de(Qv).build()){}const WP={CloneReceiptRuleSetCommand:AT,CreateConfigurationSetCommand:IT,CreateConfigurationSetEventDestinationCommand:RT,CreateConfigurationSetTrackingOptionsCommand:MT,CreateCustomVerificationEmailTemplateCommand:jT,CreateReceiptFilterCommand:$T,CreateReceiptRuleCommand:NT,CreateReceiptRuleSetCommand:DT,CreateTemplateCommand:LT,DeleteConfigurationSetCommand:zT,DeleteConfigurationSetEventDestinationCommand:FT,DeleteConfigurationSetTrackingOptionsCommand:UT,DeleteCustomVerificationEmailTemplateCommand:BT,DeleteIdentityCommand:HT,DeleteIdentityPolicyCommand:qT,DeleteReceiptFilterCommand:VT,DeleteReceiptRuleCommand:GT,DeleteReceiptRuleSetCommand:WT,DeleteTemplateCommand:KT,DeleteVerifiedEmailAddressCommand:YT,DescribeActiveReceiptRuleSetCommand:QT,DescribeConfigurationSetCommand:JT,DescribeReceiptRuleCommand:XT,DescribeReceiptRuleSetCommand:ZT,GetAccountSendingEnabledCommand:eP,GetCustomVerificationEmailTemplateCommand:tP,GetIdentityDkimAttributesCommand:nP,GetIdentityMailFromDomainAttributesCommand:iP,GetIdentityNotificationAttributesCommand:rP,GetIdentityPoliciesCommand:oP,GetIdentityVerificationAttributesCommand:sP,GetSendQuotaCommand:aP,GetSendStatisticsCommand:cP,GetTemplateCommand:lP,ListConfigurationSetsCommand:uP,ListCustomVerificationEmailTemplatesCommand:pP,ListIdentitiesCommand:dP,ListIdentityPoliciesCommand:mP,ListReceiptFiltersCommand:hP,ListReceiptRuleSetsCommand:fP,ListTemplatesCommand:gP,ListVerifiedEmailAddressesCommand:yP,PutConfigurationSetDeliveryOptionsCommand:vP,PutIdentityPolicyCommand:bP,ReorderReceiptRuleSetCommand:xP,SendBounceCommand:wP,SendBulkTemplatedEmailCommand:EP,SendCustomVerificationEmailCommand:SP,SendEmailCommand:_P,SendRawEmailCommand:OP,SendTemplatedEmailCommand:CP,SetActiveReceiptRuleSetCommand:kP,SetIdentityDkimEnabledCommand:TP,SetIdentityFeedbackForwardingEnabledCommand:PP,SetIdentityHeadersInNotificationsEnabledCommand:AP,SetIdentityMailFromDomainCommand:IP,SetIdentityNotificationTopicCommand:RP,SetReceiptRulePositionCommand:MP,TestRenderTemplateCommand:jP,UpdateAccountSendingEnabledCommand:$P,UpdateConfigurationSetEventDestinationCommand:NP,UpdateConfigurationSetReputationMetricsEnabledCommand:DP,UpdateConfigurationSetSendingEnabledCommand:LP,UpdateConfigurationSetTrackingOptionsCommand:zP,UpdateCustomVerificationEmailTemplateCommand:FP,UpdateReceiptRuleCommand:UP,UpdateTemplateCommand:BP,VerifyDomainDkimCommand:HP,VerifyDomainIdentityCommand:qP,VerifyEmailAddressCommand:VP,VerifyEmailIdentityCommand:GP};let KP=class extends $f{};((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}})(WP,KP);const YP=J($f,pP,"NextToken","NextToken","MaxResults"),QP=J($f,dP,"NextToken","NextToken","MaxItems"),JP=async(e,t)=>{let n;try{const i=await e.send(new sP(t));n=i;try{const e=()=>Object.values(i.VerificationAttributes).map((e=>e.VerificationStatus));let t=e().length>0;for(const n of e())t=t&&"Success"==n;if(t)return{state:xc.SUCCESS,reason:n}}catch(e){}}catch(e){n=e}return{state:xc.RETRY,reason:n}};var XP,ZP,eA=Object.freeze({__proto__:null,$Command:Kt,AccountSendingPausedException:Df,AlreadyExistsException:Lf,BehaviorOnMXFailure:{RejectMessage:"RejectMessage",UseDefaultValue:"UseDefaultValue"},BounceType:{ContentRejected:"ContentRejected",DoesNotExist:"DoesNotExist",ExceededQuota:"ExceededQuota",MessageTooLarge:"MessageTooLarge",TemporaryFailure:"TemporaryFailure",Undefined:"Undefined"},BulkEmailStatus:{AccountDailyQuotaExceeded:"AccountDailyQuotaExceeded",AccountSendingPaused:"AccountSendingPaused",AccountSuspended:"AccountSuspended",AccountThrottled:"AccountThrottled",ConfigurationSetDoesNotExist:"ConfigurationSetDoesNotExist",ConfigurationSetSendingPaused:"ConfigurationSetSendingPaused",Failed:"Failed",InvalidParameterValue:"InvalidParameterValue",InvalidSendingPoolName:"InvalidSendingPoolName",MailFromDomainNotVerified:"MailFromDomainNotVerified",MessageRejected:"MessageRejected",Success:"Success",TemplateDoesNotExist:"TemplateDoesNotExist",TransientFailure:"TransientFailure"},CannotDeleteException:zf,CloneReceiptRuleSetCommand:AT,ConfigurationSetAlreadyExistsException:Bf,ConfigurationSetAttribute:{DELIVERY_OPTIONS:"deliveryOptions",EVENT_DESTINATIONS:"eventDestinations",REPUTATION_OPTIONS:"reputationOptions",TRACKING_OPTIONS:"trackingOptions"},ConfigurationSetDoesNotExistException:Hf,ConfigurationSetSendingPausedException:qf,CreateConfigurationSetCommand:IT,CreateConfigurationSetEventDestinationCommand:RT,CreateConfigurationSetTrackingOptionsCommand:MT,CreateCustomVerificationEmailTemplateCommand:jT,CreateReceiptFilterCommand:$T,CreateReceiptRuleCommand:NT,CreateReceiptRuleSetCommand:DT,CreateTemplateCommand:LT,CustomMailFromStatus:{Failed:"Failed",Pending:"Pending",Success:"Success",TemporaryFailure:"TemporaryFailure"},CustomVerificationEmailInvalidContentException:Xf,CustomVerificationEmailTemplateAlreadyExistsException:Zf,CustomVerificationEmailTemplateDoesNotExistException:sg,DeleteConfigurationSetCommand:zT,DeleteConfigurationSetEventDestinationCommand:FT,DeleteConfigurationSetTrackingOptionsCommand:UT,DeleteCustomVerificationEmailTemplateCommand:BT,DeleteIdentityCommand:HT,DeleteIdentityPolicyCommand:qT,DeleteReceiptFilterCommand:VT,DeleteReceiptRuleCommand:GT,DeleteReceiptRuleSetCommand:WT,DeleteTemplateCommand:KT,DeleteVerifiedEmailAddressCommand:YT,DescribeActiveReceiptRuleSetCommand:QT,DescribeConfigurationSetCommand:JT,DescribeReceiptRuleCommand:XT,DescribeReceiptRuleSetCommand:ZT,DimensionValueSource:{EMAIL_HEADER:"emailHeader",LINK_TAG:"linkTag",MESSAGE_TAG:"messageTag"},DsnAction:{DELAYED:"delayed",DELIVERED:"delivered",EXPANDED:"expanded",FAILED:"failed",RELAYED:"relayed"},EventDestinationAlreadyExistsException:Gf,EventDestinationDoesNotExistException:ag,EventType:{BOUNCE:"bounce",CLICK:"click",COMPLAINT:"complaint",DELIVERY:"delivery",OPEN:"open",REJECT:"reject",RENDERING_FAILURE:"renderingFailure",SEND:"send"},FromEmailAddressNotVerifiedException:eg,GetAccountSendingEnabledCommand:eP,GetCustomVerificationEmailTemplateCommand:tP,GetIdentityDkimAttributesCommand:nP,GetIdentityMailFromDomainAttributesCommand:iP,GetIdentityNotificationAttributesCommand:rP,GetIdentityPoliciesCommand:oP,GetIdentityVerificationAttributesCommand:sP,GetSendQuotaCommand:aP,GetSendStatisticsCommand:cP,GetTemplateCommand:lP,IdentityType:{Domain:"Domain",EmailAddress:"EmailAddress"},InvalidCloudWatchDestinationException:Wf,InvalidConfigurationSetException:Vf,InvalidDeliveryOptionsException:ug,InvalidFirehoseDestinationException:Kf,InvalidLambdaFunctionException:tg,InvalidPolicyException:pg,InvalidRenderingParameterException:dg,InvalidS3ConfigurationException:ng,InvalidSNSDestinationException:Yf,InvalidSnsTopicException:ig,InvalidTemplateException:og,InvalidTrackingOptionsException:Qf,InvocationType:{Event:"Event",RequestResponse:"RequestResponse"},LimitExceededException:Ff,ListConfigurationSetsCommand:uP,ListCustomVerificationEmailTemplatesCommand:pP,ListIdentitiesCommand:dP,ListIdentityPoliciesCommand:mP,ListReceiptFiltersCommand:hP,ListReceiptRuleSetsCommand:fP,ListTemplatesCommand:gP,ListVerifiedEmailAddressesCommand:yP,MailFromDomainNotVerifiedException:mg,MessageRejected:hg,MissingRenderingAttributeException:fg,NotificationType:{Bounce:"Bounce",Complaint:"Complaint",Delivery:"Delivery"},ProductionAccessNotGrantedException:gg,PutConfigurationSetDeliveryOptionsCommand:vP,PutIdentityPolicyCommand:bP,ReceiptFilterPolicy:{Allow:"Allow",Block:"Block"},ReorderReceiptRuleSetCommand:xP,RuleDoesNotExistException:rg,RuleSetDoesNotExistException:Uf,SES:KP,SESClient:$f,SESServiceException:Nf,SNSActionEncoding:{Base64:"Base64",UTF8:"UTF-8"},SendBounceCommand:wP,SendBulkTemplatedEmailCommand:EP,SendCustomVerificationEmailCommand:SP,SendEmailCommand:_P,SendRawEmailCommand:OP,SendTemplatedEmailCommand:CP,SetActiveReceiptRuleSetCommand:kP,SetIdentityDkimEnabledCommand:TP,SetIdentityFeedbackForwardingEnabledCommand:PP,SetIdentityHeadersInNotificationsEnabledCommand:AP,SetIdentityMailFromDomainCommand:IP,SetIdentityNotificationTopicCommand:RP,SetReceiptRulePositionCommand:MP,StopScope:{RULE_SET:"RuleSet"},TemplateDoesNotExistException:lg,TestRenderTemplateCommand:jP,TlsPolicy:{Optional:"Optional",Require:"Require"},TrackingOptionsAlreadyExistsException:Jf,TrackingOptionsDoesNotExistException:cg,UpdateAccountSendingEnabledCommand:$P,UpdateConfigurationSetEventDestinationCommand:NP,UpdateConfigurationSetReputationMetricsEnabledCommand:DP,UpdateConfigurationSetSendingEnabledCommand:LP,UpdateConfigurationSetTrackingOptionsCommand:zP,UpdateCustomVerificationEmailTemplateCommand:FP,UpdateReceiptRuleCommand:UP,UpdateTemplateCommand:BP,VerificationStatus:{Failed:"Failed",NotStarted:"NotStarted",Pending:"Pending",Success:"Success",TemporaryFailure:"TemporaryFailure"},VerifyDomainDkimCommand:HP,VerifyDomainIdentityCommand:qP,VerifyEmailAddressCommand:VP,VerifyEmailIdentityCommand:GP,__Client:Wt,paginateListCustomVerificationEmailTemplates:YP,paginateListIdentities:QP,waitForIdentityExists:async(e,t)=>Oc({minDelay:3,maxDelay:120,...e},t,JP),waitUntilIdentityExists:async(e,t)=>(e=>{if(e.state===xc.ABORTED){const t=new Error(`${JSON.stringify({...e,reason:"Request was aborted"})}`);throw t.name="AbortError",t}if(e.state===xc.TIMEOUT){const t=new Error(`${JSON.stringify({...e,reason:"Waiter has timed out"})}`);throw t.name="TimeoutError",t}if(e.state!==xc.SUCCESS)throw new Error(`${JSON.stringify(e)}`);return e})(await Oc({minDelay:3,maxDelay:120,...e},t,JP))}),tA={},nA={exports:{}},iA={exports:{}};var rA,oA,sA,aA,cA,lA,uA,pA,dA,mA,hA,fA,gA,yA,vA,bA,xA,wA,EA,SA,_A,OA,CA,kA,TA,PA,AA,IA,RA={name:"nodemailer",version:"6.9.16",description:"Easy as cake e-mail sending from your Node.js applications",main:"lib/nodemailer.js",scripts:{test:"node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js","test:coverage":"c8 node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js",lint:"eslint .",update:"rm -rf node_modules/ package-lock.json && ncu -u && npm install"},repository:{type:"git",url:"https://github.com/nodemailer/nodemailer.git"},keywords:["Nodemailer"],author:"Andris Reinman",license:"MIT-0",bugs:{url:"https://github.com/nodemailer/nodemailer/issues"},homepage:"https://nodemailer.com/",devDependencies:{"@aws-sdk/client-ses":"3.679.0",bunyan:"1.8.15",c8:"10.1.2",eslint:"8.57.0","eslint-config-nodemailer":"1.2.0","eslint-config-prettier":"9.1.0",libbase64:"1.3.0",libmime:"5.3.5",libqp:"2.1.0","nodemailer-ntlm-auth":"1.0.4",proxy:"1.0.2","proxy-test-server":"1.0.0","smtp-server":"3.13.6"},engines:{node:">=6.0.0"}};function MA(){if(rA)return iA.exports;rA=1;const e=o,t=s,i=n,r=a,u=c.PassThrough,p=function(){if(ZP)return XP;ZP=1;const e=n;return XP=class{constructor(e){this.options=e||{},this.cookies=[]}set(t,n){let i,r=e.parse(n||""),o=this.parse(t);return o.domain?(i=o.domain.replace(/^\./,""),(r.hostname.length<i.length||("."+r.hostname).substr(1-i.length)!=="."+i)&&(o.domain=r.hostname)):o.domain=r.hostname,o.path||(o.path=this.getPath(r.pathname)),o.expires||(o.expires=new Date(Date.now()+1e3*(Number(this.options.sessionTimeout||1800)||1800))),this.add(o)}get(e){return this.list(e).map((e=>e.name+"="+e.value)).join("; ")}list(e){let t,n,i=[];for(t=this.cookies.length-1;t>=0;t--)n=this.cookies[t],this.isExpired(n)?this.cookies.splice(t,t):this.match(n,e)&&i.unshift(n);return i}parse(e){let t={};return(e||"").toString().split(";").forEach((e=>{let n,i=e.split("="),r=i.shift().trim().toLowerCase(),o=i.join("=").trim();if(r)switch(r){case"expires":o=new Date(o),"Invalid Date"!==o.toString()&&(t.expires=o);break;case"path":t.path=o;break;case"domain":n=o.toLowerCase(),n.length&&"."!==n.charAt(0)&&(n="."+n),t.domain=n;break;case"max-age":t.expires=new Date(Date.now()+1e3*(Number(o)||0));break;case"secure":t.secure=!0;break;case"httponly":t.httponly=!0;break;default:t.name||(t.name=r,t.value=o)}})),t}match(t,n){let i=e.parse(n||"");return(i.hostname===t.domain||"."===t.domain.charAt(0)&&("."+i.hostname).substr(-t.domain.length)===t.domain)&&this.getPath(i.pathname).substr(0,t.path.length)===t.path&&(!t.secure||"https:"===i.protocol)}add(e){let t,n;if(!e||!e.name)return!1;for(t=0,n=this.cookies.length;t<n;t++)if(this.compare(this.cookies[t],e))return this.isExpired(e)?(this.cookies.splice(t,1),!1):(this.cookies[t]=e,!0);return this.isExpired(e)||this.cookies.push(e),!0}compare(e,t){return e.name===t.name&&e.path===t.path&&e.domain===t.domain&&e.secure===t.secure&&e.httponly==e.httponly}isExpired(e){return e.expires&&e.expires<new Date||!e.value}getPath(e){let t=(e||"/").split("/");return t.pop(),t=t.join("/").trim(),"/"!==t.charAt(0)&&(t="/"+t),"/"!==t.substr(-1)&&(t+="/"),t}},XP}(),d=RA,m=l;function h(n,o){(o=o||{}).fetchRes=o.fetchRes||new u,o.cookies=o.cookies||new p,o.redirects=o.redirects||0,o.maxRedirects=isNaN(o.maxRedirects)?5:o.maxRedirects,o.cookie&&([].concat(o.cookie||[]).forEach((e=>{o.cookies.set(e,n)})),o.cookie=!1);let s,a,c,l=o.fetchRes,f=i.parse(n),g=(o.method||"").toString().trim().toUpperCase()||"GET",y=!1,v="https:"===f.protocol?t:e,b={"accept-encoding":"gzip,deflate","user-agent":"nodemailer/"+d.version};if(Object.keys(o.headers||{}).forEach((e=>{b[e.toLowerCase().trim()]=o.headers[e]})),o.userAgent&&(b["user-agent"]=o.userAgent),f.auth&&(b.Authorization="Basic "+Buffer.from(f.auth).toString("base64")),(s=o.cookies.get(n))&&(b.cookie=s),o.body){if(!1!==o.contentType&&(b["Content-Type"]=o.contentType||"application/x-www-form-urlencoded"),"function"==typeof o.body.pipe)b["Transfer-Encoding"]="chunked",a=o.body,a.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=n,l.emit("error",e))}));else{if(o.body instanceof Buffer)a=o.body;else if("object"==typeof o.body)try{a=Buffer.from(Object.keys(o.body).map((e=>{let t=o.body[e].toString().trim();return encodeURIComponent(e)+"="+encodeURIComponent(t)})).join("&"))}catch(e){if(y)return;return y=!0,e.type="FETCH",e.sourceUrl=n,void l.emit("error",e)}else a=Buffer.from(o.body.toString().trim());b["Content-Type"]=o.contentType||"application/x-www-form-urlencoded",b["Content-Length"]=a.length}g=(o.method||"").toString().trim().toUpperCase()||"POST"}let x={method:g,host:f.hostname,path:f.path,port:f.port?f.port:"https:"===f.protocol?443:80,headers:b,rejectUnauthorized:!1,agent:!1};o.tls&&Object.keys(o.tls).forEach((e=>{x[e]=o.tls[e]})),"https:"!==f.protocol||!f.hostname||f.hostname===x.host||m.isIP(f.hostname)||x.servername||(x.servername=f.hostname);try{c=v.request(x)}catch(e){return y=!0,setImmediate((()=>{e.type="FETCH",e.sourceUrl=n,l.emit("error",e)})),l}return o.timeout&&c.setTimeout(o.timeout,(()=>{if(y)return;y=!0,c.abort();let e=new Error("Request Timeout");e.type="FETCH",e.sourceUrl=n,l.emit("error",e)})),c.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=n,l.emit("error",e))})),c.on("response",(e=>{let t;if(!y){switch(e.headers["content-encoding"]){case"gzip":case"deflate":t=r.createUnzip()}if(e.headers["set-cookie"]&&[].concat(e.headers["set-cookie"]||[]).forEach((e=>{o.cookies.set(e,n)})),[301,302,303,307,308].includes(e.statusCode)&&e.headers.location){if(o.redirects++,o.redirects>o.maxRedirects){y=!0;let e=new Error("Maximum redirect count exceeded");return e.type="FETCH",e.sourceUrl=n,l.emit("error",e),void c.abort()}return o.method="GET",o.body=!1,h(i.resolve(n,e.headers.location),o)}if(l.statusCode=e.statusCode,l.headers=e.headers,e.statusCode>=300&&!o.allowErrorResponse){y=!0;let t=new Error("Invalid status code "+e.statusCode);return t.type="FETCH",t.sourceUrl=n,l.emit("error",t),void c.abort()}e.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=n,l.emit("error",e),c.abort())})),t?(e.pipe(t).pipe(l),t.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=n,l.emit("error",e),c.abort())}))):e.pipe(l)}})),setImmediate((()=>{if(a)try{if("function"==typeof a.pipe)return a.pipe(c);c.write(a)}catch(e){return y=!0,e.type="FETCH",e.sourceUrl=n,void l.emit("error",e)}c.end()})),l}return iA.exports=function(e,t){return h(e,t)},iA.exports.Cookies=p,iA.exports}function jA(){return oA||(oA=1,function(e){const t=n,o=i,s=r,a=MA(),c=u,d=l,m=p,h=3e5;let f;try{f=m.networkInterfaces()}catch(e){}e.exports.networkInterfaces=f;const g=(t,n)=>{let i=e.exports.networkInterfaces;if(!i)return!0;const r=Object.keys(i).map((e=>i[e])).reduce(((e,t)=>e.concat(t)),[]).filter((e=>!e.internal||n)).filter((e=>e.family==="IPv"+t||e.family===t)).length>0;return r},y=(e,t,n,i)=>{if(!g(e,(n=n||{}).allowInternalNetworkInterfaces))return i(null,[]);(c.Resolver?new c.Resolver(n):c)["resolve"+e](t,((e,t)=>{if(e){switch(e.code){case c.NODATA:case c.NOTFOUND:case c.NOTIMP:case c.SERVFAIL:case c.CONNREFUSED:case c.REFUSED:case"EAI_AGAIN":return i(null,[])}return i(e)}return i(null,Array.isArray(t)?t:[].concat(t||[]))}))},v=e.exports.dnsCache=new Map,b=(e,t)=>e?Object.assign({servername:e.servername,host:e.addresses&&e.addresses.length?1===e.addresses.length?e.addresses[0]:e.addresses[Math.floor(Math.random()*e.addresses.length)]:null},t||{}):Object.assign({},t||{});function x(e,t){let n=!1,i=[],r=0;e.on("error",(e=>{n||(n=!0,t(e))})),e.on("readable",(()=>{let t;for(;null!==(t=e.read());)i.push(t),r+=t.length})),e.on("end",(()=>{if(n)return;let e;n=!0;try{e=Buffer.concat(i,r)}catch(e){return t(e)}t(null,e)}))}e.exports.resolveHostname=(e,t)=>{if(!(e=e||{}).host&&e.servername&&(e.host=e.servername),!e.host||d.isIP(e.host)){let n={addresses:[e.host],servername:e.servername||!1};return t(null,b(n,{cached:!1}))}let n;if(v.has(e.host)&&(n=v.get(e.host),!n.expires||n.expires>=Date.now()))return t(null,b(n.value,{cached:!0}));y(4,e.host,e,((i,r)=>{if(i)return n?t(null,b(n.value,{cached:!0,error:i})):t(i);if(r&&r.length){let n={addresses:r,servername:e.servername||e.host};return v.set(e.host,{value:n,expires:Date.now()+(e.dnsTtl||h)}),t(null,b(n,{cached:!1}))}y(6,e.host,e,((i,r)=>{if(i)return n?t(null,b(n.value,{cached:!0,error:i})):t(i);if(r&&r.length){let n={addresses:r,servername:e.servername||e.host};return v.set(e.host,{value:n,expires:Date.now()+(e.dnsTtl||h)}),t(null,b(n,{cached:!1}))}try{c.lookup(e.host,{all:!0},((i,r)=>{if(i)return n?t(null,b(n.value,{cached:!0,error:i})):t(i);let o=!!r&&r.filter((e=>g(e.family))).map((e=>e.address)).shift();if(r&&r.length&&!o&&console.warn(`Failed to resolve IPv${r[0].family} addresses with current network`),!o&&n)return t(null,b(n.value,{cached:!0}));let s={addresses:o?[o]:[e.host],servername:e.servername||e.host};return v.set(e.host,{value:s,expires:Date.now()+(e.dnsTtl||h)}),t(null,b(s,{cached:!1}))}))}catch(i){return n?t(null,b(n.value,{cached:!0,error:i})):t(i)}}))}))},e.exports.parseConnectionUrl=e=>{e=e||"";let n={};return[t.parse(e,!0)].forEach((e=>{let t;switch(e.protocol){case"smtp:":n.secure=!1;break;case"smtps:":n.secure=!0;break;case"direct:":n.direct=!0}!isNaN(e.port)&&Number(e.port)&&(n.port=Number(e.port)),e.hostname&&(n.host=e.hostname),e.auth&&(t=e.auth.split(":"),n.auth||(n.auth={}),n.auth.user=t.shift(),n.auth.pass=t.join(":")),Object.keys(e.query||{}).forEach((t=>{let i=n,r=t,o=e.query[t];switch(isNaN(o)||(o=Number(o)),o){case"true":o=!0;break;case"false":o=!1}if(0===t.indexOf("tls."))r=t.substr(4),n.tls||(n.tls={}),i=n.tls;else if(t.indexOf(".")>=0)return;r in i||(i[r]=o)}))})),n},e.exports._logFunc=(e,t,n,i,r,...o)=>{let s={};Object.keys(n||{}).forEach((e=>{"level"!==e&&(s[e]=n[e])})),Object.keys(i||{}).forEach((e=>{"level"!==e&&(s[e]=i[e])})),e[t](s,r,...o)},e.exports.getLogger=(t,n)=>{let i={},r=["trace","debug","info","warn","error","fatal"];if(!(t=t||{}).logger)return r.forEach((e=>{i[e]=()=>!1})),i;let s=t.logger;return!0===t.logger&&(s=function(e){let t=0,n=new Map;e.forEach((e=>{e.length>t&&(t=e.length)})),e.forEach((e=>{let i=e.toUpperCase();i.length<t&&(i+=" ".repeat(t-i.length)),n.set(e,i)}));let i=(e,t,i,...r)=>{let s="";t&&("server"===t.tnx?s="S: ":"client"===t.tnx&&(s="C: "),t.sid&&(s="["+t.sid+"] "+s),t.cid&&(s="[#"+t.cid+"] "+s)),(i=o.format(i,...r)).split(/\r?\n/).forEach((t=>{console.log("[%s] %s %s",(new Date).toISOString().substr(0,19).replace(/T/," "),n.get(e),s+t)}))},r={};return e.forEach((e=>{r[e]=i.bind(null,e)})),r}(r)),r.forEach((t=>{i[t]=(i,r,...o)=>{e.exports._logFunc(s,t,n,i,r,...o)}})),i},e.exports.callbackPromise=(e,t)=>function(){let n=Array.from(arguments),i=n.shift();i?t(i):e(...n)},e.exports.parseDataURI=e=>{let t=e,n=t.indexOf(",");if(!n)return e;let i,r=t.substring(n+1),o=t.substring(5,n).split(";"),s=o.length>1&&o[o.length-1];s&&s.indexOf("=")<0&&(i=s.toLowerCase(),o.pop());let a=o.shift()||"application/octet-stream",c={};for(let e of o){let t=e.indexOf("=");if(t>=0){let n=e.substring(0,t),i=e.substring(t+1);c[n]=i}}switch(i){case"base64":r=Buffer.from(r,"base64");break;case"utf8":r=Buffer.from(r);break;default:try{r=Buffer.from(decodeURIComponent(r))}catch(e){r=Buffer.from(r)}r=Buffer.from(r)}return{data:r,encoding:i,contentType:a,params:c}},e.exports.resolveContent=(t,n,i)=>{let r;i||(r=new Promise(((t,n)=>{i=e.exports.callbackPromise(t,n)})));let o,c=t&&t[n]&&t[n].content||t[n],l=("object"==typeof t[n]&&t[n].encoding||"utf8").toString().toLowerCase().replace(/[-_\s]/g,"");if(!c)return i(null,c);if("object"==typeof c){if("function"==typeof c.pipe)return x(c,((e,r)=>{if(e)return i(e);t[n].content?t[n].content=r:t[n]=r,i(null,r)}));if(/^https?:\/\//i.test(c.path||c.href))return o=a(c.path||c.href),x(o,i);if(/^data:/i.test(c.path||c.href)){let t=e.exports.parseDataURI(c.path||c.href);return t&&t.data?i(null,t.data):i(null,Buffer.from(0))}if(c.path)return x(s.createReadStream(c.path),i)}return"string"!=typeof t[n].content||["utf8","usascii","ascii"].includes(l)||(c=Buffer.from(t[n].content,l)),setImmediate((()=>i(null,c))),r},e.exports.assign=function(){let e=Array.from(arguments),t=e.shift()||{};return e.forEach((e=>{Object.keys(e||{}).forEach((n=>{["tls","auth"].includes(n)&&e[n]&&"object"==typeof e[n]?(t[n]||(t[n]={}),Object.keys(e[n]).forEach((i=>{t[n][i]=e[n][i]}))):t[n]=e[n]}))})),t},e.exports.encodeXText=e=>{if(!/[^\x21-\x2A\x2C-\x3C\x3E-\x7E]/.test(e))return e;let t=Buffer.from(e),n="";for(let e=0,i=t.length;e<i;e++){let i=t[e];n+=i<33||i>126||43===i||61===i?"+"+(i<16?"0":"")+i.toString(16).toUpperCase():String.fromCharCode(i)}return n}}(nA)),nA.exports}function $A(){if(aA)return sA;aA=1;const e=d,t="application/octet-stream",n=new Map([["application/acad","dwg"],["application/applixware","aw"],["application/arj","arj"],["application/atom+xml","xml"],["application/atomcat+xml","atomcat"],["application/atomsvc+xml","atomsvc"],["application/base64",["mm","mme"]],["application/binhex","hqx"],["application/binhex4","hqx"],["application/book",["book","boo"]],["application/ccxml+xml,","ccxml"],["application/cdf","cdf"],["application/cdmi-capability","cdmia"],["application/cdmi-container","cdmic"],["application/cdmi-domain","cdmid"],["application/cdmi-object","cdmio"],["application/cdmi-queue","cdmiq"],["application/clariscad","ccad"],["application/commonground","dp"],["application/cu-seeme","cu"],["application/davmount+xml","davmount"],["application/drafting","drw"],["application/dsptype","tsp"],["application/dssc+der","dssc"],["application/dssc+xml","xdssc"],["application/dxf","dxf"],["application/ecmascript",["js","es"]],["application/emma+xml","emma"],["application/envoy","evy"],["application/epub+zip","epub"],["application/excel",["xls","xl","xla","xlb","xlc","xld","xlk","xll","xlm","xlt","xlv","xlw"]],["application/exi","exi"],["application/font-tdpfr","pfr"],["application/fractals","fif"],["application/freeloader","frl"],["application/futuresplash","spl"],["application/geo+json","geojson"],["application/gnutar","tgz"],["application/groupwise","vew"],["application/hlp","hlp"],["application/hta","hta"],["application/hyperstudio","stk"],["application/i-deas","unv"],["application/iges",["iges","igs"]],["application/inf","inf"],["application/internet-property-stream","acx"],["application/ipfix","ipfix"],["application/java","class"],["application/java-archive","jar"],["application/java-byte-code","class"],["application/java-serialized-object","ser"],["application/java-vm","class"],["application/javascript","js"],["application/json","json"],["application/lha","lha"],["application/lzx","lzx"],["application/mac-binary","bin"],["application/mac-binhex","hqx"],["application/mac-binhex40","hqx"],["application/mac-compactpro","cpt"],["application/macbinary","bin"],["application/mads+xml","mads"],["application/marc","mrc"],["application/marcxml+xml","mrcx"],["application/mathematica","ma"],["application/mathml+xml","mathml"],["application/mbedlet","mbd"],["application/mbox","mbox"],["application/mcad","mcd"],["application/mediaservercontrol+xml","mscml"],["application/metalink4+xml","meta4"],["application/mets+xml","mets"],["application/mime","aps"],["application/mods+xml","mods"],["application/mp21","m21"],["application/mp4","mp4"],["application/mspowerpoint",["ppt","pot","pps","ppz"]],["application/msword",["doc","dot","w6w","wiz","word"]],["application/mswrite","wri"],["application/mxf","mxf"],["application/netmc","mcp"],["application/octet-stream",["*"]],["application/oda","oda"],["application/oebps-package+xml","opf"],["application/ogg","ogx"],["application/olescript","axs"],["application/onenote","onetoc"],["application/patch-ops-error+xml","xer"],["application/pdf","pdf"],["application/pgp-encrypted","asc"],["application/pgp-signature","pgp"],["application/pics-rules","prf"],["application/pkcs-12","p12"],["application/pkcs-crl","crl"],["application/pkcs10","p10"],["application/pkcs7-mime",["p7c","p7m"]],["application/pkcs7-signature","p7s"],["application/pkcs8","p8"],["application/pkix-attr-cert","ac"],["application/pkix-cert",["cer","crt"]],["application/pkix-crl","crl"],["application/pkix-pkipath","pkipath"],["application/pkixcmp","pki"],["application/plain","text"],["application/pls+xml","pls"],["application/postscript",["ps","ai","eps"]],["application/powerpoint","ppt"],["application/pro_eng",["part","prt"]],["application/prs.cww","cww"],["application/pskc+xml","pskcxml"],["application/rdf+xml","rdf"],["application/reginfo+xml","rif"],["application/relax-ng-compact-syntax","rnc"],["application/resource-lists+xml","rl"],["application/resource-lists-diff+xml","rld"],["application/ringing-tones","rng"],["application/rls-services+xml","rs"],["application/rsd+xml","rsd"],["application/rss+xml","xml"],["application/rtf",["rtf","rtx"]],["application/sbml+xml","sbml"],["application/scvp-cv-request","scq"],["application/scvp-cv-response","scs"],["application/scvp-vp-request","spq"],["application/scvp-vp-response","spp"],["application/sdp","sdp"],["application/sea","sea"],["application/set","set"],["application/set-payment-initiation","setpay"],["application/set-registration-initiation","setreg"],["application/shf+xml","shf"],["application/sla","stl"],["application/smil",["smi","smil"]],["application/smil+xml","smi"],["application/solids","sol"],["application/sounder","sdr"],["application/sparql-query","rq"],["application/sparql-results+xml","srx"],["application/srgs","gram"],["application/srgs+xml","grxml"],["application/sru+xml","sru"],["application/ssml+xml","ssml"],["application/step",["step","stp"]],["application/streamingmedia","ssm"],["application/tei+xml","tei"],["application/thraud+xml","tfi"],["application/timestamped-data","tsd"],["application/toolbook","tbk"],["application/vda","vda"],["application/vnd.3gpp.pic-bw-large","plb"],["application/vnd.3gpp.pic-bw-small","psb"],["application/vnd.3gpp.pic-bw-var","pvb"],["application/vnd.3gpp2.tcap","tcap"],["application/vnd.3m.post-it-notes","pwn"],["application/vnd.accpac.simply.aso","aso"],["application/vnd.accpac.simply.imp","imp"],["application/vnd.acucobol","acu"],["application/vnd.acucorp","atc"],["application/vnd.adobe.air-application-installer-package+zip","air"],["application/vnd.adobe.fxp","fxp"],["application/vnd.adobe.xdp+xml","xdp"],["application/vnd.adobe.xfdf","xfdf"],["application/vnd.ahead.space","ahead"],["application/vnd.airzip.filesecure.azf","azf"],["application/vnd.airzip.filesecure.azs","azs"],["application/vnd.amazon.ebook","azw"],["application/vnd.americandynamics.acc","acc"],["application/vnd.amiga.ami","ami"],["application/vnd.android.package-archive","apk"],["application/vnd.anser-web-certificate-issue-initiation","cii"],["application/vnd.anser-web-funds-transfer-initiation","fti"],["application/vnd.antix.game-component","atx"],["application/vnd.apple.installer+xml","mpkg"],["application/vnd.apple.mpegurl","m3u8"],["application/vnd.aristanetworks.swi","swi"],["application/vnd.audiograph","aep"],["application/vnd.blueice.multipass","mpm"],["application/vnd.bmi","bmi"],["application/vnd.businessobjects","rep"],["application/vnd.chemdraw+xml","cdxml"],["application/vnd.chipnuts.karaoke-mmd","mmd"],["application/vnd.cinderella","cdy"],["application/vnd.claymore","cla"],["application/vnd.cloanto.rp9","rp9"],["application/vnd.clonk.c4group","c4g"],["application/vnd.cluetrust.cartomobile-config","c11amc"],["application/vnd.cluetrust.cartomobile-config-pkg","c11amz"],["application/vnd.commonspace","csp"],["application/vnd.contact.cmsg","cdbcmsg"],["application/vnd.cosmocaller","cmc"],["application/vnd.crick.clicker","clkx"],["application/vnd.crick.clicker.keyboard","clkk"],["application/vnd.crick.clicker.palette","clkp"],["application/vnd.crick.clicker.template","clkt"],["application/vnd.crick.clicker.wordbank","clkw"],["application/vnd.criticaltools.wbs+xml","wbs"],["application/vnd.ctc-posml","pml"],["application/vnd.cups-ppd","ppd"],["application/vnd.curl.car","car"],["application/vnd.curl.pcurl","pcurl"],["application/vnd.data-vision.rdz","rdz"],["application/vnd.denovo.fcselayout-link","fe_launch"],["application/vnd.dna","dna"],["application/vnd.dolby.mlp","mlp"],["application/vnd.dpgraph","dpg"],["application/vnd.dreamfactory","dfac"],["application/vnd.dvb.ait","ait"],["application/vnd.dvb.service","svc"],["application/vnd.dynageo","geo"],["application/vnd.ecowin.chart","mag"],["application/vnd.enliven","nml"],["application/vnd.epson.esf","esf"],["application/vnd.epson.msf","msf"],["application/vnd.epson.quickanime","qam"],["application/vnd.epson.salt","slt"],["application/vnd.epson.ssf","ssf"],["application/vnd.eszigno3+xml","es3"],["application/vnd.ezpix-album","ez2"],["application/vnd.ezpix-package","ez3"],["application/vnd.fdf","fdf"],["application/vnd.fdsn.seed","seed"],["application/vnd.flographit","gph"],["application/vnd.fluxtime.clip","ftc"],["application/vnd.framemaker","fm"],["application/vnd.frogans.fnc","fnc"],["application/vnd.frogans.ltf","ltf"],["application/vnd.fsc.weblaunch","fsc"],["application/vnd.fujitsu.oasys","oas"],["application/vnd.fujitsu.oasys2","oa2"],["application/vnd.fujitsu.oasys3","oa3"],["application/vnd.fujitsu.oasysgp","fg5"],["application/vnd.fujitsu.oasysprs","bh2"],["application/vnd.fujixerox.ddd","ddd"],["application/vnd.fujixerox.docuworks","xdw"],["application/vnd.fujixerox.docuworks.binder","xbd"],["application/vnd.fuzzysheet","fzs"],["application/vnd.genomatix.tuxedo","txd"],["application/vnd.geogebra.file","ggb"],["application/vnd.geogebra.tool","ggt"],["application/vnd.geometry-explorer","gex"],["application/vnd.geonext","gxt"],["application/vnd.geoplan","g2w"],["application/vnd.geospace","g3w"],["application/vnd.gmx","gmx"],["application/vnd.google-earth.kml+xml","kml"],["application/vnd.google-earth.kmz","kmz"],["application/vnd.grafeq","gqf"],["application/vnd.groove-account","gac"],["application/vnd.groove-help","ghf"],["application/vnd.groove-identity-message","gim"],["application/vnd.groove-injector","grv"],["application/vnd.groove-tool-message","gtm"],["application/vnd.groove-tool-template","tpl"],["application/vnd.groove-vcard","vcg"],["application/vnd.hal+xml","hal"],["application/vnd.handheld-entertainment+xml","zmm"],["application/vnd.hbci","hbci"],["application/vnd.hhe.lesson-player","les"],["application/vnd.hp-hpgl",["hgl","hpg","hpgl"]],["application/vnd.hp-hpid","hpid"],["application/vnd.hp-hps","hps"],["application/vnd.hp-jlyt","jlt"],["application/vnd.hp-pcl","pcl"],["application/vnd.hp-pclxl","pclxl"],["application/vnd.hydrostatix.sof-data","sfd-hdstx"],["application/vnd.hzn-3d-crossword","x3d"],["application/vnd.ibm.minipay","mpy"],["application/vnd.ibm.modcap","afp"],["application/vnd.ibm.rights-management","irm"],["application/vnd.ibm.secure-container","sc"],["application/vnd.iccprofile","icc"],["application/vnd.igloader","igl"],["application/vnd.immervision-ivp","ivp"],["application/vnd.immervision-ivu","ivu"],["application/vnd.insors.igm","igm"],["application/vnd.intercon.formnet","xpw"],["application/vnd.intergeo","i2g"],["application/vnd.intu.qbo","qbo"],["application/vnd.intu.qfx","qfx"],["application/vnd.ipunplugged.rcprofile","rcprofile"],["application/vnd.irepository.package+xml","irp"],["application/vnd.is-xpr","xpr"],["application/vnd.isac.fcs","fcs"],["application/vnd.jam","jam"],["application/vnd.jcp.javame.midlet-rms","rms"],["application/vnd.jisp","jisp"],["application/vnd.joost.joda-archive","joda"],["application/vnd.kahootz","ktz"],["application/vnd.kde.karbon","karbon"],["application/vnd.kde.kchart","chrt"],["application/vnd.kde.kformula","kfo"],["application/vnd.kde.kivio","flw"],["application/vnd.kde.kontour","kon"],["application/vnd.kde.kpresenter","kpr"],["application/vnd.kde.kspread","ksp"],["application/vnd.kde.kword","kwd"],["application/vnd.kenameaapp","htke"],["application/vnd.kidspiration","kia"],["application/vnd.kinar","kne"],["application/vnd.koan","skp"],["application/vnd.kodak-descriptor","sse"],["application/vnd.las.las+xml","lasxml"],["application/vnd.llamagraphics.life-balance.desktop","lbd"],["application/vnd.llamagraphics.life-balance.exchange+xml","lbe"],["application/vnd.lotus-1-2-3","123"],["application/vnd.lotus-approach","apr"],["application/vnd.lotus-freelance","pre"],["application/vnd.lotus-notes","nsf"],["application/vnd.lotus-organizer","org"],["application/vnd.lotus-screencam","scm"],["application/vnd.lotus-wordpro","lwp"],["application/vnd.macports.portpkg","portpkg"],["application/vnd.mcd","mcd"],["application/vnd.medcalcdata","mc1"],["application/vnd.mediastation.cdkey","cdkey"],["application/vnd.mfer","mwf"],["application/vnd.mfmp","mfm"],["application/vnd.micrografx.flo","flo"],["application/vnd.micrografx.igx","igx"],["application/vnd.mif","mif"],["application/vnd.mobius.daf","daf"],["application/vnd.mobius.dis","dis"],["application/vnd.mobius.mbk","mbk"],["application/vnd.mobius.mqy","mqy"],["application/vnd.mobius.msl","msl"],["application/vnd.mobius.plc","plc"],["application/vnd.mobius.txf","txf"],["application/vnd.mophun.application","mpn"],["application/vnd.mophun.certificate","mpc"],["application/vnd.mozilla.xul+xml","xul"],["application/vnd.ms-artgalry","cil"],["application/vnd.ms-cab-compressed","cab"],["application/vnd.ms-excel",["xls","xla","xlc","xlm","xlt","xlw","xlb","xll"]],["application/vnd.ms-excel.addin.macroenabled.12","xlam"],["application/vnd.ms-excel.sheet.binary.macroenabled.12","xlsb"],["application/vnd.ms-excel.sheet.macroenabled.12","xlsm"],["application/vnd.ms-excel.template.macroenabled.12","xltm"],["application/vnd.ms-fontobject","eot"],["application/vnd.ms-htmlhelp","chm"],["application/vnd.ms-ims","ims"],["application/vnd.ms-lrm","lrm"],["application/vnd.ms-officetheme","thmx"],["application/vnd.ms-outlook","msg"],["application/vnd.ms-pki.certstore","sst"],["application/vnd.ms-pki.pko","pko"],["application/vnd.ms-pki.seccat","cat"],["application/vnd.ms-pki.stl","stl"],["application/vnd.ms-pkicertstore","sst"],["application/vnd.ms-pkiseccat","cat"],["application/vnd.ms-pkistl","stl"],["application/vnd.ms-powerpoint",["ppt","pot","pps","ppa","pwz"]],["application/vnd.ms-powerpoint.addin.macroenabled.12","ppam"],["application/vnd.ms-powerpoint.presentation.macroenabled.12","pptm"],["application/vnd.ms-powerpoint.slide.macroenabled.12","sldm"],["application/vnd.ms-powerpoint.slideshow.macroenabled.12","ppsm"],["application/vnd.ms-powerpoint.template.macroenabled.12","potm"],["application/vnd.ms-project","mpp"],["application/vnd.ms-word.document.macroenabled.12","docm"],["application/vnd.ms-word.template.macroenabled.12","dotm"],["application/vnd.ms-works",["wks","wcm","wdb","wps"]],["application/vnd.ms-wpl","wpl"],["application/vnd.ms-xpsdocument","xps"],["application/vnd.mseq","mseq"],["application/vnd.musician","mus"],["application/vnd.muvee.style","msty"],["application/vnd.neurolanguage.nlu","nlu"],["application/vnd.noblenet-directory","nnd"],["application/vnd.noblenet-sealer","nns"],["application/vnd.noblenet-web","nnw"],["application/vnd.nokia.configuration-message","ncm"],["application/vnd.nokia.n-gage.data","ngdat"],["application/vnd.nokia.n-gage.symbian.install","n-gage"],["application/vnd.nokia.radio-preset","rpst"],["application/vnd.nokia.radio-presets","rpss"],["application/vnd.nokia.ringing-tone","rng"],["application/vnd.novadigm.edm","edm"],["application/vnd.novadigm.edx","edx"],["application/vnd.novadigm.ext","ext"],["application/vnd.oasis.opendocument.chart","odc"],["application/vnd.oasis.opendocument.chart-template","otc"],["application/vnd.oasis.opendocument.database","odb"],["application/vnd.oasis.opendocument.formula","odf"],["application/vnd.oasis.opendocument.formula-template","odft"],["application/vnd.oasis.opendocument.graphics","odg"],["application/vnd.oasis.opendocument.graphics-template","otg"],["application/vnd.oasis.opendocument.image","odi"],["application/vnd.oasis.opendocument.image-template","oti"],["application/vnd.oasis.opendocument.presentation","odp"],["application/vnd.oasis.opendocument.presentation-template","otp"],["application/vnd.oasis.opendocument.spreadsheet","ods"],["application/vnd.oasis.opendocument.spreadsheet-template","ots"],["application/vnd.oasis.opendocument.text","odt"],["application/vnd.oasis.opendocument.text-master","odm"],["application/vnd.oasis.opendocument.text-template","ott"],["application/vnd.oasis.opendocument.text-web","oth"],["application/vnd.olpc-sugar","xo"],["application/vnd.oma.dd2+xml","dd2"],["application/vnd.openofficeorg.extension","oxt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","pptx"],["application/vnd.openxmlformats-officedocument.presentationml.slide","sldx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","ppsx"],["application/vnd.openxmlformats-officedocument.presentationml.template","potx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","xltx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","dotx"],["application/vnd.osgeo.mapguide.package","mgp"],["application/vnd.osgi.dp","dp"],["application/vnd.palm","pdb"],["application/vnd.pawaafile","paw"],["application/vnd.pg.format","str"],["application/vnd.pg.osasli","ei6"],["application/vnd.picsel","efif"],["application/vnd.pmi.widget","wg"],["application/vnd.pocketlearn","plf"],["application/vnd.powerbuilder6","pbd"],["application/vnd.previewsystems.box","box"],["application/vnd.proteus.magazine","mgz"],["application/vnd.publishare-delta-tree","qps"],["application/vnd.pvi.ptid1","ptid"],["application/vnd.quark.quarkxpress","qxd"],["application/vnd.realvnc.bed","bed"],["application/vnd.recordare.musicxml","mxl"],["application/vnd.recordare.musicxml+xml","musicxml"],["application/vnd.rig.cryptonote","cryptonote"],["application/vnd.rim.cod","cod"],["application/vnd.rn-realmedia","rm"],["application/vnd.rn-realplayer","rnx"],["application/vnd.route66.link66+xml","link66"],["application/vnd.sailingtracker.track","st"],["application/vnd.seemail","see"],["application/vnd.sema","sema"],["application/vnd.semd","semd"],["application/vnd.semf","semf"],["application/vnd.shana.informed.formdata","ifm"],["application/vnd.shana.informed.formtemplate","itp"],["application/vnd.shana.informed.interchange","iif"],["application/vnd.shana.informed.package","ipk"],["application/vnd.simtech-mindmapper","twd"],["application/vnd.smaf","mmf"],["application/vnd.smart.teacher","teacher"],["application/vnd.solent.sdkm+xml","sdkm"],["application/vnd.spotfire.dxp","dxp"],["application/vnd.spotfire.sfs","sfs"],["application/vnd.stardivision.calc","sdc"],["application/vnd.stardivision.draw","sda"],["application/vnd.stardivision.impress","sdd"],["application/vnd.stardivision.math","smf"],["application/vnd.stardivision.writer","sdw"],["application/vnd.stardivision.writer-global","sgl"],["application/vnd.stepmania.stepchart","sm"],["application/vnd.sun.xml.calc","sxc"],["application/vnd.sun.xml.calc.template","stc"],["application/vnd.sun.xml.draw","sxd"],["application/vnd.sun.xml.draw.template","std"],["application/vnd.sun.xml.impress","sxi"],["application/vnd.sun.xml.impress.template","sti"],["application/vnd.sun.xml.math","sxm"],["application/vnd.sun.xml.writer","sxw"],["application/vnd.sun.xml.writer.global","sxg"],["application/vnd.sun.xml.writer.template","stw"],["application/vnd.sus-calendar","sus"],["application/vnd.svd","svd"],["application/vnd.symbian.install","sis"],["application/vnd.syncml+xml","xsm"],["application/vnd.syncml.dm+wbxml","bdm"],["application/vnd.syncml.dm+xml","xdm"],["application/vnd.tao.intent-module-archive","tao"],["application/vnd.tmobile-livetv","tmo"],["application/vnd.trid.tpt","tpt"],["application/vnd.triscape.mxs","mxs"],["application/vnd.trueapp","tra"],["application/vnd.ufdl","ufd"],["application/vnd.uiq.theme","utz"],["application/vnd.umajin","umj"],["application/vnd.unity","unityweb"],["application/vnd.uoml+xml","uoml"],["application/vnd.vcx","vcx"],["application/vnd.visio","vsd"],["application/vnd.visionary","vis"],["application/vnd.vsf","vsf"],["application/vnd.wap.wbxml","wbxml"],["application/vnd.wap.wmlc","wmlc"],["application/vnd.wap.wmlscriptc","wmlsc"],["application/vnd.webturbo","wtb"],["application/vnd.wolfram.player","nbp"],["application/vnd.wordperfect","wpd"],["application/vnd.wqd","wqd"],["application/vnd.wt.stf","stf"],["application/vnd.xara",["web","xar"]],["application/vnd.xfdl","xfdl"],["application/vnd.yamaha.hv-dic","hvd"],["application/vnd.yamaha.hv-script","hvs"],["application/vnd.yamaha.hv-voice","hvp"],["application/vnd.yamaha.openscoreformat","osf"],["application/vnd.yamaha.openscoreformat.osfpvg+xml","osfpvg"],["application/vnd.yamaha.smaf-audio","saf"],["application/vnd.yamaha.smaf-phrase","spf"],["application/vnd.yellowriver-custom-menu","cmp"],["application/vnd.zul","zir"],["application/vnd.zzazz.deck+xml","zaz"],["application/vocaltec-media-desc","vmd"],["application/vocaltec-media-file","vmf"],["application/voicexml+xml","vxml"],["application/widget","wgt"],["application/winhlp","hlp"],["application/wordperfect",["wp","wp5","wp6","wpd"]],["application/wordperfect6.0",["w60","wp5"]],["application/wordperfect6.1","w61"],["application/wsdl+xml","wsdl"],["application/wspolicy+xml","wspolicy"],["application/x-123","wk1"],["application/x-7z-compressed","7z"],["application/x-abiword","abw"],["application/x-ace-compressed","ace"],["application/x-aim","aim"],["application/x-authorware-bin","aab"],["application/x-authorware-map","aam"],["application/x-authorware-seg","aas"],["application/x-bcpio","bcpio"],["application/x-binary","bin"],["application/x-binhex40","hqx"],["application/x-bittorrent","torrent"],["application/x-bsh",["bsh","sh","shar"]],["application/x-bytecode.elisp","elc"],["application/x-bytecode.python","pyc"],["application/x-bzip","bz"],["application/x-bzip2",["boz","bz2"]],["application/x-cdf","cdf"],["application/x-cdlink","vcd"],["application/x-chat",["cha","chat"]],["application/x-chess-pgn","pgn"],["application/x-cmu-raster","ras"],["application/x-cocoa","cco"],["application/x-compactpro","cpt"],["application/x-compress","z"],["application/x-compressed",["tgz","gz","z","zip"]],["application/x-conference","nsc"],["application/x-cpio","cpio"],["application/x-cpt","cpt"],["application/x-csh","csh"],["application/x-debian-package","deb"],["application/x-deepv","deepv"],["application/x-director",["dir","dcr","dxr"]],["application/x-doom","wad"],["application/x-dtbncx+xml","ncx"],["application/x-dtbook+xml","dtb"],["application/x-dtbresource+xml","res"],["application/x-dvi","dvi"],["application/x-elc","elc"],["application/x-envoy",["env","evy"]],["application/x-esrehber","es"],["application/x-excel",["xls","xla","xlb","xlc","xld","xlk","xll","xlm","xlt","xlv","xlw"]],["application/x-font-bdf","bdf"],["application/x-font-ghostscript","gsf"],["application/x-font-linux-psf","psf"],["application/x-font-otf","otf"],["application/x-font-pcf","pcf"],["application/x-font-snf","snf"],["application/x-font-ttf","ttf"],["application/x-font-type1","pfa"],["application/x-font-woff","woff"],["application/x-frame","mif"],["application/x-freelance","pre"],["application/x-futuresplash","spl"],["application/x-gnumeric","gnumeric"],["application/x-gsp","gsp"],["application/x-gss","gss"],["application/x-gtar","gtar"],["application/x-gzip",["gz","gzip"]],["application/x-hdf","hdf"],["application/x-helpfile",["help","hlp"]],["application/x-httpd-imap","imap"],["application/x-ima","ima"],["application/x-internet-signup",["ins","isp"]],["application/x-internett-signup","ins"],["application/x-inventor","iv"],["application/x-ip2","ip"],["application/x-iphone","iii"],["application/x-java-class","class"],["application/x-java-commerce","jcm"],["application/x-java-jnlp-file","jnlp"],["application/x-javascript","js"],["application/x-koan",["skd","skm","skp","skt"]],["application/x-ksh","ksh"],["application/x-latex",["latex","ltx"]],["application/x-lha","lha"],["application/x-lisp","lsp"],["application/x-livescreen","ivy"],["application/x-lotus","wq1"],["application/x-lotusscreencam","scm"],["application/x-lzh","lzh"],["application/x-lzx","lzx"],["application/x-mac-binhex40","hqx"],["application/x-macbinary","bin"],["application/x-magic-cap-package-1.0","mc$"],["application/x-mathcad","mcd"],["application/x-meme","mm"],["application/x-midi",["mid","midi"]],["application/x-mif","mif"],["application/x-mix-transfer","nix"],["application/x-mobipocket-ebook","prc"],["application/x-mplayer2","asx"],["application/x-ms-application","application"],["application/x-ms-wmd","wmd"],["application/x-ms-wmz","wmz"],["application/x-ms-xbap","xbap"],["application/x-msaccess","mdb"],["application/x-msbinder","obd"],["application/x-mscardfile","crd"],["application/x-msclip","clp"],["application/x-msdownload",["exe","dll"]],["application/x-msexcel",["xls","xla","xlw"]],["application/x-msmediaview",["mvb","m13","m14"]],["application/x-msmetafile","wmf"],["application/x-msmoney","mny"],["application/x-mspowerpoint","ppt"],["application/x-mspublisher","pub"],["application/x-msschedule","scd"],["application/x-msterminal","trm"],["application/x-mswrite","wri"],["application/x-navi-animation","ani"],["application/x-navidoc","nvd"],["application/x-navimap","map"],["application/x-navistyle","stl"],["application/x-netcdf",["cdf","nc"]],["application/x-newton-compatible-pkg","pkg"],["application/x-nokia-9000-communicator-add-on-software","aos"],["application/x-omc","omc"],["application/x-omcdatamaker","omcd"],["application/x-omcregerator","omcr"],["application/x-pagemaker",["pm4","pm5"]],["application/x-pcl","pcl"],["application/x-perfmon",["pma","pmc","pml","pmr","pmw"]],["application/x-pixclscript","plx"],["application/x-pkcs10","p10"],["application/x-pkcs12",["p12","pfx"]],["application/x-pkcs7-certificates",["p7b","spc"]],["application/x-pkcs7-certreqresp","p7r"],["application/x-pkcs7-mime",["p7m","p7c"]],["application/x-pkcs7-signature",["p7s","p7a"]],["application/x-pointplus","css"],["application/x-portable-anymap","pnm"],["application/x-project",["mpc","mpt","mpv","mpx"]],["application/x-qpro","wb1"],["application/x-rar-compressed","rar"],["application/x-rtf","rtf"],["application/x-sdp","sdp"],["application/x-sea","sea"],["application/x-seelogo","sl"],["application/x-sh","sh"],["application/x-shar",["shar","sh"]],["application/x-shockwave-flash","swf"],["application/x-silverlight-app","xap"],["application/x-sit","sit"],["application/x-sprite",["spr","sprite"]],["application/x-stuffit","sit"],["application/x-stuffitx","sitx"],["application/x-sv4cpio","sv4cpio"],["application/x-sv4crc","sv4crc"],["application/x-tar","tar"],["application/x-tbook",["sbk","tbk"]],["application/x-tcl","tcl"],["application/x-tex","tex"],["application/x-tex-tfm","tfm"],["application/x-texinfo",["texi","texinfo"]],["application/x-troff",["roff","t","tr"]],["application/x-troff-man","man"],["application/x-troff-me","me"],["application/x-troff-ms","ms"],["application/x-troff-msvideo","avi"],["application/x-ustar","ustar"],["application/x-visio",["vsd","vst","vsw"]],["application/x-vnd.audioexplosion.mzz","mzz"],["application/x-vnd.ls-xpix","xpix"],["application/x-vrml","vrml"],["application/x-wais-source",["src","wsrc"]],["application/x-winhelp","hlp"],["application/x-wintalk","wtk"],["application/x-world",["wrl","svr"]],["application/x-wpwin","wpd"],["application/x-wri","wri"],["application/x-x509-ca-cert",["cer","crt","der"]],["application/x-x509-user-cert","crt"],["application/x-xfig","fig"],["application/x-xpinstall","xpi"],["application/x-zip-compressed","zip"],["application/xcap-diff+xml","xdf"],["application/xenc+xml","xenc"],["application/xhtml+xml","xhtml"],["application/xml","xml"],["application/xml-dtd","dtd"],["application/xop+xml","xop"],["application/xslt+xml","xslt"],["application/xspf+xml","xspf"],["application/xv+xml","mxml"],["application/yang","yang"],["application/yin+xml","yin"],["application/ynd.ms-pkipko","pko"],["application/zip","zip"],["audio/adpcm","adp"],["audio/aiff",["aiff","aif","aifc"]],["audio/basic",["snd","au"]],["audio/it","it"],["audio/make",["funk","my","pfunk"]],["audio/make.my.funk","pfunk"],["audio/mid",["mid","rmi"]],["audio/midi",["midi","kar","mid"]],["audio/mod","mod"],["audio/mp4","mp4a"],["audio/mpeg",["mpga","mp3","m2a","mp2","mpa","mpg"]],["audio/mpeg3","mp3"],["audio/nspaudio",["la","lma"]],["audio/ogg","oga"],["audio/s3m","s3m"],["audio/tsp-audio","tsi"],["audio/tsplayer","tsp"],["audio/vnd.dece.audio","uva"],["audio/vnd.digital-winds","eol"],["audio/vnd.dra","dra"],["audio/vnd.dts","dts"],["audio/vnd.dts.hd","dtshd"],["audio/vnd.lucent.voice","lvp"],["audio/vnd.ms-playready.media.pya","pya"],["audio/vnd.nuera.ecelp4800","ecelp4800"],["audio/vnd.nuera.ecelp7470","ecelp7470"],["audio/vnd.nuera.ecelp9600","ecelp9600"],["audio/vnd.qcelp","qcp"],["audio/vnd.rip","rip"],["audio/voc","voc"],["audio/voxware","vox"],["audio/wav","wav"],["audio/webm","weba"],["audio/x-aac","aac"],["audio/x-adpcm","snd"],["audio/x-aiff",["aiff","aif","aifc"]],["audio/x-au","au"],["audio/x-gsm",["gsd","gsm"]],["audio/x-jam","jam"],["audio/x-liveaudio","lam"],["audio/x-mid",["mid","midi"]],["audio/x-midi",["midi","mid"]],["audio/x-mod","mod"],["audio/x-mpeg","mp2"],["audio/x-mpeg-3","mp3"],["audio/x-mpegurl","m3u"],["audio/x-mpequrl","m3u"],["audio/x-ms-wax","wax"],["audio/x-ms-wma","wma"],["audio/x-nspaudio",["la","lma"]],["audio/x-pn-realaudio",["ra","ram","rm","rmm","rmp"]],["audio/x-pn-realaudio-plugin",["ra","rmp","rpm"]],["audio/x-psid","sid"],["audio/x-realaudio","ra"],["audio/x-twinvq","vqf"],["audio/x-twinvq-plugin",["vqe","vql"]],["audio/x-vnd.audioexplosion.mjuicemediafile","mjf"],["audio/x-voc","voc"],["audio/x-wav","wav"],["audio/xm","xm"],["chemical/x-cdx","cdx"],["chemical/x-cif","cif"],["chemical/x-cmdf","cmdf"],["chemical/x-cml","cml"],["chemical/x-csml","csml"],["chemical/x-pdb",["pdb","xyz"]],["chemical/x-xyz","xyz"],["drawing/x-dwf","dwf"],["i-world/i-vrml","ivr"],["image/bmp",["bmp","bm"]],["image/cgm","cgm"],["image/cis-cod","cod"],["image/cmu-raster",["ras","rast"]],["image/fif","fif"],["image/florian",["flo","turbot"]],["image/g3fax","g3"],["image/gif","gif"],["image/ief",["ief","iefs"]],["image/jpeg",["jpeg","jpe","jpg","jfif","jfif-tbnl"]],["image/jutvision","jut"],["image/ktx","ktx"],["image/naplps",["nap","naplps"]],["image/pict",["pic","pict"]],["image/pipeg","jfif"],["image/pjpeg",["jfif","jpe","jpeg","jpg"]],["image/png",["png","x-png"]],["image/prs.btif","btif"],["image/svg+xml","svg"],["image/tiff",["tif","tiff"]],["image/vasa","mcf"],["image/vnd.adobe.photoshop","psd"],["image/vnd.dece.graphic","uvi"],["image/vnd.djvu","djvu"],["image/vnd.dvb.subtitle","sub"],["image/vnd.dwg",["dwg","dxf","svf"]],["image/vnd.dxf","dxf"],["image/vnd.fastbidsheet","fbs"],["image/vnd.fpx","fpx"],["image/vnd.fst","fst"],["image/vnd.fujixerox.edmics-mmr","mmr"],["image/vnd.fujixerox.edmics-rlc","rlc"],["image/vnd.ms-modi","mdi"],["image/vnd.net-fpx",["fpx","npx"]],["image/vnd.rn-realflash","rf"],["image/vnd.rn-realpix","rp"],["image/vnd.wap.wbmp","wbmp"],["image/vnd.xiff","xif"],["image/webp","webp"],["image/x-cmu-raster","ras"],["image/x-cmx","cmx"],["image/x-dwg",["dwg","dxf","svf"]],["image/x-freehand","fh"],["image/x-icon","ico"],["image/x-jg","art"],["image/x-jps","jps"],["image/x-niff",["niff","nif"]],["image/x-pcx","pcx"],["image/x-pict",["pct","pic"]],["image/x-portable-anymap","pnm"],["image/x-portable-bitmap","pbm"],["image/x-portable-graymap","pgm"],["image/x-portable-greymap","pgm"],["image/x-portable-pixmap","ppm"],["image/x-quicktime",["qif","qti","qtif"]],["image/x-rgb","rgb"],["image/x-tiff",["tif","tiff"]],["image/x-windows-bmp","bmp"],["image/x-xbitmap","xbm"],["image/x-xbm","xbm"],["image/x-xpixmap",["xpm","pm"]],["image/x-xwd","xwd"],["image/x-xwindowdump","xwd"],["image/xbm","xbm"],["image/xpm","xpm"],["message/rfc822",["eml","mht","mhtml","nws","mime"]],["model/iges",["iges","igs"]],["model/mesh","msh"],["model/vnd.collada+xml","dae"],["model/vnd.dwf","dwf"],["model/vnd.gdl","gdl"],["model/vnd.gtw","gtw"],["model/vnd.mts","mts"],["model/vnd.vtu","vtu"],["model/vrml",["vrml","wrl","wrz"]],["model/x-pov","pov"],["multipart/x-gzip","gzip"],["multipart/x-ustar","ustar"],["multipart/x-zip","zip"],["music/crescendo",["mid","midi"]],["music/x-karaoke","kar"],["paleovu/x-pv","pvu"],["text/asp","asp"],["text/calendar","ics"],["text/css","css"],["text/csv","csv"],["text/ecmascript","js"],["text/h323","323"],["text/html",["html","htm","stm","acgi","htmls","htx","shtml"]],["text/iuls","uls"],["text/javascript","js"],["text/mcf","mcf"],["text/n3","n3"],["text/pascal","pas"],["text/plain",["txt","bas","c","h","c++","cc","com","conf","cxx","def","f","f90","for","g","hh","idc","jav","java","list","log","lst","m","mar","pl","sdml","text"]],["text/plain-bas","par"],["text/prs.lines.tag","dsc"],["text/richtext",["rtx","rt","rtf"]],["text/scriplet","wsc"],["text/scriptlet","sct"],["text/sgml",["sgm","sgml"]],["text/tab-separated-values","tsv"],["text/troff","t"],["text/turtle","ttl"],["text/uri-list",["uni","unis","uri","uris"]],["text/vnd.abc","abc"],["text/vnd.curl","curl"],["text/vnd.curl.dcurl","dcurl"],["text/vnd.curl.mcurl","mcurl"],["text/vnd.curl.scurl","scurl"],["text/vnd.fly","fly"],["text/vnd.fmi.flexstor","flx"],["text/vnd.graphviz","gv"],["text/vnd.in3d.3dml","3dml"],["text/vnd.in3d.spot","spot"],["text/vnd.rn-realtext","rt"],["text/vnd.sun.j2me.app-descriptor","jad"],["text/vnd.wap.wml","wml"],["text/vnd.wap.wmlscript","wmls"],["text/webviewhtml","htt"],["text/x-asm",["asm","s"]],["text/x-audiosoft-intra","aip"],["text/x-c",["c","cc","cpp"]],["text/x-component","htc"],["text/x-fortran",["for","f","f77","f90"]],["text/x-h",["h","hh"]],["text/x-java-source",["java","jav"]],["text/x-java-source,java","java"],["text/x-la-asf","lsx"],["text/x-m","m"],["text/x-pascal","p"],["text/x-script","hlb"],["text/x-script.csh","csh"],["text/x-script.elisp","el"],["text/x-script.guile","scm"],["text/x-script.ksh","ksh"],["text/x-script.lisp","lsp"],["text/x-script.perl","pl"],["text/x-script.perl-module","pm"],["text/x-script.phyton","py"],["text/x-script.rexx","rexx"],["text/x-script.scheme","scm"],["text/x-script.sh","sh"],["text/x-script.tcl","tcl"],["text/x-script.tcsh","tcsh"],["text/x-script.zsh","zsh"],["text/x-server-parsed-html",["shtml","ssi"]],["text/x-setext","etx"],["text/x-sgml",["sgm","sgml"]],["text/x-speech",["spc","talk"]],["text/x-uil","uil"],["text/x-uuencode",["uu","uue"]],["text/x-vcalendar","vcs"],["text/x-vcard","vcf"],["text/xml","xml"],["video/3gpp","3gp"],["video/3gpp2","3g2"],["video/animaflex","afl"],["video/avi","avi"],["video/avs-video","avs"],["video/dl","dl"],["video/fli","fli"],["video/gl","gl"],["video/h261","h261"],["video/h263","h263"],["video/h264","h264"],["video/jpeg","jpgv"],["video/jpm","jpm"],["video/mj2","mj2"],["video/mp4","mp4"],["video/mpeg",["mpeg","mp2","mpa","mpe","mpg","mpv2","m1v","m2v","mp3"]],["video/msvideo","avi"],["video/ogg","ogv"],["video/quicktime",["mov","qt","moov"]],["video/vdo","vdo"],["video/vivo",["viv","vivo"]],["video/vnd.dece.hd","uvh"],["video/vnd.dece.mobile","uvm"],["video/vnd.dece.pd","uvp"],["video/vnd.dece.sd","uvs"],["video/vnd.dece.video","uvv"],["video/vnd.fvt","fvt"],["video/vnd.mpegurl","mxu"],["video/vnd.ms-playready.media.pyv","pyv"],["video/vnd.rn-realvideo","rv"],["video/vnd.uvvu.mp4","uvu"],["video/vnd.vivo",["viv","vivo"]],["video/vosaic","vos"],["video/webm","webm"],["video/x-amt-demorun","xdr"],["video/x-amt-showrun","xsr"],["video/x-atomic3d-feature","fmf"],["video/x-dl","dl"],["video/x-dv",["dif","dv"]],["video/x-f4v","f4v"],["video/x-fli","fli"],["video/x-flv","flv"],["video/x-gl","gl"],["video/x-isvideo","isu"],["video/x-la-asf",["lsf","lsx"]],["video/x-m4v","m4v"],["video/x-motion-jpeg","mjpg"],["video/x-mpeg",["mp3","mp2"]],["video/x-mpeq2a","mp2"],["video/x-ms-asf",["asf","asr","asx"]],["video/x-ms-asf-plugin","asx"],["video/x-ms-wm","wm"],["video/x-ms-wmv","wmv"],["video/x-ms-wmx","wmx"],["video/x-ms-wvx","wvx"],["video/x-msvideo","avi"],["video/x-qtc","qtc"],["video/x-scm","scm"],["video/x-sgi-movie",["movie","mv"]],["windows/metafile","wmf"],["www/mime","mime"],["x-conference/x-cooltalk","ice"],["x-music/x-midi",["mid","midi"]],["x-world/x-3dmf",["3dm","3dmf","qd3","qd3d"]],["x-world/x-svr","svr"],["x-world/x-vrml",["flr","vrml","wrl","wrz","xaf","xof"]],["x-world/x-vrt","vrt"],["xgl/drawing","xgz"],["xgl/movie","xmz"]]),i=new Map([["123","application/vnd.lotus-1-2-3"],["323","text/h323"],["*","application/octet-stream"],["3dm","x-world/x-3dmf"],["3dmf","x-world/x-3dmf"],["3dml","text/vnd.in3d.3dml"],["3g2","video/3gpp2"],["3gp","video/3gpp"],["7z","application/x-7z-compressed"],["a","application/octet-stream"],["aab","application/x-authorware-bin"],["aac","audio/x-aac"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abc","text/vnd.abc"],["abw","application/x-abiword"],["ac","application/pkix-attr-cert"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acgi","text/html"],["acu","application/vnd.acucobol"],["acx","application/internet-property-stream"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afl","video/animaflex"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/postscript"],["aif",["audio/aiff","audio/x-aiff"]],["aifc",["audio/aiff","audio/x-aiff"]],["aiff",["audio/aiff","audio/x-aiff"]],["aim","application/x-aim"],["aip","text/x-audiosoft-intra"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["ani","application/x-navi-animation"],["aos","application/x-nokia-9000-communicator-add-on-software"],["apk","application/vnd.android.package-archive"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["aps","application/mime"],["arc","application/octet-stream"],["arj",["application/arj","application/octet-stream"]],["art","image/x-jg"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asp","text/asp"],["asr","video/x-ms-asf"],["asx",["video/x-ms-asf","application/x-mplayer2","video/x-ms-asf-plugin"]],["atc","application/vnd.acucorp"],["atomcat","application/atomcat+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au",["audio/basic","audio/x-au"]],["avi",["video/avi","video/msvideo","application/x-troff-msvideo","video/x-msvideo"]],["avs","video/avs-video"],["aw","application/applixware"],["axs","application/olescript"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azw","application/vnd.amazon.ebook"],["bas","text/plain"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin",["application/octet-stream","application/mac-binary","application/macbinary","application/x-macbinary","application/x-binary"]],["bm","image/bmp"],["bmi","application/vnd.bmi"],["bmp",["image/bmp","image/x-windows-bmp"]],["boo","application/book"],["book","application/book"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bsh","application/x-bsh"],["btif","image/prs.btif"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c",["text/plain","text/x-c"]],["c++","text/plain"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["c4g","application/vnd.clonk.c4group"],["cab","application/vnd.ms-cab-compressed"],["car","application/vnd.curl.car"],["cat",["application/vnd.ms-pkiseccat","application/vnd.ms-pki.seccat"]],["cc",["text/plain","text/x-c"]],["ccad","application/clariscad"],["cco","application/x-cocoa"],["ccxml","application/ccxml+xml,"],["cdbcmsg","application/vnd.contact.cmsg"],["cdf",["application/cdf","application/x-cdf","application/x-netcdf"]],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer",["application/pkix-cert","application/x-x509-ca-cert"]],["cgm","image/cgm"],["cha","application/x-chat"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cla","application/vnd.claymore"],["class",["application/octet-stream","application/java","application/java-byte-code","application/java-vm","application/x-java-class"]],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod",["image/cis-cod","application/vnd.rim.cod"]],["com",["application/octet-stream","text/plain"]],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt",["application/mac-compactpro","application/x-compactpro","application/x-cpt"]],["crd","application/x-mscardfile"],["crl",["application/pkix-crl","application/pkcs-crl"]],["crt",["application/pkix-cert","application/x-x509-user-cert","application/x-x509-ca-cert"]],["cryptonote","application/vnd.rig.cryptonote"],["csh",["text/x-script.csh","application/x-csh"]],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["css",["text/css","application/x-pointplus"]],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxx","text/plain"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["davmount","application/davmount+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["deb","application/x-debian-package"],["deepv","application/x-deepv"],["def","text/plain"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dif","video/x-dv"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["djvu","image/vnd.djvu"],["dl",["video/dl","video/x-dl"]],["dll","application/x-msdownload"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.document.macroenabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroenabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp",["application/commonground","application/vnd.osgi.dp"]],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drw","application/drafting"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dv","video/x-dv"],["dvi","application/x-dvi"],["dwf",["model/vnd.dwf","drawing/x-dwf"]],["dwg",["application/acad","image/vnd.dwg","image/x-dwg"]],["dxf",["application/dxf","image/vnd.dwg","image/vnd.dxf","image/x-dwg"]],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["el","text/x-script.elisp"],["elc",["application/x-elc","application/x-bytecode.elisp"]],["eml","message/rfc822"],["emma","application/emma+xml"],["env","application/x-envoy"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es",["application/ecmascript","application/x-esrehber"]],["es3","application/vnd.eszigno3+xml"],["esf","application/vnd.epson.esf"],["etx","text/x-setext"],["evy",["application/envoy","application/x-envoy"]],["exe",["application/octet-stream","application/x-msdownload"]],["exi","application/exi"],["ext","application/vnd.novadigm.ext"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f",["text/plain","text/x-fortran"]],["f4v","video/x-f4v"],["f77","text/x-fortran"],["f90",["text/plain","text/x-fortran"]],["fbs","image/vnd.fastbidsheet"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fh","image/x-freehand"],["fif",["application/fractals","image/fif"]],["fig","application/x-xfig"],["fli",["video/fli","video/x-fli"]],["flo",["image/florian","application/vnd.micrografx.flo"]],["flr","x-world/x-vrml"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fmf","video/x-atomic3d-feature"],["fnc","application/vnd.frogans.fnc"],["for",["text/plain","text/x-fortran"]],["fpx",["image/vnd.fpx","image/vnd.net-fpx"]],["frl","application/freeloader"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["funk","audio/make"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g","text/plain"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gdl","model/vnd.gdl"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["gl",["video/gl","video/x-gl"]],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gph","application/vnd.flographit"],["gqf","application/vnd.grafeq"],["gram","application/srgs"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsd","audio/x-gsm"],["gsf","application/x-font-ghostscript"],["gsm","audio/x-gsm"],["gsp","application/x-gsp"],["gss","application/x-gss"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxt","application/vnd.geonext"],["gz",["application/x-gzip","application/x-compressed"]],["gzip",["multipart/x-gzip","application/x-gzip"]],["h",["text/plain","text/x-h"]],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hdf","application/x-hdf"],["help","application/x-helpfile"],["hgl","application/vnd.hp-hpgl"],["hh",["text/plain","text/x-h"]],["hlb","text/x-script"],["hlp",["application/winhlp","application/hlp","application/x-helpfile","application/x-winhelp"]],["hpg","application/vnd.hp-hpgl"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx",["application/mac-binhex40","application/binhex","application/binhex4","application/mac-binhex","application/x-binhex40","application/x-mac-binhex40"]],["hta","application/hta"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["htmls","text/html"],["htt","text/webviewhtml"],["htx","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["ico","image/x-icon"],["ics","text/calendar"],["idc","text/plain"],["ief","image/ief"],["iefs","image/ief"],["ifm","application/vnd.shana.informed.formdata"],["iges",["application/iges","model/iges"]],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs",["application/iges","model/iges"]],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["iii","application/x-iphone"],["ima","application/x-ima"],["imap","application/x-httpd-imap"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["inf","application/inf"],["ins",["application/x-internet-signup","application/x-internett-signup"]],["ip","application/x-ip2"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["isp","application/x-internet-signup"],["isu","video/x-isvideo"],["it","audio/it"],["itp","application/vnd.shana.informed.formtemplate"],["iv","application/x-inventor"],["ivp","application/vnd.immervision-ivp"],["ivr","i-world/i-vrml"],["ivu","application/vnd.immervision-ivu"],["ivy","application/x-livescreen"],["jad","text/vnd.sun.j2me.app-descriptor"],["jam",["application/vnd.jam","audio/x-jam"]],["jar","application/java-archive"],["jav",["text/plain","text/x-java-source"]],["java",["text/plain","text/x-java-source,java","text/x-java-source"]],["jcm","application/x-java-commerce"],["jfif",["image/pipeg","image/jpeg","image/pjpeg"]],["jfif-tbnl","image/jpeg"],["jisp","application/vnd.jisp"],["jlt","application/vnd.hp-jlyt"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jpe",["image/jpeg","image/pjpeg"]],["jpeg",["image/jpeg","image/pjpeg"]],["jpg",["image/jpeg","image/pjpeg"]],["jpgv","video/jpeg"],["jpm","video/jpm"],["jps","image/x-jps"],["js",["application/javascript","application/ecmascript","text/javascript","text/ecmascript","application/x-javascript"]],["json","application/json"],["jut","image/jutvision"],["kar",["audio/midi","music/x-karaoke"]],["karbon","application/vnd.kde.karbon"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["ksh",["application/x-ksh","text/x-script.ksh"]],["ksp","application/vnd.kde.kspread"],["ktx","image/ktx"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["la",["audio/nspaudio","audio/x-nspaudio"]],["lam","audio/x-liveaudio"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["lha",["application/octet-stream","application/lha","application/x-lha"]],["lhx","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["lma",["audio/nspaudio","audio/x-nspaudio"]],["log","text/plain"],["lrm","application/vnd.ms-lrm"],["lsf","video/x-la-asf"],["lsp",["application/x-lisp","text/x-script.lisp"]],["lst","text/plain"],["lsx",["video/x-la-asf","text/x-la-asf"]],["ltf","application/vnd.frogans.ltf"],["ltx","application/x-latex"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh",["application/octet-stream","application/x-lzh"]],["lzx",["application/lzx","application/octet-stream","application/x-lzx"]],["m",["text/plain","text/x-m"]],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m1v","video/mpeg"],["m21","application/mp21"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3u",["audio/x-mpegurl","audio/x-mpequrl"]],["m3u8","application/vnd.apple.mpegurl"],["m4v","video/x-m4v"],["ma","application/mathematica"],["mads","application/mads+xml"],["mag","application/vnd.ecowin.chart"],["man","application/x-troff-man"],["map","application/x-navimap"],["mar","text/plain"],["mathml","application/mathml+xml"],["mbd","application/mbedlet"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc$","application/x-magic-cap-package-1.0"],["mc1","application/vnd.medcalcdata"],["mcd",["application/mcad","application/vnd.mcd","application/x-mathcad"]],["mcf",["image/vasa","text/mcf"]],["mcp","application/netmc"],["mcurl","text/vnd.curl.mcurl"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["me","application/x-troff-me"],["meta4","application/metalink4+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mht","message/rfc822"],["mhtml","message/rfc822"],["mid",["audio/mid","audio/midi","music/crescendo","x-music/x-midi","audio/x-midi","application/x-midi","audio/x-mid"]],["midi",["audio/midi","music/crescendo","x-music/x-midi","audio/x-midi","application/x-midi","audio/x-mid"]],["mif",["application/vnd.mif","application/x-mif","application/x-frame"]],["mime",["message/rfc822","www/mime"]],["mj2","video/mj2"],["mjf","audio/x-vnd.audioexplosion.mjuicemediafile"],["mjpg","video/x-motion-jpeg"],["mlp","application/vnd.dolby.mlp"],["mm",["application/base64","application/x-meme"]],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mme","application/base64"],["mmf","application/vnd.smaf"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mny","application/x-msmoney"],["mod",["audio/mod","audio/x-mod"]],["mods","application/mods+xml"],["moov","video/quicktime"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2",["video/mpeg","audio/mpeg","video/x-mpeg","audio/x-mpeg","video/x-mpeq2a"]],["mp3",["audio/mpeg","audio/mpeg3","video/mpeg","audio/x-mpeg-3","video/x-mpeg"]],["mp4",["video/mp4","application/mp4"]],["mp4a","audio/mp4"],["mpa",["video/mpeg","audio/mpeg"]],["mpc",["application/vnd.mophun.certificate","application/x-project"]],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg",["video/mpeg","audio/mpeg"]],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/x-project"],["mpv","application/x-project"],["mpv2","video/mpeg"],["mpx","application/x-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","application/x-troff-ms"],["mscml","application/mediaservercontrol+xml"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msl","application/vnd.mobius.msl"],["msty","application/vnd.muvee.style"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musicxml","application/vnd.recordare.musicxml+xml"],["mv","video/x-sgi-movie"],["mvb","application/x-msmediaview"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["my","audio/make"],["mzz","application/x-vnd.audioexplosion.mzz"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nap","image/naplps"],["naplps","image/naplps"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncm","application/vnd.nokia.configuration-message"],["ncx","application/x-dtbncx+xml"],["ngdat","application/vnd.nokia.n-gage.data"],["nif","image/x-niff"],["niff","image/x-niff"],["nix","application/x-mix-transfer"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nvd","application/x-navidoc"],["nws","message/rfc822"],["o","application/octet-stream"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omc","application/x-omc"],["omcd","application/x-omcdatamaker"],["omcr","application/x-omcregerator"],["onetoc","application/onenote"],["opf","application/oebps-package+xml"],["org","application/vnd.lotus-organizer"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","application/x-font-otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p10",["application/pkcs10","application/x-pkcs10"]],["p12",["application/pkcs-12","application/x-pkcs12"]],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c",["application/pkcs7-mime","application/x-pkcs7-mime"]],["p7m",["application/pkcs7-mime","application/x-pkcs7-mime"]],["p7r","application/x-pkcs7-certreqresp"],["p7s",["application/pkcs7-signature","application/x-pkcs7-signature"]],["p8","application/pkcs8"],["par","text/plain-bas"],["part","application/pro_eng"],["pas","text/pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcf","application/x-font-pcf"],["pcl",["application/vnd.hp-pcl","application/x-pcl"]],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb",["application/vnd.palm","chemical/x-pdb"]],["pdf","application/pdf"],["pfa","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfunk",["audio/make","audio/make.my.funk"]],["pfx","application/x-pkcs12"],["pgm",["image/x-portable-graymap","image/x-portable-greymap"]],["pgn","application/x-chess-pgn"],["pgp","application/pgp-signature"],["pic",["image/pict","image/x-pict"]],["pict","image/pict"],["pkg","application/x-newton-compatible-pkg"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pko",["application/ynd.ms-pkipko","application/vnd.ms-pki.pko"]],["pl",["text/plain","text/x-script.perl"]],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["plx","application/x-pixclscript"],["pm",["text/x-script.perl-module","image/x-xpixmap"]],["pm4","application/x-pagemaker"],["pm5","application/x-pagemaker"],["pma","application/x-perfmon"],["pmc","application/x-perfmon"],["pml",["application/vnd.ctc-posml","application/x-perfmon"]],["pmr","application/x-perfmon"],["pmw","application/x-perfmon"],["png","image/png"],["pnm",["application/x-portable-anymap","image/x-portable-anymap"]],["portpkg","application/vnd.macports.portpkg"],["pot",["application/vnd.ms-powerpoint","application/mspowerpoint"]],["potm","application/vnd.ms-powerpoint.template.macroenabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["pov","model/x-pov"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroenabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps",["application/vnd.ms-powerpoint","application/mspowerpoint"]],["ppsm","application/vnd.ms-powerpoint.slideshow.macroenabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt",["application/vnd.ms-powerpoint","application/mspowerpoint","application/powerpoint","application/x-mspowerpoint"]],["pptm","application/vnd.ms-powerpoint.presentation.macroenabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["ppz","application/mspowerpoint"],["prc","application/x-mobipocket-ebook"],["pre",["application/vnd.lotus-freelance","application/x-freelance"]],["prf","application/pics-rules"],["prt","application/pro_eng"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd",["application/octet-stream","image/vnd.adobe.photoshop"]],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pvu","paleovu/x-pv"],["pwn","application/vnd.3m.post-it-notes"],["pwz","application/vnd.ms-powerpoint"],["py","text/x-script.phyton"],["pya","audio/vnd.ms-playready.media.pya"],["pyc","application/x-bytecode.python"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qcp","audio/vnd.qcelp"],["qd3","x-world/x-3dmf"],["qd3d","x-world/x-3dmf"],["qfx","application/vnd.intu.qfx"],["qif","image/x-quicktime"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qtc","video/x-qtc"],["qti","image/x-quicktime"],["qtif","image/x-quicktime"],["qxd","application/vnd.quark.quarkxpress"],["ra",["audio/x-realaudio","audio/x-pn-realaudio","audio/x-pn-realaudio-plugin"]],["ram","audio/x-pn-realaudio"],["rar","application/x-rar-compressed"],["ras",["image/cmu-raster","application/x-cmu-raster","image/x-cmu-raster"]],["rast","image/cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rexx","text/x-script.rexx"],["rf","image/vnd.rn-realflash"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm",["application/vnd.rn-realmedia","audio/x-pn-realaudio"]],["rmi","audio/mid"],["rmm","audio/x-pn-realaudio"],["rmp",["audio/x-pn-realaudio-plugin","audio/x-pn-realaudio"]],["rms","application/vnd.jcp.javame.midlet-rms"],["rnc","application/relax-ng-compact-syntax"],["rng",["application/ringing-tones","application/vnd.nokia.ringing-tone"]],["rnx","application/vnd.rn-realplayer"],["roff","application/x-troff"],["rp","image/vnd.rn-realpix"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsd","application/rsd+xml"],["rt",["text/richtext","text/vnd.rn-realtext"]],["rtf",["application/rtf","text/richtext","application/x-rtf"]],["rtx",["text/richtext","application/rtf"]],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["saveme","application/octet-stream"],["sbk","application/x-tbook"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm",["application/vnd.lotus-screencam","video/x-scm","text/x-script.guile","application/x-lotusscreencam","text/x-script.scheme"]],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["sct","text/scriptlet"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkm","application/vnd.solent.sdkm+xml"],["sdml","text/plain"],["sdp",["application/sdp","application/x-sdp"]],["sdr","application/sounder"],["sdw","application/vnd.stardivision.writer"],["sea",["application/sea","application/x-sea"]],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["ser","application/java-serialized-object"],["set","application/set"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sgl","application/vnd.stardivision.writer-global"],["sgm",["text/sgml","text/x-sgml"]],["sgml",["text/sgml","text/x-sgml"]],["sh",["application/x-shar","application/x-bsh","application/x-sh","text/x-script.sh"]],["shar",["application/x-bsh","application/x-shar"]],["shf","application/shf+xml"],["shtml",["text/html","text/x-server-parsed-html"]],["sid","audio/x-psid"],["sis","application/vnd.symbian.install"],["sit",["application/x-stuffit","application/x-sit"]],["sitx","application/x-stuffitx"],["skd","application/x-koan"],["skm","application/x-koan"],["skp",["application/vnd.koan","application/x-koan"]],["skt","application/x-koan"],["sl","application/x-seelogo"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi",["application/smil","application/smil+xml"]],["smil","application/smil"],["snd",["audio/basic","audio/x-adpcm"]],["snf","application/x-font-snf"],["sol","application/solids"],["spc",["text/x-speech","application/x-pkcs7-certificates"]],["spf","application/vnd.yamaha.smaf-phrase"],["spl",["application/futuresplash","application/x-futuresplash"]],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spr","application/x-sprite"],["sprite","application/x-sprite"],["src","application/x-wais-source"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssi","text/x-server-parsed-html"],["ssm","application/streamingmedia"],["ssml","application/ssml+xml"],["sst",["application/vnd.ms-pkicertstore","application/vnd.ms-pki.certstore"]],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["step","application/step"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl",["application/vnd.ms-pkistl","application/sla","application/vnd.ms-pki.stl","application/x-navistyle"]],["stm","text/html"],["stp","application/step"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["sub","image/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svf",["image/vnd.dwg","image/x-dwg"]],["svg","image/svg+xml"],["svr",["x-world/x-svr","application/x-world"]],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t",["text/troff","application/x-troff"]],["talk","text/x-speech"],["tao","application/vnd.tao.intent-module-archive"],["tar","application/x-tar"],["tbk",["application/toolbook","application/x-tbook"]],["tcap","application/vnd.3gpp2.tcap"],["tcl",["text/x-script.tcl","application/x-tcl"]],["tcsh","text/x-script.tcsh"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text",["application/plain","text/plain"]],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tgz",["application/gnutar","application/x-compressed"]],["thmx","application/vnd.ms-officetheme"],["tif",["image/tiff","image/x-tiff"]],["tiff",["image/tiff","image/x-tiff"]],["tmo","application/vnd.tmobile-livetv"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","application/x-troff"],["tra","application/vnd.trueapp"],["trm","application/x-msterminal"],["tsd","application/timestamped-data"],["tsi","audio/tsp-audio"],["tsp",["application/dsptype","audio/tsplayer"]],["tsv","text/tab-separated-values"],["ttf","application/x-font-ttf"],["ttl","text/turtle"],["turbot","image/florian"],["twd","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["ufd","application/vnd.ufdl"],["uil","text/x-uil"],["uls","text/iuls"],["umj","application/vnd.umajin"],["uni","text/uri-list"],["unis","text/uri-list"],["unityweb","application/vnd.unity"],["unv","application/i-deas"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["ustar",["application/x-ustar","multipart/x-ustar"]],["utz","application/vnd.uiq.theme"],["uu",["application/octet-stream","text/x-uuencode"]],["uue","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vda","application/vda"],["vdo","video/vdo"],["vew","application/groupwise"],["vis","application/vnd.visionary"],["viv",["video/vivo","video/vnd.vivo"]],["vivo",["video/vivo","video/vnd.vivo"]],["vmd","application/vocaltec-media-desc"],["vmf","application/vocaltec-media-file"],["voc",["audio/voc","audio/x-voc"]],["vos","video/vosaic"],["vox","audio/voxware"],["vqe","audio/x-twinvq-plugin"],["vqf","audio/x-twinvq"],["vql","audio/x-twinvq-plugin"],["vrml",["model/vrml","x-world/x-vrml","application/x-vrml"]],["vrt","x-world/x-vrt"],["vsd",["application/vnd.visio","application/x-visio"]],["vsf","application/vnd.vsf"],["vst","application/x-visio"],["vsw","application/x-visio"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w60","application/wordperfect6.0"],["w61","application/wordperfect6.1"],["w6w","application/msword"],["wad","application/x-doom"],["wav",["audio/wav","audio/x-wav"]],["wax","audio/x-ms-wax"],["wb1","application/x-qpro"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/vnd.wap.wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["web","application/vnd.xara"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wiz","application/msword"],["wk1","application/x-123"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf",["windows/metafile","application/x-msmetafile"]],["wml","text/vnd.wap.wml"],["wmlc","application/vnd.wap.wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-ms-wmz"],["woff","application/x-font-woff"],["word","application/msword"],["wp","application/wordperfect"],["wp5",["application/wordperfect","application/wordperfect6.0"]],["wp6","application/wordperfect"],["wpd",["application/wordperfect","application/vnd.wordperfect","application/x-wpwin"]],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wq1","application/x-lotus"],["wqd","application/vnd.wqd"],["wri",["application/mswrite","application/x-wri","application/x-mswrite"]],["wrl",["model/vrml","x-world/x-vrml","application/x-world"]],["wrz",["model/vrml","x-world/x-vrml"]],["wsc","text/scriplet"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wsrc","application/x-wais-source"],["wtb","application/vnd.webturbo"],["wtk","application/x-wintalk"],["wvx","video/x-ms-wvx"],["x-png","image/png"],["x3d","application/vnd.hzn-3d-crossword"],["xaf","x-world/x-vrml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm",["image/xbm","image/x-xbm","image/x-xbitmap"]],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdr","video/x-amt-demorun"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xgz","xgl/drawing"],["xhtml","application/xhtml+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xlam","application/vnd.ms-excel.addin.macroenabled.12"],["xlb",["application/excel","application/vnd.ms-excel","application/x-excel"]],["xlc",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xld",["application/excel","application/x-excel"]],["xlk",["application/excel","application/x-excel"]],["xll",["application/excel","application/vnd.ms-excel","application/x-excel"]],["xlm",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xls",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xlsb","application/vnd.ms-excel.sheet.binary.macroenabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroenabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xltm","application/vnd.ms-excel.template.macroenabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlv",["application/excel","application/x-excel"]],["xlw",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xm","audio/xm"],["xml",["application/xml","text/xml","application/atom+xml","application/rss+xml"]],["xmz","xgl/movie"],["xo","application/vnd.olpc-sugar"],["xof","x-world/x-vrml"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpix","application/x-vnd.ls-xpix"],["xpm",["image/xpm","image/x-xpixmap"]],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xsr","video/x-amt-showrun"],["xul","application/vnd.mozilla.xul+xml"],["xwd",["image/x-xwd","image/x-xwindowdump"]],["xyz",["chemical/x-xyz","chemical/x-pdb"]],["yang","application/yang"],["yin","application/yin+xml"],["z",["application/x-compressed","application/x-compress"]],["zaz","application/vnd.zzazz.deck+xml"],["zip",["application/zip","multipart/x-zip","application/x-zip-compressed","application/x-compressed"]],["zir","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zoo","application/octet-stream"],["zsh","text/x-script.zsh"]]);return sA={detectMimeType(n){if(!n)return t;let r=e.parse(n),o=(r.ext.substr(1)||r.name||"").split("?").shift().trim().toLowerCase(),s=t;return i.has(o)&&(s=i.get(o)),Array.isArray(s)?s[0]:s},detectExtension(e){if(!e)return"bin";let t=(e||"").toLowerCase().trim().split("/"),i=t.shift().trim(),r=t.join("/").trim();if(n.has(i+"/"+r)){let e=n.get(i+"/"+r);return Array.isArray(e)?e[0]:e}return"text"===i?"txt":"bin"}}}function NA(){if(lA)return cA;lA=1;const e=2147483647,t=36,n=/^xn--/,i=/[^\0-\x7F]/,r=/[\x2E\u3002\uFF0E\uFF61]/g,o={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},s=Math.floor,a=String.fromCharCode;function c(e){throw new RangeError(o[e])}function l(e,t){const n=e.split("@");let i="";n.length>1&&(i=n[0]+"@",e=n[1]);const o=function(e,t){const n=[];let i=e.length;for(;i--;)n[i]=t(e[i]);return n}((e=e.replace(r,".")).split("."),t).join(".");return i+o}function u(e){const t=[];let n=0;const i=e.length;for(;n<i;){const r=e.charCodeAt(n++);if(r>=55296&&r<=56319&&n<i){const i=e.charCodeAt(n++);56320==(64512&i)?t.push(((1023&r)<<10)+(1023&i)+65536):(t.push(r),n--)}else t.push(r)}return t}const p=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},d=function(e,n,i){let r=0;for(e=i?s(e/700):e>>1,e+=s(e/n);e>455;r+=t)e=s(e/35);return s(r+36*e/(e+38))},m=function(n){const i=[],r=n.length;let o=0,a=128,l=72,u=n.lastIndexOf("-");u<0&&(u=0);for(let e=0;e<u;++e)n.charCodeAt(e)>=128&&c("not-basic"),i.push(n.charCodeAt(e));for(let m=u>0?u+1:0;m<r;){const u=o;for(let i=1,a=t;;a+=t){m>=r&&c("invalid-input");const u=(p=n.charCodeAt(m++))>=48&&p<58?p-48+26:p>=65&&p<91?p-65:p>=97&&p<123?p-97:t;u>=t&&c("invalid-input"),u>s((e-o)/i)&&c("overflow"),o+=u*i;const d=a<=l?1:a>=l+26?26:a-l;if(u<d)break;const h=t-d;i>s(e/h)&&c("overflow"),i*=h}const h=i.length+1;l=d(o-u,h,0==u),s(o/h)>e-a&&c("overflow"),a+=s(o/h),o%=h,i.splice(o++,0,a)}var p;return String.fromCodePoint(...i)},h=function(n){const i=[],r=(n=u(n)).length;let o=128,l=0,m=72;for(const e of n)e<128&&i.push(a(e));const h=i.length;let f=h;for(h&&i.push("-");f<r;){let r=e;for(const e of n)e>=o&&e<r&&(r=e);const u=f+1;r-o>s((e-l)/u)&&c("overflow"),l+=(r-o)*u,o=r;for(const r of n)if(r<o&&++l>e&&c("overflow"),r===o){let e=l;for(let n=t;;n+=t){const r=n<=m?1:n>=m+26?26:n-m;if(e<r)break;const o=e-r,c=t-r;i.push(a(p(r+o%c,0))),e=s(o/c)}i.push(a(p(e,0))),m=d(l,u,f===h),l=0,++f}++l,++o}return i.join("")};return cA={version:"2.3.1",ucs2:{decode:u,encode:e=>String.fromCodePoint(...e)},decode:m,encode:h,toASCII:function(e){return l(e,(function(e){return i.test(e)?"xn--"+h(e):e}))},toUnicode:function(e){return l(e,(function(e){return n.test(e)?m(e.slice(4).toLowerCase()):e}))}}}function DA(){if(pA)return uA;pA=1;const e=c.Transform;function t(e){return"string"==typeof e&&(e=Buffer.from(e,"utf-8")),e.toString("base64")}function n(e,t){if(t=t||76,(e=(e||"").toString()).length<=t)return e;let n=[],i=0,r=1024*t;for(;i<e.length;){let o=e.substr(i,r).replace(new RegExp(".{"+t+"}","g"),"$&\r\n").trim();n.push(o),i+=r}return n.join("\r\n").trim()}return uA={encode:t,wrap:n,Encoder:class extends e{constructor(e){super(),this.options=e||{},!1!==this.options.lineLength&&(this.options.lineLength=this.options.lineLength||76),this._curLine="",this._remainingBytes=!1,this.inputBytes=0,this.outputBytes=0}_transform(e,i,r){if("buffer"!==i&&(e=Buffer.from(e,i)),!e||!e.length)return setImmediate(r);this.inputBytes+=e.length,this._remainingBytes&&this._remainingBytes.length&&(e=Buffer.concat([this._remainingBytes,e],this._remainingBytes.length+e.length),this._remainingBytes=!1),e.length%3?(this._remainingBytes=e.slice(e.length-e.length%3),e=e.slice(0,e.length-e.length%3)):this._remainingBytes=!1;let o=this._curLine+t(e);if(this.options.lineLength){o=n(o,this.options.lineLength);let e=o.lastIndexOf("\n");e<0?(this._curLine=o,o=""):e===o.length-1?this._curLine="":(this._curLine=o.substr(e+1),o=o.substr(0,e+1))}o&&(this.outputBytes+=o.length,this.push(Buffer.from(o,"ascii"))),setImmediate(r)}_flush(e){this._remainingBytes&&this._remainingBytes.length&&(this._curLine+=t(this._remainingBytes)),this._curLine&&(this._curLine=n(this._curLine,this.options.lineLength),this.outputBytes+=this._curLine.length,this.push(this._curLine,"ascii"),this._curLine=""),e()}}}}function LA(){if(mA)return dA;mA=1;const e=c.Transform;function t(e){"string"==typeof e&&(e=Buffer.from(e,"utf-8"));let t,n=[[9],[10],[13],[32,60],[62,126]],r="";for(let o=0,s=e.length;o<s;o++)t=e[o],i(t,n)&&(32!==t&&9!==t||o!==s-1&&10!==e[o+1]&&13!==e[o+1])?r+=String.fromCharCode(t):r+="="+(t<16?"0":"")+t.toString(16).toUpperCase();return r}function n(e,t){if(t=t||76,(e=(e||"").toString()).length<=t)return e;let n,i,r,o=0,s=e.length,a=Math.floor(t/3),c="";for(;o<s;)if(r=e.substr(o,t),n=r.match(/\r\n/))r=r.substr(0,n.index+n[0].length),c+=r,o+=r.length;else if("\n"!==r.substr(-1))if(n=r.substr(-a).match(/\n.*?$/))r=r.substr(0,r.length-(n[0].length-1)),c+=r,o+=r.length;else{if(r.length>t-a&&(n=r.substr(-a).match(/[ \t.,!?][^ \t.,!?]*$/)))r=r.substr(0,r.length-(n[0].length-1));else if(r.match(/[=][\da-f]{0,2}$/i))for((n=r.match(/[=][\da-f]{0,1}$/i))&&(r=r.substr(0,r.length-n[0].length));r.length>3&&r.length<s-o&&!r.match(/^(?:=[\da-f]{2}){1,4}$/i)&&(n=r.match(/[=][\da-f]{2}$/gi))&&(i=parseInt(n[0].substr(1,2),16),!(i<128))&&(r=r.substr(0,r.length-3),!(i>=192)););o+r.length<s&&"\n"!==r.substr(-1)?(r.length===t&&r.match(/[=][\da-f]{2}$/i)?r=r.substr(0,r.length-3):r.length===t&&(r=r.substr(0,r.length-1)),o+=r.length,r+="=\r\n"):o+=r.length,c+=r}else c+=r,o+=r.length;return c}function i(e,t){for(let n=t.length-1;n>=0;n--)if(t[n].length){if(1===t[n].length&&e===t[n][0])return!0;if(2===t[n].length&&e>=t[n][0]&&e<=t[n][1])return!0}return!1}return dA={encode:t,wrap:n,Encoder:class extends e{constructor(e){super(),this.options=e||{},!1!==this.options.lineLength&&(this.options.lineLength=this.options.lineLength||76),this._curLine="",this.inputBytes=0,this.outputBytes=0}_transform(e,i,r){let o;if("buffer"!==i&&(e=Buffer.from(e,i)),!e||!e.length)return r();this.inputBytes+=e.length,this.options.lineLength?(o=this._curLine+t(e),o=n(o,this.options.lineLength),o=o.replace(/(^|\n)([^\n]*)$/,((e,t,n)=>(this._curLine=n,t))),o&&(this.outputBytes+=o.length,this.push(o))):(o=t(e),this.outputBytes+=o.length,this.push(o,"ascii")),r()}_flush(e){this._curLine&&(this.outputBytes+=this._curLine.length,this.push(this._curLine,"ascii")),e()}}}}function zA(){if(fA)return hA;fA=1;const e=DA(),t=LA(),n=$A();return hA={isPlainText:(e,t)=>"string"==typeof e&&!(t?/[\x00-\x08\x0b\x0c\x0e-\x1f"\u0080-\uFFFF]/:/[\x00-\x08\x0b\x0c\x0e-\x1f\u0080-\uFFFF]/).test(e),hasLongerLines:(e,t)=>e.length>131072||new RegExp("^.{"+(t+1)+",}","m").test(e),encodeWord(n,i,r){let o;if((r=r||0)&&r>12&&(r-=12),"Q"===(i=(i||"Q").toString().toUpperCase().trim().charAt(0))?o=t.encode(n).replace(/[^a-z0-9!*+\-/=]/gi,(e=>{let t=e.charCodeAt(0).toString(16).toUpperCase();return" "===e?"_":"="+(1===t.length?"0"+t:t)})):"B"===i&&(o="string"==typeof n?n:e.encode(n),r=r?Math.max(3,(r-r%4)/4*3):0),r&&("B"!==i?o:e.encode(n)).length>r)if("Q"===i)o=this.splitMimeEncodedString(o,r).join("?= =?UTF-8?"+i+"?");else{let t=[],n="";for(let i=0,s=o.length;i<s;i++){let a=o.charAt(i);/[\ud83c\ud83d\ud83e]/.test(a)&&i<s-1&&(a+=o.charAt(++i)),Buffer.byteLength(n+a)<=r||0===i?n+=a:(t.push(e.encode(n)),n=a)}n&&t.push(e.encode(n)),o=t.length>1?t.join("?= =?UTF-8?"+i+"?"):t.join("")}else"B"===i&&(o=e.encode(n));return"=?UTF-8?"+i+"?"+o+("?="===o.substr(-2)?"":"?=")},encodeWords(e,t,n,i){let r;n=n||0;let o=e.match(/(?:^|\s)([^\s]*["\u0080-\uFFFF])/);if(!o)return e;if(i)return this.encodeWord(e,t,n);let s=e.match(/(["\u0080-\uFFFF][^\s]*)[^"\u0080-\uFFFF]*$/);if(!s)return e;let a=o.index+(o[0].match(/[^\s]/)||{index:0}).index,c=s.index+(s[1]||"").length;return r=(a?e.substr(0,a):"")+this.encodeWord(e.substring(a,c),t||"Q",n)+(c<e.length?e.substr(c):""),r},buildHeaderValue(e){let t=[];return Object.keys(e.params||{}).forEach((n=>{let i=e.params[n];!this.isPlainText(i,!0)||i.length>=75?this.buildHeaderParam(n,i,50).forEach((e=>{/[\s"\\;:/=(),<>@[\]?]|^[-']|'$/.test(e.value)&&"*"!==e.key.substr(-1)?t.push(e.key+"="+JSON.stringify(e.value)):t.push(e.key+"="+e.value)})):/[\s'"\\;:/=(),<>@[\]?]|^-/.test(i)?t.push(n+"="+JSON.stringify(i)):t.push(n+"="+i)})),e.value+(t.length?"; "+t.join("; "):"")},buildHeaderParam(e,t,n){let i,r,o,s,a,c,l=[],u="string"==typeof t?t:(t||"").toString(),p=0;if(n=n||50,this.isPlainText(t,!0)){if(u.length<=n)return[{key:e,value:u}];u=u.replace(new RegExp(".{"+n+"}","g"),(e=>(l.push({line:e}),""))),u&&l.push({line:u})}else{if(/[\uD800-\uDBFF]/.test(u)){for(i=[],a=0,c=u.length;a<c;a++)r=u.charAt(a),o=r.charCodeAt(0),o>=55296&&o<=56319&&a<c-1?(r+=u.charAt(a+1),i.push(r),a++):i.push(r);u=i}s="utf-8''";let e=!0;for(p=0,a=0,c=u.length;a<c;a++){if(r=u[a],e)r=this.safeEncodeURIComponent(r);else if(r=" "===r?r:this.safeEncodeURIComponent(r),r!==u[a]){if(!((this.safeEncodeURIComponent(s)+r).length>=n)){e=!0,a=p,s="";continue}l.push({line:s,encoded:e}),s="",p=a-1}(s+r).length>=n?(l.push({line:s,encoded:e}),s=r=" "===u[a]?" ":this.safeEncodeURIComponent(u[a]),r===u[a]?(e=!1,p=a-1):e=!0):s+=r}s&&l.push({line:s,encoded:e})}return l.map(((t,n)=>({key:e+"*"+n+(t.encoded?"*":""),value:t.line})))},parseHeaderValue(e){let t,n={value:!1,params:{}},i=!1,r="",o="value",s=!1,a=!1;for(let c=0,l=e.length;c<l;c++)if(t=e.charAt(c),"key"===o){if("="===t){i=r.trim().toLowerCase(),o="value",r="";continue}r+=t}else{if(a)r+=t;else{if("\\"===t){a=!0;continue}s&&t===s?s=!1:s||'"'!==t?s||";"!==t?r+=t:(!1===i?n.value=r.trim():n.params[i]=r.trim(),o="key",r=""):s=t}a=!1}return"value"===o?!1===i?n.value=r.trim():n.params[i]=r.trim():r.trim()&&(n.params[r.trim().toLowerCase()]=""),Object.keys(n.params).forEach((e=>{let t,i,r,o;(r=e.match(/(\*(\d+)|\*(\d+)\*|\*)$/))&&(t=e.substr(0,r.index),i=Number(r[2]||r[3])||0,n.params[t]&&"object"==typeof n.params[t]||(n.params[t]={charset:!1,values:[]}),o=n.params[e],0===i&&"*"===r[0].substr(-1)&&(r=o.match(/^([^']*)'[^']*'(.*)$/))&&(n.params[t].charset=r[1]||"iso-8859-1",o=r[2]),n.params[t].values[i]=o,delete n.params[e])})),Object.keys(n.params).forEach((e=>{let t;n.params[e]&&Array.isArray(n.params[e].values)&&(t=n.params[e].values.map((e=>e||"")).join(""),n.params[e].charset?n.params[e]="=?"+n.params[e].charset+"?Q?"+t.replace(/[=?_\s]/g,(e=>{let t=e.charCodeAt(0).toString(16);return" "===e?"_":"%"+(t.length<2?"0":"")+t})).replace(/%/g,"=")+"?=":n.params[e]=t)})),n},detectExtension:e=>n.detectExtension(e),detectMimeType:e=>n.detectMimeType(e),foldLines(e,t,n){t=t||76;let i,r,o=0,s=(e=(e||"").toString()).length,a="";for(;o<s;){if(i=e.substr(o,t),i.length<t){a+=i;break}(r=i.match(/^[^\n\r]*(\r?\n|\r)/))?(i=r[0],a+=i,o+=i.length):((r=i.match(/(\s+)[^\s]*$/))&&r[0].length-(n?(r[1]||"").length:0)<i.length?i=i.substr(0,i.length-(r[0].length-(n?(r[1]||"").length:0))):(r=e.substr(o+i.length).match(/^[^\s]+(\s*)/))&&(i+=r[0].substr(0,r[0].length-(n?0:(r[1]||"").length))),a+=i,o+=i.length,o<s&&(a+="\r\n"))}return a},splitMimeEncodedString:(e,t)=>{let n,i,r,o,s=[];for(t=Math.max(t||0,12);e.length;){for(n=e.substr(0,t),(i=n.match(/[=][0-9A-F]?$/i))&&(n=n.substr(0,i.index)),o=!1;!o;)o=!0,(i=e.substr(n.length).match(/^[=]([0-9A-F]{2})/i))&&(r=parseInt(i[1],16),r<194&&r>127&&(n=n.substr(0,n.length-3),o=!1));n.length&&s.push(n),e=e.substr(n.length)}return s},encodeURICharComponent:e=>{let t="",n=e.charCodeAt(0).toString(16).toUpperCase();if(n.length%2&&(n="0"+n),n.length>2)for(let e=0,i=n.length/2;e<i;e++)t+="%"+n.substr(e,2);else t+="%"+n;return t},safeEncodeURIComponent(e){e=(e||"").toString();try{e=encodeURIComponent(e)}catch(t){return e.replace(/[^\x00-\x1F *'()<>@,;:\\"[\]?=\u007F-\uFFFF]+/g,"")}return e.replace(/[\x00-\x1F *'()<>@,;:\\"[\]?=\u007F-\uFFFF]/g,(e=>this.encodeURICharComponent(e)))}},hA}function FA(){if(yA)return gA;yA=1;class e{constructor(e){this.str=(e||"").toString(),this.operatorCurrent="",this.operatorExpecting="",this.node=null,this.escaped=!1,this.list=[],this.operators={'"':'"',"(":")","<":">",",":"",":":";",";":""}}tokenize(){let e=[];for(let e=0,t=this.str.length;e<t;e++){let n=this.str.charAt(e),i=e<t-1?this.str.charAt(e+1):null;this.checkChar(n,i)}return this.list.forEach((t=>{t.value=(t.value||"").toString().trim(),t.value&&e.push(t)})),e}checkChar(e,t){if(this.escaped);else{if(e===this.operatorExpecting)return this.node={type:"operator",value:e},t&&![" ","\t","\r","\n",",",";"].includes(t)&&(this.node.noBreak=!0),this.list.push(this.node),this.node=null,this.operatorExpecting="",void(this.escaped=!1);if(!this.operatorExpecting&&e in this.operators)return this.node={type:"operator",value:e},this.list.push(this.node),this.node=null,this.operatorExpecting=this.operators[e],void(this.escaped=!1);if(['"',"'"].includes(this.operatorExpecting)&&"\\"===e)return void(this.escaped=!0)}this.node||(this.node={type:"text",value:""},this.list.push(this.node)),"\n"===e&&(e=" "),(e.charCodeAt(0)>=33||[" ","\t"].includes(e))&&(this.node.value+=e),this.escaped=!1}}function t(n,i){i=i||{};let r=new e(n).tokenize(),o=[],s=[],a=[];if(r.forEach((e=>{"operator"!==e.type||","!==e.value&&";"!==e.value?s.push(e):(s.length&&o.push(s),s=[])})),s.length&&o.push(s),o.forEach((e=>{e=function(e){let n,i,r,o=!1,s="text",a=[],c={address:[],comment:[],group:[],text:[]};for(i=0,r=e.length;i<r;i++){let t=e[i],n=i?e[i-1]:null;if("operator"===t.type)switch(t.value){case"<":s="address";break;case"(":s="comment";break;case":":s="group",o=!0;break;default:s="text"}else t.value&&("address"===s&&(t.value=t.value.replace(/^[^<]*<\s*/,"")),n&&n.noBreak&&c[s].length?c[s][c[s].length-1]+=t.value:c[s].push(t.value))}if(!c.text.length&&c.comment.length&&(c.text=c.comment,c.comment=[]),o)c.text=c.text.join(" "),a.push({name:c.text||n&&n.name,group:c.group.length?t(c.group.join(",")):[]});else{if(!c.address.length&&c.text.length){for(i=c.text.length-1;i>=0;i--)if(c.text[i].match(/^[^@\s]+@[^@\s]+$/)){c.address=c.text.splice(i,1);break}let e=function(e){return c.address.length?e:(c.address=[e.trim()]," ")};if(!c.address.length)for(i=c.text.length-1;i>=0&&(c.text[i]=c.text[i].replace(/\s*\b[^@\s]+@[^\s]+\b\s*/,e).trim(),!c.address.length);i--);}if(!c.text.length&&c.comment.length&&(c.text=c.comment,c.comment=[]),c.address.length>1&&(c.text=c.text.concat(c.address.splice(1))),c.text=c.text.join(" "),c.address=c.address.join(" "),!c.address&&o)return[];n={address:c.address||c.text||"",name:c.text||c.address||""},n.address===n.name&&((n.address||"").match(/@/)?n.name="":n.address=""),a.push(n)}return a}(e),e.length&&(a=a.concat(e))})),i.flatten){let e=[],t=n=>{n.forEach((n=>{if(n.group)return t(n.group);e.push(n)}))};return t(a),e}return a}return gA=t}function UA(){if(wA)return xA;wA=1;const e=c.Transform;return xA=class extends e{constructor(e){super(e),this.options=e||{},this.lastByte=!1}_transform(e,t,n){let i,r=0;for(let t=0,n=e.length;t<n;t++)10===e[t]&&(t&&13!==e[t-1]||!t&&13!==this.lastByte)&&(t>r&&(i=e.slice(r,t),this.push(i)),this.push(Buffer.from("\r\n")),r=t+1);r&&r<e.length?(i=e.slice(r),this.push(i)):r||this.push(e),this.lastByte=e[e.length-1],n()}},xA}function BA(){if(OA)return _A;OA=1;const e=m,t=r,n=NA(),i=c.PassThrough,o=jA(),s=zA(),a=LA(),l=DA(),u=FA(),p=MA(),d=function(){if(bA)return vA;bA=1;const e=c.Transform;return vA=class extends e{constructor(){super(),this.lastByte=!1}_transform(e,t,n){e.length&&(this.lastByte=e[e.length-1]),this.push(e),n()}_flush(e){return 10===this.lastByte?e():13===this.lastByte?(this.push(Buffer.from("\n")),e()):(this.push(Buffer.from("\r\n")),e())}}}(),h=UA(),f=function(){if(SA)return EA;SA=1;const e=c.Transform;return EA=class extends e{constructor(e){super(e),this.options=e||{}}_transform(e,t,n){let i,r=0;for(let t=0,n=e.length;t<n;t++)13===e[t]&&(i=e.slice(r,t),r=t+1,this.push(i));r&&r<e.length?(i=e.slice(r),this.push(i)):r||this.push(e),n()}},EA}();class g{constructor(t,n){this.nodeCounter=0,n=n||{},this.baseBoundary=n.baseBoundary||e.randomBytes(8).toString("hex"),this.boundaryPrefix=n.boundaryPrefix||"--_NmP",this.disableFileAccess=!!n.disableFileAccess,this.disableUrlAccess=!!n.disableUrlAccess,this.normalizeHeaderKey=n.normalizeHeaderKey,this.date=new Date,this.rootNode=n.rootNode||this,this.keepBcc=!!n.keepBcc,n.filename&&(this.filename=n.filename,t||(t=s.detectMimeType(this.filename.split(".").pop()))),this.textEncoding=(n.textEncoding||"").toString().trim().charAt(0).toUpperCase(),this.parentNode=n.parentNode,this.hostname=n.hostname,this.newline=n.newline,this.childNodes=[],this._nodeId=++this.rootNode.nodeCounter,this._headers=[],this._isPlainText=!1,this._hasLongLines=!1,this._envelope=!1,this._raw=!1,this._transforms=[],this._processFuncs=[],t&&this.setHeader("Content-Type",t)}createChild(e,t){t||"object"!=typeof e||(t=e,e=void 0);let n=new g(e,t);return this.appendChild(n),n}appendChild(e){return e.rootNode!==this.rootNode&&(e.rootNode=this.rootNode,e._nodeId=++this.rootNode.nodeCounter),e.parentNode=this,this.childNodes.push(e),e}replace(e){return e===this?this:(this.parentNode.childNodes.forEach(((t,n)=>{t===this&&(e.rootNode=this.rootNode,e.parentNode=this.parentNode,e._nodeId=this._nodeId,this.rootNode=this,this.parentNode=void 0,e.parentNode.childNodes[n]=e)})),e)}remove(){if(!this.parentNode)return this;for(let e=this.parentNode.childNodes.length-1;e>=0;e--)if(this.parentNode.childNodes[e]===this)return this.parentNode.childNodes.splice(e,1),this.parentNode=void 0,this.rootNode=this,this}setHeader(e,t){let n,i=!1;if(!t&&e&&"object"==typeof e)return e.key&&"value"in e?this.setHeader(e.key,e.value):Array.isArray(e)?e.forEach((e=>{this.setHeader(e.key,e.value)})):Object.keys(e).forEach((t=>{this.setHeader(t,e[t])})),this;n={key:e=this._normalizeHeaderKey(e),value:t};for(let t=0,r=this._headers.length;t<r;t++)this._headers[t].key===e&&(i?(this._headers.splice(t,1),t--,r--):(this._headers[t]=n,i=!0));return i||this._headers.push(n),this}addHeader(e,t){return!t&&e&&"object"==typeof e?(e.key&&e.value?this.addHeader(e.key,e.value):Array.isArray(e)?e.forEach((e=>{this.addHeader(e.key,e.value)})):Object.keys(e).forEach((t=>{this.addHeader(t,e[t])})),this):Array.isArray(t)?(t.forEach((t=>{this.addHeader(e,t)})),this):(this._headers.push({key:this._normalizeHeaderKey(e),value:t}),this)}getHeader(e){e=this._normalizeHeaderKey(e);for(let t=0,n=this._headers.length;t<n;t++)if(this._headers[t].key===e)return this._headers[t].value}setContent(e){return this.content=e,"function"==typeof this.content.pipe?(this._contentErrorHandler=e=>{this.content.removeListener("error",this._contentErrorHandler),this.content=e},this.content.once("error",this._contentErrorHandler)):"string"==typeof this.content&&(this._isPlainText=s.isPlainText(this.content),this._isPlainText&&s.hasLongerLines(this.content,76)&&(this._hasLongLines=!0)),this}build(e){let t;e||(t=new Promise(((t,n)=>{e=o.callbackPromise(t,n)})));let n=this.createReadStream(),i=[],r=0,s=!1;return n.on("readable",(()=>{let e;for(;null!==(e=n.read());)i.push(e),r+=e.length})),n.once("error",(t=>{if(!s)return s=!0,e(t)})),n.once("end",(t=>{if(!s)return s=!0,t&&t.length&&(i.push(t),r+=t.length),e(null,Buffer.concat(i,r))})),t}getTransferEncoding(){let e=!1,t=(this.getHeader("Content-Type")||"").toString().toLowerCase().trim();return this.content&&(e=(this.getHeader("Content-Transfer-Encoding")||"").toString().toLowerCase().trim(),e&&["base64","quoted-printable"].includes(e)||(/^text\//i.test(t)?e=this._isPlainText&&!this._hasLongLines?"7bit":"string"==typeof this.content||this.content instanceof Buffer?"Q"===this._getTextEncoding(this.content)?"quoted-printable":"base64":"B"===this.textEncoding?"base64":"quoted-printable":/^(multipart|message)\//i.test(t)||(e=e||"base64"))),e}buildHeaders(){let e=this.getTransferEncoding(),t=[];if(e&&this.setHeader("Content-Transfer-Encoding",e),this.filename&&!this.getHeader("Content-Disposition")&&this.setHeader("Content-Disposition","attachment"),this.rootNode===this){this.getHeader("Date")||this.setHeader("Date",this.date.toUTCString().replace(/GMT/,"+0000")),this.messageId(),this.getHeader("MIME-Version")||this.setHeader("MIME-Version","1.0");for(let e=this._headers.length-2;e>=0;e--){let t=this._headers[e];"Content-Type"===t.key&&(this._headers.splice(e,1),this._headers.push(t))}}return this._headers.forEach((e=>{let n,i,r=e.key,o=e.value,a={};if(!o||"object"!=typeof o||["From","Sender","To","Cc","Bcc","Reply-To","Date","References"].includes(r)||(Object.keys(o).forEach((e=>{"value"!==e&&(a[e]=o[e])})),o=(o.value||"").toString(),o.trim()))if(a.prepared)a.foldLines?t.push(s.foldLines(r+": "+o)):t.push(r+": "+o);else{switch(e.key){case"Content-Disposition":n=s.parseHeaderValue(o),this.filename&&(n.params.filename=this.filename),o=s.buildHeaderValue(n);break;case"Content-Type":n=s.parseHeaderValue(o),this._handleContentType(n),n.value.match(/^text\/plain\b/)&&"string"==typeof this.content&&/[\u0080-\uFFFF]/.test(this.content)&&(n.params.charset="utf-8"),o=s.buildHeaderValue(n),this.filename&&(i=this._encodeWords(this.filename),(i!==this.filename||/[\s'"\\;:/=(),<>@[\]?]|^-/.test(i))&&(i='"'+i+'"'),o+="; name="+i);break;case"Bcc":if(!this.keepBcc)return}if(o=this._encodeHeaderValue(r,o),(o||"").toString().trim()){if("function"==typeof this.normalizeHeaderKey){let e=this.normalizeHeaderKey(r,o);e&&"string"==typeof e&&e.length&&(r=e)}t.push(s.foldLines(r+": "+o,76))}}})),t.join("\r\n")}createReadStream(e){let t,n=new i(e=e||{}),r=n;this.stream(n,e,(e=>{e?r.emit("error",e):n.end()}));for(let e=0,n=this._transforms.length;e<n;e++)t="function"==typeof this._transforms[e]?this._transforms[e]():this._transforms[e],r.once("error",(e=>{t.emit("error",e)})),r=r.pipe(t);t=new d,r.once("error",(e=>{t.emit("error",e)})),r=r.pipe(t);for(let e=0,n=this._processFuncs.length;e<n;e++)t=this._processFuncs[e],r=t(r);if(this.newline){const e=["win","windows","dos","\r\n"].includes(this.newline.toString().toLowerCase())?new h:new f,t=r.pipe(e);return r.on("error",(e=>t.emit("error",e))),t}return r}transform(e){this._transforms.push(e)}processFunc(e){this._processFuncs.push(e)}stream(e,t,n){let i,r,o=this.getTransferEncoding(),s=!1,c=e=>{s||(s=!0,n(e))},u=()=>{let n=0,i=()=>{if(n>=this.childNodes.length)return e.write("\r\n--"+this.boundary+"--\r\n"),c();let r=this.childNodes[n++];e.write((n>1?"\r\n":"")+"--"+this.boundary+"\r\n"),r.stream(e,t,(e=>{if(e)return c(e);setImmediate(i)}))};if(!this.multipart)return c();setImmediate(i)},p=()=>{if(!this.content)return setImmediate(u);{if("[object Error]"===Object.prototype.toString.call(this.content))return c(this.content);"function"==typeof this.content.pipe&&(this.content.removeListener("error",this._contentErrorHandler),this._contentErrorHandler=e=>c(e),this.content.once("error",this._contentErrorHandler));let n=()=>{["quoted-printable","base64"].includes(o)?(i=new("base64"===o?l:a).Encoder(t),i.pipe(e,{end:!1}),i.once("end",u),i.once("error",(e=>c(e))),r=this._getStream(this.content),r.pipe(i)):(r=this._getStream(this.content),r.pipe(e,{end:!1}),r.once("end",u)),r.once("error",(e=>c(e)))};if(this.content._resolve){let e=[],t=0,i=!1,r=this._getStream(this.content);r.on("error",(e=>{i||(i=!0,c(e))})),r.on("readable",(()=>{let n;for(;null!==(n=r.read());)e.push(n),t+=n.length})),r.on("end",(()=>{i||(i=!0,this.content._resolve=!1,this.content._resolvedValue=Buffer.concat(e,t),setImmediate(n))}))}else setImmediate(n)}};this._raw?setImmediate((()=>{if("[object Error]"===Object.prototype.toString.call(this._raw))return c(this._raw);"function"==typeof this._raw.pipe&&this._raw.removeListener("error",this._contentErrorHandler);let t=this._getStream(this._raw);t.pipe(e,{end:!1}),t.on("error",(t=>e.emit("error",t))),t.on("end",u)})):(e.write(this.buildHeaders()+"\r\n\r\n"),setImmediate(p))}setEnvelope(e){let t;this._envelope={from:!1,to:[]},e.from&&(t=[],this._convertAddresses(this._parseAddresses(e.from),t),t=t.filter((e=>e&&e.address)),t.length&&t[0]&&(this._envelope.from=t[0].address)),["to","cc","bcc"].forEach((t=>{e[t]&&this._convertAddresses(this._parseAddresses(e[t]),this._envelope.to)})),this._envelope.to=this._envelope.to.map((e=>e.address)).filter((e=>e));let n=["to","cc","bcc","from"];return Object.keys(e).forEach((t=>{n.includes(t)||(this._envelope[t]=e[t])})),this}getAddresses(){let e={};return this._headers.forEach((t=>{let n=t.key.toLowerCase();["from","sender","reply-to","to","cc","bcc"].includes(n)&&(Array.isArray(e[n])||(e[n]=[]),this._convertAddresses(this._parseAddresses(t.value),e[n]))})),e}getEnvelope(){if(this._envelope)return this._envelope;let e={from:!1,to:[]};return this._headers.forEach((t=>{let n=[];"From"===t.key||!e.from&&["Reply-To","Sender"].includes(t.key)?(this._convertAddresses(this._parseAddresses(t.value),n),n.length&&n[0]&&(e.from=n[0].address)):["To","Cc","Bcc"].includes(t.key)&&this._convertAddresses(this._parseAddresses(t.value),e.to)})),e.to=e.to.map((e=>e.address)),e}messageId(){let e=this.getHeader("Message-ID");return e||(e=this._generateMessageId(),this.setHeader("Message-ID",e)),e}setRaw(e){return this._raw=e,this._raw&&"function"==typeof this._raw.pipe&&(this._contentErrorHandler=e=>{this._raw.removeListener("error",this._contentErrorHandler),this._raw=e},this._raw.once("error",this._contentErrorHandler)),this}_getStream(e){let n;return e._resolvedValue?(n=new i,setImmediate((()=>{try{n.end(e._resolvedValue)}catch(e){n.emit("error",e)}})),n):"function"==typeof e.pipe?e:e&&"string"==typeof e.path&&!e.href?this.disableFileAccess?(n=new i,setImmediate((()=>n.emit("error",new Error("File access rejected for "+e.path)))),n):t.createReadStream(e.path):e&&"string"==typeof e.href?this.disableUrlAccess?(n=new i,setImmediate((()=>n.emit("error",new Error("Url access rejected for "+e.href)))),n):p(e.href,{headers:e.httpHeaders}):(n=new i,setImmediate((()=>{try{n.end(e||"")}catch(e){n.emit("error",e)}})),n)}_parseAddresses(e){return[].concat.apply([],[].concat(e).map((e=>e&&e.address?(e.address=this._normalizeAddress(e.address),e.name=e.name||"",[e]):u(e))))}_normalizeHeaderKey(e){return e=(e||"").toString().replace(/\r?\n|\r/g," ").trim().toLowerCase().replace(/^X-SMTPAPI$|^(MIME|DKIM|ARC|BIMI)\b|^[a-z]|-(SPF|FBL|ID|MD5)$|-[a-z]/gi,(e=>e.toUpperCase())).replace(/^Content-Features$/i,"Content-features"),e}_handleContentType(e){this.contentType=e.value.trim().toLowerCase(),this.multipart=!!/^multipart\//i.test(this.contentType)&&this.contentType.substr(this.contentType.indexOf("/")+1),this.multipart?this.boundary=e.params.boundary=e.params.boundary||this.boundary||this._generateBoundary():this.boundary=!1}_generateBoundary(){return this.rootNode.boundaryPrefix+"-"+this.rootNode.baseBoundary+"-Part_"+this._nodeId}_encodeHeaderValue(e,t){switch(e=this._normalizeHeaderKey(e)){case"From":case"Sender":case"To":case"Cc":case"Bcc":case"Reply-To":return this._convertAddresses(this._parseAddresses(t));case"Message-ID":case"In-Reply-To":case"Content-Id":return"<"!==(t=(t||"").toString().replace(/\r?\n|\r/g," ")).charAt(0)&&(t="<"+t),">"!==t.charAt(t.length-1)&&(t+=">"),t;case"References":return(t=[].concat.apply([],[].concat(t||"").map((e=>(e=(e||"").toString().replace(/\r?\n|\r/g," ").trim()).replace(/<[^>]*>/g,(e=>e.replace(/\s/g,""))).split(/\s+/)))).map((e=>("<"!==e.charAt(0)&&(e="<"+e),">"!==e.charAt(e.length-1)&&(e+=">"),e)))).join(" ").trim();case"Date":return"[object Date]"===Object.prototype.toString.call(t)?t.toUTCString().replace(/GMT/,"+0000"):(t=(t||"").toString().replace(/\r?\n|\r/g," "),this._encodeWords(t));case"Content-Type":case"Content-Disposition":return(t||"").toString().replace(/\r?\n|\r/g," ");default:return t=(t||"").toString().replace(/\r?\n|\r/g," "),this._encodeWords(t)}}_convertAddresses(e,t){let n=[];return t=t||[],[].concat(e||[]).forEach((e=>{if(e.address)e.address=this._normalizeAddress(e.address),e.name?e.name&&n.push(`${this._encodeAddressName(e.name)} <${e.address}>`):n.push(e.address.indexOf(" ")>=0?`<${e.address}>`:`${e.address}`),e.address&&(t.filter((t=>t.address===e.address)).length||t.push(e));else if(e.group){let i=(e.group.length?this._convertAddresses(e.group,t):"").trim();n.push(`${this._encodeAddressName(e.name)}:${i};`)}})),n.join(", ")}_normalizeAddress(e){let t=(e=(e||"").toString().replace(/[\x00-\x1F<>]+/g," ").trim()).lastIndexOf("@");if(t<0)return e;let i,r=e.substr(0,t),o=e.substr(t+1);try{i=n.toASCII(o.toLowerCase())}catch(e){}return r.indexOf(" ")>=0&&('"'!==r.charAt(0)&&(r='"'+r),'"'!==r.substr(-1)&&(r+='"')),`${r}@${i}`}_encodeAddressName(e){return/^[\w ]*$/.test(e)?e:/^[\x20-\x7e]*$/.test(e)?'"'+e.replace(/([\\"])/g,"\\$1")+'"':s.encodeWord(e,this._getTextEncoding(e),52)}_encodeWords(e){return s.encodeWords(e,this._getTextEncoding(e),52,!0)}_getTextEncoding(e){e=(e||"").toString();let t,n,i=this.textEncoding;return i||(n=(e.match(/[\x00-\x08\x0B\x0C\x0E-\x1F\u0080-\uFFFF]/g)||[]).length,t=(e.match(/[a-z]/gi)||[]).length,i=n<t?"Q":"B"),i}_generateMessageId(){return"<"+[2,2,2,6].reduce(((t,n)=>t+"-"+e.randomBytes(n).toString("hex")),e.randomBytes(4).toString("hex"))+"@"+(this.getEnvelope().from||this.hostname||"localhost").split("@").pop()+">"}}return _A=g}var HA,qA,VA,GA,WA,KA,YA,QA,JA,XA,ZA,eI,tI,nI,iI,rI,oI,sI={exports:{}};function aI(){if(HA)return sI.exports;HA=1;const e=NA(),t=zA(),n=m;function i(e,t,n){let i=new Set,o=new Set,s=new Map;(n||"").toLowerCase().split(":").forEach((e=>{o.add(e.trim())})),(t||"").toLowerCase().split(":").filter((e=>!o.has(e.trim()))).forEach((e=>{i.add(e.trim())}));for(let t=e.length-1;t>=0;t--){let n=e[t];i.has(n.key)&&!s.has(n.key)&&s.set(n.key,r(n.line))}let a=[],c=[];return i.forEach((e=>{s.has(e)&&(c.push(e),a.push(e+":"+s.get(e)))})),{headers:a.join("\r\n")+"\r\n",fieldNames:c.join(":")}}function r(e){return e.substr(e.indexOf(":")+1).replace(/\r?\n/g,"").replace(/\s+/g," ").trim()}return sI.exports=(o,s,a,c)=>{let l,u,p=i(o,(c=c||{}).headerFieldNames||"From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive",c.skipFields),d=function(n,i,r,o,s){let a=["v=1","a=rsa-"+o,"c=relaxed/relaxed","d="+e.toASCII(n),"q=dns/txt","s="+i,"bh="+s,"h="+r].join("; ");return t.foldLines("DKIM-Signature: "+a,76)+";\r\n b="}(c.domainName,c.keySelector,p.fieldNames,s,a);p.headers+="dkim-signature:"+r(d),l=n.createSign(("rsa-"+s).toUpperCase()),l.update(p.headers);try{u=l.sign(c.privateKey,"base64")}catch(e){return!1}return d+u.replace(/(^.{73}|.{75}(?!\r?\n|\r))/g,"$&\r\n ").trim()},sI.exports.relaxedHeaders=i,sI.exports}function cI(){if(VA)return qA;VA=1;const e=function(){if(PA)return TA;PA=1;const e=c.Transform;return TA=class extends e{constructor(e){super(e),this.lastBytes=Buffer.alloc(4),this.headersParsed=!1,this.headerBytes=0,this.headerChunks=[],this.rawHeaders=!1,this.bodySize=0}updateLastBytes(e){let t=this.lastBytes.length,n=Math.min(e.length,t);for(let e=0,i=t-n;e<i;e++)this.lastBytes[e]=this.lastBytes[e+n];for(let i=1;i<=n;i++)this.lastBytes[t-i]=e[e.length-i]}checkHeaders(e){if(this.headersParsed)return!0;let t=this.lastBytes.length,n=0;this.curLinePos=0;for(let i=0,r=this.lastBytes.length+e.length;i<r;i++){let r;if(r=i<t?this.lastBytes[i]:e[i-t],10===r&&i){let r=i-1<t?this.lastBytes[i-1]:e[i-1-t],o=i>1&&(i-2<t?this.lastBytes[i-2]:e[i-2-t]);if(10===r){this.headersParsed=!0,n=i-t+1,this.headerBytes+=n;break}if(13===r&&10===o){this.headersParsed=!0,n=i-t+1,this.headerBytes+=n;break}}}if(this.headersParsed){if(this.headerChunks.push(e.slice(0,n)),this.rawHeaders=Buffer.concat(this.headerChunks,this.headerBytes),this.headerChunks=null,this.emit("headers",this.parseHeaders()),e.length-1>n){let t=e.slice(n);this.bodySize+=t.length,setImmediate((()=>this.push(t)))}return!1}return this.headerBytes+=e.length,this.headerChunks.push(e),this.updateLastBytes(e),!1}_transform(e,t,n){if(!e||!e.length)return n();let i;"string"==typeof e&&(e=Buffer.from(e,t));try{i=this.checkHeaders(e)}catch(e){return n(e)}i&&(this.bodySize+=e.length,this.push(e)),setImmediate(n)}_flush(e){if(this.headerChunks){let e=Buffer.concat(this.headerChunks,this.headerBytes);this.bodySize+=e.length,this.push(e),this.headerChunks=null}e()}parseHeaders(){let e=(this.rawHeaders||"").toString().split(/\r?\n/);for(let t=e.length-1;t>0;t--)/^\s/.test(e[t])&&(e[t-1]+="\n"+e[t],e.splice(t,1));return e.filter((e=>e.trim())).map((e=>({key:e.substr(0,e.indexOf(":")).trim().toLowerCase(),line:e})))}},TA}(),t=function(){if(IA)return AA;IA=1;const e=c.Transform,t=m;return AA=class extends e{constructor(e){super(),e=e||{},this.chunkBuffer=[],this.chunkBufferLen=0,this.bodyHash=t.createHash(e.hashAlgo||"sha1"),this.remainder="",this.byteLength=0,this.debug=e.debug,this._debugBody=!!e.debug&&[]}updateHash(e){let t,n="",i="file";for(let t=e.length-1;t>=0;t--){let r=e[t];if("file"!==i||10!==r&&13!==r)if("file"!==i||9!==r&&32!==r){if(("line"!==i||9!==r&&32!==r)&&("file"===i||"line"===i)&&(i="body",t===e.length-1))break}else i="line";if(0===t){if("file"===i&&(!this.remainder||/[\r\n]$/.test(this.remainder))||"line"===i&&(!this.remainder||/[ \t]$/.test(this.remainder)))return void(this.remainder+=e.toString("binary"));if("line"===i||"file"===i){n=e.toString("binary"),e=!1;break}}if("body"===i){n=e.slice(t+1).toString("binary"),e=e.slice(0,t+1);break}}let r=!!this.remainder;if(e&&!r)for(let t=0,n=e.length;t<n;t++){if(t&&10===e[t]&&13!==e[t-1]){r=!0;break}if(t&&13===e[t]&&32===e[t-1]){r=!0;break}if(t&&32===e[t]&&32===e[t-1]){r=!0;break}if(9===e[t]){r=!0;break}}r?(t=this.remainder+(e?e.toString("binary"):""),this.remainder=n,t=t.replace(/\r?\n/g,"\n").replace(/[ \t]*$/gm,"").replace(/[ \t]+/gm," ").replace(/\n/g,"\r\n"),e=Buffer.from(t,"binary")):n&&(this.remainder=n),this.debug&&this._debugBody.push(e),this.bodyHash.update(e)}_transform(e,t,n){if(!e||!e.length)return n();"string"==typeof e&&(e=Buffer.from(e,t)),this.updateHash(e),this.byteLength+=e.length,this.push(e),n()}_flush(e){/[\r\n]$/.test(this.remainder)&&this.byteLength>2&&this.bodyHash.update(Buffer.from("\r\n")),this.byteLength||this.push(Buffer.from("\r\n")),this.emit("hash",this.bodyHash.digest("base64"),!!this.debug&&Buffer.concat(this._debugBody)),e()}},AA}(),n=aI(),i=c.PassThrough,o=r,s=d,a=m;class l{constructor(e,t,n,i){this.options=e||{},this.keys=t,this.cacheTreshold=Number(this.options.cacheTreshold)||131072,this.hashAlgo=this.options.hashAlgo||"sha256",this.cacheDir=this.options.cacheDir||!1,this.chunks=[],this.chunklen=0,this.readPos=0,this.cachePath=!!this.cacheDir&&s.join(this.cacheDir,"message."+Date.now()+"-"+a.randomBytes(14).toString("hex")),this.cache=!1,this.headers=!1,this.bodyHash=!1,this.parser=!1,this.relaxedBody=!1,this.input=n,this.output=i,this.output.usingCache=!1,this.hasErrored=!1,this.input.on("error",(e=>{this.hasErrored=!0,this.cleanup(),i.emit("error",e)}))}cleanup(){this.cache&&this.cachePath&&o.unlink(this.cachePath,(()=>!1))}createReadCache(){this.cache=o.createReadStream(this.cachePath),this.cache.once("error",(e=>{this.cleanup(),this.output.emit("error",e)})),this.cache.once("close",(()=>{this.cleanup()})),this.cache.pipe(this.output)}sendNextChunk(){if(this.hasErrored)return;if(this.readPos>=this.chunks.length)return this.cache?this.createReadCache():this.output.end();let e=this.chunks[this.readPos++];if(!1===this.output.write(e))return this.output.once("drain",(()=>{this.sendNextChunk()}));setImmediate((()=>this.sendNextChunk()))}sendSignedOutput(){let e=0,t=()=>{if(e>=this.keys.length)return this.output.write(this.parser.rawHeaders),setImmediate((()=>this.sendNextChunk()));let i=this.keys[e++],r=n(this.headers,this.hashAlgo,this.bodyHash,{domainName:i.domainName,keySelector:i.keySelector,privateKey:i.privateKey,headerFieldNames:this.options.headerFieldNames,skipFields:this.options.skipFields});return r&&this.output.write(Buffer.from(r+"\r\n")),setImmediate(t)};if(this.bodyHash&&this.headers)return t();this.output.write(this.parser.rawHeaders),this.sendNextChunk()}createWriteCache(){this.output.usingCache=!0,this.cache=o.createWriteStream(this.cachePath),this.cache.once("error",(e=>{this.cleanup(),this.relaxedBody.unpipe(this.cache),this.relaxedBody.on("readable",(()=>{for(;null!==this.relaxedBody.read(););})),this.hasErrored=!0,this.output.emit("error",e)})),this.cache.once("close",(()=>{this.sendSignedOutput()})),this.relaxedBody.removeAllListeners("readable"),this.relaxedBody.pipe(this.cache)}signStream(){this.parser=new e,this.relaxedBody=new t({hashAlgo:this.hashAlgo}),this.parser.on("headers",(e=>{this.headers=e})),this.relaxedBody.on("hash",(e=>{this.bodyHash=e})),this.relaxedBody.on("readable",(()=>{let e;if(!this.cache)for(;null!==(e=this.relaxedBody.read());)if(this.chunks.push(e),this.chunklen+=e.length,this.chunklen>=this.cacheTreshold&&this.cachePath)return this.createWriteCache()})),this.relaxedBody.on("end",(()=>{this.cache||this.sendSignedOutput()})),this.parser.pipe(this.relaxedBody),setImmediate((()=>this.input.pipe(this.parser)))}}return qA=class{constructor(e){this.options=e||{},this.keys=[].concat(this.options.keys||{domainName:e.domainName,keySelector:e.keySelector,privateKey:e.privateKey})}sign(e,t){let n=new i,r=e,o=!1;Buffer.isBuffer(e)?(o=e,r=new i):"string"==typeof e&&(o=Buffer.from(e),r=new i);let s=this.options;t&&Object.keys(t).length&&(s={},Object.keys(this.options||{}).forEach((e=>{s[e]=this.options[e]})),Object.keys(t||{}).forEach((e=>{e in s||(s[e]=t[e])})));let a=new l(s,this.keys,r,n);return setImmediate((()=>{a.signStream(),o&&setImmediate((()=>{r.end(o)}))})),n}}}function lI(){if(JA)return QA;JA=1;const e=t,r=jA(),o=$A(),s=function(){if(kA)return CA;kA=1;const e=BA(),t=zA(),n=jA().parseDataURI;return CA=class{constructor(e){this.mail=e||{},this.message=!1}compile(){return this._alternatives=this.getAlternatives(),this._htmlNode=this._alternatives.filter((e=>/^text\/html\b/i.test(e.contentType))).pop(),this._attachments=this.getAttachments(!!this._htmlNode),this._useRelated=!(!this._htmlNode||!this._attachments.related.length),this._useAlternative=this._alternatives.length>1,this._useMixed=this._attachments.attached.length>1||this._alternatives.length&&1===this._attachments.attached.length,this.mail.raw?this.message=new e("message/rfc822",{newline:this.mail.newline}).setRaw(this.mail.raw):this._useMixed?this.message=this._createMixed():this._useAlternative?this.message=this._createAlternative():this._useRelated?this.message=this._createRelated():this.message=this._createContentNode(!1,[].concat(this._alternatives||[]).concat(this._attachments.attached||[]).shift()||{contentType:"text/plain",content:""}),this.mail.headers&&this.message.addHeader(this.mail.headers),["from","sender","to","cc","bcc","reply-to","in-reply-to","references","subject","message-id","date"].forEach((e=>{let t=e.replace(/-(\w)/g,((e,t)=>t.toUpperCase()));this.mail[t]&&this.message.setHeader(e,this.mail[t])})),this.mail.envelope&&this.message.setEnvelope(this.mail.envelope),this.message.messageId(),this.message}getAttachments(e){let n,i,r=[].concat(this.mail.attachments||[]).map(((e,n)=>{let i,r=/^message\//i.test(e.contentType);/^data:/i.test(e.path||e.href)&&(e=this._processDataUrl(e));let o=e.contentType||t.detectMimeType(e.filename||e.path||e.href||"bin"),s=/^image\//i.test(o);return i={contentType:o,contentDisposition:e.contentDisposition||(r||s&&e.cid?"inline":"attachment"),contentTransferEncoding:"contentTransferEncoding"in e?e.contentTransferEncoding:"base64"},e.filename?i.filename=e.filename:r||!1===e.filename||(i.filename=(e.path||e.href||"").split("/").pop().split("?").shift()||"attachment-"+(n+1),i.filename.indexOf(".")<0&&(i.filename+="."+t.detectExtension(i.contentType))),/^https?:\/\//i.test(e.path)&&(e.href=e.path,e.path=void 0),e.cid&&(i.cid=e.cid),e.raw?i.raw=e.raw:e.path?i.content={path:e.path}:e.href?i.content={href:e.href,httpHeaders:e.httpHeaders}:i.content=e.content||"",e.encoding&&(i.encoding=e.encoding),e.headers&&(i.headers=e.headers),i}));return this.mail.icalEvent&&(n="object"==typeof this.mail.icalEvent&&(this.mail.icalEvent.content||this.mail.icalEvent.path||this.mail.icalEvent.href||this.mail.icalEvent.raw)?this.mail.icalEvent:{content:this.mail.icalEvent},i={},Object.keys(n).forEach((e=>{i[e]=n[e]})),i.contentType="application/ics",i.headers||(i.headers={}),i.filename=i.filename||"invite.ics",i.headers["Content-Disposition"]="attachment",i.headers["Content-Transfer-Encoding"]="base64"),e?{attached:r.filter((e=>!e.cid)).concat(i||[]),related:r.filter((e=>!!e.cid))}:{attached:r.concat(i||[]),related:[]}}getAlternatives(){let e,n,i,r,o,s,a=[];return this.mail.text&&(e="object"==typeof this.mail.text&&(this.mail.text.content||this.mail.text.path||this.mail.text.href||this.mail.text.raw)?this.mail.text:{content:this.mail.text},e.contentType="text/plain; charset=utf-8"),this.mail.watchHtml&&(i="object"==typeof this.mail.watchHtml&&(this.mail.watchHtml.content||this.mail.watchHtml.path||this.mail.watchHtml.href||this.mail.watchHtml.raw)?this.mail.watchHtml:{content:this.mail.watchHtml},i.contentType="text/watch-html; charset=utf-8"),this.mail.amp&&(r="object"==typeof this.mail.amp&&(this.mail.amp.content||this.mail.amp.path||this.mail.amp.href||this.mail.amp.raw)?this.mail.amp:{content:this.mail.amp},r.contentType="text/x-amp-html; charset=utf-8"),this.mail.icalEvent&&(o="object"==typeof this.mail.icalEvent&&(this.mail.icalEvent.content||this.mail.icalEvent.path||this.mail.icalEvent.href||this.mail.icalEvent.raw)?this.mail.icalEvent:{content:this.mail.icalEvent},s={},Object.keys(o).forEach((e=>{s[e]=o[e]})),s.content&&"object"==typeof s.content&&(s.content._resolve=!0),s.filename=!1,s.contentType="text/calendar; charset=utf-8; method="+(s.method||"PUBLISH").toString().trim().toUpperCase(),s.headers||(s.headers={})),this.mail.html&&(n="object"==typeof this.mail.html&&(this.mail.html.content||this.mail.html.path||this.mail.html.href||this.mail.html.raw)?this.mail.html:{content:this.mail.html},n.contentType="text/html; charset=utf-8"),[].concat(e||[]).concat(i||[]).concat(r||[]).concat(n||[]).concat(s||[]).concat(this.mail.alternatives||[]).forEach((e=>{let n;/^data:/i.test(e.path||e.href)&&(e=this._processDataUrl(e)),n={contentType:e.contentType||t.detectMimeType(e.filename||e.path||e.href||"txt"),contentTransferEncoding:e.contentTransferEncoding},e.filename&&(n.filename=e.filename),/^https?:\/\//i.test(e.path)&&(e.href=e.path,e.path=void 0),e.raw?n.raw=e.raw:e.path?n.content={path:e.path}:e.href?n.content={href:e.href}:n.content=e.content||"",e.encoding&&(n.encoding=e.encoding),e.headers&&(n.headers=e.headers),a.push(n)})),a}_createMixed(t){let n;return n=t?t.createChild("multipart/mixed",{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e("multipart/mixed",{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),this._useAlternative?this._createAlternative(n):this._useRelated&&this._createRelated(n),[].concat(!this._useAlternative&&this._alternatives||[]).concat(this._attachments.attached||[]).forEach((e=>{this._useRelated&&e===this._htmlNode||this._createContentNode(n,e)})),n}_createAlternative(t){let n;return n=t?t.createChild("multipart/alternative",{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e("multipart/alternative",{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),this._alternatives.forEach((e=>{this._useRelated&&this._htmlNode===e?this._createRelated(n):this._createContentNode(n,e)})),n}_createRelated(t){let n;return n=t?t.createChild('multipart/related; type="text/html"',{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e('multipart/related; type="text/html"',{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),this._createContentNode(n,this._htmlNode),this._attachments.related.forEach((e=>this._createContentNode(n,e))),n}_createContentNode(t,n){let i;(n=n||{}).content=n.content||"";let r=(n.encoding||"utf8").toString().toLowerCase().replace(/[-_\s]/g,"");return i=t?t.createChild(n.contentType,{filename:n.filename,textEncoding:this.mail.textEncoding,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e(n.contentType,{filename:n.filename,baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),n.headers&&i.addHeader(n.headers),n.cid&&i.setHeader("Content-Id","<"+n.cid.replace(/[<>]/g,"")+">"),n.contentTransferEncoding?i.setHeader("Content-Transfer-Encoding",n.contentTransferEncoding):this.mail.encoding&&/^text\//i.test(n.contentType)&&i.setHeader("Content-Transfer-Encoding",this.mail.encoding),/^text\//i.test(n.contentType)&&!n.contentDisposition||i.setHeader("Content-Disposition",n.contentDisposition||(n.cid&&/^image\//i.test(n.contentType)?"inline":"attachment")),"string"!=typeof n.content||["utf8","usascii","ascii"].includes(r)||(n.content=Buffer.from(n.content,r)),n.raw?i.setRaw(n.raw):i.setContent(n.content),i}_processDataUrl(e){let t;return(e.path||e.href).match(/^data:/)&&(t=n(e.path||e.href)),t?(e.content=t.data,e.contentType=e.contentType||t.contentType,"path"in e&&(e.path=!1),"href"in e&&(e.href=!1),e):e}},CA}(),a=cI(),c=function(){if(WA)return GA;WA=1;const e=l,t=h,i=n;return GA=function n(r,o,s,a){let c,l,u,p=i.parse(r);c={host:p.hostname,port:Number(p.port)?Number(p.port):"https:"===p.protocol?443:80},"https:"===p.protocol?(c.rejectUnauthorized=!1,l=t.connect.bind(t)):l=e.connect.bind(e);let d=!1,m=e=>{if(!d){d=!0;try{u.destroy()}catch(e){}a(e)}},h=()=>{let e=new Error("Proxy socket timed out");e.code="ETIMEDOUT",m(e)};u=l(c,(()=>{if(d)return;let e={Host:s+":"+o,Connection:"close"};p.auth&&(e["Proxy-Authorization"]="Basic "+Buffer.from(p.auth).toString("base64")),u.write("CONNECT "+s+":"+o+" HTTP/1.1\r\n"+Object.keys(e).map((t=>t+": "+e[t])).join("\r\n")+"\r\n\r\n");let t="",n=e=>{let i,r;if(!d&&(t+=e.toString("binary"),i=t.match(/\r\n\r\n/))){if(u.removeListener("data",n),r=t.substr(i.index+i[0].length),t=t.substr(0,i.index),r&&u.unshift(Buffer.from(r,"binary")),d=!0,i=t.match(/^HTTP\/\d+\.\d+ (\d+)/i),!i||"2"!==(i[1]||"").charAt(0)){try{u.destroy()}catch(e){}return a(new Error("Invalid response from proxy"+(i&&": "+i[1]||"")))}return u.removeListener("error",m),u.removeListener("timeout",h),u.setTimeout(0),a(null,u)}};u.on("data",n)})),u.setTimeout(n.timeout||3e4),u.on("timeout",h),u.once("error",m)},GA}(),p=i,d=n,f=RA,g=function(){if(YA)return KA;YA=1;const e=jA(),t=BA(),n=zA();return KA=class{constructor(e,t){this.mailer=e,this.data={},this.message=null,t=t||{};let n=e.options||{},i=e._defaults||{};Object.keys(t).forEach((e=>{this.data[e]=t[e]})),this.data.headers=this.data.headers||{},Object.keys(i).forEach((e=>{e in this.data?"headers"===e&&Object.keys(i.headers).forEach((e=>{e in this.data.headers||(this.data.headers[e]=i.headers[e])})):this.data[e]=i[e]})),["disableFileAccess","disableUrlAccess","normalizeHeaderKey"].forEach((e=>{e in n&&(this.data[e]=n[e])}))}resolveContent(...t){return e.resolveContent(...t)}resolveAll(i){let r=[[this.data,"html"],[this.data,"text"],[this.data,"watchHtml"],[this.data,"amp"],[this.data,"icalEvent"]];this.data.alternatives&&this.data.alternatives.length&&this.data.alternatives.forEach(((e,t)=>{r.push([this.data.alternatives,t])})),this.data.attachments&&this.data.attachments.length&&this.data.attachments.forEach(((e,t)=>{e.filename||(e.filename=(e.path||e.href||"").split("/").pop().split("?").shift()||"attachment-"+(t+1),e.filename.indexOf(".")<0&&(e.filename+="."+n.detectExtension(e.contentType))),e.contentType||(e.contentType=n.detectMimeType(e.filename||e.path||e.href||"bin")),r.push([this.data.attachments,t])}));let o=new t;["from","to","cc","bcc","sender","replyTo"].forEach((e=>{let t;this.message?t=[].concat(o._parseAddresses(this.message.getHeader("replyTo"===e?"reply-to":e))||[]):this.data[e]&&(t=[].concat(o._parseAddresses(this.data[e])||[])),t&&t.length?this.data[e]=t:e in this.data&&(this.data[e]=null)})),["from","sender"].forEach((e=>{this.data[e]&&(this.data[e]=this.data[e].shift())}));let s=0,a=()=>{if(s>=r.length)return i(null,this.data);let t=r[s++];if(!t[0]||!t[0][t[1]])return a();e.resolveContent(...t,((e,n)=>{if(e)return i(e);let r={content:n};t[0][t[1]]&&"object"==typeof t[0][t[1]]&&!Buffer.isBuffer(t[0][t[1]])&&Object.keys(t[0][t[1]]).forEach((e=>{e in r||["content","path","href","raw"].includes(e)||(r[e]=t[0][t[1]][e])})),t[0][t[1]]=r,a()}))};setImmediate((()=>a()))}normalize(e){let t=this.data.envelope||this.message.getEnvelope(),n=this.message.messageId();this.resolveAll(((i,r)=>i?e(i):(r.envelope=t,r.messageId=n,["html","text","watchHtml","amp"].forEach((e=>{r[e]&&r[e].content&&("string"==typeof r[e].content?r[e]=r[e].content:Buffer.isBuffer(r[e].content)&&(r[e]=r[e].content.toString()))})),r.icalEvent&&Buffer.isBuffer(r.icalEvent.content)&&(r.icalEvent.content=r.icalEvent.content.toString("base64"),r.icalEvent.encoding="base64"),r.alternatives&&r.alternatives.length&&r.alternatives.forEach((e=>{e&&e.content&&Buffer.isBuffer(e.content)&&(e.content=e.content.toString("base64"),e.encoding="base64")})),r.attachments&&r.attachments.length&&r.attachments.forEach((e=>{e&&e.content&&Buffer.isBuffer(e.content)&&(e.content=e.content.toString("base64"),e.encoding="base64")})),r.normalizedHeaders={},Object.keys(r.headers||{}).forEach((e=>{let t=[].concat(r.headers[e]||[]).shift();t=t&&t.value||t,t&&(["references","in-reply-to","message-id","content-id"].includes(e)&&(t=this.message._encodeHeaderValue(e,t)),r.normalizedHeaders[e]=t)})),r.list&&"object"==typeof r.list&&this._getListHeaders(r.list).forEach((e=>{r.normalizedHeaders[e.key]=e.value.map((e=>e&&e.value||e)).join(", ")})),r.references&&(r.normalizedHeaders.references=this.message._encodeHeaderValue("references",r.references)),r.inReplyTo&&(r.normalizedHeaders["in-reply-to"]=this.message._encodeHeaderValue("in-reply-to",r.inReplyTo)),e(null,r))))}setMailerHeader(){this.message&&this.data.xMailer&&this.message.setHeader("X-Mailer",this.data.xMailer)}setPriorityHeaders(){if(this.message&&this.data.priority)switch((this.data.priority||"").toString().toLowerCase()){case"high":this.message.setHeader("X-Priority","1 (Highest)"),this.message.setHeader("X-MSMail-Priority","High"),this.message.setHeader("Importance","High");break;case"low":this.message.setHeader("X-Priority","5 (Lowest)"),this.message.setHeader("X-MSMail-Priority","Low"),this.message.setHeader("Importance","Low")}}setListHeaders(){this.message&&this.data.list&&"object"==typeof this.data.list&&this.data.list&&"object"==typeof this.data.list&&this._getListHeaders(this.data.list).forEach((e=>{e.value.forEach((t=>{this.message.addHeader(e.key,t)}))}))}_getListHeaders(e){return Object.keys(e).map((t=>({key:"list-"+t.toLowerCase().trim(),value:[].concat(e[t]||[]).map((e=>({prepared:!0,foldLines:!0,value:[].concat(e||[]).map((e=>{if("string"==typeof e&&(e={url:e}),e&&e.url){if("id"===t.toLowerCase().trim()){let t=e.comment||"";return t=n.isPlainText(t)?'"'+t+'"':n.encodeWord(t),(e.comment?t+" ":"")+this._formatListUrl(e.url).replace(/^<[^:]+\/{,2}/,"")}let i=e.comment||"";return n.isPlainText(i)||(i=n.encodeWord(i)),this._formatListUrl(e.url)+(e.comment?" ("+i+")":"")}return""})).filter((e=>e)).join(", ")})))})))}_formatListUrl(e){return e=e.replace(/[\s<]+|[\s>]+/g,""),/^(https?|mailto|ftp):/.test(e)?"<"+e+">":/^[^@]+@[^@]+$/.test(e)?"<mailto:"+e+">":"<http://"+e+">"}},KA}(),y=l,v=u,b=m;return QA=class extends e{constructor(e,t,n){super(),this.options=t||{},this._defaults=n||{},this._defaultPlugins={compile:[(...e)=>this._convertDataImages(...e)],stream:[]},this._userPlugins={compile:[],stream:[]},this.meta=new Map,this.dkim=!!this.options.dkim&&new a(this.options.dkim),this.transporter=e,this.transporter.mailer=this,this.logger=r.getLogger(this.options,{component:this.options.component||"mail"}),this.logger.debug({tnx:"create"},"Creating transport: %s",this.getVersionString()),"function"==typeof this.transporter.on&&(this.transporter.on("log",(e=>{this.logger.debug({tnx:"transport"},"%s: %s",e.type,e.message)})),this.transporter.on("error",(e=>{this.logger.error({err:e,tnx:"transport"},"Transport Error: %s",e.message),this.emit("error",e)})),this.transporter.on("idle",((...e)=>{this.emit("idle",...e)}))),["close","isIdle","verify"].forEach((e=>{this[e]=(...t)=>"function"==typeof this.transporter[e]?("verify"===e&&"function"==typeof this.getSocket&&(this.transporter.getSocket=this.getSocket,this.getSocket=!1),this.transporter[e](...t)):(this.logger.warn({tnx:"transport",methodName:e},"Non existing method %s called for transport",e),!1)})),this.options.proxy&&"string"==typeof this.options.proxy&&this.setupProxy(this.options.proxy)}use(e,t){return e=(e||"").toString(),this._userPlugins.hasOwnProperty(e)?this._userPlugins[e].push(t):this._userPlugins[e]=[t],this}sendMail(e,t=null){let n;t||(n=new Promise(((e,n)=>{t=r.callbackPromise(e,n)}))),"function"==typeof this.getSocket&&(this.transporter.getSocket=this.getSocket,this.getSocket=!1);let i=new g(this,e);return this.logger.debug({tnx:"transport",name:this.transporter.name,version:this.transporter.version,action:"send"},"Sending mail using %s/%s",this.transporter.name,this.transporter.version),this._processPlugins("compile",i,(e=>{if(e)return this.logger.error({err:e,tnx:"plugin",action:"compile"},"PluginCompile Error: %s",e.message),t(e);i.message=new s(i.data).compile(),i.setMailerHeader(),i.setPriorityHeaders(),i.setListHeaders(),this._processPlugins("stream",i,(e=>{if(e)return this.logger.error({err:e,tnx:"plugin",action:"stream"},"PluginStream Error: %s",e.message),t(e);(i.data.dkim||this.dkim)&&i.message.processFunc((e=>{let t=i.data.dkim?new a(i.data.dkim):this.dkim;return this.logger.debug({tnx:"DKIM",messageId:i.message.messageId(),dkimDomains:t.keys.map((e=>e.keySelector+"."+e.domainName)).join(", ")},"Signing outgoing message with %s keys",t.keys.length),t.sign(e,i.data._dkim)})),this.transporter.send(i,((...e)=>{e[0]&&this.logger.error({err:e[0],tnx:"transport",action:"send"},"Send Error: %s",e[0].message),t(...e)}))}))})),n}getVersionString(){return p.format("%s (%s; +%s; %s/%s)",f.name,f.version,f.homepage,this.transporter.name,this.transporter.version)}_processPlugins(e,t,n){if(e=(e||"").toString(),!this._userPlugins.hasOwnProperty(e))return n();let i=this._userPlugins[e]||[],r=this._defaultPlugins[e]||[];if(i.length&&this.logger.debug({tnx:"transaction",pluginCount:i.length,step:e},"Using %s plugins for %s",i.length,e),i.length+r.length===0)return n();let o=0,s="default",a=()=>{let e="default"===s?r:i;if(o>=e.length){if("default"!==s||!i.length)return n();s="user",o=0,e=i}(0,e[o++])(t,(e=>{if(e)return n(e);a()}))};a()}setupProxy(e){let t=d.parse(e);this.getSocket=(e,n)=>{let i=t.protocol.replace(/:$/,"").toLowerCase();if(this.meta.has("proxy_handler_"+i))return this.meta.get("proxy_handler_"+i)(t,e,n);switch(i){case"http":case"https":return void c(t.href,e.port,e.host,((e,t)=>e?n(e):n(null,{connection:t})));case"socks":case"socks5":case"socks4":case"socks4a":{if(!this.meta.has("proxy_socks_module"))return n(new Error("Socks module not loaded"));let i=i=>{let r=!!this.meta.get("proxy_socks_module").SocksClient,o=r?this.meta.get("proxy_socks_module").SocksClient:this.meta.get("proxy_socks_module"),s=Number(t.protocol.replace(/\D/g,""))||5,a={proxy:{ipaddress:i,port:Number(t.port),type:s},[r?"destination":"target"]:{host:e.host,port:e.port},command:"connect"};if(t.auth){let e=decodeURIComponent(t.auth.split(":").shift()),n=decodeURIComponent(t.auth.split(":").pop());r?(a.proxy.userId=e,a.proxy.password=n):4===s?a.userid=e:a.authentication={username:e,password:n}}o.createConnection(a,((e,t)=>e?n(e):n(null,{connection:t.socket||t})))};return y.isIP(t.hostname)?i(t.hostname):v.resolve(t.hostname,((e,t)=>{if(e)return n(e);i(Array.isArray(t)?t[0]:t)}))}}n(new Error("Unknown proxy configuration"))}}_convertDataImages(e,t){if(!this.options.attachDataUrls&&!e.data.attachDataUrls||!e.data.html)return t();e.resolveContent(e.data,"html",((n,i)=>{if(n)return t(n);let r=0;i=(i||"").toString().replace(/(<img\b[^<>]{0,1024} src\s{0,20}=[\s"']{0,20})(data:([^;]+);[^"'>\s]+)/gi,((t,n,i,s)=>{let a=b.randomBytes(10).toString("hex")+"@localhost";return e.data.attachments||(e.data.attachments=[]),Array.isArray(e.data.attachments)||(e.data.attachments=[].concat(e.data.attachments||[])),e.data.attachments.push({path:i,cid:a,filename:"image-"+ ++r+"."+o.detectExtension(s)}),n+"cid:"+a})),e.data.html=i,t()}))}set(e,t){return this.meta.set(e,t)}get(e){return this.meta.get(e)}},QA}function uI(){if(tI)return eI;tI=1;const e=RA,n=t.EventEmitter,i=l,r=h,o=p,s=m,a=function(){if(ZA)return XA;ZA=1;const e=c.Transform;return XA=class extends e{constructor(e){super(e),this.options=e||{},this._curLine="",this.inByteCount=0,this.outByteCount=0,this.lastByte=!1}_transform(e,t,n){let i,r,o,s=[],a=0,c=0;if(!e||!e.length)return n();for("string"==typeof e&&(e=Buffer.from(e)),this.inByteCount+=e.length,i=0,r=e.length;i<r;i++)46===e[i]?(i&&10===e[i-1]||!i&&(!this.lastByte||10===this.lastByte))&&(o=e.slice(c,i+1),s.push(o),s.push(Buffer.from(".")),a+=o.length+1,c=i+1):10===e[i]&&(i&&13!==e[i-1]||!i&&13!==this.lastByte)&&(i>c?(o=e.slice(c,i),s.push(o),a+=o.length+2):a+=2,s.push(Buffer.from("\r\n")),c=i+1);a?(c<e.length&&(o=e.slice(c),s.push(o),a+=o.length),this.outByteCount+=a,this.push(Buffer.concat(s,a))):(this.outByteCount+=e.length,this.push(e)),this.lastByte=e[e.length-1],n()}_flush(e){let t;t=10===this.lastByte?Buffer.from(".\r\n"):13===this.lastByte?Buffer.from("\n.\r\n"):Buffer.from("\r\n.\r\n"),this.outByteCount+=t.length,this.push(t),e()}},XA}(),u=c.PassThrough,d=jA(),f=6e5;return eI=class extends n{constructor(t){super(t),this.id=s.randomBytes(8).toString("base64").replace(/\W/g,""),this.stage="init",this.options=t||{},this.secureConnection=!!this.options.secure,this.alreadySecured=!!this.options.secured,this.port=Number(this.options.port)||(this.secureConnection?465:587),this.host=this.options.host||"localhost",this.servername=this.options.servername?this.options.servername:!i.isIP(this.host)&&this.host,this.allowInternalNetworkInterfaces=this.options.allowInternalNetworkInterfaces||!1,void 0===this.options.secure&&465===this.port&&(this.secureConnection=!0),this.name=this.options.name||this._getHostname(),this.logger=d.getLogger(this.options,{component:this.options.component||"smtp-connection",sid:this.id}),this.customAuth=new Map,Object.keys(this.options.customAuth||{}).forEach((e=>{let t=(e||"").toString().trim().toUpperCase();t&&this.customAuth.set(t,this.options.customAuth[e])})),this.version=e.version,this.authenticated=!1,this.destroyed=!1,this.secure=!!this.secureConnection,this._remainder="",this._responseQueue=[],this.lastServerResponse=!1,this._socket=!1,this._supportedAuth=[],this.allowsAuth=!1,this._envelope=!1,this._supportedExtensions=[],this._maxAllowedSize=0,this._responseActions=[],this._recipientQueue=[],this._greetingTimeout=!1,this._connectionTimeout=!1,this._destroyed=!1,this._closing=!1,this._onSocketData=e=>this._onData(e),this._onSocketError=e=>this._onError(e,"ESOCKET",!1,"CONN"),this._onSocketClose=()=>this._onClose(),this._onSocketEnd=()=>this._onEnd(),this._onSocketTimeout=()=>this._onTimeout()}connect(e){if("function"==typeof e){this.once("connect",(()=>{this.logger.debug({tnx:"smtp"},"SMTP handshake finished"),e()}));const t=this._isDestroyedMessage("connect");if(t)return e(this._formatError(t,"ECONNECTION",!1,"CONN"))}let t={port:this.port,host:this.host,allowInternalNetworkInterfaces:this.allowInternalNetworkInterfaces,timeout:this.options.dnsTimeout||3e4};this.options.localAddress&&(t.localAddress=this.options.localAddress);let n=()=>{this._connectionTimeout=setTimeout((()=>{this._onError("Connection timeout","ETIMEDOUT",!1,"CONN")}),this.options.connectionTimeout||12e4),this._socket.on("error",this._onSocketError)};return this.options.connection?(this._socket=this.options.connection,void(this.secureConnection&&!this.alreadySecured?setImmediate((()=>this._upgradeConnection((e=>{e?this._onError(new Error("Error initiating TLS - "+(e.message||e)),"ETLS",!1,"CONN"):this._onConnect()})))):setImmediate((()=>this._onConnect())))):this.options.socket?(this._socket=this.options.socket,d.resolveHostname(t,((e,i)=>{if(e)return setImmediate((()=>this._onError(e,"EDNS",!1,"CONN")));this.logger.debug({tnx:"dns",source:t.host,resolved:i.host,cached:!!i.cached},"Resolved %s as %s [cache %s]",t.host,i.host,i.cached?"hit":"miss"),Object.keys(i).forEach((e=>{"_"!==e.charAt(0)&&i[e]&&(t[e]=i[e])}));try{this._socket.connect(this.port,this.host,(()=>{this._socket.setKeepAlive(!0),this._onConnect()})),n()}catch(e){return setImmediate((()=>this._onError(e,"ECONNECTION",!1,"CONN")))}}))):this.secureConnection?(this.options.tls&&Object.keys(this.options.tls).forEach((e=>{t[e]=this.options.tls[e]})),this.servername&&!t.servername&&(t.servername=this.servername),d.resolveHostname(t,((e,i)=>{if(e)return setImmediate((()=>this._onError(e,"EDNS",!1,"CONN")));this.logger.debug({tnx:"dns",source:t.host,resolved:i.host,cached:!!i.cached},"Resolved %s as %s [cache %s]",t.host,i.host,i.cached?"hit":"miss"),Object.keys(i).forEach((e=>{"_"!==e.charAt(0)&&i[e]&&(t[e]=i[e])}));try{this._socket=r.connect(t,(()=>{this._socket.setKeepAlive(!0),this._onConnect()})),n()}catch(e){return setImmediate((()=>this._onError(e,"ECONNECTION",!1,"CONN")))}}))):d.resolveHostname(t,((e,r)=>{if(e)return setImmediate((()=>this._onError(e,"EDNS",!1,"CONN")));this.logger.debug({tnx:"dns",source:t.host,resolved:r.host,cached:!!r.cached},"Resolved %s as %s [cache %s]",t.host,r.host,r.cached?"hit":"miss"),Object.keys(r).forEach((e=>{"_"!==e.charAt(0)&&r[e]&&(t[e]=r[e])}));try{this._socket=i.connect(t,(()=>{this._socket.setKeepAlive(!0),this._onConnect()})),n()}catch(e){return setImmediate((()=>this._onError(e,"ECONNECTION",!1,"CONN")))}}))}quit(){this._sendCommand("QUIT"),this._responseActions.push(this.close)}close(){if(clearTimeout(this._connectionTimeout),clearTimeout(this._greetingTimeout),this._responseActions=[],this._closing)return;this._closing=!0;let e="end";"init"===this.stage&&(e="destroy"),this.logger.debug({tnx:"smtp"},'Closing connection to the server using "%s"',e);let t=this._socket&&this._socket.socket||this._socket;if(t&&!t.destroyed)try{this._socket[e]()}catch(e){}this._destroy()}login(e,t){const n=this._isDestroyedMessage("login");if(n)return t(this._formatError(n,"ECONNECTION",!1,"API"));if(this._auth=e||{},this._authMethod=(this._auth.method||"").toString().trim().toUpperCase()||!1,this._authMethod||!this._auth.oauth2||this._auth.credentials?this._authMethod&&("XOAUTH2"!==this._authMethod||this._auth.oauth2)||(this._authMethod=(this._supportedAuth[0]||"PLAIN").toUpperCase().trim()):this._authMethod="XOAUTH2",!("XOAUTH2"===this._authMethod||this._auth.credentials&&this._auth.credentials.user&&this._auth.credentials.pass)){if(!(this._auth.user&&this._auth.pass||this.customAuth.has(this._authMethod)))return t(this._formatError('Missing credentials for "'+this._authMethod+'"',"EAUTH",!1,"API"));this._auth.credentials={user:this._auth.user,pass:this._auth.pass,options:this._auth.options}}if(!this.customAuth.has(this._authMethod)){switch(this._authMethod){case"XOAUTH2":return void this._handleXOauth2Token(!1,t);case"LOGIN":return this._responseActions.push((e=>{this._actionAUTH_LOGIN_USER(e,t)})),void this._sendCommand("AUTH LOGIN");case"PLAIN":return this._responseActions.push((e=>{this._actionAUTHComplete(e,t)})),void this._sendCommand("AUTH PLAIN "+Buffer.from("\0"+this._auth.credentials.user+"\0"+this._auth.credentials.pass,"utf-8").toString("base64"),"AUTH PLAIN "+Buffer.from("\0"+this._auth.credentials.user+"\0/* secret */","utf-8").toString("base64"));case"CRAM-MD5":return this._responseActions.push((e=>{this._actionAUTH_CRAM_MD5(e,t)})),void this._sendCommand("AUTH CRAM-MD5")}return t(this._formatError('Unknown authentication method "'+this._authMethod+'"',"EAUTH",!1,"API"))}{let e,n=this.customAuth.get(this._authMethod),i=!1,r=()=>{i||(i=!0,this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user)),this.authenticated=!0,t(null,!0))},o=n=>{i||(i=!0,t(this._formatError(n,"EAUTH",e,"AUTH "+this._authMethod)))},s=n({auth:this._auth,method:this._authMethod,extensions:[].concat(this._supportedExtensions),authMethods:[].concat(this._supportedAuth),maxAllowedSize:this._maxAllowedSize||!1,sendCommand:(t,n)=>{let i;return n||(i=new Promise(((e,t)=>{n=d.callbackPromise(e,t)}))),this._responseActions.push((i=>{e=i;let r=i.match(/^(\d+)(?:\s(\d+\.\d+\.\d+))?\s/),o={command:t,response:i};r?(o.status=Number(r[1])||0,r[2]&&(o.code=r[2]),o.text=i.substr(r[0].length)):(o.text=i,o.status=0),n(null,o)})),setImmediate((()=>this._sendCommand(t))),i},resolve:r,reject:o});s&&"function"==typeof s.catch&&s.then(r).catch(o)}}send(e,t,n){if(!t)return n(this._formatError("Empty message","EMESSAGE",!1,"API"));const i=this._isDestroyedMessage("send message");if(i)return n(this._formatError(i,"ECONNECTION",!1,"API"));if(this._maxAllowedSize&&e.size>this._maxAllowedSize)return setImmediate((()=>{n(this._formatError("Message size larger than allowed "+this._maxAllowedSize,"EMESSAGE",!1,"MAIL FROM"))}));let r=!1,o=function(){r||(r=!0,n(...arguments))};"function"==typeof t.on&&t.on("error",(e=>o(this._formatError(e,"ESTREAM",!1,"API"))));let s=Date.now();this._setEnvelope(e,((e,n)=>{if(e){let n=new u;return"function"==typeof t.pipe?t.pipe(n):(n.write(t),n.end()),o(e)}let i=Date.now(),r=this._createSendStream(((e,t)=>e?o(e):(n.envelopeTime=i-s,n.messageTime=Date.now()-i,n.messageSize=r.outByteCount,n.response=t,o(null,n))));"function"==typeof t.pipe?t.pipe(r):(r.write(t),r.end())}))}reset(e){this._sendCommand("RSET"),this._responseActions.push((t=>"2"!==t.charAt(0)?e(this._formatError("Could not reset session state. response="+t,"EPROTOCOL",t,"RSET")):(this._envelope=!1,e(null,!0))))}_onConnect(){clearTimeout(this._connectionTimeout),this.logger.info({tnx:"network",localAddress:this._socket.localAddress,localPort:this._socket.localPort,remoteAddress:this._socket.remoteAddress,remotePort:this._socket.remotePort},"%s established to %s:%s",this.secure?"Secure connection":"Connection",this._socket.remoteAddress,this._socket.remotePort),this._destroyed?this.close():(this.stage="connected",this._socket.removeListener("data",this._onSocketData),this._socket.removeListener("timeout",this._onSocketTimeout),this._socket.removeListener("close",this._onSocketClose),this._socket.removeListener("end",this._onSocketEnd),this._socket.on("data",this._onSocketData),this._socket.once("close",this._onSocketClose),this._socket.once("end",this._onSocketEnd),this._socket.setTimeout(this.options.socketTimeout||f),this._socket.on("timeout",this._onSocketTimeout),this._greetingTimeout=setTimeout((()=>{this._socket&&!this._destroyed&&this._responseActions[0]===this._actionGreeting&&this._onError("Greeting never received","ETIMEDOUT",!1,"CONN")}),this.options.greetingTimeout||3e4),this._responseActions.push(this._actionGreeting),this._socket.resume())}_onData(e){if(this._destroyed||!e||!e.length)return;let t,n=(e||"").toString("binary"),i=(this._remainder+n).split(/\r?\n/);this._remainder=i.pop();for(let e=0,n=i.length;e<n;e++)this._responseQueue.length&&(t=this._responseQueue[this._responseQueue.length-1],/^\d+-/.test(t.split("\n").pop()))?this._responseQueue[this._responseQueue.length-1]+="\n"+i[e]:this._responseQueue.push(i[e]);this._responseQueue.length&&(t=this._responseQueue[this._responseQueue.length-1],/^\d+-/.test(t.split("\n").pop()))||this._processResponse()}_onError(e,t,n,i){clearTimeout(this._connectionTimeout),clearTimeout(this._greetingTimeout),this._destroyed||(e=this._formatError(e,t,n,i),this.logger.error(n,e.message),this.emit("error",e),this.close())}_formatError(e,t,n,i){let r;r=/Error\]$/i.test(Object.prototype.toString.call(e))?e:new Error(e),t&&"Error"!==t&&(r.code=t),n&&(r.response=n,r.message+=": "+n);let o="string"==typeof n&&Number((n.match(/^\d+/)||[])[0])||!1;return o&&(r.responseCode=o),i&&(r.command=i),r}_onClose(){let e=!1;return this._remainder&&this._remainder.trim()&&((this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"server"},this._remainder.replace(/\r?\n$/,"")),this.lastServerResponse=e=this._remainder.trim()),this.logger.info({tnx:"network"},"Connection closed"),this.upgrading&&!this._destroyed?this._onError(new Error("Connection closed unexpectedly"),"ETLS",e,"CONN"):[this._actionGreeting,this.close].includes(this._responseActions[0])||this._destroyed?/^[45]\d{2}\b/.test(e)?this._onError(new Error("Connection closed unexpectedly"),"ECONNECTION",e,"CONN"):void this._destroy():this._onError(new Error("Connection closed unexpectedly"),"ECONNECTION",e,"CONN")}_onEnd(){this._socket&&!this._socket.destroyed&&this._socket.destroy()}_onTimeout(){return this._onError(new Error("Timeout"),"ETIMEDOUT",!1,"CONN")}_destroy(){this._destroyed||(this._destroyed=!0,this.emit("end"))}_upgradeConnection(e){this._socket.removeListener("data",this._onSocketData),this._socket.removeListener("timeout",this._onSocketTimeout);let t=this._socket,n={socket:this._socket,host:this.host};Object.keys(this.options.tls||{}).forEach((e=>{n[e]=this.options.tls[e]})),this.servername&&!n.servername&&(n.servername=this.servername),this.upgrading=!0;try{this._socket=r.connect(n,(()=>(this.secure=!0,this.upgrading=!1,this._socket.on("data",this._onSocketData),t.removeListener("close",this._onSocketClose),t.removeListener("end",this._onSocketEnd),e(null,!0))))}catch(t){return e(t)}this._socket.on("error",this._onSocketError),this._socket.once("close",this._onSocketClose),this._socket.once("end",this._onSocketEnd),this._socket.setTimeout(this.options.socketTimeout||f),this._socket.on("timeout",this._onSocketTimeout),t.resume()}_processResponse(){if(!this._responseQueue.length)return!1;let e=this.lastServerResponse=(this._responseQueue.shift()||"").toString();if(/^\d+-/.test(e.split("\n").pop()))return;(this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"server"},e.replace(/\r?\n$/,"")),e.trim()||setImmediate((()=>this._processResponse()));let t=this._responseActions.shift();if("function"!=typeof t)return this._onError(new Error("Unexpected Response"),"EPROTOCOL",e,"CONN");t.call(this,e),setImmediate((()=>this._processResponse()))}_sendCommand(e,t){if(!this._destroyed){if(this._socket.destroyed)return this.close();(this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"client"},(t||e||"").toString().replace(/\r?\n$/,"")),this._socket.write(Buffer.from(e+"\r\n","utf-8"))}}_setEnvelope(e,t){let n=[],i=!1;if(this._envelope=e||{},this._envelope.from=(this._envelope.from&&this._envelope.from.address||this._envelope.from||"").toString().trim(),this._envelope.to=[].concat(this._envelope.to||[]).map((e=>(e&&e.address||e||"").toString().trim())),!this._envelope.to.length)return t(this._formatError("No recipients defined","EENVELOPE",!1,"API"));if(this._envelope.from&&/[\r\n<>]/.test(this._envelope.from))return t(this._formatError("Invalid sender "+JSON.stringify(this._envelope.from),"EENVELOPE",!1,"API"));/[\x80-\uFFFF]/.test(this._envelope.from)&&(i=!0);for(let e=0,n=this._envelope.to.length;e<n;e++){if(!this._envelope.to[e]||/[\r\n<>]/.test(this._envelope.to[e]))return t(this._formatError("Invalid recipient "+JSON.stringify(this._envelope.to[e]),"EENVELOPE",!1,"API"));/[\x80-\uFFFF]/.test(this._envelope.to[e])&&(i=!0)}if(this._envelope.rcptQueue=JSON.parse(JSON.stringify(this._envelope.to||[])),this._envelope.rejected=[],this._envelope.rejectedErrors=[],this._envelope.accepted=[],this._envelope.dsn)try{this._envelope.dsn=this._setDsnEnvelope(this._envelope.dsn)}catch(e){return t(this._formatError("Invalid DSN "+e.message,"EENVELOPE",!1,"API"))}this._responseActions.push((e=>{this._actionMAIL(e,t)})),i&&this._supportedExtensions.includes("SMTPUTF8")&&(n.push("SMTPUTF8"),this._usingSmtpUtf8=!0),this._envelope.use8BitMime&&this._supportedExtensions.includes("8BITMIME")&&(n.push("BODY=8BITMIME"),this._using8BitMime=!0),this._envelope.size&&this._supportedExtensions.includes("SIZE")&&n.push("SIZE="+this._envelope.size),this._envelope.dsn&&this._supportedExtensions.includes("DSN")&&(this._envelope.dsn.ret&&n.push("RET="+d.encodeXText(this._envelope.dsn.ret)),this._envelope.dsn.envid&&n.push("ENVID="+d.encodeXText(this._envelope.dsn.envid))),this._sendCommand("MAIL FROM:<"+this._envelope.from+">"+(n.length?" "+n.join(" "):""))}_setDsnEnvelope(e){let t=(e.ret||e.return||"").toString().toUpperCase()||null;if(t)switch(t){case"HDRS":case"HEADERS":t="HDRS";break;case"FULL":case"BODY":t="FULL"}if(t&&!["FULL","HDRS"].includes(t))throw new Error("ret: "+JSON.stringify(t));let n=(e.envid||e.id||"").toString()||null,i=e.notify||null;if(i){"string"==typeof i&&(i=i.split(",")),i=i.map((e=>e.trim().toUpperCase()));let e=["NEVER","SUCCESS","FAILURE","DELAY"],t=i.filter((t=>!e.includes(t)));if(t.length||i.length>1&&i.includes("NEVER"))throw new Error("notify: "+JSON.stringify(i.join(",")));i=i.join(",")}let r=(e.recipient||e.orcpt||"").toString()||null;return r&&r.indexOf(";")<0&&(r="rfc822;"+r),{ret:t,envid:n,notify:i,orcpt:r}}_getDsnRcptToArgs(){let e=[];return this._envelope.dsn&&this._supportedExtensions.includes("DSN")&&(this._envelope.dsn.notify&&e.push("NOTIFY="+d.encodeXText(this._envelope.dsn.notify)),this._envelope.dsn.orcpt&&e.push("ORCPT="+d.encodeXText(this._envelope.dsn.orcpt))),e.length?" "+e.join(" "):""}_createSendStream(e){let t,n=new a;return this.options.lmtp?this._envelope.accepted.forEach(((t,n)=>{let i=n===this._envelope.accepted.length-1;this._responseActions.push((n=>{this._actionLMTPStream(t,i,n,e)}))})):this._responseActions.push((t=>{this._actionSMTPStream(t,e)})),n.pipe(this._socket,{end:!1}),this.options.debug&&(t=new u,t.on("readable",(()=>{let e;for(;e=t.read();)this.logger.debug({tnx:"message"},e.toString("binary").replace(/\r?\n$/,""))})),n.pipe(t)),n.once("end",(()=>{this.logger.info({tnx:"message",inByteCount:n.inByteCount,outByteCount:n.outByteCount},"<%s bytes encoded mime message (source size %s bytes)>",n.outByteCount,n.inByteCount)})),n}_actionGreeting(e){clearTimeout(this._greetingTimeout),"220"===e.substr(0,3)?this.options.lmtp?(this._responseActions.push(this._actionLHLO),this._sendCommand("LHLO "+this.name)):(this._responseActions.push(this._actionEHLO),this._sendCommand("EHLO "+this.name)):this._onError(new Error("Invalid greeting. response="+e),"EPROTOCOL",e,"CONN")}_actionLHLO(e){"2"===e.charAt(0)?this._actionEHLO(e):this._onError(new Error("Invalid LHLO. response="+e),"EPROTOCOL",e,"LHLO")}_actionEHLO(e){let t;if("421"!==e.substr(0,3)){if("2"!==e.charAt(0))return this.options.requireTLS?void this._onError(new Error("EHLO failed but HELO does not support required STARTTLS. response="+e),"ECONNECTION",e,"EHLO"):(this._responseActions.push(this._actionHELO),void this._sendCommand("HELO "+this.name));if(this._ehloLines=e.split(/\r?\n/).map((e=>e.replace(/^\d+[ -]/,"").trim())).filter((e=>e)).slice(1),!this.secure&&!this.options.ignoreTLS&&(/[ -]STARTTLS\b/im.test(e)||this.options.requireTLS))return this._sendCommand("STARTTLS"),void this._responseActions.push(this._actionSTARTTLS);/[ -]SMTPUTF8\b/im.test(e)&&this._supportedExtensions.push("SMTPUTF8"),/[ -]DSN\b/im.test(e)&&this._supportedExtensions.push("DSN"),/[ -]8BITMIME\b/im.test(e)&&this._supportedExtensions.push("8BITMIME"),/[ -]PIPELINING\b/im.test(e)&&this._supportedExtensions.push("PIPELINING"),/[ -]AUTH\b/i.test(e)&&(this.allowsAuth=!0),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)PLAIN/i.test(e)&&this._supportedAuth.push("PLAIN"),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)LOGIN/i.test(e)&&this._supportedAuth.push("LOGIN"),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)CRAM-MD5/i.test(e)&&this._supportedAuth.push("CRAM-MD5"),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)XOAUTH2/i.test(e)&&this._supportedAuth.push("XOAUTH2"),(t=e.match(/[ -]SIZE(?:[ \t]+(\d+))?/im))&&(this._supportedExtensions.push("SIZE"),this._maxAllowedSize=Number(t[1])||0),this.emit("connect")}else this._onError(new Error("Server terminates connection. response="+e),"ECONNECTION",e,"EHLO")}_actionHELO(e){"2"===e.charAt(0)?(this.allowsAuth=!0,this.emit("connect")):this._onError(new Error("Invalid HELO. response="+e),"EPROTOCOL",e,"HELO")}_actionSTARTTLS(e){if("2"!==e.charAt(0))return this.options.opportunisticTLS?(this.logger.info({tnx:"smtp"},"Failed STARTTLS upgrade, continuing unencrypted"),this.emit("connect")):void this._onError(new Error("Error upgrading connection with STARTTLS"),"ETLS",e,"STARTTLS");this._upgradeConnection(((e,t)=>{e?this._onError(new Error("Error initiating TLS - "+(e.message||e)),"ETLS",!1,"STARTTLS"):(this.logger.info({tnx:"smtp"},"Connection upgraded with STARTTLS"),t?this.options.lmtp?(this._responseActions.push(this._actionLHLO),this._sendCommand("LHLO "+this.name)):(this._responseActions.push(this._actionEHLO),this._sendCommand("EHLO "+this.name)):this.emit("connect"))}))}_actionAUTH_LOGIN_USER(e,t){/^334[ -]/.test(e)?(this._responseActions.push((e=>{this._actionAUTH_LOGIN_PASS(e,t)})),this._sendCommand(Buffer.from(this._auth.credentials.user+"","utf-8").toString("base64"))):t(this._formatError('Invalid login sequence while waiting for "334 VXNlcm5hbWU6"',"EAUTH",e,"AUTH LOGIN"))}_actionAUTH_CRAM_MD5(e,t){let n=e.match(/^334\s+(.+)$/),i="";if(!n)return t(this._formatError("Invalid login sequence while waiting for server challenge string","EAUTH",e,"AUTH CRAM-MD5"));i=n[1];let r=Buffer.from(i,"base64").toString("ascii"),o=s.createHmac("md5",this._auth.credentials.pass);o.update(r);let a=this._auth.credentials.user+" "+o.digest("hex");this._responseActions.push((e=>{this._actionAUTH_CRAM_MD5_PASS(e,t)})),this._sendCommand(Buffer.from(a).toString("base64"),Buffer.from(this._auth.credentials.user+" /* secret */").toString("base64"))}_actionAUTH_CRAM_MD5_PASS(e,t){if(!e.match(/^235\s+/))return t(this._formatError('Invalid login sequence while waiting for "235"',"EAUTH",e,"AUTH CRAM-MD5"));this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user)),this.authenticated=!0,t(null,!0)}_actionAUTH_LOGIN_PASS(e,t){if(!/^334[ -]/.test(e))return t(this._formatError('Invalid login sequence while waiting for "334 UGFzc3dvcmQ6"',"EAUTH",e,"AUTH LOGIN"));this._responseActions.push((e=>{this._actionAUTHComplete(e,t)})),this._sendCommand(Buffer.from((this._auth.credentials.pass||"").toString(),"utf-8").toString("base64"),Buffer.from("/* secret */","utf-8").toString("base64"))}_actionAUTHComplete(e,t,n){return n||"function"!=typeof t||(n=t,t=!1),"334"===e.substr(0,3)?(this._responseActions.push((e=>{t||"XOAUTH2"!==this._authMethod?this._actionAUTHComplete(e,!0,n):setImmediate((()=>this._handleXOauth2Token(!0,n)))})),void this._sendCommand("")):"2"!==e.charAt(0)?(this.logger.info({tnx:"smtp",username:this._auth.user,action:"authfail",method:this._authMethod},"User %s failed to authenticate",JSON.stringify(this._auth.user)),n(this._formatError("Invalid login","EAUTH",e,"AUTH "+this._authMethod))):(this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user)),this.authenticated=!0,void n(null,!0))}_actionMAIL(e,t){let n,i;if(2!==Number(e.charAt(0)))return n=this._usingSmtpUtf8&&/^550 /.test(e)&&/[\x80-\uFFFF]/.test(this._envelope.from)?"Internationalized mailbox name not allowed":"Mail command failed",t(this._formatError(n,"EENVELOPE",e,"MAIL FROM"));if(!this._envelope.rcptQueue.length)return t(this._formatError("Can't send mail - no recipients defined","EENVELOPE",!1,"API"));if(this._recipientQueue=[],this._supportedExtensions.includes("PIPELINING"))for(;this._envelope.rcptQueue.length;)i=this._envelope.rcptQueue.shift(),this._recipientQueue.push(i),this._responseActions.push((e=>{this._actionRCPT(e,t)})),this._sendCommand("RCPT TO:<"+i+">"+this._getDsnRcptToArgs());else i=this._envelope.rcptQueue.shift(),this._recipientQueue.push(i),this._responseActions.push((e=>{this._actionRCPT(e,t)})),this._sendCommand("RCPT TO:<"+i+">"+this._getDsnRcptToArgs())}_actionRCPT(e,t){let n,i,r=this._recipientQueue.shift();if(2!==Number(e.charAt(0))?(n=this._usingSmtpUtf8&&/^553 /.test(e)&&/[\x80-\uFFFF]/.test(r)?"Internationalized mailbox name not allowed":"Recipient command failed",this._envelope.rejected.push(r),i=this._formatError(n,"EENVELOPE",e,"RCPT TO"),i.recipient=r,this._envelope.rejectedErrors.push(i)):this._envelope.accepted.push(r),this._envelope.rcptQueue.length||this._recipientQueue.length)this._envelope.rcptQueue.length&&(r=this._envelope.rcptQueue.shift(),this._recipientQueue.push(r),this._responseActions.push((e=>{this._actionRCPT(e,t)})),this._sendCommand("RCPT TO:<"+r+">"+this._getDsnRcptToArgs()));else{if(!(this._envelope.rejected.length<this._envelope.to.length))return i=this._formatError("Can't send mail - all recipients were rejected","EENVELOPE",e,"RCPT TO"),i.rejected=this._envelope.rejected,i.rejectedErrors=this._envelope.rejectedErrors,t(i);this._responseActions.push((e=>{this._actionDATA(e,t)})),this._sendCommand("DATA")}}_actionDATA(e,t){if(!/^[23]/.test(e))return t(this._formatError("Data command failed","EENVELOPE",e,"DATA"));let n={accepted:this._envelope.accepted,rejected:this._envelope.rejected};this._ehloLines&&this._ehloLines.length&&(n.ehlo=this._ehloLines),this._envelope.rejectedErrors.length&&(n.rejectedErrors=this._envelope.rejectedErrors),t(null,n)}_actionSMTPStream(e,t){return 2!==Number(e.charAt(0))?t(this._formatError("Message failed","EMESSAGE",e,"DATA")):t(null,e)}_actionLMTPStream(e,t,n,i){let r;if(2!==Number(n.charAt(0))){r=this._formatError("Message failed for recipient "+e,"EMESSAGE",n,"DATA"),r.recipient=e,this._envelope.rejected.push(e),this._envelope.rejectedErrors.push(r);for(let t=0,n=this._envelope.accepted.length;t<n;t++)this._envelope.accepted[t]===e&&this._envelope.accepted.splice(t,1)}if(t)return i(null,n)}_handleXOauth2Token(e,t){this._auth.oauth2.getToken(e,((n,i)=>{if(n)return this.logger.info({tnx:"smtp",username:this._auth.user,action:"authfail",method:this._authMethod},"User %s failed to authenticate",JSON.stringify(this._auth.user)),t(this._formatError(n,"EAUTH",!1,"AUTH XOAUTH2"));this._responseActions.push((n=>{this._actionAUTHComplete(n,e,t)})),this._sendCommand("AUTH XOAUTH2 "+this._auth.oauth2.buildXOAuth2Token(i),"AUTH XOAUTH2 "+this._auth.oauth2.buildXOAuth2Token("/* secret */"))}))}_isDestroyedMessage(e){if(this._destroyed)return"Cannot "+e+" - smtp connection is already destroyed.";if(this._socket){if(this._socket.destroyed)return"Cannot "+e+" - smtp connection socket is already destroyed.";if(!this._socket.writable)return"Cannot "+e+" - smtp connection socket is already half-closed."}}_getHostname(){let e;try{e=o.hostname()||""}catch(t){e="localhost"}return(!e||e.indexOf(".")<0)&&(e="[127.0.0.1]"),e.match(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/)&&(e="["+e+"]"),e}},eI}function pI(){if(iI)return nI;iI=1;const e=c.Stream,t=MA(),n=m,i=jA();return nI=class extends e{constructor(e,t){if(super(),this.options=e||{},e&&e.serviceClient){if(!e.privateKey||!e.user)return void setImmediate((()=>this.emit("error",new Error('Options "privateKey" and "user" are required for service account!'))));let t=Math.min(Math.max(Number(this.options.serviceRequestTimeout)||0,0),3600);this.options.serviceRequestTimeout=t||300}if(this.logger=i.getLogger({logger:t},{component:this.options.component||"OAuth2"}),this.provisionCallback="function"==typeof this.options.provisionCallback&&this.options.provisionCallback,this.options.accessUrl=this.options.accessUrl||"https://accounts.google.com/o/oauth2/token",this.options.customHeaders=this.options.customHeaders||{},this.options.customParams=this.options.customParams||{},this.accessToken=this.options.accessToken||!1,this.options.expires&&Number(this.options.expires))this.expires=this.options.expires;else{let e=Math.max(Number(this.options.timeout)||0,0);this.expires=e&&Date.now()+1e3*e||0}}getToken(e,t){if(!e&&this.accessToken&&(!this.expires||this.expires>Date.now()))return t(null,this.accessToken);let n=(...e)=>{e[0]?this.logger.error({err:e[0],tnx:"OAUTH2",user:this.options.user,action:"renew"},"Failed generating new Access Token for %s",this.options.user):this.logger.info({tnx:"OAUTH2",user:this.options.user,action:"renew"},"Generated new Access Token for %s",this.options.user),t(...e)};this.provisionCallback?this.provisionCallback(this.options.user,!!e,((e,t,i)=>{!e&&t&&(this.accessToken=t,this.expires=i||0),n(e,t)})):this.generateToken(n)}updateToken(e,t){this.accessToken=e,t=Math.max(Number(t)||0,0),this.expires=t&&Date.now()+1e3*t||0,this.emit("token",{user:this.options.user,accessToken:e||"",expires:this.expires})}generateToken(e){let t,n;if(this.options.serviceClient){let i,r=Math.floor(Date.now()/1e3),o={iss:this.options.serviceClient,scope:this.options.scope||"https://mail.google.com/",sub:this.options.user,aud:this.options.accessUrl,iat:r,exp:r+this.options.serviceRequestTimeout};try{i=this.jwtSignRS256(o)}catch(t){return e(new Error("Can't generate token. Check your auth options"))}t={grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:i},n={grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:o}}else{if(!this.options.refreshToken)return e(new Error("Can't create new access token for user"));t={client_id:this.options.clientId||"",client_secret:this.options.clientSecret||"",refresh_token:this.options.refreshToken,grant_type:"refresh_token"},n={client_id:this.options.clientId||"",client_secret:(this.options.clientSecret||"").substr(0,6)+"...",refresh_token:(this.options.refreshToken||"").substr(0,6)+"...",grant_type:"refresh_token"}}Object.keys(this.options.customParams).forEach((e=>{t[e]=this.options.customParams[e],n[e]=this.options.customParams[e]})),this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"generate"},"Requesting token using: %s",JSON.stringify(n)),this.postRequest(this.options.accessUrl,t,this.options,((t,n)=>{let i;if(t)return e(t);try{i=JSON.parse(n.toString())}catch(t){return e(t)}if(!i||"object"!=typeof i)return this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"post"},"Response: %s",(n||"").toString()),e(new Error("Invalid authentication response"));let r={};if(Object.keys(i).forEach((e=>{r[e]="access_token"!==e?i[e]:(i[e]||"").toString().substr(0,6)+"..."})),this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"post"},"Response: %s",JSON.stringify(r)),i.error){let t=i.error;return i.error_description&&(t+=": "+i.error_description),i.error_uri&&(t+=" ("+i.error_uri+")"),e(new Error(t))}return i.access_token?(this.updateToken(i.access_token,i.expires_in),e(null,this.accessToken)):e(new Error("No access token"))}))}buildXOAuth2Token(e){let t=["user="+(this.options.user||""),"auth=Bearer "+(e||this.accessToken),"",""];return Buffer.from(t.join(""),"utf-8").toString("base64")}postRequest(e,n,i,r){let o=!1,s=[],a=0,c=t(e,{method:"post",headers:i.customHeaders,body:n,allowErrorResponse:!0});c.on("readable",(()=>{let e;for(;null!==(e=c.read());)s.push(e),a+=e.length})),c.once("error",(e=>{if(!o)return o=!0,r(e)})),c.once("end",(()=>{if(!o)return o=!0,r(null,Buffer.concat(s,a))}))}toBase64URL(e){return"string"==typeof e&&(e=Buffer.from(e)),e.toString("base64").replace(/[=]+/g,"").replace(/\+/g,"-").replace(/\//g,"_")}jwtSignRS256(e){e=['{"alg":"RS256","typ":"JWT"}',JSON.stringify(e)].map((e=>this.toBase64URL(e))).join(".");let t=n.createSign("RSA-SHA256").update(e).sign(this.options.privateKey);return e+"."+this.toBase64URL(t)}},nI}var dI,mI,hI,fI,gI,yI,vI,bI,xI,wI,EI,SI,_I,OI,CI,kI={126:{host:"smtp.126.com",port:465,secure:!0},163:{host:"smtp.163.com",port:465,secure:!0},"1und1":{host:"smtp.1und1.de",port:465,secure:!0,authMethod:"LOGIN"},Aliyun:{domains:["aliyun.com"],host:"smtp.aliyun.com",port:465,secure:!0},AOL:{domains:["aol.com"],host:"smtp.aol.com",port:587},Bluewin:{host:"smtpauths.bluewin.ch",domains:["bluewin.ch"],port:465},DebugMail:{host:"debugmail.io",port:25},DynectEmail:{aliases:["Dynect"],host:"smtp.dynect.net",port:25},Ethereal:{aliases:["ethereal.email"],host:"smtp.ethereal.email",port:587},FastMail:{domains:["fastmail.fm"],host:"smtp.fastmail.com",port:465,secure:!0},"Forward Email":{aliases:["FE","ForwardEmail"],domains:["forwardemail.net"],host:"smtp.forwardemail.net",port:465,secure:!0},"Feishu Mail":{aliases:["Feishu","FeishuMail"],domains:["www.feishu.cn"],host:"smtp.feishu.cn",port:465,secure:!0},GandiMail:{aliases:["Gandi","Gandi Mail"],host:"mail.gandi.net",port:587},Gmail:{aliases:["Google Mail"],domains:["gmail.com","googlemail.com"],host:"smtp.gmail.com",port:465,secure:!0},Godaddy:{host:"smtpout.secureserver.net",port:25},GodaddyAsia:{host:"smtp.asia.secureserver.net",port:25},GodaddyEurope:{host:"smtp.europe.secureserver.net",port:25},"hot.ee":{host:"mail.hot.ee"},Hotmail:{aliases:["Outlook","Outlook.com","Hotmail.com"],domains:["hotmail.com","outlook.com"],host:"smtp-mail.outlook.com",port:587},iCloud:{aliases:["Me","Mac"],domains:["me.com","mac.com"],host:"smtp.mail.me.com",port:587},Infomaniak:{host:"mail.infomaniak.com",domains:["ik.me","ikmail.com","etik.com"],port:587},Loopia:{host:"mailcluster.loopia.se",port:465},"mail.ee":{host:"smtp.mail.ee"},"Mail.ru":{host:"smtp.mail.ru",port:465,secure:!0},"Mailcatch.app":{host:"sandbox-smtp.mailcatch.app",port:2525},Maildev:{port:1025,ignoreTLS:!0},Mailgun:{host:"smtp.mailgun.org",port:465,secure:!0},Mailjet:{host:"in.mailjet.com",port:587},Mailosaur:{host:"mailosaur.io",port:25},Mailtrap:{host:"live.smtp.mailtrap.io",port:587},Mandrill:{host:"smtp.mandrillapp.com",port:587},Naver:{host:"smtp.naver.com",port:587},One:{host:"send.one.com",port:465,secure:!0},OpenMailBox:{aliases:["OMB","openmailbox.org"],host:"smtp.openmailbox.org",port:465,secure:!0},Outlook365:{host:"smtp.office365.com",port:587,secure:!1},OhMySMTP:{host:"smtp.ohmysmtp.com",port:587,secure:!1},Postmark:{aliases:["PostmarkApp"],host:"smtp.postmarkapp.com",port:2525},"qiye.aliyun":{host:"smtp.mxhichina.com",port:"465",secure:!0},QQ:{domains:["qq.com"],host:"smtp.qq.com",port:465,secure:!0},QQex:{aliases:["QQ Enterprise"],domains:["exmail.qq.com"],host:"smtp.exmail.qq.com",port:465,secure:!0},SendCloud:{host:"smtp.sendcloud.net",port:2525},SendGrid:{host:"smtp.sendgrid.net",port:587},SendinBlue:{aliases:["Brevo"],host:"smtp-relay.brevo.com",port:587},SendPulse:{host:"smtp-pulse.com",port:465,secure:!0},SES:{host:"email-smtp.us-east-1.amazonaws.com",port:465,secure:!0},"SES-US-EAST-1":{host:"email-smtp.us-east-1.amazonaws.com",port:465,secure:!0},"SES-US-WEST-2":{host:"email-smtp.us-west-2.amazonaws.com",port:465,secure:!0},"SES-EU-WEST-1":{host:"email-smtp.eu-west-1.amazonaws.com",port:465,secure:!0},"SES-AP-SOUTH-1":{host:"email-smtp.ap-south-1.amazonaws.com",port:465,secure:!0},"SES-AP-NORTHEAST-1":{host:"email-smtp.ap-northeast-1.amazonaws.com",port:465,secure:!0},"SES-AP-NORTHEAST-2":{host:"email-smtp.ap-northeast-2.amazonaws.com",port:465,secure:!0},"SES-AP-NORTHEAST-3":{host:"email-smtp.ap-northeast-3.amazonaws.com",port:465,secure:!0},"SES-AP-SOUTHEAST-1":{host:"email-smtp.ap-southeast-1.amazonaws.com",port:465,secure:!0},"SES-AP-SOUTHEAST-2":{host:"email-smtp.ap-southeast-2.amazonaws.com",port:465,secure:!0},Sparkpost:{aliases:["SparkPost","SparkPost Mail"],domains:["sparkpost.com"],host:"smtp.sparkpostmail.com",port:587,secure:!1},Tipimail:{host:"smtp.tipimail.com",port:587},Yahoo:{domains:["yahoo.com"],host:"smtp.mail.yahoo.com",port:465,secure:!0},Yandex:{domains:["yandex.ru"],host:"smtp.yandex.ru",port:465,secure:!0},Zoho:{host:"smtp.zoho.com",port:465,secure:!0,authMethod:"LOGIN"}};function TI(){if(mI)return dI;mI=1;const e=kI,t={};function n(e){return e.replace(/[^a-zA-Z0-9.-]/g,"").toLowerCase()}function i(e){let t=["domains","aliases"],n={};return Object.keys(e).forEach((i=>{t.indexOf(i)<0&&(n[i]=e[i])})),n}return Object.keys(e).forEach((r=>{let o=e[r];t[n(r)]=i(o),[].concat(o.aliases||[]).forEach((e=>{t[n(e)]=i(o)})),[].concat(o.domains||[]).forEach((e=>{t[n(e)]=i(o)}))})),dI=function(e){return e=n(e.split("@").pop()),t[e]||!1}}function PI(){if(fI)return hI;fI=1;const e=t,n=function(){if(oI)return rI;oI=1;const e=uI(),n=jA().assign,i=pI(),r=t;return rI=class extends r{constructor(e){if(super(),this.pool=e,this.options=e.options,this.logger=this.pool.logger,this.options.auth)switch((this.options.auth.type||"").toString().toUpperCase()){case"OAUTH2":{let e=new i(this.options.auth,this.logger);e.provisionCallback=this.pool.mailer&&this.pool.mailer.get("oauth2_provision_cb")||e.provisionCallback,this.auth={type:"OAUTH2",user:this.options.auth.user,oauth2:e,method:"XOAUTH2"},e.on("token",(e=>this.pool.mailer.emit("token",e))),e.on("error",(e=>this.emit("error",e)));break}default:if(!this.options.auth.user&&!this.options.auth.pass)break;this.auth={type:(this.options.auth.type||"").toString().toUpperCase()||"LOGIN",user:this.options.auth.user,credentials:{user:this.options.auth.user||"",pass:this.options.auth.pass,options:this.options.auth.options},method:(this.options.auth.method||"").trim().toUpperCase()||this.options.authMethod||!1}}this._connection=!1,this._connected=!1,this.messages=0,this.available=!0}connect(t){this.pool.getSocket(this.options,((i,r)=>{if(i)return t(i);let o=!1,s=this.options;r&&r.connection&&(this.logger.info({tnx:"proxy",remoteAddress:r.connection.remoteAddress,remotePort:r.connection.remotePort,destHost:s.host||"",destPort:s.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",r.connection.remoteAddress,r.connection.remotePort,s.host||"",s.port||""),s=n(!1,s),Object.keys(r).forEach((e=>{s[e]=r[e]}))),this.connection=new e(s),this.connection.once("error",(e=>{if(this.emit("error",e),!o)return o=!0,t(e)})),this.connection.once("end",(()=>{if(this.close(),o)return;o=!0;let e=setTimeout((()=>{if(o)return;let e=new Error("Unexpected socket close");this.connection&&this.connection._socket&&this.connection._socket.upgrading&&(e.code="ETLS"),t(e)}),1e3);try{e.unref()}catch(e){}})),this.connection.connect((()=>{if(!o)return this.auth&&(this.connection.allowsAuth||s.forceAuth)?void this.connection.login(this.auth,(e=>{if(!o){if(o=!0,e)return this.connection.close(),this.emit("error",e),t(e);this._connected=!0,t(null,!0)}})):(o=!0,this._connected=!0,t(null,!0))}))}))}send(e,t){if(!this._connected)return this.connect((n=>n?t(n):this.send(e,t)));let n=e.message.getEnvelope(),i=e.message.messageId(),r=[].concat(n.to||[]);r.length>3&&r.push("...and "+r.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:i,cid:this.id},"Sending message %s using #%s to <%s>",i,this.id,r.join(", ")),e.data.dsn&&(n.dsn=e.data.dsn),this.connection.send(n,e.message.createReadStream(),((e,r)=>{if(this.messages++,e)return this.connection.close(),this.emit("error",e),t(e);r.envelope={from:n.from,to:n.to},r.messageId=i,setImmediate((()=>{let e;this.messages>=this.options.maxMessages?(e=new Error("Resource exhausted"),e.code="EMAXLIMIT",this.connection.close(),this.emit("error",e)):this.pool._checkRateLimit((()=>{this.available=!0,this.emit("available")}))})),t(null,r)}))}close(){this._connected=!1,this.auth&&this.auth.oauth2&&this.auth.oauth2.removeAllListeners(),this.connection&&this.connection.close(),this.emit("close")}},rI}(),i=uI(),r=TI(),o=jA(),s=RA;return hI=class extends e{constructor(e){let t;super(),"string"==typeof(e=e||{})&&(e={url:e});let n=e.service;"function"==typeof e.getSocket&&(this.getSocket=e.getSocket),e.url&&(t=o.parseConnectionUrl(e.url),n=n||t.service),this.options=o.assign(!1,e,t,n&&r(n)),this.options.maxConnections=this.options.maxConnections||5,this.options.maxMessages=this.options.maxMessages||100,this.logger=o.getLogger(this.options,{component:this.options.component||"smtp-pool"});let a=new i(this.options);this.name="SMTP (pool)",this.version=s.version+"[client:"+a.version+"]",this._rateLimit={counter:0,timeout:null,waiting:[],checkpoint:!1,delta:Number(this.options.rateDelta)||1e3,limit:Number(this.options.rateLimit)||0},this._closed=!1,this._queue=[],this._connections=[],this._connectionCounter=0,this.idling=!0,setImmediate((()=>{this.idling&&this.emit("idle")}))}getSocket(e,t){return setImmediate((()=>t(null,!1)))}send(e,t){return!this._closed&&(this._queue.push({mail:e,requeueAttempts:0,callback:t}),this.idling&&this._queue.length>=this.options.maxConnections&&(this.idling=!1),setImmediate((()=>this._processMessages())),!0)}close(){let e,t=this._connections.length;if(this._closed=!0,clearTimeout(this._rateLimit.timeout),!t&&!this._queue.length)return;for(let n=t-1;n>=0;n--)this._connections[n]&&this._connections[n].available&&(e=this._connections[n],e.close(),this.logger.info({tnx:"connection",cid:e.id,action:"removed"},"Connection #%s removed",e.id));if(t&&!this._connections.length&&this.logger.debug({tnx:"connection"},"All connections removed"),!this._queue.length)return;let n=()=>{if(!this._queue.length)return void this.logger.debug({tnx:"connection"},"Pending queue entries cleared");let t=this._queue.shift();if(t&&"function"==typeof t.callback)try{t.callback(new Error("Connection pool was closed"))}catch(t){this.logger.error({err:t,tnx:"callback",cid:e.id},"Callback error for #%s: %s",e.id,t.message)}setImmediate(n)};setImmediate(n)}_processMessages(){let e,t,n;if(this._closed)return;if(!this._queue.length)return void(this.idling||(this.idling=!0,this.emit("idle")));for(t=0,n=this._connections.length;t<n;t++)if(this._connections[t].available){e=this._connections[t];break}if(!e&&this._connections.length<this.options.maxConnections&&(e=this._createConnection()),!e)return void(this.idling=!1);!this.idling&&this._queue.length<this.options.maxConnections&&(this.idling=!0,this.emit("idle"));let i=e.queueEntry=this._queue.shift();i.messageId=(e.queueEntry.mail.message.getHeader("message-id")||"").replace(/[<>\s]/g,""),e.available=!1,this.logger.debug({tnx:"pool",cid:e.id,messageId:i.messageId,action:"assign"},"Assigned message <%s> to #%s (%s)",i.messageId,e.id,e.messages+1),this._rateLimit.limit&&(this._rateLimit.counter++,this._rateLimit.checkpoint||(this._rateLimit.checkpoint=Date.now())),e.send(i.mail,((t,n)=>{if(i===e.queueEntry){try{i.callback(t,n)}catch(t){this.logger.error({err:t,tnx:"callback",cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=!1}}))}_createConnection(){let e=new n(this);return e.id=++this._connectionCounter,this.logger.info({tnx:"pool",cid:e.id,action:"conection"},"Created new pool resource #%s",e.id),e.on("available",(()=>{this.logger.debug({tnx:"connection",cid:e.id,action:"available"},"Connection #%s became available",e.id),this._closed?this.close():this._processMessages()})),e.once("error",(t=>{if("EMAXLIMIT"!==t.code?this.logger.error({err:t,tnx:"pool",cid:e.id},"Pool Error for #%s: %s",e.id,t.message):this.logger.debug({tnx:"pool",cid:e.id,action:"maxlimit"},"Max messages limit exchausted for #%s",e.id),e.queueEntry){try{e.queueEntry.callback(t)}catch(t){this.logger.error({err:t,tnx:"callback",cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=!1}this._removeConnection(e),this._continueProcessing()})),e.once("close",(()=>{this.logger.info({tnx:"connection",cid:e.id,action:"closed"},"Connection #%s was closed",e.id),this._removeConnection(e),e.queueEntry?setTimeout((()=>{e.queueEntry&&(this._shouldRequeuOnConnectionClose(e.queueEntry)?this._requeueEntryOnConnectionClose(e):this._failDeliveryOnConnectionClose(e)),this._continueProcessing()}),50):this._continueProcessing()})),this._connections.push(e),e}_shouldRequeuOnConnectionClose(e){return void 0===this.options.maxRequeues||this.options.maxRequeues<0||e.requeueAttempts<this.options.maxRequeues}_failDeliveryOnConnectionClose(e){if(e.queueEntry&&e.queueEntry.callback){try{e.queueEntry.callback(new Error("Reached maximum number of retries after connection was closed"))}catch(t){this.logger.error({err:t,tnx:"callback",messageId:e.queueEntry.messageId,cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=!1}}_requeueEntryOnConnectionClose(e){e.queueEntry.requeueAttempts=e.queueEntry.requeueAttempts+1,this.logger.debug({tnx:"pool",cid:e.id,messageId:e.queueEntry.messageId,action:"requeue"},"Re-queued message <%s> for #%s. Attempt: #%s",e.queueEntry.messageId,e.id,e.queueEntry.requeueAttempts),this._queue.unshift(e.queueEntry),e.queueEntry=!1}_continueProcessing(){this._closed?this.close():setTimeout((()=>this._processMessages()),100)}_removeConnection(e){let t=this._connections.indexOf(e);-1!==t&&this._connections.splice(t,1)}_checkRateLimit(e){if(!this._rateLimit.limit)return e();let t=Date.now();return this._rateLimit.counter<this._rateLimit.limit?e():(this._rateLimit.waiting.push(e),this._rateLimit.checkpoint<=t-this._rateLimit.delta?this._clearRateLimit():void(this._rateLimit.timeout||(this._rateLimit.timeout=setTimeout((()=>this._clearRateLimit()),this._rateLimit.delta-(t-this._rateLimit.checkpoint)),this._rateLimit.checkpoint=t)))}_clearRateLimit(){for(clearTimeout(this._rateLimit.timeout),this._rateLimit.timeout=null,this._rateLimit.counter=0,this._rateLimit.checkpoint=!1;this._rateLimit.waiting.length;){let e=this._rateLimit.waiting.shift();setImmediate(e)}}isIdle(){return this.idling}verify(e){let t;e||(t=new Promise(((t,n)=>{e=o.callbackPromise(t,n)})));let r=new n(this).auth;return this.getSocket(this.options,((t,n)=>{if(t)return e(t);let s=this.options;n&&n.connection&&(this.logger.info({tnx:"proxy",remoteAddress:n.connection.remoteAddress,remotePort:n.connection.remotePort,destHost:s.host||"",destPort:s.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",n.connection.remoteAddress,n.connection.remotePort,s.host||"",s.port||""),s=o.assign(!1,s),Object.keys(n).forEach((e=>{s[e]=n[e]})));let a=new i(s),c=!1;a.once("error",(t=>{if(!c)return c=!0,a.close(),e(t)})),a.once("end",(()=>{if(!c)return c=!0,e(new Error("Connection closed"))}));let l=()=>{if(!c)return c=!0,a.quit(),e(null,!0)};a.connect((()=>{if(!c)if(r&&(a.allowsAuth||s.forceAuth))a.login(r,(t=>{if(!c)return t?(c=!0,a.close(),e(t)):void l()}));else{if(!r&&a.allowsAuth&&s.forceAuth){let t=new Error("Authentication info was not provided");return t.code="NoAuth",c=!0,a.close(),e(t)}l()}}))})),t}},hI}function AI(){if(OI)return _I;OI=1;const e=t,n=RA,i=jA(),r=UA();return _I=class extends e{constructor(e){super(),e=e||{},this.options=e||{},this.ses=this.options.SES,this.name="SESTransport",this.version=n.version,this.logger=i.getLogger(this.options,{component:this.options.component||"ses-transport"}),this.maxConnections=Number(this.options.maxConnections)||1/0,this.connections=0,this.sendingRate=Number(this.options.sendingRate)||1/0,this.sendingRateTTL=null,this.rateInterval=1e3,this.rateMessages=[],this.pending=[],this.idling=!0,setImmediate((()=>{this.idling&&this.emit("idle")}))}send(e,t){return this.connections>=this.maxConnections?(this.idling=!1,this.pending.push({mail:e,callback:t})):this._checkSendingRate()?void this._send(e,((...e)=>{setImmediate((()=>t(...e))),this._sent()})):(this.idling=!1,this.pending.push({mail:e,callback:t}))}_checkRatedQueue(){if(this.connections>=this.maxConnections||!this._checkSendingRate())return;if(!this.pending.length)return void(this.idling||(this.idling=!0,this.emit("idle")));let e=this.pending.shift();this._send(e.mail,((...t)=>{setImmediate((()=>e.callback(...t))),this._sent()}))}_checkSendingRate(){clearTimeout(this.sendingRateTTL);let e=Date.now(),t=!1;for(let n=this.rateMessages.length-1;n>=0;n--)this.rateMessages[n].ts>=e-this.rateInterval&&(!t||this.rateMessages[n].ts<t)&&(t=this.rateMessages[n].ts),this.rateMessages[n].ts<e-this.rateInterval&&!this.rateMessages[n].pending&&this.rateMessages.splice(n,1);if(this.rateMessages.length<this.sendingRate)return!0;let n=Math.max(t+1001,e+20);this.sendingRateTTL=setTimeout((()=>this._checkRatedQueue()),e-n);try{this.sendingRateTTL.unref()}catch(e){}return!1}_sent(){this.connections--,this._checkRatedQueue()}isIdle(){return this.idling}_send(e,t){let n={ts:Date.now(),pending:!0};this.connections++,this.rateMessages.push(n);let i=e.data.envelope||e.message.getEnvelope(),o=e.message.messageId(),s=[].concat(i.to||[]);s.length>3&&s.push("...and "+s.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:o},"Sending message %s to <%s>",o,s.join(", "));setImmediate((()=>(t=>{e.data._dkim||(e.data._dkim={}),e.data._dkim.skipFields&&"string"==typeof e.data._dkim.skipFields?e.data._dkim.skipFields+=":date:message-id":e.data._dkim.skipFields="date:message-id";let n=e.message.createReadStream(),i=n.pipe(new r),o=[],s=0;i.on("readable",(()=>{let e;for(;null!==(e=i.read());)o.push(e),s+=e.length})),n.once("error",(e=>i.emit("error",e))),i.once("error",(e=>{t(e)})),i.once("end",(()=>t(null,Buffer.concat(o,s))))})(((r,s)=>{if(r)return this.logger.error({err:r,tnx:"send",messageId:o},"Failed creating message for %s. %s",o,r.message),n.pending=!1,t(r);let a={RawMessage:{Data:s},Source:i.from,Destinations:i.to};Object.keys(e.data.ses||{}).forEach((t=>{a[t]=e.data.ses[t]}));let c=(this.ses.aws?this.ses.ses:this.ses)||{},l=this.ses.aws||{};var u;u=(e,r)=>{let u;!e&&r||(r="us-east-1"),u="function"==typeof c.send&&l.SendRawEmailCommand?c.send(new l.SendRawEmailCommand(a)):c.sendRawEmail(a).promise(),u.then((e=>{"us-east-1"===r&&(r="email"),n.pending=!1,t(null,{envelope:{from:i.from,to:i.to},messageId:"<"+e.MessageId+(/@/.test(e.MessageId)?"":"@"+r+".amazonses.com")+">",response:e.MessageId,raw:s})})).catch((e=>{this.logger.error({err:e,tnx:"send"},"Send error for %s: %s",o,e.message),n.pending=!1,t(e)}))},c.config&&"function"==typeof c.config.region?c.config.region().then((e=>u(null,e))).catch((e=>u(e))):u(null,c.config&&c.config.region||"us-east-1")}))))}verify(e){let t,n=(this.ses.aws?this.ses.ses:this.ses)||{},r=this.ses.aws||{};const o={RawMessage:{Data:"From: invalid@invalid\r\nTo: invalid@invalid\r\n Subject: Invalid\r\n\r\nInvalid"},Source:"invalid@invalid",Destinations:["invalid@invalid"]};e||(t=new Promise(((t,n)=>{e=i.callbackPromise(t,n)})));const s=t=>t&&"InvalidParameterValue"!==(t.code||t.Code)?e(t):e(null,!0);return"function"==typeof n.send&&r.SendRawEmailCommand?(o.RawMessage.Data=Buffer.from(o.RawMessage.Data),n.send(new r.SendRawEmailCommand(o),s)):n.sendRawEmail(o,s),t}},_I}var II=function(){if(CI)return tA;CI=1;const e=lI(),n=jA(),i=PI(),r=function(){if(yI)return gI;yI=1;const e=t,n=uI(),i=TI(),r=jA(),o=pI(),s=RA;return gI=class extends e{constructor(e){let t;super(),"string"==typeof(e=e||{})&&(e={url:e});let o=e.service;"function"==typeof e.getSocket&&(this.getSocket=e.getSocket),e.url&&(t=r.parseConnectionUrl(e.url),o=o||t.service),this.options=r.assign(!1,e,t,o&&i(o)),this.logger=r.getLogger(this.options,{component:this.options.component||"smtp-transport"});let a=new n(this.options);this.name="SMTP",this.version=s.version+"[client:"+a.version+"]",this.options.auth&&(this.auth=this.getAuth({}))}getSocket(e,t){return setImmediate((()=>t(null,!1)))}getAuth(e){if(!e)return this.auth;let t=!1,n={};if(this.options.auth&&"object"==typeof this.options.auth&&Object.keys(this.options.auth).forEach((e=>{t=!0,n[e]=this.options.auth[e]})),e&&"object"==typeof e&&Object.keys(e).forEach((i=>{t=!0,n[i]=e[i]})),!t)return!1;if("OAUTH2"===(n.type||"").toString().toUpperCase()){if(!n.service&&!n.user)return!1;let e=new o(n,this.logger);return e.provisionCallback=this.mailer&&this.mailer.get("oauth2_provision_cb")||e.provisionCallback,e.on("token",(e=>this.mailer.emit("token",e))),e.on("error",(e=>this.emit("error",e))),{type:"OAUTH2",user:n.user,oauth2:e,method:"XOAUTH2"}}return{type:(n.type||"").toString().toUpperCase()||"LOGIN",user:n.user,credentials:{user:n.user||"",pass:n.pass,options:n.options},method:(n.method||"").trim().toUpperCase()||this.options.authMethod||!1}}send(e,t){this.getSocket(this.options,((i,o)=>{if(i)return t(i);let s=!1,a=this.options;o&&o.connection&&(this.logger.info({tnx:"proxy",remoteAddress:o.connection.remoteAddress,remotePort:o.connection.remotePort,destHost:a.host||"",destPort:a.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",o.connection.remoteAddress,o.connection.remotePort,a.host||"",a.port||""),a=r.assign(!1,a),Object.keys(o).forEach((e=>{a[e]=o[e]})));let c=new n(a);c.once("error",(e=>{if(!s)return s=!0,c.close(),t(e)})),c.once("end",(()=>{if(s)return;let e=setTimeout((()=>{if(s)return;s=!0;let e=new Error("Unexpected socket close");c&&c._socket&&c._socket.upgrading&&(e.code="ETLS"),t(e)}),1e3);try{e.unref()}catch(e){}}));let l=()=>{let n=e.message.getEnvelope(),i=e.message.messageId(),r=[].concat(n.to||[]);r.length>3&&r.push("...and "+r.splice(2).length+" more"),e.data.dsn&&(n.dsn=e.data.dsn),this.logger.info({tnx:"send",messageId:i},"Sending message %s to <%s>",i,r.join(", ")),c.send(n,e.message.createReadStream(),((e,r)=>{if(s=!0,c.close(),e)return this.logger.error({err:e,tnx:"send"},"Send error for %s: %s",i,e.message),t(e);r.envelope={from:n.from,to:n.to},r.messageId=i;try{return t(null,r)}catch(e){this.logger.error({err:e,tnx:"callback"},"Callback error for %s: %s",i,e.message)}}))};c.connect((()=>{if(s)return;let n=this.getAuth(e.data.auth);n&&(c.allowsAuth||a.forceAuth)?c.login(n,(e=>{if(n&&n!==this.auth&&n.oauth2&&n.oauth2.removeAllListeners(),!s)return e?(s=!0,c.close(),t(e)):void l()})):l()}))}))}verify(e){let t;return e||(t=new Promise(((t,n)=>{e=r.callbackPromise(t,n)}))),this.getSocket(this.options,((t,i)=>{if(t)return e(t);let o=this.options;i&&i.connection&&(this.logger.info({tnx:"proxy",remoteAddress:i.connection.remoteAddress,remotePort:i.connection.remotePort,destHost:o.host||"",destPort:o.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",i.connection.remoteAddress,i.connection.remotePort,o.host||"",o.port||""),o=r.assign(!1,o),Object.keys(i).forEach((e=>{o[e]=i[e]})));let s=new n(o),a=!1;s.once("error",(t=>{if(!a)return a=!0,s.close(),e(t)})),s.once("end",(()=>{if(!a)return a=!0,e(new Error("Connection closed"))}));let c=()=>{if(!a)return a=!0,s.quit(),e(null,!0)};s.connect((()=>{if(a)return;let t=this.getAuth({});if(t&&(s.allowsAuth||o.forceAuth))s.login(t,(t=>{if(!a)return t?(a=!0,s.close(),e(t)):void c()}));else{if(!t&&s.allowsAuth&&o.forceAuth){let t=new Error("Authentication info was not provided");return t.code="NoAuth",a=!0,s.close(),e(t)}c()}}))})),t}close(){this.auth&&this.auth.oauth2&&this.auth.oauth2.removeAllListeners(),this.emit("close")}},gI}(),o=function(){if(bI)return vI;bI=1;const e=f.spawn,t=RA,n=jA();return vI=class{constructor(i){i=i||{},this._spawn=e,this.options=i||{},this.name="Sendmail",this.version=t.version,this.path="sendmail",this.args=!1,this.winbreak=!1,this.logger=n.getLogger(this.options,{component:this.options.component||"sendmail"}),i&&("string"==typeof i?this.path=i:"object"==typeof i&&(i.path&&(this.path=i.path),Array.isArray(i.args)&&(this.args=i.args),this.winbreak=["win","windows","dos","\r\n"].includes((i.newline||"").toString().toLowerCase())))}send(e,t){e.message.keepBcc=!0;let n,i,r,o=e.data.envelope||e.message.getEnvelope(),s=e.message.messageId();if([].concat(o.from||[]).concat(o.to||[]).some((e=>/^-/.test(e))))return t(new Error("Can not send mail. Invalid envelope addresses."));n=this.args?["-i"].concat(this.args).concat(o.to):["-i"].concat(o.from?["-f",o.from]:[]).concat(o.to);let a=n=>{if(!r)return r=!0,"function"==typeof t?n?t(n):t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:s,response:"Messages queued for delivery"}):void 0};try{i=this._spawn(this.path,n)}catch(e){return this.logger.error({err:e,tnx:"spawn",messageId:s},"Error occurred while spawning sendmail. %s",e.message),a(e)}if(!i)return a(new Error("sendmail was not found"));{i.on("error",(e=>{this.logger.error({err:e,tnx:"spawn",messageId:s},"Error occurred when sending message %s. %s",s,e.message),a(e)})),i.once("exit",(e=>{if(!e)return a();let t;t=127===e?new Error("Sendmail command not found, process exited with code "+e):new Error("Sendmail exited with code "+e),this.logger.error({err:t,tnx:"stdin",messageId:s},"Error sending message %s to sendmail. %s",s,t.message),a(t)})),i.once("close",a),i.stdin.on("error",(e=>{this.logger.error({err:e,tnx:"stdin",messageId:s},"Error occurred when piping message %s to sendmail. %s",s,e.message),a(e)}));let t=[].concat(o.to||[]);t.length>3&&t.push("...and "+t.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:s},"Sending message %s to <%s>",s,t.join(", "));let n=e.message.createReadStream();n.once("error",(e=>{this.logger.error({err:e,tnx:"stdin",messageId:s},"Error occurred when generating message %s. %s",s,e.message),i.kill("SIGINT"),a(e)})),n.pipe(i.stdin)}}}}(),s=function(){if(wI)return xI;wI=1;const e=RA,t=jA();return xI=class{constructor(n){n=n||{},this.options=n||{},this.name="StreamTransport",this.version=e.version,this.logger=t.getLogger(this.options,{component:this.options.component||"stream-transport"}),this.winbreak=["win","windows","dos","\r\n"].includes((n.newline||"").toString().toLowerCase())}send(e,t){e.message.keepBcc=!0;let n=e.data.envelope||e.message.getEnvelope(),i=e.message.messageId(),r=[].concat(n.to||[]);r.length>3&&r.push("...and "+r.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:i},"Sending message %s to <%s> using %s line breaks",i,r.join(", "),this.winbreak?"<CR><LF>":"<LF>"),setImmediate((()=>{let n;try{n=e.message.createReadStream()}catch(e){return this.logger.error({err:e,tnx:"send",messageId:i},"Creating send stream failed for %s. %s",i,e.message),t(e)}if(!this.options.buffer)return n.once("error",(e=>{this.logger.error({err:e,tnx:"send",messageId:i},"Failed creating message for %s. %s",i,e.message)})),t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:i,message:n});let r=[],o=0;n.on("readable",(()=>{let e;for(;null!==(e=n.read());)r.push(e),o+=e.length})),n.once("error",(e=>(this.logger.error({err:e,tnx:"send",messageId:i},"Failed creating message for %s. %s",i,e.message),t(e)))),n.on("end",(()=>t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:i,message:Buffer.concat(r,o)})))}))}},xI}(),a=function(){if(SI)return EI;SI=1;const e=RA,t=jA();return EI=class{constructor(n){n=n||{},this.options=n||{},this.name="JSONTransport",this.version=e.version,this.logger=t.getLogger(this.options,{component:this.options.component||"json-transport"})}send(e,t){e.message.keepBcc=!0;let n=e.data.envelope||e.message.getEnvelope(),i=e.message.messageId(),r=[].concat(n.to||[]);r.length>3&&r.push("...and "+r.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:i},"Composing JSON structure of %s to <%s>",i,r.join(", ")),setImmediate((()=>{e.normalize(((e,r)=>e?(this.logger.error({err:e,tnx:"send",messageId:i},"Failed building JSON structure for %s. %s",i,e.message),t(e)):(delete r.envelope,delete r.normalizedHeaders,t(null,{envelope:n,messageId:i,message:this.options.skipEncoding?r:JSON.stringify(r)}))))}))}}}(),c=AI(),l=MA(),u=RA,p=(process.env.ETHEREAL_API||"https://api.nodemailer.com").replace(/\/+$/,""),d=(process.env.ETHEREAL_WEB||"https://ethereal.email").replace(/\/+$/,""),m=(process.env.ETHEREAL_API_KEY||"").replace(/\s*/g,"")||null,h=["true","yes","y","1"].includes((process.env.ETHEREAL_CACHE||"yes").toString().trim().toLowerCase());let g=!1;return tA.createTransport=function(t,l){let u,p,d;return("object"==typeof t&&"function"!=typeof t.send||"string"==typeof t&&/^(smtps?|direct):/i.test(t))&&(p=(u="string"==typeof t?t:t.url)?n.parseConnectionUrl(u):t,t=p.pool?new i(p):p.sendmail?new o(p):p.streamTransport?new s(p):p.jsonTransport?new a(p):p.SES?new c(p):new r(p)),d=new e(t,p,l),d},tA.createTestAccount=function(e,t){let i;if(t||"function"!=typeof e||(t=e,e=!1),t||(i=new Promise(((e,i)=>{t=n.callbackPromise(e,i)}))),h&&g)return setImmediate((()=>t(null,g))),i;e=e||p;let r=[],o=0,s={},a={requestor:u.name,version:u.version};m&&(s.Authorization="Bearer "+m);let c=l(e+"/user",{contentType:"application/json",method:"POST",headers:s,body:Buffer.from(JSON.stringify(a))});return c.on("readable",(()=>{let e;for(;null!==(e=c.read());)r.push(e),o+=e.length})),c.once("error",(e=>t(e))),c.once("end",(()=>{let e,n,i=Buffer.concat(r,o);try{e=JSON.parse(i.toString())}catch(e){n=e}return n?t(n):"success"!==e.status||e.error?t(new Error(e.error||"Request failed")):(delete e.status,g=e,void t(null,g))})),i},tA.getTestMessageUrl=function(e){if(!e||!e.response)return!1;let t=new Map;return e.response.replace(/\[([^\]]+)\]$/,((e,n)=>{n.replace(/\b([A-Z0-9]+)=([^\s]+)/g,((e,n,i)=>{t.set(n,i)}))})),!(!t.has("STATUS")||!t.has("MSGID"))&&(g.web||d)+"/message/"+t.get("MSGID")},tA}();const RI={clientConfig:{region:"eu-west-1"}};var MI,jI,$I={},NI={};function DI(){if(jI)return MI;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,n,r){return n=o(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,i()?Reflect.construct(n,r||[],o(t).constructor):n.apply(t,r))}function n(e){var t="function"==typeof Map?new Map:void 0;return n=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(i())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var s=new(e.bind.apply(e,o));return n&&r(s,n.prototype),s}(e,arguments,o(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),r(n,e)},n(e)}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}jI=1;var s=function(e){function n(e){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),i=t(this,n,["Format functions must be synchronous taking a two arguments: (info, opts)\nFound: ".concat(e.toString().split("\n")[0],"\n")]),Error.captureStackTrace(i,n),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)}(n,e),function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(n)}(n(Error));return MI=function(e){if(e.length>2)throw new s(e);function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=e}function n(e){return new t(e)}return t.prototype.transform=e,n.Format=t,n},MI}var LI,zI,FI,UI,BI,HI={exports:{}},qI={exports:{}},VI={exports:{}},GI={exports:{}};function WI(){return LI||(LI=1,function(e){var t={};e.exports=t;var n={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(n).forEach((function(e){var i=n[e],r=t[e]=[];r.open="["+i[0]+"m",r.close="["+i[1]+"m"}))}(GI)),GI.exports}function KI(){return FI?zI:(FI=1,zI=function(e,t){var n=(t=t||process.argv||[]).indexOf("--"),i=/^-{1,2}/.test(e)?"":"--",r=t.indexOf(i+e);return-1!==r&&(-1===n||r<n)})}function YI(){if(BI)return UI;BI=1;var e=p,t=KI(),n=[],i=void 0;function r(r){var o=function(r){if(!1===i)return 0;if(t("color=16m")||t("color=full")||t("color=truecolor"))return 3;if(t("color=256"))return 2;if(r&&!r.isTTY&&!0!==i)return 0;var o=i?1:0;if("win32"===process.platform){var s=e.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in n)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((function(e){return e in n}))||"codeship"===n.CI_NAME?1:o;if("TEAMCITY_VERSION"in n)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(n.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in n){var a=parseInt((n.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(n.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(n.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(n.TERM)||"COLORTERM"in n?1:o}(r);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(o)}return t("no-color")||t("no-colors")||t("color=false")?i=!1:(t("color")||t("colors")||t("color=true")||t("color=always"))&&(i=!0),"FORCE_COLOR"in n&&(i=0===n.FORCE_COLOR.length||0!==parseInt(n.FORCE_COLOR,10)),UI={supportsColor:r,stdout:r(process.stdout),stderr:r(process.stderr)}}var QI,JI={exports:{}};var XI,ZI={exports:{}};var eR,tR={exports:{}};var nR,iR={exports:{}};var rR,oR={exports:{}};var sR,aR,cR,lR={exports:{}};function uR(){return aR||(aR=1,function(e){var t={};e.exports=t,t.themes={};var n=i,r=t.styles=WI(),o=Object.defineProperties,s=new RegExp(/[\r\n]+/g);t.supportsColor=YI().supportsColor,void 0===t.enabled&&(t.enabled=!1!==t.supportsColor()),t.enable=function(){t.enabled=!0},t.disable=function(){t.enabled=!1},t.stripColors=t.strip=function(e){return(""+e).replace(/\x1B\[\d+m/g,"")},t.stylize=function(e,n){if(!t.enabled)return e+"";var i=r[n];return!i&&n in t?t[n](e):i.open+e+i.close};var a=/[|\\{}()[\]^$+*?.]/g;function c(e){var t=function e(){return d.apply(e,arguments)};return t._styles=e,t.__proto__=p,t}var l,u=(l={},r.grey=r.gray,Object.keys(r).forEach((function(e){r[e].closeRe=new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(a,"\\$&")}(r[e].close),"g"),l[e]={get:function(){return c(this._styles.concat(e))}}})),l),p=o((function(){}),u);function d(){var e=Array.prototype.slice.call(arguments).map((function(e){return null!=e&&e.constructor===String?e:n.inspect(e)})).join(" ");if(!t.enabled||!e)return e;for(var i=-1!=e.indexOf("\n"),o=this._styles,a=o.length;a--;){var c=r[o[a]];e=c.open+e.replace(c.closeRe,c.open)+c.close,i&&(e=e.replace(s,(function(e){return c.close+e+c.open})))}return e}t.setTheme=function(e){if("string"!=typeof e)for(var n in e)!function(n){t[n]=function(i){if("object"==typeof e[n]){var r=i;for(var o in e[n])r=t[e[n][o]](r);return r}return t[e[n]](i)}}(n);else console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));")};var m=function(e,t){var n=t.split("");return(n=n.map(e)).join("")};for(var h in t.trap=(QI||(QI=1,function(e){e.exports=function(e,t){var n="";e=(e=e||"Run the trap, drop the bass").split("");var i={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};return e.forEach((function(e){e=e.toLowerCase();var t=i[e]||[" "],r=Math.floor(Math.random()*t.length);n+=void 0!==i[e]?i[e][r]:e})),n}}(JI)),JI.exports),t.zalgo=(XI||(XI=1,function(e){e.exports=function(e,t){e=e||" he is here ";var n={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},i=[].concat(n.up,n.down,n.mid);function r(e){return Math.floor(Math.random()*e)}function o(e){var t=!1;return i.filter((function(n){t=n===e})),t}return function(e,t){var i,s,a="";for(s in(t=t||{}).up=void 0===t.up||t.up,t.mid=void 0===t.mid||t.mid,t.down=void 0===t.down||t.down,t.size=void 0!==t.size?t.size:"maxi",e=e.split(""))if(!o(s)){switch(a+=e[s],i={up:0,down:0,mid:0},t.size){case"mini":i.up=r(8),i.mid=r(2),i.down=r(8);break;case"maxi":i.up=r(16)+3,i.mid=r(4)+1,i.down=r(64)+3;break;default:i.up=r(8)+1,i.mid=r(6)/2,i.down=r(8)+1}var c=["up","mid","down"];for(var l in c)for(var u=c[l],p=0;p<=i[u];p++)t[u]&&(a+=n[u][r(n[u].length)])}return a}(e,t)}}(ZI)),ZI.exports),t.maps={},t.maps.america=(eR||(eR=1,function(e){e.exports=function(e){return function(t,n,i){if(" "===t)return t;switch(n%3){case 0:return e.red(t);case 1:return e.white(t);case 2:return e.blue(t)}}}}(tR)),tR.exports)(t),t.maps.zebra=(nR||(nR=1,function(e){e.exports=function(e){return function(t,n,i){return n%2==0?t:e.inverse(t)}}}(iR)),iR.exports)(t),t.maps.rainbow=(rR||(rR=1,function(e){e.exports=function(e){var t=["red","yellow","green","blue","magenta"];return function(n,i,r){return" "===n?n:e[t[i++%t.length]](n)}}}(oR)),oR.exports)(t),t.maps.random=(sR||(sR=1,function(e){e.exports=function(e){var t=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(n,i,r){return" "===n?n:e[t[Math.round(Math.random()*(t.length-2))]](n)}}}(lR)),lR.exports)(t),t.maps)!function(e){t[e]=function(n){return m(t.maps[e],n)}}(h);o(t,function(){var e={};return Object.keys(u).forEach((function(t){e[t]={get:function(){return c([t])}}})),e}())}(VI)),VI.exports}function pR(){return cR||(cR=1,function(e){var t=uR();e.exports=t}(qI)),qI.exports}var dR,mR={},hR={},fR={};var gR,yR={};var vR,bR,xR,wR,ER,SR,_R,OR,CR={};function kR(){return xR||(xR=1,function(e){Object.defineProperty(e,"LEVEL",{value:Symbol.for("level")}),Object.defineProperty(e,"MESSAGE",{value:Symbol.for("message")}),Object.defineProperty(e,"SPLAT",{value:Symbol.for("splat")}),Object.defineProperty(e,"configs",{value:(bR||(bR=1,function(e){Object.defineProperty(e,"cli",{value:(dR||(dR=1,fR.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9},fR.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}),fR)}),Object.defineProperty(e,"npm",{value:(gR||(gR=1,yR.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6},yR.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}),yR)}),Object.defineProperty(e,"syslog",{value:(vR||(vR=1,CR.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7},CR.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}),CR)})}(hR)),hR)})}(mR)),mR}function TR(){if(wR)return HI.exports;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}wR=1;var i=pR(),r=kR(),o=r.LEVEL,s=r.MESSAGE;i.enabled=!0;var a=/\s+/,c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t.colors&&this.addColors(t.colors),this.options=t}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"addColors",value:function(t){return e.addColors(t)}},{key:"colorize",value:function(t,n,r){if(void 0===r&&(r=n),!Array.isArray(e.allColors[t]))return i[e.allColors[t]](r);for(var o=0,s=e.allColors[t].length;o<s;o++)r=i[e.allColors[t][o]](r);return r}},{key:"transform",value:function(e,t){return t.all&&"string"==typeof e[s]&&(e[s]=this.colorize(e[o],e.level,e[s])),(t.level||t.all||!t.message)&&(e.level=this.colorize(e[o],e.level)),(t.all||t.message)&&(e.message=this.colorize(e[o],e.level,e.message)),e}}],[{key:"addColors",value:function(t){var n=Object.keys(t).reduce((function(e,n){return e[n]=a.test(t[n])?t[n].split(a):t[n],e}),{});return e.allColors=Object.assign({},e.allColors||{},n),e.allColors}}])}();return HI.exports=function(e){return new c(e)},HI.exports.Colorizer=HI.exports.Format=c,HI.exports}function PR(){if(OR)return _R;OR=1;var e=DI();return _R=e((function(e){return e.message="\t".concat(e.message),e}))}var AR,IR,RR={exports:{}},MR={exports:{}};function jR(){if(AR)return MR.exports;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function i(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,r(i.key),i)}}function r(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}AR=1;var o=kR(),s=o.configs,a=o.LEVEL,c=o.MESSAGE,l=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{levels:s.npm.levels};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.paddings=e.paddingForLevels(t.levels,t.filler),this.options=t}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"transform",value:function(e,t){return e.message="".concat(this.paddings[e[a]]).concat(e.message),e[c]&&(e[c]="".concat(this.paddings[e[a]]).concat(e[c])),e}}],[{key:"getLongestLevel",value:function(e){var n=Object.keys(e).map((function(e){return e.length}));return Math.max.apply(Math,t(n))}},{key:"paddingForLevel",value:function(e,t,n){var i=n+1-e.length,r=Math.floor(i/t.length);return"".concat(t).concat(t.repeat(r)).slice(0,i)}},{key:"paddingForLevels",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ",i=e.getLongestLevel(t);return Object.keys(t).reduce((function(t,r){return t[r]=e.paddingForLevel(r,n,i),t}),{})}}])}();return MR.exports=function(e){return new l(e)},MR.exports.Padder=MR.exports.Format=l,MR.exports}function $R(){if(IR)return RR.exports;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}IR=1;var i=TR().Colorizer,r=jR().Padder,o=kR(),s=o.configs,a=o.MESSAGE,c=function(){return t((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t.levels||(t.levels=s.cli.levels),this.colorizer=new i(t),this.padder=new r(t),this.options=t}),[{key:"transform",value:function(e,t){return this.colorizer.transform(this.padder.transform(e,t),t),e[a]="".concat(e.level,":").concat(e.message),e}}])}();return RR.exports=function(e){return new c(e)},RR.exports.Format=c,RR.exports}var NR,DR,LR,zR={exports:{}};function FR(){if(NR)return zR.exports;NR=1;var e=DI();function t(e){if(e.every(n))return function(t){for(var n=t,i=0;i<e.length;i++)if(!(n=e[i].transform(n,e[i].options)))return!1;return n}}function n(e){if("function"!=typeof e.transform)throw new Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join("\n"));return!0}return zR.exports=function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];var o=e(t(i)),s=o();return s.Format=o.Format,s},zR.exports.cascade=t,zR.exports}function UR(){if(LR)return DR;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,n,i){return(n=function(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n||"default");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}(n))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}LR=1;var n=DI(),i=kR(),r=i.LEVEL,o=i.MESSAGE;return DR=n((function(e,n){var i=n.stack,s=n.cause;if(e instanceof Error){var a=Object.assign({},e,t(t(t({level:e.level},r,e[r]||e.level),"message",e.message),o,e[o]||e.message));return i&&(a.stack=e.stack),s&&(a.cause=e.cause),a}if(!(e.message instanceof Error))return e;var c=e.message;return Object.assign(e,c),e.message=c.message,e[o]=c.message,i&&(e.stack=c.stack),s&&(e.cause=c.cause),e}))}var BR,HR,qR,VR,GR,WR,KR,YR,QR,JR,XR,ZR,eM,tM,nM,iM={exports:{}};function rM(){return BR||(BR=1,function(e,t){const{hasOwnProperty:n}=Object.prototype,i=d();i.configure=d,i.stringify=i,i.default=i,t.stringify=i,t.configure=d,e.exports=i;const r=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function o(e){return e.length<5e3&&!r.test(e)?`"${e}"`:JSON.stringify(e)}function s(e,t){if(e.length>200||t)return e.sort(t);for(let t=1;t<e.length;t++){const n=e[t];let i=t;for(;0!==i&&e[i-1]>n;)e[i]=e[i-1],i--;e[i]=n}return e}const a=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function c(e){return void 0!==a.call(e)&&0!==e.length}function l(e,t,n){e.length<n&&(n=e.length);const i=","===t?"":" ";let r=`"0":${i}${e[0]}`;for(let o=1;o<n;o++)r+=`${t}"${o}":${i}${e[o]}`;return r}function u(e,t){let i;if(n.call(e,t)){if(i=e[t],"number"!=typeof i)throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(i))throw new TypeError(`The "${t}" argument must be an integer`);if(i<1)throw new RangeError(`The "${t}" argument must be >= 1`)}return void 0===i?1/0:i}function p(e){return 1===e?"1 item":`${e} items`}function d(e){const t=function(e){if(n.call(e,"strict")){const t=e.strict;if("boolean"!=typeof t)throw new TypeError('The "strict" argument must be of type boolean');if(t)return e=>{let t="Object can not safely be stringified. Received type "+typeof e;throw"function"!=typeof e&&(t+=` (${e.toString()})`),new Error(t)}}}(e={...e});t&&(void 0===e.bigint&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));const i=function(e){if(n.call(e,"circularValue")){const t=e.circularValue;if("string"==typeof t)return`"${t}"`;if(null==t)return t;if(t===Error||t===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}(e),r=function(e,t){let i;if(n.call(e,t)&&(i=e[t],"boolean"!=typeof i))throw new TypeError(`The "${t}" argument must be of type boolean`);return void 0===i||i}(e,"bigint"),a=function(e){let t;if(n.call(e,"deterministic")&&(t=e.deterministic,"boolean"!=typeof t&&"function"!=typeof t))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return void 0===t||t}(e),d="function"==typeof a?a:void 0,m=u(e,"maximumDepth"),h=u(e,"maximumBreadth");function f(e,n,l,u,g,y){let v=n[e];switch("object"==typeof v&&null!==v&&"function"==typeof v.toJSON&&(v=v.toJSON(e)),v=u.call(n,e,v),typeof v){case"string":return o(v);case"object":{if(null===v)return"null";if(-1!==l.indexOf(v))return i;let e="",t=",";const n=y;if(Array.isArray(v)){if(0===v.length)return"[]";if(m<l.length+1)return'"[Array]"';l.push(v),""!==g&&(e+=`\n${y+=g}`,t=`,\n${y}`);const i=Math.min(v.length,h);let r=0;for(;r<i-1;r++){const n=f(String(r),v,l,u,g,y);e+=void 0!==n?n:"null",e+=t}const o=f(String(r),v,l,u,g,y);if(e+=void 0!==o?o:"null",v.length-1>h){e+=`${t}"... ${p(v.length-h-1)} not stringified"`}return""!==g&&(e+=`\n${n}`),l.pop(),`[${e}]`}let r=Object.keys(v);const b=r.length;if(0===b)return"{}";if(m<l.length+1)return'"[Object]"';let x="",w="";""!==g&&(t=`,\n${y+=g}`,x=" ");const E=Math.min(b,h);a&&!c(v)&&(r=s(r,d)),l.push(v);for(let n=0;n<E;n++){const i=r[n],s=f(i,v,l,u,g,y);void 0!==s&&(e+=`${w}${o(i)}:${x}${s}`,w=t)}if(b>h){e+=`${w}"...":${x}"${p(b-h)} not stringified"`,w=t}return""!==g&&w.length>1&&(e=`\n${y}${e}\n${n}`),l.pop(),`{${e}}`}case"number":return isFinite(v)?String(v):t?t(v):"null";case"boolean":return!0===v?"true":"false";case"undefined":return;case"bigint":if(r)return String(v);default:return t?t(v):void 0}}function g(e,n,s,a,c,l){switch("object"==typeof n&&null!==n&&"function"==typeof n.toJSON&&(n=n.toJSON(e)),typeof n){case"string":return o(n);case"object":{if(null===n)return"null";if(-1!==s.indexOf(n))return i;const e=l;let t="",r=",";if(Array.isArray(n)){if(0===n.length)return"[]";if(m<s.length+1)return'"[Array]"';s.push(n),""!==c&&(t+=`\n${l+=c}`,r=`,\n${l}`);const i=Math.min(n.length,h);let o=0;for(;o<i-1;o++){const e=g(String(o),n[o],s,a,c,l);t+=void 0!==e?e:"null",t+=r}const u=g(String(o),n[o],s,a,c,l);if(t+=void 0!==u?u:"null",n.length-1>h){t+=`${r}"... ${p(n.length-h-1)} not stringified"`}return""!==c&&(t+=`\n${e}`),s.pop(),`[${t}]`}s.push(n);let u="";""!==c&&(r=`,\n${l+=c}`,u=" ");let d="";for(const e of a){const i=g(e,n[e],s,a,c,l);void 0!==i&&(t+=`${d}${o(e)}:${u}${i}`,d=r)}return""!==c&&d.length>1&&(t=`\n${l}${t}\n${e}`),s.pop(),`{${t}}`}case"number":return isFinite(n)?String(n):t?t(n):"null";case"boolean":return!0===n?"true":"false";case"undefined":return;case"bigint":if(r)return String(n);default:return t?t(n):void 0}}function y(e,n,u,f,g){switch(typeof n){case"string":return o(n);case"object":{if(null===n)return"null";if("function"==typeof n.toJSON){if("object"!=typeof(n=n.toJSON(e)))return y(e,n,u,f,g);if(null===n)return"null"}if(-1!==u.indexOf(n))return i;const t=g;if(Array.isArray(n)){if(0===n.length)return"[]";if(m<u.length+1)return'"[Array]"';u.push(n);let e=`\n${g+=f}`;const i=`,\n${g}`,r=Math.min(n.length,h);let o=0;for(;o<r-1;o++){const t=y(String(o),n[o],u,f,g);e+=void 0!==t?t:"null",e+=i}const s=y(String(o),n[o],u,f,g);if(e+=void 0!==s?s:"null",n.length-1>h){e+=`${i}"... ${p(n.length-h-1)} not stringified"`}return e+=`\n${t}`,u.pop(),`[${e}]`}let r=Object.keys(n);const v=r.length;if(0===v)return"{}";if(m<u.length+1)return'"[Object]"';const b=`,\n${g+=f}`;let x="",w="",E=Math.min(v,h);c(n)&&(x+=l(n,b,h),r=r.slice(n.length),E-=n.length,w=b),a&&(r=s(r,d)),u.push(n);for(let e=0;e<E;e++){const t=r[e],i=y(t,n[t],u,f,g);void 0!==i&&(x+=`${w}${o(t)}: ${i}`,w=b)}if(v>h){x+=`${w}"...": "${p(v-h)} not stringified"`,w=b}return""!==w&&(x=`\n${g}${x}\n${t}`),u.pop(),`{${x}}`}case"number":return isFinite(n)?String(n):t?t(n):"null";case"boolean":return!0===n?"true":"false";case"undefined":return;case"bigint":if(r)return String(n);default:return t?t(n):void 0}}function v(e,n,u){switch(typeof n){case"string":return o(n);case"object":{if(null===n)return"null";if("function"==typeof n.toJSON){if("object"!=typeof(n=n.toJSON(e)))return v(e,n,u);if(null===n)return"null"}if(-1!==u.indexOf(n))return i;let t="";const r=void 0!==n.length;if(r&&Array.isArray(n)){if(0===n.length)return"[]";if(m<u.length+1)return'"[Array]"';u.push(n);const e=Math.min(n.length,h);let i=0;for(;i<e-1;i++){const e=v(String(i),n[i],u);t+=void 0!==e?e:"null",t+=","}const r=v(String(i),n[i],u);if(t+=void 0!==r?r:"null",n.length-1>h){t+=`,"... ${p(n.length-h-1)} not stringified"`}return u.pop(),`[${t}]`}let f=Object.keys(n);const g=f.length;if(0===g)return"{}";if(m<u.length+1)return'"[Object]"';let y="",b=Math.min(g,h);r&&c(n)&&(t+=l(n,",",h),f=f.slice(n.length),b-=n.length,y=","),a&&(f=s(f,d)),u.push(n);for(let e=0;e<b;e++){const i=f[e],r=v(i,n[i],u);void 0!==r&&(t+=`${y}${o(i)}:${r}`,y=",")}if(g>h){t+=`${y}"...":"${p(g-h)} not stringified"`}return u.pop(),`{${t}}`}case"number":return isFinite(n)?String(n):t?t(n):"null";case"boolean":return!0===n?"true":"false";case"undefined":return;case"bigint":if(r)return String(n);default:return t?t(n):void 0}}return function(e,t,n){if(arguments.length>1){let i="";if("number"==typeof n?i=" ".repeat(Math.min(n,10)):"string"==typeof n&&(i=n.slice(0,10)),null!=t){if("function"==typeof t)return f("",{"":e},[],t,i,"");if(Array.isArray(t))return g("",e,[],function(e){const t=new Set;for(const n of e)"string"!=typeof n&&"number"!=typeof n||t.add(String(n));return t}(t),i,"")}if(0!==i.length)return y("",e,[],i,"")}return v("",e,[])}}}(iM,iM.exports)),iM.exports}function oM(){if(qR)return HR;qR=1;var e=DI(),t=kR().MESSAGE,n=rM();function i(e,t){return"bigint"==typeof t?t.toString():t}return HR=e((function(e,r){var o=n.configure(r);return e[t]=o(e,r.replacer||i,r.space),e}))}function sM(){if(GR)return VR;GR=1;var e=DI();return VR=e((function(e,t){return t.message?(e.message="[".concat(t.label,"] ").concat(e.message),e):(e.label=t.label,e)}))}function aM(){if(KR)return WR;KR=1;var e=DI(),t=kR().MESSAGE,n=rM();return WR=e((function(e){var i={};return e.message&&(i["@message"]=e.message,delete e.message),e.timestamp&&(i["@timestamp"]=e.timestamp,delete e.timestamp),i["@fields"]=e,e[t]=n(i),e}))}function cM(){if(QR)return YR;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,n,i){return(n=function(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n||"default");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}(n))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}QR=1;var n=DI();return YR=n((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i="metadata";n.key&&(i=n.key);var r=[];return n.fillExcept||n.fillWith||(r.push("level"),r.push("message")),n.fillExcept&&(r=n.fillExcept),r.length>0?function(e,n,i){var r=n.reduce((function(t,n){return t[n]=e[n],delete e[n],t}),{}),o=Object.keys(e).reduce((function(t,n){return t[n]=e[n],delete e[n],t}),{});return Object.assign(e,r,t({},i,o)),e}(e,r,i):n.fillWith?function(e,t,n){return e[n]=t.reduce((function(t,n){return t[n]=e[n],delete e[n],t}),{}),e}(e,n.fillWith,i):e})),YR}function lM(){if(XR)return JR;XR=1;var e=1e3,t=60*e,n=60*t,i=24*n,r=7*i,o=365.25*i;function s(e,t,n,i){var r=t>=1.5*n;return Math.round(e/n)+" "+i+(r?"s":"")}return JR=function(a,c){c=c||{};var l=typeof a;if("string"===l&&a.length>0)return function(s){if((s=String(s)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(s);if(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*o;case"weeks":case"week":case"w":return c*r;case"days":case"day":case"d":return c*i;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*t;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(a);if("number"===l&&isFinite(a))return c.long?function(r){var o=Math.abs(r);if(o>=i)return s(r,o,i,"day");if(o>=n)return s(r,o,n,"hour");if(o>=t)return s(r,o,t,"minute");if(o>=e)return s(r,o,e,"second");return r+" ms"}(a):function(r){var o=Math.abs(r);if(o>=i)return Math.round(r/i)+"d";if(o>=n)return Math.round(r/n)+"h";if(o>=t)return Math.round(r/t)+"m";if(o>=e)return Math.round(r/e)+"s";return r+"ms"}(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))},JR}function uM(){if(eM)return ZR;eM=1;var e=void 0,t=DI(),n=lM();return ZR=t((function(t){var i=+new Date;return e.diff=i-(e.prevTime||i),e.prevTime=i,t.ms="+".concat(n(e.diff)),t}))}function pM(){if(nM)return tM;nM=1;var e=i.inspect,t=DI(),n=kR(),r=n.LEVEL,o=n.MESSAGE,s=n.SPLAT;return tM=t((function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=Object.assign({},t);return delete i[r],delete i[o],delete i[s],t[o]=e(i,!1,n.depth||null,n.colorize),t})),tM}var dM,mM,hM,fM,gM,yM={exports:{}};function vM(){if(dM)return yM.exports;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}dM=1;var i=kR().MESSAGE,r=function(){return t((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.template=t}),[{key:"transform",value:function(e){return e[i]=this.template(e),e}}])}();return yM.exports=function(e){return new r(e)},yM.exports.Printf=yM.exports.Format=r,yM.exports}function bM(){if(hM)return mM;hM=1;var e=DI(),t=kR().MESSAGE,n=rM();return mM=e((function(e){var i=n(Object.assign({},e,{level:void 0,message:void 0,splat:void 0})),r=e.padding&&e.padding[e.level]||"";return e[t]="{}"!==i?"".concat(e.level,":").concat(r," ").concat(e.message," ").concat(i):"".concat(e.level,":").concat(r," ").concat(e.message),e}))}function xM(){if(gM)return fM;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function r(e,t,n){return t&&function(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,o(i.key),i)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}gM=1;var s=i,a=kR().SPLAT,c=/%[scdjifoO%]/g,l=/%%/g,u=function(){return r((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t}),[{key:"_splat",value:function(e,n){var i=e.message,r=e[a]||e.splat||[],o=i.match(l),c=o&&o.length||0,u=n.length-c-r.length,p=u<0?r.splice(u,-1*u):[],d=p.length;if(d)for(var m=0;m<d;m++)Object.assign(e,p[m]);return e.message=s.format.apply(s,[i].concat(t(r))),e}},{key:"transform",value:function(e){var t=e.message,n=e[a]||e.splat;if(!n||!n.length)return e;var i=t&&t.match&&t.match(c);if(!i&&(n||n.length)){var r=n.length>1?n.splice(0):n,o=r.length;if(o)for(var s=0;s<o;s++)Object.assign(e,r[s]);return e}return i?this._splat(e,i):e}}])}();return fM=function(e){return new u(e)}}var wM=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,EM="\\d\\d?",SM="\\d\\d",_M="[^\\s]+",OM=/\[([^]*?)\]/gm;function CM(e,t){for(var n=[],i=0,r=e.length;i<r;i++)n.push(e[i].substr(0,t));return n}var kM=function(e){return function(t,n){var i=n[e].map((function(e){return e.toLowerCase()})),r=i.indexOf(t.toLowerCase());return r>-1?r:null}};function TM(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=0,r=t;i<r.length;i++){var o=r[i];for(var s in o)e[s]=o[s]}return e}var PM=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],AM=["January","February","March","April","May","June","July","August","September","October","November","December"],IM=CM(AM,3),RM={dayNamesShort:CM(PM,3),dayNames:PM,monthNamesShort:IM,monthNames:AM,amPm:["am","pm"],DoFn:function(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!=10?1:0)*e%10]}},MM=TM({},RM),jM=function(e){return MM=TM(MM,e)},$M=function(e){return e.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},NM=function(e,t){for(void 0===t&&(t=2),e=String(e);e.length<t;)e="0"+e;return e},DM={D:function(e){return String(e.getDate())},DD:function(e){return NM(e.getDate())},Do:function(e,t){return t.DoFn(e.getDate())},d:function(e){return String(e.getDay())},dd:function(e){return NM(e.getDay())},ddd:function(e,t){return t.dayNamesShort[e.getDay()]},dddd:function(e,t){return t.dayNames[e.getDay()]},M:function(e){return String(e.getMonth()+1)},MM:function(e){return NM(e.getMonth()+1)},MMM:function(e,t){return t.monthNamesShort[e.getMonth()]},MMMM:function(e,t){return t.monthNames[e.getMonth()]},YY:function(e){return NM(String(e.getFullYear()),4).substr(2)},YYYY:function(e){return NM(e.getFullYear(),4)},h:function(e){return String(e.getHours()%12||12)},hh:function(e){return NM(e.getHours()%12||12)},H:function(e){return String(e.getHours())},HH:function(e){return NM(e.getHours())},m:function(e){return String(e.getMinutes())},mm:function(e){return NM(e.getMinutes())},s:function(e){return String(e.getSeconds())},ss:function(e){return NM(e.getSeconds())},S:function(e){return String(Math.round(e.getMilliseconds()/100))},SS:function(e){return NM(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return NM(e.getMilliseconds(),3)},a:function(e,t){return e.getHours()<12?t.amPm[0]:t.amPm[1]},A:function(e,t){return e.getHours()<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase()},ZZ:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+NM(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+NM(Math.floor(Math.abs(t)/60),2)+":"+NM(Math.abs(t)%60,2)}},LM=function(e){return+e-1},zM=[null,EM],FM=[null,_M],UM=["isPm",_M,function(e,t){var n=e.toLowerCase();return n===t.amPm[0]?0:n===t.amPm[1]?1:null}],BM=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(e){var t=(e+"").match(/([+-]|\d\d)/gi);if(t){var n=60*+t[1]+parseInt(t[2],10);return"+"===t[0]?n:-n}return 0}],HM={D:["day",EM],DD:["day",SM],Do:["day",EM+_M,function(e){return parseInt(e,10)}],M:["month",EM,LM],MM:["month",SM,LM],YY:["year",SM,function(e){var t=+(""+(new Date).getFullYear()).substr(0,2);return+(""+(+e>68?t-1:t)+e)}],h:["hour",EM,void 0,"isPm"],hh:["hour",SM,void 0,"isPm"],H:["hour",EM],HH:["hour",SM],m:["minute",EM],mm:["minute",SM],s:["second",EM],ss:["second",SM],YYYY:["year","\\d{4}"],S:["millisecond","\\d",function(e){return 100*+e}],SS:["millisecond",SM,function(e){return 10*+e}],SSS:["millisecond","\\d{3}"],d:zM,dd:zM,ddd:FM,dddd:FM,MMM:["month",_M,kM("monthNamesShort")],MMMM:["month",_M,kM("monthNames")],a:UM,A:UM,ZZ:BM,Z:BM},qM={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},VM=function(e){return TM(qM,e)},GM=function(e,t,n){if(void 0===t&&(t=qM.default),void 0===n&&(n={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var i=[];t=(t=qM[t]||t).replace(OM,(function(e,t){return i.push(t),"@@@"}));var r=TM(TM({},MM),n);return(t=t.replace(wM,(function(t){return DM[t](e,r)}))).replace(/@@@/g,(function(){return i.shift()}))};function WM(e,t,n){if(void 0===n&&(n={}),"string"!=typeof t)throw new Error("Invalid format in fecha parse");if(t=qM[t]||t,e.length>1e3)return null;var i={year:(new Date).getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},r=[],o=[],s=t.replace(OM,(function(e,t){return o.push($M(t)),"@@@"})),a={},c={};s=$M(s).replace(wM,(function(e){var t=HM[e],n=t[0],i=t[1],o=t[3];if(a[n])throw new Error("Invalid format. "+n+" specified twice in format");return a[n]=!0,o&&(c[o]=!0),r.push(t),"("+i+")"})),Object.keys(c).forEach((function(e){if(!a[e])throw new Error("Invalid format. "+e+" is required in specified format")})),s=s.replace(/@@@/g,(function(){return o.shift()}));var l=e.match(new RegExp(s,"i"));if(!l)return null;for(var u,p=TM(TM({},MM),n),d=1;d<l.length;d++){var m=r[d-1],h=m[0],f=m[2],g=f?f(l[d],p):+l[d];if(null==g)return null;i[h]=g}if(1===i.isPm&&null!=i.hour&&12!=+i.hour?i.hour=+i.hour+12:0===i.isPm&&12==+i.hour&&(i.hour=0),null==i.timezoneOffset){u=new Date(i.year,i.month,i.day,i.hour,i.minute,i.second,i.millisecond);for(var y=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],v=(d=0,y.length);d<v;d++)if(a[y[d][0]]&&i[y[d][0]]!==u[y[d][1]]())return null}else if(u=new Date(Date.UTC(i.year,i.month,i.day,i.hour,i.minute-i.timezoneOffset,i.second,i.millisecond)),i.month>11||i.month<0||i.day>31||i.day<1||i.hour>23||i.hour<0||i.minute>59||i.minute<0||i.second>59||i.second<0)return null;return u}var KM,YM,QM,JM,XM,ZM={format:GM,parse:WM,defaultI18n:RM,setGlobalDateI18n:jM,setGlobalDateMasks:VM},ej=ti(Object.freeze({__proto__:null,assign:TM,default:ZM,defaultI18n:RM,format:GM,parse:WM,setGlobalDateI18n:jM,setGlobalDateMasks:VM}));function tj(){if(YM)return KM;YM=1;var e=ej,t=DI();return KM=t((function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.format&&(t.timestamp="function"==typeof n.format?n.format():e.format(new Date,n.format)),t.timestamp||(t.timestamp=(new Date).toISOString()),n.alias&&(t[n.alias]=t.timestamp),t})),KM}function nj(){if(JM)return QM;JM=1;var e=pR(),t=DI(),n=kR().MESSAGE;return QM=t((function(t,i){return!1!==i.level&&(t.level=e.strip(t.level)),!1!==i.message&&(t.message=e.strip(String(t.message))),!1!==i.raw&&t[n]&&(t[n]=e.strip(String(t[n]))),t}))}function ij(){if(XM)return NI;XM=1;var e=NI.format=DI();return NI.levels=function(){if(SR)return ER;SR=1;var e=TR().Colorizer;return ER=function(t){return e.addColors(t.colors||t),t},ER}(),Object.defineProperty(e,"align",{value:PR()}),Object.defineProperty(e,"cli",{value:$R()}),Object.defineProperty(e,"colorize",{value:TR()}),Object.defineProperty(e,"combine",{value:FR()}),Object.defineProperty(e,"errors",{value:UR()}),Object.defineProperty(e,"json",{value:oM()}),Object.defineProperty(e,"label",{value:sM()}),Object.defineProperty(e,"logstash",{value:aM()}),Object.defineProperty(e,"metadata",{value:cM()}),Object.defineProperty(e,"ms",{value:uM()}),Object.defineProperty(e,"padLevels",{value:jR()}),Object.defineProperty(e,"prettyPrint",{value:pM()}),Object.defineProperty(e,"printf",{value:vM()}),Object.defineProperty(e,"simple",{value:bM()}),Object.defineProperty(e,"splat",{value:xM()}),Object.defineProperty(e,"timestamp",{value:tj()}),Object.defineProperty(e,"uncolorize",{value:nj()}),NI}var rj,oj={};function sj(){return rj||(rj=1,function(e){var t=i.format;e.warn={deprecated:function(e){return function(){throw new Error(t("{ %s } was removed in winston@3.0.0.",e))}},useFormat:function(e){return function(){throw new Error([t("{ %s } was removed in winston@3.0.0.",e),"Use a custom winston.format = winston.format(function) instead."].join("\n"))}},forFunctions:function(t,n,i){i.forEach((function(i){t[i]=e.warn[n](i)}))},forProperties:function(t,n,i){i.forEach((function(i){var r=e.warn[n](i);Object.defineProperty(t,i,{get:r,set:r})}))}}}(oj)),oj}var aj,cj,lj,uj,pj,dj,mj="3.17.0",hj={},fj={exports:{}},gj={exports:{}};function yj(){if(cj)return aj;function e(e){try{if(!Zn.localStorage)return!1}catch(e){return!1}var t=Zn.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}return cj=1,aj=function(t,n){if(e("noDeprecation"))return t;var i=!1;return function(){if(!i){if(e("throwDeprecation"))throw new Error(n);e("traceDeprecation")?console.trace(n):console.warn(n),i=!0}return t.apply(this,arguments)}},aj}function vj(){return uj?lj:(uj=1,lj=t.EventEmitter)}function bj(){if(dj)return pj;function e(e,i){n(e,i),t(e)}function t(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function n(e,t){e.emit("error",t)}return dj=1,pj={destroy:function(i,r){var o=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(r?r(i):i&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,i)):process.nextTick(n,this,i)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(i||null,(function(n){!r&&n?o._writableState?o._writableState.errorEmitted?process.nextTick(t,o):(o._writableState.errorEmitted=!0,process.nextTick(e,o,n)):process.nextTick(e,o,n):r?(process.nextTick(t,o),r(n)):process.nextTick(t,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,i=e._writableState;n&&n.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}},pj}var xj,wj,Ej,Sj={};function _j(){if(xj)return Sj;xj=1;var e={};function t(t,n,i){i||(i=Error);var r=function(e){var t,i;function r(t,i,r){return e.call(this,function(e,t,i){return"string"==typeof n?n:n(e,t,i)}(t,i,r))||this}return i=e,(t=r).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i,r}(i);r.prototype.name=i.name,r.prototype.code=t,e[t]=r}function n(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}return t("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),t("ERR_INVALID_ARG_TYPE",(function(e,t,i){var r,o,s;if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))s="The ".concat(e," ").concat(r," ").concat(n(t,"type"));else{var a=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(a," ").concat(r," ").concat(n(t,"type"))}return s+=". Received type ".concat(typeof i)}),TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Sj.codes=e,Sj}function Oj(){if(Ej)return wj;Ej=1;var e=_j().codes.ERR_INVALID_OPT_VALUE;return wj={getHighWaterMark:function(t,n,i,r){var o=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(n,r,i);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new e(r?i:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}}var Cj,kj={exports:{}};function Tj(){return Cj||(Cj=1,"function"==typeof Object.create?kj.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:kj.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}),kj.exports}var Pj,Aj,Ij=ti(Object.freeze({__proto__:null,default:{}}));function Rj(){if(Aj)return Pj;function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function t(t){for(var i=1;i<arguments.length;i++){var r=null!=arguments[i]?arguments[i]:{};i%2?e(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t,n){return t&&function(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,r(i.key),i)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function r(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}Aj=1;var o=g.Buffer,s=Ij.inspect,a=s&&s.custom||"inspect";return Pj=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return i(e,[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,n,i,r=o.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,n=r,i=a,o.prototype.copy.call(t,n,i),a+=s.data.length,s=s.next;return r}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,i=t.data;for(e-=i.length;t=t.next;){var r=t.data,o=e>r.length?r.length:e;if(o===r.length?i+=r:i+=r.slice(0,e),0===(e-=o)){o===r.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=r.slice(o));break}++n}return this.length-=n,i}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),n=this.head,i=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var r=n.data,s=e>r.length?r.length:e;if(r.copy(t,t.length-e,0,s),0===(e-=s)){s===r.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=r.slice(s));break}++i}return this.length-=i,t}},{key:a,value:function(e,n){return s(this,t(t({},n),{},{depth:0,customInspect:!1}))}}]),e}(),Pj}var Mj,jj,$j,Nj,Dj,Lj,zj,Fj,Uj,Bj,Hj,qj,Vj,Gj,Wj,Kj={},Yj={exports:{}};function Qj(){if(jj)return Kj;jj=1;var e=(Mj||(Mj=1,function(e,t){var n=g,i=n.Buffer;function r(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(r(n,t),t.Buffer=o),o.prototype=Object.create(i.prototype),r(i,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}(Yj,Yj.exports)),Yj.exports).Buffer,t=e.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function n(n){var i;switch(this.encoding=function(n){var i=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(n);if("string"!=typeof i&&(e.isEncoding===t||!t(n)))throw new Error("Unknown encoding: "+n);return i||n}(n),this.encoding){case"utf16le":this.text=o,this.end=s,i=4;break;case"utf8":this.fillLast=r,i=4;break;case"base64":this.text=a,this.end=c,i=3;break;default:return this.write=l,void(this.end=u)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(i)}function i(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function r(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function o(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var i=n.charCodeAt(n.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function s(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function a(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function l(e){return e.toString(this.encoding)}function u(e){return e&&e.length?this.write(e):""}return Kj.StringDecoder=n,n.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},n.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},n.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var o=i(t[r]);if(o>=0)return o>0&&(e.lastNeed=o-1),o;if(--r<n||-2===o)return 0;if(o=i(t[r]),o>=0)return o>0&&(e.lastNeed=o-2),o;if(--r<n||-2===o)return 0;if(o=i(t[r]),o>=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},n.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length},Kj}function Jj(){if(Nj)return $j;Nj=1;var e=_j().codes.ERR_STREAM_PREMATURE_CLOSE;function t(){}return $j=function n(i,r,o){if("function"==typeof r)return n(i,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];e.apply(this,i)}}}(o||t);var s=r.readable||!1!==r.readable&&i.readable,a=r.writable||!1!==r.writable&&i.writable,c=function(){i.writable||u()},l=i._writableState&&i._writableState.finished,u=function(){a=!1,l=!0,s||o.call(i)},p=i._readableState&&i._readableState.endEmitted,d=function(){s=!1,p=!0,a||o.call(i)},m=function(e){o.call(i,e)},h=function(){var t;return s&&!p?(i._readableState&&i._readableState.ended||(t=new e),o.call(i,t)):a&&!l?(i._writableState&&i._writableState.ended||(t=new e),o.call(i,t)):void 0},f=function(){i.req.on("finish",u)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(i)?a&&!i._writableState&&(i.on("end",c),i.on("close",c)):(i.on("complete",u),i.on("abort",h),i.req?f():i.on("request",f)),i.on("end",d),i.on("finish",u),!1!==r.error&&i.on("error",m),i.on("close",h),function(){i.removeListener("complete",u),i.removeListener("abort",h),i.removeListener("request",f),i.req&&i.req.removeListener("finish",u),i.removeListener("end",c),i.removeListener("close",c),i.removeListener("finish",u),i.removeListener("end",d),i.removeListener("error",m),i.removeListener("close",h)}},$j}function Xj(){if(Lj)return Dj;var e;function t(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Lj=1;var n=Jj(),i=Symbol("lastResolve"),r=Symbol("lastReject"),o=Symbol("error"),s=Symbol("ended"),a=Symbol("lastPromise"),c=Symbol("handlePromise"),l=Symbol("stream");function u(e,t){return{value:e,done:t}}function p(e){var t=e[i];if(null!==t){var n=e[l].read();null!==n&&(e[a]=null,e[i]=null,e[r]=null,t(u(n,!1)))}}function d(e){process.nextTick(p,e)}var m=Object.getPrototypeOf((function(){})),h=Object.setPrototypeOf((t(e={get stream(){return this[l]},next:function(){var e=this,t=this[o];if(null!==t)return Promise.reject(t);if(this[s])return Promise.resolve(u(void 0,!0));if(this[l].destroyed)return new Promise((function(t,n){process.nextTick((function(){e[o]?n(e[o]):t(u(void 0,!0))}))}));var n,i=this[a];if(i)n=new Promise(function(e,t){return function(n,i){e.then((function(){t[s]?n(u(void 0,!0)):t[c](n,i)}),i)}}(i,this));else{var r=this[l].read();if(null!==r)return Promise.resolve(u(r,!1));n=new Promise(this[c])}return this[a]=n,n}},Symbol.asyncIterator,(function(){return this})),t(e,"return",(function(){var e=this;return new Promise((function(t,n){e[l].destroy(null,(function(e){e?n(e):t(u(void 0,!0))}))}))})),e),m);return Dj=function(e){var p,m=Object.create(h,(t(p={},l,{value:e,writable:!0}),t(p,i,{value:null,writable:!0}),t(p,r,{value:null,writable:!0}),t(p,o,{value:null,writable:!0}),t(p,s,{value:e._readableState.endEmitted,writable:!0}),t(p,c,{value:function(e,t){var n=m[l].read();n?(m[a]=null,m[i]=null,m[r]=null,e(u(n,!1))):(m[i]=e,m[r]=t)},writable:!0}),p));return m[a]=null,n(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=m[r];return null!==t&&(m[a]=null,m[i]=null,m[r]=null,t(e)),void(m[o]=e)}var n=m[i];null!==n&&(m[a]=null,m[i]=null,m[r]=null,n(u(void 0,!0))),m[s]=!0})),e.on("readable",d.bind(null,m)),m},Dj}function Zj(){if(Bj)return Uj;var e;Bj=1,Uj=S,S.ReadableState=E,t.EventEmitter;var n=function(e,t){return e.listeners(t).length},i=vj(),r=g.Buffer,o=(void 0!==Zn?Zn:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var s,a=Ij;s=a&&a.debuglog?a.debuglog("stream"):function(){};var c,l,u,p=Rj(),d=bj(),m=Oj().getHighWaterMark,h=_j().codes,f=h.ERR_INVALID_ARG_TYPE,y=h.ERR_STREAM_PUSH_AFTER_EOF,v=h.ERR_METHOD_NOT_IMPLEMENTED,b=h.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;Tj()(S,i);var x=d.errorOrDestroy,w=["error","close","destroy","pause","resume"];function E(t,n,i){e=e||e$(),t=t||{},"boolean"!=typeof i&&(i=n instanceof e),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=m(this,t,"readableHighWaterMark",i),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(c||(c=Qj().StringDecoder),this.decoder=new c(t.encoding),this.encoding=t.encoding)}function S(t){if(e=e||e$(),!(this instanceof S))return new S(t);var n=this instanceof e;this._readableState=new E(t,this,n),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),i.call(this)}function _(e,t,n,i,a){s("readableAddChunk",t);var c,l=e._readableState;if(null===t)l.reading=!1,function(e,t){if(s("onEofChunk"),t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?T(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,P(e)))}(e,l);else if(a||(c=function(e,t){var n;i=t,r.isBuffer(i)||i instanceof o||"string"==typeof t||void 0===t||e.objectMode||(n=new f("chunk",["string","Buffer","Uint8Array"],t));var i;return n}(l,t)),c)x(e,c);else if(l.objectMode||t&&t.length>0)if("string"==typeof t||l.objectMode||Object.getPrototypeOf(t)===r.prototype||(t=function(e){return r.from(e)}(t)),i)l.endEmitted?x(e,new b):O(e,l,t,!0);else if(l.ended)x(e,new y);else{if(l.destroyed)return!1;l.reading=!1,l.decoder&&!n?(t=l.decoder.write(t),l.objectMode||0!==t.length?O(e,l,t,!1):A(e,l)):O(e,l,t,!1)}else i||(l.reading=!1,A(e,l));return!l.ended&&(l.length<l.highWaterMark||0===l.length)}function O(e,t,n,i){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&T(e)),A(e,t)}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=d.destroy,S.prototype._undestroy=d.undestroy,S.prototype._destroy=function(e,t){t(e)},S.prototype.push=function(e,t){var n,i=this._readableState;return i.objectMode?n=!0:"string"==typeof e&&((t=t||i.defaultEncoding)!==i.encoding&&(e=r.from(e,t),t=""),n=!0),_(this,e,t,!1,n)},S.prototype.unshift=function(e){return _(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){c||(c=Qj().StringDecoder);var t=new c(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var C=1073741824;function k(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=C?e=C:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState;s("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(s("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(P,e))}function P(e){var t=e._readableState;s("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,$(e)}function A(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(s("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function R(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function M(e){s("readable nexttick read 0"),e.read(0)}function j(e,t){s("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),$(e),t.flowing&&!t.reading&&e.read(0)}function $(e){var t=e._readableState;for(s("flow",t.flowing);t.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function D(e){var t=e._readableState;s("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(L,t,e))}function L(e,t){if(s("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function z(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1}return S.prototype.read=function(e){s("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return s("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):T(this),null;if(0===(e=k(e,t))&&t.ended)return 0===t.length&&D(this),null;var i,r=t.needReadable;return s("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&s("length less than watermark",r=!0),t.ended||t.reading?s("reading or ended",r=!1):r&&(s("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=k(n,t))),null===(i=e>0?N(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&D(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(e){x(this,new v("_read()"))},S.prototype.pipe=function(e,t){var i=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,s("pipe count=%d opts=%j",r.pipesCount,t);var o=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?c:f;function a(t,n){s("onunpipe"),t===i&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,s("cleanup"),e.removeListener("close",m),e.removeListener("finish",h),e.removeListener("drain",l),e.removeListener("error",d),e.removeListener("unpipe",a),i.removeListener("end",c),i.removeListener("end",f),i.removeListener("data",p),u=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function c(){s("onend"),e.end()}r.endEmitted?process.nextTick(o):i.once("end",o),e.on("unpipe",a);var l=function(e){return function(){var t=e._readableState;s("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&n(e,"data")&&(t.flowing=!0,$(e))}}(i);e.on("drain",l);var u=!1;function p(t){s("ondata");var n=e.write(t);s("dest.write",n),!1===n&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==z(r.pipes,e))&&!u&&(s("false write response, pause",r.awaitDrain),r.awaitDrain++),i.pause())}function d(t){s("onerror",t),f(),e.removeListener("error",d),0===n(e,"error")&&x(e,t)}function m(){e.removeListener("finish",h),f()}function h(){s("onfinish"),e.removeListener("close",m),f()}function f(){s("unpipe"),i.unpipe(e)}return i.on("data",p),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",d),e.once("close",m),e.once("finish",h),e.emit("pipe",i),r.flowing||(s("pipe resume"),i.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var i=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<r;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=z(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},S.prototype.on=function(e,t){var n=i.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,s("on readable",r.length,r.reading),r.length?T(this):r.reading||process.nextTick(M,this))),n},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(e,t){var n=i.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(R,this),n},S.prototype.removeAllListeners=function(e){var t=i.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(R,this),t},S.prototype.resume=function(){var e=this._readableState;return e.flowing||(s("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(j,e,t))}(this,e)),e.paused=!1,this},S.prototype.pause=function(){return s("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(s("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(e){var t=this,n=this._readableState,i=!1;for(var r in e.on("end",(function(){if(s("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(r){(s("wrapped data"),n.decoder&&(r=n.decoder.write(r)),n.objectMode&&null==r)||(n.objectMode||r&&r.length)&&(t.push(r)||(i=!0,e.pause()))})),e)void 0===this[r]&&"function"==typeof e[r]&&(this[r]=function(t){return function(){return e[t].apply(e,arguments)}}(r));for(var o=0;o<w.length;o++)e.on(w[o],this.emit.bind(this,w[o]));return this._read=function(t){s("wrapped _read",t),i&&(i=!1,e.resume())},this},"function"==typeof Symbol&&(S.prototype[Symbol.asyncIterator]=function(){return void 0===l&&(l=Xj()),l(this)}),Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),S._fromList=N,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(S.from=function(e,t){return void 0===u&&(u=Fj?zj:(Fj=1,zj=function(){throw new Error("Readable.from is not available in the browser")})),u(S,e,t)}),Uj}function e$(){if(qj)return Hj;qj=1;var e=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};Hj=s;var t=Zj(),n=t$();Tj()(s,t);for(var i=e(n.prototype),r=0;r<i.length;r++){var o=i[r];s.prototype[o]||(s.prototype[o]=n.prototype[o])}function s(e){if(!(this instanceof s))return new s(e);t.call(this,e),n.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",a)))}function a(){this._writableState.ended||process.nextTick(c,this)}function c(e){e.end()}return Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(s.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(s.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(s.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),Hj}function t$(){if(Gj)return Vj;function e(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var i=e.entry;e.entry=null;for(;i;){var r=i.callback;t.pendingcb--,r(n),i=i.next}t.corkedRequestsFree.next=e}(t,e)}}var t;Gj=1,Vj=E,E.WritableState=w;var n={deprecate:yj()},i=vj(),r=g.Buffer,o=(void 0!==Zn?Zn:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var s,a=bj(),c=Oj().getHighWaterMark,l=_j().codes,u=l.ERR_INVALID_ARG_TYPE,p=l.ERR_METHOD_NOT_IMPLEMENTED,d=l.ERR_MULTIPLE_CALLBACK,m=l.ERR_STREAM_CANNOT_PIPE,h=l.ERR_STREAM_DESTROYED,f=l.ERR_STREAM_NULL_VALUES,y=l.ERR_STREAM_WRITE_AFTER_END,v=l.ERR_UNKNOWN_ENCODING,b=a.errorOrDestroy;function x(){}function w(n,i,r){t=t||e$(),n=n||{},"boolean"!=typeof r&&(r=i instanceof t),this.objectMode=!!n.objectMode,r&&(this.objectMode=this.objectMode||!!n.writableObjectMode),this.highWaterMark=c(this,n,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===n.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=n.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,i=n.sync,r=n.writecb;if("function"!=typeof r)throw new d;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,r){--t.pendingcb,n?(process.nextTick(r,i),process.nextTick(T,e,t),e._writableState.errorEmitted=!0,b(e,i)):(r(i),e._writableState.errorEmitted=!0,b(e,i),T(e,t))}(e,n,i,t,r);else{var o=C(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||O(e,n),i?process.nextTick(_,e,n,o,r):_(e,n,o,r)}}(i,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==n.emitClose,this.autoDestroy=!!n.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function E(e){var n=this instanceof(t=t||e$());if(!n&&!s.call(E,this))return new E(e);this._writableState=new w(e,this,n),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),i.call(this)}function S(e,t,n,i,r,o,s){t.writelen=i,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new h("write")):n?e._writev(r,t.onwrite):e._write(r,o,t.onwrite),t.sync=!1}function _(e,t,n,i){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),T(e,t)}function O(t,n){n.bufferProcessing=!0;var i=n.bufferedRequest;if(t._writev&&i&&i.next){var r=n.bufferedRequestCount,o=new Array(r),s=n.corkedRequestsFree;s.entry=i;for(var a=0,c=!0;i;)o[a]=i,i.isBuf||(c=!1),i=i.next,a+=1;o.allBuffers=c,S(t,n,!0,n.length,o,"",s.finish),n.pendingcb++,n.lastBufferedRequest=null,s.next?(n.corkedRequestsFree=s.next,s.next=null):n.corkedRequestsFree=new e(n),n.bufferedRequestCount=0}else{for(;i;){var l=i.chunk,u=i.encoding,p=i.callback;if(S(t,n,!1,n.objectMode?1:l.length,l,u,p),i=i.next,n.bufferedRequestCount--,n.writing)break}null===i&&(n.lastBufferedRequest=null)}n.bufferedRequest=i,n.bufferProcessing=!1}function C(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final((function(n){t.pendingcb--,n&&b(e,n),t.prefinished=!0,e.emit("prefinish"),T(e,t)}))}function T(e,t){var n=C(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(k,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return n}return Tj()(E,i),w.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(w.prototype,"buffer",{get:n.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(e){return!!s.call(this,e)||this===E&&(e&&e._writableState instanceof w)}})):s=function(e){return e instanceof this},E.prototype.pipe=function(){b(this,new m)},E.prototype.write=function(e,t,n){var i,s=this._writableState,a=!1,c=!s.objectMode&&(i=e,r.isBuffer(i)||i instanceof o);return c&&!r.isBuffer(e)&&(e=function(e){return r.from(e)}(e)),"function"==typeof t&&(n=t,t=null),c?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof n&&(n=x),s.ending?function(e,t){var n=new y;b(e,n),process.nextTick(t,n)}(this,n):(c||function(e,t,n,i){var r;return null===n?r=new f:"string"==typeof n||t.objectMode||(r=new u("chunk",["string","Buffer"],n)),!r||(b(e,r),process.nextTick(i,r),!1)}(this,s,e,n))&&(s.pendingcb++,a=function(e,t,n,i,o,s){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=r.from(t,n));return t}(t,i,o);i!==a&&(n=!0,o="buffer",i=a)}var c=t.objectMode?1:i.length;t.length+=c;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:o,isBuf:n,callback:s,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else S(e,t,!1,c,i,o,s);return l}(this,s,c,e,t,n)),a},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||O(this,e))},E.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,n){n(new p("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,n){var i=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,T(e,t),n&&(t.finished?process.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=a.destroy,E.prototype._undestroy=a.undestroy,E.prototype._destroy=function(e,t){t(e)},Vj}function n$(){if(Wj)return gj.exports;Wj=1;var e=i,t=t$(),n=kR().LEVEL,r=gj.exports=function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.call(this,{objectMode:!0,highWaterMark:n.highWaterMark}),this.format=n.format,this.level=n.level,this.handleExceptions=n.handleExceptions,this.handleRejections=n.handleRejections,this.silent=n.silent,n.log&&(this.log=n.log),n.logv&&(this.logv=n.logv),n.close&&(this.close=n.close),this.once("pipe",(function(t){e.levels=t.levels,e.parent=t})),this.once("unpipe",(function(t){t===e.parent&&(e.parent=null,e.close&&e.close())}))};return e.inherits(r,t),r.prototype._write=function(e,t,i){if(this.silent||!0===e.exception&&!this.handleExceptions)return i(null);var r=this.level||this.parent&&this.parent.level;if(!r||this.levels[r]>=this.levels[e[n]]){if(e&&!this.format)return this.log(e,i);var o=void 0,s=void 0;try{s=this.format.transform(Object.assign({},e),this.format.options)}catch(e){o=e}if(o||!s){if(i(),o)throw o;return}return this.log(s,i)}return this._writableState.sync=!1,i(null)},r.prototype._writev=function(e,t){if(this.logv){var n=e.filter(this._accept,this);return n.length?this.logv(n,t):t(null)}for(var i=0;i<e.length;i++)if(this._accept(e[i]))if(!e[i].chunk||this.format){var r=void 0,o=void 0;try{o=this.format.transform(Object.assign({},e[i].chunk),this.format.options)}catch(e){r=e}if(r||!o){if(e[i].callback(),r)throw t(null),r}else this.log(o,e[i].callback)}else this.log(e[i].chunk,e[i].callback);return t(null)},r.prototype._accept=function(e){var t=e.chunk;if(this.silent)return!1;var i=this.level||this.parent&&this.parent.level;return!(!0!==t.exception&&i&&!(this.levels[i]>=this.levels[t[n]])||!this.handleExceptions&&!0===t.exception)},r.prototype._nop=function(){},gj.exports}var i$,r$,o$,s$,a$={exports:{}};function c$(){return r$||(r$=1,fj.exports=n$(),fj.exports.LegacyTransportStream=function(){if(i$)return a$.exports;i$=1;var e=i,t=kR().LEVEL,n=n$(),r=a$.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n.call(this,e),!e.transport||"function"!=typeof e.transport.log)throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=function(e){this.emit("error",e,this.transport)}.bind(this),this.transport.on("error",this.transport.__winstonError))};return e.inherits(r,n),r.prototype._write=function(e,n,i){if(this.silent||!0===e.exception&&!this.handleExceptions)return i(null);(!this.level||this.levels[this.level]>=this.levels[e[t]])&&this.transport.log(e[t],e.message,e,this._nop),i(null)},r.prototype._writev=function(e,n){for(var i=0;i<e.length;i++)this._accept(e[i])&&(this.transport.log(e[i].chunk[t],e[i].chunk.message,e[i].chunk,this._nop),e[i].callback());return n(null)},r.prototype._deprecated=function(){console.error([this.transport.name+" is a legacy winston transport. Consider upgrading: ","- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join("\n"))},r.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)},a$.exports}()),fj.exports}function l$(){if(s$)return o$;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}function i(t,n,i){return n=o(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,r()?Reflect.construct(n,i||[],o(t).constructor):n.apply(t,i))}function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(r=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}s$=1;var a=p,c=kR(),l=c.LEVEL,u=c.MESSAGE,d=c$();return o$=function(e){function n(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(e=i(this,n,[t])).name=t.name||"console",e.stderrLevels=e._stringArrayToSet(t.stderrLevels),e.consoleWarnLevels=e._stringArrayToSet(t.consoleWarnLevels),e.eol="string"==typeof t.eol?t.eol:a.EOL,e.forceConsole=t.forceConsole||!1,e._consoleLog=console.log.bind(console),e._consoleWarn=console.warn.bind(console),e._consoleError=console.error.bind(console),e.setMaxListeners(30),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(n,e),t(n,[{key:"log",value:function(e,t){var n=this;return setImmediate((function(){return n.emit("logged",e)})),this.stderrLevels[e[l]]?(console._stderr&&!this.forceConsole?console._stderr.write("".concat(e[u]).concat(this.eol)):this._consoleError(e[u]),void(t&&t())):this.consoleWarnLevels[e[l]]?(console._stderr&&!this.forceConsole?console._stderr.write("".concat(e[u]).concat(this.eol)):this._consoleWarn(e[u]),void(t&&t())):(console._stdout&&!this.forceConsole?console._stdout.write("".concat(e[u]).concat(this.eol)):this._consoleLog(e[u]),void(t&&t()))}},{key:"_stringArrayToSet",value:function(e,t){if(!e)return{};if(t=t||"Cannot make set from type other than Array of string elements",!Array.isArray(e))throw new Error(t);return e.reduce((function(e,n){if("string"!=typeof n)throw new Error(t);return e[n]=!0,e}),{})}}])}(d),o$}var u$,p$={exports:{}},d$={exports:{}},m$={exports:{}};function h$(){return u$||(u$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0},e.exports=t.default}(m$,m$.exports)),m$.exports}var f$,g$={},y$={exports:{}},v$={exports:{}};var b$,x$,w$,E$={};function S$(){return x$||(x$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,o.isAsync)(e))return function(...t){const n=t.pop();return a(e.apply(this,t),n)};return(0,i.default)((function(t,n){var i;try{i=e.apply(this,t)}catch(e){return n(e)}if(i&&"function"==typeof i.then)return a(i,n);n(null,i)}))};var n=(f$||(f$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(...t){var n=t.pop();return e.call(this,t,n)}},e.exports=t.default}(v$,v$.exports)),v$.exports),i=s(n),r=s(function(){if(b$)return E$;b$=1,Object.defineProperty(E$,"__esModule",{value:!0}),E$.fallback=r,E$.wrap=o;var e,t=E$.hasQueueMicrotask="function"==typeof queueMicrotask&&queueMicrotask,n=E$.hasSetImmediate="function"==typeof setImmediate&&setImmediate,i=E$.hasNextTick="object"==typeof process&&"function"==typeof process.nextTick;function r(e){setTimeout(e,0)}function o(e){return(t,...n)=>e((()=>t(...n)))}return e=t?queueMicrotask:n?setImmediate:i?process.nextTick:r,E$.default=o(e),E$}()),o=_$();function s(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return e.then((e=>{c(t,null,e)}),(e=>{c(t,e&&(e instanceof Error||e.message)?e:new Error(e))}))}function c(e,t,n){try{e(t,n)}catch(e){(0,r.default)((e=>{throw e}),e)}}e.exports=t.default}(y$,y$.exports)),y$.exports}function _$(){if(w$)return g$;w$=1,Object.defineProperty(g$,"__esModule",{value:!0}),g$.isAsyncIterable=g$.isAsyncGenerator=g$.isAsync=void 0;var e,t=S$(),n=(e=t)&&e.__esModule?e:{default:e};function i(e){return"AsyncFunction"===e[Symbol.toStringTag]}return g$.default=function(e){if("function"!=typeof e)throw new Error("expected a function");return i(e)?(0,n.default)(e):e},g$.isAsync=i,g$.isAsyncGenerator=function(e){return"AsyncGenerator"===e[Symbol.toStringTag]},g$.isAsyncIterable=function(e){return"function"==typeof e[Symbol.asyncIterator]},g$}var O$,C$,k$={exports:{}};function T$(){return O$||(O$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){t||(t=e.length);if(!t)throw new Error("arity is undefined");return function(...n){return"function"==typeof n[t-1]?e.apply(this,n):new Promise(((i,r)=>{n[t-1]=(e,...t)=>{if(e)return r(e);i(t.length>1?t:t[0])},e.apply(this,n)}))}},e.exports=t.default}(k$,k$.exports)),k$.exports}var P$,A$={exports:{}},I$={exports:{}},R$={exports:{}},M$={exports:{}};function j$(){return P$||(P$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(...t){if(null!==e){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t},e.exports=t.default}(M$,M$.exports)),M$.exports}var $$,N$,D$={exports:{}},L$={exports:{}};function z$(){return N$||(N$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,n.default)(e))return function(e){var t=-1,n=e.length;return function(){return++t<n?{value:e[t],key:t}:null}}(e);var t=(0,r.default)(e);return t?function(e){var t=-1;return function(){var n=e.next();return n.done?null:(t++,{value:n.value,key:t})}}(t):function(e){var t=e?Object.keys(e):[],n=-1,i=t.length;return function r(){var o=t[++n];return"__proto__"===o?r():n<i?{value:e[o],key:o}:null}}(e)};var n=o(h$()),i=($$||($$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()},e.exports=t.default}(L$,L$.exports)),L$.exports),r=o(i);function o(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default}(D$,D$.exports)),D$.exports}var F$,U$={exports:{}};function B$(){return F$||(F$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var n=e;e=null,n.apply(this,t)}},e.exports=t.default}(U$,U$.exports)),U$.exports}var H$,q$,V$,G$,W$,K$,Y$={exports:{}},Q$={exports:{}};function J$(){return H$||(H$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});t.default={},e.exports=t.default}(Q$,Q$.exports)),Q$.exports}function X$(){return V$||(V$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=l(j$()),i=l(z$()),r=l(B$()),o=_$(),s=(q$||(q$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r){let o=!1,s=!1,a=!1,c=0,l=0;function u(){c>=t||a||o||(a=!0,e.next().then((({value:e,done:t})=>{if(!s&&!o){if(a=!1,t)return o=!0,void(c<=0&&r(null));c++,n(e,l,p),l++,u()}})).catch(d))}function p(e,t){if(c-=1,!s)return e?d(e):!1===e?(o=!0,void(s=!0)):t===i.default||o&&c<=0?(o=!0,r(null)):void u()}function d(e){s||(a=!1,o=!0,r(e))}u()};var n,i=(n=J$())&&n.__esModule?n:{default:n};e.exports=t.default}(Y$,Y$.exports)),Y$.exports),a=l(s),c=l(J$());function l(e){return e&&e.__esModule?e:{default:e}}t.default=e=>(t,s,l)=>{if(l=(0,n.default)(l),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return l(null);if((0,o.isAsyncGenerator)(t))return(0,a.default)(t,e,s,l);if((0,o.isAsyncIterable)(t))return(0,a.default)(t[Symbol.asyncIterator](),e,s,l);var u=(0,i.default)(t),p=!1,d=!1,m=0,h=!1;function f(e,t){if(!d)if(m-=1,e)p=!0,l(e);else if(!1===e)p=!0,d=!0;else{if(t===c.default||p&&m<=0)return p=!0,l(null);h||g()}}function g(){for(h=!0;m<e&&!p;){var t=u();if(null===t)return p=!0,void(m<=0&&l(null));m+=1,s(t.value,t.key,(0,r.default)(f))}h=!1}g()},e.exports=t.default}(R$,R$.exports)),R$.exports}function Z$(){return G$||(G$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=o(X$()),i=o(_$()),r=o(T$());function o(e){return e&&e.__esModule?e:{default:e}}t.default=(0,r.default)((function(e,t,r,o){return(0,n.default)(t)(e,(0,i.default)(r),o)}),4),e.exports=t.default}(I$,I$.exports)),I$.exports}function eN(){return K$||(K$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,i.default)(o.default,e,t)};var n=(C$||(C$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=o(h$()),i=o(_$()),r=o(T$());function o(e){return e&&e.__esModule?e:{default:e}}t.default=(0,r.default)(((e,t,r)=>{var o=(0,n.default)(t)?[]:{};e(t,((e,t,n)=>{(0,i.default)(e)(((e,...i)=>{i.length<2&&([i]=i),o[t]=i,n(e)}))}),(e=>r(e,o)))}),3),e.exports=t.default}(d$,d$.exports)),d$.exports),i=s(n),r=(W$||(W$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=r(Z$()),i=r(T$());function r(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.default)((function(e,t,i){return(0,n.default)(e,1,t,i)}),3),e.exports=t.default}(A$,A$.exports)),A$.exports),o=s(r);function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default}(p$,p$.exports)),p$.exports}var tN,nN,iN,rN,oN,sN,aN,cN={exports:{}};function lN(){if(nN)return tN;nN=1,tN=a;var e=_j().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,n=e.ERR_MULTIPLE_CALLBACK,i=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,r=e.ERR_TRANSFORM_WITH_LENGTH_0,o=e$();function s(e,t){var i=this._transformState;i.transforming=!1;var r=i.writecb;if(null===r)return this.emit("error",new n);i.writechunk=null,i.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);o.call(this,e),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",c)}function c(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?l(this,null,null):this._flush((function(t,n){l(e,t,n)}))}function l(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new r;if(e._transformState.transforming)throw new i;return e.push(null)}return Tj()(a,o),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,o.prototype.push.call(this,e,t)},a.prototype._transform=function(e,n,i){i(new t("_transform()"))},a.prototype._write=function(e,t,n){var i=this._transformState;if(i.writecb=n,i.writechunk=e,i.writeencoding=t,!i.transforming){var r=this._readableState;(i.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},a.prototype._destroy=function(e,t){o.prototype._destroy.call(this,e,(function(e){t(e)}))},tN}function uN(){if(sN)return oN;var e;sN=1;var t=_j().codes,n=t.ERR_MISSING_ARGS,i=t.ERR_STREAM_DESTROYED;function r(e){if(e)throw e}function o(e){e()}function s(e,t){return e.pipe(t)}return oN=function(){for(var t=arguments.length,a=new Array(t),c=0;c<t;c++)a[c]=arguments[c];var l,u=function(e){return e.length?"function"!=typeof e[e.length-1]?r:e.pop():r}(a);if(Array.isArray(a[0])&&(a=a[0]),a.length<2)throw new n("streams");var p=a.map((function(t,n){var r=n<a.length-1;return function(t,n,r,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;t.on("close",(function(){s=!0})),void 0===e&&(e=Jj()),e(t,{readable:n,writable:r},(function(e){if(e)return o(e);s=!0,o()}));var a=!1;return function(e){if(!s&&!a)return a=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new i("pipe"))}}(t,r,n>0,(function(e){l||(l=e),e&&p.forEach(o),r||(p.forEach(o),u(l))}))}));return a.reduce(s)},oN}function pN(){return aN||(aN=1,function(e,t){(t=e.exports=Zj()).Stream=t,t.Readable=t,t.Writable=t$(),t.Duplex=e$(),t.Transform=lN(),t.PassThrough=function(){if(rN)return iN;rN=1,iN=t;var e=lN();function t(n){if(!(this instanceof t))return new t(n);e.call(this,n)}return Tj()(t,e),t.prototype._transform=function(e,t,n){n(null,e)},iN}(),t.finished=Jj(),t.pipeline=uN()}(cN,cN.exports)),cN.exports}var dN,mN,hN,fN,gN,yN,vN,bN,xN,wN,EN,SN,_N,ON,CN,kN,TN={exports:{}};function PN(){if(mN)return dN;mN=1;var e=[],t=[],n=function(){};function i(t){return!~e.indexOf(t)&&(e.push(t),!0)}function r(e){n=e}function o(t){for(var n=[],i=0;i<e.length;i++)if(e[i].async)n.push(e[i]);else if(e[i](t))return!0;return!!n.length&&new Promise((function(e){Promise.all(n.map((function(e){return e(t)}))).then((function(t){e(t.some(Boolean))}))}))}function s(e){return!~t.indexOf(e)&&(t.push(e),!0)}function a(){n.apply(n,arguments)}function c(e){for(var n=0;n<t.length;n++)e=t[n].apply(t[n],arguments);return e}function l(e,t){var n=Object.prototype.hasOwnProperty;for(var i in t)n.call(t,i)&&(e[i]=t[i]);return e}function u(e){return e.enabled=!1,e.modify=s,e.set=r,e.use=i,l((function(){return!1}),e)}function p(e){return e.enabled=!0,e.modify=s,e.set=r,e.use=i,l((function(){var t=Array.prototype.slice.call(arguments,0);return a.call(a,e,c(t,e)),!0}),e)}return dN=function(e){return e.introduce=l,e.enabled=o,e.process=c,e.modify=s,e.write=a,e.nope=u,e.yep=p,e.set=r,e.use=i,e}}function AN(){return gN||(gN=1,TN.exports=function(){if(fN)return hN;fN=1;var e=PN()((function e(t,n){return(n=n||{}).namespace=t,n.prod=!0,n.dev=!1,n.force||e.force?e.yep(n):e.nope(n)}));return hN=e}()),TN.exports}function IN(){if(vN)return yN;vN=1;var e=r,t=y.StringDecoder,n=pN().Stream;function i(){}return yN=function(r,o){var s=Buffer.alloc(65536),a=new t("utf8"),c=new n,l="",u=0,p=0;return-1===r.start&&delete r.start,c.readable=!0,c.destroy=function(){c.destroyed=!0,c.emit("end"),c.emit("close")},e.open(r.file,"a+","0644",(function(t,n){if(t)return o?o(t):c.emit("error",t),void c.destroy();!function t(){if(!c.destroyed)return e.read(n,s,0,s.length,u,(function(e,n){if(e)return o?o(e):c.emit("error",e),void c.destroy();if(!n)return l&&((null==r.start||p>r.start)&&(o?o(null,l):c.emit("line",l)),p++,l=""),setTimeout(t,1e3);var i=a.write(s.slice(0,n));o||c.emit("data",i);for(var d=(i=(l+i).split(/\n+/)).length-1,m=0;m<d;m++)(null==r.start||p>r.start)&&(o?o(null,i[m]):c.emit("line",i[m])),p++;return l=i[d],u+=n,t()}));e.close(n,i)}()})),o?c.destroy:c},yN}function RN(){if(xN)return bN;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}function i(t,n,i){return n=s(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,o()?Reflect.construct(n,i||[],s(t).constructor):n.apply(t,i))}function o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(o=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}xN=1;var l=r,u=d,m=eN(),h=a,f=kR().MESSAGE,g=pN(),y=g.Stream,v=g.PassThrough,b=c$(),x=AN()("winston:file"),w=p,E=IN();return bN=function(n){function r(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};function n(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];i.slice(1).forEach((function(n){if(t[n])throw new Error("Cannot set ".concat(n," and ").concat(e," together"))}))}if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(e=i(this,r,[t])).name=t.name||"file",e._stream=new v,e._stream.setMaxListeners(30),e._onError=e._onError.bind(e),t.filename||t.dirname)n("filename or dirname","stream"),e._basename=e.filename=t.filename?u.basename(t.filename):"winston.log",e.dirname=t.dirname||u.dirname(t.filename),e.options=t.options||{flags:"a"};else{if(!t.stream)throw new Error("Cannot log to file without filename or stream.");console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),n("stream","filename","maxsize"),e._dest=e._stream.pipe(e._setupStream(t.stream)),e.dirname=u.dirname(e._dest.path)}return e.maxsize=t.maxsize||null,e.rotationFormat=t.rotationFormat||!1,e.zippedArchive=t.zippedArchive||!1,e.maxFiles=t.maxFiles||null,e.eol="string"==typeof t.eol?t.eol:w.EOL,e.tailable=t.tailable||!1,e.lazy=t.lazy||!1,e._size=0,e._pendingSize=0,e._created=0,e._drain=!1,e._opening=!1,e._ending=!1,e._fileExist=!1,e.dirname&&e._createLogDirIfNotExist(e.dirname),e.lazy||e.open(),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(r,n),t(r,[{key:"finishIfEnding",value:function(){var e=this;this._ending&&(this._opening?this.once("open",(function(){e._stream.once("finish",(function(){return e.emit("finish")})),setImmediate((function(){return e._stream.end()}))})):(this._stream.once("finish",(function(){return e.emit("finish")})),setImmediate((function(){return e._stream.end()}))))}},{key:"log",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if(this.silent)return n(),!0;if(this._drain)this._stream.once("drain",(function(){t._drain=!1,t.log(e,n)}));else{if(!this._rotate){if(this.lazy){if(!this._fileExist)return this._opening||this.open(),void this.once("open",(function(){t._fileExist=!0,t.log(e,n)}));if(this._needsNewFile(this._pendingSize))return void this._dest.once("close",(function(){t._opening||t.open(),t.once("open",(function(){t.log(e,n)}))}))}var i="".concat(e[f]).concat(this.eol),r=Buffer.byteLength(i);this._pendingSize+=r,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);var o=this._stream.write(i,function(){var t=this;this._size+=r,this._pendingSize-=r,x("logged %s %s",this._size,i),this.emit("logged",e),this._rotate||this._opening||this._needsNewFile()&&(this.lazy?this._endStream((function(){t.emit("fileclosed")})):(this._rotate=!0,this._endStream((function(){return t._rotateFile()}))))}.bind(this));return o?n():(this._drain=!0,this._stream.once("drain",(function(){t._drain=!1,n()}))),x("written",o,this._drain),this.finishIfEnding(),o}this._stream.once("rotate",(function(){t._rotate=!1,t.log(e,n)}))}}},{key:"query",value:function(t,n){"function"==typeof t&&(n=t,t={}),t=function(t){t=t||{},t.rows=t.rows||t.limit||10,t.start=t.start||0,t.until=t.until||new Date,"object"!==e(t.until)&&(t.until=new Date(t.until));t.from=t.from||t.until-864e5,"object"!==e(t.from)&&(t.from=new Date(t.from));return t.order=t.order||"desc",t}(t);var i=u.join(this.dirname,this.filename),r="",o=[],s=0,a=l.createReadStream(i,{encoding:"utf8"});function c(n,i){try{var r=JSON.parse(n);(function(n){if(!n)return;if("object"!==e(n))return;var i=new Date(n.timestamp);if(t.from&&i<t.from||t.until&&i>t.until||t.level&&t.level!==n.level)return;return!0})(r)&&function(e){if(t.rows&&o.length>=t.rows&&"desc"!==t.order)return void(a.readable&&a.destroy());t.fields&&(e=t.fields.reduce((function(t,n){return t[n]=e[n],t}),{}));"desc"===t.order&&o.length>=t.rows&&o.shift();o.push(e)}(r)}catch(e){i||a.emit("error",e)}}a.on("error",(function(e){if(a.readable&&a.destroy(),n)return"ENOENT"!==e.code?n(e):n(null,o)})),a.on("data",(function(e){for(var n=(e=(r+e).split(/\n+/)).length-1,i=0;i<n;i++)(!t.start||s>=t.start)&&c(e[i]),s++;r=e[n]})),a.on("close",(function(){r&&c(r,!0),"desc"===t.order&&(o=o.reverse()),n&&n(null,o)}))}},{key:"stream",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=u.join(this.dirname,this.filename),n=new y,i={file:t,start:e.start};return n.destroy=E(i,(function(e,t){if(e)return n.emit("error",e);try{n.emit("data",t),t=JSON.parse(t),n.emit("log",t)}catch(e){n.emit("error",e)}})),n}},{key:"open",value:function(){var e=this;this.filename&&(this._opening||(this._opening=!0,this.stat((function(t,n){if(t)return e.emit("error",t);x("stat done: %s { size: %s }",e.filename,n),e._size=n,e._dest=e._createStream(e._stream),e._opening=!1,e.once("open",(function(){e._stream.emit("rotate")||(e._rotate=!1)}))}))))}},{key:"stat",value:function(e){var t=this,n=this._getFile(),i=u.join(this.dirname,n);l.stat(i,(function(r,o){return r&&"ENOENT"===r.code?(x("ENOENT ok",i),t.filename=n,e(null,0)):r?(x("err ".concat(r.code," ").concat(i)),e(r)):!o||t._needsNewFile(o.size)?t._incFile((function(){return t.stat(e)})):(t.filename=n,void e(null,o.size))}))}},{key:"close",value:function(e){var t=this;this._stream&&this._stream.end((function(){e&&e(),t.emit("flush"),t.emit("closed")}))}},{key:"_needsNewFile",value:function(e){return e=e||this._size,this.maxsize&&e>=this.maxsize}},{key:"_onError",value:function(e){this.emit("error",e)}},{key:"_setupStream",value:function(e){return e.on("error",this._onError),e}},{key:"_cleanupStream",value:function(e){return e.removeListener("error",this._onError),e.destroy(),e}},{key:"_rotateFile",value:function(){var e=this;this._incFile((function(){return e.open()}))}},{key:"_endStream",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};this._dest?(this._stream.unpipe(this._dest),this._dest.end((function(){e._cleanupStream(e._dest),t()}))):t()}},{key:"_createStream",value:function(e){var t=this,n=u.join(this.dirname,this.filename);x("create stream start",n,this.options);var i=l.createWriteStream(n,this.options).on("error",(function(e){return x(e)})).on("close",(function(){return x("close",i.path,i.bytesWritten)})).on("open",(function(){x("file open ok",n),t.emit("open",n),e.pipe(i),t.rotatedWhileOpening&&(t._stream=new v,t._stream.setMaxListeners(30),t._rotateFile(),t.rotatedWhileOpening=!1,t._cleanupStream(i),e.end())}));return x("create stream ok",n),i}},{key:"_incFile",value:function(e){x("_incFile",this.filename);var t=u.extname(this._basename),n=u.basename(this._basename,t),i=[];this.zippedArchive&&i.push(function(e){var i=this._created>0&&!this.tailable?this._created:"";this._compressFile(u.join(this.dirname,"".concat(n).concat(i).concat(t)),u.join(this.dirname,"".concat(n).concat(i).concat(t,".gz")),e)}.bind(this)),i.push(function(e){this.tailable?this._checkMaxFilesTailable(t,n,e):(this._created+=1,this._checkMaxFilesIncrementing(t,n,e))}.bind(this)),m(i,e)}},{key:"_getFile",value:function(){var e=u.extname(this._basename),t=u.basename(this._basename,e),n=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?"".concat(t).concat(n).concat(e):"".concat(t).concat(e)}},{key:"_checkMaxFilesIncrementing",value:function(e,t,n){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(n);var i=this._created-this.maxFiles,r=0!==i?i:"",o=this.zippedArchive?".gz":"",s="".concat(t).concat(r).concat(e).concat(o),a=u.join(this.dirname,s);l.unlink(a,n)}},{key:"_checkMaxFilesTailable",value:function(e,t,n){var i=this,r=[];if(this.maxFiles){for(var o=this.zippedArchive?".gz":"",s=this.maxFiles-1;s>1;s--)r.push(function(n,i){var r=this,s="".concat(t).concat(n-1).concat(e).concat(o),a=u.join(this.dirname,s);l.exists(a,(function(c){if(!c)return i(null);s="".concat(t).concat(n).concat(e).concat(o),l.rename(a,u.join(r.dirname,s),i)}))}.bind(this,s));m(r,(function(){l.rename(u.join(i.dirname,"".concat(t).concat(e).concat(o)),u.join(i.dirname,"".concat(t,"1").concat(e).concat(o)),n)}))}}},{key:"_compressFile",value:function(e,t,n){l.access(e,l.F_OK,(function(i){if(i)return n();var r=h.createGzip(),o=l.createReadStream(e),s=l.createWriteStream(t);s.on("finish",(function(){l.unlink(e,n)})),o.pipe(r).pipe(s)}))}},{key:"_createLogDirIfNotExist",value:function(e){l.existsSync(e)||l.mkdirSync(e,{recursive:!0})}}])}(b),bN}function MN(){if(EN)return wN;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function n(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t,n){return t&&function(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,a(i.key),i)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n||"default");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}function c(t,n,i){return n=u(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,l()?Reflect.construct(n,i||[],u(t).constructor):n.apply(t,i))}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}EN=1;var d=o,m=s,h=pN().Stream,f=c$(),g=rM().configure;return wN=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=c(this,t,[n])).options=n,e.name=n.name||"http",e.ssl=!!n.ssl,e.host=n.host||"localhost",e.port=n.port,e.auth=n.auth,e.path=n.path||"",e.maximumDepth=n.maximumDepth,e.agent=n.agent,e.headers=n.headers||{},e.headers["content-type"]="application/json",e.batch=n.batch||!1,e.batchInterval=n.batchInterval||5e3,e.batchCount=n.batchCount||10,e.batchOptions=[],e.batchTimeoutID=-1,e.batchCallback={},e.port||(e.port=e.ssl?443:80),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),r(t,[{key:"log",value:function(e,t){var n=this;this._request(e,null,null,(function(t,i){i&&200!==i.statusCode&&(t=new Error("Invalid HTTP Status Code: ".concat(i.statusCode))),t?n.emit("warn",t):n.emit("logged",e)})),t&&setImmediate(t)}},{key:"query",value:function(e,t){"function"==typeof e&&(t=e,e={});var n=(e={method:"query",params:this.normalizeQuery(e)}).params.auth||null;delete e.params.auth;var i=e.params.path||null;delete e.params.path,this._request(e,n,i,(function(e,n,i){if(n&&200!==n.statusCode&&(e=new Error("Invalid HTTP Status Code: ".concat(n.statusCode))),e)return t(e);if("string"==typeof i)try{i=JSON.parse(i)}catch(e){return t(e)}t(null,i)}))}},{key:"stream",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new h,n=(e={method:"stream",params:e}).params.path||null;delete e.params.path;var i=e.params.auth||null;delete e.params.auth;var r="",o=this._request(e,i,n);return t.destroy=function(){return o.destroy()},o.on("data",(function(e){for(var n=(e=(r+e).split(/\n+/)).length-1,i=0;i<n;i++)try{t.emit("log",JSON.parse(e[i]))}catch(e){t.emit("error",e)}r=e[n]})),o.on("error",(function(e){return t.emit("error",e)})),t}},{key:"_request",value:function(e,t,n,i){e=e||{},t=t||this.auth,n=n||this.path||"",this.batch?this._doBatch(e,i,t,n):this._doRequest(e,i,t,n)}},{key:"_doBatch",value:function(e,t,n,i){if(this.batchOptions.push(e),1===this.batchOptions.length){var r=this;this.batchCallback=t,this.batchTimeoutID=setTimeout((function(){r.batchTimeoutID=-1,r._doBatchRequest(r.batchCallback,n,i)}),this.batchInterval)}this.batchOptions.length===this.batchCount&&this._doBatchRequest(this.batchCallback,n,i)}},{key:"_doBatchRequest",value:function(e,t,n){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);var i=this.batchOptions.slice();this.batchOptions=[],this._doRequest(i,e,t,n)}},{key:"_doRequest",value:function(e,t,i,r){var o=Object.assign({},this.headers);i&&i.bearer&&(o.Authorization="Bearer ".concat(i.bearer));var s=(this.ssl?m:d).request(n(n({},this.options),{},{method:"POST",host:this.host,port:this.port,path:"/".concat(r.replace(/^\//,"")),headers:o,auth:i&&i.username&&i.password?"".concat(i.username,":").concat(i.password):"",agent:this.agent}));s.on("error",t),s.on("response",(function(e){return e.on("end",(function(){return t(null,e)})).resume()}));var a=g(n({},this.maximumDepth&&{maximumDepth:this.maximumDepth}));s.end(Buffer.from(a(e,this.options.replacer),"utf8"))}}])}(f),wN}function jN(){if(_N)return SN;_N=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,SN=e}function $N(){if(CN)return ON;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}function i(t,n,i){return n=o(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,r()?Reflect.construct(n,i||[],o(t).constructor):n.apply(t,i))}function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(r=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}CN=1;var a=jN(),c=kR().MESSAGE,l=p,u=c$();return ON=function(e){function n(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),e=i(this,n,[t]),!t.stream||!a(t.stream))throw new Error("options.stream is required.");return e._stream=t.stream,e._stream.setMaxListeners(1/0),e.isObjectMode=t.stream._writableState.objectMode,e.eol="string"==typeof t.eol?t.eol:l.EOL,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(n,e),t(n,[{key:"log",value:function(e,t){var n=this;if(setImmediate((function(){return n.emit("logged",e)})),this.isObjectMode)return this._stream.write(e),void(t&&t());this._stream.write("".concat(e[c]).concat(this.eol)),t&&t()}}])}(u),ON}var NN,DN={};function LN(){if(NN)return DN;NN=1;var e=ij(),t=kR().configs;return DN.cli=e.levels(t.cli),DN.npm=e.levels(t.npm),DN.syslog=e.levels(t.syslog),DN.addColors=e.levels,DN}var zN,FN={exports:{}},UN={exports:{}};var BN,HN,qN,VN,GN,WN,KN={exports:{}};function YN(){return HN||(HN=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=(zN||(zN=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=l(h$()),i=l(J$()),r=l(Z$()),o=l(j$()),s=l(B$()),a=l(_$()),c=l(T$());function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){n=(0,o.default)(n);var r=0,a=0,{length:c}=e,l=!1;function u(e,t){!1===e&&(l=!0),!0!==l&&(e?n(e):++a!==c&&t!==i.default||n(null))}for(0===c&&n(null);r<c;r++)t(e[r],r,(0,s.default)(u))}function p(e,t,n){return(0,r.default)(e,1/0,t,n)}t.default=(0,c.default)((function(e,t,i){return((0,n.default)(e)?u:p)(e,(0,a.default)(t),i)}),3),e.exports=t.default}(UN,UN.exports)),UN.exports),i=c(n),r=(BN||(BN=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(t,n,i)=>e(t,i)},e.exports=t.default}(KN,KN.exports)),KN.exports),o=c(r),s=c(_$()),a=c(T$());function c(e){return e&&e.__esModule?e:{default:e}}t.default=(0,a.default)((function(e,t,n){return(0,i.default)(e,(0,o.default)((0,s.default)(t)),n)}),3),e.exports=t.default}(FN,FN.exports)),FN.exports}function QN(){if(WN)return GN;WN=1;var e=function(){if(VN)return qN;VN=1;var e=Object.prototype.toString;return qN=function(t){if("string"==typeof t.displayName&&t.constructor.name)return t.displayName;if("string"==typeof t.name&&t.name)return t.name;if("object"==typeof t&&t.constructor&&"string"==typeof t.constructor.name)return t.constructor.name;var n=t.toString(),i=e.call(t).slice(8,-1);return(n="Function"===i?n.substring(n.indexOf("(")+1,n.indexOf(")")):i)||"anonymous"}}();return GN=function(t){var n,i=0;function r(){return i||(i=1,n=t.apply(this,arguments),t=null),n}return r.displayName=e(t),r},GN}var JN,XN,ZN,eD,tD,nD,iD,rD,oD,sD={};function aD(){return JN||(JN=1,function(e){function t(e){for(var t in e)this[t]=e[t]}e.get=function(t){var n=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var i={},r=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t},Error.captureStackTrace(i,t||e.get);var o=i.stack;return Error.prepareStackTrace=r,Error.stackTraceLimit=n,o},e.parse=function(e){if(!e.stack)return[];var t=this;return e.stack.split("\n").slice(1).map((function(e){if(e.match(/^\s*[-]{4,}$/))return t._createParsedCallSite({fileName:e,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var n=e.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(n){var i=null,r=null,o=null,s=null,a=null,c="native"===n[5];if(n[1]){var l=(o=n[1]).lastIndexOf(".");if("."==o[l-1]&&l--,l>0){i=o.substr(0,l),r=o.substr(l+1);var u=i.indexOf(".Module");u>0&&(o=o.substr(u+1),i=i.substr(0,u))}s=null}r&&(s=i,a=r),"<anonymous>"===r&&(a=null,o=null);var p={fileName:n[2]||null,lineNumber:parseInt(n[3],10)||null,functionName:o,typeName:s,methodName:a,columnNumber:parseInt(n[4],10)||null,native:c};return t._createParsedCallSite(p)}})).filter((function(e){return!!e}))};["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"].forEach((function(e){t.prototype[e]=null,t.prototype["get"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}})),["topLevel","eval","native","constructor"].forEach((function(e){t.prototype[e]=!1,t.prototype["is"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}})),e._createParsedCallSite=function(e){return new t(e)}}(sD)),sD}function cD(){if(ZN)return XN;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}function i(t,n,i){return n=o(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,r()?Reflect.construct(n,i||[],o(t).constructor):n.apply(t,i))}function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(r=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}ZN=1;var a=pN().Writable;return XN=function(e){function n(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t=i(this,n,[{objectMode:!0}]),!e)throw new Error("ExceptionStream requires a TransportStream instance.");return t.handleExceptions=!0,t.transport=e,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(n,e),t(n,[{key:"_write",value:function(e,t,n){return e.exception?this.transport.log(e,n):(n(),!0)}}])}(a),XN}function lD(){if(tD)return eD;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}tD=1;var i=p,r=YN(),o=AN()("winston:exception"),s=QN(),a=aD(),c=cD();return eD=function(){return t((function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("Logger is required to handle exceptions");this.logger=t,this.handlers=new Map}),[{key:"handle",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];n.forEach((function(t){if(Array.isArray(t))return t.forEach((function(t){return e._addHandler(t)}));e._addHandler(t)})),this.catcher||(this.catcher=this._uncaughtException.bind(this),process.on("uncaughtException",this.catcher))}},{key:"unhandle",value:function(){var e=this;this.catcher&&(process.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((function(t){return e.logger.unpipe(t)})))}},{key:"getAllInfo",value:function(e){var t=null;return e&&(t="string"==typeof e?e:e.message),{error:e,level:"error",message:["uncaughtException: ".concat(t||"(no error message)"),e&&e.stack||" No stack trace"].join("\n"),stack:e&&e.stack,exception:!0,date:(new Date).toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}},{key:"getProcessInfo",value:function(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}},{key:"getOsInfo",value:function(){return{loadavg:i.loadavg(),uptime:i.uptime()}}},{key:"getTrace",value:function(e){return(e?a.parse(e):a.get()).map((function(e){return{column:e.getColumnNumber(),file:e.getFileName(),function:e.getFunctionName(),line:e.getLineNumber(),method:e.getMethodName(),native:e.isNative()}}))}},{key:"_addHandler",value:function(e){if(!this.handlers.has(e)){e.handleExceptions=!0;var t=new c(e);this.handlers.set(e,t),this.logger.pipe(t)}}},{key:"_uncaughtException",value:function(e){var t,n=this.getAllInfo(e),i=this._getExceptionHandlers(),a="function"==typeof this.logger.exitOnError?this.logger.exitOnError(e):this.logger.exitOnError;function c(){o("doExit",a),o("process._exiting",process._exiting),a&&!process._exiting&&(t&&clearTimeout(t),process.exit(1))}if(!i.length&&a&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),a=!1),!i||0===i.length)return process.nextTick(c);r(i,(function(e,t){var n=s(t),i=e.transport||e;function r(e){return function(){o(e),n()}}i._ending=!0,i.once("finish",r("finished")),i.once("error",r("error"))}),(function(){return a&&c()})),this.logger.log(n),a&&(t=setTimeout(c,3e3))}},{key:"_getExceptionHandlers",value:function(){return this.logger.transports.filter((function(e){return(e.transport||e).handleExceptions}))}}])}(),eD}function uD(){if(iD)return nD;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}function i(t,n,i){return n=o(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,r()?Reflect.construct(n,i||[],o(t).constructor):n.apply(t,i))}function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(r=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}iD=1;var a=pN().Writable;return nD=function(e){function n(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t=i(this,n,[{objectMode:!0}]),!e)throw new Error("RejectionStream requires a TransportStream instance.");return t.handleRejections=!0,t.transport=e,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(n,e),t(n,[{key:"_write",value:function(e,t,n){return e.rejection?this.transport.log(e,n):(n(),!0)}}])}(a),nD}function pD(){if(oD)return rD;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}oD=1;var i=p,r=YN(),o=AN()("winston:rejection"),s=QN(),a=aD(),c=uD();return rD=function(){return t((function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("Logger is required to handle rejections");this.logger=t,this.handlers=new Map}),[{key:"handle",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];n.forEach((function(t){if(Array.isArray(t))return t.forEach((function(t){return e._addHandler(t)}));e._addHandler(t)})),this.catcher||(this.catcher=this._unhandledRejection.bind(this),process.on("unhandledRejection",this.catcher))}},{key:"unhandle",value:function(){var e=this;this.catcher&&(process.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((function(t){return e.logger.unpipe(t)})))}},{key:"getAllInfo",value:function(e){var t=null;return e&&(t="string"==typeof e?e:e.message),{error:e,level:"error",message:["unhandledRejection: ".concat(t||"(no error message)"),e&&e.stack||" No stack trace"].join("\n"),stack:e&&e.stack,rejection:!0,date:(new Date).toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}},{key:"getProcessInfo",value:function(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}},{key:"getOsInfo",value:function(){return{loadavg:i.loadavg(),uptime:i.uptime()}}},{key:"getTrace",value:function(e){return(e?a.parse(e):a.get()).map((function(e){return{column:e.getColumnNumber(),file:e.getFileName(),function:e.getFunctionName(),line:e.getLineNumber(),method:e.getMethodName(),native:e.isNative()}}))}},{key:"_addHandler",value:function(e){if(!this.handlers.has(e)){e.handleRejections=!0;var t=new c(e);this.handlers.set(e,t),this.logger.pipe(t)}}},{key:"_unhandledRejection",value:function(e){var t,n=this.getAllInfo(e),i=this._getRejectionHandlers(),a="function"==typeof this.logger.exitOnError?this.logger.exitOnError(e):this.logger.exitOnError;function c(){o("doExit",a),o("process._exiting",process._exiting),a&&!process._exiting&&(t&&clearTimeout(t),process.exit(1))}if(!i.length&&a&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),a=!1),!i||0===i.length)return process.nextTick(c);r(i,(function(e,t){var n=s(t),i=e.transport||e;function r(e){return function(){o(e),n()}}i._ending=!0,i.once("finish",r("finished")),i.once("error",r("error"))}),(function(){return a&&c()})),this.logger.log(n),a&&(t=setTimeout(c,3e3))}},{key:"_getRejectionHandlers",value:function(){return this.logger.transports.filter((function(e){return(e.transport||e).handleRejections}))}}])}(),rD}var dD,mD,hD,fD,gD,yD,vD,bD,xD,wD,ED,SD,_D,OD,CD,kD={exports:{}},TD={exports:{}};function PD(){if(mD)return kD.exports;mD=1;const e=i,{LEVEL:t}=kR(),n=function(){if(dD)return TD.exports;dD=1;const e=i,t=t$(),{LEVEL:n}=kR(),r=TD.exports=function(e={}){t.call(this,{objectMode:!0,highWaterMark:e.highWaterMark}),this.format=e.format,this.level=e.level,this.handleExceptions=e.handleExceptions,this.handleRejections=e.handleRejections,this.silent=e.silent,e.log&&(this.log=e.log),e.logv&&(this.logv=e.logv),e.close&&(this.close=e.close),this.once("pipe",(e=>{this.levels=e.levels,this.parent=e})),this.once("unpipe",(e=>{e===this.parent&&(this.parent=null,this.close&&this.close())}))};return e.inherits(r,t),r.prototype._write=function(e,t,i){if(this.silent||!0===e.exception&&!this.handleExceptions)return i(null);const r=this.level||this.parent&&this.parent.level;if(!r||this.levels[r]>=this.levels[e[n]]){if(e&&!this.format)return this.log(e,i);let t,n;try{n=this.format.transform(Object.assign({},e),this.format.options)}catch(e){t=e}if(t||!n){if(i(),t)throw t;return}return this.log(n,i)}return this._writableState.sync=!1,i(null)},r.prototype._writev=function(e,t){if(this.logv){const n=e.filter(this._accept,this);return n.length?this.logv(n,t):t(null)}for(let n=0;n<e.length;n++){if(!this._accept(e[n]))continue;if(e[n].chunk&&!this.format){this.log(e[n].chunk,e[n].callback);continue}let i,r;try{r=this.format.transform(Object.assign({},e[n].chunk),this.format.options)}catch(e){i=e}if(i||!r){if(e[n].callback(),i)throw t(null),i}else this.log(r,e[n].callback)}return t(null)},r.prototype._accept=function(e){const t=e.chunk;if(this.silent)return!1;const i=this.level||this.parent&&this.parent.level;return!(!0!==t.exception&&i&&!(this.levels[i]>=this.levels[t[n]])||!this.handleExceptions&&!0===t.exception)},r.prototype._nop=function(){},TD.exports}(),r=kD.exports=function(e={}){if(n.call(this,e),!e.transport||"function"!=typeof e.transport.log)throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=function(e){this.emit("error",e,this.transport)}.bind(this),this.transport.on("error",this.transport.__winstonError))};return e.inherits(r,n),r.prototype._write=function(e,n,i){if(this.silent||!0===e.exception&&!this.handleExceptions)return i(null);(!this.level||this.levels[this.level]>=this.levels[e[t]])&&this.transport.log(e[t],e.message,e,this._nop),i(null)},r.prototype._writev=function(e,n){for(let n=0;n<e.length;n++)this._accept(e[n])&&(this.transport.log(e[n].chunk[t],e[n].chunk.message,e[n].chunk,this._nop),e[n].callback());return n(null)},r.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join("\n"))},r.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)},kD.exports}function AD(){if(fD)return hD;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}fD=1;var i=function(){return t((function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=RD();if("object"!==e(n)||Array.isArray(n)||!(n instanceof i))throw new Error("Logger is required for profiling");this.logger=n,this.start=Date.now()}),[{key:"done",value:function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];"function"==typeof n[n.length-1]&&(console.warn("Callback function no longer supported as of winston@3.0.0"),n.pop());var r="object"===e(n[n.length-1])?n.pop():{};return r.level=r.level||"info",r.durationMs=Date.now()-this.start,this.logger.write(r)}}])}();return hD=i}function ID(){if(yD)return gD;yD=1;class e extends Error{constructor(t){super(`Format functions must be synchronous taking a two arguments: (info, opts)\nFound: ${t.toString().split("\n")[0]}\n`),Error.captureStackTrace(this,e)}}return gD=t=>{if(t.length>2)throw new e(t);function n(e={}){this.options=e}function i(e){return new n(e)}return n.prototype.transform=t,i.Format=n,i}}function RD(){if(wD)return xD;function e(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e,t,n){return t&&function(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,i(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,n||"default");if("object"!=t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}function r(e,n,i){return n=s(n),function(e,n){if(n&&("object"==t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,o()?Reflect.construct(n,i||[],s(e).constructor):n.apply(e,i))}function o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(o=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}wD=1;var c=pN(),l=c.Stream,u=c.Transform,p=YN(),d=kR(),m=d.LEVEL,h=d.SPLAT,f=jN(),g=lD(),y=pD(),v=PD(),b=AD(),x=sj().warn,w=LN(),E=/%[scdjifoO%]/g,S=function(i){function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r(this,o,[{objectMode:!0}])).configure(e),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(o,i),n(o,[{key:"child",value:function(e){var t=this;return Object.create(t,{write:{value:function(n){var i=Object.assign({},e,n);n instanceof Error&&(i.stack=n.stack,i.message=n.message),t.write(i)}}})}},{key:"configure",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.silent,i=t.format,r=t.defaultMeta,o=t.levels,s=t.level,a=void 0===s?"info":s,c=t.exitOnError,l=void 0===c||c,u=t.transports,p=t.colors,d=t.emitErrs,m=t.formatters,h=t.padLevels,f=t.rewriters,v=t.stripColors,b=t.exceptionHandlers,x=t.rejectionHandlers;if(this.transports.length&&this.clear(),this.silent=n,this.format=i||this.format||function(){if(bD)return vD;bD=1;const e=ID(),{MESSAGE:t}=kR(),n=rM();function i(e,t){return"bigint"==typeof t?t.toString():t}return vD=e(((e,r)=>{const o=n.configure(r);return e[t]=o(e,r.replacer||i,r.space),e}))}()(),this.defaultMeta=r||null,this.levels=o||this.levels||w.npm.levels,this.level=a,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new g(this),this.rejections=new y(this),this.profilers={},this.exitOnError=l,u&&(u=Array.isArray(u)?u:[u]).forEach((function(t){return e.add(t)})),p||d||m||h||f||v)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join("\n"));b&&this.exceptions.handle(b),x&&this.rejections.handle(x)}},{key:"isLevelEnabled",value:function(e){var t=this,n=_(this.levels,e);if(null===n)return!1;var i=_(this.levels,this.level);return null!==i&&(this.transports&&0!==this.transports.length?-1!==this.transports.findIndex((function(e){var r=_(t.levels,e.level);return null===r&&(r=i),r>=n})):i>=n)}},{key:"log",value:function(n,i){for(var r=arguments.length,o=new Array(r>2?r-2:0),s=2;s<r;s++)o[s-2]=arguments[s];if(1===arguments.length)return n[m]=n.level,this._addDefaultMeta(n),this.write(n),this;if(2===arguments.length)return i&&"object"===t(i)?(i[m]=i.level=n,this._addDefaultMeta(i),this.write(i),this):(i=e(e(e({},m,n),"level",n),"message",i),this._addDefaultMeta(i),this.write(i),this);var a=o[0];if("object"===t(a)&&null!==a&&!(i&&i.match&&i.match(E))){var c=Object.assign({},this.defaultMeta,a,e(e(e(e({},m,n),h,o),"level",n),"message",i));return a.message&&(c.message="".concat(c.message," ").concat(a.message)),a.stack&&(c.stack=a.stack),a.cause&&(c.cause=a.cause),this.write(c),this}return this.write(Object.assign({},this.defaultMeta,e(e(e(e({},m,n),h,o),"level",n),"message",i))),this}},{key:"_transform",value:function(e,t,n){if(this.silent)return n();e[m]||(e[m]=e.level),this.levels[e[m]]||0===this.levels[e[m]]||console.error("[winston] Unknown logger level: %s",e[m]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",e);try{this.push(this.format.transform(e,this.format.options))}finally{this._writableState.sync=!1,n()}}},{key:"_final",value:function(e){var t=this.transports.slice();p(t,(function(e,t){if(!e||e.finished)return setImmediate(t);e.once("finish",t),e.end()}),e)}},{key:"add",value:function(e){var t=!f(e)||e.log.length>2?new v({transport:e}):e;if(!t._writableState||!t._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",t),this._onEvent("warn",t),this.pipe(t),e.handleExceptions&&this.exceptions.handle(),e.handleRejections&&this.rejections.handle(),this}},{key:"remove",value:function(e){if(!e)return this;var t=e;return(!f(e)||e.log.length>2)&&(t=this.transports.filter((function(t){return t.transport===e}))[0]),t&&this.unpipe(t),this}},{key:"clear",value:function(){return this.unpipe(),this}},{key:"close",value:function(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}},{key:"setLevels",value:function(){x.deprecated("setLevels")}},{key:"query",value:function(e,t){"function"==typeof e&&(t=e,e={}),e=e||{};var n={},i=Object.assign({},e.query||{});p(this.transports.filter((function(e){return!!e.query})),(function(t,r){!function(t,n){e.query&&"function"==typeof t.formatQuery&&(e.query=t.formatQuery(i)),t.query(e,(function(i,r){if(i)return n(i);"function"==typeof t.formatResults&&(r=t.formatResults(r,e.format)),n(null,r)}))}(t,(function(e,i){r&&((i=e||i)&&(n[t.name]=i),r()),r=null}))}),(function(){return t(null,n)}))}},{key:"stream",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new l,n=[];return t._streams=n,t.destroy=function(){for(var e=n.length;e--;)n[e].destroy()},this.transports.filter((function(e){return!!e.stream})).forEach((function(i){var r=i.stream(e);r&&(n.push(r),r.on("log",(function(e){e.transport=e.transport||[],e.transport.push(i.name),t.emit("log",e)})),r.on("error",(function(e){e.transport=e.transport||[],e.transport.push(i.name),t.emit("error",e)})))})),t}},{key:"startTimer",value:function(){return new b(this)}},{key:"profile",value:function(e){var n=Date.now();if(this.profilers[e]){var i=this.profilers[e];delete this.profilers[e];for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];"function"==typeof o[o.length-2]&&(console.warn("Callback function no longer supported as of winston@3.0.0"),o.pop());var a="object"===t(o[o.length-1])?o.pop():{};return a.level=a.level||"info",a.durationMs=n-i,a.message=a.message||e,this.write(a)}return this.profilers[e]=n,this}},{key:"handleExceptions",value:function(){var e;console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),(e=this.exceptions).handle.apply(e,arguments)}},{key:"unhandleExceptions",value:function(){var e;console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),(e=this.exceptions).unhandle.apply(e,arguments)}},{key:"cli",value:function(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join("\n"))}},{key:"_onEvent",value:function(e,t){t["__winston"+e]||(t["__winston"+e]=function(n){"error"!==e||this.transports.includes(t)||this.add(t),this.emit(e,n,t)}.bind(this),t.on(e,t["__winston"+e]))}},{key:"_addDefaultMeta",value:function(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}}])}(u);function _(e,t){var n=e[t];return n||0===n?n:null}return Object.defineProperty(S.prototype,"transports",{configurable:!1,enumerable:!0,get:function(){var e=this._readableState.pipes;return Array.isArray(e)?e:[e].filter(Boolean)}}),xD=S}function MD(){if(SD)return ED;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,r,o){return r=i(r),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,n()?Reflect.construct(r,o||[],i(t).constructor):r.apply(t,o))}function n(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(n=function(){return!!e})()}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}SD=1;var o=kR().LEVEL,s=LN(),a=RD(),c=AN()("winston:create-logger");return ED=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.levels=e.levels||s.npm.levels;var n=function(e){function n(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t(this,n,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)}(n,e),function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(n)}(a),i=new n(e);return Object.keys(e.levels).forEach((function(e){c('Define prototype method for "%s"',e),"log"!==e?(n.prototype[e]=function(){for(var t=this||i,n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];if(1===r.length){var a=r[0],c=a&&a.message&&a||{message:a};return c.level=c[o]=e,t._addDefaultMeta(c),t.write(c),this||i}return 0===r.length?(t.log(e,""),t):t.log.apply(t,[e].concat(r))},n.prototype[function(e){return"is"+e.charAt(0).toUpperCase()+e.slice(1)+"Enabled"}(e)]=function(){return(this||i).isLevelEnabled(e)}):console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.')})),i},ED}function jD(){if(OD)return _D;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}OD=1;var i=MD();return _D=function(){return t((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.loggers=new Map,this.options=t}),[{key:"add",value:function(e,t){var n=this;if(!this.loggers.has(e)){var r=(t=Object.assign({},t||this.options)).transports||this.options.transports;t.transports=r?Array.isArray(r)?r.slice():[r]:[];var o=i(t);o.on("close",(function(){return n._delete(e)})),this.loggers.set(e,o)}return this.loggers.get(e)}},{key:"get",value:function(e,t){return this.add(e,t)}},{key:"has",value:function(e){return!!this.loggers.has(e)}},{key:"close",value:function(e){var t=this;if(e)return this._removeLogger(e);this.loggers.forEach((function(e,n){return t._removeLogger(n)}))}},{key:"_removeLogger",value:function(e){this.loggers.has(e)&&(this.loggers.get(e).close(),this._delete(e))}},{key:"_delete",value:function(e){this.loggers.delete(e)}}])}(),_D}var $D=(CD||(CD=1,function(e){var t=ij(),n=sj().warn;e.version=mj,e.transports=(kN||(kN=1,function(e){Object.defineProperty(e,"Console",{configurable:!0,enumerable:!0,get:function(){return l$()}}),Object.defineProperty(e,"File",{configurable:!0,enumerable:!0,get:function(){return RN()}}),Object.defineProperty(e,"Http",{configurable:!0,enumerable:!0,get:function(){return MN()}}),Object.defineProperty(e,"Stream",{configurable:!0,enumerable:!0,get:function(){return $N()}})}(hj)),hj),e.config=LN(),e.addColors=t.levels,e.format=t.format,e.createLogger=MD(),e.Logger=RD(),e.ExceptionHandler=lD(),e.RejectionHandler=pD(),e.Container=jD(),e.Transport=c$(),e.loggers=new e.Container;var i=e.createLogger();Object.keys(e.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach((function(t){return e[t]=function(){return i[t].apply(i,arguments)}})),Object.defineProperty(e,"level",{get:function(){return i.level},set:function(e){i.level=e}}),Object.defineProperty(e,"exceptions",{get:function(){return i.exceptions}}),Object.defineProperty(e,"rejections",{get:function(){return i.rejections}}),["exitOnError"].forEach((function(t){Object.defineProperty(e,t,{get:function(){return i[t]},set:function(e){i[t]=e}})})),Object.defineProperty(e,"default",{get:function(){return{exceptionHandlers:i.exceptionHandlers,rejectionHandlers:i.rejectionHandlers,transports:i.transports}}}),n.deprecated(e,"setLevels"),n.forFunctions(e,"useFormat",["cli"]),n.forProperties(e,"useFormat",["padLevels","stripColors"]),n.forFunctions(e,"deprecated",["addRewriter","addFilter","clone","extend"]),n.forProperties(e,"deprecated",["emitErrs","levelLength"])}($I)),$I);e.DEFAULT_PARAMETER_STORE_CLIENT_CONFIG=tf,e.DEFAULT_SES_CLIENT_CONFIG=RI,e.lambda=e=>{const{clientConfig:t,...n}={...Cc,...e},i=new _s(t);return{invokeLambda:(e,t)=>(async(e,t,n,i)=>{try{const r=new yc({FunctionName:t.functionName,InvocationType:n,Payload:Buffer.from(JSON.stringify(i))}),o=await e.send(r);return t.logger&&t.logger("info",JSON.stringify(o)),!0}catch(e){return t.logger&&t.logger("error",e),!1}})(i,n,e,t)}},e.logger=e=>{const t={defaultMeta:{...e.defaultLogInformation,deploymentStage:e.deploymentStage,service:e.service},format:$D.format.combine($D.format.timestamp({format:"DD-MM-YYYY HH:mm:ss"}),$D.format.json())};if(e.datadogApiKey){const n={host:"http-intake.logs.datadoghq.eu",path:`/api/v2/logs?dd-api-key=${e.datadogApiKey}&ddsource=nodejs&service=${e.service}`,port:443,ssl:!0};return $D.createLogger({...t,transports:[new $D.transports.Http(n)]})}return $D.createLogger({...t,transports:[new $D.transports.Console]})},e.parameterStore=e=>{const{clientConfig:t,...n}={...tf,...e},i=new zl(t);return{getSecret:(e,t="")=>(async(e,t,n,i)=>{if(t.onlyDefault)return i;try{const r=await e.send(new Zh({Name:`${t.prefix??""}${n}`,WithDecryption:!0}));return r?.Parameter?.Value??i}catch(e){return t.logger&&t.logger("error",e),i}})(i,n,e,t),getSecrets:(e,t="")=>(async(e,t,n,i)=>{if(t.onlyDefault)return[i];try{const r=new ef({Names:n.map((e=>`${t.prefix??""}${e}`)),WithDecryption:!0}),o=await e.send(r);return o?.Parameters?.map((e=>e.Value??i))??[i]}catch(e){return t.logger&&t.logger("error",e),[i]}})(i,n,e,t)}},e.ses=(e,t)=>{const{clientConfig:n,...i}={...RI,...t},r=new $f(n),o=II.createTransport(t.customSMTPConfig??{SES:{aws:eA,ses:r}});return{sendMail:t=>(async(e,t,n,i)=>{if(!n.html&&!n.text)return e.logger&&e.logger("error","The option text or html needs to be set."),!1;if(!n.to||!n.subject)return e.logger&&e.logger("error","The fields to and subject have to be set."),!1;const r=await t.sendMail({from:i,...n});return e.logger&&e.logger("info",`Transporter response: ${JSON.stringify(r)}`),!!r||(e.logger&&e.logger("error","Sending email failed!"),!1)})(i,o,t,e)}}}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("events"),require("url"),require("util"),require("fs"),require("http"),require("https"),require("zlib"),require("stream"),require("net"),require("dns"),require("os"),require("path"),require("crypto"),require("tls"),require("child_process"),require("buffer"),require("string_decoder")):"function"==typeof define&&define.amd?define(["exports","events","url","util","fs","http","https","zlib","stream","net","dns","os","path","crypto","tls","child_process","buffer","string_decoder"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).allthings={},e.require$$0$a,e.require$$0$3,e.require$$0$8,e.require$$0$6,e.require$$0$5,e.require$$1,e.require$$3$1,e.require$$0$4,e.require$$7,e.require$$4,e.require$$0$7,e.require$$0$9,e.require$$2$1,e.require$$1$1,e.require$$0$b,e.require$$0$c,e.require$$1$2)}(this,(function(exports,require$$0$a,require$$0$3,require$$0$8,require$$0$6,require$$0$5,require$$1,require$$3$1,require$$0$4,require$$7,require$$4,require$$0$7,require$$0$9,require$$2$1,require$$1$1,require$$0$b,require$$0$c,require$$1$2){"use strict";var HttpAuthLocation,HttpApiKeyAuthLocation,EndpointURLScheme,AlgorithmId,FieldPosition;!function(e){e.HEADER="header",e.QUERY="query"}(HttpAuthLocation||(HttpAuthLocation={})),function(e){e.HEADER="header",e.QUERY="query"}(HttpApiKeyAuthLocation||(HttpApiKeyAuthLocation={})),function(e){e.HTTP="http",e.HTTPS="https"}(EndpointURLScheme||(EndpointURLScheme={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(AlgorithmId||(AlgorithmId={})),function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"}(FieldPosition||(FieldPosition={}));const SMITHY_CONTEXT_KEY="__smithy_context";var IniSectionType,RequestHandlerProtocol;!function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"}(IniSectionType||(IniSectionType={})),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(RequestHandlerProtocol||(RequestHandlerProtocol={}));const getSmithyContext=e=>e[SMITHY_CONTEXT_KEY]||(e[SMITHY_CONTEXT_KEY]={}),normalizeProvider$1=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},DEFAULT_ACCOUNT_ID_ENDPOINT_MODE="preferred",ACCOUNT_ID_ENDPOINT_MODE_VALUES=["disabled","preferred","required"];function validateAccountIdEndpointMode(e){return ACCOUNT_ID_ENDPOINT_MODE_VALUES.includes(e)}const resolveAccountIdEndpointModeConfig=e=>{const t=normalizeProvider$1(e.accountIdEndpointMode??DEFAULT_ACCOUNT_ID_ENDPOINT_MODE);return{...e,accountIdEndpointMode:async()=>{const e=await t();if(!validateAccountIdEndpointMode(e))throw new Error(`Invalid value for accountIdEndpointMode: ${e}. Valid values are: "required", "preferred", "disabled".`);return e}}},getHttpHandlerExtensionConfiguration=e=>{let t=e.httpHandler;return{setHttpHandler(e){t=e},httpHandler:()=>t,updateHttpClientConfig(e,n){t.updateHttpClientConfig(e,n)},httpHandlerConfigs:()=>t.httpHandlerConfigs()}},resolveHttpHandlerRuntimeConfig=e=>({httpHandler:e.httpHandler()});class HttpRequest{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 HttpRequest({...e,headers:{...e.headers}});return t.query&&(t.query=cloneQuery(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 HttpRequest.clone(this)}}function cloneQuery(e){return Object.keys(e).reduce(((t,n)=>{const i=e[n];return{...t,[n]:Array.isArray(i)?[...i]:i}}),{})}class HttpResponse{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}}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},iterator$1,hasRequiredIterator$1,foreach,hasRequiredForeach;function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getAugmentedNamespace(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})})),n}function requireIterator$1(){if(hasRequiredIterator$1)return iterator$1;function e(e){Object.defineProperty(this,"_next",{writable:!1,enumerable:!1,value:e}),this.done=!1}return hasRequiredIterator$1=1,e.prototype.next=function(){if(this.done)return{done:!0};var e=this._next();return e.done&&(this.done=!0),e},"undefined"!=typeof Symbol&&(e.prototype[Symbol.iterator]=function(){return this}),e.of=function(){var t=arguments,n=t.length,i=0;return new e((function(){return i>=n?{done:!0}:{done:!1,value:t[i++]}}))},e.empty=function(){var t=new e(null);return t.done=!0,t},e.is=function(t){return t instanceof e||"object"==typeof t&&null!==t&&"function"==typeof t.next},iterator$1=e}function requireForeach(){if(hasRequiredForeach)return foreach;hasRequiredForeach=1;var e="undefined"!=typeof ArrayBuffer,t="undefined"!=typeof Symbol;function n(n,i){var r,o,a,s,c;if(!n)throw new Error("obliterator/forEach: invalid iterable.");if("function"!=typeof i)throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(n)||e&&ArrayBuffer.isView(n)||"string"==typeof n||"[object Arguments]"===n.toString())for(a=0,s=n.length;a<s;a++)i(n[a],a);else if("function"!=typeof n.forEach)if(t&&Symbol.iterator in n&&"function"!=typeof n.next&&(n=n[Symbol.iterator]()),"function"!=typeof n.next)for(o in n)n.hasOwnProperty(o)&&i(n[o],o);else for(r=n,a=0;!0!==(c=r.next()).done;)i(c.value,a),a++;else n.forEach(i)}return n.forEachWithNullKeys=function(n,i){var r,o,a,s,c;if(!n)throw new Error("obliterator/forEachWithNullKeys: invalid iterable.");if("function"!=typeof i)throw new Error("obliterator/forEachWithNullKeys: expecting a callback.");if(Array.isArray(n)||e&&ArrayBuffer.isView(n)||"string"==typeof n||"[object Arguments]"===n.toString())for(a=0,s=n.length;a<s;a++)i(n[a],null);else if(n instanceof Set)n.forEach((function(e){i(e,null)}));else if("function"!=typeof n.forEach)if(t&&Symbol.iterator in n&&"function"!=typeof n.next&&(n=n[Symbol.iterator]()),"function"!=typeof n.next)for(o in n)n.hasOwnProperty(o)&&i(n[o],o);else for(r=n,a=0;!0!==(c=r.next()).done;)i(c.value,null),a++;else n.forEach(i)},foreach=n}var typedArrays={},hasRequiredTypedArrays;function requireTypedArrays(){return hasRequiredTypedArrays||(hasRequiredTypedArrays=1,function(e){var t=Math.pow(2,8)-1,n=Math.pow(2,16)-1,i=Math.pow(2,32)-1,r=Math.pow(2,7)-1,o=Math.pow(2,15)-1,a=Math.pow(2,31)-1;e.getPointerArray=function(e){var r=e-1;return r<=t?Uint8Array:r<=n?Uint16Array:r<=i?Uint32Array:Float64Array},e.getSignedPointerArray=function(e){var t=e-1;return t<=r?Int8Array:t<=o?Int16Array:t<=a?Int32Array:Float64Array},e.getNumberType=function(e){return e===(0|e)?-1===Math.sign(e)?e<=127&&e>=-128?Int8Array:e<=32767&&e>=-32768?Int16Array:Int32Array:e<=255?Uint8Array:e<=65535?Uint16Array:Uint32Array:Float64Array};var s={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};e.getMinimalRepresentation=function(t,n){var i,r,o,a,c,l=null,d=0;for(a=0,c=t.length;a<c;a++)o=n?n(t[a]):t[a],r=e.getNumberType(o),(i=s[r.name])>d&&(d=i,l=r);return l},e.isTypedArray=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView(e)},e.concat=function(){var e,t,n,i=0;for(e=0,n=arguments.length;e<n;e++)i+=arguments[e].length;var r=new arguments[0].constructor(i);for(e=0,t=0;e<n;e++)r.set(arguments[e],t),t+=arguments[e].length;return r},e.indices=function(t){for(var n=new(e.getPointerArray(t))(t),i=0;i<t;i++)n[i]=i;return n}}(typedArrays)),typedArrays}var iterables={},hasRequiredIterables,lruCache,hasRequiredLruCache;function requireIterables(){if(hasRequiredIterables)return iterables;hasRequiredIterables=1;var e=requireForeach(),t=requireTypedArrays();function n(e){return"number"==typeof e.length?e.length:"number"==typeof e.size?e.size:void 0}return iterables.isArrayLike=function(e){return Array.isArray(e)||t.isTypedArray(e)},iterables.guessLength=n,iterables.toArray=function(t){var i=n(t),r="number"==typeof i?new Array(i):[],o=0;return e(t,(function(e){r[o++]=e})),r},iterables.toArrayWithIndices=function(i){var r=n(i),o="number"==typeof r?t.getPointerArray(r):Array,a="number"==typeof r?new Array(r):[],s="number"==typeof r?new o(r):[],c=0;return e(i,(function(e){a[c]=e,s[c]=c++})),[a,s]},iterables}function requireLruCache(){if(hasRequiredLruCache)return lruCache;hasRequiredLruCache=1;var e=requireIterator$1(),t=requireForeach(),n=requireTypedArrays(),i=requireIterables();function r(e,t,i){if(arguments.length<2&&(i=e,e=null,t=null),this.capacity=i,"number"!=typeof this.capacity||this.capacity<=0)throw new Error("mnemonist/lru-cache: capacity should be positive number.");var r=n.getPointerArray(i);this.forward=new r(i),this.backward=new r(i),this.K="function"==typeof e?new e(i):new Array(i),this.V="function"==typeof t?new t(i):new Array(i),this.size=0,this.head=0,this.tail=0,this.items={}}return r.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items={}},r.prototype.splayOnTop=function(e){var t=this.head;if(this.head===e)return this;var n=this.backward[e],i=this.forward[e];return this.tail===e?this.tail=n:this.backward[i]=n,this.forward[n]=i,this.backward[t]=e,this.head=e,this.forward[e]=t,this},r.prototype.set=function(e,t){var n=this.items[e];if(void 0!==n)return this.splayOnTop(n),void(this.V[n]=t);this.size<this.capacity?n=this.size++:(n=this.tail,this.tail=this.backward[n],delete this.items[this.K[n]]),this.items[e]=n,this.K[n]=e,this.V[n]=t,this.forward[n]=this.head,this.backward[this.head]=n,this.head=n},r.prototype.setpop=function(e,t){var n=null,i=null,r=this.items[e];return void 0!==r?(this.splayOnTop(r),n=this.V[r],this.V[r]=t,{evicted:!1,key:e,value:n}):(this.size<this.capacity?r=this.size++:(r=this.tail,this.tail=this.backward[r],n=this.V[r],i=this.K[r],delete this.items[this.K[r]]),this.items[e]=r,this.K[r]=e,this.V[r]=t,this.forward[r]=this.head,this.backward[this.head]=r,this.head=r,i?{evicted:!0,key:i,value:n}:null)},r.prototype.has=function(e){return e in this.items},r.prototype.get=function(e){var t=this.items[e];if(void 0!==t)return this.splayOnTop(t),this.V[t]},r.prototype.peek=function(e){var t=this.items[e];if(void 0!==t)return this.V[t]},r.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=0,i=this.size,r=this.head,o=this.K,a=this.V,s=this.forward;n<i;)e.call(t,a[r],o[r],this),r=s[r],n++},r.prototype.keys=function(){var t=0,n=this.size,i=this.head,r=this.K,o=this.forward;return new e((function(){if(t>=n)return{done:!0};var e=r[i];return++t<n&&(i=o[i]),{done:!1,value:e}}))},r.prototype.values=function(){var t=0,n=this.size,i=this.head,r=this.V,o=this.forward;return new e((function(){if(t>=n)return{done:!0};var e=r[i];return++t<n&&(i=o[i]),{done:!1,value:e}}))},r.prototype.entries=function(){var t=0,n=this.size,i=this.head,r=this.K,o=this.V,a=this.forward;return new e((function(){if(t>=n)return{done:!0};var e=r[i],s=o[i];return++t<n&&(i=a[i]),{done:!1,value:[e,s]}}))},"undefined"!=typeof Symbol&&(r.prototype[Symbol.iterator]=r.prototype.entries),r.prototype.inspect=function(){for(var e,t=new Map,n=this.entries();!(e=n.next()).done;)t.set(e.value[0],e.value[1]);return Object.defineProperty(t,"constructor",{value:r,enumerable:!1}),t},"undefined"!=typeof Symbol&&(r.prototype[Symbol.for("nodejs.util.inspect.custom")]=r.prototype.inspect),r.from=function(e,n,o,a){if(arguments.length<2){if("number"!=typeof(a=i.guessLength(e)))throw new Error("mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.")}else 2===arguments.length&&(a=n,n=null,o=null);var s=new r(n,o,a);return t(e,(function(e,t){s.set(t,e)})),s},lruCache=r}var lruCacheExports=requireLruCache(),LRUCache=getDefaultExportFromCjs(lruCacheExports);let EndpointCache$1=class{constructor(e){this.cache=new LRUCache(e)}getEndpoint(e){const t=this.get(e);if(!t||0===t.length)return;const n=t.map((e=>e.Address));return n[Math.floor(Math.random()*n.length)]}get(e){if(!this.has(e))return;const t=this.cache.get(e);if(!t)return;const n=Date.now(),i=t.filter((e=>n<e.Expires));if(0!==i.length)return i;this.delete(e)}set(e,t){const n=Date.now();this.cache.set(e,t.map((({Address:e,CachePeriodInMinutes:t})=>({Address:e,Expires:n+60*t*1e3}))))}delete(e){this.cache.set(e,[])}has(e){if(!this.cache.has(e))return!1;const t=this.cache.peek(e);return!!t&&t.length>0}clear(){this.cache.clear()}};const resolveEndpointDiscoveryConfig=(e,{endpointDiscoveryCommandCtor:t})=>({...e,endpointDiscoveryCommandCtor:t,endpointCache:new EndpointCache$1(e.endpointCacheSize??1e3),endpointDiscoveryEnabled:void 0!==e.endpointDiscoveryEnabled?()=>Promise.resolve(e.endpointDiscoveryEnabled):e.endpointDiscoveryEnabledProvider,isClientEndpointDiscoveryEnabled:void 0!==e.endpointDiscoveryEnabled});function resolveHostHeaderConfig$1(e){return e}const hostHeaderMiddleware$1=e=>t=>async n=>{if(!HttpRequest.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)},hostHeaderMiddlewareOptions$1={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},getHostHeaderPlugin$1=e=>({applyToStack:t=>{t.add(hostHeaderMiddleware$1(e),hostHeaderMiddlewareOptions$1)}}),loggerMiddleware$1=()=>(e,t)=>async n=>{try{const i=await e(n),{clientName:r,commandName:o,logger:a,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:l}=s,d=c??t.inputFilterSensitiveLog,u=l??t.outputFilterSensitiveLog,{$metadata:p,...m}=i.output;return a?.info?.({clientName:r,commandName:o,input:d(n.input),output:u(m),metadata:p}),i}catch(e){const{clientName:i,commandName:r,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:s}=a,c=s??t.inputFilterSensitiveLog;throw o?.error?.({clientName:i,commandName:r,input:c(n.input),error:e,metadata:e.$metadata}),e}},loggerMiddlewareOptions$1={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},getLoggerPlugin$1=e=>({applyToStack:e=>{e.add(loggerMiddleware$1(),loggerMiddlewareOptions$1)}}),TRACE_ID_HEADER_NAME$1="X-Amzn-Trace-Id",ENV_LAMBDA_FUNCTION_NAME$1="AWS_LAMBDA_FUNCTION_NAME",ENV_TRACE_ID$1="_X_AMZN_TRACE_ID",recursionDetectionMiddleware$1=e=>t=>async n=>{const{request:i}=n;if(!HttpRequest.isInstance(i)||"node"!==e.runtime||i.headers.hasOwnProperty(TRACE_ID_HEADER_NAME$1))return t(n);const r=[][ENV_TRACE_ID$1],o=e=>"string"==typeof e&&e.length>0;return o([][ENV_LAMBDA_FUNCTION_NAME$1])&&o(r)&&(i.headers[TRACE_ID_HEADER_NAME$1]=r),t({...n,request:i})},addRecursionDetectionMiddlewareOptions$1={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},getRecursionDetectionPlugin$1=e=>({applyToStack:t=>{t.add(recursionDetectionMiddleware$1(e),addRecursionDetectionMiddlewareOptions$1)}});function convertHttpAuthSchemesToMap(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}const httpAuthSchemeMiddleware=(e,t)=>(n,i)=>async r=>{const o=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,i,r.input)),a=convertHttpAuthSchemesToMap(e.httpAuthSchemes),s=getSmithyContext(i),c=[];for(const n of o){const r=a.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:l={},signingProperties:d={}}=n.propertiesExtractor?.(e,i)||{};n.identityProperties=Object.assign(n.identityProperties||{},l),n.signingProperties=Object.assign(n.signingProperties||{},d),s.selectedHttpAuthScheme={httpAuthOption:n,identity:await o(n.identityProperties),signer:r.signer};break}if(!s.selectedHttpAuthScheme)throw new Error(c.join("\n"));return n(r)},httpAuthSchemeEndpointRuleSetMiddlewareOptions={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},getHttpAuthSchemeEndpointRuleSetPlugin=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:i=>{i.addRelativeTo(httpAuthSchemeMiddleware(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),httpAuthSchemeEndpointRuleSetMiddlewareOptions)}}),deserializerMiddleware=(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}},serializerMiddleware=(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 a=await t(r.input,{...e,endpoint:o});return n({...r,request:a})},deserializerMiddlewareOption={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},serializerMiddlewareOption={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function getSerdePlugin(e,t,n){return{applyToStack:i=>{i.add(deserializerMiddleware(e,n),deserializerMiddlewareOption),i.add(serializerMiddleware(e,t),serializerMiddlewareOption)}}}serializerMiddlewareOption.name;const defaultErrorHandler=e=>e=>{throw e},defaultSuccessHandler=(e,t)=>{},httpSigningMiddleware=e=>(e,t)=>async n=>{if(!HttpRequest.isInstance(n.request))return e(n);const i=getSmithyContext(t).selectedHttpAuthScheme;if(!i)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:r={}},identity:o,signer:a}=i,s=await e({...n,request:await a.sign(n.request,o,r)}).catch((a.errorHandler||defaultErrorHandler)(r));return(a.successHandler||defaultSuccessHandler)(s.response,r),s},httpSigningMiddlewareOptions={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},getHttpSigningPlugin=e=>({applyToStack:e=>{e.addRelativeTo(httpSigningMiddleware(),httpSigningMiddlewareOptions)}}),normalizeProvider=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},makePagedClientRequest=async(e,t,n,...i)=>await t.send(new e(n),...i);function createPaginator(e,t,n,i,r){return async function*(o,a,...s){let c,l=o.startingToken||void 0,d=!0;for(;d;){if(a[n]=l,r&&(a[r]=a[r]??o.pageSize),!(o.client instanceof e))throw new Error(`Invalid client, expected instance of ${e.name}`);c=await makePagedClientRequest(t,o.client,a,...s),yield c;const u=l;l=get(c,i),d=!(!l||o.stopOnSameToken&&l===u)}}}const get=(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},alphabetByEncoding={},alphabetByValue=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);alphabetByEncoding[n]=e,alphabetByValue[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;alphabetByEncoding[n]=i,alphabetByValue[i]=n}for(let e=0;e<10;e++){alphabetByEncoding[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;alphabetByEncoding[t]=n,alphabetByValue[n]=t}alphabetByEncoding["+"]=62,alphabetByValue[62]="+",alphabetByEncoding["/"]=63,alphabetByValue[63]="/";const bitsPerLetter=6,bitsPerByte=8,maxLetterValue=63,fromBase64=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 alphabetByEncoding))throw new TypeError(`Invalid character ${e[i]} in base64 string.`);n|=alphabetByEncoding[e[i]]<<(o-i)*bitsPerLetter,r+=bitsPerLetter}else n>>=bitsPerLetter;const o=t/4*3;n>>=r%bitsPerByte;const a=Math.floor(r/bitsPerByte);for(let e=0;e<a;e++){const t=(a-e-1)*bitsPerByte;i.setUint8(o+e,(n&255<<t)>>t)}}return new Uint8Array(n)},fromUtf8$2=e=>(new TextEncoder).encode(e),toUint8Array=e=>"string"==typeof e?fromUtf8$2(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),toUtf8=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 toBase64(e){let t;t="string"==typeof e?fromUtf8$2(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)*bitsPerByte,i+=bitsPerByte;const o=Math.ceil(i/bitsPerLetter);n<<=o*bitsPerLetter-i;for(let e=1;e<=o;e++){const t=(o-e)*bitsPerLetter;r+=alphabetByValue[(n&maxLetterValue<<t)>>t]}r+="==".slice(0,4-o)}return r}function transformToString(e,t="utf-8"){return"base64"===t?toBase64(e):toUtf8(e)}function transformFromString(e,t){return"base64"===t?Uint8ArrayBlobAdapter.mutate(fromBase64(e)):Uint8ArrayBlobAdapter.mutate(fromUtf8$2(e))}class Uint8ArrayBlobAdapter extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return transformFromString(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,Uint8ArrayBlobAdapter.prototype),e}transformToString(e="utf-8"){return transformToString(this,e)}}const escapeUri=e=>encodeURIComponent(e).replace(/[!'()*]/g,hexEncode),hexEncode=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function buildQueryString(e){const t=[];for(let n of Object.keys(e).sort()){const i=e[n];if(n=escapeUri(n),Array.isArray(i))for(let e=0,r=i.length;e<r;e++)t.push(`${n}=${escapeUri(i[e])}`);else{let e=n;(i||"string"==typeof i)&&(e+=`=${escapeUri(i)}`),t.push(e)}}return t.join("&")}function createRequest(e,t){return new Request(e,t)}function requestTimeout(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 keepAliveSupport={supported:void 0};class FetchHttpHandler{static create(e){return"function"==typeof e?.handle?e:new FetchHttpHandler(e)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===keepAliveSupport.supported&&(keepAliveSupport.supported=Boolean("undefined"!=typeof Request&&"keepalive"in createRequest("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 a=buildQueryString(e.query||{});a&&(o+=`?${a}`),e.fragment&&(o+=`#${e.fragment}`);let s="";if(null!=e.username||null!=e.password){s=`${e.username??""}:${e.password??""}@`}const{port:c,method:l}=e,d=`${e.protocol}//${s}${e.hostname}${c?`:${c}`:""}${o}`,u="GET"===l||"HEAD"===l?void 0:e.body,p={body:u,headers:new Headers(e.headers),method:l,credentials:r};this.config?.cache&&(p.cache=this.config.cache),u&&(p.duplex="half"),"undefined"!=typeof AbortController&&(p.signal=t),keepAliveSupport.supported&&(p.keepalive=i),"function"==typeof this.config.requestInit&&Object.assign(p,this.config.requestInit(e));let m=()=>{};const h=createRequest(d,p),f=[fetch(h).then((e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new HttpResponse({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new HttpResponse({headers:n,reason:e.statusText,statusCode:e.status,body:t})})))})),requestTimeout(n)];return t&&f.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}),m=()=>e.removeEventListener("abort",i)}else t.onabort=i}))),Promise.race(f).finally(m)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n=>(n[e]=t,n)))}httpHandlerConfigs(){return this.config??{}}}const streamCollector=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?new Uint8Array(await e.arrayBuffer()):collectStream(e);async function collectStream(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 a=0;for(const e of t)o.set(e,a),a+=e.length;return o}const SHORT_TO_HEX={},HEX_TO_SHORT={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),SHORT_TO_HEX[e]=t,HEX_TO_SHORT[t]=e}function fromHex(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 HEX_TO_SHORT))throw new Error(`Cannot decode unrecognized sequence ${i} as hexadecimal`);t[n/2]=HEX_TO_SHORT[i]}return t}function toHex(e){let t="";for(let n=0;n<e.byteLength;n++)t+=SHORT_TO_HEX[e[n]];return t}const collectBody=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return Uint8ArrayBlobAdapter.mutate(e);if(!e)return Uint8ArrayBlobAdapter.mutate(new Uint8Array);const n=t.streamCollector(e);return Uint8ArrayBlobAdapter.mutate(await n)};function extendedEncodeURIComponent(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}const resolvedPath=(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=>extendedEncodeURIComponent(e))).join("/"):extendedEncodeURIComponent(t))}return e};function requestBuilder(e,t){return new RequestBuilder(e,t)}class RequestBuilder{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 HttpRequest({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=resolvedPath(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}}function setFeature$3(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 DefaultIdentityProviderConfig{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)}}const createIsIdentityExpiredFunction=e=>t=>doesIdentityRequireRefresh(t)&&t.expiration.getTime()-Date.now()<e,EXPIRATION_MS=3e5,isIdentityExpired=createIsIdentityExpiredFunction(EXPIRATION_MS),doesIdentityRequireRefresh=e=>void 0!==e.expiration,memoizeIdentityProvider=(e,t,n)=>{if(void 0===e)return;const i="function"!=typeof e?async()=>Promise.resolve(e):e;let r,o,a,s=!1;const c=async e=>{o||(o=i(e));try{r=await o,a=!0,s=!1}finally{o=void 0}return r};return void 0===t?async e=>(a&&!e?.forceRefresh||(r=await c(e)),r):async e=>(a&&!e?.forceRefresh||(r=await c(e)),s?r:n(r)?t(r)?(await c(e),r):r:(s=!0,r))},DEFAULT_UA_APP_ID$1=void 0;function isValidUserAgentAppId$1(e){return void 0===e||"string"==typeof e&&e.length<=50}function resolveUserAgentConfig$1(e){const t=normalizeProvider(e.userAgentAppId??DEFAULT_UA_APP_ID$1);return{...e,customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent,userAgentAppId:async()=>{const n=await t();if(!isValidUserAgentAppId$1(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 EndpointCache{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 IP_V4_REGEX=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}$"),isIpAddress=e=>IP_V4_REGEX.test(e)||e.startsWith("[")&&e.endsWith("]"),VALID_HOST_LABEL_REGEX=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),isValidHostLabel=(e,t=!1)=>{if(!t)return VALID_HOST_LABEL_REGEX.test(e);const n=e.split(".");for(const e of n)if(!isValidHostLabel(e))return!1;return!0},customEndpointFunctions={},debugId="endpoints";function toDebugString(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${toDebugString(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(toDebugString).join(", ")})`:JSON.stringify(e,null,2)}class EndpointError extends Error{constructor(e){super(e),this.name="EndpointError"}}const booleanEquals=(e,t)=>e===t,getAttrPathList=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 EndpointError(`Path: '${e}' does not end with ']'`);const r=i.slice(t+1,-1);if(Number.isNaN(parseInt(r)))throw new EndpointError(`Invalid array index: '${r}' in path: '${e}'`);0!==t&&n.push(i.slice(0,t)),n.push(r)}else n.push(i)}return n},getAttr=(e,t)=>getAttrPathList(t).reduce(((n,i)=>{if("object"!=typeof n)throw new EndpointError(`Index '${i}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(i)]:n[i]}),e),isSet=e=>null!=e,not=e=>!e,DEFAULT_PORTS={[EndpointURLScheme.HTTP]:80,[EndpointURLScheme.HTTPS]:443},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,a=new URL(`${i}//${t}${n?`:${n}`:""}${r}`);return a.search=Object.entries(o).map((([e,t])=>`${e}=${t}`)).join("&"),a}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:a,search:s}=t;if(s)return null;const c=a.slice(0,-1);if(!Object.values(EndpointURLScheme).includes(c))return null;const l=isIpAddress(r);return{scheme:c,authority:`${i}${n.includes(`${i}:${DEFAULT_PORTS[c]}`)||"string"==typeof e&&e.includes(`${i}:${DEFAULT_PORTS[c]}`)?`:${DEFAULT_PORTS[c]}`:""}`,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:l}},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()}`)),endpointFunctions={booleanEquals:booleanEquals,getAttr:getAttr,isSet:isSet,isValidHostLabel:isValidHostLabel,not:not,parseURL:parseURL,stringEquals:stringEquals,substring:substring,uriEncode:uriEncode},evaluateTemplate=(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 a=e.substring(t+1,o);if(a.includes("#")){const[e,t]=a.split("#");n.push(getAttr(i[e],t))}else n.push(i[a]);r=o+1}return n.join("")},getReferenceValue=({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]),evaluateExpression=(e,t,n)=>{if("string"==typeof e)return evaluateTemplate(e,n);if(e.fn)return callFunction(e,n);if(e.ref)return getReferenceValue(e,n);throw new EndpointError(`'${t}': ${String(e)} is not a string, function or reference.`)},callFunction=({fn:e,argv:t},n)=>{const i=t.map((e=>["boolean","number"].includes(typeof e)?e:evaluateExpression(e,"arg",n))),r=e.split(".");return r[0]in customEndpointFunctions&&null!=r[1]?customEndpointFunctions[r[0]][r[1]](...i):endpointFunctions[e](...i)},evaluateCondition=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new EndpointError(`'${e}' is already defined in Reference Record.`);const i=callFunction(t,n);return n.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(t)} = ${toDebugString(i)}`),{result:""===i||!!i,...null!=e&&{toAssign:{name:e,value:i}}}},evaluateConditions=(e=[],t)=>{const n={};for(const i of e){const{result:e,toAssign:r}=evaluateCondition(i,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};r&&(n[r.name]=r.value,t.logger?.debug?.(`${debugId} assign: ${r.name} := ${toDebugString(r.value)}`))}return{result:!0,referenceRecord:n}},getEndpointHeaders=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>({...e,[n]:i.map((e=>{const i=evaluateExpression(e,"Header value entry",t);if("string"!=typeof i)throw new EndpointError(`Header '${n}' value '${i}' is not a string`);return i}))})),{}),getEndpointProperty=(e,t)=>{if(Array.isArray(e))return e.map((e=>getEndpointProperty(e,t)));switch(typeof e){case"string":return evaluateTemplate(e,t);case"object":if(null===e)throw new EndpointError(`Unexpected endpoint property: ${e}`);return getEndpointProperties(e,t);case"boolean":return e;default:throw new EndpointError("Unexpected endpoint property type: "+typeof e)}},getEndpointProperties=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>({...e,[n]:getEndpointProperty(i,t)})),{}),getEndpointUrl=(e,t)=>{const n=evaluateExpression(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 EndpointError("Endpoint URL must be a string, got "+typeof n)},evaluateEndpointRule=(e,t)=>{const{conditions:n,endpoint:i}=e,{result:r,referenceRecord:o}=evaluateConditions(n,t);if(!r)return;const a={...t,referenceRecord:{...t.referenceRecord,...o}},{url:s,properties:c,headers:l}=i;return t.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(i)}`),{...null!=l&&{headers:getEndpointHeaders(l,a)},...null!=c&&{properties:getEndpointProperties(c,a)},url:getEndpointUrl(s,a)}},evaluateErrorRule=(e,t)=>{const{conditions:n,error:i}=e,{result:r,referenceRecord:o}=evaluateConditions(n,t);if(r)throw new EndpointError(evaluateExpression(i,"Error",{...t,referenceRecord:{...t.referenceRecord,...o}}))},evaluateTreeRule=(e,t)=>{const{conditions:n,rules:i}=e,{result:r,referenceRecord:o}=evaluateConditions(n,t);if(r)return evaluateRules(i,{...t,referenceRecord:{...t.referenceRecord,...o}})},evaluateRules=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=evaluateEndpointRule(n,t);if(e)return e}else if("error"===n.type)evaluateErrorRule(n,t);else{if("tree"!==n.type)throw new EndpointError(`Unknown endpoint rule: ${n}`);{const e=evaluateTreeRule(n,t);if(e)return e}}throw new EndpointError("Rules evaluation failed")},resolveEndpoint=(e,t)=>{const{endpointParams:n,logger:i}=t,{parameters:r,rules:o}=e;t.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(n)}`);const a=Object.entries(r).filter((([,e])=>null!=e.default)).map((([e,t])=>[e,t.default]));if(a.length>0)for(const[e,t]of a)n[e]=n[e]??t;const s=Object.entries(r).filter((([,e])=>e.required)).map((([e])=>e));for(const e of s)if(null==n[e])throw new EndpointError(`Missing required parameter: '${e}'`);const c=evaluateRules(o,{endpointParams:n,logger:i,referenceRecord:{}});return t.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(c)}`),c},isVirtualHostableS3Bucket$1=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!isVirtualHostableS3Bucket$1(t))return!1;return!0}return!!isValidHostLabel(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!isIpAddress(e)))},ARN_DELIMITER$1=":",RESOURCE_DELIMITER$1="/",parseArn$1=e=>{const t=e.split(ARN_DELIMITER$1);if(t.length<6)return null;const[n,i,r,o,a,...s]=t;if("arn"!==n||""===i||""===r||""===s.join(ARN_DELIMITER$1))return null;return{partition:i,service:r,region:o,accountId:a,resourceId:s.map((e=>e.split(RESOURCE_DELIMITER$1))).flat()}},partitions$1=[{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:{}}],version$8="1.1";var partitionsInfo$1={partitions:partitions$1,version:version$8};let selectedPartitionsInfo$1=partitionsInfo$1;const partition$1=e=>{const{partitions:t}=selectedPartitionsInfo$1;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}},awsEndpointFunctions$1={isVirtualHostableS3Bucket:isVirtualHostableS3Bucket$1,parseArn:parseArn$1,partition:partition$1};function setCredentialFeature$1(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}function setFeature$2(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}customEndpointFunctions.aws=awsEndpointFunctions$1;const getDateHeader$1=e=>HttpResponse.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,getSkewCorrectedDate$1=e=>new Date(Date.now()+e),isClockSkewed$1=(e,t)=>Math.abs(getSkewCorrectedDate$1(t).getTime()-e)>=3e5,getUpdatedSystemClockOffset$1=(e,t)=>{const n=Date.parse(e);return isClockSkewed$1(n,t)?n-Date.now():t},throwSigningPropertyError$1=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},validateSigningProperties$1=async e=>{const t=throwSigningPropertyError$1("context",e.context),n=throwSigningPropertyError$1("config",e.config),i=t.endpointV2?.properties?.authSchemes?.[0],r=throwSigningPropertyError$1("signer",n.signer),o=await r(i),a=e?.signingRegion,s=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:o,signingRegion:a,signingRegionSet:s,signingName:c}};let AwsSdkSigV4Signer$1=class{async sign(e,t,n){if(!HttpRequest.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await validateSigningProperties$1(n),{config:r,signer:o}=i;let{signingRegion:a,signingName:s}=i;const c=n.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(a=t?.signingRegion??a,s=t?.signingName??s)}return await o.sign(e,{signingDate:getSkewCorrectedDate$1(r.systemClockOffset),signingRegion:a,signingService:s})}errorHandler(e){return t=>{const n=t.ServerTime??getDateHeader$1(t.$response);if(n){const i=throwSigningPropertyError$1("config",e.config),r=i.systemClockOffset;i.systemClockOffset=getUpdatedSystemClockOffset$1(n,i.systemClockOffset);i.systemClockOffset!==r&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=getDateHeader$1(e);if(n){const e=throwSigningPropertyError$1("config",t.config);e.systemClockOffset=getUpdatedSystemClockOffset$1(n,e.systemClockOffset)}}};const memoize=(e,t,n)=>{let i,r,o,a=!1;return async t=>(o&&!t?.forceRefresh||(i=await(async()=>{r||(r=e());try{i=await r,o=!0,a=!1}finally{r=void 0}return i})()),i)},ALGORITHM_QUERY_PARAM="X-Amz-Algorithm",CREDENTIAL_QUERY_PARAM="X-Amz-Credential",AMZ_DATE_QUERY_PARAM="X-Amz-Date",SIGNED_HEADERS_QUERY_PARAM="X-Amz-SignedHeaders",EXPIRES_QUERY_PARAM="X-Amz-Expires",SIGNATURE_QUERY_PARAM="X-Amz-Signature",TOKEN_QUERY_PARAM="X-Amz-Security-Token",AUTH_HEADER="authorization",AMZ_DATE_HEADER=AMZ_DATE_QUERY_PARAM.toLowerCase(),DATE_HEADER="date",GENERATED_HEADERS=[AUTH_HEADER,AMZ_DATE_HEADER,DATE_HEADER],SIGNATURE_HEADER=SIGNATURE_QUERY_PARAM.toLowerCase(),SHA256_HEADER="x-amz-content-sha256",TOKEN_HEADER=TOKEN_QUERY_PARAM.toLowerCase(),ALWAYS_UNSIGNABLE_HEADERS={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},PROXY_HEADER_PATTERN=/^proxy-/,SEC_HEADER_PATTERN=/^sec-/,ALGORITHM_IDENTIFIER="AWS4-HMAC-SHA256",EVENT_ALGORITHM_IDENTIFIER="AWS4-HMAC-SHA256-PAYLOAD",UNSIGNED_PAYLOAD="UNSIGNED-PAYLOAD",MAX_CACHE_SIZE=50,KEY_TYPE_IDENTIFIER="aws4_request",MAX_PRESIGNED_TTL=604800,signingKeyCache={},cacheQueue=[],createScope=(e,t,n)=>`${e}/${t}/${n}/${KEY_TYPE_IDENTIFIER}`,getSigningKey=async(e,t,n,i,r)=>{const o=`${n}:${i}:${r}:${toHex(await hmac(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(o in signingKeyCache)return signingKeyCache[o];for(cacheQueue.push(o);cacheQueue.length>MAX_CACHE_SIZE;)delete signingKeyCache[cacheQueue.shift()];let a=`AWS4${t.secretAccessKey}`;for(const t of[n,i,r,KEY_TYPE_IDENTIFIER])a=await hmac(e,a,t);return signingKeyCache[o]=a},hmac=(e,t,n)=>{const i=new e(t);return i.update(toUint8Array(n)),i.digest()},getCanonicalHeaders=({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 ALWAYS_UNSIGNABLE_HEADERS||t?.has(o)||PROXY_HEADER_PATTERN.test(o)||SEC_HEADER_PATTERN.test(o))&&(!n||n&&!n.has(o))||(i[o]=e[r].trim().replace(/\s+/g," "))}return i},getCanonicalQuery=({query:e={}})=>{const t=[],n={};for(const i of Object.keys(e)){if(i.toLowerCase()===SIGNATURE_HEADER)continue;const r=escapeUri(i);t.push(r);const o=e[i];"string"==typeof o?n[r]=`${r}=${escapeUri(o)}`:Array.isArray(o)&&(n[r]=o.slice(0).reduce(((e,t)=>e.concat([`${r}=${escapeUri(t)}`])),[]).sort().join("&"))}return t.sort().map((e=>n[e])).filter((e=>e)).join("&")},isArrayBuffer=e=>"function"==typeof ArrayBuffer&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e),getPayloadHash=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===SHA256_HEADER)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||isArrayBuffer(t)){const e=new n;return e.update(toUint8Array(t)),toHex(await e.digest())}return UNSIGNED_PAYLOAD};class HeaderFormatter{format(e){const t=[];for(const n of Object.keys(e)){const i=fromUtf8$2(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 a=fromUtf8$2(e.value),s=new DataView(new ArrayBuffer(3+a.byteLength));s.setUint8(0,7),s.setUint16(1,a.byteLength,!1);const c=new Uint8Array(s.buffer);return c.set(a,3),c;case"timestamp":const l=new Uint8Array(9);return l[0]=8,l.set(Int64$1.fromNumber(e.value.valueOf()).bytes,1),l;case"uuid":if(!UUID_PATTERN$1.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(fromHex(e.value.replace(/\-/g,"")),1),d}}}var HEADER_VALUE_TYPE$1;!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"}(HEADER_VALUE_TYPE$1||(HEADER_VALUE_TYPE$1={}));const UUID_PATTERN$1=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let Int64$1=class e{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>0x8000000000000000||t<-0x8000000000000000)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let e=7,i=Math.abs(Math.round(t));e>-1&&i>0;e--,i/=256)n[e]=i;return t<0&&negate$1(n),new e(n)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&negate$1(e),parseInt(toHex(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}};function negate$1(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const hasHeader=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1},moveHeadersToQuery=(e,t={})=>{const{headers:n,query:i={}}=HttpRequest.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}},prepareRequest=e=>{e=HttpRequest.clone(e);for(const t of Object.keys(e.headers))GENERATED_HEADERS.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},iso8601=e=>toDate(e).toISOString().replace(/\.\d{3}Z$/,"Z"),toDate=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class SignatureV4{constructor({applyChecksum:e,credentials:t,region:n,service:i,sha256:r,uriEscapePath:o=!0}){this.headerFormatter=new HeaderFormatter,this.service=i,this.sha256=r,this.uriEscapePath=o,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=normalizeProvider$1(n),this.credentialProvider=normalizeProvider$1(t)}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:i=3600,unsignableHeaders:r,unhoistableHeaders:o,signableHeaders:a,hoistableHeaders:s,signingRegion:c,signingService:l}=t,d=await this.credentialProvider();this.validateResolvedCredentials(d);const u=c??await this.regionProvider(),{longDate:p,shortDate:m}=formatDate(n);if(i>MAX_PRESIGNED_TTL)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const h=createScope(m,u,l??this.service),f=moveHeadersToQuery(prepareRequest(e),{unhoistableHeaders:o,hoistableHeaders:s});d.sessionToken&&(f.query[TOKEN_QUERY_PARAM]=d.sessionToken),f.query[ALGORITHM_QUERY_PARAM]=ALGORITHM_IDENTIFIER,f.query[CREDENTIAL_QUERY_PARAM]=`${d.accessKeyId}/${h}`,f.query[AMZ_DATE_QUERY_PARAM]=p,f.query[EXPIRES_QUERY_PARAM]=i.toString(10);const g=getCanonicalHeaders(f,r,a);return f.query[SIGNED_HEADERS_QUERY_PARAM]=getCanonicalHeaderList(g),f.query[SIGNATURE_QUERY_PARAM]=await this.getSignature(p,h,this.getSigningKey(d,u,m,l),this.createCanonicalRequest(f,g,await getPayloadHash(e,this.sha256))),f}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 a=r??await this.regionProvider(),{shortDate:s,longDate:c}=formatDate(n),l=createScope(s,a,o??this.service),d=await getPayloadHash({headers:{},body:t},this.sha256),u=new this.sha256;u.update(e);const p=toHex(await u.digest()),m=[EVENT_ALGORITHM_IDENTIFIER,c,l,i,p,d].join("\n");return this.signString(m,{signingDate:n,signingRegion:a,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:a}=formatDate(t),s=new this.sha256(await this.getSigningKey(r,o,a,i));return s.update(toUint8Array(e)),toHex(await s.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:i,signingRegion:r,signingService:o}={}){const a=await this.credentialProvider();this.validateResolvedCredentials(a);const s=r??await this.regionProvider(),c=prepareRequest(e),{longDate:l,shortDate:d}=formatDate(t),u=createScope(d,s,o??this.service);c.headers[AMZ_DATE_HEADER]=l,a.sessionToken&&(c.headers[TOKEN_HEADER]=a.sessionToken);const p=await getPayloadHash(c,this.sha256);!hasHeader(SHA256_HEADER,c.headers)&&this.applyChecksum&&(c.headers[SHA256_HEADER]=p);const m=getCanonicalHeaders(c,i,n),h=await this.getSignature(l,u,this.getSigningKey(a,s,d,o),this.createCanonicalRequest(c,m,p));return c.headers[AUTH_HEADER]=`${ALGORITHM_IDENTIFIER} Credential=${a.accessKeyId}/${u}, SignedHeaders=${getCanonicalHeaderList(m)}, Signature=${h}`,c}createCanonicalRequest(e,t,n){const i=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${getCanonicalQuery(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(toUint8Array(n));const r=await i.digest();return`${ALGORITHM_IDENTIFIER}\n${e}\n${t}\n${toHex(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 escapeUri(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(toUint8Array(r)),toHex(await o.digest())}getSigningKey(e,t,n,i){return getSigningKey(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 formatDate=e=>{const t=iso8601(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}},getCanonicalHeaderList=e=>Object.keys(e).sort().join(";"),resolveAwsSdkSigV4Config$1=e=>{let t,n=!1;e.credentials&&(n=!0,t=memoizeIdentityProvider(e.credentials,isIdentityExpired,doesIdentityRequireRefresh)),t||(t=e.credentialDefaultProvider?normalizeProvider(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 a;return a=e.signer?normalizeProvider(e.signer):e.regionInfoProvider?()=>normalizeProvider(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([n,r])=>{const{signingRegion:a,signingService:s}=n;e.signingRegion=e.signingRegion||a||r,e.signingName=e.signingName||s||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||SignatureV4)(c)})):async n=>{const r=(n=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await normalizeProvider(e.region)(),properties:{}},n)).signingRegion,a=n.signingName;e.signingRegion=e.signingRegion||r,e.signingName=e.signingName||a||e.serviceId;const s={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||SignatureV4)(s)},{...e,systemClockOffset:r,signingEscapePath:i,credentials:n?async()=>t().then((e=>setCredentialFeature$1(e,"CREDENTIALS_CODE","e"))):t,signer:a}},getAllAliases=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},getMiddlewareNameWithAliases=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,constructStack=()=>{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?.(s.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},a=(n=!1)=>{const i=[],r=[],a={};e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of getAllAliases(t.name,t.aliases))a[e]=t;i.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of getAllAliases(t.name,t.aliases))a[e]=t;r.push(t)})),r.forEach((e=>{if(e.toMiddleware){const t=a[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}}));const s=(c=i,c.sort(((e,t)=>stepWeights[t.step]-stepWeights[e.step]||priorityWeights[t.priority||"normal"]-priorityWeights[e.priority||"normal"]))).map(o).reduce(((e,t)=>(e.push(...t),e)),[]);var c;return s},s={add:(t,n={})=>{const{name:r,override:o,aliases:a}=n,s={step:"initialize",priority:"normal",middleware:t,...n},c=getAllAliases(r,a);if(c.length>0){if(c.some((e=>i.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(r,a)}'`);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!==s.step||s.priority!==i.priority)throw new Error(`"${getMiddlewareNameWithAliases(i.name,i.aliases)}" middleware with ${i.priority} priority in ${i.step} step cannot be overridden by "${getMiddlewareNameWithAliases(r,a)}" middleware with ${s.priority} priority in ${s.step} step.`);e.splice(n,1)}}for(const e of c)i.add(e)}e.push(s)},addRelativeTo:(e,n)=>{const{name:r,override:o,aliases:a}=n,s={middleware:e,...n},c=getAllAliases(r,a);if(c.length>0){if(c.some((e=>i.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(r,a)}'`);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!==s.toMiddleware||i.relation!==s.relation)throw new Error(`"${getMiddlewareNameWithAliases(i.name,i.aliases)}" middleware ${i.relation} "${i.toMiddleware}" middleware cannot be overridden by "${getMiddlewareNameWithAliases(r,a)}" middleware ${s.relation} "${s.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)i.add(e)}t.push(s)},clone:()=>r(constructStack()),use:e=>{e.applyToStack(s)},remove:n=>"string"==typeof n?(n=>{let r=!1;const o=e=>{const t=getAllAliases(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 getAllAliases(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:a}=e;if(t&&t.includes(n)){const e=getAllAliases(o,a);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(constructStack());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:r,identify:()=>a(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return getMiddlewareNameWithAliases(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of a().map((e=>e.middleware)).reverse())e=n(e,t);return n&&console.log(s.identify()),e}};return s},stepWeights={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},priorityWeights={high:3,normal:2,low:1};class Client{constructor(e){this.config=e,this.middlewareStack=constructStack()}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 Command{constructor(){this.middlewareStack=constructStack()}static classBuilder(){return new ClassBuilder}resolveMiddlewareWithContext(e,t,n,{middlewareFn:i,clientName:r,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:s,smithyContext:c,additionalContext:l,CommandCtor:d}){for(const r of i.bind(this)(d,e,t,n))this.middlewareStack.use(r);const u=e.concat(this.middlewareStack),{logger:p}=t,m={logger:p,clientName:r,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:s,[SMITHY_CONTEXT_KEY]:{commandInstance:this,...c},...l},{requestHandler:h}=t;return u.resolve((e=>h.handle(e.request,n||{})),m)}}class ClassBuilder{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 Command{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 SENSITIVE_STRING="***SensitiveInformation***",createAggregatedClient=(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}},parseBoolean=e=>{switch(e){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${e}"`)}},expectBoolean=e=>{if(null!=e){if("number"==typeof e){if(0!==e&&1!==e||logger$2.warn(stackTraceWarning(`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||logger$2.warn(stackTraceWarning(`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}`)}},expectNumber=e=>{if(null!=e){if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&logger$2.warn(stackTraceWarning(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},MAX_FLOAT=Math.ceil(2**127*(2-2**-23)),expectFloat32=e=>{const t=expectNumber(e);if(void 0!==t&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>MAX_FLOAT)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},expectLong=e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},expectInt32=e=>expectSizedInt(e,32),expectShort=e=>expectSizedInt(e,16),expectByte=e=>expectSizedInt(e,8),expectSizedInt=(e,t)=>{const n=expectLong(e);if(void 0!==n&&castInt(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},castInt=(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]}},expectNonNull=(e,t)=>{if(null==e)throw new TypeError("Expected a non-null value");return e},expectObject=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}`)},expectString=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return logger$2.warn(stackTraceWarning(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},expectUnion=e=>{if(null==e)return;const t=expectObject(e),n=Object.entries(t).filter((([,e])=>null!=e)).map((([e])=>e));if(0===n.length)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(n.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${n} were not null.`);return t},strictParseDouble=e=>expectNumber("string"==typeof e?parseNumber(e):e),strictParseFloat=strictParseDouble,strictParseFloat32=e=>expectFloat32("string"==typeof e?parseNumber(e):e),NUMBER_REGEX=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,parseNumber=e=>{const t=e.match(NUMBER_REGEX);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},limitedParseDouble=e=>"string"==typeof e?parseFloatString(e):expectNumber(e),parseFloatString=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}`)}},strictParseLong=e=>expectLong("string"==typeof e?parseNumber(e):e),strictParseShort=e=>expectShort("string"==typeof e?parseNumber(e):e),strictParseByte=e=>expectByte("string"==typeof e?parseNumber(e):e),stackTraceWarning=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),logger$2={warn:console.warn},MONTHS=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],RFC3339_WITH_OFFSET=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),parseRfc3339DateTimeWithOffset=e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=RFC3339_WITH_OFFSET.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[n,i,r,o,a,s,c,l,d]=t,u=strictParseShort(stripLeadingZeroes(i)),p=parseDateValue(r,"month",1,12),m=parseDateValue(o,"day",1,31),h=buildDate(u,p,m,{hours:a,minutes:s,seconds:c,fractionalMilliseconds:l});return"Z"!=d.toUpperCase()&&h.setTime(h.getTime()-parseOffsetToMilliseconds(d)),h},parseEpochTimestamp=e=>{if(null==e)return;let t;if("number"==typeof e)t=e;else if("string"==typeof e)t=strictParseDouble(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))},buildDate=(e,t,n,i)=>{const r=t-1;return validateDayOfMonth(e,r,n),new Date(Date.UTC(e,r,n,parseDateValue(i.hours,"hour",0,23),parseDateValue(i.minutes,"minute",0,59),parseDateValue(i.seconds,"seconds",0,60),parseMilliseconds(i.fractionalMilliseconds)))},DAYS_IN_MONTH=[31,28,31,30,31,30,31,31,30,31,30,31],validateDayOfMonth=(e,t,n)=>{let i=DAYS_IN_MONTH[t];if(1===t&&isLeapYear(e)&&(i=29),n>i)throw new TypeError(`Invalid day for ${MONTHS[t]} in ${e}: ${n}`)},isLeapYear=e=>e%4==0&&(e%100!=0||e%400==0),parseDateValue=(e,t,n,i)=>{const r=strictParseByte(stripLeadingZeroes(e));if(r<n||r>i)throw new TypeError(`${t} must be between ${n} and ${i}, inclusive`);return r},parseMilliseconds=e=>null==e?0:1e3*strictParseFloat32("0."+e),parseOffsetToMilliseconds=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},stripLeadingZeroes=e=>{let t=0;for(;t<e.length-1&&"0"===e.charAt(t);)t++;return 0===t?e:e.slice(t)};let ServiceException$1=class e extends Error{constructor(t){super(t.message),Object.setPrototypeOf(this,e.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}};const decorateServiceException=(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},throwDefaultError$4=({output:e,parsedBody:t,exceptionCtor:n,errorCode:i})=>{const r=deserializeMetadata$4(e),o=r.httpStatusCode?r.httpStatusCode+"":void 0,a=new n({name:t?.code||t?.Code||i||o||"UnknownError",$fault:"client",$metadata:r});throw decorateServiceException(a,t)},withBaseException=e=>({output:t,parsedBody:n,errorCode:i})=>{throwDefaultError$4({output:t,parsedBody:n,exceptionCtor:e,errorCode:i})},deserializeMetadata$4=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"]}),loadConfigsForDefaultMode=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{}}},getChecksumConfiguration=e=>{const t=[];for(const n in AlgorithmId){const i=AlgorithmId[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}}},resolveChecksumRuntimeConfig=e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t},getRetryConfiguration=e=>{let t=e.retryStrategy;return{setRetryStrategy(e){t=e},retryStrategy:()=>t}},resolveRetryRuntimeConfig=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},getDefaultExtensionConfiguration=e=>({...getChecksumConfiguration(e),...getRetryConfiguration(e)}),resolveDefaultRuntimeConfig=e=>({...resolveChecksumRuntimeConfig(e),...resolveRetryRuntimeConfig(e)}),getArrayIfSingleItem=e=>Array.isArray(e)?e:[e],getValueFromTextNode=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]=getValueFromTextNode(e[n]));return e},isSerializableHeaderValue=e=>null!=e,StringWrapper=function(){const e=Object.getPrototypeOf(this).constructor,t=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(t,e.prototype),t};StringWrapper.prototype=Object.create(String.prototype,{constructor:{value:StringWrapper,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(StringWrapper,String);class NoOpLogger{trace(){}debug(){}info(){}warn(){}error(){}}function map(e,t,n){let i,r,o;if(void 0===t&&void 0===n)i={},o=e;else{if(i=e,"function"==typeof t)return r=t,o=n,mapWithFilter(i,r,o);o=t}for(const e of Object.keys(o))Array.isArray(o[e])?applyInstruction(i,null,o,e):i[e]=o[e];return i}const take=(e,t)=>{const n={};for(const i in t)applyInstruction(n,e,t,i);return n},mapWithFilter=(e,t,n)=>map(e,Object.entries(n).reduce(((e,[n,i])=>(Array.isArray(i)?e[n]=i:e[n]="function"==typeof i?[t,i()]:[t,i],e)),{})),applyInstruction=(e,t,n,i)=>{if(null!==t){let r=n[i];"function"==typeof r&&(r=[,r]);const[o=nonNullish,a=pass,s=i]=r;return void(("function"==typeof o&&o(t[s])||"function"!=typeof o&&o)&&(e[i]=a(t[s])))}let[r,o]=n[i];if("function"==typeof o){let t;const n=void 0===r&&null!=(t=o()),a="function"==typeof r&&!!r(void 0)||"function"!=typeof r&&!!r;n?e[i]=t:a&&(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)}},nonNullish=e=>null!=e,pass=e=>e,serializeDateTime=e=>e.toISOString().replace(".000Z","Z"),_json=e=>{if(null==e)return{};if(Array.isArray(e))return e.filter((e=>null!=e)).map(_json);if("object"==typeof e){const t={};for(const n of Object.keys(e))null!=e[n]&&(t[n]=_json(e[n]));return t}return e},awsExpectUnion=e=>{if(null!=e)return"object"==typeof e&&"__type"in e&&delete e.__type,expectUnion(e)},collectBodyString$1=(e,t)=>collectBody(e,t).then((e=>t.utf8Encoder(e))),parseJsonBody$1=(e,t)=>collectBodyString$1(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{}})),parseJsonErrorBody$1=async(e,t)=>{const n=await parseJsonBody$1(e,t);return n.message=n.message??n.Message,n},loadRestJsonErrorCode$1=(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 validator={},util={},hasRequiredUtil,hasRequiredValidator;function requireUtil(){return hasRequiredUtil||(hasRequiredUtil=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}(util)),util}function requireValidator(){if(hasRequiredValidator)return validator;hasRequiredValidator=1;const e=requireUtil(),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 u("InvalidXml","XML declaration allowed only at the start of the document.",m(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}validator.validate=function(o,a){a=Object.assign({},t,a);const c=[];let p=!1,h=!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 u("InvalidChar","char '"+o[t]+"' is not expected.",m(o,t))}{let g=t;if(t++,"!"===o[t]){t=r(o,t);continue}{let y=!1;"/"===o[t]&&(y=!0,t++);let v="";for(;t<o.length&&">"!==o[t]&&" "!==o[t]&&"\t"!==o[t]&&"\n"!==o[t]&&"\r"!==o[t];t++)v+=o[t];if(v=v.trim(),"/"===v[v.length-1]&&(v=v.substring(0,v.length-1),t--),f=v,!e.isName(f)){let e;return e=0===v.trim().length?"Invalid space after '<'.":"Tag '"+v+"' is an invalid name.",u("InvalidTag",e,m(o,t))}const _=s(o,t);if(!1===_)return u("InvalidAttr","Attributes for '"+v+"' have open quote.",m(o,t));let E=_.value;if(t=_.index,"/"===E[E.length-1]){const e=t-E.length;E=E.substring(0,E.length-1);const n=l(E,a);if(!0!==n)return u(n.err.code,n.err.msg,m(o,e+n.err.line));p=!0}else if(y){if(!_.tagClosed)return u("InvalidTag","Closing tag '"+v+"' doesn't have proper closing.",m(o,t));if(E.trim().length>0)return u("InvalidTag","Closing tag '"+v+"' can't have attributes or invalid starting.",m(o,g));if(0===c.length)return u("InvalidTag","Closing tag '"+v+"' has not been opened.",m(o,g));{const e=c.pop();if(v!==e.tagName){let t=m(o,e.tagStartPos);return u("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+t.line+", col "+t.col+") instead of closing tag '"+v+"'.",m(o,g))}0==c.length&&(h=!0)}}else{const e=l(E,a);if(!0!==e)return u(e.err.code,e.err.msg,m(o,t-E.length+e.err.line));if(!0===h)return u("InvalidXml","Multiple possible root nodes found.",m(o,t));-1!==a.unpairedTags.indexOf(v)||c.push({tagName:v,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=d(o,t);if(-1==e)return u("InvalidChar","char '&' is not expected.",m(o,t));t=e}else if(!0===h&&!n(o[t]))return u("InvalidXml","Extra text at the end",m(o,t));"<"===o[t]&&t--}}}var f;return p?1==c.length?u("InvalidTag","Unclosed tag '"+c[0].tagName+"'.",m(o,c[0].tagStartPos)):!(c.length>0)||u("InvalidXml","Invalid '"+JSON.stringify(c.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):u("InvalidXml","Start tag expected.",1)};const o='"',a="'";function s(e,t){let n="",i="",r=!1;for(;t<e.length;t++){if(e[t]===o||e[t]===a)""===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 l(t,n){const i=e.getAllMatches(t,c),r={};for(let e=0;e<i.length;e++){if(0===i[e][1].length)return u("InvalidAttr","Attribute '"+i[e][2]+"' has no space in starting.",h(i[e]));if(void 0!==i[e][3]&&void 0===i[e][4])return u("InvalidAttr","Attribute '"+i[e][2]+"' is without value.",h(i[e]));if(void 0===i[e][3]&&!n.allowBooleanAttributes)return u("InvalidAttr","boolean attribute '"+i[e][2]+"' is not allowed.",h(i[e]));const t=i[e][2];if(!p(t))return u("InvalidAttr","Attribute '"+t+"' is an invalid name.",h(i[e]));if(r.hasOwnProperty(t))return u("InvalidAttr","Attribute '"+t+"' is repeated.",h(i[e]));r[t]=1}return!0}function d(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 u(e,t,n){return{err:{code:e,msg:t,line:n.line||n,col:n.col}}}function p(t){return e.isName(t)}function m(e,t){const n=e.substring(0,t).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function h(e){return e.startIndex+e[1].length}return validator}var OptionsBuilder={},hasRequiredOptionsBuilder,xmlNode,hasRequiredXmlNode,DocTypeReader,hasRequiredDocTypeReader,strnum,hasRequiredStrnum,OrderedObjParser_1,hasRequiredOrderedObjParser;function requireOptionsBuilder(){if(hasRequiredOptionsBuilder)return OptionsBuilder;hasRequiredOptionsBuilder=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 OptionsBuilder.buildOptions=function(t){return Object.assign({},e,t)},OptionsBuilder.defaultOptions=e,OptionsBuilder}function requireXmlNode(){if(hasRequiredXmlNode)return xmlNode;hasRequiredXmlNode=1;return xmlNode=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 requireDocTypeReader(){if(hasRequiredDocTypeReader)return DocTypeReader;hasRequiredDocTypeReader=1;const e=requireUtil();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 a(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 s(t){if(e.isName(t))return t;throw new Error(`Invalid entity name ${t}`)}return DocTypeReader=function(e,c){const l={};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 d=1,u=!1,p=!1,m="";for(;c<e.length;c++)if("<"!==e[c]||p)if(">"===e[c]){if(p?"-"===e[c-1]&&"-"===e[c-2]&&(p=!1,d--):d--,0===d)break}else"["===e[c]?u=!0:m+=e[c];else{if(u&&i(e,c))c+=7,[entityName,val,c]=t(e,c+1),-1===val.indexOf("&")&&(l[s(entityName)]={regx:RegExp(`&${entityName};`,"g"),val:val});else if(u&&r(e,c))c+=8;else if(u&&o(e,c))c+=8;else if(u&&a(e,c))c+=9;else{if(!n)throw new Error("Invalid DOCTYPE");p=!0}d++,m=""}if(0!==d)throw new Error("Unclosed DOCTYPE")}return{entities:l,i:c}},DocTypeReader}function requireStrnum(){if(hasRequiredStrnum)return strnum;hasRequiredStrnum=1;const e=/^[-+]?0x[a-fA-F0-9]+$/,t=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const n={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};return strnum=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(r.hex&&e.test(o))return Number.parseInt(o,16);{const e=t.exec(o);if(e){const t=e[1],n=e[2];let a=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]);const s=e[4]||e[6];if(!r.leadingZeros&&n.length>0&&t&&"."!==o[2])return i;if(!r.leadingZeros&&n.length>0&&!t&&"."!==o[1])return i;{const e=Number(o),c=""+e;return-1!==c.search(/[eE]/)||s?r.eNotation?e:i:-1!==o.indexOf(".")?"0"===c&&""===a||c===a||t&&c==="-"+a?e:i:n?a===c||t+a===c?e:i:o===c||o===t+c?e:i}}return i}},strnum}function requireOrderedObjParser(){if(hasRequiredOrderedObjParser)return OrderedObjParser_1;hasRequiredOrderedObjParser=1;const e=requireUtil(),t=requireXmlNode(),n=requireDocTypeReader(),i=requireStrnum();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,a){if(void 0!==e&&(this.options.trimValues&&!i&&(e=e.trim()),e.length>0)){a||(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 a(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 s=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,s),r=i.length,o={};for(let e=0;e<r;e++){const t=this.resolveNameSpace(i[e][1]);let r=i[e][4],a=this.options.attributeNamePrefix+t;if(t.length)if(this.options.transformAttributeName&&(a=this.options.transformAttributeName(a)),"__proto__"===a&&(a="#__proto__"),void 0!==r){this.options.trimValues&&(r=r.trim()),r=this.replaceEntitiesValue(r);const e=this.options.attributeValueProcessor(t,r,n);o[a]=null==e?r:typeof e!=typeof r||e!==r?e:y(r,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[a]=!0)}if(!Object.keys(o).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=o,e}return o}}const l=function(e){e=e.replace(/\r\n?/g,"\n");const i=new t("!xml");let r=i,o="",a="";for(let s=0;s<e.length;s++){if("<"===e[s])if("/"===e[s+1]){const t=h(e,">",s,"Closing Tag is not closed.");let n=e.substring(s+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,a));const i=a.substring(a.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=a.lastIndexOf(".",a.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=a.lastIndexOf("."),a=a.substring(0,c),r=this.tagsNodeStack.pop(),o="",s=t}else if("?"===e[s+1]){let n=f(e,s,!1,"?>");if(!n)throw new Error("Pi Tag is not closed.");if(o=this.saveTextToParentTag(o,r,a),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,a,n.tagName)),this.addChild(r,e,a)}s=n.closeIndex+1}else if("!--"===e.substr(s+1,3)){const t=h(e,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const n=e.substring(s+4,t-2);o=this.saveTextToParentTag(o,r,a),r.add(this.options.commentPropName,[{[this.options.textNodeName]:n}])}s=t}else if("!D"===e.substr(s+1,2)){const t=n(e,s);this.docTypeEntities=t.entities,s=t.i}else if("!["===e.substr(s+1,2)){const t=h(e,"]]>",s,"CDATA is not closed.")-2,n=e.substring(s+9,t);o=this.saveTextToParentTag(o,r,a);let i=this.parseTextData(n,r.tagname,a,!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),s=t+2}else{let n=f(e,s,this.options.removeNSPrefix),c=n.tagName;const l=n.rawTagName;let d=n.tagExp,u=n.attrExpPresent,p=n.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&o&&"!xml"!==r.tagname&&(o=this.saveTextToParentTag(o,r,a,!1));const m=r;if(m&&-1!==this.options.unpairedTags.indexOf(m.tagname)&&(r=this.tagsNodeStack.pop(),a=a.substring(0,a.lastIndexOf("."))),c!==i.tagname&&(a+=a?"."+c:c),this.isItStopNode(this.options.stopNodes,a,c)){let i="";if(d.length>0&&d.lastIndexOf("/")===d.length-1)"/"===c[c.length-1]?(c=c.substr(0,c.length-1),a=a.substr(0,a.length-1),d=c):d=d.substr(0,d.length-1),s=n.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))s=n.closeIndex;else{const t=this.readStopNodeData(e,l,p+1);if(!t)throw new Error(`Unexpected end of ${l}`);s=t.i,i=t.tagContent}const o=new t(c);c!==d&&u&&(o[":@"]=this.buildAttributesMap(d,a,c)),i&&(i=this.parseTextData(i,c,a,!0,u,!0,!0)),a=a.substr(0,a.lastIndexOf(".")),o.add(this.options.textNodeName,i),this.addChild(r,o,a)}else{if(d.length>0&&d.lastIndexOf("/")===d.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),a=a.substr(0,a.length-1),d=c):d=d.substr(0,d.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const e=new t(c);c!==d&&u&&(e[":@"]=this.buildAttributesMap(d,a,c)),this.addChild(r,e,a),a=a.substr(0,a.lastIndexOf("."))}else{const e=new t(c);this.tagsNodeStack.push(r),c!==d&&u&&(e[":@"]=this.buildAttributesMap(d,a,c)),this.addChild(r,e,a),r=e}o="",s=p}}else o+=e[s]}return i.child};function d(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 u=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 m(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 h(e,t,n,i){const r=e.indexOf(t,n);if(-1===r)throw new Error(i);return r+t.length-1}function f(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 a=r.index,s=o.search(/\s/);let c=o,l=!0;-1!==s&&(c=o.substring(0,s),o=o.substring(s+1).trimStart());const d=c;if(n){const e=c.indexOf(":");-1!==e&&(c=c.substr(e+1),l=c!==r.data.substr(e+1))}return{tagName:c,tagExp:o,closeIndex:a,attrExpPresent:l,rawTagName:d}}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=h(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=h(e,"?>",n+1,"StopNode is not closed.")}else if("!--"===e.substr(n+1,3)){n=h(e,"--\x3e",n+3,"StopNode is not closed.")}else if("!["===e.substr(n+1,2)){n=h(e,"]]>",n,"StopNode is not closed.")-2}else{const i=f(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 OrderedObjParser_1=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=l,this.parseTextData=o,this.resolveNameSpace=a,this.buildAttributesMap=c,this.isItStopNode=m,this.replaceEntitiesValue=u,this.readStopNodeData=g,this.saveTextToParentTag=p,this.addChild=d}}}var node2json={},hasRequiredNode2json,XMLParser_1,hasRequiredXMLParser,orderedJs2Xml,hasRequiredOrderedJs2Xml,json2xml,hasRequiredJson2xml,fxp,hasRequiredFxp;function requireNode2json(){if(hasRequiredNode2json)return node2json;function e(r,o,a){let s;const c={};for(let l=0;l<r.length;l++){const d=r[l],u=t(d);let p="";if(p=void 0===a?u:a+"."+u,u===o.textNodeName)void 0===s?s=d[u]:s+=""+d[u];else{if(void 0===u)continue;if(d[u]){let t=e(d[u],o,p);const r=i(t,o);d[":@"]?n(t,d[":@"],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[u]&&c.hasOwnProperty(u)?(Array.isArray(c[u])||(c[u]=[c[u]]),c[u].push(t)):o.isArray(u,p,r)?c[u]=[t]:c[u]=t}}}return"string"==typeof s?s.length>0&&(c[o.textNodeName]=s):void 0!==s&&(c[o.textNodeName]=s),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 a=0;a<o;a++){const o=r[a];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 hasRequiredNode2json=1,node2json.prettify=function(t,n){return e(t,n)},node2json}function requireXMLParser(){if(hasRequiredXMLParser)return XMLParser_1;hasRequiredXMLParser=1;const{buildOptions:e}=requireOptionsBuilder(),t=requireOrderedObjParser(),{prettify:n}=requireNode2json(),i=requireValidator();return XMLParser_1=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 a=o.parseXml(e);return this.options.preserveOrder||void 0===a?a:n(a,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 '
'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}}function requireOrderedJs2Xml(){if(hasRequiredOrderedJs2Xml)return orderedJs2Xml;hasRequiredOrderedJs2Xml=1;function e(o,a,s,c){let l="",d=!1;for(let u=0;u<o.length;u++){const p=o[u],m=t(p);if(void 0===m)continue;let h="";if(h=0===s.length?m:`${s}.${m}`,m===a.textNodeName){let e=p[m];i(h,a)||(e=a.tagValueProcessor(m,e),e=r(e,a)),d&&(l+=c),l+=e,d=!1;continue}if(m===a.cdataPropName){d&&(l+=c),l+=`<![CDATA[${p[m][0][a.textNodeName]}]]>`,d=!1;continue}if(m===a.commentPropName){l+=c+`\x3c!--${p[m][0][a.textNodeName]}--\x3e`,d=!0;continue}if("?"===m[0]){const e=n(p[":@"],a),t="?xml"===m?"":c;let i=p[m][0][a.textNodeName];i=0!==i.length?" "+i:"",l+=t+`<${m}${i}${e}?>`,d=!0;continue}let f=c;""!==f&&(f+=a.indentBy);const g=c+`<${m}${n(p[":@"],a)}`,y=e(p[m],a,h,f);-1!==a.unpairedTags.indexOf(m)?a.suppressUnpairedNode?l+=g+">":l+=g+"/>":y&&0!==y.length||!a.suppressEmptyNode?y&&y.endsWith(">")?l+=g+`>${y}${c}</${m}>`:(l+=g+">",y&&""!==c&&(y.includes("/>")||y.includes("</"))?l+=c+a.indentBy+y+c:l+=y,l+=`</${m}>`):l+=g+"/>",d=!0}return l}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 orderedJs2Xml=function(t,n){let i="";return n.format&&n.indentBy.length>0&&(i="\n"),e(t,n,"",i)}}function requireJson2xml(){if(hasRequiredJson2xml)return json2xml;hasRequiredJson2xml=1;const e=requireOrderedJs2Xml(),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:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],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="",a="";for(let s=0;s<n;s++){const n=e[r][s];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)&&(a+=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,a,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},json2xml=n}function requireFxp(){if(hasRequiredFxp)return fxp;hasRequiredFxp=1;const e=requireValidator(),t=requireXMLParser(),n=requireJson2xml();return fxp={XMLParser:t,XMLValidator:e,XMLBuilder:n}}var fxpExports=requireFxp();const ACCOUNT_ID_ENDPOINT_REGEX$1=/\d{12}\.ddb/;async function checkFeatures$1(e,t,n){const i=n.request;if("rpc-v2-cbor"===i?.headers?.["smithy-protocol"]&&setFeature$2(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?setFeature$2(e,"RETRY_MODE_ADAPTIVE","F"):setFeature$2(e,"RETRY_MODE_STANDARD","E"):setFeature$2(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX$1)&&setFeature$2(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":setFeature$2(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":setFeature$2(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":setFeature$2(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const r=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(r?.$source){const t=r;t.accountId&&setFeature$2(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,i]of Object.entries(t.$source??{}))setFeature$2(e,n,i)}}const USER_AGENT$1="user-agent",X_AMZ_USER_AGENT$1="x-amz-user-agent",SPACE$1=" ",UA_NAME_SEPARATOR$1="/",UA_NAME_ESCAPE_REGEX$1=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,UA_VALUE_ESCAPE_REGEX$1=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,UA_ESCAPE_CHAR$1="-",BYTE_LIMIT$1=1024;function encodeFeatures$1(e){let t="";for(const n in e){const i=e[n];if(!(t.length+i.length+1<=BYTE_LIMIT$1))break;t.length?t+=","+i:t+=i}return t}const userAgentMiddleware$1=e=>(t,n)=>async i=>{const{request:r}=i;if(!HttpRequest.isInstance(r))return t(i);const{headers:o}=r,a=n?.userAgent?.map(escapeUserAgent$1)||[],s=(await e.defaultUserAgentProvider()).map(escapeUserAgent$1);await checkFeatures$1(n,e,i);const c=n;s.push(`m/${encodeFeatures$1(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const l=e?.customUserAgent?.map(escapeUserAgent$1)||[],d=await e.userAgentAppId();d&&s.push(escapeUserAgent$1([`app/${d}`]));const u=[].concat([...s,...a,...l]).join(SPACE$1),p=[...s.filter((e=>e.startsWith("aws-sdk-"))),...l].join(SPACE$1);return"browser"!==e.runtime?(p&&(o[X_AMZ_USER_AGENT$1]=o[X_AMZ_USER_AGENT$1]?`${o[USER_AGENT$1]} ${p}`:p),o[USER_AGENT$1]=u):o[X_AMZ_USER_AGENT$1]=u,t({...i,request:r})},escapeUserAgent$1=e=>{const t=e[0].split(UA_NAME_SEPARATOR$1).map((e=>e.replace(UA_NAME_ESCAPE_REGEX$1,UA_ESCAPE_CHAR$1))).join(UA_NAME_SEPARATOR$1),n=e[1]?.replace(UA_VALUE_ESCAPE_REGEX$1,UA_ESCAPE_CHAR$1),i=t.indexOf(UA_NAME_SEPARATOR$1),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}`}}),"")},getUserAgentMiddlewareOptions$1={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},getUserAgentPlugin$1=e=>({applyToStack:t=>{t.add(userAgentMiddleware$1(e),getUserAgentMiddlewareOptions$1)}});var SelectorType;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(SelectorType||(SelectorType={}));const DEFAULT_USE_DUALSTACK_ENDPOINT=!1,DEFAULT_USE_FIPS_ENDPOINT=!1,isFipsRegion=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),getRealRegion=e=>isFipsRegion(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,resolveRegionConfig=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if("string"==typeof t)return getRealRegion(t);const e=await t();return getRealRegion(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!isFipsRegion(e)||("function"!=typeof n?Promise.resolve(!!n):n())}}},CONTENT_LENGTH_HEADER="content-length";function contentLengthMiddleware(e){return t=>async n=>{const i=n.request;if(HttpRequest.isInstance(i)){const{body:t,headers:n}=i;if(t&&-1===Object.keys(n).map((e=>e.toLowerCase())).indexOf(CONTENT_LENGTH_HEADER))try{const n=e(t);i.headers={...i.headers,[CONTENT_LENGTH_HEADER]:String(n)}}catch(e){}}return t({...n,request:i})}}const contentLengthMiddlewareOptions={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},getContentLengthPlugin=e=>({applyToStack:t=>{t.add(contentLengthMiddleware(e.bodyLengthChecker),contentLengthMiddlewareOptions)}}),resolveParamsForS3=async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),isArnBucketName(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!isDnsCompatibleBucketName(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},DOMAIN_PATTERN=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,IP_ADDRESS_PATTERN=/(\d+\.){3}\d+/,DOTS_PATTERN=/\.\./,isDnsCompatibleBucketName=e=>DOMAIN_PATTERN.test(e)&&!IP_ADDRESS_PATTERN.test(e)&&!DOTS_PATTERN.test(e),isArnBucketName=e=>{const[t,n,i,,,r]=e.split(":"),o="arn"===t&&e.split(":").length>=6,a=Boolean(o&&n&&i&&r);if(o&&!a)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return a},createConfigValueProvider=(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},getEndpointFromConfig=async e=>{};function parseQueryString(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 parseUrl=e=>{if("string"==typeof e)return parseUrl(new URL(e));const{hostname:t,pathname:n,port:i,protocol:r,search:o}=e;let a;return o&&(a=parseQueryString(o)),{hostname:t,port:i?parseInt(i):void 0,protocol:r,path:n,query:a}},toEndpointV1=e=>"object"==typeof e?"url"in e?parseUrl(e.url):e:parseUrl(e),getEndpointFromInstructions=async(e,t,n,i)=>{if(!n.endpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await getEndpointFromConfig(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(toEndpointV1(e)))}const r=await resolveParams(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(r,i)},resolveParams=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 createConfigValueProvider(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 resolveParamsForS3(i),i},endpointMiddleware=({config:e,instructions:t})=>(n,i)=>async r=>{e.endpoint&&setFeature$3(i,"ENDPOINT_OVERRIDE","N");const o=await getEndpointFromInstructions(r.input,{getEndpointParameterInstructions:()=>t},{...e},i);i.endpointV2=o,i.authSchemes=o.properties?.authSchemes;const a=i.authSchemes?.[0];if(a){i.signing_region=a.signingRegion,i.signing_service=a.signingName;const e=getSmithyContext(i),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:a.signingRegion,signingRegion:a.signingRegion,signing_service:a.signingName,signingName:a.signingName,signingRegionSet:a.signingRegionSet},a.properties))}return n({...r})},endpointMiddlewareOptions={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:serializerMiddlewareOption.name},getEndpointPlugin=(e,t)=>({applyToStack:n=>{n.addRelativeTo(endpointMiddleware({config:e,instructions:t}),endpointMiddlewareOptions)}}),resolveEndpointConfig=e=>{const t=e.tls??!0,{endpoint:n}=e,i=null!=n?async()=>toEndpointV1(await normalizeProvider$1(n)()):void 0,r=!!n,o={...e,endpoint:i,tls:t,isCustomEndpoint:r,useDualstackEndpoint:normalizeProvider$1(e.useDualstackEndpoint??!1),useFipsEndpoint:normalizeProvider$1(e.useFipsEndpoint??!1)};let a;return o.serviceConfiguredEndpoint=async()=>(e.serviceId&&!a&&(a=getEndpointFromConfig(e.serviceId)),a),o};var RETRY_MODES;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(RETRY_MODES||(RETRY_MODES={}));const DEFAULT_MAX_ATTEMPTS=3,DEFAULT_RETRY_MODE=RETRY_MODES.STANDARD,THROTTLING_ERROR_CODES=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],TRANSIENT_ERROR_CODES=["TimeoutError","RequestTimeout","RequestTimeoutException"],TRANSIENT_ERROR_STATUS_CODES=[500,502,503,504],NODEJS_TIMEOUT_ERROR_CODES=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],isClockSkewCorrectedError=e=>e.$metadata?.clockSkewCorrected,isThrottlingError=e=>429===e.$metadata?.httpStatusCode||THROTTLING_ERROR_CODES.includes(e.name)||1==e.$retryable?.throttling,isTransientError=e=>isClockSkewCorrectedError(e)||TRANSIENT_ERROR_CODES.includes(e.name)||NODEJS_TIMEOUT_ERROR_CODES.includes(e?.code||"")||TRANSIENT_ERROR_STATUS_CODES.includes(e.$metadata?.httpStatusCode||0),isServerError=e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!isTransientError(e)}return!1};class DefaultRateLimiter{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=>DefaultRateLimiter.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(),isThrottlingError(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))}}DefaultRateLimiter.setTimeoutFn=setTimeout;const DEFAULT_RETRY_DELAY_BASE=100,MAXIMUM_RETRY_DELAY=2e4,THROTTLING_RETRY_DELAY_BASE=500,INITIAL_RETRY_TOKENS=500,RETRY_COST=5,TIMEOUT_RETRY_COST=10,NO_RETRY_INCREMENT=1,INVOCATION_ID_HEADER="amz-sdk-invocation-id",REQUEST_HEADER="amz-sdk-request",getDefaultRetryBackoffStrategy=()=>{let e=DEFAULT_RETRY_DELAY_BASE;return{computeNextBackoffDelay:t=>Math.floor(Math.min(MAXIMUM_RETRY_DELAY,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}},createDefaultRetryToken=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(MAXIMUM_RETRY_DELAY,e),getRetryCost:()=>n});class StandardRetryStrategy{constructor(e){this.maxAttempts=e,this.mode=RETRY_MODES.STANDARD,this.capacity=INITIAL_RETRY_TOKENS,this.retryBackoffStrategy=getDefaultRetryBackoffStrategy(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return createDefaultRetryToken({retryDelay:DEFAULT_RETRY_DELAY_BASE,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?THROTTLING_RETRY_DELAY_BASE:DEFAULT_RETRY_DELAY_BASE);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,createDefaultRetryToken({retryDelay:r,retryCount:e.getRetryCount()+1,retryCost:o})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(INITIAL_RETRY_TOKENS,this.capacity+(e.getRetryCost()??NO_RETRY_INCREMENT))}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 ${DEFAULT_MAX_ATTEMPTS}`),DEFAULT_MAX_ATTEMPTS}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?TIMEOUT_RETRY_COST:RETRY_COST}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class AdaptiveRetryStrategy{constructor(e,t){this.maxAttemptsProvider=e,this.mode=RETRY_MODES.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new DefaultRateLimiter,this.standardRetryStrategy=new StandardRetryStrategy(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 getRandomValues;const rnds8=new Uint8Array(16);function rng(){if(!getRandomValues&&(getRandomValues="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!getRandomValues))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}const byteToHex=[];for(let e=0;e<256;++e)byteToHex.push((e+256).toString(16).slice(1));function unsafeStringify(e,t=0){return byteToHex[e[t+0]]+byteToHex[e[t+1]]+byteToHex[e[t+2]]+byteToHex[e[t+3]]+"-"+byteToHex[e[t+4]]+byteToHex[e[t+5]]+"-"+byteToHex[e[t+6]]+byteToHex[e[t+7]]+"-"+byteToHex[e[t+8]]+byteToHex[e[t+9]]+"-"+byteToHex[e[t+10]]+byteToHex[e[t+11]]+byteToHex[e[t+12]]+byteToHex[e[t+13]]+byteToHex[e[t+14]]+byteToHex[e[t+15]]}const randomUUID="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var native={randomUUID:randomUUID};function v4(e,t,n){if(native.randomUUID&&!t&&!e)return native.randomUUID();const i=(e=e||{}).random||(e.rng||rng)();return i[6]=15&i[6]|64,i[8]=63&i[8]|128,unsafeStringify(i)}const asSdkError=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}`),resolveRetryConfig=e=>{const{retryStrategy:t}=e,n=normalizeProvider$1(e.maxAttempts??DEFAULT_MAX_ATTEMPTS);return{...e,maxAttempts:n,retryStrategy:async()=>{if(t)return t;return await normalizeProvider$1(e.retryMode)()===RETRY_MODES.ADAPTIVE?new AdaptiveRetryStrategy(n):new StandardRetryStrategy(n)}}},isStreamingPayload=e=>e?.body instanceof ReadableStream,retryMiddleware=e=>(t,n)=>async i=>{let r=await e.retryStrategy();const o=await e.maxAttempts();if(!isRetryStrategyV2(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,s=0,c=0;const{request:l}=i,d=HttpRequest.isInstance(l);for(d&&(l.headers[INVOCATION_ID_HEADER]=v4());;)try{d&&(l.headers[REQUEST_HEADER]=`attempt=${s+1}; max=${o}`);const{response:n,output:a}=await t(i);return r.recordSuccess(e),a.$metadata.attempts=s+1,a.$metadata.totalRetryDelay=c,{response:n,output:a}}catch(t){const i=getRetryErrorInfo(t);if(a=asSdkError(t),d&&isStreamingPayload(l))throw(n.logger instanceof NoOpLogger?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=s+1,a.$metadata.totalRetryDelay=c,a}s=e.getRetryCount();const o=e.getRetryDelay();c+=o,await new Promise((e=>setTimeout(e,o)))}}},isRetryStrategyV2=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,getRetryErrorInfo=e=>{const t={error:e,errorType:getRetryErrorType(e)},n=getRetryAfterHint(e.$response);return n&&(t.retryAfterHint=n),t},getRetryErrorType=e=>isThrottlingError(e)?"THROTTLING":isTransientError(e)?"TRANSIENT":isServerError(e)?"SERVER_ERROR":"CLIENT_ERROR",retryMiddlewareOptions={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},getRetryPlugin=e=>({applyToStack:t=>{t.add(retryMiddleware(e),retryMiddlewareOptions)}}),getRetryAfterHint=e=>{if(!HttpResponse.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)},defaultDynamoDBHttpAuthSchemeParametersProvider=async(e,t,n)=>({operation:getSmithyContext(t).operation,region:await normalizeProvider$1(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function createAwsAuthSigv4HttpAuthOption$3(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"dynamodb",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}const defaultDynamoDBHttpAuthSchemeProvider=e=>{const t=[];return e.operation,t.push(createAwsAuthSigv4HttpAuthOption$3(e)),t},resolveHttpAuthSchemeConfig$3=e=>({...resolveAwsSdkSigV4Config$1(e)}),resolveClientEndpointParameters$3=e=>({...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"dynamodb"}),commonParams$3={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},AccountId:{type:"builtInParams",name:"accountId"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"},AccountIdEndpointMode:{type:"builtInParams",name:"accountIdEndpointMode"}};class DynamoDBServiceException extends ServiceException$1{constructor(e){super(e),Object.setPrototypeOf(this,DynamoDBServiceException.prototype)}}class BackupInUseException extends DynamoDBServiceException{constructor(e){super({name:"BackupInUseException",$fault:"client",...e}),this.name="BackupInUseException",this.$fault="client",Object.setPrototypeOf(this,BackupInUseException.prototype)}}class BackupNotFoundException extends DynamoDBServiceException{constructor(e){super({name:"BackupNotFoundException",$fault:"client",...e}),this.name="BackupNotFoundException",this.$fault="client",Object.setPrototypeOf(this,BackupNotFoundException.prototype)}}let InternalServerError$1=class e extends DynamoDBServiceException{constructor(t){super({name:"InternalServerError",$fault:"server",...t}),this.name="InternalServerError",this.$fault="server",Object.setPrototypeOf(this,e.prototype)}};class RequestLimitExceeded extends DynamoDBServiceException{constructor(e){super({name:"RequestLimitExceeded",$fault:"client",...e}),this.name="RequestLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,RequestLimitExceeded.prototype)}}class InvalidEndpointException extends DynamoDBServiceException{constructor(e){super({name:"InvalidEndpointException",$fault:"client",...e}),this.name="InvalidEndpointException",this.$fault="client",Object.setPrototypeOf(this,InvalidEndpointException.prototype),this.Message=e.Message}}class ProvisionedThroughputExceededException extends DynamoDBServiceException{constructor(e){super({name:"ProvisionedThroughputExceededException",$fault:"client",...e}),this.name="ProvisionedThroughputExceededException",this.$fault="client",Object.setPrototypeOf(this,ProvisionedThroughputExceededException.prototype)}}let ResourceNotFoundException$2=class e extends DynamoDBServiceException{constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,e.prototype)}};class ItemCollectionSizeLimitExceededException extends DynamoDBServiceException{constructor(e){super({name:"ItemCollectionSizeLimitExceededException",$fault:"client",...e}),this.name="ItemCollectionSizeLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,ItemCollectionSizeLimitExceededException.prototype)}}class ContinuousBackupsUnavailableException extends DynamoDBServiceException{constructor(e){super({name:"ContinuousBackupsUnavailableException",$fault:"client",...e}),this.name="ContinuousBackupsUnavailableException",this.$fault="client",Object.setPrototypeOf(this,ContinuousBackupsUnavailableException.prototype)}}let LimitExceededException$1=class e extends DynamoDBServiceException{constructor(t){super({name:"LimitExceededException",$fault:"client",...t}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,e.prototype)}};class TableInUseException extends DynamoDBServiceException{constructor(e){super({name:"TableInUseException",$fault:"client",...e}),this.name="TableInUseException",this.$fault="client",Object.setPrototypeOf(this,TableInUseException.prototype)}}class TableNotFoundException extends DynamoDBServiceException{constructor(e){super({name:"TableNotFoundException",$fault:"client",...e}),this.name="TableNotFoundException",this.$fault="client",Object.setPrototypeOf(this,TableNotFoundException.prototype)}}class GlobalTableAlreadyExistsException extends DynamoDBServiceException{constructor(e){super({name:"GlobalTableAlreadyExistsException",$fault:"client",...e}),this.name="GlobalTableAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,GlobalTableAlreadyExistsException.prototype)}}let ResourceInUseException$2=class e extends DynamoDBServiceException{constructor(t){super({name:"ResourceInUseException",$fault:"client",...t}),this.name="ResourceInUseException",this.$fault="client",Object.setPrototypeOf(this,e.prototype)}};class TransactionConflictException extends DynamoDBServiceException{constructor(e){super({name:"TransactionConflictException",$fault:"client",...e}),this.name="TransactionConflictException",this.$fault="client",Object.setPrototypeOf(this,TransactionConflictException.prototype)}}class PolicyNotFoundException extends DynamoDBServiceException{constructor(e){super({name:"PolicyNotFoundException",$fault:"client",...e}),this.name="PolicyNotFoundException",this.$fault="client",Object.setPrototypeOf(this,PolicyNotFoundException.prototype)}}class ExportNotFoundException extends DynamoDBServiceException{constructor(e){super({name:"ExportNotFoundException",$fault:"client",...e}),this.name="ExportNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ExportNotFoundException.prototype)}}class GlobalTableNotFoundException extends DynamoDBServiceException{constructor(e){super({name:"GlobalTableNotFoundException",$fault:"client",...e}),this.name="GlobalTableNotFoundException",this.$fault="client",Object.setPrototypeOf(this,GlobalTableNotFoundException.prototype)}}class ImportNotFoundException extends DynamoDBServiceException{constructor(e){super({name:"ImportNotFoundException",$fault:"client",...e}),this.name="ImportNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ImportNotFoundException.prototype)}}class DuplicateItemException extends DynamoDBServiceException{constructor(e){super({name:"DuplicateItemException",$fault:"client",...e}),this.name="DuplicateItemException",this.$fault="client",Object.setPrototypeOf(this,DuplicateItemException.prototype)}}class IdempotentParameterMismatchException extends DynamoDBServiceException{constructor(e){super({name:"IdempotentParameterMismatchException",$fault:"client",...e}),this.name="IdempotentParameterMismatchException",this.$fault="client",Object.setPrototypeOf(this,IdempotentParameterMismatchException.prototype),this.Message=e.Message}}class TransactionInProgressException extends DynamoDBServiceException{constructor(e){super({name:"TransactionInProgressException",$fault:"client",...e}),this.name="TransactionInProgressException",this.$fault="client",Object.setPrototypeOf(this,TransactionInProgressException.prototype),this.Message=e.Message}}class ExportConflictException extends DynamoDBServiceException{constructor(e){super({name:"ExportConflictException",$fault:"client",...e}),this.name="ExportConflictException",this.$fault="client",Object.setPrototypeOf(this,ExportConflictException.prototype)}}class InvalidExportTimeException extends DynamoDBServiceException{constructor(e){super({name:"InvalidExportTimeException",$fault:"client",...e}),this.name="InvalidExportTimeException",this.$fault="client",Object.setPrototypeOf(this,InvalidExportTimeException.prototype)}}class PointInTimeRecoveryUnavailableException extends DynamoDBServiceException{constructor(e){super({name:"PointInTimeRecoveryUnavailableException",$fault:"client",...e}),this.name="PointInTimeRecoveryUnavailableException",this.$fault="client",Object.setPrototypeOf(this,PointInTimeRecoveryUnavailableException.prototype)}}class ImportConflictException extends DynamoDBServiceException{constructor(e){super({name:"ImportConflictException",$fault:"client",...e}),this.name="ImportConflictException",this.$fault="client",Object.setPrototypeOf(this,ImportConflictException.prototype)}}class TableAlreadyExistsException extends DynamoDBServiceException{constructor(e){super({name:"TableAlreadyExistsException",$fault:"client",...e}),this.name="TableAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,TableAlreadyExistsException.prototype)}}class InvalidRestoreTimeException extends DynamoDBServiceException{constructor(e){super({name:"InvalidRestoreTimeException",$fault:"client",...e}),this.name="InvalidRestoreTimeException",this.$fault="client",Object.setPrototypeOf(this,InvalidRestoreTimeException.prototype)}}class ReplicaAlreadyExistsException extends DynamoDBServiceException{constructor(e){super({name:"ReplicaAlreadyExistsException",$fault:"client",...e}),this.name="ReplicaAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,ReplicaAlreadyExistsException.prototype)}}class ReplicaNotFoundException extends DynamoDBServiceException{constructor(e){super({name:"ReplicaNotFoundException",$fault:"client",...e}),this.name="ReplicaNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ReplicaNotFoundException.prototype)}}class IndexNotFoundException extends DynamoDBServiceException{constructor(e){super({name:"IndexNotFoundException",$fault:"client",...e}),this.name="IndexNotFoundException",this.$fault="client",Object.setPrototypeOf(this,IndexNotFoundException.prototype)}}var AttributeValue;!function(e){e.visit=(e,t)=>void 0!==e.S?t.S(e.S):void 0!==e.N?t.N(e.N):void 0!==e.B?t.B(e.B):void 0!==e.SS?t.SS(e.SS):void 0!==e.NS?t.NS(e.NS):void 0!==e.BS?t.BS(e.BS):void 0!==e.M?t.M(e.M):void 0!==e.L?t.L(e.L):void 0!==e.NULL?t.NULL(e.NULL):void 0!==e.BOOL?t.BOOL(e.BOOL):t._(e.$unknown[0],e.$unknown[1])}(AttributeValue||(AttributeValue={}));class ConditionalCheckFailedException extends DynamoDBServiceException{constructor(e){super({name:"ConditionalCheckFailedException",$fault:"client",...e}),this.name="ConditionalCheckFailedException",this.$fault="client",Object.setPrototypeOf(this,ConditionalCheckFailedException.prototype),this.Item=e.Item}}class TransactionCanceledException extends DynamoDBServiceException{constructor(e){super({name:"TransactionCanceledException",$fault:"client",...e}),this.name="TransactionCanceledException",this.$fault="client",Object.setPrototypeOf(this,TransactionCanceledException.prototype),this.Message=e.Message,this.CancellationReasons=e.CancellationReasons}}const se_BatchWriteItemCommand=async(e,t)=>{const n=sharedHeaders$1("BatchWriteItem");let i;return i=JSON.stringify(se_BatchWriteItemInput(e,t)),buildHttpRpcRequest$2(t,n,"/",void 0,i)},se_DeleteItemCommand=async(e,t)=>{const n=sharedHeaders$1("DeleteItem");let i;return i=JSON.stringify(se_DeleteItemInput(e,t)),buildHttpRpcRequest$2(t,n,"/",void 0,i)},se_DescribeEndpointsCommand=async(e,t)=>{const n=sharedHeaders$1("DescribeEndpoints");let i;return i=JSON.stringify(_json(e)),buildHttpRpcRequest$2(t,n,"/",void 0,i)},se_GetItemCommand=async(e,t)=>{const n=sharedHeaders$1("GetItem");let i;return i=JSON.stringify(se_GetItemInput(e,t)),buildHttpRpcRequest$2(t,n,"/",void 0,i)},se_PutItemCommand=async(e,t)=>{const n=sharedHeaders$1("PutItem");let i;return i=JSON.stringify(se_PutItemInput(e,t)),buildHttpRpcRequest$2(t,n,"/",void 0,i)},se_QueryCommand=async(e,t)=>{const n=sharedHeaders$1("Query");let i;return i=JSON.stringify(se_QueryInput(e,t)),buildHttpRpcRequest$2(t,n,"/",void 0,i)},se_ScanCommand=async(e,t)=>{const n=sharedHeaders$1("Scan");let i;return i=JSON.stringify(se_ScanInput(e,t)),buildHttpRpcRequest$2(t,n,"/",void 0,i)},se_UpdateItemCommand=async(e,t)=>{const n=sharedHeaders$1("UpdateItem");let i;return i=JSON.stringify(se_UpdateItemInput(e,t)),buildHttpRpcRequest$2(t,n,"/",void 0,i)},de_BatchWriteItemCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError$3(e,t);const n=await parseJsonBody$1(e.body,t);let i={};i=de_BatchWriteItemOutput(n,t);return{$metadata:deserializeMetadata$3(e),...i}},de_DeleteItemCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError$3(e,t);const n=await parseJsonBody$1(e.body,t);let i={};i=de_DeleteItemOutput(n,t);return{$metadata:deserializeMetadata$3(e),...i}},de_DescribeEndpointsCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError$3(e,t);const n=await parseJsonBody$1(e.body,t);let i={};i=_json(n);return{$metadata:deserializeMetadata$3(e),...i}},de_GetItemCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError$3(e,t);const n=await parseJsonBody$1(e.body,t);let i={};i=de_GetItemOutput(n,t);return{$metadata:deserializeMetadata$3(e),...i}},de_PutItemCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError$3(e,t);const n=await parseJsonBody$1(e.body,t);let i={};i=de_PutItemOutput(n,t);return{$metadata:deserializeMetadata$3(e),...i}},de_QueryCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError$3(e,t);const n=await parseJsonBody$1(e.body,t);let i={};i=de_QueryOutput(n,t);return{$metadata:deserializeMetadata$3(e),...i}},de_ScanCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError$3(e,t);const n=await parseJsonBody$1(e.body,t);let i={};i=de_ScanOutput(n,t);return{$metadata:deserializeMetadata$3(e),...i}},de_UpdateItemCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError$3(e,t);const n=await parseJsonBody$1(e.body,t);let i={};i=de_UpdateItemOutput(n,t);return{$metadata:deserializeMetadata$3(e),...i}},de_CommandError$3=async(e,t)=>{const n={...e,body:await parseJsonErrorBody$1(e.body,t)},i=loadRestJsonErrorCode$1(e,n.body);switch(i){case"InternalServerError":case"com.amazonaws.dynamodb#InternalServerError":throw await de_InternalServerErrorRes$1(n);case"RequestLimitExceeded":case"com.amazonaws.dynamodb#RequestLimitExceeded":throw await de_RequestLimitExceededRes(n);case"InvalidEndpointException":case"com.amazonaws.dynamodb#InvalidEndpointException":throw await de_InvalidEndpointExceptionRes(n);case"ProvisionedThroughputExceededException":case"com.amazonaws.dynamodb#ProvisionedThroughputExceededException":throw await de_ProvisionedThroughputExceededExceptionRes(n);case"ResourceNotFoundException":case"com.amazonaws.dynamodb#ResourceNotFoundException":throw await de_ResourceNotFoundExceptionRes$2(n);case"ItemCollectionSizeLimitExceededException":case"com.amazonaws.dynamodb#ItemCollectionSizeLimitExceededException":throw await de_ItemCollectionSizeLimitExceededExceptionRes(n);case"BackupInUseException":case"com.amazonaws.dynamodb#BackupInUseException":throw await de_BackupInUseExceptionRes(n);case"ContinuousBackupsUnavailableException":case"com.amazonaws.dynamodb#ContinuousBackupsUnavailableException":throw await de_ContinuousBackupsUnavailableExceptionRes(n);case"LimitExceededException":case"com.amazonaws.dynamodb#LimitExceededException":throw await de_LimitExceededExceptionRes$1(n);case"TableInUseException":case"com.amazonaws.dynamodb#TableInUseException":throw await de_TableInUseExceptionRes(n);case"TableNotFoundException":case"com.amazonaws.dynamodb#TableNotFoundException":throw await de_TableNotFoundExceptionRes(n);case"GlobalTableAlreadyExistsException":case"com.amazonaws.dynamodb#GlobalTableAlreadyExistsException":throw await de_GlobalTableAlreadyExistsExceptionRes(n);case"ResourceInUseException":case"com.amazonaws.dynamodb#ResourceInUseException":throw await de_ResourceInUseExceptionRes$2(n);case"BackupNotFoundException":case"com.amazonaws.dynamodb#BackupNotFoundException":throw await de_BackupNotFoundExceptionRes(n);case"ConditionalCheckFailedException":case"com.amazonaws.dynamodb#ConditionalCheckFailedException":throw await de_ConditionalCheckFailedExceptionRes(n,t);case"TransactionConflictException":case"com.amazonaws.dynamodb#TransactionConflictException":throw await de_TransactionConflictExceptionRes(n);case"PolicyNotFoundException":case"com.amazonaws.dynamodb#PolicyNotFoundException":throw await de_PolicyNotFoundExceptionRes(n);case"ExportNotFoundException":case"com.amazonaws.dynamodb#ExportNotFoundException":throw await de_ExportNotFoundExceptionRes(n);case"GlobalTableNotFoundException":case"com.amazonaws.dynamodb#GlobalTableNotFoundException":throw await de_GlobalTableNotFoundExceptionRes(n);case"ImportNotFoundException":case"com.amazonaws.dynamodb#ImportNotFoundException":throw await de_ImportNotFoundExceptionRes(n);case"DuplicateItemException":case"com.amazonaws.dynamodb#DuplicateItemException":throw await de_DuplicateItemExceptionRes(n);case"IdempotentParameterMismatchException":case"com.amazonaws.dynamodb#IdempotentParameterMismatchException":throw await de_IdempotentParameterMismatchExceptionRes(n);case"TransactionCanceledException":case"com.amazonaws.dynamodb#TransactionCanceledException":throw await de_TransactionCanceledExceptionRes(n,t);case"TransactionInProgressException":case"com.amazonaws.dynamodb#TransactionInProgressException":throw await de_TransactionInProgressExceptionRes(n);case"ExportConflictException":case"com.amazonaws.dynamodb#ExportConflictException":throw await de_ExportConflictExceptionRes(n);case"InvalidExportTimeException":case"com.amazonaws.dynamodb#InvalidExportTimeException":throw await de_InvalidExportTimeExceptionRes(n);case"PointInTimeRecoveryUnavailableException":case"com.amazonaws.dynamodb#PointInTimeRecoveryUnavailableException":throw await de_PointInTimeRecoveryUnavailableExceptionRes(n);case"ImportConflictException":case"com.amazonaws.dynamodb#ImportConflictException":throw await de_ImportConflictExceptionRes(n);case"TableAlreadyExistsException":case"com.amazonaws.dynamodb#TableAlreadyExistsException":throw await de_TableAlreadyExistsExceptionRes(n);case"InvalidRestoreTimeException":case"com.amazonaws.dynamodb#InvalidRestoreTimeException":throw await de_InvalidRestoreTimeExceptionRes(n);case"ReplicaAlreadyExistsException":case"com.amazonaws.dynamodb#ReplicaAlreadyExistsException":throw await de_ReplicaAlreadyExistsExceptionRes(n);case"ReplicaNotFoundException":case"com.amazonaws.dynamodb#ReplicaNotFoundException":throw await de_ReplicaNotFoundExceptionRes(n);case"IndexNotFoundException":case"com.amazonaws.dynamodb#IndexNotFoundException":throw await de_IndexNotFoundExceptionRes(n);default:const r=n.body;return throwDefaultError$3({output:e,parsedBody:r,errorCode:i})}},de_BackupInUseExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new BackupInUseException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_BackupNotFoundExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new BackupNotFoundException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_ConditionalCheckFailedExceptionRes=async(e,t)=>{const n=e.body,i=de_ConditionalCheckFailedException(n,t),r=new ConditionalCheckFailedException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_ContinuousBackupsUnavailableExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ContinuousBackupsUnavailableException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_DuplicateItemExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new DuplicateItemException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_ExportConflictExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ExportConflictException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_ExportNotFoundExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ExportNotFoundException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_GlobalTableAlreadyExistsExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new GlobalTableAlreadyExistsException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_GlobalTableNotFoundExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new GlobalTableNotFoundException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_IdempotentParameterMismatchExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new IdempotentParameterMismatchException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_ImportConflictExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ImportConflictException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_ImportNotFoundExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ImportNotFoundException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_IndexNotFoundExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new IndexNotFoundException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_InternalServerErrorRes$1=async(e,t)=>{const n=e.body,i=_json(n),r=new InternalServerError$1({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_InvalidEndpointExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidEndpointException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_InvalidExportTimeExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidExportTimeException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_InvalidRestoreTimeExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidRestoreTimeException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_ItemCollectionSizeLimitExceededExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ItemCollectionSizeLimitExceededException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_LimitExceededExceptionRes$1=async(e,t)=>{const n=e.body,i=_json(n),r=new LimitExceededException$1({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_PointInTimeRecoveryUnavailableExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new PointInTimeRecoveryUnavailableException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_PolicyNotFoundExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new PolicyNotFoundException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_ProvisionedThroughputExceededExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ProvisionedThroughputExceededException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_ReplicaAlreadyExistsExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ReplicaAlreadyExistsException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_ReplicaNotFoundExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ReplicaNotFoundException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_RequestLimitExceededRes=async(e,t)=>{const n=e.body,i=_json(n),r=new RequestLimitExceeded({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_ResourceInUseExceptionRes$2=async(e,t)=>{const n=e.body,i=_json(n),r=new ResourceInUseException$2({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_ResourceNotFoundExceptionRes$2=async(e,t)=>{const n=e.body,i=_json(n),r=new ResourceNotFoundException$2({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_TableAlreadyExistsExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new TableAlreadyExistsException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_TableInUseExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new TableInUseException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_TableNotFoundExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new TableNotFoundException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_TransactionCanceledExceptionRes=async(e,t)=>{const n=e.body,i=de_TransactionCanceledException(n,t),r=new TransactionCanceledException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_TransactionConflictExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new TransactionConflictException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},de_TransactionInProgressExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new TransactionInProgressException({$metadata:deserializeMetadata$3(e),...i});return decorateServiceException(r,n)},se_AttributeUpdates=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>(null===i||(e[n]=se_AttributeValueUpdate(i,t)),e)),{}),se_AttributeValue=(e,t)=>AttributeValue.visit(e,{B:e=>({B:t.base64Encoder(e)}),BOOL:e=>({BOOL:e}),BS:e=>({BS:se_BinarySetAttributeValue(e,t)}),L:e=>({L:se_ListAttributeValue(e,t)}),M:e=>({M:se_MapAttributeValue(e,t)}),N:e=>({N:e}),NS:e=>({NS:_json(e)}),NULL:e=>({NULL:e}),S:e=>({S:e}),SS:e=>({SS:_json(e)}),_:(e,t)=>({name:t})}),se_AttributeValueList=(e,t)=>e.filter((e=>null!=e)).map((e=>se_AttributeValue(e,t))),se_AttributeValueUpdate=(e,t)=>take(e,{Action:[],Value:e=>se_AttributeValue(e,t)}),se_BatchWriteItemInput=(e,t)=>take(e,{RequestItems:e=>se_BatchWriteItemRequestMap(e,t),ReturnConsumedCapacity:[],ReturnItemCollectionMetrics:[]}),se_BatchWriteItemRequestMap=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>(null===i||(e[n]=se_WriteRequests(i,t)),e)),{}),se_BinarySetAttributeValue=(e,t)=>e.filter((e=>null!=e)).map((e=>t.base64Encoder(e))),se_Condition=(e,t)=>take(e,{AttributeValueList:e=>se_AttributeValueList(e,t),ComparisonOperator:[]}),se_DeleteItemInput=(e,t)=>take(e,{ConditionExpression:[],ConditionalOperator:[],Expected:e=>se_ExpectedAttributeMap(e,t),ExpressionAttributeNames:_json,ExpressionAttributeValues:e=>se_ExpressionAttributeValueMap(e,t),Key:e=>se_Key(e,t),ReturnConsumedCapacity:[],ReturnItemCollectionMetrics:[],ReturnValues:[],ReturnValuesOnConditionCheckFailure:[],TableName:[]}),se_DeleteRequest=(e,t)=>take(e,{Key:e=>se_Key(e,t)}),se_ExpectedAttributeMap=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>(null===i||(e[n]=se_ExpectedAttributeValue(i,t)),e)),{}),se_ExpectedAttributeValue=(e,t)=>take(e,{AttributeValueList:e=>se_AttributeValueList(e,t),ComparisonOperator:[],Exists:[],Value:e=>se_AttributeValue(e,t)}),se_ExpressionAttributeValueMap=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>(null===i||(e[n]=se_AttributeValue(i,t)),e)),{}),se_FilterConditionMap=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>(null===i||(e[n]=se_Condition(i,t)),e)),{}),se_GetItemInput=(e,t)=>take(e,{AttributesToGet:_json,ConsistentRead:[],ExpressionAttributeNames:_json,Key:e=>se_Key(e,t),ProjectionExpression:[],ReturnConsumedCapacity:[],TableName:[]}),se_Key=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>(null===i||(e[n]=se_AttributeValue(i,t)),e)),{}),se_KeyConditions=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>(null===i||(e[n]=se_Condition(i,t)),e)),{}),se_ListAttributeValue=(e,t)=>e.filter((e=>null!=e)).map((e=>se_AttributeValue(e,t))),se_MapAttributeValue=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>(null===i||(e[n]=se_AttributeValue(i,t)),e)),{}),se_PutItemInput=(e,t)=>take(e,{ConditionExpression:[],ConditionalOperator:[],Expected:e=>se_ExpectedAttributeMap(e,t),ExpressionAttributeNames:_json,ExpressionAttributeValues:e=>se_ExpressionAttributeValueMap(e,t),Item:e=>se_PutItemInputAttributeMap(e,t),ReturnConsumedCapacity:[],ReturnItemCollectionMetrics:[],ReturnValues:[],ReturnValuesOnConditionCheckFailure:[],TableName:[]}),se_PutItemInputAttributeMap=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>(null===i||(e[n]=se_AttributeValue(i,t)),e)),{}),se_PutRequest=(e,t)=>take(e,{Item:e=>se_PutItemInputAttributeMap(e,t)}),se_QueryInput=(e,t)=>take(e,{AttributesToGet:_json,ConditionalOperator:[],ConsistentRead:[],ExclusiveStartKey:e=>se_Key(e,t),ExpressionAttributeNames:_json,ExpressionAttributeValues:e=>se_ExpressionAttributeValueMap(e,t),FilterExpression:[],IndexName:[],KeyConditionExpression:[],KeyConditions:e=>se_KeyConditions(e,t),Limit:[],ProjectionExpression:[],QueryFilter:e=>se_FilterConditionMap(e,t),ReturnConsumedCapacity:[],ScanIndexForward:[],Select:[],TableName:[]}),se_ScanInput=(e,t)=>take(e,{AttributesToGet:_json,ConditionalOperator:[],ConsistentRead:[],ExclusiveStartKey:e=>se_Key(e,t),ExpressionAttributeNames:_json,ExpressionAttributeValues:e=>se_ExpressionAttributeValueMap(e,t),FilterExpression:[],IndexName:[],Limit:[],ProjectionExpression:[],ReturnConsumedCapacity:[],ScanFilter:e=>se_FilterConditionMap(e,t),Segment:[],Select:[],TableName:[],TotalSegments:[]}),se_UpdateItemInput=(e,t)=>take(e,{AttributeUpdates:e=>se_AttributeUpdates(e,t),ConditionExpression:[],ConditionalOperator:[],Expected:e=>se_ExpectedAttributeMap(e,t),ExpressionAttributeNames:_json,ExpressionAttributeValues:e=>se_ExpressionAttributeValueMap(e,t),Key:e=>se_Key(e,t),ReturnConsumedCapacity:[],ReturnItemCollectionMetrics:[],ReturnValues:[],ReturnValuesOnConditionCheckFailure:[],TableName:[],UpdateExpression:[]}),se_WriteRequest=(e,t)=>take(e,{DeleteRequest:e=>se_DeleteRequest(e,t),PutRequest:e=>se_PutRequest(e,t)}),se_WriteRequests=(e,t)=>e.filter((e=>null!=e)).map((e=>se_WriteRequest(e,t))),de_AttributeMap=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>(null===i||(e[n]=de_AttributeValue(awsExpectUnion(i),t)),e)),{}),de_AttributeValue=(e,t)=>null!=e.B?{B:t.base64Decoder(e.B)}:void 0!==expectBoolean(e.BOOL)?{BOOL:expectBoolean(e.BOOL)}:null!=e.BS?{BS:de_BinarySetAttributeValue(e.BS,t)}:null!=e.L?{L:de_ListAttributeValue(e.L,t)}:null!=e.M?{M:de_MapAttributeValue(e.M,t)}:void 0!==expectString(e.N)?{N:expectString(e.N)}:null!=e.NS?{NS:_json(e.NS)}:void 0!==expectBoolean(e.NULL)?{NULL:expectBoolean(e.NULL)}:void 0!==expectString(e.S)?{S:expectString(e.S)}:null!=e.SS?{SS:_json(e.SS)}:{$unknown:Object.entries(e)[0]},de_BatchWriteItemOutput=(e,t)=>take(e,{ConsumedCapacity:e=>de_ConsumedCapacityMultiple(e),ItemCollectionMetrics:e=>de_ItemCollectionMetricsPerTable(e,t),UnprocessedItems:e=>de_BatchWriteItemRequestMap(e,t)}),de_BatchWriteItemRequestMap=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>(null===i||(e[n]=de_WriteRequests(i,t)),e)),{}),de_BinarySetAttributeValue=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>t.base64Decoder(e)));return n},de_CancellationReason=(e,t)=>take(e,{Code:expectString,Item:e=>de_AttributeMap(e,t),Message:expectString}),de_CancellationReasonList=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>de_CancellationReason(e,t)));return n},de_Capacity=(e,t)=>take(e,{CapacityUnits:limitedParseDouble,ReadCapacityUnits:limitedParseDouble,WriteCapacityUnits:limitedParseDouble}),de_ConditionalCheckFailedException=(e,t)=>take(e,{Item:e=>de_AttributeMap(e,t),message:expectString}),de_ConsumedCapacity=(e,t)=>take(e,{CapacityUnits:limitedParseDouble,GlobalSecondaryIndexes:e=>de_SecondaryIndexesCapacityMap(e),LocalSecondaryIndexes:e=>de_SecondaryIndexesCapacityMap(e),ReadCapacityUnits:limitedParseDouble,Table:e=>de_Capacity(e),TableName:expectString,WriteCapacityUnits:limitedParseDouble}),de_ConsumedCapacityMultiple=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>de_ConsumedCapacity(e)));return n},de_DeleteItemOutput=(e,t)=>take(e,{Attributes:e=>de_AttributeMap(e,t),ConsumedCapacity:e=>de_ConsumedCapacity(e),ItemCollectionMetrics:e=>de_ItemCollectionMetrics(e,t)}),de_DeleteRequest=(e,t)=>take(e,{Key:e=>de_Key(e,t)}),de_GetItemOutput=(e,t)=>take(e,{ConsumedCapacity:e=>de_ConsumedCapacity(e),Item:e=>de_AttributeMap(e,t)}),de_ItemCollectionKeyAttributeMap=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>(null===i||(e[n]=de_AttributeValue(awsExpectUnion(i),t)),e)),{}),de_ItemCollectionMetrics=(e,t)=>take(e,{ItemCollectionKey:e=>de_ItemCollectionKeyAttributeMap(e,t),SizeEstimateRangeGB:e=>de_ItemCollectionSizeEstimateRange(e)}),de_ItemCollectionMetricsMultiple=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>de_ItemCollectionMetrics(e,t)));return n},de_ItemCollectionMetricsPerTable=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>(null===i||(e[n]=de_ItemCollectionMetricsMultiple(i,t)),e)),{}),de_ItemCollectionSizeEstimateRange=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>limitedParseDouble(e)));return n},de_ItemList=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>de_AttributeMap(e,t)));return n},de_Key=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>(null===i||(e[n]=de_AttributeValue(awsExpectUnion(i),t)),e)),{}),de_ListAttributeValue=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>de_AttributeValue(awsExpectUnion(e),t)));return n},de_MapAttributeValue=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>(null===i||(e[n]=de_AttributeValue(awsExpectUnion(i),t)),e)),{}),de_PutItemInputAttributeMap=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>(null===i||(e[n]=de_AttributeValue(awsExpectUnion(i),t)),e)),{}),de_PutItemOutput=(e,t)=>take(e,{Attributes:e=>de_AttributeMap(e,t),ConsumedCapacity:e=>de_ConsumedCapacity(e),ItemCollectionMetrics:e=>de_ItemCollectionMetrics(e,t)}),de_PutRequest=(e,t)=>take(e,{Item:e=>de_PutItemInputAttributeMap(e,t)}),de_QueryOutput=(e,t)=>take(e,{ConsumedCapacity:e=>de_ConsumedCapacity(e),Count:expectInt32,Items:e=>de_ItemList(e,t),LastEvaluatedKey:e=>de_Key(e,t),ScannedCount:expectInt32}),de_ScanOutput=(e,t)=>take(e,{ConsumedCapacity:e=>de_ConsumedCapacity(e),Count:expectInt32,Items:e=>de_ItemList(e,t),LastEvaluatedKey:e=>de_Key(e,t),ScannedCount:expectInt32}),de_SecondaryIndexesCapacityMap=(e,t)=>Object.entries(e).reduce(((e,[t,n])=>(null===n||(e[t]=de_Capacity(n)),e)),{}),de_TransactionCanceledException=(e,t)=>take(e,{CancellationReasons:e=>de_CancellationReasonList(e,t),Message:expectString}),de_UpdateItemOutput=(e,t)=>take(e,{Attributes:e=>de_AttributeMap(e,t),ConsumedCapacity:e=>de_ConsumedCapacity(e),ItemCollectionMetrics:e=>de_ItemCollectionMetrics(e,t)}),de_WriteRequest=(e,t)=>take(e,{DeleteRequest:e=>de_DeleteRequest(e,t),PutRequest:e=>de_PutRequest(e,t)}),de_WriteRequests=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>de_WriteRequest(e,t)));return n},deserializeMetadata$3=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"]}),throwDefaultError$3=withBaseException(DynamoDBServiceException),buildHttpRpcRequest$2=async(e,t,n,i,r)=>{const{hostname:o,protocol:a="https",port:s,path:c}=await e.endpoint(),l={protocol:a,hostname:o,port:s,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:t};return void 0!==r&&(l.body=r),new HttpRequest(l)};function sharedHeaders$1(e){return{"content-type":"application/x-amz-json-1.0","x-amz-target":`DynamoDB_20120810.${e}`}}class DescribeEndpointsCommand extends(Command.classBuilder().ep(commonParams$3).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("DynamoDB_20120810","DescribeEndpoints",{}).n("DynamoDBClient","DescribeEndpointsCommand").f(void 0,void 0).ser(se_DescribeEndpointsCommand).de(de_DescribeEndpointsCommand).build()){}const name$5="@aws-sdk/client-dynamodb",description$5="AWS SDK for JavaScript Dynamodb Client for Node.js, Browser and React Native",version$7="3.696.0",scripts$5={build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-dynamodb","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo dynamodb"},main$5="./dist-cjs/index.js",types$4="./dist-types/index.d.ts",module$3="./dist-es/index.js",sideEffects$3=!1,dependencies$4={"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.696.0","@aws-sdk/client-sts":"3.696.0","@aws-sdk/core":"3.696.0","@aws-sdk/credential-provider-node":"3.696.0","@aws-sdk/middleware-endpoint-discovery":"3.696.0","@aws-sdk/middleware-host-header":"3.696.0","@aws-sdk/middleware-logger":"3.696.0","@aws-sdk/middleware-recursion-detection":"3.696.0","@aws-sdk/middleware-user-agent":"3.696.0","@aws-sdk/region-config-resolver":"3.696.0","@aws-sdk/types":"3.696.0","@aws-sdk/util-endpoints":"3.696.0","@aws-sdk/util-user-agent-browser":"3.696.0","@aws-sdk/util-user-agent-node":"3.696.0","@smithy/config-resolver":"^3.0.12","@smithy/core":"^2.5.3","@smithy/fetch-http-handler":"^4.1.1","@smithy/hash-node":"^3.0.10","@smithy/invalid-dependency":"^3.0.10","@smithy/middleware-content-length":"^3.0.12","@smithy/middleware-endpoint":"^3.2.3","@smithy/middleware-retry":"^3.0.27","@smithy/middleware-serde":"^3.0.10","@smithy/middleware-stack":"^3.0.10","@smithy/node-config-provider":"^3.1.11","@smithy/node-http-handler":"^3.3.1","@smithy/protocol-http":"^4.1.7","@smithy/smithy-client":"^3.4.4","@smithy/types":"^3.7.1","@smithy/url-parser":"^3.0.10","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.27","@smithy/util-defaults-mode-node":"^3.0.27","@smithy/util-endpoints":"^2.1.6","@smithy/util-middleware":"^3.0.10","@smithy/util-retry":"^3.0.10","@smithy/util-utf8":"^3.0.0","@smithy/util-waiter":"^3.1.9","@types/uuid":"^9.0.1",tslib:"^2.6.2",uuid:"^9.0.1"},devDependencies$5={"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines$5={node:">=16.0.0"},typesVersions$3={"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files$3=["dist-*/**"],author$5={name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license$5="Apache-2.0",browser$7={"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},homepage$4="https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-dynamodb",repository$5={type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-dynamodb"};var packageInfo$3={name:name$5,description:description$5,version:version$7,scripts:scripts$5,main:main$5,types:types$4,module:module$3,sideEffects:sideEffects$3,dependencies:dependencies$4,devDependencies:devDependencies$5,engines:engines$5,typesVersions:typesVersions$3,files:files$3,author:author$5,license:license$5,browser:browser$7,"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:homepage$4,repository:repository$5};const fromUtf8$1=e=>(new TextEncoder).encode(e);var fromUtf8="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:fromUtf8$1;function convertToBuffer(e){return e instanceof Uint8Array?e:"string"==typeof e?fromUtf8(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function isEmptyData(e){return"string"==typeof e?0===e.length:0===e.byteLength}function uint32ArrayFrom(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n<e.length;)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}var SHA_256_HASH={name:"SHA-256"},SHA_256_HMAC_ALGO={name:"HMAC",hash:SHA_256_HASH},EMPTY_DATA_SHA_256=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 fallbackWindow={};function locateWindow(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:fallbackWindow}var Sha256$2=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!isEmptyData(e)){var t=convertToBuffer(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 locateWindow().crypto.subtle.sign(SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):isEmptyData(this.toHash)?Promise.resolve(EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return locateWindow().crypto.subtle.digest(SHA_256_HASH,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){locateWindow().crypto.subtle.importKey("raw",convertToBuffer(e.secret),SHA_256_HMAC_ALGO,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))},e}();function __awaiter(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{c(i.next(e))}catch(e){o(e)}}function s(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(a,s)}c((i=i.apply(e,t||[])).next())}))}function __generator(e,t){var n,i,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}function __values(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}"function"==typeof SuppressedError&&SuppressedError;var BLOCK_SIZE=64,DIGEST_LENGTH=32,KEY=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]),INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],MAX_HASHABLE_LENGTH=Math.pow(2,53)-1,RawSha256=function(){function e(){this.state=Int32Array.from(INIT),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>MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===BLOCK_SIZE&&(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%BLOCK_SIZE>=BLOCK_SIZE-8){for(var i=this.bufferLength;i<BLOCK_SIZE;i++)t.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(i=this.bufferLength;i<BLOCK_SIZE-8;i++)t.setUint8(i,0);t.setUint32(BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var r=new Uint8Array(DIGEST_LENGTH);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],a=t[4],s=t[5],c=t[6],l=t[7],d=0;d<BLOCK_SIZE;d++){if(d<16)this.temp[d]=(255&e[4*d])<<24|(255&e[4*d+1])<<16|(255&e[4*d+2])<<8|255&e[4*d+3];else{var u=this.temp[d-2],p=(u>>>17|u<<15)^(u>>>19|u<<13)^u>>>10,m=((u=this.temp[d-15])>>>7|u<<25)^(u>>>18|u<<14)^u>>>3;this.temp[d]=(p+this.temp[d-7]|0)+(m+this.temp[d-16]|0)}var h=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&s^~a&c)|0)+(l+(KEY[d]+this.temp[d]|0)|0)|0,f=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&i^n&r^i&r)|0;l=c,c=s,s=a,a=o+h|0,o=r,r=i,i=n,n=h+f|0}t[0]+=n,t[1]+=i,t[2]+=r,t[3]+=o,t[4]+=a,t[5]+=s,t[6]+=c,t[7]+=l},e}(),Sha256$1=function(){function e(e){this.secret=e,this.hash=new RawSha256,this.reset()}return e.prototype.update=function(e){if(!isEmptyData(e)&&!this.error)try{this.hash.update(convertToBuffer(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 __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.digestSync()]}))}))},e.prototype.reset=function(){if(this.hash=new RawSha256,this.secret){this.outer=new RawSha256;var e=bufferFromSecret(this.secret),t=new Uint8Array(BLOCK_SIZE);t.set(e);for(var n=0;n<BLOCK_SIZE;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}();function bufferFromSecret(e){var t=convertToBuffer(e);if(t.byteLength>BLOCK_SIZE){var n=new RawSha256;n.update(t),t=n.digest()}var i=new Uint8Array(BLOCK_SIZE);return i.set(t),i}var subtleCryptoMethods=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function supportsWebCrypto(e){return!(!supportsSecureRandom(e)||"object"!=typeof e.crypto.subtle)&&supportsSubtleCrypto(e.crypto.subtle)}function supportsSecureRandom(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function supportsSubtleCrypto(e){return e&&subtleCryptoMethods.every((function(t){return"function"==typeof e[t]}))}var Sha256=function(){function e(e){supportsWebCrypto(locateWindow())?this.hash=new Sha256$2(e):this.hash=new Sha256$1(e)}return e.prototype.update=function(e,t){this.hash.update(convertToBuffer(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),es5$1={exports:{}},es5=es5$1.exports,hasRequiredEs5;function requireEs5(){return hasRequiredEs5||(hasRequiredEs5=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),a=Math.max(r,o),s=0,c=e.map([t,n],(function(t){var n=a-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&&(s=a-Math.min(r,o)),a-=1;a>=s;){if(c[0][a]>c[1][a])return 1;if(c[0][a]===c[1][a]){if(a===s)return 0;a-=1}else if(c[0][a]<c[1][a])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),a=1;a<r;a++)o[a-1]=arguments[a];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var s=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)s();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 a(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 s=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)&&a(t.prototype,n),i&&a(t,i),e}();t.default=s,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)),a=c(n(95)),s=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var l=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=s.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=s.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=s.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=s.default.find(a.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 s.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 a=e[t];"string"==typeof a?(r[t]=a,o+=1):"object"==typeof a&&(n[t]=a,i+=1)})),i>0){var a=Object.keys(n),c=s.default.find(a,(function(e){return t.isOS(e)}));if(c){var l=this.satisfies(n[c]);if(void 0!==l)return l}var d=s.default.find(a,(function(e){return t.isPlatform(e)}));if(d){var u=this.satisfies(n[d]);if(void 0!==u)return u}}if(o>0){var p=Object.keys(r),m=s.default.find(p,(function(e){return t.isBrowser(e,!0)}));if(void 0!==m)return this.compareVersion(r[m])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),i=e.toLowerCase(),r=s.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(s.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=l,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,a=[{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=a,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),a=[{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=a,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),a=[{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=a,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),a=[{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=a,e.exports=t.default}})}(es5$1)),es5$1.exports}var es5Exports=requireEs5(),bowser=getDefaultExportFromCjs(es5Exports);const createDefaultUserAgentProvider$1=({serviceId:e,clientVersion:t})=>async n=>{const i="undefined"!=typeof window&&window?.navigator?.userAgent?bowser.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},invalidProvider=e=>()=>Promise.reject(e),TEXT_ENCODER="function"==typeof TextEncoder?new TextEncoder:null,calculateBodyLength=e=>{if("string"==typeof e){if(TEXT_ENCODER)return TEXT_ENCODER.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}`)},H="required",I="type",J="fn",K="argv",L="ref",M="url",N="properties",O="headers",a$3=!1,b$3="isSet",c$3="error",d$3="endpoint",e$3="tree",f$3="PartitionResult",g$3="stringEquals",h$3="not",i$3={[H]:!1,[I]:"String"},j$3={[H]:!0,default:!1,[I]:"Boolean"},k$3={[J]:"booleanEquals",[K]:[{[L]:"UseFIPS"},!0]},l$3={[J]:"booleanEquals",[K]:[{[L]:"UseDualStack"},!0]},m$3={},n$3={[L]:"Region"},o$3={[J]:b$3,[K]:[{[L]:"AccountIdEndpointMode"}]},p$3={[L]:"AccountIdEndpointMode"},q$3={[J]:b$3,[K]:[{[L]:"AccountId"}]},r$3={[L]:"AccountId"},s$3={[J]:g$3,[K]:[{[J]:"getAttr",[K]:[{[L]:f$3},"name"]},"aws"]},t$3={[J]:"getAttr",[K]:[{[L]:f$3},"name"]},u$3={[J]:h$3,[K]:[k$3]},v$3={[J]:h$3,[K]:[l$3]},w$1={[J]:"booleanEquals",[K]:[{[J]:"getAttr",[K]:[{[L]:f$3},"supportsFIPS"]},!0]},x$1={[J]:"booleanEquals",[K]:[{[J]:"getAttr",[K]:[{[L]:f$3},"supportsDualStack"]},!0]},y={[M]:"https://dynamodb-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[N]:{},[O]:{}},z={conditions:[o$3,{[J]:g$3,[K]:[p$3,"disabled"]}],[d$3]:{[M]:"https://dynamodb.{Region}.{PartitionResult#dnsSuffix}",[N]:{},[O]:{}},[I]:d$3},A={[d$3]:{[M]:"https://dynamodb.{Region}.{PartitionResult#dnsSuffix}",[N]:{},[O]:{}},[I]:d$3},B={[M]:"https://dynamodb-fips.{Region}.{PartitionResult#dnsSuffix}",[N]:{},[O]:{}},C={[M]:"https://dynamodb.{Region}.{PartitionResult#dualStackDnsSuffix}",[N]:{},[O]:{}},D=[k$3],E=[l$3],F=[n$3],G=[o$3,{[J]:g$3,[K]:[p$3,"disabled"]}],_data$3={version:"1.0",parameters:{Region:i$3,UseDualStack:j$3,UseFIPS:j$3,Endpoint:i$3,AccountId:i$3,AccountIdEndpointMode:i$3},rules:[{conditions:[{[J]:b$3,[K]:[{[L]:"Endpoint"}]}],rules:[{conditions:D,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[I]:c$3},{conditions:E,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[I]:c$3},{endpoint:{[M]:"{Endpoint}",[N]:m$3,[O]:m$3},[I]:d$3}],[I]:e$3},{conditions:[{[J]:b$3,[K]:F}],rules:[{conditions:[{[J]:"aws.partition",[K]:F,assign:f$3}],rules:[{conditions:[{[J]:g$3,[K]:[n$3,"local"]}],rules:[{conditions:D,error:"Invalid Configuration: FIPS and local endpoint are not supported",[I]:c$3},{conditions:E,error:"Invalid Configuration: Dualstack and local endpoint are not supported",[I]:c$3},{endpoint:{[M]:"http://localhost:8000",[N]:{authSchemes:[{name:"sigv4",signingName:"dynamodb",signingRegion:"us-east-1"}]},[O]:m$3},[I]:d$3}],[I]:e$3},{conditions:[o$3,{[J]:g$3,[K]:[p$3,"required"]},{[J]:h$3,[K]:[q$3]}],error:"AccountIdEndpointMode is required but no AccountID was provided or able to be loaded.",[I]:c$3},{conditions:[q$3,s$3,u$3,v$3,{[J]:h$3,[K]:[{[J]:"isValidHostLabel",[K]:[r$3,a$3]}]}],error:"Credentials-sourced account ID parameter is invalid",[I]:c$3},{conditions:[k$3,l$3],rules:[{conditions:[w$1,x$1],rules:[{conditions:G,endpoint:y,[I]:d$3},{endpoint:y,[I]:d$3}],[I]:e$3},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[I]:c$3}],[I]:e$3},{conditions:D,rules:[{conditions:[w$1],rules:[{conditions:[{[J]:g$3,[K]:[t$3,"aws-us-gov"]}],rules:[z,A],[I]:e$3},{conditions:G,endpoint:B,[I]:d$3},{endpoint:B,[I]:d$3}],[I]:e$3},{error:"FIPS is enabled but this partition does not support FIPS",[I]:c$3}],[I]:e$3},{conditions:E,rules:[{conditions:[x$1],rules:[{conditions:G,endpoint:C,[I]:d$3},{endpoint:C,[I]:d$3}],[I]:e$3},{error:"DualStack is enabled but this partition does not support DualStack",[I]:c$3}],[I]:e$3},z,{conditions:[q$3,s$3,u$3,v$3],endpoint:{[M]:"https://{AccountId}.ddb.{Region}.{PartitionResult#dnsSuffix}",[N]:m$3,[O]:m$3},[I]:d$3},A],[I]:e$3}],[I]:e$3},{error:"Invalid Configuration: Missing Region",[I]:c$3}]},ruleSet$3=_data$3,cache$3=new EndpointCache({size:50,params:["AccountId","AccountIdEndpointMode","Endpoint","Region","UseDualStack","UseFIPS"]}),defaultEndpointResolver$3=(e,t={})=>cache$3.get(e,(()=>resolveEndpoint(ruleSet$3,{endpointParams:e,logger:t.logger})));customEndpointFunctions.aws=awsEndpointFunctions$1;const getRuntimeConfig$7=e=>({apiVersion:"2012-08-10",base64Decoder:e?.base64Decoder??fromBase64,base64Encoder:e?.base64Encoder??toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??defaultEndpointResolver$3,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??defaultDynamoDBHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new AwsSdkSigV4Signer$1}],logger:e?.logger??new NoOpLogger,serviceId:e?.serviceId??"DynamoDB",urlParser:e?.urlParser??parseUrl,utf8Decoder:e?.utf8Decoder??fromUtf8$2,utf8Encoder:e?.utf8Encoder??toUtf8}),DEFAULTS_MODE_OPTIONS=["in-region","cross-region","mobile","standard","legacy"],resolveDefaultsModeConfig=({defaultsMode:e}={})=>memoize((async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(isMobileBrowser()?"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 ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${t}`)}})),isMobileBrowser=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?bowser.parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},getRuntimeConfig$6=e=>{const t=resolveDefaultsModeConfig(e),n=()=>t().then(loadConfigsForDefaultMode),i=getRuntimeConfig$7(e);return{...i,...e,runtime:"browser",defaultsMode:t,accountIdEndpointMode:e?.accountIdEndpointMode??(()=>Promise.resolve(DEFAULT_ACCOUNT_ID_ENDPOINT_MODE)),bodyLengthChecker:e?.bodyLengthChecker??calculateBodyLength,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??createDefaultUserAgentProvider$1({serviceId:i.serviceId,clientVersion:packageInfo$3.version}),endpointDiscoveryEnabledProvider:e?.endpointDiscoveryEnabledProvider??(()=>Promise.resolve(void 0)),maxAttempts:e?.maxAttempts??DEFAULT_MAX_ATTEMPTS,region:e?.region??invalidProvider("Region is missing"),requestHandler:FetchHttpHandler.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||DEFAULT_RETRY_MODE),sha256:e?.sha256??Sha256,streamCollector:e?.streamCollector??streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT))}},getAwsRegionExtensionConfiguration$1=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}},resolveAwsRegionExtensionConfiguration$1=e=>({region:e.region()}),getHttpAuthExtensionConfiguration$3=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}},resolveHttpAuthRuntimeConfig$3=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),asPartial$3=e=>e,resolveRuntimeExtensions$3=(e,t)=>{const n={...asPartial$3(getAwsRegionExtensionConfiguration$1(e)),...asPartial$3(getDefaultExtensionConfiguration(e)),...asPartial$3(getHttpHandlerExtensionConfiguration(e)),...asPartial$3(getHttpAuthExtensionConfiguration$3(e))};return t.forEach((e=>e.configure(n))),{...e,...resolveAwsRegionExtensionConfiguration$1(n),...resolveDefaultRuntimeConfig(n),...resolveHttpHandlerRuntimeConfig(n),...resolveHttpAuthRuntimeConfig$3(n)}};class DynamoDBClient extends Client{constructor(...[e]){const t=getRuntimeConfig$6(e||{}),n=resolveClientEndpointParameters$3(t),i=resolveUserAgentConfig$1(resolveAccountIdEndpointModeConfig(n)),r=resolveRetryConfig(i),o=resolveHostHeaderConfig$1(resolveRegionConfig(r)),a=resolveEndpointConfig(o),s=resolveHttpAuthSchemeConfig$3(a),c=resolveEndpointDiscoveryConfig(s,{endpointDiscoveryCommandCtor:DescribeEndpointsCommand}),l=resolveRuntimeExtensions$3(c,e?.extensions||[]);super(l),this.config=l,this.middlewareStack.use(getUserAgentPlugin$1(this.config)),this.middlewareStack.use(getRetryPlugin(this.config)),this.middlewareStack.use(getContentLengthPlugin(this.config)),this.middlewareStack.use(getHostHeaderPlugin$1(this.config)),this.middlewareStack.use(getLoggerPlugin$1(this.config)),this.middlewareStack.use(getRecursionDetectionPlugin$1(this.config)),this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:defaultDynamoDBHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async e=>new DefaultIdentityProviderConfig({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class BatchWriteItemCommand extends(Command.classBuilder().ep(commonParams$3).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("DynamoDB_20120810","BatchWriteItem",{}).n("DynamoDBClient","BatchWriteItemCommand").f(void 0,void 0).ser(se_BatchWriteItemCommand).de(de_BatchWriteItemCommand).build()){}class DeleteItemCommand extends(Command.classBuilder().ep(commonParams$3).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("DynamoDB_20120810","DeleteItem",{}).n("DynamoDBClient","DeleteItemCommand").f(void 0,void 0).ser(se_DeleteItemCommand).de(de_DeleteItemCommand).build()){}class GetItemCommand extends(Command.classBuilder().ep(commonParams$3).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("DynamoDB_20120810","GetItem",{}).n("DynamoDBClient","GetItemCommand").f(void 0,void 0).ser(se_GetItemCommand).de(de_GetItemCommand).build()){}class PutItemCommand extends(Command.classBuilder().ep(commonParams$3).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("DynamoDB_20120810","PutItem",{}).n("DynamoDBClient","PutItemCommand").f(void 0,void 0).ser(se_PutItemCommand).de(de_PutItemCommand).build()){}let QueryCommand$1=class extends(Command.classBuilder().ep(commonParams$3).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("DynamoDB_20120810","Query",{}).n("DynamoDBClient","QueryCommand").f(void 0,void 0).ser(se_QueryCommand).de(de_QueryCommand).build()){},ScanCommand$1=class extends(Command.classBuilder().ep(commonParams$3).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("DynamoDB_20120810","Scan",{}).n("DynamoDBClient","ScanCommand").f(void 0,void 0).ser(se_ScanCommand).de(de_ScanCommand).build()){};class UpdateItemCommand extends(Command.classBuilder().ep(commonParams$3).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("DynamoDB_20120810","UpdateItem",{}).n("DynamoDBClient","UpdateItemCommand").f(void 0,void 0).ser(se_UpdateItemCommand).de(de_UpdateItemCommand).build()){}const sleep=e=>new Promise((t=>setTimeout(t,1e3*e))),waiterServiceDefaults={minDelay:2,maxDelay:120};var WaiterState;!function(e){e.ABORTED="ABORTED",e.FAILURE="FAILURE",e.SUCCESS="SUCCESS",e.RETRY="RETRY",e.TIMEOUT="TIMEOUT"}(WaiterState||(WaiterState={}));const checkExceptions=e=>{if(e.state===WaiterState.ABORTED){const t=new Error(`${JSON.stringify({...e,reason:"Request was aborted"})}`);throw t.name="AbortError",t}if(e.state===WaiterState.TIMEOUT){const t=new Error(`${JSON.stringify({...e,reason:"Waiter has timed out"})}`);throw t.name="TimeoutError",t}if(e.state!==WaiterState.SUCCESS)throw new Error(`${JSON.stringify(e)}`);return e},exponentialBackoffWithJitter=(e,t,n,i)=>{if(i>n)return t;return randomInRange(e,e*2**(i-1))},randomInRange=(e,t)=>e+Math.random()*(t-e),runPolling=async({minDelay:e,maxDelay:t,maxWaitTime:n,abortController:i,client:r,abortSignal:o},a,s)=>{const{state:c,reason:l}=await s(r,a);if(c!==WaiterState.RETRY)return{state:c,reason:l};let d=1;const u=Date.now()+1e3*n,p=Math.log(t/e)/Math.log(2)+1;for(;;){if(i?.signal?.aborted||o?.aborted)return{state:WaiterState.ABORTED};const n=exponentialBackoffWithJitter(e,t,p,d);if(Date.now()+1e3*n>u)return{state:WaiterState.TIMEOUT};await sleep(n);const{state:c,reason:l}=await s(r,a);if(c!==WaiterState.RETRY)return{state:c,reason:l};d+=1}},validateWaiterOptions=e=>{if(e.maxWaitTime<1)throw new Error("WaiterConfiguration.maxWaitTime must be greater than 0");if(e.minDelay<1)throw new Error("WaiterConfiguration.minDelay must be greater than 0");if(e.maxDelay<1)throw new Error("WaiterConfiguration.maxDelay must be greater than 0");if(e.maxWaitTime<=e.minDelay)throw new Error(`WaiterConfiguration.maxWaitTime [${e.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`);if(e.maxDelay<e.minDelay)throw new Error(`WaiterConfiguration.maxDelay [${e.maxDelay}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`)},abortTimeout=async e=>new Promise((t=>{const n=()=>t({state:WaiterState.ABORTED});"function"==typeof e.addEventListener?e.addEventListener("abort",n):e.onabort=n})),createWaiter=async(e,t,n)=>{const i={...waiterServiceDefaults,...e};validateWaiterOptions(i);const r=[runPolling(i,t,n)];return e.abortController&&r.push(abortTimeout(e.abortController.signal)),e.abortSignal&&r.push(abortTimeout(e.abortSignal)),Promise.race(r)};function setFeature$1(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}class NumberValue{constructor(e){this.value=String("object"==typeof e&&"N"in e?e.N:e);const t="number"==typeof e.valueOf()?e.valueOf():0;if(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER||Math.abs(t)===1/0||Number.isNaN(t))throw new Error(`NumberValue should not be initialized with an imprecise number=${t}. Use a string instead.`)}static from(e){return new NumberValue(e)}toAttributeValue(){return{N:this.toString()}}toBigInt(){const e=this.toString();return BigInt(e)}toString(){return String(this.value)}valueOf(){return this.toString()}}const convertToAttr=(e,t)=>{if(void 0===e)throw new Error("Pass options.removeUndefinedValues=true to remove undefined values from map/array/set.");if(null===e&&"object"==typeof e)return convertToNullAttr();if(Array.isArray(e))return convertToListAttr(e,t);if("Set"===e?.constructor?.name)return convertToSetAttr(e,t);if("Map"===e?.constructor?.name)return convertToMapAttrFromIterable(e,t);if("Object"===e?.constructor?.name||!e.constructor&&"object"==typeof e)return convertToMapAttrFromEnumerableProps(e,t);if(isBinary(e))return 0===e.length&&t?.convertEmptyValues?convertToNullAttr():convertToBinaryAttr(e);if("boolean"==typeof e||"Boolean"===e?.constructor?.name)return{BOOL:e.valueOf()};if("number"==typeof e||"Number"===e?.constructor?.name)return convertToNumberAttr(e,t);if(e instanceof NumberValue)return e.toAttributeValue();if("bigint"==typeof e)return convertToBigIntAttr(e);if("string"==typeof e||"String"===e?.constructor?.name)return 0===e.length&&t?.convertEmptyValues?convertToNullAttr():convertToStringAttr(e);if(t?.convertClassInstanceToMap&&"object"==typeof e)return convertToMapAttrFromEnumerableProps(e,t);throw new Error(`Unsupported type passed: ${e}. Pass options.convertClassInstanceToMap=true to marshall typeof object as map attribute.`)},convertToListAttr=(e,t)=>({L:e.filter((e=>"function"!=typeof e&&(!t?.removeUndefinedValues||t?.removeUndefinedValues&&void 0!==e))).map((e=>convertToAttr(e,t)))}),convertToSetAttr=(e,t)=>{const n=t?.removeUndefinedValues?new Set([...e].filter((e=>void 0!==e))):e;if(!t?.removeUndefinedValues&&n.has(void 0))throw new Error("Pass options.removeUndefinedValues=true to remove undefined values from map/array/set.");if(0===n.size){if(t?.convertEmptyValues)return convertToNullAttr();throw new Error("Pass a non-empty set, or options.convertEmptyValues=true.")}const i=n.values().next().value;if(i instanceof NumberValue)return{NS:Array.from(n).map((e=>e.toString()))};if("number"==typeof i)return{NS:Array.from(n).map((e=>convertToNumberAttr(e,t))).map((e=>e.N))};if("bigint"==typeof i)return{NS:Array.from(n).map(convertToBigIntAttr).map((e=>e.N))};if("string"==typeof i)return{SS:Array.from(n).map(convertToStringAttr).map((e=>e.S))};if(isBinary(i))return{BS:Array.from(n).map(convertToBinaryAttr).map((e=>e.B))};throw new Error("Only Number Set (NS), Binary Set (BS) or String Set (SS) are allowed.")},convertToMapAttrFromIterable=(e,t)=>({M:(e=>{const n={};for(const[i,r]of e)"function"==typeof r||void 0===r&&t?.removeUndefinedValues||(n[i]=convertToAttr(r,t));return n})(e)}),convertToMapAttrFromEnumerableProps=(e,t)=>({M:(e=>{const n={};for(const i in e){const r=e[i];"function"==typeof r||void 0===r&&t?.removeUndefinedValues||(n[i]=convertToAttr(r,t))}return n})(e)}),convertToNullAttr=()=>({NULL:!0}),convertToBinaryAttr=e=>({B:e}),convertToStringAttr=e=>({S:e.toString()}),convertToBigIntAttr=e=>({N:e.toString()}),validateBigIntAndThrow=e=>{throw new Error(`${e} Use NumberValue from @aws-sdk/lib-dynamodb.`)},convertToNumberAttr=(e,t)=>{if([Number.NaN,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY].map((e=>e.toString())).includes(e.toString()))throw new Error(`Special numeric value ${e.toString()} is not allowed`);return t?.allowImpreciseNumbers||(e>Number.MAX_SAFE_INTEGER?validateBigIntAndThrow(`Number ${e.toString()} is greater than Number.MAX_SAFE_INTEGER.`):e<Number.MIN_SAFE_INTEGER&&validateBigIntAndThrow(`Number ${e.toString()} is lesser than Number.MIN_SAFE_INTEGER.`)),{N:e.toString()}},isBinary=e=>{const t=["ArrayBuffer","Blob","Buffer","DataView","File","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];return!!e?.constructor&&t.includes(e.constructor.name)},convertToNative=(e,t)=>{for(const[n,i]of Object.entries(e))if(void 0!==i)switch(n){case"NULL":return null;case"BOOL":return Boolean(i);case"N":return convertNumber(i,t);case"B":return convertBinary(i);case"S":return convertString(i);case"L":return convertList(i,t);case"M":return convertMap(i,t);case"NS":return new Set(i.map((e=>convertNumber(e,t))));case"BS":return new Set(i.map(convertBinary));case"SS":return new Set(i.map(convertString));default:throw new Error(`Unsupported type passed: ${n}`)}throw new Error(`No value defined: ${JSON.stringify(e)}`)},convertNumber=(e,t)=>{if("function"==typeof t?.wrapNumbers)return t?.wrapNumbers(e);if(t?.wrapNumbers)return NumberValue.from(e);const n=Number(e),i=[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];if((n>Number.MAX_SAFE_INTEGER||n<Number.MIN_SAFE_INTEGER)&&!i.includes(n)){if("function"!=typeof BigInt)throw new Error(`${e} is outside SAFE_INTEGER bounds. Set options.wrapNumbers to get string value.`);try{return BigInt(e)}catch(t){throw new Error(`${e} can't be converted to BigInt. Set options.wrapNumbers to get string value.`)}}return n},convertString=e=>e,convertBinary=e=>e,convertList=(e,t)=>e.map((e=>convertToNative(e,t))),convertMap=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>(e[n]=convertToNative(i,t),e)),{});function marshall(e,t){const n=convertToAttr(e,t),[i,r]=Object.entries(n)[0];switch(i){case"M":case"L":return t?.convertTopLevelContainer?n:r;default:return n}}const unmarshall=(e,t)=>convertToNative(t?.convertWithoutMapWrapper?e:{M:e},t),SELF=null,ALL_VALUES={},ALL_MEMBERS=[],NEXT_LEVEL="*",processObj=(e,t,n)=>{if(void 0!==e){if(null==n)return t(e);{const i=Object.keys(n),r=1===i.length&&i[0]===NEXT_LEVEL,o=i.length>=1&&!r,a=0===i.length;if(o)return processKeysInObj(e,t,n);if(a)return processAllKeysInObj(e,t,SELF);if(r)return Object.entries(e??{}).reduce(((e,[i,r])=>("function"!=typeof r&&(e[i]=processObj(r,t,n[NEXT_LEVEL])),e)),Array.isArray(e)?[]:{})}}},processKeysInObj=(e,t,n)=>{let i;if(Array.isArray(e))i=e.filter((e=>"function"!=typeof e));else{i={};for(const[t,n]of Object.entries(e))"function"!=typeof n&&(i[t]=n)}for(const[r,o]of Object.entries(n)){if("function"==typeof e[r])continue;const n=processObj(e[r],t,o);void 0!==n&&"function"!=typeof n&&(i[r]=n)}return i},processAllKeysInObj=(e,t,n)=>Array.isArray(e)?e.filter((e=>"function"!=typeof e)).map((e=>processObj(e,t,n))):Object.entries(e).reduce(((e,[i,r])=>{if("function"==typeof r)return e;const o=processObj(r,t,n);return void 0!==o&&"function"!=typeof o&&(e[i]=o),e}),{}),marshallInput=(e,t,n)=>processKeysInObj(e,(e=>marshall(e,n)),t),unmarshallOutput=(e,t,n)=>processKeysInObj(e,(e=>unmarshall(e,n)),t);class DynamoDBDocumentClientCommand extends Command{addMarshallingMiddleware(e){const{marshallOptions:t={},unmarshallOptions:n={}}=e.translateConfig||{};t.convertTopLevelContainer=t.convertTopLevelContainer??!0,n.convertWithoutMapWrapper=n.convertWithoutMapWrapper??!0,this.clientCommand.middlewareStack.addRelativeTo(((e,n)=>async i=>{setFeature$1(n,"DDB_MAPPER","d"),i.input=marshallInput(this.input,this.inputKeyNodes,t),n.dynamoDbDocumentClientOptions=n.dynamoDbDocumentClientOptions||DynamoDBDocumentClientCommand.defaultLogFilterOverrides;const r=i.input;return n.dynamoDbDocumentClientOptions.overrideInputFilterSensitiveLog=()=>n.inputFilterSensitiveLog?.(r),e(i)}),{name:"DocumentMarshall",relation:"before",toMiddleware:"serializerMiddleware",override:!0}),this.clientCommand.middlewareStack.addRelativeTo(((e,t)=>async i=>{const r=await e(i),o=r.output;return t.dynamoDbDocumentClientOptions=t.dynamoDbDocumentClientOptions||DynamoDBDocumentClientCommand.defaultLogFilterOverrides,t.dynamoDbDocumentClientOptions.overrideOutputFilterSensitiveLog=()=>t.outputFilterSensitiveLog?.(o),r.output=unmarshallOutput(r.output,this.outputKeyNodes,n),r}),{name:"DocumentUnmarshall",relation:"before",toMiddleware:"deserializerMiddleware",override:!0})}}DynamoDBDocumentClientCommand.defaultLogFilterOverrides={overrideInputFilterSensitiveLog(...e){},overrideOutputFilterSensitiveLog(...e){}};class BatchWriteCommand extends DynamoDBDocumentClientCommand{constructor(e){super(),this.input=e,this.inputKeyNodes={RequestItems:{"*":{"*":{PutRequest:{Item:ALL_VALUES},DeleteRequest:{Key:ALL_VALUES}}}}},this.outputKeyNodes={UnprocessedItems:{"*":{"*":{PutRequest:{Item:ALL_VALUES},DeleteRequest:{Key:ALL_VALUES}}}},ItemCollectionMetrics:{"*":{"*":{ItemCollectionKey:ALL_VALUES}}}},this.clientCommand=new BatchWriteItemCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(e,t,n){this.addMarshallingMiddleware(t);const i=e.concat(this.middlewareStack),r=this.clientCommand.resolveMiddleware(i,t,n);return async()=>r(this.clientCommand)}}class DeleteCommand extends DynamoDBDocumentClientCommand{constructor(e){super(),this.input=e,this.inputKeyNodes={Key:ALL_VALUES,Expected:{"*":{Value:SELF,AttributeValueList:ALL_MEMBERS}},ExpressionAttributeValues:ALL_VALUES},this.outputKeyNodes={Attributes:ALL_VALUES,ItemCollectionMetrics:{ItemCollectionKey:ALL_VALUES}},this.clientCommand=new DeleteItemCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(e,t,n){this.addMarshallingMiddleware(t);const i=e.concat(this.middlewareStack),r=this.clientCommand.resolveMiddleware(i,t,n);return async()=>r(this.clientCommand)}}class GetCommand extends DynamoDBDocumentClientCommand{constructor(e){super(),this.input=e,this.inputKeyNodes={Key:ALL_VALUES},this.outputKeyNodes={Item:ALL_VALUES},this.clientCommand=new GetItemCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(e,t,n){this.addMarshallingMiddleware(t);const i=e.concat(this.middlewareStack),r=this.clientCommand.resolveMiddleware(i,t,n);return async()=>r(this.clientCommand)}}class PutCommand extends DynamoDBDocumentClientCommand{constructor(e){super(),this.input=e,this.inputKeyNodes={Item:ALL_VALUES,Expected:{"*":{Value:SELF,AttributeValueList:ALL_MEMBERS}},ExpressionAttributeValues:ALL_VALUES},this.outputKeyNodes={Attributes:ALL_VALUES,ItemCollectionMetrics:{ItemCollectionKey:ALL_VALUES}},this.clientCommand=new PutItemCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(e,t,n){this.addMarshallingMiddleware(t);const i=e.concat(this.middlewareStack),r=this.clientCommand.resolveMiddleware(i,t,n);return async()=>r(this.clientCommand)}}class QueryCommand extends DynamoDBDocumentClientCommand{constructor(e){super(),this.input=e,this.inputKeyNodes={KeyConditions:{"*":{AttributeValueList:ALL_MEMBERS}},QueryFilter:{"*":{AttributeValueList:ALL_MEMBERS}},ExclusiveStartKey:ALL_VALUES,ExpressionAttributeValues:ALL_VALUES},this.outputKeyNodes={Items:{"*":ALL_VALUES},LastEvaluatedKey:ALL_VALUES},this.clientCommand=new QueryCommand$1(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(e,t,n){this.addMarshallingMiddleware(t);const i=e.concat(this.middlewareStack),r=this.clientCommand.resolveMiddleware(i,t,n);return async()=>r(this.clientCommand)}}class ScanCommand extends DynamoDBDocumentClientCommand{constructor(e){super(),this.input=e,this.inputKeyNodes={ScanFilter:{"*":{AttributeValueList:ALL_MEMBERS}},ExclusiveStartKey:ALL_VALUES,ExpressionAttributeValues:ALL_VALUES},this.outputKeyNodes={Items:{"*":ALL_VALUES},LastEvaluatedKey:ALL_VALUES},this.clientCommand=new ScanCommand$1(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(e,t,n){this.addMarshallingMiddleware(t);const i=e.concat(this.middlewareStack),r=this.clientCommand.resolveMiddleware(i,t,n);return async()=>r(this.clientCommand)}}class UpdateCommand extends DynamoDBDocumentClientCommand{constructor(e){super(),this.input=e,this.inputKeyNodes={Key:ALL_VALUES,AttributeUpdates:{"*":{Value:SELF}},Expected:{"*":{Value:SELF,AttributeValueList:ALL_MEMBERS}},ExpressionAttributeValues:ALL_VALUES},this.outputKeyNodes={Attributes:ALL_VALUES,ItemCollectionMetrics:{ItemCollectionKey:ALL_VALUES}},this.clientCommand=new UpdateItemCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(e,t,n){this.addMarshallingMiddleware(t);const i=e.concat(this.middlewareStack),r=this.clientCommand.resolveMiddleware(i,t,n);return async()=>r(this.clientCommand)}}class DynamoDBDocumentClient extends Client{constructor(e,t){if(super(e.config),this.config=e.config,this.config.translateConfig=t,this.middlewareStack=e.middlewareStack,this.config?.cacheMiddleware)throw new Error("@aws-sdk/lib-dynamodb - cacheMiddleware=true is not compatible with the DynamoDBDocumentClient. This option must be set to false.")}static from(e,t){return new DynamoDBDocumentClient(e,t)}destroy(){}}var parser={},hasRequiredParser,DLList_1,hasRequiredDLList,Events_1,hasRequiredEvents,Queues_1,hasRequiredQueues,BottleneckError_1,hasRequiredBottleneckError,Job_1,hasRequiredJob,LocalDatastore_1,hasRequiredLocalDatastore;function requireParser(){return hasRequiredParser||(hasRequiredParser=1,parser.load=function(e,t,n={}){var i,r,o;for(i in t)o=t[i],n[i]=null!=(r=e[i])?r:o;return n},parser.overwrite=function(e,t,n={}){var i,r;for(i in e)r=e[i],void 0!==t[i]&&(n[i]=r);return n}),parser}function requireDLList(){return hasRequiredDLList?DLList_1:(hasRequiredDLList=1,DLList_1=class{constructor(e,t){this.incr=e,this.decr=t,this._first=null,this._last=null,this.length=0}push(e){var t;this.length++,"function"==typeof this.incr&&this.incr(),t={value:e,prev:this._last,next:null},null!=this._last?(this._last.next=t,this._last=t):this._first=this._last=t}shift(){var e;if(null!=this._first)return this.length--,"function"==typeof this.decr&&this.decr(),e=this._first.value,null!=(this._first=this._first.next)?this._first.prev=null:this._last=null,e}first(){if(null!=this._first)return this._first.value}getArray(){var e,t,n;for(e=this._first,n=[];null!=e;)n.push((t=e,e=e.next,t.value));return n}forEachShift(e){var t;for(t=this.shift();null!=t;)e(t),t=this.shift()}debug(){var e,t,n,i,r;for(e=this._first,r=[];null!=e;)r.push((t=e,e=e.next,{value:t.value,prev:null!=(n=t.prev)?n.value:void 0,next:null!=(i=t.next)?i.value:void 0}));return r}})}function requireEvents(){if(hasRequiredEvents)return Events_1;function e(e,t,n,i,r,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,r)}function t(t){return function(){var n=this,i=arguments;return new Promise((function(r,o){var a=t.apply(n,i);function s(t){e(a,r,o,s,c,"next",t)}function c(t){e(a,r,o,s,c,"throw",t)}s(void 0)}))}}var n;return hasRequiredEvents=1,n=class{constructor(e){if(this.instance=e,this._events={},null!=this.instance.on||null!=this.instance.once||null!=this.instance.removeAllListeners)throw new Error("An Emitter already exists for this object");this.instance.on=(e,t)=>this._addListener(e,"many",t),this.instance.once=(e,t)=>this._addListener(e,"once",t),this.instance.removeAllListeners=(e=null)=>null!=e?delete this._events[e]:this._events={}}_addListener(e,t,n){var i;return null==(i=this._events)[e]&&(i[e]=[]),this._events[e].push({cb:n,status:t}),this.instance}listenerCount(e){return null!=this._events[e]?this._events[e].length:0}trigger(e,...n){var i=this;return t((function*(){var r,o;try{if("debug"!==e&&i.trigger("debug",`Event triggered: ${e}`,n),null==i._events[e])return;return i._events[e]=i._events[e].filter((function(e){return"none"!==e.status})),o=i._events[e].map(function(){var e=t((function*(e){var t,r;if("none"!==e.status){"once"===e.status&&(e.status="none");try{return"function"==typeof(null!=(r="function"==typeof e.cb?e.cb(...n):void 0)?r.then:void 0)?yield r:r}catch(e){return t=e,i.trigger("error",t),null}}}));return function(t){return e.apply(this,arguments)}}()),(yield Promise.all(o)).find((function(e){return null!=e}))}catch(e){return r=e,i.trigger("error",r),null}}))()}},Events_1=n}function requireQueues(){return hasRequiredQueues?Queues_1:(hasRequiredQueues=1,e=requireDLList(),t=requireEvents(),n=class{constructor(n){this.Events=new t(this),this._length=0,this._lists=function(){var t,i,r;for(r=[],t=1,i=n;1<=i?t<=i:t>=i;1<=i?++t:--t)r.push(new e((()=>this.incr()),(()=>this.decr())));return r}.call(this)}incr(){if(0==this._length++)return this.Events.trigger("leftzero")}decr(){if(0==--this._length)return this.Events.trigger("zero")}push(e){return this._lists[e.options.priority].push(e)}queued(e){return null!=e?this._lists[e].length:this._length}shiftAll(e){return this._lists.forEach((function(t){return t.forEachShift(e)}))}getFirst(e=this._lists){var t,n,i;for(t=0,n=e.length;t<n;t++)if((i=e[t]).length>0)return i;return[]}shiftLastFrom(e){return this.getFirst(this._lists.slice(e).reverse()).shift()}},Queues_1=n);var e,t,n}function requireBottleneckError(){return hasRequiredBottleneckError?BottleneckError_1:(hasRequiredBottleneckError=1,e=class extends Error{},BottleneckError_1=e);var e}function requireJob(){if(hasRequiredJob)return Job_1;function e(e,t,n,i,r,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,r)}function t(t){return function(){var n=this,i=arguments;return new Promise((function(r,o){var a=t.apply(n,i);function s(t){e(a,r,o,s,c,"next",t)}function c(t){e(a,r,o,s,c,"throw",t)}s(void 0)}))}}var n,i;return hasRequiredJob=1,i=requireParser(),n=requireBottleneckError(),Job_1=class{constructor(e,t,n,r,o,a,s,c){this.task=e,this.args=t,this.rejectOnDrop=o,this.Events=a,this._states=s,this.Promise=c,this.options=i.load(n,r),this.options.priority=this._sanitizePriority(this.options.priority),this.options.id===r.id&&(this.options.id=`${this.options.id}-${this._randomIndex()}`),this.promise=new this.Promise(((e,t)=>{this._resolve=e,this._reject=t})),this.retryCount=0}_sanitizePriority(e){var t;return(t=~~e!==e?5:e)<0?0:t>9?9:t}_randomIndex(){return Math.random().toString(36).slice(2)}doDrop({error:e,message:t="This job has been dropped by Bottleneck"}={}){return!!this._states.remove(this.options.id)&&(this.rejectOnDrop&&this._reject(null!=e?e:new n(t)),this.Events.trigger("dropped",{args:this.args,options:this.options,task:this.task,promise:this.promise}),!0)}_assertStatus(e){var t;if((t=this._states.jobStatus(this.options.id))!==e&&("DONE"!==e||null!==t))throw new n(`Invalid job status ${t}, expected ${e}. Please open an issue at https://github.com/SGrondin/bottleneck/issues`)}doReceive(){return this._states.start(this.options.id),this.Events.trigger("received",{args:this.args,options:this.options})}doQueue(e,t){return this._assertStatus("RECEIVED"),this._states.next(this.options.id),this.Events.trigger("queued",{args:this.args,options:this.options,reachedHWM:e,blocked:t})}doRun(){return 0===this.retryCount?(this._assertStatus("QUEUED"),this._states.next(this.options.id)):this._assertStatus("EXECUTING"),this.Events.trigger("scheduled",{args:this.args,options:this.options})}doExecute(e,n,i,r){var o=this;return t((function*(){var t,a,s;0===o.retryCount?(o._assertStatus("RUNNING"),o._states.next(o.options.id)):o._assertStatus("EXECUTING"),a={args:o.args,options:o.options,retryCount:o.retryCount},o.Events.trigger("executing",a);try{if(s=yield null!=e?e.schedule(o.options,o.task,...o.args):o.task(...o.args),n())return o.doDone(a),yield r(o.options,a),o._assertStatus("DONE"),o._resolve(s)}catch(e){return t=e,o._onFailure(t,a,n,i,r)}}))()}doExpire(e,t,i){var r,o;return this._states.jobStatus("RUNNING"===this.options.id)&&this._states.next(this.options.id),this._assertStatus("EXECUTING"),o={args:this.args,options:this.options,retryCount:this.retryCount},r=new n(`This job timed out after ${this.options.expiration} ms.`),this._onFailure(r,o,e,t,i)}_onFailure(e,n,i,r,o){var a=this;return t((function*(){var t,s;if(i())return null!=(t=yield a.Events.trigger("failed",e,n))?(s=~~t,a.Events.trigger("retry",`Retrying ${a.options.id} after ${s} ms`,n),a.retryCount++,r(s)):(a.doDone(n),yield o(a.options,n),a._assertStatus("DONE"),a._reject(e))}))()}doDone(e){return this._assertStatus("EXECUTING"),this._states.next(this.options.id),this.Events.trigger("done",e)}}}function requireLocalDatastore(){if(hasRequiredLocalDatastore)return LocalDatastore_1;function e(e,t,n,i,r,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,r)}function t(t){return function(){var n=this,i=arguments;return new Promise((function(r,o){var a=t.apply(n,i);function s(t){e(a,r,o,s,c,"next",t)}function c(t){e(a,r,o,s,c,"throw",t)}s(void 0)}))}}var n,i,r;return hasRequiredLocalDatastore=1,r=requireParser(),n=requireBottleneckError(),i=class{constructor(e,t,n){this.instance=e,this.storeOptions=t,this.clientId=this.instance._randomIndex(),r.load(n,n,this),this._nextRequest=this._lastReservoirRefresh=this._lastReservoirIncrease=Date.now(),this._running=0,this._done=0,this._unblockTime=0,this.ready=this.Promise.resolve(),this.clients={},this._startHeartbeat()}_startHeartbeat(){var e;return null==this.heartbeat&&(null!=this.storeOptions.reservoirRefreshInterval&&null!=this.storeOptions.reservoirRefreshAmount||null!=this.storeOptions.reservoirIncreaseInterval&&null!=this.storeOptions.reservoirIncreaseAmount)?"function"==typeof(e=this.heartbeat=setInterval((()=>{var e,t,n,i,r;if(i=Date.now(),null!=this.storeOptions.reservoirRefreshInterval&&i>=this._lastReservoirRefresh+this.storeOptions.reservoirRefreshInterval&&(this._lastReservoirRefresh=i,this.storeOptions.reservoir=this.storeOptions.reservoirRefreshAmount,this.instance._drainAll(this.computeCapacity())),null!=this.storeOptions.reservoirIncreaseInterval&&i>=this._lastReservoirIncrease+this.storeOptions.reservoirIncreaseInterval){var o=this.storeOptions;if(e=o.reservoirIncreaseAmount,n=o.reservoirIncreaseMaximum,r=o.reservoir,this._lastReservoirIncrease=i,(t=null!=n?Math.min(e,n-r):e)>0)return this.storeOptions.reservoir+=t,this.instance._drainAll(this.computeCapacity())}}),this.heartbeatInterval)).unref?e.unref():void 0:clearInterval(this.heartbeat)}__publish__(e){var n=this;return t((function*(){return yield n.yieldLoop(),n.instance.Events.trigger("message",e.toString())}))()}__disconnect__(e){var n=this;return t((function*(){return yield n.yieldLoop(),clearInterval(n.heartbeat),n.Promise.resolve()}))()}yieldLoop(e=0){return new this.Promise((function(t,n){return setTimeout(t,e)}))}computePenalty(){var e;return null!=(e=this.storeOptions.penalty)?e:15*this.storeOptions.minTime||5e3}__updateSettings__(e){var n=this;return t((function*(){return yield n.yieldLoop(),r.overwrite(e,e,n.storeOptions),n._startHeartbeat(),n.instance._drainAll(n.computeCapacity()),!0}))()}__running__(){var e=this;return t((function*(){return yield e.yieldLoop(),e._running}))()}__queued__(){var e=this;return t((function*(){return yield e.yieldLoop(),e.instance.queued()}))()}__done__(){var e=this;return t((function*(){return yield e.yieldLoop(),e._done}))()}__groupCheck__(e){var n=this;return t((function*(){return yield n.yieldLoop(),n._nextRequest+n.timeout<e}))()}computeCapacity(){var e,t,n=this.storeOptions;return e=n.maxConcurrent,t=n.reservoir,null!=e&&null!=t?Math.min(e-this._running,t):null!=e?e-this._running:null!=t?t:null}conditionsCheck(e){var t;return null==(t=this.computeCapacity())||e<=t}__incrementReservoir__(e){var n=this;return t((function*(){var t;return yield n.yieldLoop(),t=n.storeOptions.reservoir+=e,n.instance._drainAll(n.computeCapacity()),t}))()}__currentReservoir__(){var e=this;return t((function*(){return yield e.yieldLoop(),e.storeOptions.reservoir}))()}isBlocked(e){return this._unblockTime>=e}check(e,t){return this.conditionsCheck(e)&&this._nextRequest-t<=0}__check__(e){var n=this;return t((function*(){var t;return yield n.yieldLoop(),t=Date.now(),n.check(e,t)}))()}__register__(e,n,i){var r=this;return t((function*(){var e,t;return yield r.yieldLoop(),e=Date.now(),r.conditionsCheck(n)?(r._running+=n,null!=r.storeOptions.reservoir&&(r.storeOptions.reservoir-=n),t=Math.max(r._nextRequest-e,0),r._nextRequest=e+t+r.storeOptions.minTime,{success:!0,wait:t,reservoir:r.storeOptions.reservoir}):{success:!1}}))()}strategyIsBlock(){return 3===this.storeOptions.strategy}__submit__(e,i){var r=this;return t((function*(){var t,o,a;if(yield r.yieldLoop(),null!=r.storeOptions.maxConcurrent&&i>r.storeOptions.maxConcurrent)throw new n(`Impossible to add a job having a weight of ${i} to a limiter having a maxConcurrent setting of ${r.storeOptions.maxConcurrent}`);return o=Date.now(),a=null!=r.storeOptions.highWater&&e===r.storeOptions.highWater&&!r.check(i,o),(t=r.strategyIsBlock()&&(a||r.isBlocked(o)))&&(r._unblockTime=o+r.computePenalty(),r._nextRequest=r._unblockTime+r.storeOptions.minTime,r.instance._dropAllQueued()),{reachedHWM:a,blocked:t,strategy:r.storeOptions.strategy}}))()}__free__(e,n){var i=this;return t((function*(){return yield i.yieldLoop(),i._running-=n,i._done+=n,i.instance._drainAll(i.computeCapacity()),{running:i._running}}))()}},LocalDatastore_1=i}var Scripts={},require$$0$2={"blacklist_client.lua":"local blacklist = ARGV[num_static_argv + 1]\n\nif redis.call('zscore', client_last_seen_key, blacklist) then\n redis.call('zadd', client_last_seen_key, 0, blacklist)\nend\n\n\nreturn {}\n","check.lua":"local weight = tonumber(ARGV[num_static_argv + 1])\n\nlocal capacity = process_tick(now, false)['capacity']\nlocal nextRequest = tonumber(redis.call('hget', settings_key, 'nextRequest'))\n\nreturn conditions_check(capacity, weight) and nextRequest - now <= 0\n","conditions_check.lua":"local conditions_check = function (capacity, weight)\n return capacity == nil or weight <= capacity\nend\n","current_reservoir.lua":"return process_tick(now, false)['reservoir']\n","done.lua":"process_tick(now, false)\n\nreturn tonumber(redis.call('hget', settings_key, 'done'))\n","free.lua":"local index = ARGV[num_static_argv + 1]\n\nredis.call('zadd', job_expirations_key, 0, index)\n\nreturn process_tick(now, false)['running']\n","get_time.lua":"redis.replicate_commands()\n\nlocal get_time = function ()\n local time = redis.call('time')\n\n return tonumber(time[1]..string.sub(time[2], 1, 3))\nend\n","group_check.lua":"return not (redis.call('exists', settings_key) == 1)\n","heartbeat.lua":"process_tick(now, true)\n","increment_reservoir.lua":"local incr = tonumber(ARGV[num_static_argv + 1])\n\nredis.call('hincrby', settings_key, 'reservoir', incr)\n\nlocal reservoir = process_tick(now, true)['reservoir']\n\nlocal groupTimeout = tonumber(redis.call('hget', settings_key, 'groupTimeout'))\nrefresh_expiration(0, 0, groupTimeout)\n\nreturn reservoir\n","init.lua":"local clear = tonumber(ARGV[num_static_argv + 1])\nlocal limiter_version = ARGV[num_static_argv + 2]\nlocal num_local_argv = num_static_argv + 2\n\nif clear == 1 then\n redis.call('del', unpack(KEYS))\nend\n\nif redis.call('exists', settings_key) == 0 then\n -- Create\n local args = {'hmset', settings_key}\n\n for i = num_local_argv + 1, #ARGV do\n table.insert(args, ARGV[i])\n end\n\n redis.call(unpack(args))\n redis.call('hmset', settings_key,\n 'nextRequest', now,\n 'lastReservoirRefresh', now,\n 'lastReservoirIncrease', now,\n 'running', 0,\n 'done', 0,\n 'unblockTime', 0,\n 'capacityPriorityCounter', 0\n )\n\nelse\n -- Apply migrations\n local settings = redis.call('hmget', settings_key,\n 'id',\n 'version'\n )\n local id = settings[1]\n local current_version = settings[2]\n\n if current_version ~= limiter_version then\n local version_digits = {}\n for k, v in string.gmatch(current_version, \"([^.]+)\") do\n table.insert(version_digits, tonumber(k))\n end\n\n -- 2.10.0\n if version_digits[2] < 10 then\n redis.call('hsetnx', settings_key, 'reservoirRefreshInterval', '')\n redis.call('hsetnx', settings_key, 'reservoirRefreshAmount', '')\n redis.call('hsetnx', settings_key, 'lastReservoirRefresh', '')\n redis.call('hsetnx', settings_key, 'done', 0)\n redis.call('hset', settings_key, 'version', '2.10.0')\n end\n\n -- 2.11.1\n if version_digits[2] < 11 or (version_digits[2] == 11 and version_digits[3] < 1) then\n if redis.call('hstrlen', settings_key, 'lastReservoirRefresh') == 0 then\n redis.call('hmset', settings_key,\n 'lastReservoirRefresh', now,\n 'version', '2.11.1'\n )\n end\n end\n\n -- 2.14.0\n if version_digits[2] < 14 then\n local old_running_key = 'b_'..id..'_running'\n local old_executing_key = 'b_'..id..'_executing'\n\n if redis.call('exists', old_running_key) == 1 then\n redis.call('rename', old_running_key, job_weights_key)\n end\n if redis.call('exists', old_executing_key) == 1 then\n redis.call('rename', old_executing_key, job_expirations_key)\n end\n redis.call('hset', settings_key, 'version', '2.14.0')\n end\n\n -- 2.15.2\n if version_digits[2] < 15 or (version_digits[2] == 15 and version_digits[3] < 2) then\n redis.call('hsetnx', settings_key, 'capacityPriorityCounter', 0)\n redis.call('hset', settings_key, 'version', '2.15.2')\n end\n\n -- 2.17.0\n if version_digits[2] < 17 then\n redis.call('hsetnx', settings_key, 'clientTimeout', 10000)\n redis.call('hset', settings_key, 'version', '2.17.0')\n end\n\n -- 2.18.0\n if version_digits[2] < 18 then\n redis.call('hsetnx', settings_key, 'reservoirIncreaseInterval', '')\n redis.call('hsetnx', settings_key, 'reservoirIncreaseAmount', '')\n redis.call('hsetnx', settings_key, 'reservoirIncreaseMaximum', '')\n redis.call('hsetnx', settings_key, 'lastReservoirIncrease', now)\n redis.call('hset', settings_key, 'version', '2.18.0')\n end\n\n end\n\n process_tick(now, false)\nend\n\nlocal groupTimeout = tonumber(redis.call('hget', settings_key, 'groupTimeout'))\nrefresh_expiration(0, 0, groupTimeout)\n\nreturn {}\n","process_tick.lua":"local process_tick = function (now, always_publish)\n\n local compute_capacity = function (maxConcurrent, running, reservoir)\n if maxConcurrent ~= nil and reservoir ~= nil then\n return math.min((maxConcurrent - running), reservoir)\n elseif maxConcurrent ~= nil then\n return maxConcurrent - running\n elseif reservoir ~= nil then\n return reservoir\n else\n return nil\n end\n end\n\n local settings = redis.call('hmget', settings_key,\n 'id',\n 'maxConcurrent',\n 'running',\n 'reservoir',\n 'reservoirRefreshInterval',\n 'reservoirRefreshAmount',\n 'lastReservoirRefresh',\n 'reservoirIncreaseInterval',\n 'reservoirIncreaseAmount',\n 'reservoirIncreaseMaximum',\n 'lastReservoirIncrease',\n 'capacityPriorityCounter',\n 'clientTimeout'\n )\n local id = settings[1]\n local maxConcurrent = tonumber(settings[2])\n local running = tonumber(settings[3])\n local reservoir = tonumber(settings[4])\n local reservoirRefreshInterval = tonumber(settings[5])\n local reservoirRefreshAmount = tonumber(settings[6])\n local lastReservoirRefresh = tonumber(settings[7])\n local reservoirIncreaseInterval = tonumber(settings[8])\n local reservoirIncreaseAmount = tonumber(settings[9])\n local reservoirIncreaseMaximum = tonumber(settings[10])\n local lastReservoirIncrease = tonumber(settings[11])\n local capacityPriorityCounter = tonumber(settings[12])\n local clientTimeout = tonumber(settings[13])\n\n local initial_capacity = compute_capacity(maxConcurrent, running, reservoir)\n\n --\n -- Process 'running' changes\n --\n local expired = redis.call('zrangebyscore', job_expirations_key, '-inf', '('..now)\n\n if #expired > 0 then\n redis.call('zremrangebyscore', job_expirations_key, '-inf', '('..now)\n\n local flush_batch = function (batch, acc)\n local weights = redis.call('hmget', job_weights_key, unpack(batch))\n redis.call('hdel', job_weights_key, unpack(batch))\n local clients = redis.call('hmget', job_clients_key, unpack(batch))\n redis.call('hdel', job_clients_key, unpack(batch))\n\n -- Calculate sum of removed weights\n for i = 1, #weights do\n acc['total'] = acc['total'] + (tonumber(weights[i]) or 0)\n end\n\n -- Calculate sum of removed weights by client\n local client_weights = {}\n for i = 1, #clients do\n local removed = tonumber(weights[i]) or 0\n if removed > 0 then\n acc['client_weights'][clients[i]] = (acc['client_weights'][clients[i]] or 0) + removed\n end\n end\n end\n\n local acc = {\n ['total'] = 0,\n ['client_weights'] = {}\n }\n local batch_size = 1000\n\n -- Compute changes to Zsets and apply changes to Hashes\n for i = 1, #expired, batch_size do\n local batch = {}\n for j = i, math.min(i + batch_size - 1, #expired) do\n table.insert(batch, expired[j])\n end\n\n flush_batch(batch, acc)\n end\n\n -- Apply changes to Zsets\n if acc['total'] > 0 then\n redis.call('hincrby', settings_key, 'done', acc['total'])\n running = tonumber(redis.call('hincrby', settings_key, 'running', -acc['total']))\n end\n\n for client, weight in pairs(acc['client_weights']) do\n redis.call('zincrby', client_running_key, -weight, client)\n end\n end\n\n --\n -- Process 'reservoir' changes\n --\n local reservoirRefreshActive = reservoirRefreshInterval ~= nil and reservoirRefreshAmount ~= nil\n if reservoirRefreshActive and now >= lastReservoirRefresh + reservoirRefreshInterval then\n reservoir = reservoirRefreshAmount\n redis.call('hmset', settings_key,\n 'reservoir', reservoir,\n 'lastReservoirRefresh', now\n )\n end\n\n local reservoirIncreaseActive = reservoirIncreaseInterval ~= nil and reservoirIncreaseAmount ~= nil\n if reservoirIncreaseActive and now >= lastReservoirIncrease + reservoirIncreaseInterval then\n local num_intervals = math.floor((now - lastReservoirIncrease) / reservoirIncreaseInterval)\n local incr = reservoirIncreaseAmount * num_intervals\n if reservoirIncreaseMaximum ~= nil then\n incr = math.min(incr, reservoirIncreaseMaximum - (reservoir or 0))\n end\n if incr > 0 then\n reservoir = (reservoir or 0) + incr\n end\n redis.call('hmset', settings_key,\n 'reservoir', reservoir,\n 'lastReservoirIncrease', lastReservoirIncrease + (num_intervals * reservoirIncreaseInterval)\n )\n end\n\n --\n -- Clear unresponsive clients\n --\n local unresponsive = redis.call('zrangebyscore', client_last_seen_key, '-inf', (now - clientTimeout))\n local unresponsive_lookup = {}\n local terminated_clients = {}\n for i = 1, #unresponsive do\n unresponsive_lookup[unresponsive[i]] = true\n if tonumber(redis.call('zscore', client_running_key, unresponsive[i])) == 0 then\n table.insert(terminated_clients, unresponsive[i])\n end\n end\n if #terminated_clients > 0 then\n redis.call('zrem', client_running_key, unpack(terminated_clients))\n redis.call('hdel', client_num_queued_key, unpack(terminated_clients))\n redis.call('zrem', client_last_registered_key, unpack(terminated_clients))\n redis.call('zrem', client_last_seen_key, unpack(terminated_clients))\n end\n\n --\n -- Broadcast capacity changes\n --\n local final_capacity = compute_capacity(maxConcurrent, running, reservoir)\n\n if always_publish or (initial_capacity ~= nil and final_capacity == nil) then\n -- always_publish or was not unlimited, now unlimited\n redis.call('publish', 'b_'..id, 'capacity:'..(final_capacity or ''))\n\n elseif initial_capacity ~= nil and final_capacity ~= nil and final_capacity > initial_capacity then\n -- capacity was increased\n -- send the capacity message to the limiter having the lowest number of running jobs\n -- the tiebreaker is the limiter having not registered a job in the longest time\n\n local lowest_concurrency_value = nil\n local lowest_concurrency_clients = {}\n local lowest_concurrency_last_registered = {}\n local client_concurrencies = redis.call('zrange', client_running_key, 0, -1, 'withscores')\n\n for i = 1, #client_concurrencies, 2 do\n local client = client_concurrencies[i]\n local concurrency = tonumber(client_concurrencies[i+1])\n\n if (\n lowest_concurrency_value == nil or lowest_concurrency_value == concurrency\n ) and (\n not unresponsive_lookup[client]\n ) and (\n tonumber(redis.call('hget', client_num_queued_key, client)) > 0\n ) then\n lowest_concurrency_value = concurrency\n table.insert(lowest_concurrency_clients, client)\n local last_registered = tonumber(redis.call('zscore', client_last_registered_key, client))\n table.insert(lowest_concurrency_last_registered, last_registered)\n end\n end\n\n if #lowest_concurrency_clients > 0 then\n local position = 1\n local earliest = lowest_concurrency_last_registered[1]\n\n for i,v in ipairs(lowest_concurrency_last_registered) do\n if v < earliest then\n position = i\n earliest = v\n end\n end\n\n local next_client = lowest_concurrency_clients[position]\n redis.call('publish', 'b_'..id,\n 'capacity-priority:'..(final_capacity or '')..\n ':'..next_client..\n ':'..capacityPriorityCounter\n )\n redis.call('hincrby', settings_key, 'capacityPriorityCounter', '1')\n else\n redis.call('publish', 'b_'..id, 'capacity:'..(final_capacity or ''))\n end\n end\n\n return {\n ['capacity'] = final_capacity,\n ['running'] = running,\n ['reservoir'] = reservoir\n }\nend\n","queued.lua":"local clientTimeout = tonumber(redis.call('hget', settings_key, 'clientTimeout'))\nlocal valid_clients = redis.call('zrangebyscore', client_last_seen_key, (now - clientTimeout), 'inf')\nlocal client_queued = redis.call('hmget', client_num_queued_key, unpack(valid_clients))\n\nlocal sum = 0\nfor i = 1, #client_queued do\n sum = sum + tonumber(client_queued[i])\nend\n\nreturn sum\n","refresh_expiration.lua":"local refresh_expiration = function (now, nextRequest, groupTimeout)\n\n if groupTimeout ~= nil then\n local ttl = (nextRequest + groupTimeout) - now\n\n for i = 1, #KEYS do\n redis.call('pexpire', KEYS[i], ttl)\n end\n end\n\nend\n","refs.lua":"local settings_key = KEYS[1]\nlocal job_weights_key = KEYS[2]\nlocal job_expirations_key = KEYS[3]\nlocal job_clients_key = KEYS[4]\nlocal client_running_key = KEYS[5]\nlocal client_num_queued_key = KEYS[6]\nlocal client_last_registered_key = KEYS[7]\nlocal client_last_seen_key = KEYS[8]\n\nlocal now = tonumber(ARGV[1])\nlocal client = ARGV[2]\n\nlocal num_static_argv = 2\n","register.lua":"local index = ARGV[num_static_argv + 1]\nlocal weight = tonumber(ARGV[num_static_argv + 2])\nlocal expiration = tonumber(ARGV[num_static_argv + 3])\n\nlocal state = process_tick(now, false)\nlocal capacity = state['capacity']\nlocal reservoir = state['reservoir']\n\nlocal settings = redis.call('hmget', settings_key,\n 'nextRequest',\n 'minTime',\n 'groupTimeout'\n)\nlocal nextRequest = tonumber(settings[1])\nlocal minTime = tonumber(settings[2])\nlocal groupTimeout = tonumber(settings[3])\n\nif conditions_check(capacity, weight) then\n\n redis.call('hincrby', settings_key, 'running', weight)\n redis.call('hset', job_weights_key, index, weight)\n if expiration ~= nil then\n redis.call('zadd', job_expirations_key, now + expiration, index)\n end\n redis.call('hset', job_clients_key, index, client)\n redis.call('zincrby', client_running_key, weight, client)\n redis.call('hincrby', client_num_queued_key, client, -1)\n redis.call('zadd', client_last_registered_key, now, client)\n\n local wait = math.max(nextRequest - now, 0)\n local newNextRequest = now + wait + minTime\n\n if reservoir == nil then\n redis.call('hset', settings_key,\n 'nextRequest', newNextRequest\n )\n else\n reservoir = reservoir - weight\n redis.call('hmset', settings_key,\n 'reservoir', reservoir,\n 'nextRequest', newNextRequest\n )\n end\n\n refresh_expiration(now, newNextRequest, groupTimeout)\n\n return {true, wait, reservoir}\n\nelse\n return {false}\nend\n","register_client.lua":"local queued = tonumber(ARGV[num_static_argv + 1])\n\n-- Could have been re-registered concurrently\nif not redis.call('zscore', client_last_seen_key, client) then\n redis.call('zadd', client_running_key, 0, client)\n redis.call('hset', client_num_queued_key, client, queued)\n redis.call('zadd', client_last_registered_key, 0, client)\nend\n\nredis.call('zadd', client_last_seen_key, now, client)\n\nreturn {}\n","running.lua":"return process_tick(now, false)['running']\n","submit.lua":"local queueLength = tonumber(ARGV[num_static_argv + 1])\nlocal weight = tonumber(ARGV[num_static_argv + 2])\n\nlocal capacity = process_tick(now, false)['capacity']\n\nlocal settings = redis.call('hmget', settings_key,\n 'id',\n 'maxConcurrent',\n 'highWater',\n 'nextRequest',\n 'strategy',\n 'unblockTime',\n 'penalty',\n 'minTime',\n 'groupTimeout'\n)\nlocal id = settings[1]\nlocal maxConcurrent = tonumber(settings[2])\nlocal highWater = tonumber(settings[3])\nlocal nextRequest = tonumber(settings[4])\nlocal strategy = tonumber(settings[5])\nlocal unblockTime = tonumber(settings[6])\nlocal penalty = tonumber(settings[7])\nlocal minTime = tonumber(settings[8])\nlocal groupTimeout = tonumber(settings[9])\n\nif maxConcurrent ~= nil and weight > maxConcurrent then\n return redis.error_reply('OVERWEIGHT:'..weight..':'..maxConcurrent)\nend\n\nlocal reachedHWM = (highWater ~= nil and queueLength == highWater\n and not (\n conditions_check(capacity, weight)\n and nextRequest - now <= 0\n )\n)\n\nlocal blocked = strategy == 3 and (reachedHWM or unblockTime >= now)\n\nif blocked then\n local computedPenalty = penalty\n if computedPenalty == nil then\n if minTime == 0 then\n computedPenalty = 5000\n else\n computedPenalty = 15 * minTime\n end\n end\n\n local newNextRequest = now + computedPenalty + minTime\n\n redis.call('hmset', settings_key,\n 'unblockTime', now + computedPenalty,\n 'nextRequest', newNextRequest\n )\n\n local clients_queued_reset = redis.call('hkeys', client_num_queued_key)\n local queued_reset = {}\n for i = 1, #clients_queued_reset do\n table.insert(queued_reset, clients_queued_reset[i])\n table.insert(queued_reset, 0)\n end\n redis.call('hmset', client_num_queued_key, unpack(queued_reset))\n\n redis.call('publish', 'b_'..id, 'blocked:')\n\n refresh_expiration(now, newNextRequest, groupTimeout)\nend\n\nif not blocked and not reachedHWM then\n redis.call('hincrby', client_num_queued_key, client, 1)\nend\n\nreturn {reachedHWM, blocked, strategy}\n","update_settings.lua":"local args = {'hmset', settings_key}\n\nfor i = num_static_argv + 1, #ARGV do\n table.insert(args, ARGV[i])\nend\n\nredis.call(unpack(args))\n\nprocess_tick(now, true)\n\nlocal groupTimeout = tonumber(redis.call('hget', settings_key, 'groupTimeout'))\nrefresh_expiration(0, 0, groupTimeout)\n\nreturn {}\n","validate_client.lua":"if not redis.call('zscore', client_last_seen_key, client) then\n return redis.error_reply('UNKNOWN_CLIENT')\nend\n\nredis.call('zadd', client_last_seen_key, now, client)\n","validate_keys.lua":"if not (redis.call('exists', settings_key) == 1) then\n return redis.error_reply('SETTINGS_KEY_NOT_FOUND')\nend\n"},hasRequiredScripts,RedisConnection_1,hasRequiredRedisConnection,IORedisConnection_1,hasRequiredIORedisConnection,RedisDatastore_1,hasRequiredRedisDatastore,States_1,hasRequiredStates,Sync_1,hasRequiredSync;function requireScripts(){return hasRequiredScripts||(hasRequiredScripts=1,function(e){var t,n,i;t={refs:(n=require$$0$2)["refs.lua"],validate_keys:n["validate_keys.lua"],validate_client:n["validate_client.lua"],refresh_expiration:n["refresh_expiration.lua"],process_tick:n["process_tick.lua"],conditions_check:n["conditions_check.lua"],get_time:n["get_time.lua"]},e.allKeys=function(e){return[`b_${e}_settings`,`b_${e}_job_weights`,`b_${e}_job_expirations`,`b_${e}_job_clients`,`b_${e}_client_running`,`b_${e}_client_num_queued`,`b_${e}_client_last_registered`,`b_${e}_client_last_seen`]},i={init:{keys:e.allKeys,headers:["process_tick"],refresh_expiration:!0,code:n["init.lua"]},group_check:{keys:e.allKeys,headers:[],refresh_expiration:!1,code:n["group_check.lua"]},register_client:{keys:e.allKeys,headers:["validate_keys"],refresh_expiration:!1,code:n["register_client.lua"]},blacklist_client:{keys:e.allKeys,headers:["validate_keys","validate_client"],refresh_expiration:!1,code:n["blacklist_client.lua"]},heartbeat:{keys:e.allKeys,headers:["validate_keys","validate_client","process_tick"],refresh_expiration:!1,code:n["heartbeat.lua"]},update_settings:{keys:e.allKeys,headers:["validate_keys","validate_client","process_tick"],refresh_expiration:!0,code:n["update_settings.lua"]},running:{keys:e.allKeys,headers:["validate_keys","validate_client","process_tick"],refresh_expiration:!1,code:n["running.lua"]},queued:{keys:e.allKeys,headers:["validate_keys","validate_client"],refresh_expiration:!1,code:n["queued.lua"]},done:{keys:e.allKeys,headers:["validate_keys","validate_client","process_tick"],refresh_expiration:!1,code:n["done.lua"]},check:{keys:e.allKeys,headers:["validate_keys","validate_client","process_tick","conditions_check"],refresh_expiration:!1,code:n["check.lua"]},submit:{keys:e.allKeys,headers:["validate_keys","validate_client","process_tick","conditions_check"],refresh_expiration:!0,code:n["submit.lua"]},register:{keys:e.allKeys,headers:["validate_keys","validate_client","process_tick","conditions_check"],refresh_expiration:!0,code:n["register.lua"]},free:{keys:e.allKeys,headers:["validate_keys","validate_client","process_tick"],refresh_expiration:!0,code:n["free.lua"]},current_reservoir:{keys:e.allKeys,headers:["validate_keys","validate_client","process_tick"],refresh_expiration:!1,code:n["current_reservoir.lua"]},increment_reservoir:{keys:e.allKeys,headers:["validate_keys","validate_client","process_tick"],refresh_expiration:!0,code:n["increment_reservoir.lua"]}},e.names=Object.keys(i),e.keys=function(e,t){return i[e].keys(t)},e.payload=function(e){var n;return n=i[e],Array.prototype.concat(t.refs,n.headers.map((function(e){return t[e]})),n.refresh_expiration?t.refresh_expiration:"",n.code).join("\n")}}(Scripts)),Scripts}function requireRedisConnection(){if(hasRequiredRedisConnection)return RedisConnection_1;function asyncGeneratorStep(e,t,n,i,r,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,r)}function _asyncToGenerator(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(e){asyncGeneratorStep(o,i,r,a,s,"next",e)}function s(e){asyncGeneratorStep(o,i,r,a,s,"throw",e)}a(void 0)}))}}var Events,RedisConnection,Scripts,parser;return hasRequiredRedisConnection=1,parser=requireParser(),Events=requireEvents(),Scripts=requireScripts(),RedisConnection=function(){class RedisConnection{constructor(options={}){parser.load(options,this.defaults,this),null==this.Redis&&(this.Redis=eval("require")("redis")),null==this.Events&&(this.Events=new Events(this)),this.terminated=!1,null==this.client&&(this.client=this.Redis.createClient(this.clientOptions)),this.subscriber=this.client.duplicate(),this.limiters={},this.shas={},this.ready=this.Promise.all([this._setup(this.client,!1),this._setup(this.subscriber,!0)]).then((()=>this._loadScripts())).then((()=>({client:this.client,subscriber:this.subscriber})))}_setup(e,t){return e.setMaxListeners(0),new this.Promise(((n,i)=>(e.on("error",(e=>this.Events.trigger("error",e))),t&&e.on("message",((e,t)=>{var n;return null!=(n=this.limiters[e])?n._store.onMessage(e,t):void 0})),e.ready?n():e.once("ready",n))))}_loadScript(e){return new this.Promise(((t,n)=>{var i;return i=Scripts.payload(e),this.client.multi([["script","load",i]]).exec(((i,r)=>null!=i?n(i):(this.shas[e]=r[0],t(r[0]))))}))}_loadScripts(){return this.Promise.all(Scripts.names.map((e=>this._loadScript(e))))}__runCommand__(e){var t=this;return _asyncToGenerator((function*(){return yield t.ready,new t.Promise(((n,i)=>t.client.multi([e]).exec_atomic((function(e,t){return null!=e?i(e):n(t[0])}))))}))()}__addLimiter__(e){return this.Promise.all([e.channel(),e.channel_client()].map((t=>new this.Promise(((n,i)=>{var r;return r=i=>{if(i===t)return this.subscriber.removeListener("subscribe",r),this.limiters[t]=e,n()},this.subscriber.on("subscribe",r),this.subscriber.subscribe(t)})))))}__removeLimiter__(e){var t=this;return this.Promise.all([e.channel(),e.channel_client()].map(function(){var e=_asyncToGenerator((function*(e){return t.terminated||(yield new t.Promise(((n,i)=>t.subscriber.unsubscribe(e,(function(t,r){return null!=t?i(t):r===e?n():void 0}))))),delete t.limiters[e]}));return function(t){return e.apply(this,arguments)}}()))}__scriptArgs__(e,t,n,i){var r;return r=Scripts.keys(e,t),[this.shas[e],r.length].concat(r,n,i)}__scriptFn__(e){return this.client.evalsha.bind(this.client)}disconnect(e=!0){var t,n,i,r;for(t=0,i=(r=Object.keys(this.limiters)).length;t<i;t++)n=r[t],clearInterval(this.limiters[n]._store.heartbeat);return this.limiters={},this.terminated=!0,this.client.end(e),this.subscriber.end(e),this.Promise.resolve()}}return RedisConnection.prototype.datastore="redis",RedisConnection.prototype.defaults={Redis:null,clientOptions:{},client:null,Promise:Promise,Events:null},RedisConnection}.call(void 0),RedisConnection_1=RedisConnection,RedisConnection_1}function requireIORedisConnection(){if(hasRequiredIORedisConnection)return IORedisConnection_1;function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function _iterableToArrayLimit(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{i||null==s.return||s.return()}finally{if(r)throw o}}return n}function _arrayWithHoles(e){if(Array.isArray(e))return e}function asyncGeneratorStep(e,t,n,i,r,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,r)}function _asyncToGenerator(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(e){asyncGeneratorStep(o,i,r,a,s,"next",e)}function s(e){asyncGeneratorStep(o,i,r,a,s,"throw",e)}a(void 0)}))}}var Events,IORedisConnection,Scripts,parser;return hasRequiredIORedisConnection=1,parser=requireParser(),Events=requireEvents(),Scripts=requireScripts(),IORedisConnection=function(){class IORedisConnection{constructor(options={}){parser.load(options,this.defaults,this),null==this.Redis&&(this.Redis=eval("require")("ioredis")),null==this.Events&&(this.Events=new Events(this)),this.terminated=!1,null!=this.clusterNodes?(this.client=new this.Redis.Cluster(this.clusterNodes,this.clientOptions),this.subscriber=new this.Redis.Cluster(this.clusterNodes,this.clientOptions)):null!=this.client&&null==this.client.duplicate?this.subscriber=new this.Redis.Cluster(this.client.startupNodes,this.client.options):(null==this.client&&(this.client=new this.Redis(this.clientOptions)),this.subscriber=this.client.duplicate()),this.limiters={},this.ready=this.Promise.all([this._setup(this.client,!1),this._setup(this.subscriber,!0)]).then((()=>(this._loadScripts(),{client:this.client,subscriber:this.subscriber})))}_setup(e,t){return e.setMaxListeners(0),new this.Promise(((n,i)=>(e.on("error",(e=>this.Events.trigger("error",e))),t&&e.on("message",((e,t)=>{var n;return null!=(n=this.limiters[e])?n._store.onMessage(e,t):void 0})),"ready"===e.status?n():e.once("ready",n))))}_loadScripts(){return Scripts.names.forEach((e=>this.client.defineCommand(e,{lua:Scripts.payload(e)})))}__runCommand__(e){var t=this;return _asyncToGenerator((function*(){yield t.ready;var n=_slicedToArray(yield t.client.pipeline([e]).exec(),1),i=_slicedToArray(n[0],2);return i[0],i[1]}))()}__addLimiter__(e){return this.Promise.all([e.channel(),e.channel_client()].map((t=>new this.Promise(((n,i)=>this.subscriber.subscribe(t,(()=>(this.limiters[t]=e,n()))))))))}__removeLimiter__(e){var t=this;return[e.channel(),e.channel_client()].forEach(function(){var e=_asyncToGenerator((function*(e){return t.terminated||(yield t.subscriber.unsubscribe(e)),delete t.limiters[e]}));return function(t){return e.apply(this,arguments)}}())}__scriptArgs__(e,t,n,i){var r;return[(r=Scripts.keys(e,t)).length].concat(r,n,i)}__scriptFn__(e){return this.client[e].bind(this.client)}disconnect(e=!0){var t,n,i,r;for(t=0,i=(r=Object.keys(this.limiters)).length;t<i;t++)n=r[t],clearInterval(this.limiters[n]._store.heartbeat);return this.limiters={},this.terminated=!0,e?this.Promise.all([this.client.quit(),this.subscriber.quit()]):(this.client.disconnect(),this.subscriber.disconnect(),this.Promise.resolve())}}return IORedisConnection.prototype.datastore="ioredis",IORedisConnection.prototype.defaults={Redis:null,clientOptions:{},clusterNodes:null,client:null,Promise:Promise,Events:null},IORedisConnection}.call(void 0),IORedisConnection_1=IORedisConnection,IORedisConnection_1}function requireRedisDatastore(){if(hasRequiredRedisDatastore)return RedisDatastore_1;function e(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{i||null==s.return||s.return()}finally{if(r)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function t(e,t,n,i,r,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,r)}function n(e){return function(){var n=this,i=arguments;return new Promise((function(r,o){var a=e.apply(n,i);function s(e){t(a,r,o,s,c,"next",e)}function c(e){t(a,r,o,s,c,"throw",e)}s(void 0)}))}}var i,r,o,a,s;return hasRequiredRedisDatastore=1,s=requireParser(),i=requireBottleneckError(),o=requireRedisConnection(),r=requireIORedisConnection(),a=class{constructor(e,t,n){this.instance=e,this.storeOptions=t,this.originalId=this.instance.id,this.clientId=this.instance._randomIndex(),s.load(n,n,this),this.clients={},this.capacityPriorityCounters={},this.sharedConnection=null!=this.connection,null==this.connection&&(this.connection="redis"===this.instance.datastore?new o({Redis:this.Redis,clientOptions:this.clientOptions,Promise:this.Promise,Events:this.instance.Events}):"ioredis"===this.instance.datastore?new r({Redis:this.Redis,clientOptions:this.clientOptions,clusterNodes:this.clusterNodes,Promise:this.Promise,Events:this.instance.Events}):void 0),this.instance.connection=this.connection,this.instance.datastore=this.connection.datastore,this.ready=this.connection.ready.then((e=>(this.clients=e,this.runScript("init",this.prepareInitSettings(this.clearDatastore))))).then((()=>this.connection.__addLimiter__(this.instance))).then((()=>this.runScript("register_client",[this.instance.queued()]))).then((()=>{var e;return"function"==typeof(e=this.heartbeat=setInterval((()=>this.runScript("heartbeat",[]).catch((e=>this.instance.Events.trigger("error",e)))),this.heartbeatInterval)).unref&&e.unref(),this.clients}))}__publish__(e){var t=this;return n((function*(){return(yield t.ready).client.publish(t.instance.channel(),`message:${e.toString()}`)}))()}onMessage(t,i){var r=this;return n((function*(){var t,o,a,s,c,l,d,u,p,m;try{d=i.indexOf(":");var h=[i.slice(0,d),i.slice(d+1)];if(a=h[1],"capacity"===(m=h[0]))return yield r.instance._drainAll(a.length>0?~~a:void 0);if("capacity-priority"===m){var f=e(a.split(":"),3);return p=f[0],u=f[1],o=f[2],t=p.length>0?~~p:void 0,u===r.clientId?(s=yield r.instance._drainAll(t),l=null!=t?t-(s||0):"",yield r.clients.client.publish(r.instance.channel(),`capacity-priority:${l}::${o}`)):""===u?(clearTimeout(r.capacityPriorityCounters[o]),delete r.capacityPriorityCounters[o],r.instance._drainAll(t)):r.capacityPriorityCounters[o]=setTimeout(n((function*(){var e;try{return delete r.capacityPriorityCounters[o],yield r.runScript("blacklist_client",[u]),yield r.instance._drainAll(t)}catch(t){return e=t,r.instance.Events.trigger("error",e)}})),1e3)}if("message"===m)return r.instance.Events.trigger("message",a);if("blocked"===m)return yield r.instance._dropAllQueued()}catch(e){return c=e,r.instance.Events.trigger("error",c)}}))()}__disconnect__(e){return clearInterval(this.heartbeat),this.sharedConnection?this.connection.__removeLimiter__(this.instance):this.connection.disconnect(e)}runScript(e,t){var i=this;return n((function*(){return"init"!==e&&"register_client"!==e&&(yield i.ready),new i.Promise(((n,r)=>{var o,a;return o=[Date.now(),i.clientId].concat(t),i.instance.Events.trigger("debug",`Calling Redis script: ${e}.lua`,o),a=i.connection.__scriptArgs__(e,i.originalId,o,(function(e,t){return null!=e?r(e):n(t)})),i.connection.__scriptFn__(e)(...a)})).catch((n=>"SETTINGS_KEY_NOT_FOUND"===n.message?"heartbeat"===e?i.Promise.resolve():i.runScript("init",i.prepareInitSettings(!1)).then((()=>i.runScript(e,t))):"UNKNOWN_CLIENT"===n.message?i.runScript("register_client",[i.instance.queued()]).then((()=>i.runScript(e,t))):i.Promise.reject(n)))}))()}prepareArray(e){var t,n,i,r;for(i=[],t=0,n=e.length;t<n;t++)r=e[t],i.push(null!=r?r.toString():"");return i}prepareObject(e){var t,n,i;for(n in t=[],e)i=e[n],t.push(n,null!=i?i.toString():"");return t}prepareInitSettings(e){var t;return(t=this.prepareObject(Object.assign({},this.storeOptions,{id:this.originalId,version:this.instance.version,groupTimeout:this.timeout,clientTimeout:this.clientTimeout}))).unshift(e?1:0,this.instance.version),t}convertBool(e){return!!e}__updateSettings__(e){var t=this;return n((function*(){return yield t.runScript("update_settings",t.prepareObject(e)),s.overwrite(e,e,t.storeOptions)}))()}__running__(){return this.runScript("running",[])}__queued__(){return this.runScript("queued",[])}__done__(){return this.runScript("done",[])}__groupCheck__(){var e=this;return n((function*(){return e.convertBool(yield e.runScript("group_check",[]))}))()}__incrementReservoir__(e){return this.runScript("increment_reservoir",[e])}__currentReservoir__(){return this.runScript("current_reservoir",[])}__check__(e){var t=this;return n((function*(){return t.convertBool(yield t.runScript("check",t.prepareArray([e])))}))()}__register__(t,i,r){var o=this;return n((function*(){var n,a,s,c=e(yield o.runScript("register",o.prepareArray([t,i,r])),3);return a=c[0],s=c[1],n=c[2],{success:o.convertBool(a),wait:s,reservoir:n}}))()}__submit__(t,r){var o=this;return n((function*(){var n,a,s,c,l;try{var d=e(yield o.runScript("submit",o.prepareArray([t,r])),3);return c=d[0],n=d[1],l=d[2],{reachedHWM:o.convertBool(c),blocked:o.convertBool(n),strategy:l}}catch(t){if(0===(a=t).message.indexOf("OVERWEIGHT")){var u=e(a.message.split(":"),3);throw u[0],r=u[1],s=u[2],new i(`Impossible to add a job having a weight of ${r} to a limiter having a maxConcurrent setting of ${s}`)}throw a}}))()}__free__(e,t){var i=this;return n((function*(){return{running:yield i.runScript("free",i.prepareArray([e]))}}))()}},RedisDatastore_1=a}function requireStates(){return hasRequiredStates?States_1:(hasRequiredStates=1,e=requireBottleneckError(),t=class{constructor(e){this.status=e,this._jobs={},this.counts=this.status.map((function(){return 0}))}next(e){var t,n;return n=(t=this._jobs[e])+1,null!=t&&n<this.status.length?(this.counts[t]--,this.counts[n]++,this._jobs[e]++):null!=t?(this.counts[t]--,delete this._jobs[e]):void 0}start(e){return this._jobs[e]=0,this.counts[0]++}remove(e){var t;return null!=(t=this._jobs[e])&&(this.counts[t]--,delete this._jobs[e]),null!=t}jobStatus(e){var t;return null!=(t=this.status[this._jobs[e]])?t:null}statusJobs(t){var n,i,r,o;if(null!=t){if((i=this.status.indexOf(t))<0)throw new e(`status must be one of ${this.status.join(", ")}`);for(n in o=[],r=this._jobs)r[n]===i&&o.push(n);return o}return Object.keys(this._jobs)}statusCounts(){return this.counts.reduce(((e,t,n)=>(e[this.status[n]]=t,e)),{})}},States_1=t);var e,t}function requireSync(){if(hasRequiredSync)return Sync_1;function e(e,t,n,i,r,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,r)}function t(t){return function(){var n=this,i=arguments;return new Promise((function(r,o){var a=t.apply(n,i);function s(t){e(a,r,o,s,c,"next",t)}function c(t){e(a,r,o,s,c,"throw",t)}s(void 0)}))}}var n,i;return hasRequiredSync=1,n=requireDLList(),i=class{constructor(e,t){this.schedule=this.schedule.bind(this),this.name=e,this.Promise=t,this._running=0,this._queue=new n}isEmpty(){return 0===this._queue.length}_tryToRun(){var e=this;return t((function*(){var n,i,r,o,a,s,c;if(e._running<1&&e._queue.length>0){e._running++;var l=e._queue.shift();return c=l.task,n=l.args,a=l.resolve,o=l.reject,i=yield t((function*(){try{return s=yield c(...n),function(){return a(s)}}catch(e){return r=e,function(){return o(r)}}}))(),e._running--,e._tryToRun(),i()}}))()}schedule(e,...t){var n,i,r;return r=i=null,n=new this.Promise((function(e,t){return r=e,i=t})),this._queue.push({task:e,args:t,resolve:r,reject:i}),this._tryToRun(),n}},Sync_1=i}const version$6="2.19.5";var require$$8={version:version$6},Group_1,hasRequiredGroup,Batcher_1,hasRequiredBatcher,Bottleneck_1,hasRequiredBottleneck,lib,hasRequiredLib;function requireGroup(){if(hasRequiredGroup)return Group_1;function e(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{i||null==s.return||s.return()}finally{if(r)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function t(e,t,n,i,r,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,r)}function n(e){return function(){var n=this,i=arguments;return new Promise((function(r,o){var a=e.apply(n,i);function s(e){t(a,r,o,s,c,"next",e)}function c(e){t(a,r,o,s,c,"throw",e)}s(void 0)}))}}var i,r,o,a,s,c;return hasRequiredGroup=1,c=requireParser(),i=requireEvents(),a=requireRedisConnection(),o=requireIORedisConnection(),s=requireScripts(),r=function(){class t{constructor(e={}){this.deleteKey=this.deleteKey.bind(this),this.limiterOptions=e,c.load(this.limiterOptions,this.defaults,this),this.Events=new i(this),this.instances={},this.Bottleneck=requireBottleneck(),this._startAutoCleanup(),this.sharedConnection=null!=this.connection,null==this.connection&&("redis"===this.limiterOptions.datastore?this.connection=new a(Object.assign({},this.limiterOptions,{Events:this.Events})):"ioredis"===this.limiterOptions.datastore&&(this.connection=new o(Object.assign({},this.limiterOptions,{Events:this.Events}))))}key(e=""){var t;return null!=(t=this.instances[e])?t:(()=>{var t;return t=this.instances[e]=new this.Bottleneck(Object.assign(this.limiterOptions,{id:`${this.id}-${e}`,timeout:this.timeout,connection:this.connection})),this.Events.trigger("created",t,e),t})()}deleteKey(e=""){var t=this;return n((function*(){var n,i;return i=t.instances[e],t.connection&&(n=yield t.connection.__runCommand__(["del",...s.allKeys(`${t.id}-${e}`)])),null!=i&&(delete t.instances[e],yield i.disconnect()),null!=i||n>0}))()}limiters(){var e,t,n,i;for(e in n=[],t=this.instances)i=t[e],n.push({key:e,limiter:i});return n}keys(){return Object.keys(this.instances)}clusterKeys(){var t=this;return n((function*(){var n,i,r,o,a,s,c;if(null==t.connection)return t.Promise.resolve(t.keys());for(a=[],n=null,c=`b_${t.id}-`.length,9;0!==n;){var l=e(yield t.connection.__runCommand__(["scan",null!=n?n:0,"match",`b_${t.id}-*_settings`,"count",1e4]),2);for(n=~~l[0],r=0,s=(i=l[1]).length;r<s;r++)o=i[r],a.push(o.slice(c,-9))}return a}))()}_startAutoCleanup(){var e,t=this;return clearInterval(this.interval),"function"==typeof(e=this.interval=setInterval(n((function*(){var e,n,i,r,o,a;for(n in o=Date.now(),r=[],i=t.instances){a=i[n];try{(yield a._store.__groupCheck__(o))?r.push(t.deleteKey(n)):r.push(void 0)}catch(t){e=t,r.push(a.Events.trigger("error",e))}}return r})),this.timeout/2)).unref?e.unref():void 0}updateSettings(e={}){if(c.overwrite(e,this.defaults,this),c.overwrite(e,e,this.limiterOptions),null!=e.timeout)return this._startAutoCleanup()}disconnect(e=!0){var t;if(!this.sharedConnection)return null!=(t=this.connection)?t.disconnect(e):void 0}}return t.prototype.defaults={timeout:3e5,connection:null,Promise:Promise,id:"group-key"},t}.call(void 0),Group_1=r}function requireBatcher(){return hasRequiredBatcher?Batcher_1:(hasRequiredBatcher=1,n=requireParser(),t=requireEvents(),e=function(){class e{constructor(e={}){this.options=e,n.load(this.options,this.defaults,this),this.Events=new t(this),this._arr=[],this._resetPromise(),this._lastFlush=Date.now()}_resetPromise(){return this._promise=new this.Promise(((e,t)=>this._resolve=e))}_flush(){return clearTimeout(this._timeout),this._lastFlush=Date.now(),this._resolve(),this.Events.trigger("batch",this._arr),this._arr=[],this._resetPromise()}add(e){var t;return this._arr.push(e),t=this._promise,this._arr.length===this.maxSize?this._flush():null!=this.maxTime&&1===this._arr.length&&(this._timeout=setTimeout((()=>this._flush()),this.maxTime)),t}}return e.prototype.defaults={maxTime:null,maxSize:null,Promise:Promise},e}.call(void 0),Batcher_1=e);var e,t,n}function requireBottleneck(){if(hasRequiredBottleneck)return Bottleneck_1;function e(e,t){return i(e)||function(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{i||null==s.return||s.return()}finally{if(r)throw o}}return n}(e,t)||n()}function t(e){return i(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||n()}function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function i(e){if(Array.isArray(e))return e}function r(e,t,n,i,r,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,r)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,c,"next",e)}function c(e){r(a,i,o,s,c,"throw",e)}s(void 0)}))}}hasRequiredBottleneck=1;var a,s,c,l,d,u,p,m,h,f=[].splice;return h=requireParser(),d=requireQueues(),c=requireJob(),l=requireLocalDatastore(),u=requireRedisDatastore(),s=requireEvents(),p=requireStates(),m=requireSync(),a=function(){class n{constructor(e={},...t){var i,r;this._addToQueue=this._addToQueue.bind(this),this._validateOptions(e,t),h.load(e,this.instanceDefaults,this),this._queues=new d(10),this._scheduled={},this._states=new p(["RECEIVED","QUEUED","RUNNING","EXECUTING"].concat(this.trackDoneStatus?["DONE"]:[])),this._limiter=null,this.Events=new s(this),this._submitLock=new m("submit",this.Promise),this._registerLock=new m("register",this.Promise),r=h.load(e,this.storeDefaults,{}),this._store=function(){if("redis"===this.datastore||"ioredis"===this.datastore||null!=this.connection)return i=h.load(e,this.redisStoreDefaults,{}),new u(this,r,i);if("local"===this.datastore)return i=h.load(e,this.localStoreDefaults,{}),new l(this,r,i);throw new n.prototype.BottleneckError(`Invalid datastore type: ${this.datastore}`)}.call(this),this._queues.on("leftzero",(()=>{var e;return null!=(e=this._store.heartbeat)&&"function"==typeof e.ref?e.ref():void 0})),this._queues.on("zero",(()=>{var e;return null!=(e=this._store.heartbeat)&&"function"==typeof e.unref?e.unref():void 0}))}_validateOptions(e,t){if(null==e||"object"!=typeof e||0!==t.length)throw new n.prototype.BottleneckError("Bottleneck v2 takes a single object argument. Refer to https://github.com/SGrondin/bottleneck#upgrading-to-v2 if you're upgrading from Bottleneck v1.")}ready(){return this._store.ready}clients(){return this._store.clients}channel(){return`b_${this.id}`}channel_client(){return`b_${this.id}_${this._store.clientId}`}publish(e){return this._store.__publish__(e)}disconnect(e=!0){return this._store.__disconnect__(e)}chain(e){return this._limiter=e,this}queued(e){return this._queues.queued(e)}clusterQueued(){return this._store.__queued__()}empty(){return 0===this.queued()&&this._submitLock.isEmpty()}running(){return this._store.__running__()}done(){return this._store.__done__()}jobStatus(e){return this._states.jobStatus(e)}jobs(e){return this._states.statusJobs(e)}counts(){return this._states.statusCounts()}_randomIndex(){return Math.random().toString(36).slice(2)}check(e=1){return this._store.__check__(e)}_clearGlobalState(e){return null!=this._scheduled[e]&&(clearTimeout(this._scheduled[e].expiration),delete this._scheduled[e],!0)}_free(e,t,n,i){var r=this;return o((function*(){var t,o;try{if(o=(yield r._store.__free__(e,n.weight)).running,r.Events.trigger("debug",`Freed ${n.id}`,i),0===o&&r.empty())return r.Events.trigger("idle")}catch(e){return t=e,r.Events.trigger("error",t)}}))()}_run(e,t,n){var i,r,o;return t.doRun(),i=this._clearGlobalState.bind(this,e),o=this._run.bind(this,e,t),r=this._free.bind(this,e,t),this._scheduled[e]={timeout:setTimeout((()=>t.doExecute(this._limiter,i,o,r)),n),expiration:null!=t.options.expiration?setTimeout((function(){return t.doExpire(i,o,r)}),n+t.options.expiration):void 0,job:t}}_drainOne(e){return this._registerLock.schedule((()=>{var t,n,i,r,o;if(0===this.queued())return this.Promise.resolve(null);o=this._queues.getFirst();var a=i=o.first();return r=a.options,t=a.args,null!=e&&r.weight>e?this.Promise.resolve(null):(this.Events.trigger("debug",`Draining ${r.id}`,{args:t,options:r}),n=this._randomIndex(),this._store.__register__(n,r.weight,r.expiration).then((({success:e,wait:a,reservoir:s})=>{var c;return this.Events.trigger("debug",`Drained ${r.id}`,{success:e,args:t,options:r}),e?(o.shift(),(c=this.empty())&&this.Events.trigger("empty"),0===s&&this.Events.trigger("depleted",c),this._run(n,i,a),this.Promise.resolve(r.weight)):this.Promise.resolve(null)})))}))}_drainAll(e,t=0){return this._drainOne(e).then((n=>{var i;return null!=n?(i=null!=e?e-n:e,this._drainAll(i,t+n)):this.Promise.resolve(t)})).catch((e=>this.Events.trigger("error",e)))}_dropAllQueued(e){return this._queues.shiftAll((function(t){return t.doDrop({message:e})}))}stop(e={}){var t,i;return e=h.load(e,this.stopDefaults),i=e=>{var t;return t=()=>{var t;return(t=this._states.counts)[0]+t[1]+t[2]+t[3]===e},new this.Promise(((e,n)=>t()?e():this.on("done",(()=>{if(t())return this.removeAllListeners("done"),e()}))))},t=e.dropWaitingJobs?(this._run=function(t,n){return n.doDrop({message:e.dropErrorMessage})},this._drainOne=()=>this.Promise.resolve(null),this._registerLock.schedule((()=>this._submitLock.schedule((()=>{var t,n,r;for(t in n=this._scheduled)r=n[t],"RUNNING"===this.jobStatus(r.job.options.id)&&(clearTimeout(r.timeout),clearTimeout(r.expiration),r.job.doDrop({message:e.dropErrorMessage}));return this._dropAllQueued(e.dropErrorMessage),i(0)}))))):this.schedule({priority:9,weight:0},(()=>i(1))),this._receive=function(t){return t._reject(new n.prototype.BottleneckError(e.enqueueErrorMessage))},this.stop=()=>this.Promise.reject(new n.prototype.BottleneckError("stop() has already been called")),t}_addToQueue(e){var t=this;return o((function*(){var i,r,o,a,s,c,l;i=e.args,a=e.options;try{var d=yield t._store.__submit__(t.queued(),a.weight);s=d.reachedHWM,r=d.blocked,l=d.strategy}catch(n){return o=n,t.Events.trigger("debug",`Could not queue ${a.id}`,{args:i,options:a,error:o}),e.doDrop({error:o}),!1}return r?(e.doDrop(),!0):s&&(null!=(c=l===n.prototype.strategy.LEAK?t._queues.shiftLastFrom(a.priority):l===n.prototype.strategy.OVERFLOW_PRIORITY?t._queues.shiftLastFrom(a.priority+1):l===n.prototype.strategy.OVERFLOW?e:void 0)&&c.doDrop(),null==c||l===n.prototype.strategy.OVERFLOW)?(null==c&&e.doDrop(),s):(e.doQueue(s,r),t._queues.push(e),yield t._drainAll(),s)}))()}_receive(e){return null!=this._states.jobStatus(e.options.id)?(e._reject(new n.prototype.BottleneckError(`A job with the same id already exists (id=${e.options.id})`)),!1):(e.doReceive(),this._submitLock.schedule(this._addToQueue,e))}submit(...n){var i,r,o,a,s,l,d,u,p;"function"==typeof n[0]?(l=t(n),r=l[0],n=l.slice(1),d=e(f.call(n,-1),1),i=d[0],a=h.load({},this.jobDefaults)):(a=(u=t(n))[0],r=u[1],n=u.slice(2),p=e(f.call(n,-1),1),i=p[0],a=h.load(a,this.jobDefaults));return s=(...e)=>new this.Promise((function(t,n){return r(...e,(function(...e){return(null!=e[0]?n:t)(e)}))})),(o=new c(s,n,a,this.jobDefaults,this.rejectOnDrop,this.Events,this._states,this.Promise)).promise.then((function(e){return"function"==typeof i?i(...e):void 0})).catch((function(e){return Array.isArray(e)?"function"==typeof i?i(...e):void 0:"function"==typeof i?i(e):void 0})),this._receive(o)}schedule(...e){var n,i,r;if("function"==typeof e[0]){var o=t(e);r=o[0],e=o.slice(1),i={}}else{var a=t(e);i=a[0],r=a[1],e=a.slice(2)}return n=new c(r,e,i,this.jobDefaults,this.rejectOnDrop,this.Events,this._states,this.Promise),this._receive(n),n.promise}wrap(e){var t,n;return t=this.schedule.bind(this),(n=function(...n){return t(e.bind(this),...n)}).withOptions=function(n,...i){return t(n,e,...i)},n}updateSettings(e={}){var t=this;return o((function*(){return yield t._store.__updateSettings__(h.overwrite(e,t.storeDefaults)),h.overwrite(e,t.instanceDefaults,t),t}))()}currentReservoir(){return this._store.__currentReservoir__()}incrementReservoir(e=0){return this._store.__incrementReservoir__(e)}}return n.default=n,n.Events=s,n.version=n.prototype.version=require$$8.version,n.strategy=n.prototype.strategy={LEAK:1,OVERFLOW:2,OVERFLOW_PRIORITY:4,BLOCK:3},n.BottleneckError=n.prototype.BottleneckError=requireBottleneckError(),n.Group=n.prototype.Group=requireGroup(),n.RedisConnection=n.prototype.RedisConnection=requireRedisConnection(),n.IORedisConnection=n.prototype.IORedisConnection=requireIORedisConnection(),n.Batcher=n.prototype.Batcher=requireBatcher(),n.prototype.jobDefaults={priority:5,weight:1,expiration:null,id:"<no-id>"},n.prototype.storeDefaults={maxConcurrent:null,minTime:0,highWater:null,strategy:n.prototype.strategy.LEAK,penalty:null,reservoir:null,reservoirRefreshInterval:null,reservoirRefreshAmount:null,reservoirIncreaseInterval:null,reservoirIncreaseAmount:null,reservoirIncreaseMaximum:null},n.prototype.localStoreDefaults={Promise:Promise,timeout:null,heartbeatInterval:250},n.prototype.redisStoreDefaults={Promise:Promise,timeout:null,heartbeatInterval:5e3,clientTimeout:1e4,Redis:null,clientOptions:{},clusterNodes:null,clearDatastore:!1,connection:null},n.prototype.instanceDefaults={datastore:"local",connection:null,id:"<no-id>",rejectOnDrop:!0,trackDoneStatus:!1,Promise:Promise},n.prototype.stopDefaults={enqueueErrorMessage:"This limiter has been stopped and cannot accept new jobs.",dropWaitingJobs:!0,dropErrorMessage:"This limiter has been stopped."},n}.call(void 0),Bottleneck_1=a}function requireLib(){return hasRequiredLib?lib:(hasRequiredLib=1,lib=requireBottleneck())}var libExports=requireLib(),Bottleneck=getDefaultExportFromCjs(libExports);const DEFAULT_AWS_CONFIGURATION={region:"eu-central-2"},splitEvery=(e,t)=>Array.from({length:Math.ceil(t.length/e)}).map(((n,i)=>t.slice(i*e,i*e+e))),until=async(e,t,n,i=0)=>{const r=await t(n,i);return await e(r,i)?r:until(e,t,r,i+1)},DEFAULT_BATCH_ITEMS_MAX_RETRIES=50;let queue;const makeKey=e=>"string"==typeof e?{id:e}:e,deleteItem=async(e,t,n,i,r={})=>{try{const{ReturnValues:o="NONE"}=r,a=new DeleteCommand({Key:makeKey(i),ReturnValues:o,TableName:e.tableNamePrefix+n});return(await queue.schedule((()=>t.send(a)))).Attributes}catch(t){return void(e.logger&&e.logger("error",t))}},getItem=async(e,t,n,i,r={})=>{try{const{ConsistentRead:o=!1}=r,a=new GetCommand({ConsistentRead:o,Key:makeKey(i),TableName:e.tableNamePrefix+n});return(await queue.schedule((()=>t.send(a)))).Item}catch(t){return void(e.logger&&e.logger("error",t))}},putItem=async(e,t,n,i)=>{try{const{expires:r,...o}=i,a=new PutCommand({Item:null===r?o:i,TableName:e.tableNamePrefix+n});return await queue.schedule((()=>t.send(a)))&&i}catch(t){return void(e.logger&&e.logger("error",t))}},updateItem=async(e,t,n,i,r={})=>{try{const o=new UpdateCommand({Key:makeKey(i),...r,ReturnValues:"ALL_NEW",TableName:e.tableNamePrefix+n});return(await queue.schedule((async()=>t.send(o)))).Attributes}catch(t){return void(e.logger&&e.logger("error",t))}},hasNoUnprocessedItems=({UnprocessedItems:e})=>!e||0===Object.keys(e).length,makeBatchWriteRequestWithExponentialBackoff=(e,t,n)=>async(i,r)=>{if(r>n)throw new Error("Reached maximum number of DynamoDB BatchWrite request retries.");const o=new BatchWriteCommand({RequestItems:i.UnprocessedItems??{[t]:i.map((e=>({PutRequest:{Item:e}})))},ReturnConsumedCapacity:"TOTAL",ReturnItemCollectionMetrics:"SIZE"});return e.send(o)},batchWriteItems=async(e,t,n,i)=>{try{const r=splitEvery(25,i);return await Promise.all(r.map((async i=>queue.schedule((async()=>until(hasNoUnprocessedItems,makeBatchWriteRequestWithExponentialBackoff(t,e.tableNamePrefix+n,e.batchWriteMaxRetries??DEFAULT_BATCH_ITEMS_MAX_RETRIES),i))))))&&i}catch(t){return void(e.logger&&e.logger("error",t))}},scanTable=async(e,t,n,i={})=>{try{const{ConsistentRead:r=!1}=i,o=new ScanCommand({...i,ConsistentRead:r,TableName:e.tableNamePrefix+n});return await queue.schedule((()=>t.send(o)))}catch(t){return void(e.logger&&e.logger("error",t))}},queryTable=async(e,t,n,i={})=>{try{const{ConsistentRead:r=!1}=i,o=new QueryCommand({...i,ConsistentRead:r,TableName:e.tableNamePrefix+n});return await queue.schedule((()=>t.send(o)))}catch(t){return void(e.logger&&e.logger("error",t))}},dynamodb=e=>{const{clientConfig:t,...n}={...DEFAULT_AWS_CONFIGURATION,...e},i=new DynamoDBClient(n.dockerConfig?{credentials:{accessKeyId:"foobarkey",secretAccessKey:"foobarsecret"},endpoint:n.dockerConfig.endpoint,region:"local",retryMode:"standard"}:{retryMode:"standard",...t}),r=DynamoDBDocumentClient.from(i);return queue=new Bottleneck({maxConcurrent:n.queueConfig?.queueConcurrency??25,minTime:n.queueConfig?.queueDelay??void 0}),{batchWriteItems:(e,t)=>batchWriteItems(n,r,e,t),deleteItem:(e,t,i)=>deleteItem(n,r,e,t,i),getItem:(e,t,i)=>getItem(n,r,e,t,i),putItem:(e,t)=>putItem(n,r,e,t),queryTable:(e,t)=>queryTable(n,r,e,t),scanTable:(e,t)=>scanTable(n,r,e,t),updateItem:(e,t,i)=>updateItem(n,r,e,t,i)}};function resolveHostHeaderConfig(e){return e}const hostHeaderMiddleware=e=>t=>async n=>{if(!HttpRequest.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)},hostHeaderMiddlewareOptions={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},getHostHeaderPlugin=e=>({applyToStack:t=>{t.add(hostHeaderMiddleware(e),hostHeaderMiddlewareOptions)}}),loggerMiddleware=()=>(e,t)=>async n=>{try{const i=await e(n),{clientName:r,commandName:o,logger:a,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:l}=s,d=c??t.inputFilterSensitiveLog,u=l??t.outputFilterSensitiveLog,{$metadata:p,...m}=i.output;return a?.info?.({clientName:r,commandName:o,input:d(n.input),output:u(m),metadata:p}),i}catch(e){const{clientName:i,commandName:r,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:s}=a,c=s??t.inputFilterSensitiveLog;throw o?.error?.({clientName:i,commandName:r,input:c(n.input),error:e,metadata:e.$metadata}),e}},loggerMiddlewareOptions={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},getLoggerPlugin=e=>({applyToStack:e=>{e.add(loggerMiddleware(),loggerMiddlewareOptions)}}),TRACE_ID_HEADER_NAME="X-Amzn-Trace-Id",ENV_LAMBDA_FUNCTION_NAME="AWS_LAMBDA_FUNCTION_NAME",ENV_TRACE_ID="_X_AMZN_TRACE_ID",recursionDetectionMiddleware=e=>t=>async n=>{const{request:i}=n;if(!HttpRequest.isInstance(i)||"node"!==e.runtime||i.headers.hasOwnProperty(TRACE_ID_HEADER_NAME))return t(n);const r=[][ENV_TRACE_ID],o=e=>"string"==typeof e&&e.length>0;return o([][ENV_LAMBDA_FUNCTION_NAME])&&o(r)&&(i.headers[TRACE_ID_HEADER_NAME]=r),t({...n,request:i})},addRecursionDetectionMiddlewareOptions={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},getRecursionDetectionPlugin=e=>({applyToStack:t=>{t.add(recursionDetectionMiddleware(e),addRecursionDetectionMiddlewareOptions)}}),DEFAULT_UA_APP_ID=void 0;function isValidUserAgentAppId(e){return void 0===e||"string"==typeof e&&e.length<=50}function resolveUserAgentConfig(e){const t=normalizeProvider(e.userAgentAppId??DEFAULT_UA_APP_ID);return{...e,customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent,userAgentAppId:async()=>{const n=await t();if(!isValidUserAgentAppId(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}}}const isVirtualHostableS3Bucket=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!isVirtualHostableS3Bucket(t))return!1;return!0}return!!isValidHostLabel(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!isIpAddress(e)))},ARN_DELIMITER=":",RESOURCE_DELIMITER="/",parseArn=e=>{const t=e.split(ARN_DELIMITER);if(t.length<6)return null;const[n,i,r,o,a,...s]=t;if("arn"!==n||""===i||""===r||""===s.join(ARN_DELIMITER))return null;return{partition:i,service:r,region:o,accountId:a,resourceId:s.map((e=>e.split(RESOURCE_DELIMITER))).flat()}},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)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version$5="1.1";var partitionsInfo={partitions:partitions,version:version$5};let selectedPartitionsInfo=partitionsInfo;const partition=e=>{const{partitions:t}=selectedPartitionsInfo;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}},awsEndpointFunctions={isVirtualHostableS3Bucket:isVirtualHostableS3Bucket,parseArn:parseArn,partition:partition};function setCredentialFeature(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}function setFeature(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}customEndpointFunctions.aws=awsEndpointFunctions;const getDateHeader=e=>HttpResponse.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,getSkewCorrectedDate=e=>new Date(Date.now()+e),isClockSkewed=(e,t)=>Math.abs(getSkewCorrectedDate(t).getTime()-e)>=3e5,getUpdatedSystemClockOffset=(e,t)=>{const n=Date.parse(e);return isClockSkewed(n,t)?n-Date.now():t},throwSigningPropertyError=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},validateSigningProperties=async e=>{const t=throwSigningPropertyError("context",e.context),n=throwSigningPropertyError("config",e.config),i=t.endpointV2?.properties?.authSchemes?.[0],r=throwSigningPropertyError("signer",n.signer),o=await r(i),a=e?.signingRegion,s=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:o,signingRegion:a,signingRegionSet:s,signingName:c}};class AwsSdkSigV4Signer{async sign(e,t,n){if(!HttpRequest.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await validateSigningProperties(n),{config:r,signer:o}=i;let{signingRegion:a,signingName:s}=i;const c=n.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(a=t?.signingRegion??a,s=t?.signingName??s)}return await o.sign(e,{signingDate:getSkewCorrectedDate(r.systemClockOffset),signingRegion:a,signingService:s})}errorHandler(e){return t=>{const n=t.ServerTime??getDateHeader(t.$response);if(n){const i=throwSigningPropertyError("config",e.config),r=i.systemClockOffset;i.systemClockOffset=getUpdatedSystemClockOffset(n,i.systemClockOffset);i.systemClockOffset!==r&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=getDateHeader(e);if(n){const e=throwSigningPropertyError("config",t.config);e.systemClockOffset=getUpdatedSystemClockOffset(n,e.systemClockOffset)}}}const resolveAwsSdkSigV4Config=e=>{let t,n=!1;e.credentials&&(n=!0,t=memoizeIdentityProvider(e.credentials,isIdentityExpired,doesIdentityRequireRefresh)),t||(t=e.credentialDefaultProvider?normalizeProvider(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 a;return a=e.signer?normalizeProvider(e.signer):e.regionInfoProvider?()=>normalizeProvider(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([n,r])=>{const{signingRegion:a,signingService:s}=n;e.signingRegion=e.signingRegion||a||r,e.signingName=e.signingName||s||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||SignatureV4)(c)})):async n=>{const r=(n=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await normalizeProvider(e.region)(),properties:{}},n)).signingRegion,a=n.signingName;e.signingRegion=e.signingRegion||r,e.signingName=e.signingName||a||e.serviceId;const s={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||SignatureV4)(s)},{...e,systemClockOffset:r,signingEscapePath:i,credentials:n?async()=>t().then((e=>setCredentialFeature(e,"CREDENTIALS_CODE","e"))):t,signer:a}},collectBodyString=(e,t)=>collectBody(e,t).then((e=>t.utf8Encoder(e))),parseJsonBody=(e,t)=>collectBodyString(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{}})),parseJsonErrorBody=async(e,t)=>{const n=await parseJsonBody(e,t);return n.message=n.message??n.Message,n},loadRestJsonErrorCode=(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},parseXmlBody=(e,t)=>collectBodyString(e,t).then((e=>{if(e.length){const t=new fxpExports.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]),getValueFromTextNode(o)}return{}})),parseXmlErrorBody=async(e,t)=>{const n=await parseXmlBody(e,t);return n.Error&&(n.Error.message=n.Error.message??n.Error.Message),n},ACCOUNT_ID_ENDPOINT_REGEX=/\d{12}\.ddb/;async function checkFeatures(e,t,n){const i=n.request;if("rpc-v2-cbor"===i?.headers?.["smithy-protocol"]&&setFeature(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?setFeature(e,"RETRY_MODE_ADAPTIVE","F"):setFeature(e,"RETRY_MODE_STANDARD","E"):setFeature(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)&&setFeature(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":setFeature(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":setFeature(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":setFeature(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const r=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(r?.$source){const t=r;t.accountId&&setFeature(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,i]of Object.entries(t.$source??{}))setFeature(e,n,i)}}const USER_AGENT="user-agent",X_AMZ_USER_AGENT="x-amz-user-agent",SPACE=" ",UA_NAME_SEPARATOR="/",UA_NAME_ESCAPE_REGEX=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,UA_VALUE_ESCAPE_REGEX=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,UA_ESCAPE_CHAR="-",BYTE_LIMIT=1024;function encodeFeatures(e){let t="";for(const n in e){const i=e[n];if(!(t.length+i.length+1<=BYTE_LIMIT))break;t.length?t+=","+i:t+=i}return t}const userAgentMiddleware=e=>(t,n)=>async i=>{const{request:r}=i;if(!HttpRequest.isInstance(r))return t(i);const{headers:o}=r,a=n?.userAgent?.map(escapeUserAgent)||[],s=(await e.defaultUserAgentProvider()).map(escapeUserAgent);await checkFeatures(n,e,i);const c=n;s.push(`m/${encodeFeatures(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const l=e?.customUserAgent?.map(escapeUserAgent)||[],d=await e.userAgentAppId();d&&s.push(escapeUserAgent([`app/${d}`]));const u=[].concat([...s,...a,...l]).join(SPACE),p=[...s.filter((e=>e.startsWith("aws-sdk-"))),...l].join(SPACE);return"browser"!==e.runtime?(p&&(o[X_AMZ_USER_AGENT]=o[X_AMZ_USER_AGENT]?`${o[USER_AGENT]} ${p}`:p),o[USER_AGENT]=u):o[X_AMZ_USER_AGENT]=u,t({...i,request:r})},escapeUserAgent=e=>{const t=e[0].split(UA_NAME_SEPARATOR).map((e=>e.replace(UA_NAME_ESCAPE_REGEX,UA_ESCAPE_CHAR))).join(UA_NAME_SEPARATOR),n=e[1]?.replace(UA_VALUE_ESCAPE_REGEX,UA_ESCAPE_CHAR),i=t.indexOf(UA_NAME_SEPARATOR),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}`}}),"")},getUserAgentMiddlewareOptions={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},getUserAgentPlugin=e=>({applyToStack:t=>{t.add(userAgentMiddleware(e),getUserAgentMiddlewareOptions)}}),resolveEventStreamSerdeConfig=e=>({...e,eventStreamMarshaller:e.eventStreamSerdeProvider(e)}),defaultLambdaHttpAuthSchemeParametersProvider=async(e,t,n)=>({operation:getSmithyContext(t).operation,region:await normalizeProvider$1(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function createAwsAuthSigv4HttpAuthOption$2(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"lambda",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}const defaultLambdaHttpAuthSchemeProvider=e=>{const t=[];return e.operation,t.push(createAwsAuthSigv4HttpAuthOption$2(e)),t},resolveHttpAuthSchemeConfig$2=e=>({...resolveAwsSdkSigV4Config(e)}),resolveClientEndpointParameters$2=e=>({...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"lambda"}),commonParams$2={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},name$4="@aws-sdk/client-lambda",description$4="AWS SDK for JavaScript Lambda Client for Node.js, Browser and React Native",version$4="3.693.0",scripts$4={build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-lambda","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo lambda"},main$4="./dist-cjs/index.js",types$3="./dist-types/index.d.ts",module$2="./dist-es/index.js",sideEffects$2=!1,dependencies$3={"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.693.0","@aws-sdk/client-sts":"3.693.0","@aws-sdk/core":"3.693.0","@aws-sdk/credential-provider-node":"3.693.0","@aws-sdk/middleware-host-header":"3.693.0","@aws-sdk/middleware-logger":"3.693.0","@aws-sdk/middleware-recursion-detection":"3.693.0","@aws-sdk/middleware-user-agent":"3.693.0","@aws-sdk/region-config-resolver":"3.693.0","@aws-sdk/types":"3.692.0","@aws-sdk/util-endpoints":"3.693.0","@aws-sdk/util-user-agent-browser":"3.693.0","@aws-sdk/util-user-agent-node":"3.693.0","@smithy/config-resolver":"^3.0.11","@smithy/core":"^2.5.2","@smithy/eventstream-serde-browser":"^3.0.12","@smithy/eventstream-serde-config-resolver":"^3.0.9","@smithy/eventstream-serde-node":"^3.0.11","@smithy/fetch-http-handler":"^4.1.0","@smithy/hash-node":"^3.0.9","@smithy/invalid-dependency":"^3.0.9","@smithy/middleware-content-length":"^3.0.11","@smithy/middleware-endpoint":"^3.2.2","@smithy/middleware-retry":"^3.0.26","@smithy/middleware-serde":"^3.0.9","@smithy/middleware-stack":"^3.0.9","@smithy/node-config-provider":"^3.1.10","@smithy/node-http-handler":"^3.3.0","@smithy/protocol-http":"^4.1.6","@smithy/smithy-client":"^3.4.3","@smithy/types":"^3.7.0","@smithy/url-parser":"^3.0.9","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.26","@smithy/util-defaults-mode-node":"^3.0.26","@smithy/util-endpoints":"^2.1.5","@smithy/util-middleware":"^3.0.9","@smithy/util-retry":"^3.0.9","@smithy/util-stream":"^3.3.0","@smithy/util-utf8":"^3.0.0","@smithy/util-waiter":"^3.1.8",tslib:"^2.6.2"},devDependencies$4={"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines$4={node:">=16.0.0"},typesVersions$2={"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files$2=["dist-*/**"],author$4={name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license$4="Apache-2.0",browser$6={"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},homepage$3="https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-lambda",repository$4={type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-lambda"};var packageInfo$2={name:name$4,description:description$4,version:version$4,scripts:scripts$4,main:main$4,types:types$3,module:module$2,sideEffects:sideEffects$2,dependencies:dependencies$3,devDependencies:devDependencies$4,engines:engines$4,typesVersions:typesVersions$2,files:files$2,author:author$4,license:license$4,browser:browser$6,"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:homepage$3,repository:repository$4};const createDefaultUserAgentProvider=({serviceId:e,clientVersion:t})=>async n=>{const i="undefined"!=typeof window&&window?.navigator?.userAgent?bowser.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};var Crc32=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var i=__values(e),r=i.next();!r.done;r=i.next()){var o=r.value;this.checksum=this.checksum>>>8^lookupTable[255&(this.checksum^o)]}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),a_lookUpTable=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],lookupTable=uint32ArrayFrom(a_lookUpTable),HEADER_VALUE_TYPE;class Int64{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&&negate(t),new Int64(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&negate(e),parseInt(toHex(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function negate(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class HeaderMarshaller{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const n of Object.keys(e)){const i=this.fromUtf8(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 a=this.fromUtf8(e.value),s=new DataView(new ArrayBuffer(3+a.byteLength));s.setUint8(0,7),s.setUint16(1,a.byteLength,!1);const c=new Uint8Array(s.buffer);return c.set(a,3),c;case"timestamp":const l=new Uint8Array(9);return l[0]=8,l.set(Int64.fromNumber(e.value.valueOf()).bytes,1),l;case"uuid":if(!UUID_PATTERN.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(fromHex(e.value.replace(/\-/g,"")),1),d}}parse(e){const t={};let n=0;for(;n<e.byteLength;){const i=e.getUint8(n++),r=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,i));switch(n+=i,e.getUint8(n++)){case 0:t[r]={type:BOOLEAN_TAG,value:!0};break;case 1:t[r]={type:BOOLEAN_TAG,value:!1};break;case 2:t[r]={type:BYTE_TAG,value:e.getInt8(n++)};break;case 3:t[r]={type:SHORT_TAG,value:e.getInt16(n,!1)},n+=2;break;case 4:t[r]={type:INT_TAG,value:e.getInt32(n,!1)},n+=4;break;case 5:t[r]={type:LONG_TAG,value:new Int64(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const i=e.getUint16(n,!1);n+=2,t[r]={type:BINARY_TAG,value:new Uint8Array(e.buffer,e.byteOffset+n,i)},n+=i;break;case 7:const o=e.getUint16(n,!1);n+=2,t[r]={type:STRING_TAG,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,o))},n+=o;break;case 8:t[r]={type:TIMESTAMP_TAG,value:new Date(new Int64(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:const a=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,t[r]={type:UUID_TAG,value:`${toHex(a.subarray(0,4))}-${toHex(a.subarray(4,6))}-${toHex(a.subarray(6,8))}-${toHex(a.subarray(8,10))}-${toHex(a.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}!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"}(HEADER_VALUE_TYPE||(HEADER_VALUE_TYPE={}));const BOOLEAN_TAG="boolean",BYTE_TAG="byte",SHORT_TAG="short",INT_TAG="integer",LONG_TAG="long",BINARY_TAG="binary",STRING_TAG="string",TIMESTAMP_TAG="timestamp",UUID_TAG="uuid",UUID_PATTERN=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,PRELUDE_MEMBER_LENGTH=4,PRELUDE_LENGTH=2*PRELUDE_MEMBER_LENGTH,CHECKSUM_LENGTH=4,MINIMUM_MESSAGE_LENGTH=PRELUDE_LENGTH+2*CHECKSUM_LENGTH;function splitMessage({byteLength:e,byteOffset:t,buffer:n}){if(e<MINIMUM_MESSAGE_LENGTH)throw new Error("Provided message too short to accommodate event stream message overhead");const i=new DataView(n,t,e),r=i.getUint32(0,!1);if(e!==r)throw new Error("Reported message length does not match received message length");const o=i.getUint32(PRELUDE_MEMBER_LENGTH,!1),a=i.getUint32(PRELUDE_LENGTH,!1),s=i.getUint32(e-CHECKSUM_LENGTH,!1),c=(new Crc32).update(new Uint8Array(n,t,PRELUDE_LENGTH));if(a!==c.digest())throw new Error(`The prelude checksum specified in the message (${a}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(n,t+PRELUDE_LENGTH,e-(PRELUDE_LENGTH+CHECKSUM_LENGTH))),s!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${s}`);return{headers:new DataView(n,t+PRELUDE_LENGTH+CHECKSUM_LENGTH,o),body:new Uint8Array(n,t+PRELUDE_LENGTH+CHECKSUM_LENGTH+o,r-o-(PRELUDE_LENGTH+CHECKSUM_LENGTH+CHECKSUM_LENGTH))}}class EventStreamCodec{constructor(e,t){this.headerMarshaller=new HeaderMarshaller(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const n=this.headerMarshaller.format(e),i=n.byteLength+t.byteLength+16,r=new Uint8Array(i),o=new DataView(r.buffer,r.byteOffset,r.byteLength),a=new Crc32;return o.setUint32(0,i,!1),o.setUint32(4,n.byteLength,!1),o.setUint32(8,a.update(r.subarray(0,8)).digest(),!1),r.set(n,12),r.set(t,n.byteLength+12),o.setUint32(i-4,a.update(r.subarray(8,i-4)).digest(),!1),r}decode(e){const{headers:t,body:n}=splitMessage(e);return{headers:this.headerMarshaller.parse(t),body:n}}formatHeaders(e){return this.headerMarshaller.format(e)}}class MessageDecoderStream{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.decoder.decode(e);yield t}}}class MessageEncoderStream{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}class SmithyMessageDecoderStream{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}class SmithyMessageEncoderStream{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}function getChunkedStream(e){let t=0,n=0,i=null,r=null;const o=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,n=4,i=new Uint8Array(e);new DataView(i.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const a=e[Symbol.asyncIterator]();for(;;){const{value:e,done:s}=await a.next();if(s){if(!t)return;if(t!==n)throw new Error("Truncated event message received.");return void(yield i)}const c=e.length;let l=0;for(;l<c;){if(!i){const t=c-l;r||(r=new Uint8Array(4));const i=Math.min(4-n,t);if(r.set(e.slice(l,l+i),n),n+=i,l+=i,n<4)break;o(new DataView(r.buffer).getUint32(0,!1)),r=null}const a=Math.min(t-n,c-l);i.set(e.slice(l,l+a),n),n+=a,l+=a,t&&t===n&&(yield i,i=null,t=0,n=0)}}}}}function getMessageUnmarshaller(e,t){return async function(n){const{value:i}=n.headers[":message-type"];if("error"===i){const e=new Error(n.headers[":error-message"].value||"UnknownError");throw e.name=n.headers[":error-code"].value,e}if("exception"===i){const i=n.headers[":exception-type"].value,r={[i]:n},o=await e(r);if(o.$unknown){const e=new Error(t(n.body));throw e.name=i,e}throw o[i]}if("event"===i){const t={[n.headers[":event-type"].value]:n},i=await e(t);if(i.$unknown)return;return i}throw Error(`Unrecognizable event type: ${n.headers[":event-type"].value}`)}}let EventStreamMarshaller$1=class{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new EventStreamCodec(e,t),this.utfEncoder=e}deserialize(e,t){const n=getChunkedStream(e);return new SmithyMessageDecoderStream({messageStream:new MessageDecoderStream({inputStream:n,decoder:this.eventStreamCodec}),deserializer:getMessageUnmarshaller(t,this.utfEncoder)})}serialize(e,t){return new MessageEncoderStream({messageStream:new SmithyMessageEncoderStream({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}};const readableStreamtoIterable=e=>({[Symbol.asyncIterator]:async function*(){const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)return;yield n}}finally{t.releaseLock()}}}),iterableToReadableStream=e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){const{done:n,value:i}=await t.next();if(n)return e.close();e.enqueue(i)}})};class EventStreamMarshaller{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new EventStreamMarshaller$1({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n=isReadableStream(e)?readableStreamtoIterable(e):e;return this.universalMarshaller.deserialize(n,t)}serialize(e,t){const n=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?iterableToReadableStream(n):n}}const isReadableStream=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,eventStreamSerdeProvider=e=>new EventStreamMarshaller(e),s$2="required",t$2="fn",u$2="argv",v$2="ref",a$2=!0,b$2="isSet",c$2="booleanEquals",d$2="error",e$2="endpoint",f$2="tree",g$2="PartitionResult",h$2={[s$2]:!1,type:"String"},i$2={[s$2]:!0,default:!1,type:"Boolean"},j$2={[v$2]:"Endpoint"},k$2={[t$2]:c$2,[u$2]:[{[v$2]:"UseFIPS"},!0]},l$2={[t$2]:c$2,[u$2]:[{[v$2]:"UseDualStack"},!0]},m$2={},n$2={[t$2]:"getAttr",[u$2]:[{[v$2]:g$2},"supportsFIPS"]},o$2={[t$2]:c$2,[u$2]:[!0,{[t$2]:"getAttr",[u$2]:[{[v$2]:g$2},"supportsDualStack"]}]},p$2=[k$2],q$2=[l$2],r$2=[{[v$2]:"Region"}],_data$2={version:"1.0",parameters:{Region:h$2,UseDualStack:i$2,UseFIPS:i$2,Endpoint:h$2},rules:[{conditions:[{[t$2]:b$2,[u$2]:[j$2]}],rules:[{conditions:p$2,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d$2},{conditions:q$2,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d$2},{endpoint:{url:j$2,properties:m$2,headers:m$2},type:e$2}],type:f$2},{conditions:[{[t$2]:b$2,[u$2]:r$2}],rules:[{conditions:[{[t$2]:"aws.partition",[u$2]:r$2,assign:g$2}],rules:[{conditions:[k$2,l$2],rules:[{conditions:[{[t$2]:c$2,[u$2]:[a$2,n$2]},o$2],rules:[{endpoint:{url:"https://lambda-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m$2,headers:m$2},type:e$2}],type:f$2},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d$2}],type:f$2},{conditions:p$2,rules:[{conditions:[{[t$2]:c$2,[u$2]:[n$2,a$2]}],rules:[{endpoint:{url:"https://lambda-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m$2,headers:m$2},type:e$2}],type:f$2},{error:"FIPS is enabled but this partition does not support FIPS",type:d$2}],type:f$2},{conditions:q$2,rules:[{conditions:[o$2],rules:[{endpoint:{url:"https://lambda.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m$2,headers:m$2},type:e$2}],type:f$2},{error:"DualStack is enabled but this partition does not support DualStack",type:d$2}],type:f$2},{endpoint:{url:"https://lambda.{Region}.{PartitionResult#dnsSuffix}",properties:m$2,headers:m$2},type:e$2}],type:f$2}],type:f$2},{error:"Invalid Configuration: Missing Region",type:d$2}]},ruleSet$2=_data$2,cache$2=new EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),defaultEndpointResolver$2=(e,t={})=>cache$2.get(e,(()=>resolveEndpoint(ruleSet$2,{endpointParams:e,logger:t.logger})));customEndpointFunctions.aws=awsEndpointFunctions;const getRuntimeConfig$5=e=>({apiVersion:"2015-03-31",base64Decoder:e?.base64Decoder??fromBase64,base64Encoder:e?.base64Encoder??toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??defaultEndpointResolver$2,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??defaultLambdaHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new AwsSdkSigV4Signer}],logger:e?.logger??new NoOpLogger,serviceId:e?.serviceId??"Lambda",urlParser:e?.urlParser??parseUrl,utf8Decoder:e?.utf8Decoder??fromUtf8$2,utf8Encoder:e?.utf8Encoder??toUtf8}),getRuntimeConfig$4=e=>{const t=resolveDefaultsModeConfig(e),n=()=>t().then(loadConfigsForDefaultMode),i=getRuntimeConfig$5(e);return{...i,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??calculateBodyLength,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??createDefaultUserAgentProvider({serviceId:i.serviceId,clientVersion:packageInfo$2.version}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??eventStreamSerdeProvider,maxAttempts:e?.maxAttempts??DEFAULT_MAX_ATTEMPTS,region:e?.region??invalidProvider("Region is missing"),requestHandler:FetchHttpHandler.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||DEFAULT_RETRY_MODE),sha256:e?.sha256??Sha256,streamCollector:e?.streamCollector??streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT))}},getAwsRegionExtensionConfiguration=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}},resolveAwsRegionExtensionConfiguration=e=>({region:e.region()}),getHttpAuthExtensionConfiguration$2=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}},resolveHttpAuthRuntimeConfig$2=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),asPartial$2=e=>e,resolveRuntimeExtensions$2=(e,t)=>{const n={...asPartial$2(getAwsRegionExtensionConfiguration(e)),...asPartial$2(getDefaultExtensionConfiguration(e)),...asPartial$2(getHttpHandlerExtensionConfiguration(e)),...asPartial$2(getHttpAuthExtensionConfiguration$2(e))};return t.forEach((e=>e.configure(n))),{...e,...resolveAwsRegionExtensionConfiguration(n),...resolveDefaultRuntimeConfig(n),...resolveHttpHandlerRuntimeConfig(n),...resolveHttpAuthRuntimeConfig$2(n)}};class LambdaClient extends Client{constructor(...[e]){const t=getRuntimeConfig$4(e||{}),n=resolveUserAgentConfig(resolveClientEndpointParameters$2(t)),i=resolveRetryConfig(n),r=resolveHostHeaderConfig(resolveRegionConfig(i)),o=resolveEndpointConfig(r),a=resolveEventStreamSerdeConfig(o),s=resolveHttpAuthSchemeConfig$2(a),c=resolveRuntimeExtensions$2(s,e?.extensions||[]);super(c),this.config=c,this.middlewareStack.use(getUserAgentPlugin(this.config)),this.middlewareStack.use(getRetryPlugin(this.config)),this.middlewareStack.use(getContentLengthPlugin(this.config)),this.middlewareStack.use(getHostHeaderPlugin(this.config)),this.middlewareStack.use(getLoggerPlugin(this.config)),this.middlewareStack.use(getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:defaultLambdaHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async e=>new DefaultIdentityProviderConfig({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class LambdaServiceException extends ServiceException$1{constructor(e){super(e),Object.setPrototypeOf(this,LambdaServiceException.prototype)}}class InvalidParameterValueException extends LambdaServiceException{constructor(e){super({name:"InvalidParameterValueException",$fault:"client",...e}),this.name="InvalidParameterValueException",this.$fault="client",Object.setPrototypeOf(this,InvalidParameterValueException.prototype),this.Type=e.Type}}class PolicyLengthExceededException extends LambdaServiceException{constructor(e){super({name:"PolicyLengthExceededException",$fault:"client",...e}),this.name="PolicyLengthExceededException",this.$fault="client",Object.setPrototypeOf(this,PolicyLengthExceededException.prototype),this.Type=e.Type}}class PreconditionFailedException extends LambdaServiceException{constructor(e){super({name:"PreconditionFailedException",$fault:"client",...e}),this.name="PreconditionFailedException",this.$fault="client",Object.setPrototypeOf(this,PreconditionFailedException.prototype),this.Type=e.Type}}class ResourceConflictException extends LambdaServiceException{constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),this.name="ResourceConflictException",this.$fault="client",Object.setPrototypeOf(this,ResourceConflictException.prototype),this.Type=e.Type}}let ResourceNotFoundException$1=class e extends LambdaServiceException{constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.Type=t.Type,this.Message=t.Message}};class ServiceException extends LambdaServiceException{constructor(e){super({name:"ServiceException",$fault:"server",...e}),this.name="ServiceException",this.$fault="server",Object.setPrototypeOf(this,ServiceException.prototype),this.Type=e.Type,this.Message=e.Message}}class TooManyRequestsException extends LambdaServiceException{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,TooManyRequestsException.prototype),this.retryAfterSeconds=e.retryAfterSeconds,this.Type=e.Type,this.Reason=e.Reason}}class CodeSigningConfigNotFoundException extends LambdaServiceException{constructor(e){super({name:"CodeSigningConfigNotFoundException",$fault:"client",...e}),this.name="CodeSigningConfigNotFoundException",this.$fault="client",Object.setPrototypeOf(this,CodeSigningConfigNotFoundException.prototype),this.Type=e.Type,this.Message=e.Message}}class CodeStorageExceededException extends LambdaServiceException{constructor(e){super({name:"CodeStorageExceededException",$fault:"client",...e}),this.name="CodeStorageExceededException",this.$fault="client",Object.setPrototypeOf(this,CodeStorageExceededException.prototype),this.Type=e.Type}}class CodeVerificationFailedException extends LambdaServiceException{constructor(e){super({name:"CodeVerificationFailedException",$fault:"client",...e}),this.name="CodeVerificationFailedException",this.$fault="client",Object.setPrototypeOf(this,CodeVerificationFailedException.prototype),this.Type=e.Type,this.Message=e.Message}}class InvalidCodeSignatureException extends LambdaServiceException{constructor(e){super({name:"InvalidCodeSignatureException",$fault:"client",...e}),this.name="InvalidCodeSignatureException",this.$fault="client",Object.setPrototypeOf(this,InvalidCodeSignatureException.prototype),this.Type=e.Type,this.Message=e.Message}}let ResourceInUseException$1=class e extends LambdaServiceException{constructor(t){super({name:"ResourceInUseException",$fault:"client",...t}),this.name="ResourceInUseException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.Type=t.Type,this.Message=t.Message}};class ProvisionedConcurrencyConfigNotFoundException extends LambdaServiceException{constructor(e){super({name:"ProvisionedConcurrencyConfigNotFoundException",$fault:"client",...e}),this.name="ProvisionedConcurrencyConfigNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ProvisionedConcurrencyConfigNotFoundException.prototype),this.Type=e.Type}}class EC2AccessDeniedException extends LambdaServiceException{constructor(e){super({name:"EC2AccessDeniedException",$fault:"server",...e}),this.name="EC2AccessDeniedException",this.$fault="server",Object.setPrototypeOf(this,EC2AccessDeniedException.prototype),this.Type=e.Type,this.Message=e.Message}}class EC2ThrottledException extends LambdaServiceException{constructor(e){super({name:"EC2ThrottledException",$fault:"server",...e}),this.name="EC2ThrottledException",this.$fault="server",Object.setPrototypeOf(this,EC2ThrottledException.prototype),this.Type=e.Type,this.Message=e.Message}}class EC2UnexpectedException extends LambdaServiceException{constructor(e){super({name:"EC2UnexpectedException",$fault:"server",...e}),this.name="EC2UnexpectedException",this.$fault="server",Object.setPrototypeOf(this,EC2UnexpectedException.prototype),this.Type=e.Type,this.Message=e.Message,this.EC2ErrorCode=e.EC2ErrorCode}}class EFSIOException extends LambdaServiceException{constructor(e){super({name:"EFSIOException",$fault:"client",...e}),this.name="EFSIOException",this.$fault="client",Object.setPrototypeOf(this,EFSIOException.prototype),this.Type=e.Type,this.Message=e.Message}}class EFSMountConnectivityException extends LambdaServiceException{constructor(e){super({name:"EFSMountConnectivityException",$fault:"client",...e}),this.name="EFSMountConnectivityException",this.$fault="client",Object.setPrototypeOf(this,EFSMountConnectivityException.prototype),this.Type=e.Type,this.Message=e.Message}}class EFSMountFailureException extends LambdaServiceException{constructor(e){super({name:"EFSMountFailureException",$fault:"client",...e}),this.name="EFSMountFailureException",this.$fault="client",Object.setPrototypeOf(this,EFSMountFailureException.prototype),this.Type=e.Type,this.Message=e.Message}}class EFSMountTimeoutException extends LambdaServiceException{constructor(e){super({name:"EFSMountTimeoutException",$fault:"client",...e}),this.name="EFSMountTimeoutException",this.$fault="client",Object.setPrototypeOf(this,EFSMountTimeoutException.prototype),this.Type=e.Type,this.Message=e.Message}}class ENILimitReachedException extends LambdaServiceException{constructor(e){super({name:"ENILimitReachedException",$fault:"server",...e}),this.name="ENILimitReachedException",this.$fault="server",Object.setPrototypeOf(this,ENILimitReachedException.prototype),this.Type=e.Type,this.Message=e.Message}}class InvalidRequestContentException extends LambdaServiceException{constructor(e){super({name:"InvalidRequestContentException",$fault:"client",...e}),this.name="InvalidRequestContentException",this.$fault="client",Object.setPrototypeOf(this,InvalidRequestContentException.prototype),this.Type=e.Type}}class InvalidRuntimeException extends LambdaServiceException{constructor(e){super({name:"InvalidRuntimeException",$fault:"server",...e}),this.name="InvalidRuntimeException",this.$fault="server",Object.setPrototypeOf(this,InvalidRuntimeException.prototype),this.Type=e.Type,this.Message=e.Message}}class InvalidSecurityGroupIDException extends LambdaServiceException{constructor(e){super({name:"InvalidSecurityGroupIDException",$fault:"server",...e}),this.name="InvalidSecurityGroupIDException",this.$fault="server",Object.setPrototypeOf(this,InvalidSecurityGroupIDException.prototype),this.Type=e.Type,this.Message=e.Message}}class InvalidSubnetIDException extends LambdaServiceException{constructor(e){super({name:"InvalidSubnetIDException",$fault:"server",...e}),this.name="InvalidSubnetIDException",this.$fault="server",Object.setPrototypeOf(this,InvalidSubnetIDException.prototype),this.Type=e.Type,this.Message=e.Message}}class InvalidZipFileException extends LambdaServiceException{constructor(e){super({name:"InvalidZipFileException",$fault:"server",...e}),this.name="InvalidZipFileException",this.$fault="server",Object.setPrototypeOf(this,InvalidZipFileException.prototype),this.Type=e.Type,this.Message=e.Message}}class KMSAccessDeniedException extends LambdaServiceException{constructor(e){super({name:"KMSAccessDeniedException",$fault:"server",...e}),this.name="KMSAccessDeniedException",this.$fault="server",Object.setPrototypeOf(this,KMSAccessDeniedException.prototype),this.Type=e.Type,this.Message=e.Message}}class KMSDisabledException extends LambdaServiceException{constructor(e){super({name:"KMSDisabledException",$fault:"server",...e}),this.name="KMSDisabledException",this.$fault="server",Object.setPrototypeOf(this,KMSDisabledException.prototype),this.Type=e.Type,this.Message=e.Message}}class KMSInvalidStateException extends LambdaServiceException{constructor(e){super({name:"KMSInvalidStateException",$fault:"server",...e}),this.name="KMSInvalidStateException",this.$fault="server",Object.setPrototypeOf(this,KMSInvalidStateException.prototype),this.Type=e.Type,this.Message=e.Message}}class KMSNotFoundException extends LambdaServiceException{constructor(e){super({name:"KMSNotFoundException",$fault:"server",...e}),this.name="KMSNotFoundException",this.$fault="server",Object.setPrototypeOf(this,KMSNotFoundException.prototype),this.Type=e.Type,this.Message=e.Message}}class RecursiveInvocationException extends LambdaServiceException{constructor(e){super({name:"RecursiveInvocationException",$fault:"client",...e}),this.name="RecursiveInvocationException",this.$fault="client",Object.setPrototypeOf(this,RecursiveInvocationException.prototype),this.Type=e.Type,this.Message=e.Message}}class RequestTooLargeException extends LambdaServiceException{constructor(e){super({name:"RequestTooLargeException",$fault:"client",...e}),this.name="RequestTooLargeException",this.$fault="client",Object.setPrototypeOf(this,RequestTooLargeException.prototype),this.Type=e.Type}}class ResourceNotReadyException extends LambdaServiceException{constructor(e){super({name:"ResourceNotReadyException",$fault:"server",...e}),this.name="ResourceNotReadyException",this.$fault="server",Object.setPrototypeOf(this,ResourceNotReadyException.prototype),this.Type=e.Type}}class SnapStartException extends LambdaServiceException{constructor(e){super({name:"SnapStartException",$fault:"client",...e}),this.name="SnapStartException",this.$fault="client",Object.setPrototypeOf(this,SnapStartException.prototype),this.Type=e.Type,this.Message=e.Message}}class SnapStartNotReadyException extends LambdaServiceException{constructor(e){super({name:"SnapStartNotReadyException",$fault:"client",...e}),this.name="SnapStartNotReadyException",this.$fault="client",Object.setPrototypeOf(this,SnapStartNotReadyException.prototype),this.Type=e.Type,this.Message=e.Message}}class SnapStartTimeoutException extends LambdaServiceException{constructor(e){super({name:"SnapStartTimeoutException",$fault:"client",...e}),this.name="SnapStartTimeoutException",this.$fault="client",Object.setPrototypeOf(this,SnapStartTimeoutException.prototype),this.Type=e.Type,this.Message=e.Message}}class SubnetIPAddressLimitReachedException extends LambdaServiceException{constructor(e){super({name:"SubnetIPAddressLimitReachedException",$fault:"server",...e}),this.name="SubnetIPAddressLimitReachedException",this.$fault="server",Object.setPrototypeOf(this,SubnetIPAddressLimitReachedException.prototype),this.Type=e.Type,this.Message=e.Message}}class UnsupportedMediaTypeException extends LambdaServiceException{constructor(e){super({name:"UnsupportedMediaTypeException",$fault:"client",...e}),this.name="UnsupportedMediaTypeException",this.$fault="client",Object.setPrototypeOf(this,UnsupportedMediaTypeException.prototype),this.Type=e.Type}}var InvokeWithResponseStreamResponseEvent;!function(e){e.visit=(e,t)=>void 0!==e.PayloadChunk?t.PayloadChunk(e.PayloadChunk):void 0!==e.InvokeComplete?t.InvokeComplete(e.InvokeComplete):t._(e.$unknown[0],e.$unknown[1])}(InvokeWithResponseStreamResponseEvent||(InvokeWithResponseStreamResponseEvent={}));const InvocationRequestFilterSensitiveLog=e=>({...e,...e.Payload&&{Payload:SENSITIVE_STRING}}),InvocationResponseFilterSensitiveLog=e=>({...e,...e.Payload&&{Payload:SENSITIVE_STRING}}),se_InvokeCommand=async(e,t)=>{const n=requestBuilder(e,t),i=map({},isSerializableHeaderValue,{"content-type":"application/octet-stream",[_xait]:e[_IT$1],[_xalt]:e[_LT$1],[_xacc]:e[_CC]});n.bp("/2015-03-31/functions/{FunctionName}/invocations"),n.p("FunctionName",(()=>e.FunctionName),"{FunctionName}",!1);const r=map({[_Q]:[,e[_Q]]});let o;return void 0!==e.Payload&&(o=e.Payload),n.m("POST").h(i).q(r).b(o),n.build()},de_InvokeCommand=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return de_CommandError$2(e,t);const n=map({$metadata:deserializeMetadata$2(e),[_FE$1]:[,e.headers[_xafe]],[_LR]:[,e.headers[_xalr]],[_EV]:[,e.headers[_xaev]]}),i=await collectBody(e.body,t);return n.Payload=i,map(n,{StatusCode:[,e.statusCode]}),n},de_CommandError$2=async(e,t)=>{const n={...e,body:await parseJsonErrorBody(e.body,t)},i=loadRestJsonErrorCode(e,n.body);switch(i){case"InvalidParameterValueException":case"com.amazonaws.lambda#InvalidParameterValueException":throw await de_InvalidParameterValueExceptionRes(n);case"PolicyLengthExceededException":case"com.amazonaws.lambda#PolicyLengthExceededException":throw await de_PolicyLengthExceededExceptionRes(n);case"PreconditionFailedException":case"com.amazonaws.lambda#PreconditionFailedException":throw await de_PreconditionFailedExceptionRes(n);case"ResourceConflictException":case"com.amazonaws.lambda#ResourceConflictException":throw await de_ResourceConflictExceptionRes(n);case"ResourceNotFoundException":case"com.amazonaws.lambda#ResourceNotFoundException":throw await de_ResourceNotFoundExceptionRes$1(n);case"ServiceException":case"com.amazonaws.lambda#ServiceException":throw await de_ServiceExceptionRes(n);case"TooManyRequestsException":case"com.amazonaws.lambda#TooManyRequestsException":throw await de_TooManyRequestsExceptionRes(n);case"CodeSigningConfigNotFoundException":case"com.amazonaws.lambda#CodeSigningConfigNotFoundException":throw await de_CodeSigningConfigNotFoundExceptionRes(n);case"CodeStorageExceededException":case"com.amazonaws.lambda#CodeStorageExceededException":throw await de_CodeStorageExceededExceptionRes(n);case"CodeVerificationFailedException":case"com.amazonaws.lambda#CodeVerificationFailedException":throw await de_CodeVerificationFailedExceptionRes(n);case"InvalidCodeSignatureException":case"com.amazonaws.lambda#InvalidCodeSignatureException":throw await de_InvalidCodeSignatureExceptionRes(n);case"ResourceInUseException":case"com.amazonaws.lambda#ResourceInUseException":throw await de_ResourceInUseExceptionRes$1(n);case"ProvisionedConcurrencyConfigNotFoundException":case"com.amazonaws.lambda#ProvisionedConcurrencyConfigNotFoundException":throw await de_ProvisionedConcurrencyConfigNotFoundExceptionRes(n);case"EC2AccessDeniedException":case"com.amazonaws.lambda#EC2AccessDeniedException":throw await de_EC2AccessDeniedExceptionRes(n);case"EC2ThrottledException":case"com.amazonaws.lambda#EC2ThrottledException":throw await de_EC2ThrottledExceptionRes(n);case"EC2UnexpectedException":case"com.amazonaws.lambda#EC2UnexpectedException":throw await de_EC2UnexpectedExceptionRes(n);case"EFSIOException":case"com.amazonaws.lambda#EFSIOException":throw await de_EFSIOExceptionRes(n);case"EFSMountConnectivityException":case"com.amazonaws.lambda#EFSMountConnectivityException":throw await de_EFSMountConnectivityExceptionRes(n);case"EFSMountFailureException":case"com.amazonaws.lambda#EFSMountFailureException":throw await de_EFSMountFailureExceptionRes(n);case"EFSMountTimeoutException":case"com.amazonaws.lambda#EFSMountTimeoutException":throw await de_EFSMountTimeoutExceptionRes(n);case"ENILimitReachedException":case"com.amazonaws.lambda#ENILimitReachedException":throw await de_ENILimitReachedExceptionRes(n);case"InvalidRequestContentException":case"com.amazonaws.lambda#InvalidRequestContentException":throw await de_InvalidRequestContentExceptionRes(n);case"InvalidRuntimeException":case"com.amazonaws.lambda#InvalidRuntimeException":throw await de_InvalidRuntimeExceptionRes(n);case"InvalidSecurityGroupIDException":case"com.amazonaws.lambda#InvalidSecurityGroupIDException":throw await de_InvalidSecurityGroupIDExceptionRes(n);case"InvalidSubnetIDException":case"com.amazonaws.lambda#InvalidSubnetIDException":throw await de_InvalidSubnetIDExceptionRes(n);case"InvalidZipFileException":case"com.amazonaws.lambda#InvalidZipFileException":throw await de_InvalidZipFileExceptionRes(n);case"KMSAccessDeniedException":case"com.amazonaws.lambda#KMSAccessDeniedException":throw await de_KMSAccessDeniedExceptionRes(n);case"KMSDisabledException":case"com.amazonaws.lambda#KMSDisabledException":throw await de_KMSDisabledExceptionRes(n);case"KMSInvalidStateException":case"com.amazonaws.lambda#KMSInvalidStateException":throw await de_KMSInvalidStateExceptionRes(n);case"KMSNotFoundException":case"com.amazonaws.lambda#KMSNotFoundException":throw await de_KMSNotFoundExceptionRes(n);case"RecursiveInvocationException":case"com.amazonaws.lambda#RecursiveInvocationException":throw await de_RecursiveInvocationExceptionRes(n);case"RequestTooLargeException":case"com.amazonaws.lambda#RequestTooLargeException":throw await de_RequestTooLargeExceptionRes(n);case"ResourceNotReadyException":case"com.amazonaws.lambda#ResourceNotReadyException":throw await de_ResourceNotReadyExceptionRes(n);case"SnapStartException":case"com.amazonaws.lambda#SnapStartException":throw await de_SnapStartExceptionRes(n);case"SnapStartNotReadyException":case"com.amazonaws.lambda#SnapStartNotReadyException":throw await de_SnapStartNotReadyExceptionRes(n);case"SnapStartTimeoutException":case"com.amazonaws.lambda#SnapStartTimeoutException":throw await de_SnapStartTimeoutExceptionRes(n);case"SubnetIPAddressLimitReachedException":case"com.amazonaws.lambda#SubnetIPAddressLimitReachedException":throw await de_SubnetIPAddressLimitReachedExceptionRes(n);case"UnsupportedMediaTypeException":case"com.amazonaws.lambda#UnsupportedMediaTypeException":throw await de_UnsupportedMediaTypeExceptionRes(n);default:const t=n.body;return throwDefaultError$2({output:e,parsedBody:t,errorCode:i})}},throwDefaultError$2=withBaseException(LambdaServiceException),de_CodeSigningConfigNotFoundExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new CodeSigningConfigNotFoundException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_CodeStorageExceededExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Type:expectString,message:expectString});Object.assign(n,r);const o=new CodeStorageExceededException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_CodeVerificationFailedExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new CodeVerificationFailedException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_EC2AccessDeniedExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new EC2AccessDeniedException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_EC2ThrottledExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new EC2ThrottledException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_EC2UnexpectedExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{EC2ErrorCode:expectString,Message:expectString,Type:expectString});Object.assign(n,r);const o=new EC2UnexpectedException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_EFSIOExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new EFSIOException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_EFSMountConnectivityExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new EFSMountConnectivityException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_EFSMountFailureExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new EFSMountFailureException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_EFSMountTimeoutExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new EFSMountTimeoutException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_ENILimitReachedExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new ENILimitReachedException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_InvalidCodeSignatureExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new InvalidCodeSignatureException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_InvalidParameterValueExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Type:expectString,message:expectString});Object.assign(n,r);const o=new InvalidParameterValueException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_InvalidRequestContentExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Type:expectString,message:expectString});Object.assign(n,r);const o=new InvalidRequestContentException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_InvalidRuntimeExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new InvalidRuntimeException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_InvalidSecurityGroupIDExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new InvalidSecurityGroupIDException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_InvalidSubnetIDExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new InvalidSubnetIDException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_InvalidZipFileExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new InvalidZipFileException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_KMSAccessDeniedExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new KMSAccessDeniedException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_KMSDisabledExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new KMSDisabledException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_KMSInvalidStateExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new KMSInvalidStateException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_KMSNotFoundExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new KMSNotFoundException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_PolicyLengthExceededExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Type:expectString,message:expectString});Object.assign(n,r);const o=new PolicyLengthExceededException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_PreconditionFailedExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Type:expectString,message:expectString});Object.assign(n,r);const o=new PreconditionFailedException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_ProvisionedConcurrencyConfigNotFoundExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Type:expectString,message:expectString});Object.assign(n,r);const o=new ProvisionedConcurrencyConfigNotFoundException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_RecursiveInvocationExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new RecursiveInvocationException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_RequestTooLargeExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Type:expectString,message:expectString});Object.assign(n,r);const o=new RequestTooLargeException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_ResourceConflictExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Type:expectString,message:expectString});Object.assign(n,r);const o=new ResourceConflictException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_ResourceInUseExceptionRes$1=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new ResourceInUseException$1({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_ResourceNotFoundExceptionRes$1=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new ResourceNotFoundException$1({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_ResourceNotReadyExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Type:expectString,message:expectString});Object.assign(n,r);const o=new ResourceNotReadyException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_ServiceExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new ServiceException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_SnapStartExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new SnapStartException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_SnapStartNotReadyExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new SnapStartNotReadyException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_SnapStartTimeoutExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new SnapStartTimeoutException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_SubnetIPAddressLimitReachedExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Message:expectString,Type:expectString});Object.assign(n,r);const o=new SubnetIPAddressLimitReachedException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_TooManyRequestsExceptionRes=async(e,t)=>{const n=map({[_rAS]:[,e.headers[_ra]]}),i=e.body,r=take(i,{Reason:expectString,Type:expectString,message:expectString});Object.assign(n,r);const o=new TooManyRequestsException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},de_UnsupportedMediaTypeExceptionRes=async(e,t)=>{const n=map({}),i=e.body,r=take(i,{Type:expectString,message:expectString});Object.assign(n,r);const o=new UnsupportedMediaTypeException({$metadata:deserializeMetadata$2(e),...n});return decorateServiceException(o,e.body)},deserializeMetadata$2=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"]}),_CC="ClientContext",_EV="ExecutedVersion",_FE$1="FunctionError",_IT$1="InvocationType",_LR="LogResult",_LT$1="LogType",_Q="Qualifier",_rAS="retryAfterSeconds",_ra="retry-after",_xacc="x-amz-client-context",_xaev="x-amz-executed-version",_xafe="x-amz-function-error",_xait="x-amz-invocation-type",_xalr="x-amz-log-result",_xalt="x-amz-log-type";class InvokeCommand extends(Command.classBuilder().ep(commonParams$2).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AWSGirApiService","Invoke",{}).n("LambdaClient","InvokeCommand").f(InvocationRequestFilterSensitiveLog,InvocationResponseFilterSensitiveLog).ser(se_InvokeCommand).de(de_InvokeCommand).build()){}const invokeLambda=async(e,t,n,i)=>{try{const r=new InvokeCommand({FunctionName:t.functionName,InvocationType:n,Payload:Buffer.from(JSON.stringify(i))}),o=await e.send(r);return t.logger&&t.logger("info",JSON.stringify(o)),!0}catch(e){return t.logger&&t.logger("error",e),!1}},lambda=e=>{const{clientConfig:t,...n}={...DEFAULT_AWS_CONFIGURATION,...e},i=new LambdaClient(t);return{invokeLambda:(e,t)=>invokeLambda(i,n,e,t)}},defaultSSMHttpAuthSchemeParametersProvider=async(e,t,n)=>({operation:getSmithyContext(t).operation,region:await normalizeProvider$1(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function createAwsAuthSigv4HttpAuthOption$1(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ssm",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}const defaultSSMHttpAuthSchemeProvider=e=>{const t=[];return e.operation,t.push(createAwsAuthSigv4HttpAuthOption$1(e)),t},resolveHttpAuthSchemeConfig$1=e=>({...resolveAwsSdkSigV4Config(e)}),resolveClientEndpointParameters$1=e=>({...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"ssm"}),commonParams$1={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},name$3="@aws-sdk/client-ssm",description$3="AWS SDK for JavaScript Ssm Client for Node.js, Browser and React Native",version$3="3.693.0",scripts$3={build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-ssm","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo ssm"},main$3="./dist-cjs/index.js",types$2="./dist-types/index.d.ts",module$1="./dist-es/index.js",sideEffects$1=!1,dependencies$2={"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.693.0","@aws-sdk/client-sts":"3.693.0","@aws-sdk/core":"3.693.0","@aws-sdk/credential-provider-node":"3.693.0","@aws-sdk/middleware-host-header":"3.693.0","@aws-sdk/middleware-logger":"3.693.0","@aws-sdk/middleware-recursion-detection":"3.693.0","@aws-sdk/middleware-user-agent":"3.693.0","@aws-sdk/region-config-resolver":"3.693.0","@aws-sdk/types":"3.692.0","@aws-sdk/util-endpoints":"3.693.0","@aws-sdk/util-user-agent-browser":"3.693.0","@aws-sdk/util-user-agent-node":"3.693.0","@smithy/config-resolver":"^3.0.11","@smithy/core":"^2.5.2","@smithy/fetch-http-handler":"^4.1.0","@smithy/hash-node":"^3.0.9","@smithy/invalid-dependency":"^3.0.9","@smithy/middleware-content-length":"^3.0.11","@smithy/middleware-endpoint":"^3.2.2","@smithy/middleware-retry":"^3.0.26","@smithy/middleware-serde":"^3.0.9","@smithy/middleware-stack":"^3.0.9","@smithy/node-config-provider":"^3.1.10","@smithy/node-http-handler":"^3.3.0","@smithy/protocol-http":"^4.1.6","@smithy/smithy-client":"^3.4.3","@smithy/types":"^3.7.0","@smithy/url-parser":"^3.0.9","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.26","@smithy/util-defaults-mode-node":"^3.0.26","@smithy/util-endpoints":"^2.1.5","@smithy/util-middleware":"^3.0.9","@smithy/util-retry":"^3.0.9","@smithy/util-utf8":"^3.0.0","@smithy/util-waiter":"^3.1.8","@types/uuid":"^9.0.1",tslib:"^2.6.2",uuid:"^9.0.1"},devDependencies$3={"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines$3={node:">=16.0.0"},typesVersions$1={"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files$1=["dist-*/**"],author$3={name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license$3="Apache-2.0",browser$5={"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},homepage$2="https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-ssm",repository$3={type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-ssm"};var packageInfo$1={name:name$3,description:description$3,version:version$3,scripts:scripts$3,main:main$3,types:types$2,module:module$1,sideEffects:sideEffects$1,dependencies:dependencies$2,devDependencies:devDependencies$3,engines:engines$3,typesVersions:typesVersions$1,files:files$1,author:author$3,license:license$3,browser:browser$5,"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:homepage$2,repository:repository$3};const u$1="required",v$1="fn",w="argv",x="ref",a$1=!0,b$1="isSet",c$1="booleanEquals",d$1="error",e$1="endpoint",f$1="tree",g$1="PartitionResult",h$1="getAttr",i$1={[u$1]:!1,type:"String"},j$1={[u$1]:!0,default:!1,type:"Boolean"},k$1={[x]:"Endpoint"},l$1={[v$1]:c$1,[w]:[{[x]:"UseFIPS"},!0]},m$1={[v$1]:c$1,[w]:[{[x]:"UseDualStack"},!0]},n$1={},o$1={[v$1]:h$1,[w]:[{[x]:g$1},"supportsFIPS"]},p$1={[x]:g$1},q$1={[v$1]:c$1,[w]:[!0,{[v$1]:h$1,[w]:[p$1,"supportsDualStack"]}]},r$1=[l$1],s$1=[m$1],t$1=[{[x]:"Region"}],_data$1={version:"1.0",parameters:{Region:i$1,UseDualStack:j$1,UseFIPS:j$1,Endpoint:i$1},rules:[{conditions:[{[v$1]:b$1,[w]:[k$1]}],rules:[{conditions:r$1,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d$1},{conditions:s$1,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d$1},{endpoint:{url:k$1,properties:n$1,headers:n$1},type:e$1}],type:f$1},{conditions:[{[v$1]:b$1,[w]:t$1}],rules:[{conditions:[{[v$1]:"aws.partition",[w]:t$1,assign:g$1}],rules:[{conditions:[l$1,m$1],rules:[{conditions:[{[v$1]:c$1,[w]:[a$1,o$1]},q$1],rules:[{endpoint:{url:"https://ssm-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n$1,headers:n$1},type:e$1}],type:f$1},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d$1}],type:f$1},{conditions:r$1,rules:[{conditions:[{[v$1]:c$1,[w]:[o$1,a$1]}],rules:[{conditions:[{[v$1]:"stringEquals",[w]:[{[v$1]:h$1,[w]:[p$1,"name"]},"aws-us-gov"]}],endpoint:{url:"https://ssm.{Region}.amazonaws.com",properties:n$1,headers:n$1},type:e$1},{endpoint:{url:"https://ssm-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n$1,headers:n$1},type:e$1}],type:f$1},{error:"FIPS is enabled but this partition does not support FIPS",type:d$1}],type:f$1},{conditions:s$1,rules:[{conditions:[q$1],rules:[{endpoint:{url:"https://ssm.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n$1,headers:n$1},type:e$1}],type:f$1},{error:"DualStack is enabled but this partition does not support DualStack",type:d$1}],type:f$1},{endpoint:{url:"https://ssm.{Region}.{PartitionResult#dnsSuffix}",properties:n$1,headers:n$1},type:e$1}],type:f$1}],type:f$1},{error:"Invalid Configuration: Missing Region",type:d$1}]},ruleSet$1=_data$1,cache$1=new EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),defaultEndpointResolver$1=(e,t={})=>cache$1.get(e,(()=>resolveEndpoint(ruleSet$1,{endpointParams:e,logger:t.logger})));customEndpointFunctions.aws=awsEndpointFunctions;const getRuntimeConfig$3=e=>({apiVersion:"2014-11-06",base64Decoder:e?.base64Decoder??fromBase64,base64Encoder:e?.base64Encoder??toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??defaultEndpointResolver$1,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??defaultSSMHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new AwsSdkSigV4Signer}],logger:e?.logger??new NoOpLogger,serviceId:e?.serviceId??"SSM",urlParser:e?.urlParser??parseUrl,utf8Decoder:e?.utf8Decoder??fromUtf8$2,utf8Encoder:e?.utf8Encoder??toUtf8}),getRuntimeConfig$2=e=>{const t=resolveDefaultsModeConfig(e),n=()=>t().then(loadConfigsForDefaultMode),i=getRuntimeConfig$3(e);return{...i,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??calculateBodyLength,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??createDefaultUserAgentProvider({serviceId:i.serviceId,clientVersion:packageInfo$1.version}),maxAttempts:e?.maxAttempts??DEFAULT_MAX_ATTEMPTS,region:e?.region??invalidProvider("Region is missing"),requestHandler:FetchHttpHandler.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||DEFAULT_RETRY_MODE),sha256:e?.sha256??Sha256,streamCollector:e?.streamCollector??streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT))}},getHttpAuthExtensionConfiguration$1=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}},resolveHttpAuthRuntimeConfig$1=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),asPartial$1=e=>e,resolveRuntimeExtensions$1=(e,t)=>{const n={...asPartial$1(getAwsRegionExtensionConfiguration(e)),...asPartial$1(getDefaultExtensionConfiguration(e)),...asPartial$1(getHttpHandlerExtensionConfiguration(e)),...asPartial$1(getHttpAuthExtensionConfiguration$1(e))};return t.forEach((e=>e.configure(n))),{...e,...resolveAwsRegionExtensionConfiguration(n),...resolveDefaultRuntimeConfig(n),...resolveHttpHandlerRuntimeConfig(n),...resolveHttpAuthRuntimeConfig$1(n)}};class SSMClient extends Client{constructor(...[e]){const t=getRuntimeConfig$2(e||{}),n=resolveUserAgentConfig(resolveClientEndpointParameters$1(t)),i=resolveRetryConfig(n),r=resolveHostHeaderConfig(resolveRegionConfig(i)),o=resolveEndpointConfig(r),a=resolveHttpAuthSchemeConfig$1(o),s=resolveRuntimeExtensions$1(a,e?.extensions||[]);super(s),this.config=s,this.middlewareStack.use(getUserAgentPlugin(this.config)),this.middlewareStack.use(getRetryPlugin(this.config)),this.middlewareStack.use(getContentLengthPlugin(this.config)),this.middlewareStack.use(getHostHeaderPlugin(this.config)),this.middlewareStack.use(getLoggerPlugin(this.config)),this.middlewareStack.use(getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:defaultSSMHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async e=>new DefaultIdentityProviderConfig({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class SSMServiceException extends ServiceException$1{constructor(e){super(e),Object.setPrototypeOf(this,SSMServiceException.prototype)}}class InternalServerError extends SSMServiceException{constructor(e){super({name:"InternalServerError",$fault:"server",...e}),this.name="InternalServerError",this.$fault="server",Object.setPrototypeOf(this,InternalServerError.prototype),this.Message=e.Message}}class InvalidResourceId extends SSMServiceException{constructor(e){super({name:"InvalidResourceId",$fault:"client",...e}),this.name="InvalidResourceId",this.$fault="client",Object.setPrototypeOf(this,InvalidResourceId.prototype)}}class InvalidResourceType extends SSMServiceException{constructor(e){super({name:"InvalidResourceType",$fault:"client",...e}),this.name="InvalidResourceType",this.$fault="client",Object.setPrototypeOf(this,InvalidResourceType.prototype)}}class TooManyTagsError extends SSMServiceException{constructor(e){super({name:"TooManyTagsError",$fault:"client",...e}),this.name="TooManyTagsError",this.$fault="client",Object.setPrototypeOf(this,TooManyTagsError.prototype)}}class TooManyUpdates extends SSMServiceException{constructor(e){super({name:"TooManyUpdates",$fault:"client",...e}),this.name="TooManyUpdates",this.$fault="client",Object.setPrototypeOf(this,TooManyUpdates.prototype),this.Message=e.Message}}let AlreadyExistsException$1=class e extends SSMServiceException{constructor(t){super({name:"AlreadyExistsException",$fault:"client",...t}),this.name="AlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};class OpsItemConflictException extends SSMServiceException{constructor(e){super({name:"OpsItemConflictException",$fault:"client",...e}),this.name="OpsItemConflictException",this.$fault="client",Object.setPrototypeOf(this,OpsItemConflictException.prototype),this.Message=e.Message}}class OpsItemInvalidParameterException extends SSMServiceException{constructor(e){super({name:"OpsItemInvalidParameterException",$fault:"client",...e}),this.name="OpsItemInvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,OpsItemInvalidParameterException.prototype),this.ParameterNames=e.ParameterNames,this.Message=e.Message}}class OpsItemLimitExceededException extends SSMServiceException{constructor(e){super({name:"OpsItemLimitExceededException",$fault:"client",...e}),this.name="OpsItemLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,OpsItemLimitExceededException.prototype),this.ResourceTypes=e.ResourceTypes,this.Limit=e.Limit,this.LimitType=e.LimitType,this.Message=e.Message}}class OpsItemNotFoundException extends SSMServiceException{constructor(e){super({name:"OpsItemNotFoundException",$fault:"client",...e}),this.name="OpsItemNotFoundException",this.$fault="client",Object.setPrototypeOf(this,OpsItemNotFoundException.prototype),this.Message=e.Message}}class OpsItemRelatedItemAlreadyExistsException extends SSMServiceException{constructor(e){super({name:"OpsItemRelatedItemAlreadyExistsException",$fault:"client",...e}),this.name="OpsItemRelatedItemAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,OpsItemRelatedItemAlreadyExistsException.prototype),this.Message=e.Message,this.ResourceUri=e.ResourceUri,this.OpsItemId=e.OpsItemId}}class DuplicateInstanceId extends SSMServiceException{constructor(e){super({name:"DuplicateInstanceId",$fault:"client",...e}),this.name="DuplicateInstanceId",this.$fault="client",Object.setPrototypeOf(this,DuplicateInstanceId.prototype)}}class InvalidCommandId extends SSMServiceException{constructor(e){super({name:"InvalidCommandId",$fault:"client",...e}),this.name="InvalidCommandId",this.$fault="client",Object.setPrototypeOf(this,InvalidCommandId.prototype)}}class InvalidInstanceId extends SSMServiceException{constructor(e){super({name:"InvalidInstanceId",$fault:"client",...e}),this.name="InvalidInstanceId",this.$fault="client",Object.setPrototypeOf(this,InvalidInstanceId.prototype),this.Message=e.Message}}class DoesNotExistException extends SSMServiceException{constructor(e){super({name:"DoesNotExistException",$fault:"client",...e}),this.name="DoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,DoesNotExistException.prototype),this.Message=e.Message}}class InvalidParameters extends SSMServiceException{constructor(e){super({name:"InvalidParameters",$fault:"client",...e}),this.name="InvalidParameters",this.$fault="client",Object.setPrototypeOf(this,InvalidParameters.prototype),this.Message=e.Message}}class AssociationAlreadyExists extends SSMServiceException{constructor(e){super({name:"AssociationAlreadyExists",$fault:"client",...e}),this.name="AssociationAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,AssociationAlreadyExists.prototype)}}class AssociationLimitExceeded extends SSMServiceException{constructor(e){super({name:"AssociationLimitExceeded",$fault:"client",...e}),this.name="AssociationLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,AssociationLimitExceeded.prototype)}}class InvalidDocument extends SSMServiceException{constructor(e){super({name:"InvalidDocument",$fault:"client",...e}),this.name="InvalidDocument",this.$fault="client",Object.setPrototypeOf(this,InvalidDocument.prototype),this.Message=e.Message}}class InvalidDocumentVersion extends SSMServiceException{constructor(e){super({name:"InvalidDocumentVersion",$fault:"client",...e}),this.name="InvalidDocumentVersion",this.$fault="client",Object.setPrototypeOf(this,InvalidDocumentVersion.prototype),this.Message=e.Message}}class InvalidOutputLocation extends SSMServiceException{constructor(e){super({name:"InvalidOutputLocation",$fault:"client",...e}),this.name="InvalidOutputLocation",this.$fault="client",Object.setPrototypeOf(this,InvalidOutputLocation.prototype)}}class InvalidSchedule extends SSMServiceException{constructor(e){super({name:"InvalidSchedule",$fault:"client",...e}),this.name="InvalidSchedule",this.$fault="client",Object.setPrototypeOf(this,InvalidSchedule.prototype),this.Message=e.Message}}class InvalidTag extends SSMServiceException{constructor(e){super({name:"InvalidTag",$fault:"client",...e}),this.name="InvalidTag",this.$fault="client",Object.setPrototypeOf(this,InvalidTag.prototype),this.Message=e.Message}}class InvalidTarget extends SSMServiceException{constructor(e){super({name:"InvalidTarget",$fault:"client",...e}),this.name="InvalidTarget",this.$fault="client",Object.setPrototypeOf(this,InvalidTarget.prototype),this.Message=e.Message}}class InvalidTargetMaps extends SSMServiceException{constructor(e){super({name:"InvalidTargetMaps",$fault:"client",...e}),this.name="InvalidTargetMaps",this.$fault="client",Object.setPrototypeOf(this,InvalidTargetMaps.prototype),this.Message=e.Message}}class UnsupportedPlatformType extends SSMServiceException{constructor(e){super({name:"UnsupportedPlatformType",$fault:"client",...e}),this.name="UnsupportedPlatformType",this.$fault="client",Object.setPrototypeOf(this,UnsupportedPlatformType.prototype),this.Message=e.Message}}class DocumentAlreadyExists extends SSMServiceException{constructor(e){super({name:"DocumentAlreadyExists",$fault:"client",...e}),this.name="DocumentAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,DocumentAlreadyExists.prototype),this.Message=e.Message}}class DocumentLimitExceeded extends SSMServiceException{constructor(e){super({name:"DocumentLimitExceeded",$fault:"client",...e}),this.name="DocumentLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,DocumentLimitExceeded.prototype),this.Message=e.Message}}class InvalidDocumentContent extends SSMServiceException{constructor(e){super({name:"InvalidDocumentContent",$fault:"client",...e}),this.name="InvalidDocumentContent",this.$fault="client",Object.setPrototypeOf(this,InvalidDocumentContent.prototype),this.Message=e.Message}}class InvalidDocumentSchemaVersion extends SSMServiceException{constructor(e){super({name:"InvalidDocumentSchemaVersion",$fault:"client",...e}),this.name="InvalidDocumentSchemaVersion",this.$fault="client",Object.setPrototypeOf(this,InvalidDocumentSchemaVersion.prototype),this.Message=e.Message}}class MaxDocumentSizeExceeded extends SSMServiceException{constructor(e){super({name:"MaxDocumentSizeExceeded",$fault:"client",...e}),this.name="MaxDocumentSizeExceeded",this.$fault="client",Object.setPrototypeOf(this,MaxDocumentSizeExceeded.prototype),this.Message=e.Message}}class IdempotentParameterMismatch extends SSMServiceException{constructor(e){super({name:"IdempotentParameterMismatch",$fault:"client",...e}),this.name="IdempotentParameterMismatch",this.$fault="client",Object.setPrototypeOf(this,IdempotentParameterMismatch.prototype),this.Message=e.Message}}class ResourceLimitExceededException extends SSMServiceException{constructor(e){super({name:"ResourceLimitExceededException",$fault:"client",...e}),this.name="ResourceLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,ResourceLimitExceededException.prototype),this.Message=e.Message}}class OpsItemAccessDeniedException extends SSMServiceException{constructor(e){super({name:"OpsItemAccessDeniedException",$fault:"client",...e}),this.name="OpsItemAccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,OpsItemAccessDeniedException.prototype),this.Message=e.Message}}class OpsItemAlreadyExistsException extends SSMServiceException{constructor(e){super({name:"OpsItemAlreadyExistsException",$fault:"client",...e}),this.name="OpsItemAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,OpsItemAlreadyExistsException.prototype),this.Message=e.Message,this.OpsItemId=e.OpsItemId}}class OpsMetadataAlreadyExistsException extends SSMServiceException{constructor(e){super({name:"OpsMetadataAlreadyExistsException",$fault:"client",...e}),this.name="OpsMetadataAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,OpsMetadataAlreadyExistsException.prototype)}}class OpsMetadataInvalidArgumentException extends SSMServiceException{constructor(e){super({name:"OpsMetadataInvalidArgumentException",$fault:"client",...e}),this.name="OpsMetadataInvalidArgumentException",this.$fault="client",Object.setPrototypeOf(this,OpsMetadataInvalidArgumentException.prototype)}}class OpsMetadataLimitExceededException extends SSMServiceException{constructor(e){super({name:"OpsMetadataLimitExceededException",$fault:"client",...e}),this.name="OpsMetadataLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,OpsMetadataLimitExceededException.prototype)}}class OpsMetadataTooManyUpdatesException extends SSMServiceException{constructor(e){super({name:"OpsMetadataTooManyUpdatesException",$fault:"client",...e}),this.name="OpsMetadataTooManyUpdatesException",this.$fault="client",Object.setPrototypeOf(this,OpsMetadataTooManyUpdatesException.prototype)}}class ResourceDataSyncAlreadyExistsException extends SSMServiceException{constructor(e){super({name:"ResourceDataSyncAlreadyExistsException",$fault:"client",...e}),this.name="ResourceDataSyncAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,ResourceDataSyncAlreadyExistsException.prototype),this.SyncName=e.SyncName}}class ResourceDataSyncCountExceededException extends SSMServiceException{constructor(e){super({name:"ResourceDataSyncCountExceededException",$fault:"client",...e}),this.name="ResourceDataSyncCountExceededException",this.$fault="client",Object.setPrototypeOf(this,ResourceDataSyncCountExceededException.prototype),this.Message=e.Message}}class ResourceDataSyncInvalidConfigurationException extends SSMServiceException{constructor(e){super({name:"ResourceDataSyncInvalidConfigurationException",$fault:"client",...e}),this.name="ResourceDataSyncInvalidConfigurationException",this.$fault="client",Object.setPrototypeOf(this,ResourceDataSyncInvalidConfigurationException.prototype),this.Message=e.Message}}class InvalidActivation extends SSMServiceException{constructor(e){super({name:"InvalidActivation",$fault:"client",...e}),this.name="InvalidActivation",this.$fault="client",Object.setPrototypeOf(this,InvalidActivation.prototype),this.Message=e.Message}}class InvalidActivationId extends SSMServiceException{constructor(e){super({name:"InvalidActivationId",$fault:"client",...e}),this.name="InvalidActivationId",this.$fault="client",Object.setPrototypeOf(this,InvalidActivationId.prototype),this.Message=e.Message}}class AssociationDoesNotExist extends SSMServiceException{constructor(e){super({name:"AssociationDoesNotExist",$fault:"client",...e}),this.name="AssociationDoesNotExist",this.$fault="client",Object.setPrototypeOf(this,AssociationDoesNotExist.prototype),this.Message=e.Message}}class AssociatedInstances extends SSMServiceException{constructor(e){super({name:"AssociatedInstances",$fault:"client",...e}),this.name="AssociatedInstances",this.$fault="client",Object.setPrototypeOf(this,AssociatedInstances.prototype)}}class InvalidDocumentOperation extends SSMServiceException{constructor(e){super({name:"InvalidDocumentOperation",$fault:"client",...e}),this.name="InvalidDocumentOperation",this.$fault="client",Object.setPrototypeOf(this,InvalidDocumentOperation.prototype),this.Message=e.Message}}class InvalidDeleteInventoryParametersException extends SSMServiceException{constructor(e){super({name:"InvalidDeleteInventoryParametersException",$fault:"client",...e}),this.name="InvalidDeleteInventoryParametersException",this.$fault="client",Object.setPrototypeOf(this,InvalidDeleteInventoryParametersException.prototype),this.Message=e.Message}}class InvalidInventoryRequestException extends SSMServiceException{constructor(e){super({name:"InvalidInventoryRequestException",$fault:"client",...e}),this.name="InvalidInventoryRequestException",this.$fault="client",Object.setPrototypeOf(this,InvalidInventoryRequestException.prototype),this.Message=e.Message}}class InvalidOptionException extends SSMServiceException{constructor(e){super({name:"InvalidOptionException",$fault:"client",...e}),this.name="InvalidOptionException",this.$fault="client",Object.setPrototypeOf(this,InvalidOptionException.prototype),this.Message=e.Message}}class InvalidTypeNameException extends SSMServiceException{constructor(e){super({name:"InvalidTypeNameException",$fault:"client",...e}),this.name="InvalidTypeNameException",this.$fault="client",Object.setPrototypeOf(this,InvalidTypeNameException.prototype),this.Message=e.Message}}class OpsMetadataNotFoundException extends SSMServiceException{constructor(e){super({name:"OpsMetadataNotFoundException",$fault:"client",...e}),this.name="OpsMetadataNotFoundException",this.$fault="client",Object.setPrototypeOf(this,OpsMetadataNotFoundException.prototype)}}class ParameterNotFound extends SSMServiceException{constructor(e){super({name:"ParameterNotFound",$fault:"client",...e}),this.name="ParameterNotFound",this.$fault="client",Object.setPrototypeOf(this,ParameterNotFound.prototype)}}class ResourceInUseException extends SSMServiceException{constructor(e){super({name:"ResourceInUseException",$fault:"client",...e}),this.name="ResourceInUseException",this.$fault="client",Object.setPrototypeOf(this,ResourceInUseException.prototype),this.Message=e.Message}}class ResourceDataSyncNotFoundException extends SSMServiceException{constructor(e){super({name:"ResourceDataSyncNotFoundException",$fault:"client",...e}),this.name="ResourceDataSyncNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ResourceDataSyncNotFoundException.prototype),this.SyncName=e.SyncName,this.SyncType=e.SyncType,this.Message=e.Message}}class MalformedResourcePolicyDocumentException extends SSMServiceException{constructor(e){super({name:"MalformedResourcePolicyDocumentException",$fault:"client",...e}),this.name="MalformedResourcePolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,MalformedResourcePolicyDocumentException.prototype),this.Message=e.Message}}class ResourceNotFoundException extends SSMServiceException{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ResourceNotFoundException.prototype),this.Message=e.Message}}class ResourcePolicyConflictException extends SSMServiceException{constructor(e){super({name:"ResourcePolicyConflictException",$fault:"client",...e}),this.name="ResourcePolicyConflictException",this.$fault="client",Object.setPrototypeOf(this,ResourcePolicyConflictException.prototype),this.Message=e.Message}}class ResourcePolicyInvalidParameterException extends SSMServiceException{constructor(e){super({name:"ResourcePolicyInvalidParameterException",$fault:"client",...e}),this.name="ResourcePolicyInvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,ResourcePolicyInvalidParameterException.prototype),this.ParameterNames=e.ParameterNames,this.Message=e.Message}}class ResourcePolicyNotFoundException extends SSMServiceException{constructor(e){super({name:"ResourcePolicyNotFoundException",$fault:"client",...e}),this.name="ResourcePolicyNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ResourcePolicyNotFoundException.prototype),this.Message=e.Message}}class TargetInUseException extends SSMServiceException{constructor(e){super({name:"TargetInUseException",$fault:"client",...e}),this.name="TargetInUseException",this.$fault="client",Object.setPrototypeOf(this,TargetInUseException.prototype),this.Message=e.Message}}class InvalidFilter extends SSMServiceException{constructor(e){super({name:"InvalidFilter",$fault:"client",...e}),this.name="InvalidFilter",this.$fault="client",Object.setPrototypeOf(this,InvalidFilter.prototype),this.Message=e.Message}}class InvalidNextToken extends SSMServiceException{constructor(e){super({name:"InvalidNextToken",$fault:"client",...e}),this.name="InvalidNextToken",this.$fault="client",Object.setPrototypeOf(this,InvalidNextToken.prototype),this.Message=e.Message}}class InvalidAssociationVersion extends SSMServiceException{constructor(e){super({name:"InvalidAssociationVersion",$fault:"client",...e}),this.name="InvalidAssociationVersion",this.$fault="client",Object.setPrototypeOf(this,InvalidAssociationVersion.prototype),this.Message=e.Message}}class AssociationExecutionDoesNotExist extends SSMServiceException{constructor(e){super({name:"AssociationExecutionDoesNotExist",$fault:"client",...e}),this.name="AssociationExecutionDoesNotExist",this.$fault="client",Object.setPrototypeOf(this,AssociationExecutionDoesNotExist.prototype),this.Message=e.Message}}class InvalidFilterKey extends SSMServiceException{constructor(e){super({name:"InvalidFilterKey",$fault:"client",...e}),this.name="InvalidFilterKey",this.$fault="client",Object.setPrototypeOf(this,InvalidFilterKey.prototype)}}class InvalidFilterValue extends SSMServiceException{constructor(e){super({name:"InvalidFilterValue",$fault:"client",...e}),this.name="InvalidFilterValue",this.$fault="client",Object.setPrototypeOf(this,InvalidFilterValue.prototype),this.Message=e.Message}}class AutomationExecutionNotFoundException extends SSMServiceException{constructor(e){super({name:"AutomationExecutionNotFoundException",$fault:"client",...e}),this.name="AutomationExecutionNotFoundException",this.$fault="client",Object.setPrototypeOf(this,AutomationExecutionNotFoundException.prototype),this.Message=e.Message}}class InvalidPermissionType extends SSMServiceException{constructor(e){super({name:"InvalidPermissionType",$fault:"client",...e}),this.name="InvalidPermissionType",this.$fault="client",Object.setPrototypeOf(this,InvalidPermissionType.prototype),this.Message=e.Message}}class UnsupportedOperatingSystem extends SSMServiceException{constructor(e){super({name:"UnsupportedOperatingSystem",$fault:"client",...e}),this.name="UnsupportedOperatingSystem",this.$fault="client",Object.setPrototypeOf(this,UnsupportedOperatingSystem.prototype),this.Message=e.Message}}class InvalidInstanceInformationFilterValue extends SSMServiceException{constructor(e){super({name:"InvalidInstanceInformationFilterValue",$fault:"client",...e}),this.name="InvalidInstanceInformationFilterValue",this.$fault="client",Object.setPrototypeOf(this,InvalidInstanceInformationFilterValue.prototype)}}class InvalidInstancePropertyFilterValue extends SSMServiceException{constructor(e){super({name:"InvalidInstancePropertyFilterValue",$fault:"client",...e}),this.name="InvalidInstancePropertyFilterValue",this.$fault="client",Object.setPrototypeOf(this,InvalidInstancePropertyFilterValue.prototype)}}class InvalidDeletionIdException extends SSMServiceException{constructor(e){super({name:"InvalidDeletionIdException",$fault:"client",...e}),this.name="InvalidDeletionIdException",this.$fault="client",Object.setPrototypeOf(this,InvalidDeletionIdException.prototype),this.Message=e.Message}}class InvalidFilterOption extends SSMServiceException{constructor(e){super({name:"InvalidFilterOption",$fault:"client",...e}),this.name="InvalidFilterOption",this.$fault="client",Object.setPrototypeOf(this,InvalidFilterOption.prototype)}}class OpsItemRelatedItemAssociationNotFoundException extends SSMServiceException{constructor(e){super({name:"OpsItemRelatedItemAssociationNotFoundException",$fault:"client",...e}),this.name="OpsItemRelatedItemAssociationNotFoundException",this.$fault="client",Object.setPrototypeOf(this,OpsItemRelatedItemAssociationNotFoundException.prototype),this.Message=e.Message}}class InvalidDocumentType extends SSMServiceException{constructor(e){super({name:"InvalidDocumentType",$fault:"client",...e}),this.name="InvalidDocumentType",this.$fault="client",Object.setPrototypeOf(this,InvalidDocumentType.prototype),this.Message=e.Message}}class UnsupportedCalendarException extends SSMServiceException{constructor(e){super({name:"UnsupportedCalendarException",$fault:"client",...e}),this.name="UnsupportedCalendarException",this.$fault="client",Object.setPrototypeOf(this,UnsupportedCalendarException.prototype),this.Message=e.Message}}class InvalidPluginName extends SSMServiceException{constructor(e){super({name:"InvalidPluginName",$fault:"client",...e}),this.name="InvalidPluginName",this.$fault="client",Object.setPrototypeOf(this,InvalidPluginName.prototype)}}class InvocationDoesNotExist extends SSMServiceException{constructor(e){super({name:"InvocationDoesNotExist",$fault:"client",...e}),this.name="InvocationDoesNotExist",this.$fault="client",Object.setPrototypeOf(this,InvocationDoesNotExist.prototype)}}class UnsupportedFeatureRequiredException extends SSMServiceException{constructor(e){super({name:"UnsupportedFeatureRequiredException",$fault:"client",...e}),this.name="UnsupportedFeatureRequiredException",this.$fault="client",Object.setPrototypeOf(this,UnsupportedFeatureRequiredException.prototype),this.Message=e.Message}}class InvalidAggregatorException extends SSMServiceException{constructor(e){super({name:"InvalidAggregatorException",$fault:"client",...e}),this.name="InvalidAggregatorException",this.$fault="client",Object.setPrototypeOf(this,InvalidAggregatorException.prototype),this.Message=e.Message}}class InvalidInventoryGroupException extends SSMServiceException{constructor(e){super({name:"InvalidInventoryGroupException",$fault:"client",...e}),this.name="InvalidInventoryGroupException",this.$fault="client",Object.setPrototypeOf(this,InvalidInventoryGroupException.prototype),this.Message=e.Message}}class InvalidResultAttributeException extends SSMServiceException{constructor(e){super({name:"InvalidResultAttributeException",$fault:"client",...e}),this.name="InvalidResultAttributeException",this.$fault="client",Object.setPrototypeOf(this,InvalidResultAttributeException.prototype),this.Message=e.Message}}class InvalidKeyId extends SSMServiceException{constructor(e){super({name:"InvalidKeyId",$fault:"client",...e}),this.name="InvalidKeyId",this.$fault="client",Object.setPrototypeOf(this,InvalidKeyId.prototype)}}class ParameterVersionNotFound extends SSMServiceException{constructor(e){super({name:"ParameterVersionNotFound",$fault:"client",...e}),this.name="ParameterVersionNotFound",this.$fault="client",Object.setPrototypeOf(this,ParameterVersionNotFound.prototype)}}class ServiceSettingNotFound extends SSMServiceException{constructor(e){super({name:"ServiceSettingNotFound",$fault:"client",...e}),this.name="ServiceSettingNotFound",this.$fault="client",Object.setPrototypeOf(this,ServiceSettingNotFound.prototype),this.Message=e.Message}}class ParameterVersionLabelLimitExceeded extends SSMServiceException{constructor(e){super({name:"ParameterVersionLabelLimitExceeded",$fault:"client",...e}),this.name="ParameterVersionLabelLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,ParameterVersionLabelLimitExceeded.prototype)}}class DocumentPermissionLimit extends SSMServiceException{constructor(e){super({name:"DocumentPermissionLimit",$fault:"client",...e}),this.name="DocumentPermissionLimit",this.$fault="client",Object.setPrototypeOf(this,DocumentPermissionLimit.prototype),this.Message=e.Message}}class ComplianceTypeCountLimitExceededException extends SSMServiceException{constructor(e){super({name:"ComplianceTypeCountLimitExceededException",$fault:"client",...e}),this.name="ComplianceTypeCountLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,ComplianceTypeCountLimitExceededException.prototype),this.Message=e.Message}}class InvalidItemContentException extends SSMServiceException{constructor(e){super({name:"InvalidItemContentException",$fault:"client",...e}),this.name="InvalidItemContentException",this.$fault="client",Object.setPrototypeOf(this,InvalidItemContentException.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class ItemSizeLimitExceededException extends SSMServiceException{constructor(e){super({name:"ItemSizeLimitExceededException",$fault:"client",...e}),this.name="ItemSizeLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,ItemSizeLimitExceededException.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class TotalSizeLimitExceededException extends SSMServiceException{constructor(e){super({name:"TotalSizeLimitExceededException",$fault:"client",...e}),this.name="TotalSizeLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,TotalSizeLimitExceededException.prototype),this.Message=e.Message}}class CustomSchemaCountLimitExceededException extends SSMServiceException{constructor(e){super({name:"CustomSchemaCountLimitExceededException",$fault:"client",...e}),this.name="CustomSchemaCountLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,CustomSchemaCountLimitExceededException.prototype),this.Message=e.Message}}class InvalidInventoryItemContextException extends SSMServiceException{constructor(e){super({name:"InvalidInventoryItemContextException",$fault:"client",...e}),this.name="InvalidInventoryItemContextException",this.$fault="client",Object.setPrototypeOf(this,InvalidInventoryItemContextException.prototype),this.Message=e.Message}}class ItemContentMismatchException extends SSMServiceException{constructor(e){super({name:"ItemContentMismatchException",$fault:"client",...e}),this.name="ItemContentMismatchException",this.$fault="client",Object.setPrototypeOf(this,ItemContentMismatchException.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class SubTypeCountLimitExceededException extends SSMServiceException{constructor(e){super({name:"SubTypeCountLimitExceededException",$fault:"client",...e}),this.name="SubTypeCountLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,SubTypeCountLimitExceededException.prototype),this.Message=e.Message}}class UnsupportedInventoryItemContextException extends SSMServiceException{constructor(e){super({name:"UnsupportedInventoryItemContextException",$fault:"client",...e}),this.name="UnsupportedInventoryItemContextException",this.$fault="client",Object.setPrototypeOf(this,UnsupportedInventoryItemContextException.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class UnsupportedInventorySchemaVersionException extends SSMServiceException{constructor(e){super({name:"UnsupportedInventorySchemaVersionException",$fault:"client",...e}),this.name="UnsupportedInventorySchemaVersionException",this.$fault="client",Object.setPrototypeOf(this,UnsupportedInventorySchemaVersionException.prototype),this.Message=e.Message}}class HierarchyLevelLimitExceededException extends SSMServiceException{constructor(e){super({name:"HierarchyLevelLimitExceededException",$fault:"client",...e}),this.name="HierarchyLevelLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,HierarchyLevelLimitExceededException.prototype)}}class HierarchyTypeMismatchException extends SSMServiceException{constructor(e){super({name:"HierarchyTypeMismatchException",$fault:"client",...e}),this.name="HierarchyTypeMismatchException",this.$fault="client",Object.setPrototypeOf(this,HierarchyTypeMismatchException.prototype)}}class IncompatiblePolicyException extends SSMServiceException{constructor(e){super({name:"IncompatiblePolicyException",$fault:"client",...e}),this.name="IncompatiblePolicyException",this.$fault="client",Object.setPrototypeOf(this,IncompatiblePolicyException.prototype)}}class InvalidAllowedPatternException extends SSMServiceException{constructor(e){super({name:"InvalidAllowedPatternException",$fault:"client",...e}),this.name="InvalidAllowedPatternException",this.$fault="client",Object.setPrototypeOf(this,InvalidAllowedPatternException.prototype)}}class InvalidPolicyAttributeException extends SSMServiceException{constructor(e){super({name:"InvalidPolicyAttributeException",$fault:"client",...e}),this.name="InvalidPolicyAttributeException",this.$fault="client",Object.setPrototypeOf(this,InvalidPolicyAttributeException.prototype)}}class InvalidPolicyTypeException extends SSMServiceException{constructor(e){super({name:"InvalidPolicyTypeException",$fault:"client",...e}),this.name="InvalidPolicyTypeException",this.$fault="client",Object.setPrototypeOf(this,InvalidPolicyTypeException.prototype)}}class ParameterAlreadyExists extends SSMServiceException{constructor(e){super({name:"ParameterAlreadyExists",$fault:"client",...e}),this.name="ParameterAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,ParameterAlreadyExists.prototype)}}class ParameterLimitExceeded extends SSMServiceException{constructor(e){super({name:"ParameterLimitExceeded",$fault:"client",...e}),this.name="ParameterLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,ParameterLimitExceeded.prototype)}}class ParameterMaxVersionLimitExceeded extends SSMServiceException{constructor(e){super({name:"ParameterMaxVersionLimitExceeded",$fault:"client",...e}),this.name="ParameterMaxVersionLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,ParameterMaxVersionLimitExceeded.prototype)}}class ParameterPatternMismatchException extends SSMServiceException{constructor(e){super({name:"ParameterPatternMismatchException",$fault:"client",...e}),this.name="ParameterPatternMismatchException",this.$fault="client",Object.setPrototypeOf(this,ParameterPatternMismatchException.prototype)}}class PoliciesLimitExceededException extends SSMServiceException{constructor(e){super({name:"PoliciesLimitExceededException",$fault:"client",...e}),this.name="PoliciesLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,PoliciesLimitExceededException.prototype)}}class UnsupportedParameterType extends SSMServiceException{constructor(e){super({name:"UnsupportedParameterType",$fault:"client",...e}),this.name="UnsupportedParameterType",this.$fault="client",Object.setPrototypeOf(this,UnsupportedParameterType.prototype)}}class ResourcePolicyLimitExceededException extends SSMServiceException{constructor(e){super({name:"ResourcePolicyLimitExceededException",$fault:"client",...e}),this.name="ResourcePolicyLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,ResourcePolicyLimitExceededException.prototype),this.Limit=e.Limit,this.LimitType=e.LimitType,this.Message=e.Message}}class FeatureNotAvailableException extends SSMServiceException{constructor(e){super({name:"FeatureNotAvailableException",$fault:"client",...e}),this.name="FeatureNotAvailableException",this.$fault="client",Object.setPrototypeOf(this,FeatureNotAvailableException.prototype),this.Message=e.Message}}class AutomationStepNotFoundException extends SSMServiceException{constructor(e){super({name:"AutomationStepNotFoundException",$fault:"client",...e}),this.name="AutomationStepNotFoundException",this.$fault="client",Object.setPrototypeOf(this,AutomationStepNotFoundException.prototype),this.Message=e.Message}}class InvalidAutomationSignalException extends SSMServiceException{constructor(e){super({name:"InvalidAutomationSignalException",$fault:"client",...e}),this.name="InvalidAutomationSignalException",this.$fault="client",Object.setPrototypeOf(this,InvalidAutomationSignalException.prototype),this.Message=e.Message}}class InvalidNotificationConfig extends SSMServiceException{constructor(e){super({name:"InvalidNotificationConfig",$fault:"client",...e}),this.name="InvalidNotificationConfig",this.$fault="client",Object.setPrototypeOf(this,InvalidNotificationConfig.prototype),this.Message=e.Message}}class InvalidOutputFolder extends SSMServiceException{constructor(e){super({name:"InvalidOutputFolder",$fault:"client",...e}),this.name="InvalidOutputFolder",this.$fault="client",Object.setPrototypeOf(this,InvalidOutputFolder.prototype)}}class InvalidRole extends SSMServiceException{constructor(e){super({name:"InvalidRole",$fault:"client",...e}),this.name="InvalidRole",this.$fault="client",Object.setPrototypeOf(this,InvalidRole.prototype),this.Message=e.Message}}class InvalidAssociation extends SSMServiceException{constructor(e){super({name:"InvalidAssociation",$fault:"client",...e}),this.name="InvalidAssociation",this.$fault="client",Object.setPrototypeOf(this,InvalidAssociation.prototype),this.Message=e.Message}}class AutomationDefinitionNotFoundException extends SSMServiceException{constructor(e){super({name:"AutomationDefinitionNotFoundException",$fault:"client",...e}),this.name="AutomationDefinitionNotFoundException",this.$fault="client",Object.setPrototypeOf(this,AutomationDefinitionNotFoundException.prototype),this.Message=e.Message}}class AutomationDefinitionVersionNotFoundException extends SSMServiceException{constructor(e){super({name:"AutomationDefinitionVersionNotFoundException",$fault:"client",...e}),this.name="AutomationDefinitionVersionNotFoundException",this.$fault="client",Object.setPrototypeOf(this,AutomationDefinitionVersionNotFoundException.prototype),this.Message=e.Message}}class AutomationExecutionLimitExceededException extends SSMServiceException{constructor(e){super({name:"AutomationExecutionLimitExceededException",$fault:"client",...e}),this.name="AutomationExecutionLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,AutomationExecutionLimitExceededException.prototype),this.Message=e.Message}}class InvalidAutomationExecutionParametersException extends SSMServiceException{constructor(e){super({name:"InvalidAutomationExecutionParametersException",$fault:"client",...e}),this.name="InvalidAutomationExecutionParametersException",this.$fault="client",Object.setPrototypeOf(this,InvalidAutomationExecutionParametersException.prototype),this.Message=e.Message}}const ParameterFilterSensitiveLog=e=>({...e,...e.Value&&{Value:SENSITIVE_STRING}}),GetParameterResultFilterSensitiveLog=e=>({...e,...e.Parameter&&{Parameter:ParameterFilterSensitiveLog(e.Parameter)}}),GetParametersResultFilterSensitiveLog=e=>({...e,...e.Parameters&&{Parameters:e.Parameters.map((e=>ParameterFilterSensitiveLog(e)))}});class AutomationDefinitionNotApprovedException extends SSMServiceException{constructor(e){super({name:"AutomationDefinitionNotApprovedException",$fault:"client",...e}),this.name="AutomationDefinitionNotApprovedException",this.$fault="client",Object.setPrototypeOf(this,AutomationDefinitionNotApprovedException.prototype),this.Message=e.Message}}class TargetNotConnected extends SSMServiceException{constructor(e){super({name:"TargetNotConnected",$fault:"client",...e}),this.name="TargetNotConnected",this.$fault="client",Object.setPrototypeOf(this,TargetNotConnected.prototype),this.Message=e.Message}}class InvalidAutomationStatusUpdateException extends SSMServiceException{constructor(e){super({name:"InvalidAutomationStatusUpdateException",$fault:"client",...e}),this.name="InvalidAutomationStatusUpdateException",this.$fault="client",Object.setPrototypeOf(this,InvalidAutomationStatusUpdateException.prototype),this.Message=e.Message}}class AssociationVersionLimitExceeded extends SSMServiceException{constructor(e){super({name:"AssociationVersionLimitExceeded",$fault:"client",...e}),this.name="AssociationVersionLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,AssociationVersionLimitExceeded.prototype),this.Message=e.Message}}class InvalidUpdate extends SSMServiceException{constructor(e){super({name:"InvalidUpdate",$fault:"client",...e}),this.name="InvalidUpdate",this.$fault="client",Object.setPrototypeOf(this,InvalidUpdate.prototype),this.Message=e.Message}}class StatusUnchanged extends SSMServiceException{constructor(e){super({name:"StatusUnchanged",$fault:"client",...e}),this.name="StatusUnchanged",this.$fault="client",Object.setPrototypeOf(this,StatusUnchanged.prototype)}}class DocumentVersionLimitExceeded extends SSMServiceException{constructor(e){super({name:"DocumentVersionLimitExceeded",$fault:"client",...e}),this.name="DocumentVersionLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,DocumentVersionLimitExceeded.prototype),this.Message=e.Message}}class DuplicateDocumentContent extends SSMServiceException{constructor(e){super({name:"DuplicateDocumentContent",$fault:"client",...e}),this.name="DuplicateDocumentContent",this.$fault="client",Object.setPrototypeOf(this,DuplicateDocumentContent.prototype),this.Message=e.Message}}class DuplicateDocumentVersionName extends SSMServiceException{constructor(e){super({name:"DuplicateDocumentVersionName",$fault:"client",...e}),this.name="DuplicateDocumentVersionName",this.$fault="client",Object.setPrototypeOf(this,DuplicateDocumentVersionName.prototype),this.Message=e.Message}}class OpsMetadataKeyLimitExceededException extends SSMServiceException{constructor(e){super({name:"OpsMetadataKeyLimitExceededException",$fault:"client",...e}),this.name="OpsMetadataKeyLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,OpsMetadataKeyLimitExceededException.prototype)}}class ResourceDataSyncConflictException extends SSMServiceException{constructor(e){super({name:"ResourceDataSyncConflictException",$fault:"client",...e}),this.name="ResourceDataSyncConflictException",this.$fault="client",Object.setPrototypeOf(this,ResourceDataSyncConflictException.prototype),this.Message=e.Message}}const se_GetParameterCommand=async(e,t)=>{const n=sharedHeaders("GetParameter");let i;return i=JSON.stringify(_json(e)),buildHttpRpcRequest$1(t,n,"/",void 0,i)},se_GetParametersCommand=async(e,t)=>{const n=sharedHeaders("GetParameters");let i;return i=JSON.stringify(_json(e)),buildHttpRpcRequest$1(t,n,"/",void 0,i)},de_GetParameterCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError$1(e,t);const n=await parseJsonBody(e.body,t);let i={};i=de_GetParameterResult(n);return{$metadata:deserializeMetadata$1(e),...i}},de_GetParametersCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError$1(e,t);const n=await parseJsonBody(e.body,t);let i={};i=de_GetParametersResult(n);return{$metadata:deserializeMetadata$1(e),...i}},de_CommandError$1=async(e,t)=>{const n={...e,body:await parseJsonErrorBody(e.body,t)},i=loadRestJsonErrorCode(e,n.body);switch(i){case"InternalServerError":case"com.amazonaws.ssm#InternalServerError":throw await de_InternalServerErrorRes(n);case"InvalidResourceId":case"com.amazonaws.ssm#InvalidResourceId":throw await de_InvalidResourceIdRes(n);case"InvalidResourceType":case"com.amazonaws.ssm#InvalidResourceType":throw await de_InvalidResourceTypeRes(n);case"TooManyTagsError":case"com.amazonaws.ssm#TooManyTagsError":throw await de_TooManyTagsErrorRes(n);case"TooManyUpdates":case"com.amazonaws.ssm#TooManyUpdates":throw await de_TooManyUpdatesRes(n);case"OpsItemConflictException":case"com.amazonaws.ssm#OpsItemConflictException":throw await de_OpsItemConflictExceptionRes(n);case"OpsItemInvalidParameterException":case"com.amazonaws.ssm#OpsItemInvalidParameterException":throw await de_OpsItemInvalidParameterExceptionRes(n);case"OpsItemLimitExceededException":case"com.amazonaws.ssm#OpsItemLimitExceededException":throw await de_OpsItemLimitExceededExceptionRes(n);case"OpsItemNotFoundException":case"com.amazonaws.ssm#OpsItemNotFoundException":throw await de_OpsItemNotFoundExceptionRes(n);case"OpsItemRelatedItemAlreadyExistsException":case"com.amazonaws.ssm#OpsItemRelatedItemAlreadyExistsException":throw await de_OpsItemRelatedItemAlreadyExistsExceptionRes(n);case"DuplicateInstanceId":case"com.amazonaws.ssm#DuplicateInstanceId":throw await de_DuplicateInstanceIdRes(n);case"InvalidCommandId":case"com.amazonaws.ssm#InvalidCommandId":throw await de_InvalidCommandIdRes(n);case"InvalidInstanceId":case"com.amazonaws.ssm#InvalidInstanceId":throw await de_InvalidInstanceIdRes(n);case"DoesNotExistException":case"com.amazonaws.ssm#DoesNotExistException":throw await de_DoesNotExistExceptionRes(n);case"InvalidParameters":case"com.amazonaws.ssm#InvalidParameters":throw await de_InvalidParametersRes(n);case"AssociationAlreadyExists":case"com.amazonaws.ssm#AssociationAlreadyExists":throw await de_AssociationAlreadyExistsRes(n);case"AssociationLimitExceeded":case"com.amazonaws.ssm#AssociationLimitExceeded":throw await de_AssociationLimitExceededRes(n);case"InvalidDocument":case"com.amazonaws.ssm#InvalidDocument":throw await de_InvalidDocumentRes(n);case"InvalidDocumentVersion":case"com.amazonaws.ssm#InvalidDocumentVersion":throw await de_InvalidDocumentVersionRes(n);case"InvalidOutputLocation":case"com.amazonaws.ssm#InvalidOutputLocation":throw await de_InvalidOutputLocationRes(n);case"InvalidSchedule":case"com.amazonaws.ssm#InvalidSchedule":throw await de_InvalidScheduleRes(n);case"InvalidTag":case"com.amazonaws.ssm#InvalidTag":throw await de_InvalidTagRes(n);case"InvalidTarget":case"com.amazonaws.ssm#InvalidTarget":throw await de_InvalidTargetRes(n);case"InvalidTargetMaps":case"com.amazonaws.ssm#InvalidTargetMaps":throw await de_InvalidTargetMapsRes(n);case"UnsupportedPlatformType":case"com.amazonaws.ssm#UnsupportedPlatformType":throw await de_UnsupportedPlatformTypeRes(n);case"DocumentAlreadyExists":case"com.amazonaws.ssm#DocumentAlreadyExists":throw await de_DocumentAlreadyExistsRes(n);case"DocumentLimitExceeded":case"com.amazonaws.ssm#DocumentLimitExceeded":throw await de_DocumentLimitExceededRes(n);case"InvalidDocumentContent":case"com.amazonaws.ssm#InvalidDocumentContent":throw await de_InvalidDocumentContentRes(n);case"InvalidDocumentSchemaVersion":case"com.amazonaws.ssm#InvalidDocumentSchemaVersion":throw await de_InvalidDocumentSchemaVersionRes(n);case"MaxDocumentSizeExceeded":case"com.amazonaws.ssm#MaxDocumentSizeExceeded":throw await de_MaxDocumentSizeExceededRes(n);case"IdempotentParameterMismatch":case"com.amazonaws.ssm#IdempotentParameterMismatch":throw await de_IdempotentParameterMismatchRes(n);case"ResourceLimitExceededException":case"com.amazonaws.ssm#ResourceLimitExceededException":throw await de_ResourceLimitExceededExceptionRes(n);case"OpsItemAccessDeniedException":case"com.amazonaws.ssm#OpsItemAccessDeniedException":throw await de_OpsItemAccessDeniedExceptionRes(n);case"OpsItemAlreadyExistsException":case"com.amazonaws.ssm#OpsItemAlreadyExistsException":throw await de_OpsItemAlreadyExistsExceptionRes(n);case"OpsMetadataAlreadyExistsException":case"com.amazonaws.ssm#OpsMetadataAlreadyExistsException":throw await de_OpsMetadataAlreadyExistsExceptionRes(n);case"OpsMetadataInvalidArgumentException":case"com.amazonaws.ssm#OpsMetadataInvalidArgumentException":throw await de_OpsMetadataInvalidArgumentExceptionRes(n);case"OpsMetadataLimitExceededException":case"com.amazonaws.ssm#OpsMetadataLimitExceededException":throw await de_OpsMetadataLimitExceededExceptionRes(n);case"OpsMetadataTooManyUpdatesException":case"com.amazonaws.ssm#OpsMetadataTooManyUpdatesException":throw await de_OpsMetadataTooManyUpdatesExceptionRes(n);case"ResourceDataSyncAlreadyExistsException":case"com.amazonaws.ssm#ResourceDataSyncAlreadyExistsException":throw await de_ResourceDataSyncAlreadyExistsExceptionRes(n);case"ResourceDataSyncCountExceededException":case"com.amazonaws.ssm#ResourceDataSyncCountExceededException":throw await de_ResourceDataSyncCountExceededExceptionRes(n);case"ResourceDataSyncInvalidConfigurationException":case"com.amazonaws.ssm#ResourceDataSyncInvalidConfigurationException":throw await de_ResourceDataSyncInvalidConfigurationExceptionRes(n);case"InvalidActivation":case"com.amazonaws.ssm#InvalidActivation":throw await de_InvalidActivationRes(n);case"InvalidActivationId":case"com.amazonaws.ssm#InvalidActivationId":throw await de_InvalidActivationIdRes(n);case"AssociationDoesNotExist":case"com.amazonaws.ssm#AssociationDoesNotExist":throw await de_AssociationDoesNotExistRes(n);case"AssociatedInstances":case"com.amazonaws.ssm#AssociatedInstances":throw await de_AssociatedInstancesRes(n);case"InvalidDocumentOperation":case"com.amazonaws.ssm#InvalidDocumentOperation":throw await de_InvalidDocumentOperationRes(n);case"InvalidDeleteInventoryParametersException":case"com.amazonaws.ssm#InvalidDeleteInventoryParametersException":throw await de_InvalidDeleteInventoryParametersExceptionRes(n);case"InvalidInventoryRequestException":case"com.amazonaws.ssm#InvalidInventoryRequestException":throw await de_InvalidInventoryRequestExceptionRes(n);case"InvalidOptionException":case"com.amazonaws.ssm#InvalidOptionException":throw await de_InvalidOptionExceptionRes(n);case"InvalidTypeNameException":case"com.amazonaws.ssm#InvalidTypeNameException":throw await de_InvalidTypeNameExceptionRes(n);case"OpsMetadataNotFoundException":case"com.amazonaws.ssm#OpsMetadataNotFoundException":throw await de_OpsMetadataNotFoundExceptionRes(n);case"ParameterNotFound":case"com.amazonaws.ssm#ParameterNotFound":throw await de_ParameterNotFoundRes(n);case"ResourceInUseException":case"com.amazonaws.ssm#ResourceInUseException":throw await de_ResourceInUseExceptionRes(n);case"ResourceDataSyncNotFoundException":case"com.amazonaws.ssm#ResourceDataSyncNotFoundException":throw await de_ResourceDataSyncNotFoundExceptionRes(n);case"MalformedResourcePolicyDocumentException":case"com.amazonaws.ssm#MalformedResourcePolicyDocumentException":throw await de_MalformedResourcePolicyDocumentExceptionRes(n);case"ResourceNotFoundException":case"com.amazonaws.ssm#ResourceNotFoundException":throw await de_ResourceNotFoundExceptionRes(n);case"ResourcePolicyConflictException":case"com.amazonaws.ssm#ResourcePolicyConflictException":throw await de_ResourcePolicyConflictExceptionRes(n);case"ResourcePolicyInvalidParameterException":case"com.amazonaws.ssm#ResourcePolicyInvalidParameterException":throw await de_ResourcePolicyInvalidParameterExceptionRes(n);case"ResourcePolicyNotFoundException":case"com.amazonaws.ssm#ResourcePolicyNotFoundException":throw await de_ResourcePolicyNotFoundExceptionRes(n);case"TargetInUseException":case"com.amazonaws.ssm#TargetInUseException":throw await de_TargetInUseExceptionRes(n);case"InvalidFilter":case"com.amazonaws.ssm#InvalidFilter":throw await de_InvalidFilterRes(n);case"InvalidNextToken":case"com.amazonaws.ssm#InvalidNextToken":throw await de_InvalidNextTokenRes(n);case"InvalidAssociationVersion":case"com.amazonaws.ssm#InvalidAssociationVersion":throw await de_InvalidAssociationVersionRes(n);case"AssociationExecutionDoesNotExist":case"com.amazonaws.ssm#AssociationExecutionDoesNotExist":throw await de_AssociationExecutionDoesNotExistRes(n);case"InvalidFilterKey":case"com.amazonaws.ssm#InvalidFilterKey":throw await de_InvalidFilterKeyRes(n);case"InvalidFilterValue":case"com.amazonaws.ssm#InvalidFilterValue":throw await de_InvalidFilterValueRes(n);case"AutomationExecutionNotFoundException":case"com.amazonaws.ssm#AutomationExecutionNotFoundException":throw await de_AutomationExecutionNotFoundExceptionRes(n);case"InvalidPermissionType":case"com.amazonaws.ssm#InvalidPermissionType":throw await de_InvalidPermissionTypeRes(n);case"UnsupportedOperatingSystem":case"com.amazonaws.ssm#UnsupportedOperatingSystem":throw await de_UnsupportedOperatingSystemRes(n);case"InvalidInstanceInformationFilterValue":case"com.amazonaws.ssm#InvalidInstanceInformationFilterValue":throw await de_InvalidInstanceInformationFilterValueRes(n);case"InvalidInstancePropertyFilterValue":case"com.amazonaws.ssm#InvalidInstancePropertyFilterValue":throw await de_InvalidInstancePropertyFilterValueRes(n);case"InvalidDeletionIdException":case"com.amazonaws.ssm#InvalidDeletionIdException":throw await de_InvalidDeletionIdExceptionRes(n);case"InvalidFilterOption":case"com.amazonaws.ssm#InvalidFilterOption":throw await de_InvalidFilterOptionRes(n);case"OpsItemRelatedItemAssociationNotFoundException":case"com.amazonaws.ssm#OpsItemRelatedItemAssociationNotFoundException":throw await de_OpsItemRelatedItemAssociationNotFoundExceptionRes(n);case"InvalidDocumentType":case"com.amazonaws.ssm#InvalidDocumentType":throw await de_InvalidDocumentTypeRes(n);case"UnsupportedCalendarException":case"com.amazonaws.ssm#UnsupportedCalendarException":throw await de_UnsupportedCalendarExceptionRes(n);case"InvalidPluginName":case"com.amazonaws.ssm#InvalidPluginName":throw await de_InvalidPluginNameRes(n);case"InvocationDoesNotExist":case"com.amazonaws.ssm#InvocationDoesNotExist":throw await de_InvocationDoesNotExistRes(n);case"UnsupportedFeatureRequiredException":case"com.amazonaws.ssm#UnsupportedFeatureRequiredException":throw await de_UnsupportedFeatureRequiredExceptionRes(n);case"InvalidAggregatorException":case"com.amazonaws.ssm#InvalidAggregatorException":throw await de_InvalidAggregatorExceptionRes(n);case"InvalidInventoryGroupException":case"com.amazonaws.ssm#InvalidInventoryGroupException":throw await de_InvalidInventoryGroupExceptionRes(n);case"InvalidResultAttributeException":case"com.amazonaws.ssm#InvalidResultAttributeException":throw await de_InvalidResultAttributeExceptionRes(n);case"InvalidKeyId":case"com.amazonaws.ssm#InvalidKeyId":throw await de_InvalidKeyIdRes(n);case"ParameterVersionNotFound":case"com.amazonaws.ssm#ParameterVersionNotFound":throw await de_ParameterVersionNotFoundRes(n);case"ServiceSettingNotFound":case"com.amazonaws.ssm#ServiceSettingNotFound":throw await de_ServiceSettingNotFoundRes(n);case"ParameterVersionLabelLimitExceeded":case"com.amazonaws.ssm#ParameterVersionLabelLimitExceeded":throw await de_ParameterVersionLabelLimitExceededRes(n);case"DocumentPermissionLimit":case"com.amazonaws.ssm#DocumentPermissionLimit":throw await de_DocumentPermissionLimitRes(n);case"ComplianceTypeCountLimitExceededException":case"com.amazonaws.ssm#ComplianceTypeCountLimitExceededException":throw await de_ComplianceTypeCountLimitExceededExceptionRes(n);case"InvalidItemContentException":case"com.amazonaws.ssm#InvalidItemContentException":throw await de_InvalidItemContentExceptionRes(n);case"ItemSizeLimitExceededException":case"com.amazonaws.ssm#ItemSizeLimitExceededException":throw await de_ItemSizeLimitExceededExceptionRes(n);case"TotalSizeLimitExceededException":case"com.amazonaws.ssm#TotalSizeLimitExceededException":throw await de_TotalSizeLimitExceededExceptionRes(n);case"CustomSchemaCountLimitExceededException":case"com.amazonaws.ssm#CustomSchemaCountLimitExceededException":throw await de_CustomSchemaCountLimitExceededExceptionRes(n);case"InvalidInventoryItemContextException":case"com.amazonaws.ssm#InvalidInventoryItemContextException":throw await de_InvalidInventoryItemContextExceptionRes(n);case"ItemContentMismatchException":case"com.amazonaws.ssm#ItemContentMismatchException":throw await de_ItemContentMismatchExceptionRes(n);case"SubTypeCountLimitExceededException":case"com.amazonaws.ssm#SubTypeCountLimitExceededException":throw await de_SubTypeCountLimitExceededExceptionRes(n);case"UnsupportedInventoryItemContextException":case"com.amazonaws.ssm#UnsupportedInventoryItemContextException":throw await de_UnsupportedInventoryItemContextExceptionRes(n);case"UnsupportedInventorySchemaVersionException":case"com.amazonaws.ssm#UnsupportedInventorySchemaVersionException":throw await de_UnsupportedInventorySchemaVersionExceptionRes(n);case"HierarchyLevelLimitExceededException":case"com.amazonaws.ssm#HierarchyLevelLimitExceededException":throw await de_HierarchyLevelLimitExceededExceptionRes(n);case"HierarchyTypeMismatchException":case"com.amazonaws.ssm#HierarchyTypeMismatchException":throw await de_HierarchyTypeMismatchExceptionRes(n);case"IncompatiblePolicyException":case"com.amazonaws.ssm#IncompatiblePolicyException":throw await de_IncompatiblePolicyExceptionRes(n);case"InvalidAllowedPatternException":case"com.amazonaws.ssm#InvalidAllowedPatternException":throw await de_InvalidAllowedPatternExceptionRes(n);case"InvalidPolicyAttributeException":case"com.amazonaws.ssm#InvalidPolicyAttributeException":throw await de_InvalidPolicyAttributeExceptionRes(n);case"InvalidPolicyTypeException":case"com.amazonaws.ssm#InvalidPolicyTypeException":throw await de_InvalidPolicyTypeExceptionRes(n);case"ParameterAlreadyExists":case"com.amazonaws.ssm#ParameterAlreadyExists":throw await de_ParameterAlreadyExistsRes(n);case"ParameterLimitExceeded":case"com.amazonaws.ssm#ParameterLimitExceeded":throw await de_ParameterLimitExceededRes(n);case"ParameterMaxVersionLimitExceeded":case"com.amazonaws.ssm#ParameterMaxVersionLimitExceeded":throw await de_ParameterMaxVersionLimitExceededRes(n);case"ParameterPatternMismatchException":case"com.amazonaws.ssm#ParameterPatternMismatchException":throw await de_ParameterPatternMismatchExceptionRes(n);case"PoliciesLimitExceededException":case"com.amazonaws.ssm#PoliciesLimitExceededException":throw await de_PoliciesLimitExceededExceptionRes(n);case"UnsupportedParameterType":case"com.amazonaws.ssm#UnsupportedParameterType":throw await de_UnsupportedParameterTypeRes(n);case"ResourcePolicyLimitExceededException":case"com.amazonaws.ssm#ResourcePolicyLimitExceededException":throw await de_ResourcePolicyLimitExceededExceptionRes(n);case"AlreadyExistsException":case"com.amazonaws.ssm#AlreadyExistsException":throw await de_AlreadyExistsExceptionRes$1(n);case"FeatureNotAvailableException":case"com.amazonaws.ssm#FeatureNotAvailableException":throw await de_FeatureNotAvailableExceptionRes(n);case"AutomationStepNotFoundException":case"com.amazonaws.ssm#AutomationStepNotFoundException":throw await de_AutomationStepNotFoundExceptionRes(n);case"InvalidAutomationSignalException":case"com.amazonaws.ssm#InvalidAutomationSignalException":throw await de_InvalidAutomationSignalExceptionRes(n);case"InvalidNotificationConfig":case"com.amazonaws.ssm#InvalidNotificationConfig":throw await de_InvalidNotificationConfigRes(n);case"InvalidOutputFolder":case"com.amazonaws.ssm#InvalidOutputFolder":throw await de_InvalidOutputFolderRes(n);case"InvalidRole":case"com.amazonaws.ssm#InvalidRole":throw await de_InvalidRoleRes(n);case"InvalidAssociation":case"com.amazonaws.ssm#InvalidAssociation":throw await de_InvalidAssociationRes(n);case"AutomationDefinitionNotFoundException":case"com.amazonaws.ssm#AutomationDefinitionNotFoundException":throw await de_AutomationDefinitionNotFoundExceptionRes(n);case"AutomationDefinitionVersionNotFoundException":case"com.amazonaws.ssm#AutomationDefinitionVersionNotFoundException":throw await de_AutomationDefinitionVersionNotFoundExceptionRes(n);case"AutomationExecutionLimitExceededException":case"com.amazonaws.ssm#AutomationExecutionLimitExceededException":throw await de_AutomationExecutionLimitExceededExceptionRes(n);case"InvalidAutomationExecutionParametersException":case"com.amazonaws.ssm#InvalidAutomationExecutionParametersException":throw await de_InvalidAutomationExecutionParametersExceptionRes(n);case"AutomationDefinitionNotApprovedException":case"com.amazonaws.ssm#AutomationDefinitionNotApprovedException":throw await de_AutomationDefinitionNotApprovedExceptionRes(n);case"TargetNotConnected":case"com.amazonaws.ssm#TargetNotConnected":throw await de_TargetNotConnectedRes(n);case"InvalidAutomationStatusUpdateException":case"com.amazonaws.ssm#InvalidAutomationStatusUpdateException":throw await de_InvalidAutomationStatusUpdateExceptionRes(n);case"AssociationVersionLimitExceeded":case"com.amazonaws.ssm#AssociationVersionLimitExceeded":throw await de_AssociationVersionLimitExceededRes(n);case"InvalidUpdate":case"com.amazonaws.ssm#InvalidUpdate":throw await de_InvalidUpdateRes(n);case"StatusUnchanged":case"com.amazonaws.ssm#StatusUnchanged":throw await de_StatusUnchangedRes(n);case"DocumentVersionLimitExceeded":case"com.amazonaws.ssm#DocumentVersionLimitExceeded":throw await de_DocumentVersionLimitExceededRes(n);case"DuplicateDocumentContent":case"com.amazonaws.ssm#DuplicateDocumentContent":throw await de_DuplicateDocumentContentRes(n);case"DuplicateDocumentVersionName":case"com.amazonaws.ssm#DuplicateDocumentVersionName":throw await de_DuplicateDocumentVersionNameRes(n);case"OpsMetadataKeyLimitExceededException":case"com.amazonaws.ssm#OpsMetadataKeyLimitExceededException":throw await de_OpsMetadataKeyLimitExceededExceptionRes(n);case"ResourceDataSyncConflictException":case"com.amazonaws.ssm#ResourceDataSyncConflictException":throw await de_ResourceDataSyncConflictExceptionRes(n);default:const t=n.body;return throwDefaultError$1({output:e,parsedBody:t,errorCode:i})}},de_AlreadyExistsExceptionRes$1=async(e,t)=>{const n=e.body,i=_json(n),r=new AlreadyExistsException$1({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_AssociatedInstancesRes=async(e,t)=>{const n=e.body,i=_json(n),r=new AssociatedInstances({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_AssociationAlreadyExistsRes=async(e,t)=>{const n=e.body,i=_json(n),r=new AssociationAlreadyExists({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_AssociationDoesNotExistRes=async(e,t)=>{const n=e.body,i=_json(n),r=new AssociationDoesNotExist({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_AssociationExecutionDoesNotExistRes=async(e,t)=>{const n=e.body,i=_json(n),r=new AssociationExecutionDoesNotExist({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_AssociationLimitExceededRes=async(e,t)=>{const n=e.body,i=_json(n),r=new AssociationLimitExceeded({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_AssociationVersionLimitExceededRes=async(e,t)=>{const n=e.body,i=_json(n),r=new AssociationVersionLimitExceeded({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_AutomationDefinitionNotApprovedExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new AutomationDefinitionNotApprovedException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_AutomationDefinitionNotFoundExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new AutomationDefinitionNotFoundException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_AutomationDefinitionVersionNotFoundExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new AutomationDefinitionVersionNotFoundException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_AutomationExecutionLimitExceededExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new AutomationExecutionLimitExceededException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_AutomationExecutionNotFoundExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new AutomationExecutionNotFoundException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_AutomationStepNotFoundExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new AutomationStepNotFoundException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_ComplianceTypeCountLimitExceededExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ComplianceTypeCountLimitExceededException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_CustomSchemaCountLimitExceededExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new CustomSchemaCountLimitExceededException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_DocumentAlreadyExistsRes=async(e,t)=>{const n=e.body,i=_json(n),r=new DocumentAlreadyExists({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_DocumentLimitExceededRes=async(e,t)=>{const n=e.body,i=_json(n),r=new DocumentLimitExceeded({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_DocumentPermissionLimitRes=async(e,t)=>{const n=e.body,i=_json(n),r=new DocumentPermissionLimit({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_DocumentVersionLimitExceededRes=async(e,t)=>{const n=e.body,i=_json(n),r=new DocumentVersionLimitExceeded({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_DoesNotExistExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new DoesNotExistException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_DuplicateDocumentContentRes=async(e,t)=>{const n=e.body,i=_json(n),r=new DuplicateDocumentContent({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_DuplicateDocumentVersionNameRes=async(e,t)=>{const n=e.body,i=_json(n),r=new DuplicateDocumentVersionName({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_DuplicateInstanceIdRes=async(e,t)=>{const n=e.body,i=_json(n),r=new DuplicateInstanceId({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_FeatureNotAvailableExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new FeatureNotAvailableException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_HierarchyLevelLimitExceededExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new HierarchyLevelLimitExceededException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_HierarchyTypeMismatchExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new HierarchyTypeMismatchException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_IdempotentParameterMismatchRes=async(e,t)=>{const n=e.body,i=_json(n),r=new IdempotentParameterMismatch({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_IncompatiblePolicyExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new IncompatiblePolicyException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InternalServerErrorRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InternalServerError({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidActivationRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidActivation({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidActivationIdRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidActivationId({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidAggregatorExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidAggregatorException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidAllowedPatternExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidAllowedPatternException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidAssociationRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidAssociation({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidAssociationVersionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidAssociationVersion({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidAutomationExecutionParametersExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidAutomationExecutionParametersException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidAutomationSignalExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidAutomationSignalException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidAutomationStatusUpdateExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidAutomationStatusUpdateException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidCommandIdRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidCommandId({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidDeleteInventoryParametersExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidDeleteInventoryParametersException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidDeletionIdExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidDeletionIdException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidDocumentRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidDocument({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidDocumentContentRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidDocumentContent({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidDocumentOperationRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidDocumentOperation({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidDocumentSchemaVersionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidDocumentSchemaVersion({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidDocumentTypeRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidDocumentType({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidDocumentVersionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidDocumentVersion({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidFilterRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidFilter({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidFilterKeyRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidFilterKey({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidFilterOptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidFilterOption({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidFilterValueRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidFilterValue({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidInstanceIdRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidInstanceId({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidInstanceInformationFilterValueRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidInstanceInformationFilterValue({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidInstancePropertyFilterValueRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidInstancePropertyFilterValue({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidInventoryGroupExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidInventoryGroupException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidInventoryItemContextExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidInventoryItemContextException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidInventoryRequestExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidInventoryRequestException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidItemContentExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidItemContentException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidKeyIdRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidKeyId({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidNextTokenRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidNextToken({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidNotificationConfigRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidNotificationConfig({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidOptionExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidOptionException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidOutputFolderRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidOutputFolder({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidOutputLocationRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidOutputLocation({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidParametersRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidParameters({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidPermissionTypeRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidPermissionType({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidPluginNameRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidPluginName({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidPolicyAttributeExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidPolicyAttributeException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidPolicyTypeExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidPolicyTypeException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidResourceIdRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidResourceId({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidResourceTypeRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidResourceType({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidResultAttributeExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidResultAttributeException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidRoleRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidRole({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidScheduleRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidSchedule({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidTagRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidTag({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidTargetRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidTarget({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidTargetMapsRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidTargetMaps({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidTypeNameExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidTypeNameException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvalidUpdateRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvalidUpdate({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_InvocationDoesNotExistRes=async(e,t)=>{const n=e.body,i=_json(n),r=new InvocationDoesNotExist({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_ItemContentMismatchExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ItemContentMismatchException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_ItemSizeLimitExceededExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ItemSizeLimitExceededException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_MalformedResourcePolicyDocumentExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new MalformedResourcePolicyDocumentException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_MaxDocumentSizeExceededRes=async(e,t)=>{const n=e.body,i=_json(n),r=new MaxDocumentSizeExceeded({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_OpsItemAccessDeniedExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new OpsItemAccessDeniedException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_OpsItemAlreadyExistsExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new OpsItemAlreadyExistsException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_OpsItemConflictExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new OpsItemConflictException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_OpsItemInvalidParameterExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new OpsItemInvalidParameterException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_OpsItemLimitExceededExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new OpsItemLimitExceededException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_OpsItemNotFoundExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new OpsItemNotFoundException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_OpsItemRelatedItemAlreadyExistsExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new OpsItemRelatedItemAlreadyExistsException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_OpsItemRelatedItemAssociationNotFoundExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new OpsItemRelatedItemAssociationNotFoundException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_OpsMetadataAlreadyExistsExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new OpsMetadataAlreadyExistsException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_OpsMetadataInvalidArgumentExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new OpsMetadataInvalidArgumentException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_OpsMetadataKeyLimitExceededExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new OpsMetadataKeyLimitExceededException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_OpsMetadataLimitExceededExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new OpsMetadataLimitExceededException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_OpsMetadataNotFoundExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new OpsMetadataNotFoundException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_OpsMetadataTooManyUpdatesExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new OpsMetadataTooManyUpdatesException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_ParameterAlreadyExistsRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ParameterAlreadyExists({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_ParameterLimitExceededRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ParameterLimitExceeded({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_ParameterMaxVersionLimitExceededRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ParameterMaxVersionLimitExceeded({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_ParameterNotFoundRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ParameterNotFound({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_ParameterPatternMismatchExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ParameterPatternMismatchException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_ParameterVersionLabelLimitExceededRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ParameterVersionLabelLimitExceeded({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_ParameterVersionNotFoundRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ParameterVersionNotFound({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_PoliciesLimitExceededExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new PoliciesLimitExceededException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_ResourceDataSyncAlreadyExistsExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ResourceDataSyncAlreadyExistsException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_ResourceDataSyncConflictExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ResourceDataSyncConflictException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_ResourceDataSyncCountExceededExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ResourceDataSyncCountExceededException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_ResourceDataSyncInvalidConfigurationExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ResourceDataSyncInvalidConfigurationException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_ResourceDataSyncNotFoundExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ResourceDataSyncNotFoundException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_ResourceInUseExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ResourceInUseException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_ResourceLimitExceededExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ResourceLimitExceededException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_ResourceNotFoundExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ResourceNotFoundException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_ResourcePolicyConflictExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ResourcePolicyConflictException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_ResourcePolicyInvalidParameterExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ResourcePolicyInvalidParameterException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_ResourcePolicyLimitExceededExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ResourcePolicyLimitExceededException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_ResourcePolicyNotFoundExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ResourcePolicyNotFoundException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_ServiceSettingNotFoundRes=async(e,t)=>{const n=e.body,i=_json(n),r=new ServiceSettingNotFound({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_StatusUnchangedRes=async(e,t)=>{const n=e.body,i=_json(n),r=new StatusUnchanged({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_SubTypeCountLimitExceededExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new SubTypeCountLimitExceededException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_TargetInUseExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new TargetInUseException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_TargetNotConnectedRes=async(e,t)=>{const n=e.body,i=_json(n),r=new TargetNotConnected({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_TooManyTagsErrorRes=async(e,t)=>{const n=e.body,i=_json(n),r=new TooManyTagsError({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_TooManyUpdatesRes=async(e,t)=>{const n=e.body,i=_json(n),r=new TooManyUpdates({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_TotalSizeLimitExceededExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new TotalSizeLimitExceededException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_UnsupportedCalendarExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new UnsupportedCalendarException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_UnsupportedFeatureRequiredExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new UnsupportedFeatureRequiredException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_UnsupportedInventoryItemContextExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new UnsupportedInventoryItemContextException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_UnsupportedInventorySchemaVersionExceptionRes=async(e,t)=>{const n=e.body,i=_json(n),r=new UnsupportedInventorySchemaVersionException({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_UnsupportedOperatingSystemRes=async(e,t)=>{const n=e.body,i=_json(n),r=new UnsupportedOperatingSystem({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_UnsupportedParameterTypeRes=async(e,t)=>{const n=e.body,i=_json(n),r=new UnsupportedParameterType({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_UnsupportedPlatformTypeRes=async(e,t)=>{const n=e.body,i=_json(n),r=new UnsupportedPlatformType({$metadata:deserializeMetadata$1(e),...i});return decorateServiceException(r,n)},de_GetParameterResult=(e,t)=>take(e,{Parameter:e=>de_Parameter(e)}),de_GetParametersResult=(e,t)=>take(e,{InvalidParameters:_json,Parameters:e=>de_ParameterList(e)}),de_Parameter=(e,t)=>take(e,{ARN:expectString,DataType:expectString,LastModifiedDate:e=>expectNonNull(parseEpochTimestamp(expectNumber(e))),Name:expectString,Selector:expectString,SourceResult:expectString,Type:expectString,Value:expectString,Version:expectLong}),de_ParameterList=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>de_Parameter(e)));return n},deserializeMetadata$1=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"]}),throwDefaultError$1=withBaseException(SSMServiceException),buildHttpRpcRequest$1=async(e,t,n,i,r)=>{const{hostname:o,protocol:a="https",port:s,path:c}=await e.endpoint(),l={protocol:a,hostname:o,port:s,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:t};return void 0!==r&&(l.body=r),new HttpRequest(l)};function sharedHeaders(e){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AmazonSSM.${e}`}}class GetParameterCommand extends(Command.classBuilder().ep(commonParams$1).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonSSM","GetParameter",{}).n("SSMClient","GetParameterCommand").f(void 0,GetParameterResultFilterSensitiveLog).ser(se_GetParameterCommand).de(de_GetParameterCommand).build()){}class GetParametersCommand extends(Command.classBuilder().ep(commonParams$1).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonSSM","GetParameters",{}).n("SSMClient","GetParametersCommand").f(void 0,GetParametersResultFilterSensitiveLog).ser(se_GetParametersCommand).de(de_GetParametersCommand).build()){}const DEFAULT_CLIENT_CONFIG$1={clientConfig:DEFAULT_AWS_CONFIGURATION,onlyDefault:!1,prefix:process.env.SSM_PARAM_PATH},getSecrets=async(e,t,n,i)=>{if(t.onlyDefault)return i;try{const r=new GetParametersCommand({Names:n.map((e=>`${t.prefix??""}${e}`)),WithDecryption:!0}),o=await e.send(r);return o?.Parameters?.map((e=>{const t=!e.Value&&e.Name?i.find((t=>t.name===e.Name)):i[0];return{name:e.Name??t?.name??"",value:e.Value??t?.value??""}}))??i}catch(e){return t.logger&&t.logger("error",e),i}},getSecret=async(e,t,n,i)=>{if(t.onlyDefault)return i;try{const r=await e.send(new GetParameterCommand({Name:`${t.prefix??""}${n}`,WithDecryption:!0}));return r?.Parameter?.Value??i}catch(e){return t.logger&&t.logger("error",e),i}},parameterStore=e=>{const{clientConfig:t,...n}={...DEFAULT_CLIENT_CONFIG$1,...e},i=new SSMClient(t);return{getSecret:(e,t="")=>getSecret(i,n,e,t),getSecrets:(e,t=[])=>getSecrets(i,n,e,t)}},defaultSESHttpAuthSchemeParametersProvider=async(e,t,n)=>({operation:getSmithyContext(t).operation,region:await normalizeProvider$1(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function createAwsAuthSigv4HttpAuthOption(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ses",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}const defaultSESHttpAuthSchemeProvider=e=>{const t=[];return e.operation,t.push(createAwsAuthSigv4HttpAuthOption(e)),t},resolveHttpAuthSchemeConfig=e=>({...resolveAwsSdkSigV4Config(e)}),resolveClientEndpointParameters=e=>({...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"ses"}),commonParams={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},name$2="@aws-sdk/client-ses",description$2="AWS SDK for JavaScript Ses Client for Node.js, Browser and React Native",version$2="3.693.0",scripts$2={build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-ses","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo ses"},main$2="./dist-cjs/index.js",types$1="./dist-types/index.d.ts",module="./dist-es/index.js",sideEffects=!1,dependencies$1={"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.693.0","@aws-sdk/client-sts":"3.693.0","@aws-sdk/core":"3.693.0","@aws-sdk/credential-provider-node":"3.693.0","@aws-sdk/middleware-host-header":"3.693.0","@aws-sdk/middleware-logger":"3.693.0","@aws-sdk/middleware-recursion-detection":"3.693.0","@aws-sdk/middleware-user-agent":"3.693.0","@aws-sdk/region-config-resolver":"3.693.0","@aws-sdk/types":"3.692.0","@aws-sdk/util-endpoints":"3.693.0","@aws-sdk/util-user-agent-browser":"3.693.0","@aws-sdk/util-user-agent-node":"3.693.0","@smithy/config-resolver":"^3.0.11","@smithy/core":"^2.5.2","@smithy/fetch-http-handler":"^4.1.0","@smithy/hash-node":"^3.0.9","@smithy/invalid-dependency":"^3.0.9","@smithy/middleware-content-length":"^3.0.11","@smithy/middleware-endpoint":"^3.2.2","@smithy/middleware-retry":"^3.0.26","@smithy/middleware-serde":"^3.0.9","@smithy/middleware-stack":"^3.0.9","@smithy/node-config-provider":"^3.1.10","@smithy/node-http-handler":"^3.3.0","@smithy/protocol-http":"^4.1.6","@smithy/smithy-client":"^3.4.3","@smithy/types":"^3.7.0","@smithy/url-parser":"^3.0.9","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.26","@smithy/util-defaults-mode-node":"^3.0.26","@smithy/util-endpoints":"^2.1.5","@smithy/util-middleware":"^3.0.9","@smithy/util-retry":"^3.0.9","@smithy/util-utf8":"^3.0.0","@smithy/util-waiter":"^3.1.8",tslib:"^2.6.2"},devDependencies$2={"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines$2={node:">=16.0.0"},typesVersions={"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files=["dist-*/**"],author$2={name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license$2="Apache-2.0",browser$4={"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},homepage$1="https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-ses",repository$2={type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-ses"};var packageInfo={name:name$2,description:description$2,version:version$2,scripts:scripts$2,main:main$2,types:types$1,module:module,sideEffects:sideEffects,dependencies:dependencies$1,devDependencies:devDependencies$2,engines:engines$2,typesVersions:typesVersions,files:files,author:author$2,license:license$2,browser:browser$4,"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:homepage$1,repository:repository$2};const s="required",t="fn",u="argv",v="ref",a=!0,b="isSet",c="booleanEquals",d="error",e="endpoint",f="tree",g="PartitionResult",h={[s]:!1,type:"String"},i={[s]:!0,default:!1,type:"Boolean"},j={[v]:"Endpoint"},k={[t]:c,[u]:[{[v]:"UseFIPS"},!0]},l={[t]:c,[u]:[{[v]:"UseDualStack"},!0]},m={},n={[t]:"getAttr",[u]:[{[v]:g},"supportsFIPS"]},o={[t]:c,[u]:[!0,{[t]:"getAttr",[u]:[{[v]:g},"supportsDualStack"]}]},p=[k],q=[l],r=[{[v]:"Region"}],_data={version:"1.0",parameters:{Region:h,UseDualStack:i,UseFIPS:i,Endpoint:h},rules:[{conditions:[{[t]:b,[u]:[j]}],rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:j,properties:m,headers:m},type:e}],type:f},{conditions:[{[t]:b,[u]:r}],rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:g}],rules:[{conditions:[k,l],rules:[{conditions:[{[t]:c,[u]:[a,n]},o],rules:[{endpoint:{url:"https://email-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:p,rules:[{conditions:[{[t]:c,[u]:[n,a]}],rules:[{endpoint:{url:"https://email-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:q,rules:[{conditions:[o],rules:[{endpoint:{url:"https://email.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{endpoint:{url:"https://email.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}]},ruleSet=_data,cache=new EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),defaultEndpointResolver=(e,t={})=>cache.get(e,(()=>resolveEndpoint(ruleSet,{endpointParams:e,logger:t.logger})));customEndpointFunctions.aws=awsEndpointFunctions;const getRuntimeConfig$1=e=>({apiVersion:"2010-12-01",base64Decoder:e?.base64Decoder??fromBase64,base64Encoder:e?.base64Encoder??toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??defaultSESHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new AwsSdkSigV4Signer}],logger:e?.logger??new NoOpLogger,serviceId:e?.serviceId??"SES",urlParser:e?.urlParser??parseUrl,utf8Decoder:e?.utf8Decoder??fromUtf8$2,utf8Encoder:e?.utf8Encoder??toUtf8}),getRuntimeConfig=e=>{const t=resolveDefaultsModeConfig(e),n=()=>t().then(loadConfigsForDefaultMode),i=getRuntimeConfig$1(e);return{...i,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??calculateBodyLength,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??createDefaultUserAgentProvider({serviceId:i.serviceId,clientVersion:packageInfo.version}),maxAttempts:e?.maxAttempts??DEFAULT_MAX_ATTEMPTS,region:e?.region??invalidProvider("Region is missing"),requestHandler:FetchHttpHandler.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||DEFAULT_RETRY_MODE),sha256:e?.sha256??Sha256,streamCollector:e?.streamCollector??streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT))}},getHttpAuthExtensionConfiguration=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}},resolveHttpAuthRuntimeConfig=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),asPartial=e=>e,resolveRuntimeExtensions=(e,t)=>{const n={...asPartial(getAwsRegionExtensionConfiguration(e)),...asPartial(getDefaultExtensionConfiguration(e)),...asPartial(getHttpHandlerExtensionConfiguration(e)),...asPartial(getHttpAuthExtensionConfiguration(e))};return t.forEach((e=>e.configure(n))),{...e,...resolveAwsRegionExtensionConfiguration(n),...resolveDefaultRuntimeConfig(n),...resolveHttpHandlerRuntimeConfig(n),...resolveHttpAuthRuntimeConfig(n)}};class SESClient extends Client{constructor(...[e]){const t=getRuntimeConfig(e||{}),n=resolveUserAgentConfig(resolveClientEndpointParameters(t)),i=resolveRetryConfig(n),r=resolveHostHeaderConfig(resolveRegionConfig(i)),o=resolveEndpointConfig(r),a=resolveHttpAuthSchemeConfig(o),s=resolveRuntimeExtensions(a,e?.extensions||[]);super(s),this.config=s,this.middlewareStack.use(getUserAgentPlugin(this.config)),this.middlewareStack.use(getRetryPlugin(this.config)),this.middlewareStack.use(getContentLengthPlugin(this.config)),this.middlewareStack.use(getHostHeaderPlugin(this.config)),this.middlewareStack.use(getLoggerPlugin(this.config)),this.middlewareStack.use(getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:defaultSESHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async e=>new DefaultIdentityProviderConfig({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class SESServiceException extends ServiceException$1{constructor(e){super(e),Object.setPrototypeOf(this,SESServiceException.prototype)}}class AccountSendingPausedException extends SESServiceException{constructor(e){super({name:"AccountSendingPausedException",$fault:"client",...e}),this.name="AccountSendingPausedException",this.$fault="client",Object.setPrototypeOf(this,AccountSendingPausedException.prototype)}}class AlreadyExistsException extends SESServiceException{constructor(e){super({name:"AlreadyExistsException",$fault:"client",...e}),this.name="AlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,AlreadyExistsException.prototype),this.Name=e.Name}}const BehaviorOnMXFailure={RejectMessage:"RejectMessage",UseDefaultValue:"UseDefaultValue"},BounceType={ContentRejected:"ContentRejected",DoesNotExist:"DoesNotExist",ExceededQuota:"ExceededQuota",MessageTooLarge:"MessageTooLarge",TemporaryFailure:"TemporaryFailure",Undefined:"Undefined"},DsnAction={DELAYED:"delayed",DELIVERED:"delivered",EXPANDED:"expanded",FAILED:"failed",RELAYED:"relayed"},BulkEmailStatus={AccountDailyQuotaExceeded:"AccountDailyQuotaExceeded",AccountSendingPaused:"AccountSendingPaused",AccountSuspended:"AccountSuspended",AccountThrottled:"AccountThrottled",ConfigurationSetDoesNotExist:"ConfigurationSetDoesNotExist",ConfigurationSetSendingPaused:"ConfigurationSetSendingPaused",Failed:"Failed",InvalidParameterValue:"InvalidParameterValue",InvalidSendingPoolName:"InvalidSendingPoolName",MailFromDomainNotVerified:"MailFromDomainNotVerified",MessageRejected:"MessageRejected",Success:"Success",TemplateDoesNotExist:"TemplateDoesNotExist",TransientFailure:"TransientFailure"};class CannotDeleteException extends SESServiceException{constructor(e){super({name:"CannotDeleteException",$fault:"client",...e}),this.name="CannotDeleteException",this.$fault="client",Object.setPrototypeOf(this,CannotDeleteException.prototype),this.Name=e.Name}}class LimitExceededException extends SESServiceException{constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,LimitExceededException.prototype)}}class RuleSetDoesNotExistException extends SESServiceException{constructor(e){super({name:"RuleSetDoesNotExistException",$fault:"client",...e}),this.name="RuleSetDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,RuleSetDoesNotExistException.prototype),this.Name=e.Name}}const DimensionValueSource={EMAIL_HEADER:"emailHeader",LINK_TAG:"linkTag",MESSAGE_TAG:"messageTag"};class ConfigurationSetAlreadyExistsException extends SESServiceException{constructor(e){super({name:"ConfigurationSetAlreadyExistsException",$fault:"client",...e}),this.name="ConfigurationSetAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,ConfigurationSetAlreadyExistsException.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}const ConfigurationSetAttribute={DELIVERY_OPTIONS:"deliveryOptions",EVENT_DESTINATIONS:"eventDestinations",REPUTATION_OPTIONS:"reputationOptions",TRACKING_OPTIONS:"trackingOptions"};class ConfigurationSetDoesNotExistException extends SESServiceException{constructor(e){super({name:"ConfigurationSetDoesNotExistException",$fault:"client",...e}),this.name="ConfigurationSetDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,ConfigurationSetDoesNotExistException.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class ConfigurationSetSendingPausedException extends SESServiceException{constructor(e){super({name:"ConfigurationSetSendingPausedException",$fault:"client",...e}),this.name="ConfigurationSetSendingPausedException",this.$fault="client",Object.setPrototypeOf(this,ConfigurationSetSendingPausedException.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class InvalidConfigurationSetException extends SESServiceException{constructor(e){super({name:"InvalidConfigurationSetException",$fault:"client",...e}),this.name="InvalidConfigurationSetException",this.$fault="client",Object.setPrototypeOf(this,InvalidConfigurationSetException.prototype)}}const EventType={BOUNCE:"bounce",CLICK:"click",COMPLAINT:"complaint",DELIVERY:"delivery",OPEN:"open",REJECT:"reject",RENDERING_FAILURE:"renderingFailure",SEND:"send"};class EventDestinationAlreadyExistsException extends SESServiceException{constructor(e){super({name:"EventDestinationAlreadyExistsException",$fault:"client",...e}),this.name="EventDestinationAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,EventDestinationAlreadyExistsException.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class InvalidCloudWatchDestinationException extends SESServiceException{constructor(e){super({name:"InvalidCloudWatchDestinationException",$fault:"client",...e}),this.name="InvalidCloudWatchDestinationException",this.$fault="client",Object.setPrototypeOf(this,InvalidCloudWatchDestinationException.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class InvalidFirehoseDestinationException extends SESServiceException{constructor(e){super({name:"InvalidFirehoseDestinationException",$fault:"client",...e}),this.name="InvalidFirehoseDestinationException",this.$fault="client",Object.setPrototypeOf(this,InvalidFirehoseDestinationException.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class InvalidSNSDestinationException extends SESServiceException{constructor(e){super({name:"InvalidSNSDestinationException",$fault:"client",...e}),this.name="InvalidSNSDestinationException",this.$fault="client",Object.setPrototypeOf(this,InvalidSNSDestinationException.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class InvalidTrackingOptionsException extends SESServiceException{constructor(e){super({name:"InvalidTrackingOptionsException",$fault:"client",...e}),this.name="InvalidTrackingOptionsException",this.$fault="client",Object.setPrototypeOf(this,InvalidTrackingOptionsException.prototype)}}class TrackingOptionsAlreadyExistsException extends SESServiceException{constructor(e){super({name:"TrackingOptionsAlreadyExistsException",$fault:"client",...e}),this.name="TrackingOptionsAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,TrackingOptionsAlreadyExistsException.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class CustomVerificationEmailInvalidContentException extends SESServiceException{constructor(e){super({name:"CustomVerificationEmailInvalidContentException",$fault:"client",...e}),this.name="CustomVerificationEmailInvalidContentException",this.$fault="client",Object.setPrototypeOf(this,CustomVerificationEmailInvalidContentException.prototype)}}class CustomVerificationEmailTemplateAlreadyExistsException extends SESServiceException{constructor(e){super({name:"CustomVerificationEmailTemplateAlreadyExistsException",$fault:"client",...e}),this.name="CustomVerificationEmailTemplateAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,CustomVerificationEmailTemplateAlreadyExistsException.prototype),this.CustomVerificationEmailTemplateName=e.CustomVerificationEmailTemplateName}}class FromEmailAddressNotVerifiedException extends SESServiceException{constructor(e){super({name:"FromEmailAddressNotVerifiedException",$fault:"client",...e}),this.name="FromEmailAddressNotVerifiedException",this.$fault="client",Object.setPrototypeOf(this,FromEmailAddressNotVerifiedException.prototype),this.FromEmailAddress=e.FromEmailAddress}}const ReceiptFilterPolicy={Allow:"Allow",Block:"Block"},InvocationType={Event:"Event",RequestResponse:"RequestResponse"},SNSActionEncoding={Base64:"Base64",UTF8:"UTF-8"},StopScope={RULE_SET:"RuleSet"},TlsPolicy={Optional:"Optional",Require:"Require"};class InvalidLambdaFunctionException extends SESServiceException{constructor(e){super({name:"InvalidLambdaFunctionException",$fault:"client",...e}),this.name="InvalidLambdaFunctionException",this.$fault="client",Object.setPrototypeOf(this,InvalidLambdaFunctionException.prototype),this.FunctionArn=e.FunctionArn}}class InvalidS3ConfigurationException extends SESServiceException{constructor(e){super({name:"InvalidS3ConfigurationException",$fault:"client",...e}),this.name="InvalidS3ConfigurationException",this.$fault="client",Object.setPrototypeOf(this,InvalidS3ConfigurationException.prototype),this.Bucket=e.Bucket}}class InvalidSnsTopicException extends SESServiceException{constructor(e){super({name:"InvalidSnsTopicException",$fault:"client",...e}),this.name="InvalidSnsTopicException",this.$fault="client",Object.setPrototypeOf(this,InvalidSnsTopicException.prototype),this.Topic=e.Topic}}class RuleDoesNotExistException extends SESServiceException{constructor(e){super({name:"RuleDoesNotExistException",$fault:"client",...e}),this.name="RuleDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,RuleDoesNotExistException.prototype),this.Name=e.Name}}class InvalidTemplateException extends SESServiceException{constructor(e){super({name:"InvalidTemplateException",$fault:"client",...e}),this.name="InvalidTemplateException",this.$fault="client",Object.setPrototypeOf(this,InvalidTemplateException.prototype),this.TemplateName=e.TemplateName}}const CustomMailFromStatus={Failed:"Failed",Pending:"Pending",Success:"Success",TemporaryFailure:"TemporaryFailure"};class CustomVerificationEmailTemplateDoesNotExistException extends SESServiceException{constructor(e){super({name:"CustomVerificationEmailTemplateDoesNotExistException",$fault:"client",...e}),this.name="CustomVerificationEmailTemplateDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,CustomVerificationEmailTemplateDoesNotExistException.prototype),this.CustomVerificationEmailTemplateName=e.CustomVerificationEmailTemplateName}}class EventDestinationDoesNotExistException extends SESServiceException{constructor(e){super({name:"EventDestinationDoesNotExistException",$fault:"client",...e}),this.name="EventDestinationDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,EventDestinationDoesNotExistException.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class TrackingOptionsDoesNotExistException extends SESServiceException{constructor(e){super({name:"TrackingOptionsDoesNotExistException",$fault:"client",...e}),this.name="TrackingOptionsDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,TrackingOptionsDoesNotExistException.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}const VerificationStatus={Failed:"Failed",NotStarted:"NotStarted",Pending:"Pending",Success:"Success",TemporaryFailure:"TemporaryFailure"};class TemplateDoesNotExistException extends SESServiceException{constructor(e){super({name:"TemplateDoesNotExistException",$fault:"client",...e}),this.name="TemplateDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,TemplateDoesNotExistException.prototype),this.TemplateName=e.TemplateName}}const IdentityType={Domain:"Domain",EmailAddress:"EmailAddress"};class InvalidDeliveryOptionsException extends SESServiceException{constructor(e){super({name:"InvalidDeliveryOptionsException",$fault:"client",...e}),this.name="InvalidDeliveryOptionsException",this.$fault="client",Object.setPrototypeOf(this,InvalidDeliveryOptionsException.prototype)}}class InvalidPolicyException extends SESServiceException{constructor(e){super({name:"InvalidPolicyException",$fault:"client",...e}),this.name="InvalidPolicyException",this.$fault="client",Object.setPrototypeOf(this,InvalidPolicyException.prototype)}}class InvalidRenderingParameterException extends SESServiceException{constructor(e){super({name:"InvalidRenderingParameterException",$fault:"client",...e}),this.name="InvalidRenderingParameterException",this.$fault="client",Object.setPrototypeOf(this,InvalidRenderingParameterException.prototype),this.TemplateName=e.TemplateName}}class MailFromDomainNotVerifiedException extends SESServiceException{constructor(e){super({name:"MailFromDomainNotVerifiedException",$fault:"client",...e}),this.name="MailFromDomainNotVerifiedException",this.$fault="client",Object.setPrototypeOf(this,MailFromDomainNotVerifiedException.prototype)}}class MessageRejected extends SESServiceException{constructor(e){super({name:"MessageRejected",$fault:"client",...e}),this.name="MessageRejected",this.$fault="client",Object.setPrototypeOf(this,MessageRejected.prototype)}}class MissingRenderingAttributeException extends SESServiceException{constructor(e){super({name:"MissingRenderingAttributeException",$fault:"client",...e}),this.name="MissingRenderingAttributeException",this.$fault="client",Object.setPrototypeOf(this,MissingRenderingAttributeException.prototype),this.TemplateName=e.TemplateName}}const NotificationType={Bounce:"Bounce",Complaint:"Complaint",Delivery:"Delivery"};class ProductionAccessNotGrantedException extends SESServiceException{constructor(e){super({name:"ProductionAccessNotGrantedException",$fault:"client",...e}),this.name="ProductionAccessNotGrantedException",this.$fault="client",Object.setPrototypeOf(this,ProductionAccessNotGrantedException.prototype)}}const se_CloneReceiptRuleSetCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_CloneReceiptRuleSetRequest(e),[_A]:_CRRS,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_CreateConfigurationSetCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_CreateConfigurationSetRequest(e),[_A]:_CCS,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_CreateConfigurationSetEventDestinationCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_CreateConfigurationSetEventDestinationRequest(e),[_A]:_CCSED,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_CreateConfigurationSetTrackingOptionsCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_CreateConfigurationSetTrackingOptionsRequest(e),[_A]:_CCSTO,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_CreateCustomVerificationEmailTemplateCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_CreateCustomVerificationEmailTemplateRequest(e),[_A]:_CCVET,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_CreateReceiptFilterCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_CreateReceiptFilterRequest(e),[_A]:_CRF,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_CreateReceiptRuleCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_CreateReceiptRuleRequest(e),[_A]:_CRR,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_CreateReceiptRuleSetCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_CreateReceiptRuleSetRequest(e),[_A]:_CRRSr,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_CreateTemplateCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_CreateTemplateRequest(e),[_A]:_CT,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_DeleteConfigurationSetCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_DeleteConfigurationSetRequest(e),[_A]:_DCS,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_DeleteConfigurationSetEventDestinationCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_DeleteConfigurationSetEventDestinationRequest(e),[_A]:_DCSED,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_DeleteConfigurationSetTrackingOptionsCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_DeleteConfigurationSetTrackingOptionsRequest(e),[_A]:_DCSTO,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_DeleteCustomVerificationEmailTemplateCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_DeleteCustomVerificationEmailTemplateRequest(e),[_A]:_DCVET,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_DeleteIdentityCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_DeleteIdentityRequest(e),[_A]:_DI,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_DeleteIdentityPolicyCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_DeleteIdentityPolicyRequest(e),[_A]:_DIP,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_DeleteReceiptFilterCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_DeleteReceiptFilterRequest(e),[_A]:_DRF,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_DeleteReceiptRuleCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_DeleteReceiptRuleRequest(e),[_A]:_DRR,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_DeleteReceiptRuleSetCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_DeleteReceiptRuleSetRequest(e),[_A]:_DRRS,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_DeleteTemplateCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_DeleteTemplateRequest(e),[_A]:_DT,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_DeleteVerifiedEmailAddressCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_DeleteVerifiedEmailAddressRequest(e),[_A]:_DVEA,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_DescribeActiveReceiptRuleSetCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_DescribeActiveReceiptRuleSetRequest(),[_A]:_DARRS,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_DescribeConfigurationSetCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_DescribeConfigurationSetRequest(e),[_A]:_DCSe,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_DescribeReceiptRuleCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_DescribeReceiptRuleRequest(e),[_A]:_DRRe,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_DescribeReceiptRuleSetCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_DescribeReceiptRuleSetRequest(e),[_A]:_DRRSe,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_GetAccountSendingEnabledCommand=async(e,t)=>{const n=SHARED_HEADERS,i=buildFormUrlencodedString({[_A]:_GASE,[_V]:_});return buildHttpRpcRequest(t,n,"/",void 0,i)},se_GetCustomVerificationEmailTemplateCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_GetCustomVerificationEmailTemplateRequest(e),[_A]:_GCVET,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_GetIdentityDkimAttributesCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_GetIdentityDkimAttributesRequest(e),[_A]:_GIDA,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_GetIdentityMailFromDomainAttributesCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_GetIdentityMailFromDomainAttributesRequest(e),[_A]:_GIMFDA,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_GetIdentityNotificationAttributesCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_GetIdentityNotificationAttributesRequest(e),[_A]:_GINA,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_GetIdentityPoliciesCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_GetIdentityPoliciesRequest(e),[_A]:_GIP,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_GetIdentityVerificationAttributesCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_GetIdentityVerificationAttributesRequest(e),[_A]:_GIVA,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_GetSendQuotaCommand=async(e,t)=>{const n=SHARED_HEADERS,i=buildFormUrlencodedString({[_A]:_GSQ,[_V]:_});return buildHttpRpcRequest(t,n,"/",void 0,i)},se_GetSendStatisticsCommand=async(e,t)=>{const n=SHARED_HEADERS,i=buildFormUrlencodedString({[_A]:_GSS,[_V]:_});return buildHttpRpcRequest(t,n,"/",void 0,i)},se_GetTemplateCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_GetTemplateRequest(e),[_A]:_GT,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_ListConfigurationSetsCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_ListConfigurationSetsRequest(e),[_A]:_LCS,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_ListCustomVerificationEmailTemplatesCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_ListCustomVerificationEmailTemplatesRequest(e),[_A]:_LCVET,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_ListIdentitiesCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_ListIdentitiesRequest(e),[_A]:_LI,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_ListIdentityPoliciesCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_ListIdentityPoliciesRequest(e),[_A]:_LIP,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_ListReceiptFiltersCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_ListReceiptFiltersRequest(),[_A]:_LRF,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_ListReceiptRuleSetsCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_ListReceiptRuleSetsRequest(e),[_A]:_LRRS,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_ListTemplatesCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_ListTemplatesRequest(e),[_A]:_LT,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_ListVerifiedEmailAddressesCommand=async(e,t)=>{const n=SHARED_HEADERS,i=buildFormUrlencodedString({[_A]:_LVEA,[_V]:_});return buildHttpRpcRequest(t,n,"/",void 0,i)},se_PutConfigurationSetDeliveryOptionsCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_PutConfigurationSetDeliveryOptionsRequest(e),[_A]:_PCSDO,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_PutIdentityPolicyCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_PutIdentityPolicyRequest(e),[_A]:_PIP,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_ReorderReceiptRuleSetCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_ReorderReceiptRuleSetRequest(e),[_A]:_RRRS,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_SendBounceCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_SendBounceRequest(e),[_A]:_SB,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_SendBulkTemplatedEmailCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_SendBulkTemplatedEmailRequest(e),[_A]:_SBTE,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_SendCustomVerificationEmailCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_SendCustomVerificationEmailRequest(e),[_A]:_SCVE,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_SendEmailCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_SendEmailRequest(e),[_A]:_SE,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_SendRawEmailCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_SendRawEmailRequest(e,t),[_A]:_SRE,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_SendTemplatedEmailCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_SendTemplatedEmailRequest(e),[_A]:_STE,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_SetActiveReceiptRuleSetCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_SetActiveReceiptRuleSetRequest(e),[_A]:_SARRS,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_SetIdentityDkimEnabledCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_SetIdentityDkimEnabledRequest(e),[_A]:_SIDE,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_SetIdentityFeedbackForwardingEnabledCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_SetIdentityFeedbackForwardingEnabledRequest(e),[_A]:_SIFFE,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_SetIdentityHeadersInNotificationsEnabledCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_SetIdentityHeadersInNotificationsEnabledRequest(e),[_A]:_SIHINE,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_SetIdentityMailFromDomainCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_SetIdentityMailFromDomainRequest(e),[_A]:_SIMFD,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_SetIdentityNotificationTopicCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_SetIdentityNotificationTopicRequest(e),[_A]:_SINT,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_SetReceiptRulePositionCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_SetReceiptRulePositionRequest(e),[_A]:_SRRP,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_TestRenderTemplateCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_TestRenderTemplateRequest(e),[_A]:_TRT,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_UpdateAccountSendingEnabledCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_UpdateAccountSendingEnabledRequest(e),[_A]:_UASE,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_UpdateConfigurationSetEventDestinationCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_UpdateConfigurationSetEventDestinationRequest(e),[_A]:_UCSED,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_UpdateConfigurationSetReputationMetricsEnabledCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_UpdateConfigurationSetReputationMetricsEnabledRequest(e),[_A]:_UCSRME,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_UpdateConfigurationSetSendingEnabledCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_UpdateConfigurationSetSendingEnabledRequest(e),[_A]:_UCSSE,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_UpdateConfigurationSetTrackingOptionsCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_UpdateConfigurationSetTrackingOptionsRequest(e),[_A]:_UCSTO,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_UpdateCustomVerificationEmailTemplateCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_UpdateCustomVerificationEmailTemplateRequest(e),[_A]:_UCVET,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_UpdateReceiptRuleCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_UpdateReceiptRuleRequest(e),[_A]:_URR,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_UpdateTemplateCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_UpdateTemplateRequest(e),[_A]:_UT,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_VerifyDomainDkimCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_VerifyDomainDkimRequest(e),[_A]:_VDD,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_VerifyDomainIdentityCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_VerifyDomainIdentityRequest(e),[_A]:_VDI,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_VerifyEmailAddressCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_VerifyEmailAddressRequest(e),[_A]:_VEA,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},se_VerifyEmailIdentityCommand=async(e,t)=>{const n=SHARED_HEADERS;let i;return i=buildFormUrlencodedString({...se_VerifyEmailIdentityRequest(e),[_A]:_VEI,[_V]:_}),buildHttpRpcRequest(t,n,"/",void 0,i)},de_CloneReceiptRuleSetCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_CloneReceiptRuleSetResponse(n.CloneReceiptRuleSetResult);return{$metadata:deserializeMetadata(e),...i}},de_CreateConfigurationSetCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_CreateConfigurationSetResponse(n.CreateConfigurationSetResult);return{$metadata:deserializeMetadata(e),...i}},de_CreateConfigurationSetEventDestinationCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_CreateConfigurationSetEventDestinationResponse(n.CreateConfigurationSetEventDestinationResult);return{$metadata:deserializeMetadata(e),...i}},de_CreateConfigurationSetTrackingOptionsCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_CreateConfigurationSetTrackingOptionsResponse(n.CreateConfigurationSetTrackingOptionsResult);return{$metadata:deserializeMetadata(e),...i}},de_CreateCustomVerificationEmailTemplateCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);await collectBody(e.body,t);return{$metadata:deserializeMetadata(e)}},de_CreateReceiptFilterCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_CreateReceiptFilterResponse(n.CreateReceiptFilterResult);return{$metadata:deserializeMetadata(e),...i}},de_CreateReceiptRuleCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_CreateReceiptRuleResponse(n.CreateReceiptRuleResult);return{$metadata:deserializeMetadata(e),...i}},de_CreateReceiptRuleSetCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_CreateReceiptRuleSetResponse(n.CreateReceiptRuleSetResult);return{$metadata:deserializeMetadata(e),...i}},de_CreateTemplateCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_CreateTemplateResponse(n.CreateTemplateResult);return{$metadata:deserializeMetadata(e),...i}},de_DeleteConfigurationSetCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_DeleteConfigurationSetResponse(n.DeleteConfigurationSetResult);return{$metadata:deserializeMetadata(e),...i}},de_DeleteConfigurationSetEventDestinationCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_DeleteConfigurationSetEventDestinationResponse(n.DeleteConfigurationSetEventDestinationResult);return{$metadata:deserializeMetadata(e),...i}},de_DeleteConfigurationSetTrackingOptionsCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_DeleteConfigurationSetTrackingOptionsResponse(n.DeleteConfigurationSetTrackingOptionsResult);return{$metadata:deserializeMetadata(e),...i}},de_DeleteCustomVerificationEmailTemplateCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);await collectBody(e.body,t);return{$metadata:deserializeMetadata(e)}},de_DeleteIdentityCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_DeleteIdentityResponse(n.DeleteIdentityResult);return{$metadata:deserializeMetadata(e),...i}},de_DeleteIdentityPolicyCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_DeleteIdentityPolicyResponse(n.DeleteIdentityPolicyResult);return{$metadata:deserializeMetadata(e),...i}},de_DeleteReceiptFilterCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_DeleteReceiptFilterResponse(n.DeleteReceiptFilterResult);return{$metadata:deserializeMetadata(e),...i}},de_DeleteReceiptRuleCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_DeleteReceiptRuleResponse(n.DeleteReceiptRuleResult);return{$metadata:deserializeMetadata(e),...i}},de_DeleteReceiptRuleSetCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_DeleteReceiptRuleSetResponse(n.DeleteReceiptRuleSetResult);return{$metadata:deserializeMetadata(e),...i}},de_DeleteTemplateCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_DeleteTemplateResponse(n.DeleteTemplateResult);return{$metadata:deserializeMetadata(e),...i}},de_DeleteVerifiedEmailAddressCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);await collectBody(e.body,t);return{$metadata:deserializeMetadata(e)}},de_DescribeActiveReceiptRuleSetCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_DescribeActiveReceiptRuleSetResponse(n.DescribeActiveReceiptRuleSetResult);return{$metadata:deserializeMetadata(e),...i}},de_DescribeConfigurationSetCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_DescribeConfigurationSetResponse(n.DescribeConfigurationSetResult);return{$metadata:deserializeMetadata(e),...i}},de_DescribeReceiptRuleCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_DescribeReceiptRuleResponse(n.DescribeReceiptRuleResult);return{$metadata:deserializeMetadata(e),...i}},de_DescribeReceiptRuleSetCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_DescribeReceiptRuleSetResponse(n.DescribeReceiptRuleSetResult);return{$metadata:deserializeMetadata(e),...i}},de_GetAccountSendingEnabledCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_GetAccountSendingEnabledResponse(n.GetAccountSendingEnabledResult);return{$metadata:deserializeMetadata(e),...i}},de_GetCustomVerificationEmailTemplateCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_GetCustomVerificationEmailTemplateResponse(n.GetCustomVerificationEmailTemplateResult);return{$metadata:deserializeMetadata(e),...i}},de_GetIdentityDkimAttributesCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_GetIdentityDkimAttributesResponse(n.GetIdentityDkimAttributesResult);return{$metadata:deserializeMetadata(e),...i}},de_GetIdentityMailFromDomainAttributesCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_GetIdentityMailFromDomainAttributesResponse(n.GetIdentityMailFromDomainAttributesResult);return{$metadata:deserializeMetadata(e),...i}},de_GetIdentityNotificationAttributesCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_GetIdentityNotificationAttributesResponse(n.GetIdentityNotificationAttributesResult);return{$metadata:deserializeMetadata(e),...i}},de_GetIdentityPoliciesCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_GetIdentityPoliciesResponse(n.GetIdentityPoliciesResult);return{$metadata:deserializeMetadata(e),...i}},de_GetIdentityVerificationAttributesCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_GetIdentityVerificationAttributesResponse(n.GetIdentityVerificationAttributesResult);return{$metadata:deserializeMetadata(e),...i}},de_GetSendQuotaCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_GetSendQuotaResponse(n.GetSendQuotaResult);return{$metadata:deserializeMetadata(e),...i}},de_GetSendStatisticsCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_GetSendStatisticsResponse(n.GetSendStatisticsResult);return{$metadata:deserializeMetadata(e),...i}},de_GetTemplateCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_GetTemplateResponse(n.GetTemplateResult);return{$metadata:deserializeMetadata(e),...i}},de_ListConfigurationSetsCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_ListConfigurationSetsResponse(n.ListConfigurationSetsResult);return{$metadata:deserializeMetadata(e),...i}},de_ListCustomVerificationEmailTemplatesCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_ListCustomVerificationEmailTemplatesResponse(n.ListCustomVerificationEmailTemplatesResult);return{$metadata:deserializeMetadata(e),...i}},de_ListIdentitiesCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_ListIdentitiesResponse(n.ListIdentitiesResult);return{$metadata:deserializeMetadata(e),...i}},de_ListIdentityPoliciesCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_ListIdentityPoliciesResponse(n.ListIdentityPoliciesResult);return{$metadata:deserializeMetadata(e),...i}},de_ListReceiptFiltersCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_ListReceiptFiltersResponse(n.ListReceiptFiltersResult);return{$metadata:deserializeMetadata(e),...i}},de_ListReceiptRuleSetsCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_ListReceiptRuleSetsResponse(n.ListReceiptRuleSetsResult);return{$metadata:deserializeMetadata(e),...i}},de_ListTemplatesCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_ListTemplatesResponse(n.ListTemplatesResult);return{$metadata:deserializeMetadata(e),...i}},de_ListVerifiedEmailAddressesCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_ListVerifiedEmailAddressesResponse(n.ListVerifiedEmailAddressesResult);return{$metadata:deserializeMetadata(e),...i}},de_PutConfigurationSetDeliveryOptionsCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_PutConfigurationSetDeliveryOptionsResponse(n.PutConfigurationSetDeliveryOptionsResult);return{$metadata:deserializeMetadata(e),...i}},de_PutIdentityPolicyCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_PutIdentityPolicyResponse(n.PutIdentityPolicyResult);return{$metadata:deserializeMetadata(e),...i}},de_ReorderReceiptRuleSetCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_ReorderReceiptRuleSetResponse(n.ReorderReceiptRuleSetResult);return{$metadata:deserializeMetadata(e),...i}},de_SendBounceCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_SendBounceResponse(n.SendBounceResult);return{$metadata:deserializeMetadata(e),...i}},de_SendBulkTemplatedEmailCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_SendBulkTemplatedEmailResponse(n.SendBulkTemplatedEmailResult);return{$metadata:deserializeMetadata(e),...i}},de_SendCustomVerificationEmailCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_SendCustomVerificationEmailResponse(n.SendCustomVerificationEmailResult);return{$metadata:deserializeMetadata(e),...i}},de_SendEmailCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_SendEmailResponse(n.SendEmailResult);return{$metadata:deserializeMetadata(e),...i}},de_SendRawEmailCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_SendRawEmailResponse(n.SendRawEmailResult);return{$metadata:deserializeMetadata(e),...i}},de_SendTemplatedEmailCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_SendTemplatedEmailResponse(n.SendTemplatedEmailResult);return{$metadata:deserializeMetadata(e),...i}},de_SetActiveReceiptRuleSetCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_SetActiveReceiptRuleSetResponse(n.SetActiveReceiptRuleSetResult);return{$metadata:deserializeMetadata(e),...i}},de_SetIdentityDkimEnabledCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_SetIdentityDkimEnabledResponse(n.SetIdentityDkimEnabledResult);return{$metadata:deserializeMetadata(e),...i}},de_SetIdentityFeedbackForwardingEnabledCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_SetIdentityFeedbackForwardingEnabledResponse(n.SetIdentityFeedbackForwardingEnabledResult);return{$metadata:deserializeMetadata(e),...i}},de_SetIdentityHeadersInNotificationsEnabledCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_SetIdentityHeadersInNotificationsEnabledResponse(n.SetIdentityHeadersInNotificationsEnabledResult);return{$metadata:deserializeMetadata(e),...i}},de_SetIdentityMailFromDomainCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_SetIdentityMailFromDomainResponse(n.SetIdentityMailFromDomainResult);return{$metadata:deserializeMetadata(e),...i}},de_SetIdentityNotificationTopicCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_SetIdentityNotificationTopicResponse(n.SetIdentityNotificationTopicResult);return{$metadata:deserializeMetadata(e),...i}},de_SetReceiptRulePositionCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_SetReceiptRulePositionResponse(n.SetReceiptRulePositionResult);return{$metadata:deserializeMetadata(e),...i}},de_TestRenderTemplateCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_TestRenderTemplateResponse(n.TestRenderTemplateResult);return{$metadata:deserializeMetadata(e),...i}},de_UpdateAccountSendingEnabledCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);await collectBody(e.body,t);return{$metadata:deserializeMetadata(e)}},de_UpdateConfigurationSetEventDestinationCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_UpdateConfigurationSetEventDestinationResponse(n.UpdateConfigurationSetEventDestinationResult);return{$metadata:deserializeMetadata(e),...i}},de_UpdateConfigurationSetReputationMetricsEnabledCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);await collectBody(e.body,t);return{$metadata:deserializeMetadata(e)}},de_UpdateConfigurationSetSendingEnabledCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);await collectBody(e.body,t);return{$metadata:deserializeMetadata(e)}},de_UpdateConfigurationSetTrackingOptionsCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_UpdateConfigurationSetTrackingOptionsResponse(n.UpdateConfigurationSetTrackingOptionsResult);return{$metadata:deserializeMetadata(e),...i}},de_UpdateCustomVerificationEmailTemplateCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);await collectBody(e.body,t);return{$metadata:deserializeMetadata(e)}},de_UpdateReceiptRuleCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_UpdateReceiptRuleResponse(n.UpdateReceiptRuleResult);return{$metadata:deserializeMetadata(e),...i}},de_UpdateTemplateCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_UpdateTemplateResponse(n.UpdateTemplateResult);return{$metadata:deserializeMetadata(e),...i}},de_VerifyDomainDkimCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_VerifyDomainDkimResponse(n.VerifyDomainDkimResult);return{$metadata:deserializeMetadata(e),...i}},de_VerifyDomainIdentityCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_VerifyDomainIdentityResponse(n.VerifyDomainIdentityResult);return{$metadata:deserializeMetadata(e),...i}},de_VerifyEmailAddressCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);await collectBody(e.body,t);return{$metadata:deserializeMetadata(e)}},de_VerifyEmailIdentityCommand=async(e,t)=>{if(e.statusCode>=300)return de_CommandError(e,t);const n=await parseXmlBody(e.body,t);let i={};i=de_VerifyEmailIdentityResponse(n.VerifyEmailIdentityResult);return{$metadata:deserializeMetadata(e),...i}},de_CommandError=async(e,t)=>{const n={...e,body:await parseXmlErrorBody(e.body,t)},i=loadQueryErrorCode(e,n.body);switch(i){case"AlreadyExists":case"com.amazonaws.ses#AlreadyExistsException":throw await de_AlreadyExistsExceptionRes(n);case"LimitExceeded":case"com.amazonaws.ses#LimitExceededException":throw await de_LimitExceededExceptionRes(n);case"RuleSetDoesNotExist":case"com.amazonaws.ses#RuleSetDoesNotExistException":throw await de_RuleSetDoesNotExistExceptionRes(n);case"ConfigurationSetAlreadyExists":case"com.amazonaws.ses#ConfigurationSetAlreadyExistsException":throw await de_ConfigurationSetAlreadyExistsExceptionRes(n);case"InvalidConfigurationSet":case"com.amazonaws.ses#InvalidConfigurationSetException":throw await de_InvalidConfigurationSetExceptionRes(n);case"ConfigurationSetDoesNotExist":case"com.amazonaws.ses#ConfigurationSetDoesNotExistException":throw await de_ConfigurationSetDoesNotExistExceptionRes(n);case"EventDestinationAlreadyExists":case"com.amazonaws.ses#EventDestinationAlreadyExistsException":throw await de_EventDestinationAlreadyExistsExceptionRes(n);case"InvalidCloudWatchDestination":case"com.amazonaws.ses#InvalidCloudWatchDestinationException":throw await de_InvalidCloudWatchDestinationExceptionRes(n);case"InvalidFirehoseDestination":case"com.amazonaws.ses#InvalidFirehoseDestinationException":throw await de_InvalidFirehoseDestinationExceptionRes(n);case"InvalidSNSDestination":case"com.amazonaws.ses#InvalidSNSDestinationException":throw await de_InvalidSNSDestinationExceptionRes(n);case"InvalidTrackingOptions":case"com.amazonaws.ses#InvalidTrackingOptionsException":throw await de_InvalidTrackingOptionsExceptionRes(n);case"TrackingOptionsAlreadyExistsException":case"com.amazonaws.ses#TrackingOptionsAlreadyExistsException":throw await de_TrackingOptionsAlreadyExistsExceptionRes(n);case"CustomVerificationEmailInvalidContent":case"com.amazonaws.ses#CustomVerificationEmailInvalidContentException":throw await de_CustomVerificationEmailInvalidContentExceptionRes(n);case"CustomVerificationEmailTemplateAlreadyExists":case"com.amazonaws.ses#CustomVerificationEmailTemplateAlreadyExistsException":throw await de_CustomVerificationEmailTemplateAlreadyExistsExceptionRes(n);case"FromEmailAddressNotVerified":case"com.amazonaws.ses#FromEmailAddressNotVerifiedException":throw await de_FromEmailAddressNotVerifiedExceptionRes(n);case"InvalidLambdaFunction":case"com.amazonaws.ses#InvalidLambdaFunctionException":throw await de_InvalidLambdaFunctionExceptionRes(n);case"InvalidS3Configuration":case"com.amazonaws.ses#InvalidS3ConfigurationException":throw await de_InvalidS3ConfigurationExceptionRes(n);case"InvalidSnsTopic":case"com.amazonaws.ses#InvalidSnsTopicException":throw await de_InvalidSnsTopicExceptionRes(n);case"RuleDoesNotExist":case"com.amazonaws.ses#RuleDoesNotExistException":throw await de_RuleDoesNotExistExceptionRes(n);case"InvalidTemplate":case"com.amazonaws.ses#InvalidTemplateException":throw await de_InvalidTemplateExceptionRes(n);case"EventDestinationDoesNotExist":case"com.amazonaws.ses#EventDestinationDoesNotExistException":throw await de_EventDestinationDoesNotExistExceptionRes(n);case"TrackingOptionsDoesNotExistException":case"com.amazonaws.ses#TrackingOptionsDoesNotExistException":throw await de_TrackingOptionsDoesNotExistExceptionRes(n);case"CannotDelete":case"com.amazonaws.ses#CannotDeleteException":throw await de_CannotDeleteExceptionRes(n);case"CustomVerificationEmailTemplateDoesNotExist":case"com.amazonaws.ses#CustomVerificationEmailTemplateDoesNotExistException":throw await de_CustomVerificationEmailTemplateDoesNotExistExceptionRes(n);case"TemplateDoesNotExist":case"com.amazonaws.ses#TemplateDoesNotExistException":throw await de_TemplateDoesNotExistExceptionRes(n);case"InvalidDeliveryOptions":case"com.amazonaws.ses#InvalidDeliveryOptionsException":throw await de_InvalidDeliveryOptionsExceptionRes(n);case"InvalidPolicy":case"com.amazonaws.ses#InvalidPolicyException":throw await de_InvalidPolicyExceptionRes(n);case"MessageRejected":case"com.amazonaws.ses#MessageRejected":throw await de_MessageRejectedRes(n);case"AccountSendingPausedException":case"com.amazonaws.ses#AccountSendingPausedException":throw await de_AccountSendingPausedExceptionRes(n);case"ConfigurationSetSendingPausedException":case"com.amazonaws.ses#ConfigurationSetSendingPausedException":throw await de_ConfigurationSetSendingPausedExceptionRes(n);case"MailFromDomainNotVerifiedException":case"com.amazonaws.ses#MailFromDomainNotVerifiedException":throw await de_MailFromDomainNotVerifiedExceptionRes(n);case"ProductionAccessNotGranted":case"com.amazonaws.ses#ProductionAccessNotGrantedException":throw await de_ProductionAccessNotGrantedExceptionRes(n);case"InvalidRenderingParameter":case"com.amazonaws.ses#InvalidRenderingParameterException":throw await de_InvalidRenderingParameterExceptionRes(n);case"MissingRenderingAttribute":case"com.amazonaws.ses#MissingRenderingAttributeException":throw await de_MissingRenderingAttributeExceptionRes(n);default:const t=n.body;return throwDefaultError({output:e,parsedBody:t.Error,errorCode:i})}},de_AccountSendingPausedExceptionRes=async(e,t)=>{const n=e.body,i=de_AccountSendingPausedException(n.Error),r=new AccountSendingPausedException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_AlreadyExistsExceptionRes=async(e,t)=>{const n=e.body,i=de_AlreadyExistsException(n.Error),r=new AlreadyExistsException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_CannotDeleteExceptionRes=async(e,t)=>{const n=e.body,i=de_CannotDeleteException(n.Error),r=new CannotDeleteException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_ConfigurationSetAlreadyExistsExceptionRes=async(e,t)=>{const n=e.body,i=de_ConfigurationSetAlreadyExistsException(n.Error),r=new ConfigurationSetAlreadyExistsException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_ConfigurationSetDoesNotExistExceptionRes=async(e,t)=>{const n=e.body,i=de_ConfigurationSetDoesNotExistException(n.Error),r=new ConfigurationSetDoesNotExistException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_ConfigurationSetSendingPausedExceptionRes=async(e,t)=>{const n=e.body,i=de_ConfigurationSetSendingPausedException(n.Error),r=new ConfigurationSetSendingPausedException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_CustomVerificationEmailInvalidContentExceptionRes=async(e,t)=>{const n=e.body,i=de_CustomVerificationEmailInvalidContentException(n.Error),r=new CustomVerificationEmailInvalidContentException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_CustomVerificationEmailTemplateAlreadyExistsExceptionRes=async(e,t)=>{const n=e.body,i=de_CustomVerificationEmailTemplateAlreadyExistsException(n.Error),r=new CustomVerificationEmailTemplateAlreadyExistsException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_CustomVerificationEmailTemplateDoesNotExistExceptionRes=async(e,t)=>{const n=e.body,i=de_CustomVerificationEmailTemplateDoesNotExistException(n.Error),r=new CustomVerificationEmailTemplateDoesNotExistException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_EventDestinationAlreadyExistsExceptionRes=async(e,t)=>{const n=e.body,i=de_EventDestinationAlreadyExistsException(n.Error),r=new EventDestinationAlreadyExistsException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_EventDestinationDoesNotExistExceptionRes=async(e,t)=>{const n=e.body,i=de_EventDestinationDoesNotExistException(n.Error),r=new EventDestinationDoesNotExistException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_FromEmailAddressNotVerifiedExceptionRes=async(e,t)=>{const n=e.body,i=de_FromEmailAddressNotVerifiedException(n.Error),r=new FromEmailAddressNotVerifiedException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_InvalidCloudWatchDestinationExceptionRes=async(e,t)=>{const n=e.body,i=de_InvalidCloudWatchDestinationException(n.Error),r=new InvalidCloudWatchDestinationException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_InvalidConfigurationSetExceptionRes=async(e,t)=>{const n=e.body,i=de_InvalidConfigurationSetException(n.Error),r=new InvalidConfigurationSetException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_InvalidDeliveryOptionsExceptionRes=async(e,t)=>{const n=e.body,i=de_InvalidDeliveryOptionsException(n.Error),r=new InvalidDeliveryOptionsException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_InvalidFirehoseDestinationExceptionRes=async(e,t)=>{const n=e.body,i=de_InvalidFirehoseDestinationException(n.Error),r=new InvalidFirehoseDestinationException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_InvalidLambdaFunctionExceptionRes=async(e,t)=>{const n=e.body,i=de_InvalidLambdaFunctionException(n.Error),r=new InvalidLambdaFunctionException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_InvalidPolicyExceptionRes=async(e,t)=>{const n=e.body,i=de_InvalidPolicyException(n.Error),r=new InvalidPolicyException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_InvalidRenderingParameterExceptionRes=async(e,t)=>{const n=e.body,i=de_InvalidRenderingParameterException(n.Error),r=new InvalidRenderingParameterException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_InvalidS3ConfigurationExceptionRes=async(e,t)=>{const n=e.body,i=de_InvalidS3ConfigurationException(n.Error),r=new InvalidS3ConfigurationException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_InvalidSNSDestinationExceptionRes=async(e,t)=>{const n=e.body,i=de_InvalidSNSDestinationException(n.Error),r=new InvalidSNSDestinationException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_InvalidSnsTopicExceptionRes=async(e,t)=>{const n=e.body,i=de_InvalidSnsTopicException(n.Error),r=new InvalidSnsTopicException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_InvalidTemplateExceptionRes=async(e,t)=>{const n=e.body,i=de_InvalidTemplateException(n.Error),r=new InvalidTemplateException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_InvalidTrackingOptionsExceptionRes=async(e,t)=>{const n=e.body,i=de_InvalidTrackingOptionsException(n.Error),r=new InvalidTrackingOptionsException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_LimitExceededExceptionRes=async(e,t)=>{const n=e.body,i=de_LimitExceededException(n.Error),r=new LimitExceededException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_MailFromDomainNotVerifiedExceptionRes=async(e,t)=>{const n=e.body,i=de_MailFromDomainNotVerifiedException(n.Error),r=new MailFromDomainNotVerifiedException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_MessageRejectedRes=async(e,t)=>{const n=e.body,i=de_MessageRejected(n.Error),r=new MessageRejected({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_MissingRenderingAttributeExceptionRes=async(e,t)=>{const n=e.body,i=de_MissingRenderingAttributeException(n.Error),r=new MissingRenderingAttributeException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_ProductionAccessNotGrantedExceptionRes=async(e,t)=>{const n=e.body,i=de_ProductionAccessNotGrantedException(n.Error),r=new ProductionAccessNotGrantedException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_RuleDoesNotExistExceptionRes=async(e,t)=>{const n=e.body,i=de_RuleDoesNotExistException(n.Error),r=new RuleDoesNotExistException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_RuleSetDoesNotExistExceptionRes=async(e,t)=>{const n=e.body,i=de_RuleSetDoesNotExistException(n.Error),r=new RuleSetDoesNotExistException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_TemplateDoesNotExistExceptionRes=async(e,t)=>{const n=e.body,i=de_TemplateDoesNotExistException(n.Error),r=new TemplateDoesNotExistException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_TrackingOptionsAlreadyExistsExceptionRes=async(e,t)=>{const n=e.body,i=de_TrackingOptionsAlreadyExistsException(n.Error),r=new TrackingOptionsAlreadyExistsException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},de_TrackingOptionsDoesNotExistExceptionRes=async(e,t)=>{const n=e.body,i=de_TrackingOptionsDoesNotExistException(n.Error),r=new TrackingOptionsDoesNotExistException({$metadata:deserializeMetadata(e),...i});return decorateServiceException(r,n)},se_AddHeaderAction=(e,t)=>{const n={};return null!=e[_HN]&&(n[_HN]=e[_HN]),null!=e[_HV]&&(n[_HV]=e[_HV]),n},se_AddressList=(e,t)=>{const n={};let i=1;for(const t of e)null!==t&&(n[`member.${i}`]=t,i++);return n},se_Body=(e,t)=>{const n={};if(null!=e[_T]){const t=se_Content(e[_T]);Object.entries(t).forEach((([e,t])=>{n[`Text.${e}`]=t}))}if(null!=e[_H]){const t=se_Content(e[_H]);Object.entries(t).forEach((([e,t])=>{n[`Html.${e}`]=t}))}return n},se_BounceAction=(e,t)=>{const n={};return null!=e[_TA]&&(n[_TA]=e[_TA]),null!=e[_SRC]&&(n[_SRC]=e[_SRC]),null!=e[_SC]&&(n[_SC]=e[_SC]),null!=e[_M]&&(n[_M]=e[_M]),null!=e[_S]&&(n[_S]=e[_S]),n},se_BouncedRecipientInfo=(e,t)=>{const n={};if(null!=e[_R]&&(n[_R]=e[_R]),null!=e[_RA]&&(n[_RA]=e[_RA]),null!=e[_BT]&&(n[_BT]=e[_BT]),null!=e[_RDF]){const t=se_RecipientDsnFields(e[_RDF]);Object.entries(t).forEach((([e,t])=>{n[`RecipientDsnFields.${e}`]=t}))}return n},se_BouncedRecipientInfoList=(e,t)=>{const n={};let i=1;for(const t of e){if(null===t)continue;const e=se_BouncedRecipientInfo(t);Object.entries(e).forEach((([e,t])=>{n[`member.${i}.${e}`]=t})),i++}return n},se_BulkEmailDestination=(e,t)=>{const n={};if(null!=e[_D]){const t=se_Destination(e[_D]);Object.entries(t).forEach((([e,t])=>{n[`Destination.${e}`]=t}))}if(null!=e[_RT]){const t=se_MessageTagList(e[_RT]);0===e[_RT]?.length&&(n.ReplacementTags=[]),Object.entries(t).forEach((([e,t])=>{n[`ReplacementTags.${e}`]=t}))}return null!=e[_RTD]&&(n[_RTD]=e[_RTD]),n},se_BulkEmailDestinationList=(e,t)=>{const n={};let i=1;for(const t of e){if(null===t)continue;const e=se_BulkEmailDestination(t);Object.entries(e).forEach((([e,t])=>{n[`member.${i}.${e}`]=t})),i++}return n},se_CloneReceiptRuleSetRequest=(e,t)=>{const n={};return null!=e[_RSN]&&(n[_RSN]=e[_RSN]),null!=e[_ORSN]&&(n[_ORSN]=e[_ORSN]),n},se_CloudWatchDestination=(e,t)=>{const n={};if(null!=e[_DC]){const t=se_CloudWatchDimensionConfigurations(e[_DC]);0===e[_DC]?.length&&(n.DimensionConfigurations=[]),Object.entries(t).forEach((([e,t])=>{n[`DimensionConfigurations.${e}`]=t}))}return n},se_CloudWatchDimensionConfiguration=(e,t)=>{const n={};return null!=e[_DN]&&(n[_DN]=e[_DN]),null!=e[_DVS]&&(n[_DVS]=e[_DVS]),null!=e[_DDV]&&(n[_DDV]=e[_DDV]),n},se_CloudWatchDimensionConfigurations=(e,t)=>{const n={};let i=1;for(const t of e){if(null===t)continue;const e=se_CloudWatchDimensionConfiguration(t);Object.entries(e).forEach((([e,t])=>{n[`member.${i}.${e}`]=t})),i++}return n},se_ConfigurationSet=(e,t)=>{const n={};return null!=e[_N]&&(n[_N]=e[_N]),n},se_ConfigurationSetAttributeList=(e,t)=>{const n={};let i=1;for(const t of e)null!==t&&(n[`member.${i}`]=t,i++);return n},se_Content=(e,t)=>{const n={};return null!=e[_Da]&&(n[_Da]=e[_Da]),null!=e[_C]&&(n[_C]=e[_C]),n},se_CreateConfigurationSetEventDestinationRequest=(e,t)=>{const n={};if(null!=e[_CSN]&&(n[_CSN]=e[_CSN]),null!=e[_ED]){const t=se_EventDestination(e[_ED]);Object.entries(t).forEach((([e,t])=>{n[`EventDestination.${e}`]=t}))}return n},se_CreateConfigurationSetRequest=(e,t)=>{const n={};if(null!=e[_CS]){const t=se_ConfigurationSet(e[_CS]);Object.entries(t).forEach((([e,t])=>{n[`ConfigurationSet.${e}`]=t}))}return n},se_CreateConfigurationSetTrackingOptionsRequest=(e,t)=>{const n={};if(null!=e[_CSN]&&(n[_CSN]=e[_CSN]),null!=e[_TO]){const t=se_TrackingOptions(e[_TO]);Object.entries(t).forEach((([e,t])=>{n[`TrackingOptions.${e}`]=t}))}return n},se_CreateCustomVerificationEmailTemplateRequest=(e,t)=>{const n={};return null!=e[_TN]&&(n[_TN]=e[_TN]),null!=e[_FEA]&&(n[_FEA]=e[_FEA]),null!=e[_TS]&&(n[_TS]=e[_TS]),null!=e[_TC]&&(n[_TC]=e[_TC]),null!=e[_SRURL]&&(n[_SRURL]=e[_SRURL]),null!=e[_FRURL]&&(n[_FRURL]=e[_FRURL]),n},se_CreateReceiptFilterRequest=(e,t)=>{const n={};if(null!=e[_F]){const t=se_ReceiptFilter(e[_F]);Object.entries(t).forEach((([e,t])=>{n[`Filter.${e}`]=t}))}return n},se_CreateReceiptRuleRequest=(e,t)=>{const n={};if(null!=e[_RSN]&&(n[_RSN]=e[_RSN]),null!=e[_Af]&&(n[_Af]=e[_Af]),null!=e[_Ru]){const t=se_ReceiptRule(e[_Ru]);Object.entries(t).forEach((([e,t])=>{n[`Rule.${e}`]=t}))}return n},se_CreateReceiptRuleSetRequest=(e,t)=>{const n={};return null!=e[_RSN]&&(n[_RSN]=e[_RSN]),n},se_CreateTemplateRequest=(e,t)=>{const n={};if(null!=e[_Te]){const t=se_Template(e[_Te]);Object.entries(t).forEach((([e,t])=>{n[`Template.${e}`]=t}))}return n},se_DeleteConfigurationSetEventDestinationRequest=(e,t)=>{const n={};return null!=e[_CSN]&&(n[_CSN]=e[_CSN]),null!=e[_EDN]&&(n[_EDN]=e[_EDN]),n},se_DeleteConfigurationSetRequest=(e,t)=>{const n={};return null!=e[_CSN]&&(n[_CSN]=e[_CSN]),n},se_DeleteConfigurationSetTrackingOptionsRequest=(e,t)=>{const n={};return null!=e[_CSN]&&(n[_CSN]=e[_CSN]),n},se_DeleteCustomVerificationEmailTemplateRequest=(e,t)=>{const n={};return null!=e[_TN]&&(n[_TN]=e[_TN]),n},se_DeleteIdentityPolicyRequest=(e,t)=>{const n={};return null!=e[_I]&&(n[_I]=e[_I]),null!=e[_PN]&&(n[_PN]=e[_PN]),n},se_DeleteIdentityRequest=(e,t)=>{const n={};return null!=e[_I]&&(n[_I]=e[_I]),n},se_DeleteReceiptFilterRequest=(e,t)=>{const n={};return null!=e[_FN]&&(n[_FN]=e[_FN]),n},se_DeleteReceiptRuleRequest=(e,t)=>{const n={};return null!=e[_RSN]&&(n[_RSN]=e[_RSN]),null!=e[_RN]&&(n[_RN]=e[_RN]),n},se_DeleteReceiptRuleSetRequest=(e,t)=>{const n={};return null!=e[_RSN]&&(n[_RSN]=e[_RSN]),n},se_DeleteTemplateRequest=(e,t)=>{const n={};return null!=e[_TN]&&(n[_TN]=e[_TN]),n},se_DeleteVerifiedEmailAddressRequest=(e,t)=>{const n={};return null!=e[_EA]&&(n[_EA]=e[_EA]),n},se_DeliveryOptions=(e,t)=>{const n={};return null!=e[_TP]&&(n[_TP]=e[_TP]),n},se_DescribeActiveReceiptRuleSetRequest=(e,t)=>({}),se_DescribeConfigurationSetRequest=(e,t)=>{const n={};if(null!=e[_CSN]&&(n[_CSN]=e[_CSN]),null!=e[_CSAN]){const t=se_ConfigurationSetAttributeList(e[_CSAN]);0===e[_CSAN]?.length&&(n.ConfigurationSetAttributeNames=[]),Object.entries(t).forEach((([e,t])=>{n[`ConfigurationSetAttributeNames.${e}`]=t}))}return n},se_DescribeReceiptRuleRequest=(e,t)=>{const n={};return null!=e[_RSN]&&(n[_RSN]=e[_RSN]),null!=e[_RN]&&(n[_RN]=e[_RN]),n},se_DescribeReceiptRuleSetRequest=(e,t)=>{const n={};return null!=e[_RSN]&&(n[_RSN]=e[_RSN]),n},se_Destination=(e,t)=>{const n={};if(null!=e[_TAo]){const t=se_AddressList(e[_TAo]);0===e[_TAo]?.length&&(n.ToAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`ToAddresses.${e}`]=t}))}if(null!=e[_CA]){const t=se_AddressList(e[_CA]);0===e[_CA]?.length&&(n.CcAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`CcAddresses.${e}`]=t}))}if(null!=e[_BA]){const t=se_AddressList(e[_BA]);0===e[_BA]?.length&&(n.BccAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`BccAddresses.${e}`]=t}))}return n},se_EventDestination=(e,t)=>{const n={};if(null!=e[_N]&&(n[_N]=e[_N]),null!=e[_E]&&(n[_E]=e[_E]),null!=e[_MET]){const t=se_EventTypes(e[_MET]);0===e[_MET]?.length&&(n.MatchingEventTypes=[]),Object.entries(t).forEach((([e,t])=>{n[`MatchingEventTypes.${e}`]=t}))}if(null!=e[_KFD]){const t=se_KinesisFirehoseDestination(e[_KFD]);Object.entries(t).forEach((([e,t])=>{n[`KinesisFirehoseDestination.${e}`]=t}))}if(null!=e[_CWD]){const t=se_CloudWatchDestination(e[_CWD]);Object.entries(t).forEach((([e,t])=>{n[`CloudWatchDestination.${e}`]=t}))}if(null!=e[_SNSD]){const t=se_SNSDestination(e[_SNSD]);Object.entries(t).forEach((([e,t])=>{n[`SNSDestination.${e}`]=t}))}return n},se_EventTypes=(e,t)=>{const n={};let i=1;for(const t of e)null!==t&&(n[`member.${i}`]=t,i++);return n},se_ExtensionField=(e,t)=>{const n={};return null!=e[_N]&&(n[_N]=e[_N]),null!=e[_Va]&&(n[_Va]=e[_Va]),n},se_ExtensionFieldList=(e,t)=>{const n={};let i=1;for(const t of e){if(null===t)continue;const e=se_ExtensionField(t);Object.entries(e).forEach((([e,t])=>{n[`member.${i}.${e}`]=t})),i++}return n},se_GetCustomVerificationEmailTemplateRequest=(e,t)=>{const n={};return null!=e[_TN]&&(n[_TN]=e[_TN]),n},se_GetIdentityDkimAttributesRequest=(e,t)=>{const n={};if(null!=e[_Id]){const t=se_IdentityList(e[_Id]);0===e[_Id]?.length&&(n.Identities=[]),Object.entries(t).forEach((([e,t])=>{n[`Identities.${e}`]=t}))}return n},se_GetIdentityMailFromDomainAttributesRequest=(e,t)=>{const n={};if(null!=e[_Id]){const t=se_IdentityList(e[_Id]);0===e[_Id]?.length&&(n.Identities=[]),Object.entries(t).forEach((([e,t])=>{n[`Identities.${e}`]=t}))}return n},se_GetIdentityNotificationAttributesRequest=(e,t)=>{const n={};if(null!=e[_Id]){const t=se_IdentityList(e[_Id]);0===e[_Id]?.length&&(n.Identities=[]),Object.entries(t).forEach((([e,t])=>{n[`Identities.${e}`]=t}))}return n},se_GetIdentityPoliciesRequest=(e,t)=>{const n={};if(null!=e[_I]&&(n[_I]=e[_I]),null!=e[_PNo]){const t=se_PolicyNameList(e[_PNo]);0===e[_PNo]?.length&&(n.PolicyNames=[]),Object.entries(t).forEach((([e,t])=>{n[`PolicyNames.${e}`]=t}))}return n},se_GetIdentityVerificationAttributesRequest=(e,t)=>{const n={};if(null!=e[_Id]){const t=se_IdentityList(e[_Id]);0===e[_Id]?.length&&(n.Identities=[]),Object.entries(t).forEach((([e,t])=>{n[`Identities.${e}`]=t}))}return n},se_GetTemplateRequest=(e,t)=>{const n={};return null!=e[_TN]&&(n[_TN]=e[_TN]),n},se_IdentityList=(e,t)=>{const n={};let i=1;for(const t of e)null!==t&&(n[`member.${i}`]=t,i++);return n},se_KinesisFirehoseDestination=(e,t)=>{const n={};return null!=e[_IAMRARN]&&(n[_IAMRARN]=e[_IAMRARN]),null!=e[_DSARN]&&(n[_DSARN]=e[_DSARN]),n},se_LambdaAction=(e,t)=>{const n={};return null!=e[_TA]&&(n[_TA]=e[_TA]),null!=e[_FA]&&(n[_FA]=e[_FA]),null!=e[_IT]&&(n[_IT]=e[_IT]),n},se_ListConfigurationSetsRequest=(e,t)=>{const n={};return null!=e[_NT]&&(n[_NT]=e[_NT]),null!=e[_MI]&&(n[_MI]=e[_MI]),n},se_ListCustomVerificationEmailTemplatesRequest=(e,t)=>{const n={};return null!=e[_NT]&&(n[_NT]=e[_NT]),null!=e[_MR]&&(n[_MR]=e[_MR]),n},se_ListIdentitiesRequest=(e,t)=>{const n={};return null!=e[_ITd]&&(n[_ITd]=e[_ITd]),null!=e[_NT]&&(n[_NT]=e[_NT]),null!=e[_MI]&&(n[_MI]=e[_MI]),n},se_ListIdentityPoliciesRequest=(e,t)=>{const n={};return null!=e[_I]&&(n[_I]=e[_I]),n},se_ListReceiptFiltersRequest=(e,t)=>({}),se_ListReceiptRuleSetsRequest=(e,t)=>{const n={};return null!=e[_NT]&&(n[_NT]=e[_NT]),n},se_ListTemplatesRequest=(e,t)=>{const n={};return null!=e[_NT]&&(n[_NT]=e[_NT]),null!=e[_MI]&&(n[_MI]=e[_MI]),n},se_Message=(e,t)=>{const n={};if(null!=e[_Su]){const t=se_Content(e[_Su]);Object.entries(t).forEach((([e,t])=>{n[`Subject.${e}`]=t}))}if(null!=e[_B]){const t=se_Body(e[_B]);Object.entries(t).forEach((([e,t])=>{n[`Body.${e}`]=t}))}return n},se_MessageDsn=(e,t)=>{const n={};if(null!=e[_RM]&&(n[_RM]=e[_RM]),null!=e[_AD]&&(n[_AD]=serializeDateTime(e[_AD])),null!=e[_EF]){const t=se_ExtensionFieldList(e[_EF]);0===e[_EF]?.length&&(n.ExtensionFields=[]),Object.entries(t).forEach((([e,t])=>{n[`ExtensionFields.${e}`]=t}))}return n},se_MessageTag=(e,t)=>{const n={};return null!=e[_N]&&(n[_N]=e[_N]),null!=e[_Va]&&(n[_Va]=e[_Va]),n},se_MessageTagList=(e,t)=>{const n={};let i=1;for(const t of e){if(null===t)continue;const e=se_MessageTag(t);Object.entries(e).forEach((([e,t])=>{n[`member.${i}.${e}`]=t})),i++}return n},se_PolicyNameList=(e,t)=>{const n={};let i=1;for(const t of e)null!==t&&(n[`member.${i}`]=t,i++);return n},se_PutConfigurationSetDeliveryOptionsRequest=(e,t)=>{const n={};if(null!=e[_CSN]&&(n[_CSN]=e[_CSN]),null!=e[_DO]){const t=se_DeliveryOptions(e[_DO]);Object.entries(t).forEach((([e,t])=>{n[`DeliveryOptions.${e}`]=t}))}return n},se_PutIdentityPolicyRequest=(e,t)=>{const n={};return null!=e[_I]&&(n[_I]=e[_I]),null!=e[_PN]&&(n[_PN]=e[_PN]),null!=e[_P]&&(n[_P]=e[_P]),n},se_RawMessage=(e,t)=>{const n={};return null!=e[_Da]&&(n[_Da]=t.base64Encoder(e[_Da])),n},se_ReceiptAction=(e,t)=>{const n={};if(null!=e[_SA]){const t=se_S3Action(e[_SA]);Object.entries(t).forEach((([e,t])=>{n[`S3Action.${e}`]=t}))}if(null!=e[_BAo]){const t=se_BounceAction(e[_BAo]);Object.entries(t).forEach((([e,t])=>{n[`BounceAction.${e}`]=t}))}if(null!=e[_WA]){const t=se_WorkmailAction(e[_WA]);Object.entries(t).forEach((([e,t])=>{n[`WorkmailAction.${e}`]=t}))}if(null!=e[_LA]){const t=se_LambdaAction(e[_LA]);Object.entries(t).forEach((([e,t])=>{n[`LambdaAction.${e}`]=t}))}if(null!=e[_SAt]){const t=se_StopAction(e[_SAt]);Object.entries(t).forEach((([e,t])=>{n[`StopAction.${e}`]=t}))}if(null!=e[_AHA]){const t=se_AddHeaderAction(e[_AHA]);Object.entries(t).forEach((([e,t])=>{n[`AddHeaderAction.${e}`]=t}))}if(null!=e[_SNSA]){const t=se_SNSAction(e[_SNSA]);Object.entries(t).forEach((([e,t])=>{n[`SNSAction.${e}`]=t}))}return n},se_ReceiptActionsList=(e,t)=>{const n={};let i=1;for(const t of e){if(null===t)continue;const e=se_ReceiptAction(t);Object.entries(e).forEach((([e,t])=>{n[`member.${i}.${e}`]=t})),i++}return n},se_ReceiptFilter=(e,t)=>{const n={};if(null!=e[_N]&&(n[_N]=e[_N]),null!=e[_IF]){const t=se_ReceiptIpFilter(e[_IF]);Object.entries(t).forEach((([e,t])=>{n[`IpFilter.${e}`]=t}))}return n},se_ReceiptIpFilter=(e,t)=>{const n={};return null!=e[_P]&&(n[_P]=e[_P]),null!=e[_Ci]&&(n[_Ci]=e[_Ci]),n},se_ReceiptRule=(e,t)=>{const n={};if(null!=e[_N]&&(n[_N]=e[_N]),null!=e[_E]&&(n[_E]=e[_E]),null!=e[_TP]&&(n[_TP]=e[_TP]),null!=e[_Re]){const t=se_RecipientsList(e[_Re]);0===e[_Re]?.length&&(n.Recipients=[]),Object.entries(t).forEach((([e,t])=>{n[`Recipients.${e}`]=t}))}if(null!=e[_Ac]){const t=se_ReceiptActionsList(e[_Ac]);0===e[_Ac]?.length&&(n.Actions=[]),Object.entries(t).forEach((([e,t])=>{n[`Actions.${e}`]=t}))}return null!=e[_SEc]&&(n[_SEc]=e[_SEc]),n},se_ReceiptRuleNamesList=(e,t)=>{const n={};let i=1;for(const t of e)null!==t&&(n[`member.${i}`]=t,i++);return n},se_RecipientDsnFields=(e,t)=>{const n={};if(null!=e[_FR]&&(n[_FR]=e[_FR]),null!=e[_A]&&(n[_A]=e[_A]),null!=e[_RMe]&&(n[_RMe]=e[_RMe]),null!=e[_St]&&(n[_St]=e[_St]),null!=e[_DCi]&&(n[_DCi]=e[_DCi]),null!=e[_LAD]&&(n[_LAD]=serializeDateTime(e[_LAD])),null!=e[_EF]){const t=se_ExtensionFieldList(e[_EF]);0===e[_EF]?.length&&(n.ExtensionFields=[]),Object.entries(t).forEach((([e,t])=>{n[`ExtensionFields.${e}`]=t}))}return n},se_RecipientsList=(e,t)=>{const n={};let i=1;for(const t of e)null!==t&&(n[`member.${i}`]=t,i++);return n},se_ReorderReceiptRuleSetRequest=(e,t)=>{const n={};if(null!=e[_RSN]&&(n[_RSN]=e[_RSN]),null!=e[_RNu]){const t=se_ReceiptRuleNamesList(e[_RNu]);0===e[_RNu]?.length&&(n.RuleNames=[]),Object.entries(t).forEach((([e,t])=>{n[`RuleNames.${e}`]=t}))}return n},se_S3Action=(e,t)=>{const n={};return null!=e[_TA]&&(n[_TA]=e[_TA]),null!=e[_BN]&&(n[_BN]=e[_BN]),null!=e[_OKP]&&(n[_OKP]=e[_OKP]),null!=e[_KKA]&&(n[_KKA]=e[_KKA]),null!=e[_IRA]&&(n[_IRA]=e[_IRA]),n},se_SendBounceRequest=(e,t)=>{const n={};if(null!=e[_OMI]&&(n[_OMI]=e[_OMI]),null!=e[_BS]&&(n[_BS]=e[_BS]),null!=e[_Ex]&&(n[_Ex]=e[_Ex]),null!=e[_MD]){const t=se_MessageDsn(e[_MD]);Object.entries(t).forEach((([e,t])=>{n[`MessageDsn.${e}`]=t}))}if(null!=e[_BRIL]){const t=se_BouncedRecipientInfoList(e[_BRIL]);0===e[_BRIL]?.length&&(n.BouncedRecipientInfoList=[]),Object.entries(t).forEach((([e,t])=>{n[`BouncedRecipientInfoList.${e}`]=t}))}return null!=e[_BSA]&&(n[_BSA]=e[_BSA]),n},se_SendBulkTemplatedEmailRequest=(e,t)=>{const n={};if(null!=e[_So]&&(n[_So]=e[_So]),null!=e[_SAo]&&(n[_SAo]=e[_SAo]),null!=e[_RTA]){const t=se_AddressList(e[_RTA]);0===e[_RTA]?.length&&(n.ReplyToAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`ReplyToAddresses.${e}`]=t}))}if(null!=e[_RP]&&(n[_RP]=e[_RP]),null!=e[_RPA]&&(n[_RPA]=e[_RPA]),null!=e[_CSN]&&(n[_CSN]=e[_CSN]),null!=e[_DTe]){const t=se_MessageTagList(e[_DTe]);0===e[_DTe]?.length&&(n.DefaultTags=[]),Object.entries(t).forEach((([e,t])=>{n[`DefaultTags.${e}`]=t}))}if(null!=e[_Te]&&(n[_Te]=e[_Te]),null!=e[_TAe]&&(n[_TAe]=e[_TAe]),null!=e[_DTD]&&(n[_DTD]=e[_DTD]),null!=e[_De]){const t=se_BulkEmailDestinationList(e[_De]);0===e[_De]?.length&&(n.Destinations=[]),Object.entries(t).forEach((([e,t])=>{n[`Destinations.${e}`]=t}))}return n},se_SendCustomVerificationEmailRequest=(e,t)=>{const n={};return null!=e[_EA]&&(n[_EA]=e[_EA]),null!=e[_TN]&&(n[_TN]=e[_TN]),null!=e[_CSN]&&(n[_CSN]=e[_CSN]),n},se_SendEmailRequest=(e,t)=>{const n={};if(null!=e[_So]&&(n[_So]=e[_So]),null!=e[_D]){const t=se_Destination(e[_D]);Object.entries(t).forEach((([e,t])=>{n[`Destination.${e}`]=t}))}if(null!=e[_M]){const t=se_Message(e[_M]);Object.entries(t).forEach((([e,t])=>{n[`Message.${e}`]=t}))}if(null!=e[_RTA]){const t=se_AddressList(e[_RTA]);0===e[_RTA]?.length&&(n.ReplyToAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`ReplyToAddresses.${e}`]=t}))}if(null!=e[_RP]&&(n[_RP]=e[_RP]),null!=e[_SAo]&&(n[_SAo]=e[_SAo]),null!=e[_RPA]&&(n[_RPA]=e[_RPA]),null!=e[_Ta]){const t=se_MessageTagList(e[_Ta]);0===e[_Ta]?.length&&(n.Tags=[]),Object.entries(t).forEach((([e,t])=>{n[`Tags.${e}`]=t}))}return null!=e[_CSN]&&(n[_CSN]=e[_CSN]),n},se_SendRawEmailRequest=(e,t)=>{const n={};if(null!=e[_So]&&(n[_So]=e[_So]),null!=e[_De]){const t=se_AddressList(e[_De]);0===e[_De]?.length&&(n.Destinations=[]),Object.entries(t).forEach((([e,t])=>{n[`Destinations.${e}`]=t}))}if(null!=e[_RMa]){const i=se_RawMessage(e[_RMa],t);Object.entries(i).forEach((([e,t])=>{n[`RawMessage.${e}`]=t}))}if(null!=e[_FAr]&&(n[_FAr]=e[_FAr]),null!=e[_SAo]&&(n[_SAo]=e[_SAo]),null!=e[_RPA]&&(n[_RPA]=e[_RPA]),null!=e[_Ta]){const t=se_MessageTagList(e[_Ta]);0===e[_Ta]?.length&&(n.Tags=[]),Object.entries(t).forEach((([e,t])=>{n[`Tags.${e}`]=t}))}return null!=e[_CSN]&&(n[_CSN]=e[_CSN]),n},se_SendTemplatedEmailRequest=(e,t)=>{const n={};if(null!=e[_So]&&(n[_So]=e[_So]),null!=e[_D]){const t=se_Destination(e[_D]);Object.entries(t).forEach((([e,t])=>{n[`Destination.${e}`]=t}))}if(null!=e[_RTA]){const t=se_AddressList(e[_RTA]);0===e[_RTA]?.length&&(n.ReplyToAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`ReplyToAddresses.${e}`]=t}))}if(null!=e[_RP]&&(n[_RP]=e[_RP]),null!=e[_SAo]&&(n[_SAo]=e[_SAo]),null!=e[_RPA]&&(n[_RPA]=e[_RPA]),null!=e[_Ta]){const t=se_MessageTagList(e[_Ta]);0===e[_Ta]?.length&&(n.Tags=[]),Object.entries(t).forEach((([e,t])=>{n[`Tags.${e}`]=t}))}return null!=e[_CSN]&&(n[_CSN]=e[_CSN]),null!=e[_Te]&&(n[_Te]=e[_Te]),null!=e[_TAe]&&(n[_TAe]=e[_TAe]),null!=e[_TD]&&(n[_TD]=e[_TD]),n},se_SetActiveReceiptRuleSetRequest=(e,t)=>{const n={};return null!=e[_RSN]&&(n[_RSN]=e[_RSN]),n},se_SetIdentityDkimEnabledRequest=(e,t)=>{const n={};return null!=e[_I]&&(n[_I]=e[_I]),null!=e[_DE]&&(n[_DE]=e[_DE]),n},se_SetIdentityFeedbackForwardingEnabledRequest=(e,t)=>{const n={};return null!=e[_I]&&(n[_I]=e[_I]),null!=e[_FE]&&(n[_FE]=e[_FE]),n},se_SetIdentityHeadersInNotificationsEnabledRequest=(e,t)=>{const n={};return null!=e[_I]&&(n[_I]=e[_I]),null!=e[_NTo]&&(n[_NTo]=e[_NTo]),null!=e[_E]&&(n[_E]=e[_E]),n},se_SetIdentityMailFromDomainRequest=(e,t)=>{const n={};return null!=e[_I]&&(n[_I]=e[_I]),null!=e[_MFD]&&(n[_MFD]=e[_MFD]),null!=e[_BOMXF]&&(n[_BOMXF]=e[_BOMXF]),n},se_SetIdentityNotificationTopicRequest=(e,t)=>{const n={};return null!=e[_I]&&(n[_I]=e[_I]),null!=e[_NTo]&&(n[_NTo]=e[_NTo]),null!=e[_ST]&&(n[_ST]=e[_ST]),n},se_SetReceiptRulePositionRequest=(e,t)=>{const n={};return null!=e[_RSN]&&(n[_RSN]=e[_RSN]),null!=e[_RN]&&(n[_RN]=e[_RN]),null!=e[_Af]&&(n[_Af]=e[_Af]),n},se_SNSAction=(e,t)=>{const n={};return null!=e[_TA]&&(n[_TA]=e[_TA]),null!=e[_En]&&(n[_En]=e[_En]),n},se_SNSDestination=(e,t)=>{const n={};return null!=e[_TARN]&&(n[_TARN]=e[_TARN]),n},se_StopAction=(e,t)=>{const n={};return null!=e[_Sc]&&(n[_Sc]=e[_Sc]),null!=e[_TA]&&(n[_TA]=e[_TA]),n},se_Template=(e,t)=>{const n={};return null!=e[_TN]&&(n[_TN]=e[_TN]),null!=e[_SP]&&(n[_SP]=e[_SP]),null!=e[_TPe]&&(n[_TPe]=e[_TPe]),null!=e[_HP]&&(n[_HP]=e[_HP]),n},se_TestRenderTemplateRequest=(e,t)=>{const n={};return null!=e[_TN]&&(n[_TN]=e[_TN]),null!=e[_TD]&&(n[_TD]=e[_TD]),n},se_TrackingOptions=(e,t)=>{const n={};return null!=e[_CRD]&&(n[_CRD]=e[_CRD]),n},se_UpdateAccountSendingEnabledRequest=(e,t)=>{const n={};return null!=e[_E]&&(n[_E]=e[_E]),n},se_UpdateConfigurationSetEventDestinationRequest=(e,t)=>{const n={};if(null!=e[_CSN]&&(n[_CSN]=e[_CSN]),null!=e[_ED]){const t=se_EventDestination(e[_ED]);Object.entries(t).forEach((([e,t])=>{n[`EventDestination.${e}`]=t}))}return n},se_UpdateConfigurationSetReputationMetricsEnabledRequest=(e,t)=>{const n={};return null!=e[_CSN]&&(n[_CSN]=e[_CSN]),null!=e[_E]&&(n[_E]=e[_E]),n},se_UpdateConfigurationSetSendingEnabledRequest=(e,t)=>{const n={};return null!=e[_CSN]&&(n[_CSN]=e[_CSN]),null!=e[_E]&&(n[_E]=e[_E]),n},se_UpdateConfigurationSetTrackingOptionsRequest=(e,t)=>{const n={};if(null!=e[_CSN]&&(n[_CSN]=e[_CSN]),null!=e[_TO]){const t=se_TrackingOptions(e[_TO]);Object.entries(t).forEach((([e,t])=>{n[`TrackingOptions.${e}`]=t}))}return n},se_UpdateCustomVerificationEmailTemplateRequest=(e,t)=>{const n={};return null!=e[_TN]&&(n[_TN]=e[_TN]),null!=e[_FEA]&&(n[_FEA]=e[_FEA]),null!=e[_TS]&&(n[_TS]=e[_TS]),null!=e[_TC]&&(n[_TC]=e[_TC]),null!=e[_SRURL]&&(n[_SRURL]=e[_SRURL]),null!=e[_FRURL]&&(n[_FRURL]=e[_FRURL]),n},se_UpdateReceiptRuleRequest=(e,t)=>{const n={};if(null!=e[_RSN]&&(n[_RSN]=e[_RSN]),null!=e[_Ru]){const t=se_ReceiptRule(e[_Ru]);Object.entries(t).forEach((([e,t])=>{n[`Rule.${e}`]=t}))}return n},se_UpdateTemplateRequest=(e,t)=>{const n={};if(null!=e[_Te]){const t=se_Template(e[_Te]);Object.entries(t).forEach((([e,t])=>{n[`Template.${e}`]=t}))}return n},se_VerifyDomainDkimRequest=(e,t)=>{const n={};return null!=e[_Do]&&(n[_Do]=e[_Do]),n},se_VerifyDomainIdentityRequest=(e,t)=>{const n={};return null!=e[_Do]&&(n[_Do]=e[_Do]),n},se_VerifyEmailAddressRequest=(e,t)=>{const n={};return null!=e[_EA]&&(n[_EA]=e[_EA]),n},se_VerifyEmailIdentityRequest=(e,t)=>{const n={};return null!=e[_EA]&&(n[_EA]=e[_EA]),n},se_WorkmailAction=(e,t)=>{const n={};return null!=e[_TA]&&(n[_TA]=e[_TA]),null!=e[_OA]&&(n[_OA]=e[_OA]),n},de_AccountSendingPausedException=(e,t)=>{const n={};return null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_AddHeaderAction=(e,t)=>{const n={};return null!=e[_HN]&&(n[_HN]=expectString(e[_HN])),null!=e[_HV]&&(n[_HV]=expectString(e[_HV])),n},de_AddressList=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>expectString(e))),de_AlreadyExistsException=(e,t)=>{const n={};return null!=e[_N]&&(n[_N]=expectString(e[_N])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_BounceAction=(e,t)=>{const n={};return null!=e[_TA]&&(n[_TA]=expectString(e[_TA])),null!=e[_SRC]&&(n[_SRC]=expectString(e[_SRC])),null!=e[_SC]&&(n[_SC]=expectString(e[_SC])),null!=e[_M]&&(n[_M]=expectString(e[_M])),null!=e[_S]&&(n[_S]=expectString(e[_S])),n},de_BulkEmailDestinationStatus=(e,t)=>{const n={};return null!=e[_St]&&(n[_St]=expectString(e[_St])),null!=e[_Er]&&(n[_Er]=expectString(e[_Er])),null!=e[_MIe]&&(n[_MIe]=expectString(e[_MIe])),n},de_BulkEmailDestinationStatusList=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>de_BulkEmailDestinationStatus(e))),de_CannotDeleteException=(e,t)=>{const n={};return null!=e[_N]&&(n[_N]=expectString(e[_N])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_CloneReceiptRuleSetResponse=(e,t)=>({}),de_CloudWatchDestination=(e,t)=>{const n={};return""===e.DimensionConfigurations?n[_DC]=[]:null!=e[_DC]&&null!=e[_DC][_me]&&(n[_DC]=de_CloudWatchDimensionConfigurations(getArrayIfSingleItem(e[_DC][_me]))),n},de_CloudWatchDimensionConfiguration=(e,t)=>{const n={};return null!=e[_DN]&&(n[_DN]=expectString(e[_DN])),null!=e[_DVS]&&(n[_DVS]=expectString(e[_DVS])),null!=e[_DDV]&&(n[_DDV]=expectString(e[_DDV])),n},de_CloudWatchDimensionConfigurations=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>de_CloudWatchDimensionConfiguration(e))),de_ConfigurationSet=(e,t)=>{const n={};return null!=e[_N]&&(n[_N]=expectString(e[_N])),n},de_ConfigurationSetAlreadyExistsException=(e,t)=>{const n={};return null!=e[_CSN]&&(n[_CSN]=expectString(e[_CSN])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_ConfigurationSetDoesNotExistException=(e,t)=>{const n={};return null!=e[_CSN]&&(n[_CSN]=expectString(e[_CSN])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_ConfigurationSets=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>de_ConfigurationSet(e))),de_ConfigurationSetSendingPausedException=(e,t)=>{const n={};return null!=e[_CSN]&&(n[_CSN]=expectString(e[_CSN])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_CreateConfigurationSetEventDestinationResponse=(e,t)=>({}),de_CreateConfigurationSetResponse=(e,t)=>({}),de_CreateConfigurationSetTrackingOptionsResponse=(e,t)=>({}),de_CreateReceiptFilterResponse=(e,t)=>({}),de_CreateReceiptRuleResponse=(e,t)=>({}),de_CreateReceiptRuleSetResponse=(e,t)=>({}),de_CreateTemplateResponse=(e,t)=>({}),de_CustomVerificationEmailInvalidContentException=(e,t)=>{const n={};return null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_CustomVerificationEmailTemplate=(e,t)=>{const n={};return null!=e[_TN]&&(n[_TN]=expectString(e[_TN])),null!=e[_FEA]&&(n[_FEA]=expectString(e[_FEA])),null!=e[_TS]&&(n[_TS]=expectString(e[_TS])),null!=e[_SRURL]&&(n[_SRURL]=expectString(e[_SRURL])),null!=e[_FRURL]&&(n[_FRURL]=expectString(e[_FRURL])),n},de_CustomVerificationEmailTemplateAlreadyExistsException=(e,t)=>{const n={};return null!=e[_CVETN]&&(n[_CVETN]=expectString(e[_CVETN])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_CustomVerificationEmailTemplateDoesNotExistException=(e,t)=>{const n={};return null!=e[_CVETN]&&(n[_CVETN]=expectString(e[_CVETN])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_CustomVerificationEmailTemplates=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>de_CustomVerificationEmailTemplate(e))),de_DeleteConfigurationSetEventDestinationResponse=(e,t)=>({}),de_DeleteConfigurationSetResponse=(e,t)=>({}),de_DeleteConfigurationSetTrackingOptionsResponse=(e,t)=>({}),de_DeleteIdentityPolicyResponse=(e,t)=>({}),de_DeleteIdentityResponse=(e,t)=>({}),de_DeleteReceiptFilterResponse=(e,t)=>({}),de_DeleteReceiptRuleResponse=(e,t)=>({}),de_DeleteReceiptRuleSetResponse=(e,t)=>({}),de_DeleteTemplateResponse=(e,t)=>({}),de_DeliveryOptions=(e,t)=>{const n={};return null!=e[_TP]&&(n[_TP]=expectString(e[_TP])),n},de_DescribeActiveReceiptRuleSetResponse=(e,t)=>{const n={};return null!=e[_Me]&&(n[_Me]=de_ReceiptRuleSetMetadata(e[_Me])),""===e.Rules?n[_Rul]=[]:null!=e[_Rul]&&null!=e[_Rul][_me]&&(n[_Rul]=de_ReceiptRulesList(getArrayIfSingleItem(e[_Rul][_me]))),n},de_DescribeConfigurationSetResponse=(e,t)=>{const n={};return null!=e[_CS]&&(n[_CS]=de_ConfigurationSet(e[_CS])),""===e.EventDestinations?n[_EDv]=[]:null!=e[_EDv]&&null!=e[_EDv][_me]&&(n[_EDv]=de_EventDestinations(getArrayIfSingleItem(e[_EDv][_me]))),null!=e[_TO]&&(n[_TO]=de_TrackingOptions(e[_TO])),null!=e[_DO]&&(n[_DO]=de_DeliveryOptions(e[_DO])),null!=e[_RO]&&(n[_RO]=de_ReputationOptions(e[_RO])),n},de_DescribeReceiptRuleResponse=(e,t)=>{const n={};return null!=e[_Ru]&&(n[_Ru]=de_ReceiptRule(e[_Ru])),n},de_DescribeReceiptRuleSetResponse=(e,t)=>{const n={};return null!=e[_Me]&&(n[_Me]=de_ReceiptRuleSetMetadata(e[_Me])),""===e.Rules?n[_Rul]=[]:null!=e[_Rul]&&null!=e[_Rul][_me]&&(n[_Rul]=de_ReceiptRulesList(getArrayIfSingleItem(e[_Rul][_me]))),n},de_DkimAttributes=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=de_IdentityDkimAttributes(t.value)),e)),{}),de_EventDestination=(e,t)=>{const n={};return null!=e[_N]&&(n[_N]=expectString(e[_N])),null!=e[_E]&&(n[_E]=parseBoolean(e[_E])),""===e.MatchingEventTypes?n[_MET]=[]:null!=e[_MET]&&null!=e[_MET][_me]&&(n[_MET]=de_EventTypes(getArrayIfSingleItem(e[_MET][_me]))),null!=e[_KFD]&&(n[_KFD]=de_KinesisFirehoseDestination(e[_KFD])),null!=e[_CWD]&&(n[_CWD]=de_CloudWatchDestination(e[_CWD])),null!=e[_SNSD]&&(n[_SNSD]=de_SNSDestination(e[_SNSD])),n},de_EventDestinationAlreadyExistsException=(e,t)=>{const n={};return null!=e[_CSN]&&(n[_CSN]=expectString(e[_CSN])),null!=e[_EDN]&&(n[_EDN]=expectString(e[_EDN])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_EventDestinationDoesNotExistException=(e,t)=>{const n={};return null!=e[_CSN]&&(n[_CSN]=expectString(e[_CSN])),null!=e[_EDN]&&(n[_EDN]=expectString(e[_EDN])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_EventDestinations=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>de_EventDestination(e))),de_EventTypes=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>expectString(e))),de_FromEmailAddressNotVerifiedException=(e,t)=>{const n={};return null!=e[_FEA]&&(n[_FEA]=expectString(e[_FEA])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_GetAccountSendingEnabledResponse=(e,t)=>{const n={};return null!=e[_E]&&(n[_E]=parseBoolean(e[_E])),n},de_GetCustomVerificationEmailTemplateResponse=(e,t)=>{const n={};return null!=e[_TN]&&(n[_TN]=expectString(e[_TN])),null!=e[_FEA]&&(n[_FEA]=expectString(e[_FEA])),null!=e[_TS]&&(n[_TS]=expectString(e[_TS])),null!=e[_TC]&&(n[_TC]=expectString(e[_TC])),null!=e[_SRURL]&&(n[_SRURL]=expectString(e[_SRURL])),null!=e[_FRURL]&&(n[_FRURL]=expectString(e[_FRURL])),n},de_GetIdentityDkimAttributesResponse=(e,t)=>{const n={};return""===e.DkimAttributes?n[_DA]={}:null!=e[_DA]&&null!=e[_DA][_e]&&(n[_DA]=de_DkimAttributes(getArrayIfSingleItem(e[_DA][_e]))),n},de_GetIdentityMailFromDomainAttributesResponse=(e,t)=>{const n={};return""===e.MailFromDomainAttributes?n[_MFDA]={}:null!=e[_MFDA]&&null!=e[_MFDA][_e]&&(n[_MFDA]=de_MailFromDomainAttributes(getArrayIfSingleItem(e[_MFDA][_e]))),n},de_GetIdentityNotificationAttributesResponse=(e,t)=>{const n={};return""===e.NotificationAttributes?n[_NA]={}:null!=e[_NA]&&null!=e[_NA][_e]&&(n[_NA]=de_NotificationAttributes(getArrayIfSingleItem(e[_NA][_e]))),n},de_GetIdentityPoliciesResponse=(e,t)=>{const n={};return""===e.Policies?n[_Po]={}:null!=e[_Po]&&null!=e[_Po][_e]&&(n[_Po]=de_PolicyMap(getArrayIfSingleItem(e[_Po][_e]))),n},de_GetIdentityVerificationAttributesResponse=(e,t)=>{const n={};return""===e.VerificationAttributes?n[_VA]={}:null!=e[_VA]&&null!=e[_VA][_e]&&(n[_VA]=de_VerificationAttributes(getArrayIfSingleItem(e[_VA][_e]))),n},de_GetSendQuotaResponse=(e,t)=>{const n={};return null!=e[_MHS]&&(n[_MHS]=strictParseFloat(e[_MHS])),null!=e[_MSR]&&(n[_MSR]=strictParseFloat(e[_MSR])),null!=e[_SLH]&&(n[_SLH]=strictParseFloat(e[_SLH])),n},de_GetSendStatisticsResponse=(e,t)=>{const n={};return""===e.SendDataPoints?n[_SDP]=[]:null!=e[_SDP]&&null!=e[_SDP][_me]&&(n[_SDP]=de_SendDataPointList(getArrayIfSingleItem(e[_SDP][_me]))),n},de_GetTemplateResponse=(e,t)=>{const n={};return null!=e[_Te]&&(n[_Te]=de_Template(e[_Te])),n},de_IdentityDkimAttributes=(e,t)=>{const n={};return null!=e[_DE]&&(n[_DE]=parseBoolean(e[_DE])),null!=e[_DVSk]&&(n[_DVSk]=expectString(e[_DVSk])),""===e.DkimTokens?n[_DTk]=[]:null!=e[_DTk]&&null!=e[_DTk][_me]&&(n[_DTk]=de_VerificationTokenList(getArrayIfSingleItem(e[_DTk][_me]))),n},de_IdentityList=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>expectString(e))),de_IdentityMailFromDomainAttributes=(e,t)=>{const n={};return null!=e[_MFD]&&(n[_MFD]=expectString(e[_MFD])),null!=e[_MFDS]&&(n[_MFDS]=expectString(e[_MFDS])),null!=e[_BOMXF]&&(n[_BOMXF]=expectString(e[_BOMXF])),n},de_IdentityNotificationAttributes=(e,t)=>{const n={};return null!=e[_BTo]&&(n[_BTo]=expectString(e[_BTo])),null!=e[_CTo]&&(n[_CTo]=expectString(e[_CTo])),null!=e[_DTel]&&(n[_DTel]=expectString(e[_DTel])),null!=e[_FE]&&(n[_FE]=parseBoolean(e[_FE])),null!=e[_HIBNE]&&(n[_HIBNE]=parseBoolean(e[_HIBNE])),null!=e[_HICNE]&&(n[_HICNE]=parseBoolean(e[_HICNE])),null!=e[_HIDNE]&&(n[_HIDNE]=parseBoolean(e[_HIDNE])),n},de_IdentityVerificationAttributes=(e,t)=>{const n={};return null!=e[_VS]&&(n[_VS]=expectString(e[_VS])),null!=e[_VT]&&(n[_VT]=expectString(e[_VT])),n},de_InvalidCloudWatchDestinationException=(e,t)=>{const n={};return null!=e[_CSN]&&(n[_CSN]=expectString(e[_CSN])),null!=e[_EDN]&&(n[_EDN]=expectString(e[_EDN])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_InvalidConfigurationSetException=(e,t)=>{const n={};return null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_InvalidDeliveryOptionsException=(e,t)=>{const n={};return null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_InvalidFirehoseDestinationException=(e,t)=>{const n={};return null!=e[_CSN]&&(n[_CSN]=expectString(e[_CSN])),null!=e[_EDN]&&(n[_EDN]=expectString(e[_EDN])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_InvalidLambdaFunctionException=(e,t)=>{const n={};return null!=e[_FA]&&(n[_FA]=expectString(e[_FA])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_InvalidPolicyException=(e,t)=>{const n={};return null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_InvalidRenderingParameterException=(e,t)=>{const n={};return null!=e[_TN]&&(n[_TN]=expectString(e[_TN])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_InvalidS3ConfigurationException=(e,t)=>{const n={};return null!=e[_Bu]&&(n[_Bu]=expectString(e[_Bu])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_InvalidSNSDestinationException=(e,t)=>{const n={};return null!=e[_CSN]&&(n[_CSN]=expectString(e[_CSN])),null!=e[_EDN]&&(n[_EDN]=expectString(e[_EDN])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_InvalidSnsTopicException=(e,t)=>{const n={};return null!=e[_To]&&(n[_To]=expectString(e[_To])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_InvalidTemplateException=(e,t)=>{const n={};return null!=e[_TN]&&(n[_TN]=expectString(e[_TN])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_InvalidTrackingOptionsException=(e,t)=>{const n={};return null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_KinesisFirehoseDestination=(e,t)=>{const n={};return null!=e[_IAMRARN]&&(n[_IAMRARN]=expectString(e[_IAMRARN])),null!=e[_DSARN]&&(n[_DSARN]=expectString(e[_DSARN])),n},de_LambdaAction=(e,t)=>{const n={};return null!=e[_TA]&&(n[_TA]=expectString(e[_TA])),null!=e[_FA]&&(n[_FA]=expectString(e[_FA])),null!=e[_IT]&&(n[_IT]=expectString(e[_IT])),n},de_LimitExceededException=(e,t)=>{const n={};return null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_ListConfigurationSetsResponse=(e,t)=>{const n={};return""===e.ConfigurationSets?n[_CSo]=[]:null!=e[_CSo]&&null!=e[_CSo][_me]&&(n[_CSo]=de_ConfigurationSets(getArrayIfSingleItem(e[_CSo][_me]))),null!=e[_NT]&&(n[_NT]=expectString(e[_NT])),n},de_ListCustomVerificationEmailTemplatesResponse=(e,t)=>{const n={};return""===e.CustomVerificationEmailTemplates?n[_CVET]=[]:null!=e[_CVET]&&null!=e[_CVET][_me]&&(n[_CVET]=de_CustomVerificationEmailTemplates(getArrayIfSingleItem(e[_CVET][_me]))),null!=e[_NT]&&(n[_NT]=expectString(e[_NT])),n},de_ListIdentitiesResponse=(e,t)=>{const n={};return""===e.Identities?n[_Id]=[]:null!=e[_Id]&&null!=e[_Id][_me]&&(n[_Id]=de_IdentityList(getArrayIfSingleItem(e[_Id][_me]))),null!=e[_NT]&&(n[_NT]=expectString(e[_NT])),n},de_ListIdentityPoliciesResponse=(e,t)=>{const n={};return""===e.PolicyNames?n[_PNo]=[]:null!=e[_PNo]&&null!=e[_PNo][_me]&&(n[_PNo]=de_PolicyNameList(getArrayIfSingleItem(e[_PNo][_me]))),n},de_ListReceiptFiltersResponse=(e,t)=>{const n={};return""===e.Filters?n[_Fi]=[]:null!=e[_Fi]&&null!=e[_Fi][_me]&&(n[_Fi]=de_ReceiptFilterList(getArrayIfSingleItem(e[_Fi][_me]))),n},de_ListReceiptRuleSetsResponse=(e,t)=>{const n={};return""===e.RuleSets?n[_RS]=[]:null!=e[_RS]&&null!=e[_RS][_me]&&(n[_RS]=de_ReceiptRuleSetsLists(getArrayIfSingleItem(e[_RS][_me]))),null!=e[_NT]&&(n[_NT]=expectString(e[_NT])),n},de_ListTemplatesResponse=(e,t)=>{const n={};return""===e.TemplatesMetadata?n[_TM]=[]:null!=e[_TM]&&null!=e[_TM][_me]&&(n[_TM]=de_TemplateMetadataList(getArrayIfSingleItem(e[_TM][_me]))),null!=e[_NT]&&(n[_NT]=expectString(e[_NT])),n},de_ListVerifiedEmailAddressesResponse=(e,t)=>{const n={};return""===e.VerifiedEmailAddresses?n[_VEAe]=[]:null!=e[_VEAe]&&null!=e[_VEAe][_me]&&(n[_VEAe]=de_AddressList(getArrayIfSingleItem(e[_VEAe][_me]))),n},de_MailFromDomainAttributes=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=de_IdentityMailFromDomainAttributes(t.value)),e)),{}),de_MailFromDomainNotVerifiedException=(e,t)=>{const n={};return null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_MessageRejected=(e,t)=>{const n={};return null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_MissingRenderingAttributeException=(e,t)=>{const n={};return null!=e[_TN]&&(n[_TN]=expectString(e[_TN])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_NotificationAttributes=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=de_IdentityNotificationAttributes(t.value)),e)),{}),de_PolicyMap=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=expectString(t.value)),e)),{}),de_PolicyNameList=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>expectString(e))),de_ProductionAccessNotGrantedException=(e,t)=>{const n={};return null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_PutConfigurationSetDeliveryOptionsResponse=(e,t)=>({}),de_PutIdentityPolicyResponse=(e,t)=>({}),de_ReceiptAction=(e,t)=>{const n={};return null!=e[_SA]&&(n[_SA]=de_S3Action(e[_SA])),null!=e[_BAo]&&(n[_BAo]=de_BounceAction(e[_BAo])),null!=e[_WA]&&(n[_WA]=de_WorkmailAction(e[_WA])),null!=e[_LA]&&(n[_LA]=de_LambdaAction(e[_LA])),null!=e[_SAt]&&(n[_SAt]=de_StopAction(e[_SAt])),null!=e[_AHA]&&(n[_AHA]=de_AddHeaderAction(e[_AHA])),null!=e[_SNSA]&&(n[_SNSA]=de_SNSAction(e[_SNSA])),n},de_ReceiptActionsList=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>de_ReceiptAction(e))),de_ReceiptFilter=(e,t)=>{const n={};return null!=e[_N]&&(n[_N]=expectString(e[_N])),null!=e[_IF]&&(n[_IF]=de_ReceiptIpFilter(e[_IF])),n},de_ReceiptFilterList=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>de_ReceiptFilter(e))),de_ReceiptIpFilter=(e,t)=>{const n={};return null!=e[_P]&&(n[_P]=expectString(e[_P])),null!=e[_Ci]&&(n[_Ci]=expectString(e[_Ci])),n},de_ReceiptRule=(e,t)=>{const n={};return null!=e[_N]&&(n[_N]=expectString(e[_N])),null!=e[_E]&&(n[_E]=parseBoolean(e[_E])),null!=e[_TP]&&(n[_TP]=expectString(e[_TP])),""===e.Recipients?n[_Re]=[]:null!=e[_Re]&&null!=e[_Re][_me]&&(n[_Re]=de_RecipientsList(getArrayIfSingleItem(e[_Re][_me]))),""===e.Actions?n[_Ac]=[]:null!=e[_Ac]&&null!=e[_Ac][_me]&&(n[_Ac]=de_ReceiptActionsList(getArrayIfSingleItem(e[_Ac][_me]))),null!=e[_SEc]&&(n[_SEc]=parseBoolean(e[_SEc])),n},de_ReceiptRuleSetMetadata=(e,t)=>{const n={};return null!=e[_N]&&(n[_N]=expectString(e[_N])),null!=e[_CTr]&&(n[_CTr]=expectNonNull(parseRfc3339DateTimeWithOffset(e[_CTr]))),n},de_ReceiptRuleSetsLists=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>de_ReceiptRuleSetMetadata(e))),de_ReceiptRulesList=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>de_ReceiptRule(e))),de_RecipientsList=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>expectString(e))),de_ReorderReceiptRuleSetResponse=(e,t)=>({}),de_ReputationOptions=(e,t)=>{const n={};return null!=e[_SEe]&&(n[_SEe]=parseBoolean(e[_SEe])),null!=e[_RME]&&(n[_RME]=parseBoolean(e[_RME])),null!=e[_LFS]&&(n[_LFS]=expectNonNull(parseRfc3339DateTimeWithOffset(e[_LFS]))),n},de_RuleDoesNotExistException=(e,t)=>{const n={};return null!=e[_N]&&(n[_N]=expectString(e[_N])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_RuleSetDoesNotExistException=(e,t)=>{const n={};return null!=e[_N]&&(n[_N]=expectString(e[_N])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_S3Action=(e,t)=>{const n={};return null!=e[_TA]&&(n[_TA]=expectString(e[_TA])),null!=e[_BN]&&(n[_BN]=expectString(e[_BN])),null!=e[_OKP]&&(n[_OKP]=expectString(e[_OKP])),null!=e[_KKA]&&(n[_KKA]=expectString(e[_KKA])),null!=e[_IRA]&&(n[_IRA]=expectString(e[_IRA])),n},de_SendBounceResponse=(e,t)=>{const n={};return null!=e[_MIe]&&(n[_MIe]=expectString(e[_MIe])),n},de_SendBulkTemplatedEmailResponse=(e,t)=>{const n={};return""===e.Status?n[_St]=[]:null!=e[_St]&&null!=e[_St][_me]&&(n[_St]=de_BulkEmailDestinationStatusList(getArrayIfSingleItem(e[_St][_me]))),n},de_SendCustomVerificationEmailResponse=(e,t)=>{const n={};return null!=e[_MIe]&&(n[_MIe]=expectString(e[_MIe])),n},de_SendDataPoint=(e,t)=>{const n={};return null!=e[_Ti]&&(n[_Ti]=expectNonNull(parseRfc3339DateTimeWithOffset(e[_Ti]))),null!=e[_DAe]&&(n[_DAe]=strictParseLong(e[_DAe])),null!=e[_Bo]&&(n[_Bo]=strictParseLong(e[_Bo])),null!=e[_Co]&&(n[_Co]=strictParseLong(e[_Co])),null!=e[_Rej]&&(n[_Rej]=strictParseLong(e[_Rej])),n},de_SendDataPointList=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>de_SendDataPoint(e))),de_SendEmailResponse=(e,t)=>{const n={};return null!=e[_MIe]&&(n[_MIe]=expectString(e[_MIe])),n},de_SendRawEmailResponse=(e,t)=>{const n={};return null!=e[_MIe]&&(n[_MIe]=expectString(e[_MIe])),n},de_SendTemplatedEmailResponse=(e,t)=>{const n={};return null!=e[_MIe]&&(n[_MIe]=expectString(e[_MIe])),n},de_SetActiveReceiptRuleSetResponse=(e,t)=>({}),de_SetIdentityDkimEnabledResponse=(e,t)=>({}),de_SetIdentityFeedbackForwardingEnabledResponse=(e,t)=>({}),de_SetIdentityHeadersInNotificationsEnabledResponse=(e,t)=>({}),de_SetIdentityMailFromDomainResponse=(e,t)=>({}),de_SetIdentityNotificationTopicResponse=(e,t)=>({}),de_SetReceiptRulePositionResponse=(e,t)=>({}),de_SNSAction=(e,t)=>{const n={};return null!=e[_TA]&&(n[_TA]=expectString(e[_TA])),null!=e[_En]&&(n[_En]=expectString(e[_En])),n},de_SNSDestination=(e,t)=>{const n={};return null!=e[_TARN]&&(n[_TARN]=expectString(e[_TARN])),n},de_StopAction=(e,t)=>{const n={};return null!=e[_Sc]&&(n[_Sc]=expectString(e[_Sc])),null!=e[_TA]&&(n[_TA]=expectString(e[_TA])),n},de_Template=(e,t)=>{const n={};return null!=e[_TN]&&(n[_TN]=expectString(e[_TN])),null!=e[_SP]&&(n[_SP]=expectString(e[_SP])),null!=e[_TPe]&&(n[_TPe]=expectString(e[_TPe])),null!=e[_HP]&&(n[_HP]=expectString(e[_HP])),n},de_TemplateDoesNotExistException=(e,t)=>{const n={};return null!=e[_TN]&&(n[_TN]=expectString(e[_TN])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_TemplateMetadata=(e,t)=>{const n={};return null!=e[_N]&&(n[_N]=expectString(e[_N])),null!=e[_CTr]&&(n[_CTr]=expectNonNull(parseRfc3339DateTimeWithOffset(e[_CTr]))),n},de_TemplateMetadataList=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>de_TemplateMetadata(e))),de_TestRenderTemplateResponse=(e,t)=>{const n={};return null!=e[_RTe]&&(n[_RTe]=expectString(e[_RTe])),n},de_TrackingOptions=(e,t)=>{const n={};return null!=e[_CRD]&&(n[_CRD]=expectString(e[_CRD])),n},de_TrackingOptionsAlreadyExistsException=(e,t)=>{const n={};return null!=e[_CSN]&&(n[_CSN]=expectString(e[_CSN])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_TrackingOptionsDoesNotExistException=(e,t)=>{const n={};return null!=e[_CSN]&&(n[_CSN]=expectString(e[_CSN])),null!=e[_m]&&(n[_m]=expectString(e[_m])),n},de_UpdateConfigurationSetEventDestinationResponse=(e,t)=>({}),de_UpdateConfigurationSetTrackingOptionsResponse=(e,t)=>({}),de_UpdateReceiptRuleResponse=(e,t)=>({}),de_UpdateTemplateResponse=(e,t)=>({}),de_VerificationAttributes=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=de_IdentityVerificationAttributes(t.value)),e)),{}),de_VerificationTokenList=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>expectString(e))),de_VerifyDomainDkimResponse=(e,t)=>{const n={};return""===e.DkimTokens?n[_DTk]=[]:null!=e[_DTk]&&null!=e[_DTk][_me]&&(n[_DTk]=de_VerificationTokenList(getArrayIfSingleItem(e[_DTk][_me]))),n},de_VerifyDomainIdentityResponse=(e,t)=>{const n={};return null!=e[_VT]&&(n[_VT]=expectString(e[_VT])),n},de_VerifyEmailIdentityResponse=(e,t)=>({}),de_WorkmailAction=(e,t)=>{const n={};return null!=e[_TA]&&(n[_TA]=expectString(e[_TA])),null!=e[_OA]&&(n[_OA]=expectString(e[_OA])),n},deserializeMetadata=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"]}),throwDefaultError=withBaseException(SESServiceException),buildHttpRpcRequest=async(e,t,n,i,r)=>{const{hostname:o,protocol:a="https",port:s,path:c}=await e.endpoint(),l={protocol:a,hostname:o,port:s,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:t};return void 0!==r&&(l.body=r),new HttpRequest(l)},SHARED_HEADERS={"content-type":"application/x-www-form-urlencoded"},_="2010-12-01",_A="Action",_AD="ArrivalDate",_AHA="AddHeaderAction",_Ac="Actions",_Af="After",_B="Body",_BA="BccAddresses",_BAo="BounceAction",_BN="BucketName",_BOMXF="BehaviorOnMXFailure",_BRIL="BouncedRecipientInfoList",_BS="BounceSender",_BSA="BounceSenderArn",_BT="BounceType",_BTo="BounceTopic",_Bo="Bounces",_Bu="Bucket",_C="Charset",_CA="CcAddresses",_CCS="CreateConfigurationSet",_CCSED="CreateConfigurationSetEventDestination",_CCSTO="CreateConfigurationSetTrackingOptions",_CCVET="CreateCustomVerificationEmailTemplate",_CRD="CustomRedirectDomain",_CRF="CreateReceiptFilter",_CRR="CreateReceiptRule",_CRRS="CloneReceiptRuleSet",_CRRSr="CreateReceiptRuleSet",_CS="ConfigurationSet",_CSAN="ConfigurationSetAttributeNames",_CSN="ConfigurationSetName",_CSo="ConfigurationSets",_CT="CreateTemplate",_CTo="ComplaintTopic",_CTr="CreatedTimestamp",_CVET="CustomVerificationEmailTemplates",_CVETN="CustomVerificationEmailTemplateName",_CWD="CloudWatchDestination",_Ci="Cidr",_Co="Complaints",_D="Destination",_DA="DkimAttributes",_DARRS="DescribeActiveReceiptRuleSet",_DAe="DeliveryAttempts",_DC="DimensionConfigurations",_DCS="DeleteConfigurationSet",_DCSED="DeleteConfigurationSetEventDestination",_DCSTO="DeleteConfigurationSetTrackingOptions",_DCSe="DescribeConfigurationSet",_DCVET="DeleteCustomVerificationEmailTemplate",_DCi="DiagnosticCode",_DDV="DefaultDimensionValue",_DE="DkimEnabled",_DI="DeleteIdentity",_DIP="DeleteIdentityPolicy",_DN="DimensionName",_DO="DeliveryOptions",_DRF="DeleteReceiptFilter",_DRR="DeleteReceiptRule",_DRRS="DeleteReceiptRuleSet",_DRRSe="DescribeReceiptRuleSet",_DRRe="DescribeReceiptRule",_DSARN="DeliveryStreamARN",_DT="DeleteTemplate",_DTD="DefaultTemplateData",_DTe="DefaultTags",_DTel="DeliveryTopic",_DTk="DkimTokens",_DVEA="DeleteVerifiedEmailAddress",_DVS="DimensionValueSource",_DVSk="DkimVerificationStatus",_Da="Data",_De="Destinations",_Do="Domain",_E="Enabled",_EA="EmailAddress",_ED="EventDestination",_EDN="EventDestinationName",_EDv="EventDestinations",_EF="ExtensionFields",_En="Encoding",_Er="Error",_Ex="Explanation",_F="Filter",_FA="FunctionArn",_FAr="FromArn",_FE="ForwardingEnabled",_FEA="FromEmailAddress",_FN="FilterName",_FR="FinalRecipient",_FRURL="FailureRedirectionURL",_Fi="Filters",_GASE="GetAccountSendingEnabled",_GCVET="GetCustomVerificationEmailTemplate",_GIDA="GetIdentityDkimAttributes",_GIMFDA="GetIdentityMailFromDomainAttributes",_GINA="GetIdentityNotificationAttributes",_GIP="GetIdentityPolicies",_GIVA="GetIdentityVerificationAttributes",_GSQ="GetSendQuota",_GSS="GetSendStatistics",_GT="GetTemplate",_H="Html",_HIBNE="HeadersInBounceNotificationsEnabled",_HICNE="HeadersInComplaintNotificationsEnabled",_HIDNE="HeadersInDeliveryNotificationsEnabled",_HN="HeaderName",_HP="HtmlPart",_HV="HeaderValue",_I="Identity",_IAMRARN="IAMRoleARN",_IF="IpFilter",_IRA="IamRoleArn",_IT="InvocationType",_ITd="IdentityType",_Id="Identities",_KFD="KinesisFirehoseDestination",_KKA="KmsKeyArn",_LA="LambdaAction",_LAD="LastAttemptDate",_LCS="ListConfigurationSets",_LCVET="ListCustomVerificationEmailTemplates",_LFS="LastFreshStart",_LI="ListIdentities",_LIP="ListIdentityPolicies",_LRF="ListReceiptFilters",_LRRS="ListReceiptRuleSets",_LT="ListTemplates",_LVEA="ListVerifiedEmailAddresses",_M="Message",_MD="MessageDsn",_MET="MatchingEventTypes",_MFD="MailFromDomain",_MFDA="MailFromDomainAttributes",_MFDS="MailFromDomainStatus",_MHS="Max24HourSend",_MI="MaxItems",_MIe="MessageId",_MR="MaxResults",_MSR="MaxSendRate",_Me="Metadata",_N="Name",_NA="NotificationAttributes",_NT="NextToken",_NTo="NotificationType",_OA="OrganizationArn",_OKP="ObjectKeyPrefix",_OMI="OriginalMessageId",_ORSN="OriginalRuleSetName",_P="Policy",_PCSDO="PutConfigurationSetDeliveryOptions",_PIP="PutIdentityPolicy",_PN="PolicyName",_PNo="PolicyNames",_Po="Policies",_R="Recipient",_RA="RecipientArn",_RDF="RecipientDsnFields",_RM="ReportingMta",_RME="ReputationMetricsEnabled",_RMa="RawMessage",_RMe="RemoteMta",_RN="RuleName",_RNu="RuleNames",_RO="ReputationOptions",_RP="ReturnPath",_RPA="ReturnPathArn",_RRRS="ReorderReceiptRuleSet",_RS="RuleSets",_RSN="RuleSetName",_RT="ReplacementTags",_RTA="ReplyToAddresses",_RTD="ReplacementTemplateData",_RTe="RenderedTemplate",_Re="Recipients",_Rej="Rejects",_Ru="Rule",_Rul="Rules",_S="Sender",_SA="S3Action",_SARRS="SetActiveReceiptRuleSet",_SAo="SourceArn",_SAt="StopAction",_SB="SendBounce",_SBTE="SendBulkTemplatedEmail",_SC="StatusCode",_SCVE="SendCustomVerificationEmail",_SDP="SendDataPoints",_SE="SendEmail",_SEc="ScanEnabled",_SEe="SendingEnabled",_SIDE="SetIdentityDkimEnabled",_SIFFE="SetIdentityFeedbackForwardingEnabled",_SIHINE="SetIdentityHeadersInNotificationsEnabled",_SIMFD="SetIdentityMailFromDomain",_SINT="SetIdentityNotificationTopic",_SLH="SentLast24Hours",_SNSA="SNSAction",_SNSD="SNSDestination",_SP="SubjectPart",_SRC="SmtpReplyCode",_SRE="SendRawEmail",_SRRP="SetReceiptRulePosition",_SRURL="SuccessRedirectionURL",_ST="SnsTopic",_STE="SendTemplatedEmail",_Sc="Scope",_So="Source",_St="Status",_Su="Subject",_T="Text",_TA="TopicArn",_TARN="TopicARN",_TAe="TemplateArn",_TAo="ToAddresses",_TC="TemplateContent",_TD="TemplateData",_TM="TemplatesMetadata",_TN="TemplateName",_TO="TrackingOptions",_TP="TlsPolicy",_TPe="TextPart",_TRT="TestRenderTemplate",_TS="TemplateSubject",_Ta="Tags",_Te="Template",_Ti="Timestamp",_To="Topic",_UASE="UpdateAccountSendingEnabled",_UCSED="UpdateConfigurationSetEventDestination",_UCSRME="UpdateConfigurationSetReputationMetricsEnabled",_UCSSE="UpdateConfigurationSetSendingEnabled",_UCSTO="UpdateConfigurationSetTrackingOptions",_UCVET="UpdateCustomVerificationEmailTemplate",_URR="UpdateReceiptRule",_UT="UpdateTemplate",_V="Version",_VA="VerificationAttributes",_VDD="VerifyDomainDkim",_VDI="VerifyDomainIdentity",_VEA="VerifyEmailAddress",_VEAe="VerifiedEmailAddresses",_VEI="VerifyEmailIdentity",_VS="VerificationStatus",_VT="VerificationToken",_Va="Value",_WA="WorkmailAction",_e="entry",_m="message",_me="member",buildFormUrlencodedString=e=>Object.entries(e).map((([e,t])=>extendedEncodeURIComponent(e)+"="+extendedEncodeURIComponent(t))).join("&"),loadQueryErrorCode=(e,t)=>void 0!==t.Error?.Code?t.Error.Code:404==e.statusCode?"NotFound":void 0;class CloneReceiptRuleSetCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CloneReceiptRuleSet",{}).n("SESClient","CloneReceiptRuleSetCommand").f(void 0,void 0).ser(se_CloneReceiptRuleSetCommand).de(de_CloneReceiptRuleSetCommand).build()){}class CreateConfigurationSetCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateConfigurationSet",{}).n("SESClient","CreateConfigurationSetCommand").f(void 0,void 0).ser(se_CreateConfigurationSetCommand).de(de_CreateConfigurationSetCommand).build()){}class CreateConfigurationSetEventDestinationCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateConfigurationSetEventDestination",{}).n("SESClient","CreateConfigurationSetEventDestinationCommand").f(void 0,void 0).ser(se_CreateConfigurationSetEventDestinationCommand).de(de_CreateConfigurationSetEventDestinationCommand).build()){}class CreateConfigurationSetTrackingOptionsCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateConfigurationSetTrackingOptions",{}).n("SESClient","CreateConfigurationSetTrackingOptionsCommand").f(void 0,void 0).ser(se_CreateConfigurationSetTrackingOptionsCommand).de(de_CreateConfigurationSetTrackingOptionsCommand).build()){}class CreateCustomVerificationEmailTemplateCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateCustomVerificationEmailTemplate",{}).n("SESClient","CreateCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(se_CreateCustomVerificationEmailTemplateCommand).de(de_CreateCustomVerificationEmailTemplateCommand).build()){}class CreateReceiptFilterCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateReceiptFilter",{}).n("SESClient","CreateReceiptFilterCommand").f(void 0,void 0).ser(se_CreateReceiptFilterCommand).de(de_CreateReceiptFilterCommand).build()){}class CreateReceiptRuleCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateReceiptRule",{}).n("SESClient","CreateReceiptRuleCommand").f(void 0,void 0).ser(se_CreateReceiptRuleCommand).de(de_CreateReceiptRuleCommand).build()){}class CreateReceiptRuleSetCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateReceiptRuleSet",{}).n("SESClient","CreateReceiptRuleSetCommand").f(void 0,void 0).ser(se_CreateReceiptRuleSetCommand).de(de_CreateReceiptRuleSetCommand).build()){}class CreateTemplateCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateTemplate",{}).n("SESClient","CreateTemplateCommand").f(void 0,void 0).ser(se_CreateTemplateCommand).de(de_CreateTemplateCommand).build()){}class DeleteConfigurationSetCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteConfigurationSet",{}).n("SESClient","DeleteConfigurationSetCommand").f(void 0,void 0).ser(se_DeleteConfigurationSetCommand).de(de_DeleteConfigurationSetCommand).build()){}class DeleteConfigurationSetEventDestinationCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteConfigurationSetEventDestination",{}).n("SESClient","DeleteConfigurationSetEventDestinationCommand").f(void 0,void 0).ser(se_DeleteConfigurationSetEventDestinationCommand).de(de_DeleteConfigurationSetEventDestinationCommand).build()){}class DeleteConfigurationSetTrackingOptionsCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteConfigurationSetTrackingOptions",{}).n("SESClient","DeleteConfigurationSetTrackingOptionsCommand").f(void 0,void 0).ser(se_DeleteConfigurationSetTrackingOptionsCommand).de(de_DeleteConfigurationSetTrackingOptionsCommand).build()){}class DeleteCustomVerificationEmailTemplateCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteCustomVerificationEmailTemplate",{}).n("SESClient","DeleteCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(se_DeleteCustomVerificationEmailTemplateCommand).de(de_DeleteCustomVerificationEmailTemplateCommand).build()){}class DeleteIdentityCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteIdentity",{}).n("SESClient","DeleteIdentityCommand").f(void 0,void 0).ser(se_DeleteIdentityCommand).de(de_DeleteIdentityCommand).build()){}class DeleteIdentityPolicyCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteIdentityPolicy",{}).n("SESClient","DeleteIdentityPolicyCommand").f(void 0,void 0).ser(se_DeleteIdentityPolicyCommand).de(de_DeleteIdentityPolicyCommand).build()){}class DeleteReceiptFilterCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteReceiptFilter",{}).n("SESClient","DeleteReceiptFilterCommand").f(void 0,void 0).ser(se_DeleteReceiptFilterCommand).de(de_DeleteReceiptFilterCommand).build()){}class DeleteReceiptRuleCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteReceiptRule",{}).n("SESClient","DeleteReceiptRuleCommand").f(void 0,void 0).ser(se_DeleteReceiptRuleCommand).de(de_DeleteReceiptRuleCommand).build()){}class DeleteReceiptRuleSetCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteReceiptRuleSet",{}).n("SESClient","DeleteReceiptRuleSetCommand").f(void 0,void 0).ser(se_DeleteReceiptRuleSetCommand).de(de_DeleteReceiptRuleSetCommand).build()){}class DeleteTemplateCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteTemplate",{}).n("SESClient","DeleteTemplateCommand").f(void 0,void 0).ser(se_DeleteTemplateCommand).de(de_DeleteTemplateCommand).build()){}class DeleteVerifiedEmailAddressCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteVerifiedEmailAddress",{}).n("SESClient","DeleteVerifiedEmailAddressCommand").f(void 0,void 0).ser(se_DeleteVerifiedEmailAddressCommand).de(de_DeleteVerifiedEmailAddressCommand).build()){}class DescribeActiveReceiptRuleSetCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeActiveReceiptRuleSet",{}).n("SESClient","DescribeActiveReceiptRuleSetCommand").f(void 0,void 0).ser(se_DescribeActiveReceiptRuleSetCommand).de(de_DescribeActiveReceiptRuleSetCommand).build()){}class DescribeConfigurationSetCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeConfigurationSet",{}).n("SESClient","DescribeConfigurationSetCommand").f(void 0,void 0).ser(se_DescribeConfigurationSetCommand).de(de_DescribeConfigurationSetCommand).build()){}class DescribeReceiptRuleCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeReceiptRule",{}).n("SESClient","DescribeReceiptRuleCommand").f(void 0,void 0).ser(se_DescribeReceiptRuleCommand).de(de_DescribeReceiptRuleCommand).build()){}class DescribeReceiptRuleSetCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeReceiptRuleSet",{}).n("SESClient","DescribeReceiptRuleSetCommand").f(void 0,void 0).ser(se_DescribeReceiptRuleSetCommand).de(de_DescribeReceiptRuleSetCommand).build()){}class GetAccountSendingEnabledCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetAccountSendingEnabled",{}).n("SESClient","GetAccountSendingEnabledCommand").f(void 0,void 0).ser(se_GetAccountSendingEnabledCommand).de(de_GetAccountSendingEnabledCommand).build()){}class GetCustomVerificationEmailTemplateCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetCustomVerificationEmailTemplate",{}).n("SESClient","GetCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(se_GetCustomVerificationEmailTemplateCommand).de(de_GetCustomVerificationEmailTemplateCommand).build()){}class GetIdentityDkimAttributesCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityDkimAttributes",{}).n("SESClient","GetIdentityDkimAttributesCommand").f(void 0,void 0).ser(se_GetIdentityDkimAttributesCommand).de(de_GetIdentityDkimAttributesCommand).build()){}class GetIdentityMailFromDomainAttributesCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityMailFromDomainAttributes",{}).n("SESClient","GetIdentityMailFromDomainAttributesCommand").f(void 0,void 0).ser(se_GetIdentityMailFromDomainAttributesCommand).de(de_GetIdentityMailFromDomainAttributesCommand).build()){}class GetIdentityNotificationAttributesCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityNotificationAttributes",{}).n("SESClient","GetIdentityNotificationAttributesCommand").f(void 0,void 0).ser(se_GetIdentityNotificationAttributesCommand).de(de_GetIdentityNotificationAttributesCommand).build()){}class GetIdentityPoliciesCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityPolicies",{}).n("SESClient","GetIdentityPoliciesCommand").f(void 0,void 0).ser(se_GetIdentityPoliciesCommand).de(de_GetIdentityPoliciesCommand).build()){}class GetIdentityVerificationAttributesCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityVerificationAttributes",{}).n("SESClient","GetIdentityVerificationAttributesCommand").f(void 0,void 0).ser(se_GetIdentityVerificationAttributesCommand).de(de_GetIdentityVerificationAttributesCommand).build()){}class GetSendQuotaCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetSendQuota",{}).n("SESClient","GetSendQuotaCommand").f(void 0,void 0).ser(se_GetSendQuotaCommand).de(de_GetSendQuotaCommand).build()){}class GetSendStatisticsCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetSendStatistics",{}).n("SESClient","GetSendStatisticsCommand").f(void 0,void 0).ser(se_GetSendStatisticsCommand).de(de_GetSendStatisticsCommand).build()){}class GetTemplateCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetTemplate",{}).n("SESClient","GetTemplateCommand").f(void 0,void 0).ser(se_GetTemplateCommand).de(de_GetTemplateCommand).build()){}class ListConfigurationSetsCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListConfigurationSets",{}).n("SESClient","ListConfigurationSetsCommand").f(void 0,void 0).ser(se_ListConfigurationSetsCommand).de(de_ListConfigurationSetsCommand).build()){}class ListCustomVerificationEmailTemplatesCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListCustomVerificationEmailTemplates",{}).n("SESClient","ListCustomVerificationEmailTemplatesCommand").f(void 0,void 0).ser(se_ListCustomVerificationEmailTemplatesCommand).de(de_ListCustomVerificationEmailTemplatesCommand).build()){}class ListIdentitiesCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListIdentities",{}).n("SESClient","ListIdentitiesCommand").f(void 0,void 0).ser(se_ListIdentitiesCommand).de(de_ListIdentitiesCommand).build()){}class ListIdentityPoliciesCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListIdentityPolicies",{}).n("SESClient","ListIdentityPoliciesCommand").f(void 0,void 0).ser(se_ListIdentityPoliciesCommand).de(de_ListIdentityPoliciesCommand).build()){}class ListReceiptFiltersCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListReceiptFilters",{}).n("SESClient","ListReceiptFiltersCommand").f(void 0,void 0).ser(se_ListReceiptFiltersCommand).de(de_ListReceiptFiltersCommand).build()){}class ListReceiptRuleSetsCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListReceiptRuleSets",{}).n("SESClient","ListReceiptRuleSetsCommand").f(void 0,void 0).ser(se_ListReceiptRuleSetsCommand).de(de_ListReceiptRuleSetsCommand).build()){}class ListTemplatesCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListTemplates",{}).n("SESClient","ListTemplatesCommand").f(void 0,void 0).ser(se_ListTemplatesCommand).de(de_ListTemplatesCommand).build()){}class ListVerifiedEmailAddressesCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListVerifiedEmailAddresses",{}).n("SESClient","ListVerifiedEmailAddressesCommand").f(void 0,void 0).ser(se_ListVerifiedEmailAddressesCommand).de(de_ListVerifiedEmailAddressesCommand).build()){}class PutConfigurationSetDeliveryOptionsCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","PutConfigurationSetDeliveryOptions",{}).n("SESClient","PutConfigurationSetDeliveryOptionsCommand").f(void 0,void 0).ser(se_PutConfigurationSetDeliveryOptionsCommand).de(de_PutConfigurationSetDeliveryOptionsCommand).build()){}class PutIdentityPolicyCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","PutIdentityPolicy",{}).n("SESClient","PutIdentityPolicyCommand").f(void 0,void 0).ser(se_PutIdentityPolicyCommand).de(de_PutIdentityPolicyCommand).build()){}class ReorderReceiptRuleSetCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ReorderReceiptRuleSet",{}).n("SESClient","ReorderReceiptRuleSetCommand").f(void 0,void 0).ser(se_ReorderReceiptRuleSetCommand).de(de_ReorderReceiptRuleSetCommand).build()){}class SendBounceCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendBounce",{}).n("SESClient","SendBounceCommand").f(void 0,void 0).ser(se_SendBounceCommand).de(de_SendBounceCommand).build()){}class SendBulkTemplatedEmailCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendBulkTemplatedEmail",{}).n("SESClient","SendBulkTemplatedEmailCommand").f(void 0,void 0).ser(se_SendBulkTemplatedEmailCommand).de(de_SendBulkTemplatedEmailCommand).build()){}class SendCustomVerificationEmailCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendCustomVerificationEmail",{}).n("SESClient","SendCustomVerificationEmailCommand").f(void 0,void 0).ser(se_SendCustomVerificationEmailCommand).de(de_SendCustomVerificationEmailCommand).build()){}class SendEmailCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendEmail",{}).n("SESClient","SendEmailCommand").f(void 0,void 0).ser(se_SendEmailCommand).de(de_SendEmailCommand).build()){}class SendRawEmailCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendRawEmail",{}).n("SESClient","SendRawEmailCommand").f(void 0,void 0).ser(se_SendRawEmailCommand).de(de_SendRawEmailCommand).build()){}class SendTemplatedEmailCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendTemplatedEmail",{}).n("SESClient","SendTemplatedEmailCommand").f(void 0,void 0).ser(se_SendTemplatedEmailCommand).de(de_SendTemplatedEmailCommand).build()){}class SetActiveReceiptRuleSetCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetActiveReceiptRuleSet",{}).n("SESClient","SetActiveReceiptRuleSetCommand").f(void 0,void 0).ser(se_SetActiveReceiptRuleSetCommand).de(de_SetActiveReceiptRuleSetCommand).build()){}class SetIdentityDkimEnabledCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityDkimEnabled",{}).n("SESClient","SetIdentityDkimEnabledCommand").f(void 0,void 0).ser(se_SetIdentityDkimEnabledCommand).de(de_SetIdentityDkimEnabledCommand).build()){}class SetIdentityFeedbackForwardingEnabledCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityFeedbackForwardingEnabled",{}).n("SESClient","SetIdentityFeedbackForwardingEnabledCommand").f(void 0,void 0).ser(se_SetIdentityFeedbackForwardingEnabledCommand).de(de_SetIdentityFeedbackForwardingEnabledCommand).build()){}class SetIdentityHeadersInNotificationsEnabledCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityHeadersInNotificationsEnabled",{}).n("SESClient","SetIdentityHeadersInNotificationsEnabledCommand").f(void 0,void 0).ser(se_SetIdentityHeadersInNotificationsEnabledCommand).de(de_SetIdentityHeadersInNotificationsEnabledCommand).build()){}class SetIdentityMailFromDomainCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityMailFromDomain",{}).n("SESClient","SetIdentityMailFromDomainCommand").f(void 0,void 0).ser(se_SetIdentityMailFromDomainCommand).de(de_SetIdentityMailFromDomainCommand).build()){}class SetIdentityNotificationTopicCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityNotificationTopic",{}).n("SESClient","SetIdentityNotificationTopicCommand").f(void 0,void 0).ser(se_SetIdentityNotificationTopicCommand).de(de_SetIdentityNotificationTopicCommand).build()){}class SetReceiptRulePositionCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetReceiptRulePosition",{}).n("SESClient","SetReceiptRulePositionCommand").f(void 0,void 0).ser(se_SetReceiptRulePositionCommand).de(de_SetReceiptRulePositionCommand).build()){}class TestRenderTemplateCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","TestRenderTemplate",{}).n("SESClient","TestRenderTemplateCommand").f(void 0,void 0).ser(se_TestRenderTemplateCommand).de(de_TestRenderTemplateCommand).build()){}class UpdateAccountSendingEnabledCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateAccountSendingEnabled",{}).n("SESClient","UpdateAccountSendingEnabledCommand").f(void 0,void 0).ser(se_UpdateAccountSendingEnabledCommand).de(de_UpdateAccountSendingEnabledCommand).build()){}class UpdateConfigurationSetEventDestinationCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetEventDestination",{}).n("SESClient","UpdateConfigurationSetEventDestinationCommand").f(void 0,void 0).ser(se_UpdateConfigurationSetEventDestinationCommand).de(de_UpdateConfigurationSetEventDestinationCommand).build()){}class UpdateConfigurationSetReputationMetricsEnabledCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetReputationMetricsEnabled",{}).n("SESClient","UpdateConfigurationSetReputationMetricsEnabledCommand").f(void 0,void 0).ser(se_UpdateConfigurationSetReputationMetricsEnabledCommand).de(de_UpdateConfigurationSetReputationMetricsEnabledCommand).build()){}class UpdateConfigurationSetSendingEnabledCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetSendingEnabled",{}).n("SESClient","UpdateConfigurationSetSendingEnabledCommand").f(void 0,void 0).ser(se_UpdateConfigurationSetSendingEnabledCommand).de(de_UpdateConfigurationSetSendingEnabledCommand).build()){}class UpdateConfigurationSetTrackingOptionsCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetTrackingOptions",{}).n("SESClient","UpdateConfigurationSetTrackingOptionsCommand").f(void 0,void 0).ser(se_UpdateConfigurationSetTrackingOptionsCommand).de(de_UpdateConfigurationSetTrackingOptionsCommand).build()){}class UpdateCustomVerificationEmailTemplateCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateCustomVerificationEmailTemplate",{}).n("SESClient","UpdateCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(se_UpdateCustomVerificationEmailTemplateCommand).de(de_UpdateCustomVerificationEmailTemplateCommand).build()){}class UpdateReceiptRuleCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateReceiptRule",{}).n("SESClient","UpdateReceiptRuleCommand").f(void 0,void 0).ser(se_UpdateReceiptRuleCommand).de(de_UpdateReceiptRuleCommand).build()){}class UpdateTemplateCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateTemplate",{}).n("SESClient","UpdateTemplateCommand").f(void 0,void 0).ser(se_UpdateTemplateCommand).de(de_UpdateTemplateCommand).build()){}class VerifyDomainDkimCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyDomainDkim",{}).n("SESClient","VerifyDomainDkimCommand").f(void 0,void 0).ser(se_VerifyDomainDkimCommand).de(de_VerifyDomainDkimCommand).build()){}class VerifyDomainIdentityCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyDomainIdentity",{}).n("SESClient","VerifyDomainIdentityCommand").f(void 0,void 0).ser(se_VerifyDomainIdentityCommand).de(de_VerifyDomainIdentityCommand).build()){}class VerifyEmailAddressCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyEmailAddress",{}).n("SESClient","VerifyEmailAddressCommand").f(void 0,void 0).ser(se_VerifyEmailAddressCommand).de(de_VerifyEmailAddressCommand).build()){}class VerifyEmailIdentityCommand extends(Command.classBuilder().ep(commonParams).m((function(e,t,n,i){return[getSerdePlugin(n,this.serialize,this.deserialize),getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyEmailIdentity",{}).n("SESClient","VerifyEmailIdentityCommand").f(void 0,void 0).ser(se_VerifyEmailIdentityCommand).de(de_VerifyEmailIdentityCommand).build()){}const commands={CloneReceiptRuleSetCommand:CloneReceiptRuleSetCommand,CreateConfigurationSetCommand:CreateConfigurationSetCommand,CreateConfigurationSetEventDestinationCommand:CreateConfigurationSetEventDestinationCommand,CreateConfigurationSetTrackingOptionsCommand:CreateConfigurationSetTrackingOptionsCommand,CreateCustomVerificationEmailTemplateCommand:CreateCustomVerificationEmailTemplateCommand,CreateReceiptFilterCommand:CreateReceiptFilterCommand,CreateReceiptRuleCommand:CreateReceiptRuleCommand,CreateReceiptRuleSetCommand:CreateReceiptRuleSetCommand,CreateTemplateCommand:CreateTemplateCommand,DeleteConfigurationSetCommand:DeleteConfigurationSetCommand,DeleteConfigurationSetEventDestinationCommand:DeleteConfigurationSetEventDestinationCommand,DeleteConfigurationSetTrackingOptionsCommand:DeleteConfigurationSetTrackingOptionsCommand,DeleteCustomVerificationEmailTemplateCommand:DeleteCustomVerificationEmailTemplateCommand,DeleteIdentityCommand:DeleteIdentityCommand,DeleteIdentityPolicyCommand:DeleteIdentityPolicyCommand,DeleteReceiptFilterCommand:DeleteReceiptFilterCommand,DeleteReceiptRuleCommand:DeleteReceiptRuleCommand,DeleteReceiptRuleSetCommand:DeleteReceiptRuleSetCommand,DeleteTemplateCommand:DeleteTemplateCommand,DeleteVerifiedEmailAddressCommand:DeleteVerifiedEmailAddressCommand,DescribeActiveReceiptRuleSetCommand:DescribeActiveReceiptRuleSetCommand,DescribeConfigurationSetCommand:DescribeConfigurationSetCommand,DescribeReceiptRuleCommand:DescribeReceiptRuleCommand,DescribeReceiptRuleSetCommand:DescribeReceiptRuleSetCommand,GetAccountSendingEnabledCommand:GetAccountSendingEnabledCommand,GetCustomVerificationEmailTemplateCommand:GetCustomVerificationEmailTemplateCommand,GetIdentityDkimAttributesCommand:GetIdentityDkimAttributesCommand,GetIdentityMailFromDomainAttributesCommand:GetIdentityMailFromDomainAttributesCommand,GetIdentityNotificationAttributesCommand:GetIdentityNotificationAttributesCommand,GetIdentityPoliciesCommand:GetIdentityPoliciesCommand,GetIdentityVerificationAttributesCommand:GetIdentityVerificationAttributesCommand,GetSendQuotaCommand:GetSendQuotaCommand,GetSendStatisticsCommand:GetSendStatisticsCommand,GetTemplateCommand:GetTemplateCommand,ListConfigurationSetsCommand:ListConfigurationSetsCommand,ListCustomVerificationEmailTemplatesCommand:ListCustomVerificationEmailTemplatesCommand,ListIdentitiesCommand:ListIdentitiesCommand,ListIdentityPoliciesCommand:ListIdentityPoliciesCommand,ListReceiptFiltersCommand:ListReceiptFiltersCommand,ListReceiptRuleSetsCommand:ListReceiptRuleSetsCommand,ListTemplatesCommand:ListTemplatesCommand,ListVerifiedEmailAddressesCommand:ListVerifiedEmailAddressesCommand,PutConfigurationSetDeliveryOptionsCommand:PutConfigurationSetDeliveryOptionsCommand,PutIdentityPolicyCommand:PutIdentityPolicyCommand,ReorderReceiptRuleSetCommand:ReorderReceiptRuleSetCommand,SendBounceCommand:SendBounceCommand,SendBulkTemplatedEmailCommand:SendBulkTemplatedEmailCommand,SendCustomVerificationEmailCommand:SendCustomVerificationEmailCommand,SendEmailCommand:SendEmailCommand,SendRawEmailCommand:SendRawEmailCommand,SendTemplatedEmailCommand:SendTemplatedEmailCommand,SetActiveReceiptRuleSetCommand:SetActiveReceiptRuleSetCommand,SetIdentityDkimEnabledCommand:SetIdentityDkimEnabledCommand,SetIdentityFeedbackForwardingEnabledCommand:SetIdentityFeedbackForwardingEnabledCommand,SetIdentityHeadersInNotificationsEnabledCommand:SetIdentityHeadersInNotificationsEnabledCommand,SetIdentityMailFromDomainCommand:SetIdentityMailFromDomainCommand,SetIdentityNotificationTopicCommand:SetIdentityNotificationTopicCommand,SetReceiptRulePositionCommand:SetReceiptRulePositionCommand,TestRenderTemplateCommand:TestRenderTemplateCommand,UpdateAccountSendingEnabledCommand:UpdateAccountSendingEnabledCommand,UpdateConfigurationSetEventDestinationCommand:UpdateConfigurationSetEventDestinationCommand,UpdateConfigurationSetReputationMetricsEnabledCommand:UpdateConfigurationSetReputationMetricsEnabledCommand,UpdateConfigurationSetSendingEnabledCommand:UpdateConfigurationSetSendingEnabledCommand,UpdateConfigurationSetTrackingOptionsCommand:UpdateConfigurationSetTrackingOptionsCommand,UpdateCustomVerificationEmailTemplateCommand:UpdateCustomVerificationEmailTemplateCommand,UpdateReceiptRuleCommand:UpdateReceiptRuleCommand,UpdateTemplateCommand:UpdateTemplateCommand,VerifyDomainDkimCommand:VerifyDomainDkimCommand,VerifyDomainIdentityCommand:VerifyDomainIdentityCommand,VerifyEmailAddressCommand:VerifyEmailAddressCommand,VerifyEmailIdentityCommand:VerifyEmailIdentityCommand};let SES$1=class extends SESClient{};createAggregatedClient(commands,SES$1);const paginateListCustomVerificationEmailTemplates=createPaginator(SESClient,ListCustomVerificationEmailTemplatesCommand,"NextToken","NextToken","MaxResults"),paginateListIdentities=createPaginator(SESClient,ListIdentitiesCommand,"NextToken","NextToken","MaxItems"),checkState=async(e,t)=>{let n;try{const i=await e.send(new GetIdentityVerificationAttributesCommand(t));n=i;try{const e=()=>Object.values(i.VerificationAttributes).map((e=>e.VerificationStatus));let t=e().length>0;for(const n of e())t=t&&"Success"==n;if(t)return{state:WaiterState.SUCCESS,reason:n}}catch(e){}}catch(e){n=e}return{state:WaiterState.RETRY,reason:n}},waitForIdentityExists=async(e,t)=>createWaiter({minDelay:3,maxDelay:120,...e},t,checkState),waitUntilIdentityExists=async(e,t)=>{const n=await createWaiter({minDelay:3,maxDelay:120,...e},t,checkState);return checkExceptions(n)};var aws=Object.freeze({__proto__:null,$Command:Command,AccountSendingPausedException:AccountSendingPausedException,AlreadyExistsException:AlreadyExistsException,BehaviorOnMXFailure:BehaviorOnMXFailure,BounceType:BounceType,BulkEmailStatus:BulkEmailStatus,CannotDeleteException:CannotDeleteException,CloneReceiptRuleSetCommand:CloneReceiptRuleSetCommand,ConfigurationSetAlreadyExistsException:ConfigurationSetAlreadyExistsException,ConfigurationSetAttribute:ConfigurationSetAttribute,ConfigurationSetDoesNotExistException:ConfigurationSetDoesNotExistException,ConfigurationSetSendingPausedException:ConfigurationSetSendingPausedException,CreateConfigurationSetCommand:CreateConfigurationSetCommand,CreateConfigurationSetEventDestinationCommand:CreateConfigurationSetEventDestinationCommand,CreateConfigurationSetTrackingOptionsCommand:CreateConfigurationSetTrackingOptionsCommand,CreateCustomVerificationEmailTemplateCommand:CreateCustomVerificationEmailTemplateCommand,CreateReceiptFilterCommand:CreateReceiptFilterCommand,CreateReceiptRuleCommand:CreateReceiptRuleCommand,CreateReceiptRuleSetCommand:CreateReceiptRuleSetCommand,CreateTemplateCommand:CreateTemplateCommand,CustomMailFromStatus:CustomMailFromStatus,CustomVerificationEmailInvalidContentException:CustomVerificationEmailInvalidContentException,CustomVerificationEmailTemplateAlreadyExistsException:CustomVerificationEmailTemplateAlreadyExistsException,CustomVerificationEmailTemplateDoesNotExistException:CustomVerificationEmailTemplateDoesNotExistException,DeleteConfigurationSetCommand:DeleteConfigurationSetCommand,DeleteConfigurationSetEventDestinationCommand:DeleteConfigurationSetEventDestinationCommand,DeleteConfigurationSetTrackingOptionsCommand:DeleteConfigurationSetTrackingOptionsCommand,DeleteCustomVerificationEmailTemplateCommand:DeleteCustomVerificationEmailTemplateCommand,DeleteIdentityCommand:DeleteIdentityCommand,DeleteIdentityPolicyCommand:DeleteIdentityPolicyCommand,DeleteReceiptFilterCommand:DeleteReceiptFilterCommand,DeleteReceiptRuleCommand:DeleteReceiptRuleCommand,DeleteReceiptRuleSetCommand:DeleteReceiptRuleSetCommand,DeleteTemplateCommand:DeleteTemplateCommand,DeleteVerifiedEmailAddressCommand:DeleteVerifiedEmailAddressCommand,DescribeActiveReceiptRuleSetCommand:DescribeActiveReceiptRuleSetCommand,DescribeConfigurationSetCommand:DescribeConfigurationSetCommand,DescribeReceiptRuleCommand:DescribeReceiptRuleCommand,DescribeReceiptRuleSetCommand:DescribeReceiptRuleSetCommand,DimensionValueSource:DimensionValueSource,DsnAction:DsnAction,EventDestinationAlreadyExistsException:EventDestinationAlreadyExistsException,EventDestinationDoesNotExistException:EventDestinationDoesNotExistException,EventType:EventType,FromEmailAddressNotVerifiedException:FromEmailAddressNotVerifiedException,GetAccountSendingEnabledCommand:GetAccountSendingEnabledCommand,GetCustomVerificationEmailTemplateCommand:GetCustomVerificationEmailTemplateCommand,GetIdentityDkimAttributesCommand:GetIdentityDkimAttributesCommand,GetIdentityMailFromDomainAttributesCommand:GetIdentityMailFromDomainAttributesCommand,GetIdentityNotificationAttributesCommand:GetIdentityNotificationAttributesCommand,GetIdentityPoliciesCommand:GetIdentityPoliciesCommand,GetIdentityVerificationAttributesCommand:GetIdentityVerificationAttributesCommand,GetSendQuotaCommand:GetSendQuotaCommand,GetSendStatisticsCommand:GetSendStatisticsCommand,GetTemplateCommand:GetTemplateCommand,IdentityType:IdentityType,InvalidCloudWatchDestinationException:InvalidCloudWatchDestinationException,InvalidConfigurationSetException:InvalidConfigurationSetException,InvalidDeliveryOptionsException:InvalidDeliveryOptionsException,InvalidFirehoseDestinationException:InvalidFirehoseDestinationException,InvalidLambdaFunctionException:InvalidLambdaFunctionException,InvalidPolicyException:InvalidPolicyException,InvalidRenderingParameterException:InvalidRenderingParameterException,InvalidS3ConfigurationException:InvalidS3ConfigurationException,InvalidSNSDestinationException:InvalidSNSDestinationException,InvalidSnsTopicException:InvalidSnsTopicException,InvalidTemplateException:InvalidTemplateException,InvalidTrackingOptionsException:InvalidTrackingOptionsException,InvocationType:InvocationType,LimitExceededException:LimitExceededException,ListConfigurationSetsCommand:ListConfigurationSetsCommand,ListCustomVerificationEmailTemplatesCommand:ListCustomVerificationEmailTemplatesCommand,ListIdentitiesCommand:ListIdentitiesCommand,ListIdentityPoliciesCommand:ListIdentityPoliciesCommand,ListReceiptFiltersCommand:ListReceiptFiltersCommand,ListReceiptRuleSetsCommand:ListReceiptRuleSetsCommand,ListTemplatesCommand:ListTemplatesCommand,ListVerifiedEmailAddressesCommand:ListVerifiedEmailAddressesCommand,MailFromDomainNotVerifiedException:MailFromDomainNotVerifiedException,MessageRejected:MessageRejected,MissingRenderingAttributeException:MissingRenderingAttributeException,NotificationType:NotificationType,ProductionAccessNotGrantedException:ProductionAccessNotGrantedException,PutConfigurationSetDeliveryOptionsCommand:PutConfigurationSetDeliveryOptionsCommand,PutIdentityPolicyCommand:PutIdentityPolicyCommand,ReceiptFilterPolicy:ReceiptFilterPolicy,ReorderReceiptRuleSetCommand:ReorderReceiptRuleSetCommand,RuleDoesNotExistException:RuleDoesNotExistException,RuleSetDoesNotExistException:RuleSetDoesNotExistException,SES:SES$1,SESClient:SESClient,SESServiceException:SESServiceException,SNSActionEncoding:SNSActionEncoding,SendBounceCommand:SendBounceCommand,SendBulkTemplatedEmailCommand:SendBulkTemplatedEmailCommand,SendCustomVerificationEmailCommand:SendCustomVerificationEmailCommand,SendEmailCommand:SendEmailCommand,SendRawEmailCommand:SendRawEmailCommand,SendTemplatedEmailCommand:SendTemplatedEmailCommand,SetActiveReceiptRuleSetCommand:SetActiveReceiptRuleSetCommand,SetIdentityDkimEnabledCommand:SetIdentityDkimEnabledCommand,SetIdentityFeedbackForwardingEnabledCommand:SetIdentityFeedbackForwardingEnabledCommand,SetIdentityHeadersInNotificationsEnabledCommand:SetIdentityHeadersInNotificationsEnabledCommand,SetIdentityMailFromDomainCommand:SetIdentityMailFromDomainCommand,SetIdentityNotificationTopicCommand:SetIdentityNotificationTopicCommand,SetReceiptRulePositionCommand:SetReceiptRulePositionCommand,StopScope:StopScope,TemplateDoesNotExistException:TemplateDoesNotExistException,TestRenderTemplateCommand:TestRenderTemplateCommand,TlsPolicy:TlsPolicy,TrackingOptionsAlreadyExistsException:TrackingOptionsAlreadyExistsException,TrackingOptionsDoesNotExistException:TrackingOptionsDoesNotExistException,UpdateAccountSendingEnabledCommand:UpdateAccountSendingEnabledCommand,UpdateConfigurationSetEventDestinationCommand:UpdateConfigurationSetEventDestinationCommand,UpdateConfigurationSetReputationMetricsEnabledCommand:UpdateConfigurationSetReputationMetricsEnabledCommand,UpdateConfigurationSetSendingEnabledCommand:UpdateConfigurationSetSendingEnabledCommand,UpdateConfigurationSetTrackingOptionsCommand:UpdateConfigurationSetTrackingOptionsCommand,UpdateCustomVerificationEmailTemplateCommand:UpdateCustomVerificationEmailTemplateCommand,UpdateReceiptRuleCommand:UpdateReceiptRuleCommand,UpdateTemplateCommand:UpdateTemplateCommand,VerificationStatus:VerificationStatus,VerifyDomainDkimCommand:VerifyDomainDkimCommand,VerifyDomainIdentityCommand:VerifyDomainIdentityCommand,VerifyEmailAddressCommand:VerifyEmailAddressCommand,VerifyEmailIdentityCommand:VerifyEmailIdentityCommand,__Client:Client,paginateListCustomVerificationEmailTemplates:paginateListCustomVerificationEmailTemplates,paginateListIdentities:paginateListIdentities,waitForIdentityExists:waitForIdentityExists,waitUntilIdentityExists:waitUntilIdentityExists}),nodemailer={},shared={exports:{}},fetch$1={exports:{}},cookies,hasRequiredCookies;function requireCookies(){if(hasRequiredCookies)return cookies;hasRequiredCookies=1;const e=require$$0$3;return cookies=class{constructor(e){this.options=e||{},this.cookies=[]}set(t,n){let i,r=e.parse(n||""),o=this.parse(t);return o.domain?(i=o.domain.replace(/^\./,""),(r.hostname.length<i.length||("."+r.hostname).substr(1-i.length)!=="."+i)&&(o.domain=r.hostname)):o.domain=r.hostname,o.path||(o.path=this.getPath(r.pathname)),o.expires||(o.expires=new Date(Date.now()+1e3*(Number(this.options.sessionTimeout||1800)||1800))),this.add(o)}get(e){return this.list(e).map((e=>e.name+"="+e.value)).join("; ")}list(e){let t,n,i=[];for(t=this.cookies.length-1;t>=0;t--)n=this.cookies[t],this.isExpired(n)?this.cookies.splice(t,t):this.match(n,e)&&i.unshift(n);return i}parse(e){let t={};return(e||"").toString().split(";").forEach((e=>{let n,i=e.split("="),r=i.shift().trim().toLowerCase(),o=i.join("=").trim();if(r)switch(r){case"expires":o=new Date(o),"Invalid Date"!==o.toString()&&(t.expires=o);break;case"path":t.path=o;break;case"domain":n=o.toLowerCase(),n.length&&"."!==n.charAt(0)&&(n="."+n),t.domain=n;break;case"max-age":t.expires=new Date(Date.now()+1e3*(Number(o)||0));break;case"secure":t.secure=!0;break;case"httponly":t.httponly=!0;break;default:t.name||(t.name=r,t.value=o)}})),t}match(t,n){let i=e.parse(n||"");return(i.hostname===t.domain||"."===t.domain.charAt(0)&&("."+i.hostname).substr(-t.domain.length)===t.domain)&&(this.getPath(i.pathname).substr(0,t.path.length)===t.path&&(!t.secure||"https:"===i.protocol))}add(e){let t,n;if(!e||!e.name)return!1;for(t=0,n=this.cookies.length;t<n;t++)if(this.compare(this.cookies[t],e))return this.isExpired(e)?(this.cookies.splice(t,1),!1):(this.cookies[t]=e,!0);return this.isExpired(e)||this.cookies.push(e),!0}compare(e,t){return e.name===t.name&&e.path===t.path&&e.domain===t.domain&&e.secure===t.secure&&e.httponly==e.httponly}isExpired(e){return e.expires&&e.expires<new Date||!e.value}getPath(e){let t=(e||"/").split("/");return t.pop(),t=t.join("/").trim(),"/"!==t.charAt(0)&&(t="/"+t),"/"!==t.substr(-1)&&(t+="/"),t}},cookies}const name$1="nodemailer",version$1="6.9.16",description$1="Easy as cake e-mail sending from your Node.js applications",main$1="lib/nodemailer.js",scripts$1={test:"node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js","test:coverage":"c8 node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js",lint:"eslint .",update:"rm -rf node_modules/ package-lock.json && ncu -u && npm install"},repository$1={type:"git",url:"https://github.com/nodemailer/nodemailer.git"},keywords$1=["Nodemailer"],author$1="Andris Reinman",license$1="MIT-0",bugs={url:"https://github.com/nodemailer/nodemailer/issues"},homepage="https://nodemailer.com/",devDependencies$1={"@aws-sdk/client-ses":"3.679.0",bunyan:"1.8.15",c8:"10.1.2",eslint:"8.57.0","eslint-config-nodemailer":"1.2.0","eslint-config-prettier":"9.1.0",libbase64:"1.3.0",libmime:"5.3.5",libqp:"2.1.0","nodemailer-ntlm-auth":"1.0.4",proxy:"1.0.2","proxy-test-server":"1.0.0","smtp-server":"3.13.6"},engines$1={node:">=6.0.0"};var require$$9={name:name$1,version:version$1,description:description$1,main:main$1,scripts:scripts$1,repository:repository$1,keywords:keywords$1,author:author$1,license:license$1,bugs:bugs,homepage:homepage,devDependencies:devDependencies$1,engines:engines$1},hasRequiredFetch,hasRequiredShared,mimeTypes_1,hasRequiredMimeTypes,punycode_1,hasRequiredPunycode,base64,hasRequiredBase64,qp,hasRequiredQp,mimeFuncs,hasRequiredMimeFuncs,addressparser_1,hasRequiredAddressparser,lastNewline,hasRequiredLastNewline,leWindows,hasRequiredLeWindows,leUnix,hasRequiredLeUnix,mimeNode,hasRequiredMimeNode,mailComposer,hasRequiredMailComposer,messageParser,hasRequiredMessageParser,relaxedBody,hasRequiredRelaxedBody;function requireFetch(){if(hasRequiredFetch)return fetch$1.exports;hasRequiredFetch=1;const e=require$$0$5,t=require$$1,n=require$$0$3,i=require$$3$1,r=require$$0$4.PassThrough,o=requireCookies(),a=require$$9,s=require$$7;function c(l,d){(d=d||{}).fetchRes=d.fetchRes||new r,d.cookies=d.cookies||new o,d.redirects=d.redirects||0,d.maxRedirects=isNaN(d.maxRedirects)?5:d.maxRedirects,d.cookie&&([].concat(d.cookie||[]).forEach((e=>{d.cookies.set(e,l)})),d.cookie=!1);let u,p,m,h=d.fetchRes,f=n.parse(l),g=(d.method||"").toString().trim().toUpperCase()||"GET",y=!1,v="https:"===f.protocol?t:e,_={"accept-encoding":"gzip,deflate","user-agent":"nodemailer/"+a.version};if(Object.keys(d.headers||{}).forEach((e=>{_[e.toLowerCase().trim()]=d.headers[e]})),d.userAgent&&(_["user-agent"]=d.userAgent),f.auth&&(_.Authorization="Basic "+Buffer.from(f.auth).toString("base64")),(u=d.cookies.get(l))&&(_.cookie=u),d.body){if(!1!==d.contentType&&(_["Content-Type"]=d.contentType||"application/x-www-form-urlencoded"),"function"==typeof d.body.pipe)_["Transfer-Encoding"]="chunked",p=d.body,p.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=l,h.emit("error",e))}));else{if(d.body instanceof Buffer)p=d.body;else if("object"==typeof d.body)try{p=Buffer.from(Object.keys(d.body).map((e=>{let t=d.body[e].toString().trim();return encodeURIComponent(e)+"="+encodeURIComponent(t)})).join("&"))}catch(e){if(y)return;return y=!0,e.type="FETCH",e.sourceUrl=l,void h.emit("error",e)}else p=Buffer.from(d.body.toString().trim());_["Content-Type"]=d.contentType||"application/x-www-form-urlencoded",_["Content-Length"]=p.length}g=(d.method||"").toString().trim().toUpperCase()||"POST"}let E={method:g,host:f.hostname,path:f.path,port:f.port?f.port:"https:"===f.protocol?443:80,headers:_,rejectUnauthorized:!1,agent:!1};d.tls&&Object.keys(d.tls).forEach((e=>{E[e]=d.tls[e]})),"https:"!==f.protocol||!f.hostname||f.hostname===E.host||s.isIP(f.hostname)||E.servername||(E.servername=f.hostname);try{m=v.request(E)}catch(e){return y=!0,setImmediate((()=>{e.type="FETCH",e.sourceUrl=l,h.emit("error",e)})),h}return d.timeout&&m.setTimeout(d.timeout,(()=>{if(y)return;y=!0,m.abort();let e=new Error("Request Timeout");e.type="FETCH",e.sourceUrl=l,h.emit("error",e)})),m.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=l,h.emit("error",e))})),m.on("response",(e=>{let t;if(!y){switch(e.headers["content-encoding"]){case"gzip":case"deflate":t=i.createUnzip()}if(e.headers["set-cookie"]&&[].concat(e.headers["set-cookie"]||[]).forEach((e=>{d.cookies.set(e,l)})),[301,302,303,307,308].includes(e.statusCode)&&e.headers.location){if(d.redirects++,d.redirects>d.maxRedirects){y=!0;let e=new Error("Maximum redirect count exceeded");return e.type="FETCH",e.sourceUrl=l,h.emit("error",e),void m.abort()}return d.method="GET",d.body=!1,c(n.resolve(l,e.headers.location),d)}if(h.statusCode=e.statusCode,h.headers=e.headers,e.statusCode>=300&&!d.allowErrorResponse){y=!0;let t=new Error("Invalid status code "+e.statusCode);return t.type="FETCH",t.sourceUrl=l,h.emit("error",t),void m.abort()}e.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=l,h.emit("error",e),m.abort())})),t?(e.pipe(t).pipe(h),t.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=l,h.emit("error",e),m.abort())}))):e.pipe(h)}})),setImmediate((()=>{if(p)try{if("function"==typeof p.pipe)return p.pipe(m);m.write(p)}catch(e){return y=!0,e.type="FETCH",e.sourceUrl=l,void h.emit("error",e)}m.end()})),h}return fetch$1.exports=function(e,t){return c(e,t)},fetch$1.exports.Cookies=o,fetch$1.exports}function requireShared(){return hasRequiredShared||(hasRequiredShared=1,function(e){const t=require$$0$3,n=require$$0$8,i=require$$0$6,r=requireFetch(),o=require$$4,a=require$$7,s=require$$0$7,c=3e5;let l;try{l=s.networkInterfaces()}catch(e){}e.exports.networkInterfaces=l;const d=(t,n)=>{let i=e.exports.networkInterfaces;if(!i)return!0;const r=Object.keys(i).map((e=>i[e])).reduce(((e,t)=>e.concat(t)),[]).filter((e=>!e.internal||n)).filter((e=>e.family==="IPv"+t||e.family===t)).length>0;return r},u=(e,t,n,i)=>{if(!d(e,(n=n||{}).allowInternalNetworkInterfaces))return i(null,[]);(o.Resolver?new o.Resolver(n):o)["resolve"+e](t,((e,t)=>{if(e){switch(e.code){case o.NODATA:case o.NOTFOUND:case o.NOTIMP:case o.SERVFAIL:case o.CONNREFUSED:case o.REFUSED:case"EAI_AGAIN":return i(null,[])}return i(e)}return i(null,Array.isArray(t)?t:[].concat(t||[]))}))},p=e.exports.dnsCache=new Map,m=(e,t)=>e?Object.assign({servername:e.servername,host:e.addresses&&e.addresses.length?1===e.addresses.length?e.addresses[0]:e.addresses[Math.floor(Math.random()*e.addresses.length)]:null},t||{}):Object.assign({},t||{});function h(e,t){let n=!1,i=[],r=0;e.on("error",(e=>{n||(n=!0,t(e))})),e.on("readable",(()=>{let t;for(;null!==(t=e.read());)i.push(t),r+=t.length})),e.on("end",(()=>{if(n)return;let e;n=!0;try{e=Buffer.concat(i,r)}catch(e){return t(e)}t(null,e)}))}e.exports.resolveHostname=(e,t)=>{if(!(e=e||{}).host&&e.servername&&(e.host=e.servername),!e.host||a.isIP(e.host)){let n={addresses:[e.host],servername:e.servername||!1};return t(null,m(n,{cached:!1}))}let n;if(p.has(e.host)&&(n=p.get(e.host),!n.expires||n.expires>=Date.now()))return t(null,m(n.value,{cached:!0}));u(4,e.host,e,((i,r)=>{if(i)return n?t(null,m(n.value,{cached:!0,error:i})):t(i);if(r&&r.length){let n={addresses:r,servername:e.servername||e.host};return p.set(e.host,{value:n,expires:Date.now()+(e.dnsTtl||c)}),t(null,m(n,{cached:!1}))}u(6,e.host,e,((i,r)=>{if(i)return n?t(null,m(n.value,{cached:!0,error:i})):t(i);if(r&&r.length){let n={addresses:r,servername:e.servername||e.host};return p.set(e.host,{value:n,expires:Date.now()+(e.dnsTtl||c)}),t(null,m(n,{cached:!1}))}try{o.lookup(e.host,{all:!0},((i,r)=>{if(i)return n?t(null,m(n.value,{cached:!0,error:i})):t(i);let o=!!r&&r.filter((e=>d(e.family))).map((e=>e.address)).shift();if(r&&r.length&&!o&&console.warn(`Failed to resolve IPv${r[0].family} addresses with current network`),!o&&n)return t(null,m(n.value,{cached:!0}));let a={addresses:o?[o]:[e.host],servername:e.servername||e.host};return p.set(e.host,{value:a,expires:Date.now()+(e.dnsTtl||c)}),t(null,m(a,{cached:!1}))}))}catch(i){return n?t(null,m(n.value,{cached:!0,error:i})):t(i)}}))}))},e.exports.parseConnectionUrl=e=>{e=e||"";let n={};return[t.parse(e,!0)].forEach((e=>{let t;switch(e.protocol){case"smtp:":n.secure=!1;break;case"smtps:":n.secure=!0;break;case"direct:":n.direct=!0}!isNaN(e.port)&&Number(e.port)&&(n.port=Number(e.port)),e.hostname&&(n.host=e.hostname),e.auth&&(t=e.auth.split(":"),n.auth||(n.auth={}),n.auth.user=t.shift(),n.auth.pass=t.join(":")),Object.keys(e.query||{}).forEach((t=>{let i=n,r=t,o=e.query[t];switch(isNaN(o)||(o=Number(o)),o){case"true":o=!0;break;case"false":o=!1}if(0===t.indexOf("tls."))r=t.substr(4),n.tls||(n.tls={}),i=n.tls;else if(t.indexOf(".")>=0)return;r in i||(i[r]=o)}))})),n},e.exports._logFunc=(e,t,n,i,r,...o)=>{let a={};Object.keys(n||{}).forEach((e=>{"level"!==e&&(a[e]=n[e])})),Object.keys(i||{}).forEach((e=>{"level"!==e&&(a[e]=i[e])})),e[t](a,r,...o)},e.exports.getLogger=(t,i)=>{let r={},o=["trace","debug","info","warn","error","fatal"];if(!(t=t||{}).logger)return o.forEach((e=>{r[e]=()=>!1})),r;let a=t.logger;return!0===t.logger&&(a=function(e){let t=0,i=new Map;e.forEach((e=>{e.length>t&&(t=e.length)})),e.forEach((e=>{let n=e.toUpperCase();n.length<t&&(n+=" ".repeat(t-n.length)),i.set(e,n)}));let r=(e,t,r,...o)=>{let a="";t&&("server"===t.tnx?a="S: ":"client"===t.tnx&&(a="C: "),t.sid&&(a="["+t.sid+"] "+a),t.cid&&(a="[#"+t.cid+"] "+a)),(r=n.format(r,...o)).split(/\r?\n/).forEach((t=>{console.log("[%s] %s %s",(new Date).toISOString().substr(0,19).replace(/T/," "),i.get(e),a+t)}))},o={};return e.forEach((e=>{o[e]=r.bind(null,e)})),o}(o)),o.forEach((t=>{r[t]=(n,r,...o)=>{e.exports._logFunc(a,t,i,n,r,...o)}})),r},e.exports.callbackPromise=(e,t)=>function(){let n=Array.from(arguments),i=n.shift();i?t(i):e(...n)},e.exports.parseDataURI=e=>{let t=e,n=t.indexOf(",");if(!n)return e;let i,r=t.substring(n+1),o=t.substring(5,n).split(";"),a=o.length>1&&o[o.length-1];a&&a.indexOf("=")<0&&(i=a.toLowerCase(),o.pop());let s=o.shift()||"application/octet-stream",c={};for(let e of o){let t=e.indexOf("=");if(t>=0){let n=e.substring(0,t),i=e.substring(t+1);c[n]=i}}switch(i){case"base64":r=Buffer.from(r,"base64");break;case"utf8":r=Buffer.from(r);break;default:try{r=Buffer.from(decodeURIComponent(r))}catch(e){r=Buffer.from(r)}r=Buffer.from(r)}return{data:r,encoding:i,contentType:s,params:c}},e.exports.resolveContent=(t,n,o)=>{let a;o||(a=new Promise(((t,n)=>{o=e.exports.callbackPromise(t,n)})));let s,c=t&&t[n]&&t[n].content||t[n],l=("object"==typeof t[n]&&t[n].encoding||"utf8").toString().toLowerCase().replace(/[-_\s]/g,"");if(!c)return o(null,c);if("object"==typeof c){if("function"==typeof c.pipe)return h(c,((e,i)=>{if(e)return o(e);t[n].content?t[n].content=i:t[n]=i,o(null,i)}));if(/^https?:\/\//i.test(c.path||c.href))return s=r(c.path||c.href),h(s,o);if(/^data:/i.test(c.path||c.href)){let t=e.exports.parseDataURI(c.path||c.href);return t&&t.data?o(null,t.data):o(null,Buffer.from(0))}if(c.path)return h(i.createReadStream(c.path),o)}return"string"!=typeof t[n].content||["utf8","usascii","ascii"].includes(l)||(c=Buffer.from(t[n].content,l)),setImmediate((()=>o(null,c))),a},e.exports.assign=function(){let e=Array.from(arguments),t=e.shift()||{};return e.forEach((e=>{Object.keys(e||{}).forEach((n=>{["tls","auth"].includes(n)&&e[n]&&"object"==typeof e[n]?(t[n]||(t[n]={}),Object.keys(e[n]).forEach((i=>{t[n][i]=e[n][i]}))):t[n]=e[n]}))})),t},e.exports.encodeXText=e=>{if(!/[^\x21-\x2A\x2C-\x3C\x3E-\x7E]/.test(e))return e;let t=Buffer.from(e),n="";for(let e=0,i=t.length;e<i;e++){let i=t[e];n+=i<33||i>126||43===i||61===i?"+"+(i<16?"0":"")+i.toString(16).toUpperCase():String.fromCharCode(i)}return n}}(shared)),shared.exports}function requireMimeTypes(){if(hasRequiredMimeTypes)return mimeTypes_1;hasRequiredMimeTypes=1;const e=require$$0$9,t="application/octet-stream",n=new Map([["application/acad","dwg"],["application/applixware","aw"],["application/arj","arj"],["application/atom+xml","xml"],["application/atomcat+xml","atomcat"],["application/atomsvc+xml","atomsvc"],["application/base64",["mm","mme"]],["application/binhex","hqx"],["application/binhex4","hqx"],["application/book",["book","boo"]],["application/ccxml+xml,","ccxml"],["application/cdf","cdf"],["application/cdmi-capability","cdmia"],["application/cdmi-container","cdmic"],["application/cdmi-domain","cdmid"],["application/cdmi-object","cdmio"],["application/cdmi-queue","cdmiq"],["application/clariscad","ccad"],["application/commonground","dp"],["application/cu-seeme","cu"],["application/davmount+xml","davmount"],["application/drafting","drw"],["application/dsptype","tsp"],["application/dssc+der","dssc"],["application/dssc+xml","xdssc"],["application/dxf","dxf"],["application/ecmascript",["js","es"]],["application/emma+xml","emma"],["application/envoy","evy"],["application/epub+zip","epub"],["application/excel",["xls","xl","xla","xlb","xlc","xld","xlk","xll","xlm","xlt","xlv","xlw"]],["application/exi","exi"],["application/font-tdpfr","pfr"],["application/fractals","fif"],["application/freeloader","frl"],["application/futuresplash","spl"],["application/geo+json","geojson"],["application/gnutar","tgz"],["application/groupwise","vew"],["application/hlp","hlp"],["application/hta","hta"],["application/hyperstudio","stk"],["application/i-deas","unv"],["application/iges",["iges","igs"]],["application/inf","inf"],["application/internet-property-stream","acx"],["application/ipfix","ipfix"],["application/java","class"],["application/java-archive","jar"],["application/java-byte-code","class"],["application/java-serialized-object","ser"],["application/java-vm","class"],["application/javascript","js"],["application/json","json"],["application/lha","lha"],["application/lzx","lzx"],["application/mac-binary","bin"],["application/mac-binhex","hqx"],["application/mac-binhex40","hqx"],["application/mac-compactpro","cpt"],["application/macbinary","bin"],["application/mads+xml","mads"],["application/marc","mrc"],["application/marcxml+xml","mrcx"],["application/mathematica","ma"],["application/mathml+xml","mathml"],["application/mbedlet","mbd"],["application/mbox","mbox"],["application/mcad","mcd"],["application/mediaservercontrol+xml","mscml"],["application/metalink4+xml","meta4"],["application/mets+xml","mets"],["application/mime","aps"],["application/mods+xml","mods"],["application/mp21","m21"],["application/mp4","mp4"],["application/mspowerpoint",["ppt","pot","pps","ppz"]],["application/msword",["doc","dot","w6w","wiz","word"]],["application/mswrite","wri"],["application/mxf","mxf"],["application/netmc","mcp"],["application/octet-stream",["*"]],["application/oda","oda"],["application/oebps-package+xml","opf"],["application/ogg","ogx"],["application/olescript","axs"],["application/onenote","onetoc"],["application/patch-ops-error+xml","xer"],["application/pdf","pdf"],["application/pgp-encrypted","asc"],["application/pgp-signature","pgp"],["application/pics-rules","prf"],["application/pkcs-12","p12"],["application/pkcs-crl","crl"],["application/pkcs10","p10"],["application/pkcs7-mime",["p7c","p7m"]],["application/pkcs7-signature","p7s"],["application/pkcs8","p8"],["application/pkix-attr-cert","ac"],["application/pkix-cert",["cer","crt"]],["application/pkix-crl","crl"],["application/pkix-pkipath","pkipath"],["application/pkixcmp","pki"],["application/plain","text"],["application/pls+xml","pls"],["application/postscript",["ps","ai","eps"]],["application/powerpoint","ppt"],["application/pro_eng",["part","prt"]],["application/prs.cww","cww"],["application/pskc+xml","pskcxml"],["application/rdf+xml","rdf"],["application/reginfo+xml","rif"],["application/relax-ng-compact-syntax","rnc"],["application/resource-lists+xml","rl"],["application/resource-lists-diff+xml","rld"],["application/ringing-tones","rng"],["application/rls-services+xml","rs"],["application/rsd+xml","rsd"],["application/rss+xml","xml"],["application/rtf",["rtf","rtx"]],["application/sbml+xml","sbml"],["application/scvp-cv-request","scq"],["application/scvp-cv-response","scs"],["application/scvp-vp-request","spq"],["application/scvp-vp-response","spp"],["application/sdp","sdp"],["application/sea","sea"],["application/set","set"],["application/set-payment-initiation","setpay"],["application/set-registration-initiation","setreg"],["application/shf+xml","shf"],["application/sla","stl"],["application/smil",["smi","smil"]],["application/smil+xml","smi"],["application/solids","sol"],["application/sounder","sdr"],["application/sparql-query","rq"],["application/sparql-results+xml","srx"],["application/srgs","gram"],["application/srgs+xml","grxml"],["application/sru+xml","sru"],["application/ssml+xml","ssml"],["application/step",["step","stp"]],["application/streamingmedia","ssm"],["application/tei+xml","tei"],["application/thraud+xml","tfi"],["application/timestamped-data","tsd"],["application/toolbook","tbk"],["application/vda","vda"],["application/vnd.3gpp.pic-bw-large","plb"],["application/vnd.3gpp.pic-bw-small","psb"],["application/vnd.3gpp.pic-bw-var","pvb"],["application/vnd.3gpp2.tcap","tcap"],["application/vnd.3m.post-it-notes","pwn"],["application/vnd.accpac.simply.aso","aso"],["application/vnd.accpac.simply.imp","imp"],["application/vnd.acucobol","acu"],["application/vnd.acucorp","atc"],["application/vnd.adobe.air-application-installer-package+zip","air"],["application/vnd.adobe.fxp","fxp"],["application/vnd.adobe.xdp+xml","xdp"],["application/vnd.adobe.xfdf","xfdf"],["application/vnd.ahead.space","ahead"],["application/vnd.airzip.filesecure.azf","azf"],["application/vnd.airzip.filesecure.azs","azs"],["application/vnd.amazon.ebook","azw"],["application/vnd.americandynamics.acc","acc"],["application/vnd.amiga.ami","ami"],["application/vnd.android.package-archive","apk"],["application/vnd.anser-web-certificate-issue-initiation","cii"],["application/vnd.anser-web-funds-transfer-initiation","fti"],["application/vnd.antix.game-component","atx"],["application/vnd.apple.installer+xml","mpkg"],["application/vnd.apple.mpegurl","m3u8"],["application/vnd.aristanetworks.swi","swi"],["application/vnd.audiograph","aep"],["application/vnd.blueice.multipass","mpm"],["application/vnd.bmi","bmi"],["application/vnd.businessobjects","rep"],["application/vnd.chemdraw+xml","cdxml"],["application/vnd.chipnuts.karaoke-mmd","mmd"],["application/vnd.cinderella","cdy"],["application/vnd.claymore","cla"],["application/vnd.cloanto.rp9","rp9"],["application/vnd.clonk.c4group","c4g"],["application/vnd.cluetrust.cartomobile-config","c11amc"],["application/vnd.cluetrust.cartomobile-config-pkg","c11amz"],["application/vnd.commonspace","csp"],["application/vnd.contact.cmsg","cdbcmsg"],["application/vnd.cosmocaller","cmc"],["application/vnd.crick.clicker","clkx"],["application/vnd.crick.clicker.keyboard","clkk"],["application/vnd.crick.clicker.palette","clkp"],["application/vnd.crick.clicker.template","clkt"],["application/vnd.crick.clicker.wordbank","clkw"],["application/vnd.criticaltools.wbs+xml","wbs"],["application/vnd.ctc-posml","pml"],["application/vnd.cups-ppd","ppd"],["application/vnd.curl.car","car"],["application/vnd.curl.pcurl","pcurl"],["application/vnd.data-vision.rdz","rdz"],["application/vnd.denovo.fcselayout-link","fe_launch"],["application/vnd.dna","dna"],["application/vnd.dolby.mlp","mlp"],["application/vnd.dpgraph","dpg"],["application/vnd.dreamfactory","dfac"],["application/vnd.dvb.ait","ait"],["application/vnd.dvb.service","svc"],["application/vnd.dynageo","geo"],["application/vnd.ecowin.chart","mag"],["application/vnd.enliven","nml"],["application/vnd.epson.esf","esf"],["application/vnd.epson.msf","msf"],["application/vnd.epson.quickanime","qam"],["application/vnd.epson.salt","slt"],["application/vnd.epson.ssf","ssf"],["application/vnd.eszigno3+xml","es3"],["application/vnd.ezpix-album","ez2"],["application/vnd.ezpix-package","ez3"],["application/vnd.fdf","fdf"],["application/vnd.fdsn.seed","seed"],["application/vnd.flographit","gph"],["application/vnd.fluxtime.clip","ftc"],["application/vnd.framemaker","fm"],["application/vnd.frogans.fnc","fnc"],["application/vnd.frogans.ltf","ltf"],["application/vnd.fsc.weblaunch","fsc"],["application/vnd.fujitsu.oasys","oas"],["application/vnd.fujitsu.oasys2","oa2"],["application/vnd.fujitsu.oasys3","oa3"],["application/vnd.fujitsu.oasysgp","fg5"],["application/vnd.fujitsu.oasysprs","bh2"],["application/vnd.fujixerox.ddd","ddd"],["application/vnd.fujixerox.docuworks","xdw"],["application/vnd.fujixerox.docuworks.binder","xbd"],["application/vnd.fuzzysheet","fzs"],["application/vnd.genomatix.tuxedo","txd"],["application/vnd.geogebra.file","ggb"],["application/vnd.geogebra.tool","ggt"],["application/vnd.geometry-explorer","gex"],["application/vnd.geonext","gxt"],["application/vnd.geoplan","g2w"],["application/vnd.geospace","g3w"],["application/vnd.gmx","gmx"],["application/vnd.google-earth.kml+xml","kml"],["application/vnd.google-earth.kmz","kmz"],["application/vnd.grafeq","gqf"],["application/vnd.groove-account","gac"],["application/vnd.groove-help","ghf"],["application/vnd.groove-identity-message","gim"],["application/vnd.groove-injector","grv"],["application/vnd.groove-tool-message","gtm"],["application/vnd.groove-tool-template","tpl"],["application/vnd.groove-vcard","vcg"],["application/vnd.hal+xml","hal"],["application/vnd.handheld-entertainment+xml","zmm"],["application/vnd.hbci","hbci"],["application/vnd.hhe.lesson-player","les"],["application/vnd.hp-hpgl",["hgl","hpg","hpgl"]],["application/vnd.hp-hpid","hpid"],["application/vnd.hp-hps","hps"],["application/vnd.hp-jlyt","jlt"],["application/vnd.hp-pcl","pcl"],["application/vnd.hp-pclxl","pclxl"],["application/vnd.hydrostatix.sof-data","sfd-hdstx"],["application/vnd.hzn-3d-crossword","x3d"],["application/vnd.ibm.minipay","mpy"],["application/vnd.ibm.modcap","afp"],["application/vnd.ibm.rights-management","irm"],["application/vnd.ibm.secure-container","sc"],["application/vnd.iccprofile","icc"],["application/vnd.igloader","igl"],["application/vnd.immervision-ivp","ivp"],["application/vnd.immervision-ivu","ivu"],["application/vnd.insors.igm","igm"],["application/vnd.intercon.formnet","xpw"],["application/vnd.intergeo","i2g"],["application/vnd.intu.qbo","qbo"],["application/vnd.intu.qfx","qfx"],["application/vnd.ipunplugged.rcprofile","rcprofile"],["application/vnd.irepository.package+xml","irp"],["application/vnd.is-xpr","xpr"],["application/vnd.isac.fcs","fcs"],["application/vnd.jam","jam"],["application/vnd.jcp.javame.midlet-rms","rms"],["application/vnd.jisp","jisp"],["application/vnd.joost.joda-archive","joda"],["application/vnd.kahootz","ktz"],["application/vnd.kde.karbon","karbon"],["application/vnd.kde.kchart","chrt"],["application/vnd.kde.kformula","kfo"],["application/vnd.kde.kivio","flw"],["application/vnd.kde.kontour","kon"],["application/vnd.kde.kpresenter","kpr"],["application/vnd.kde.kspread","ksp"],["application/vnd.kde.kword","kwd"],["application/vnd.kenameaapp","htke"],["application/vnd.kidspiration","kia"],["application/vnd.kinar","kne"],["application/vnd.koan","skp"],["application/vnd.kodak-descriptor","sse"],["application/vnd.las.las+xml","lasxml"],["application/vnd.llamagraphics.life-balance.desktop","lbd"],["application/vnd.llamagraphics.life-balance.exchange+xml","lbe"],["application/vnd.lotus-1-2-3","123"],["application/vnd.lotus-approach","apr"],["application/vnd.lotus-freelance","pre"],["application/vnd.lotus-notes","nsf"],["application/vnd.lotus-organizer","org"],["application/vnd.lotus-screencam","scm"],["application/vnd.lotus-wordpro","lwp"],["application/vnd.macports.portpkg","portpkg"],["application/vnd.mcd","mcd"],["application/vnd.medcalcdata","mc1"],["application/vnd.mediastation.cdkey","cdkey"],["application/vnd.mfer","mwf"],["application/vnd.mfmp","mfm"],["application/vnd.micrografx.flo","flo"],["application/vnd.micrografx.igx","igx"],["application/vnd.mif","mif"],["application/vnd.mobius.daf","daf"],["application/vnd.mobius.dis","dis"],["application/vnd.mobius.mbk","mbk"],["application/vnd.mobius.mqy","mqy"],["application/vnd.mobius.msl","msl"],["application/vnd.mobius.plc","plc"],["application/vnd.mobius.txf","txf"],["application/vnd.mophun.application","mpn"],["application/vnd.mophun.certificate","mpc"],["application/vnd.mozilla.xul+xml","xul"],["application/vnd.ms-artgalry","cil"],["application/vnd.ms-cab-compressed","cab"],["application/vnd.ms-excel",["xls","xla","xlc","xlm","xlt","xlw","xlb","xll"]],["application/vnd.ms-excel.addin.macroenabled.12","xlam"],["application/vnd.ms-excel.sheet.binary.macroenabled.12","xlsb"],["application/vnd.ms-excel.sheet.macroenabled.12","xlsm"],["application/vnd.ms-excel.template.macroenabled.12","xltm"],["application/vnd.ms-fontobject","eot"],["application/vnd.ms-htmlhelp","chm"],["application/vnd.ms-ims","ims"],["application/vnd.ms-lrm","lrm"],["application/vnd.ms-officetheme","thmx"],["application/vnd.ms-outlook","msg"],["application/vnd.ms-pki.certstore","sst"],["application/vnd.ms-pki.pko","pko"],["application/vnd.ms-pki.seccat","cat"],["application/vnd.ms-pki.stl","stl"],["application/vnd.ms-pkicertstore","sst"],["application/vnd.ms-pkiseccat","cat"],["application/vnd.ms-pkistl","stl"],["application/vnd.ms-powerpoint",["ppt","pot","pps","ppa","pwz"]],["application/vnd.ms-powerpoint.addin.macroenabled.12","ppam"],["application/vnd.ms-powerpoint.presentation.macroenabled.12","pptm"],["application/vnd.ms-powerpoint.slide.macroenabled.12","sldm"],["application/vnd.ms-powerpoint.slideshow.macroenabled.12","ppsm"],["application/vnd.ms-powerpoint.template.macroenabled.12","potm"],["application/vnd.ms-project","mpp"],["application/vnd.ms-word.document.macroenabled.12","docm"],["application/vnd.ms-word.template.macroenabled.12","dotm"],["application/vnd.ms-works",["wks","wcm","wdb","wps"]],["application/vnd.ms-wpl","wpl"],["application/vnd.ms-xpsdocument","xps"],["application/vnd.mseq","mseq"],["application/vnd.musician","mus"],["application/vnd.muvee.style","msty"],["application/vnd.neurolanguage.nlu","nlu"],["application/vnd.noblenet-directory","nnd"],["application/vnd.noblenet-sealer","nns"],["application/vnd.noblenet-web","nnw"],["application/vnd.nokia.configuration-message","ncm"],["application/vnd.nokia.n-gage.data","ngdat"],["application/vnd.nokia.n-gage.symbian.install","n-gage"],["application/vnd.nokia.radio-preset","rpst"],["application/vnd.nokia.radio-presets","rpss"],["application/vnd.nokia.ringing-tone","rng"],["application/vnd.novadigm.edm","edm"],["application/vnd.novadigm.edx","edx"],["application/vnd.novadigm.ext","ext"],["application/vnd.oasis.opendocument.chart","odc"],["application/vnd.oasis.opendocument.chart-template","otc"],["application/vnd.oasis.opendocument.database","odb"],["application/vnd.oasis.opendocument.formula","odf"],["application/vnd.oasis.opendocument.formula-template","odft"],["application/vnd.oasis.opendocument.graphics","odg"],["application/vnd.oasis.opendocument.graphics-template","otg"],["application/vnd.oasis.opendocument.image","odi"],["application/vnd.oasis.opendocument.image-template","oti"],["application/vnd.oasis.opendocument.presentation","odp"],["application/vnd.oasis.opendocument.presentation-template","otp"],["application/vnd.oasis.opendocument.spreadsheet","ods"],["application/vnd.oasis.opendocument.spreadsheet-template","ots"],["application/vnd.oasis.opendocument.text","odt"],["application/vnd.oasis.opendocument.text-master","odm"],["application/vnd.oasis.opendocument.text-template","ott"],["application/vnd.oasis.opendocument.text-web","oth"],["application/vnd.olpc-sugar","xo"],["application/vnd.oma.dd2+xml","dd2"],["application/vnd.openofficeorg.extension","oxt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","pptx"],["application/vnd.openxmlformats-officedocument.presentationml.slide","sldx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","ppsx"],["application/vnd.openxmlformats-officedocument.presentationml.template","potx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","xltx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","dotx"],["application/vnd.osgeo.mapguide.package","mgp"],["application/vnd.osgi.dp","dp"],["application/vnd.palm","pdb"],["application/vnd.pawaafile","paw"],["application/vnd.pg.format","str"],["application/vnd.pg.osasli","ei6"],["application/vnd.picsel","efif"],["application/vnd.pmi.widget","wg"],["application/vnd.pocketlearn","plf"],["application/vnd.powerbuilder6","pbd"],["application/vnd.previewsystems.box","box"],["application/vnd.proteus.magazine","mgz"],["application/vnd.publishare-delta-tree","qps"],["application/vnd.pvi.ptid1","ptid"],["application/vnd.quark.quarkxpress","qxd"],["application/vnd.realvnc.bed","bed"],["application/vnd.recordare.musicxml","mxl"],["application/vnd.recordare.musicxml+xml","musicxml"],["application/vnd.rig.cryptonote","cryptonote"],["application/vnd.rim.cod","cod"],["application/vnd.rn-realmedia","rm"],["application/vnd.rn-realplayer","rnx"],["application/vnd.route66.link66+xml","link66"],["application/vnd.sailingtracker.track","st"],["application/vnd.seemail","see"],["application/vnd.sema","sema"],["application/vnd.semd","semd"],["application/vnd.semf","semf"],["application/vnd.shana.informed.formdata","ifm"],["application/vnd.shana.informed.formtemplate","itp"],["application/vnd.shana.informed.interchange","iif"],["application/vnd.shana.informed.package","ipk"],["application/vnd.simtech-mindmapper","twd"],["application/vnd.smaf","mmf"],["application/vnd.smart.teacher","teacher"],["application/vnd.solent.sdkm+xml","sdkm"],["application/vnd.spotfire.dxp","dxp"],["application/vnd.spotfire.sfs","sfs"],["application/vnd.stardivision.calc","sdc"],["application/vnd.stardivision.draw","sda"],["application/vnd.stardivision.impress","sdd"],["application/vnd.stardivision.math","smf"],["application/vnd.stardivision.writer","sdw"],["application/vnd.stardivision.writer-global","sgl"],["application/vnd.stepmania.stepchart","sm"],["application/vnd.sun.xml.calc","sxc"],["application/vnd.sun.xml.calc.template","stc"],["application/vnd.sun.xml.draw","sxd"],["application/vnd.sun.xml.draw.template","std"],["application/vnd.sun.xml.impress","sxi"],["application/vnd.sun.xml.impress.template","sti"],["application/vnd.sun.xml.math","sxm"],["application/vnd.sun.xml.writer","sxw"],["application/vnd.sun.xml.writer.global","sxg"],["application/vnd.sun.xml.writer.template","stw"],["application/vnd.sus-calendar","sus"],["application/vnd.svd","svd"],["application/vnd.symbian.install","sis"],["application/vnd.syncml+xml","xsm"],["application/vnd.syncml.dm+wbxml","bdm"],["application/vnd.syncml.dm+xml","xdm"],["application/vnd.tao.intent-module-archive","tao"],["application/vnd.tmobile-livetv","tmo"],["application/vnd.trid.tpt","tpt"],["application/vnd.triscape.mxs","mxs"],["application/vnd.trueapp","tra"],["application/vnd.ufdl","ufd"],["application/vnd.uiq.theme","utz"],["application/vnd.umajin","umj"],["application/vnd.unity","unityweb"],["application/vnd.uoml+xml","uoml"],["application/vnd.vcx","vcx"],["application/vnd.visio","vsd"],["application/vnd.visionary","vis"],["application/vnd.vsf","vsf"],["application/vnd.wap.wbxml","wbxml"],["application/vnd.wap.wmlc","wmlc"],["application/vnd.wap.wmlscriptc","wmlsc"],["application/vnd.webturbo","wtb"],["application/vnd.wolfram.player","nbp"],["application/vnd.wordperfect","wpd"],["application/vnd.wqd","wqd"],["application/vnd.wt.stf","stf"],["application/vnd.xara",["web","xar"]],["application/vnd.xfdl","xfdl"],["application/vnd.yamaha.hv-dic","hvd"],["application/vnd.yamaha.hv-script","hvs"],["application/vnd.yamaha.hv-voice","hvp"],["application/vnd.yamaha.openscoreformat","osf"],["application/vnd.yamaha.openscoreformat.osfpvg+xml","osfpvg"],["application/vnd.yamaha.smaf-audio","saf"],["application/vnd.yamaha.smaf-phrase","spf"],["application/vnd.yellowriver-custom-menu","cmp"],["application/vnd.zul","zir"],["application/vnd.zzazz.deck+xml","zaz"],["application/vocaltec-media-desc","vmd"],["application/vocaltec-media-file","vmf"],["application/voicexml+xml","vxml"],["application/widget","wgt"],["application/winhlp","hlp"],["application/wordperfect",["wp","wp5","wp6","wpd"]],["application/wordperfect6.0",["w60","wp5"]],["application/wordperfect6.1","w61"],["application/wsdl+xml","wsdl"],["application/wspolicy+xml","wspolicy"],["application/x-123","wk1"],["application/x-7z-compressed","7z"],["application/x-abiword","abw"],["application/x-ace-compressed","ace"],["application/x-aim","aim"],["application/x-authorware-bin","aab"],["application/x-authorware-map","aam"],["application/x-authorware-seg","aas"],["application/x-bcpio","bcpio"],["application/x-binary","bin"],["application/x-binhex40","hqx"],["application/x-bittorrent","torrent"],["application/x-bsh",["bsh","sh","shar"]],["application/x-bytecode.elisp","elc"],["application/x-bytecode.python","pyc"],["application/x-bzip","bz"],["application/x-bzip2",["boz","bz2"]],["application/x-cdf","cdf"],["application/x-cdlink","vcd"],["application/x-chat",["cha","chat"]],["application/x-chess-pgn","pgn"],["application/x-cmu-raster","ras"],["application/x-cocoa","cco"],["application/x-compactpro","cpt"],["application/x-compress","z"],["application/x-compressed",["tgz","gz","z","zip"]],["application/x-conference","nsc"],["application/x-cpio","cpio"],["application/x-cpt","cpt"],["application/x-csh","csh"],["application/x-debian-package","deb"],["application/x-deepv","deepv"],["application/x-director",["dir","dcr","dxr"]],["application/x-doom","wad"],["application/x-dtbncx+xml","ncx"],["application/x-dtbook+xml","dtb"],["application/x-dtbresource+xml","res"],["application/x-dvi","dvi"],["application/x-elc","elc"],["application/x-envoy",["env","evy"]],["application/x-esrehber","es"],["application/x-excel",["xls","xla","xlb","xlc","xld","xlk","xll","xlm","xlt","xlv","xlw"]],["application/x-font-bdf","bdf"],["application/x-font-ghostscript","gsf"],["application/x-font-linux-psf","psf"],["application/x-font-otf","otf"],["application/x-font-pcf","pcf"],["application/x-font-snf","snf"],["application/x-font-ttf","ttf"],["application/x-font-type1","pfa"],["application/x-font-woff","woff"],["application/x-frame","mif"],["application/x-freelance","pre"],["application/x-futuresplash","spl"],["application/x-gnumeric","gnumeric"],["application/x-gsp","gsp"],["application/x-gss","gss"],["application/x-gtar","gtar"],["application/x-gzip",["gz","gzip"]],["application/x-hdf","hdf"],["application/x-helpfile",["help","hlp"]],["application/x-httpd-imap","imap"],["application/x-ima","ima"],["application/x-internet-signup",["ins","isp"]],["application/x-internett-signup","ins"],["application/x-inventor","iv"],["application/x-ip2","ip"],["application/x-iphone","iii"],["application/x-java-class","class"],["application/x-java-commerce","jcm"],["application/x-java-jnlp-file","jnlp"],["application/x-javascript","js"],["application/x-koan",["skd","skm","skp","skt"]],["application/x-ksh","ksh"],["application/x-latex",["latex","ltx"]],["application/x-lha","lha"],["application/x-lisp","lsp"],["application/x-livescreen","ivy"],["application/x-lotus","wq1"],["application/x-lotusscreencam","scm"],["application/x-lzh","lzh"],["application/x-lzx","lzx"],["application/x-mac-binhex40","hqx"],["application/x-macbinary","bin"],["application/x-magic-cap-package-1.0","mc$"],["application/x-mathcad","mcd"],["application/x-meme","mm"],["application/x-midi",["mid","midi"]],["application/x-mif","mif"],["application/x-mix-transfer","nix"],["application/x-mobipocket-ebook","prc"],["application/x-mplayer2","asx"],["application/x-ms-application","application"],["application/x-ms-wmd","wmd"],["application/x-ms-wmz","wmz"],["application/x-ms-xbap","xbap"],["application/x-msaccess","mdb"],["application/x-msbinder","obd"],["application/x-mscardfile","crd"],["application/x-msclip","clp"],["application/x-msdownload",["exe","dll"]],["application/x-msexcel",["xls","xla","xlw"]],["application/x-msmediaview",["mvb","m13","m14"]],["application/x-msmetafile","wmf"],["application/x-msmoney","mny"],["application/x-mspowerpoint","ppt"],["application/x-mspublisher","pub"],["application/x-msschedule","scd"],["application/x-msterminal","trm"],["application/x-mswrite","wri"],["application/x-navi-animation","ani"],["application/x-navidoc","nvd"],["application/x-navimap","map"],["application/x-navistyle","stl"],["application/x-netcdf",["cdf","nc"]],["application/x-newton-compatible-pkg","pkg"],["application/x-nokia-9000-communicator-add-on-software","aos"],["application/x-omc","omc"],["application/x-omcdatamaker","omcd"],["application/x-omcregerator","omcr"],["application/x-pagemaker",["pm4","pm5"]],["application/x-pcl","pcl"],["application/x-perfmon",["pma","pmc","pml","pmr","pmw"]],["application/x-pixclscript","plx"],["application/x-pkcs10","p10"],["application/x-pkcs12",["p12","pfx"]],["application/x-pkcs7-certificates",["p7b","spc"]],["application/x-pkcs7-certreqresp","p7r"],["application/x-pkcs7-mime",["p7m","p7c"]],["application/x-pkcs7-signature",["p7s","p7a"]],["application/x-pointplus","css"],["application/x-portable-anymap","pnm"],["application/x-project",["mpc","mpt","mpv","mpx"]],["application/x-qpro","wb1"],["application/x-rar-compressed","rar"],["application/x-rtf","rtf"],["application/x-sdp","sdp"],["application/x-sea","sea"],["application/x-seelogo","sl"],["application/x-sh","sh"],["application/x-shar",["shar","sh"]],["application/x-shockwave-flash","swf"],["application/x-silverlight-app","xap"],["application/x-sit","sit"],["application/x-sprite",["spr","sprite"]],["application/x-stuffit","sit"],["application/x-stuffitx","sitx"],["application/x-sv4cpio","sv4cpio"],["application/x-sv4crc","sv4crc"],["application/x-tar","tar"],["application/x-tbook",["sbk","tbk"]],["application/x-tcl","tcl"],["application/x-tex","tex"],["application/x-tex-tfm","tfm"],["application/x-texinfo",["texi","texinfo"]],["application/x-troff",["roff","t","tr"]],["application/x-troff-man","man"],["application/x-troff-me","me"],["application/x-troff-ms","ms"],["application/x-troff-msvideo","avi"],["application/x-ustar","ustar"],["application/x-visio",["vsd","vst","vsw"]],["application/x-vnd.audioexplosion.mzz","mzz"],["application/x-vnd.ls-xpix","xpix"],["application/x-vrml","vrml"],["application/x-wais-source",["src","wsrc"]],["application/x-winhelp","hlp"],["application/x-wintalk","wtk"],["application/x-world",["wrl","svr"]],["application/x-wpwin","wpd"],["application/x-wri","wri"],["application/x-x509-ca-cert",["cer","crt","der"]],["application/x-x509-user-cert","crt"],["application/x-xfig","fig"],["application/x-xpinstall","xpi"],["application/x-zip-compressed","zip"],["application/xcap-diff+xml","xdf"],["application/xenc+xml","xenc"],["application/xhtml+xml","xhtml"],["application/xml","xml"],["application/xml-dtd","dtd"],["application/xop+xml","xop"],["application/xslt+xml","xslt"],["application/xspf+xml","xspf"],["application/xv+xml","mxml"],["application/yang","yang"],["application/yin+xml","yin"],["application/ynd.ms-pkipko","pko"],["application/zip","zip"],["audio/adpcm","adp"],["audio/aiff",["aiff","aif","aifc"]],["audio/basic",["snd","au"]],["audio/it","it"],["audio/make",["funk","my","pfunk"]],["audio/make.my.funk","pfunk"],["audio/mid",["mid","rmi"]],["audio/midi",["midi","kar","mid"]],["audio/mod","mod"],["audio/mp4","mp4a"],["audio/mpeg",["mpga","mp3","m2a","mp2","mpa","mpg"]],["audio/mpeg3","mp3"],["audio/nspaudio",["la","lma"]],["audio/ogg","oga"],["audio/s3m","s3m"],["audio/tsp-audio","tsi"],["audio/tsplayer","tsp"],["audio/vnd.dece.audio","uva"],["audio/vnd.digital-winds","eol"],["audio/vnd.dra","dra"],["audio/vnd.dts","dts"],["audio/vnd.dts.hd","dtshd"],["audio/vnd.lucent.voice","lvp"],["audio/vnd.ms-playready.media.pya","pya"],["audio/vnd.nuera.ecelp4800","ecelp4800"],["audio/vnd.nuera.ecelp7470","ecelp7470"],["audio/vnd.nuera.ecelp9600","ecelp9600"],["audio/vnd.qcelp","qcp"],["audio/vnd.rip","rip"],["audio/voc","voc"],["audio/voxware","vox"],["audio/wav","wav"],["audio/webm","weba"],["audio/x-aac","aac"],["audio/x-adpcm","snd"],["audio/x-aiff",["aiff","aif","aifc"]],["audio/x-au","au"],["audio/x-gsm",["gsd","gsm"]],["audio/x-jam","jam"],["audio/x-liveaudio","lam"],["audio/x-mid",["mid","midi"]],["audio/x-midi",["midi","mid"]],["audio/x-mod","mod"],["audio/x-mpeg","mp2"],["audio/x-mpeg-3","mp3"],["audio/x-mpegurl","m3u"],["audio/x-mpequrl","m3u"],["audio/x-ms-wax","wax"],["audio/x-ms-wma","wma"],["audio/x-nspaudio",["la","lma"]],["audio/x-pn-realaudio",["ra","ram","rm","rmm","rmp"]],["audio/x-pn-realaudio-plugin",["ra","rmp","rpm"]],["audio/x-psid","sid"],["audio/x-realaudio","ra"],["audio/x-twinvq","vqf"],["audio/x-twinvq-plugin",["vqe","vql"]],["audio/x-vnd.audioexplosion.mjuicemediafile","mjf"],["audio/x-voc","voc"],["audio/x-wav","wav"],["audio/xm","xm"],["chemical/x-cdx","cdx"],["chemical/x-cif","cif"],["chemical/x-cmdf","cmdf"],["chemical/x-cml","cml"],["chemical/x-csml","csml"],["chemical/x-pdb",["pdb","xyz"]],["chemical/x-xyz","xyz"],["drawing/x-dwf","dwf"],["i-world/i-vrml","ivr"],["image/bmp",["bmp","bm"]],["image/cgm","cgm"],["image/cis-cod","cod"],["image/cmu-raster",["ras","rast"]],["image/fif","fif"],["image/florian",["flo","turbot"]],["image/g3fax","g3"],["image/gif","gif"],["image/ief",["ief","iefs"]],["image/jpeg",["jpeg","jpe","jpg","jfif","jfif-tbnl"]],["image/jutvision","jut"],["image/ktx","ktx"],["image/naplps",["nap","naplps"]],["image/pict",["pic","pict"]],["image/pipeg","jfif"],["image/pjpeg",["jfif","jpe","jpeg","jpg"]],["image/png",["png","x-png"]],["image/prs.btif","btif"],["image/svg+xml","svg"],["image/tiff",["tif","tiff"]],["image/vasa","mcf"],["image/vnd.adobe.photoshop","psd"],["image/vnd.dece.graphic","uvi"],["image/vnd.djvu","djvu"],["image/vnd.dvb.subtitle","sub"],["image/vnd.dwg",["dwg","dxf","svf"]],["image/vnd.dxf","dxf"],["image/vnd.fastbidsheet","fbs"],["image/vnd.fpx","fpx"],["image/vnd.fst","fst"],["image/vnd.fujixerox.edmics-mmr","mmr"],["image/vnd.fujixerox.edmics-rlc","rlc"],["image/vnd.ms-modi","mdi"],["image/vnd.net-fpx",["fpx","npx"]],["image/vnd.rn-realflash","rf"],["image/vnd.rn-realpix","rp"],["image/vnd.wap.wbmp","wbmp"],["image/vnd.xiff","xif"],["image/webp","webp"],["image/x-cmu-raster","ras"],["image/x-cmx","cmx"],["image/x-dwg",["dwg","dxf","svf"]],["image/x-freehand","fh"],["image/x-icon","ico"],["image/x-jg","art"],["image/x-jps","jps"],["image/x-niff",["niff","nif"]],["image/x-pcx","pcx"],["image/x-pict",["pct","pic"]],["image/x-portable-anymap","pnm"],["image/x-portable-bitmap","pbm"],["image/x-portable-graymap","pgm"],["image/x-portable-greymap","pgm"],["image/x-portable-pixmap","ppm"],["image/x-quicktime",["qif","qti","qtif"]],["image/x-rgb","rgb"],["image/x-tiff",["tif","tiff"]],["image/x-windows-bmp","bmp"],["image/x-xbitmap","xbm"],["image/x-xbm","xbm"],["image/x-xpixmap",["xpm","pm"]],["image/x-xwd","xwd"],["image/x-xwindowdump","xwd"],["image/xbm","xbm"],["image/xpm","xpm"],["message/rfc822",["eml","mht","mhtml","nws","mime"]],["model/iges",["iges","igs"]],["model/mesh","msh"],["model/vnd.collada+xml","dae"],["model/vnd.dwf","dwf"],["model/vnd.gdl","gdl"],["model/vnd.gtw","gtw"],["model/vnd.mts","mts"],["model/vnd.vtu","vtu"],["model/vrml",["vrml","wrl","wrz"]],["model/x-pov","pov"],["multipart/x-gzip","gzip"],["multipart/x-ustar","ustar"],["multipart/x-zip","zip"],["music/crescendo",["mid","midi"]],["music/x-karaoke","kar"],["paleovu/x-pv","pvu"],["text/asp","asp"],["text/calendar","ics"],["text/css","css"],["text/csv","csv"],["text/ecmascript","js"],["text/h323","323"],["text/html",["html","htm","stm","acgi","htmls","htx","shtml"]],["text/iuls","uls"],["text/javascript","js"],["text/mcf","mcf"],["text/n3","n3"],["text/pascal","pas"],["text/plain",["txt","bas","c","h","c++","cc","com","conf","cxx","def","f","f90","for","g","hh","idc","jav","java","list","log","lst","m","mar","pl","sdml","text"]],["text/plain-bas","par"],["text/prs.lines.tag","dsc"],["text/richtext",["rtx","rt","rtf"]],["text/scriplet","wsc"],["text/scriptlet","sct"],["text/sgml",["sgm","sgml"]],["text/tab-separated-values","tsv"],["text/troff","t"],["text/turtle","ttl"],["text/uri-list",["uni","unis","uri","uris"]],["text/vnd.abc","abc"],["text/vnd.curl","curl"],["text/vnd.curl.dcurl","dcurl"],["text/vnd.curl.mcurl","mcurl"],["text/vnd.curl.scurl","scurl"],["text/vnd.fly","fly"],["text/vnd.fmi.flexstor","flx"],["text/vnd.graphviz","gv"],["text/vnd.in3d.3dml","3dml"],["text/vnd.in3d.spot","spot"],["text/vnd.rn-realtext","rt"],["text/vnd.sun.j2me.app-descriptor","jad"],["text/vnd.wap.wml","wml"],["text/vnd.wap.wmlscript","wmls"],["text/webviewhtml","htt"],["text/x-asm",["asm","s"]],["text/x-audiosoft-intra","aip"],["text/x-c",["c","cc","cpp"]],["text/x-component","htc"],["text/x-fortran",["for","f","f77","f90"]],["text/x-h",["h","hh"]],["text/x-java-source",["java","jav"]],["text/x-java-source,java","java"],["text/x-la-asf","lsx"],["text/x-m","m"],["text/x-pascal","p"],["text/x-script","hlb"],["text/x-script.csh","csh"],["text/x-script.elisp","el"],["text/x-script.guile","scm"],["text/x-script.ksh","ksh"],["text/x-script.lisp","lsp"],["text/x-script.perl","pl"],["text/x-script.perl-module","pm"],["text/x-script.phyton","py"],["text/x-script.rexx","rexx"],["text/x-script.scheme","scm"],["text/x-script.sh","sh"],["text/x-script.tcl","tcl"],["text/x-script.tcsh","tcsh"],["text/x-script.zsh","zsh"],["text/x-server-parsed-html",["shtml","ssi"]],["text/x-setext","etx"],["text/x-sgml",["sgm","sgml"]],["text/x-speech",["spc","talk"]],["text/x-uil","uil"],["text/x-uuencode",["uu","uue"]],["text/x-vcalendar","vcs"],["text/x-vcard","vcf"],["text/xml","xml"],["video/3gpp","3gp"],["video/3gpp2","3g2"],["video/animaflex","afl"],["video/avi","avi"],["video/avs-video","avs"],["video/dl","dl"],["video/fli","fli"],["video/gl","gl"],["video/h261","h261"],["video/h263","h263"],["video/h264","h264"],["video/jpeg","jpgv"],["video/jpm","jpm"],["video/mj2","mj2"],["video/mp4","mp4"],["video/mpeg",["mpeg","mp2","mpa","mpe","mpg","mpv2","m1v","m2v","mp3"]],["video/msvideo","avi"],["video/ogg","ogv"],["video/quicktime",["mov","qt","moov"]],["video/vdo","vdo"],["video/vivo",["viv","vivo"]],["video/vnd.dece.hd","uvh"],["video/vnd.dece.mobile","uvm"],["video/vnd.dece.pd","uvp"],["video/vnd.dece.sd","uvs"],["video/vnd.dece.video","uvv"],["video/vnd.fvt","fvt"],["video/vnd.mpegurl","mxu"],["video/vnd.ms-playready.media.pyv","pyv"],["video/vnd.rn-realvideo","rv"],["video/vnd.uvvu.mp4","uvu"],["video/vnd.vivo",["viv","vivo"]],["video/vosaic","vos"],["video/webm","webm"],["video/x-amt-demorun","xdr"],["video/x-amt-showrun","xsr"],["video/x-atomic3d-feature","fmf"],["video/x-dl","dl"],["video/x-dv",["dif","dv"]],["video/x-f4v","f4v"],["video/x-fli","fli"],["video/x-flv","flv"],["video/x-gl","gl"],["video/x-isvideo","isu"],["video/x-la-asf",["lsf","lsx"]],["video/x-m4v","m4v"],["video/x-motion-jpeg","mjpg"],["video/x-mpeg",["mp3","mp2"]],["video/x-mpeq2a","mp2"],["video/x-ms-asf",["asf","asr","asx"]],["video/x-ms-asf-plugin","asx"],["video/x-ms-wm","wm"],["video/x-ms-wmv","wmv"],["video/x-ms-wmx","wmx"],["video/x-ms-wvx","wvx"],["video/x-msvideo","avi"],["video/x-qtc","qtc"],["video/x-scm","scm"],["video/x-sgi-movie",["movie","mv"]],["windows/metafile","wmf"],["www/mime","mime"],["x-conference/x-cooltalk","ice"],["x-music/x-midi",["mid","midi"]],["x-world/x-3dmf",["3dm","3dmf","qd3","qd3d"]],["x-world/x-svr","svr"],["x-world/x-vrml",["flr","vrml","wrl","wrz","xaf","xof"]],["x-world/x-vrt","vrt"],["xgl/drawing","xgz"],["xgl/movie","xmz"]]),i=new Map([["123","application/vnd.lotus-1-2-3"],["323","text/h323"],["*","application/octet-stream"],["3dm","x-world/x-3dmf"],["3dmf","x-world/x-3dmf"],["3dml","text/vnd.in3d.3dml"],["3g2","video/3gpp2"],["3gp","video/3gpp"],["7z","application/x-7z-compressed"],["a","application/octet-stream"],["aab","application/x-authorware-bin"],["aac","audio/x-aac"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abc","text/vnd.abc"],["abw","application/x-abiword"],["ac","application/pkix-attr-cert"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acgi","text/html"],["acu","application/vnd.acucobol"],["acx","application/internet-property-stream"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afl","video/animaflex"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/postscript"],["aif",["audio/aiff","audio/x-aiff"]],["aifc",["audio/aiff","audio/x-aiff"]],["aiff",["audio/aiff","audio/x-aiff"]],["aim","application/x-aim"],["aip","text/x-audiosoft-intra"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["ani","application/x-navi-animation"],["aos","application/x-nokia-9000-communicator-add-on-software"],["apk","application/vnd.android.package-archive"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["aps","application/mime"],["arc","application/octet-stream"],["arj",["application/arj","application/octet-stream"]],["art","image/x-jg"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asp","text/asp"],["asr","video/x-ms-asf"],["asx",["video/x-ms-asf","application/x-mplayer2","video/x-ms-asf-plugin"]],["atc","application/vnd.acucorp"],["atomcat","application/atomcat+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au",["audio/basic","audio/x-au"]],["avi",["video/avi","video/msvideo","application/x-troff-msvideo","video/x-msvideo"]],["avs","video/avs-video"],["aw","application/applixware"],["axs","application/olescript"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azw","application/vnd.amazon.ebook"],["bas","text/plain"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin",["application/octet-stream","application/mac-binary","application/macbinary","application/x-macbinary","application/x-binary"]],["bm","image/bmp"],["bmi","application/vnd.bmi"],["bmp",["image/bmp","image/x-windows-bmp"]],["boo","application/book"],["book","application/book"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bsh","application/x-bsh"],["btif","image/prs.btif"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c",["text/plain","text/x-c"]],["c++","text/plain"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["c4g","application/vnd.clonk.c4group"],["cab","application/vnd.ms-cab-compressed"],["car","application/vnd.curl.car"],["cat",["application/vnd.ms-pkiseccat","application/vnd.ms-pki.seccat"]],["cc",["text/plain","text/x-c"]],["ccad","application/clariscad"],["cco","application/x-cocoa"],["ccxml","application/ccxml+xml,"],["cdbcmsg","application/vnd.contact.cmsg"],["cdf",["application/cdf","application/x-cdf","application/x-netcdf"]],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer",["application/pkix-cert","application/x-x509-ca-cert"]],["cgm","image/cgm"],["cha","application/x-chat"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cla","application/vnd.claymore"],["class",["application/octet-stream","application/java","application/java-byte-code","application/java-vm","application/x-java-class"]],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod",["image/cis-cod","application/vnd.rim.cod"]],["com",["application/octet-stream","text/plain"]],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt",["application/mac-compactpro","application/x-compactpro","application/x-cpt"]],["crd","application/x-mscardfile"],["crl",["application/pkix-crl","application/pkcs-crl"]],["crt",["application/pkix-cert","application/x-x509-user-cert","application/x-x509-ca-cert"]],["cryptonote","application/vnd.rig.cryptonote"],["csh",["text/x-script.csh","application/x-csh"]],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["css",["text/css","application/x-pointplus"]],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxx","text/plain"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["davmount","application/davmount+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["deb","application/x-debian-package"],["deepv","application/x-deepv"],["def","text/plain"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dif","video/x-dv"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["djvu","image/vnd.djvu"],["dl",["video/dl","video/x-dl"]],["dll","application/x-msdownload"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.document.macroenabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroenabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp",["application/commonground","application/vnd.osgi.dp"]],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drw","application/drafting"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dv","video/x-dv"],["dvi","application/x-dvi"],["dwf",["model/vnd.dwf","drawing/x-dwf"]],["dwg",["application/acad","image/vnd.dwg","image/x-dwg"]],["dxf",["application/dxf","image/vnd.dwg","image/vnd.dxf","image/x-dwg"]],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["el","text/x-script.elisp"],["elc",["application/x-elc","application/x-bytecode.elisp"]],["eml","message/rfc822"],["emma","application/emma+xml"],["env","application/x-envoy"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es",["application/ecmascript","application/x-esrehber"]],["es3","application/vnd.eszigno3+xml"],["esf","application/vnd.epson.esf"],["etx","text/x-setext"],["evy",["application/envoy","application/x-envoy"]],["exe",["application/octet-stream","application/x-msdownload"]],["exi","application/exi"],["ext","application/vnd.novadigm.ext"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f",["text/plain","text/x-fortran"]],["f4v","video/x-f4v"],["f77","text/x-fortran"],["f90",["text/plain","text/x-fortran"]],["fbs","image/vnd.fastbidsheet"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fh","image/x-freehand"],["fif",["application/fractals","image/fif"]],["fig","application/x-xfig"],["fli",["video/fli","video/x-fli"]],["flo",["image/florian","application/vnd.micrografx.flo"]],["flr","x-world/x-vrml"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fmf","video/x-atomic3d-feature"],["fnc","application/vnd.frogans.fnc"],["for",["text/plain","text/x-fortran"]],["fpx",["image/vnd.fpx","image/vnd.net-fpx"]],["frl","application/freeloader"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["funk","audio/make"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g","text/plain"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gdl","model/vnd.gdl"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["gl",["video/gl","video/x-gl"]],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gph","application/vnd.flographit"],["gqf","application/vnd.grafeq"],["gram","application/srgs"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsd","audio/x-gsm"],["gsf","application/x-font-ghostscript"],["gsm","audio/x-gsm"],["gsp","application/x-gsp"],["gss","application/x-gss"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxt","application/vnd.geonext"],["gz",["application/x-gzip","application/x-compressed"]],["gzip",["multipart/x-gzip","application/x-gzip"]],["h",["text/plain","text/x-h"]],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hdf","application/x-hdf"],["help","application/x-helpfile"],["hgl","application/vnd.hp-hpgl"],["hh",["text/plain","text/x-h"]],["hlb","text/x-script"],["hlp",["application/winhlp","application/hlp","application/x-helpfile","application/x-winhelp"]],["hpg","application/vnd.hp-hpgl"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx",["application/mac-binhex40","application/binhex","application/binhex4","application/mac-binhex","application/x-binhex40","application/x-mac-binhex40"]],["hta","application/hta"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["htmls","text/html"],["htt","text/webviewhtml"],["htx","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["ico","image/x-icon"],["ics","text/calendar"],["idc","text/plain"],["ief","image/ief"],["iefs","image/ief"],["ifm","application/vnd.shana.informed.formdata"],["iges",["application/iges","model/iges"]],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs",["application/iges","model/iges"]],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["iii","application/x-iphone"],["ima","application/x-ima"],["imap","application/x-httpd-imap"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["inf","application/inf"],["ins",["application/x-internet-signup","application/x-internett-signup"]],["ip","application/x-ip2"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["isp","application/x-internet-signup"],["isu","video/x-isvideo"],["it","audio/it"],["itp","application/vnd.shana.informed.formtemplate"],["iv","application/x-inventor"],["ivp","application/vnd.immervision-ivp"],["ivr","i-world/i-vrml"],["ivu","application/vnd.immervision-ivu"],["ivy","application/x-livescreen"],["jad","text/vnd.sun.j2me.app-descriptor"],["jam",["application/vnd.jam","audio/x-jam"]],["jar","application/java-archive"],["jav",["text/plain","text/x-java-source"]],["java",["text/plain","text/x-java-source,java","text/x-java-source"]],["jcm","application/x-java-commerce"],["jfif",["image/pipeg","image/jpeg","image/pjpeg"]],["jfif-tbnl","image/jpeg"],["jisp","application/vnd.jisp"],["jlt","application/vnd.hp-jlyt"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jpe",["image/jpeg","image/pjpeg"]],["jpeg",["image/jpeg","image/pjpeg"]],["jpg",["image/jpeg","image/pjpeg"]],["jpgv","video/jpeg"],["jpm","video/jpm"],["jps","image/x-jps"],["js",["application/javascript","application/ecmascript","text/javascript","text/ecmascript","application/x-javascript"]],["json","application/json"],["jut","image/jutvision"],["kar",["audio/midi","music/x-karaoke"]],["karbon","application/vnd.kde.karbon"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["ksh",["application/x-ksh","text/x-script.ksh"]],["ksp","application/vnd.kde.kspread"],["ktx","image/ktx"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["la",["audio/nspaudio","audio/x-nspaudio"]],["lam","audio/x-liveaudio"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["lha",["application/octet-stream","application/lha","application/x-lha"]],["lhx","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["lma",["audio/nspaudio","audio/x-nspaudio"]],["log","text/plain"],["lrm","application/vnd.ms-lrm"],["lsf","video/x-la-asf"],["lsp",["application/x-lisp","text/x-script.lisp"]],["lst","text/plain"],["lsx",["video/x-la-asf","text/x-la-asf"]],["ltf","application/vnd.frogans.ltf"],["ltx","application/x-latex"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh",["application/octet-stream","application/x-lzh"]],["lzx",["application/lzx","application/octet-stream","application/x-lzx"]],["m",["text/plain","text/x-m"]],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m1v","video/mpeg"],["m21","application/mp21"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3u",["audio/x-mpegurl","audio/x-mpequrl"]],["m3u8","application/vnd.apple.mpegurl"],["m4v","video/x-m4v"],["ma","application/mathematica"],["mads","application/mads+xml"],["mag","application/vnd.ecowin.chart"],["man","application/x-troff-man"],["map","application/x-navimap"],["mar","text/plain"],["mathml","application/mathml+xml"],["mbd","application/mbedlet"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc$","application/x-magic-cap-package-1.0"],["mc1","application/vnd.medcalcdata"],["mcd",["application/mcad","application/vnd.mcd","application/x-mathcad"]],["mcf",["image/vasa","text/mcf"]],["mcp","application/netmc"],["mcurl","text/vnd.curl.mcurl"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["me","application/x-troff-me"],["meta4","application/metalink4+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mht","message/rfc822"],["mhtml","message/rfc822"],["mid",["audio/mid","audio/midi","music/crescendo","x-music/x-midi","audio/x-midi","application/x-midi","audio/x-mid"]],["midi",["audio/midi","music/crescendo","x-music/x-midi","audio/x-midi","application/x-midi","audio/x-mid"]],["mif",["application/vnd.mif","application/x-mif","application/x-frame"]],["mime",["message/rfc822","www/mime"]],["mj2","video/mj2"],["mjf","audio/x-vnd.audioexplosion.mjuicemediafile"],["mjpg","video/x-motion-jpeg"],["mlp","application/vnd.dolby.mlp"],["mm",["application/base64","application/x-meme"]],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mme","application/base64"],["mmf","application/vnd.smaf"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mny","application/x-msmoney"],["mod",["audio/mod","audio/x-mod"]],["mods","application/mods+xml"],["moov","video/quicktime"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2",["video/mpeg","audio/mpeg","video/x-mpeg","audio/x-mpeg","video/x-mpeq2a"]],["mp3",["audio/mpeg","audio/mpeg3","video/mpeg","audio/x-mpeg-3","video/x-mpeg"]],["mp4",["video/mp4","application/mp4"]],["mp4a","audio/mp4"],["mpa",["video/mpeg","audio/mpeg"]],["mpc",["application/vnd.mophun.certificate","application/x-project"]],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg",["video/mpeg","audio/mpeg"]],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/x-project"],["mpv","application/x-project"],["mpv2","video/mpeg"],["mpx","application/x-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","application/x-troff-ms"],["mscml","application/mediaservercontrol+xml"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msl","application/vnd.mobius.msl"],["msty","application/vnd.muvee.style"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musicxml","application/vnd.recordare.musicxml+xml"],["mv","video/x-sgi-movie"],["mvb","application/x-msmediaview"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["my","audio/make"],["mzz","application/x-vnd.audioexplosion.mzz"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nap","image/naplps"],["naplps","image/naplps"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncm","application/vnd.nokia.configuration-message"],["ncx","application/x-dtbncx+xml"],["ngdat","application/vnd.nokia.n-gage.data"],["nif","image/x-niff"],["niff","image/x-niff"],["nix","application/x-mix-transfer"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nvd","application/x-navidoc"],["nws","message/rfc822"],["o","application/octet-stream"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omc","application/x-omc"],["omcd","application/x-omcdatamaker"],["omcr","application/x-omcregerator"],["onetoc","application/onenote"],["opf","application/oebps-package+xml"],["org","application/vnd.lotus-organizer"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","application/x-font-otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p10",["application/pkcs10","application/x-pkcs10"]],["p12",["application/pkcs-12","application/x-pkcs12"]],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c",["application/pkcs7-mime","application/x-pkcs7-mime"]],["p7m",["application/pkcs7-mime","application/x-pkcs7-mime"]],["p7r","application/x-pkcs7-certreqresp"],["p7s",["application/pkcs7-signature","application/x-pkcs7-signature"]],["p8","application/pkcs8"],["par","text/plain-bas"],["part","application/pro_eng"],["pas","text/pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcf","application/x-font-pcf"],["pcl",["application/vnd.hp-pcl","application/x-pcl"]],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb",["application/vnd.palm","chemical/x-pdb"]],["pdf","application/pdf"],["pfa","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfunk",["audio/make","audio/make.my.funk"]],["pfx","application/x-pkcs12"],["pgm",["image/x-portable-graymap","image/x-portable-greymap"]],["pgn","application/x-chess-pgn"],["pgp","application/pgp-signature"],["pic",["image/pict","image/x-pict"]],["pict","image/pict"],["pkg","application/x-newton-compatible-pkg"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pko",["application/ynd.ms-pkipko","application/vnd.ms-pki.pko"]],["pl",["text/plain","text/x-script.perl"]],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["plx","application/x-pixclscript"],["pm",["text/x-script.perl-module","image/x-xpixmap"]],["pm4","application/x-pagemaker"],["pm5","application/x-pagemaker"],["pma","application/x-perfmon"],["pmc","application/x-perfmon"],["pml",["application/vnd.ctc-posml","application/x-perfmon"]],["pmr","application/x-perfmon"],["pmw","application/x-perfmon"],["png","image/png"],["pnm",["application/x-portable-anymap","image/x-portable-anymap"]],["portpkg","application/vnd.macports.portpkg"],["pot",["application/vnd.ms-powerpoint","application/mspowerpoint"]],["potm","application/vnd.ms-powerpoint.template.macroenabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["pov","model/x-pov"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroenabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps",["application/vnd.ms-powerpoint","application/mspowerpoint"]],["ppsm","application/vnd.ms-powerpoint.slideshow.macroenabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt",["application/vnd.ms-powerpoint","application/mspowerpoint","application/powerpoint","application/x-mspowerpoint"]],["pptm","application/vnd.ms-powerpoint.presentation.macroenabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["ppz","application/mspowerpoint"],["prc","application/x-mobipocket-ebook"],["pre",["application/vnd.lotus-freelance","application/x-freelance"]],["prf","application/pics-rules"],["prt","application/pro_eng"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd",["application/octet-stream","image/vnd.adobe.photoshop"]],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pvu","paleovu/x-pv"],["pwn","application/vnd.3m.post-it-notes"],["pwz","application/vnd.ms-powerpoint"],["py","text/x-script.phyton"],["pya","audio/vnd.ms-playready.media.pya"],["pyc","application/x-bytecode.python"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qcp","audio/vnd.qcelp"],["qd3","x-world/x-3dmf"],["qd3d","x-world/x-3dmf"],["qfx","application/vnd.intu.qfx"],["qif","image/x-quicktime"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qtc","video/x-qtc"],["qti","image/x-quicktime"],["qtif","image/x-quicktime"],["qxd","application/vnd.quark.quarkxpress"],["ra",["audio/x-realaudio","audio/x-pn-realaudio","audio/x-pn-realaudio-plugin"]],["ram","audio/x-pn-realaudio"],["rar","application/x-rar-compressed"],["ras",["image/cmu-raster","application/x-cmu-raster","image/x-cmu-raster"]],["rast","image/cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rexx","text/x-script.rexx"],["rf","image/vnd.rn-realflash"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm",["application/vnd.rn-realmedia","audio/x-pn-realaudio"]],["rmi","audio/mid"],["rmm","audio/x-pn-realaudio"],["rmp",["audio/x-pn-realaudio-plugin","audio/x-pn-realaudio"]],["rms","application/vnd.jcp.javame.midlet-rms"],["rnc","application/relax-ng-compact-syntax"],["rng",["application/ringing-tones","application/vnd.nokia.ringing-tone"]],["rnx","application/vnd.rn-realplayer"],["roff","application/x-troff"],["rp","image/vnd.rn-realpix"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsd","application/rsd+xml"],["rt",["text/richtext","text/vnd.rn-realtext"]],["rtf",["application/rtf","text/richtext","application/x-rtf"]],["rtx",["text/richtext","application/rtf"]],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["saveme","application/octet-stream"],["sbk","application/x-tbook"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm",["application/vnd.lotus-screencam","video/x-scm","text/x-script.guile","application/x-lotusscreencam","text/x-script.scheme"]],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["sct","text/scriptlet"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkm","application/vnd.solent.sdkm+xml"],["sdml","text/plain"],["sdp",["application/sdp","application/x-sdp"]],["sdr","application/sounder"],["sdw","application/vnd.stardivision.writer"],["sea",["application/sea","application/x-sea"]],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["ser","application/java-serialized-object"],["set","application/set"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sgl","application/vnd.stardivision.writer-global"],["sgm",["text/sgml","text/x-sgml"]],["sgml",["text/sgml","text/x-sgml"]],["sh",["application/x-shar","application/x-bsh","application/x-sh","text/x-script.sh"]],["shar",["application/x-bsh","application/x-shar"]],["shf","application/shf+xml"],["shtml",["text/html","text/x-server-parsed-html"]],["sid","audio/x-psid"],["sis","application/vnd.symbian.install"],["sit",["application/x-stuffit","application/x-sit"]],["sitx","application/x-stuffitx"],["skd","application/x-koan"],["skm","application/x-koan"],["skp",["application/vnd.koan","application/x-koan"]],["skt","application/x-koan"],["sl","application/x-seelogo"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi",["application/smil","application/smil+xml"]],["smil","application/smil"],["snd",["audio/basic","audio/x-adpcm"]],["snf","application/x-font-snf"],["sol","application/solids"],["spc",["text/x-speech","application/x-pkcs7-certificates"]],["spf","application/vnd.yamaha.smaf-phrase"],["spl",["application/futuresplash","application/x-futuresplash"]],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spr","application/x-sprite"],["sprite","application/x-sprite"],["src","application/x-wais-source"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssi","text/x-server-parsed-html"],["ssm","application/streamingmedia"],["ssml","application/ssml+xml"],["sst",["application/vnd.ms-pkicertstore","application/vnd.ms-pki.certstore"]],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["step","application/step"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl",["application/vnd.ms-pkistl","application/sla","application/vnd.ms-pki.stl","application/x-navistyle"]],["stm","text/html"],["stp","application/step"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["sub","image/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svf",["image/vnd.dwg","image/x-dwg"]],["svg","image/svg+xml"],["svr",["x-world/x-svr","application/x-world"]],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t",["text/troff","application/x-troff"]],["talk","text/x-speech"],["tao","application/vnd.tao.intent-module-archive"],["tar","application/x-tar"],["tbk",["application/toolbook","application/x-tbook"]],["tcap","application/vnd.3gpp2.tcap"],["tcl",["text/x-script.tcl","application/x-tcl"]],["tcsh","text/x-script.tcsh"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text",["application/plain","text/plain"]],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tgz",["application/gnutar","application/x-compressed"]],["thmx","application/vnd.ms-officetheme"],["tif",["image/tiff","image/x-tiff"]],["tiff",["image/tiff","image/x-tiff"]],["tmo","application/vnd.tmobile-livetv"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","application/x-troff"],["tra","application/vnd.trueapp"],["trm","application/x-msterminal"],["tsd","application/timestamped-data"],["tsi","audio/tsp-audio"],["tsp",["application/dsptype","audio/tsplayer"]],["tsv","text/tab-separated-values"],["ttf","application/x-font-ttf"],["ttl","text/turtle"],["turbot","image/florian"],["twd","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["ufd","application/vnd.ufdl"],["uil","text/x-uil"],["uls","text/iuls"],["umj","application/vnd.umajin"],["uni","text/uri-list"],["unis","text/uri-list"],["unityweb","application/vnd.unity"],["unv","application/i-deas"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["ustar",["application/x-ustar","multipart/x-ustar"]],["utz","application/vnd.uiq.theme"],["uu",["application/octet-stream","text/x-uuencode"]],["uue","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vda","application/vda"],["vdo","video/vdo"],["vew","application/groupwise"],["vis","application/vnd.visionary"],["viv",["video/vivo","video/vnd.vivo"]],["vivo",["video/vivo","video/vnd.vivo"]],["vmd","application/vocaltec-media-desc"],["vmf","application/vocaltec-media-file"],["voc",["audio/voc","audio/x-voc"]],["vos","video/vosaic"],["vox","audio/voxware"],["vqe","audio/x-twinvq-plugin"],["vqf","audio/x-twinvq"],["vql","audio/x-twinvq-plugin"],["vrml",["model/vrml","x-world/x-vrml","application/x-vrml"]],["vrt","x-world/x-vrt"],["vsd",["application/vnd.visio","application/x-visio"]],["vsf","application/vnd.vsf"],["vst","application/x-visio"],["vsw","application/x-visio"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w60","application/wordperfect6.0"],["w61","application/wordperfect6.1"],["w6w","application/msword"],["wad","application/x-doom"],["wav",["audio/wav","audio/x-wav"]],["wax","audio/x-ms-wax"],["wb1","application/x-qpro"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/vnd.wap.wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["web","application/vnd.xara"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wiz","application/msword"],["wk1","application/x-123"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf",["windows/metafile","application/x-msmetafile"]],["wml","text/vnd.wap.wml"],["wmlc","application/vnd.wap.wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-ms-wmz"],["woff","application/x-font-woff"],["word","application/msword"],["wp","application/wordperfect"],["wp5",["application/wordperfect","application/wordperfect6.0"]],["wp6","application/wordperfect"],["wpd",["application/wordperfect","application/vnd.wordperfect","application/x-wpwin"]],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wq1","application/x-lotus"],["wqd","application/vnd.wqd"],["wri",["application/mswrite","application/x-wri","application/x-mswrite"]],["wrl",["model/vrml","x-world/x-vrml","application/x-world"]],["wrz",["model/vrml","x-world/x-vrml"]],["wsc","text/scriplet"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wsrc","application/x-wais-source"],["wtb","application/vnd.webturbo"],["wtk","application/x-wintalk"],["wvx","video/x-ms-wvx"],["x-png","image/png"],["x3d","application/vnd.hzn-3d-crossword"],["xaf","x-world/x-vrml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm",["image/xbm","image/x-xbm","image/x-xbitmap"]],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdr","video/x-amt-demorun"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xgz","xgl/drawing"],["xhtml","application/xhtml+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xlam","application/vnd.ms-excel.addin.macroenabled.12"],["xlb",["application/excel","application/vnd.ms-excel","application/x-excel"]],["xlc",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xld",["application/excel","application/x-excel"]],["xlk",["application/excel","application/x-excel"]],["xll",["application/excel","application/vnd.ms-excel","application/x-excel"]],["xlm",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xls",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xlsb","application/vnd.ms-excel.sheet.binary.macroenabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroenabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xltm","application/vnd.ms-excel.template.macroenabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlv",["application/excel","application/x-excel"]],["xlw",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xm","audio/xm"],["xml",["application/xml","text/xml","application/atom+xml","application/rss+xml"]],["xmz","xgl/movie"],["xo","application/vnd.olpc-sugar"],["xof","x-world/x-vrml"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpix","application/x-vnd.ls-xpix"],["xpm",["image/xpm","image/x-xpixmap"]],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xsr","video/x-amt-showrun"],["xul","application/vnd.mozilla.xul+xml"],["xwd",["image/x-xwd","image/x-xwindowdump"]],["xyz",["chemical/x-xyz","chemical/x-pdb"]],["yang","application/yang"],["yin","application/yin+xml"],["z",["application/x-compressed","application/x-compress"]],["zaz","application/vnd.zzazz.deck+xml"],["zip",["application/zip","multipart/x-zip","application/x-zip-compressed","application/x-compressed"]],["zir","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zoo","application/octet-stream"],["zsh","text/x-script.zsh"]]);return mimeTypes_1={detectMimeType(n){if(!n)return t;let r=e.parse(n),o=(r.ext.substr(1)||r.name||"").split("?").shift().trim().toLowerCase(),a=t;return i.has(o)&&(a=i.get(o)),Array.isArray(a)?a[0]:a},detectExtension(e){if(!e)return"bin";let t=(e||"").toLowerCase().trim().split("/"),i=t.shift().trim(),r=t.join("/").trim();if(n.has(i+"/"+r)){let e=n.get(i+"/"+r);return Array.isArray(e)?e[0]:e}return"text"===i?"txt":"bin"}}}function requirePunycode(){if(hasRequiredPunycode)return punycode_1;hasRequiredPunycode=1;const e=2147483647,t=36,n=/^xn--/,i=/[^\0-\x7F]/,r=/[\x2E\u3002\uFF0E\uFF61]/g,o={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},a=Math.floor,s=String.fromCharCode;function c(e){throw new RangeError(o[e])}function l(e,t){const n=e.split("@");let i="";n.length>1&&(i=n[0]+"@",e=n[1]);const o=function(e,t){const n=[];let i=e.length;for(;i--;)n[i]=t(e[i]);return n}((e=e.replace(r,".")).split("."),t).join(".");return i+o}function d(e){const t=[];let n=0;const i=e.length;for(;n<i;){const r=e.charCodeAt(n++);if(r>=55296&&r<=56319&&n<i){const i=e.charCodeAt(n++);56320==(64512&i)?t.push(((1023&r)<<10)+(1023&i)+65536):(t.push(r),n--)}else t.push(r)}return t}const u=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},p=function(e,n,i){let r=0;for(e=i?a(e/700):e>>1,e+=a(e/n);e>455;r+=t)e=a(e/35);return a(r+36*e/(e+38))},m=function(n){const i=[],r=n.length;let o=0,s=128,l=72,d=n.lastIndexOf("-");d<0&&(d=0);for(let e=0;e<d;++e)n.charCodeAt(e)>=128&&c("not-basic"),i.push(n.charCodeAt(e));for(let m=d>0?d+1:0;m<r;){const d=o;for(let i=1,s=t;;s+=t){m>=r&&c("invalid-input");const d=(u=n.charCodeAt(m++))>=48&&u<58?u-48+26:u>=65&&u<91?u-65:u>=97&&u<123?u-97:t;d>=t&&c("invalid-input"),d>a((e-o)/i)&&c("overflow"),o+=d*i;const p=s<=l?1:s>=l+26?26:s-l;if(d<p)break;const h=t-p;i>a(e/h)&&c("overflow"),i*=h}const h=i.length+1;l=p(o-d,h,0==d),a(o/h)>e-s&&c("overflow"),s+=a(o/h),o%=h,i.splice(o++,0,s)}var u;return String.fromCodePoint(...i)},h=function(n){const i=[],r=(n=d(n)).length;let o=128,l=0,m=72;for(const e of n)e<128&&i.push(s(e));const h=i.length;let f=h;for(h&&i.push("-");f<r;){let r=e;for(const e of n)e>=o&&e<r&&(r=e);const d=f+1;r-o>a((e-l)/d)&&c("overflow"),l+=(r-o)*d,o=r;for(const r of n)if(r<o&&++l>e&&c("overflow"),r===o){let e=l;for(let n=t;;n+=t){const r=n<=m?1:n>=m+26?26:n-m;if(e<r)break;const o=e-r,c=t-r;i.push(s(u(r+o%c,0))),e=a(o/c)}i.push(s(u(e,0))),m=p(l,d,f===h),l=0,++f}++l,++o}return i.join("")};return punycode_1={version:"2.3.1",ucs2:{decode:d,encode:e=>String.fromCodePoint(...e)},decode:m,encode:h,toASCII:function(e){return l(e,(function(e){return i.test(e)?"xn--"+h(e):e}))},toUnicode:function(e){return l(e,(function(e){return n.test(e)?m(e.slice(4).toLowerCase()):e}))}}}function requireBase64(){if(hasRequiredBase64)return base64;hasRequiredBase64=1;const e=require$$0$4.Transform;function t(e){return"string"==typeof e&&(e=Buffer.from(e,"utf-8")),e.toString("base64")}function n(e,t){if(t=t||76,(e=(e||"").toString()).length<=t)return e;let n=[],i=0,r=1024*t;for(;i<e.length;){let o=e.substr(i,r).replace(new RegExp(".{"+t+"}","g"),"$&\r\n").trim();n.push(o),i+=r}return n.join("\r\n").trim()}return base64={encode:t,wrap:n,Encoder:class extends e{constructor(e){super(),this.options=e||{},!1!==this.options.lineLength&&(this.options.lineLength=this.options.lineLength||76),this._curLine="",this._remainingBytes=!1,this.inputBytes=0,this.outputBytes=0}_transform(e,i,r){if("buffer"!==i&&(e=Buffer.from(e,i)),!e||!e.length)return setImmediate(r);this.inputBytes+=e.length,this._remainingBytes&&this._remainingBytes.length&&(e=Buffer.concat([this._remainingBytes,e],this._remainingBytes.length+e.length),this._remainingBytes=!1),e.length%3?(this._remainingBytes=e.slice(e.length-e.length%3),e=e.slice(0,e.length-e.length%3)):this._remainingBytes=!1;let o=this._curLine+t(e);if(this.options.lineLength){o=n(o,this.options.lineLength);let e=o.lastIndexOf("\n");e<0?(this._curLine=o,o=""):e===o.length-1?this._curLine="":(this._curLine=o.substr(e+1),o=o.substr(0,e+1))}o&&(this.outputBytes+=o.length,this.push(Buffer.from(o,"ascii"))),setImmediate(r)}_flush(e){this._remainingBytes&&this._remainingBytes.length&&(this._curLine+=t(this._remainingBytes)),this._curLine&&(this._curLine=n(this._curLine,this.options.lineLength),this.outputBytes+=this._curLine.length,this.push(this._curLine,"ascii"),this._curLine=""),e()}}}}function requireQp(){if(hasRequiredQp)return qp;hasRequiredQp=1;const e=require$$0$4.Transform;function t(e){"string"==typeof e&&(e=Buffer.from(e,"utf-8"));let t,n=[[9],[10],[13],[32,60],[62,126]],r="";for(let o=0,a=e.length;o<a;o++)t=e[o],i(t,n)&&(32!==t&&9!==t||o!==a-1&&10!==e[o+1]&&13!==e[o+1])?r+=String.fromCharCode(t):r+="="+(t<16?"0":"")+t.toString(16).toUpperCase();return r}function n(e,t){if(t=t||76,(e=(e||"").toString()).length<=t)return e;let n,i,r,o=0,a=e.length,s=Math.floor(t/3),c="";for(;o<a;)if(r=e.substr(o,t),n=r.match(/\r\n/))r=r.substr(0,n.index+n[0].length),c+=r,o+=r.length;else if("\n"!==r.substr(-1))if(n=r.substr(-s).match(/\n.*?$/))r=r.substr(0,r.length-(n[0].length-1)),c+=r,o+=r.length;else{if(r.length>t-s&&(n=r.substr(-s).match(/[ \t.,!?][^ \t.,!?]*$/)))r=r.substr(0,r.length-(n[0].length-1));else if(r.match(/[=][\da-f]{0,2}$/i))for((n=r.match(/[=][\da-f]{0,1}$/i))&&(r=r.substr(0,r.length-n[0].length));r.length>3&&r.length<a-o&&!r.match(/^(?:=[\da-f]{2}){1,4}$/i)&&(n=r.match(/[=][\da-f]{2}$/gi))&&(i=parseInt(n[0].substr(1,2),16),!(i<128))&&(r=r.substr(0,r.length-3),!(i>=192)););o+r.length<a&&"\n"!==r.substr(-1)?(r.length===t&&r.match(/[=][\da-f]{2}$/i)?r=r.substr(0,r.length-3):r.length===t&&(r=r.substr(0,r.length-1)),o+=r.length,r+="=\r\n"):o+=r.length,c+=r}else c+=r,o+=r.length;return c}function i(e,t){for(let n=t.length-1;n>=0;n--)if(t[n].length){if(1===t[n].length&&e===t[n][0])return!0;if(2===t[n].length&&e>=t[n][0]&&e<=t[n][1])return!0}return!1}return qp={encode:t,wrap:n,Encoder:class extends e{constructor(e){super(),this.options=e||{},!1!==this.options.lineLength&&(this.options.lineLength=this.options.lineLength||76),this._curLine="",this.inputBytes=0,this.outputBytes=0}_transform(e,i,r){let o;if("buffer"!==i&&(e=Buffer.from(e,i)),!e||!e.length)return r();this.inputBytes+=e.length,this.options.lineLength?(o=this._curLine+t(e),o=n(o,this.options.lineLength),o=o.replace(/(^|\n)([^\n]*)$/,((e,t,n)=>(this._curLine=n,t))),o&&(this.outputBytes+=o.length,this.push(o))):(o=t(e),this.outputBytes+=o.length,this.push(o,"ascii")),r()}_flush(e){this._curLine&&(this.outputBytes+=this._curLine.length,this.push(this._curLine,"ascii")),e()}}}}function requireMimeFuncs(){if(hasRequiredMimeFuncs)return mimeFuncs;hasRequiredMimeFuncs=1;const e=requireBase64(),t=requireQp(),n=requireMimeTypes();return mimeFuncs={isPlainText:(e,t)=>"string"==typeof e&&!(t?/[\x00-\x08\x0b\x0c\x0e-\x1f"\u0080-\uFFFF]/:/[\x00-\x08\x0b\x0c\x0e-\x1f\u0080-\uFFFF]/).test(e),hasLongerLines:(e,t)=>e.length>131072||new RegExp("^.{"+(t+1)+",}","m").test(e),encodeWord(n,i,r){let o;if((r=r||0)&&r>12&&(r-=12),"Q"===(i=(i||"Q").toString().toUpperCase().trim().charAt(0))?o=t.encode(n).replace(/[^a-z0-9!*+\-/=]/gi,(e=>{let t=e.charCodeAt(0).toString(16).toUpperCase();return" "===e?"_":"="+(1===t.length?"0"+t:t)})):"B"===i&&(o="string"==typeof n?n:e.encode(n),r=r?Math.max(3,(r-r%4)/4*3):0),r&&("B"!==i?o:e.encode(n)).length>r)if("Q"===i)o=this.splitMimeEncodedString(o,r).join("?= =?UTF-8?"+i+"?");else{let t=[],n="";for(let i=0,a=o.length;i<a;i++){let s=o.charAt(i);/[\ud83c\ud83d\ud83e]/.test(s)&&i<a-1&&(s+=o.charAt(++i)),Buffer.byteLength(n+s)<=r||0===i?n+=s:(t.push(e.encode(n)),n=s)}n&&t.push(e.encode(n)),o=t.length>1?t.join("?= =?UTF-8?"+i+"?"):t.join("")}else"B"===i&&(o=e.encode(n));return"=?UTF-8?"+i+"?"+o+("?="===o.substr(-2)?"":"?=")},encodeWords(e,t,n,i){let r;n=n||0;let o=e.match(/(?:^|\s)([^\s]*["\u0080-\uFFFF])/);if(!o)return e;if(i)return this.encodeWord(e,t,n);let a=e.match(/(["\u0080-\uFFFF][^\s]*)[^"\u0080-\uFFFF]*$/);if(!a)return e;let s=o.index+(o[0].match(/[^\s]/)||{index:0}).index,c=a.index+(a[1]||"").length;return r=(s?e.substr(0,s):"")+this.encodeWord(e.substring(s,c),t||"Q",n)+(c<e.length?e.substr(c):""),r},buildHeaderValue(e){let t=[];return Object.keys(e.params||{}).forEach((n=>{let i=e.params[n];!this.isPlainText(i,!0)||i.length>=75?this.buildHeaderParam(n,i,50).forEach((e=>{/[\s"\\;:/=(),<>@[\]?]|^[-']|'$/.test(e.value)&&"*"!==e.key.substr(-1)?t.push(e.key+"="+JSON.stringify(e.value)):t.push(e.key+"="+e.value)})):/[\s'"\\;:/=(),<>@[\]?]|^-/.test(i)?t.push(n+"="+JSON.stringify(i)):t.push(n+"="+i)})),e.value+(t.length?"; "+t.join("; "):"")},buildHeaderParam(e,t,n){let i,r,o,a,s,c,l=[],d="string"==typeof t?t:(t||"").toString(),u=0;if(n=n||50,this.isPlainText(t,!0)){if(d.length<=n)return[{key:e,value:d}];d=d.replace(new RegExp(".{"+n+"}","g"),(e=>(l.push({line:e}),""))),d&&l.push({line:d})}else{if(/[\uD800-\uDBFF]/.test(d)){for(i=[],s=0,c=d.length;s<c;s++)r=d.charAt(s),o=r.charCodeAt(0),o>=55296&&o<=56319&&s<c-1?(r+=d.charAt(s+1),i.push(r),s++):i.push(r);d=i}a="utf-8''";let e=!0;for(u=0,s=0,c=d.length;s<c;s++){if(r=d[s],e)r=this.safeEncodeURIComponent(r);else if(r=" "===r?r:this.safeEncodeURIComponent(r),r!==d[s]){if(!((this.safeEncodeURIComponent(a)+r).length>=n)){e=!0,s=u,a="";continue}l.push({line:a,encoded:e}),a="",u=s-1}(a+r).length>=n?(l.push({line:a,encoded:e}),a=r=" "===d[s]?" ":this.safeEncodeURIComponent(d[s]),r===d[s]?(e=!1,u=s-1):e=!0):a+=r}a&&l.push({line:a,encoded:e})}return l.map(((t,n)=>({key:e+"*"+n+(t.encoded?"*":""),value:t.line})))},parseHeaderValue(e){let t,n={value:!1,params:{}},i=!1,r="",o="value",a=!1,s=!1;for(let c=0,l=e.length;c<l;c++)if(t=e.charAt(c),"key"===o){if("="===t){i=r.trim().toLowerCase(),o="value",r="";continue}r+=t}else{if(s)r+=t;else{if("\\"===t){s=!0;continue}a&&t===a?a=!1:a||'"'!==t?a||";"!==t?r+=t:(!1===i?n.value=r.trim():n.params[i]=r.trim(),o="key",r=""):a=t}s=!1}return"value"===o?!1===i?n.value=r.trim():n.params[i]=r.trim():r.trim()&&(n.params[r.trim().toLowerCase()]=""),Object.keys(n.params).forEach((e=>{let t,i,r,o;(r=e.match(/(\*(\d+)|\*(\d+)\*|\*)$/))&&(t=e.substr(0,r.index),i=Number(r[2]||r[3])||0,n.params[t]&&"object"==typeof n.params[t]||(n.params[t]={charset:!1,values:[]}),o=n.params[e],0===i&&"*"===r[0].substr(-1)&&(r=o.match(/^([^']*)'[^']*'(.*)$/))&&(n.params[t].charset=r[1]||"iso-8859-1",o=r[2]),n.params[t].values[i]=o,delete n.params[e])})),Object.keys(n.params).forEach((e=>{let t;n.params[e]&&Array.isArray(n.params[e].values)&&(t=n.params[e].values.map((e=>e||"")).join(""),n.params[e].charset?n.params[e]="=?"+n.params[e].charset+"?Q?"+t.replace(/[=?_\s]/g,(e=>{let t=e.charCodeAt(0).toString(16);return" "===e?"_":"%"+(t.length<2?"0":"")+t})).replace(/%/g,"=")+"?=":n.params[e]=t)})),n},detectExtension:e=>n.detectExtension(e),detectMimeType:e=>n.detectMimeType(e),foldLines(e,t,n){t=t||76;let i,r,o=0,a=(e=(e||"").toString()).length,s="";for(;o<a;){if(i=e.substr(o,t),i.length<t){s+=i;break}(r=i.match(/^[^\n\r]*(\r?\n|\r)/))?(i=r[0],s+=i,o+=i.length):((r=i.match(/(\s+)[^\s]*$/))&&r[0].length-(n?(r[1]||"").length:0)<i.length?i=i.substr(0,i.length-(r[0].length-(n?(r[1]||"").length:0))):(r=e.substr(o+i.length).match(/^[^\s]+(\s*)/))&&(i+=r[0].substr(0,r[0].length-(n?0:(r[1]||"").length))),s+=i,o+=i.length,o<a&&(s+="\r\n"))}return s},splitMimeEncodedString:(e,t)=>{let n,i,r,o,a=[];for(t=Math.max(t||0,12);e.length;){for(n=e.substr(0,t),(i=n.match(/[=][0-9A-F]?$/i))&&(n=n.substr(0,i.index)),o=!1;!o;)o=!0,(i=e.substr(n.length).match(/^[=]([0-9A-F]{2})/i))&&(r=parseInt(i[1],16),r<194&&r>127&&(n=n.substr(0,n.length-3),o=!1));n.length&&a.push(n),e=e.substr(n.length)}return a},encodeURICharComponent:e=>{let t="",n=e.charCodeAt(0).toString(16).toUpperCase();if(n.length%2&&(n="0"+n),n.length>2)for(let e=0,i=n.length/2;e<i;e++)t+="%"+n.substr(e,2);else t+="%"+n;return t},safeEncodeURIComponent(e){e=(e||"").toString();try{e=encodeURIComponent(e)}catch(t){return e.replace(/[^\x00-\x1F *'()<>@,;:\\"[\]?=\u007F-\uFFFF]+/g,"")}return e.replace(/[\x00-\x1F *'()<>@,;:\\"[\]?=\u007F-\uFFFF]/g,(e=>this.encodeURICharComponent(e)))}},mimeFuncs}function requireAddressparser(){if(hasRequiredAddressparser)return addressparser_1;hasRequiredAddressparser=1;class e{constructor(e){this.str=(e||"").toString(),this.operatorCurrent="",this.operatorExpecting="",this.node=null,this.escaped=!1,this.list=[],this.operators={'"':'"',"(":")","<":">",",":"",":":";",";":""}}tokenize(){let e=[];for(let e=0,t=this.str.length;e<t;e++){let n=this.str.charAt(e),i=e<t-1?this.str.charAt(e+1):null;this.checkChar(n,i)}return this.list.forEach((t=>{t.value=(t.value||"").toString().trim(),t.value&&e.push(t)})),e}checkChar(e,t){if(this.escaped);else{if(e===this.operatorExpecting)return this.node={type:"operator",value:e},t&&![" ","\t","\r","\n",",",";"].includes(t)&&(this.node.noBreak=!0),this.list.push(this.node),this.node=null,this.operatorExpecting="",void(this.escaped=!1);if(!this.operatorExpecting&&e in this.operators)return this.node={type:"operator",value:e},this.list.push(this.node),this.node=null,this.operatorExpecting=this.operators[e],void(this.escaped=!1);if(['"',"'"].includes(this.operatorExpecting)&&"\\"===e)return void(this.escaped=!0)}this.node||(this.node={type:"text",value:""},this.list.push(this.node)),"\n"===e&&(e=" "),(e.charCodeAt(0)>=33||[" ","\t"].includes(e))&&(this.node.value+=e),this.escaped=!1}}function t(n,i){i=i||{};let r=new e(n).tokenize(),o=[],a=[],s=[];if(r.forEach((e=>{"operator"!==e.type||","!==e.value&&";"!==e.value?a.push(e):(a.length&&o.push(a),a=[])})),a.length&&o.push(a),o.forEach((e=>{e=function(e){let n,i,r,o=!1,a="text",s=[],c={address:[],comment:[],group:[],text:[]};for(i=0,r=e.length;i<r;i++){let t=e[i],n=i?e[i-1]:null;if("operator"===t.type)switch(t.value){case"<":a="address";break;case"(":a="comment";break;case":":a="group",o=!0;break;default:a="text"}else t.value&&("address"===a&&(t.value=t.value.replace(/^[^<]*<\s*/,"")),n&&n.noBreak&&c[a].length?c[a][c[a].length-1]+=t.value:c[a].push(t.value))}if(!c.text.length&&c.comment.length&&(c.text=c.comment,c.comment=[]),o)c.text=c.text.join(" "),s.push({name:c.text||n&&n.name,group:c.group.length?t(c.group.join(",")):[]});else{if(!c.address.length&&c.text.length){for(i=c.text.length-1;i>=0;i--)if(c.text[i].match(/^[^@\s]+@[^@\s]+$/)){c.address=c.text.splice(i,1);break}let e=function(e){return c.address.length?e:(c.address=[e.trim()]," ")};if(!c.address.length)for(i=c.text.length-1;i>=0&&(c.text[i]=c.text[i].replace(/\s*\b[^@\s]+@[^\s]+\b\s*/,e).trim(),!c.address.length);i--);}if(!c.text.length&&c.comment.length&&(c.text=c.comment,c.comment=[]),c.address.length>1&&(c.text=c.text.concat(c.address.splice(1))),c.text=c.text.join(" "),c.address=c.address.join(" "),!c.address&&o)return[];n={address:c.address||c.text||"",name:c.text||c.address||""},n.address===n.name&&((n.address||"").match(/@/)?n.name="":n.address=""),s.push(n)}return s}(e),e.length&&(s=s.concat(e))})),i.flatten){let e=[],t=n=>{n.forEach((n=>{if(n.group)return t(n.group);e.push(n)}))};return t(s),e}return s}return addressparser_1=t}function requireLastNewline(){if(hasRequiredLastNewline)return lastNewline;hasRequiredLastNewline=1;const e=require$$0$4.Transform;return lastNewline=class extends e{constructor(){super(),this.lastByte=!1}_transform(e,t,n){e.length&&(this.lastByte=e[e.length-1]),this.push(e),n()}_flush(e){return 10===this.lastByte?e():13===this.lastByte?(this.push(Buffer.from("\n")),e()):(this.push(Buffer.from("\r\n")),e())}}}function requireLeWindows(){if(hasRequiredLeWindows)return leWindows;hasRequiredLeWindows=1;const e=require$$0$4.Transform;return leWindows=class extends e{constructor(e){super(e),this.options=e||{},this.lastByte=!1}_transform(e,t,n){let i,r=0;for(let t=0,n=e.length;t<n;t++)10===e[t]&&(t&&13!==e[t-1]||!t&&13!==this.lastByte)&&(t>r&&(i=e.slice(r,t),this.push(i)),this.push(Buffer.from("\r\n")),r=t+1);r&&r<e.length?(i=e.slice(r),this.push(i)):r||this.push(e),this.lastByte=e[e.length-1],n()}},leWindows}function requireLeUnix(){if(hasRequiredLeUnix)return leUnix;hasRequiredLeUnix=1;const e=require$$0$4.Transform;return leUnix=class extends e{constructor(e){super(e),this.options=e||{}}_transform(e,t,n){let i,r=0;for(let t=0,n=e.length;t<n;t++)13===e[t]&&(i=e.slice(r,t),r=t+1,this.push(i));r&&r<e.length?(i=e.slice(r),this.push(i)):r||this.push(e),n()}},leUnix}function requireMimeNode(){if(hasRequiredMimeNode)return mimeNode;hasRequiredMimeNode=1;const e=require$$2$1,t=require$$0$6,n=requirePunycode(),i=require$$0$4.PassThrough,r=requireShared(),o=requireMimeFuncs(),a=requireQp(),s=requireBase64(),c=requireAddressparser(),l=requireFetch(),d=requireLastNewline(),u=requireLeWindows(),p=requireLeUnix();class m{constructor(t,n){this.nodeCounter=0,n=n||{},this.baseBoundary=n.baseBoundary||e.randomBytes(8).toString("hex"),this.boundaryPrefix=n.boundaryPrefix||"--_NmP",this.disableFileAccess=!!n.disableFileAccess,this.disableUrlAccess=!!n.disableUrlAccess,this.normalizeHeaderKey=n.normalizeHeaderKey,this.date=new Date,this.rootNode=n.rootNode||this,this.keepBcc=!!n.keepBcc,n.filename&&(this.filename=n.filename,t||(t=o.detectMimeType(this.filename.split(".").pop()))),this.textEncoding=(n.textEncoding||"").toString().trim().charAt(0).toUpperCase(),this.parentNode=n.parentNode,this.hostname=n.hostname,this.newline=n.newline,this.childNodes=[],this._nodeId=++this.rootNode.nodeCounter,this._headers=[],this._isPlainText=!1,this._hasLongLines=!1,this._envelope=!1,this._raw=!1,this._transforms=[],this._processFuncs=[],t&&this.setHeader("Content-Type",t)}createChild(e,t){t||"object"!=typeof e||(t=e,e=void 0);let n=new m(e,t);return this.appendChild(n),n}appendChild(e){return e.rootNode!==this.rootNode&&(e.rootNode=this.rootNode,e._nodeId=++this.rootNode.nodeCounter),e.parentNode=this,this.childNodes.push(e),e}replace(e){return e===this?this:(this.parentNode.childNodes.forEach(((t,n)=>{t===this&&(e.rootNode=this.rootNode,e.parentNode=this.parentNode,e._nodeId=this._nodeId,this.rootNode=this,this.parentNode=void 0,e.parentNode.childNodes[n]=e)})),e)}remove(){if(!this.parentNode)return this;for(let e=this.parentNode.childNodes.length-1;e>=0;e--)if(this.parentNode.childNodes[e]===this)return this.parentNode.childNodes.splice(e,1),this.parentNode=void 0,this.rootNode=this,this}setHeader(e,t){let n,i=!1;if(!t&&e&&"object"==typeof e)return e.key&&"value"in e?this.setHeader(e.key,e.value):Array.isArray(e)?e.forEach((e=>{this.setHeader(e.key,e.value)})):Object.keys(e).forEach((t=>{this.setHeader(t,e[t])})),this;n={key:e=this._normalizeHeaderKey(e),value:t};for(let t=0,r=this._headers.length;t<r;t++)this._headers[t].key===e&&(i?(this._headers.splice(t,1),t--,r--):(this._headers[t]=n,i=!0));return i||this._headers.push(n),this}addHeader(e,t){return!t&&e&&"object"==typeof e?(e.key&&e.value?this.addHeader(e.key,e.value):Array.isArray(e)?e.forEach((e=>{this.addHeader(e.key,e.value)})):Object.keys(e).forEach((t=>{this.addHeader(t,e[t])})),this):Array.isArray(t)?(t.forEach((t=>{this.addHeader(e,t)})),this):(this._headers.push({key:this._normalizeHeaderKey(e),value:t}),this)}getHeader(e){e=this._normalizeHeaderKey(e);for(let t=0,n=this._headers.length;t<n;t++)if(this._headers[t].key===e)return this._headers[t].value}setContent(e){return this.content=e,"function"==typeof this.content.pipe?(this._contentErrorHandler=e=>{this.content.removeListener("error",this._contentErrorHandler),this.content=e},this.content.once("error",this._contentErrorHandler)):"string"==typeof this.content&&(this._isPlainText=o.isPlainText(this.content),this._isPlainText&&o.hasLongerLines(this.content,76)&&(this._hasLongLines=!0)),this}build(e){let t;e||(t=new Promise(((t,n)=>{e=r.callbackPromise(t,n)})));let n=this.createReadStream(),i=[],o=0,a=!1;return n.on("readable",(()=>{let e;for(;null!==(e=n.read());)i.push(e),o+=e.length})),n.once("error",(t=>{if(!a)return a=!0,e(t)})),n.once("end",(t=>{if(!a)return a=!0,t&&t.length&&(i.push(t),o+=t.length),e(null,Buffer.concat(i,o))})),t}getTransferEncoding(){let e=!1,t=(this.getHeader("Content-Type")||"").toString().toLowerCase().trim();return this.content&&(e=(this.getHeader("Content-Transfer-Encoding")||"").toString().toLowerCase().trim(),e&&["base64","quoted-printable"].includes(e)||(/^text\//i.test(t)?e=this._isPlainText&&!this._hasLongLines?"7bit":"string"==typeof this.content||this.content instanceof Buffer?"Q"===this._getTextEncoding(this.content)?"quoted-printable":"base64":"B"===this.textEncoding?"base64":"quoted-printable":/^(multipart|message)\//i.test(t)||(e=e||"base64"))),e}buildHeaders(){let e=this.getTransferEncoding(),t=[];if(e&&this.setHeader("Content-Transfer-Encoding",e),this.filename&&!this.getHeader("Content-Disposition")&&this.setHeader("Content-Disposition","attachment"),this.rootNode===this){this.getHeader("Date")||this.setHeader("Date",this.date.toUTCString().replace(/GMT/,"+0000")),this.messageId(),this.getHeader("MIME-Version")||this.setHeader("MIME-Version","1.0");for(let e=this._headers.length-2;e>=0;e--){let t=this._headers[e];"Content-Type"===t.key&&(this._headers.splice(e,1),this._headers.push(t))}}return this._headers.forEach((e=>{let n,i,r=e.key,a=e.value,s={};if(!a||"object"!=typeof a||["From","Sender","To","Cc","Bcc","Reply-To","Date","References"].includes(r)||(Object.keys(a).forEach((e=>{"value"!==e&&(s[e]=a[e])})),a=(a.value||"").toString(),a.trim()))if(s.prepared)s.foldLines?t.push(o.foldLines(r+": "+a)):t.push(r+": "+a);else{switch(e.key){case"Content-Disposition":n=o.parseHeaderValue(a),this.filename&&(n.params.filename=this.filename),a=o.buildHeaderValue(n);break;case"Content-Type":n=o.parseHeaderValue(a),this._handleContentType(n),n.value.match(/^text\/plain\b/)&&"string"==typeof this.content&&/[\u0080-\uFFFF]/.test(this.content)&&(n.params.charset="utf-8"),a=o.buildHeaderValue(n),this.filename&&(i=this._encodeWords(this.filename),(i!==this.filename||/[\s'"\\;:/=(),<>@[\]?]|^-/.test(i))&&(i='"'+i+'"'),a+="; name="+i);break;case"Bcc":if(!this.keepBcc)return}if(a=this._encodeHeaderValue(r,a),(a||"").toString().trim()){if("function"==typeof this.normalizeHeaderKey){let e=this.normalizeHeaderKey(r,a);e&&"string"==typeof e&&e.length&&(r=e)}t.push(o.foldLines(r+": "+a,76))}}})),t.join("\r\n")}createReadStream(e){let t,n=new i(e=e||{}),r=n;this.stream(n,e,(e=>{e?r.emit("error",e):n.end()}));for(let e=0,n=this._transforms.length;e<n;e++)t="function"==typeof this._transforms[e]?this._transforms[e]():this._transforms[e],r.once("error",(e=>{t.emit("error",e)})),r=r.pipe(t);t=new d,r.once("error",(e=>{t.emit("error",e)})),r=r.pipe(t);for(let e=0,n=this._processFuncs.length;e<n;e++)t=this._processFuncs[e],r=t(r);if(this.newline){const e=["win","windows","dos","\r\n"].includes(this.newline.toString().toLowerCase())?new u:new p,t=r.pipe(e);return r.on("error",(e=>t.emit("error",e))),t}return r}transform(e){this._transforms.push(e)}processFunc(e){this._processFuncs.push(e)}stream(e,t,n){let i,r,o=this.getTransferEncoding(),c=!1,l=e=>{c||(c=!0,n(e))},d=()=>{let n=0,i=()=>{if(n>=this.childNodes.length)return e.write("\r\n--"+this.boundary+"--\r\n"),l();let r=this.childNodes[n++];e.write((n>1?"\r\n":"")+"--"+this.boundary+"\r\n"),r.stream(e,t,(e=>{if(e)return l(e);setImmediate(i)}))};if(!this.multipart)return l();setImmediate(i)},u=()=>{if(!this.content)return setImmediate(d);{if("[object Error]"===Object.prototype.toString.call(this.content))return l(this.content);"function"==typeof this.content.pipe&&(this.content.removeListener("error",this._contentErrorHandler),this._contentErrorHandler=e=>l(e),this.content.once("error",this._contentErrorHandler));let n=()=>{["quoted-printable","base64"].includes(o)?(i=new("base64"===o?s:a).Encoder(t),i.pipe(e,{end:!1}),i.once("end",d),i.once("error",(e=>l(e))),r=this._getStream(this.content),r.pipe(i)):(r=this._getStream(this.content),r.pipe(e,{end:!1}),r.once("end",d)),r.once("error",(e=>l(e)))};if(this.content._resolve){let e=[],t=0,i=!1,r=this._getStream(this.content);r.on("error",(e=>{i||(i=!0,l(e))})),r.on("readable",(()=>{let n;for(;null!==(n=r.read());)e.push(n),t+=n.length})),r.on("end",(()=>{i||(i=!0,this.content._resolve=!1,this.content._resolvedValue=Buffer.concat(e,t),setImmediate(n))}))}else setImmediate(n)}};this._raw?setImmediate((()=>{if("[object Error]"===Object.prototype.toString.call(this._raw))return l(this._raw);"function"==typeof this._raw.pipe&&this._raw.removeListener("error",this._contentErrorHandler);let t=this._getStream(this._raw);t.pipe(e,{end:!1}),t.on("error",(t=>e.emit("error",t))),t.on("end",d)})):(e.write(this.buildHeaders()+"\r\n\r\n"),setImmediate(u))}setEnvelope(e){let t;this._envelope={from:!1,to:[]},e.from&&(t=[],this._convertAddresses(this._parseAddresses(e.from),t),t=t.filter((e=>e&&e.address)),t.length&&t[0]&&(this._envelope.from=t[0].address)),["to","cc","bcc"].forEach((t=>{e[t]&&this._convertAddresses(this._parseAddresses(e[t]),this._envelope.to)})),this._envelope.to=this._envelope.to.map((e=>e.address)).filter((e=>e));let n=["to","cc","bcc","from"];return Object.keys(e).forEach((t=>{n.includes(t)||(this._envelope[t]=e[t])})),this}getAddresses(){let e={};return this._headers.forEach((t=>{let n=t.key.toLowerCase();["from","sender","reply-to","to","cc","bcc"].includes(n)&&(Array.isArray(e[n])||(e[n]=[]),this._convertAddresses(this._parseAddresses(t.value),e[n]))})),e}getEnvelope(){if(this._envelope)return this._envelope;let e={from:!1,to:[]};return this._headers.forEach((t=>{let n=[];"From"===t.key||!e.from&&["Reply-To","Sender"].includes(t.key)?(this._convertAddresses(this._parseAddresses(t.value),n),n.length&&n[0]&&(e.from=n[0].address)):["To","Cc","Bcc"].includes(t.key)&&this._convertAddresses(this._parseAddresses(t.value),e.to)})),e.to=e.to.map((e=>e.address)),e}messageId(){let e=this.getHeader("Message-ID");return e||(e=this._generateMessageId(),this.setHeader("Message-ID",e)),e}setRaw(e){return this._raw=e,this._raw&&"function"==typeof this._raw.pipe&&(this._contentErrorHandler=e=>{this._raw.removeListener("error",this._contentErrorHandler),this._raw=e},this._raw.once("error",this._contentErrorHandler)),this}_getStream(e){let n;return e._resolvedValue?(n=new i,setImmediate((()=>{try{n.end(e._resolvedValue)}catch(e){n.emit("error",e)}})),n):"function"==typeof e.pipe?e:e&&"string"==typeof e.path&&!e.href?this.disableFileAccess?(n=new i,setImmediate((()=>n.emit("error",new Error("File access rejected for "+e.path)))),n):t.createReadStream(e.path):e&&"string"==typeof e.href?this.disableUrlAccess?(n=new i,setImmediate((()=>n.emit("error",new Error("Url access rejected for "+e.href)))),n):l(e.href,{headers:e.httpHeaders}):(n=new i,setImmediate((()=>{try{n.end(e||"")}catch(e){n.emit("error",e)}})),n)}_parseAddresses(e){return[].concat.apply([],[].concat(e).map((e=>e&&e.address?(e.address=this._normalizeAddress(e.address),e.name=e.name||"",[e]):c(e))))}_normalizeHeaderKey(e){return e=(e||"").toString().replace(/\r?\n|\r/g," ").trim().toLowerCase().replace(/^X-SMTPAPI$|^(MIME|DKIM|ARC|BIMI)\b|^[a-z]|-(SPF|FBL|ID|MD5)$|-[a-z]/gi,(e=>e.toUpperCase())).replace(/^Content-Features$/i,"Content-features"),e}_handleContentType(e){this.contentType=e.value.trim().toLowerCase(),this.multipart=!!/^multipart\//i.test(this.contentType)&&this.contentType.substr(this.contentType.indexOf("/")+1),this.multipart?this.boundary=e.params.boundary=e.params.boundary||this.boundary||this._generateBoundary():this.boundary=!1}_generateBoundary(){return this.rootNode.boundaryPrefix+"-"+this.rootNode.baseBoundary+"-Part_"+this._nodeId}_encodeHeaderValue(e,t){switch(e=this._normalizeHeaderKey(e)){case"From":case"Sender":case"To":case"Cc":case"Bcc":case"Reply-To":return this._convertAddresses(this._parseAddresses(t));case"Message-ID":case"In-Reply-To":case"Content-Id":return"<"!==(t=(t||"").toString().replace(/\r?\n|\r/g," ")).charAt(0)&&(t="<"+t),">"!==t.charAt(t.length-1)&&(t+=">"),t;case"References":return(t=[].concat.apply([],[].concat(t||"").map((e=>(e=(e||"").toString().replace(/\r?\n|\r/g," ").trim()).replace(/<[^>]*>/g,(e=>e.replace(/\s/g,""))).split(/\s+/)))).map((e=>("<"!==e.charAt(0)&&(e="<"+e),">"!==e.charAt(e.length-1)&&(e+=">"),e)))).join(" ").trim();case"Date":return"[object Date]"===Object.prototype.toString.call(t)?t.toUTCString().replace(/GMT/,"+0000"):(t=(t||"").toString().replace(/\r?\n|\r/g," "),this._encodeWords(t));case"Content-Type":case"Content-Disposition":return(t||"").toString().replace(/\r?\n|\r/g," ");default:return t=(t||"").toString().replace(/\r?\n|\r/g," "),this._encodeWords(t)}}_convertAddresses(e,t){let n=[];return t=t||[],[].concat(e||[]).forEach((e=>{if(e.address)e.address=this._normalizeAddress(e.address),e.name?e.name&&n.push(`${this._encodeAddressName(e.name)} <${e.address}>`):n.push(e.address.indexOf(" ")>=0?`<${e.address}>`:`${e.address}`),e.address&&(t.filter((t=>t.address===e.address)).length||t.push(e));else if(e.group){let i=(e.group.length?this._convertAddresses(e.group,t):"").trim();n.push(`${this._encodeAddressName(e.name)}:${i};`)}})),n.join(", ")}_normalizeAddress(e){let t=(e=(e||"").toString().replace(/[\x00-\x1F<>]+/g," ").trim()).lastIndexOf("@");if(t<0)return e;let i,r=e.substr(0,t),o=e.substr(t+1);try{i=n.toASCII(o.toLowerCase())}catch(e){}return r.indexOf(" ")>=0&&('"'!==r.charAt(0)&&(r='"'+r),'"'!==r.substr(-1)&&(r+='"')),`${r}@${i}`}_encodeAddressName(e){return/^[\w ]*$/.test(e)?e:/^[\x20-\x7e]*$/.test(e)?'"'+e.replace(/([\\"])/g,"\\$1")+'"':o.encodeWord(e,this._getTextEncoding(e),52)}_encodeWords(e){return o.encodeWords(e,this._getTextEncoding(e),52,!0)}_getTextEncoding(e){e=(e||"").toString();let t,n,i=this.textEncoding;return i||(n=(e.match(/[\x00-\x08\x0B\x0C\x0E-\x1F\u0080-\uFFFF]/g)||[]).length,t=(e.match(/[a-z]/gi)||[]).length,i=n<t?"Q":"B"),i}_generateMessageId(){return"<"+[2,2,2,6].reduce(((t,n)=>t+"-"+e.randomBytes(n).toString("hex")),e.randomBytes(4).toString("hex"))+"@"+(this.getEnvelope().from||this.hostname||"localhost").split("@").pop()+">"}}return mimeNode=m}function requireMailComposer(){if(hasRequiredMailComposer)return mailComposer;hasRequiredMailComposer=1;const e=requireMimeNode(),t=requireMimeFuncs(),n=requireShared().parseDataURI;return mailComposer=class{constructor(e){this.mail=e||{},this.message=!1}compile(){return this._alternatives=this.getAlternatives(),this._htmlNode=this._alternatives.filter((e=>/^text\/html\b/i.test(e.contentType))).pop(),this._attachments=this.getAttachments(!!this._htmlNode),this._useRelated=!(!this._htmlNode||!this._attachments.related.length),this._useAlternative=this._alternatives.length>1,this._useMixed=this._attachments.attached.length>1||this._alternatives.length&&1===this._attachments.attached.length,this.mail.raw?this.message=new e("message/rfc822",{newline:this.mail.newline}).setRaw(this.mail.raw):this._useMixed?this.message=this._createMixed():this._useAlternative?this.message=this._createAlternative():this._useRelated?this.message=this._createRelated():this.message=this._createContentNode(!1,[].concat(this._alternatives||[]).concat(this._attachments.attached||[]).shift()||{contentType:"text/plain",content:""}),this.mail.headers&&this.message.addHeader(this.mail.headers),["from","sender","to","cc","bcc","reply-to","in-reply-to","references","subject","message-id","date"].forEach((e=>{let t=e.replace(/-(\w)/g,((e,t)=>t.toUpperCase()));this.mail[t]&&this.message.setHeader(e,this.mail[t])})),this.mail.envelope&&this.message.setEnvelope(this.mail.envelope),this.message.messageId(),this.message}getAttachments(e){let n,i,r=[].concat(this.mail.attachments||[]).map(((e,n)=>{let i,r=/^message\//i.test(e.contentType);/^data:/i.test(e.path||e.href)&&(e=this._processDataUrl(e));let o=e.contentType||t.detectMimeType(e.filename||e.path||e.href||"bin"),a=/^image\//i.test(o);return i={contentType:o,contentDisposition:e.contentDisposition||(r||a&&e.cid?"inline":"attachment"),contentTransferEncoding:"contentTransferEncoding"in e?e.contentTransferEncoding:"base64"},e.filename?i.filename=e.filename:r||!1===e.filename||(i.filename=(e.path||e.href||"").split("/").pop().split("?").shift()||"attachment-"+(n+1),i.filename.indexOf(".")<0&&(i.filename+="."+t.detectExtension(i.contentType))),/^https?:\/\//i.test(e.path)&&(e.href=e.path,e.path=void 0),e.cid&&(i.cid=e.cid),e.raw?i.raw=e.raw:e.path?i.content={path:e.path}:e.href?i.content={href:e.href,httpHeaders:e.httpHeaders}:i.content=e.content||"",e.encoding&&(i.encoding=e.encoding),e.headers&&(i.headers=e.headers),i}));return this.mail.icalEvent&&(n="object"==typeof this.mail.icalEvent&&(this.mail.icalEvent.content||this.mail.icalEvent.path||this.mail.icalEvent.href||this.mail.icalEvent.raw)?this.mail.icalEvent:{content:this.mail.icalEvent},i={},Object.keys(n).forEach((e=>{i[e]=n[e]})),i.contentType="application/ics",i.headers||(i.headers={}),i.filename=i.filename||"invite.ics",i.headers["Content-Disposition"]="attachment",i.headers["Content-Transfer-Encoding"]="base64"),e?{attached:r.filter((e=>!e.cid)).concat(i||[]),related:r.filter((e=>!!e.cid))}:{attached:r.concat(i||[]),related:[]}}getAlternatives(){let e,n,i,r,o,a,s=[];return this.mail.text&&(e="object"==typeof this.mail.text&&(this.mail.text.content||this.mail.text.path||this.mail.text.href||this.mail.text.raw)?this.mail.text:{content:this.mail.text},e.contentType="text/plain; charset=utf-8"),this.mail.watchHtml&&(i="object"==typeof this.mail.watchHtml&&(this.mail.watchHtml.content||this.mail.watchHtml.path||this.mail.watchHtml.href||this.mail.watchHtml.raw)?this.mail.watchHtml:{content:this.mail.watchHtml},i.contentType="text/watch-html; charset=utf-8"),this.mail.amp&&(r="object"==typeof this.mail.amp&&(this.mail.amp.content||this.mail.amp.path||this.mail.amp.href||this.mail.amp.raw)?this.mail.amp:{content:this.mail.amp},r.contentType="text/x-amp-html; charset=utf-8"),this.mail.icalEvent&&(o="object"==typeof this.mail.icalEvent&&(this.mail.icalEvent.content||this.mail.icalEvent.path||this.mail.icalEvent.href||this.mail.icalEvent.raw)?this.mail.icalEvent:{content:this.mail.icalEvent},a={},Object.keys(o).forEach((e=>{a[e]=o[e]})),a.content&&"object"==typeof a.content&&(a.content._resolve=!0),a.filename=!1,a.contentType="text/calendar; charset=utf-8; method="+(a.method||"PUBLISH").toString().trim().toUpperCase(),a.headers||(a.headers={})),this.mail.html&&(n="object"==typeof this.mail.html&&(this.mail.html.content||this.mail.html.path||this.mail.html.href||this.mail.html.raw)?this.mail.html:{content:this.mail.html},n.contentType="text/html; charset=utf-8"),[].concat(e||[]).concat(i||[]).concat(r||[]).concat(n||[]).concat(a||[]).concat(this.mail.alternatives||[]).forEach((e=>{let n;/^data:/i.test(e.path||e.href)&&(e=this._processDataUrl(e)),n={contentType:e.contentType||t.detectMimeType(e.filename||e.path||e.href||"txt"),contentTransferEncoding:e.contentTransferEncoding},e.filename&&(n.filename=e.filename),/^https?:\/\//i.test(e.path)&&(e.href=e.path,e.path=void 0),e.raw?n.raw=e.raw:e.path?n.content={path:e.path}:e.href?n.content={href:e.href}:n.content=e.content||"",e.encoding&&(n.encoding=e.encoding),e.headers&&(n.headers=e.headers),s.push(n)})),s}_createMixed(t){let n;return n=t?t.createChild("multipart/mixed",{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e("multipart/mixed",{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),this._useAlternative?this._createAlternative(n):this._useRelated&&this._createRelated(n),[].concat(!this._useAlternative&&this._alternatives||[]).concat(this._attachments.attached||[]).forEach((e=>{this._useRelated&&e===this._htmlNode||this._createContentNode(n,e)})),n}_createAlternative(t){let n;return n=t?t.createChild("multipart/alternative",{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e("multipart/alternative",{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),this._alternatives.forEach((e=>{this._useRelated&&this._htmlNode===e?this._createRelated(n):this._createContentNode(n,e)})),n}_createRelated(t){let n;return n=t?t.createChild('multipart/related; type="text/html"',{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e('multipart/related; type="text/html"',{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),this._createContentNode(n,this._htmlNode),this._attachments.related.forEach((e=>this._createContentNode(n,e))),n}_createContentNode(t,n){let i;(n=n||{}).content=n.content||"";let r=(n.encoding||"utf8").toString().toLowerCase().replace(/[-_\s]/g,"");return i=t?t.createChild(n.contentType,{filename:n.filename,textEncoding:this.mail.textEncoding,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e(n.contentType,{filename:n.filename,baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),n.headers&&i.addHeader(n.headers),n.cid&&i.setHeader("Content-Id","<"+n.cid.replace(/[<>]/g,"")+">"),n.contentTransferEncoding?i.setHeader("Content-Transfer-Encoding",n.contentTransferEncoding):this.mail.encoding&&/^text\//i.test(n.contentType)&&i.setHeader("Content-Transfer-Encoding",this.mail.encoding),/^text\//i.test(n.contentType)&&!n.contentDisposition||i.setHeader("Content-Disposition",n.contentDisposition||(n.cid&&/^image\//i.test(n.contentType)?"inline":"attachment")),"string"!=typeof n.content||["utf8","usascii","ascii"].includes(r)||(n.content=Buffer.from(n.content,r)),n.raw?i.setRaw(n.raw):i.setContent(n.content),i}_processDataUrl(e){let t;return(e.path||e.href).match(/^data:/)&&(t=n(e.path||e.href)),t?(e.content=t.data,e.contentType=e.contentType||t.contentType,"path"in e&&(e.path=!1),"href"in e&&(e.href=!1),e):e}},mailComposer}function requireMessageParser(){if(hasRequiredMessageParser)return messageParser;hasRequiredMessageParser=1;const e=require$$0$4.Transform;return messageParser=class extends e{constructor(e){super(e),this.lastBytes=Buffer.alloc(4),this.headersParsed=!1,this.headerBytes=0,this.headerChunks=[],this.rawHeaders=!1,this.bodySize=0}updateLastBytes(e){let t=this.lastBytes.length,n=Math.min(e.length,t);for(let e=0,i=t-n;e<i;e++)this.lastBytes[e]=this.lastBytes[e+n];for(let i=1;i<=n;i++)this.lastBytes[t-i]=e[e.length-i]}checkHeaders(e){if(this.headersParsed)return!0;let t=this.lastBytes.length,n=0;this.curLinePos=0;for(let i=0,r=this.lastBytes.length+e.length;i<r;i++){let r;if(r=i<t?this.lastBytes[i]:e[i-t],10===r&&i){let r=i-1<t?this.lastBytes[i-1]:e[i-1-t],o=i>1&&(i-2<t?this.lastBytes[i-2]:e[i-2-t]);if(10===r){this.headersParsed=!0,n=i-t+1,this.headerBytes+=n;break}if(13===r&&10===o){this.headersParsed=!0,n=i-t+1,this.headerBytes+=n;break}}}if(this.headersParsed){if(this.headerChunks.push(e.slice(0,n)),this.rawHeaders=Buffer.concat(this.headerChunks,this.headerBytes),this.headerChunks=null,this.emit("headers",this.parseHeaders()),e.length-1>n){let t=e.slice(n);this.bodySize+=t.length,setImmediate((()=>this.push(t)))}return!1}return this.headerBytes+=e.length,this.headerChunks.push(e),this.updateLastBytes(e),!1}_transform(e,t,n){if(!e||!e.length)return n();let i;"string"==typeof e&&(e=Buffer.from(e,t));try{i=this.checkHeaders(e)}catch(e){return n(e)}i&&(this.bodySize+=e.length,this.push(e)),setImmediate(n)}_flush(e){if(this.headerChunks){let e=Buffer.concat(this.headerChunks,this.headerBytes);this.bodySize+=e.length,this.push(e),this.headerChunks=null}e()}parseHeaders(){let e=(this.rawHeaders||"").toString().split(/\r?\n/);for(let t=e.length-1;t>0;t--)/^\s/.test(e[t])&&(e[t-1]+="\n"+e[t],e.splice(t,1));return e.filter((e=>e.trim())).map((e=>({key:e.substr(0,e.indexOf(":")).trim().toLowerCase(),line:e})))}},messageParser}function requireRelaxedBody(){if(hasRequiredRelaxedBody)return relaxedBody;hasRequiredRelaxedBody=1;const e=require$$0$4.Transform,t=require$$2$1;return relaxedBody=class extends e{constructor(e){super(),e=e||{},this.chunkBuffer=[],this.chunkBufferLen=0,this.bodyHash=t.createHash(e.hashAlgo||"sha1"),this.remainder="",this.byteLength=0,this.debug=e.debug,this._debugBody=!!e.debug&&[]}updateHash(e){let t,n="",i="file";for(let t=e.length-1;t>=0;t--){let r=e[t];if("file"!==i||10!==r&&13!==r)if("file"!==i||9!==r&&32!==r)if("line"!==i||9!==r&&32!==r){if(("file"===i||"line"===i)&&(i="body",t===e.length-1))break}else;else i="line";else;if(0===t){if("file"===i&&(!this.remainder||/[\r\n]$/.test(this.remainder))||"line"===i&&(!this.remainder||/[ \t]$/.test(this.remainder)))return void(this.remainder+=e.toString("binary"));if("line"===i||"file"===i){n=e.toString("binary"),e=!1;break}}if("body"===i){n=e.slice(t+1).toString("binary"),e=e.slice(0,t+1);break}}let r=!!this.remainder;if(e&&!r)for(let t=0,n=e.length;t<n;t++){if(t&&10===e[t]&&13!==e[t-1]){r=!0;break}if(t&&13===e[t]&&32===e[t-1]){r=!0;break}if(t&&32===e[t]&&32===e[t-1]){r=!0;break}if(9===e[t]){r=!0;break}}r?(t=this.remainder+(e?e.toString("binary"):""),this.remainder=n,t=t.replace(/\r?\n/g,"\n").replace(/[ \t]*$/gm,"").replace(/[ \t]+/gm," ").replace(/\n/g,"\r\n"),e=Buffer.from(t,"binary")):n&&(this.remainder=n),this.debug&&this._debugBody.push(e),this.bodyHash.update(e)}_transform(e,t,n){if(!e||!e.length)return n();"string"==typeof e&&(e=Buffer.from(e,t)),this.updateHash(e),this.byteLength+=e.length,this.push(e),n()}_flush(e){/[\r\n]$/.test(this.remainder)&&this.byteLength>2&&this.bodyHash.update(Buffer.from("\r\n")),this.byteLength||this.push(Buffer.from("\r\n")),this.emit("hash",this.bodyHash.digest("base64"),!!this.debug&&Buffer.concat(this._debugBody)),e()}},relaxedBody}var sign={exports:{}},hasRequiredSign,dkim,hasRequiredDkim,httpProxyClient_1,hasRequiredHttpProxyClient,mailMessage,hasRequiredMailMessage,mailer,hasRequiredMailer,dataStream,hasRequiredDataStream,smtpConnection,hasRequiredSmtpConnection,xoauth2,hasRequiredXoauth2,poolResource,hasRequiredPoolResource;function requireSign(){if(hasRequiredSign)return sign.exports;hasRequiredSign=1;const e=requirePunycode(),t=requireMimeFuncs(),n=require$$2$1;function i(e,t,n){let i=new Set,o=new Set,a=new Map;(n||"").toLowerCase().split(":").forEach((e=>{o.add(e.trim())})),(t||"").toLowerCase().split(":").filter((e=>!o.has(e.trim()))).forEach((e=>{i.add(e.trim())}));for(let t=e.length-1;t>=0;t--){let n=e[t];i.has(n.key)&&!a.has(n.key)&&a.set(n.key,r(n.line))}let s=[],c=[];return i.forEach((e=>{a.has(e)&&(c.push(e),s.push(e+":"+a.get(e)))})),{headers:s.join("\r\n")+"\r\n",fieldNames:c.join(":")}}function r(e){return e.substr(e.indexOf(":")+1).replace(/\r?\n/g,"").replace(/\s+/g," ").trim()}return sign.exports=(o,a,s,c)=>{let l,d,u=i(o,(c=c||{}).headerFieldNames||"From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive",c.skipFields),p=function(n,i,r,o,a){let s=["v=1","a=rsa-"+o,"c=relaxed/relaxed","d="+e.toASCII(n),"q=dns/txt","s="+i,"bh="+a,"h="+r].join("; ");return t.foldLines("DKIM-Signature: "+s,76)+";\r\n b="}(c.domainName,c.keySelector,u.fieldNames,a,s);u.headers+="dkim-signature:"+r(p),l=n.createSign(("rsa-"+a).toUpperCase()),l.update(u.headers);try{d=l.sign(c.privateKey,"base64")}catch(e){return!1}return p+d.replace(/(^.{73}|.{75}(?!\r?\n|\r))/g,"$&\r\n ").trim()},sign.exports.relaxedHeaders=i,sign.exports}function requireDkim(){if(hasRequiredDkim)return dkim;hasRequiredDkim=1;const e=requireMessageParser(),t=requireRelaxedBody(),n=requireSign(),i=require$$0$4.PassThrough,r=require$$0$6,o=require$$0$9,a=require$$2$1;class s{constructor(e,t,n,i){this.options=e||{},this.keys=t,this.cacheTreshold=Number(this.options.cacheTreshold)||131072,this.hashAlgo=this.options.hashAlgo||"sha256",this.cacheDir=this.options.cacheDir||!1,this.chunks=[],this.chunklen=0,this.readPos=0,this.cachePath=!!this.cacheDir&&o.join(this.cacheDir,"message."+Date.now()+"-"+a.randomBytes(14).toString("hex")),this.cache=!1,this.headers=!1,this.bodyHash=!1,this.parser=!1,this.relaxedBody=!1,this.input=n,this.output=i,this.output.usingCache=!1,this.hasErrored=!1,this.input.on("error",(e=>{this.hasErrored=!0,this.cleanup(),i.emit("error",e)}))}cleanup(){this.cache&&this.cachePath&&r.unlink(this.cachePath,(()=>!1))}createReadCache(){this.cache=r.createReadStream(this.cachePath),this.cache.once("error",(e=>{this.cleanup(),this.output.emit("error",e)})),this.cache.once("close",(()=>{this.cleanup()})),this.cache.pipe(this.output)}sendNextChunk(){if(this.hasErrored)return;if(this.readPos>=this.chunks.length)return this.cache?this.createReadCache():this.output.end();let e=this.chunks[this.readPos++];if(!1===this.output.write(e))return this.output.once("drain",(()=>{this.sendNextChunk()}));setImmediate((()=>this.sendNextChunk()))}sendSignedOutput(){let e=0,t=()=>{if(e>=this.keys.length)return this.output.write(this.parser.rawHeaders),setImmediate((()=>this.sendNextChunk()));let i=this.keys[e++],r=n(this.headers,this.hashAlgo,this.bodyHash,{domainName:i.domainName,keySelector:i.keySelector,privateKey:i.privateKey,headerFieldNames:this.options.headerFieldNames,skipFields:this.options.skipFields});return r&&this.output.write(Buffer.from(r+"\r\n")),setImmediate(t)};if(this.bodyHash&&this.headers)return t();this.output.write(this.parser.rawHeaders),this.sendNextChunk()}createWriteCache(){this.output.usingCache=!0,this.cache=r.createWriteStream(this.cachePath),this.cache.once("error",(e=>{this.cleanup(),this.relaxedBody.unpipe(this.cache),this.relaxedBody.on("readable",(()=>{for(;null!==this.relaxedBody.read(););})),this.hasErrored=!0,this.output.emit("error",e)})),this.cache.once("close",(()=>{this.sendSignedOutput()})),this.relaxedBody.removeAllListeners("readable"),this.relaxedBody.pipe(this.cache)}signStream(){this.parser=new e,this.relaxedBody=new t({hashAlgo:this.hashAlgo}),this.parser.on("headers",(e=>{this.headers=e})),this.relaxedBody.on("hash",(e=>{this.bodyHash=e})),this.relaxedBody.on("readable",(()=>{let e;if(!this.cache)for(;null!==(e=this.relaxedBody.read());)if(this.chunks.push(e),this.chunklen+=e.length,this.chunklen>=this.cacheTreshold&&this.cachePath)return this.createWriteCache()})),this.relaxedBody.on("end",(()=>{this.cache||this.sendSignedOutput()})),this.parser.pipe(this.relaxedBody),setImmediate((()=>this.input.pipe(this.parser)))}}return dkim=class{constructor(e){this.options=e||{},this.keys=[].concat(this.options.keys||{domainName:e.domainName,keySelector:e.keySelector,privateKey:e.privateKey})}sign(e,t){let n=new i,r=e,o=!1;Buffer.isBuffer(e)?(o=e,r=new i):"string"==typeof e&&(o=Buffer.from(e),r=new i);let a=this.options;t&&Object.keys(t).length&&(a={},Object.keys(this.options||{}).forEach((e=>{a[e]=this.options[e]})),Object.keys(t||{}).forEach((e=>{e in a||(a[e]=t[e])})));let c=new s(a,this.keys,r,n);return setImmediate((()=>{c.signStream(),o&&setImmediate((()=>{r.end(o)}))})),n}}}function requireHttpProxyClient(){if(hasRequiredHttpProxyClient)return httpProxyClient_1;hasRequiredHttpProxyClient=1;const e=require$$7,t=require$$1$1,n=require$$0$3;return httpProxyClient_1=function i(r,o,a,s){let c,l,d,u=n.parse(r);c={host:u.hostname,port:Number(u.port)?Number(u.port):"https:"===u.protocol?443:80},"https:"===u.protocol?(c.rejectUnauthorized=!1,l=t.connect.bind(t)):l=e.connect.bind(e);let p=!1,m=e=>{if(!p){p=!0;try{d.destroy()}catch(e){}s(e)}},h=()=>{let e=new Error("Proxy socket timed out");e.code="ETIMEDOUT",m(e)};d=l(c,(()=>{if(p)return;let e={Host:a+":"+o,Connection:"close"};u.auth&&(e["Proxy-Authorization"]="Basic "+Buffer.from(u.auth).toString("base64")),d.write("CONNECT "+a+":"+o+" HTTP/1.1\r\n"+Object.keys(e).map((t=>t+": "+e[t])).join("\r\n")+"\r\n\r\n");let t="",n=e=>{let i,r;if(!p&&(t+=e.toString("binary"),i=t.match(/\r\n\r\n/))){if(d.removeListener("data",n),r=t.substr(i.index+i[0].length),t=t.substr(0,i.index),r&&d.unshift(Buffer.from(r,"binary")),p=!0,i=t.match(/^HTTP\/\d+\.\d+ (\d+)/i),!i||"2"!==(i[1]||"").charAt(0)){try{d.destroy()}catch(e){}return s(new Error("Invalid response from proxy"+(i&&": "+i[1]||"")))}return d.removeListener("error",m),d.removeListener("timeout",h),d.setTimeout(0),s(null,d)}};d.on("data",n)})),d.setTimeout(i.timeout||3e4),d.on("timeout",h),d.once("error",m)},httpProxyClient_1}function requireMailMessage(){if(hasRequiredMailMessage)return mailMessage;hasRequiredMailMessage=1;const e=requireShared(),t=requireMimeNode(),n=requireMimeFuncs();return mailMessage=class{constructor(e,t){this.mailer=e,this.data={},this.message=null,t=t||{};let n=e.options||{},i=e._defaults||{};Object.keys(t).forEach((e=>{this.data[e]=t[e]})),this.data.headers=this.data.headers||{},Object.keys(i).forEach((e=>{e in this.data?"headers"===e&&Object.keys(i.headers).forEach((e=>{e in this.data.headers||(this.data.headers[e]=i.headers[e])})):this.data[e]=i[e]})),["disableFileAccess","disableUrlAccess","normalizeHeaderKey"].forEach((e=>{e in n&&(this.data[e]=n[e])}))}resolveContent(...t){return e.resolveContent(...t)}resolveAll(i){let r=[[this.data,"html"],[this.data,"text"],[this.data,"watchHtml"],[this.data,"amp"],[this.data,"icalEvent"]];this.data.alternatives&&this.data.alternatives.length&&this.data.alternatives.forEach(((e,t)=>{r.push([this.data.alternatives,t])})),this.data.attachments&&this.data.attachments.length&&this.data.attachments.forEach(((e,t)=>{e.filename||(e.filename=(e.path||e.href||"").split("/").pop().split("?").shift()||"attachment-"+(t+1),e.filename.indexOf(".")<0&&(e.filename+="."+n.detectExtension(e.contentType))),e.contentType||(e.contentType=n.detectMimeType(e.filename||e.path||e.href||"bin")),r.push([this.data.attachments,t])}));let o=new t;["from","to","cc","bcc","sender","replyTo"].forEach((e=>{let t;this.message?t=[].concat(o._parseAddresses(this.message.getHeader("replyTo"===e?"reply-to":e))||[]):this.data[e]&&(t=[].concat(o._parseAddresses(this.data[e])||[])),t&&t.length?this.data[e]=t:e in this.data&&(this.data[e]=null)}));["from","sender"].forEach((e=>{this.data[e]&&(this.data[e]=this.data[e].shift())}));let a=0,s=()=>{if(a>=r.length)return i(null,this.data);let t=r[a++];if(!t[0]||!t[0][t[1]])return s();e.resolveContent(...t,((e,n)=>{if(e)return i(e);let r={content:n};t[0][t[1]]&&"object"==typeof t[0][t[1]]&&!Buffer.isBuffer(t[0][t[1]])&&Object.keys(t[0][t[1]]).forEach((e=>{e in r||["content","path","href","raw"].includes(e)||(r[e]=t[0][t[1]][e])})),t[0][t[1]]=r,s()}))};setImmediate((()=>s()))}normalize(e){let t=this.data.envelope||this.message.getEnvelope(),n=this.message.messageId();this.resolveAll(((i,r)=>{if(i)return e(i);if(r.envelope=t,r.messageId=n,["html","text","watchHtml","amp"].forEach((e=>{r[e]&&r[e].content&&("string"==typeof r[e].content?r[e]=r[e].content:Buffer.isBuffer(r[e].content)&&(r[e]=r[e].content.toString()))})),r.icalEvent&&Buffer.isBuffer(r.icalEvent.content)&&(r.icalEvent.content=r.icalEvent.content.toString("base64"),r.icalEvent.encoding="base64"),r.alternatives&&r.alternatives.length&&r.alternatives.forEach((e=>{e&&e.content&&Buffer.isBuffer(e.content)&&(e.content=e.content.toString("base64"),e.encoding="base64")})),r.attachments&&r.attachments.length&&r.attachments.forEach((e=>{e&&e.content&&Buffer.isBuffer(e.content)&&(e.content=e.content.toString("base64"),e.encoding="base64")})),r.normalizedHeaders={},Object.keys(r.headers||{}).forEach((e=>{let t=[].concat(r.headers[e]||[]).shift();t=t&&t.value||t,t&&(["references","in-reply-to","message-id","content-id"].includes(e)&&(t=this.message._encodeHeaderValue(e,t)),r.normalizedHeaders[e]=t)})),r.list&&"object"==typeof r.list){this._getListHeaders(r.list).forEach((e=>{r.normalizedHeaders[e.key]=e.value.map((e=>e&&e.value||e)).join(", ")}))}return r.references&&(r.normalizedHeaders.references=this.message._encodeHeaderValue("references",r.references)),r.inReplyTo&&(r.normalizedHeaders["in-reply-to"]=this.message._encodeHeaderValue("in-reply-to",r.inReplyTo)),e(null,r)}))}setMailerHeader(){this.message&&this.data.xMailer&&this.message.setHeader("X-Mailer",this.data.xMailer)}setPriorityHeaders(){if(this.message&&this.data.priority)switch((this.data.priority||"").toString().toLowerCase()){case"high":this.message.setHeader("X-Priority","1 (Highest)"),this.message.setHeader("X-MSMail-Priority","High"),this.message.setHeader("Importance","High");break;case"low":this.message.setHeader("X-Priority","5 (Lowest)"),this.message.setHeader("X-MSMail-Priority","Low"),this.message.setHeader("Importance","Low")}}setListHeaders(){this.message&&this.data.list&&"object"==typeof this.data.list&&this.data.list&&"object"==typeof this.data.list&&this._getListHeaders(this.data.list).forEach((e=>{e.value.forEach((t=>{this.message.addHeader(e.key,t)}))}))}_getListHeaders(e){return Object.keys(e).map((t=>({key:"list-"+t.toLowerCase().trim(),value:[].concat(e[t]||[]).map((e=>({prepared:!0,foldLines:!0,value:[].concat(e||[]).map((e=>{if("string"==typeof e&&(e={url:e}),e&&e.url){if("id"===t.toLowerCase().trim()){let t=e.comment||"";return t=n.isPlainText(t)?'"'+t+'"':n.encodeWord(t),(e.comment?t+" ":"")+this._formatListUrl(e.url).replace(/^<[^:]+\/{,2}/,"")}let i=e.comment||"";return n.isPlainText(i)||(i=n.encodeWord(i)),this._formatListUrl(e.url)+(e.comment?" ("+i+")":"")}return""})).filter((e=>e)).join(", ")})))})))}_formatListUrl(e){return e=e.replace(/[\s<]+|[\s>]+/g,""),/^(https?|mailto|ftp):/.test(e)?"<"+e+">":/^[^@]+@[^@]+$/.test(e)?"<mailto:"+e+">":"<http://"+e+">"}},mailMessage}function requireMailer(){if(hasRequiredMailer)return mailer;hasRequiredMailer=1;const e=require$$0$a,t=requireShared(),n=requireMimeTypes(),i=requireMailComposer(),r=requireDkim(),o=requireHttpProxyClient(),a=require$$0$8,s=require$$0$3,c=require$$9,l=requireMailMessage(),d=require$$7,u=require$$4,p=require$$2$1;return mailer=class extends e{constructor(e,n,i){super(),this.options=n||{},this._defaults=i||{},this._defaultPlugins={compile:[(...e)=>this._convertDataImages(...e)],stream:[]},this._userPlugins={compile:[],stream:[]},this.meta=new Map,this.dkim=!!this.options.dkim&&new r(this.options.dkim),this.transporter=e,this.transporter.mailer=this,this.logger=t.getLogger(this.options,{component:this.options.component||"mail"}),this.logger.debug({tnx:"create"},"Creating transport: %s",this.getVersionString()),"function"==typeof this.transporter.on&&(this.transporter.on("log",(e=>{this.logger.debug({tnx:"transport"},"%s: %s",e.type,e.message)})),this.transporter.on("error",(e=>{this.logger.error({err:e,tnx:"transport"},"Transport Error: %s",e.message),this.emit("error",e)})),this.transporter.on("idle",((...e)=>{this.emit("idle",...e)}))),["close","isIdle","verify"].forEach((e=>{this[e]=(...t)=>"function"==typeof this.transporter[e]?("verify"===e&&"function"==typeof this.getSocket&&(this.transporter.getSocket=this.getSocket,this.getSocket=!1),this.transporter[e](...t)):(this.logger.warn({tnx:"transport",methodName:e},"Non existing method %s called for transport",e),!1)})),this.options.proxy&&"string"==typeof this.options.proxy&&this.setupProxy(this.options.proxy)}use(e,t){return e=(e||"").toString(),this._userPlugins.hasOwnProperty(e)?this._userPlugins[e].push(t):this._userPlugins[e]=[t],this}sendMail(e,n=null){let o;n||(o=new Promise(((e,i)=>{n=t.callbackPromise(e,i)}))),"function"==typeof this.getSocket&&(this.transporter.getSocket=this.getSocket,this.getSocket=!1);let a=new l(this,e);return this.logger.debug({tnx:"transport",name:this.transporter.name,version:this.transporter.version,action:"send"},"Sending mail using %s/%s",this.transporter.name,this.transporter.version),this._processPlugins("compile",a,(e=>{if(e)return this.logger.error({err:e,tnx:"plugin",action:"compile"},"PluginCompile Error: %s",e.message),n(e);a.message=new i(a.data).compile(),a.setMailerHeader(),a.setPriorityHeaders(),a.setListHeaders(),this._processPlugins("stream",a,(e=>{if(e)return this.logger.error({err:e,tnx:"plugin",action:"stream"},"PluginStream Error: %s",e.message),n(e);(a.data.dkim||this.dkim)&&a.message.processFunc((e=>{let t=a.data.dkim?new r(a.data.dkim):this.dkim;return this.logger.debug({tnx:"DKIM",messageId:a.message.messageId(),dkimDomains:t.keys.map((e=>e.keySelector+"."+e.domainName)).join(", ")},"Signing outgoing message with %s keys",t.keys.length),t.sign(e,a.data._dkim)})),this.transporter.send(a,((...e)=>{e[0]&&this.logger.error({err:e[0],tnx:"transport",action:"send"},"Send Error: %s",e[0].message),n(...e)}))}))})),o}getVersionString(){return a.format("%s (%s; +%s; %s/%s)",c.name,c.version,c.homepage,this.transporter.name,this.transporter.version)}_processPlugins(e,t,n){if(e=(e||"").toString(),!this._userPlugins.hasOwnProperty(e))return n();let i=this._userPlugins[e]||[],r=this._defaultPlugins[e]||[];if(i.length&&this.logger.debug({tnx:"transaction",pluginCount:i.length,step:e},"Using %s plugins for %s",i.length,e),i.length+r.length===0)return n();let o=0,a="default",s=()=>{let e="default"===a?r:i;if(o>=e.length){if("default"!==a||!i.length)return n();a="user",o=0,e=i}(0,e[o++])(t,(e=>{if(e)return n(e);s()}))};s()}setupProxy(e){let t=s.parse(e);this.getSocket=(e,n)=>{let i=t.protocol.replace(/:$/,"").toLowerCase();if(this.meta.has("proxy_handler_"+i))return this.meta.get("proxy_handler_"+i)(t,e,n);switch(i){case"http":case"https":return void o(t.href,e.port,e.host,((e,t)=>e?n(e):n(null,{connection:t})));case"socks":case"socks5":case"socks4":case"socks4a":{if(!this.meta.has("proxy_socks_module"))return n(new Error("Socks module not loaded"));let i=i=>{let r=!!this.meta.get("proxy_socks_module").SocksClient,o=r?this.meta.get("proxy_socks_module").SocksClient:this.meta.get("proxy_socks_module"),a=Number(t.protocol.replace(/\D/g,""))||5,s={proxy:{ipaddress:i,port:Number(t.port),type:a},[r?"destination":"target"]:{host:e.host,port:e.port},command:"connect"};if(t.auth){let e=decodeURIComponent(t.auth.split(":").shift()),n=decodeURIComponent(t.auth.split(":").pop());r?(s.proxy.userId=e,s.proxy.password=n):4===a?s.userid=e:s.authentication={username:e,password:n}}o.createConnection(s,((e,t)=>e?n(e):n(null,{connection:t.socket||t})))};return d.isIP(t.hostname)?i(t.hostname):u.resolve(t.hostname,((e,t)=>{if(e)return n(e);i(Array.isArray(t)?t[0]:t)}))}}n(new Error("Unknown proxy configuration"))}}_convertDataImages(e,t){if(!this.options.attachDataUrls&&!e.data.attachDataUrls||!e.data.html)return t();e.resolveContent(e.data,"html",((i,r)=>{if(i)return t(i);let o=0;r=(r||"").toString().replace(/(<img\b[^<>]{0,1024} src\s{0,20}=[\s"']{0,20})(data:([^;]+);[^"'>\s]+)/gi,((t,i,r,a)=>{let s=p.randomBytes(10).toString("hex")+"@localhost";return e.data.attachments||(e.data.attachments=[]),Array.isArray(e.data.attachments)||(e.data.attachments=[].concat(e.data.attachments||[])),e.data.attachments.push({path:r,cid:s,filename:"image-"+ ++o+"."+n.detectExtension(a)}),i+"cid:"+s})),e.data.html=r,t()}))}set(e,t){return this.meta.set(e,t)}get(e){return this.meta.get(e)}},mailer}function requireDataStream(){if(hasRequiredDataStream)return dataStream;hasRequiredDataStream=1;const e=require$$0$4.Transform;return dataStream=class extends e{constructor(e){super(e),this.options=e||{},this._curLine="",this.inByteCount=0,this.outByteCount=0,this.lastByte=!1}_transform(e,t,n){let i,r,o,a=[],s=0,c=0;if(!e||!e.length)return n();for("string"==typeof e&&(e=Buffer.from(e)),this.inByteCount+=e.length,i=0,r=e.length;i<r;i++)46===e[i]?(i&&10===e[i-1]||!i&&(!this.lastByte||10===this.lastByte))&&(o=e.slice(c,i+1),a.push(o),a.push(Buffer.from(".")),s+=o.length+1,c=i+1):10===e[i]&&(i&&13!==e[i-1]||!i&&13!==this.lastByte)&&(i>c?(o=e.slice(c,i),a.push(o),s+=o.length+2):s+=2,a.push(Buffer.from("\r\n")),c=i+1);s?(c<e.length&&(o=e.slice(c),a.push(o),s+=o.length),this.outByteCount+=s,this.push(Buffer.concat(a,s))):(this.outByteCount+=e.length,this.push(e)),this.lastByte=e[e.length-1],n()}_flush(e){let t;t=10===this.lastByte?Buffer.from(".\r\n"):13===this.lastByte?Buffer.from("\n.\r\n"):Buffer.from("\r\n.\r\n"),this.outByteCount+=t.length,this.push(t),e()}},dataStream}function requireSmtpConnection(){if(hasRequiredSmtpConnection)return smtpConnection;hasRequiredSmtpConnection=1;const e=require$$9,t=require$$0$a.EventEmitter,n=require$$7,i=require$$1$1,r=require$$0$7,o=require$$2$1,a=requireDataStream(),s=require$$0$4.PassThrough,c=requireShared(),l=6e5;return smtpConnection=class extends t{constructor(t){super(t),this.id=o.randomBytes(8).toString("base64").replace(/\W/g,""),this.stage="init",this.options=t||{},this.secureConnection=!!this.options.secure,this.alreadySecured=!!this.options.secured,this.port=Number(this.options.port)||(this.secureConnection?465:587),this.host=this.options.host||"localhost",this.servername=this.options.servername?this.options.servername:!n.isIP(this.host)&&this.host,this.allowInternalNetworkInterfaces=this.options.allowInternalNetworkInterfaces||!1,void 0===this.options.secure&&465===this.port&&(this.secureConnection=!0),this.name=this.options.name||this._getHostname(),this.logger=c.getLogger(this.options,{component:this.options.component||"smtp-connection",sid:this.id}),this.customAuth=new Map,Object.keys(this.options.customAuth||{}).forEach((e=>{let t=(e||"").toString().trim().toUpperCase();t&&this.customAuth.set(t,this.options.customAuth[e])})),this.version=e.version,this.authenticated=!1,this.destroyed=!1,this.secure=!!this.secureConnection,this._remainder="",this._responseQueue=[],this.lastServerResponse=!1,this._socket=!1,this._supportedAuth=[],this.allowsAuth=!1,this._envelope=!1,this._supportedExtensions=[],this._maxAllowedSize=0,this._responseActions=[],this._recipientQueue=[],this._greetingTimeout=!1,this._connectionTimeout=!1,this._destroyed=!1,this._closing=!1,this._onSocketData=e=>this._onData(e),this._onSocketError=e=>this._onError(e,"ESOCKET",!1,"CONN"),this._onSocketClose=()=>this._onClose(),this._onSocketEnd=()=>this._onEnd(),this._onSocketTimeout=()=>this._onTimeout()}connect(e){if("function"==typeof e){this.once("connect",(()=>{this.logger.debug({tnx:"smtp"},"SMTP handshake finished"),e()}));const t=this._isDestroyedMessage("connect");if(t)return e(this._formatError(t,"ECONNECTION",!1,"CONN"))}let t={port:this.port,host:this.host,allowInternalNetworkInterfaces:this.allowInternalNetworkInterfaces,timeout:this.options.dnsTimeout||3e4};this.options.localAddress&&(t.localAddress=this.options.localAddress);let r=()=>{this._connectionTimeout=setTimeout((()=>{this._onError("Connection timeout","ETIMEDOUT",!1,"CONN")}),this.options.connectionTimeout||12e4),this._socket.on("error",this._onSocketError)};return this.options.connection?(this._socket=this.options.connection,void(this.secureConnection&&!this.alreadySecured?setImmediate((()=>this._upgradeConnection((e=>{e?this._onError(new Error("Error initiating TLS - "+(e.message||e)),"ETLS",!1,"CONN"):this._onConnect()})))):setImmediate((()=>this._onConnect())))):this.options.socket?(this._socket=this.options.socket,c.resolveHostname(t,((e,n)=>{if(e)return setImmediate((()=>this._onError(e,"EDNS",!1,"CONN")));this.logger.debug({tnx:"dns",source:t.host,resolved:n.host,cached:!!n.cached},"Resolved %s as %s [cache %s]",t.host,n.host,n.cached?"hit":"miss"),Object.keys(n).forEach((e=>{"_"!==e.charAt(0)&&n[e]&&(t[e]=n[e])}));try{this._socket.connect(this.port,this.host,(()=>{this._socket.setKeepAlive(!0),this._onConnect()})),r()}catch(e){return setImmediate((()=>this._onError(e,"ECONNECTION",!1,"CONN")))}}))):this.secureConnection?(this.options.tls&&Object.keys(this.options.tls).forEach((e=>{t[e]=this.options.tls[e]})),this.servername&&!t.servername&&(t.servername=this.servername),c.resolveHostname(t,((e,n)=>{if(e)return setImmediate((()=>this._onError(e,"EDNS",!1,"CONN")));this.logger.debug({tnx:"dns",source:t.host,resolved:n.host,cached:!!n.cached},"Resolved %s as %s [cache %s]",t.host,n.host,n.cached?"hit":"miss"),Object.keys(n).forEach((e=>{"_"!==e.charAt(0)&&n[e]&&(t[e]=n[e])}));try{this._socket=i.connect(t,(()=>{this._socket.setKeepAlive(!0),this._onConnect()})),r()}catch(e){return setImmediate((()=>this._onError(e,"ECONNECTION",!1,"CONN")))}}))):c.resolveHostname(t,((e,i)=>{if(e)return setImmediate((()=>this._onError(e,"EDNS",!1,"CONN")));this.logger.debug({tnx:"dns",source:t.host,resolved:i.host,cached:!!i.cached},"Resolved %s as %s [cache %s]",t.host,i.host,i.cached?"hit":"miss"),Object.keys(i).forEach((e=>{"_"!==e.charAt(0)&&i[e]&&(t[e]=i[e])}));try{this._socket=n.connect(t,(()=>{this._socket.setKeepAlive(!0),this._onConnect()})),r()}catch(e){return setImmediate((()=>this._onError(e,"ECONNECTION",!1,"CONN")))}}))}quit(){this._sendCommand("QUIT"),this._responseActions.push(this.close)}close(){if(clearTimeout(this._connectionTimeout),clearTimeout(this._greetingTimeout),this._responseActions=[],this._closing)return;this._closing=!0;let e="end";"init"===this.stage&&(e="destroy"),this.logger.debug({tnx:"smtp"},'Closing connection to the server using "%s"',e);let t=this._socket&&this._socket.socket||this._socket;if(t&&!t.destroyed)try{this._socket[e]()}catch(e){}this._destroy()}login(e,t){const n=this._isDestroyedMessage("login");if(n)return t(this._formatError(n,"ECONNECTION",!1,"API"));if(this._auth=e||{},this._authMethod=(this._auth.method||"").toString().trim().toUpperCase()||!1,this._authMethod||!this._auth.oauth2||this._auth.credentials?this._authMethod&&("XOAUTH2"!==this._authMethod||this._auth.oauth2)||(this._authMethod=(this._supportedAuth[0]||"PLAIN").toUpperCase().trim()):this._authMethod="XOAUTH2",!("XOAUTH2"===this._authMethod||this._auth.credentials&&this._auth.credentials.user&&this._auth.credentials.pass)){if(!(this._auth.user&&this._auth.pass||this.customAuth.has(this._authMethod)))return t(this._formatError('Missing credentials for "'+this._authMethod+'"',"EAUTH",!1,"API"));this._auth.credentials={user:this._auth.user,pass:this._auth.pass,options:this._auth.options}}if(!this.customAuth.has(this._authMethod)){switch(this._authMethod){case"XOAUTH2":return void this._handleXOauth2Token(!1,t);case"LOGIN":return this._responseActions.push((e=>{this._actionAUTH_LOGIN_USER(e,t)})),void this._sendCommand("AUTH LOGIN");case"PLAIN":return this._responseActions.push((e=>{this._actionAUTHComplete(e,t)})),void this._sendCommand("AUTH PLAIN "+Buffer.from("\0"+this._auth.credentials.user+"\0"+this._auth.credentials.pass,"utf-8").toString("base64"),"AUTH PLAIN "+Buffer.from("\0"+this._auth.credentials.user+"\0/* secret */","utf-8").toString("base64"));case"CRAM-MD5":return this._responseActions.push((e=>{this._actionAUTH_CRAM_MD5(e,t)})),void this._sendCommand("AUTH CRAM-MD5")}return t(this._formatError('Unknown authentication method "'+this._authMethod+'"',"EAUTH",!1,"API"))}{let e,n=this.customAuth.get(this._authMethod),i=!1,r=()=>{i||(i=!0,this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user)),this.authenticated=!0,t(null,!0))},o=n=>{i||(i=!0,t(this._formatError(n,"EAUTH",e,"AUTH "+this._authMethod)))},a=n({auth:this._auth,method:this._authMethod,extensions:[].concat(this._supportedExtensions),authMethods:[].concat(this._supportedAuth),maxAllowedSize:this._maxAllowedSize||!1,sendCommand:(t,n)=>{let i;return n||(i=new Promise(((e,t)=>{n=c.callbackPromise(e,t)}))),this._responseActions.push((i=>{e=i;let r=i.match(/^(\d+)(?:\s(\d+\.\d+\.\d+))?\s/),o={command:t,response:i};r?(o.status=Number(r[1])||0,r[2]&&(o.code=r[2]),o.text=i.substr(r[0].length)):(o.text=i,o.status=0),n(null,o)})),setImmediate((()=>this._sendCommand(t))),i},resolve:r,reject:o});a&&"function"==typeof a.catch&&a.then(r).catch(o)}}send(e,t,n){if(!t)return n(this._formatError("Empty message","EMESSAGE",!1,"API"));const i=this._isDestroyedMessage("send message");if(i)return n(this._formatError(i,"ECONNECTION",!1,"API"));if(this._maxAllowedSize&&e.size>this._maxAllowedSize)return setImmediate((()=>{n(this._formatError("Message size larger than allowed "+this._maxAllowedSize,"EMESSAGE",!1,"MAIL FROM"))}));let r=!1,o=function(){r||(r=!0,n(...arguments))};"function"==typeof t.on&&t.on("error",(e=>o(this._formatError(e,"ESTREAM",!1,"API"))));let a=Date.now();this._setEnvelope(e,((e,n)=>{if(e){let n=new s;return"function"==typeof t.pipe?t.pipe(n):(n.write(t),n.end()),o(e)}let i=Date.now(),r=this._createSendStream(((e,t)=>e?o(e):(n.envelopeTime=i-a,n.messageTime=Date.now()-i,n.messageSize=r.outByteCount,n.response=t,o(null,n))));"function"==typeof t.pipe?t.pipe(r):(r.write(t),r.end())}))}reset(e){this._sendCommand("RSET"),this._responseActions.push((t=>"2"!==t.charAt(0)?e(this._formatError("Could not reset session state. response="+t,"EPROTOCOL",t,"RSET")):(this._envelope=!1,e(null,!0))))}_onConnect(){clearTimeout(this._connectionTimeout),this.logger.info({tnx:"network",localAddress:this._socket.localAddress,localPort:this._socket.localPort,remoteAddress:this._socket.remoteAddress,remotePort:this._socket.remotePort},"%s established to %s:%s",this.secure?"Secure connection":"Connection",this._socket.remoteAddress,this._socket.remotePort),this._destroyed?this.close():(this.stage="connected",this._socket.removeListener("data",this._onSocketData),this._socket.removeListener("timeout",this._onSocketTimeout),this._socket.removeListener("close",this._onSocketClose),this._socket.removeListener("end",this._onSocketEnd),this._socket.on("data",this._onSocketData),this._socket.once("close",this._onSocketClose),this._socket.once("end",this._onSocketEnd),this._socket.setTimeout(this.options.socketTimeout||l),this._socket.on("timeout",this._onSocketTimeout),this._greetingTimeout=setTimeout((()=>{this._socket&&!this._destroyed&&this._responseActions[0]===this._actionGreeting&&this._onError("Greeting never received","ETIMEDOUT",!1,"CONN")}),this.options.greetingTimeout||3e4),this._responseActions.push(this._actionGreeting),this._socket.resume())}_onData(e){if(this._destroyed||!e||!e.length)return;let t,n=(e||"").toString("binary"),i=(this._remainder+n).split(/\r?\n/);this._remainder=i.pop();for(let e=0,n=i.length;e<n;e++)this._responseQueue.length&&(t=this._responseQueue[this._responseQueue.length-1],/^\d+-/.test(t.split("\n").pop()))?this._responseQueue[this._responseQueue.length-1]+="\n"+i[e]:this._responseQueue.push(i[e]);this._responseQueue.length&&(t=this._responseQueue[this._responseQueue.length-1],/^\d+-/.test(t.split("\n").pop()))||this._processResponse()}_onError(e,t,n,i){clearTimeout(this._connectionTimeout),clearTimeout(this._greetingTimeout),this._destroyed||(e=this._formatError(e,t,n,i),this.logger.error(n,e.message),this.emit("error",e),this.close())}_formatError(e,t,n,i){let r;r=/Error\]$/i.test(Object.prototype.toString.call(e))?e:new Error(e),t&&"Error"!==t&&(r.code=t),n&&(r.response=n,r.message+=": "+n);let o="string"==typeof n&&Number((n.match(/^\d+/)||[])[0])||!1;return o&&(r.responseCode=o),i&&(r.command=i),r}_onClose(){let e=!1;return this._remainder&&this._remainder.trim()&&((this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"server"},this._remainder.replace(/\r?\n$/,"")),this.lastServerResponse=e=this._remainder.trim()),this.logger.info({tnx:"network"},"Connection closed"),this.upgrading&&!this._destroyed?this._onError(new Error("Connection closed unexpectedly"),"ETLS",e,"CONN"):[this._actionGreeting,this.close].includes(this._responseActions[0])||this._destroyed?/^[45]\d{2}\b/.test(e)?this._onError(new Error("Connection closed unexpectedly"),"ECONNECTION",e,"CONN"):void this._destroy():this._onError(new Error("Connection closed unexpectedly"),"ECONNECTION",e,"CONN")}_onEnd(){this._socket&&!this._socket.destroyed&&this._socket.destroy()}_onTimeout(){return this._onError(new Error("Timeout"),"ETIMEDOUT",!1,"CONN")}_destroy(){this._destroyed||(this._destroyed=!0,this.emit("end"))}_upgradeConnection(e){this._socket.removeListener("data",this._onSocketData),this._socket.removeListener("timeout",this._onSocketTimeout);let t=this._socket,n={socket:this._socket,host:this.host};Object.keys(this.options.tls||{}).forEach((e=>{n[e]=this.options.tls[e]})),this.servername&&!n.servername&&(n.servername=this.servername),this.upgrading=!0;try{this._socket=i.connect(n,(()=>(this.secure=!0,this.upgrading=!1,this._socket.on("data",this._onSocketData),t.removeListener("close",this._onSocketClose),t.removeListener("end",this._onSocketEnd),e(null,!0))))}catch(t){return e(t)}this._socket.on("error",this._onSocketError),this._socket.once("close",this._onSocketClose),this._socket.once("end",this._onSocketEnd),this._socket.setTimeout(this.options.socketTimeout||l),this._socket.on("timeout",this._onSocketTimeout),t.resume()}_processResponse(){if(!this._responseQueue.length)return!1;let e=this.lastServerResponse=(this._responseQueue.shift()||"").toString();if(/^\d+-/.test(e.split("\n").pop()))return;(this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"server"},e.replace(/\r?\n$/,"")),e.trim()||setImmediate((()=>this._processResponse()));let t=this._responseActions.shift();if("function"!=typeof t)return this._onError(new Error("Unexpected Response"),"EPROTOCOL",e,"CONN");t.call(this,e),setImmediate((()=>this._processResponse()))}_sendCommand(e,t){if(!this._destroyed){if(this._socket.destroyed)return this.close();(this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"client"},(t||e||"").toString().replace(/\r?\n$/,"")),this._socket.write(Buffer.from(e+"\r\n","utf-8"))}}_setEnvelope(e,t){let n=[],i=!1;if(this._envelope=e||{},this._envelope.from=(this._envelope.from&&this._envelope.from.address||this._envelope.from||"").toString().trim(),this._envelope.to=[].concat(this._envelope.to||[]).map((e=>(e&&e.address||e||"").toString().trim())),!this._envelope.to.length)return t(this._formatError("No recipients defined","EENVELOPE",!1,"API"));if(this._envelope.from&&/[\r\n<>]/.test(this._envelope.from))return t(this._formatError("Invalid sender "+JSON.stringify(this._envelope.from),"EENVELOPE",!1,"API"));/[\x80-\uFFFF]/.test(this._envelope.from)&&(i=!0);for(let e=0,n=this._envelope.to.length;e<n;e++){if(!this._envelope.to[e]||/[\r\n<>]/.test(this._envelope.to[e]))return t(this._formatError("Invalid recipient "+JSON.stringify(this._envelope.to[e]),"EENVELOPE",!1,"API"));/[\x80-\uFFFF]/.test(this._envelope.to[e])&&(i=!0)}if(this._envelope.rcptQueue=JSON.parse(JSON.stringify(this._envelope.to||[])),this._envelope.rejected=[],this._envelope.rejectedErrors=[],this._envelope.accepted=[],this._envelope.dsn)try{this._envelope.dsn=this._setDsnEnvelope(this._envelope.dsn)}catch(e){return t(this._formatError("Invalid DSN "+e.message,"EENVELOPE",!1,"API"))}this._responseActions.push((e=>{this._actionMAIL(e,t)})),i&&this._supportedExtensions.includes("SMTPUTF8")&&(n.push("SMTPUTF8"),this._usingSmtpUtf8=!0),this._envelope.use8BitMime&&this._supportedExtensions.includes("8BITMIME")&&(n.push("BODY=8BITMIME"),this._using8BitMime=!0),this._envelope.size&&this._supportedExtensions.includes("SIZE")&&n.push("SIZE="+this._envelope.size),this._envelope.dsn&&this._supportedExtensions.includes("DSN")&&(this._envelope.dsn.ret&&n.push("RET="+c.encodeXText(this._envelope.dsn.ret)),this._envelope.dsn.envid&&n.push("ENVID="+c.encodeXText(this._envelope.dsn.envid))),this._sendCommand("MAIL FROM:<"+this._envelope.from+">"+(n.length?" "+n.join(" "):""))}_setDsnEnvelope(e){let t=(e.ret||e.return||"").toString().toUpperCase()||null;if(t)switch(t){case"HDRS":case"HEADERS":t="HDRS";break;case"FULL":case"BODY":t="FULL"}if(t&&!["FULL","HDRS"].includes(t))throw new Error("ret: "+JSON.stringify(t));let n=(e.envid||e.id||"").toString()||null,i=e.notify||null;if(i){"string"==typeof i&&(i=i.split(",")),i=i.map((e=>e.trim().toUpperCase()));let e=["NEVER","SUCCESS","FAILURE","DELAY"],t=i.filter((t=>!e.includes(t)));if(t.length||i.length>1&&i.includes("NEVER"))throw new Error("notify: "+JSON.stringify(i.join(",")));i=i.join(",")}let r=(e.recipient||e.orcpt||"").toString()||null;return r&&r.indexOf(";")<0&&(r="rfc822;"+r),{ret:t,envid:n,notify:i,orcpt:r}}_getDsnRcptToArgs(){let e=[];return this._envelope.dsn&&this._supportedExtensions.includes("DSN")&&(this._envelope.dsn.notify&&e.push("NOTIFY="+c.encodeXText(this._envelope.dsn.notify)),this._envelope.dsn.orcpt&&e.push("ORCPT="+c.encodeXText(this._envelope.dsn.orcpt))),e.length?" "+e.join(" "):""}_createSendStream(e){let t,n=new a;return this.options.lmtp?this._envelope.accepted.forEach(((t,n)=>{let i=n===this._envelope.accepted.length-1;this._responseActions.push((n=>{this._actionLMTPStream(t,i,n,e)}))})):this._responseActions.push((t=>{this._actionSMTPStream(t,e)})),n.pipe(this._socket,{end:!1}),this.options.debug&&(t=new s,t.on("readable",(()=>{let e;for(;e=t.read();)this.logger.debug({tnx:"message"},e.toString("binary").replace(/\r?\n$/,""))})),n.pipe(t)),n.once("end",(()=>{this.logger.info({tnx:"message",inByteCount:n.inByteCount,outByteCount:n.outByteCount},"<%s bytes encoded mime message (source size %s bytes)>",n.outByteCount,n.inByteCount)})),n}_actionGreeting(e){clearTimeout(this._greetingTimeout),"220"===e.substr(0,3)?this.options.lmtp?(this._responseActions.push(this._actionLHLO),this._sendCommand("LHLO "+this.name)):(this._responseActions.push(this._actionEHLO),this._sendCommand("EHLO "+this.name)):this._onError(new Error("Invalid greeting. response="+e),"EPROTOCOL",e,"CONN")}_actionLHLO(e){"2"===e.charAt(0)?this._actionEHLO(e):this._onError(new Error("Invalid LHLO. response="+e),"EPROTOCOL",e,"LHLO")}_actionEHLO(e){let t;if("421"!==e.substr(0,3)){if("2"!==e.charAt(0))return this.options.requireTLS?void this._onError(new Error("EHLO failed but HELO does not support required STARTTLS. response="+e),"ECONNECTION",e,"EHLO"):(this._responseActions.push(this._actionHELO),void this._sendCommand("HELO "+this.name));if(this._ehloLines=e.split(/\r?\n/).map((e=>e.replace(/^\d+[ -]/,"").trim())).filter((e=>e)).slice(1),!this.secure&&!this.options.ignoreTLS&&(/[ -]STARTTLS\b/im.test(e)||this.options.requireTLS))return this._sendCommand("STARTTLS"),void this._responseActions.push(this._actionSTARTTLS);/[ -]SMTPUTF8\b/im.test(e)&&this._supportedExtensions.push("SMTPUTF8"),/[ -]DSN\b/im.test(e)&&this._supportedExtensions.push("DSN"),/[ -]8BITMIME\b/im.test(e)&&this._supportedExtensions.push("8BITMIME"),/[ -]PIPELINING\b/im.test(e)&&this._supportedExtensions.push("PIPELINING"),/[ -]AUTH\b/i.test(e)&&(this.allowsAuth=!0),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)PLAIN/i.test(e)&&this._supportedAuth.push("PLAIN"),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)LOGIN/i.test(e)&&this._supportedAuth.push("LOGIN"),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)CRAM-MD5/i.test(e)&&this._supportedAuth.push("CRAM-MD5"),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)XOAUTH2/i.test(e)&&this._supportedAuth.push("XOAUTH2"),(t=e.match(/[ -]SIZE(?:[ \t]+(\d+))?/im))&&(this._supportedExtensions.push("SIZE"),this._maxAllowedSize=Number(t[1])||0),this.emit("connect")}else this._onError(new Error("Server terminates connection. response="+e),"ECONNECTION",e,"EHLO")}_actionHELO(e){"2"===e.charAt(0)?(this.allowsAuth=!0,this.emit("connect")):this._onError(new Error("Invalid HELO. response="+e),"EPROTOCOL",e,"HELO")}_actionSTARTTLS(e){if("2"!==e.charAt(0))return this.options.opportunisticTLS?(this.logger.info({tnx:"smtp"},"Failed STARTTLS upgrade, continuing unencrypted"),this.emit("connect")):void this._onError(new Error("Error upgrading connection with STARTTLS"),"ETLS",e,"STARTTLS");this._upgradeConnection(((e,t)=>{e?this._onError(new Error("Error initiating TLS - "+(e.message||e)),"ETLS",!1,"STARTTLS"):(this.logger.info({tnx:"smtp"},"Connection upgraded with STARTTLS"),t?this.options.lmtp?(this._responseActions.push(this._actionLHLO),this._sendCommand("LHLO "+this.name)):(this._responseActions.push(this._actionEHLO),this._sendCommand("EHLO "+this.name)):this.emit("connect"))}))}_actionAUTH_LOGIN_USER(e,t){/^334[ -]/.test(e)?(this._responseActions.push((e=>{this._actionAUTH_LOGIN_PASS(e,t)})),this._sendCommand(Buffer.from(this._auth.credentials.user+"","utf-8").toString("base64"))):t(this._formatError('Invalid login sequence while waiting for "334 VXNlcm5hbWU6"',"EAUTH",e,"AUTH LOGIN"))}_actionAUTH_CRAM_MD5(e,t){let n=e.match(/^334\s+(.+)$/),i="";if(!n)return t(this._formatError("Invalid login sequence while waiting for server challenge string","EAUTH",e,"AUTH CRAM-MD5"));i=n[1];let r=Buffer.from(i,"base64").toString("ascii"),a=o.createHmac("md5",this._auth.credentials.pass);a.update(r);let s=this._auth.credentials.user+" "+a.digest("hex");this._responseActions.push((e=>{this._actionAUTH_CRAM_MD5_PASS(e,t)})),this._sendCommand(Buffer.from(s).toString("base64"),Buffer.from(this._auth.credentials.user+" /* secret */").toString("base64"))}_actionAUTH_CRAM_MD5_PASS(e,t){if(!e.match(/^235\s+/))return t(this._formatError('Invalid login sequence while waiting for "235"',"EAUTH",e,"AUTH CRAM-MD5"));this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user)),this.authenticated=!0,t(null,!0)}_actionAUTH_LOGIN_PASS(e,t){if(!/^334[ -]/.test(e))return t(this._formatError('Invalid login sequence while waiting for "334 UGFzc3dvcmQ6"',"EAUTH",e,"AUTH LOGIN"));this._responseActions.push((e=>{this._actionAUTHComplete(e,t)})),this._sendCommand(Buffer.from((this._auth.credentials.pass||"").toString(),"utf-8").toString("base64"),Buffer.from("/* secret */","utf-8").toString("base64"))}_actionAUTHComplete(e,t,n){return n||"function"!=typeof t||(n=t,t=!1),"334"===e.substr(0,3)?(this._responseActions.push((e=>{t||"XOAUTH2"!==this._authMethod?this._actionAUTHComplete(e,!0,n):setImmediate((()=>this._handleXOauth2Token(!0,n)))})),void this._sendCommand("")):"2"!==e.charAt(0)?(this.logger.info({tnx:"smtp",username:this._auth.user,action:"authfail",method:this._authMethod},"User %s failed to authenticate",JSON.stringify(this._auth.user)),n(this._formatError("Invalid login","EAUTH",e,"AUTH "+this._authMethod))):(this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user)),this.authenticated=!0,void n(null,!0))}_actionMAIL(e,t){let n,i;if(2!==Number(e.charAt(0)))return n=this._usingSmtpUtf8&&/^550 /.test(e)&&/[\x80-\uFFFF]/.test(this._envelope.from)?"Internationalized mailbox name not allowed":"Mail command failed",t(this._formatError(n,"EENVELOPE",e,"MAIL FROM"));if(!this._envelope.rcptQueue.length)return t(this._formatError("Can't send mail - no recipients defined","EENVELOPE",!1,"API"));if(this._recipientQueue=[],this._supportedExtensions.includes("PIPELINING"))for(;this._envelope.rcptQueue.length;)i=this._envelope.rcptQueue.shift(),this._recipientQueue.push(i),this._responseActions.push((e=>{this._actionRCPT(e,t)})),this._sendCommand("RCPT TO:<"+i+">"+this._getDsnRcptToArgs());else i=this._envelope.rcptQueue.shift(),this._recipientQueue.push(i),this._responseActions.push((e=>{this._actionRCPT(e,t)})),this._sendCommand("RCPT TO:<"+i+">"+this._getDsnRcptToArgs())}_actionRCPT(e,t){let n,i,r=this._recipientQueue.shift();if(2!==Number(e.charAt(0))?(n=this._usingSmtpUtf8&&/^553 /.test(e)&&/[\x80-\uFFFF]/.test(r)?"Internationalized mailbox name not allowed":"Recipient command failed",this._envelope.rejected.push(r),i=this._formatError(n,"EENVELOPE",e,"RCPT TO"),i.recipient=r,this._envelope.rejectedErrors.push(i)):this._envelope.accepted.push(r),this._envelope.rcptQueue.length||this._recipientQueue.length)this._envelope.rcptQueue.length&&(r=this._envelope.rcptQueue.shift(),this._recipientQueue.push(r),this._responseActions.push((e=>{this._actionRCPT(e,t)})),this._sendCommand("RCPT TO:<"+r+">"+this._getDsnRcptToArgs()));else{if(!(this._envelope.rejected.length<this._envelope.to.length))return i=this._formatError("Can't send mail - all recipients were rejected","EENVELOPE",e,"RCPT TO"),i.rejected=this._envelope.rejected,i.rejectedErrors=this._envelope.rejectedErrors,t(i);this._responseActions.push((e=>{this._actionDATA(e,t)})),this._sendCommand("DATA")}}_actionDATA(e,t){if(!/^[23]/.test(e))return t(this._formatError("Data command failed","EENVELOPE",e,"DATA"));let n={accepted:this._envelope.accepted,rejected:this._envelope.rejected};this._ehloLines&&this._ehloLines.length&&(n.ehlo=this._ehloLines),this._envelope.rejectedErrors.length&&(n.rejectedErrors=this._envelope.rejectedErrors),t(null,n)}_actionSMTPStream(e,t){return 2!==Number(e.charAt(0))?t(this._formatError("Message failed","EMESSAGE",e,"DATA")):t(null,e)}_actionLMTPStream(e,t,n,i){let r;if(2!==Number(n.charAt(0))){r=this._formatError("Message failed for recipient "+e,"EMESSAGE",n,"DATA"),r.recipient=e,this._envelope.rejected.push(e),this._envelope.rejectedErrors.push(r);for(let t=0,n=this._envelope.accepted.length;t<n;t++)this._envelope.accepted[t]===e&&this._envelope.accepted.splice(t,1)}if(t)return i(null,n)}_handleXOauth2Token(e,t){this._auth.oauth2.getToken(e,((n,i)=>{if(n)return this.logger.info({tnx:"smtp",username:this._auth.user,action:"authfail",method:this._authMethod},"User %s failed to authenticate",JSON.stringify(this._auth.user)),t(this._formatError(n,"EAUTH",!1,"AUTH XOAUTH2"));this._responseActions.push((n=>{this._actionAUTHComplete(n,e,t)})),this._sendCommand("AUTH XOAUTH2 "+this._auth.oauth2.buildXOAuth2Token(i),"AUTH XOAUTH2 "+this._auth.oauth2.buildXOAuth2Token("/* secret */"))}))}_isDestroyedMessage(e){if(this._destroyed)return"Cannot "+e+" - smtp connection is already destroyed.";if(this._socket){if(this._socket.destroyed)return"Cannot "+e+" - smtp connection socket is already destroyed.";if(!this._socket.writable)return"Cannot "+e+" - smtp connection socket is already half-closed."}}_getHostname(){let e;try{e=r.hostname()||""}catch(t){e="localhost"}return(!e||e.indexOf(".")<0)&&(e="[127.0.0.1]"),e.match(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/)&&(e="["+e+"]"),e}},smtpConnection}function requireXoauth2(){if(hasRequiredXoauth2)return xoauth2;hasRequiredXoauth2=1;const e=require$$0$4.Stream,t=requireFetch(),n=require$$2$1,i=requireShared();return xoauth2=class extends e{constructor(e,t){if(super(),this.options=e||{},e&&e.serviceClient){if(!e.privateKey||!e.user)return void setImmediate((()=>this.emit("error",new Error('Options "privateKey" and "user" are required for service account!'))));let t=Math.min(Math.max(Number(this.options.serviceRequestTimeout)||0,0),3600);this.options.serviceRequestTimeout=t||300}if(this.logger=i.getLogger({logger:t},{component:this.options.component||"OAuth2"}),this.provisionCallback="function"==typeof this.options.provisionCallback&&this.options.provisionCallback,this.options.accessUrl=this.options.accessUrl||"https://accounts.google.com/o/oauth2/token",this.options.customHeaders=this.options.customHeaders||{},this.options.customParams=this.options.customParams||{},this.accessToken=this.options.accessToken||!1,this.options.expires&&Number(this.options.expires))this.expires=this.options.expires;else{let e=Math.max(Number(this.options.timeout)||0,0);this.expires=e&&Date.now()+1e3*e||0}}getToken(e,t){if(!e&&this.accessToken&&(!this.expires||this.expires>Date.now()))return t(null,this.accessToken);let n=(...e)=>{e[0]?this.logger.error({err:e[0],tnx:"OAUTH2",user:this.options.user,action:"renew"},"Failed generating new Access Token for %s",this.options.user):this.logger.info({tnx:"OAUTH2",user:this.options.user,action:"renew"},"Generated new Access Token for %s",this.options.user),t(...e)};this.provisionCallback?this.provisionCallback(this.options.user,!!e,((e,t,i)=>{!e&&t&&(this.accessToken=t,this.expires=i||0),n(e,t)})):this.generateToken(n)}updateToken(e,t){this.accessToken=e,t=Math.max(Number(t)||0,0),this.expires=t&&Date.now()+1e3*t||0,this.emit("token",{user:this.options.user,accessToken:e||"",expires:this.expires})}generateToken(e){let t,n;if(this.options.serviceClient){let i,r=Math.floor(Date.now()/1e3),o={iss:this.options.serviceClient,scope:this.options.scope||"https://mail.google.com/",sub:this.options.user,aud:this.options.accessUrl,iat:r,exp:r+this.options.serviceRequestTimeout};try{i=this.jwtSignRS256(o)}catch(t){return e(new Error("Can't generate token. Check your auth options"))}t={grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:i},n={grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:o}}else{if(!this.options.refreshToken)return e(new Error("Can't create new access token for user"));t={client_id:this.options.clientId||"",client_secret:this.options.clientSecret||"",refresh_token:this.options.refreshToken,grant_type:"refresh_token"},n={client_id:this.options.clientId||"",client_secret:(this.options.clientSecret||"").substr(0,6)+"...",refresh_token:(this.options.refreshToken||"").substr(0,6)+"...",grant_type:"refresh_token"}}Object.keys(this.options.customParams).forEach((e=>{t[e]=this.options.customParams[e],n[e]=this.options.customParams[e]})),this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"generate"},"Requesting token using: %s",JSON.stringify(n)),this.postRequest(this.options.accessUrl,t,this.options,((t,n)=>{let i;if(t)return e(t);try{i=JSON.parse(n.toString())}catch(t){return e(t)}if(!i||"object"!=typeof i)return this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"post"},"Response: %s",(n||"").toString()),e(new Error("Invalid authentication response"));let r={};if(Object.keys(i).forEach((e=>{r[e]="access_token"!==e?i[e]:(i[e]||"").toString().substr(0,6)+"..."})),this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"post"},"Response: %s",JSON.stringify(r)),i.error){let t=i.error;return i.error_description&&(t+=": "+i.error_description),i.error_uri&&(t+=" ("+i.error_uri+")"),e(new Error(t))}return i.access_token?(this.updateToken(i.access_token,i.expires_in),e(null,this.accessToken)):e(new Error("No access token"))}))}buildXOAuth2Token(e){let t=["user="+(this.options.user||""),"auth=Bearer "+(e||this.accessToken),"",""];return Buffer.from(t.join(""),"utf-8").toString("base64")}postRequest(e,n,i,r){let o=!1,a=[],s=0,c=t(e,{method:"post",headers:i.customHeaders,body:n,allowErrorResponse:!0});c.on("readable",(()=>{let e;for(;null!==(e=c.read());)a.push(e),s+=e.length})),c.once("error",(e=>{if(!o)return o=!0,r(e)})),c.once("end",(()=>{if(!o)return o=!0,r(null,Buffer.concat(a,s))}))}toBase64URL(e){return"string"==typeof e&&(e=Buffer.from(e)),e.toString("base64").replace(/[=]+/g,"").replace(/\+/g,"-").replace(/\//g,"_")}jwtSignRS256(e){e=['{"alg":"RS256","typ":"JWT"}',JSON.stringify(e)].map((e=>this.toBase64URL(e))).join(".");let t=n.createSign("RSA-SHA256").update(e).sign(this.options.privateKey);return e+"."+this.toBase64URL(t)}},xoauth2}function requirePoolResource(){if(hasRequiredPoolResource)return poolResource;hasRequiredPoolResource=1;const e=requireSmtpConnection(),t=requireShared().assign,n=requireXoauth2(),i=require$$0$a;return poolResource=class extends i{constructor(e){if(super(),this.pool=e,this.options=e.options,this.logger=this.pool.logger,this.options.auth)switch((this.options.auth.type||"").toString().toUpperCase()){case"OAUTH2":{let e=new n(this.options.auth,this.logger);e.provisionCallback=this.pool.mailer&&this.pool.mailer.get("oauth2_provision_cb")||e.provisionCallback,this.auth={type:"OAUTH2",user:this.options.auth.user,oauth2:e,method:"XOAUTH2"},e.on("token",(e=>this.pool.mailer.emit("token",e))),e.on("error",(e=>this.emit("error",e)));break}default:if(!this.options.auth.user&&!this.options.auth.pass)break;this.auth={type:(this.options.auth.type||"").toString().toUpperCase()||"LOGIN",user:this.options.auth.user,credentials:{user:this.options.auth.user||"",pass:this.options.auth.pass,options:this.options.auth.options},method:(this.options.auth.method||"").trim().toUpperCase()||this.options.authMethod||!1}}this._connection=!1,this._connected=!1,this.messages=0,this.available=!0}connect(n){this.pool.getSocket(this.options,((i,r)=>{if(i)return n(i);let o=!1,a=this.options;r&&r.connection&&(this.logger.info({tnx:"proxy",remoteAddress:r.connection.remoteAddress,remotePort:r.connection.remotePort,destHost:a.host||"",destPort:a.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",r.connection.remoteAddress,r.connection.remotePort,a.host||"",a.port||""),a=t(!1,a),Object.keys(r).forEach((e=>{a[e]=r[e]}))),this.connection=new e(a),this.connection.once("error",(e=>{if(this.emit("error",e),!o)return o=!0,n(e)})),this.connection.once("end",(()=>{if(this.close(),o)return;o=!0;let e=setTimeout((()=>{if(o)return;let e=new Error("Unexpected socket close");this.connection&&this.connection._socket&&this.connection._socket.upgrading&&(e.code="ETLS"),n(e)}),1e3);try{e.unref()}catch(e){}})),this.connection.connect((()=>{if(!o)return this.auth&&(this.connection.allowsAuth||a.forceAuth)?void this.connection.login(this.auth,(e=>{if(!o){if(o=!0,e)return this.connection.close(),this.emit("error",e),n(e);this._connected=!0,n(null,!0)}})):(o=!0,this._connected=!0,n(null,!0))}))}))}send(e,t){if(!this._connected)return this.connect((n=>n?t(n):this.send(e,t)));let n=e.message.getEnvelope(),i=e.message.messageId(),r=[].concat(n.to||[]);r.length>3&&r.push("...and "+r.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:i,cid:this.id},"Sending message %s using #%s to <%s>",i,this.id,r.join(", ")),e.data.dsn&&(n.dsn=e.data.dsn),this.connection.send(n,e.message.createReadStream(),((e,r)=>{if(this.messages++,e)return this.connection.close(),this.emit("error",e),t(e);r.envelope={from:n.from,to:n.to},r.messageId=i,setImmediate((()=>{let e;this.messages>=this.options.maxMessages?(e=new Error("Resource exhausted"),e.code="EMAXLIMIT",this.connection.close(),this.emit("error",e)):this.pool._checkRateLimit((()=>{this.available=!0,this.emit("available")}))})),t(null,r)}))}close(){this._connected=!1,this.auth&&this.auth.oauth2&&this.auth.oauth2.removeAllListeners(),this.connection&&this.connection.close(),this.emit("close")}},poolResource}const Aliyun={domains:["aliyun.com"],host:"smtp.aliyun.com",port:465,secure:!0},AOL={domains:["aol.com"],host:"smtp.aol.com",port:587},Bluewin={host:"smtpauths.bluewin.ch",domains:["bluewin.ch"],port:465},DebugMail={host:"debugmail.io",port:25},DynectEmail={aliases:["Dynect"],host:"smtp.dynect.net",port:25},Ethereal={aliases:["ethereal.email"],host:"smtp.ethereal.email",port:587},FastMail={domains:["fastmail.fm"],host:"smtp.fastmail.com",port:465,secure:!0},GandiMail={aliases:["Gandi","Gandi Mail"],host:"mail.gandi.net",port:587},Gmail={aliases:["Google Mail"],domains:["gmail.com","googlemail.com"],host:"smtp.gmail.com",port:465,secure:!0},Godaddy={host:"smtpout.secureserver.net",port:25},GodaddyAsia={host:"smtp.asia.secureserver.net",port:25},GodaddyEurope={host:"smtp.europe.secureserver.net",port:25},Hotmail={aliases:["Outlook","Outlook.com","Hotmail.com"],domains:["hotmail.com","outlook.com"],host:"smtp-mail.outlook.com",port:587},iCloud={aliases:["Me","Mac"],domains:["me.com","mac.com"],host:"smtp.mail.me.com",port:587},Infomaniak={host:"mail.infomaniak.com",domains:["ik.me","ikmail.com","etik.com"],port:587},Loopia={host:"mailcluster.loopia.se",port:465},Maildev={port:1025,ignoreTLS:!0},Mailgun={host:"smtp.mailgun.org",port:465,secure:!0},Mailjet={host:"in.mailjet.com",port:587},Mailosaur={host:"mailosaur.io",port:25},Mailtrap={host:"live.smtp.mailtrap.io",port:587},Mandrill={host:"smtp.mandrillapp.com",port:587},Naver={host:"smtp.naver.com",port:587},One={host:"send.one.com",port:465,secure:!0},OpenMailBox={aliases:["OMB","openmailbox.org"],host:"smtp.openmailbox.org",port:465,secure:!0},Outlook365={host:"smtp.office365.com",port:587,secure:!1},OhMySMTP={host:"smtp.ohmysmtp.com",port:587,secure:!1},Postmark={aliases:["PostmarkApp"],host:"smtp.postmarkapp.com",port:2525},QQ={domains:["qq.com"],host:"smtp.qq.com",port:465,secure:!0},QQex={aliases:["QQ Enterprise"],domains:["exmail.qq.com"],host:"smtp.exmail.qq.com",port:465,secure:!0},SendCloud={host:"smtp.sendcloud.net",port:2525},SendGrid={host:"smtp.sendgrid.net",port:587},SendinBlue={aliases:["Brevo"],host:"smtp-relay.brevo.com",port:587},SendPulse={host:"smtp-pulse.com",port:465,secure:!0},SES={host:"email-smtp.us-east-1.amazonaws.com",port:465,secure:!0},Sparkpost={aliases:["SparkPost","SparkPost Mail"],domains:["sparkpost.com"],host:"smtp.sparkpostmail.com",port:587,secure:!1},Tipimail={host:"smtp.tipimail.com",port:587},Yahoo={domains:["yahoo.com"],host:"smtp.mail.yahoo.com",port:465,secure:!0},Yandex={domains:["yandex.ru"],host:"smtp.yandex.ru",port:465,secure:!0},Zoho={host:"smtp.zoho.com",port:465,secure:!0,authMethod:"LOGIN"};var require$$0$1={126:{host:"smtp.126.com",port:465,secure:!0},163:{host:"smtp.163.com",port:465,secure:!0},"1und1":{host:"smtp.1und1.de",port:465,secure:!0,authMethod:"LOGIN"},Aliyun:Aliyun,AOL:AOL,Bluewin:Bluewin,DebugMail:DebugMail,DynectEmail:DynectEmail,Ethereal:Ethereal,FastMail:FastMail,"Forward Email":{aliases:["FE","ForwardEmail"],domains:["forwardemail.net"],host:"smtp.forwardemail.net",port:465,secure:!0},"Feishu Mail":{aliases:["Feishu","FeishuMail"],domains:["www.feishu.cn"],host:"smtp.feishu.cn",port:465,secure:!0},GandiMail:GandiMail,Gmail:Gmail,Godaddy:Godaddy,GodaddyAsia:GodaddyAsia,GodaddyEurope:GodaddyEurope,"hot.ee":{host:"mail.hot.ee"},Hotmail:Hotmail,iCloud:iCloud,Infomaniak:Infomaniak,Loopia:Loopia,"mail.ee":{host:"smtp.mail.ee"},"Mail.ru":{host:"smtp.mail.ru",port:465,secure:!0},"Mailcatch.app":{host:"sandbox-smtp.mailcatch.app",port:2525},Maildev:Maildev,Mailgun:Mailgun,Mailjet:Mailjet,Mailosaur:Mailosaur,Mailtrap:Mailtrap,Mandrill:Mandrill,Naver:Naver,One:One,OpenMailBox:OpenMailBox,Outlook365:Outlook365,OhMySMTP:OhMySMTP,Postmark:Postmark,"qiye.aliyun":{host:"smtp.mxhichina.com",port:"465",secure:!0},QQ:QQ,QQex:QQex,SendCloud:SendCloud,SendGrid:SendGrid,SendinBlue:SendinBlue,SendPulse:SendPulse,SES:SES,"SES-US-EAST-1":{host:"email-smtp.us-east-1.amazonaws.com",port:465,secure:!0},"SES-US-WEST-2":{host:"email-smtp.us-west-2.amazonaws.com",port:465,secure:!0},"SES-EU-WEST-1":{host:"email-smtp.eu-west-1.amazonaws.com",port:465,secure:!0},"SES-AP-SOUTH-1":{host:"email-smtp.ap-south-1.amazonaws.com",port:465,secure:!0},"SES-AP-NORTHEAST-1":{host:"email-smtp.ap-northeast-1.amazonaws.com",port:465,secure:!0},"SES-AP-NORTHEAST-2":{host:"email-smtp.ap-northeast-2.amazonaws.com",port:465,secure:!0},"SES-AP-NORTHEAST-3":{host:"email-smtp.ap-northeast-3.amazonaws.com",port:465,secure:!0},"SES-AP-SOUTHEAST-1":{host:"email-smtp.ap-southeast-1.amazonaws.com",port:465,secure:!0},"SES-AP-SOUTHEAST-2":{host:"email-smtp.ap-southeast-2.amazonaws.com",port:465,secure:!0},Sparkpost:Sparkpost,Tipimail:Tipimail,Yahoo:Yahoo,Yandex:Yandex,Zoho:Zoho},wellKnown,hasRequiredWellKnown,smtpPool,hasRequiredSmtpPool,smtpTransport,hasRequiredSmtpTransport,sendmailTransport,hasRequiredSendmailTransport,streamTransport,hasRequiredStreamTransport,jsonTransport,hasRequiredJsonTransport,sesTransport,hasRequiredSesTransport,hasRequiredNodemailer;function requireWellKnown(){if(hasRequiredWellKnown)return wellKnown;hasRequiredWellKnown=1;const e=require$$0$1,t={};function n(e){return e.replace(/[^a-zA-Z0-9.-]/g,"").toLowerCase()}function i(e){let t=["domains","aliases"],n={};return Object.keys(e).forEach((i=>{t.indexOf(i)<0&&(n[i]=e[i])})),n}return Object.keys(e).forEach((r=>{let o=e[r];t[n(r)]=i(o),[].concat(o.aliases||[]).forEach((e=>{t[n(e)]=i(o)})),[].concat(o.domains||[]).forEach((e=>{t[n(e)]=i(o)}))})),wellKnown=function(e){return e=n(e.split("@").pop()),t[e]||!1}}function requireSmtpPool(){if(hasRequiredSmtpPool)return smtpPool;hasRequiredSmtpPool=1;const e=require$$0$a,t=requirePoolResource(),n=requireSmtpConnection(),i=requireWellKnown(),r=requireShared(),o=require$$9;return smtpPool=class extends e{constructor(e){let t;super(),"string"==typeof(e=e||{})&&(e={url:e});let a=e.service;"function"==typeof e.getSocket&&(this.getSocket=e.getSocket),e.url&&(t=r.parseConnectionUrl(e.url),a=a||t.service),this.options=r.assign(!1,e,t,a&&i(a)),this.options.maxConnections=this.options.maxConnections||5,this.options.maxMessages=this.options.maxMessages||100,this.logger=r.getLogger(this.options,{component:this.options.component||"smtp-pool"});let s=new n(this.options);this.name="SMTP (pool)",this.version=o.version+"[client:"+s.version+"]",this._rateLimit={counter:0,timeout:null,waiting:[],checkpoint:!1,delta:Number(this.options.rateDelta)||1e3,limit:Number(this.options.rateLimit)||0},this._closed=!1,this._queue=[],this._connections=[],this._connectionCounter=0,this.idling=!0,setImmediate((()=>{this.idling&&this.emit("idle")}))}getSocket(e,t){return setImmediate((()=>t(null,!1)))}send(e,t){return!this._closed&&(this._queue.push({mail:e,requeueAttempts:0,callback:t}),this.idling&&this._queue.length>=this.options.maxConnections&&(this.idling=!1),setImmediate((()=>this._processMessages())),!0)}close(){let e,t=this._connections.length;if(this._closed=!0,clearTimeout(this._rateLimit.timeout),!t&&!this._queue.length)return;for(let n=t-1;n>=0;n--)this._connections[n]&&this._connections[n].available&&(e=this._connections[n],e.close(),this.logger.info({tnx:"connection",cid:e.id,action:"removed"},"Connection #%s removed",e.id));if(t&&!this._connections.length&&this.logger.debug({tnx:"connection"},"All connections removed"),!this._queue.length)return;let n=()=>{if(!this._queue.length)return void this.logger.debug({tnx:"connection"},"Pending queue entries cleared");let t=this._queue.shift();if(t&&"function"==typeof t.callback)try{t.callback(new Error("Connection pool was closed"))}catch(t){this.logger.error({err:t,tnx:"callback",cid:e.id},"Callback error for #%s: %s",e.id,t.message)}setImmediate(n)};setImmediate(n)}_processMessages(){let e,t,n;if(this._closed)return;if(!this._queue.length)return void(this.idling||(this.idling=!0,this.emit("idle")));for(t=0,n=this._connections.length;t<n;t++)if(this._connections[t].available){e=this._connections[t];break}if(!e&&this._connections.length<this.options.maxConnections&&(e=this._createConnection()),!e)return void(this.idling=!1);!this.idling&&this._queue.length<this.options.maxConnections&&(this.idling=!0,this.emit("idle"));let i=e.queueEntry=this._queue.shift();i.messageId=(e.queueEntry.mail.message.getHeader("message-id")||"").replace(/[<>\s]/g,""),e.available=!1,this.logger.debug({tnx:"pool",cid:e.id,messageId:i.messageId,action:"assign"},"Assigned message <%s> to #%s (%s)",i.messageId,e.id,e.messages+1),this._rateLimit.limit&&(this._rateLimit.counter++,this._rateLimit.checkpoint||(this._rateLimit.checkpoint=Date.now())),e.send(i.mail,((t,n)=>{if(i===e.queueEntry){try{i.callback(t,n)}catch(t){this.logger.error({err:t,tnx:"callback",cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=!1}}))}_createConnection(){let e=new t(this);return e.id=++this._connectionCounter,this.logger.info({tnx:"pool",cid:e.id,action:"conection"},"Created new pool resource #%s",e.id),e.on("available",(()=>{this.logger.debug({tnx:"connection",cid:e.id,action:"available"},"Connection #%s became available",e.id),this._closed?this.close():this._processMessages()})),e.once("error",(t=>{if("EMAXLIMIT"!==t.code?this.logger.error({err:t,tnx:"pool",cid:e.id},"Pool Error for #%s: %s",e.id,t.message):this.logger.debug({tnx:"pool",cid:e.id,action:"maxlimit"},"Max messages limit exchausted for #%s",e.id),e.queueEntry){try{e.queueEntry.callback(t)}catch(t){this.logger.error({err:t,tnx:"callback",cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=!1}this._removeConnection(e),this._continueProcessing()})),e.once("close",(()=>{this.logger.info({tnx:"connection",cid:e.id,action:"closed"},"Connection #%s was closed",e.id),this._removeConnection(e),e.queueEntry?setTimeout((()=>{e.queueEntry&&(this._shouldRequeuOnConnectionClose(e.queueEntry)?this._requeueEntryOnConnectionClose(e):this._failDeliveryOnConnectionClose(e)),this._continueProcessing()}),50):this._continueProcessing()})),this._connections.push(e),e}_shouldRequeuOnConnectionClose(e){return void 0===this.options.maxRequeues||this.options.maxRequeues<0||e.requeueAttempts<this.options.maxRequeues}_failDeliveryOnConnectionClose(e){if(e.queueEntry&&e.queueEntry.callback){try{e.queueEntry.callback(new Error("Reached maximum number of retries after connection was closed"))}catch(t){this.logger.error({err:t,tnx:"callback",messageId:e.queueEntry.messageId,cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=!1}}_requeueEntryOnConnectionClose(e){e.queueEntry.requeueAttempts=e.queueEntry.requeueAttempts+1,this.logger.debug({tnx:"pool",cid:e.id,messageId:e.queueEntry.messageId,action:"requeue"},"Re-queued message <%s> for #%s. Attempt: #%s",e.queueEntry.messageId,e.id,e.queueEntry.requeueAttempts),this._queue.unshift(e.queueEntry),e.queueEntry=!1}_continueProcessing(){this._closed?this.close():setTimeout((()=>this._processMessages()),100)}_removeConnection(e){let t=this._connections.indexOf(e);-1!==t&&this._connections.splice(t,1)}_checkRateLimit(e){if(!this._rateLimit.limit)return e();let t=Date.now();return this._rateLimit.counter<this._rateLimit.limit?e():(this._rateLimit.waiting.push(e),this._rateLimit.checkpoint<=t-this._rateLimit.delta?this._clearRateLimit():void(this._rateLimit.timeout||(this._rateLimit.timeout=setTimeout((()=>this._clearRateLimit()),this._rateLimit.delta-(t-this._rateLimit.checkpoint)),this._rateLimit.checkpoint=t)))}_clearRateLimit(){for(clearTimeout(this._rateLimit.timeout),this._rateLimit.timeout=null,this._rateLimit.counter=0,this._rateLimit.checkpoint=!1;this._rateLimit.waiting.length;){let e=this._rateLimit.waiting.shift();setImmediate(e)}}isIdle(){return this.idling}verify(e){let i;e||(i=new Promise(((t,n)=>{e=r.callbackPromise(t,n)})));let o=new t(this).auth;return this.getSocket(this.options,((t,i)=>{if(t)return e(t);let a=this.options;i&&i.connection&&(this.logger.info({tnx:"proxy",remoteAddress:i.connection.remoteAddress,remotePort:i.connection.remotePort,destHost:a.host||"",destPort:a.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",i.connection.remoteAddress,i.connection.remotePort,a.host||"",a.port||""),a=r.assign(!1,a),Object.keys(i).forEach((e=>{a[e]=i[e]})));let s=new n(a),c=!1;s.once("error",(t=>{if(!c)return c=!0,s.close(),e(t)})),s.once("end",(()=>{if(!c)return c=!0,e(new Error("Connection closed"))}));let l=()=>{if(!c)return c=!0,s.quit(),e(null,!0)};s.connect((()=>{if(!c)if(o&&(s.allowsAuth||a.forceAuth))s.login(o,(t=>{if(!c)return t?(c=!0,s.close(),e(t)):void l()}));else{if(!o&&s.allowsAuth&&a.forceAuth){let t=new Error("Authentication info was not provided");return t.code="NoAuth",c=!0,s.close(),e(t)}l()}}))})),i}},smtpPool}function requireSmtpTransport(){if(hasRequiredSmtpTransport)return smtpTransport;hasRequiredSmtpTransport=1;const e=require$$0$a,t=requireSmtpConnection(),n=requireWellKnown(),i=requireShared(),r=requireXoauth2(),o=require$$9;return smtpTransport=class extends e{constructor(e){let r;super(),"string"==typeof(e=e||{})&&(e={url:e});let a=e.service;"function"==typeof e.getSocket&&(this.getSocket=e.getSocket),e.url&&(r=i.parseConnectionUrl(e.url),a=a||r.service),this.options=i.assign(!1,e,r,a&&n(a)),this.logger=i.getLogger(this.options,{component:this.options.component||"smtp-transport"});let s=new t(this.options);this.name="SMTP",this.version=o.version+"[client:"+s.version+"]",this.options.auth&&(this.auth=this.getAuth({}))}getSocket(e,t){return setImmediate((()=>t(null,!1)))}getAuth(e){if(!e)return this.auth;let t=!1,n={};if(this.options.auth&&"object"==typeof this.options.auth&&Object.keys(this.options.auth).forEach((e=>{t=!0,n[e]=this.options.auth[e]})),e&&"object"==typeof e&&Object.keys(e).forEach((i=>{t=!0,n[i]=e[i]})),!t)return!1;if("OAUTH2"===(n.type||"").toString().toUpperCase()){if(!n.service&&!n.user)return!1;let e=new r(n,this.logger);return e.provisionCallback=this.mailer&&this.mailer.get("oauth2_provision_cb")||e.provisionCallback,e.on("token",(e=>this.mailer.emit("token",e))),e.on("error",(e=>this.emit("error",e))),{type:"OAUTH2",user:n.user,oauth2:e,method:"XOAUTH2"}}return{type:(n.type||"").toString().toUpperCase()||"LOGIN",user:n.user,credentials:{user:n.user||"",pass:n.pass,options:n.options},method:(n.method||"").trim().toUpperCase()||this.options.authMethod||!1}}send(e,n){this.getSocket(this.options,((r,o)=>{if(r)return n(r);let a=!1,s=this.options;o&&o.connection&&(this.logger.info({tnx:"proxy",remoteAddress:o.connection.remoteAddress,remotePort:o.connection.remotePort,destHost:s.host||"",destPort:s.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",o.connection.remoteAddress,o.connection.remotePort,s.host||"",s.port||""),s=i.assign(!1,s),Object.keys(o).forEach((e=>{s[e]=o[e]})));let c=new t(s);c.once("error",(e=>{if(!a)return a=!0,c.close(),n(e)})),c.once("end",(()=>{if(a)return;let e=setTimeout((()=>{if(a)return;a=!0;let e=new Error("Unexpected socket close");c&&c._socket&&c._socket.upgrading&&(e.code="ETLS"),n(e)}),1e3);try{e.unref()}catch(e){}}));let l=()=>{let t=e.message.getEnvelope(),i=e.message.messageId(),r=[].concat(t.to||[]);r.length>3&&r.push("...and "+r.splice(2).length+" more"),e.data.dsn&&(t.dsn=e.data.dsn),this.logger.info({tnx:"send",messageId:i},"Sending message %s to <%s>",i,r.join(", ")),c.send(t,e.message.createReadStream(),((e,r)=>{if(a=!0,c.close(),e)return this.logger.error({err:e,tnx:"send"},"Send error for %s: %s",i,e.message),n(e);r.envelope={from:t.from,to:t.to},r.messageId=i;try{return n(null,r)}catch(e){this.logger.error({err:e,tnx:"callback"},"Callback error for %s: %s",i,e.message)}}))};c.connect((()=>{if(a)return;let t=this.getAuth(e.data.auth);t&&(c.allowsAuth||s.forceAuth)?c.login(t,(e=>{if(t&&t!==this.auth&&t.oauth2&&t.oauth2.removeAllListeners(),!a)return e?(a=!0,c.close(),n(e)):void l()})):l()}))}))}verify(e){let n;return e||(n=new Promise(((t,n)=>{e=i.callbackPromise(t,n)}))),this.getSocket(this.options,((n,r)=>{if(n)return e(n);let o=this.options;r&&r.connection&&(this.logger.info({tnx:"proxy",remoteAddress:r.connection.remoteAddress,remotePort:r.connection.remotePort,destHost:o.host||"",destPort:o.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",r.connection.remoteAddress,r.connection.remotePort,o.host||"",o.port||""),o=i.assign(!1,o),Object.keys(r).forEach((e=>{o[e]=r[e]})));let a=new t(o),s=!1;a.once("error",(t=>{if(!s)return s=!0,a.close(),e(t)})),a.once("end",(()=>{if(!s)return s=!0,e(new Error("Connection closed"))}));let c=()=>{if(!s)return s=!0,a.quit(),e(null,!0)};a.connect((()=>{if(s)return;let t=this.getAuth({});if(t&&(a.allowsAuth||o.forceAuth))a.login(t,(t=>{if(!s)return t?(s=!0,a.close(),e(t)):void c()}));else{if(!t&&a.allowsAuth&&o.forceAuth){let t=new Error("Authentication info was not provided");return t.code="NoAuth",s=!0,a.close(),e(t)}c()}}))})),n}close(){this.auth&&this.auth.oauth2&&this.auth.oauth2.removeAllListeners(),this.emit("close")}},smtpTransport}function requireSendmailTransport(){if(hasRequiredSendmailTransport)return sendmailTransport;hasRequiredSendmailTransport=1;const e=require$$0$b.spawn,t=require$$9,n=requireShared();return sendmailTransport=class{constructor(i){i=i||{},this._spawn=e,this.options=i||{},this.name="Sendmail",this.version=t.version,this.path="sendmail",this.args=!1,this.winbreak=!1,this.logger=n.getLogger(this.options,{component:this.options.component||"sendmail"}),i&&("string"==typeof i?this.path=i:"object"==typeof i&&(i.path&&(this.path=i.path),Array.isArray(i.args)&&(this.args=i.args),this.winbreak=["win","windows","dos","\r\n"].includes((i.newline||"").toString().toLowerCase())))}send(e,t){e.message.keepBcc=!0;let n,i,r,o=e.data.envelope||e.message.getEnvelope(),a=e.message.messageId();if([].concat(o.from||[]).concat(o.to||[]).some((e=>/^-/.test(e))))return t(new Error("Can not send mail. Invalid envelope addresses."));n=this.args?["-i"].concat(this.args).concat(o.to):["-i"].concat(o.from?["-f",o.from]:[]).concat(o.to);let s=n=>{if(!r)return r=!0,"function"==typeof t?n?t(n):t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:a,response:"Messages queued for delivery"}):void 0};try{i=this._spawn(this.path,n)}catch(e){return this.logger.error({err:e,tnx:"spawn",messageId:a},"Error occurred while spawning sendmail. %s",e.message),s(e)}if(!i)return s(new Error("sendmail was not found"));{i.on("error",(e=>{this.logger.error({err:e,tnx:"spawn",messageId:a},"Error occurred when sending message %s. %s",a,e.message),s(e)})),i.once("exit",(e=>{if(!e)return s();let t;t=127===e?new Error("Sendmail command not found, process exited with code "+e):new Error("Sendmail exited with code "+e),this.logger.error({err:t,tnx:"stdin",messageId:a},"Error sending message %s to sendmail. %s",a,t.message),s(t)})),i.once("close",s),i.stdin.on("error",(e=>{this.logger.error({err:e,tnx:"stdin",messageId:a},"Error occurred when piping message %s to sendmail. %s",a,e.message),s(e)}));let t=[].concat(o.to||[]);t.length>3&&t.push("...and "+t.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:a},"Sending message %s to <%s>",a,t.join(", "));let n=e.message.createReadStream();n.once("error",(e=>{this.logger.error({err:e,tnx:"stdin",messageId:a},"Error occurred when generating message %s. %s",a,e.message),i.kill("SIGINT"),s(e)})),n.pipe(i.stdin)}}},sendmailTransport}function requireStreamTransport(){if(hasRequiredStreamTransport)return streamTransport;hasRequiredStreamTransport=1;const e=require$$9,t=requireShared();return streamTransport=class{constructor(n){n=n||{},this.options=n||{},this.name="StreamTransport",this.version=e.version,this.logger=t.getLogger(this.options,{component:this.options.component||"stream-transport"}),this.winbreak=["win","windows","dos","\r\n"].includes((n.newline||"").toString().toLowerCase())}send(e,t){e.message.keepBcc=!0;let n=e.data.envelope||e.message.getEnvelope(),i=e.message.messageId(),r=[].concat(n.to||[]);r.length>3&&r.push("...and "+r.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:i},"Sending message %s to <%s> using %s line breaks",i,r.join(", "),this.winbreak?"<CR><LF>":"<LF>"),setImmediate((()=>{let n;try{n=e.message.createReadStream()}catch(e){return this.logger.error({err:e,tnx:"send",messageId:i},"Creating send stream failed for %s. %s",i,e.message),t(e)}if(!this.options.buffer)return n.once("error",(e=>{this.logger.error({err:e,tnx:"send",messageId:i},"Failed creating message for %s. %s",i,e.message)})),t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:i,message:n});let r=[],o=0;n.on("readable",(()=>{let e;for(;null!==(e=n.read());)r.push(e),o+=e.length})),n.once("error",(e=>(this.logger.error({err:e,tnx:"send",messageId:i},"Failed creating message for %s. %s",i,e.message),t(e)))),n.on("end",(()=>t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:i,message:Buffer.concat(r,o)})))}))}},streamTransport}function requireJsonTransport(){if(hasRequiredJsonTransport)return jsonTransport;hasRequiredJsonTransport=1;const e=require$$9,t=requireShared();return jsonTransport=class{constructor(n){n=n||{},this.options=n||{},this.name="JSONTransport",this.version=e.version,this.logger=t.getLogger(this.options,{component:this.options.component||"json-transport"})}send(e,t){e.message.keepBcc=!0;let n=e.data.envelope||e.message.getEnvelope(),i=e.message.messageId(),r=[].concat(n.to||[]);r.length>3&&r.push("...and "+r.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:i},"Composing JSON structure of %s to <%s>",i,r.join(", ")),setImmediate((()=>{e.normalize(((e,r)=>e?(this.logger.error({err:e,tnx:"send",messageId:i},"Failed building JSON structure for %s. %s",i,e.message),t(e)):(delete r.envelope,delete r.normalizedHeaders,t(null,{envelope:n,messageId:i,message:this.options.skipEncoding?r:JSON.stringify(r)}))))}))}}}function requireSesTransport(){if(hasRequiredSesTransport)return sesTransport;hasRequiredSesTransport=1;const e=require$$0$a,t=require$$9,n=requireShared(),i=requireLeWindows();return sesTransport=class extends e{constructor(e){super(),e=e||{},this.options=e||{},this.ses=this.options.SES,this.name="SESTransport",this.version=t.version,this.logger=n.getLogger(this.options,{component:this.options.component||"ses-transport"}),this.maxConnections=Number(this.options.maxConnections)||1/0,this.connections=0,this.sendingRate=Number(this.options.sendingRate)||1/0,this.sendingRateTTL=null,this.rateInterval=1e3,this.rateMessages=[],this.pending=[],this.idling=!0,setImmediate((()=>{this.idling&&this.emit("idle")}))}send(e,t){return this.connections>=this.maxConnections?(this.idling=!1,this.pending.push({mail:e,callback:t})):this._checkSendingRate()?void this._send(e,((...e)=>{setImmediate((()=>t(...e))),this._sent()})):(this.idling=!1,this.pending.push({mail:e,callback:t}))}_checkRatedQueue(){if(this.connections>=this.maxConnections||!this._checkSendingRate())return;if(!this.pending.length)return void(this.idling||(this.idling=!0,this.emit("idle")));let e=this.pending.shift();this._send(e.mail,((...t)=>{setImmediate((()=>e.callback(...t))),this._sent()}))}_checkSendingRate(){clearTimeout(this.sendingRateTTL);let e=Date.now(),t=!1;for(let n=this.rateMessages.length-1;n>=0;n--)this.rateMessages[n].ts>=e-this.rateInterval&&(!t||this.rateMessages[n].ts<t)&&(t=this.rateMessages[n].ts),this.rateMessages[n].ts<e-this.rateInterval&&!this.rateMessages[n].pending&&this.rateMessages.splice(n,1);if(this.rateMessages.length<this.sendingRate)return!0;let n=Math.max(t+1001,e+20);this.sendingRateTTL=setTimeout((()=>this._checkRatedQueue()),e-n);try{this.sendingRateTTL.unref()}catch(e){}return!1}_sent(){this.connections--,this._checkRatedQueue()}isIdle(){return this.idling}_send(e,t){let n={ts:Date.now(),pending:!0};this.connections++,this.rateMessages.push(n);let r=e.data.envelope||e.message.getEnvelope(),o=e.message.messageId(),a=[].concat(r.to||[]);a.length>3&&a.push("...and "+a.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:o},"Sending message %s to <%s>",o,a.join(", "));setImmediate((()=>(t=>{e.data._dkim||(e.data._dkim={}),e.data._dkim.skipFields&&"string"==typeof e.data._dkim.skipFields?e.data._dkim.skipFields+=":date:message-id":e.data._dkim.skipFields="date:message-id";let n=e.message.createReadStream(),r=n.pipe(new i),o=[],a=0;r.on("readable",(()=>{let e;for(;null!==(e=r.read());)o.push(e),a+=e.length})),n.once("error",(e=>r.emit("error",e))),r.once("error",(e=>{t(e)})),r.once("end",(()=>t(null,Buffer.concat(o,a))))})(((i,a)=>{if(i)return this.logger.error({err:i,tnx:"send",messageId:o},"Failed creating message for %s. %s",o,i.message),n.pending=!1,t(i);let s={RawMessage:{Data:a},Source:r.from,Destinations:r.to};Object.keys(e.data.ses||{}).forEach((t=>{s[t]=e.data.ses[t]}));let c=(this.ses.aws?this.ses.ses:this.ses)||{},l=this.ses.aws||{};var d;d=(e,i)=>{let d;!e&&i||(i="us-east-1"),d="function"==typeof c.send&&l.SendRawEmailCommand?c.send(new l.SendRawEmailCommand(s)):c.sendRawEmail(s).promise(),d.then((e=>{"us-east-1"===i&&(i="email"),n.pending=!1,t(null,{envelope:{from:r.from,to:r.to},messageId:"<"+e.MessageId+(/@/.test(e.MessageId)?"":"@"+i+".amazonses.com")+">",response:e.MessageId,raw:a})})).catch((e=>{this.logger.error({err:e,tnx:"send"},"Send error for %s: %s",o,e.message),n.pending=!1,t(e)}))},c.config&&"function"==typeof c.config.region?c.config.region().then((e=>d(null,e))).catch((e=>d(e))):d(null,c.config&&c.config.region||"us-east-1")}))))}verify(e){let t,i=(this.ses.aws?this.ses.ses:this.ses)||{},r=this.ses.aws||{};const o={RawMessage:{Data:"From: invalid@invalid\r\nTo: invalid@invalid\r\n Subject: Invalid\r\n\r\nInvalid"},Source:"invalid@invalid",Destinations:["invalid@invalid"]};e||(t=new Promise(((t,i)=>{e=n.callbackPromise(t,i)})));const a=t=>t&&"InvalidParameterValue"!==(t.code||t.Code)?e(t):e(null,!0);return"function"==typeof i.send&&r.SendRawEmailCommand?(o.RawMessage.Data=Buffer.from(o.RawMessage.Data),i.send(new r.SendRawEmailCommand(o),a)):i.sendRawEmail(o,a),t}},sesTransport}function requireNodemailer(){if(hasRequiredNodemailer)return nodemailer;hasRequiredNodemailer=1;const e=requireMailer(),t=requireShared(),n=requireSmtpPool(),i=requireSmtpTransport(),r=requireSendmailTransport(),o=requireStreamTransport(),a=requireJsonTransport(),s=requireSesTransport(),c=requireFetch(),l=require$$9,d=(process.env.ETHEREAL_API||"https://api.nodemailer.com").replace(/\/+$/,""),u=(process.env.ETHEREAL_WEB||"https://ethereal.email").replace(/\/+$/,""),p=(process.env.ETHEREAL_API_KEY||"").replace(/\s*/g,"")||null,m=["true","yes","y","1"].includes((process.env.ETHEREAL_CACHE||"yes").toString().trim().toLowerCase());let h=!1;return nodemailer.createTransport=function(c,l){let d,u,p;return("object"==typeof c&&"function"!=typeof c.send||"string"==typeof c&&/^(smtps?|direct):/i.test(c))&&(u=(d="string"==typeof c?c:c.url)?t.parseConnectionUrl(d):c,c=u.pool?new n(u):u.sendmail?new r(u):u.streamTransport?new o(u):u.jsonTransport?new a(u):u.SES?new s(u):new i(u)),p=new e(c,u,l),p},nodemailer.createTestAccount=function(e,n){let i;if(n||"function"!=typeof e||(n=e,e=!1),n||(i=new Promise(((e,i)=>{n=t.callbackPromise(e,i)}))),m&&h)return setImmediate((()=>n(null,h))),i;e=e||d;let r=[],o=0,a={},s={requestor:l.name,version:l.version};p&&(a.Authorization="Bearer "+p);let u=c(e+"/user",{contentType:"application/json",method:"POST",headers:a,body:Buffer.from(JSON.stringify(s))});return u.on("readable",(()=>{let e;for(;null!==(e=u.read());)r.push(e),o+=e.length})),u.once("error",(e=>n(e))),u.once("end",(()=>{let e,t,i=Buffer.concat(r,o);try{e=JSON.parse(i.toString())}catch(e){t=e}return t?n(t):"success"!==e.status||e.error?n(new Error(e.error||"Request failed")):(delete e.status,h=e,void n(null,h))})),i},nodemailer.getTestMessageUrl=function(e){if(!e||!e.response)return!1;let t=new Map;return e.response.replace(/\[([^\]]+)\]$/,((e,n)=>{n.replace(/\b([A-Z0-9]+)=([^\s]+)/g,((e,n,i)=>{t.set(n,i)}))})),!(!t.has("STATUS")||!t.has("MSGID"))&&(h.web||u)+"/message/"+t.get("MSGID")},nodemailer}var nodemailerExports=requireNodemailer();const DEFAULT_CLIENT_CONFIG={clientConfig:{region:"eu-west-1"}},sendMail=async(e,t,n,i)=>{if(!n.html&&!n.text)return e.logger&&e.logger("error","The option text or html needs to be set."),!1;if(!n.to||!n.subject)return e.logger&&e.logger("error","The fields to and subject have to be set."),!1;const r=await t.sendMail({from:i,...n});return e.logger&&e.logger("info",`Transporter response: ${JSON.stringify(r)}`),!!r||(e.logger&&e.logger("error","Sending email failed!"),!1)},ses=(e,t)=>{const{clientConfig:n,...i}={...DEFAULT_CLIENT_CONFIG,...t},r=new SESClient(n),o=nodemailerExports.createTransport(t.customSMTPConfig??{SES:{aws:aws,ses:r}});return{sendMail:t=>sendMail(i,o,t,e)}};var winston={},browser$3={},format$2,hasRequiredFormat$1;function requireFormat$1(){if(hasRequiredFormat$1)return format$2;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,n,r){return n=o(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,i()?Reflect.construct(n,r||[],o(t).constructor):n.apply(t,r))}function n(e){var t="function"==typeof Map?new Map:void 0;return n=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(i())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var a=new(e.bind.apply(e,o));return n&&r(a,n.prototype),a}(e,arguments,o(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),r(n,e)},n(e)}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}hasRequiredFormat$1=1;var a=function(e){function n(e){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),i=t(this,n,["Format functions must be synchronous taking a two arguments: (info, opts)\nFound: ".concat(e.toString().split("\n")[0],"\n")]),Error.captureStackTrace(i,n),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)}(n,e),function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(n)}(n(Error));return format$2=function(e){if(e.length>2)throw new a(e);function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=e}function n(e){return new t(e)}return t.prototype.transform=e,n.Format=t,n},format$2}var colorize={exports:{}},safe={exports:{}},colors={exports:{}},styles={exports:{}},hasRequiredStyles,hasFlag,hasRequiredHasFlag,supportsColors,hasRequiredSupportsColors;function requireStyles(){return hasRequiredStyles||(hasRequiredStyles=1,function(e){var t={};e.exports=t;var n={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(n).forEach((function(e){var i=n[e],r=t[e]=[];r.open="["+i[0]+"m",r.close="["+i[1]+"m"}))}(styles)),styles.exports}function requireHasFlag(){return hasRequiredHasFlag?hasFlag:(hasRequiredHasFlag=1,hasFlag=function(e,t){var n=(t=t||process.argv||[]).indexOf("--"),i=/^-{1,2}/.test(e)?"":"--",r=t.indexOf(i+e);return-1!==r&&(-1===n||r<n)})}function requireSupportsColors(){if(hasRequiredSupportsColors)return supportsColors;hasRequiredSupportsColors=1;var e=require$$0$7,t=requireHasFlag(),n=[],i=void 0;function r(r){var o=function(r){if(!1===i)return 0;if(t("color=16m")||t("color=full")||t("color=truecolor"))return 3;if(t("color=256"))return 2;if(r&&!r.isTTY&&!0!==i)return 0;var o=i?1:0;if("win32"===process.platform){var a=e.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in n)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((function(e){return e in n}))||"codeship"===n.CI_NAME?1:o;if("TEAMCITY_VERSION"in n)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(n.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in n){var s=parseInt((n.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(n.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(n.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(n.TERM)||"COLORTERM"in n?1:o}(r);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(o)}return t("no-color")||t("no-colors")||t("color=false")?i=!1:(t("color")||t("colors")||t("color=true")||t("color=always"))&&(i=!0),"FORCE_COLOR"in n&&(i=0===n.FORCE_COLOR.length||0!==parseInt(n.FORCE_COLOR,10)),supportsColors={supportsColor:r,stdout:r(process.stdout),stderr:r(process.stderr)}}var trap={exports:{}},hasRequiredTrap;function requireTrap(){return hasRequiredTrap||(hasRequiredTrap=1,function(e){e.exports=function(e,t){var n="";e=(e=e||"Run the trap, drop the bass").split("");var i={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};return e.forEach((function(e){e=e.toLowerCase();var t=i[e]||[" "],r=Math.floor(Math.random()*t.length);n+=void 0!==i[e]?i[e][r]:e})),n}}(trap)),trap.exports}var zalgo={exports:{}},hasRequiredZalgo;function requireZalgo(){return hasRequiredZalgo||(hasRequiredZalgo=1,function(e){e.exports=function(e,t){e=e||" he is here ";var n={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},i=[].concat(n.up,n.down,n.mid);function r(e){return Math.floor(Math.random()*e)}function o(e){var t=!1;return i.filter((function(n){t=n===e})),t}return function(e,t){var i,a,s="";for(a in(t=t||{}).up=void 0===t.up||t.up,t.mid=void 0===t.mid||t.mid,t.down=void 0===t.down||t.down,t.size=void 0!==t.size?t.size:"maxi",e=e.split(""))if(!o(a)){switch(s+=e[a],i={up:0,down:0,mid:0},t.size){case"mini":i.up=r(8),i.mid=r(2),i.down=r(8);break;case"maxi":i.up=r(16)+3,i.mid=r(4)+1,i.down=r(64)+3;break;default:i.up=r(8)+1,i.mid=r(6)/2,i.down=r(8)+1}var c=["up","mid","down"];for(var l in c)for(var d=c[l],u=0;u<=i[d];u++)t[d]&&(s+=n[d][r(n[d].length)])}return s}(e,t)}}(zalgo)),zalgo.exports}var america={exports:{}},hasRequiredAmerica;function requireAmerica(){return hasRequiredAmerica||(hasRequiredAmerica=1,function(e){e.exports=function(e){return function(t,n,i){if(" "===t)return t;switch(n%3){case 0:return e.red(t);case 1:return e.white(t);case 2:return e.blue(t)}}}}(america)),america.exports}var zebra={exports:{}},hasRequiredZebra;function requireZebra(){return hasRequiredZebra||(hasRequiredZebra=1,function(e){e.exports=function(e){return function(t,n,i){return n%2==0?t:e.inverse(t)}}}(zebra)),zebra.exports}var rainbow={exports:{}},hasRequiredRainbow;function requireRainbow(){return hasRequiredRainbow||(hasRequiredRainbow=1,function(e){e.exports=function(e){var t=["red","yellow","green","blue","magenta"];return function(n,i,r){return" "===n?n:e[t[i++%t.length]](n)}}}(rainbow)),rainbow.exports}var random={exports:{}},hasRequiredRandom,hasRequiredColors,hasRequiredSafe;function requireRandom(){return hasRequiredRandom||(hasRequiredRandom=1,function(e){e.exports=function(e){var t=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(n,i,r){return" "===n?n:e[t[Math.round(Math.random()*(t.length-2))]](n)}}}(random)),random.exports}function requireColors(){return hasRequiredColors||(hasRequiredColors=1,function(e){var t={};e.exports=t,t.themes={};var n=require$$0$8,i=t.styles=requireStyles(),r=Object.defineProperties,o=new RegExp(/[\r\n]+/g);t.supportsColor=requireSupportsColors().supportsColor,void 0===t.enabled&&(t.enabled=!1!==t.supportsColor()),t.enable=function(){t.enabled=!0},t.disable=function(){t.enabled=!1},t.stripColors=t.strip=function(e){return(""+e).replace(/\x1B\[\d+m/g,"")},t.stylize=function(e,n){if(!t.enabled)return e+"";var r=i[n];return!r&&n in t?t[n](e):r.open+e+r.close};var a=/[|\\{}()[\]^$+*?.]/g;function s(e){var t=function e(){return u.apply(e,arguments)};return t._styles=e,t.__proto__=d,t}var c,l=(c={},i.grey=i.gray,Object.keys(i).forEach((function(e){i[e].closeRe=new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(a,"\\$&")}(i[e].close),"g"),c[e]={get:function(){return s(this._styles.concat(e))}}})),c),d=r((function(){}),l);function u(){var e=Array.prototype.slice.call(arguments).map((function(e){return null!=e&&e.constructor===String?e:n.inspect(e)})).join(" ");if(!t.enabled||!e)return e;for(var r=-1!=e.indexOf("\n"),a=this._styles,s=a.length;s--;){var c=i[a[s]];e=c.open+e.replace(c.closeRe,c.open)+c.close,r&&(e=e.replace(o,(function(e){return c.close+e+c.open})))}return e}t.setTheme=function(e){if("string"!=typeof e)for(var n in e)!function(n){t[n]=function(i){if("object"==typeof e[n]){var r=i;for(var o in e[n])r=t[e[n][o]](r);return r}return t[e[n]](i)}}(n);else console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));")};var p=function(e,t){var n=t.split("");return(n=n.map(e)).join("")};for(var m in t.trap=requireTrap(),t.zalgo=requireZalgo(),t.maps={},t.maps.america=requireAmerica()(t),t.maps.zebra=requireZebra()(t),t.maps.rainbow=requireRainbow()(t),t.maps.random=requireRandom()(t),t.maps)!function(e){t[e]=function(n){return p(t.maps[e],n)}}(m);r(t,function(){var e={};return Object.keys(l).forEach((function(t){e[t]={get:function(){return s([t])}}})),e}())}(colors)),colors.exports}function requireSafe(){return hasRequiredSafe||(hasRequiredSafe=1,function(e){var t=requireColors();e.exports=t}(safe)),safe.exports}var tripleBeam={},config$1={},cli$1={},hasRequiredCli$1;function requireCli$1(){return hasRequiredCli$1||(hasRequiredCli$1=1,cli$1.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9},cli$1.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}),cli$1}var npm={},hasRequiredNpm;function requireNpm(){return hasRequiredNpm||(hasRequiredNpm=1,npm.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6},npm.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}),npm}var syslog={},hasRequiredSyslog,hasRequiredConfig$1,hasRequiredTripleBeam,hasRequiredColorize,levels,hasRequiredLevels,align,hasRequiredAlign;function requireSyslog(){return hasRequiredSyslog||(hasRequiredSyslog=1,syslog.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7},syslog.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}),syslog}function requireConfig$1(){return hasRequiredConfig$1||(hasRequiredConfig$1=1,function(e){Object.defineProperty(e,"cli",{value:requireCli$1()}),Object.defineProperty(e,"npm",{value:requireNpm()}),Object.defineProperty(e,"syslog",{value:requireSyslog()})}(config$1)),config$1}function requireTripleBeam(){return hasRequiredTripleBeam||(hasRequiredTripleBeam=1,function(e){Object.defineProperty(e,"LEVEL",{value:Symbol.for("level")}),Object.defineProperty(e,"MESSAGE",{value:Symbol.for("message")}),Object.defineProperty(e,"SPLAT",{value:Symbol.for("splat")}),Object.defineProperty(e,"configs",{value:requireConfig$1()})}(tripleBeam)),tripleBeam}function requireColorize(){if(hasRequiredColorize)return colorize.exports;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}hasRequiredColorize=1;var i=requireSafe(),r=requireTripleBeam(),o=r.LEVEL,a=r.MESSAGE;i.enabled=!0;var s=/\s+/,c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t.colors&&this.addColors(t.colors),this.options=t}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"addColors",value:function(t){return e.addColors(t)}},{key:"colorize",value:function(t,n,r){if(void 0===r&&(r=n),!Array.isArray(e.allColors[t]))return i[e.allColors[t]](r);for(var o=0,a=e.allColors[t].length;o<a;o++)r=i[e.allColors[t][o]](r);return r}},{key:"transform",value:function(e,t){return t.all&&"string"==typeof e[a]&&(e[a]=this.colorize(e[o],e.level,e[a])),(t.level||t.all||!t.message)&&(e.level=this.colorize(e[o],e.level)),(t.all||t.message)&&(e.message=this.colorize(e[o],e.level,e.message)),e}}],[{key:"addColors",value:function(t){var n=Object.keys(t).reduce((function(e,n){return e[n]=s.test(t[n])?t[n].split(s):t[n],e}),{});return e.allColors=Object.assign({},e.allColors||{},n),e.allColors}}])}();return colorize.exports=function(e){return new c(e)},colorize.exports.Colorizer=colorize.exports.Format=c,colorize.exports}function requireLevels(){if(hasRequiredLevels)return levels;hasRequiredLevels=1;var e=requireColorize().Colorizer;return levels=function(t){return e.addColors(t.colors||t),t},levels}function requireAlign(){if(hasRequiredAlign)return align;hasRequiredAlign=1;var e=requireFormat$1();return align=e((function(e){return e.message="\t".concat(e.message),e}))}var cli={exports:{}},padLevels={exports:{}},hasRequiredPadLevels,hasRequiredCli;function requirePadLevels(){if(hasRequiredPadLevels)return padLevels.exports;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function i(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,r(i.key),i)}}function r(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}hasRequiredPadLevels=1;var o=requireTripleBeam(),a=o.configs,s=o.LEVEL,c=o.MESSAGE,l=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{levels:a.npm.levels};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.paddings=e.paddingForLevels(t.levels,t.filler),this.options=t}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"transform",value:function(e,t){return e.message="".concat(this.paddings[e[s]]).concat(e.message),e[c]&&(e[c]="".concat(this.paddings[e[s]]).concat(e[c])),e}}],[{key:"getLongestLevel",value:function(e){var n=Object.keys(e).map((function(e){return e.length}));return Math.max.apply(Math,t(n))}},{key:"paddingForLevel",value:function(e,t,n){var i=n+1-e.length,r=Math.floor(i/t.length);return"".concat(t).concat(t.repeat(r)).slice(0,i)}},{key:"paddingForLevels",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ",i=e.getLongestLevel(t);return Object.keys(t).reduce((function(t,r){return t[r]=e.paddingForLevel(r,n,i),t}),{})}}])}();return padLevels.exports=function(e){return new l(e)},padLevels.exports.Padder=padLevels.exports.Format=l,padLevels.exports}function requireCli(){if(hasRequiredCli)return cli.exports;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}hasRequiredCli=1;var i=requireColorize().Colorizer,r=requirePadLevels().Padder,o=requireTripleBeam(),a=o.configs,s=o.MESSAGE,c=function(){return t((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t.levels||(t.levels=a.cli.levels),this.colorizer=new i(t),this.padder=new r(t),this.options=t}),[{key:"transform",value:function(e,t){return this.colorizer.transform(this.padder.transform(e,t),t),e[s]="".concat(e.level,":").concat(e.message),e}}])}();return cli.exports=function(e){return new c(e)},cli.exports.Format=c,cli.exports}var combine={exports:{}},hasRequiredCombine,errors,hasRequiredErrors;function requireCombine(){if(hasRequiredCombine)return combine.exports;hasRequiredCombine=1;var e=requireFormat$1();function t(e){if(e.every(n))return function(t){for(var n=t,i=0;i<e.length;i++)if(!(n=e[i].transform(n,e[i].options)))return!1;return n}}function n(e){if("function"!=typeof e.transform)throw new Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join("\n"));return!0}return combine.exports=function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];var o=e(t(i)),a=o();return a.Format=o.Format,a},combine.exports.cascade=t,combine.exports}function requireErrors(){if(hasRequiredErrors)return errors;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,n,i){return(n=function(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n||"default");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}(n))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}hasRequiredErrors=1;var n=requireFormat$1(),i=requireTripleBeam(),r=i.LEVEL,o=i.MESSAGE;return errors=n((function(e,n){var i=n.stack,a=n.cause;if(e instanceof Error){var s=Object.assign({},e,t(t(t({level:e.level},r,e[r]||e.level),"message",e.message),o,e[o]||e.message));return i&&(s.stack=e.stack),a&&(s.cause=e.cause),s}if(!(e.message instanceof Error))return e;var c=e.message;return Object.assign(e,c),e.message=c.message,e[o]=c.message,i&&(e.stack=c.stack),a&&(e.cause=c.cause),e}))}var safeStableStringify={exports:{}},hasRequiredSafeStableStringify,json$1,hasRequiredJson$1,label,hasRequiredLabel,logstash,hasRequiredLogstash,metadata,hasRequiredMetadata,ms,hasRequiredMs$1,ms_1,hasRequiredMs,prettyPrint,hasRequiredPrettyPrint;function requireSafeStableStringify(){return hasRequiredSafeStableStringify||(hasRequiredSafeStableStringify=1,function(e,t){const{hasOwnProperty:n}=Object.prototype,i=p();i.configure=p,i.stringify=i,i.default=i,t.stringify=i,t.configure=p,e.exports=i;const r=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function o(e){return e.length<5e3&&!r.test(e)?`"${e}"`:JSON.stringify(e)}function a(e,t){if(e.length>200||t)return e.sort(t);for(let t=1;t<e.length;t++){const n=e[t];let i=t;for(;0!==i&&e[i-1]>n;)e[i]=e[i-1],i--;e[i]=n}return e}const s=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function c(e){return void 0!==s.call(e)&&0!==e.length}function l(e,t,n){e.length<n&&(n=e.length);const i=","===t?"":" ";let r=`"0":${i}${e[0]}`;for(let o=1;o<n;o++)r+=`${t}"${o}":${i}${e[o]}`;return r}function d(e,t){let i;if(n.call(e,t)){if(i=e[t],"number"!=typeof i)throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(i))throw new TypeError(`The "${t}" argument must be an integer`);if(i<1)throw new RangeError(`The "${t}" argument must be >= 1`)}return void 0===i?1/0:i}function u(e){return 1===e?"1 item":`${e} items`}function p(e){const t=function(e){if(n.call(e,"strict")){const t=e.strict;if("boolean"!=typeof t)throw new TypeError('The "strict" argument must be of type boolean');if(t)return e=>{let t="Object can not safely be stringified. Received type "+typeof e;throw"function"!=typeof e&&(t+=` (${e.toString()})`),new Error(t)}}}(e={...e});t&&(void 0===e.bigint&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));const i=function(e){if(n.call(e,"circularValue")){const t=e.circularValue;if("string"==typeof t)return`"${t}"`;if(null==t)return t;if(t===Error||t===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}(e),r=function(e,t){let i;if(n.call(e,t)&&(i=e[t],"boolean"!=typeof i))throw new TypeError(`The "${t}" argument must be of type boolean`);return void 0===i||i}(e,"bigint"),s=function(e){let t;if(n.call(e,"deterministic")&&(t=e.deterministic,"boolean"!=typeof t&&"function"!=typeof t))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return void 0===t||t}(e),p="function"==typeof s?s:void 0,m=d(e,"maximumDepth"),h=d(e,"maximumBreadth");function f(e,n,l,d,g,y){let v=n[e];switch("object"==typeof v&&null!==v&&"function"==typeof v.toJSON&&(v=v.toJSON(e)),v=d.call(n,e,v),typeof v){case"string":return o(v);case"object":{if(null===v)return"null";if(-1!==l.indexOf(v))return i;let e="",t=",";const n=y;if(Array.isArray(v)){if(0===v.length)return"[]";if(m<l.length+1)return'"[Array]"';l.push(v),""!==g&&(e+=`\n${y+=g}`,t=`,\n${y}`);const i=Math.min(v.length,h);let r=0;for(;r<i-1;r++){const n=f(String(r),v,l,d,g,y);e+=void 0!==n?n:"null",e+=t}const o=f(String(r),v,l,d,g,y);if(e+=void 0!==o?o:"null",v.length-1>h){e+=`${t}"... ${u(v.length-h-1)} not stringified"`}return""!==g&&(e+=`\n${n}`),l.pop(),`[${e}]`}let r=Object.keys(v);const _=r.length;if(0===_)return"{}";if(m<l.length+1)return'"[Object]"';let E="",x="";""!==g&&(t=`,\n${y+=g}`,E=" ");const S=Math.min(_,h);s&&!c(v)&&(r=a(r,p)),l.push(v);for(let n=0;n<S;n++){const i=r[n],a=f(i,v,l,d,g,y);void 0!==a&&(e+=`${x}${o(i)}:${E}${a}`,x=t)}if(_>h){e+=`${x}"...":${E}"${u(_-h)} not stringified"`,x=t}return""!==g&&x.length>1&&(e=`\n${y}${e}\n${n}`),l.pop(),`{${e}}`}case"number":return isFinite(v)?String(v):t?t(v):"null";case"boolean":return!0===v?"true":"false";case"undefined":return;case"bigint":if(r)return String(v);default:return t?t(v):void 0}}function g(e,n,a,s,c,l){switch("object"==typeof n&&null!==n&&"function"==typeof n.toJSON&&(n=n.toJSON(e)),typeof n){case"string":return o(n);case"object":{if(null===n)return"null";if(-1!==a.indexOf(n))return i;const e=l;let t="",r=",";if(Array.isArray(n)){if(0===n.length)return"[]";if(m<a.length+1)return'"[Array]"';a.push(n),""!==c&&(t+=`\n${l+=c}`,r=`,\n${l}`);const i=Math.min(n.length,h);let o=0;for(;o<i-1;o++){const e=g(String(o),n[o],a,s,c,l);t+=void 0!==e?e:"null",t+=r}const d=g(String(o),n[o],a,s,c,l);if(t+=void 0!==d?d:"null",n.length-1>h){t+=`${r}"... ${u(n.length-h-1)} not stringified"`}return""!==c&&(t+=`\n${e}`),a.pop(),`[${t}]`}a.push(n);let d="";""!==c&&(r=`,\n${l+=c}`,d=" ");let p="";for(const e of s){const i=g(e,n[e],a,s,c,l);void 0!==i&&(t+=`${p}${o(e)}:${d}${i}`,p=r)}return""!==c&&p.length>1&&(t=`\n${l}${t}\n${e}`),a.pop(),`{${t}}`}case"number":return isFinite(n)?String(n):t?t(n):"null";case"boolean":return!0===n?"true":"false";case"undefined":return;case"bigint":if(r)return String(n);default:return t?t(n):void 0}}function y(e,n,d,f,g){switch(typeof n){case"string":return o(n);case"object":{if(null===n)return"null";if("function"==typeof n.toJSON){if("object"!=typeof(n=n.toJSON(e)))return y(e,n,d,f,g);if(null===n)return"null"}if(-1!==d.indexOf(n))return i;const t=g;if(Array.isArray(n)){if(0===n.length)return"[]";if(m<d.length+1)return'"[Array]"';d.push(n);let e=`\n${g+=f}`;const i=`,\n${g}`,r=Math.min(n.length,h);let o=0;for(;o<r-1;o++){const t=y(String(o),n[o],d,f,g);e+=void 0!==t?t:"null",e+=i}const a=y(String(o),n[o],d,f,g);if(e+=void 0!==a?a:"null",n.length-1>h){e+=`${i}"... ${u(n.length-h-1)} not stringified"`}return e+=`\n${t}`,d.pop(),`[${e}]`}let r=Object.keys(n);const v=r.length;if(0===v)return"{}";if(m<d.length+1)return'"[Object]"';const _=`,\n${g+=f}`;let E="",x="",S=Math.min(v,h);c(n)&&(E+=l(n,_,h),r=r.slice(n.length),S-=n.length,x=_),s&&(r=a(r,p)),d.push(n);for(let e=0;e<S;e++){const t=r[e],i=y(t,n[t],d,f,g);void 0!==i&&(E+=`${x}${o(t)}: ${i}`,x=_)}if(v>h){E+=`${x}"...": "${u(v-h)} not stringified"`,x=_}return""!==x&&(E=`\n${g}${E}\n${t}`),d.pop(),`{${E}}`}case"number":return isFinite(n)?String(n):t?t(n):"null";case"boolean":return!0===n?"true":"false";case"undefined":return;case"bigint":if(r)return String(n);default:return t?t(n):void 0}}function v(e,n,d){switch(typeof n){case"string":return o(n);case"object":{if(null===n)return"null";if("function"==typeof n.toJSON){if("object"!=typeof(n=n.toJSON(e)))return v(e,n,d);if(null===n)return"null"}if(-1!==d.indexOf(n))return i;let t="";const r=void 0!==n.length;if(r&&Array.isArray(n)){if(0===n.length)return"[]";if(m<d.length+1)return'"[Array]"';d.push(n);const e=Math.min(n.length,h);let i=0;for(;i<e-1;i++){const e=v(String(i),n[i],d);t+=void 0!==e?e:"null",t+=","}const r=v(String(i),n[i],d);if(t+=void 0!==r?r:"null",n.length-1>h){t+=`,"... ${u(n.length-h-1)} not stringified"`}return d.pop(),`[${t}]`}let f=Object.keys(n);const g=f.length;if(0===g)return"{}";if(m<d.length+1)return'"[Object]"';let y="",_=Math.min(g,h);r&&c(n)&&(t+=l(n,",",h),f=f.slice(n.length),_-=n.length,y=","),s&&(f=a(f,p)),d.push(n);for(let e=0;e<_;e++){const i=f[e],r=v(i,n[i],d);void 0!==r&&(t+=`${y}${o(i)}:${r}`,y=",")}if(g>h){t+=`${y}"...":"${u(g-h)} not stringified"`}return d.pop(),`{${t}}`}case"number":return isFinite(n)?String(n):t?t(n):"null";case"boolean":return!0===n?"true":"false";case"undefined":return;case"bigint":if(r)return String(n);default:return t?t(n):void 0}}return function(e,t,n){if(arguments.length>1){let i="";if("number"==typeof n?i=" ".repeat(Math.min(n,10)):"string"==typeof n&&(i=n.slice(0,10)),null!=t){if("function"==typeof t)return f("",{"":e},[],t,i,"");if(Array.isArray(t))return g("",e,[],function(e){const t=new Set;for(const n of e)"string"!=typeof n&&"number"!=typeof n||t.add(String(n));return t}(t),i,"")}if(0!==i.length)return y("",e,[],i,"")}return v("",e,[])}}}(safeStableStringify,safeStableStringify.exports)),safeStableStringify.exports}function requireJson$1(){if(hasRequiredJson$1)return json$1;hasRequiredJson$1=1;var e=requireFormat$1(),t=requireTripleBeam().MESSAGE,n=requireSafeStableStringify();function i(e,t){return"bigint"==typeof t?t.toString():t}return json$1=e((function(e,r){var o=n.configure(r);return e[t]=o(e,r.replacer||i,r.space),e}))}function requireLabel(){if(hasRequiredLabel)return label;hasRequiredLabel=1;var e=requireFormat$1();return label=e((function(e,t){return t.message?(e.message="[".concat(t.label,"] ").concat(e.message),e):(e.label=t.label,e)}))}function requireLogstash(){if(hasRequiredLogstash)return logstash;hasRequiredLogstash=1;var e=requireFormat$1(),t=requireTripleBeam().MESSAGE,n=requireSafeStableStringify();return logstash=e((function(e){var i={};return e.message&&(i["@message"]=e.message,delete e.message),e.timestamp&&(i["@timestamp"]=e.timestamp,delete e.timestamp),i["@fields"]=e,e[t]=n(i),e}))}function requireMetadata(){if(hasRequiredMetadata)return metadata;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,n,i){return(n=function(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n||"default");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}(n))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}hasRequiredMetadata=1;var n=requireFormat$1();return metadata=n((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i="metadata";n.key&&(i=n.key);var r=[];return n.fillExcept||n.fillWith||(r.push("level"),r.push("message")),n.fillExcept&&(r=n.fillExcept),r.length>0?function(e,n,i){var r=n.reduce((function(t,n){return t[n]=e[n],delete e[n],t}),{}),o=Object.keys(e).reduce((function(t,n){return t[n]=e[n],delete e[n],t}),{});return Object.assign(e,r,t({},i,o)),e}(e,r,i):n.fillWith?function(e,t,n){return e[n]=t.reduce((function(t,n){return t[n]=e[n],delete e[n],t}),{}),e}(e,n.fillWith,i):e})),metadata}function requireMs$1(){if(hasRequiredMs$1)return ms;hasRequiredMs$1=1;var e=1e3,t=60*e,n=60*t,i=24*n,r=7*i,o=365.25*i;function a(e,t,n,i){var r=t>=1.5*n;return Math.round(e/n)+" "+i+(r?"s":"")}return ms=function(s,c){c=c||{};var l=typeof s;if("string"===l&&s.length>0)return function(a){if((a=String(a)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(!s)return;var c=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*o;case"weeks":case"week":case"w":return c*r;case"days":case"day":case"d":return c*i;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*t;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(s);if("number"===l&&isFinite(s))return c.long?function(r){var o=Math.abs(r);if(o>=i)return a(r,o,i,"day");if(o>=n)return a(r,o,n,"hour");if(o>=t)return a(r,o,t,"minute");if(o>=e)return a(r,o,e,"second");return r+" ms"}(s):function(r){var o=Math.abs(r);if(o>=i)return Math.round(r/i)+"d";if(o>=n)return Math.round(r/n)+"h";if(o>=t)return Math.round(r/t)+"m";if(o>=e)return Math.round(r/e)+"s";return r+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))},ms}function requireMs(){if(hasRequiredMs)return ms_1;hasRequiredMs=1;var e=void 0,t=requireFormat$1(),n=requireMs$1();return ms_1=t((function(t){var i=+new Date;return e.diff=i-(e.prevTime||i),e.prevTime=i,t.ms="+".concat(n(e.diff)),t}))}function requirePrettyPrint(){if(hasRequiredPrettyPrint)return prettyPrint;hasRequiredPrettyPrint=1;var e=require$$0$8.inspect,t=requireFormat$1(),n=requireTripleBeam(),i=n.LEVEL,r=n.MESSAGE,o=n.SPLAT;return prettyPrint=t((function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=Object.assign({},t);return delete a[i],delete a[r],delete a[o],t[r]=e(a,!1,n.depth||null,n.colorize),t})),prettyPrint}var printf={exports:{}},hasRequiredPrintf,simple,hasRequiredSimple,splat,hasRequiredSplat;function requirePrintf(){if(hasRequiredPrintf)return printf.exports;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}hasRequiredPrintf=1;var i=requireTripleBeam().MESSAGE,r=function(){return t((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.template=t}),[{key:"transform",value:function(e){return e[i]=this.template(e),e}}])}();return printf.exports=function(e){return new r(e)},printf.exports.Printf=printf.exports.Format=r,printf.exports}function requireSimple(){if(hasRequiredSimple)return simple;hasRequiredSimple=1;var e=requireFormat$1(),t=requireTripleBeam().MESSAGE,n=requireSafeStableStringify();return simple=e((function(e){var i=n(Object.assign({},e,{level:void 0,message:void 0,splat:void 0})),r=e.padding&&e.padding[e.level]||"";return e[t]="{}"!==i?"".concat(e.level,":").concat(r," ").concat(e.message," ").concat(i):"".concat(e.level,":").concat(r," ").concat(e.message),e}))}function requireSplat(){if(hasRequiredSplat)return splat;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function i(e,t,n){return t&&function(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,r(i.key),i)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function r(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}hasRequiredSplat=1;var o=require$$0$8,a=requireTripleBeam().SPLAT,s=/%[scdjifoO%]/g,c=/%%/g,l=function(){return i((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t}),[{key:"_splat",value:function(e,n){var i=e.message,r=e[a]||e.splat||[],s=i.match(c),l=s&&s.length||0,d=n.length-l-r.length,u=d<0?r.splice(d,-1*d):[],p=u.length;if(p)for(var m=0;m<p;m++)Object.assign(e,u[m]);return e.message=o.format.apply(o,[i].concat(t(r))),e}},{key:"transform",value:function(e){var t=e.message,n=e[a]||e.splat;if(!n||!n.length)return e;var i=t&&t.match&&t.match(s);if(!i&&(n||n.length)){var r=n.length>1?n.splice(0):n,o=r.length;if(o)for(var c=0;c<o;c++)Object.assign(e,r[c]);return e}return i?this._splat(e,i):e}}])}();return splat=function(e){return new l(e)}}var token=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,twoDigitsOptional="\\d\\d?",twoDigits="\\d\\d",threeDigits="\\d{3}",fourDigits="\\d{4}",word="[^\\s]+",literal=/\[([^]*?)\]/gm;function shorten(e,t){for(var n=[],i=0,r=e.length;i<r;i++)n.push(e[i].substr(0,t));return n}var monthUpdate=function(e){return function(t,n){var i=n[e].map((function(e){return e.toLowerCase()})),r=i.indexOf(t.toLowerCase());return r>-1?r:null}};function assign(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=0,r=t;i<r.length;i++){var o=r[i];for(var a in o)e[a]=o[a]}return e}var dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort=shorten(monthNames,3),dayNamesShort=shorten(dayNames,3),defaultI18n={dayNamesShort:dayNamesShort,dayNames:dayNames,monthNamesShort:monthNamesShort,monthNames:monthNames,amPm:["am","pm"],DoFn:function(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!=10?1:0)*e%10]}},globalI18n=assign({},defaultI18n),setGlobalDateI18n=function(e){return globalI18n=assign(globalI18n,e)},regexEscape=function(e){return e.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},pad=function(e,t){for(void 0===t&&(t=2),e=String(e);e.length<t;)e="0"+e;return e},formatFlags={D:function(e){return String(e.getDate())},DD:function(e){return pad(e.getDate())},Do:function(e,t){return t.DoFn(e.getDate())},d:function(e){return String(e.getDay())},dd:function(e){return pad(e.getDay())},ddd:function(e,t){return t.dayNamesShort[e.getDay()]},dddd:function(e,t){return t.dayNames[e.getDay()]},M:function(e){return String(e.getMonth()+1)},MM:function(e){return pad(e.getMonth()+1)},MMM:function(e,t){return t.monthNamesShort[e.getMonth()]},MMMM:function(e,t){return t.monthNames[e.getMonth()]},YY:function(e){return pad(String(e.getFullYear()),4).substr(2)},YYYY:function(e){return pad(e.getFullYear(),4)},h:function(e){return String(e.getHours()%12||12)},hh:function(e){return pad(e.getHours()%12||12)},H:function(e){return String(e.getHours())},HH:function(e){return pad(e.getHours())},m:function(e){return String(e.getMinutes())},mm:function(e){return pad(e.getMinutes())},s:function(e){return String(e.getSeconds())},ss:function(e){return pad(e.getSeconds())},S:function(e){return String(Math.round(e.getMilliseconds()/100))},SS:function(e){return pad(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return pad(e.getMilliseconds(),3)},a:function(e,t){return e.getHours()<12?t.amPm[0]:t.amPm[1]},A:function(e,t){return e.getHours()<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase()},ZZ:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+pad(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+pad(Math.floor(Math.abs(t)/60),2)+":"+pad(Math.abs(t)%60,2)}},monthParse=function(e){return+e-1},emptyDigits=[null,twoDigitsOptional],emptyWord=[null,word],amPm=["isPm",word,function(e,t){var n=e.toLowerCase();return n===t.amPm[0]?0:n===t.amPm[1]?1:null}],timezoneOffset=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(e){var t=(e+"").match(/([+-]|\d\d)/gi);if(t){var n=60*+t[1]+parseInt(t[2],10);return"+"===t[0]?n:-n}return 0}],parseFlags={D:["day",twoDigitsOptional],DD:["day",twoDigits],Do:["day",twoDigitsOptional+word,function(e){return parseInt(e,10)}],M:["month",twoDigitsOptional,monthParse],MM:["month",twoDigits,monthParse],YY:["year",twoDigits,function(e){var t=+(""+(new Date).getFullYear()).substr(0,2);return+(""+(+e>68?t-1:t)+e)}],h:["hour",twoDigitsOptional,void 0,"isPm"],hh:["hour",twoDigits,void 0,"isPm"],H:["hour",twoDigitsOptional],HH:["hour",twoDigits],m:["minute",twoDigitsOptional],mm:["minute",twoDigits],s:["second",twoDigitsOptional],ss:["second",twoDigits],YYYY:["year",fourDigits],S:["millisecond","\\d",function(e){return 100*+e}],SS:["millisecond",twoDigits,function(e){return 10*+e}],SSS:["millisecond",threeDigits],d:emptyDigits,dd:emptyDigits,ddd:emptyWord,dddd:emptyWord,MMM:["month",word,monthUpdate("monthNamesShort")],MMMM:["month",word,monthUpdate("monthNames")],a:amPm,A:amPm,ZZ:timezoneOffset,Z:timezoneOffset},globalMasks={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},setGlobalDateMasks=function(e){return assign(globalMasks,e)},format$1=function(e,t,n){if(void 0===t&&(t=globalMasks.default),void 0===n&&(n={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");t=globalMasks[t]||t;var i=[];t=t.replace(literal,(function(e,t){return i.push(t),"@@@"}));var r=assign(assign({},globalI18n),n);return(t=t.replace(token,(function(t){return formatFlags[t](e,r)}))).replace(/@@@/g,(function(){return i.shift()}))};function parse(e,t,n){if(void 0===n&&(n={}),"string"!=typeof t)throw new Error("Invalid format in fecha parse");if(t=globalMasks[t]||t,e.length>1e3)return null;var i={year:(new Date).getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},r=[],o=[],a=t.replace(literal,(function(e,t){return o.push(regexEscape(t)),"@@@"})),s={},c={};a=regexEscape(a).replace(token,(function(e){var t=parseFlags[e],n=t[0],i=t[1],o=t[3];if(s[n])throw new Error("Invalid format. "+n+" specified twice in format");return s[n]=!0,o&&(c[o]=!0),r.push(t),"("+i+")"})),Object.keys(c).forEach((function(e){if(!s[e])throw new Error("Invalid format. "+e+" is required in specified format")})),a=a.replace(/@@@/g,(function(){return o.shift()}));var l=e.match(new RegExp(a,"i"));if(!l)return null;for(var d,u=assign(assign({},globalI18n),n),p=1;p<l.length;p++){var m=r[p-1],h=m[0],f=m[2],g=f?f(l[p],u):+l[p];if(null==g)return null;i[h]=g}if(1===i.isPm&&null!=i.hour&&12!=+i.hour?i.hour=+i.hour+12:0===i.isPm&&12==+i.hour&&(i.hour=0),null==i.timezoneOffset){d=new Date(i.year,i.month,i.day,i.hour,i.minute,i.second,i.millisecond);for(var y=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],v=(p=0,y.length);p<v;p++)if(s[y[p][0]]&&i[y[p][0]]!==d[y[p][1]]())return null}else if(d=new Date(Date.UTC(i.year,i.month,i.day,i.hour,i.minute-i.timezoneOffset,i.second,i.millisecond)),i.month>11||i.month<0||i.day>31||i.day<1||i.hour>23||i.hour<0||i.minute>59||i.minute<0||i.second>59||i.second<0)return null;return d}var fecha={format:format$1,parse:parse,defaultI18n:defaultI18n,setGlobalDateI18n:setGlobalDateI18n,setGlobalDateMasks:setGlobalDateMasks},fecha$1=Object.freeze({__proto__:null,assign:assign,default:fecha,defaultI18n:defaultI18n,format:format$1,parse:parse,setGlobalDateI18n:setGlobalDateI18n,setGlobalDateMasks:setGlobalDateMasks}),require$$0=getAugmentedNamespace(fecha$1),timestamp,hasRequiredTimestamp,uncolorize,hasRequiredUncolorize,hasRequiredBrowser$2;function requireTimestamp(){if(hasRequiredTimestamp)return timestamp;hasRequiredTimestamp=1;var e=require$$0,t=requireFormat$1();return timestamp=t((function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.format&&(t.timestamp="function"==typeof n.format?n.format():e.format(new Date,n.format)),t.timestamp||(t.timestamp=(new Date).toISOString()),n.alias&&(t[n.alias]=t.timestamp),t})),timestamp}function requireUncolorize(){if(hasRequiredUncolorize)return uncolorize;hasRequiredUncolorize=1;var e=requireSafe(),t=requireFormat$1(),n=requireTripleBeam().MESSAGE;return uncolorize=t((function(t,i){return!1!==i.level&&(t.level=e.strip(t.level)),!1!==i.message&&(t.message=e.strip(String(t.message))),!1!==i.raw&&t[n]&&(t[n]=e.strip(String(t[n]))),t}))}function requireBrowser$2(){if(hasRequiredBrowser$2)return browser$3;hasRequiredBrowser$2=1;var e=browser$3.format=requireFormat$1();return browser$3.levels=requireLevels(),Object.defineProperty(e,"align",{value:requireAlign()}),Object.defineProperty(e,"cli",{value:requireCli()}),Object.defineProperty(e,"colorize",{value:requireColorize()}),Object.defineProperty(e,"combine",{value:requireCombine()}),Object.defineProperty(e,"errors",{value:requireErrors()}),Object.defineProperty(e,"json",{value:requireJson$1()}),Object.defineProperty(e,"label",{value:requireLabel()}),Object.defineProperty(e,"logstash",{value:requireLogstash()}),Object.defineProperty(e,"metadata",{value:requireMetadata()}),Object.defineProperty(e,"ms",{value:requireMs()}),Object.defineProperty(e,"padLevels",{value:requirePadLevels()}),Object.defineProperty(e,"prettyPrint",{value:requirePrettyPrint()}),Object.defineProperty(e,"printf",{value:requirePrintf()}),Object.defineProperty(e,"simple",{value:requireSimple()}),Object.defineProperty(e,"splat",{value:requireSplat()}),Object.defineProperty(e,"timestamp",{value:requireTimestamp()}),Object.defineProperty(e,"uncolorize",{value:requireUncolorize()}),browser$3}var common={},hasRequiredCommon;function requireCommon(){return hasRequiredCommon||(hasRequiredCommon=1,function(e){var t=require$$0$8.format;e.warn={deprecated:function(e){return function(){throw new Error(t("{ %s } was removed in winston@3.0.0.",e))}},useFormat:function(e){return function(){throw new Error([t("{ %s } was removed in winston@3.0.0.",e),"Use a custom winston.format = winston.format(function) instead."].join("\n"))}},forFunctions:function(t,n,i){i.forEach((function(i){t[i]=e.warn[n](i)}))},forProperties:function(t,n,i){i.forEach((function(i){var r=e.warn[n](i);Object.defineProperty(t,i,{get:r,set:r})}))}}}(common)),common}const name="winston",description="A logger for just about everything.",version="3.17.0",author="Charlie Robbins <charlie.robbins@gmail.com>",maintainers=["David Hyde <dabh@alumni.stanford.edu>"],repository={type:"git",url:"https://github.com/winstonjs/winston.git"},keywords=["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],dependencies={"@dabh/diagnostics":"^2.0.2","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.7.0","one-time":"^1.0.0","readable-stream":"^3.4.0","safe-stable-stringify":"^2.3.1","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.9.0"},devDependencies={"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^4.4.0","@types/node":"^20.11.24","abstract-winston-transport":"^0.5.1",assume:"^2.2.0","cross-spawn-async":"^2.2.5",eslint:"^8.57.0",hock:"^1.4.1",mocha:"^10.3.0",nyc:"^17.1.0",rimraf:"5.0.1",split2:"^4.1.0","std-mocks":"^2.0.0",through2:"^4.0.2","winston-compat":"^0.1.5"},main="./lib/winston.js",browser$2="./dist/winston",types="./index.d.ts",scripts={lint:"eslint lib/*.js lib/winston/*.js lib/winston/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist",test:"rimraf test/fixtures/logs/* && mocha","test:coverage":"nyc npm run test:unit","test:unit":"mocha test/unit","test:integration":"mocha test/integration",build:"rimraf dist && babel lib -d dist",prepublishOnly:"npm run build"},engines={node:">= 12.0.0"},license="MIT";var require$$2={name:name,description:description,version:version,author:author,maintainers:maintainers,repository:repository,keywords:keywords,dependencies:dependencies,devDependencies:devDependencies,main:main,browser:browser$2,types:types,scripts:scripts,engines:engines,license:license},transports={},dist={exports:{}},modern$1={exports:{}},browser$1,hasRequiredBrowser$1,streamBrowser,hasRequiredStreamBrowser,destroy_1,hasRequiredDestroy;function requireBrowser$1(){if(hasRequiredBrowser$1)return browser$1;function e(e){try{if(!commonjsGlobal.localStorage)return!1}catch(e){return!1}var t=commonjsGlobal.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}return hasRequiredBrowser$1=1,browser$1=function(t,n){if(e("noDeprecation"))return t;var i=!1;return function(){if(!i){if(e("throwDeprecation"))throw new Error(n);e("traceDeprecation")?console.trace(n):console.warn(n),i=!0}return t.apply(this,arguments)}},browser$1}function requireStreamBrowser(){return hasRequiredStreamBrowser?streamBrowser:(hasRequiredStreamBrowser=1,streamBrowser=require$$0$a.EventEmitter)}function requireDestroy(){if(hasRequiredDestroy)return destroy_1;function e(e,i){n(e,i),t(e)}function t(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function n(e,t){e.emit("error",t)}return hasRequiredDestroy=1,destroy_1={destroy:function(i,r){var o=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(r?r(i):i&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,i)):process.nextTick(n,this,i)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(i||null,(function(n){!r&&n?o._writableState?o._writableState.errorEmitted?process.nextTick(t,o):(o._writableState.errorEmitted=!0,process.nextTick(e,o,n)):process.nextTick(e,o,n):r?(process.nextTick(t,o),r(n)):process.nextTick(t,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,i=e._writableState;n&&n.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}},destroy_1}var errorsBrowser={},hasRequiredErrorsBrowser,state,hasRequiredState;function requireErrorsBrowser(){if(hasRequiredErrorsBrowser)return errorsBrowser;hasRequiredErrorsBrowser=1;var e={};function t(t,n,i){i||(i=Error);var r=function(e){var t,i;function r(t,i,r){return e.call(this,function(e,t,i){return"string"==typeof n?n:n(e,t,i)}(t,i,r))||this}return i=e,(t=r).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i,r}(i);r.prototype.name=i.name,r.prototype.code=t,e[t]=r}function n(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}return t("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),t("ERR_INVALID_ARG_TYPE",(function(e,t,i){var r,o,a;if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))a="The ".concat(e," ").concat(r," ").concat(n(t,"type"));else{var s=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(s," ").concat(r," ").concat(n(t,"type"))}return a+=". Received type ".concat(typeof i)}),TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),errorsBrowser.codes=e,errorsBrowser}function requireState(){if(hasRequiredState)return state;hasRequiredState=1;var e=requireErrorsBrowser().codes.ERR_INVALID_OPT_VALUE;return state={getHighWaterMark:function(t,n,i,r){var o=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(n,r,i);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new e(r?i:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}}var inherits_browser={exports:{}},hasRequiredInherits_browser;function requireInherits_browser(){return hasRequiredInherits_browser||(hasRequiredInherits_browser=1,"function"==typeof Object.create?inherits_browser.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}),inherits_browser.exports}var _nodeResolve_empty={},_nodeResolve_empty$1=Object.freeze({__proto__:null,default:_nodeResolve_empty}),require$$3=getAugmentedNamespace(_nodeResolve_empty$1),buffer_list,hasRequiredBuffer_list;function requireBuffer_list(){if(hasRequiredBuffer_list)return buffer_list;function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function t(t){for(var i=1;i<arguments.length;i++){var r=null!=arguments[i]?arguments[i]:{};i%2?e(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t,n){return t&&function(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,r(i.key),i)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function r(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}hasRequiredBuffer_list=1;var o=require$$0$c.Buffer,a=require$$3.inspect,s=a&&a.custom||"inspect";return buffer_list=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return i(e,[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,n,i,r=o.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=r,i=s,o.prototype.copy.call(t,n,i),s+=a.data.length,a=a.next;return r}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,i=t.data;for(e-=i.length;t=t.next;){var r=t.data,o=e>r.length?r.length:e;if(o===r.length?i+=r:i+=r.slice(0,e),0===(e-=o)){o===r.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=r.slice(o));break}++n}return this.length-=n,i}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),n=this.head,i=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var r=n.data,a=e>r.length?r.length:e;if(r.copy(t,t.length-e,0,a),0===(e-=a)){a===r.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=r.slice(a));break}++i}return this.length-=i,t}},{key:s,value:function(e,n){return a(this,t(t({},n),{},{depth:0,customInspect:!1}))}}]),e}(),buffer_list}var string_decoder={},safeBuffer={exports:{}},hasRequiredSafeBuffer,hasRequiredString_decoder,endOfStream,hasRequiredEndOfStream,async_iterator,hasRequiredAsync_iterator,fromBrowser,hasRequiredFromBrowser,_stream_readable,hasRequired_stream_readable,_stream_duplex,hasRequired_stream_duplex,_stream_writable,hasRequired_stream_writable,hasRequiredModern$1;function requireSafeBuffer(){return hasRequiredSafeBuffer||(hasRequiredSafeBuffer=1,function(e,t){var n=require$$0$c,i=n.Buffer;function r(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(r(n,t),t.Buffer=o),o.prototype=Object.create(i.prototype),r(i,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}(safeBuffer,safeBuffer.exports)),safeBuffer.exports}function requireString_decoder(){if(hasRequiredString_decoder)return string_decoder;hasRequiredString_decoder=1;var e=requireSafeBuffer().Buffer,t=e.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function n(n){var i;switch(this.encoding=function(n){var i=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(n);if("string"!=typeof i&&(e.isEncoding===t||!t(n)))throw new Error("Unknown encoding: "+n);return i||n}(n),this.encoding){case"utf16le":this.text=o,this.end=a,i=4;break;case"utf8":this.fillLast=r,i=4;break;case"base64":this.text=s,this.end=c,i=3;break;default:return this.write=l,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(i)}function i(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function r(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function o(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var i=n.charCodeAt(n.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function a(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function s(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function l(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}return string_decoder.StringDecoder=n,n.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},n.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},n.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var o=i(t[r]);if(o>=0)return o>0&&(e.lastNeed=o-1),o;if(--r<n||-2===o)return 0;if(o=i(t[r]),o>=0)return o>0&&(e.lastNeed=o-2),o;if(--r<n||-2===o)return 0;if(o=i(t[r]),o>=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},n.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length},string_decoder}function requireEndOfStream(){if(hasRequiredEndOfStream)return endOfStream;hasRequiredEndOfStream=1;var e=requireErrorsBrowser().codes.ERR_STREAM_PREMATURE_CLOSE;function t(){}return endOfStream=function n(i,r,o){if("function"==typeof r)return n(i,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];e.apply(this,i)}}}(o||t);var a=r.readable||!1!==r.readable&&i.readable,s=r.writable||!1!==r.writable&&i.writable,c=function(){i.writable||d()},l=i._writableState&&i._writableState.finished,d=function(){s=!1,l=!0,a||o.call(i)},u=i._readableState&&i._readableState.endEmitted,p=function(){a=!1,u=!0,s||o.call(i)},m=function(e){o.call(i,e)},h=function(){var t;return a&&!u?(i._readableState&&i._readableState.ended||(t=new e),o.call(i,t)):s&&!l?(i._writableState&&i._writableState.ended||(t=new e),o.call(i,t)):void 0},f=function(){i.req.on("finish",d)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(i)?s&&!i._writableState&&(i.on("end",c),i.on("close",c)):(i.on("complete",d),i.on("abort",h),i.req?f():i.on("request",f)),i.on("end",p),i.on("finish",d),!1!==r.error&&i.on("error",m),i.on("close",h),function(){i.removeListener("complete",d),i.removeListener("abort",h),i.removeListener("request",f),i.req&&i.req.removeListener("finish",d),i.removeListener("end",c),i.removeListener("close",c),i.removeListener("finish",d),i.removeListener("end",p),i.removeListener("error",m),i.removeListener("close",h)}},endOfStream}function requireAsync_iterator(){if(hasRequiredAsync_iterator)return async_iterator;var e;function t(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}hasRequiredAsync_iterator=1;var n=requireEndOfStream(),i=Symbol("lastResolve"),r=Symbol("lastReject"),o=Symbol("error"),a=Symbol("ended"),s=Symbol("lastPromise"),c=Symbol("handlePromise"),l=Symbol("stream");function d(e,t){return{value:e,done:t}}function u(e){var t=e[i];if(null!==t){var n=e[l].read();null!==n&&(e[s]=null,e[i]=null,e[r]=null,t(d(n,!1)))}}function p(e){process.nextTick(u,e)}var m=Object.getPrototypeOf((function(){})),h=Object.setPrototypeOf((t(e={get stream(){return this[l]},next:function(){var e=this,t=this[o];if(null!==t)return Promise.reject(t);if(this[a])return Promise.resolve(d(void 0,!0));if(this[l].destroyed)return new Promise((function(t,n){process.nextTick((function(){e[o]?n(e[o]):t(d(void 0,!0))}))}));var n,i=this[s];if(i)n=new Promise(function(e,t){return function(n,i){e.then((function(){t[a]?n(d(void 0,!0)):t[c](n,i)}),i)}}(i,this));else{var r=this[l].read();if(null!==r)return Promise.resolve(d(r,!1));n=new Promise(this[c])}return this[s]=n,n}},Symbol.asyncIterator,(function(){return this})),t(e,"return",(function(){var e=this;return new Promise((function(t,n){e[l].destroy(null,(function(e){e?n(e):t(d(void 0,!0))}))}))})),e),m);return async_iterator=function(e){var u,m=Object.create(h,(t(u={},l,{value:e,writable:!0}),t(u,i,{value:null,writable:!0}),t(u,r,{value:null,writable:!0}),t(u,o,{value:null,writable:!0}),t(u,a,{value:e._readableState.endEmitted,writable:!0}),t(u,c,{value:function(e,t){var n=m[l].read();n?(m[s]=null,m[i]=null,m[r]=null,e(d(n,!1))):(m[i]=e,m[r]=t)},writable:!0}),u));return m[s]=null,n(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=m[r];return null!==t&&(m[s]=null,m[i]=null,m[r]=null,t(e)),void(m[o]=e)}var n=m[i];null!==n&&(m[s]=null,m[i]=null,m[r]=null,n(d(void 0,!0))),m[a]=!0})),e.on("readable",p.bind(null,m)),m},async_iterator}function requireFromBrowser(){return hasRequiredFromBrowser?fromBrowser:(hasRequiredFromBrowser=1,fromBrowser=function(){throw new Error("Readable.from is not available in the browser")})}function require_stream_readable(){if(hasRequired_stream_readable)return _stream_readable;var e;hasRequired_stream_readable=1,_stream_readable=x,x.ReadableState=E,require$$0$a.EventEmitter;var t=function(e,t){return e.listeners(t).length},n=requireStreamBrowser(),i=require$$0$c.Buffer,r=(void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var o,a=require$$3;o=a&&a.debuglog?a.debuglog("stream"):function(){};var s,c,l,d=requireBuffer_list(),u=requireDestroy(),p=requireState().getHighWaterMark,m=requireErrorsBrowser().codes,h=m.ERR_INVALID_ARG_TYPE,f=m.ERR_STREAM_PUSH_AFTER_EOF,g=m.ERR_METHOD_NOT_IMPLEMENTED,y=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;requireInherits_browser()(x,n);var v=u.errorOrDestroy,_=["error","close","destroy","pause","resume"];function E(t,n,i){e=e||require_stream_duplex(),t=t||{},"boolean"!=typeof i&&(i=n instanceof e),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=p(this,t,"readableHighWaterMark",i),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(s||(s=requireString_decoder().StringDecoder),this.decoder=new s(t.encoding),this.encoding=t.encoding)}function x(t){if(e=e||require_stream_duplex(),!(this instanceof x))return new x(t);var i=this instanceof e;this._readableState=new E(t,this,i),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),n.call(this)}function S(e,t,n,a,s){o("readableAddChunk",t);var c,l=e._readableState;if(null===t)l.reading=!1,function(e,t){if(o("onEofChunk"),t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?C(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,A(e)))}(e,l);else if(s||(c=function(e,t){var n;o=t,i.isBuffer(o)||o instanceof r||"string"==typeof t||void 0===t||e.objectMode||(n=new h("chunk",["string","Buffer","Uint8Array"],t));var o;return n}(l,t)),c)v(e,c);else if(l.objectMode||t&&t.length>0)if("string"==typeof t||l.objectMode||Object.getPrototypeOf(t)===i.prototype||(t=function(e){return i.from(e)}(t)),a)l.endEmitted?v(e,new y):b(e,l,t,!0);else if(l.ended)v(e,new f);else{if(l.destroyed)return!1;l.reading=!1,l.decoder&&!n?(t=l.decoder.write(t),l.objectMode||0!==t.length?b(e,l,t,!1):I(e,l)):b(e,l,t,!1)}else a||(l.reading=!1,I(e,l));return!l.ended&&(l.length<l.highWaterMark||0===l.length)}function b(e,t,n,i){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&C(e)),I(e,t)}Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),x.prototype.destroy=u.destroy,x.prototype._undestroy=u.undestroy,x.prototype._destroy=function(e,t){t(e)},x.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=i.from(e,t),t=""),n=!0),S(this,e,t,!1,n)},x.prototype.unshift=function(e){return S(this,e,null,!0,!1)},x.prototype.isPaused=function(){return!1===this._readableState.flowing},x.prototype.setEncoding=function(e){s||(s=requireString_decoder().StringDecoder);var t=new s(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var w=1073741824;function R(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=w?e=w:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function C(e){var t=e._readableState;o("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(A,e))}function A(e){var t=e._readableState;o("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,M(e)}function I(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(T,e,t))}function T(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(o("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function P(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function D(e){o("readable nexttick read 0"),e.read(0)}function $(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),M(e),t.flowing&&!t.reading&&e.read(0)}function M(e){var t=e._readableState;for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function O(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function k(e){var t=e._readableState;o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(N,t,e))}function N(e,t){if(o("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function q(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1}return x.prototype.read=function(e){o("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return o("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?k(this):C(this),null;if(0===(e=R(e,t))&&t.ended)return 0===t.length&&k(this),null;var i,r=t.needReadable;return o("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&o("length less than watermark",r=!0),t.ended||t.reading?o("reading or ended",r=!1):r&&(o("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=R(n,t))),null===(i=e>0?O(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&k(this)),null!==i&&this.emit("data",i),i},x.prototype._read=function(e){v(this,new g("_read()"))},x.prototype.pipe=function(e,n){var i=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,o("pipe count=%d opts=%j",r.pipesCount,n);var a=(!n||!1!==n.end)&&e!==process.stdout&&e!==process.stderr?c:f;function s(t,n){o("onunpipe"),t===i&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,o("cleanup"),e.removeListener("close",m),e.removeListener("finish",h),e.removeListener("drain",l),e.removeListener("error",p),e.removeListener("unpipe",s),i.removeListener("end",c),i.removeListener("end",f),i.removeListener("data",u),d=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function c(){o("onend"),e.end()}r.endEmitted?process.nextTick(a):i.once("end",a),e.on("unpipe",s);var l=function(e){return function(){var n=e._readableState;o("pipeOnDrain",n.awaitDrain),n.awaitDrain&&n.awaitDrain--,0===n.awaitDrain&&t(e,"data")&&(n.flowing=!0,M(e))}}(i);e.on("drain",l);var d=!1;function u(t){o("ondata");var n=e.write(t);o("dest.write",n),!1===n&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==q(r.pipes,e))&&!d&&(o("false write response, pause",r.awaitDrain),r.awaitDrain++),i.pause())}function p(n){o("onerror",n),f(),e.removeListener("error",p),0===t(e,"error")&&v(e,n)}function m(){e.removeListener("finish",h),f()}function h(){o("onfinish"),e.removeListener("close",m),f()}function f(){o("unpipe"),i.unpipe(e)}return i.on("data",u),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",p),e.once("close",m),e.once("finish",h),e.emit("pipe",i),r.flowing||(o("pipe resume"),i.resume()),e},x.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var i=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<r;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=q(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},x.prototype.on=function(e,t){var i=n.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,o("on readable",r.length,r.reading),r.length?C(this):r.reading||process.nextTick(D,this))),i},x.prototype.addListener=x.prototype.on,x.prototype.removeListener=function(e,t){var i=n.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(P,this),i},x.prototype.removeAllListeners=function(e){var t=n.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(P,this),t},x.prototype.resume=function(){var e=this._readableState;return e.flowing||(o("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick($,e,t))}(this,e)),e.paused=!1,this},x.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},x.prototype.wrap=function(e){var t=this,n=this._readableState,i=!1;for(var r in e.on("end",(function(){if(o("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(r){(o("wrapped data"),n.decoder&&(r=n.decoder.write(r)),n.objectMode&&null==r)||(n.objectMode||r&&r.length)&&(t.push(r)||(i=!0,e.pause()))})),e)void 0===this[r]&&"function"==typeof e[r]&&(this[r]=function(t){return function(){return e[t].apply(e,arguments)}}(r));for(var a=0;a<_.length;a++)e.on(_[a],this.emit.bind(this,_[a]));return this._read=function(t){o("wrapped _read",t),i&&(i=!1,e.resume())},this},"function"==typeof Symbol&&(x.prototype[Symbol.asyncIterator]=function(){return void 0===c&&(c=requireAsync_iterator()),c(this)}),Object.defineProperty(x.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(x.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(x.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),x._fromList=O,Object.defineProperty(x.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(x.from=function(e,t){return void 0===l&&(l=requireFromBrowser()),l(x,e,t)}),_stream_readable}function require_stream_duplex(){if(hasRequired_stream_duplex)return _stream_duplex;hasRequired_stream_duplex=1;var e=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};_stream_duplex=a;var t=require_stream_readable(),n=require_stream_writable();requireInherits_browser()(a,t);for(var i=e(n.prototype),r=0;r<i.length;r++){var o=i[r];a.prototype[o]||(a.prototype[o]=n.prototype[o])}function a(e){if(!(this instanceof a))return new a(e);t.call(this,e),n.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",s)))}function s(){this._writableState.ended||process.nextTick(c,this)}function c(e){e.end()}return Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),_stream_duplex}function require_stream_writable(){if(hasRequired_stream_writable)return _stream_writable;function e(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var i=e.entry;e.entry=null;for(;i;){var r=i.callback;t.pendingcb--,r(n),i=i.next}t.corkedRequestsFree.next=e}(t,e)}}var t;hasRequired_stream_writable=1,_stream_writable=x,x.WritableState=E;var n={deprecate:requireBrowser$1()},i=requireStreamBrowser(),r=require$$0$c.Buffer,o=(void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var a,s=requireDestroy(),c=requireState().getHighWaterMark,l=requireErrorsBrowser().codes,d=l.ERR_INVALID_ARG_TYPE,u=l.ERR_METHOD_NOT_IMPLEMENTED,p=l.ERR_MULTIPLE_CALLBACK,m=l.ERR_STREAM_CANNOT_PIPE,h=l.ERR_STREAM_DESTROYED,f=l.ERR_STREAM_NULL_VALUES,g=l.ERR_STREAM_WRITE_AFTER_END,y=l.ERR_UNKNOWN_ENCODING,v=s.errorOrDestroy;function _(){}function E(n,i,r){t=t||require_stream_duplex(),n=n||{},"boolean"!=typeof r&&(r=i instanceof t),this.objectMode=!!n.objectMode,r&&(this.objectMode=this.objectMode||!!n.writableObjectMode),this.highWaterMark=c(this,n,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===n.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=n.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,i=n.sync,r=n.writecb;if("function"!=typeof r)throw new p;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,r){--t.pendingcb,n?(process.nextTick(r,i),process.nextTick(A,e,t),e._writableState.errorEmitted=!0,v(e,i)):(r(i),e._writableState.errorEmitted=!0,v(e,i),A(e,t))}(e,n,i,t,r);else{var o=R(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||w(e,n),i?process.nextTick(b,e,n,o,r):b(e,n,o,r)}}(i,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==n.emitClose,this.autoDestroy=!!n.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function x(e){var n=this instanceof(t=t||require_stream_duplex());if(!n&&!a.call(x,this))return new x(e);this._writableState=new E(e,this,n),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),i.call(this)}function S(e,t,n,i,r,o,a){t.writelen=i,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new h("write")):n?e._writev(r,t.onwrite):e._write(r,o,t.onwrite),t.sync=!1}function b(e,t,n,i){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),A(e,t)}function w(t,n){n.bufferProcessing=!0;var i=n.bufferedRequest;if(t._writev&&i&&i.next){var r=n.bufferedRequestCount,o=new Array(r),a=n.corkedRequestsFree;a.entry=i;for(var s=0,c=!0;i;)o[s]=i,i.isBuf||(c=!1),i=i.next,s+=1;o.allBuffers=c,S(t,n,!0,n.length,o,"",a.finish),n.pendingcb++,n.lastBufferedRequest=null,a.next?(n.corkedRequestsFree=a.next,a.next=null):n.corkedRequestsFree=new e(n),n.bufferedRequestCount=0}else{for(;i;){var l=i.chunk,d=i.encoding,u=i.callback;if(S(t,n,!1,n.objectMode?1:l.length,l,d,u),i=i.next,n.bufferedRequestCount--,n.writing)break}null===i&&(n.lastBufferedRequest=null)}n.bufferedRequest=i,n.bufferProcessing=!1}function R(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final((function(n){t.pendingcb--,n&&v(e,n),t.prefinished=!0,e.emit("prefinish"),A(e,t)}))}function A(e,t){var n=R(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(C,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return n}return requireInherits_browser()(x,i),E.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(E.prototype,"buffer",{get:n.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(x,Symbol.hasInstance,{value:function(e){return!!a.call(this,e)||this===x&&(e&&e._writableState instanceof E)}})):a=function(e){return e instanceof this},x.prototype.pipe=function(){v(this,new m)},x.prototype.write=function(e,t,n){var i,a=this._writableState,s=!1,c=!a.objectMode&&(i=e,r.isBuffer(i)||i instanceof o);return c&&!r.isBuffer(e)&&(e=function(e){return r.from(e)}(e)),"function"==typeof t&&(n=t,t=null),c?t="buffer":t||(t=a.defaultEncoding),"function"!=typeof n&&(n=_),a.ending?function(e,t){var n=new g;v(e,n),process.nextTick(t,n)}(this,n):(c||function(e,t,n,i){var r;return null===n?r=new f:"string"==typeof n||t.objectMode||(r=new d("chunk",["string","Buffer"],n)),!r||(v(e,r),process.nextTick(i,r),!1)}(this,a,e,n))&&(a.pendingcb++,s=function(e,t,n,i,o,a){if(!n){var s=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=r.from(t,n));return t}(t,i,o);i!==s&&(n=!0,o="buffer",i=s)}var c=t.objectMode?1:i.length;t.length+=c;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var d=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:o,isBuf:n,callback:a,next:null},d?d.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else S(e,t,!1,c,i,o,a);return l}(this,a,c,e,t,n)),s},x.prototype.cork=function(){this._writableState.corked++},x.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||w(this,e))},x.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new y(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(x.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(x.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),x.prototype._write=function(e,t,n){n(new u("_write()"))},x.prototype._writev=null,x.prototype.end=function(e,t,n){var i=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,A(e,t),n&&(t.finished?process.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(x.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),x.prototype.destroy=s.destroy,x.prototype._undestroy=s.undestroy,x.prototype._destroy=function(e,t){t(e)},_stream_writable}function requireModern$1(){if(hasRequiredModern$1)return modern$1.exports;hasRequiredModern$1=1;var e=require$$0$8,t=require_stream_writable(),n=requireTripleBeam().LEVEL,i=modern$1.exports=function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.call(this,{objectMode:!0,highWaterMark:n.highWaterMark}),this.format=n.format,this.level=n.level,this.handleExceptions=n.handleExceptions,this.handleRejections=n.handleRejections,this.silent=n.silent,n.log&&(this.log=n.log),n.logv&&(this.logv=n.logv),n.close&&(this.close=n.close),this.once("pipe",(function(t){e.levels=t.levels,e.parent=t})),this.once("unpipe",(function(t){t===e.parent&&(e.parent=null,e.close&&e.close())}))};return e.inherits(i,t),i.prototype._write=function(e,t,i){if(this.silent||!0===e.exception&&!this.handleExceptions)return i(null);var r=this.level||this.parent&&this.parent.level;if(!r||this.levels[r]>=this.levels[e[n]]){if(e&&!this.format)return this.log(e,i);var o=void 0,a=void 0;try{a=this.format.transform(Object.assign({},e),this.format.options)}catch(e){o=e}if(o||!a){if(i(),o)throw o;return}return this.log(a,i)}return this._writableState.sync=!1,i(null)},i.prototype._writev=function(e,t){if(this.logv){var n=e.filter(this._accept,this);return n.length?this.logv(n,t):t(null)}for(var i=0;i<e.length;i++)if(this._accept(e[i]))if(!e[i].chunk||this.format){var r=void 0,o=void 0;try{o=this.format.transform(Object.assign({},e[i].chunk),this.format.options)}catch(e){r=e}if(r||!o){if(e[i].callback(),r)throw t(null),r}else this.log(o,e[i].callback)}else this.log(e[i].chunk,e[i].callback);return t(null)},i.prototype._accept=function(e){var t=e.chunk;if(this.silent)return!1;var i=this.level||this.parent&&this.parent.level;return!(!0!==t.exception&&i&&!(this.levels[i]>=this.levels[t[n]])||!this.handleExceptions&&!0===t.exception)},i.prototype._nop=function(){},modern$1.exports}var legacy$1={exports:{}},hasRequiredLegacy$1,hasRequiredDist,console_1,hasRequiredConsole;function requireLegacy$1(){if(hasRequiredLegacy$1)return legacy$1.exports;hasRequiredLegacy$1=1;var e=require$$0$8,t=requireTripleBeam().LEVEL,n=requireModern$1(),i=legacy$1.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n.call(this,e),!e.transport||"function"!=typeof e.transport.log)throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=function(e){this.emit("error",e,this.transport)}.bind(this),this.transport.on("error",this.transport.__winstonError))};return e.inherits(i,n),i.prototype._write=function(e,n,i){if(this.silent||!0===e.exception&&!this.handleExceptions)return i(null);(!this.level||this.levels[this.level]>=this.levels[e[t]])&&this.transport.log(e[t],e.message,e,this._nop),i(null)},i.prototype._writev=function(e,n){for(var i=0;i<e.length;i++)this._accept(e[i])&&(this.transport.log(e[i].chunk[t],e[i].chunk.message,e[i].chunk,this._nop),e[i].callback());return n(null)},i.prototype._deprecated=function(){console.error([this.transport.name+" is a legacy winston transport. Consider upgrading: ","- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join("\n"))},i.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)},legacy$1.exports}function requireDist(){return hasRequiredDist||(hasRequiredDist=1,dist.exports=requireModern$1(),dist.exports.LegacyTransportStream=requireLegacy$1()),dist.exports}function requireConsole(){if(hasRequiredConsole)return console_1;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}function i(t,n,i){return n=o(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,r()?Reflect.construct(n,i||[],o(t).constructor):n.apply(t,i))}function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(r=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}hasRequiredConsole=1;var s=require$$0$7,c=requireTripleBeam(),l=c.LEVEL,d=c.MESSAGE,u=requireDist();return console_1=function(e){function n(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(e=i(this,n,[t])).name=t.name||"console",e.stderrLevels=e._stringArrayToSet(t.stderrLevels),e.consoleWarnLevels=e._stringArrayToSet(t.consoleWarnLevels),e.eol="string"==typeof t.eol?t.eol:s.EOL,e.forceConsole=t.forceConsole||!1,e._consoleLog=console.log.bind(console),e._consoleWarn=console.warn.bind(console),e._consoleError=console.error.bind(console),e.setMaxListeners(30),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(n,e),t(n,[{key:"log",value:function(e,t){var n=this;return setImmediate((function(){return n.emit("logged",e)})),this.stderrLevels[e[l]]?(console._stderr&&!this.forceConsole?console._stderr.write("".concat(e[d]).concat(this.eol)):this._consoleError(e[d]),void(t&&t())):this.consoleWarnLevels[e[l]]?(console._stderr&&!this.forceConsole?console._stderr.write("".concat(e[d]).concat(this.eol)):this._consoleWarn(e[d]),void(t&&t())):(console._stdout&&!this.forceConsole?console._stdout.write("".concat(e[d]).concat(this.eol)):this._consoleLog(e[d]),void(t&&t()))}},{key:"_stringArrayToSet",value:function(e,t){if(!e)return{};if(t=t||"Cannot make set from type other than Array of string elements",!Array.isArray(e))throw new Error(t);return e.reduce((function(e,n){if("string"!=typeof n)throw new Error(t);return e[n]=!0,e}),{})}}])}(u),console_1}var series={exports:{}},parallel={exports:{}},isArrayLike={exports:{}},hasRequiredIsArrayLike;function requireIsArrayLike(){return hasRequiredIsArrayLike||(hasRequiredIsArrayLike=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0},e.exports=t.default}(isArrayLike,isArrayLike.exports)),isArrayLike.exports}var wrapAsync={},asyncify={exports:{}},initialParams={exports:{}},hasRequiredInitialParams;function requireInitialParams(){return hasRequiredInitialParams||(hasRequiredInitialParams=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(...t){var n=t.pop();return e.call(this,t,n)}},e.exports=t.default}(initialParams,initialParams.exports)),initialParams.exports}var setImmediate$1={},hasRequiredSetImmediate,hasRequiredAsyncify,hasRequiredWrapAsync;function requireSetImmediate(){if(hasRequiredSetImmediate)return setImmediate$1;hasRequiredSetImmediate=1,Object.defineProperty(setImmediate$1,"__esModule",{value:!0}),setImmediate$1.fallback=r,setImmediate$1.wrap=o;var e,t=setImmediate$1.hasQueueMicrotask="function"==typeof queueMicrotask&&queueMicrotask,n=setImmediate$1.hasSetImmediate="function"==typeof setImmediate&&setImmediate,i=setImmediate$1.hasNextTick="object"==typeof process&&"function"==typeof process.nextTick;function r(e){setTimeout(e,0)}function o(e){return(t,...n)=>e((()=>t(...n)))}return e=t?queueMicrotask:n?setImmediate:i?process.nextTick:r,setImmediate$1.default=o(e),setImmediate$1}function requireAsyncify(){return hasRequiredAsyncify||(hasRequiredAsyncify=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,r.isAsync)(e))return function(...t){const n=t.pop();return a(e.apply(this,t),n)};return(0,n.default)((function(t,n){var i;try{i=e.apply(this,t)}catch(e){return n(e)}if(i&&"function"==typeof i.then)return a(i,n);n(null,i)}))};var n=o(requireInitialParams()),i=o(requireSetImmediate()),r=requireWrapAsync();function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return e.then((e=>{s(t,null,e)}),(e=>{s(t,e&&(e instanceof Error||e.message)?e:new Error(e))}))}function s(e,t,n){try{e(t,n)}catch(e){(0,i.default)((e=>{throw e}),e)}}e.exports=t.default}(asyncify,asyncify.exports)),asyncify.exports}function requireWrapAsync(){if(hasRequiredWrapAsync)return wrapAsync;hasRequiredWrapAsync=1,Object.defineProperty(wrapAsync,"__esModule",{value:!0}),wrapAsync.isAsyncIterable=wrapAsync.isAsyncGenerator=wrapAsync.isAsync=void 0;var e,t=requireAsyncify(),n=(e=t)&&e.__esModule?e:{default:e};function i(e){return"AsyncFunction"===e[Symbol.toStringTag]}return wrapAsync.default=function(e){if("function"!=typeof e)throw new Error("expected a function");return i(e)?(0,n.default)(e):e},wrapAsync.isAsync=i,wrapAsync.isAsyncGenerator=function(e){return"AsyncGenerator"===e[Symbol.toStringTag]},wrapAsync.isAsyncIterable=function(e){return"function"==typeof e[Symbol.asyncIterator]},wrapAsync}var awaitify={exports:{}},hasRequiredAwaitify,hasRequiredParallel;function requireAwaitify(){return hasRequiredAwaitify||(hasRequiredAwaitify=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){t||(t=e.length);if(!t)throw new Error("arity is undefined");return function(...n){return"function"==typeof n[t-1]?e.apply(this,n):new Promise(((i,r)=>{n[t-1]=(e,...t)=>{if(e)return r(e);i(t.length>1?t:t[0])},e.apply(this,n)}))}},e.exports=t.default}(awaitify,awaitify.exports)),awaitify.exports}function requireParallel(){return hasRequiredParallel||(hasRequiredParallel=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=o(requireIsArrayLike()),i=o(requireWrapAsync()),r=o(requireAwaitify());function o(e){return e&&e.__esModule?e:{default:e}}t.default=(0,r.default)(((e,t,r)=>{var o=(0,n.default)(t)?[]:{};e(t,((e,t,n)=>{(0,i.default)(e)(((e,...i)=>{i.length<2&&([i]=i),o[t]=i,n(e)}))}),(e=>r(e,o)))}),3),e.exports=t.default}(parallel,parallel.exports)),parallel.exports}var eachOfSeries={exports:{}},eachOfLimit$1={exports:{}},eachOfLimit={exports:{}},once={exports:{}},hasRequiredOnce;function requireOnce(){return hasRequiredOnce||(hasRequiredOnce=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(...t){if(null!==e){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t},e.exports=t.default}(once,once.exports)),once.exports}var iterator={exports:{}},getIterator={exports:{}},hasRequiredGetIterator,hasRequiredIterator;function requireGetIterator(){return hasRequiredGetIterator||(hasRequiredGetIterator=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()},e.exports=t.default}(getIterator,getIterator.exports)),getIterator.exports}function requireIterator(){return hasRequiredIterator||(hasRequiredIterator=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,n.default)(e))return function(e){var t=-1,n=e.length;return function(){return++t<n?{value:e[t],key:t}:null}}(e);var t=(0,i.default)(e);return t?function(e){var t=-1;return function(){var n=e.next();return n.done?null:(t++,{value:n.value,key:t})}}(t):function(e){var t=e?Object.keys(e):[],n=-1,i=t.length;return function r(){var o=t[++n];return"__proto__"===o?r():n<i?{value:e[o],key:o}:null}}(e)};var n=r(requireIsArrayLike()),i=r(requireGetIterator());function r(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default}(iterator,iterator.exports)),iterator.exports}var onlyOnce={exports:{}},hasRequiredOnlyOnce;function requireOnlyOnce(){return hasRequiredOnlyOnce||(hasRequiredOnlyOnce=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var n=e;e=null,n.apply(this,t)}},e.exports=t.default}(onlyOnce,onlyOnce.exports)),onlyOnce.exports}var asyncEachOfLimit={exports:{}},breakLoop={exports:{}},hasRequiredBreakLoop,hasRequiredAsyncEachOfLimit,hasRequiredEachOfLimit$1,hasRequiredEachOfLimit,hasRequiredEachOfSeries,hasRequiredSeries;function requireBreakLoop(){return hasRequiredBreakLoop||(hasRequiredBreakLoop=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});t.default={},e.exports=t.default}(breakLoop,breakLoop.exports)),breakLoop.exports}function requireAsyncEachOfLimit(){return hasRequiredAsyncEachOfLimit||(hasRequiredAsyncEachOfLimit=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,i){let o=!1,a=!1,s=!1,c=0,l=0;function d(){c>=t||s||o||(s=!0,e.next().then((({value:e,done:t})=>{if(!a&&!o){if(s=!1,t)return o=!0,void(c<=0&&i(null));c++,n(e,l,u),l++,d()}})).catch(p))}function u(e,t){if(c-=1,!a)return e?p(e):!1===e?(o=!0,void(a=!0)):t===r.default||o&&c<=0?(o=!0,i(null)):void d()}function p(e){a||(s=!1,o=!0,i(e))}d()};var n,i=requireBreakLoop(),r=(n=i)&&n.__esModule?n:{default:n};e.exports=t.default}(asyncEachOfLimit,asyncEachOfLimit.exports)),asyncEachOfLimit.exports}function requireEachOfLimit$1(){return hasRequiredEachOfLimit$1||(hasRequiredEachOfLimit$1=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=c(requireOnce()),i=c(requireIterator()),r=c(requireOnlyOnce()),o=requireWrapAsync(),a=c(requireAsyncEachOfLimit()),s=c(requireBreakLoop());function c(e){return e&&e.__esModule?e:{default:e}}t.default=e=>(t,c,l)=>{if(l=(0,n.default)(l),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return l(null);if((0,o.isAsyncGenerator)(t))return(0,a.default)(t,e,c,l);if((0,o.isAsyncIterable)(t))return(0,a.default)(t[Symbol.asyncIterator](),e,c,l);var d=(0,i.default)(t),u=!1,p=!1,m=0,h=!1;function f(e,t){if(!p)if(m-=1,e)u=!0,l(e);else if(!1===e)u=!0,p=!0;else{if(t===s.default||u&&m<=0)return u=!0,l(null);h||g()}}function g(){for(h=!0;m<e&&!u;){var t=d();if(null===t)return u=!0,void(m<=0&&l(null));m+=1,c(t.value,t.key,(0,r.default)(f))}h=!1}g()},e.exports=t.default}(eachOfLimit,eachOfLimit.exports)),eachOfLimit.exports}function requireEachOfLimit(){return hasRequiredEachOfLimit||(hasRequiredEachOfLimit=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=o(requireEachOfLimit$1()),i=o(requireWrapAsync()),r=o(requireAwaitify());function o(e){return e&&e.__esModule?e:{default:e}}t.default=(0,r.default)((function(e,t,r,o){return(0,n.default)(t)(e,(0,i.default)(r),o)}),4),e.exports=t.default}(eachOfLimit$1,eachOfLimit$1.exports)),eachOfLimit$1.exports}function requireEachOfSeries(){return hasRequiredEachOfSeries||(hasRequiredEachOfSeries=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=r(requireEachOfLimit()),i=r(requireAwaitify());function r(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.default)((function(e,t,i){return(0,n.default)(e,1,t,i)}),3),e.exports=t.default}(eachOfSeries,eachOfSeries.exports)),eachOfSeries.exports}function requireSeries(){return hasRequiredSeries||(hasRequiredSeries=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,n.default)(i.default,e,t)};var n=r(requireParallel()),i=r(requireEachOfSeries());function r(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default}(series,series.exports)),series.exports}var readableBrowser={exports:{}},_stream_transform,hasRequired_stream_transform,_stream_passthrough,hasRequired_stream_passthrough,pipeline_1,hasRequiredPipeline,hasRequiredReadableBrowser;function require_stream_transform(){if(hasRequired_stream_transform)return _stream_transform;hasRequired_stream_transform=1,_stream_transform=s;var e=requireErrorsBrowser().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,n=e.ERR_MULTIPLE_CALLBACK,i=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,r=e.ERR_TRANSFORM_WITH_LENGTH_0,o=require_stream_duplex();function a(e,t){var i=this._transformState;i.transforming=!1;var r=i.writecb;if(null===r)return this.emit("error",new n);i.writechunk=null,i.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);o.call(this,e),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",c)}function c(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?l(this,null,null):this._flush((function(t,n){l(e,t,n)}))}function l(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new r;if(e._transformState.transforming)throw new i;return e.push(null)}return requireInherits_browser()(s,o),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,o.prototype.push.call(this,e,t)},s.prototype._transform=function(e,n,i){i(new t("_transform()"))},s.prototype._write=function(e,t,n){var i=this._transformState;if(i.writecb=n,i.writechunk=e,i.writeencoding=t,!i.transforming){var r=this._readableState;(i.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},s.prototype._destroy=function(e,t){o.prototype._destroy.call(this,e,(function(e){t(e)}))},_stream_transform}function require_stream_passthrough(){if(hasRequired_stream_passthrough)return _stream_passthrough;hasRequired_stream_passthrough=1,_stream_passthrough=t;var e=require_stream_transform();function t(n){if(!(this instanceof t))return new t(n);e.call(this,n)}return requireInherits_browser()(t,e),t.prototype._transform=function(e,t,n){n(null,e)},_stream_passthrough}function requirePipeline(){if(hasRequiredPipeline)return pipeline_1;var e;hasRequiredPipeline=1;var t=requireErrorsBrowser().codes,n=t.ERR_MISSING_ARGS,i=t.ERR_STREAM_DESTROYED;function r(e){if(e)throw e}function o(e){e()}function a(e,t){return e.pipe(t)}return pipeline_1=function(){for(var t=arguments.length,s=new Array(t),c=0;c<t;c++)s[c]=arguments[c];var l,d=function(e){return e.length?"function"!=typeof e[e.length-1]?r:e.pop():r}(s);if(Array.isArray(s[0])&&(s=s[0]),s.length<2)throw new n("streams");var u=s.map((function(t,n){var r=n<s.length-1;return function(t,n,r,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===e&&(e=requireEndOfStream()),e(t,{readable:n,writable:r},(function(e){if(e)return o(e);a=!0,o()}));var s=!1;return function(e){if(!a&&!s)return s=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new i("pipe"))}}(t,r,n>0,(function(e){l||(l=e),e&&u.forEach(o),r||(u.forEach(o),d(l))}))}));return s.reduce(a)},pipeline_1}function requireReadableBrowser(){return hasRequiredReadableBrowser||(hasRequiredReadableBrowser=1,function(e,t){(t=e.exports=require_stream_readable()).Stream=t,t.Readable=t,t.Writable=require_stream_writable(),t.Duplex=require_stream_duplex(),t.Transform=require_stream_transform(),t.PassThrough=require_stream_passthrough(),t.finished=requireEndOfStream(),t.pipeline=requirePipeline()}(readableBrowser,readableBrowser.exports)),readableBrowser.exports}var browser={exports:{}},diagnostics,hasRequiredDiagnostics,production,hasRequiredProduction,hasRequiredBrowser,tailFile,hasRequiredTailFile,file,hasRequiredFile,http_1,hasRequiredHttp,isStream_1,hasRequiredIsStream,stream,hasRequiredStream,hasRequiredTransports;function requireDiagnostics(){if(hasRequiredDiagnostics)return diagnostics;hasRequiredDiagnostics=1;var e=[],t=[],n=function(){};function i(t){return!~e.indexOf(t)&&(e.push(t),!0)}function r(e){n=e}function o(t){for(var n=[],i=0;i<e.length;i++)if(e[i].async)n.push(e[i]);else if(e[i](t))return!0;return!!n.length&&new Promise((function(e){Promise.all(n.map((function(e){return e(t)}))).then((function(t){e(t.some(Boolean))}))}))}function a(e){return!~t.indexOf(e)&&(t.push(e),!0)}function s(){n.apply(n,arguments)}function c(e){for(var n=0;n<t.length;n++)e=t[n].apply(t[n],arguments);return e}function l(e,t){var n=Object.prototype.hasOwnProperty;for(var i in t)n.call(t,i)&&(e[i]=t[i]);return e}function d(e){return e.enabled=!1,e.modify=a,e.set=r,e.use=i,l((function(){return!1}),e)}function u(e){return e.enabled=!0,e.modify=a,e.set=r,e.use=i,l((function(){var t=Array.prototype.slice.call(arguments,0);return s.call(s,e,c(t,e)),!0}),e)}return diagnostics=function(e){return e.introduce=l,e.enabled=o,e.process=c,e.modify=a,e.write=s,e.nope=d,e.yep=u,e.set=r,e.use=i,e}}function requireProduction(){if(hasRequiredProduction)return production;hasRequiredProduction=1;var e=requireDiagnostics()((function e(t,n){return(n=n||{}).namespace=t,n.prod=!0,n.dev=!1,n.force||e.force?e.yep(n):e.nope(n)}));return production=e}function requireBrowser(){return hasRequiredBrowser||(hasRequiredBrowser=1,browser.exports=requireProduction()),browser.exports}function requireTailFile(){if(hasRequiredTailFile)return tailFile;hasRequiredTailFile=1;var e=require$$0$6,t=require$$1$2.StringDecoder,n=requireReadableBrowser().Stream;function i(){}return tailFile=function(r,o){var a=Buffer.alloc(65536),s=new t("utf8"),c=new n,l="",d=0,u=0;return-1===r.start&&delete r.start,c.readable=!0,c.destroy=function(){c.destroyed=!0,c.emit("end"),c.emit("close")},e.open(r.file,"a+","0644",(function(t,n){if(t)return o?o(t):c.emit("error",t),void c.destroy();!function t(){if(!c.destroyed)return e.read(n,a,0,a.length,d,(function(e,n){if(e)return o?o(e):c.emit("error",e),void c.destroy();if(!n)return l&&((null==r.start||u>r.start)&&(o?o(null,l):c.emit("line",l)),u++,l=""),setTimeout(t,1e3);var i=s.write(a.slice(0,n));o||c.emit("data",i);for(var p=(i=(l+i).split(/\n+/)).length-1,m=0;m<p;m++)(null==r.start||u>r.start)&&(o?o(null,i[m]):c.emit("line",i[m])),u++;return l=i[p],d+=n,t()}));e.close(n,i)}()})),o?c.destroy:c},tailFile}function requireFile(){if(hasRequiredFile)return file;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}function i(t,n,i){return n=o(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,r()?Reflect.construct(n,i||[],o(t).constructor):n.apply(t,i))}function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(r=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}hasRequiredFile=1;var s=require$$0$6,c=require$$0$9,l=requireSeries(),d=require$$3$1,u=requireTripleBeam().MESSAGE,p=requireReadableBrowser(),m=p.Stream,h=p.PassThrough,f=requireDist(),g=requireBrowser()("winston:file"),y=require$$0$7,v=requireTailFile();return file=function(n){function r(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};function n(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];i.slice(1).forEach((function(n){if(t[n])throw new Error("Cannot set ".concat(n," and ").concat(e," together"))}))}if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(e=i(this,r,[t])).name=t.name||"file",e._stream=new h,e._stream.setMaxListeners(30),e._onError=e._onError.bind(e),t.filename||t.dirname)n("filename or dirname","stream"),e._basename=e.filename=t.filename?c.basename(t.filename):"winston.log",e.dirname=t.dirname||c.dirname(t.filename),e.options=t.options||{flags:"a"};else{if(!t.stream)throw new Error("Cannot log to file without filename or stream.");console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),n("stream","filename","maxsize"),e._dest=e._stream.pipe(e._setupStream(t.stream)),e.dirname=c.dirname(e._dest.path)}return e.maxsize=t.maxsize||null,e.rotationFormat=t.rotationFormat||!1,e.zippedArchive=t.zippedArchive||!1,e.maxFiles=t.maxFiles||null,e.eol="string"==typeof t.eol?t.eol:y.EOL,e.tailable=t.tailable||!1,e.lazy=t.lazy||!1,e._size=0,e._pendingSize=0,e._created=0,e._drain=!1,e._opening=!1,e._ending=!1,e._fileExist=!1,e.dirname&&e._createLogDirIfNotExist(e.dirname),e.lazy||e.open(),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(r,n),t(r,[{key:"finishIfEnding",value:function(){var e=this;this._ending&&(this._opening?this.once("open",(function(){e._stream.once("finish",(function(){return e.emit("finish")})),setImmediate((function(){return e._stream.end()}))})):(this._stream.once("finish",(function(){return e.emit("finish")})),setImmediate((function(){return e._stream.end()}))))}},{key:"log",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if(this.silent)return n(),!0;if(this._drain)this._stream.once("drain",(function(){t._drain=!1,t.log(e,n)}));else{if(!this._rotate){if(this.lazy){if(!this._fileExist)return this._opening||this.open(),void this.once("open",(function(){t._fileExist=!0,t.log(e,n)}));if(this._needsNewFile(this._pendingSize))return void this._dest.once("close",(function(){t._opening||t.open(),t.once("open",(function(){t.log(e,n)}))}))}var i="".concat(e[u]).concat(this.eol),r=Buffer.byteLength(i);this._pendingSize+=r,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);var o=this._stream.write(i,function(){var t=this;this._size+=r,this._pendingSize-=r,g("logged %s %s",this._size,i),this.emit("logged",e),this._rotate||this._opening||this._needsNewFile()&&(this.lazy?this._endStream((function(){t.emit("fileclosed")})):(this._rotate=!0,this._endStream((function(){return t._rotateFile()}))))}.bind(this));return o?n():(this._drain=!0,this._stream.once("drain",(function(){t._drain=!1,n()}))),g("written",o,this._drain),this.finishIfEnding(),o}this._stream.once("rotate",(function(){t._rotate=!1,t.log(e,n)}))}}},{key:"query",value:function(t,n){"function"==typeof t&&(n=t,t={}),t=function(t){t=t||{},t.rows=t.rows||t.limit||10,t.start=t.start||0,t.until=t.until||new Date,"object"!==e(t.until)&&(t.until=new Date(t.until));t.from=t.from||t.until-864e5,"object"!==e(t.from)&&(t.from=new Date(t.from));return t.order=t.order||"desc",t}(t);var i=c.join(this.dirname,this.filename),r="",o=[],a=0,l=s.createReadStream(i,{encoding:"utf8"});function d(n,i){try{var r=JSON.parse(n);(function(n){if(!n)return;if("object"!==e(n))return;var i=new Date(n.timestamp);if(t.from&&i<t.from||t.until&&i>t.until||t.level&&t.level!==n.level)return;return!0})(r)&&function(e){if(t.rows&&o.length>=t.rows&&"desc"!==t.order)return void(l.readable&&l.destroy());t.fields&&(e=t.fields.reduce((function(t,n){return t[n]=e[n],t}),{}));"desc"===t.order&&o.length>=t.rows&&o.shift();o.push(e)}(r)}catch(e){i||l.emit("error",e)}}l.on("error",(function(e){if(l.readable&&l.destroy(),n)return"ENOENT"!==e.code?n(e):n(null,o)})),l.on("data",(function(e){for(var n=(e=(r+e).split(/\n+/)).length-1,i=0;i<n;i++)(!t.start||a>=t.start)&&d(e[i]),a++;r=e[n]})),l.on("close",(function(){r&&d(r,!0),"desc"===t.order&&(o=o.reverse()),n&&n(null,o)}))}},{key:"stream",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=c.join(this.dirname,this.filename),n=new m,i={file:t,start:e.start};return n.destroy=v(i,(function(e,t){if(e)return n.emit("error",e);try{n.emit("data",t),t=JSON.parse(t),n.emit("log",t)}catch(e){n.emit("error",e)}})),n}},{key:"open",value:function(){var e=this;this.filename&&(this._opening||(this._opening=!0,this.stat((function(t,n){if(t)return e.emit("error",t);g("stat done: %s { size: %s }",e.filename,n),e._size=n,e._dest=e._createStream(e._stream),e._opening=!1,e.once("open",(function(){e._stream.emit("rotate")||(e._rotate=!1)}))}))))}},{key:"stat",value:function(e){var t=this,n=this._getFile(),i=c.join(this.dirname,n);s.stat(i,(function(r,o){return r&&"ENOENT"===r.code?(g("ENOENT ok",i),t.filename=n,e(null,0)):r?(g("err ".concat(r.code," ").concat(i)),e(r)):!o||t._needsNewFile(o.size)?t._incFile((function(){return t.stat(e)})):(t.filename=n,void e(null,o.size))}))}},{key:"close",value:function(e){var t=this;this._stream&&this._stream.end((function(){e&&e(),t.emit("flush"),t.emit("closed")}))}},{key:"_needsNewFile",value:function(e){return e=e||this._size,this.maxsize&&e>=this.maxsize}},{key:"_onError",value:function(e){this.emit("error",e)}},{key:"_setupStream",value:function(e){return e.on("error",this._onError),e}},{key:"_cleanupStream",value:function(e){return e.removeListener("error",this._onError),e.destroy(),e}},{key:"_rotateFile",value:function(){var e=this;this._incFile((function(){return e.open()}))}},{key:"_endStream",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};this._dest?(this._stream.unpipe(this._dest),this._dest.end((function(){e._cleanupStream(e._dest),t()}))):t()}},{key:"_createStream",value:function(e){var t=this,n=c.join(this.dirname,this.filename);g("create stream start",n,this.options);var i=s.createWriteStream(n,this.options).on("error",(function(e){return g(e)})).on("close",(function(){return g("close",i.path,i.bytesWritten)})).on("open",(function(){g("file open ok",n),t.emit("open",n),e.pipe(i),t.rotatedWhileOpening&&(t._stream=new h,t._stream.setMaxListeners(30),t._rotateFile(),t.rotatedWhileOpening=!1,t._cleanupStream(i),e.end())}));return g("create stream ok",n),i}},{key:"_incFile",value:function(e){g("_incFile",this.filename);var t=c.extname(this._basename),n=c.basename(this._basename,t),i=[];this.zippedArchive&&i.push(function(e){var i=this._created>0&&!this.tailable?this._created:"";this._compressFile(c.join(this.dirname,"".concat(n).concat(i).concat(t)),c.join(this.dirname,"".concat(n).concat(i).concat(t,".gz")),e)}.bind(this)),i.push(function(e){this.tailable?this._checkMaxFilesTailable(t,n,e):(this._created+=1,this._checkMaxFilesIncrementing(t,n,e))}.bind(this)),l(i,e)}},{key:"_getFile",value:function(){var e=c.extname(this._basename),t=c.basename(this._basename,e),n=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?"".concat(t).concat(n).concat(e):"".concat(t).concat(e)}},{key:"_checkMaxFilesIncrementing",value:function(e,t,n){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(n);var i=this._created-this.maxFiles,r=0!==i?i:"",o=this.zippedArchive?".gz":"",a="".concat(t).concat(r).concat(e).concat(o),l=c.join(this.dirname,a);s.unlink(l,n)}},{key:"_checkMaxFilesTailable",value:function(e,t,n){var i=this,r=[];if(this.maxFiles){for(var o=this.zippedArchive?".gz":"",a=this.maxFiles-1;a>1;a--)r.push(function(n,i){var r=this,a="".concat(t).concat(n-1).concat(e).concat(o),l=c.join(this.dirname,a);s.exists(l,(function(d){if(!d)return i(null);a="".concat(t).concat(n).concat(e).concat(o),s.rename(l,c.join(r.dirname,a),i)}))}.bind(this,a));l(r,(function(){s.rename(c.join(i.dirname,"".concat(t).concat(e).concat(o)),c.join(i.dirname,"".concat(t,"1").concat(e).concat(o)),n)}))}}},{key:"_compressFile",value:function(e,t,n){s.access(e,s.F_OK,(function(i){if(i)return n();var r=d.createGzip(),o=s.createReadStream(e),a=s.createWriteStream(t);a.on("finish",(function(){s.unlink(e,n)})),o.pipe(r).pipe(a)}))}},{key:"_createLogDirIfNotExist",value:function(e){s.existsSync(e)||s.mkdirSync(e,{recursive:!0})}}])}(f),file}function requireHttp(){if(hasRequiredHttp)return http_1;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function n(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,n){return(t=o(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t,n){return t&&function(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,o(i.key),i)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n||"default");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}function a(t,n,i){return n=c(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,s()?Reflect.construct(n,i||[],c(t).constructor):n.apply(t,i))}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}hasRequiredHttp=1;var d=require$$0$5,u=require$$1,p=requireReadableBrowser().Stream,m=requireDist(),h=requireSafeStableStringify().configure;return http_1=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=a(this,t,[n])).options=n,e.name=n.name||"http",e.ssl=!!n.ssl,e.host=n.host||"localhost",e.port=n.port,e.auth=n.auth,e.path=n.path||"",e.maximumDepth=n.maximumDepth,e.agent=n.agent,e.headers=n.headers||{},e.headers["content-type"]="application/json",e.batch=n.batch||!1,e.batchInterval=n.batchInterval||5e3,e.batchCount=n.batchCount||10,e.batchOptions=[],e.batchTimeoutID=-1,e.batchCallback={},e.port||(e.port=e.ssl?443:80),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(t,e),r(t,[{key:"log",value:function(e,t){var n=this;this._request(e,null,null,(function(t,i){i&&200!==i.statusCode&&(t=new Error("Invalid HTTP Status Code: ".concat(i.statusCode))),t?n.emit("warn",t):n.emit("logged",e)})),t&&setImmediate(t)}},{key:"query",value:function(e,t){"function"==typeof e&&(t=e,e={});var n=(e={method:"query",params:this.normalizeQuery(e)}).params.auth||null;delete e.params.auth;var i=e.params.path||null;delete e.params.path,this._request(e,n,i,(function(e,n,i){if(n&&200!==n.statusCode&&(e=new Error("Invalid HTTP Status Code: ".concat(n.statusCode))),e)return t(e);if("string"==typeof i)try{i=JSON.parse(i)}catch(e){return t(e)}t(null,i)}))}},{key:"stream",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new p,n=(e={method:"stream",params:e}).params.path||null;delete e.params.path;var i=e.params.auth||null;delete e.params.auth;var r="",o=this._request(e,i,n);return t.destroy=function(){return o.destroy()},o.on("data",(function(e){for(var n=(e=(r+e).split(/\n+/)).length-1,i=0;i<n;i++)try{t.emit("log",JSON.parse(e[i]))}catch(e){t.emit("error",e)}r=e[n]})),o.on("error",(function(e){return t.emit("error",e)})),t}},{key:"_request",value:function(e,t,n,i){e=e||{},t=t||this.auth,n=n||this.path||"",this.batch?this._doBatch(e,i,t,n):this._doRequest(e,i,t,n)}},{key:"_doBatch",value:function(e,t,n,i){if(this.batchOptions.push(e),1===this.batchOptions.length){var r=this;this.batchCallback=t,this.batchTimeoutID=setTimeout((function(){r.batchTimeoutID=-1,r._doBatchRequest(r.batchCallback,n,i)}),this.batchInterval)}this.batchOptions.length===this.batchCount&&this._doBatchRequest(this.batchCallback,n,i)}},{key:"_doBatchRequest",value:function(e,t,n){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);var i=this.batchOptions.slice();this.batchOptions=[],this._doRequest(i,e,t,n)}},{key:"_doRequest",value:function(e,t,i,r){var o=Object.assign({},this.headers);i&&i.bearer&&(o.Authorization="Bearer ".concat(i.bearer));var a=(this.ssl?u:d).request(n(n({},this.options),{},{method:"POST",host:this.host,port:this.port,path:"/".concat(r.replace(/^\//,"")),headers:o,auth:i&&i.username&&i.password?"".concat(i.username,":").concat(i.password):"",agent:this.agent}));a.on("error",t),a.on("response",(function(e){return e.on("end",(function(){return t(null,e)})).resume()}));var s=h(n({},this.maximumDepth&&{maximumDepth:this.maximumDepth}));a.end(Buffer.from(s(e,this.options.replacer),"utf8"))}}])}(m),http_1}function requireIsStream(){if(hasRequiredIsStream)return isStream_1;hasRequiredIsStream=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,isStream_1=e}function requireStream(){if(hasRequiredStream)return stream;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}function i(t,n,i){return n=o(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,r()?Reflect.construct(n,i||[],o(t).constructor):n.apply(t,i))}function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(r=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}hasRequiredStream=1;var s=requireIsStream(),c=requireTripleBeam().MESSAGE,l=require$$0$7,d=requireDist();return stream=function(e){function n(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),e=i(this,n,[t]),!t.stream||!s(t.stream))throw new Error("options.stream is required.");return e._stream=t.stream,e._stream.setMaxListeners(1/0),e.isObjectMode=t.stream._writableState.objectMode,e.eol="string"==typeof t.eol?t.eol:l.EOL,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(n,e),t(n,[{key:"log",value:function(e,t){var n=this;if(setImmediate((function(){return n.emit("logged",e)})),this.isObjectMode)return this._stream.write(e),void(t&&t());this._stream.write("".concat(e[c]).concat(this.eol)),t&&t()}}])}(d),stream}function requireTransports(){return hasRequiredTransports||(hasRequiredTransports=1,function(e){Object.defineProperty(e,"Console",{configurable:!0,enumerable:!0,get:function(){return requireConsole()}}),Object.defineProperty(e,"File",{configurable:!0,enumerable:!0,get:function(){return requireFile()}}),Object.defineProperty(e,"Http",{configurable:!0,enumerable:!0,get:function(){return requireHttp()}}),Object.defineProperty(e,"Stream",{configurable:!0,enumerable:!0,get:function(){return requireStream()}})}(transports)),transports}var config={},hasRequiredConfig;function requireConfig(){if(hasRequiredConfig)return config;hasRequiredConfig=1;var e=requireBrowser$2(),t=requireTripleBeam().configs;return config.cli=e.levels(t.cli),config.npm=e.levels(t.npm),config.syslog=e.levels(t.syslog),config.addColors=e.levels,config}var forEach={exports:{}},eachOf={exports:{}},hasRequiredEachOf;function requireEachOf(){return hasRequiredEachOf||(hasRequiredEachOf=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=l(requireIsArrayLike()),i=l(requireBreakLoop()),r=l(requireEachOfLimit()),o=l(requireOnce()),a=l(requireOnlyOnce()),s=l(requireWrapAsync()),c=l(requireAwaitify());function l(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n){n=(0,o.default)(n);var r=0,s=0,{length:c}=e,l=!1;function d(e,t){!1===e&&(l=!0),!0!==l&&(e?n(e):++s!==c&&t!==i.default||n(null))}for(0===c&&n(null);r<c;r++)t(e[r],r,(0,a.default)(d))}function u(e,t,n){return(0,r.default)(e,1/0,t,n)}t.default=(0,c.default)((function(e,t,i){return((0,n.default)(e)?d:u)(e,(0,s.default)(t),i)}),3),e.exports=t.default}(eachOf,eachOf.exports)),eachOf.exports}var withoutIndex={exports:{}},hasRequiredWithoutIndex,hasRequiredForEach,fn_name,hasRequiredFn_name,oneTime,hasRequiredOneTime;function requireWithoutIndex(){return hasRequiredWithoutIndex||(hasRequiredWithoutIndex=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(t,n,i)=>e(t,i)},e.exports=t.default}(withoutIndex,withoutIndex.exports)),withoutIndex.exports}function requireForEach(){return hasRequiredForEach||(hasRequiredForEach=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=a(requireEachOf()),i=a(requireWithoutIndex()),r=a(requireWrapAsync()),o=a(requireAwaitify());function a(e){return e&&e.__esModule?e:{default:e}}t.default=(0,o.default)((function(e,t,o){return(0,n.default)(e,(0,i.default)((0,r.default)(t)),o)}),3),e.exports=t.default}(forEach,forEach.exports)),forEach.exports}function requireFn_name(){if(hasRequiredFn_name)return fn_name;hasRequiredFn_name=1;var e=Object.prototype.toString;return fn_name=function(t){if("string"==typeof t.displayName&&t.constructor.name)return t.displayName;if("string"==typeof t.name&&t.name)return t.name;if("object"==typeof t&&t.constructor&&"string"==typeof t.constructor.name)return t.constructor.name;var n=t.toString(),i=e.call(t).slice(8,-1);return(n="Function"===i?n.substring(n.indexOf("(")+1,n.indexOf(")")):i)||"anonymous"}}function requireOneTime(){if(hasRequiredOneTime)return oneTime;hasRequiredOneTime=1;var e=requireFn_name();return oneTime=function(t){var n,i=0;function r(){return i||(i=1,n=t.apply(this,arguments),t=null),n}return r.displayName=e(t),r},oneTime}var stackTrace={},hasRequiredStackTrace,exceptionStream,hasRequiredExceptionStream,exceptionHandler,hasRequiredExceptionHandler,rejectionStream,hasRequiredRejectionStream,rejectionHandler,hasRequiredRejectionHandler;function requireStackTrace(){return hasRequiredStackTrace||(hasRequiredStackTrace=1,function(e){function t(e){for(var t in e)this[t]=e[t]}e.get=function(t){var n=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var i={},r=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t},Error.captureStackTrace(i,t||e.get);var o=i.stack;return Error.prepareStackTrace=r,Error.stackTraceLimit=n,o},e.parse=function(e){if(!e.stack)return[];var t=this;return e.stack.split("\n").slice(1).map((function(e){if(e.match(/^\s*[-]{4,}$/))return t._createParsedCallSite({fileName:e,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var n=e.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(n){var i=null,r=null,o=null,a=null,s=null,c="native"===n[5];if(n[1]){var l=(o=n[1]).lastIndexOf(".");if("."==o[l-1]&&l--,l>0){i=o.substr(0,l),r=o.substr(l+1);var d=i.indexOf(".Module");d>0&&(o=o.substr(d+1),i=i.substr(0,d))}a=null}r&&(a=i,s=r),"<anonymous>"===r&&(s=null,o=null);var u={fileName:n[2]||null,lineNumber:parseInt(n[3],10)||null,functionName:o,typeName:a,methodName:s,columnNumber:parseInt(n[4],10)||null,native:c};return t._createParsedCallSite(u)}})).filter((function(e){return!!e}))};["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"].forEach((function(e){t.prototype[e]=null,t.prototype["get"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}})),["topLevel","eval","native","constructor"].forEach((function(e){t.prototype[e]=!1,t.prototype["is"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}})),e._createParsedCallSite=function(e){return new t(e)}}(stackTrace)),stackTrace}function requireExceptionStream(){if(hasRequiredExceptionStream)return exceptionStream;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}function i(t,n,i){return n=o(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,r()?Reflect.construct(n,i||[],o(t).constructor):n.apply(t,i))}function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(r=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}hasRequiredExceptionStream=1;var s=requireReadableBrowser().Writable;return exceptionStream=function(e){function n(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t=i(this,n,[{objectMode:!0}]),!e)throw new Error("ExceptionStream requires a TransportStream instance.");return t.handleExceptions=!0,t.transport=e,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(n,e),t(n,[{key:"_write",value:function(e,t,n){return e.exception?this.transport.log(e,n):(n(),!0)}}])}(s),exceptionStream}function requireExceptionHandler(){if(hasRequiredExceptionHandler)return exceptionHandler;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}hasRequiredExceptionHandler=1;var i=require$$0$7,r=requireForEach(),o=requireBrowser()("winston:exception"),a=requireOneTime(),s=requireStackTrace(),c=requireExceptionStream();return exceptionHandler=function(){return t((function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("Logger is required to handle exceptions");this.logger=t,this.handlers=new Map}),[{key:"handle",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];n.forEach((function(t){if(Array.isArray(t))return t.forEach((function(t){return e._addHandler(t)}));e._addHandler(t)})),this.catcher||(this.catcher=this._uncaughtException.bind(this),process.on("uncaughtException",this.catcher))}},{key:"unhandle",value:function(){var e=this;this.catcher&&(process.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((function(t){return e.logger.unpipe(t)})))}},{key:"getAllInfo",value:function(e){var t=null;return e&&(t="string"==typeof e?e:e.message),{error:e,level:"error",message:["uncaughtException: ".concat(t||"(no error message)"),e&&e.stack||" No stack trace"].join("\n"),stack:e&&e.stack,exception:!0,date:(new Date).toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}},{key:"getProcessInfo",value:function(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}},{key:"getOsInfo",value:function(){return{loadavg:i.loadavg(),uptime:i.uptime()}}},{key:"getTrace",value:function(e){return(e?s.parse(e):s.get()).map((function(e){return{column:e.getColumnNumber(),file:e.getFileName(),function:e.getFunctionName(),line:e.getLineNumber(),method:e.getMethodName(),native:e.isNative()}}))}},{key:"_addHandler",value:function(e){if(!this.handlers.has(e)){e.handleExceptions=!0;var t=new c(e);this.handlers.set(e,t),this.logger.pipe(t)}}},{key:"_uncaughtException",value:function(e){var t,n=this.getAllInfo(e),i=this._getExceptionHandlers(),s="function"==typeof this.logger.exitOnError?this.logger.exitOnError(e):this.logger.exitOnError;function c(){o("doExit",s),o("process._exiting",process._exiting),s&&!process._exiting&&(t&&clearTimeout(t),process.exit(1))}if(!i.length&&s&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),s=!1),!i||0===i.length)return process.nextTick(c);r(i,(function(e,t){var n=a(t),i=e.transport||e;function r(e){return function(){o(e),n()}}i._ending=!0,i.once("finish",r("finished")),i.once("error",r("error"))}),(function(){return s&&c()})),this.logger.log(n),s&&(t=setTimeout(c,3e3))}},{key:"_getExceptionHandlers",value:function(){return this.logger.transports.filter((function(e){return(e.transport||e).handleExceptions}))}}])}(),exceptionHandler}function requireRejectionStream(){if(hasRequiredRejectionStream)return rejectionStream;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}function i(t,n,i){return n=o(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,r()?Reflect.construct(n,i||[],o(t).constructor):n.apply(t,i))}function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(r=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}hasRequiredRejectionStream=1;var s=requireReadableBrowser().Writable;return rejectionStream=function(e){function n(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t=i(this,n,[{objectMode:!0}]),!e)throw new Error("RejectionStream requires a TransportStream instance.");return t.handleRejections=!0,t.transport=e,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(n,e),t(n,[{key:"_write",value:function(e,t,n){return e.rejection?this.transport.log(e,n):(n(),!0)}}])}(s),rejectionStream}function requireRejectionHandler(){if(hasRequiredRejectionHandler)return rejectionHandler;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}hasRequiredRejectionHandler=1;var i=require$$0$7,r=requireForEach(),o=requireBrowser()("winston:rejection"),a=requireOneTime(),s=requireStackTrace(),c=requireRejectionStream();return rejectionHandler=function(){return t((function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("Logger is required to handle rejections");this.logger=t,this.handlers=new Map}),[{key:"handle",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];n.forEach((function(t){if(Array.isArray(t))return t.forEach((function(t){return e._addHandler(t)}));e._addHandler(t)})),this.catcher||(this.catcher=this._unhandledRejection.bind(this),process.on("unhandledRejection",this.catcher))}},{key:"unhandle",value:function(){var e=this;this.catcher&&(process.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((function(t){return e.logger.unpipe(t)})))}},{key:"getAllInfo",value:function(e){var t=null;return e&&(t="string"==typeof e?e:e.message),{error:e,level:"error",message:["unhandledRejection: ".concat(t||"(no error message)"),e&&e.stack||" No stack trace"].join("\n"),stack:e&&e.stack,rejection:!0,date:(new Date).toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}},{key:"getProcessInfo",value:function(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}},{key:"getOsInfo",value:function(){return{loadavg:i.loadavg(),uptime:i.uptime()}}},{key:"getTrace",value:function(e){return(e?s.parse(e):s.get()).map((function(e){return{column:e.getColumnNumber(),file:e.getFileName(),function:e.getFunctionName(),line:e.getLineNumber(),method:e.getMethodName(),native:e.isNative()}}))}},{key:"_addHandler",value:function(e){if(!this.handlers.has(e)){e.handleRejections=!0;var t=new c(e);this.handlers.set(e,t),this.logger.pipe(t)}}},{key:"_unhandledRejection",value:function(e){var t,n=this.getAllInfo(e),i=this._getRejectionHandlers(),s="function"==typeof this.logger.exitOnError?this.logger.exitOnError(e):this.logger.exitOnError;function c(){o("doExit",s),o("process._exiting",process._exiting),s&&!process._exiting&&(t&&clearTimeout(t),process.exit(1))}if(!i.length&&s&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),s=!1),!i||0===i.length)return process.nextTick(c);r(i,(function(e,t){var n=a(t),i=e.transport||e;function r(e){return function(){o(e),n()}}i._ending=!0,i.once("finish",r("finished")),i.once("error",r("error"))}),(function(){return s&&c()})),this.logger.log(n),s&&(t=setTimeout(c,3e3))}},{key:"_getRejectionHandlers",value:function(){return this.logger.transports.filter((function(e){return(e.transport||e).handleRejections}))}}])}(),rejectionHandler}var legacy={exports:{}},modern={exports:{}},hasRequiredModern,hasRequiredLegacy,profiler,hasRequiredProfiler,format,hasRequiredFormat,json,hasRequiredJson,logger$1,hasRequiredLogger,createLogger,hasRequiredCreateLogger,container,hasRequiredContainer,hasRequiredWinston;function requireModern(){if(hasRequiredModern)return modern.exports;hasRequiredModern=1;const e=require$$0$8,t=require_stream_writable(),{LEVEL:n}=requireTripleBeam(),i=modern.exports=function(e={}){t.call(this,{objectMode:!0,highWaterMark:e.highWaterMark}),this.format=e.format,this.level=e.level,this.handleExceptions=e.handleExceptions,this.handleRejections=e.handleRejections,this.silent=e.silent,e.log&&(this.log=e.log),e.logv&&(this.logv=e.logv),e.close&&(this.close=e.close),this.once("pipe",(e=>{this.levels=e.levels,this.parent=e})),this.once("unpipe",(e=>{e===this.parent&&(this.parent=null,this.close&&this.close())}))};return e.inherits(i,t),i.prototype._write=function(e,t,i){if(this.silent||!0===e.exception&&!this.handleExceptions)return i(null);const r=this.level||this.parent&&this.parent.level;if(!r||this.levels[r]>=this.levels[e[n]]){if(e&&!this.format)return this.log(e,i);let t,n;try{n=this.format.transform(Object.assign({},e),this.format.options)}catch(e){t=e}if(t||!n){if(i(),t)throw t;return}return this.log(n,i)}return this._writableState.sync=!1,i(null)},i.prototype._writev=function(e,t){if(this.logv){const n=e.filter(this._accept,this);return n.length?this.logv(n,t):t(null)}for(let n=0;n<e.length;n++){if(!this._accept(e[n]))continue;if(e[n].chunk&&!this.format){this.log(e[n].chunk,e[n].callback);continue}let i,r;try{r=this.format.transform(Object.assign({},e[n].chunk),this.format.options)}catch(e){i=e}if(i||!r){if(e[n].callback(),i)throw t(null),i}else this.log(r,e[n].callback)}return t(null)},i.prototype._accept=function(e){const t=e.chunk;if(this.silent)return!1;const i=this.level||this.parent&&this.parent.level;return!(!0!==t.exception&&i&&!(this.levels[i]>=this.levels[t[n]])||!this.handleExceptions&&!0===t.exception)},i.prototype._nop=function(){},modern.exports}function requireLegacy(){if(hasRequiredLegacy)return legacy.exports;hasRequiredLegacy=1;const e=require$$0$8,{LEVEL:t}=requireTripleBeam(),n=requireModern(),i=legacy.exports=function(e={}){if(n.call(this,e),!e.transport||"function"!=typeof e.transport.log)throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=function(e){this.emit("error",e,this.transport)}.bind(this),this.transport.on("error",this.transport.__winstonError))};return e.inherits(i,n),i.prototype._write=function(e,n,i){if(this.silent||!0===e.exception&&!this.handleExceptions)return i(null);(!this.level||this.levels[this.level]>=this.levels[e[t]])&&this.transport.log(e[t],e.message,e,this._nop),i(null)},i.prototype._writev=function(e,n){for(let n=0;n<e.length;n++)this._accept(e[n])&&(this.transport.log(e[n].chunk[t],e[n].chunk.message,e[n].chunk,this._nop),e[n].callback());return n(null)},i.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join("\n"))},i.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)},legacy.exports}function requireProfiler(){if(hasRequiredProfiler)return profiler;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}hasRequiredProfiler=1;var i=function(){return t((function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=requireLogger();if("object"!==e(n)||Array.isArray(n)||!(n instanceof i))throw new Error("Logger is required for profiling");this.logger=n,this.start=Date.now()}),[{key:"done",value:function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];"function"==typeof n[n.length-1]&&(console.warn("Callback function no longer supported as of winston@3.0.0"),n.pop());var r="object"===e(n[n.length-1])?n.pop():{};return r.level=r.level||"info",r.durationMs=Date.now()-this.start,this.logger.write(r)}}])}();return profiler=i}function requireFormat(){if(hasRequiredFormat)return format;hasRequiredFormat=1;class e extends Error{constructor(t){super(`Format functions must be synchronous taking a two arguments: (info, opts)\nFound: ${t.toString().split("\n")[0]}\n`),Error.captureStackTrace(this,e)}}return format=t=>{if(t.length>2)throw new e(t);function n(e={}){this.options=e}function i(e){return new n(e)}return n.prototype.transform=t,i.Format=n,i}}function requireJson(){if(hasRequiredJson)return json;hasRequiredJson=1;const e=requireFormat(),{MESSAGE:t}=requireTripleBeam(),n=requireSafeStableStringify();function i(e,t){return"bigint"==typeof t?t.toString():t}return json=e(((e,r)=>{const o=n.configure(r);return e[t]=o(e,r.replacer||i,r.space),e}))}function requireLogger(){if(hasRequiredLogger)return logger$1;function e(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e,t,n){return t&&function(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,i(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,n||"default");if("object"!=t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}function r(e,n,i){return n=a(n),function(e,n){if(n&&("object"==t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,o()?Reflect.construct(n,i||[],a(e).constructor):n.apply(e,i))}function o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(o=function(){return!!e})()}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}hasRequiredLogger=1;var c=requireReadableBrowser(),l=c.Stream,d=c.Transform,u=requireForEach(),p=requireTripleBeam(),m=p.LEVEL,h=p.SPLAT,f=requireIsStream(),g=requireExceptionHandler(),y=requireRejectionHandler(),v=requireLegacy(),_=requireProfiler(),E=requireCommon().warn,x=requireConfig(),S=/%[scdjifoO%]/g,b=function(i){function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r(this,o,[{objectMode:!0}])).configure(e),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(o,i),n(o,[{key:"child",value:function(e){var t=this;return Object.create(t,{write:{value:function(n){var i=Object.assign({},e,n);n instanceof Error&&(i.stack=n.stack,i.message=n.message),t.write(i)}}})}},{key:"configure",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.silent,i=t.format,r=t.defaultMeta,o=t.levels,a=t.level,s=void 0===a?"info":a,c=t.exitOnError,l=void 0===c||c,d=t.transports,u=t.colors,p=t.emitErrs,m=t.formatters,h=t.padLevels,f=t.rewriters,v=t.stripColors,_=t.exceptionHandlers,E=t.rejectionHandlers;if(this.transports.length&&this.clear(),this.silent=n,this.format=i||this.format||requireJson()(),this.defaultMeta=r||null,this.levels=o||this.levels||x.npm.levels,this.level=s,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new g(this),this.rejections=new y(this),this.profilers={},this.exitOnError=l,d&&(d=Array.isArray(d)?d:[d]).forEach((function(t){return e.add(t)})),u||p||m||h||f||v)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join("\n"));_&&this.exceptions.handle(_),E&&this.rejections.handle(E)}},{key:"isLevelEnabled",value:function(e){var t=this,n=w(this.levels,e);if(null===n)return!1;var i=w(this.levels,this.level);return null!==i&&(this.transports&&0!==this.transports.length?-1!==this.transports.findIndex((function(e){var r=w(t.levels,e.level);return null===r&&(r=i),r>=n})):i>=n)}},{key:"log",value:function(n,i){for(var r=arguments.length,o=new Array(r>2?r-2:0),a=2;a<r;a++)o[a-2]=arguments[a];if(1===arguments.length)return n[m]=n.level,this._addDefaultMeta(n),this.write(n),this;if(2===arguments.length)return i&&"object"===t(i)?(i[m]=i.level=n,this._addDefaultMeta(i),this.write(i),this):(i=e(e(e({},m,n),"level",n),"message",i),this._addDefaultMeta(i),this.write(i),this);var s=o[0];if("object"===t(s)&&null!==s&&!(i&&i.match&&i.match(S))){var c=Object.assign({},this.defaultMeta,s,e(e(e(e({},m,n),h,o),"level",n),"message",i));return s.message&&(c.message="".concat(c.message," ").concat(s.message)),s.stack&&(c.stack=s.stack),s.cause&&(c.cause=s.cause),this.write(c),this}return this.write(Object.assign({},this.defaultMeta,e(e(e(e({},m,n),h,o),"level",n),"message",i))),this}},{key:"_transform",value:function(e,t,n){if(this.silent)return n();e[m]||(e[m]=e.level),this.levels[e[m]]||0===this.levels[e[m]]||console.error("[winston] Unknown logger level: %s",e[m]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",e);try{this.push(this.format.transform(e,this.format.options))}finally{this._writableState.sync=!1,n()}}},{key:"_final",value:function(e){var t=this.transports.slice();u(t,(function(e,t){if(!e||e.finished)return setImmediate(t);e.once("finish",t),e.end()}),e)}},{key:"add",value:function(e){var t=!f(e)||e.log.length>2?new v({transport:e}):e;if(!t._writableState||!t._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",t),this._onEvent("warn",t),this.pipe(t),e.handleExceptions&&this.exceptions.handle(),e.handleRejections&&this.rejections.handle(),this}},{key:"remove",value:function(e){if(!e)return this;var t=e;return(!f(e)||e.log.length>2)&&(t=this.transports.filter((function(t){return t.transport===e}))[0]),t&&this.unpipe(t),this}},{key:"clear",value:function(){return this.unpipe(),this}},{key:"close",value:function(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}},{key:"setLevels",value:function(){E.deprecated("setLevels")}},{key:"query",value:function(e,t){"function"==typeof e&&(t=e,e={}),e=e||{};var n={},i=Object.assign({},e.query||{});u(this.transports.filter((function(e){return!!e.query})),(function(t,r){!function(t,n){e.query&&"function"==typeof t.formatQuery&&(e.query=t.formatQuery(i)),t.query(e,(function(i,r){if(i)return n(i);"function"==typeof t.formatResults&&(r=t.formatResults(r,e.format)),n(null,r)}))}(t,(function(e,i){r&&((i=e||i)&&(n[t.name]=i),r()),r=null}))}),(function(){return t(null,n)}))}},{key:"stream",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new l,n=[];return t._streams=n,t.destroy=function(){for(var e=n.length;e--;)n[e].destroy()},this.transports.filter((function(e){return!!e.stream})).forEach((function(i){var r=i.stream(e);r&&(n.push(r),r.on("log",(function(e){e.transport=e.transport||[],e.transport.push(i.name),t.emit("log",e)})),r.on("error",(function(e){e.transport=e.transport||[],e.transport.push(i.name),t.emit("error",e)})))})),t}},{key:"startTimer",value:function(){return new _(this)}},{key:"profile",value:function(e){var n=Date.now();if(this.profilers[e]){var i=this.profilers[e];delete this.profilers[e];for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];"function"==typeof o[o.length-2]&&(console.warn("Callback function no longer supported as of winston@3.0.0"),o.pop());var s="object"===t(o[o.length-1])?o.pop():{};return s.level=s.level||"info",s.durationMs=n-i,s.message=s.message||e,this.write(s)}return this.profilers[e]=n,this}},{key:"handleExceptions",value:function(){var e;console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),(e=this.exceptions).handle.apply(e,arguments)}},{key:"unhandleExceptions",value:function(){var e;console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),(e=this.exceptions).unhandle.apply(e,arguments)}},{key:"cli",value:function(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join("\n"))}},{key:"_onEvent",value:function(e,t){t["__winston"+e]||(t["__winston"+e]=function(n){"error"!==e||this.transports.includes(t)||this.add(t),this.emit(e,n,t)}.bind(this),t.on(e,t["__winston"+e]))}},{key:"_addDefaultMeta",value:function(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}}])}(d);function w(e,t){var n=e[t];return n||0===n?n:null}return Object.defineProperty(b.prototype,"transports",{configurable:!1,enumerable:!0,get:function(){var e=this._readableState.pipes;return Array.isArray(e)?e:[e].filter(Boolean)}}),logger$1=b}function requireCreateLogger(){if(hasRequiredCreateLogger)return createLogger;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,r,o){return r=i(r),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,n()?Reflect.construct(r,o||[],i(t).constructor):r.apply(t,o))}function n(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(n=function(){return!!e})()}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}hasRequiredCreateLogger=1;var o=requireTripleBeam().LEVEL,a=requireConfig(),s=requireLogger(),c=requireBrowser()("winston:create-logger");return createLogger=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.levels=e.levels||a.npm.levels;var n=function(e){function n(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t(this,n,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)}(n,e),function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(n)}(s),i=new n(e);return Object.keys(e.levels).forEach((function(e){c('Define prototype method for "%s"',e),"log"!==e?(n.prototype[e]=function(){for(var t=this||i,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];if(1===r.length){var s=r[0],c=s&&s.message&&s||{message:s};return c.level=c[o]=e,t._addDefaultMeta(c),t.write(c),this||i}return 0===r.length?(t.log(e,""),t):t.log.apply(t,[e].concat(r))},n.prototype[function(e){return"is"+e.charAt(0).toUpperCase()+e.slice(1)+"Enabled"}(e)]=function(){return(this||i).isLevelEnabled(e)}):console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.')})),i},createLogger}function requireContainer(){if(hasRequiredContainer)return container;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}hasRequiredContainer=1;var i=requireCreateLogger();return container=function(){return t((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.loggers=new Map,this.options=t}),[{key:"add",value:function(e,t){var n=this;if(!this.loggers.has(e)){var r=(t=Object.assign({},t||this.options)).transports||this.options.transports;t.transports=r?Array.isArray(r)?r.slice():[r]:[];var o=i(t);o.on("close",(function(){return n._delete(e)})),this.loggers.set(e,o)}return this.loggers.get(e)}},{key:"get",value:function(e,t){return this.add(e,t)}},{key:"has",value:function(e){return!!this.loggers.has(e)}},{key:"close",value:function(e){var t=this;if(e)return this._removeLogger(e);this.loggers.forEach((function(e,n){return t._removeLogger(n)}))}},{key:"_removeLogger",value:function(e){this.loggers.has(e)&&(this.loggers.get(e).close(),this._delete(e))}},{key:"_delete",value:function(e){this.loggers.delete(e)}}])}(),container}function requireWinston(){return hasRequiredWinston||(hasRequiredWinston=1,function(e){var t=requireBrowser$2(),n=requireCommon().warn;e.version=require$$2.version,e.transports=requireTransports(),e.config=requireConfig(),e.addColors=t.levels,e.format=t.format,e.createLogger=requireCreateLogger(),e.Logger=requireLogger(),e.ExceptionHandler=requireExceptionHandler(),e.RejectionHandler=requireRejectionHandler(),e.Container=requireContainer(),e.Transport=requireDist(),e.loggers=new e.Container;var i=e.createLogger();Object.keys(e.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach((function(t){return e[t]=function(){return i[t].apply(i,arguments)}})),Object.defineProperty(e,"level",{get:function(){return i.level},set:function(e){i.level=e}}),Object.defineProperty(e,"exceptions",{get:function(){return i.exceptions}}),Object.defineProperty(e,"rejections",{get:function(){return i.rejections}}),["exitOnError"].forEach((function(t){Object.defineProperty(e,t,{get:function(){return i[t]},set:function(e){i[t]=e}})})),Object.defineProperty(e,"default",{get:function(){return{exceptionHandlers:i.exceptionHandlers,rejectionHandlers:i.rejectionHandlers,transports:i.transports}}}),n.deprecated(e,"setLevels"),n.forFunctions(e,"useFormat",["cli"]),n.forProperties(e,"useFormat",["padLevels","stripColors"]),n.forFunctions(e,"deprecated",["addRewriter","addFilter","clone","extend"]),n.forProperties(e,"deprecated",["emitErrs","levelLength"])}(winston)),winston}var winstonExports=requireWinston();const logger=e=>{const t={defaultMeta:{...e.defaultLogInformation,deploymentStage:e.deploymentStage,service:e.service},format:winstonExports.format.combine(winstonExports.format.timestamp({format:"DD-MM-YYYY HH:mm:ss"}),winstonExports.format.json())};if(e.datadogApiKey){const n={host:"http-intake.logs.datadoghq.eu",path:`/api/v2/logs?dd-api-key=${e.datadogApiKey}&ddsource=nodejs&service=${e.service}`,port:443,ssl:!0};return winstonExports.createLogger({...t,transports:[new winstonExports.transports.Http(n)]})}return winstonExports.createLogger({...t,transports:[new winstonExports.transports.Console({forceConsole:!0})]})};exports.DEFAULT_PARAMETER_STORE_CLIENT_CONFIG=DEFAULT_CLIENT_CONFIG$1,exports.DEFAULT_SES_CLIENT_CONFIG=DEFAULT_CLIENT_CONFIG,exports.dynamodb=dynamodb,exports.lambda=lambda,exports.logger=logger,exports.parameterStore=parameterStore,exports.ses=ses}));
|