@allthings/cloud-toolkit 1.0.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/LICENSE +21 -0
- package/README.md +2 -0
- package/dist/lib.cjs.js +64 -0
- package/dist/lib.esm.js +61 -0
- package/dist/lib.umd.min.js +1 -0
- package/dist/src/aws/index.d.ts +2 -0
- package/dist/src/aws/parameterStore.d.ts +16 -0
- package/dist/src/aws/parameterStore.test.d.ts +1 -0
- package/dist/src/constants.d.ts +3 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/test/setup.d.ts +0 -0
- package/dist/test/setup.js +0 -0
- package/package.json +147 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Allthings
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
package/dist/lib.cjs.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var clientSsm = require('@aws-sdk/client-ssm');
|
|
4
|
+
|
|
5
|
+
const DEFAULT_AWS_CONFIGURATION = {
|
|
6
|
+
region: 'eu-central-2',
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const DEFAULT_CLIENT_CONFIG = {
|
|
10
|
+
clientConfig: DEFAULT_AWS_CONFIGURATION,
|
|
11
|
+
onlyDefault: false,
|
|
12
|
+
prefix: process.env.SSM_PARAM_PATH,
|
|
13
|
+
};
|
|
14
|
+
const getSecrets = async (ssm, config, parameters_, defaultValue) => {
|
|
15
|
+
if (config.onlyDefault) {
|
|
16
|
+
return [defaultValue];
|
|
17
|
+
}
|
|
18
|
+
try {
|
|
19
|
+
const command = new clientSsm.GetParametersCommand({
|
|
20
|
+
Names: parameters_.map((parameter) => `${config.prefix ?? ''}${parameter}`),
|
|
21
|
+
WithDecryption: true,
|
|
22
|
+
});
|
|
23
|
+
const parameters = await ssm.send(command);
|
|
24
|
+
return (parameters?.Parameters?.map((parameter) => parameter.Value ?? defaultValue) ?? [defaultValue]);
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
if (config.logger) {
|
|
28
|
+
config.logger(error);
|
|
29
|
+
}
|
|
30
|
+
return [defaultValue];
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const getSecret = async (ssm, config, parameter_, defaultValue) => {
|
|
34
|
+
if (config.onlyDefault) {
|
|
35
|
+
return defaultValue;
|
|
36
|
+
}
|
|
37
|
+
try {
|
|
38
|
+
const parameter = await ssm.send(new clientSsm.GetParameterCommand({
|
|
39
|
+
Name: `${config.prefix ?? ''}${parameter_}`,
|
|
40
|
+
WithDecryption: true,
|
|
41
|
+
}));
|
|
42
|
+
return parameter?.Parameter?.Value ?? defaultValue;
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
if (config.logger) {
|
|
46
|
+
config.logger(error);
|
|
47
|
+
}
|
|
48
|
+
return defaultValue;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const parameterStore = (userConfig) => {
|
|
52
|
+
const { clientConfig, ...config } = {
|
|
53
|
+
...DEFAULT_CLIENT_CONFIG,
|
|
54
|
+
...userConfig,
|
|
55
|
+
};
|
|
56
|
+
const ssm = new clientSsm.SSMClient(clientConfig);
|
|
57
|
+
return {
|
|
58
|
+
getSecret: (parameter, defaultValue = '') => getSecret(ssm, config, parameter, defaultValue),
|
|
59
|
+
getSecrets: (parameters, defaultValue = '') => getSecrets(ssm, config, parameters, defaultValue),
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
exports.DEFAULT_PARAMETER_STORE_CLIENT_CONFIG = DEFAULT_CLIENT_CONFIG;
|
|
64
|
+
exports.parameterStore = parameterStore;
|
package/dist/lib.esm.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { SSMClient, GetParametersCommand, GetParameterCommand } from '@aws-sdk/client-ssm';
|
|
2
|
+
|
|
3
|
+
const DEFAULT_AWS_CONFIGURATION = {
|
|
4
|
+
region: 'eu-central-2',
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
const DEFAULT_CLIENT_CONFIG = {
|
|
8
|
+
clientConfig: DEFAULT_AWS_CONFIGURATION,
|
|
9
|
+
onlyDefault: false,
|
|
10
|
+
prefix: process.env.SSM_PARAM_PATH,
|
|
11
|
+
};
|
|
12
|
+
const getSecrets = async (ssm, config, parameters_, defaultValue) => {
|
|
13
|
+
if (config.onlyDefault) {
|
|
14
|
+
return [defaultValue];
|
|
15
|
+
}
|
|
16
|
+
try {
|
|
17
|
+
const command = new GetParametersCommand({
|
|
18
|
+
Names: parameters_.map((parameter) => `${config.prefix ?? ''}${parameter}`),
|
|
19
|
+
WithDecryption: true,
|
|
20
|
+
});
|
|
21
|
+
const parameters = await ssm.send(command);
|
|
22
|
+
return (parameters?.Parameters?.map((parameter) => parameter.Value ?? defaultValue) ?? [defaultValue]);
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
if (config.logger) {
|
|
26
|
+
config.logger(error);
|
|
27
|
+
}
|
|
28
|
+
return [defaultValue];
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const getSecret = async (ssm, config, parameter_, defaultValue) => {
|
|
32
|
+
if (config.onlyDefault) {
|
|
33
|
+
return defaultValue;
|
|
34
|
+
}
|
|
35
|
+
try {
|
|
36
|
+
const parameter = await ssm.send(new GetParameterCommand({
|
|
37
|
+
Name: `${config.prefix ?? ''}${parameter_}`,
|
|
38
|
+
WithDecryption: true,
|
|
39
|
+
}));
|
|
40
|
+
return parameter?.Parameter?.Value ?? defaultValue;
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
if (config.logger) {
|
|
44
|
+
config.logger(error);
|
|
45
|
+
}
|
|
46
|
+
return defaultValue;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const parameterStore = (userConfig) => {
|
|
50
|
+
const { clientConfig, ...config } = {
|
|
51
|
+
...DEFAULT_CLIENT_CONFIG,
|
|
52
|
+
...userConfig,
|
|
53
|
+
};
|
|
54
|
+
const ssm = new SSMClient(clientConfig);
|
|
55
|
+
return {
|
|
56
|
+
getSecret: (parameter, defaultValue = '') => getSecret(ssm, config, parameter, defaultValue),
|
|
57
|
+
getSecrets: (parameters, defaultValue = '') => getSecrets(ssm, config, parameters, defaultValue),
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export { DEFAULT_CLIENT_CONFIG as DEFAULT_PARAMETER_STORE_CLIENT_CONFIG, parameterStore };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).allthings={})}(this,(function(e){"use strict";const t=e=>{let t=e.httpHandler;return{setHttpHandler(e){t=e},httpHandler:()=>t,updateHttpClientConfig(e,n){t.updateHttpClientConfig(e,n)},httpHandlerConfigs:()=>t.httpHandlerConfigs()}};var n,s,a,r,o;!function(e){e.HEADER="header",e.QUERY="query"}(n||(n={})),function(e){e.HEADER="header",e.QUERY="query"}(s||(s={})),function(e){e.HTTP="http",e.HTTPS="https"}(a||(a={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(r||(r={})),function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"}(o||(o={}));const i="__smithy_context";var c,u;!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"}(u||(u={}));class d{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 d({...e,headers:{...e.headers}});var n;return t.query&&(t.query=(n=t.query,Object.keys(n).reduce(((e,t)=>{const s=n[t];return{...e,[t]:Array.isArray(s)?[...s]:s}}),{}))),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 d.clone(this)}}class l{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 p={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},m=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{if(!d.isInstance(n.request))return t(n);const{request:s}=n,{handlerProtocol:a=""}=e.requestHandler.metadata||{};if(a.indexOf("h2")>=0&&!s.headers[":authority"])delete s.headers.host,s.headers[":authority"]=s.hostname+(s.port?":"+s.port:"");else if(!s.headers.host){let e=s.hostname;null!=s.port&&(e+=`:${s.port}`),s.headers.host=e}return t(n)})(e),p)}}),h={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},f="X-Amzn-Trace-Id",y={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},g=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{const{request:s}=n;if(!d.isInstance(s)||"node"!==e.runtime||s.headers.hasOwnProperty(f))return t(n);const a=[]._X_AMZN_TRACE_ID,r=e=>"string"==typeof e&&e.length>0;return r([].AWS_LAMBDA_FUNCTION_NAME)&&r(a)&&(s.headers[f]=a),t({...n,request:s})})(e),y)}}),w=e=>e[i]||(e[i]={}),b=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const v=(e,t)=>(n,s)=>async a=>{const r=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,s,a.input)),o=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),i=w(s),c=[];for(const n of r){const a=o.get(n.schemeId);if(!a){c.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const r=a.identityProvider(await t.identityProviderConfigProvider(e));if(!r){c.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:u={},signingProperties:d={}}=n.propertiesExtractor?.(e,s)||{};n.identityProperties=Object.assign(n.identityProperties||{},u),n.signingProperties=Object.assign(n.signingProperties||{},d),i.selectedHttpAuthScheme={httpAuthOption:n,identity:await r(n.identityProperties),signer:a.signer};break}if(!i.selectedHttpAuthScheme)throw new Error(c.join("\n"));return n(a)},x={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},E={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},S={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function O(e,t,n){return{applyToStack:s=>{s.add(((e,t)=>n=>async s=>{const{response:a}=await n(s);try{return{response:a,output:await t(a,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:a}),!("$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),E),s.add(((e,t)=>(n,s)=>async a=>{const r=s.endpointV2?.url&&e.urlParser?async()=>e.urlParser(s.endpointV2.url):e.endpoint;if(!r)throw new Error("No valid endpoint provider available.");const o=await t(a.input,{...e,endpoint:r});return n({...a,request:o})})(e,t),S)}}}const P=e=>e=>{throw e},$=(e,t)=>{},M={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},I=e=>({applyToStack:e=>{e.addRelativeTo(((e,t)=>async n=>{if(!d.isInstance(n.request))return e(n);const s=w(t).selectedHttpAuthScheme;if(!s)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:a={}},identity:r,signer:o}=s,i=await e({...n,request:await o.sign(n.request,r,a)}).catch((o.errorHandler||P)(a));return(o.successHandler||$)(i.response,a),i}),M)}}),A=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},R={},T=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);R[n]=e,T[e]=n}for(let e=0,t="a".charCodeAt(0),n="z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t),s=e+26;R[n]=s,T[s]=n}for(let e=0;e<10;e++){R[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;R[t]=n,T[n]=t}R["+"]=62,T[62]="+",R["/"]=63,T[63]="/";const C=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),s=new DataView(n);for(let t=0;t<e.length;t+=4){let n=0,a=0;for(let s=t,r=t+3;s<=r;s++)if("="!==e[s]){if(!(e[s]in R))throw new TypeError(`Invalid character ${e[s]} in base64 string.`);n|=R[e[s]]<<6*(r-s),a+=6}else n>>=6;const r=t/4*3;n>>=a%8;const o=Math.floor(a/8);for(let e=0;e<o;e++){const t=8*(o-e-1);s.setUint8(r+e,(n&255<<t)>>t)}}return new Uint8Array(n)},N=e=>(new TextEncoder).encode(e),_=e=>"string"==typeof e?N(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),D=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 F(e){let t;t="string"==typeof e?N(e):e;const n="object"==typeof t&&"number"==typeof t.length,s="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!s)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let a="";for(let e=0;e<t.length;e+=3){let n=0,s=0;for(let a=e,r=Math.min(e+3,t.length);a<r;a++)n|=t[a]<<8*(r-a-1),s+=8;const r=Math.ceil(s/6);n<<=6*r-s;for(let e=1;e<=r;e++){const t=6*(r-e);a+=T[(n&63<<t)>>t]}a+="==".slice(0,4-r)}return a}class k extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?k.mutate(C(e)):k.mutate(N(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,k.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?F(e):D(e)}(this,e)}}const L=e=>encodeURIComponent(e).replace(/[!'()*]/g,j),j=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;const z={},U={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),z[e]=t,U[t]=e}function B(e){let t="";for(let n=0;n<e.byteLength;n++)t+=z[e[n]];return t}class q{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 V=(H=3e5,e=>W(e)&&e.expiration.getTime()-Date.now()<H);var H;const W=e=>void 0!==e.expiration;const G=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}$"),K=e=>G.test(e)||e.startsWith("[")&&e.endsWith("]"),Q=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Z=(e,t=!1)=>{if(!t)return Q.test(e);const n=e.split(".");for(const e of n)if(!Z(e))return!1;return!0},Y={},J="endpoints";function X(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${X(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(X).join(", ")})`:JSON.stringify(e,null,2)}class ee extends Error{constructor(e){super(e),this.name="EndpointError"}}const te=(e,t)=>(e=>{const t=e.split("."),n=[];for(const s of t){const t=s.indexOf("[");if(-1!==t){if(s.indexOf("]")!==s.length-1)throw new ee(`Path: '${e}' does not end with ']'`);const a=s.slice(t+1,-1);if(Number.isNaN(parseInt(a)))throw new ee(`Invalid array index: '${a}' in path: '${e}'`);0!==t&&n.push(s.slice(0,t)),n.push(a)}else n.push(s)}return n})(t).reduce(((n,s)=>{if("object"!=typeof n)throw new ee(`Index '${s}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(s)]:n[s]}),e),ne={[a.HTTP]:80,[a.HTTPS]:443},se={booleanEquals:(e,t)=>e===t,getAttr:te,isSet:e=>null!=e,isValidHostLabel:Z,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:s="",path:a="",query:r={}}=e,o=new URL(`${s}//${t}${n?`:${n}`:""}${a}`);return o.search=Object.entries(r).map((([e,t])=>`${e}=${t}`)).join("&"),o}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:s,hostname:r,pathname:o,protocol:i,search:c}=t;if(c)return null;const u=i.slice(0,-1);if(!Object.values(a).includes(u))return null;const d=K(r);return{scheme:u,authority:`${s}${n.includes(`${s}:${ne[u]}`)||"string"==typeof e&&e.includes(`${s}:${ne[u]}`)?`:${ne[u]}`:""}`,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:d}},stringEquals:(e,t)=>e===t,substring:(e,t,n,s)=>t>=n||e.length<n?null:s?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()}`))},ae=(e,t)=>{const n=[],s={...t.endpointParams,...t.referenceRecord};let a=0;for(;a<e.length;){const t=e.indexOf("{",a);if(-1===t){n.push(e.slice(a));break}n.push(e.slice(a,t));const r=e.indexOf("}",t);if(-1===r){n.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[r+1]&&(n.push(e.slice(t+1,r)),a=r+2);const o=e.substring(t+1,r);if(o.includes("#")){const[e,t]=o.split("#");n.push(te(s[e],t))}else n.push(s[o]);a=r+1}return n.join("")},re=(e,t,n)=>{if("string"==typeof e)return ae(e,n);if(e.fn)return oe(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new ee(`'${t}': ${String(e)} is not a string, function or reference.`)},oe=({fn:e,argv:t},n)=>{const s=t.map((e=>["boolean","number"].includes(typeof e)?e:re(e,"arg",n))),a=e.split(".");return a[0]in Y&&null!=a[1]?Y[a[0]][a[1]](...s):se[e](...s)},ie=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new ee(`'${e}' is already defined in Reference Record.`);const s=oe(t,n);return n.logger?.debug?.(`${J} evaluateCondition: ${X(t)} = ${X(s)}`),{result:""===s||!!s,...null!=e&&{toAssign:{name:e,value:s}}}},ce=(e=[],t)=>{const n={};for(const s of e){const{result:e,toAssign:a}=ie(s,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};a&&(n[a.name]=a.value,t.logger?.debug?.(`${J} assign: ${a.name} := ${X(a.value)}`))}return{result:!0,referenceRecord:n}},ue=(e,t)=>Object.entries(e).reduce(((e,[n,s])=>({...e,[n]:s.map((e=>{const s=re(e,"Header value entry",t);if("string"!=typeof s)throw new ee(`Header '${n}' value '${s}' is not a string`);return s}))})),{}),de=(e,t)=>{if(Array.isArray(e))return e.map((e=>de(e,t)));switch(typeof e){case"string":return ae(e,t);case"object":if(null===e)throw new ee(`Unexpected endpoint property: ${e}`);return le(e,t);case"boolean":return e;default:throw new ee("Unexpected endpoint property type: "+typeof e)}},le=(e,t)=>Object.entries(e).reduce(((e,[n,s])=>({...e,[n]:de(s,t)})),{}),pe=(e,t)=>{const n=re(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 ee("Endpoint URL must be a string, got "+typeof n)},me=(e,t)=>{const{conditions:n,endpoint:s}=e,{result:a,referenceRecord:r}=ce(n,t);if(!a)return;const o={...t,referenceRecord:{...t.referenceRecord,...r}},{url:i,properties:c,headers:u}=s;return t.logger?.debug?.(`${J} Resolving endpoint from template: ${X(s)}`),{...null!=u&&{headers:ue(u,o)},...null!=c&&{properties:le(c,o)},url:pe(i,o)}},he=(e,t)=>{const{conditions:n,error:s}=e,{result:a,referenceRecord:r}=ce(n,t);if(a)throw new ee(re(s,"Error",{...t,referenceRecord:{...t.referenceRecord,...r}}))},fe=(e,t)=>{const{conditions:n,rules:s}=e,{result:a,referenceRecord:r}=ce(n,t);if(a)return ye(s,{...t,referenceRecord:{...t.referenceRecord,...r}})},ye=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=me(n,t);if(e)return e}else if("error"===n.type)he(n,t);else{if("tree"!==n.type)throw new ee(`Unknown endpoint rule: ${n}`);{const e=fe(n,t);if(e)return e}}throw new ee("Rules evaluation failed")},ge=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!ge(t))return!1;return!0}return!!Z(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!K(e)))};let we={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 be={isVirtualHostableS3Bucket:ge,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,s,a,r,o,...i]=t;if("arn"!==n||""===s||""===a||""===i.join(":"))return null;return{partition:s,service:a,region:r,accountId:o,resourceId:i.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=we;for(const n of t){const{regions:t,outputs:s}=n;for(const[n,a]of Object.entries(t))if(n===e)return{...s,...a}}for(const n of t){const{regionRegex:t,outputs:s}=n;if(new RegExp(t).test(e))return{...s}}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 ve(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}Y.aws=be;const xe=e=>l.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Ee=e=>new Date(Date.now()+e),Se=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(Ee(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},Oe=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class Pe{async sign(e,t,n){if(!d.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const s=await(async e=>{const t=Oe("context",e.context),n=Oe("config",e.config),s=t.endpointV2?.properties?.authSchemes?.[0],a=Oe("signer",n.signer),r=await a(s),o=e?.signingRegion,i=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:r,signingRegion:o,signingRegionSet:i,signingName:c}})(n),{config:a,signer:r}=s;let{signingRegion:o,signingName:i}=s;const c=n.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(o=t?.signingRegion??o,i=t?.signingName??i)}return await r.sign(e,{signingDate:Ee(a.systemClockOffset),signingRegion:o,signingService:i})}errorHandler(e){return t=>{const n=t.ServerTime??xe(t.$response);if(n){const s=Oe("config",e.config),a=s.systemClockOffset;s.systemClockOffset=Se(n,s.systemClockOffset);s.systemClockOffset!==a&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=xe(e);if(n){const e=Oe("config",t.config);e.systemClockOffset=Se(n,e.systemClockOffset)}}}const $e=(e,t,n)=>{let s,a,r,o=!1;return async t=>(r&&!t?.forceRefresh||(s=await(async()=>{a||(a=e());try{s=await a,r=!0,o=!1}finally{a=void 0}return s})()),s)},Me="X-Amz-Date",Ie="X-Amz-Signature",Ae="X-Amz-Security-Token",Re="authorization",Te=Me.toLowerCase(),Ce=[Re,Te,"date"],Ne=Ie.toLowerCase(),_e="x-amz-content-sha256",De=Ae.toLowerCase(),Fe={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},ke=/^proxy-/,Le=/^sec-/,je="AWS4-HMAC-SHA256",ze="AWS4-HMAC-SHA256-PAYLOAD",Ue="aws4_request",Be={},qe=[],Ve=(e,t,n)=>`${e}/${t}/${n}/${Ue}`,He=(e,t,n)=>{const s=new e(t);return s.update(_(n)),s.digest()},We=({headers:e},t,n)=>{const s={};for(const a of Object.keys(e).sort()){if(null==e[a])continue;const r=a.toLowerCase();(r in Fe||t?.has(r)||ke.test(r)||Le.test(r))&&(!n||n&&!n.has(r))||(s[r]=e[a].trim().replace(/\s+/g," "))}return s},Ge=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===_e)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(s=t,"function"==typeof ArrayBuffer&&s instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(s))){const e=new n;return e.update(_(t)),B(await e.digest())}var s;return"UNSIGNED-PAYLOAD"};class Ke{format(e){const t=[];for(const n of Object.keys(e)){const s=N(n);t.push(Uint8Array.from([s.byteLength]),s,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let s=0;for(const e of t)n.set(e,s),s+=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 s=new Uint8Array(9);return s[0]=5,s.set(e.value.bytes,1),s;case"binary":const a=new DataView(new ArrayBuffer(3+e.value.byteLength));a.setUint8(0,6),a.setUint16(1,e.value.byteLength,!1);const r=new Uint8Array(a.buffer);return r.set(e.value,3),r;case"string":const o=N(e.value),i=new DataView(new ArrayBuffer(3+o.byteLength));i.setUint8(0,7),i.setUint16(1,o.byteLength,!1);const c=new Uint8Array(i.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(Ye.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Ze.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const d=new Uint8Array(17);return d[0]=9,d.set(function(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const s=e.slice(n,n+2).toLowerCase();if(!(s in U))throw new Error(`Cannot decode unrecognized sequence ${s} as hexadecimal`);t[n/2]=U[s]}return t}(e.value.replace(/\-/g,"")),1),d}}}var Qe;!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"}(Qe||(Qe={}));const Ze=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Ye{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,s=Math.abs(Math.round(e));n>-1&&s>0;n--,s/=256)t[n]=s;return e<0&&Je(t),new Ye(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Je(e),parseInt(B(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Je(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const Xe=e=>{e=d.clone(e);for(const t of Object.keys(e.headers))Ce.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},et=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class tt{constructor({applyChecksum:e,credentials:t,region:n,service:s,sha256:a,uriEscapePath:r=!0}){this.headerFormatter=new Ke,this.service=s,this.sha256=a,this.uriEscapePath=r,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=b(n),this.credentialProvider=b(t)}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:s=3600,unsignableHeaders:a,unhoistableHeaders:r,signableHeaders:o,hoistableHeaders:i,signingRegion:c,signingService:u}=t,l=await this.credentialProvider();this.validateResolvedCredentials(l);const p=c??await this.regionProvider(),{longDate:m,shortDate:h}=nt(n);if(s>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const f=Ve(h,p,u??this.service),y=((e,t={})=>{const{headers:n,query:s={}}=d.clone(e);for(const e of Object.keys(n)){const a=e.toLowerCase();("x-amz-"===a.slice(0,6)&&!t.unhoistableHeaders?.has(a)||t.hoistableHeaders?.has(a))&&(s[e]=n[e],delete n[e])}return{...e,headers:n,query:s}})(Xe(e),{unhoistableHeaders:r,hoistableHeaders:i});l.sessionToken&&(y.query[Ae]=l.sessionToken),y.query["X-Amz-Algorithm"]=je,y.query["X-Amz-Credential"]=`${l.accessKeyId}/${f}`,y.query[Me]=m,y.query["X-Amz-Expires"]=s.toString(10);const g=We(y,a,o);return y.query["X-Amz-SignedHeaders"]=st(g),y.query[Ie]=await this.getSignature(m,f,this.getSigningKey(l,p,h,u),this.createCanonicalRequest(y,g,await Ge(e,this.sha256))),y}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:s,signingRegion:a,signingService:r}){const o=a??await this.regionProvider(),{shortDate:i,longDate:c}=nt(n),u=Ve(i,o,r??this.service),d=await Ge({headers:{},body:t},this.sha256),l=new this.sha256;l.update(e);const p=B(await l.digest()),m=[ze,c,u,s,p,d].join("\n");return this.signString(m,{signingDate:n,signingRegion:o,signingService:r})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:s}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:s,priorSignature:e.priorSignature}).then((t=>({message:e.message,signature:t})))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:s}={}){const a=await this.credentialProvider();this.validateResolvedCredentials(a);const r=n??await this.regionProvider(),{shortDate:o}=nt(t),i=new this.sha256(await this.getSigningKey(a,r,o,s));return i.update(_(e)),B(await i.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:s,signingRegion:a,signingService:r}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const i=a??await this.regionProvider(),c=Xe(e),{longDate:u,shortDate:d}=nt(t),l=Ve(d,i,r??this.service);c.headers[Te]=u,o.sessionToken&&(c.headers[De]=o.sessionToken);const p=await Ge(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(_e,c.headers)&&this.applyChecksum&&(c.headers[_e]=p);const m=We(c,s,n),h=await this.getSignature(u,l,this.getSigningKey(o,i,d,r),this.createCanonicalRequest(c,m,p));return c.headers[Re]=`${je} Credential=${o.accessKeyId}/${l}, SignedHeaders=${st(m)}, Signature=${h}`,c}createCanonicalRequest(e,t,n){const s=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],n={};for(const s of Object.keys(e)){if(s.toLowerCase()===Ne)continue;const a=L(s);t.push(a);const r=e[s];"string"==typeof r?n[a]=`${a}=${L(r)}`:Array.isArray(r)&&(n[a]=r.slice(0).reduce(((e,t)=>e.concat([`${a}=${L(t)}`])),[]).sort().join("&"))}return t.sort().map((e=>n[e])).filter((e=>e)).join("&")})(e)}\n${s.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${s.join(";")}\n${n}`}async createStringToSign(e,t,n){const s=new this.sha256;s.update(_(n));const a=await s.digest();return`${je}\n${e}\n${t}\n${B(a)}`}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 L(n).replace(/%2F/g,"/")}return e}async getSignature(e,t,n,s){const a=await this.createStringToSign(e,t,s),r=new this.sha256(await n);return r.update(_(a)),B(await r.digest())}getSigningKey(e,t,n,s){return(async(e,t,n,s,a)=>{const r=`${n}:${s}:${a}:${B(await He(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(r in Be)return Be[r];for(qe.push(r);qe.length>50;)delete Be[qe.shift()];let o=`AWS4${t.secretAccessKey}`;for(const t of[n,s,a,Ue])o=await He(e,o,t);return Be[r]=o})(this.sha256,e,n,t,s||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 nt=e=>{const t=(n=e,et(n).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var n;return{longDate:t,shortDate:t.slice(0,8)}},st=e=>Object.keys(e).sort().join(";"),at=e=>{let t,n=!1;e.credentials&&(n=!0,t=((e,t,n)=>{if(void 0===e)return;const s="function"!=typeof e?async()=>Promise.resolve(e):e;let a,r,o,i=!1;const c=async e=>{r||(r=s(e));try{a=await r,o=!0,i=!1}finally{r=void 0}return a};return void 0===t?async e=>(o&&!e?.forceRefresh||(a=await c(e)),a):async e=>(o&&!e?.forceRefresh||(a=await c(e)),i?a:n(a)?t(a)?(await c(e),a):a:(i=!0,a))})(e.credentials,V,W)),t||(t=e.credentialDefaultProvider?A(e.credentialDefaultProvider(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("`credentials` is missing")});const{signingEscapePath:s=!0,systemClockOffset:a=e.systemClockOffset||0,sha256:r}=e;let o;return o=e.signer?A(e.signer):e.regionInfoProvider?()=>A(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([n,a])=>{const{signingRegion:o,signingService:i}=n;e.signingRegion=e.signingRegion||o||a,e.signingName=e.signingName||i||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:r,uriEscapePath:s};return new(e.signerConstructor||tt)(c)})):async n=>{const a=(n=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await A(e.region)(),properties:{}},n)).signingRegion,o=n.signingName;e.signingRegion=e.signingRegion||a,e.signingName=e.signingName||o||e.serviceId;const i={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:r,uriEscapePath:s};return new(e.signerConstructor||tt)(i)},{...e,systemClockOffset:a,signingEscapePath:s,credentials:n?async()=>t().then((e=>{return n="CREDENTIALS_CODE",s="e",(t=e).$source||(t.$source={}),t.$source[n]=s,t;var t,n,s})):t,signer:o}},rt=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},ot=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,it=()=>{let e=[],t=[],n=!1;const s=new Set,a=n=>(e.forEach((e=>{n.add(e.middleware,{...e})})),t.forEach((e=>{n.addRelativeTo(e.middleware,{...e})})),n.identifyOnResolve?.(i.identifyOnResolve()),n),r=e=>{const t=[];return e.before.forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...r(e))})),t.push(e),e.after.reverse().forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...r(e))})),t},o=(n=!1)=>{const s=[],a=[],o={};e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of rt(t.name,t.aliases))o[e]=t;s.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of rt(t.name,t.aliases))o[e]=t;a.push(t)})),a.forEach((e=>{if(e.toMiddleware){const t=o[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${ot(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}}));const i=(c=s,c.sort(((e,t)=>ct[t.step]-ct[e.step]||ut[t.priority||"normal"]-ut[e.priority||"normal"]))).map(r).reduce(((e,t)=>(e.push(...t),e)),[]);var c;return i},i={add:(t,n={})=>{const{name:a,override:r,aliases:o}=n,i={step:"initialize",priority:"normal",middleware:t,...n},c=rt(a,o);if(c.length>0){if(c.some((e=>s.has(e)))){if(!r)throw new Error(`Duplicate middleware name '${ot(a,o)}'`);for(const t of c){const n=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(-1===n)continue;const s=e[n];if(s.step!==i.step||i.priority!==s.priority)throw new Error(`"${ot(s.name,s.aliases)}" middleware with ${s.priority} priority in ${s.step} step cannot be overridden by "${ot(a,o)}" middleware with ${i.priority} priority in ${i.step} step.`);e.splice(n,1)}}for(const e of c)s.add(e)}e.push(i)},addRelativeTo:(e,n)=>{const{name:a,override:r,aliases:o}=n,i={middleware:e,...n},c=rt(a,o);if(c.length>0){if(c.some((e=>s.has(e)))){if(!r)throw new Error(`Duplicate middleware name '${ot(a,o)}'`);for(const e of c){const n=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(-1===n)continue;const s=t[n];if(s.toMiddleware!==i.toMiddleware||s.relation!==i.relation)throw new Error(`"${ot(s.name,s.aliases)}" middleware ${s.relation} "${s.toMiddleware}" middleware cannot be overridden by "${ot(a,o)}" middleware ${i.relation} "${i.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)s.add(e)}t.push(i)},clone:()=>a(it()),use:e=>{e.applyToStack(i)},remove:n=>"string"==typeof n?(n=>{let a=!1;const r=e=>{const t=rt(e.name,e.aliases);if(t.includes(n)){a=!0;for(const e of t)s.delete(e);return!1}return!0};return e=e.filter(r),t=t.filter(r),a})(n):(n=>{let a=!1;const r=e=>{if(e.middleware===n){a=!0;for(const t of rt(e.name,e.aliases))s.delete(t);return!1}return!0};return e=e.filter(r),t=t.filter(r),a})(n),removeByTag:n=>{let a=!1;const r=e=>{const{tags:t,name:r,aliases:o}=e;if(t&&t.includes(n)){const e=rt(r,o);for(const t of e)s.delete(t);return a=!0,!1}return!0};return e=e.filter(r),t=t.filter(r),a},concat:e=>{const t=a(it());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:a,identify:()=>o(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return ot(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of o().map((e=>e.middleware)).reverse())e=n(e,t);return n&&console.log(i.identify()),e}};return i},ct={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},ut={high:3,normal:2,low:1};class dt{constructor(e){this.config=e,this.middlewareStack=it()}send(e,t,n){const s="function"!=typeof t?t:void 0,a="function"==typeof t?t:n;let r;if(void 0===s&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?r=t.get(e.constructor):(r=e.resolveMiddleware(this.middlewareStack,this.config,s),t.set(e.constructor,r))}else delete this.handlers,r=e.resolveMiddleware(this.middlewareStack,this.config,s);if(!a)return r(e).then((e=>e.output));r(e).then((e=>a(null,e.output)),(e=>a(e))).catch((()=>{}))}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}class lt{constructor(){this.middlewareStack=it()}static classBuilder(){return new pt}resolveMiddlewareWithContext(e,t,n,{middlewareFn:s,clientName:a,commandName:r,inputFilterSensitiveLog:o,outputFilterSensitiveLog:c,smithyContext:u,additionalContext:d,CommandCtor:l}){for(const a of s.bind(this)(l,e,t,n))this.middlewareStack.use(a);const p=e.concat(this.middlewareStack),{logger:m}=t,h={logger:m,clientName:a,commandName:r,inputFilterSensitiveLog:o,outputFilterSensitiveLog:c,[i]:{commandInstance:this,...u},...d},{requestHandler:f}=t;return p.resolve((e=>f.handle(e.request,n||{})),h)}}class pt{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 lt{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this)}resolveMiddleware(n,s,a){return this.resolveMiddlewareWithContext(n,s,a,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const mt=e=>{if(null!=e){if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&bt.warn(wt(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},ht=e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},ft=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return bt.warn(wt(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},yt=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,gt=e=>{const t=e.match(yt);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},wt=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),bt={warn:console.warn},vt=e=>{if(null==e)return;let t;if("number"==typeof e)t=e;else if("string"==typeof e)t=(e=>mt("string"==typeof e?gt(e):e))(e);else{if("object"!=typeof e||1!==e.tag)throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");t=e.value}if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(1e3*t))};class xt extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,xt.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}}const Et=(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},St=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"]}),Ot=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{}}},Pt=e=>{const t=[];for(const n in r){const s=r[n];void 0!==e[s]&&t.push({algorithmId:()=>s,checksumConstructor:()=>e[s]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(e){this._checksumAlgorithms.push(e)},checksumAlgorithms(){return this._checksumAlgorithms}}},$t=e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t},Mt=e=>{let t=e.retryStrategy;return{setRetryStrategy(e){t=e},retryStrategy:()=>t}},It=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},At=e=>({...Pt(e),...Mt(e)}),Rt=function(){const e=Object.getPrototypeOf(this).constructor,t=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(t,e.prototype),t};Rt.prototype=Object.create(String.prototype,{constructor:{value:Rt,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(Rt,String);class Tt{trace(){}debug(){}info(){}warn(){}error(){}}const Ct=(e,t)=>{const n={};for(const s in t)Nt(n,e,t,s);return n},Nt=(e,t,n,s)=>{if(null!==t){let a=n[s];"function"==typeof a&&(a=[,a]);const[r=_t,o=Dt,i=s]=a;return void(("function"==typeof r&&r(t[i])||"function"!=typeof r&&r)&&(e[s]=o(t[i])))}let[a,r]=n[s];if("function"==typeof r){let t;const n=void 0===a&&null!=(t=r()),o="function"==typeof a&&!!a(void 0)||"function"!=typeof a&&!!a;n?e[s]=t:o&&(e[s]=r())}else{const t=void 0===a&&null!=r,n="function"==typeof a&&!!a(r)||"function"!=typeof a&&!!a;(t||n)&&(e[s]=r)}},_t=e=>null!=e,Dt=e=>e,Ft=e=>{if(null==e)return{};if(Array.isArray(e))return e.filter((e=>null!=e)).map(Ft);if("object"==typeof e){const t={};for(const n of Object.keys(e))null!=e[n]&&(t[n]=Ft(e[n]));return t}return e},kt=(e,t)=>(async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return k.mutate(e);if(!e)return k.mutate(new Uint8Array);const n=t.streamCollector(e);return k.mutate(await n)})(e,t).then((e=>t.utf8Encoder(e))),Lt=(e,t)=>kt(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{}})),jt=async(e,t)=>{const n=await Lt(e,t);return n.message=n.message??n.Message,n};function zt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const Ut=/\d{12}\.ddb/;const Bt="user-agent",qt="x-amz-user-agent",Vt=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Ht=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const Wt=e=>(t,n)=>async s=>{const{request:a}=s;if(!d.isInstance(a))return t(s);const{headers:r}=a,o=n?.userAgent?.map(Gt)||[],i=(await e.defaultUserAgentProvider()).map(Gt);await async function(e,t,n){const s=n.request;if("rpc-v2-cbor"===s?.headers?.["smithy-protocol"]&&ve(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?ve(e,"RETRY_MODE_ADAPTIVE","F"):ve(e,"RETRY_MODE_STANDARD","E"):ve(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(Ut)&&ve(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":ve(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":ve(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":ve(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const a=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(a?.$source){const t=a;t.accountId&&ve(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,s]of Object.entries(t.$source??{}))ve(e,n,s)}}(n,e,s);const c=n;i.push(`m/${function(e){let t="";for(const n in e){const s=e[n];if(!(t.length+s.length+1<=1024))break;t.length?t+=","+s:t+=s}return t}(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(Gt)||[],l=await e.userAgentAppId();l&&i.push(Gt([`app/${l}`]));const p=[].concat([...i,...o,...u]).join(" "),m=[...i.filter((e=>e.startsWith("aws-sdk-"))),...u].join(" ");return"browser"!==e.runtime?(m&&(r[qt]=r[qt]?`${r[Bt]} ${m}`:m),r[Bt]=p):r[qt]=p,t({...s,request:a})},Gt=e=>{const t=e[0].split("/").map((e=>e.replace(Vt,"-"))).join("/"),n=e[1]?.replace(Ht,"-"),s=t.indexOf("/"),a=t.substring(0,s);let r=t.substring(s+1);return"api"===a&&(r=r.toLowerCase()),[a,r,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}`}}),"")},Kt={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0};var Qt;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(Qt||(Qt={}));const Zt=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),Yt=e=>Zt(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,Jt="content-length";const Xt={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},en=e=>({applyToStack:t=>{var n;t.add((n=e.bodyLengthChecker,e=>async t=>{const s=t.request;if(d.isInstance(s)){const{body:e,headers:t}=s;if(e&&-1===Object.keys(t).map((e=>e.toLowerCase())).indexOf(Jt))try{const t=n(e);s.headers={...s.headers,[Jt]:String(t)}}catch(e){}}return e({...t,request:s})}),Xt)}}),tn=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,nn=/(\d+\.){3}\d+/,sn=/\.\./,an=e=>tn.test(e)&&!nn.test(e)&&!sn.test(e),rn=e=>{const[t,n,s,,,a]=e.split(":"),r="arn"===t&&e.split(":").length>=6,o=Boolean(r&&n&&s&&a);if(r&&!o)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return o},on=(e,t,n)=>{const s=async()=>{const s=n[e]??n[t];return"function"==typeof s?s():s};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 s();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:s,path:a}=e;return`${t}//${n}${s?":"+s:""}${a}`}}return e}:s},cn=async e=>{};const un=e=>{if("string"==typeof e)return un(new URL(e));const{hostname:t,pathname:n,port:s,protocol:a,search:r}=e;let o;return r&&(o=function(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,s=null]=n.split("=");e=decodeURIComponent(e),s&&(s=decodeURIComponent(s)),e in t?Array.isArray(t[e])?t[e].push(s):t[e]=[t[e],s]:t[e]=s}return t}(r)),{hostname:t,port:s?parseInt(s):void 0,protocol:a,path:n,query:o}},dn=e=>"object"==typeof e?"url"in e?un(e.url):e:un(e),ln=async(e,t,n)=>{const s={},a=t?.getEndpointParameterInstructions?.()||{};for(const[t,r]of Object.entries(a))switch(r.type){case"staticContextParams":s[t]=r.value;break;case"contextParams":s[t]=e[r.name];break;case"clientContextParams":case"builtInParams":s[t]=await on(r.name,t,n)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(r))}return 0===Object.keys(a).length&&Object.assign(s,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("?"))),rn(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!an(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})(s),s},pn=({config:e,instructions:t})=>(n,s)=>async a=>{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}(s,"ENDPOINT_OVERRIDE","N");const r=await(async(e,t,n,s)=>{if(!n.endpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await cn(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(dn(e)))}const a=await ln(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(a,s)})(a.input,{getEndpointParameterInstructions:()=>t},{...e},s);s.endpointV2=r,s.authSchemes=r.properties?.authSchemes;const o=s.authSchemes?.[0];if(o){s.signing_region=o.signingRegion,s.signing_service=o.signingName;const e=w(s),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return n({...a})},mn={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:S.name},hn=(e,t)=>({applyToStack:n=>{n.addRelativeTo(pn({config:e,instructions:t}),mn)}});var fn;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(fn||(fn={}));const yn=fn.STANDARD,gn=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],wn=["TimeoutError","RequestTimeout","RequestTimeoutException"],bn=[500,502,503,504],vn=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],xn=e=>429===e.$metadata?.httpStatusCode||gn.includes(e.name)||1==e.$retryable?.throttling,En=e=>(e=>e.$metadata?.clockSkewCorrected)(e)||wn.includes(e.name)||vn.includes(e?.code||"")||bn.includes(e.$metadata?.httpStatusCode||0);class Sn{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(),xn(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 On=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(2e4,e),getRetryCost:()=>n});class Pn{constructor(e){this.maxAttempts=e,this.mode=fn.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 On({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 s=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),a=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,s):s,r=this.getCapacityCost(n);return this.capacity-=r,On({retryDelay:a,retryCount:e.getRetryCount()+1,retryCost:r})}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 $n{constructor(e,t){this.maxAttemptsProvider=e,this.mode=fn.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new Sn,this.standardRetryStrategy=new Pn(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 Mn;const In=new Uint8Array(16);function An(){if(!Mn&&(Mn="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Mn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Mn(In)}const Rn=[];for(let e=0;e<256;++e)Rn.push((e+256).toString(16).slice(1));var Tn={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Cn(e,t,n){if(Tn.randomUUID&&!t&&!e)return Tn.randomUUID();const s=(e=e||{}).random||(e.rng||An)();return s[6]=15&s[6]|64,s[8]=63&s[8]|128,function(e,t=0){return Rn[e[t+0]]+Rn[e[t+1]]+Rn[e[t+2]]+Rn[e[t+3]]+"-"+Rn[e[t+4]]+Rn[e[t+5]]+"-"+Rn[e[t+6]]+Rn[e[t+7]]+"-"+Rn[e[t+8]]+Rn[e[t+9]]+"-"+Rn[e[t+10]]+Rn[e[t+11]]+Rn[e[t+12]]+Rn[e[t+13]]+Rn[e[t+14]]+Rn[e[t+15]]}(s)}const Nn=e=>e?.body instanceof ReadableStream,_n=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,Dn=e=>{const t={error:e,errorType:Fn(e)},n=jn(e.$response);return n&&(t.retryAfterHint=n),t},Fn=e=>xn(e)?"THROTTLING":En(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!En(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",kn={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Ln=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async s=>{let a=await e.retryStrategy();const r=await e.maxAttempts();if(!_n(a))return a?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",a.mode]]),a.retry(t,s);{let e=await a.acquireInitialRetryToken(n.partition_id),i=new Error,c=0,u=0;const{request:l}=s,p=d.isInstance(l);for(p&&(l.headers["amz-sdk-invocation-id"]=Cn());;)try{p&&(l.headers["amz-sdk-request"]=`attempt=${c+1}; max=${r}`);const{response:n,output:o}=await t(s);return a.recordSuccess(e),o.$metadata.attempts=c+1,o.$metadata.totalRetryDelay=u,{response:n,output:o}}catch(t){const s=Dn(t);if(i=(o=t)instanceof Error?o:o instanceof Object?Object.assign(new Error,o):"string"==typeof o?new Error(o):new Error(`AWS SDK error wrapper for ${o}`),p&&Nn(l))throw(n.logger instanceof Tt?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),i;try{e=await a.refreshRetryTokenForRetry(e,s)}catch(e){throw i.$metadata||(i.$metadata={}),i.$metadata.attempts=c+1,i.$metadata.totalRetryDelay=u,i}c=e.getRetryCount();const r=e.getRetryDelay();u+=r,await new Promise((e=>setTimeout(e,r)))}}var o})(e),kn)}}),jn=e=>{if(!l.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const n=e.headers[t],s=Number(n);if(!Number.isNaN(s))return new Date(1e3*s);return new Date(n)},zn=async(e,t,n)=>({operation:w(t).operation,region:await b(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Un=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},Bn={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var qn="3.682.0";var Vn="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function Hn(e){return e instanceof Uint8Array?e:"string"==typeof e?Vn(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function Wn(e){return"string"==typeof e?0===e.length:0===e.byteLength}var Gn={name:"SHA-256"},Kn={name:"HMAC",hash:Gn},Qn=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 Zn={};function Yn(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:Zn}var Jn=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!Wn(e)){var t=Hn(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 Yn().crypto.subtle.sign(Kn,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):Wn(this.toHash)?Promise.resolve(Qn):Promise.resolve().then((function(){return Yn().crypto.subtle.digest(Gn,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){Yn().crypto.subtle.importKey("raw",Hn(e.secret),Kn,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))},e}();function Xn(e,t,n,s){return new(n||(n=Promise))((function(a,r){function o(e){try{c(s.next(e))}catch(e){r(e)}}function i(e){try{c(s.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,i)}c((s=s.apply(e,t||[])).next())}))}function es(e,t){var n,s,a,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=i(0),o.throw=i(1),o.return=i(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,i[0]&&(r=0)),r;)try{if(n=1,s&&(a=2&i[0]?s.return:i[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,i[1])).done)return a;switch(s=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,s=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(!(a=r.trys,(a=a.length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){r=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){r.label=i[1];break}if(6===i[0]&&r.label<a[1]){r.label=a[1],a=i;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(i);break}a[2]&&r.ops.pop(),r.trys.pop();continue}i=t.call(e,r)}catch(e){i=[6,e],s=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}"function"==typeof SuppressedError&&SuppressedError;var ts=64,ns=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]),ss=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],as=Math.pow(2,53)-1,rs=function(){function e(){this.state=Int32Array.from(ss),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>as)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===ts&&(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%ts>=56){for(var s=this.bufferLength;s<ts;s++)t.setUint8(s,0);this.hashBuffer(),this.bufferLength=0}for(s=this.bufferLength;s<56;s++)t.setUint8(s,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}var a=new Uint8Array(32);for(s=0;s<8;s++)a[4*s]=this.state[s]>>>24&255,a[4*s+1]=this.state[s]>>>16&255,a[4*s+2]=this.state[s]>>>8&255,a[4*s+3]=this.state[s]>>>0&255;return a},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],s=t[1],a=t[2],r=t[3],o=t[4],i=t[5],c=t[6],u=t[7],d=0;d<ts;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 l=this.temp[d-2],p=(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10,m=((l=this.temp[d-15])>>>7|l<<25)^(l>>>18|l<<14)^l>>>3;this.temp[d]=(p+this.temp[d-7]|0)+(m+this.temp[d-16]|0)}var h=(((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+(o&i^~o&c)|0)+(u+(ns[d]+this.temp[d]|0)|0)|0,f=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&s^n&a^s&a)|0;u=c,c=i,i=o,o=r+h|0,r=a,a=s,s=n,n=h+f|0}t[0]+=n,t[1]+=s,t[2]+=a,t[3]+=r,t[4]+=o,t[5]+=i,t[6]+=c,t[7]+=u},e}(),os=function(){function e(e){this.secret=e,this.hash=new rs,this.reset()}return e.prototype.update=function(e){if(!Wn(e)&&!this.error)try{this.hash.update(Hn(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 Xn(this,void 0,void 0,(function(){return es(this,(function(e){return[2,this.digestSync()]}))}))},e.prototype.reset=function(){if(this.hash=new rs,this.secret){this.outer=new rs;var e=function(e){var t=Hn(e);if(t.byteLength>ts){var n=new rs;n.update(t),t=n.digest()}var s=new Uint8Array(ts);return s.set(t),s}(this.secret),t=new Uint8Array(ts);t.set(e);for(var n=0;n<ts;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 is=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function cs(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&&is.every((function(t){return"function"==typeof e[t]}))}(e.crypto.subtle)}var us,ds=function(){function e(e){cs(Yn())?this.hash=new Jn(e):this.hash=new os(e)}return e.prototype.update=function(e,t){this.hash.update(Hn(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),ls={exports:{}};var ps=(us||(us=1,function(e){e.exports=function(e){var t={};function n(s){if(t[s])return t[s].exports;var a=t[s]={i:s,l:!1,exports:{}};return e[s].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,s){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},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 s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(s,a,function(t){return e[t]}.bind(null,a));return s},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 s=n(18),a=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,s){void 0===s&&(s=!1);var a=e.getVersionPrecision(t),r=e.getVersionPrecision(n),o=Math.max(a,r),i=0,c=e.map([t,n],(function(t){var n=o-e.getVersionPrecision(t),s=t+new Array(n+1).join(".0");return e.map(s.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(s&&(i=o-Math.min(a,r)),o-=1;o>=i;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===i)return 0;o-=1}else if(c[0][o]<c[1][o])return-1}},e.map=function(e,t){var n,s=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)s.push(t(e[n]));return s},e.find=function(e,t){var n,s;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,s=e.length;n<s;n+=1){var a=e[n];if(t(a,n))return a}},e.assign=function(e){for(var t,n,s=e,a=arguments.length,r=new Array(a>1?a-1:0),o=1;o<a;o++)r[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(r));var i=function(){var e=r[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){s[t]=e[t]}))};for(t=0,n=r.length;t<n;t+=1)i();return e},e.getBrowserAlias=function(e){return s.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return s.BROWSER_MAP[e]||""},e}();t.default=a,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 s,a=(s=n(91))&&s.__esModule?s:{default:s},r=n(18);function o(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}var i=function(){function e(){}var t,n,s;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 a.default(e,t)},e.parse=function(e){return new a.default(e).getResult()},t=e,s=[{key:"BROWSER_MAP",get:function(){return r.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return r.ENGINE_MAP}},{key:"OS_MAP",get:function(){return r.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return r.PLATFORMS_MAP}}],(n=null)&&o(t.prototype,n),s&&o(t,s),e}();t.default=i,e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var s=c(n(92)),a=c(n(93)),r=c(n(94)),o=c(n(95)),i=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=i.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.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=i.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.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=i.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.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=i.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return i.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},s=0,a={},r=0;if(Object.keys(e).forEach((function(t){var o=e[t];"string"==typeof o?(a[t]=o,r+=1):"object"==typeof o&&(n[t]=o,s+=1)})),s>0){var o=Object.keys(n),c=i.default.find(o,(function(e){return t.isOS(e)}));if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var d=i.default.find(o,(function(e){return t.isPlatform(e)}));if(d){var l=this.satisfies(n[d]);if(void 0!==l)return l}}if(r>0){var p=Object.keys(a),m=i.default.find(p,(function(e){return t.isBrowser(e,!0)}));if(void 0!==m)return this.compareVersion(a[m])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),s=e.toLowerCase(),a=i.default.getBrowserTypeByAlias(s);return t&&a&&(s=a.toLowerCase()),s===n},t.compareVersion=function(e){var t=[0],n=e,s=!1,a=this.getBrowserVersion();if("string"==typeof a)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(s=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(s=!0,n=e.substr(1)),t.indexOf(i.default.compareVersions(a,n,s))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=u,e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var s,a=(s=n(17))&&s.__esModule?s:{default:s},r=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=a.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=a.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=a.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=a.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,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=a.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=a.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=a.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=a.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=a.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=a.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=a.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=a.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=a.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(r,e)||a.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=a.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=a.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=a.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=a.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=a.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=a.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=a.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=a.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=a.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=a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=a.default.getFirstMatch(r,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:a.default.getFirstMatch(t,e),version:a.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var s,a=(s=n(17))&&s.__esModule?s:{default:s},r=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=a.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:r.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=a.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=a.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=a.default.getWindowsVersionName(t);return{name:r.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:r.OS_MAP.iOS},n=a.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=a.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=a.default.getMacOSVersionName(t),s={name:r.OS_MAP.MacOS,version:t};return n&&(s.versionName=n),s}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=a.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:r.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=a.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=a.default.getAndroidVersionName(t),s={name:r.OS_MAP.Android,version:t};return n&&(s.versionName=n),s}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=a.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:r.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=a.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||a.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||a.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:r.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=a.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=a.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:r.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:r.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=a.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:r.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){t.__esModule=!0,t.default=void 0;var s,a=(s=n(17))&&s.__esModule?s:{default:s},r=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=a.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:r.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:r.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:r.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=a.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:r.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:r.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:r.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:r.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:r.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:r.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){t.__esModule=!0,t.default=void 0;var s,a=(s=n(17))&&s.__esModule?s:{default:s},r=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:r.ENGINE_MAP.Blink};var t=a.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:r.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:r.ENGINE_MAP.Trident},n=a.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:r.ENGINE_MAP.Presto},n=a.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:r.ENGINE_MAP.Gecko},n=a.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:r.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:r.ENGINE_MAP.WebKit},n=a.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})}(ls)),ls.exports),ms=zt(ps);const hs=({serviceId:e,clientVersion:t})=>async n=>{const s="undefined"!=typeof window&&window?.navigator?.userAgent?ms.parse(window.navigator.userAgent):void 0,a=[["aws-sdk-js",t],["ua","2.1"],[`os/${s?.os?.name||"other"}`,s?.os?.version],["lang/js"],["md/browser",`${s?.browser?.name??"unknown"}_${s?.browser?.version??"unknown"}`]];e&&a.push([`api/${e}`,t]);const r=await(n?.userAgentAppId?.());return r&&a.push([`app/${r}`]),a};function fs(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 ys={supported:void 0};class gs{static create(e){return"function"==typeof e?.handle?e:new gs(e)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===ys.supported&&(ys.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,s=!0===this.config.keepAlive,a=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let r=e.path;const o=function(e){const t=[];for(let n of Object.keys(e).sort()){const s=e[n];if(n=L(n),Array.isArray(s))for(let e=0,a=s.length;e<a;e++)t.push(`${n}=${L(s[e])}`);else{let e=n;(s||"string"==typeof s)&&(e+=`=${L(s)}`),t.push(e)}}return t.join("&")}(e.query||{});o&&(r+=`?${o}`),e.fragment&&(r+=`#${e.fragment}`);let i="";if(null!=e.username||null!=e.password){i=`${e.username??""}:${e.password??""}@`}const{port:c,method:u}=e,d=`${e.protocol}//${i}${e.hostname}${c?`:${c}`:""}${r}`,p="GET"===u||"HEAD"===u?void 0:e.body,m={body:p,headers:new Headers(e.headers),method:u,credentials:a};this.config?.cache&&(m.cache=this.config.cache),p&&(m.duplex="half"),"undefined"!=typeof AbortController&&(m.signal=t),ys.supported&&(m.keepalive=s),"function"==typeof this.config.requestInit&&Object.assign(m,this.config.requestInit(e));let h=()=>{};const f=new Request(d,m),y=[fetch(f).then((e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new l({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new l({headers:n,reason:e.statusText,statusCode:e.status,body:t})})))})),fs(n)];return t&&y.push(new Promise(((e,n)=>{const s=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",s,{once:!0}),h=()=>e.removeEventListener("abort",s)}else t.onabort=s}))),Promise.race(y).finally(h)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n=>(n[e]=t,n)))}httpHandlerConfigs(){return this.config??{}}}const ws=e=>"function"==typeof Blob&&e instanceof Blob?async function(e){const t=await function(e){return new Promise(((t,n)=>{const s=new FileReader;s.onloadend=()=>{if(2!==s.readyState)return n(new Error("Reader aborted too early"));const e=s.result??"",a=e.indexOf(","),r=a>-1?a+1:e.length;t(e.substring(r))},s.onabort=()=>n(new Error("Read aborted")),s.onerror=()=>n(s.error),s.readAsDataURL(e)}))}(e),n=C(t);return new Uint8Array(n)}(e):async function(e){const t=[],n=e.getReader();let s=!1,a=0;for(;!s;){const{done:e,value:r}=await n.read();r&&(t.push(r),a+=r.length),s=e}const r=new Uint8Array(a);let o=0;for(const e of t)r.set(e,o),o+=e.length;return r}(e);const bs="function"==typeof TextEncoder?new TextEncoder:null,vs=e=>{if("string"==typeof e){if(bs)return bs.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const s=e.charCodeAt(n);s>127&&s<=2047?t++:s>2047&&s<=65535&&(t+=2),s>=56320&&s<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)},xs="required",Es="fn",Ss="argv",Os="ref",Ps=!0,$s="isSet",Ms="booleanEquals",Is="error",As="endpoint",Rs="tree",Ts="PartitionResult",Cs="getAttr",Ns={[xs]:!1,type:"String"},_s={[xs]:!0,default:!1,type:"Boolean"},Ds={[Os]:"Endpoint"},Fs={[Es]:Ms,[Ss]:[{[Os]:"UseFIPS"},!0]},ks={[Es]:Ms,[Ss]:[{[Os]:"UseDualStack"},!0]},Ls={},js={[Es]:Cs,[Ss]:[{[Os]:Ts},"supportsFIPS"]},zs={[Os]:Ts},Us={[Es]:Ms,[Ss]:[!0,{[Es]:Cs,[Ss]:[zs,"supportsDualStack"]}]},Bs=[Fs],qs=[ks],Vs=[{[Os]:"Region"}],Hs={version:"1.0",parameters:{Region:Ns,UseDualStack:_s,UseFIPS:_s,Endpoint:Ns},rules:[{conditions:[{[Es]:$s,[Ss]:[Ds]}],rules:[{conditions:Bs,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Is},{conditions:qs,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Is},{endpoint:{url:Ds,properties:Ls,headers:Ls},type:As}],type:Rs},{conditions:[{[Es]:$s,[Ss]:Vs}],rules:[{conditions:[{[Es]:"aws.partition",[Ss]:Vs,assign:Ts}],rules:[{conditions:[Fs,ks],rules:[{conditions:[{[Es]:Ms,[Ss]:[Ps,js]},Us],rules:[{endpoint:{url:"https://ssm-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ls,headers:Ls},type:As}],type:Rs},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Is}],type:Rs},{conditions:Bs,rules:[{conditions:[{[Es]:Ms,[Ss]:[js,Ps]}],rules:[{conditions:[{[Es]:"stringEquals",[Ss]:[{[Es]:Cs,[Ss]:[zs,"name"]},"aws-us-gov"]}],endpoint:{url:"https://ssm.{Region}.amazonaws.com",properties:Ls,headers:Ls},type:As},{endpoint:{url:"https://ssm-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ls,headers:Ls},type:As}],type:Rs},{error:"FIPS is enabled but this partition does not support FIPS",type:Is}],type:Rs},{conditions:qs,rules:[{conditions:[Us],rules:[{endpoint:{url:"https://ssm.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ls,headers:Ls},type:As}],type:Rs},{error:"DualStack is enabled but this partition does not support DualStack",type:Is}],type:Rs},{endpoint:{url:"https://ssm.{Region}.{PartitionResult#dnsSuffix}",properties:Ls,headers:Ls},type:As}],type:Rs}],type:Rs},{error:"Invalid Configuration: Missing Region",type:Is}]},Ws=new class{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:s}=e.next();if(this.data.delete(n),s||++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 s of n){const n=String(e[s]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Gs=(e,t={})=>Ws.get(e,(()=>((e,t)=>{const{endpointParams:n,logger:s}=t,{parameters:a,rules:r}=e;t.logger?.debug?.(`${J} Initial EndpointParams: ${X(n)}`);const o=Object.entries(a).filter((([,e])=>null!=e.default)).map((([e,t])=>[e,t.default]));if(o.length>0)for(const[e,t]of o)n[e]=n[e]??t;const i=Object.entries(a).filter((([,e])=>e.required)).map((([e])=>e));for(const e of i)if(null==n[e])throw new ee(`Missing required parameter: '${e}'`);const c=ye(r,{endpointParams:n,logger:s,referenceRecord:{}});return t.logger?.debug?.(`${J} Resolved endpoint: ${X(c)}`),c})(Hs,{endpointParams:e,logger:t.logger})));Y.aws=be;const Ks=["in-region","cross-region","mobile","standard","legacy"],Qs=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?ms.parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},Zs=e=>{const t=(({defaultsMode:e}={})=>$e((async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(Qs()?"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 ${Ks.join(", ")}, got ${t}`)}})))(e),n=()=>t().then(Ot),s=(e=>({apiVersion:"2014-11-06",base64Decoder:e?.base64Decoder??C,base64Encoder:e?.base64Encoder??F,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Gs,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Un,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Pe}],logger:e?.logger??new Tt,serviceId:e?.serviceId??"SSM",urlParser:e?.urlParser??un,utf8Decoder:e?.utf8Decoder??N,utf8Encoder:e?.utf8Encoder??D}))(e);return{...s,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??vs,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??hs({serviceId:s.serviceId,clientVersion:qn}),maxAttempts:e?.maxAttempts??3,region:e?.region??(a="Region is missing",()=>Promise.reject(a)),requestHandler:gs.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||yn),sha256:e?.sha256??ds,streamCollector:e?.streamCollector??ws,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(false)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(false))};var a},Ys=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}},Js=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,s=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){s=e},credentials:()=>s}},Xs=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});class ea extends dt{constructor(...[e]){const n=Zs(e||{});var s;const a=function(e){const t=A(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}}}((s=n,{...s,useDualstackEndpoint:s.useDualstackEndpoint??!1,useFipsEndpoint:s.useFipsEndpoint??!1,defaultSigningName:"ssm"})),r=(e=>{const t=e.tls??!0,{endpoint:n}=e,s=null!=n?async()=>dn(await b(n)()):void 0,a=!!n,r={...e,endpoint:s,tls:t,isCustomEndpoint:a,useDualstackEndpoint:b(e.useDualstackEndpoint??!1),useFipsEndpoint:b(e.useFipsEndpoint??!1)};let o;return r.serviceConfiguredEndpoint=async()=>(e.serviceId&&!o&&(o=cn(e.serviceId)),o),r})((e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if("string"==typeof t)return Yt(t);const e=await t();return Yt(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!Zt(e)||("function"!=typeof n?Promise.resolve(!!n):n())}}})((e=>{const{retryStrategy:t}=e,n=b(e.maxAttempts??3);return{...e,maxAttempts:n,retryStrategy:async()=>t||(await b(e.retryMode)()===fn.ADAPTIVE?new $n(n):new Pn(n))}})(a)));const o=((e,n)=>{const s={...Ys(e),...At(e),...t(e),...Js(e)};return n.forEach((e=>e.configure(s))),{...e,...(o=s,{region:o.region()}),...(r=s,{...$t(r),...It(r)}),...(a=s,{httpHandler:a.httpHandler()}),...Xs(s)};var a,r,o})({...at(r)},e?.extensions||[]);super(o),this.config=o,this.middlewareStack.use((e=>({applyToStack:t=>{t.add(Wt(e),Kt)}}))(this.config)),this.middlewareStack.use(Ln(this.config)),this.middlewareStack.use(en(this.config)),this.middlewareStack.use(m(this.config)),this.middlewareStack.use((this.config,{applyToStack:e=>{e.add(((e,t)=>async n=>{try{const s=await e(n),{clientName:a,commandName:r,logger:o,dynamoDbDocumentClientOptions:i={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=i,d=c??t.inputFilterSensitiveLog,l=u??t.outputFilterSensitiveLog,{$metadata:p,...m}=s.output;return o?.info?.({clientName:a,commandName:r,input:d(n.input),output:l(m),metadata:p}),s}catch(e){const{clientName:s,commandName:a,logger:r,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:i}=o,c=i??t.inputFilterSensitiveLog;throw r?.error?.({clientName:s,commandName:a,input:c(n.input),error:e,metadata:e.$metadata}),e}}),h)}})),this.middlewareStack.use(g(this.config)),this.middlewareStack.use(((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:s=>{s.addRelativeTo(v(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),x)}}))(this.config,{httpAuthSchemeParametersProvider:zn,identityProviderConfigProvider:async e=>new q({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(I(this.config))}destroy(){super.destroy()}}class ta extends xt{constructor(e){super(e),Object.setPrototypeOf(this,ta.prototype)}}class na extends ta{constructor(e){super({name:"InternalServerError",$fault:"server",...e}),this.name="InternalServerError",this.$fault="server",Object.setPrototypeOf(this,na.prototype),this.Message=e.Message}}class sa extends ta{constructor(e){super({name:"InvalidResourceId",$fault:"client",...e}),this.name="InvalidResourceId",this.$fault="client",Object.setPrototypeOf(this,sa.prototype)}}class aa extends ta{constructor(e){super({name:"InvalidResourceType",$fault:"client",...e}),this.name="InvalidResourceType",this.$fault="client",Object.setPrototypeOf(this,aa.prototype)}}class ra extends ta{constructor(e){super({name:"TooManyTagsError",$fault:"client",...e}),this.name="TooManyTagsError",this.$fault="client",Object.setPrototypeOf(this,ra.prototype)}}class oa extends ta{constructor(e){super({name:"TooManyUpdates",$fault:"client",...e}),this.name="TooManyUpdates",this.$fault="client",Object.setPrototypeOf(this,oa.prototype),this.Message=e.Message}}class ia extends ta{constructor(e){super({name:"AlreadyExistsException",$fault:"client",...e}),this.name="AlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,ia.prototype),this.Message=e.Message}}class ca extends ta{constructor(e){super({name:"OpsItemConflictException",$fault:"client",...e}),this.name="OpsItemConflictException",this.$fault="client",Object.setPrototypeOf(this,ca.prototype),this.Message=e.Message}}class ua extends ta{constructor(e){super({name:"OpsItemInvalidParameterException",$fault:"client",...e}),this.name="OpsItemInvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,ua.prototype),this.ParameterNames=e.ParameterNames,this.Message=e.Message}}class da extends ta{constructor(e){super({name:"OpsItemLimitExceededException",$fault:"client",...e}),this.name="OpsItemLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,da.prototype),this.ResourceTypes=e.ResourceTypes,this.Limit=e.Limit,this.LimitType=e.LimitType,this.Message=e.Message}}class la extends ta{constructor(e){super({name:"OpsItemNotFoundException",$fault:"client",...e}),this.name="OpsItemNotFoundException",this.$fault="client",Object.setPrototypeOf(this,la.prototype),this.Message=e.Message}}class pa extends ta{constructor(e){super({name:"OpsItemRelatedItemAlreadyExistsException",$fault:"client",...e}),this.name="OpsItemRelatedItemAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,pa.prototype),this.Message=e.Message,this.ResourceUri=e.ResourceUri,this.OpsItemId=e.OpsItemId}}class ma extends ta{constructor(e){super({name:"DuplicateInstanceId",$fault:"client",...e}),this.name="DuplicateInstanceId",this.$fault="client",Object.setPrototypeOf(this,ma.prototype)}}class ha extends ta{constructor(e){super({name:"InvalidCommandId",$fault:"client",...e}),this.name="InvalidCommandId",this.$fault="client",Object.setPrototypeOf(this,ha.prototype)}}class fa extends ta{constructor(e){super({name:"InvalidInstanceId",$fault:"client",...e}),this.name="InvalidInstanceId",this.$fault="client",Object.setPrototypeOf(this,fa.prototype),this.Message=e.Message}}class ya extends ta{constructor(e){super({name:"DoesNotExistException",$fault:"client",...e}),this.name="DoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,ya.prototype),this.Message=e.Message}}class ga extends ta{constructor(e){super({name:"InvalidParameters",$fault:"client",...e}),this.name="InvalidParameters",this.$fault="client",Object.setPrototypeOf(this,ga.prototype),this.Message=e.Message}}class wa extends ta{constructor(e){super({name:"AssociationAlreadyExists",$fault:"client",...e}),this.name="AssociationAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,wa.prototype)}}class ba extends ta{constructor(e){super({name:"AssociationLimitExceeded",$fault:"client",...e}),this.name="AssociationLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,ba.prototype)}}class va extends ta{constructor(e){super({name:"InvalidDocument",$fault:"client",...e}),this.name="InvalidDocument",this.$fault="client",Object.setPrototypeOf(this,va.prototype),this.Message=e.Message}}class xa extends ta{constructor(e){super({name:"InvalidDocumentVersion",$fault:"client",...e}),this.name="InvalidDocumentVersion",this.$fault="client",Object.setPrototypeOf(this,xa.prototype),this.Message=e.Message}}class Ea extends ta{constructor(e){super({name:"InvalidOutputLocation",$fault:"client",...e}),this.name="InvalidOutputLocation",this.$fault="client",Object.setPrototypeOf(this,Ea.prototype)}}class Sa extends ta{constructor(e){super({name:"InvalidSchedule",$fault:"client",...e}),this.name="InvalidSchedule",this.$fault="client",Object.setPrototypeOf(this,Sa.prototype),this.Message=e.Message}}class Oa extends ta{constructor(e){super({name:"InvalidTag",$fault:"client",...e}),this.name="InvalidTag",this.$fault="client",Object.setPrototypeOf(this,Oa.prototype),this.Message=e.Message}}class Pa extends ta{constructor(e){super({name:"InvalidTarget",$fault:"client",...e}),this.name="InvalidTarget",this.$fault="client",Object.setPrototypeOf(this,Pa.prototype),this.Message=e.Message}}class $a extends ta{constructor(e){super({name:"InvalidTargetMaps",$fault:"client",...e}),this.name="InvalidTargetMaps",this.$fault="client",Object.setPrototypeOf(this,$a.prototype),this.Message=e.Message}}class Ma extends ta{constructor(e){super({name:"UnsupportedPlatformType",$fault:"client",...e}),this.name="UnsupportedPlatformType",this.$fault="client",Object.setPrototypeOf(this,Ma.prototype),this.Message=e.Message}}class Ia extends ta{constructor(e){super({name:"DocumentAlreadyExists",$fault:"client",...e}),this.name="DocumentAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,Ia.prototype),this.Message=e.Message}}class Aa extends ta{constructor(e){super({name:"DocumentLimitExceeded",$fault:"client",...e}),this.name="DocumentLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,Aa.prototype),this.Message=e.Message}}class Ra extends ta{constructor(e){super({name:"InvalidDocumentContent",$fault:"client",...e}),this.name="InvalidDocumentContent",this.$fault="client",Object.setPrototypeOf(this,Ra.prototype),this.Message=e.Message}}class Ta extends ta{constructor(e){super({name:"InvalidDocumentSchemaVersion",$fault:"client",...e}),this.name="InvalidDocumentSchemaVersion",this.$fault="client",Object.setPrototypeOf(this,Ta.prototype),this.Message=e.Message}}class Ca extends ta{constructor(e){super({name:"MaxDocumentSizeExceeded",$fault:"client",...e}),this.name="MaxDocumentSizeExceeded",this.$fault="client",Object.setPrototypeOf(this,Ca.prototype),this.Message=e.Message}}class Na extends ta{constructor(e){super({name:"IdempotentParameterMismatch",$fault:"client",...e}),this.name="IdempotentParameterMismatch",this.$fault="client",Object.setPrototypeOf(this,Na.prototype),this.Message=e.Message}}class _a extends ta{constructor(e){super({name:"ResourceLimitExceededException",$fault:"client",...e}),this.name="ResourceLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,_a.prototype),this.Message=e.Message}}class Da extends ta{constructor(e){super({name:"OpsItemAccessDeniedException",$fault:"client",...e}),this.name="OpsItemAccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,Da.prototype),this.Message=e.Message}}class Fa extends ta{constructor(e){super({name:"OpsItemAlreadyExistsException",$fault:"client",...e}),this.name="OpsItemAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Fa.prototype),this.Message=e.Message,this.OpsItemId=e.OpsItemId}}class ka extends ta{constructor(e){super({name:"OpsMetadataAlreadyExistsException",$fault:"client",...e}),this.name="OpsMetadataAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,ka.prototype)}}class La extends ta{constructor(e){super({name:"OpsMetadataInvalidArgumentException",$fault:"client",...e}),this.name="OpsMetadataInvalidArgumentException",this.$fault="client",Object.setPrototypeOf(this,La.prototype)}}class ja extends ta{constructor(e){super({name:"OpsMetadataLimitExceededException",$fault:"client",...e}),this.name="OpsMetadataLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,ja.prototype)}}class za extends ta{constructor(e){super({name:"OpsMetadataTooManyUpdatesException",$fault:"client",...e}),this.name="OpsMetadataTooManyUpdatesException",this.$fault="client",Object.setPrototypeOf(this,za.prototype)}}class Ua extends ta{constructor(e){super({name:"ResourceDataSyncAlreadyExistsException",$fault:"client",...e}),this.name="ResourceDataSyncAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Ua.prototype),this.SyncName=e.SyncName}}class Ba extends ta{constructor(e){super({name:"ResourceDataSyncCountExceededException",$fault:"client",...e}),this.name="ResourceDataSyncCountExceededException",this.$fault="client",Object.setPrototypeOf(this,Ba.prototype),this.Message=e.Message}}class qa extends ta{constructor(e){super({name:"ResourceDataSyncInvalidConfigurationException",$fault:"client",...e}),this.name="ResourceDataSyncInvalidConfigurationException",this.$fault="client",Object.setPrototypeOf(this,qa.prototype),this.Message=e.Message}}class Va extends ta{constructor(e){super({name:"InvalidActivation",$fault:"client",...e}),this.name="InvalidActivation",this.$fault="client",Object.setPrototypeOf(this,Va.prototype),this.Message=e.Message}}class Ha extends ta{constructor(e){super({name:"InvalidActivationId",$fault:"client",...e}),this.name="InvalidActivationId",this.$fault="client",Object.setPrototypeOf(this,Ha.prototype),this.Message=e.Message}}class Wa extends ta{constructor(e){super({name:"AssociationDoesNotExist",$fault:"client",...e}),this.name="AssociationDoesNotExist",this.$fault="client",Object.setPrototypeOf(this,Wa.prototype),this.Message=e.Message}}class Ga extends ta{constructor(e){super({name:"AssociatedInstances",$fault:"client",...e}),this.name="AssociatedInstances",this.$fault="client",Object.setPrototypeOf(this,Ga.prototype)}}class Ka extends ta{constructor(e){super({name:"InvalidDocumentOperation",$fault:"client",...e}),this.name="InvalidDocumentOperation",this.$fault="client",Object.setPrototypeOf(this,Ka.prototype),this.Message=e.Message}}class Qa extends ta{constructor(e){super({name:"InvalidDeleteInventoryParametersException",$fault:"client",...e}),this.name="InvalidDeleteInventoryParametersException",this.$fault="client",Object.setPrototypeOf(this,Qa.prototype),this.Message=e.Message}}class Za extends ta{constructor(e){super({name:"InvalidInventoryRequestException",$fault:"client",...e}),this.name="InvalidInventoryRequestException",this.$fault="client",Object.setPrototypeOf(this,Za.prototype),this.Message=e.Message}}class Ya extends ta{constructor(e){super({name:"InvalidOptionException",$fault:"client",...e}),this.name="InvalidOptionException",this.$fault="client",Object.setPrototypeOf(this,Ya.prototype),this.Message=e.Message}}class Ja extends ta{constructor(e){super({name:"InvalidTypeNameException",$fault:"client",...e}),this.name="InvalidTypeNameException",this.$fault="client",Object.setPrototypeOf(this,Ja.prototype),this.Message=e.Message}}class Xa extends ta{constructor(e){super({name:"OpsMetadataNotFoundException",$fault:"client",...e}),this.name="OpsMetadataNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Xa.prototype)}}class er extends ta{constructor(e){super({name:"ParameterNotFound",$fault:"client",...e}),this.name="ParameterNotFound",this.$fault="client",Object.setPrototypeOf(this,er.prototype)}}class tr extends ta{constructor(e){super({name:"ResourceInUseException",$fault:"client",...e}),this.name="ResourceInUseException",this.$fault="client",Object.setPrototypeOf(this,tr.prototype),this.Message=e.Message}}class nr extends ta{constructor(e){super({name:"ResourceDataSyncNotFoundException",$fault:"client",...e}),this.name="ResourceDataSyncNotFoundException",this.$fault="client",Object.setPrototypeOf(this,nr.prototype),this.SyncName=e.SyncName,this.SyncType=e.SyncType,this.Message=e.Message}}class sr extends ta{constructor(e){super({name:"MalformedResourcePolicyDocumentException",$fault:"client",...e}),this.name="MalformedResourcePolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,sr.prototype),this.Message=e.Message}}class ar extends ta{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ar.prototype),this.Message=e.Message}}class rr extends ta{constructor(e){super({name:"ResourcePolicyConflictException",$fault:"client",...e}),this.name="ResourcePolicyConflictException",this.$fault="client",Object.setPrototypeOf(this,rr.prototype),this.Message=e.Message}}class or extends ta{constructor(e){super({name:"ResourcePolicyInvalidParameterException",$fault:"client",...e}),this.name="ResourcePolicyInvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,or.prototype),this.ParameterNames=e.ParameterNames,this.Message=e.Message}}class ir extends ta{constructor(e){super({name:"ResourcePolicyNotFoundException",$fault:"client",...e}),this.name="ResourcePolicyNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ir.prototype),this.Message=e.Message}}class cr extends ta{constructor(e){super({name:"TargetInUseException",$fault:"client",...e}),this.name="TargetInUseException",this.$fault="client",Object.setPrototypeOf(this,cr.prototype),this.Message=e.Message}}class ur extends ta{constructor(e){super({name:"InvalidFilter",$fault:"client",...e}),this.name="InvalidFilter",this.$fault="client",Object.setPrototypeOf(this,ur.prototype),this.Message=e.Message}}class dr extends ta{constructor(e){super({name:"InvalidNextToken",$fault:"client",...e}),this.name="InvalidNextToken",this.$fault="client",Object.setPrototypeOf(this,dr.prototype),this.Message=e.Message}}class lr extends ta{constructor(e){super({name:"InvalidAssociationVersion",$fault:"client",...e}),this.name="InvalidAssociationVersion",this.$fault="client",Object.setPrototypeOf(this,lr.prototype),this.Message=e.Message}}class pr extends ta{constructor(e){super({name:"AssociationExecutionDoesNotExist",$fault:"client",...e}),this.name="AssociationExecutionDoesNotExist",this.$fault="client",Object.setPrototypeOf(this,pr.prototype),this.Message=e.Message}}class mr extends ta{constructor(e){super({name:"InvalidFilterKey",$fault:"client",...e}),this.name="InvalidFilterKey",this.$fault="client",Object.setPrototypeOf(this,mr.prototype)}}class hr extends ta{constructor(e){super({name:"InvalidFilterValue",$fault:"client",...e}),this.name="InvalidFilterValue",this.$fault="client",Object.setPrototypeOf(this,hr.prototype),this.Message=e.Message}}class fr extends ta{constructor(e){super({name:"AutomationExecutionNotFoundException",$fault:"client",...e}),this.name="AutomationExecutionNotFoundException",this.$fault="client",Object.setPrototypeOf(this,fr.prototype),this.Message=e.Message}}class yr extends ta{constructor(e){super({name:"InvalidPermissionType",$fault:"client",...e}),this.name="InvalidPermissionType",this.$fault="client",Object.setPrototypeOf(this,yr.prototype),this.Message=e.Message}}class gr extends ta{constructor(e){super({name:"UnsupportedOperatingSystem",$fault:"client",...e}),this.name="UnsupportedOperatingSystem",this.$fault="client",Object.setPrototypeOf(this,gr.prototype),this.Message=e.Message}}class wr extends ta{constructor(e){super({name:"InvalidInstanceInformationFilterValue",$fault:"client",...e}),this.name="InvalidInstanceInformationFilterValue",this.$fault="client",Object.setPrototypeOf(this,wr.prototype)}}class br extends ta{constructor(e){super({name:"InvalidInstancePropertyFilterValue",$fault:"client",...e}),this.name="InvalidInstancePropertyFilterValue",this.$fault="client",Object.setPrototypeOf(this,br.prototype)}}class vr extends ta{constructor(e){super({name:"InvalidDeletionIdException",$fault:"client",...e}),this.name="InvalidDeletionIdException",this.$fault="client",Object.setPrototypeOf(this,vr.prototype),this.Message=e.Message}}class xr extends ta{constructor(e){super({name:"InvalidFilterOption",$fault:"client",...e}),this.name="InvalidFilterOption",this.$fault="client",Object.setPrototypeOf(this,xr.prototype)}}class Er extends ta{constructor(e){super({name:"OpsItemRelatedItemAssociationNotFoundException",$fault:"client",...e}),this.name="OpsItemRelatedItemAssociationNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Er.prototype),this.Message=e.Message}}class Sr extends ta{constructor(e){super({name:"InvalidDocumentType",$fault:"client",...e}),this.name="InvalidDocumentType",this.$fault="client",Object.setPrototypeOf(this,Sr.prototype),this.Message=e.Message}}class Or extends ta{constructor(e){super({name:"UnsupportedCalendarException",$fault:"client",...e}),this.name="UnsupportedCalendarException",this.$fault="client",Object.setPrototypeOf(this,Or.prototype),this.Message=e.Message}}class Pr extends ta{constructor(e){super({name:"InvalidPluginName",$fault:"client",...e}),this.name="InvalidPluginName",this.$fault="client",Object.setPrototypeOf(this,Pr.prototype)}}class $r extends ta{constructor(e){super({name:"InvocationDoesNotExist",$fault:"client",...e}),this.name="InvocationDoesNotExist",this.$fault="client",Object.setPrototypeOf(this,$r.prototype)}}class Mr extends ta{constructor(e){super({name:"UnsupportedFeatureRequiredException",$fault:"client",...e}),this.name="UnsupportedFeatureRequiredException",this.$fault="client",Object.setPrototypeOf(this,Mr.prototype),this.Message=e.Message}}class Ir extends ta{constructor(e){super({name:"InvalidAggregatorException",$fault:"client",...e}),this.name="InvalidAggregatorException",this.$fault="client",Object.setPrototypeOf(this,Ir.prototype),this.Message=e.Message}}class Ar extends ta{constructor(e){super({name:"InvalidInventoryGroupException",$fault:"client",...e}),this.name="InvalidInventoryGroupException",this.$fault="client",Object.setPrototypeOf(this,Ar.prototype),this.Message=e.Message}}class Rr extends ta{constructor(e){super({name:"InvalidResultAttributeException",$fault:"client",...e}),this.name="InvalidResultAttributeException",this.$fault="client",Object.setPrototypeOf(this,Rr.prototype),this.Message=e.Message}}class Tr extends ta{constructor(e){super({name:"InvalidKeyId",$fault:"client",...e}),this.name="InvalidKeyId",this.$fault="client",Object.setPrototypeOf(this,Tr.prototype)}}class Cr extends ta{constructor(e){super({name:"ParameterVersionNotFound",$fault:"client",...e}),this.name="ParameterVersionNotFound",this.$fault="client",Object.setPrototypeOf(this,Cr.prototype)}}class Nr extends ta{constructor(e){super({name:"ServiceSettingNotFound",$fault:"client",...e}),this.name="ServiceSettingNotFound",this.$fault="client",Object.setPrototypeOf(this,Nr.prototype),this.Message=e.Message}}class _r extends ta{constructor(e){super({name:"ParameterVersionLabelLimitExceeded",$fault:"client",...e}),this.name="ParameterVersionLabelLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,_r.prototype)}}class Dr extends ta{constructor(e){super({name:"DocumentPermissionLimit",$fault:"client",...e}),this.name="DocumentPermissionLimit",this.$fault="client",Object.setPrototypeOf(this,Dr.prototype),this.Message=e.Message}}class Fr extends ta{constructor(e){super({name:"ComplianceTypeCountLimitExceededException",$fault:"client",...e}),this.name="ComplianceTypeCountLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Fr.prototype),this.Message=e.Message}}class kr extends ta{constructor(e){super({name:"InvalidItemContentException",$fault:"client",...e}),this.name="InvalidItemContentException",this.$fault="client",Object.setPrototypeOf(this,kr.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class Lr extends ta{constructor(e){super({name:"ItemSizeLimitExceededException",$fault:"client",...e}),this.name="ItemSizeLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Lr.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class jr extends ta{constructor(e){super({name:"TotalSizeLimitExceededException",$fault:"client",...e}),this.name="TotalSizeLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,jr.prototype),this.Message=e.Message}}class zr extends ta{constructor(e){super({name:"CustomSchemaCountLimitExceededException",$fault:"client",...e}),this.name="CustomSchemaCountLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,zr.prototype),this.Message=e.Message}}class Ur extends ta{constructor(e){super({name:"InvalidInventoryItemContextException",$fault:"client",...e}),this.name="InvalidInventoryItemContextException",this.$fault="client",Object.setPrototypeOf(this,Ur.prototype),this.Message=e.Message}}class Br extends ta{constructor(e){super({name:"ItemContentMismatchException",$fault:"client",...e}),this.name="ItemContentMismatchException",this.$fault="client",Object.setPrototypeOf(this,Br.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class qr extends ta{constructor(e){super({name:"SubTypeCountLimitExceededException",$fault:"client",...e}),this.name="SubTypeCountLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,qr.prototype),this.Message=e.Message}}class Vr extends ta{constructor(e){super({name:"UnsupportedInventoryItemContextException",$fault:"client",...e}),this.name="UnsupportedInventoryItemContextException",this.$fault="client",Object.setPrototypeOf(this,Vr.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class Hr extends ta{constructor(e){super({name:"UnsupportedInventorySchemaVersionException",$fault:"client",...e}),this.name="UnsupportedInventorySchemaVersionException",this.$fault="client",Object.setPrototypeOf(this,Hr.prototype),this.Message=e.Message}}class Wr extends ta{constructor(e){super({name:"HierarchyLevelLimitExceededException",$fault:"client",...e}),this.name="HierarchyLevelLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Wr.prototype)}}class Gr extends ta{constructor(e){super({name:"HierarchyTypeMismatchException",$fault:"client",...e}),this.name="HierarchyTypeMismatchException",this.$fault="client",Object.setPrototypeOf(this,Gr.prototype)}}class Kr extends ta{constructor(e){super({name:"IncompatiblePolicyException",$fault:"client",...e}),this.name="IncompatiblePolicyException",this.$fault="client",Object.setPrototypeOf(this,Kr.prototype)}}class Qr extends ta{constructor(e){super({name:"InvalidAllowedPatternException",$fault:"client",...e}),this.name="InvalidAllowedPatternException",this.$fault="client",Object.setPrototypeOf(this,Qr.prototype)}}class Zr extends ta{constructor(e){super({name:"InvalidPolicyAttributeException",$fault:"client",...e}),this.name="InvalidPolicyAttributeException",this.$fault="client",Object.setPrototypeOf(this,Zr.prototype)}}class Yr extends ta{constructor(e){super({name:"InvalidPolicyTypeException",$fault:"client",...e}),this.name="InvalidPolicyTypeException",this.$fault="client",Object.setPrototypeOf(this,Yr.prototype)}}class Jr extends ta{constructor(e){super({name:"ParameterAlreadyExists",$fault:"client",...e}),this.name="ParameterAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,Jr.prototype)}}class Xr extends ta{constructor(e){super({name:"ParameterLimitExceeded",$fault:"client",...e}),this.name="ParameterLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,Xr.prototype)}}class eo extends ta{constructor(e){super({name:"ParameterMaxVersionLimitExceeded",$fault:"client",...e}),this.name="ParameterMaxVersionLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,eo.prototype)}}class to extends ta{constructor(e){super({name:"ParameterPatternMismatchException",$fault:"client",...e}),this.name="ParameterPatternMismatchException",this.$fault="client",Object.setPrototypeOf(this,to.prototype)}}class no extends ta{constructor(e){super({name:"PoliciesLimitExceededException",$fault:"client",...e}),this.name="PoliciesLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,no.prototype)}}class so extends ta{constructor(e){super({name:"UnsupportedParameterType",$fault:"client",...e}),this.name="UnsupportedParameterType",this.$fault="client",Object.setPrototypeOf(this,so.prototype)}}class ao extends ta{constructor(e){super({name:"ResourcePolicyLimitExceededException",$fault:"client",...e}),this.name="ResourcePolicyLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,ao.prototype),this.Limit=e.Limit,this.LimitType=e.LimitType,this.Message=e.Message}}class ro extends ta{constructor(e){super({name:"FeatureNotAvailableException",$fault:"client",...e}),this.name="FeatureNotAvailableException",this.$fault="client",Object.setPrototypeOf(this,ro.prototype),this.Message=e.Message}}class oo extends ta{constructor(e){super({name:"AutomationStepNotFoundException",$fault:"client",...e}),this.name="AutomationStepNotFoundException",this.$fault="client",Object.setPrototypeOf(this,oo.prototype),this.Message=e.Message}}class io extends ta{constructor(e){super({name:"InvalidAutomationSignalException",$fault:"client",...e}),this.name="InvalidAutomationSignalException",this.$fault="client",Object.setPrototypeOf(this,io.prototype),this.Message=e.Message}}class co extends ta{constructor(e){super({name:"InvalidNotificationConfig",$fault:"client",...e}),this.name="InvalidNotificationConfig",this.$fault="client",Object.setPrototypeOf(this,co.prototype),this.Message=e.Message}}class uo extends ta{constructor(e){super({name:"InvalidOutputFolder",$fault:"client",...e}),this.name="InvalidOutputFolder",this.$fault="client",Object.setPrototypeOf(this,uo.prototype)}}class lo extends ta{constructor(e){super({name:"InvalidRole",$fault:"client",...e}),this.name="InvalidRole",this.$fault="client",Object.setPrototypeOf(this,lo.prototype),this.Message=e.Message}}class po extends ta{constructor(e){super({name:"InvalidAssociation",$fault:"client",...e}),this.name="InvalidAssociation",this.$fault="client",Object.setPrototypeOf(this,po.prototype),this.Message=e.Message}}class mo extends ta{constructor(e){super({name:"AutomationDefinitionNotFoundException",$fault:"client",...e}),this.name="AutomationDefinitionNotFoundException",this.$fault="client",Object.setPrototypeOf(this,mo.prototype),this.Message=e.Message}}class ho extends ta{constructor(e){super({name:"AutomationDefinitionVersionNotFoundException",$fault:"client",...e}),this.name="AutomationDefinitionVersionNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ho.prototype),this.Message=e.Message}}class fo extends ta{constructor(e){super({name:"AutomationExecutionLimitExceededException",$fault:"client",...e}),this.name="AutomationExecutionLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,fo.prototype),this.Message=e.Message}}class yo extends ta{constructor(e){super({name:"InvalidAutomationExecutionParametersException",$fault:"client",...e}),this.name="InvalidAutomationExecutionParametersException",this.$fault="client",Object.setPrototypeOf(this,yo.prototype),this.Message=e.Message}}const go=e=>({...e,...e.Value&&{Value:"***SensitiveInformation***"}}),wo=e=>({...e,...e.Parameter&&{Parameter:go(e.Parameter)}}),bo=e=>({...e,...e.Parameters&&{Parameters:e.Parameters.map((e=>go(e)))}});class vo extends ta{constructor(e){super({name:"AutomationDefinitionNotApprovedException",$fault:"client",...e}),this.name="AutomationDefinitionNotApprovedException",this.$fault="client",Object.setPrototypeOf(this,vo.prototype),this.Message=e.Message}}class xo extends ta{constructor(e){super({name:"TargetNotConnected",$fault:"client",...e}),this.name="TargetNotConnected",this.$fault="client",Object.setPrototypeOf(this,xo.prototype),this.Message=e.Message}}class Eo extends ta{constructor(e){super({name:"InvalidAutomationStatusUpdateException",$fault:"client",...e}),this.name="InvalidAutomationStatusUpdateException",this.$fault="client",Object.setPrototypeOf(this,Eo.prototype),this.Message=e.Message}}class So extends ta{constructor(e){super({name:"AssociationVersionLimitExceeded",$fault:"client",...e}),this.name="AssociationVersionLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,So.prototype),this.Message=e.Message}}class Oo extends ta{constructor(e){super({name:"InvalidUpdate",$fault:"client",...e}),this.name="InvalidUpdate",this.$fault="client",Object.setPrototypeOf(this,Oo.prototype),this.Message=e.Message}}class Po extends ta{constructor(e){super({name:"StatusUnchanged",$fault:"client",...e}),this.name="StatusUnchanged",this.$fault="client",Object.setPrototypeOf(this,Po.prototype)}}class $o extends ta{constructor(e){super({name:"DocumentVersionLimitExceeded",$fault:"client",...e}),this.name="DocumentVersionLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,$o.prototype),this.Message=e.Message}}class Mo extends ta{constructor(e){super({name:"DuplicateDocumentContent",$fault:"client",...e}),this.name="DuplicateDocumentContent",this.$fault="client",Object.setPrototypeOf(this,Mo.prototype),this.Message=e.Message}}class Io extends ta{constructor(e){super({name:"DuplicateDocumentVersionName",$fault:"client",...e}),this.name="DuplicateDocumentVersionName",this.$fault="client",Object.setPrototypeOf(this,Io.prototype),this.Message=e.Message}}class Ao extends ta{constructor(e){super({name:"OpsMetadataKeyLimitExceededException",$fault:"client",...e}),this.name="OpsMetadataKeyLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Ao.prototype)}}class Ro extends ta{constructor(e){super({name:"ResourceDataSyncConflictException",$fault:"client",...e}),this.name="ResourceDataSyncConflictException",this.$fault="client",Object.setPrototypeOf(this,Ro.prototype),this.Message=e.Message}}const To=async(e,t)=>{const n=fu("GetParameter");let s;return s=JSON.stringify(Ft(e)),hu(t,n,"/",void 0,s)},Co=async(e,t)=>{const n=fu("GetParameters");let s;return s=JSON.stringify(Ft(e)),hu(t,n,"/",void 0,s)},No=async(e,t)=>{if(e.statusCode>=300)return Do(e,t);const n=await Lt(e.body,t);let s={};s=iu(n);return{$metadata:lu(e),...s}},_o=async(e,t)=>{if(e.statusCode>=300)return Do(e,t);const n=await Lt(e.body,t);let s={};s=cu(n);return{$metadata:lu(e),...s}},Do=async(e,t)=>{const n={...e,body:await jt(e.body,t)},s=((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},s=(a=e.headers,r="x-amzn-errortype",Object.keys(a).find((e=>e.toLowerCase()===r.toLowerCase())));var a,r;return void 0!==s?n(e.headers[s]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):void 0})(e,n.body);switch(s){case"InternalServerError":case"com.amazonaws.ssm#InternalServerError":throw await di(n);case"InvalidResourceId":case"com.amazonaws.ssm#InvalidResourceId":throw await Yi(n);case"InvalidResourceType":case"com.amazonaws.ssm#InvalidResourceType":throw await Ji(n);case"TooManyTagsError":case"com.amazonaws.ssm#TooManyTagsError":throw await Yc(n);case"TooManyUpdates":case"com.amazonaws.ssm#TooManyUpdates":throw await Jc(n);case"OpsItemConflictException":case"com.amazonaws.ssm#OpsItemConflictException":throw await hc(n);case"OpsItemInvalidParameterException":case"com.amazonaws.ssm#OpsItemInvalidParameterException":throw await fc(n);case"OpsItemLimitExceededException":case"com.amazonaws.ssm#OpsItemLimitExceededException":throw await yc(n);case"OpsItemNotFoundException":case"com.amazonaws.ssm#OpsItemNotFoundException":throw await gc(n);case"OpsItemRelatedItemAlreadyExistsException":case"com.amazonaws.ssm#OpsItemRelatedItemAlreadyExistsException":throw await wc(n);case"DuplicateInstanceId":case"com.amazonaws.ssm#DuplicateInstanceId":throw await ai(n);case"InvalidCommandId":case"com.amazonaws.ssm#InvalidCommandId":throw await vi(n);case"InvalidInstanceId":case"com.amazonaws.ssm#InvalidInstanceId":throw await Ni(n);case"DoesNotExistException":case"com.amazonaws.ssm#DoesNotExistException":throw await ti(n);case"InvalidParameters":case"com.amazonaws.ssm#InvalidParameters":throw await Wi(n);case"AssociationAlreadyExists":case"com.amazonaws.ssm#AssociationAlreadyExists":throw await Lo(n);case"AssociationLimitExceeded":case"com.amazonaws.ssm#AssociationLimitExceeded":throw await Uo(n);case"InvalidDocument":case"com.amazonaws.ssm#InvalidDocument":throw await Si(n);case"InvalidDocumentVersion":case"com.amazonaws.ssm#InvalidDocumentVersion":throw await Ii(n);case"InvalidOutputLocation":case"com.amazonaws.ssm#InvalidOutputLocation":throw await Hi(n);case"InvalidSchedule":case"com.amazonaws.ssm#InvalidSchedule":throw await tc(n);case"InvalidTag":case"com.amazonaws.ssm#InvalidTag":throw await nc(n);case"InvalidTarget":case"com.amazonaws.ssm#InvalidTarget":throw await sc(n);case"InvalidTargetMaps":case"com.amazonaws.ssm#InvalidTargetMaps":throw await ac(n);case"UnsupportedPlatformType":case"com.amazonaws.ssm#UnsupportedPlatformType":throw await ou(n);case"DocumentAlreadyExists":case"com.amazonaws.ssm#DocumentAlreadyExists":throw await Yo(n);case"DocumentLimitExceeded":case"com.amazonaws.ssm#DocumentLimitExceeded":throw await Jo(n);case"InvalidDocumentContent":case"com.amazonaws.ssm#InvalidDocumentContent":throw await Oi(n);case"InvalidDocumentSchemaVersion":case"com.amazonaws.ssm#InvalidDocumentSchemaVersion":throw await $i(n);case"MaxDocumentSizeExceeded":case"com.amazonaws.ssm#MaxDocumentSizeExceeded":throw await lc(n);case"IdempotentParameterMismatch":case"com.amazonaws.ssm#IdempotentParameterMismatch":throw await ci(n);case"ResourceLimitExceededException":case"com.amazonaws.ssm#ResourceLimitExceededException":throw await zc(n);case"OpsItemAccessDeniedException":case"com.amazonaws.ssm#OpsItemAccessDeniedException":throw await pc(n);case"OpsItemAlreadyExistsException":case"com.amazonaws.ssm#OpsItemAlreadyExistsException":throw await mc(n);case"OpsMetadataAlreadyExistsException":case"com.amazonaws.ssm#OpsMetadataAlreadyExistsException":throw await vc(n);case"OpsMetadataInvalidArgumentException":case"com.amazonaws.ssm#OpsMetadataInvalidArgumentException":throw await xc(n);case"OpsMetadataLimitExceededException":case"com.amazonaws.ssm#OpsMetadataLimitExceededException":throw await Sc(n);case"OpsMetadataTooManyUpdatesException":case"com.amazonaws.ssm#OpsMetadataTooManyUpdatesException":throw await Pc(n);case"ResourceDataSyncAlreadyExistsException":case"com.amazonaws.ssm#ResourceDataSyncAlreadyExistsException":throw await _c(n);case"ResourceDataSyncCountExceededException":case"com.amazonaws.ssm#ResourceDataSyncCountExceededException":throw await Fc(n);case"ResourceDataSyncInvalidConfigurationException":case"com.amazonaws.ssm#ResourceDataSyncInvalidConfigurationException":throw await kc(n);case"InvalidActivation":case"com.amazonaws.ssm#InvalidActivation":throw await li(n);case"InvalidActivationId":case"com.amazonaws.ssm#InvalidActivationId":throw await pi(n);case"AssociationDoesNotExist":case"com.amazonaws.ssm#AssociationDoesNotExist":throw await jo(n);case"AssociatedInstances":case"com.amazonaws.ssm#AssociatedInstances":throw await ko(n);case"InvalidDocumentOperation":case"com.amazonaws.ssm#InvalidDocumentOperation":throw await Pi(n);case"InvalidDeleteInventoryParametersException":case"com.amazonaws.ssm#InvalidDeleteInventoryParametersException":throw await xi(n);case"InvalidInventoryRequestException":case"com.amazonaws.ssm#InvalidInventoryRequestException":throw await Li(n);case"InvalidOptionException":case"com.amazonaws.ssm#InvalidOptionException":throw await qi(n);case"InvalidTypeNameException":case"com.amazonaws.ssm#InvalidTypeNameException":throw await rc(n);case"OpsMetadataNotFoundException":case"com.amazonaws.ssm#OpsMetadataNotFoundException":throw await Oc(n);case"ParameterNotFound":case"com.amazonaws.ssm#ParameterNotFound":throw await Ac(n);case"ResourceInUseException":case"com.amazonaws.ssm#ResourceInUseException":throw await jc(n);case"ResourceDataSyncNotFoundException":case"com.amazonaws.ssm#ResourceDataSyncNotFoundException":throw await Lc(n);case"MalformedResourcePolicyDocumentException":case"com.amazonaws.ssm#MalformedResourcePolicyDocumentException":throw await dc(n);case"ResourceNotFoundException":case"com.amazonaws.ssm#ResourceNotFoundException":throw await Uc(n);case"ResourcePolicyConflictException":case"com.amazonaws.ssm#ResourcePolicyConflictException":throw await Bc(n);case"ResourcePolicyInvalidParameterException":case"com.amazonaws.ssm#ResourcePolicyInvalidParameterException":throw await qc(n);case"ResourcePolicyNotFoundException":case"com.amazonaws.ssm#ResourcePolicyNotFoundException":throw await Hc(n);case"TargetInUseException":case"com.amazonaws.ssm#TargetInUseException":throw await Qc(n);case"InvalidFilter":case"com.amazonaws.ssm#InvalidFilter":throw await Ai(n);case"InvalidNextToken":case"com.amazonaws.ssm#InvalidNextToken":throw await Ui(n);case"InvalidAssociationVersion":case"com.amazonaws.ssm#InvalidAssociationVersion":throw await yi(n);case"AssociationExecutionDoesNotExist":case"com.amazonaws.ssm#AssociationExecutionDoesNotExist":throw await zo(n);case"InvalidFilterKey":case"com.amazonaws.ssm#InvalidFilterKey":throw await Ri(n);case"InvalidFilterValue":case"com.amazonaws.ssm#InvalidFilterValue":throw await Ci(n);case"AutomationExecutionNotFoundException":case"com.amazonaws.ssm#AutomationExecutionNotFoundException":throw await Go(n);case"InvalidPermissionType":case"com.amazonaws.ssm#InvalidPermissionType":throw await Gi(n);case"UnsupportedOperatingSystem":case"com.amazonaws.ssm#UnsupportedOperatingSystem":throw await au(n);case"InvalidInstanceInformationFilterValue":case"com.amazonaws.ssm#InvalidInstanceInformationFilterValue":throw await _i(n);case"InvalidInstancePropertyFilterValue":case"com.amazonaws.ssm#InvalidInstancePropertyFilterValue":throw await Di(n);case"InvalidDeletionIdException":case"com.amazonaws.ssm#InvalidDeletionIdException":throw await Ei(n);case"InvalidFilterOption":case"com.amazonaws.ssm#InvalidFilterOption":throw await Ti(n);case"OpsItemRelatedItemAssociationNotFoundException":case"com.amazonaws.ssm#OpsItemRelatedItemAssociationNotFoundException":throw await bc(n);case"InvalidDocumentType":case"com.amazonaws.ssm#InvalidDocumentType":throw await Mi(n);case"UnsupportedCalendarException":case"com.amazonaws.ssm#UnsupportedCalendarException":throw await eu(n);case"InvalidPluginName":case"com.amazonaws.ssm#InvalidPluginName":throw await Ki(n);case"InvocationDoesNotExist":case"com.amazonaws.ssm#InvocationDoesNotExist":throw await ic(n);case"UnsupportedFeatureRequiredException":case"com.amazonaws.ssm#UnsupportedFeatureRequiredException":throw await tu(n);case"InvalidAggregatorException":case"com.amazonaws.ssm#InvalidAggregatorException":throw await mi(n);case"InvalidInventoryGroupException":case"com.amazonaws.ssm#InvalidInventoryGroupException":throw await Fi(n);case"InvalidResultAttributeException":case"com.amazonaws.ssm#InvalidResultAttributeException":throw await Xi(n);case"InvalidKeyId":case"com.amazonaws.ssm#InvalidKeyId":throw await zi(n);case"ParameterVersionNotFound":case"com.amazonaws.ssm#ParameterVersionNotFound":throw await Cc(n);case"ServiceSettingNotFound":case"com.amazonaws.ssm#ServiceSettingNotFound":throw await Wc(n);case"ParameterVersionLabelLimitExceeded":case"com.amazonaws.ssm#ParameterVersionLabelLimitExceeded":throw await Tc(n);case"DocumentPermissionLimit":case"com.amazonaws.ssm#DocumentPermissionLimit":throw await Xo(n);case"ComplianceTypeCountLimitExceededException":case"com.amazonaws.ssm#ComplianceTypeCountLimitExceededException":throw await Qo(n);case"InvalidItemContentException":case"com.amazonaws.ssm#InvalidItemContentException":throw await ji(n);case"ItemSizeLimitExceededException":case"com.amazonaws.ssm#ItemSizeLimitExceededException":throw await uc(n);case"TotalSizeLimitExceededException":case"com.amazonaws.ssm#TotalSizeLimitExceededException":throw await Xc(n);case"CustomSchemaCountLimitExceededException":case"com.amazonaws.ssm#CustomSchemaCountLimitExceededException":throw await Zo(n);case"InvalidInventoryItemContextException":case"com.amazonaws.ssm#InvalidInventoryItemContextException":throw await ki(n);case"ItemContentMismatchException":case"com.amazonaws.ssm#ItemContentMismatchException":throw await cc(n);case"SubTypeCountLimitExceededException":case"com.amazonaws.ssm#SubTypeCountLimitExceededException":throw await Kc(n);case"UnsupportedInventoryItemContextException":case"com.amazonaws.ssm#UnsupportedInventoryItemContextException":throw await nu(n);case"UnsupportedInventorySchemaVersionException":case"com.amazonaws.ssm#UnsupportedInventorySchemaVersionException":throw await su(n);case"HierarchyLevelLimitExceededException":case"com.amazonaws.ssm#HierarchyLevelLimitExceededException":throw await oi(n);case"HierarchyTypeMismatchException":case"com.amazonaws.ssm#HierarchyTypeMismatchException":throw await ii(n);case"IncompatiblePolicyException":case"com.amazonaws.ssm#IncompatiblePolicyException":throw await ui(n);case"InvalidAllowedPatternException":case"com.amazonaws.ssm#InvalidAllowedPatternException":throw await hi(n);case"InvalidPolicyAttributeException":case"com.amazonaws.ssm#InvalidPolicyAttributeException":throw await Qi(n);case"InvalidPolicyTypeException":case"com.amazonaws.ssm#InvalidPolicyTypeException":throw await Zi(n);case"ParameterAlreadyExists":case"com.amazonaws.ssm#ParameterAlreadyExists":throw await $c(n);case"ParameterLimitExceeded":case"com.amazonaws.ssm#ParameterLimitExceeded":throw await Mc(n);case"ParameterMaxVersionLimitExceeded":case"com.amazonaws.ssm#ParameterMaxVersionLimitExceeded":throw await Ic(n);case"ParameterPatternMismatchException":case"com.amazonaws.ssm#ParameterPatternMismatchException":throw await Rc(n);case"PoliciesLimitExceededException":case"com.amazonaws.ssm#PoliciesLimitExceededException":throw await Nc(n);case"UnsupportedParameterType":case"com.amazonaws.ssm#UnsupportedParameterType":throw await ru(n);case"ResourcePolicyLimitExceededException":case"com.amazonaws.ssm#ResourcePolicyLimitExceededException":throw await Vc(n);case"AlreadyExistsException":case"com.amazonaws.ssm#AlreadyExistsException":throw await Fo(n);case"FeatureNotAvailableException":case"com.amazonaws.ssm#FeatureNotAvailableException":throw await ri(n);case"AutomationStepNotFoundException":case"com.amazonaws.ssm#AutomationStepNotFoundException":throw await Ko(n);case"InvalidAutomationSignalException":case"com.amazonaws.ssm#InvalidAutomationSignalException":throw await wi(n);case"InvalidNotificationConfig":case"com.amazonaws.ssm#InvalidNotificationConfig":throw await Bi(n);case"InvalidOutputFolder":case"com.amazonaws.ssm#InvalidOutputFolder":throw await Vi(n);case"InvalidRole":case"com.amazonaws.ssm#InvalidRole":throw await ec(n);case"InvalidAssociation":case"com.amazonaws.ssm#InvalidAssociation":throw await fi(n);case"AutomationDefinitionNotFoundException":case"com.amazonaws.ssm#AutomationDefinitionNotFoundException":throw await Vo(n);case"AutomationDefinitionVersionNotFoundException":case"com.amazonaws.ssm#AutomationDefinitionVersionNotFoundException":throw await Ho(n);case"AutomationExecutionLimitExceededException":case"com.amazonaws.ssm#AutomationExecutionLimitExceededException":throw await Wo(n);case"InvalidAutomationExecutionParametersException":case"com.amazonaws.ssm#InvalidAutomationExecutionParametersException":throw await gi(n);case"AutomationDefinitionNotApprovedException":case"com.amazonaws.ssm#AutomationDefinitionNotApprovedException":throw await qo(n);case"TargetNotConnected":case"com.amazonaws.ssm#TargetNotConnected":throw await Zc(n);case"InvalidAutomationStatusUpdateException":case"com.amazonaws.ssm#InvalidAutomationStatusUpdateException":throw await bi(n);case"AssociationVersionLimitExceeded":case"com.amazonaws.ssm#AssociationVersionLimitExceeded":throw await Bo(n);case"InvalidUpdate":case"com.amazonaws.ssm#InvalidUpdate":throw await oc(n);case"StatusUnchanged":case"com.amazonaws.ssm#StatusUnchanged":throw await Gc(n);case"DocumentVersionLimitExceeded":case"com.amazonaws.ssm#DocumentVersionLimitExceeded":throw await ei(n);case"DuplicateDocumentContent":case"com.amazonaws.ssm#DuplicateDocumentContent":throw await ni(n);case"DuplicateDocumentVersionName":case"com.amazonaws.ssm#DuplicateDocumentVersionName":throw await si(n);case"OpsMetadataKeyLimitExceededException":case"com.amazonaws.ssm#OpsMetadataKeyLimitExceededException":throw await Ec(n);case"ResourceDataSyncConflictException":case"com.amazonaws.ssm#ResourceDataSyncConflictException":throw await Dc(n);default:const t=n.body;return pu({output:e,parsedBody:t,errorCode:s})}},Fo=async(e,t)=>{const n=e.body,s=Ft(n),a=new ia({$metadata:lu(e),...s});return Et(a,n)},ko=async(e,t)=>{const n=e.body,s=Ft(n),a=new Ga({$metadata:lu(e),...s});return Et(a,n)},Lo=async(e,t)=>{const n=e.body,s=Ft(n),a=new wa({$metadata:lu(e),...s});return Et(a,n)},jo=async(e,t)=>{const n=e.body,s=Ft(n),a=new Wa({$metadata:lu(e),...s});return Et(a,n)},zo=async(e,t)=>{const n=e.body,s=Ft(n),a=new pr({$metadata:lu(e),...s});return Et(a,n)},Uo=async(e,t)=>{const n=e.body,s=Ft(n),a=new ba({$metadata:lu(e),...s});return Et(a,n)},Bo=async(e,t)=>{const n=e.body,s=Ft(n),a=new So({$metadata:lu(e),...s});return Et(a,n)},qo=async(e,t)=>{const n=e.body,s=Ft(n),a=new vo({$metadata:lu(e),...s});return Et(a,n)},Vo=async(e,t)=>{const n=e.body,s=Ft(n),a=new mo({$metadata:lu(e),...s});return Et(a,n)},Ho=async(e,t)=>{const n=e.body,s=Ft(n),a=new ho({$metadata:lu(e),...s});return Et(a,n)},Wo=async(e,t)=>{const n=e.body,s=Ft(n),a=new fo({$metadata:lu(e),...s});return Et(a,n)},Go=async(e,t)=>{const n=e.body,s=Ft(n),a=new fr({$metadata:lu(e),...s});return Et(a,n)},Ko=async(e,t)=>{const n=e.body,s=Ft(n),a=new oo({$metadata:lu(e),...s});return Et(a,n)},Qo=async(e,t)=>{const n=e.body,s=Ft(n),a=new Fr({$metadata:lu(e),...s});return Et(a,n)},Zo=async(e,t)=>{const n=e.body,s=Ft(n),a=new zr({$metadata:lu(e),...s});return Et(a,n)},Yo=async(e,t)=>{const n=e.body,s=Ft(n),a=new Ia({$metadata:lu(e),...s});return Et(a,n)},Jo=async(e,t)=>{const n=e.body,s=Ft(n),a=new Aa({$metadata:lu(e),...s});return Et(a,n)},Xo=async(e,t)=>{const n=e.body,s=Ft(n),a=new Dr({$metadata:lu(e),...s});return Et(a,n)},ei=async(e,t)=>{const n=e.body,s=Ft(n),a=new $o({$metadata:lu(e),...s});return Et(a,n)},ti=async(e,t)=>{const n=e.body,s=Ft(n),a=new ya({$metadata:lu(e),...s});return Et(a,n)},ni=async(e,t)=>{const n=e.body,s=Ft(n),a=new Mo({$metadata:lu(e),...s});return Et(a,n)},si=async(e,t)=>{const n=e.body,s=Ft(n),a=new Io({$metadata:lu(e),...s});return Et(a,n)},ai=async(e,t)=>{const n=e.body,s=Ft(n),a=new ma({$metadata:lu(e),...s});return Et(a,n)},ri=async(e,t)=>{const n=e.body,s=Ft(n),a=new ro({$metadata:lu(e),...s});return Et(a,n)},oi=async(e,t)=>{const n=e.body,s=Ft(n),a=new Wr({$metadata:lu(e),...s});return Et(a,n)},ii=async(e,t)=>{const n=e.body,s=Ft(n),a=new Gr({$metadata:lu(e),...s});return Et(a,n)},ci=async(e,t)=>{const n=e.body,s=Ft(n),a=new Na({$metadata:lu(e),...s});return Et(a,n)},ui=async(e,t)=>{const n=e.body,s=Ft(n),a=new Kr({$metadata:lu(e),...s});return Et(a,n)},di=async(e,t)=>{const n=e.body,s=Ft(n),a=new na({$metadata:lu(e),...s});return Et(a,n)},li=async(e,t)=>{const n=e.body,s=Ft(n),a=new Va({$metadata:lu(e),...s});return Et(a,n)},pi=async(e,t)=>{const n=e.body,s=Ft(n),a=new Ha({$metadata:lu(e),...s});return Et(a,n)},mi=async(e,t)=>{const n=e.body,s=Ft(n),a=new Ir({$metadata:lu(e),...s});return Et(a,n)},hi=async(e,t)=>{const n=e.body,s=Ft(n),a=new Qr({$metadata:lu(e),...s});return Et(a,n)},fi=async(e,t)=>{const n=e.body,s=Ft(n),a=new po({$metadata:lu(e),...s});return Et(a,n)},yi=async(e,t)=>{const n=e.body,s=Ft(n),a=new lr({$metadata:lu(e),...s});return Et(a,n)},gi=async(e,t)=>{const n=e.body,s=Ft(n),a=new yo({$metadata:lu(e),...s});return Et(a,n)},wi=async(e,t)=>{const n=e.body,s=Ft(n),a=new io({$metadata:lu(e),...s});return Et(a,n)},bi=async(e,t)=>{const n=e.body,s=Ft(n),a=new Eo({$metadata:lu(e),...s});return Et(a,n)},vi=async(e,t)=>{const n=e.body,s=Ft(n),a=new ha({$metadata:lu(e),...s});return Et(a,n)},xi=async(e,t)=>{const n=e.body,s=Ft(n),a=new Qa({$metadata:lu(e),...s});return Et(a,n)},Ei=async(e,t)=>{const n=e.body,s=Ft(n),a=new vr({$metadata:lu(e),...s});return Et(a,n)},Si=async(e,t)=>{const n=e.body,s=Ft(n),a=new va({$metadata:lu(e),...s});return Et(a,n)},Oi=async(e,t)=>{const n=e.body,s=Ft(n),a=new Ra({$metadata:lu(e),...s});return Et(a,n)},Pi=async(e,t)=>{const n=e.body,s=Ft(n),a=new Ka({$metadata:lu(e),...s});return Et(a,n)},$i=async(e,t)=>{const n=e.body,s=Ft(n),a=new Ta({$metadata:lu(e),...s});return Et(a,n)},Mi=async(e,t)=>{const n=e.body,s=Ft(n),a=new Sr({$metadata:lu(e),...s});return Et(a,n)},Ii=async(e,t)=>{const n=e.body,s=Ft(n),a=new xa({$metadata:lu(e),...s});return Et(a,n)},Ai=async(e,t)=>{const n=e.body,s=Ft(n),a=new ur({$metadata:lu(e),...s});return Et(a,n)},Ri=async(e,t)=>{const n=e.body,s=Ft(n),a=new mr({$metadata:lu(e),...s});return Et(a,n)},Ti=async(e,t)=>{const n=e.body,s=Ft(n),a=new xr({$metadata:lu(e),...s});return Et(a,n)},Ci=async(e,t)=>{const n=e.body,s=Ft(n),a=new hr({$metadata:lu(e),...s});return Et(a,n)},Ni=async(e,t)=>{const n=e.body,s=Ft(n),a=new fa({$metadata:lu(e),...s});return Et(a,n)},_i=async(e,t)=>{const n=e.body,s=Ft(n),a=new wr({$metadata:lu(e),...s});return Et(a,n)},Di=async(e,t)=>{const n=e.body,s=Ft(n),a=new br({$metadata:lu(e),...s});return Et(a,n)},Fi=async(e,t)=>{const n=e.body,s=Ft(n),a=new Ar({$metadata:lu(e),...s});return Et(a,n)},ki=async(e,t)=>{const n=e.body,s=Ft(n),a=new Ur({$metadata:lu(e),...s});return Et(a,n)},Li=async(e,t)=>{const n=e.body,s=Ft(n),a=new Za({$metadata:lu(e),...s});return Et(a,n)},ji=async(e,t)=>{const n=e.body,s=Ft(n),a=new kr({$metadata:lu(e),...s});return Et(a,n)},zi=async(e,t)=>{const n=e.body,s=Ft(n),a=new Tr({$metadata:lu(e),...s});return Et(a,n)},Ui=async(e,t)=>{const n=e.body,s=Ft(n),a=new dr({$metadata:lu(e),...s});return Et(a,n)},Bi=async(e,t)=>{const n=e.body,s=Ft(n),a=new co({$metadata:lu(e),...s});return Et(a,n)},qi=async(e,t)=>{const n=e.body,s=Ft(n),a=new Ya({$metadata:lu(e),...s});return Et(a,n)},Vi=async(e,t)=>{const n=e.body,s=Ft(n),a=new uo({$metadata:lu(e),...s});return Et(a,n)},Hi=async(e,t)=>{const n=e.body,s=Ft(n),a=new Ea({$metadata:lu(e),...s});return Et(a,n)},Wi=async(e,t)=>{const n=e.body,s=Ft(n),a=new ga({$metadata:lu(e),...s});return Et(a,n)},Gi=async(e,t)=>{const n=e.body,s=Ft(n),a=new yr({$metadata:lu(e),...s});return Et(a,n)},Ki=async(e,t)=>{const n=e.body,s=Ft(n),a=new Pr({$metadata:lu(e),...s});return Et(a,n)},Qi=async(e,t)=>{const n=e.body,s=Ft(n),a=new Zr({$metadata:lu(e),...s});return Et(a,n)},Zi=async(e,t)=>{const n=e.body,s=Ft(n),a=new Yr({$metadata:lu(e),...s});return Et(a,n)},Yi=async(e,t)=>{const n=e.body,s=Ft(n),a=new sa({$metadata:lu(e),...s});return Et(a,n)},Ji=async(e,t)=>{const n=e.body,s=Ft(n),a=new aa({$metadata:lu(e),...s});return Et(a,n)},Xi=async(e,t)=>{const n=e.body,s=Ft(n),a=new Rr({$metadata:lu(e),...s});return Et(a,n)},ec=async(e,t)=>{const n=e.body,s=Ft(n),a=new lo({$metadata:lu(e),...s});return Et(a,n)},tc=async(e,t)=>{const n=e.body,s=Ft(n),a=new Sa({$metadata:lu(e),...s});return Et(a,n)},nc=async(e,t)=>{const n=e.body,s=Ft(n),a=new Oa({$metadata:lu(e),...s});return Et(a,n)},sc=async(e,t)=>{const n=e.body,s=Ft(n),a=new Pa({$metadata:lu(e),...s});return Et(a,n)},ac=async(e,t)=>{const n=e.body,s=Ft(n),a=new $a({$metadata:lu(e),...s});return Et(a,n)},rc=async(e,t)=>{const n=e.body,s=Ft(n),a=new Ja({$metadata:lu(e),...s});return Et(a,n)},oc=async(e,t)=>{const n=e.body,s=Ft(n),a=new Oo({$metadata:lu(e),...s});return Et(a,n)},ic=async(e,t)=>{const n=e.body,s=Ft(n),a=new $r({$metadata:lu(e),...s});return Et(a,n)},cc=async(e,t)=>{const n=e.body,s=Ft(n),a=new Br({$metadata:lu(e),...s});return Et(a,n)},uc=async(e,t)=>{const n=e.body,s=Ft(n),a=new Lr({$metadata:lu(e),...s});return Et(a,n)},dc=async(e,t)=>{const n=e.body,s=Ft(n),a=new sr({$metadata:lu(e),...s});return Et(a,n)},lc=async(e,t)=>{const n=e.body,s=Ft(n),a=new Ca({$metadata:lu(e),...s});return Et(a,n)},pc=async(e,t)=>{const n=e.body,s=Ft(n),a=new Da({$metadata:lu(e),...s});return Et(a,n)},mc=async(e,t)=>{const n=e.body,s=Ft(n),a=new Fa({$metadata:lu(e),...s});return Et(a,n)},hc=async(e,t)=>{const n=e.body,s=Ft(n),a=new ca({$metadata:lu(e),...s});return Et(a,n)},fc=async(e,t)=>{const n=e.body,s=Ft(n),a=new ua({$metadata:lu(e),...s});return Et(a,n)},yc=async(e,t)=>{const n=e.body,s=Ft(n),a=new da({$metadata:lu(e),...s});return Et(a,n)},gc=async(e,t)=>{const n=e.body,s=Ft(n),a=new la({$metadata:lu(e),...s});return Et(a,n)},wc=async(e,t)=>{const n=e.body,s=Ft(n),a=new pa({$metadata:lu(e),...s});return Et(a,n)},bc=async(e,t)=>{const n=e.body,s=Ft(n),a=new Er({$metadata:lu(e),...s});return Et(a,n)},vc=async(e,t)=>{const n=e.body,s=Ft(n),a=new ka({$metadata:lu(e),...s});return Et(a,n)},xc=async(e,t)=>{const n=e.body,s=Ft(n),a=new La({$metadata:lu(e),...s});return Et(a,n)},Ec=async(e,t)=>{const n=e.body,s=Ft(n),a=new Ao({$metadata:lu(e),...s});return Et(a,n)},Sc=async(e,t)=>{const n=e.body,s=Ft(n),a=new ja({$metadata:lu(e),...s});return Et(a,n)},Oc=async(e,t)=>{const n=e.body,s=Ft(n),a=new Xa({$metadata:lu(e),...s});return Et(a,n)},Pc=async(e,t)=>{const n=e.body,s=Ft(n),a=new za({$metadata:lu(e),...s});return Et(a,n)},$c=async(e,t)=>{const n=e.body,s=Ft(n),a=new Jr({$metadata:lu(e),...s});return Et(a,n)},Mc=async(e,t)=>{const n=e.body,s=Ft(n),a=new Xr({$metadata:lu(e),...s});return Et(a,n)},Ic=async(e,t)=>{const n=e.body,s=Ft(n),a=new eo({$metadata:lu(e),...s});return Et(a,n)},Ac=async(e,t)=>{const n=e.body,s=Ft(n),a=new er({$metadata:lu(e),...s});return Et(a,n)},Rc=async(e,t)=>{const n=e.body,s=Ft(n),a=new to({$metadata:lu(e),...s});return Et(a,n)},Tc=async(e,t)=>{const n=e.body,s=Ft(n),a=new _r({$metadata:lu(e),...s});return Et(a,n)},Cc=async(e,t)=>{const n=e.body,s=Ft(n),a=new Cr({$metadata:lu(e),...s});return Et(a,n)},Nc=async(e,t)=>{const n=e.body,s=Ft(n),a=new no({$metadata:lu(e),...s});return Et(a,n)},_c=async(e,t)=>{const n=e.body,s=Ft(n),a=new Ua({$metadata:lu(e),...s});return Et(a,n)},Dc=async(e,t)=>{const n=e.body,s=Ft(n),a=new Ro({$metadata:lu(e),...s});return Et(a,n)},Fc=async(e,t)=>{const n=e.body,s=Ft(n),a=new Ba({$metadata:lu(e),...s});return Et(a,n)},kc=async(e,t)=>{const n=e.body,s=Ft(n),a=new qa({$metadata:lu(e),...s});return Et(a,n)},Lc=async(e,t)=>{const n=e.body,s=Ft(n),a=new nr({$metadata:lu(e),...s});return Et(a,n)},jc=async(e,t)=>{const n=e.body,s=Ft(n),a=new tr({$metadata:lu(e),...s});return Et(a,n)},zc=async(e,t)=>{const n=e.body,s=Ft(n),a=new _a({$metadata:lu(e),...s});return Et(a,n)},Uc=async(e,t)=>{const n=e.body,s=Ft(n),a=new ar({$metadata:lu(e),...s});return Et(a,n)},Bc=async(e,t)=>{const n=e.body,s=Ft(n),a=new rr({$metadata:lu(e),...s});return Et(a,n)},qc=async(e,t)=>{const n=e.body,s=Ft(n),a=new or({$metadata:lu(e),...s});return Et(a,n)},Vc=async(e,t)=>{const n=e.body,s=Ft(n),a=new ao({$metadata:lu(e),...s});return Et(a,n)},Hc=async(e,t)=>{const n=e.body,s=Ft(n),a=new ir({$metadata:lu(e),...s});return Et(a,n)},Wc=async(e,t)=>{const n=e.body,s=Ft(n),a=new Nr({$metadata:lu(e),...s});return Et(a,n)},Gc=async(e,t)=>{const n=e.body,s=Ft(n),a=new Po({$metadata:lu(e),...s});return Et(a,n)},Kc=async(e,t)=>{const n=e.body,s=Ft(n),a=new qr({$metadata:lu(e),...s});return Et(a,n)},Qc=async(e,t)=>{const n=e.body,s=Ft(n),a=new cr({$metadata:lu(e),...s});return Et(a,n)},Zc=async(e,t)=>{const n=e.body,s=Ft(n),a=new xo({$metadata:lu(e),...s});return Et(a,n)},Yc=async(e,t)=>{const n=e.body,s=Ft(n),a=new ra({$metadata:lu(e),...s});return Et(a,n)},Jc=async(e,t)=>{const n=e.body,s=Ft(n),a=new oa({$metadata:lu(e),...s});return Et(a,n)},Xc=async(e,t)=>{const n=e.body,s=Ft(n),a=new jr({$metadata:lu(e),...s});return Et(a,n)},eu=async(e,t)=>{const n=e.body,s=Ft(n),a=new Or({$metadata:lu(e),...s});return Et(a,n)},tu=async(e,t)=>{const n=e.body,s=Ft(n),a=new Mr({$metadata:lu(e),...s});return Et(a,n)},nu=async(e,t)=>{const n=e.body,s=Ft(n),a=new Vr({$metadata:lu(e),...s});return Et(a,n)},su=async(e,t)=>{const n=e.body,s=Ft(n),a=new Hr({$metadata:lu(e),...s});return Et(a,n)},au=async(e,t)=>{const n=e.body,s=Ft(n),a=new gr({$metadata:lu(e),...s});return Et(a,n)},ru=async(e,t)=>{const n=e.body,s=Ft(n),a=new so({$metadata:lu(e),...s});return Et(a,n)},ou=async(e,t)=>{const n=e.body,s=Ft(n),a=new Ma({$metadata:lu(e),...s});return Et(a,n)},iu=(e,t)=>Ct(e,{Parameter:e=>uu(e)}),cu=(e,t)=>Ct(e,{InvalidParameters:Ft,Parameters:e=>du(e)}),uu=(e,t)=>Ct(e,{ARN:ft,DataType:ft,LastModifiedDate:e=>(e=>{if(null==e)throw new TypeError("Expected a non-null value");return e})(vt(mt(e))),Name:ft,Selector:ft,SourceResult:ft,Type:ft,Value:ft,Version:ht}),du=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>uu(e)));return n},lu=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"]}),pu=(mu=ta,({output:e,parsedBody:t,errorCode:n})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:s})=>{const a=St(e),r=a.httpStatusCode?a.httpStatusCode+"":void 0,o=new n({name:t?.code||t?.Code||s||r||"UnknownError",$fault:"client",$metadata:a});throw Et(o,t)})({output:e,parsedBody:t,exceptionCtor:mu,errorCode:n})});var mu;const hu=async(e,t,n,s,a)=>{const{hostname:r,protocol:o="https",port:i,path:c}=await e.endpoint(),u={protocol:o,hostname:r,port:i,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:t};return void 0!==a&&(u.body=a),new d(u)};function fu(e){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AmazonSSM.${e}`}}class yu extends(lt.classBuilder().ep(Bn).m((function(e,t,n,s){return[O(n,this.serialize,this.deserialize),hn(n,e.getEndpointParameterInstructions())]})).s("AmazonSSM","GetParameter",{}).n("SSMClient","GetParameterCommand").f(void 0,wo).ser(To).de(No).build()){}class gu extends(lt.classBuilder().ep(Bn).m((function(e,t,n,s){return[O(n,this.serialize,this.deserialize),hn(n,e.getEndpointParameterInstructions())]})).s("AmazonSSM","GetParameters",{}).n("SSMClient","GetParametersCommand").f(void 0,bo).ser(Co).de(_o).build()){}const wu={clientConfig:{region:"eu-central-2"},onlyDefault:!1,prefix:process.env.SSM_PARAM_PATH};e.DEFAULT_PARAMETER_STORE_CLIENT_CONFIG=wu,e.parameterStore=e=>{const{clientConfig:t,...n}={...wu,...e},s=new ea(t);return{getSecret:(e,t="")=>(async(e,t,n,s)=>{if(t.onlyDefault)return s;try{const a=await e.send(new yu({Name:`${t.prefix??""}${n}`,WithDecryption:!0}));return a?.Parameter?.Value??s}catch(e){return t.logger&&t.logger(e),s}})(s,n,e,t),getSecrets:(e,t="")=>(async(e,t,n,s)=>{if(t.onlyDefault)return[s];try{const a=new gu({Names:n.map((e=>`${t.prefix??""}${e}`)),WithDecryption:!0}),r=await e.send(a);return r?.Parameters?.map((e=>e.Value??s))??[s]}catch(e){return t.logger&&t.logger(e),[s]}})(s,n,e,t)}}}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SSMClient, SSMClientConfig } from '@aws-sdk/client-ssm';
|
|
2
|
+
export interface IParameterStore {
|
|
3
|
+
clientConfig?: SSMClientConfig;
|
|
4
|
+
endpoint?: string;
|
|
5
|
+
logger?: (message: string) => void;
|
|
6
|
+
onlyDefault?: boolean;
|
|
7
|
+
prefix?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const DEFAULT_CLIENT_CONFIG: IParameterStore;
|
|
10
|
+
declare const getSecrets: (ssm: SSMClient, config: IParameterStore, parameters_: string[], defaultValue: string) => Promise<string[]>;
|
|
11
|
+
declare const getSecret: (ssm: SSMClient, config: IParameterStore, parameter_: string, defaultValue: string) => Promise<string>;
|
|
12
|
+
declare const parameterStore: (userConfig: IParameterStore) => {
|
|
13
|
+
getSecret: (parameter: string, defaultValue?: string) => Promise<string>;
|
|
14
|
+
getSecrets: (parameters: string[], defaultValue?: string) => Promise<string[]>;
|
|
15
|
+
};
|
|
16
|
+
export default parameterStore;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DEFAULT_PARAMETER_STORE_CLIENT_CONFIG, IParameterStore, parameterStore, } from './aws';
|
|
File without changes
|
|
File without changes
|
package/package.json
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@allthings/cloud-toolkit",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"author": "Allthings GmbH",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"allthings",
|
|
8
|
+
"sdk"
|
|
9
|
+
],
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"repository": "git@github.com:allthings/cloud-toolkit.git",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/allthings/cloud-toolkit/issues"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://github.com/allthings/cloud-toolkit",
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=18.16"
|
|
18
|
+
},
|
|
19
|
+
"main": "dist/lib.cjs.js",
|
|
20
|
+
"module": "dist/lib.esm.js",
|
|
21
|
+
"browser": "dist/lib.umd.min.js",
|
|
22
|
+
"types": "dist/src/index.d.ts",
|
|
23
|
+
"files": [
|
|
24
|
+
"dist/*.js",
|
|
25
|
+
"dist/*.min.js",
|
|
26
|
+
"dist/**/*.d.ts"
|
|
27
|
+
],
|
|
28
|
+
"bin": {
|
|
29
|
+
"allthings": "dist/cli.js"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"clean": "rimraf dist",
|
|
33
|
+
"pretest": "npm run clean",
|
|
34
|
+
"test": "jest",
|
|
35
|
+
"test:ci": "jest --runInBand",
|
|
36
|
+
"watch:build": "tsc -d -w & rollup -c --watch",
|
|
37
|
+
"watch:test": "jest --watch",
|
|
38
|
+
"lint": "yarn lint:tsc && yarn lint:eslint",
|
|
39
|
+
"lint:eslint": "eslint src",
|
|
40
|
+
"lint:tsc": "tsc --noEmit --pretty",
|
|
41
|
+
"prebuild": "npm run clean",
|
|
42
|
+
"build": "tsc -d && cp package.json dist/ && rollup -c --bundleConfigAsCjs && rm dist/package.json",
|
|
43
|
+
"dev": "tsc -w",
|
|
44
|
+
"prepare": "husky",
|
|
45
|
+
"prepublishOnly": "npm run build",
|
|
46
|
+
"prettier": "prettier --write",
|
|
47
|
+
"security-check": "yarn audit --groups dependencies --level high || test $? -lt 7",
|
|
48
|
+
"upgrade-dependencies": "yarn upgrade-interactive --latest --exact",
|
|
49
|
+
"semantic-release": "echo \"Setting npm unsafe-perm to true due to root permissions\" && npm set unsafe-perm true && semantic-release",
|
|
50
|
+
"serve": "npx serve -l 3333"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@aws-sdk/client-ssm": "3.682.0",
|
|
54
|
+
"bottleneck": "2.19.5",
|
|
55
|
+
"cross-fetch": "4.0.0",
|
|
56
|
+
"query-string": "7.1.3"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@allthings/eslint-config": "2.1.1",
|
|
60
|
+
"@commitlint/cli": "19.5.0",
|
|
61
|
+
"@commitlint/config-conventional": "19.5.0",
|
|
62
|
+
"@rollup/plugin-commonjs": "28.0.1",
|
|
63
|
+
"@rollup/plugin-json": "6.1.0",
|
|
64
|
+
"@rollup/plugin-node-resolve": "15.3.0",
|
|
65
|
+
"@rollup/plugin-replace": "6.0.1",
|
|
66
|
+
"@rollup/plugin-terser": "0.4.4",
|
|
67
|
+
"@types/jest": "26.0.24",
|
|
68
|
+
"@types/node": "22.9.0",
|
|
69
|
+
"@types/query-string": "6.3.0",
|
|
70
|
+
"aws-sdk-client-mock": "4.1.0",
|
|
71
|
+
"eslint": "8.57.1",
|
|
72
|
+
"husky": "9.1.6",
|
|
73
|
+
"jest": "26.6.3",
|
|
74
|
+
"lint-staged": "15.2.10",
|
|
75
|
+
"prettier": "3.3.3",
|
|
76
|
+
"rimraf": "5.0.10",
|
|
77
|
+
"rollup": "4.24.4",
|
|
78
|
+
"semantic-release": "19.0.5",
|
|
79
|
+
"ts-jest": "26.5.6",
|
|
80
|
+
"typescript": "4.9.5"
|
|
81
|
+
},
|
|
82
|
+
"prettier": {
|
|
83
|
+
"printWidth": 80,
|
|
84
|
+
"semi": false,
|
|
85
|
+
"singleQuote": true,
|
|
86
|
+
"trailingComma": "all",
|
|
87
|
+
"useTabs": false
|
|
88
|
+
},
|
|
89
|
+
"commitlint": {
|
|
90
|
+
"extends": [
|
|
91
|
+
"@commitlint/config-conventional"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
"lint-staged": {
|
|
95
|
+
"*.{ts,tsx}": [
|
|
96
|
+
"yarn prettier",
|
|
97
|
+
"yarn lint"
|
|
98
|
+
],
|
|
99
|
+
"*.{json}": [
|
|
100
|
+
"yarn prettier"
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
"jest": {
|
|
104
|
+
"bail": false,
|
|
105
|
+
"collectCoverage": true,
|
|
106
|
+
"globals": {
|
|
107
|
+
"ts-jest": {
|
|
108
|
+
"diagnostics": {
|
|
109
|
+
"warnOnly": true
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"roots": [
|
|
114
|
+
"src/"
|
|
115
|
+
],
|
|
116
|
+
"setupFilesAfterEnv": [
|
|
117
|
+
"./test/setup.ts"
|
|
118
|
+
],
|
|
119
|
+
"transform": {
|
|
120
|
+
"^.+\\.tsx?$": "ts-jest"
|
|
121
|
+
},
|
|
122
|
+
"testEnvironment": "node",
|
|
123
|
+
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
|
|
124
|
+
"moduleFileExtensions": [
|
|
125
|
+
"ts",
|
|
126
|
+
"tsx",
|
|
127
|
+
"js",
|
|
128
|
+
"json"
|
|
129
|
+
],
|
|
130
|
+
"coverageThreshold": {
|
|
131
|
+
"global": {
|
|
132
|
+
"branches": 99,
|
|
133
|
+
"functions": 100,
|
|
134
|
+
"lines": 100,
|
|
135
|
+
"statements": 100
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"coveragePathIgnorePatterns": [
|
|
139
|
+
"/node_modules/",
|
|
140
|
+
"/test/"
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
"release": {
|
|
144
|
+
"branch": "master",
|
|
145
|
+
"repositoryUrl": "https://github.com/allthings/cloud-toolkit.git"
|
|
146
|
+
}
|
|
147
|
+
}
|