@aws-amplify/core 4.6.1 → 4.6.2-next.20
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/CHANGELOG.md +59 -0
- package/dist/aws-amplify-core.js +21605 -25165
- package/dist/aws-amplify-core.js.map +1 -1
- package/dist/aws-amplify-core.min.js +112 -10
- package/dist/aws-amplify-core.min.js.map +1 -1
- package/lib/Amplify.d.ts +1 -0
- package/lib/Amplify.js +3 -17
- package/lib/Amplify.js.map +1 -1
- package/lib/Credentials.js +30 -76
- package/lib/Credentials.js.map +1 -1
- package/lib/Hub.js +6 -36
- package/lib/Hub.js.map +1 -1
- package/lib/Logger/ConsoleLogger.js +8 -38
- package/lib/Logger/ConsoleLogger.js.map +1 -1
- package/lib/Logger/index.js +2 -4
- package/lib/Logger/index.js.map +1 -1
- package/lib/OAuthHelper/FacebookOAuth.js +3 -38
- package/lib/OAuthHelper/FacebookOAuth.js.map +1 -1
- package/lib/OAuthHelper/GoogleOAuth.js +3 -38
- package/lib/OAuthHelper/GoogleOAuth.js.map +1 -1
- package/lib/Parser.js +2 -12
- package/lib/Parser.js.map +1 -1
- package/lib/Platform/version.d.ts +1 -1
- package/lib/Platform/version.js +1 -1
- package/lib/Providers/AWSCloudWatchProvider.js +28 -83
- package/lib/Providers/AWSCloudWatchProvider.js.map +1 -1
- package/lib/Providers/index.js +2 -4
- package/lib/Providers/index.js.map +1 -1
- package/lib/RNComponents/reactnative.js +2 -4
- package/lib/RNComponents/reactnative.js.map +1 -1
- package/lib/Signer.js +10 -32
- package/lib/Signer.js.map +1 -1
- package/lib/StorageHelper/reactnative.js +2 -4
- package/lib/StorageHelper/reactnative.js.map +1 -1
- package/lib/UniversalStorage/index.js +2 -4
- package/lib/UniversalStorage/index.js.map +1 -1
- package/lib/Util/DateUtils.js +2 -17
- package/lib/Util/DateUtils.js.map +1 -1
- package/lib/Util/Reachability.js +3 -16
- package/lib/Util/Reachability.js.map +1 -1
- package/lib/Util/Reachability.native.js +2 -4
- package/lib/Util/Reachability.native.js.map +1 -1
- package/lib/Util/Retry.d.ts +1 -0
- package/lib/Util/Retry.js +7 -75
- package/lib/Util/Retry.js.map +1 -1
- package/lib/Util/index.js +5 -7
- package/lib/Util/index.js.map +1 -1
- package/lib/index.js +9 -11
- package/lib/index.js.map +1 -1
- package/lib/types/types.d.ts +3 -0
- package/lib-esm/Amplify.d.ts +1 -0
- package/lib-esm/Amplify.js +2 -16
- package/lib-esm/Amplify.js.map +1 -1
- package/lib-esm/Credentials.js +1 -47
- package/lib-esm/Credentials.js.map +1 -1
- package/lib-esm/Hub.js +1 -31
- package/lib-esm/Hub.js.map +1 -1
- package/lib-esm/Logger/ConsoleLogger.js +1 -31
- package/lib-esm/Logger/ConsoleLogger.js.map +1 -1
- package/lib-esm/OAuthHelper/FacebookOAuth.js +1 -36
- package/lib-esm/OAuthHelper/FacebookOAuth.js.map +1 -1
- package/lib-esm/OAuthHelper/GoogleOAuth.js +1 -36
- package/lib-esm/OAuthHelper/GoogleOAuth.js.map +1 -1
- package/lib-esm/Parser.js +1 -11
- package/lib-esm/Parser.js.map +1 -1
- package/lib-esm/Platform/version.d.ts +1 -1
- package/lib-esm/Platform/version.js +1 -1
- package/lib-esm/Providers/AWSCloudWatchProvider.js +1 -56
- package/lib-esm/Providers/AWSCloudWatchProvider.js.map +1 -1
- package/lib-esm/Signer.js +5 -27
- package/lib-esm/Signer.js.map +1 -1
- package/lib-esm/Util/DateUtils.js +1 -16
- package/lib-esm/Util/DateUtils.js.map +1 -1
- package/lib-esm/Util/Reachability.js +1 -11
- package/lib-esm/Util/Reachability.js.map +1 -1
- package/lib-esm/Util/Retry.d.ts +1 -0
- package/lib-esm/Util/Retry.js +2 -70
- package/lib-esm/Util/Retry.js.map +1 -1
- package/lib-esm/types/types.d.ts +3 -0
- package/package.json +3 -2
- package/src/Amplify.ts +1 -0
- package/src/Platform/version.ts +1 -1
- package/src/Signer.ts +7 -7
- package/src/Util/Retry.ts +1 -1
- package/src/types/types.ts +3 -0
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("aws_amplify_core",[],t):"object"==typeof exports?exports.aws_amplify_core=t():e.aws_amplify_core=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=57)}([function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return f})),n.d(t,"__generator",(function(){return l})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return h})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return g})),n.d(t,"__spread",(function(){return v})),n.d(t,"__spreadArrays",(function(){return m})),n.d(t,"__await",(function(){return y})),n.d(t,"__asyncGenerator",(function(){return b})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return _})),n.d(t,"__makeTemplateObject",(function(){return S})),n.d(t,"__importStar",(function(){return E})),n.d(t,"__importDefault",(function(){return x})),n.d(t,"__classPrivateFieldGet",(function(){return A})),n.d(t,"__classPrivateFieldSet",(function(){return O}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("aws_amplify_core",[],t):"object"==typeof exports?exports.aws_amplify_core=t():e.aws_amplify_core=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=66)}([function(e,t,n){"use strict";(function(e){n.d(t,"e",(function(){return o})),n.d(t,"k",(function(){return i})),n.d(t,"j",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"g",(function(){return u})),n.d(t,"d",(function(){return c})),n.d(t,"i",(function(){return f})),n.d(t,"h",(function(){return l})),n.d(t,"b",(function(){return d})),n.d(t,"l",(function(){return h})),n.d(t,"m",(function(){return p})),n.d(t,"f",(function(){return v})),n.d(t,"a",(function(){return g}));var r=[{type:"text/plain",ext:"txt"},{type:"text/html",ext:"html"},{type:"text/javascript",ext:"js"},{type:"text/css",ext:"css"},{type:"text/csv",ext:"csv"},{type:"text/yaml",ext:"yml"},{type:"text/yaml",ext:"yaml"},{type:"text/calendar",ext:"ics"},{type:"text/calendar",ext:"ical"},{type:"image/apng",ext:"apng"},{type:"image/bmp",ext:"bmp"},{type:"image/gif",ext:"gif"},{type:"image/x-icon",ext:"ico"},{type:"image/x-icon",ext:"cur"},{type:"image/jpeg",ext:"jpg"},{type:"image/jpeg",ext:"jpeg"},{type:"image/jpeg",ext:"jfif"},{type:"image/jpeg",ext:"pjp"},{type:"image/jpeg",ext:"pjpeg"},{type:"image/png",ext:"png"},{type:"image/svg+xml",ext:"svg"},{type:"image/tiff",ext:"tif"},{type:"image/tiff",ext:"tiff"},{type:"image/webp",ext:"webp"},{type:"application/json",ext:"json"},{type:"application/xml",ext:"xml"},{type:"application/x-sh",ext:"sh"},{type:"application/zip",ext:"zip"},{type:"application/x-rar-compressed",ext:"rar"},{type:"application/x-tar",ext:"tar"},{type:"application/x-bzip",ext:"bz"},{type:"application/x-bzip2",ext:"bz2"},{type:"application/pdf",ext:"pdf"},{type:"application/java-archive",ext:"jar"},{type:"application/msword",ext:"doc"},{type:"application/vnd.ms-excel",ext:"xls"},{type:"application/vnd.ms-excel",ext:"xlsx"},{type:"message/rfc822",ext:"eml"}],o=function(e){return void 0===e&&(e={}),0===Object.keys(e).length},i=function(e,t,n){if(!e||!e.sort)return!1;var r=n&&"desc"===n?-1:1;return e.sort((function(e,n){var o=e[t],i=n[t];return void 0===i?void 0===o?0:1*r:void 0===o||o<i?-1*r:o>i?1*r:0})),!0},a=function(e,t){var n=Object.assign({},e);return t&&("string"==typeof t?delete n[t]:t.forEach((function(e){delete n[e]}))),n},s=function(e,t){void 0===t&&(t="application/octet-stream");var n=e.toLowerCase(),o=r.filter((function(e){return n.endsWith("."+e.ext)}));return o.length>0?o[0].type:t},u=function(e){var t=e.toLowerCase();return!!t.startsWith("text/")||("application/json"===t||"application/xml"===t||"application/sh"===t)},c=function(){for(var e="",t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",n=32;n>0;n-=1)e+=t[Math.floor(Math.random()*t.length)];return e},f=function(e){if(e.isResolved)return e;var t=!0,n=!1,r=!1,o=e.then((function(e){return r=!0,t=!1,e}),(function(e){throw n=!0,t=!1,e}));return o.isFullfilled=function(){return r},o.isPending=function(){return t},o.isRejected=function(){return n},o},l=function(){if("undefined"==typeof self)return!1;var e=self;return void 0!==e.WorkerGlobalScope&&self instanceof e.WorkerGlobalScope},d=function(){return{isBrowser:"undefined"!=typeof window&&void 0!==window.document,isNode:void 0!==e&&null!=e.versions&&null!=e.versions.node}},h=function e(t,n,r){if(void 0===n&&(n=[]),void 0===r&&(r=[]),!v(t))return t;var o={};for(var i in t){if(t.hasOwnProperty(i))o[n.includes(i)?i:i[0].toLowerCase()+i.slice(1)]=r.includes(i)?t[i]:e(t[i],n,r)}return o},p=function e(t,n,r){if(void 0===n&&(n=[]),void 0===r&&(r=[]),!v(t))return t;var o={};for(var i in t){if(t.hasOwnProperty(i))o[n.includes(i)?i:i[0].toUpperCase()+i.slice(1)]=r.includes(i)?t[i]:e(t[i],n,r)}return o},v=function(e){return!(!(e instanceof Object)||e instanceof Array||e instanceof Function||e instanceof Number||e instanceof String||e instanceof Boolean)},g=function(){function e(){}return e.isEmpty=o,e.sortByField=i,e.objectLessAttributes=a,e.filenameToContentType=s,e.isTextFile=u,e.generateRandomString=c,e.makeQuerablePromise=f,e.isWebWorker=l,e.browserOrNode=d,e.transferKeyToLowerCase=h,e.transferKeyToUpperCase=p,e.isStrictObject=v,e}()}).call(this,n(26))},,function(e,t,n){"use strict";var r=n(29),o=n(31);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){o.isString(e)&&(e=b(e));return e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(c),l=["%","/","?",";","#"].concat(f),d=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=n(32);function b(e,t,n){if(e&&o.isObject(e)&&e instanceof i)return e;var r=new i;return r.parse(e,t,n),r}i.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),s=-1!==i&&i<e.indexOf("#")?"?":"#",c=e.split(s);c[0]=c[0].replace(/\\/g,"/");var b=e=c.join(s);if(b=b.trim(),!n&&1===e.split("#").length){var w=u.exec(b);if(w)return this.path=b,this.href=b,this.pathname=w[1],w[2]?(this.search=w[2],this.query=t?m.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var _=a.exec(b);if(_){var S=(_=_[0]).toLowerCase();this.protocol=S,b=b.substr(_.length)}if(n||_||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var E="//"===b.substr(0,2);!E||_&&g[_]||(b=b.substr(2),this.slashes=!0)}if(!g[_]&&(E||_&&!y[_])){for(var x,A,k=-1,O=0;O<d.length;O++){-1!==(P=b.indexOf(d[O]))&&(-1===k||P<k)&&(k=P)}-1!==(A=-1===k?b.lastIndexOf("@"):b.lastIndexOf("@",k))&&(x=b.slice(0,A),b=b.slice(A+1),this.auth=decodeURIComponent(x)),k=-1;for(O=0;O<l.length;O++){var P;-1!==(P=b.indexOf(l[O]))&&(-1===k||P<k)&&(k=P)}-1===k&&(k=b.length),this.host=b.slice(0,k),b=b.slice(k),this.parseHost(),this.hostname=this.hostname||"";var L="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!L)for(var T=this.hostname.split(/\./),I=(O=0,T.length);O<I;O++){var C=T[O];if(C&&!C.match(h)){for(var j="",R=0,M=C.length;R<M;R++)C.charCodeAt(R)>127?j+="x":j+=C[R];if(!j.match(h)){var N=T.slice(0,O),B=T.slice(O+1),U=C.match(p);U&&(N.push(U[1]),B.unshift(U[2])),B.length&&(b="/"+B.join(".")+b),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),L||(this.hostname=r.toASCII(this.hostname));var z=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+z,this.href+=this.host,L&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!v[S])for(O=0,I=f.length;O<I;O++){var D=f[O];if(-1!==b.indexOf(D)){var q=encodeURIComponent(D);q===D&&(q=escape(D)),b=b.split(D).join(q)}}var G=b.indexOf("#");-1!==G&&(this.hash=b.substr(G),b=b.slice(0,G));var H=b.indexOf("?");if(-1!==H?(this.search=b.substr(H),this.query=b.substr(H+1),t&&(this.query=m.parse(this.query)),b=b.slice(0,H)):t&&(this.search="",this.query={}),b&&(this.pathname=b),y[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){z=this.pathname||"";var W=this.search||"";this.path=z+W}return this.href=this.format(),this},i.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,a="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(a=m.stringify(this.query));var s=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||y[t])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+i+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+r},i.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},i.prototype.resolveObject=function(e){if(o.isString(e)){var t=new i;t.parse(e,!1,!0),e=t}for(var n=new i,r=Object.keys(this),a=0;a<r.length;a++){var s=r[a];n[s]=this[s]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),c=0;c<u.length;c++){var f=u[c];"protocol"!==f&&(n[f]=e[f])}return y[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!y[e.protocol]){for(var l=Object.keys(e),d=0;d<l.length;d++){var h=l[d];n[h]=e[h]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||g[e.protocol])n.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),n.pathname=p.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var v=n.pathname||"",m=n.search||"";n.path=v+m}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var b=n.pathname&&"/"===n.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),_=w||b||n.host&&e.pathname,S=_,E=n.pathname&&n.pathname.split("/")||[],x=(p=e.pathname&&e.pathname.split("/")||[],n.protocol&&!y[n.protocol]);if(x&&(n.hostname="",n.port=null,n.host&&(""===E[0]?E[0]=n.host:E.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),_=_&&(""===p[0]||""===E[0])),w)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,E=p;else if(p.length)E||(E=[]),E.pop(),E=E.concat(p),n.search=e.search,n.query=e.query;else if(!o.isNullOrUndefined(e.search)){if(x)n.hostname=n.host=E.shift(),(L=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=L.shift(),n.host=n.hostname=L.shift());return n.search=e.search,n.query=e.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!E.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var A=E.slice(-1)[0],k=(n.host||e.host||E.length>1)&&("."===A||".."===A)||""===A,O=0,P=E.length;P>=0;P--)"."===(A=E[P])?E.splice(P,1):".."===A?(E.splice(P,1),O++):O&&(E.splice(P,1),O--);if(!_&&!S)for(;O--;O)E.unshift("..");!_||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),k&&"/"!==E.join("/").substr(-1)&&E.push("");var L,T=""===E[0]||E[0]&&"/"===E[0].charAt(0);x&&(n.hostname=n.host=T?"":E.length?E.shift():"",(L=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=L.shift(),n.host=n.hostname=L.shift()));return(_=_||n.host&&E.length)&&!T&&E.unshift(""),E.length?n.pathname=E.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},i.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* cookie
|
|
4
|
+
* Copyright(c) 2012-2014 Roman Shtylman
|
|
5
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
6
|
+
* MIT Licensed
|
|
7
|
+
*/t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},o=t||{},i=e.split(";"),s=o.decode||r,u=0;u<i.length;u++){var c=i[u],f=c.indexOf("=");if(!(f<0)){var l=c.substring(0,f).trim();if(null==n[l]){var d=c.substring(f+1,c.length).trim();'"'===d[0]&&(d=d.slice(1,-1)),n[l]=a(d,s)}}}return n},t.serialize=function(e,t,n){var r=n||{},a=r.encode||o;if("function"!=typeof a)throw new TypeError("option encode is invalid");if(!i.test(e))throw new TypeError("argument name is invalid");var s=a(t);if(s&&!i.test(s))throw new TypeError("argument val is invalid");var u=e+"="+s;if(null!=r.maxAge){var c=r.maxAge-0;if(isNaN(c)||!isFinite(c))throw new TypeError("option maxAge is invalid");u+="; Max-Age="+Math.floor(c)}if(r.domain){if(!i.test(r.domain))throw new TypeError("option domain is invalid");u+="; Domain="+r.domain}if(r.path){if(!i.test(r.path))throw new TypeError("option path is invalid");u+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");u+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(u+="; HttpOnly");r.secure&&(u+="; Secure");if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"strict":u+="; SameSite=Strict";break;case"none":u+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return u};var r=decodeURIComponent,o=encodeURIComponent,i=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function a(e,t){try{return t(e)}catch(t){return e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,(0,n(37).__exportStar)(n(38),t);var r=n(13);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var o=n(15);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return o.Sha256}})},function(e,t,n){"use strict";n.r(t),n.d(t,"locateWindow",(function(){return o}));var r={};function o(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(8).__exportStar(n(27),t)},,function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return f})),n.d(t,"__generator",(function(){return l})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return h})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return g})),n.d(t,"__spreadArrays",(function(){return y})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return b})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return _})),n.d(t,"__makeTemplateObject",(function(){return S})),n.d(t,"__importStar",(function(){return E})),n.d(t,"__importDefault",(function(){return x})),n.d(t,"__classPrivateFieldGet",(function(){return A})),n.d(t,"__classPrivateFieldSet",(function(){return k}));
|
|
2
8
|
/*! *****************************************************************************
|
|
3
9
|
Copyright (c) Microsoft Corporation.
|
|
4
10
|
|
|
@@ -13,20 +19,116 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
13
19
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
20
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
21
|
***************************************************************************** */
|
|
16
|
-
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function h(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function v(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function m(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function y(e){return this instanceof y?(this.v=e,this):new y(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof y?Promise.resolve(n.value.v).then(u,c):f(i[0][2],n)}catch(e){f(i[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function f(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:y(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function x(e){return e&&e.__esModule?e:{default:e}}function A(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function O(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";(function(e){n.d(t,"e",(function(){return o})),n.d(t,"k",(function(){return i})),n.d(t,"j",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"g",(function(){return u})),n.d(t,"d",(function(){return c})),n.d(t,"i",(function(){return f})),n.d(t,"h",(function(){return l})),n.d(t,"b",(function(){return d})),n.d(t,"l",(function(){return h})),n.d(t,"m",(function(){return p})),n.d(t,"f",(function(){return g})),n.d(t,"a",(function(){return v}));var r=[{type:"text/plain",ext:"txt"},{type:"text/html",ext:"html"},{type:"text/javascript",ext:"js"},{type:"text/css",ext:"css"},{type:"text/csv",ext:"csv"},{type:"text/yaml",ext:"yml"},{type:"text/yaml",ext:"yaml"},{type:"text/calendar",ext:"ics"},{type:"text/calendar",ext:"ical"},{type:"image/apng",ext:"apng"},{type:"image/bmp",ext:"bmp"},{type:"image/gif",ext:"gif"},{type:"image/x-icon",ext:"ico"},{type:"image/x-icon",ext:"cur"},{type:"image/jpeg",ext:"jpg"},{type:"image/jpeg",ext:"jpeg"},{type:"image/jpeg",ext:"jfif"},{type:"image/jpeg",ext:"pjp"},{type:"image/jpeg",ext:"pjpeg"},{type:"image/png",ext:"png"},{type:"image/svg+xml",ext:"svg"},{type:"image/tiff",ext:"tif"},{type:"image/tiff",ext:"tiff"},{type:"image/webp",ext:"webp"},{type:"application/json",ext:"json"},{type:"application/xml",ext:"xml"},{type:"application/x-sh",ext:"sh"},{type:"application/zip",ext:"zip"},{type:"application/x-rar-compressed",ext:"rar"},{type:"application/x-tar",ext:"tar"},{type:"application/x-bzip",ext:"bz"},{type:"application/x-bzip2",ext:"bz2"},{type:"application/pdf",ext:"pdf"},{type:"application/java-archive",ext:"jar"},{type:"application/msword",ext:"doc"},{type:"application/vnd.ms-excel",ext:"xls"},{type:"application/vnd.ms-excel",ext:"xlsx"},{type:"message/rfc822",ext:"eml"}],o=function(e){return void 0===e&&(e={}),0===Object.keys(e).length},i=function(e,t,n){if(!e||!e.sort)return!1;var r=n&&"desc"===n?-1:1;return e.sort((function(e,n){var o=e[t],i=n[t];return void 0===i?void 0===o?0:1*r:void 0===o||o<i?-1*r:o>i?1*r:0})),!0},a=function(e,t){var n=Object.assign({},e);return t&&("string"==typeof t?delete n[t]:t.forEach((function(e){delete n[e]}))),n},s=function(e,t){void 0===t&&(t="application/octet-stream");var n=e.toLowerCase(),o=r.filter((function(e){return n.endsWith("."+e.ext)}));return o.length>0?o[0].type:t},u=function(e){var t=e.toLowerCase();return!!t.startsWith("text/")||("application/json"===t||"application/xml"===t||"application/sh"===t)},c=function(){for(var e="",t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",n=32;n>0;n-=1)e+=t[Math.floor(Math.random()*t.length)];return e},f=function(e){if(e.isResolved)return e;var t=!0,n=!1,r=!1,o=e.then((function(e){return r=!0,t=!1,e}),(function(e){throw n=!0,t=!1,e}));return o.isFullfilled=function(){return r},o.isPending=function(){return t},o.isRejected=function(){return n},o},l=function(){if("undefined"==typeof self)return!1;var e=self;return void 0!==e.WorkerGlobalScope&&self instanceof e.WorkerGlobalScope},d=function(){return{isBrowser:"undefined"!=typeof window&&void 0!==window.document,isNode:void 0!==e&&null!=e.versions&&null!=e.versions.node}},h=function e(t,n,r){if(void 0===n&&(n=[]),void 0===r&&(r=[]),!g(t))return t;var o={};for(var i in t){if(t.hasOwnProperty(i))o[n.includes(i)?i:i[0].toLowerCase()+i.slice(1)]=r.includes(i)?t[i]:e(t[i],n,r)}return o},p=function e(t,n,r){if(void 0===n&&(n=[]),void 0===r&&(r=[]),!g(t))return t;var o={};for(var i in t){if(t.hasOwnProperty(i))o[n.includes(i)?i:i[0].toUpperCase()+i.slice(1)]=r.includes(i)?t[i]:e(t[i],n,r)}return o},g=function(e){return!(!(e instanceof Object)||e instanceof Array||e instanceof Function||e instanceof Number||e instanceof String||e instanceof Boolean)},v=function(){function e(){}return e.isEmpty=o,e.sortByField=i,e.objectLessAttributes=a,e.filenameToContentType=s,e.isTextFile=u,e.generateRandomString=c,e.makeQuerablePromise=f,e.isWebWorker=l,e.browserOrNode=d,e.transferKeyToLowerCase=h,e.transferKeyToUpperCase=p,e.isStrictObject=g,e}()}).call(this,n(24))},,function(e,t,n){"use strict";var r=n(27),o=n(29);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){o.isString(e)&&(e=b(e));return e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(c),l=["%","/","?",";","#"].concat(f),d=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n(30);function b(e,t,n){if(e&&o.isObject(e)&&e instanceof i)return e;var r=new i;return r.parse(e,t,n),r}i.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),s=-1!==i&&i<e.indexOf("#")?"?":"#",c=e.split(s);c[0]=c[0].replace(/\\/g,"/");var b=e=c.join(s);if(b=b.trim(),!n&&1===e.split("#").length){var w=u.exec(b);if(w)return this.path=b,this.href=b,this.pathname=w[1],w[2]?(this.search=w[2],this.query=t?y.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var _=a.exec(b);if(_){var S=(_=_[0]).toLowerCase();this.protocol=S,b=b.substr(_.length)}if(n||_||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var E="//"===b.substr(0,2);!E||_&&v[_]||(b=b.substr(2),this.slashes=!0)}if(!v[_]&&(E||_&&!m[_])){for(var x,A,O=-1,k=0;k<d.length;k++){-1!==(L=b.indexOf(d[k]))&&(-1===O||L<O)&&(O=L)}-1!==(A=-1===O?b.lastIndexOf("@"):b.lastIndexOf("@",O))&&(x=b.slice(0,A),b=b.slice(A+1),this.auth=decodeURIComponent(x)),O=-1;for(k=0;k<l.length;k++){var L;-1!==(L=b.indexOf(l[k]))&&(-1===O||L<O)&&(O=L)}-1===O&&(O=b.length),this.host=b.slice(0,O),b=b.slice(O),this.parseHost(),this.hostname=this.hostname||"";var I="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!I)for(var C=this.hostname.split(/\./),P=(k=0,C.length);k<P;k++){var T=C[k];if(T&&!T.match(h)){for(var j="",R=0,M=T.length;R<M;R++)T.charCodeAt(R)>127?j+="x":j+=T[R];if(!j.match(h)){var N=C.slice(0,k),z=C.slice(k+1),B=T.match(p);B&&(N.push(B[1]),z.unshift(B[2])),z.length&&(b="/"+z.join(".")+b),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=r.toASCII(this.hostname));var U=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+U,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!g[S])for(k=0,P=f.length;k<P;k++){var D=f[k];if(-1!==b.indexOf(D)){var q=encodeURIComponent(D);q===D&&(q=escape(D)),b=b.split(D).join(q)}}var G=b.indexOf("#");-1!==G&&(this.hash=b.substr(G),b=b.slice(0,G));var H=b.indexOf("?");if(-1!==H?(this.search=b.substr(H),this.query=b.substr(H+1),t&&(this.query=y.parse(this.query)),b=b.slice(0,H)):t&&(this.search="",this.query={}),b&&(this.pathname=b),m[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){U=this.pathname||"";var W=this.search||"";this.path=U+W}return this.href=this.format(),this},i.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,a="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(a=y.stringify(this.query));var s=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||m[t])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+i+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+r},i.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},i.prototype.resolveObject=function(e){if(o.isString(e)){var t=new i;t.parse(e,!1,!0),e=t}for(var n=new i,r=Object.keys(this),a=0;a<r.length;a++){var s=r[a];n[s]=this[s]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),c=0;c<u.length;c++){var f=u[c];"protocol"!==f&&(n[f]=e[f])}return m[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!m[e.protocol]){for(var l=Object.keys(e),d=0;d<l.length;d++){var h=l[d];n[h]=e[h]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||v[e.protocol])n.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),n.pathname=p.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var g=n.pathname||"",y=n.search||"";n.path=g+y}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var b=n.pathname&&"/"===n.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),_=w||b||n.host&&e.pathname,S=_,E=n.pathname&&n.pathname.split("/")||[],x=(p=e.pathname&&e.pathname.split("/")||[],n.protocol&&!m[n.protocol]);if(x&&(n.hostname="",n.port=null,n.host&&(""===E[0]?E[0]=n.host:E.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),_=_&&(""===p[0]||""===E[0])),w)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,E=p;else if(p.length)E||(E=[]),E.pop(),E=E.concat(p),n.search=e.search,n.query=e.query;else if(!o.isNullOrUndefined(e.search)){if(x)n.hostname=n.host=E.shift(),(I=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=I.shift(),n.host=n.hostname=I.shift());return n.search=e.search,n.query=e.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!E.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var A=E.slice(-1)[0],O=(n.host||e.host||E.length>1)&&("."===A||".."===A)||""===A,k=0,L=E.length;L>=0;L--)"."===(A=E[L])?E.splice(L,1):".."===A?(E.splice(L,1),k++):k&&(E.splice(L,1),k--);if(!_&&!S)for(;k--;k)E.unshift("..");!_||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),O&&"/"!==E.join("/").substr(-1)&&E.push("");var I,C=""===E[0]||E[0]&&"/"===E[0].charAt(0);x&&(n.hostname=n.host=C?"":E.length?E.shift():"",(I=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=I.shift(),n.host=n.hostname=I.shift()));return(_=_||n.host&&E.length)&&!C&&E.unshift(""),E.length?n.pathname=E.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},i.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return o}));var r=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}},function(e,t,n){"use strict";
|
|
17
|
-
/*!
|
|
18
|
-
* cookie
|
|
19
|
-
* Copyright(c) 2012-2014 Roman Shtylman
|
|
20
|
-
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
21
|
-
* MIT Licensed
|
|
22
|
-
*/t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},o=t||{},i=e.split(";"),s=o.decode||r,u=0;u<i.length;u++){var c=i[u],f=c.indexOf("=");if(!(f<0)){var l=c.substring(0,f).trim();if(null==n[l]){var d=c.substring(f+1,c.length).trim();'"'===d[0]&&(d=d.slice(1,-1)),n[l]=a(d,s)}}}return n},t.serialize=function(e,t,n){var r=n||{},a=r.encode||o;if("function"!=typeof a)throw new TypeError("option encode is invalid");if(!i.test(e))throw new TypeError("argument name is invalid");var s=a(t);if(s&&!i.test(s))throw new TypeError("argument val is invalid");var u=e+"="+s;if(null!=r.maxAge){var c=r.maxAge-0;if(isNaN(c)||!isFinite(c))throw new TypeError("option maxAge is invalid");u+="; Max-Age="+Math.floor(c)}if(r.domain){if(!i.test(r.domain))throw new TypeError("option domain is invalid");u+="; Domain="+r.domain}if(r.path){if(!i.test(r.path))throw new TypeError("option path is invalid");u+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");u+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(u+="; HttpOnly");r.secure&&(u+="; Secure");if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"strict":u+="; SameSite=Strict";break;case"none":u+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return u};var r=decodeURIComponent,o=encodeURIComponent,i=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function a(e,t){try{return t(e)}catch(t){return e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,(0,n(0).__exportStar)(n(35),t);var r=n(13);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var o=n(15);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return o.Sha256}})},function(e,t,n){"use strict";n.r(t),n.d(t,"locateWindow",(function(){return o}));var r={};function o(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(0).__exportStar(n(25),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(36),o=n(14),i=n(4),a=n(7),s=function(){function e(e){e?(this.operation=function(e){return new Promise((function(t,n){var r=(0,a.locateWindow)().msCrypto.subtle.importKey("raw",u(e),o.SHA_256_HMAC_ALGO,!1,["sign"]);r.oncomplete=function(){r.result&&t(r.result),n(new Error("ImportKey completed without importing key."))},r.onerror=function(){n(new Error("ImportKey failed to import key."))}}))}(e).then((function(e){return(0,a.locateWindow)().msCrypto.subtle.sign(o.SHA_256_HMAC_ALGO,e)})),this.operation.catch((function(){}))):this.operation=Promise.resolve((0,a.locateWindow)().msCrypto.subtle.digest("SHA-256"))}return e.prototype.update=function(e){var t=this;(0,r.isEmptyData)(e)||(this.operation=this.operation.then((function(n){return n.onerror=function(){t.operation=Promise.reject(new Error("Error encountered updating hash"))},n.process(u(e)),n})),this.operation.catch((function(){})))},e.prototype.digest=function(){return this.operation.then((function(e){return new Promise((function(t,n){e.onerror=function(){n(new Error("Error encountered finalizing hash"))},e.oncomplete=function(){e.result&&t(new Uint8Array(e.result)),n(new Error("Error encountered finalizing hash"))},e.finish()}))}))},e}();function u(e){return"string"==typeof e?(0,i.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(16),o=n(14),i=n(7),a=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,n){(0,i.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e),o.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))}return e.prototype.update=function(e){if(!(0,r.isEmptyData)(e)){var t=(0,r.convertToBuffer)(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return(0,i.locateWindow)().crypto.subtle.sign(o.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,r.isEmptyData)(this.toHash)?Promise.resolve(o.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return(0,i.locateWindow)().crypto.subtle.digest(o.SHA_256_HASH,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e}();t.Sha256=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var r=n(37);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(42);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(43);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(44);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},function(e,t,n){var r=n(33),o=n(34),i=o;i.v1=r,i.v4=o,e.exports=i},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),o=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":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var o=e.getVersionPrecision(t),i=e.getVersionPrecision(n),a=Math.max(o,i),s=0,u=e.map([t,n],(function(t){var n=a-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(s=a-Math.min(o,i)),a-=1;a>=s;){if(u[0][a]>u[1][a])return 1;if(u[0][a]===u[1][a]){if(a===s)return 0;a-=1}else if(u[0][a]<u[1][a])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var o=e[n];if(t(o,n))return o}},e.assign=function(e){for(var t,n,r=e,o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];if(Object.assign)return Object.assign.apply(Object,[e].concat(i));var s=function(){var e=i[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=i.length;t<n;t+=1)s();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=o,e.exports=t.default},18:function(e,t,n){"use strict";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){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(91))&&r.__esModule?r:{default:r},i=n(18);function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(){function e(){}var t,n;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 o.default(e,t)},e.parse=function(e){return new o.default(e).getResult()},t=e,(n=[{key:"BROWSER_MAP",get:function(){return i.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return i.ENGINE_MAP}},{key:"OS_MAP",get:function(){return i.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return i.PLATFORMS_MAP}}])&&a(t,n),e}();t.default=s,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(92)),o=u(n(93)),i=u(n(94)),a=u(n(95)),s=u(n(17));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=s.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=s.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=s.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=s.default.find(a.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return s.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,o={},i=0;if(Object.keys(e).forEach((function(t){var a=e[t];"string"==typeof a?(o[t]=a,i+=1):"object"==typeof a&&(n[t]=a,r+=1)})),r>0){var a=Object.keys(n),u=s.default.find(a,(function(e){return t.isOS(e)}));if(u){var c=this.satisfies(n[u]);if(void 0!==c)return c}var f=s.default.find(a,(function(e){return t.isPlatform(e)}));if(f){var l=this.satisfies(n[f]);if(void 0!==l)return l}}if(i>0){var d=Object.keys(o),h=s.default.find(d,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(o[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),o=s.default.getBrowserTypeByAlias(r);return t&&o&&(r=o.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,o=this.getBrowserVersion();if("string"==typeof o)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(o,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=c,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=o.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=o.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=o.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=o.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,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=o.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=o.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=o.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=o.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=o.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=o.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=o.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=o.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=o.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=o.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=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=o.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=o.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=o.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=o.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=o.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=o.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=o.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=o.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=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:o.default.getFirstMatch(t,e),version:o.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:[/Roku\/DVP/],describe:function(e){var t=o.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:i.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=o.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=o.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=o.default.getWindowsVersionName(t);return{name:i.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:i.OS_MAP.iOS},n=o.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=o.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=o.default.getMacOSVersionName(t),r={name:i.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=o.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:i.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=o.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=o.default.getAndroidVersionName(t),r={name:i.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=o.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:i.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=o.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||o.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||o.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:i.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=o.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=o.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:i.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:i.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=o.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=o.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:i.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:i.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=o.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:i.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:i.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:i.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:i.ENGINE_MAP.Blink};var t=o.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:i.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:i.ENGINE_MAP.Trident},n=o.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:i.ENGINE_MAP.Presto},n=o.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:i.ENGINE_MAP.Gecko},n=o.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:i.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:i.ENGINE_MAP.WebKit},n=o.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=a,e.exports=t.default}})},function(e){e.exports=JSON.parse('{"name":"@aws-sdk/client-cloudwatch-logs","description":"AWS SDK for JavaScript Cloudwatch Logs Client for Node.js, Browser and React Native","version":"3.6.1","scripts":{"clean":"yarn remove-definitions && yarn remove-dist && yarn remove-documentation","build-documentation":"yarn remove-documentation && typedoc ./","prepublishOnly":"yarn build","pretest":"yarn build:cjs","remove-definitions":"rimraf ./types","remove-dist":"rimraf ./dist","remove-documentation":"rimraf ./docs","test":"exit 0","build:cjs":"tsc -p tsconfig.json","build:es":"tsc -p tsconfig.es.json","build":"yarn build:cjs && yarn build:es","postbuild":"downlevel-dts types types/ts3.4"},"main":"./dist/cjs/index.js","types":"./types/index.d.ts","module":"./dist/es/index.js","browser":{"./runtimeConfig":"./runtimeConfig.browser"},"react-native":{"./runtimeConfig":"./runtimeConfig.native"},"sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"^1.0.0","@aws-crypto/sha256-js":"^1.0.0","@aws-sdk/config-resolver":"3.6.1","@aws-sdk/credential-provider-node":"3.6.1","@aws-sdk/fetch-http-handler":"3.6.1","@aws-sdk/hash-node":"3.6.1","@aws-sdk/invalid-dependency":"3.6.1","@aws-sdk/middleware-content-length":"3.6.1","@aws-sdk/middleware-host-header":"3.6.1","@aws-sdk/middleware-logger":"3.6.1","@aws-sdk/middleware-retry":"3.6.1","@aws-sdk/middleware-serde":"3.6.1","@aws-sdk/middleware-signing":"3.6.1","@aws-sdk/middleware-stack":"3.6.1","@aws-sdk/middleware-user-agent":"3.6.1","@aws-sdk/node-config-provider":"3.6.1","@aws-sdk/node-http-handler":"3.6.1","@aws-sdk/protocol-http":"3.6.1","@aws-sdk/smithy-client":"3.6.1","@aws-sdk/types":"3.6.1","@aws-sdk/url-parser":"3.6.1","@aws-sdk/url-parser-native":"3.6.1","@aws-sdk/util-base64-browser":"3.6.1","@aws-sdk/util-base64-node":"3.6.1","@aws-sdk/util-body-length-browser":"3.6.1","@aws-sdk/util-body-length-node":"3.6.1","@aws-sdk/util-user-agent-browser":"3.6.1","@aws-sdk/util-user-agent-node":"3.6.1","@aws-sdk/util-utf8-browser":"3.6.1","@aws-sdk/util-utf8-node":"3.6.1","tslib":"^2.0.0"},"devDependencies":{"@aws-sdk/client-documentation-generator":"3.6.1","@types/node":"^12.7.5","downlevel-dts":"0.7.0","jest":"^26.1.0","rimraf":"^3.0.0","typedoc":"^0.19.2","typescript":"~4.1.2"},"engines":{"node":">=10.0.0"},"typesVersions":{"<4.0":{"types/*":["types/ts3.4/*"]}},"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-cloudwatch-logs","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-cloudwatch-logs"}}')},function(e){e.exports=JSON.parse('{"name":"@aws-sdk/client-cognito-identity","description":"AWS SDK for JavaScript Cognito Identity Client for Node.js, Browser and React Native","version":"3.6.1","scripts":{"clean":"yarn remove-definitions && yarn remove-dist && yarn remove-documentation","build-documentation":"yarn remove-documentation && typedoc ./","prepublishOnly":"yarn build","pretest":"yarn build:cjs","remove-definitions":"rimraf ./types","remove-dist":"rimraf ./dist","remove-documentation":"rimraf ./docs","test:unit":"mocha **/cjs/**/*.spec.js","test:e2e":"mocha **/cjs/**/*.ispec.js && karma start karma.conf.js","test":"yarn test:unit","build:cjs":"tsc -p tsconfig.json","build:es":"tsc -p tsconfig.es.json","build":"yarn build:cjs && yarn build:es","postbuild":"downlevel-dts types types/ts3.4"},"main":"./dist/cjs/index.js","types":"./types/index.d.ts","module":"./dist/es/index.js","browser":{"./runtimeConfig":"./runtimeConfig.browser"},"react-native":{"./runtimeConfig":"./runtimeConfig.native"},"sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"^1.0.0","@aws-crypto/sha256-js":"^1.0.0","@aws-sdk/config-resolver":"3.6.1","@aws-sdk/credential-provider-node":"3.6.1","@aws-sdk/fetch-http-handler":"3.6.1","@aws-sdk/hash-node":"3.6.1","@aws-sdk/invalid-dependency":"3.6.1","@aws-sdk/middleware-content-length":"3.6.1","@aws-sdk/middleware-host-header":"3.6.1","@aws-sdk/middleware-logger":"3.6.1","@aws-sdk/middleware-retry":"3.6.1","@aws-sdk/middleware-serde":"3.6.1","@aws-sdk/middleware-signing":"3.6.1","@aws-sdk/middleware-stack":"3.6.1","@aws-sdk/middleware-user-agent":"3.6.1","@aws-sdk/node-config-provider":"3.6.1","@aws-sdk/node-http-handler":"3.6.1","@aws-sdk/protocol-http":"3.6.1","@aws-sdk/smithy-client":"3.6.1","@aws-sdk/types":"3.6.1","@aws-sdk/url-parser":"3.6.1","@aws-sdk/url-parser-native":"3.6.1","@aws-sdk/util-base64-browser":"3.6.1","@aws-sdk/util-base64-node":"3.6.1","@aws-sdk/util-body-length-browser":"3.6.1","@aws-sdk/util-body-length-node":"3.6.1","@aws-sdk/util-user-agent-browser":"3.6.1","@aws-sdk/util-user-agent-node":"3.6.1","@aws-sdk/util-utf8-browser":"3.6.1","@aws-sdk/util-utf8-node":"3.6.1","tslib":"^2.0.0"},"devDependencies":{"@aws-sdk/client-documentation-generator":"3.6.1","@aws-sdk/client-iam":"3.6.1","@types/chai":"^4.2.11","@types/mocha":"^8.0.4","@types/node":"^12.7.5","downlevel-dts":"0.7.0","jest":"^26.1.0","rimraf":"^3.0.0","typedoc":"^0.19.2","typescript":"~4.1.2"},"engines":{"node":">=10.0.0"},"typesVersions":{"<4.0":{"types/*":["types/ts3.4/*"]}},"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-cognito-identity","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-cognito-identity"}}')},function(e,t,n){e.exports=n(56).Observable},,function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],f=!1,l=-1;function d(){f&&u&&(f=!1,u.length?c=u.concat(c):l=-1,c.length&&h())}function h(){if(!f){var e=s(d);f=!0;for(var t=c.length;t;){for(u=c,c=[];++l<t;)u&&u[l].run();l=-1,t=c.length}u=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function g(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||f||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(9),i=n(26),a=n(58),s=function(){function e(e){if(this.hash=new i.RawSha256,e){this.outer=new i.RawSha256;var t=function(e){var t=u(e);if(t.byteLength>o.BLOCK_SIZE){var n=new i.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(o.BLOCK_SIZE);return r.set(t),r}(e),n=new Uint8Array(o.BLOCK_SIZE);n.set(t);for(var r=0;r<o.BLOCK_SIZE;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(r=0;r<t.byteLength;r++)t[r]=0}}return e.prototype.update=function(e){if(!function(e){if("string"==typeof e)return 0===e.length;return 0===e.byteLength}(e)&&!this.error)try{this.hash.update(u(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 r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.digestSync()]}))}))},e}();function u(e){return"string"==typeof e?a.fromUtf8(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),o=function(){function e(){this.state=Int32Array.from(r.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>r.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===r.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%r.BLOCK_SIZE>=r.BLOCK_SIZE-8){for(var o=this.bufferLength;o<r.BLOCK_SIZE;o++)t.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(o=this.bufferLength;o<r.BLOCK_SIZE-8;o++)t.setUint8(o,0);t.setUint32(r.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(r.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(r.DIGEST_LENGTH);for(o=0;o<8;o++)i[4*o]=this.state[o]>>>24&255,i[4*o+1]=this.state[o]>>>16&255,i[4*o+2]=this.state[o]>>>8&255,i[4*o+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],o=t[1],i=t[2],a=t[3],s=t[4],u=t[5],c=t[6],f=t[7],l=0;l<r.BLOCK_SIZE;l++){if(l<16)this.temp[l]=(255&e[4*l])<<24|(255&e[4*l+1])<<16|(255&e[4*l+2])<<8|255&e[4*l+3];else{var d=this.temp[l-2],h=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,p=((d=this.temp[l-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[l]=(h+this.temp[l-7]|0)+(p+this.temp[l-16]|0)}var g=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&u^~s&c)|0)+(f+(r.KEY[l]+this.temp[l]|0)|0)|0,v=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&o^n&i^o&i)|0;f=c,c=u,u=s,s=a+g|0,a=i,i=o,o=n,n=g+v|0}t[0]+=n,t[1]+=o,t[2]+=i,t[3]+=a,t[4]+=s,t[5]+=u,t[6]+=c,t[7]+=f},e}();t.RawSha256=o},function(e,t,n){(function(e,r){var o;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(i){t&&t.nodeType,e&&e.nodeType;var a="object"==typeof r&&r;a.global!==a&&a.window!==a&&a.self;var s,u=2147483647,c=/^xn--/,f=/[^\x20-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,p=String.fromCharCode;function g(e){throw new RangeError(d[e])}function v(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function m(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+v((e=e.replace(l,".")).split("."),t).join(".")}function y(e){for(var t,n,r=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function b(e){return v(e,(function(e){var t="";return e>65535&&(t+=p((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=p(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function _(e,t,n){var r=0;for(e=n?h(e/700):e>>1,e+=h(e/t);e>455;r+=36)e=h(e/35);return h(r+36*e/(e+38))}function S(e){var t,n,r,o,i,a,s,c,f,l,d,p=[],v=e.length,m=0,y=128,w=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&g("not-basic"),p.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<v;){for(i=m,a=1,s=36;o>=v&&g("invalid-input"),((c=(d=e.charCodeAt(o++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:36)>=36||c>h((u-m)/a))&&g("overflow"),m+=c*a,!(c<(f=s<=w?1:s>=w+26?26:s-w));s+=36)a>h(u/(l=36-f))&&g("overflow"),a*=l;w=_(m-i,t=p.length+1,0==i),h(m/t)>u-y&&g("overflow"),y+=h(m/t),m%=t,p.splice(m++,0,y)}return b(p)}function E(e){var t,n,r,o,i,a,s,c,f,l,d,v,m,b,S,E=[];for(v=(e=y(e)).length,t=128,n=0,i=72,a=0;a<v;++a)(d=e[a])<128&&E.push(p(d));for(r=o=E.length,o&&E.push("-");r<v;){for(s=u,a=0;a<v;++a)(d=e[a])>=t&&d<s&&(s=d);for(s-t>h((u-n)/(m=r+1))&&g("overflow"),n+=(s-t)*m,t=s,a=0;a<v;++a)if((d=e[a])<t&&++n>u&&g("overflow"),d==t){for(c=n,f=36;!(c<(l=f<=i?1:f>=i+26?26:f-i));f+=36)S=c-l,b=36-l,E.push(p(w(l+S%b,0))),c=h(S/b);E.push(p(w(c,0))),i=_(n,m,r==o),n=0,++r}++n,++t}return E.join("")}s={version:"1.4.1",ucs2:{decode:y,encode:b},decode:S,encode:E,toASCII:function(e){return m(e,(function(e){return f.test(e)?"xn--"+E(e):e}))},toUnicode:function(e){return m(e,(function(e){return c.test(e)?S(e.slice(4).toLowerCase()):e}))}},void 0===(o=function(){return s}.call(t,n,t,e))||(e.exports=o)}()}).call(this,n(28)(e),n(10))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(31),t.encode=t.stringify=n(32)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,i){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var f=0;f<c;++f){var l,d,h,p,g=e[f].replace(s,"%20"),v=g.indexOf(n);v>=0?(l=g.substr(0,v),d=g.substr(v+1)):(l=g,d=""),h=decodeURIComponent(l),p=decodeURIComponent(d),r(a,h)?o(a[h])?a[h].push(p):a[h]=[a[h],p]:a[h]=p}return a};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?i(a(e),(function(a){var s=encodeURIComponent(r(a))+n;return o(e[a])?i(e[a],(function(e){return s+encodeURIComponent(r(e))})).join(t):s+encodeURIComponent(r(e[a]))})).join(t):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var a=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){var r,o,i=n(11),a=n(12),s=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,f=t||[],l=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:o;if(null==l||null==d){var h=i();null==l&&(l=r=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==d&&(d=o=16383&(h[6]<<8|h[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),g=void 0!==e.nsecs?e.nsecs:u+1,v=p-s+(g-u)/1e4;if(v<0&&void 0===e.clockseq&&(d=d+1&16383),(v<0||p>s)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=p,u=g,o=d;var m=(1e4*(268435455&(p+=122192928e5))+g)%4294967296;f[c++]=m>>>24&255,f[c++]=m>>>16&255,f[c++]=m>>>8&255,f[c++]=255&m;var y=p/4294967296*1e4&268435455;f[c++]=y>>>8&255,f[c++]=255&y,f[c++]=y>>>24&15|16,f[c++]=y>>>16&255,f[c++]=d>>>8|128,f[c++]=255&d;for(var b=0;b<6;++b)f[c+b]=l[b];return t||a(f)}},function(e,t,n){var r=n(11),o=n(12);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[i+s]=a[s];return t||o(a)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(13),o=n(15),i=n(45),a=n(48),s=n(50),u=n(7),c=function(){function e(e){(0,a.supportsWebCrypto)((0,u.locateWindow)())?this.hash=new o.Sha256(e):(0,s.isMsWindow)((0,u.locateWindow)())?this.hash=new r.Sha256(e):this.hash=new i.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update(e,t)},e.prototype.digest=function(){return this.hash.digest()},e}();t.Sha256=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var r=n(59),o=void 0!==e&&e.from?function(t){return e.from(t,"utf8")}:r.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?o(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}).call(this,n(38).Buffer)},function(e,t,n){"use strict";(function(e){
|
|
22
|
+
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function h(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof m?Promise.resolve(n.value.v).then(u,c):f(i[0][2],n)}catch(e){f(i[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function f(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function x(e){return e&&e.__esModule?e:{default:e}}function A(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function k(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(39),o=n(14),i=n(20),a=n(5),s=function(){function e(e){e?(this.operation=function(e){return new Promise((function(t,n){var r=(0,a.locateWindow)().msCrypto.subtle.importKey("raw",u(e),o.SHA_256_HMAC_ALGO,!1,["sign"]);r.oncomplete=function(){r.result&&t(r.result),n(new Error("ImportKey completed without importing key."))},r.onerror=function(){n(new Error("ImportKey failed to import key."))}}))}(e).then((function(e){return(0,a.locateWindow)().msCrypto.subtle.sign(o.SHA_256_HMAC_ALGO,e)})),this.operation.catch((function(){}))):this.operation=Promise.resolve((0,a.locateWindow)().msCrypto.subtle.digest("SHA-256"))}return e.prototype.update=function(e){var t=this;(0,r.isEmptyData)(e)||(this.operation=this.operation.then((function(n){return n.onerror=function(){t.operation=Promise.reject(new Error("Error encountered updating hash"))},n.process(u(e)),n})),this.operation.catch((function(){})))},e.prototype.digest=function(){return this.operation.then((function(e){return new Promise((function(t,n){e.onerror=function(){n(new Error("Error encountered finalizing hash"))},e.oncomplete=function(){e.result&&t(new Uint8Array(e.result)),n(new Error("Error encountered finalizing hash"))},e.finish()}))}))},e}();function u(e){return"string"==typeof e?(0,i.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(40),o=n(14),i=n(5),a=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,n){(0,i.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e),o.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))}return e.prototype.update=function(e){if(!(0,r.isEmptyData)(e)){var t=(0,r.convertToBuffer)(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return(0,i.locateWindow)().crypto.subtle.sign(o.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,r.isEmptyData)(this.toHash)?Promise.resolve(o.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return(0,i.locateWindow)().crypto.subtle.digest(o.SHA_256_HASH,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e}();t.Sha256=a},function(e,t,n){"use strict";(function(e){
|
|
23
23
|
/*!
|
|
24
24
|
* The buffer module from node.js, for the browser.
|
|
25
25
|
*
|
|
26
26
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
27
27
|
* @license MIT
|
|
28
28
|
*/
|
|
29
|
-
var r=n(39),o=n(40),i=n(41);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=d(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n),o=(e=s(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|h(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):d(e,t);if("Buffer"===t.type&&i(t.data))return d(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t){if(f(t),e=s(e,t<0?0:0|h(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|h(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function h(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return D(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,n);case"utf8":case"utf-8":return O(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return L(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,o);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,o){var i,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var f=-1;for(i=n;i<s;i++)if(c(e,i)===c(t,-1===f?0:i-f)){if(-1===f&&(f=i),i-f+1===u)return f*a}else-1!==f&&(i-=i-f),f=-1}else for(n+u>s&&(n=s-u),i=n;i>=0;i--){for(var l=!0,d=0;d<u;d++)if(c(e,i+d)!==c(t,d)){l=!1;break}if(l)return i}return-1}function b(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function w(e,t,n,r){return q(F(t,e.length-n),e,n,r)}function _(e,t,n,r){return q(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function S(e,t,n,r){return _(e,t,n,r)}function E(e,t,n,r){return q(D(t),e,n,r)}function x(e,t,n,r){return q(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function O(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,s,u,c=e[o],f=null,l=c>239?4:c>223?3:c>191?2:1;if(o+l<=n)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&c)<<6|63&i)>127&&(f=u);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),o+=l}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return c(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return f(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return l(null,e)},u.allocUnsafeSlow=function(e){return l(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o),o+=a.length}return r},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?O(this,0,e):g.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,o){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),c=this.slice(r,o),f=e.slice(t,n),l=0;l<s;++l)if(c[l]!==f[l]){i=c[l],a=f[l];break}return i<a?-1:a<i?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return _(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function L(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function I(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=U(e[i]);return o}function C(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function P(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function T(e,t,n,r,o,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function j(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function R(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function M(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,r,i){return i||M(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function z(e,t,n,r,i){return i||M(e,0,n,8),o.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var o=t-e;n=new u(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},u.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||T(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||T(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):R(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);T(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);T(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):R(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||T(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return z(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return z(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var a=u.isBuffer(e)?e:F(new u(e,r).toString()),s=a.length;for(i=0;i<n-t;++i)this[i+t]=a[i%s]}return this};var B=/[^+\/0-9A-Za-z-_]/g;function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function D(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(B,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(10))},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),a=r[0],s=r[1],u=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),f=0,l=s>0?a-4:a;for(n=0;n<l;n+=4)t=o[e.charCodeAt(n)]<<18|o[e.charCodeAt(n+1)]<<12|o[e.charCodeAt(n+2)]<<6|o[e.charCodeAt(n+3)],u[f++]=t>>16&255,u[f++]=t>>8&255,u[f++]=255&t;2===s&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,u[f++]=255&t);1===s&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,u[f++]=t>>8&255,u[f++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;a<s;a+=16383)i.push(f(e,a,a+16383>s?s:a+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)r[s]=a[s],o[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function f(e,t,n){for(var o,i,a=[],s=t;s<n;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){
|
|
29
|
+
var r=n(42),o=n(43),i=n(44);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=d(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n),o=(e=s(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|h(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):d(e,t);if("Buffer"===t.type&&i(t.data))return d(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t){if(f(t),e=s(e,t<0?0:0|h(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|h(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function h(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return D(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function v(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return O(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,o);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,o){var i,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var f=-1;for(i=n;i<s;i++)if(c(e,i)===c(t,-1===f?0:i-f)){if(-1===f&&(f=i),i-f+1===u)return f*a}else-1!==f&&(i-=i-f),f=-1}else for(n+u>s&&(n=s-u),i=n;i>=0;i--){for(var l=!0,d=0;d<u;d++)if(c(e,i+d)!==c(t,d)){l=!1;break}if(l)return i}return-1}function b(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function w(e,t,n,r){return q(F(t,e.length-n),e,n,r)}function _(e,t,n,r){return q(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function S(e,t,n,r){return _(e,t,n,r)}function E(e,t,n,r){return q(D(t),e,n,r)}function x(e,t,n,r){return q(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function k(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,s,u,c=e[o],f=null,l=c>239?4:c>223?3:c>191?2:1;if(o+l<=n)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&c)<<6|63&i)>127&&(f=u);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),o+=l}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return c(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return f(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return l(null,e)},u.allocUnsafeSlow=function(e){return l(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o),o+=a.length}return r},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?k(this,0,e):v.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,o){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),c=this.slice(r,o),f=e.slice(t,n),l=0;l<s;++l)if(c[l]!==f[l]){i=c[l],a=f[l];break}return i<a?-1:a<i?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return _(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function O(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function L(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=z(e[i]);return o}function T(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function I(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function C(e,t,n,r,o,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function j(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function R(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function M(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,r,i){return i||M(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,i){return i||M(e,0,n,8),o.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var o=t-e;n=new u(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},u.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||C(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||C(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||C(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||C(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||C(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||C(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):R(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||C(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);C(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);C(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||C(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||C(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||C(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||C(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):R(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||C(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var a=u.isBuffer(e)?e:F(new u(e,r).toString()),s=a.length;for(i=0;i<n-t;++i)this[i+t]=a[i%s]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function z(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function D(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(10))},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return f})),n.d(t,"__generator",(function(){return l})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return h})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return g})),n.d(t,"__spreadArrays",(function(){return y})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return b})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return _})),n.d(t,"__makeTemplateObject",(function(){return S})),n.d(t,"__importStar",(function(){return E})),n.d(t,"__importDefault",(function(){return x})),n.d(t,"__classPrivateFieldGet",(function(){return A})),n.d(t,"__classPrivateFieldSet",(function(){return k}));
|
|
30
|
+
/*! *****************************************************************************
|
|
31
|
+
Copyright (c) Microsoft Corporation.
|
|
32
|
+
|
|
33
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
34
|
+
purpose with or without fee is hereby granted.
|
|
35
|
+
|
|
36
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
37
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
38
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
39
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
40
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
41
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
42
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
43
|
+
***************************************************************************** */
|
|
44
|
+
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function h(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof m?Promise.resolve(n.value.v).then(u,c):f(i[0][2],n)}catch(e){f(i[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function f(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function x(e){return e&&e.__esModule?e:{default:e}}function A(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function k(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return f})),n.d(t,"__generator",(function(){return l})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return h})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return g})),n.d(t,"__spreadArrays",(function(){return y})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return b})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return _})),n.d(t,"__makeTemplateObject",(function(){return S})),n.d(t,"__importStar",(function(){return E})),n.d(t,"__importDefault",(function(){return x})),n.d(t,"__classPrivateFieldGet",(function(){return A})),n.d(t,"__classPrivateFieldSet",(function(){return k}));
|
|
45
|
+
/*! *****************************************************************************
|
|
46
|
+
Copyright (c) Microsoft Corporation.
|
|
47
|
+
|
|
48
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
49
|
+
purpose with or without fee is hereby granted.
|
|
50
|
+
|
|
51
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
52
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
53
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
54
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
55
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
56
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
57
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
58
|
+
***************************************************************************** */
|
|
59
|
+
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function h(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof m?Promise.resolve(n.value.v).then(u,c):f(i[0][2],n)}catch(e){f(i[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function f(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function x(e){return e&&e.__esModule?e:{default:e}}function A(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function k(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return o}));var r=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}},function(e,t,n){var r=n(35),o=n(36),i=o;i.v1=r,i.v4=o,e.exports=i},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),o=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":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var o=e.getVersionPrecision(t),i=e.getVersionPrecision(n),a=Math.max(o,i),s=0,u=e.map([t,n],(function(t){var n=a-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(s=a-Math.min(o,i)),a-=1;a>=s;){if(u[0][a]>u[1][a])return 1;if(u[0][a]===u[1][a]){if(a===s)return 0;a-=1}else if(u[0][a]<u[1][a])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var o=e[n];if(t(o,n))return o}},e.assign=function(e){for(var t,n,r=e,o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];if(Object.assign)return Object.assign.apply(Object,[e].concat(i));var s=function(){var e=i[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=i.length;t<n;t+=1)s();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=o,e.exports=t.default},18:function(e,t,n){"use strict";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){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(91))&&r.__esModule?r:{default:r},i=n(18);function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(){function e(){}var t,n;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 o.default(e,t)},e.parse=function(e){return new o.default(e).getResult()},t=e,(n=[{key:"BROWSER_MAP",get:function(){return i.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return i.ENGINE_MAP}},{key:"OS_MAP",get:function(){return i.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return i.PLATFORMS_MAP}}])&&a(t,n),e}();t.default=s,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(92)),o=u(n(93)),i=u(n(94)),a=u(n(95)),s=u(n(17));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=s.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=s.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=s.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=s.default.find(a.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return s.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,o={},i=0;if(Object.keys(e).forEach((function(t){var a=e[t];"string"==typeof a?(o[t]=a,i+=1):"object"==typeof a&&(n[t]=a,r+=1)})),r>0){var a=Object.keys(n),u=s.default.find(a,(function(e){return t.isOS(e)}));if(u){var c=this.satisfies(n[u]);if(void 0!==c)return c}var f=s.default.find(a,(function(e){return t.isPlatform(e)}));if(f){var l=this.satisfies(n[f]);if(void 0!==l)return l}}if(i>0){var d=Object.keys(o),h=s.default.find(d,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(o[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),o=s.default.getBrowserTypeByAlias(r);return t&&o&&(r=o.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,o=this.getBrowserVersion();if("string"==typeof o)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(o,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=c,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=o.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=o.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=o.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=o.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,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=o.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=o.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=o.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=o.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=o.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=o.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=o.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=o.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=o.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=o.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=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(i,e)||o.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=o.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=o.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=o.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=o.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=o.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=o.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=o.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=o.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=o.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=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:o.default.getFirstMatch(t,e),version:o.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:[/Roku\/DVP/],describe:function(e){var t=o.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:i.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=o.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=o.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=o.default.getWindowsVersionName(t);return{name:i.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:i.OS_MAP.iOS},n=o.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=o.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=o.default.getMacOSVersionName(t),r={name:i.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=o.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:i.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=o.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=o.default.getAndroidVersionName(t),r={name:i.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=o.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:i.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=o.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||o.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||o.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:i.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=o.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=o.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:i.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:i.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=o.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=o.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:i.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:i.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=o.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:i.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:i.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:i.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:i.ENGINE_MAP.Blink};var t=o.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:i.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:i.ENGINE_MAP.Trident},n=o.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:i.ENGINE_MAP.Presto},n=o.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:i.ENGINE_MAP.Gecko},n=o.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:i.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:i.ENGINE_MAP.WebKit},n=o.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=a,e.exports=t.default}})},function(e){e.exports=JSON.parse('{"name":"@aws-sdk/client-cloudwatch-logs","description":"AWS SDK for JavaScript Cloudwatch Logs Client for Node.js, Browser and React Native","version":"3.6.1","scripts":{"clean":"yarn remove-definitions && yarn remove-dist && yarn remove-documentation","build-documentation":"yarn remove-documentation && typedoc ./","prepublishOnly":"yarn build","pretest":"yarn build:cjs","remove-definitions":"rimraf ./types","remove-dist":"rimraf ./dist","remove-documentation":"rimraf ./docs","test":"exit 0","build:cjs":"tsc -p tsconfig.json","build:es":"tsc -p tsconfig.es.json","build":"yarn build:cjs && yarn build:es","postbuild":"downlevel-dts types types/ts3.4"},"main":"./dist/cjs/index.js","types":"./types/index.d.ts","module":"./dist/es/index.js","browser":{"./runtimeConfig":"./runtimeConfig.browser"},"react-native":{"./runtimeConfig":"./runtimeConfig.native"},"sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"^1.0.0","@aws-crypto/sha256-js":"^1.0.0","@aws-sdk/config-resolver":"3.6.1","@aws-sdk/credential-provider-node":"3.6.1","@aws-sdk/fetch-http-handler":"3.6.1","@aws-sdk/hash-node":"3.6.1","@aws-sdk/invalid-dependency":"3.6.1","@aws-sdk/middleware-content-length":"3.6.1","@aws-sdk/middleware-host-header":"3.6.1","@aws-sdk/middleware-logger":"3.6.1","@aws-sdk/middleware-retry":"3.6.1","@aws-sdk/middleware-serde":"3.6.1","@aws-sdk/middleware-signing":"3.6.1","@aws-sdk/middleware-stack":"3.6.1","@aws-sdk/middleware-user-agent":"3.6.1","@aws-sdk/node-config-provider":"3.6.1","@aws-sdk/node-http-handler":"3.6.1","@aws-sdk/protocol-http":"3.6.1","@aws-sdk/smithy-client":"3.6.1","@aws-sdk/types":"3.6.1","@aws-sdk/url-parser":"3.6.1","@aws-sdk/url-parser-native":"3.6.1","@aws-sdk/util-base64-browser":"3.6.1","@aws-sdk/util-base64-node":"3.6.1","@aws-sdk/util-body-length-browser":"3.6.1","@aws-sdk/util-body-length-node":"3.6.1","@aws-sdk/util-user-agent-browser":"3.6.1","@aws-sdk/util-user-agent-node":"3.6.1","@aws-sdk/util-utf8-browser":"3.6.1","@aws-sdk/util-utf8-node":"3.6.1","tslib":"^2.0.0"},"devDependencies":{"@aws-sdk/client-documentation-generator":"3.6.1","@types/node":"^12.7.5","downlevel-dts":"0.7.0","jest":"^26.1.0","rimraf":"^3.0.0","typedoc":"^0.19.2","typescript":"~4.1.2"},"engines":{"node":">=10.0.0"},"typesVersions":{"<4.0":{"types/*":["types/ts3.4/*"]}},"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-cloudwatch-logs","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-cloudwatch-logs"}}')},function(e){e.exports=JSON.parse('{"name":"@aws-sdk/client-cognito-identity","description":"AWS SDK for JavaScript Cognito Identity Client for Node.js, Browser and React Native","version":"3.6.1","scripts":{"clean":"yarn remove-definitions && yarn remove-dist && yarn remove-documentation","build-documentation":"yarn remove-documentation && typedoc ./","prepublishOnly":"yarn build","pretest":"yarn build:cjs","remove-definitions":"rimraf ./types","remove-dist":"rimraf ./dist","remove-documentation":"rimraf ./docs","test:unit":"mocha **/cjs/**/*.spec.js","test:e2e":"mocha **/cjs/**/*.ispec.js && karma start karma.conf.js","test":"yarn test:unit","build:cjs":"tsc -p tsconfig.json","build:es":"tsc -p tsconfig.es.json","build":"yarn build:cjs && yarn build:es","postbuild":"downlevel-dts types types/ts3.4"},"main":"./dist/cjs/index.js","types":"./types/index.d.ts","module":"./dist/es/index.js","browser":{"./runtimeConfig":"./runtimeConfig.browser"},"react-native":{"./runtimeConfig":"./runtimeConfig.native"},"sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"^1.0.0","@aws-crypto/sha256-js":"^1.0.0","@aws-sdk/config-resolver":"3.6.1","@aws-sdk/credential-provider-node":"3.6.1","@aws-sdk/fetch-http-handler":"3.6.1","@aws-sdk/hash-node":"3.6.1","@aws-sdk/invalid-dependency":"3.6.1","@aws-sdk/middleware-content-length":"3.6.1","@aws-sdk/middleware-host-header":"3.6.1","@aws-sdk/middleware-logger":"3.6.1","@aws-sdk/middleware-retry":"3.6.1","@aws-sdk/middleware-serde":"3.6.1","@aws-sdk/middleware-signing":"3.6.1","@aws-sdk/middleware-stack":"3.6.1","@aws-sdk/middleware-user-agent":"3.6.1","@aws-sdk/node-config-provider":"3.6.1","@aws-sdk/node-http-handler":"3.6.1","@aws-sdk/protocol-http":"3.6.1","@aws-sdk/smithy-client":"3.6.1","@aws-sdk/types":"3.6.1","@aws-sdk/url-parser":"3.6.1","@aws-sdk/url-parser-native":"3.6.1","@aws-sdk/util-base64-browser":"3.6.1","@aws-sdk/util-base64-node":"3.6.1","@aws-sdk/util-body-length-browser":"3.6.1","@aws-sdk/util-body-length-node":"3.6.1","@aws-sdk/util-user-agent-browser":"3.6.1","@aws-sdk/util-user-agent-node":"3.6.1","@aws-sdk/util-utf8-browser":"3.6.1","@aws-sdk/util-utf8-node":"3.6.1","tslib":"^2.0.0"},"devDependencies":{"@aws-sdk/client-documentation-generator":"3.6.1","@aws-sdk/client-iam":"3.6.1","@types/chai":"^4.2.11","@types/mocha":"^8.0.4","@types/node":"^12.7.5","downlevel-dts":"0.7.0","jest":"^26.1.0","rimraf":"^3.0.0","typedoc":"^0.19.2","typescript":"~4.1.2"},"engines":{"node":">=10.0.0"},"typesVersions":{"<4.0":{"types/*":["types/ts3.4/*"]}},"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-cognito-identity","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-cognito-identity"}}')},function(e,t,n){e.exports=n(65).Observable},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],f=!1,l=-1;function d(){f&&u&&(f=!1,u.length?c=u.concat(c):l=-1,c.length&&h())}function h(){if(!f){var e=s(d);f=!0;for(var t=c.length;t;){for(u=c,c=[];++l<t;)u&&u[l].run();l=-1,t=c.length}u=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||f||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8),o=n(9),i=n(28),a=n(67),s=function(){function e(e){if(this.hash=new i.RawSha256,e){this.outer=new i.RawSha256;var t=function(e){var t=u(e);if(t.byteLength>o.BLOCK_SIZE){var n=new i.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(o.BLOCK_SIZE);return r.set(t),r}(e),n=new Uint8Array(o.BLOCK_SIZE);n.set(t);for(var r=0;r<o.BLOCK_SIZE;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(r=0;r<t.byteLength;r++)t[r]=0}}return e.prototype.update=function(e){if(!function(e){if("string"==typeof e)return 0===e.length;return 0===e.byteLength}(e)&&!this.error)try{this.hash.update(u(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 r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,this.digestSync()]}))}))},e}();function u(e){return"string"==typeof e?a.fromUtf8(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),o=function(){function e(){this.state=Int32Array.from(r.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>r.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===r.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%r.BLOCK_SIZE>=r.BLOCK_SIZE-8){for(var o=this.bufferLength;o<r.BLOCK_SIZE;o++)t.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(o=this.bufferLength;o<r.BLOCK_SIZE-8;o++)t.setUint8(o,0);t.setUint32(r.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(r.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(r.DIGEST_LENGTH);for(o=0;o<8;o++)i[4*o]=this.state[o]>>>24&255,i[4*o+1]=this.state[o]>>>16&255,i[4*o+2]=this.state[o]>>>8&255,i[4*o+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],o=t[1],i=t[2],a=t[3],s=t[4],u=t[5],c=t[6],f=t[7],l=0;l<r.BLOCK_SIZE;l++){if(l<16)this.temp[l]=(255&e[4*l])<<24|(255&e[4*l+1])<<16|(255&e[4*l+2])<<8|255&e[4*l+3];else{var d=this.temp[l-2],h=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,p=((d=this.temp[l-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[l]=(h+this.temp[l-7]|0)+(p+this.temp[l-16]|0)}var v=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&u^~s&c)|0)+(f+(r.KEY[l]+this.temp[l]|0)|0)|0,g=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&o^n&i^o&i)|0;f=c,c=u,u=s,s=a+v|0,a=i,i=o,o=n,n=v+g|0}t[0]+=n,t[1]+=o,t[2]+=i,t[3]+=a,t[4]+=s,t[5]+=u,t[6]+=c,t[7]+=f},e}();t.RawSha256=o},function(e,t,n){(function(e,r){var o;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(i){t&&t.nodeType,e&&e.nodeType;var a="object"==typeof r&&r;a.global!==a&&a.window!==a&&a.self;var s,u=2147483647,c=/^xn--/,f=/[^\x20-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,p=String.fromCharCode;function v(e){throw new RangeError(d[e])}function g(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function y(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+g((e=e.replace(l,".")).split("."),t).join(".")}function m(e){for(var t,n,r=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function b(e){return g(e,(function(e){var t="";return e>65535&&(t+=p((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=p(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function _(e,t,n){var r=0;for(e=n?h(e/700):e>>1,e+=h(e/t);e>455;r+=36)e=h(e/35);return h(r+36*e/(e+38))}function S(e){var t,n,r,o,i,a,s,c,f,l,d,p=[],g=e.length,y=0,m=128,w=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&v("not-basic"),p.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<g;){for(i=y,a=1,s=36;o>=g&&v("invalid-input"),((c=(d=e.charCodeAt(o++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:36)>=36||c>h((u-y)/a))&&v("overflow"),y+=c*a,!(c<(f=s<=w?1:s>=w+26?26:s-w));s+=36)a>h(u/(l=36-f))&&v("overflow"),a*=l;w=_(y-i,t=p.length+1,0==i),h(y/t)>u-m&&v("overflow"),m+=h(y/t),y%=t,p.splice(y++,0,m)}return b(p)}function E(e){var t,n,r,o,i,a,s,c,f,l,d,g,y,b,S,E=[];for(g=(e=m(e)).length,t=128,n=0,i=72,a=0;a<g;++a)(d=e[a])<128&&E.push(p(d));for(r=o=E.length,o&&E.push("-");r<g;){for(s=u,a=0;a<g;++a)(d=e[a])>=t&&d<s&&(s=d);for(s-t>h((u-n)/(y=r+1))&&v("overflow"),n+=(s-t)*y,t=s,a=0;a<g;++a)if((d=e[a])<t&&++n>u&&v("overflow"),d==t){for(c=n,f=36;!(c<(l=f<=i?1:f>=i+26?26:f-i));f+=36)S=c-l,b=36-l,E.push(p(w(l+S%b,0))),c=h(S/b);E.push(p(w(c,0))),i=_(n,y,r==o),n=0,++r}++n,++t}return E.join("")}s={version:"1.4.1",ucs2:{decode:m,encode:b},decode:S,encode:E,toASCII:function(e){return y(e,(function(e){return f.test(e)?"xn--"+E(e):e}))},toUnicode:function(e){return y(e,(function(e){return c.test(e)?S(e.slice(4).toLowerCase()):e}))}},void 0===(o=function(){return s}.call(t,n,t,e))||(e.exports=o)}()}).call(this,n(30)(e),n(10))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(33),t.encode=t.stringify=n(34)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,i){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var f=0;f<c;++f){var l,d,h,p,v=e[f].replace(s,"%20"),g=v.indexOf(n);g>=0?(l=v.substr(0,g),d=v.substr(g+1)):(l=v,d=""),h=decodeURIComponent(l),p=decodeURIComponent(d),r(a,h)?o(a[h])?a[h].push(p):a[h]=[a[h],p]:a[h]=p}return a};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?i(a(e),(function(a){var s=encodeURIComponent(r(a))+n;return o(e[a])?i(e[a],(function(e){return s+encodeURIComponent(r(e))})).join(t):s+encodeURIComponent(r(e[a]))})).join(t):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var a=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){var r,o,i=n(11),a=n(12),s=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,f=t||[],l=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:o;if(null==l||null==d){var h=i();null==l&&(l=r=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==d&&(d=o=16383&(h[6]<<8|h[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:u+1,g=p-s+(v-u)/1e4;if(g<0&&void 0===e.clockseq&&(d=d+1&16383),(g<0||p>s)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=p,u=v,o=d;var y=(1e4*(268435455&(p+=122192928e5))+v)%4294967296;f[c++]=y>>>24&255,f[c++]=y>>>16&255,f[c++]=y>>>8&255,f[c++]=255&y;var m=p/4294967296*1e4&268435455;f[c++]=m>>>8&255,f[c++]=255&m,f[c++]=m>>>24&15|16,f[c++]=m>>>16&255,f[c++]=d>>>8|128,f[c++]=255&d;for(var b=0;b<6;++b)f[c+b]=l[b];return t||a(f)}},function(e,t,n){var r=n(11),o=n(12);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[i+s]=a[s];return t||o(a)}},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return f})),n.d(t,"__generator",(function(){return l})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return h})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return g})),n.d(t,"__spreadArrays",(function(){return y})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return b})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return _})),n.d(t,"__makeTemplateObject",(function(){return S})),n.d(t,"__importStar",(function(){return E})),n.d(t,"__importDefault",(function(){return x})),n.d(t,"__classPrivateFieldGet",(function(){return A})),n.d(t,"__classPrivateFieldSet",(function(){return k}));
|
|
60
|
+
/*! *****************************************************************************
|
|
61
|
+
Copyright (c) Microsoft Corporation.
|
|
62
|
+
|
|
63
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
64
|
+
purpose with or without fee is hereby granted.
|
|
65
|
+
|
|
66
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
67
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
68
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
69
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
70
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
71
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
72
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
73
|
+
***************************************************************************** */
|
|
74
|
+
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function h(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof m?Promise.resolve(n.value.v).then(u,c):f(i[0][2],n)}catch(e){f(i[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function f(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function x(e){return e&&e.__esModule?e:{default:e}}function A(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function k(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(13),o=n(15),i=n(48),a=n(56),s=n(58),u=n(5),c=function(){function e(e){(0,a.supportsWebCrypto)((0,u.locateWindow)())?this.hash=new o.Sha256(e):(0,s.isMsWindow)((0,u.locateWindow)())?this.hash=new r.Sha256(e):this.hash=new i.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update(e,t)},e.prototype.digest=function(){return this.hash.digest()},e}();t.Sha256=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var r=n(41);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(45);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(46);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(47);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var r=n(20),o=void 0!==e&&e.from?function(t){return e.from(t,"utf8")}:r.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?o(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}).call(this,n(16).Buffer)},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),a=r[0],s=r[1],u=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),f=0,l=s>0?a-4:a;for(n=0;n<l;n+=4)t=o[e.charCodeAt(n)]<<18|o[e.charCodeAt(n+1)]<<12|o[e.charCodeAt(n+2)]<<6|o[e.charCodeAt(n+3)],u[f++]=t>>16&255,u[f++]=t>>8&255,u[f++]=255&t;2===s&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,u[f++]=255&t);1===s&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,u[f++]=t>>8&255,u[f++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;a<s;a+=16383)i.push(f(e,a,a+16383>s?s:a+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)r[s]=a[s],o[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function f(e,t,n){for(var o,i,a=[],s=t;s<n;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){
|
|
30
75
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
31
|
-
t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,u=(1<<s)-1,c=u>>1,f=-7,l=n?o-1:0,d=n?-1:1,h=e[t+l];for(l+=d,i=h&(1<<-f)-1,h>>=-f,f+=s;f>0;i=256*i+e[t+l],l+=d,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=r;f>0;a=256*a+e[t+l],l+=d,f-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),i-=c}return(h?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,u,c=8*i-o-1,f=(1<<c)-1,l=f>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+l>=1?d/u:d*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(t*u-1)*Math.pow(2,o),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;e[n+h]=255&s,h+=p,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[n+h]=255&a,h+=p,a/=256,c-=8);e[n+h-p]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0<e.length;)t[0]=e[0];return t}return Uint32Array.from(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(0).__exportStar)(n(46),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(0),o=n(17),i=n(47),a=n(16),s=function(){function e(e){if(this.hash=new i.RawSha256,e){this.outer=new i.RawSha256;var t=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>o.BLOCK_SIZE){var n=new i.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(o.BLOCK_SIZE);return r.set(t),r}(e),n=new Uint8Array(o.BLOCK_SIZE);n.set(t);for(var r=0;r<o.BLOCK_SIZE;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(r=0;r<t.byteLength;r++)t[r]=0}}return e.prototype.update=function(e){if(!(0,a.isEmptyData)(e)&&!this.error)try{this.hash.update((0,a.convertToBuffer)(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return(0,r.__awaiter)(this,void 0,void 0,(function(){return(0,r.__generator)(this,(function(e){return[2,this.digestSync()]}))}))},e}();t.Sha256=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(17),o=function(){function e(){this.state=Int32Array.from(r.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>r.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===r.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%r.BLOCK_SIZE>=r.BLOCK_SIZE-8){for(var o=this.bufferLength;o<r.BLOCK_SIZE;o++)t.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(o=this.bufferLength;o<r.BLOCK_SIZE-8;o++)t.setUint8(o,0);t.setUint32(r.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(r.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(r.DIGEST_LENGTH);for(o=0;o<8;o++)i[4*o]=this.state[o]>>>24&255,i[4*o+1]=this.state[o]>>>16&255,i[4*o+2]=this.state[o]>>>8&255,i[4*o+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],o=t[1],i=t[2],a=t[3],s=t[4],u=t[5],c=t[6],f=t[7],l=0;l<r.BLOCK_SIZE;l++){if(l<16)this.temp[l]=(255&e[4*l])<<24|(255&e[4*l+1])<<16|(255&e[4*l+2])<<8|255&e[4*l+3];else{var d=this.temp[l-2],h=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,p=((d=this.temp[l-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[l]=(h+this.temp[l-7]|0)+(p+this.temp[l-16]|0)}var g=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&u^~s&c)|0)+(f+(r.KEY[l]+this.temp[l]|0)|0)|0,v=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&o^n&i^o&i)|0;f=c,c=u,u=s,s=a+g|0,a=i,i=o,o=n,n=g+v|0}t[0]+=n,t[1]+=o,t[2]+=i,t[3]+=a,t[4]+=s,t[5]+=u,t[6]+=c,t[7]+=f},e}();t.RawSha256=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(0).__exportStar(n(49),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsZeroByteGCM=t.supportsSubtleCrypto=t.supportsSecureRandom=t.supportsWebCrypto=void 0;var r=n(0),o=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function i(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function a(e){return e&&o.every((function(t){return"function"==typeof e[t]}))}t.supportsWebCrypto=function(e){return!(!i(e)||"object"!=typeof e.crypto.subtle)&&a(e.crypto.subtle)},t.supportsSecureRandom=i,t.supportsSubtleCrypto=a,t.supportsZeroByteGCM=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(n){switch(n.label){case 0:if(!a(e))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=n.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===n.sent().byteLength];case 4:return n.sent(),[2,!1];case 5:return[2]}}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);r.__exportStar(n(51),t),r.__exportStar(n(52),t),r.__exportStar(n(53),t),r.__exportStar(n(54),t),r.__exportStar(n(55),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var r=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,n=t.getRandomValues,o=t.subtle;return r.map((function(e){return o[e]})).concat(n).every((function(e){return"function"==typeof e}))}return!1}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}Object.defineProperty(t,"__esModule",{value:!0}),t.Observable=void 0;var a=function(){return"function"==typeof Symbol},s=function(e){return a()&&Boolean(Symbol[e])},u=function(e){return s(e)?Symbol[e]:"@@"+e};a()&&!s("observable")&&(Symbol.observable=Symbol("observable"));var c=u("iterator"),f=u("observable"),l=u("species");function d(e,t){var n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function h(e){var t=e.constructor;return void 0!==t&&null===(t=t[l])&&(t=void 0),void 0!==t?t:E}function p(e){return e instanceof E}function g(e){g.log?g.log(e):setTimeout((function(){throw e}))}function v(e){Promise.resolve().then((function(){try{e()}catch(e){g(e)}}))}function m(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var n=d(t,"unsubscribe");n&&n.call(t)}}catch(e){g(e)}}function y(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function b(e,t,n){e._state="running";var r=e._observer;try{var o=d(r,t);switch(t){case"next":o&&o.call(r,n);break;case"error":if(y(e),!o)throw n;o.call(r,n);break;case"complete":y(e),o&&o.call(r)}}catch(e){g(e)}"closed"===e._state?m(e):"running"===e._state&&(e._state="ready")}function w(e,t,n){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:n}],void v((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var n=0;n<t.length&&(b(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}(e)}))):void b(e,t,n);e._queue.push({type:t,value:n})}}var _=function(){function e(t,n){r(this,e),this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";var o=new S(this);try{this._cleanup=n.call(void 0,o)}catch(e){o.error(e)}"initializing"===this._state&&(this._state="ready")}return i(e,[{key:"unsubscribe",value:function(){"closed"!==this._state&&(y(this),m(this))}},{key:"closed",get:function(){return"closed"===this._state}}]),e}(),S=function(){function e(t){r(this,e),this._subscription=t}return i(e,[{key:"next",value:function(e){w(this._subscription,"next",e)}},{key:"error",value:function(e){w(this._subscription,"error",e)}},{key:"complete",value:function(){w(this._subscription,"complete")}},{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),E=function(){function e(t){if(r(this,e),!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}return i(e,[{key:"subscribe",value:function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new _(e,this._subscriber)}},{key:"forEach",value:function(e){var t=this;return new Promise((function(n,r){if("function"==typeof e)var o=t.subscribe({next:function(t){try{e(t,i)}catch(e){r(e),o.unsubscribe()}},error:r,complete:n});else r(new TypeError(e+" is not a function"));function i(){o.unsubscribe(),n()}}))}},{key:"map",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(h(this))((function(n){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))}},{key:"filter",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(h(this))((function(n){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))}},{key:"reduce",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=h(this),r=arguments.length>1,o=!1,i=arguments[1],a=i;return new n((function(n){return t.subscribe({next:function(t){var i=!o;if(o=!0,!i||r)try{a=e(a,t)}catch(e){return n.error(e)}else a=t},error:function(e){n.error(e)},complete:function(){if(!o&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(a),n.complete()}})}))}},{key:"concat",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=h(this);return new o((function(t){var r,i=0;return function e(a){r=a.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){i===n.length?(r=void 0,t.complete()):e(o.from(n[i++]))}})}(e),function(){r&&(r.unsubscribe(),r=void 0)}}))}},{key:"flatMap",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=h(this);return new n((function(r){var o=[],i=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return r.error(e)}var i=n.from(t).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var e=o.indexOf(i);e>=0&&o.splice(e,1),a()}});o.push(i)},error:function(e){r.error(e)},complete:function(){a()}});function a(){i.closed&&0===o.length&&r.complete()}return function(){o.forEach((function(e){return e.unsubscribe()})),i.unsubscribe()}}))}},{key:f,value:function(){return this}}],[{key:"from",value:function(t){var n="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var r=d(t,f);if(r){var o=r.call(t);if(Object(o)!==o)throw new TypeError(o+" is not an object");return p(o)&&o.constructor===n?o:new n((function(e){return o.subscribe(e)}))}if(s("iterator")&&(r=d(t,c)))return new n((function(e){v((function(){if(!e.closed){var n=!0,o=!1,i=void 0;try{for(var a,s=r.call(t)[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var u=a.value;if(e.next(u),e.closed)return}}catch(e){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}e.complete()}}))}));if(Array.isArray(t))return new n((function(e){v((function(){if(!e.closed){for(var n=0;n<t.length;++n)if(e.next(t[n]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")}},{key:"of",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o="function"==typeof this?this:e;return new o((function(e){v((function(){if(!e.closed){for(var t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}}))}))}},{key:l,get:function(){return this}}]),e}();t.Observable=E,a()&&Object.defineProperty(E,Symbol("extensions"),{value:{symbol:f,hostReportError:g},configurable:!0})},function(e,t,n){"use strict";n.r(t),n.d(t,"AmplifyClass",(function(){return y})),n.d(t,"ClientDevice",(function(){return x})),n.d(t,"ConsoleLogger",(function(){return g})),n.d(t,"Logger",(function(){return g})),n.d(t,"missingConfig",(function(){return A})),n.d(t,"invalidParameter",(function(){return O})),n.d(t,"Hub",(function(){return T})),n.d(t,"I18n",(function(){return B})),n.d(t,"isEmpty",(function(){return U.e})),n.d(t,"sortByField",(function(){return U.k})),n.d(t,"objectLessAttributes",(function(){return U.j})),n.d(t,"filenameToContentType",(function(){return U.c})),n.d(t,"isTextFile",(function(){return U.g})),n.d(t,"generateRandomString",(function(){return U.d})),n.d(t,"makeQuerablePromise",(function(){return U.i})),n.d(t,"isWebWorker",(function(){return U.h})),n.d(t,"browserOrNode",(function(){return U.b})),n.d(t,"transferKeyToLowerCase",(function(){return U.l})),n.d(t,"transferKeyToUpperCase",(function(){return U.m})),n.d(t,"isStrictObject",(function(){return U.f})),n.d(t,"JS",(function(){return U.a})),n.d(t,"Signer",(function(){return ue})),n.d(t,"parseMobileHubConfig",(function(){return le})),n.d(t,"Parser",(function(){return de})),n.d(t,"AWSCloudWatchProvider",(function(){return Dc})),n.d(t,"FacebookOAuth",(function(){return Bi})),n.d(t,"GoogleOAuth",(function(){return zi})),n.d(t,"Linking",(function(){return qc})),n.d(t,"AppState",(function(){return Gc})),n.d(t,"AsyncStorage",(function(){return Hc})),n.d(t,"Credentials",(function(){return Mc})),n.d(t,"CredentialsClass",(function(){return Rc})),n.d(t,"ServiceWorker",(function(){return $c})),n.d(t,"StorageHelper",(function(){return vi})),n.d(t,"MemoryStorage",(function(){return gi})),n.d(t,"UniversalStorage",(function(){return Xc})),n.d(t,"Platform",(function(){return w})),n.d(t,"getAmplifyUserAgent",(function(){return _})),n.d(t,"INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER",(function(){return ef})),n.d(t,"INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER",(function(){return tf})),n.d(t,"USER_AGENT_HEADER",(function(){return nf})),n.d(t,"Constants",(function(){return lf})),n.d(t,"NonRetryableError",(function(){return Ei})),n.d(t,"retry",(function(){return xi})),n.d(t,"jitteredBackoff",(function(){return Ai})),n.d(t,"jitteredExponentialRetry",(function(){return Oi})),n.d(t,"Mutex",(function(){return rf})),n.d(t,"Reachability",(function(){return uf})),n.d(t,"DateUtils",(function(){return V})),n.d(t,"urlSafeEncode",(function(){return cf})),n.d(t,"urlSafeDecode",(function(){return ff})),n.d(t,"AWS_CLOUDWATCH_BASE_BUFFER_SIZE",(function(){return o})),n.d(t,"AWS_CLOUDWATCH_CATEGORY",(function(){return s})),n.d(t,"AWS_CLOUDWATCH_MAX_BATCH_EVENT_SIZE",(function(){return i})),n.d(t,"AWS_CLOUDWATCH_MAX_EVENT_SIZE",(function(){return a})),n.d(t,"AWS_CLOUDWATCH_PROVIDER_NAME",(function(){return u})),n.d(t,"NO_CREDS_ERROR_STRING",(function(){return c})),n.d(t,"RETRY_ERROR_CODES",(function(){return f})),n.d(t,"Amplify",(function(){return b}));var r,o=26,i=1048576,a=256e3,s="Logging",u="AWSCloudWatch",c="No credentials",f=["ResourceNotFoundException","InvalidSequenceTokenException"],l=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},d=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},h=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(d(arguments[t]));return e},p={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5};!function(e){e.DEBUG="DEBUG",e.ERROR="ERROR",e.INFO="INFO",e.WARN="WARN",e.VERBOSE="VERBOSE"}(r||(r={}));var g=function(){function e(e,t){void 0===t&&(t=r.WARN),this.name=e,this.level=t,this._pluggables=[]}return e.prototype._padding=function(e){return e<10?"0"+e:""+e},e.prototype._ts=function(){var e=new Date;return[this._padding(e.getMinutes()),this._padding(e.getSeconds())].join(":")+"."+e.getMilliseconds()},e.prototype.configure=function(e){return e?(this._config=e,this._config):this._config},e.prototype._log=function(t){for(var n,o,i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];var s=this.level;e.LOG_LEVEL&&(s=e.LOG_LEVEL),"undefined"!=typeof window&&window.LOG_LEVEL&&(s=window.LOG_LEVEL);var u=p[s],c=p[t];if(c>=u){var f=console.log.bind(console);t===r.ERROR&&console.error&&(f=console.error.bind(console)),t===r.WARN&&console.warn&&(f=console.warn.bind(console));var d="["+t+"] "+this._ts()+" "+this.name,h="";if(1===i.length&&"string"==typeof i[0])f(h=d+" - "+i[0]);else if(1===i.length)h=d+" "+i[0],f(d,i[0]);else if("string"==typeof i[0]){var g=i.slice(1);1===g.length&&(g=g[0]),h=d+" - "+i[0]+" "+g,f(d+" - "+i[0],g)}else h=d+" "+i,f(d,i);try{for(var v=l(this._pluggables),m=v.next();!m.done;m=v.next()){var y=m.value,b={message:h,timestamp:Date.now()};y.pushLogs([b])}}catch(e){n={error:e}}finally{try{m&&!m.done&&(o=v.return)&&o.call(v)}finally{if(n)throw n.error}}}},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,h([r.INFO],e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,h([r.INFO],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,h([r.WARN],e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,h([r.ERROR],e))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,h([r.DEBUG],e))},e.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,h([r.VERBOSE],e))},e.prototype.addPluggable=function(e){e&&e.getCategoryName()===s&&(this._pluggables.push(e),e.configure(this._config))},e.prototype.listPluggables=function(){return this._pluggables},e.LOG_LEVEL=null,e}(),v=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},m=new g("Amplify"),y=function(){function e(){this._components=[],this._config={},this._modules={},this.Auth=null,this.Analytics=null,this.API=null,this.Credentials=null,this.Storage=null,this.I18n=null,this.Cache=null,this.PubSub=null,this.Interactions=null,this.Pushnotification=null,this.UI=null,this.XR=null,this.Predictions=null,this.DataStore=null,this.Geo=null,this.Logger=g,this.ServiceWorker=null}return e.prototype.register=function(e){m.debug("component registered in amplify",e),this._components.push(e),"function"==typeof e.getModuleName?(this._modules[e.getModuleName()]=e,this[e.getModuleName()]=e):m.debug("no getModuleName method for component",e),e.configure(this._config)},e.prototype.configure=function(e){var t=this;return e?(this._config=Object.assign(this._config,e),m.debug("amplify config",this._config),Object.entries(this._modules).forEach((function(e){var n=v(e,2),r=(n[0],n[1]);Object.keys(r).forEach((function(e){t._modules[e]&&(r[e]=t._modules[e])}))})),this._components.map((function(e){e.configure(t._config)})),this._config):this._config},e.prototype.addPluggable=function(e){e&&e.getCategory&&"function"==typeof e.getCategory&&this._components.map((function(t){t.addPluggable&&"function"==typeof t.addPluggable&&t.addPluggable(e)}))},e}(),b=new y,w={userAgent:"aws-amplify/4.6.0 js",product:"",navigator:null,isReactNative:!1};if("undefined"!=typeof navigator&&navigator.product)switch(w.product=navigator.product||"",w.navigator=navigator||null,navigator.product){case"ReactNative":w.userAgent="aws-amplify/4.6.0 react-native",w.isReactNative=!0;break;default:w.userAgent="aws-amplify/4.6.0 js",w.isReactNative=!1}var _=function(e){return""+w.userAgent+(e||"")},S=new g("ClientDevice_Browser");function E(){return"undefined"==typeof window?{}:function(){if("undefined"==typeof window)return S.warn("No window object available to get browser client info"),{};var e=window.navigator;if(!e)return S.warn("No navigator object available to get browser client info"),{};var t=e.platform,n=e.product,r=e.vendor,o=e.userAgent,i=e.language,a=function(e){var t=/.+(Opera[\s[A-Z]*|OPR[\sA-Z]*)\/([0-9\.]+).*/i.exec(e);if(t)return{type:t[1],version:t[2]};var n=/.+(Trident|Edge)\/([0-9\.]+).*/i.exec(e);if(n)return{type:n[1],version:n[2]};var r=/.+(Chrome|Firefox|FxiOS)\/([0-9\.]+).*/i.exec(e);if(r)return{type:r[1],version:r[2]};var o=/.+(Safari)\/([0-9\.]+).*/i.exec(e);if(o)return{type:o[1],version:o[2]};var i=/.+(AppleWebKit)\/([0-9\.]+).*/i.exec(e);if(i)return{type:i[1],version:i[2]};var a=/.*([A-Z]+)\/([0-9\.]+).*/i.exec(e);if(a)return{type:a[1],version:a[2]};return{type:"",version:""}}(o),s=(u=/\(([A-Za-z\s].*)\)/.exec((new Date).toString()),u&&u[1]||"");var u;return{platform:t,make:n||r,model:a.type,version:a.version,appVersion:[a.type,a.version].join("/"),language:i,timezone:s}}()}var x=function(){function e(){}return e.clientInfo=function(){return E()},e.dimension=function(){return"undefined"==typeof window?(S.warn("No window object available to get browser client info"),{width:320,height:320}):{width:window.innerWidth,height:window.innerHeight}},e}();function A(e){return new Error("Missing config value of "+e)}function O(e){return new Error("Invalid parameter value of "+e)}var k=function(){return(k=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},L=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},I=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(L(arguments[t]));return e},C=new g("Hub"),P="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default";var T=new(function(){function e(e){this.listeners=[],this.patterns=[],this.protectedChannels=["core","auth","api","analytics","interactions","pubsub","storage","ui","xr"],this.name=e}return e.prototype.remove=function(e,t){if(e instanceof RegExp){var n=this.patterns.find((function(t){return t.pattern.source===e.source}));if(!n)return void C.warn("No listeners for "+e);this.patterns=I(this.patterns.filter((function(e){return e!==n})))}else{var r=this.listeners[e];if(!r)return void C.warn("No listeners for "+e);this.listeners[e]=I(r.filter((function(e){return e.callback!==t})))}},e.prototype.dispatch=function(e,t,n,r){(void 0===n&&(n=""),this.protectedChannels.indexOf(e)>-1)&&(r===P||C.warn("WARNING: "+e+" is protected and dispatching on it can have unintended consequences"));var o={channel:e,payload:k({},t),source:n,patternInfo:[]};try{this._toListeners(o)}catch(e){C.error(e)}},e.prototype.listen=function(e,t,n){var r,o=this;if(void 0===n&&(n="noname"),function(e){return void 0!==e.onHubCapsule}(t))C.warn("WARNING onHubCapsule is Deprecated. Please pass in a callback."),r=t.onHubCapsule.bind(t);else{if("function"!=typeof t)throw new Error("No callback supplied to Hub");r=t}if(e instanceof RegExp)this.patterns.push({pattern:e,callback:r});else{var i=this.listeners[e];i||(i=[],this.listeners[e]=i),i.push({name:n,callback:r})}return function(){o.remove(e,r)}},e.prototype._toListeners=function(e){var t=e.channel,n=e.payload,r=this.listeners[t];if(r&&r.forEach((function(r){C.debug("Dispatching to "+t+" with ",n);try{r.callback(e)}catch(e){C.error(e)}})),this.patterns.length>0){if(!n.message)return void C.warn("Cannot perform pattern matching without a message key");var o=n.message;this.patterns.forEach((function(t){var n=o.match(t.pattern);if(n){var r=L(n).slice(1),i=k(k({},e),{patternInfo:r});try{t.callback(i)}catch(e){C.error(e)}}}))}},e}())("__default__"),j=new g("I18n"),R=function(){function e(e){this._options=null,this._lang=null,this._dict={},this._options=Object.assign({},e),this._lang=this._options.language,!this._lang&&"undefined"!=typeof window&&window&&window.navigator&&(this._lang=window.navigator.language),j.debug(this._lang)}return e.prototype.setLanguage=function(e){this._lang=e},e.prototype.get=function(e,t){if(void 0===t&&(t=void 0),!this._lang)return void 0!==t?t:e;var n=this._lang,r=this.getByLanguage(e,n);return r||(n.indexOf("-")>0&&(r=this.getByLanguage(e,n.split("-")[0])),r||(void 0!==t?t:e))},e.prototype.getByLanguage=function(e,t,n){if(void 0===n&&(n=null),!t)return n;var r=this._dict[t];return r?r[e]:n},e.prototype.putVocabulariesForLanguage=function(e,t){var n=this._dict[e];n||(n=this._dict[e]={}),Object.assign(n,t)},e.prototype.putVocabularies=function(e){var t=this;Object.keys(e).map((function(n){t.putVocabulariesForLanguage(n,e[n])}))},e}(),M=new g("I18n"),N=null,z=null,B=function(){function e(){}return e.configure=function(t){return M.debug("configure I18n"),t?(N=Object.assign({},N,t.I18n||t),e.createInstance(),N):N},e.getModuleName=function(){return"I18n"},e.createInstance=function(){M.debug("create I18n instance"),z||(z=new R(N))},e.setLanguage=function(t){return e.checkConfig(),z.setLanguage(t)},e.get=function(t,n){return e.checkConfig()?z.get(t,n):void 0===n?t:n},e.putVocabulariesForLanguage=function(t,n){return e.checkConfig(),z.putVocabulariesForLanguage(t,n)},e.putVocabularies=function(t){return e.checkConfig(),z.putVocabularies(t)},e.checkConfig=function(){return z||(z=new R(N)),!0},e}();b.register(B);for(var U=n(1),F=n(8),D={},q={},G=0;G<256;G++){var H=G.toString(16).toLowerCase();1===H.length&&(H="0"+H),D[G]=H,q[H]=G}function W(e){for(var t="",n=0;n<e.byteLength;n++)t+=D[e[n]];return t}var $=n(3),K=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},V={clockOffset:0,getDateWithClockOffset:function(){return V.clockOffset?new Date((new Date).getTime()+V.clockOffset):new Date},getClockOffset:function(){return V.clockOffset},getHeaderStringFromDate:function(e){return void 0===e&&(e=V.getDateWithClockOffset()),e.toISOString().replace(/[:\-]|\.\d{3}/g,"")},getDateFromHeaderString:function(e){var t=K(e.match(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2}).+/),7),n=t[1],r=t[2],o=t[3],i=t[4],a=t[5],s=t[6];return new Date(Date.UTC(Number(n),Number(r)-1,Number(o),Number(i),Number(a),Number(s)))},isClockSkewed:function(e){return Math.abs(e.getTime()-V.getDateWithClockOffset().getTime())>=3e5},isClockSkewError:function(e){if(!e.response||!e.response.headers)return!1;var t=e.response.headers;return Boolean(["BadRequestException","InvalidSignatureException"].includes(t["x-amzn-errortype"])&&(t.date||t.Date))},setClockOffset:function(e){V.clockOffset=e}};function Y(e){return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Z=function(){return(Z=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},J=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},X=new g("Signer"),Q=function(e,t){var n=new F.Sha256(e);return n.update(t),n.digestSync()},ee=function(e){var t=e||"",n=new F.Sha256;return n.update(t),W(n.digestSync())},te=function(e){return Object.keys(e).map((function(e){return e.toLowerCase()})).sort().join(";")},ne=function(e){var t,n,r=Object($.parse)(e.url);return[e.method||"/",encodeURIComponent(r.pathname).replace(/%2F/gi,"/"),(n=r.query,n&&0!==n.length?n.split("&").map((function(e){var t=e.split("=");if(1===t.length)return e;var n=t[1].replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}));return t[0]+"="+n})).sort((function(e,t){var n=e.split("=")[0],r=t.split("=")[0];return n===r?e<t?-1:1:n<r?-1:1})).join("&"):""),(t=e.headers,t&&0!==Object.keys(t).length?Object.keys(t).map((function(e){return{key:e.toLowerCase(),value:t[e]?t[e].trim().replace(/\s+/g," "):""}})).sort((function(e,t){return e.key<t.key?-1:1})).map((function(e){return e.key+":"+e.value})).join("\n")+"\n":""),te(e.headers),ee(e.data)].join("\n")},re=function(e){var t=(Object($.parse)(e.url).host.match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com$/)||[]).slice(1,3);return"es"===t[1]&&(t=t.reverse()),{service:e.service||t[0],region:e.region||t[1]}},oe=function(e,t,n){return[e,t,n,"aws4_request"].join("/")},ie=function(e,t,n,r){return[e,n,r,ee(t)].join("\n")},ae=function(e,t,n){X.debug(n);var r=Q("AWS4"+e,t),o=Q(r,n.region),i=Q(o,n.service);return Q(i,"aws4_request")},se=function(e,t){return W(Q(e,t))},ue=function(){function e(){}return e.sign=function(e,t,n){void 0===n&&(n=null),e.headers=e.headers||{};var r=V.getDateWithClockOffset().toISOString().replace(/[:\-]|\.\d{3}/g,""),o=r.substr(0,8),i=Object($.parse)(e.url);e.headers.host=i.host,e.headers["x-amz-date"]=r,t.session_token&&(e.headers["X-Amz-Security-Token"]=t.session_token);var a=ne(e);X.debug(a);var s=n||re(e),u=oe(o,s.region,s.service),c=ie("AWS4-HMAC-SHA256",a,r,u),f=ae(t.secret_key,o,s),l=se(f,c),d=function(e,t,n,r,o){return[e+" Credential="+t+"/"+n,"SignedHeaders="+r,"Signature="+o].join(", ")}("AWS4-HMAC-SHA256",t.access_key,u,te(e.headers),l);return e.headers.Authorization=d,e},e.signUrl=function(e,t,n,r){var o="object"===Y(e)?e.url:e,i="object"===Y(e)?e.method:"GET",a="object"===Y(e)?e.body:void 0,s=V.getDateWithClockOffset().toISOString().replace(/[:\-]|\.\d{3}/g,""),u=s.substr(0,8),c=Object($.parse)(o,!0,!0),f=(c.search,J(c,["search"])),l={host:f.host},d=n||re({url:Object($.format)(f)}),h=d.region,p=d.service,g=oe(u,h,p),v=t.session_token&&"iotdevicegateway"!==p,m=Z(Z(Z({"X-Amz-Algorithm":"AWS4-HMAC-SHA256","X-Amz-Credential":[t.access_key,g].join("/"),"X-Amz-Date":s.substr(0,16)},v?{"X-Amz-Security-Token":""+t.session_token}:{}),r?{"X-Amz-Expires":""+r}:{}),{"X-Amz-SignedHeaders":Object.keys(l).join(",")}),y=ne({method:i,url:Object($.format)(Z(Z({},f),{query:Z(Z({},f.query),m)})),headers:l,data:a}),b=ie("AWS4-HMAC-SHA256",y,s,g),w=ae(t.secret_key,u,{region:h,service:p}),_=se(w,b),S=Z({"X-Amz-Signature":_},t.session_token&&{"X-Amz-Security-Token":t.session_token});return Object($.format)({protocol:f.protocol,slashes:!0,hostname:f.hostname,port:f.port,pathname:f.pathname,query:Z(Z(Z({},f.query),m),S)})},e}(),ce=function(){return(ce=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},fe=new g("Parser"),le=function(e){var t,n={};if(e.aws_mobile_analytics_app_id){var r={AWSPinpoint:{appId:e.aws_mobile_analytics_app_id,region:e.aws_mobile_analytics_app_region}};n.Analytics=r}return(e.aws_cognito_identity_pool_id||e.aws_user_pools_id)&&(n.Auth={userPoolId:e.aws_user_pools_id,userPoolWebClientId:e.aws_user_pools_web_client_id,region:e.aws_cognito_region,identityPoolId:e.aws_cognito_identity_pool_id,identityPoolRegion:e.aws_cognito_region,mandatorySignIn:"enable"===e.aws_mandatory_sign_in,signUpVerificationMethod:e.aws_cognito_sign_up_verification_method||"code"}),t=e.aws_user_files_s3_bucket?{AWSS3:{bucket:e.aws_user_files_s3_bucket,region:e.aws_user_files_s3_bucket_region,dangerouslyConnectToHttpEndpointForTesting:e.aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing}}:e?e.Storage||e:{},e.Logging&&(n.Logging=ce(ce({},e.Logging),{region:e.aws_project_region})),e.geo&&(n.Geo=Object.assign({},e.geo),e.geo.amazon_location_service&&(n.Geo={AmazonLocationService:e.geo.amazon_location_service})),n.Analytics=Object.assign({},n.Analytics,e.Analytics),n.Auth=Object.assign({},n.Auth,e.Auth),n.Storage=Object.assign({},t),n.Logging=Object.assign({},n.Logging,e.Logging),fe.debug("parse config",e,"to amplifyconfig",n),n},de=function(){function e(){}return e.parseMobilehubConfig=le,e}(),he=function(e,t){return(he=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function pe(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}he(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var ge=function(){return(ge=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function ve(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function me(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;function ye(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var be,we,_e,Se,Ee,xe,Ae,Oe,ke,Le,Ie,Ce,Pe,Te,je,Re,Me,Ne,ze,Be,Ue,Fe,De,qe,Ge,He,We,$e,Ke,Ve,Ye,Ze,Je,Xe,Qe,et,tt,nt,rt,ot,it,at,st,ut,ct,ft,lt,dt,ht,pt,gt,vt,mt,yt,bt,wt,_t,St,Et,xt,At,Ot,kt,Lt,It,Ct,Pt,Tt,jt,Rt,Mt,Nt,zt,Bt,Ut,Ft,Dt,qt,Gt,Ht,Wt,$t,Kt,Vt,Yt,Zt,Jt,Xt,Qt,en,tn,nn,rn,on,an,sn,un,cn,fn,ln,dn,hn,pn,gn;Object.create;(be||(be={})).filterSensitiveLog=function(e){return ge({},e)},(we||(we={})).filterSensitiveLog=function(e){return ge({},e)},(_e||(_e={})).filterSensitiveLog=function(e){return ge({},e)},(Se||(Se={})).filterSensitiveLog=function(e){return ge({},e)},(Ee||(Ee={})).filterSensitiveLog=function(e){return ge({},e)},(xe||(xe={})).filterSensitiveLog=function(e){return ge({},e)},(Ae||(Ae={})).filterSensitiveLog=function(e){return ge({},e)},(Oe||(Oe={})).filterSensitiveLog=function(e){return ge({},e)},(ke||(ke={})).filterSensitiveLog=function(e){return ge({},e)},(Le||(Le={})).filterSensitiveLog=function(e){return ge({},e)},(Ie||(Ie={})).filterSensitiveLog=function(e){return ge({},e)},(Ce||(Ce={})).filterSensitiveLog=function(e){return ge({},e)},(Pe||(Pe={})).filterSensitiveLog=function(e){return ge({},e)},(Te||(Te={})).filterSensitiveLog=function(e){return ge({},e)},(je||(je={})).filterSensitiveLog=function(e){return ge({},e)},(Re||(Re={})).filterSensitiveLog=function(e){return ge({},e)},(Me||(Me={})).filterSensitiveLog=function(e){return ge({},e)},(Ne||(Ne={})).filterSensitiveLog=function(e){return ge({},e)},(ze||(ze={})).filterSensitiveLog=function(e){return ge({},e)},(Be||(Be={})).filterSensitiveLog=function(e){return ge({},e)},(Ue||(Ue={})).filterSensitiveLog=function(e){return ge({},e)},(Fe||(Fe={})).filterSensitiveLog=function(e){return ge({},e)},(De||(De={})).filterSensitiveLog=function(e){return ge({},e)},(qe||(qe={})).filterSensitiveLog=function(e){return ge({},e)},(Ge||(Ge={})).filterSensitiveLog=function(e){return ge({},e)},(He||(He={})).filterSensitiveLog=function(e){return ge({},e)},function(e){e.CANCELLED="CANCELLED",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e.PENDING="PENDING",e.PENDING_CANCEL="PENDING_CANCEL",e.RUNNING="RUNNING"}(We||(We={})),($e||($e={})).filterSensitiveLog=function(e){return ge({},e)},(Ke||(Ke={})).filterSensitiveLog=function(e){return ge({},e)},(Ve||(Ve={})).filterSensitiveLog=function(e){return ge({},e)},(Ye||(Ye={})).filterSensitiveLog=function(e){return ge({},e)},(Ze||(Ze={})).filterSensitiveLog=function(e){return ge({},e)},(Je||(Je={})).filterSensitiveLog=function(e){return ge({},e)},(Xe||(Xe={})).filterSensitiveLog=function(e){return ge({},e)},(Qe||(Qe={})).filterSensitiveLog=function(e){return ge({},e)},function(e){e.LastEventTime="LastEventTime",e.LogStreamName="LogStreamName"}(et||(et={})),(tt||(tt={})).filterSensitiveLog=function(e){return ge({},e)},(nt||(nt={})).filterSensitiveLog=function(e){return ge({},e)},(rt||(rt={})).filterSensitiveLog=function(e){return ge({},e)},(ot||(ot={})).filterSensitiveLog=function(e){return ge({},e)},(it||(it={})).filterSensitiveLog=function(e){return ge({},e)},(at||(at={})).filterSensitiveLog=function(e){return ge({},e)},(st||(st={})).filterSensitiveLog=function(e){return ge({},e)},function(e){e.Cancelled="Cancelled",e.Complete="Complete",e.Failed="Failed",e.Running="Running",e.Scheduled="Scheduled"}(ut||(ut={})),(ct||(ct={})).filterSensitiveLog=function(e){return ge({},e)},(ft||(ft={})).filterSensitiveLog=function(e){return ge({},e)},(lt||(lt={})).filterSensitiveLog=function(e){return ge({},e)},(dt||(dt={})).filterSensitiveLog=function(e){return ge({},e)},(ht||(ht={})).filterSensitiveLog=function(e){return ge({},e)},(pt||(pt={})).filterSensitiveLog=function(e){return ge({},e)},(gt||(gt={})).filterSensitiveLog=function(e){return ge({},e)},(vt||(vt={})).filterSensitiveLog=function(e){return ge({},e)},(mt||(mt={})).filterSensitiveLog=function(e){return ge({},e)},(yt||(yt={})).filterSensitiveLog=function(e){return ge({},e)},function(e){e.ByLogStream="ByLogStream",e.Random="Random"}(bt||(bt={})),(wt||(wt={})).filterSensitiveLog=function(e){return ge({},e)},(_t||(_t={})).filterSensitiveLog=function(e){return ge({},e)},(St||(St={})).filterSensitiveLog=function(e){return ge({},e)},(Et||(Et={})).filterSensitiveLog=function(e){return ge({},e)},(xt||(xt={})).filterSensitiveLog=function(e){return ge({},e)},(At||(At={})).filterSensitiveLog=function(e){return ge({},e)},(Ot||(Ot={})).filterSensitiveLog=function(e){return ge({},e)},(kt||(kt={})).filterSensitiveLog=function(e){return ge({},e)},(Lt||(Lt={})).filterSensitiveLog=function(e){return ge({},e)},(It||(It={})).filterSensitiveLog=function(e){return ge({},e)},(Ct||(Ct={})).filterSensitiveLog=function(e){return ge({},e)},(Pt||(Pt={})).filterSensitiveLog=function(e){return ge({},e)},(Tt||(Tt={})).filterSensitiveLog=function(e){return ge({},e)},(jt||(jt={})).filterSensitiveLog=function(e){return ge({},e)},(Rt||(Rt={})).filterSensitiveLog=function(e){return ge({},e)},(Mt||(Mt={})).filterSensitiveLog=function(e){return ge({},e)},(Nt||(Nt={})).filterSensitiveLog=function(e){return ge({},e)},(zt||(zt={})).filterSensitiveLog=function(e){return ge({},e)},(Bt||(Bt={})).filterSensitiveLog=function(e){return ge({},e)},(Ut||(Ut={})).filterSensitiveLog=function(e){return ge({},e)},(Ft||(Ft={})).filterSensitiveLog=function(e){return ge({},e)},(Dt||(Dt={})).filterSensitiveLog=function(e){return ge({},e)},(qt||(qt={})).filterSensitiveLog=function(e){return ge({},e)},(Gt||(Gt={})).filterSensitiveLog=function(e){return ge({},e)},(Ht||(Ht={})).filterSensitiveLog=function(e){return ge({},e)},(Wt||(Wt={})).filterSensitiveLog=function(e){return ge({},e)},($t||($t={})).filterSensitiveLog=function(e){return ge({},e)},(Kt||(Kt={})).filterSensitiveLog=function(e){return ge({},e)},(Vt||(Vt={})).filterSensitiveLog=function(e){return ge({},e)},(Yt||(Yt={})).filterSensitiveLog=function(e){return ge({},e)},(Zt||(Zt={})).filterSensitiveLog=function(e){return ge({},e)},(Jt||(Jt={})).filterSensitiveLog=function(e){return ge({},e)},(Xt||(Xt={})).filterSensitiveLog=function(e){return ge({},e)},(Qt||(Qt={})).filterSensitiveLog=function(e){return ge({},e)},(en||(en={})).filterSensitiveLog=function(e){return ge({},e)},(tn||(tn={})).filterSensitiveLog=function(e){return ge({},e)},(nn||(nn={})).filterSensitiveLog=function(e){return ge({},e)},(rn||(rn={})).filterSensitiveLog=function(e){return ge({},e)},(on||(on={})).filterSensitiveLog=function(e){return ge({},e)},(an||(an={})).filterSensitiveLog=function(e){return ge({},e)},(sn||(sn={})).filterSensitiveLog=function(e){return ge({},e)},(un||(un={})).filterSensitiveLog=function(e){return ge({},e)},(cn||(cn={})).filterSensitiveLog=function(e){return ge({},e)},(fn||(fn={})).filterSensitiveLog=function(e){return ge({},e)},(ln||(ln={})).filterSensitiveLog=function(e){return ge({},e)},(dn||(dn={})).filterSensitiveLog=function(e){return ge({},e)},(hn||(hn={})).filterSensitiveLog=function(e){return ge({},e)},(pn||(pn={})).filterSensitiveLog=function(e){return ge({},e)},(gn||(gn={})).filterSensitiveLog=function(e){return ge({},e)};var vn=function(){function e(e){this.statusCode=e.statusCode,this.headers=e.headers||{},this.body=e.body}return e.isInstance=function(e){if(!e)return!1;var t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers},e}(),mn=n(0),yn=function(){function e(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.substr(-1)?e.protocol+":":e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/"+e.path:e.path:"/"}return e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers},e.prototype.clone=function(){var t,n=new e(Object(mn.__assign)(Object(mn.__assign)({},this),{headers:Object(mn.__assign)({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var r,o=t[n];return Object(mn.__assign)(Object(mn.__assign)({},e),((r={})[n]=Array.isArray(o)?Object(mn.__spread)(o):o,r))}),{}))),n},e}();var bn=function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,f,l,d,h;return me(this,(function(p){switch(p.label){case 0:return r=[ge({},e)],h={},[4,ur(e.body,t)];case 1:switch(n=ge.apply(void 0,r.concat([(h.body=p.sent(),h)])),i="UnknownError",i=cr(e,n.body),i){case"InvalidParameterException":case"com.amazonaws.cloudwatchlogs#InvalidParameterException":return[3,2];case"LimitExceededException":case"com.amazonaws.cloudwatchlogs#LimitExceededException":return[3,4];case"OperationAbortedException":case"com.amazonaws.cloudwatchlogs#OperationAbortedException":return[3,6];case"ResourceAlreadyExistsException":case"com.amazonaws.cloudwatchlogs#ResourceAlreadyExistsException":return[3,8];case"ServiceUnavailableException":case"com.amazonaws.cloudwatchlogs#ServiceUnavailableException":return[3,10]}return[3,12];case 2:return a=[{}],[4,On(n,t)];case 3:return o=ge.apply(void 0,[ge.apply(void 0,a.concat([p.sent()])),{name:i,$metadata:ir(e)}]),[3,13];case 4:return s=[{}],[4,Ln(n,t)];case 5:return o=ge.apply(void 0,[ge.apply(void 0,s.concat([p.sent()])),{name:i,$metadata:ir(e)}]),[3,13];case 6:return u=[{}],[4,In(n,t)];case 7:return o=ge.apply(void 0,[ge.apply(void 0,u.concat([p.sent()])),{name:i,$metadata:ir(e)}]),[3,13];case 8:return c=[{}],[4,Cn(n,t)];case 9:return o=ge.apply(void 0,[ge.apply(void 0,c.concat([p.sent()])),{name:i,$metadata:ir(e)}]),[3,13];case 10:return f=[{}],[4,Tn(n,t)];case 11:return o=ge.apply(void 0,[ge.apply(void 0,f.concat([p.sent()])),{name:i,$metadata:ir(e)}]),[3,13];case 12:l=n.body,i=l.code||l.Code||i,o=ge(ge({},l),{name:""+i,message:l.message||l.Message||i,$fault:"client",$metadata:ir(e)}),p.label=13;case 13:return d=o.message||o.Message||i,o.message=d,delete o.Message,[2,Promise.reject(Object.assign(new Error(d),o))]}}))}))},wn=function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,f,l,d;return me(this,(function(h){switch(h.label){case 0:return r=[ge({},e)],d={},[4,ur(e.body,t)];case 1:switch(n=ge.apply(void 0,r.concat([(d.body=h.sent(),d)])),i="UnknownError",i=cr(e,n.body),i){case"InvalidParameterException":case"com.amazonaws.cloudwatchlogs#InvalidParameterException":return[3,2];case"ResourceAlreadyExistsException":case"com.amazonaws.cloudwatchlogs#ResourceAlreadyExistsException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.cloudwatchlogs#ResourceNotFoundException":return[3,6];case"ServiceUnavailableException":case"com.amazonaws.cloudwatchlogs#ServiceUnavailableException":return[3,8]}return[3,10];case 2:return a=[{}],[4,On(n,t)];case 3:return o=ge.apply(void 0,[ge.apply(void 0,a.concat([h.sent()])),{name:i,$metadata:ir(e)}]),[3,11];case 4:return s=[{}],[4,Cn(n,t)];case 5:return o=ge.apply(void 0,[ge.apply(void 0,s.concat([h.sent()])),{name:i,$metadata:ir(e)}]),[3,11];case 6:return u=[{}],[4,Pn(n,t)];case 7:return o=ge.apply(void 0,[ge.apply(void 0,u.concat([h.sent()])),{name:i,$metadata:ir(e)}]),[3,11];case 8:return c=[{}],[4,Tn(n,t)];case 9:return o=ge.apply(void 0,[ge.apply(void 0,c.concat([h.sent()])),{name:i,$metadata:ir(e)}]),[3,11];case 10:f=n.body,i=f.code||f.Code||i,o=ge(ge({},f),{name:""+i,message:f.message||f.Message||i,$fault:"client",$metadata:ir(e)}),h.label=11;case 11:return l=o.message||o.Message||i,o.message=l,delete o.Message,[2,Promise.reject(Object.assign(new Error(l),o))]}}))}))},_n=function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,f;return me(this,(function(l){switch(l.label){case 0:return r=[ge({},e)],f={},[4,ur(e.body,t)];case 1:switch(n=ge.apply(void 0,r.concat([(f.body=l.sent(),f)])),i="UnknownError",i=cr(e,n.body),i){case"InvalidParameterException":case"com.amazonaws.cloudwatchlogs#InvalidParameterException":return[3,2];case"ServiceUnavailableException":case"com.amazonaws.cloudwatchlogs#ServiceUnavailableException":return[3,4]}return[3,6];case 2:return a=[{}],[4,On(n,t)];case 3:return o=ge.apply(void 0,[ge.apply(void 0,a.concat([l.sent()])),{name:i,$metadata:ir(e)}]),[3,7];case 4:return s=[{}],[4,Tn(n,t)];case 5:return o=ge.apply(void 0,[ge.apply(void 0,s.concat([l.sent()])),{name:i,$metadata:ir(e)}]),[3,7];case 6:u=n.body,i=u.code||u.Code||i,o=ge(ge({},u),{name:""+i,message:u.message||u.Message||i,$fault:"client",$metadata:ir(e)}),l.label=7;case 7:return c=o.message||o.Message||i,o.message=c,delete o.Message,[2,Promise.reject(Object.assign(new Error(c),o))]}}))}))},Sn=function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,f,l;return me(this,(function(d){switch(d.label){case 0:return r=[ge({},e)],l={},[4,ur(e.body,t)];case 1:switch(n=ge.apply(void 0,r.concat([(l.body=d.sent(),l)])),i="UnknownError",i=cr(e,n.body),i){case"InvalidParameterException":case"com.amazonaws.cloudwatchlogs#InvalidParameterException":return[3,2];case"ResourceNotFoundException":case"com.amazonaws.cloudwatchlogs#ResourceNotFoundException":return[3,4];case"ServiceUnavailableException":case"com.amazonaws.cloudwatchlogs#ServiceUnavailableException":return[3,6]}return[3,8];case 2:return a=[{}],[4,On(n,t)];case 3:return o=ge.apply(void 0,[ge.apply(void 0,a.concat([d.sent()])),{name:i,$metadata:ir(e)}]),[3,9];case 4:return s=[{}],[4,Pn(n,t)];case 5:return o=ge.apply(void 0,[ge.apply(void 0,s.concat([d.sent()])),{name:i,$metadata:ir(e)}]),[3,9];case 6:return u=[{}],[4,Tn(n,t)];case 7:return o=ge.apply(void 0,[ge.apply(void 0,u.concat([d.sent()])),{name:i,$metadata:ir(e)}]),[3,9];case 8:c=n.body,i=c.code||c.Code||i,o=ge(ge({},c),{name:""+i,message:c.message||c.Message||i,$fault:"client",$metadata:ir(e)}),d.label=9;case 9:return f=o.message||o.Message||i,o.message=f,delete o.Message,[2,Promise.reject(Object.assign(new Error(f),o))]}}))}))},En=function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,f,l;return me(this,(function(d){switch(d.label){case 0:return r=[ge({},e)],l={},[4,ur(e.body,t)];case 1:switch(n=ge.apply(void 0,r.concat([(l.body=d.sent(),l)])),i="UnknownError",i=cr(e,n.body),i){case"InvalidParameterException":case"com.amazonaws.cloudwatchlogs#InvalidParameterException":return[3,2];case"ResourceNotFoundException":case"com.amazonaws.cloudwatchlogs#ResourceNotFoundException":return[3,4];case"ServiceUnavailableException":case"com.amazonaws.cloudwatchlogs#ServiceUnavailableException":return[3,6]}return[3,8];case 2:return a=[{}],[4,On(n,t)];case 3:return o=ge.apply(void 0,[ge.apply(void 0,a.concat([d.sent()])),{name:i,$metadata:ir(e)}]),[3,9];case 4:return s=[{}],[4,Pn(n,t)];case 5:return o=ge.apply(void 0,[ge.apply(void 0,s.concat([d.sent()])),{name:i,$metadata:ir(e)}]),[3,9];case 6:return u=[{}],[4,Tn(n,t)];case 7:return o=ge.apply(void 0,[ge.apply(void 0,u.concat([d.sent()])),{name:i,$metadata:ir(e)}]),[3,9];case 8:c=n.body,i=c.code||c.Code||i,o=ge(ge({},c),{name:""+i,message:c.message||c.Message||i,$fault:"client",$metadata:ir(e)}),d.label=9;case 9:return f=o.message||o.Message||i,o.message=f,delete o.Message,[2,Promise.reject(Object.assign(new Error(f),o))]}}))}))},xn=function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,f,l,d,h,p;return me(this,(function(g){switch(g.label){case 0:return r=[ge({},e)],p={},[4,ur(e.body,t)];case 1:switch(n=ge.apply(void 0,r.concat([(p.body=g.sent(),p)])),i="UnknownError",i=cr(e,n.body),i){case"DataAlreadyAcceptedException":case"com.amazonaws.cloudwatchlogs#DataAlreadyAcceptedException":return[3,2];case"InvalidParameterException":case"com.amazonaws.cloudwatchlogs#InvalidParameterException":return[3,4];case"InvalidSequenceTokenException":case"com.amazonaws.cloudwatchlogs#InvalidSequenceTokenException":return[3,6];case"ResourceNotFoundException":case"com.amazonaws.cloudwatchlogs#ResourceNotFoundException":return[3,8];case"ServiceUnavailableException":case"com.amazonaws.cloudwatchlogs#ServiceUnavailableException":return[3,10];case"UnrecognizedClientException":case"com.amazonaws.cloudwatchlogs#UnrecognizedClientException":return[3,12]}return[3,14];case 2:return a=[{}],[4,An(n,t)];case 3:return o=ge.apply(void 0,[ge.apply(void 0,a.concat([g.sent()])),{name:i,$metadata:ir(e)}]),[3,15];case 4:return s=[{}],[4,On(n,t)];case 5:return o=ge.apply(void 0,[ge.apply(void 0,s.concat([g.sent()])),{name:i,$metadata:ir(e)}]),[3,15];case 6:return u=[{}],[4,kn(n,t)];case 7:return o=ge.apply(void 0,[ge.apply(void 0,u.concat([g.sent()])),{name:i,$metadata:ir(e)}]),[3,15];case 8:return c=[{}],[4,Pn(n,t)];case 9:return o=ge.apply(void 0,[ge.apply(void 0,c.concat([g.sent()])),{name:i,$metadata:ir(e)}]),[3,15];case 10:return f=[{}],[4,Tn(n,t)];case 11:return o=ge.apply(void 0,[ge.apply(void 0,f.concat([g.sent()])),{name:i,$metadata:ir(e)}]),[3,15];case 12:return l=[{}],[4,jn(n,t)];case 13:return o=ge.apply(void 0,[ge.apply(void 0,l.concat([g.sent()])),{name:i,$metadata:ir(e)}]),[3,15];case 14:d=n.body,i=d.code||d.Code||i,o=ge(ge({},d),{name:""+i,message:d.message||d.Message||i,$fault:"client",$metadata:ir(e)}),g.label=15;case 15:return h=o.message||o.Message||i,o.message=h,delete o.Message,[2,Promise.reject(Object.assign(new Error(h),o))]}}))}))},An=function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r;return me(this,(function(o){return n=e.body,r=qn(n,t),[2,ge({name:"DataAlreadyAcceptedException",$fault:"client",$metadata:ir(e)},r)]}))}))},On=function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r;return me(this,(function(o){return n=e.body,r=$n(n,t),[2,ge({name:"InvalidParameterException",$fault:"client",$metadata:ir(e)},r)]}))}))},kn=function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r;return me(this,(function(o){return n=e.body,r=Kn(n,t),[2,ge({name:"InvalidSequenceTokenException",$fault:"client",$metadata:ir(e)},r)]}))}))},Ln=function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r;return me(this,(function(o){return n=e.body,r=Vn(n,t),[2,ge({name:"LimitExceededException",$fault:"client",$metadata:ir(e)},r)]}))}))},In=function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r;return me(this,(function(o){return n=e.body,r=Jn(n,t),[2,ge({name:"OperationAbortedException",$fault:"client",$metadata:ir(e)},r)]}))}))},Cn=function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r;return me(this,(function(o){return n=e.body,r=tr(n,t),[2,ge({name:"ResourceAlreadyExistsException",$fault:"client",$metadata:ir(e)},r)]}))}))},Pn=function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r;return me(this,(function(o){return n=e.body,r=nr(n,t),[2,ge({name:"ResourceNotFoundException",$fault:"client",$metadata:ir(e)},r)]}))}))},Tn=function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r;return me(this,(function(o){return n=e.body,r=rr(n,t),[2,ge({name:"ServiceUnavailableException",$fault:"server",$metadata:ir(e)},r)]}))}))},jn=function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r;return me(this,(function(o){return n=e.body,r=or(n,t),[2,ge({name:"UnrecognizedClientException",$fault:"client",$metadata:ir(e)},r)]}))}))},Rn=function(e,t){return ge(ge(ge({},void 0!==e.kmsKeyId&&null!==e.kmsKeyId&&{kmsKeyId:e.kmsKeyId}),void 0!==e.logGroupName&&null!==e.logGroupName&&{logGroupName:e.logGroupName}),void 0!==e.tags&&null!==e.tags&&{tags:Dn(e.tags,t)})},Mn=function(e,t){return ge(ge({},void 0!==e.logGroupName&&null!==e.logGroupName&&{logGroupName:e.logGroupName}),void 0!==e.logStreamName&&null!==e.logStreamName&&{logStreamName:e.logStreamName})},Nn=function(e,t){return ge(ge(ge({},void 0!==e.limit&&null!==e.limit&&{limit:e.limit}),void 0!==e.logGroupNamePrefix&&null!==e.logGroupNamePrefix&&{logGroupNamePrefix:e.logGroupNamePrefix}),void 0!==e.nextToken&&null!==e.nextToken&&{nextToken:e.nextToken})},zn=function(e,t){return ge(ge(ge(ge(ge(ge({},void 0!==e.descending&&null!==e.descending&&{descending:e.descending}),void 0!==e.limit&&null!==e.limit&&{limit:e.limit}),void 0!==e.logGroupName&&null!==e.logGroupName&&{logGroupName:e.logGroupName}),void 0!==e.logStreamNamePrefix&&null!==e.logStreamNamePrefix&&{logStreamNamePrefix:e.logStreamNamePrefix}),void 0!==e.nextToken&&null!==e.nextToken&&{nextToken:e.nextToken}),void 0!==e.orderBy&&null!==e.orderBy&&{orderBy:e.orderBy})},Bn=function(e,t){return ge(ge(ge(ge(ge(ge(ge({},void 0!==e.endTime&&null!==e.endTime&&{endTime:e.endTime}),void 0!==e.limit&&null!==e.limit&&{limit:e.limit}),void 0!==e.logGroupName&&null!==e.logGroupName&&{logGroupName:e.logGroupName}),void 0!==e.logStreamName&&null!==e.logStreamName&&{logStreamName:e.logStreamName}),void 0!==e.nextToken&&null!==e.nextToken&&{nextToken:e.nextToken}),void 0!==e.startFromHead&&null!==e.startFromHead&&{startFromHead:e.startFromHead}),void 0!==e.startTime&&null!==e.startTime&&{startTime:e.startTime})},Un=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return ge(ge({},void 0!==e.message&&null!==e.message&&{message:e.message}),void 0!==e.timestamp&&null!==e.timestamp&&{timestamp:e.timestamp})}(e)}))},Fn=function(e,t){return ge(ge(ge(ge({},void 0!==e.logEvents&&null!==e.logEvents&&{logEvents:Un(e.logEvents)}),void 0!==e.logGroupName&&null!==e.logGroupName&&{logGroupName:e.logGroupName}),void 0!==e.logStreamName&&null!==e.logStreamName&&{logStreamName:e.logStreamName}),void 0!==e.sequenceToken&&null!==e.sequenceToken&&{sequenceToken:e.sequenceToken})},Dn=function(e,t){return Object.entries(e).reduce((function(e,t){var n,r=ye(t,2),o=r[0],i=r[1];return null===i?e:ge(ge({},e),((n={})[o]=i,n))}),{})},qn=function(e,t){return{expectedSequenceToken:void 0!==e.expectedSequenceToken&&null!==e.expectedSequenceToken?e.expectedSequenceToken:void 0,message:void 0!==e.message&&null!==e.message?e.message:void 0}},Gn=function(e,t){return{logGroups:void 0!==e.logGroups&&null!==e.logGroups?Yn(e.logGroups,t):void 0,nextToken:void 0!==e.nextToken&&null!==e.nextToken?e.nextToken:void 0}},Hn=function(e,t){return{logStreams:void 0!==e.logStreams&&null!==e.logStreams?Zn(e.logStreams,t):void 0,nextToken:void 0!==e.nextToken&&null!==e.nextToken?e.nextToken:void 0}},Wn=function(e,t){return{events:void 0!==e.events&&null!==e.events?Xn(e.events,t):void 0,nextBackwardToken:void 0!==e.nextBackwardToken&&null!==e.nextBackwardToken?e.nextBackwardToken:void 0,nextForwardToken:void 0!==e.nextForwardToken&&null!==e.nextForwardToken?e.nextForwardToken:void 0}},$n=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Kn=function(e,t){return{expectedSequenceToken:void 0!==e.expectedSequenceToken&&null!==e.expectedSequenceToken?e.expectedSequenceToken:void 0,message:void 0!==e.message&&null!==e.message?e.message:void 0}},Vn=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Yn=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{arn:void 0!==e.arn&&null!==e.arn?e.arn:void 0,creationTime:void 0!==e.creationTime&&null!==e.creationTime?e.creationTime:void 0,kmsKeyId:void 0!==e.kmsKeyId&&null!==e.kmsKeyId?e.kmsKeyId:void 0,logGroupName:void 0!==e.logGroupName&&null!==e.logGroupName?e.logGroupName:void 0,metricFilterCount:void 0!==e.metricFilterCount&&null!==e.metricFilterCount?e.metricFilterCount:void 0,retentionInDays:void 0!==e.retentionInDays&&null!==e.retentionInDays?e.retentionInDays:void 0,storedBytes:void 0!==e.storedBytes&&null!==e.storedBytes?e.storedBytes:void 0}}(e)}))},Zn=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{arn:void 0!==e.arn&&null!==e.arn?e.arn:void 0,creationTime:void 0!==e.creationTime&&null!==e.creationTime?e.creationTime:void 0,firstEventTimestamp:void 0!==e.firstEventTimestamp&&null!==e.firstEventTimestamp?e.firstEventTimestamp:void 0,lastEventTimestamp:void 0!==e.lastEventTimestamp&&null!==e.lastEventTimestamp?e.lastEventTimestamp:void 0,lastIngestionTime:void 0!==e.lastIngestionTime&&null!==e.lastIngestionTime?e.lastIngestionTime:void 0,logStreamName:void 0!==e.logStreamName&&null!==e.logStreamName?e.logStreamName:void 0,storedBytes:void 0!==e.storedBytes&&null!==e.storedBytes?e.storedBytes:void 0,uploadSequenceToken:void 0!==e.uploadSequenceToken&&null!==e.uploadSequenceToken?e.uploadSequenceToken:void 0}}(e)}))},Jn=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Xn=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{ingestionTime:void 0!==e.ingestionTime&&null!==e.ingestionTime?e.ingestionTime:void 0,message:void 0!==e.message&&null!==e.message?e.message:void 0,timestamp:void 0!==e.timestamp&&null!==e.timestamp?e.timestamp:void 0}}(e)}))},Qn=function(e,t){return{nextSequenceToken:void 0!==e.nextSequenceToken&&null!==e.nextSequenceToken?e.nextSequenceToken:void 0,rejectedLogEventsInfo:void 0!==e.rejectedLogEventsInfo&&null!==e.rejectedLogEventsInfo?er(e.rejectedLogEventsInfo,t):void 0}},er=function(e,t){return{expiredLogEventEndIndex:void 0!==e.expiredLogEventEndIndex&&null!==e.expiredLogEventEndIndex?e.expiredLogEventEndIndex:void 0,tooNewLogEventStartIndex:void 0!==e.tooNewLogEventStartIndex&&null!==e.tooNewLogEventStartIndex?e.tooNewLogEventStartIndex:void 0,tooOldLogEventEndIndex:void 0!==e.tooOldLogEventEndIndex&&null!==e.tooOldLogEventEndIndex?e.tooOldLogEventEndIndex:void 0}},tr=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},nr=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},rr=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},or=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},ir=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},ar=function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)},sr=function(e,t,n,r,o){return ve(void 0,void 0,void 0,(function(){var i,a,s,u,c,f;return me(this,(function(l){switch(l.label){case 0:return[4,e.endpoint()];case 1:return i=l.sent(),a=i.hostname,s=i.protocol,u=void 0===s?"https":s,c=i.port,f={protocol:u,hostname:a,port:c,method:"POST",path:n,headers:t},void 0!==r&&(f.hostname=r),void 0!==o&&(f.body=o),[2,new yn(f)]}}))}))},ur=function(e,t){return function(e,t){return ar(e,t).then((function(e){return t.utf8Encoder(e)}))}(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},cr=function(e,t){var n,r,o=function(e){var t=e;return t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=(n=e.headers,r="x-amzn-errortype",Object.keys(n).find((function(e){return e.toLowerCase()===r.toLowerCase()})));return void 0!==i?o(e.headers[i]):void 0!==t.code?o(t.code):void 0!==t.__type?o(t.__type):""},fr={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},lr={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function dr(e,t,n){return{applyToStack:function(r){r.add(function(e,t){return function(n,r){return function(r){return Object(mn.__awaiter)(void 0,void 0,void 0,(function(){var o,i;return Object(mn.__generator)(this,(function(a){switch(a.label){case 0:return[4,n(r)];case 1:return o=a.sent().response,[4,t(o,e)];case 2:return i=a.sent(),[2,{response:o,output:i}]}}))}))}}}(e,n),fr),r.add(function(e,t){return function(n,r){return function(r){return Object(mn.__awaiter)(void 0,void 0,void 0,(function(){var o;return Object(mn.__generator)(this,(function(i){switch(i.label){case 0:return[4,t(r.input,e)];case 1:return o=i.sent(),[2,n(Object(mn.__assign)(Object(mn.__assign)({},r),{request:o}))]}}))}))}}}(e,t),lr)}}}var hr=function(){var e=[],t=[],n=new Set,r=function(n){return e.forEach((function(e){n.add(e.middleware,Object(mn.__assign)({},e))})),t.forEach((function(e){n.addRelativeTo(e.middleware,Object(mn.__assign)({},e))})),n},o=function(e){var t=[];return e.before.forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,Object(mn.__spread)(o(e)))})),t.push(e),e.after.reverse().forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,Object(mn.__spread)(o(e)))})),t},i=function(){var n,r=[],i=[],a={};return e.forEach((function(e){var t=Object(mn.__assign)(Object(mn.__assign)({},e),{before:[],after:[]});t.name&&(a[t.name]=t),r.push(t)})),t.forEach((function(e){var t=Object(mn.__assign)(Object(mn.__assign)({},e),{before:[],after:[]});t.name&&(a[t.name]=t),i.push(t)})),i.forEach((function(e){if(e.toMiddleware){var t=a[e.toMiddleware];if(void 0===t)throw new Error(e.toMiddleware+" is not found when adding "+(e.name||"anonymous")+" middleware "+e.relation+" "+e.toMiddleware);"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}})),(n=r,n.sort((function(e,t){return pr[t.step]-pr[e.step]||gr[t.priority||"normal"]-gr[e.priority||"normal"]}))).map(o).reduce((function(e,t){return e.push.apply(e,Object(mn.__spread)(t)),e}),[]).map((function(e){return e.middleware}))},a={add:function(t,r){void 0===r&&(r={});var o=r.name,i=r.override,a=Object(mn.__assign)({step:"initialize",priority:"normal",middleware:t},r);if(o){if(n.has(o)){if(!i)throw new Error("Duplicate middleware name '"+o+"'");var s=e.findIndex((function(e){return e.name===o})),u=e[s];if(u.step!==a.step||u.priority!==a.priority)throw new Error('"'+o+'" middleware with '+u.priority+" priority in "+u.step+" step cannot be overridden by same-name middleware with "+a.priority+" priority in "+a.step+" step.");e.splice(s,1)}n.add(o)}e.push(a)},addRelativeTo:function(e,r){var o=r.name,i=r.override,a=Object(mn.__assign)({middleware:e},r);if(o){if(n.has(o)){if(!i)throw new Error("Duplicate middleware name '"+o+"'");var s=t.findIndex((function(e){return e.name===o})),u=t[s];if(u.toMiddleware!==a.toMiddleware||u.relation!==a.relation)throw new Error('"'+o+'" middleware '+u.relation+' "'+u.toMiddleware+'" middleware cannot be overridden by same-name middleware '+a.relation+' "'+a.toMiddleware+'" middleware.');t.splice(s,1)}n.add(o)}t.push(a)},clone:function(){return r(hr())},use:function(e){e.applyToStack(a)},remove:function(r){return"string"==typeof r?function(r){var o=!1,i=function(e){return!e.name||e.name!==r||(o=!0,n.delete(r),!1)};return e=e.filter(i),t=t.filter(i),o}(r):function(r){var o=!1,i=function(e){return e.middleware!==r||(o=!0,e.name&&n.delete(e.name),!1)};return e=e.filter(i),t=t.filter(i),o}(r)},removeByTag:function(r){var o=!1,i=function(e){var t=e.tags,i=e.name;return!t||!t.includes(r)||(i&&n.delete(i),o=!0,!1)};return e=e.filter(i),t=t.filter(i),o},concat:function(e){var t=r(hr());return t.use(e),t},applyToStack:r,resolve:function(e,t){var n,r;try{for(var o=Object(mn.__values)(i().reverse()),a=o.next();!a.done;a=o.next()){e=(0,a.value)(e,t)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return e}};return a},pr={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},gr={high:3,normal:2,low:1},vr=function(){function e(e){this.middlewareStack=hr(),this.config=e}return e.prototype.send=function(e,t,n){var r="function"!=typeof t?t:void 0,o="function"==typeof t?t:n,i=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!o)return i(e).then((function(e){return e.output}));i(e).then((function(e){return o(null,e.output)}),(function(e){return o(e)})).catch((function(){}))},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),mr=function(){this.middlewareStack=hr()};var yr=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,Object(mn.__spread)([null],arguments)),n=new t;return Object.setPrototypeOf(n,e.prototype),n};yr.prototype=Object.create(String.prototype,{constructor:{value:yr,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(yr,String);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Object(mn.__extends)(t,e),t.prototype.deserializeJSON=function(){return JSON.parse(e.prototype.toString.call(this))},t.prototype.toJSON=function(){return e.prototype.toString.call(this)},t.fromObject=function(e){return e instanceof t?e:new t(e instanceof String||"string"==typeof e?e:JSON.stringify(e))}}(yr);var br=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return pe(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(dr(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"CloudWatchLogsClient",commandName:"CreateLogGroupCommand",inputFilterSensitiveLog:Ce.filterSensitiveLog,outputFilterSensitiveLog:function(e){return e}},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r;return me(this,(function(o){return n={"content-type":"application/x-amz-json-1.1","x-amz-target":"Logs_20140328.CreateLogGroup"},r=JSON.stringify(Rn(e,t)),[2,sr(t,n,"/",void 0,r)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return ve(void 0,void 0,void 0,(function(){var n;return me(this,(function(r){switch(r.label){case 0:return e.statusCode>=300?[2,bn(e,t)]:[4,ar(e.body,t)];case 1:return r.sent(),n={$metadata:ir(e)},[2,Promise.resolve(n)]}}))}))}(e,t)},t}(mr),wr=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return pe(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(dr(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"CloudWatchLogsClient",commandName:"DescribeLogGroupsCommand",inputFilterSensitiveLog:Je.filterSensitiveLog,outputFilterSensitiveLog:Qe.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r;return me(this,(function(o){return n={"content-type":"application/x-amz-json-1.1","x-amz-target":"Logs_20140328.DescribeLogGroups"},r=JSON.stringify(Nn(e,t)),[2,sr(t,n,"/",void 0,r)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r,o;return me(this,(function(i){switch(i.label){case 0:return e.statusCode>=300?[2,_n(e,t)]:[4,ur(e.body,t)];case 1:return n=i.sent(),{},r=Gn(n,t),o=ge({$metadata:ir(e)},r),[2,Promise.resolve(o)]}}))}))}(e,t)},t}(mr),_r=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return pe(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(dr(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"CloudWatchLogsClient",commandName:"CreateLogStreamCommand",inputFilterSensitiveLog:Pe.filterSensitiveLog,outputFilterSensitiveLog:function(e){return e}},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r;return me(this,(function(o){return n={"content-type":"application/x-amz-json-1.1","x-amz-target":"Logs_20140328.CreateLogStream"},r=JSON.stringify(Mn(e,t)),[2,sr(t,n,"/",void 0,r)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return ve(void 0,void 0,void 0,(function(){var n;return me(this,(function(r){switch(r.label){case 0:return e.statusCode>=300?[2,wn(e,t)]:[4,ar(e.body,t)];case 1:return r.sent(),n={$metadata:ir(e)},[2,Promise.resolve(n)]}}))}))}(e,t)},t}(mr),Sr=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return pe(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(dr(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"CloudWatchLogsClient",commandName:"DescribeLogStreamsCommand",inputFilterSensitiveLog:tt.filterSensitiveLog,outputFilterSensitiveLog:rt.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r;return me(this,(function(o){return n={"content-type":"application/x-amz-json-1.1","x-amz-target":"Logs_20140328.DescribeLogStreams"},r=JSON.stringify(zn(e,t)),[2,sr(t,n,"/",void 0,r)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r,o;return me(this,(function(i){switch(i.label){case 0:return e.statusCode>=300?[2,Sn(e,t)]:[4,ur(e.body,t)];case 1:return n=i.sent(),{},r=Hn(n,t),o=ge({$metadata:ir(e)},r),[2,Promise.resolve(o)]}}))}))}(e,t)},t}(mr),Er=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return pe(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(dr(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"CloudWatchLogsClient",commandName:"GetLogEventsCommand",inputFilterSensitiveLog:kt.filterSensitiveLog,outputFilterSensitiveLog:It.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r;return me(this,(function(o){return n={"content-type":"application/x-amz-json-1.1","x-amz-target":"Logs_20140328.GetLogEvents"},r=JSON.stringify(Bn(e,t)),[2,sr(t,n,"/",void 0,r)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r,o;return me(this,(function(i){switch(i.label){case 0:return e.statusCode>=300?[2,En(e,t)]:[4,ur(e.body,t)];case 1:return n=i.sent(),{},r=Wn(n,t),o=ge({$metadata:ir(e)},r),[2,Promise.resolve(o)]}}))}))}(e,t)},t}(mr),xr=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return pe(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(dr(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"CloudWatchLogsClient",commandName:"PutLogEventsCommand",inputFilterSensitiveLog:$t.filterSensitiveLog,outputFilterSensitiveLog:Vt.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r;return me(this,(function(o){return n={"content-type":"application/x-amz-json-1.1","x-amz-target":"Logs_20140328.PutLogEvents"},r=JSON.stringify(Fn(e,t)),[2,sr(t,n,"/",void 0,r)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return ve(void 0,void 0,void 0,(function(){var n,r,o;return me(this,(function(i){switch(i.label){case 0:return e.statusCode>=300?[2,xn(e,t)]:[4,ur(e.body,t)];case 1:return n=i.sent(),{},r=Qn(n,t),o=ge({$metadata:ir(e)},r),[2,Promise.resolve(o)]}}))}))}(e,t)},t}(mr),Ar=n(20),Or=n(6),kr=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,Lr)},Lr=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};for(var Ir=function(){function e(e){var t=(void 0===e?{}:e).requestTimeout;this.requestTimeout=t}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var n=(void 0===t?{}:t).abortSignal,r=this.requestTimeout;if(null==n?void 0:n.aborted){var o=new Error("Request aborted");return o.name="AbortError",Promise.reject(o)}var i=e.path;if(e.query){var a=function(e){var t,n,r=[];try{for(var o=Object(mn.__values)(Object.keys(e).sort()),i=o.next();!i.done;i=o.next()){var a=i.value,s=e[a];if(a=kr(a),Array.isArray(s))for(var u=0,c=s.length;u<c;u++)r.push(a+"="+kr(s[u]));else{var f=a;(s||"string"==typeof s)&&(f+="="+kr(s)),r.push(f)}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r.join("&")}(e.query);a&&(i+="?"+a)}var s=e.port,u=e.method,c=e.protocol+"//"+e.hostname+(s?":"+s:"")+i,f={body:"GET"===u||"HEAD"===u?void 0:e.body,headers:new Headers(e.headers),method:u};"undefined"!=typeof AbortController&&(f.signal=n);var l,d=new Request(c,f),h=[fetch(d).then((function(e){var t,n,r=e.headers,o={};try{for(var i=Object(mn.__values)(r.entries()),a=i.next();!a.done;a=i.next()){var s=a.value;o[s[0]]=s[1]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new vn({headers:o,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new vn({headers:o,statusCode:e.status,body:t})}}))})),(l=r,void 0===l&&(l=0),new Promise((function(e,t){l&&setTimeout((function(){var e=new Error("Request did not complete within "+l+" ms");e.name="TimeoutError",t(e)}),l)})))];return n&&h.push(new Promise((function(e,t){n.onabort=function(){var e=new Error("Request aborted");e.name="AbortError",t(e)}}))),Promise.race(h)},e}(),Cr={},Pr=new Array(64),Tr=0,jr="A".charCodeAt(0),Rr="Z".charCodeAt(0);Tr+jr<=Rr;Tr++){var Mr=String.fromCharCode(Tr+jr);Cr[Mr]=Tr,Pr[Tr]=Mr}for(Tr=0,jr="a".charCodeAt(0),Rr="z".charCodeAt(0);Tr+jr<=Rr;Tr++){Mr=String.fromCharCode(Tr+jr);var Nr=Tr+26;Cr[Mr]=Nr,Pr[Nr]=Mr}for(Tr=0;Tr<10;Tr++){Cr[Tr.toString(10)]=Tr+52;Mr=Tr.toString(10),Nr=Tr+52;Cr[Mr]=Nr,Pr[Nr]=Mr}Cr["+"]=62,Pr[62]="+",Cr["/"]=63,Pr[63]="/";function zr(e){var t=e.length/4*3;"=="===e.substr(-2)?t-=2:"="===e.substr(-1)&&t--;for(var n=new ArrayBuffer(t),r=new DataView(n),o=0;o<e.length;o+=4){for(var i=0,a=0,s=o,u=o+3;s<=u;s++)"="!==e[s]?(i|=Cr[e[s]]<<6*(u-s),a+=6):i>>=6;var c=o/4*3;i>>=a%8;for(var f=Math.floor(a/8),l=0;l<f;l++){var d=8*(f-l-1);r.setUint8(c+l,(i&255<<d)>>d)}}return new Uint8Array(n)}function Br(e){for(var t="",n=0;n<e.length;n+=3){for(var r=0,o=0,i=n,a=Math.min(n+3,e.length);i<a;i++)r|=e[i]<<8*(a-i-1),o+=8;var s=Math.ceil(o/6);r<<=6*s-o;for(var u=1;u<=s;u++){var c=6*(s-u);t+=Pr[(r&63<<c)>>c]}t+="==".slice(0,4-s)}return t}var Ur=function(e){return"function"==typeof Blob&&e instanceof Blob?function(e){return Object(mn.__awaiter)(this,void 0,void 0,(function(){var t,n;return Object(mn.__generator)(this,(function(r){switch(r.label){case 0:return[4,Fr(e)];case 1:return t=r.sent(),n=zr(t),[2,new Uint8Array(n)]}}))}))}(e):function(e){return Object(mn.__awaiter)(this,void 0,void 0,(function(){var t,n,r,o,i,a,s;return Object(mn.__generator)(this,(function(u){switch(u.label){case 0:t=new Uint8Array(0),n=e.getReader(),r=!1,u.label=1;case 1:return r?[3,3]:[4,n.read()];case 2:return o=u.sent(),i=o.done,(a=o.value)&&(s=t,(t=new Uint8Array(s.length+a.length)).set(s),t.set(a,s.length)),r=i,[3,1];case 3:return[2,t]}}))}))}(e)};function Fr(e){return new Promise((function(t,n){var r=new FileReader;r.onloadend=function(){var e;if(2!==r.readyState)return n(new Error("Reader aborted too early"));var o=null!==(e=r.result)&&void 0!==e?e:"",i=o.indexOf(","),a=i>-1?i+1:o.length;t(o.substring(a))},r.onabort=function(){return n(new Error("Read aborted"))},r.onerror=function(){return n(r.error)},r.readAsDataURL(e)}))}var Dr=function(e){return function(){return Promise.reject(e)}},qr={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Gr=function(e){return{applyToStack:function(t){t.add(function(e){return function(t,n){return function(r){return Object(mn.__awaiter)(void 0,void 0,void 0,(function(){var o;return Object(mn.__generator)(this,(function(i){return(null===(o=null==e?void 0:e.retryStrategy)||void 0===o?void 0:o.mode)&&(n.userAgent=Object(mn.__spread)(n.userAgent||[],[["cfg/retry-mode",e.retryStrategy.mode]])),[2,e.retryStrategy.retry(t,r)]}))}))}}}(e),qr)}}},Hr=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],Wr=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],$r=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],Kr=[500,502,503,504],Vr=function(e){var t,n;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||Wr.includes(e.name)||1==(null===(n=e.$retryable)||void 0===n?void 0:n.throttling)},Yr=n(18),Zr=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},Jr=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return Hr.includes(e.name)}(e)||Vr(e)||function(e){var t;return $r.includes(e.name)||Kr.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},Xr=function(){function e(e,t){var n,r,o,i,a,s,u,c;this.maxAttemptsProvider=e,this.mode="standard",this.retryDecider=null!==(n=null==t?void 0:t.retryDecider)&&void 0!==n?n:Jr,this.delayDecider=null!==(r=null==t?void 0:t.delayDecider)&&void 0!==r?r:Zr,this.retryQuota=null!==(o=null==t?void 0:t.retryQuota)&&void 0!==o?o:(a=i=500,s=i,u=function(e){return"TimeoutError"===e.name?10:5},c=function(e){return u(e)<=s},Object.freeze({hasRetryTokens:c,retrieveRetryTokens:function(e){if(!c(e))throw new Error("No retry token available");var t=u(e);return s-=t,t},releaseRetryTokens:function(e){s+=null!=e?e:1,s=Math.min(s,a)}}))}return e.prototype.shouldRetry=function(e,t,n){return t<n&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return Object(mn.__awaiter)(this,void 0,void 0,(function(){var e;return Object(mn.__generator)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.maxAttemptsProvider()];case 1:return e=t.sent(),[3,3];case 2:return t.sent(),e=3,[3,3];case 3:return[2,e]}}))}))},e.prototype.retry=function(e,t){return Object(mn.__awaiter)(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,c;return Object(mn.__generator)(this,(function(f){switch(f.label){case 0:return r=0,o=0,[4,this.getMaxAttempts()];case 1:i=f.sent(),a=t.request,yn.isInstance(a)&&(a.headers["amz-sdk-invocation-id"]=Object(Yr.v4)()),s=function(){var s,c,f,l,d;return Object(mn.__generator)(this,(function(h){switch(h.label){case 0:return h.trys.push([0,2,,5]),yn.isInstance(a)&&(a.headers["amz-sdk-request"]="attempt="+(r+1)+"; max="+i),[4,e(t)];case 1:return s=h.sent(),c=s.response,f=s.output,u.retryQuota.releaseRetryTokens(n),f.$metadata.attempts=r+1,f.$metadata.totalRetryDelay=o,[2,{value:{response:c,output:f}}];case 2:return l=h.sent(),r++,u.shouldRetry(l,r,i)?(n=u.retryQuota.retrieveRetryTokens(l),d=u.delayDecider(Vr(l)?500:100,r),o+=d,[4,new Promise((function(e){return setTimeout(e,d)}))]):[3,4];case 3:return h.sent(),[2,"continue"];case 4:throw l.$metadata||(l.$metadata={}),l.$metadata.attempts=r,l.$metadata.totalRetryDelay=o,l;case 5:return[2]}}))},u=this,f.label=2;case 2:return[5,s()];case 3:return"object"==typeof(c=f.sent())?[2,c.value]:[3,2];case 4:return[2]}}))}))},e}(),Qr=function(e){var t=eo(e.maxAttempts);return Object(mn.__assign)(Object(mn.__assign)({},e),{maxAttempts:t,retryStrategy:e.retryStrategy||new Xr(t)})},eo=function(e){if(void 0===e&&(e=3),"number"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function to(e){if("string"==typeof e){for(var t=e.length,n=t-1;n>=0;n--){var r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2)}return t}return"number"==typeof e.byteLength?e.byteLength:"number"==typeof e.size?e.size:void 0}var no=n(19),ro=n.n(no),oo=function(e){var t=e.serviceId,n=e.clientVersion;return function(){return Object(mn.__awaiter)(void 0,void 0,void 0,(function(){var e,r,o,i,a,s,u,c,f;return Object(mn.__generator)(this,(function(l){return e=(null===(o=null===window||void 0===window?void 0:window.navigator)||void 0===o?void 0:o.userAgent)?ro.a.parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",n],["os/"+((null===(i=null==e?void 0:e.os)||void 0===i?void 0:i.name)||"other"),null===(a=null==e?void 0:e.os)||void 0===a?void 0:a.version],["lang/js"],["md/browser",(null!==(u=null===(s=null==e?void 0:e.browser)||void 0===s?void 0:s.name)&&void 0!==u?u:"unknown")+"_"+(null!==(f=null===(c=null==e?void 0:e.browser)||void 0===c?void 0:c.version)&&void 0!==f?f:"unknown")]],t&&r.push(["api/"+t,n]),[2,r]}))}))}},io=n(4),ao=new Set(["af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-south-1","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-north-1","eu-south-1","eu-west-1","eu-west-2","eu-west-3","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"]),so=new Set(["cn-north-1","cn-northwest-1"]),uo=new Set(["us-iso-east-1"]),co=new Set(["us-isob-east-1"]),fo=new Set(["us-gov-east-1","us-gov-west-1"]);var lo=function(e){var t,n=new URL(e),r=n.hostname,o=n.pathname,i=n.port,a=n.protocol,s=n.search;return s&&(t=function(e){var t,n,r={};if(e=e.replace(/^\?/,""))try{for(var o=Object(mn.__values)(e.split("&")),i=o.next();!i.done;i=o.next()){var a=i.value,s=Object(mn.__read)(a.split("="),2),u=s[0],c=s[1],f=void 0===c?null:c;u=decodeURIComponent(u),f&&(f=decodeURIComponent(f)),u in r?Array.isArray(r[u])?r[u].push(f):r[u]=[r[u],f]:r[u]=f}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(s)),{hostname:r,port:i?parseInt(i):void 0,protocol:a,path:o,query:t}},ho={apiVersion:"2014-03-28",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var n=void 0;switch(e){case"af-south-1":n={hostname:"logs.af-south-1.amazonaws.com",partition:"aws"};break;case"ap-east-1":n={hostname:"logs.ap-east-1.amazonaws.com",partition:"aws"};break;case"ap-northeast-1":n={hostname:"logs.ap-northeast-1.amazonaws.com",partition:"aws"};break;case"ap-northeast-2":n={hostname:"logs.ap-northeast-2.amazonaws.com",partition:"aws"};break;case"ap-south-1":n={hostname:"logs.ap-south-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-1":n={hostname:"logs.ap-southeast-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-2":n={hostname:"logs.ap-southeast-2.amazonaws.com",partition:"aws"};break;case"ca-central-1":n={hostname:"logs.ca-central-1.amazonaws.com",partition:"aws"};break;case"cn-north-1":n={hostname:"logs.cn-north-1.amazonaws.com.cn",partition:"aws-cn"};break;case"cn-northwest-1":n={hostname:"logs.cn-northwest-1.amazonaws.com.cn",partition:"aws-cn"};break;case"eu-central-1":n={hostname:"logs.eu-central-1.amazonaws.com",partition:"aws"};break;case"eu-north-1":n={hostname:"logs.eu-north-1.amazonaws.com",partition:"aws"};break;case"eu-south-1":n={hostname:"logs.eu-south-1.amazonaws.com",partition:"aws"};break;case"eu-west-1":n={hostname:"logs.eu-west-1.amazonaws.com",partition:"aws"};break;case"eu-west-2":n={hostname:"logs.eu-west-2.amazonaws.com",partition:"aws"};break;case"eu-west-3":n={hostname:"logs.eu-west-3.amazonaws.com",partition:"aws"};break;case"fips-us-east-1":n={hostname:"logs-fips.us-east-1.amazonaws.com",partition:"aws",signingRegion:"us-east-1"};break;case"fips-us-east-2":n={hostname:"logs-fips.us-east-2.amazonaws.com",partition:"aws",signingRegion:"us-east-2"};break;case"fips-us-west-1":n={hostname:"logs-fips.us-west-1.amazonaws.com",partition:"aws",signingRegion:"us-west-1"};break;case"fips-us-west-2":n={hostname:"logs-fips.us-west-2.amazonaws.com",partition:"aws",signingRegion:"us-west-2"};break;case"me-south-1":n={hostname:"logs.me-south-1.amazonaws.com",partition:"aws"};break;case"sa-east-1":n={hostname:"logs.sa-east-1.amazonaws.com",partition:"aws"};break;case"us-east-1":n={hostname:"logs.us-east-1.amazonaws.com",partition:"aws"};break;case"us-east-2":n={hostname:"logs.us-east-2.amazonaws.com",partition:"aws"};break;case"us-gov-east-1":n={hostname:"logs.us-gov-east-1.amazonaws.com",partition:"aws-us-gov",signingRegion:"us-gov-east-1"};break;case"us-gov-west-1":n={hostname:"logs.us-gov-west-1.amazonaws.com",partition:"aws-us-gov",signingRegion:"us-gov-west-1"};break;case"us-iso-east-1":n={hostname:"logs.us-iso-east-1.c2s.ic.gov",partition:"aws-iso"};break;case"us-isob-east-1":n={hostname:"logs.us-isob-east-1.sc2s.sgov.gov",partition:"aws-iso-b"};break;case"us-west-1":n={hostname:"logs.us-west-1.amazonaws.com",partition:"aws"};break;case"us-west-2":n={hostname:"logs.us-west-2.amazonaws.com",partition:"aws"};break;default:ao.has(e)&&(n={hostname:"logs.{region}.amazonaws.com".replace("{region}",e),partition:"aws"}),so.has(e)&&(n={hostname:"logs.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),uo.has(e)&&(n={hostname:"logs.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),co.has(e)&&(n={hostname:"logs.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),fo.has(e)&&(n={hostname:"logs.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov"}),void 0===n&&(n={hostname:"logs.{region}.amazonaws.com".replace("{region}",e),partition:"aws"})}return Promise.resolve(ge({signingService:"logs"},n))},serviceId:"CloudWatch Logs",urlParser:lo},po=ge(ge({},ho),{runtime:"browser",base64Decoder:zr,base64Encoder:Br,bodyLengthChecker:to,credentialDefaultProvider:function(e){return function(){return Promise.reject(new Error("Credential is missing"))}},defaultUserAgentProvider:oo({serviceId:ho.serviceId,clientVersion:Ar.version}),maxAttempts:3,region:Dr("Region is missing"),requestHandler:new Ir,sha256:Or.Sha256,streamCollector:Ur,utf8Decoder:io.fromUtf8,utf8Encoder:io.toUtf8}),go=function(e){var t;return Object(mn.__assign)(Object(mn.__assign)({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:e.endpoint?vo(e):function(){return mo(e)},isCustomEndpoint:!!e.endpoint})},vo=function(e){var t=e.endpoint,n=e.urlParser;if("string"==typeof t){var r=Promise.resolve(n(t));return function(){return r}}if("object"==typeof t){var o=Promise.resolve(t);return function(){return o}}return t},mo=function(e){return Object(mn.__awaiter)(void 0,void 0,void 0,(function(){var t,n,r,o,i;return Object(mn.__generator)(this,(function(a){switch(a.label){case 0:return t=e.tls,n=void 0===t||t,[4,e.region()];case 1:if(r=a.sent(),!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(r))throw new Error("Invalid region in client config");return[4,e.regionInfoProvider(r)];case 2:if(!(o=(null!==(i=a.sent())&&void 0!==i?i:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser((n?"https:":"http:")+"//"+o)]}}))}))},yo=function(e){if(!e.region)throw new Error("Region is missing");return Object(mn.__assign)(Object(mn.__assign)({},e),{region:bo(e.region)})},bo=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var wo={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},_o=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(n){return function(r){return Object(mn.__awaiter)(t,void 0,void 0,(function(){var t,o,i,a,s;return Object(mn.__generator)(this,(function(u){return t=r.request,yn.isInstance(t)&&(o=t.body,i=t.headers,o&&-1===Object.keys(i).map((function(e){return e.toLowerCase()})).indexOf("content-length")&&void 0!==(a=e(o))&&(t.headers=Object(mn.__assign)(Object(mn.__assign)({},t.headers),((s={})["content-length"]=String(a),s)))),[2,n(Object(mn.__assign)(Object(mn.__assign)({},r),{request:t}))]}))}))}}}(e.bodyLengthChecker),wo)}}};for(var So={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Eo=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(n){return Object(mn.__awaiter)(void 0,void 0,void 0,(function(){var r,o;return Object(mn.__generator)(this,(function(i){return yn.isInstance(n.request)?(r=n.request,o=(e.requestHandler.metadata||{}).handlerProtocol,(void 0===o?"":o).indexOf("h2")>=0&&!r.headers[":authority"]?(delete r.headers.host,r.headers[":authority"]=""):r.headers.host||(r.headers.host=r.hostname),[2,t(n)]):[2,t(n)]}))}))}}}(e),So)}}},xo={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Ao=function(e){return{applyToStack:function(e){e.add((function(e,t){return function(n){return Object(mn.__awaiter)(void 0,void 0,void 0,(function(){var r,o,i,a,s,u,c,f,l;return Object(mn.__generator)(this,(function(d){switch(d.label){case 0:return r=t.clientName,o=t.commandName,i=t.inputFilterSensitiveLog,a=t.logger,s=t.outputFilterSensitiveLog,[4,e(n)];case 1:return u=d.sent(),a?("function"==typeof a.info&&(c=u.output,f=c.$metadata,l=Object(mn.__rest)(c,["$metadata"]),a.info({clientName:r,commandName:o,input:i(n.input),output:s(l),metadata:f})),[2,u]):[2,u]}}))}))}}),xo)}}},Oo={},ko={},Lo=0;Lo<256;Lo++){var Io=Lo.toString(16).toLowerCase();1===Io.length&&(Io="0"+Io),Oo[Lo]=Io,ko[Io]=Lo}function Co(e){for(var t="",n=0;n<e.byteLength;n++)t+=Oo[e[n]];return t}var Po="X-Amz-Date".toLowerCase(),To=["authorization",Po,"date"],jo="X-Amz-Signature".toLowerCase(),Ro="X-Amz-Security-Token".toLowerCase(),Mo={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},No=/^proxy-/,zo=/^sec-/,Bo="AWS4-HMAC-SHA256-PAYLOAD",Uo={},Fo=[];function Do(e,t,n){return e+"/"+t+"/"+n+"/aws4_request"}function qo(e,t,n){var r=new e(t);return r.update(n),r.digest()}function Go(e,t,n){var r,o,i=e.headers,a={};try{for(var s=Object(mn.__values)(Object.keys(i).sort()),u=s.next();!u.done;u=s.next()){var c=u.value,f=c.toLowerCase();(f in Mo||(null==t?void 0:t.has(f))||No.test(f)||zo.test(f))&&(!n||n&&!n.has(f))||(a[f]=i[c].trim().replace(/\s+/g," "))}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return a}var Ho=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,Wo)},Wo=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};function $o(e,t){var n=e.headers,r=e.body;return Object(mn.__awaiter)(this,void 0,void 0,(function(){var e,o,i,a,s,u,c;return Object(mn.__generator)(this,(function(f){switch(f.label){case 0:try{for(e=Object(mn.__values)(Object.keys(n)),o=e.next();!o.done;o=e.next())if("x-amz-content-sha256"===(i=o.value).toLowerCase())return[2,n[i]]}catch(e){u={error:e}}finally{try{o&&!o.done&&(c=e.return)&&c.call(e)}finally{if(u)throw u.error}}return null!=r?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"==typeof r||ArrayBuffer.isView(r)||(l=r,"function"==typeof ArrayBuffer&&l instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(l))?((a=new t).update(r),s=Co,[4,a.digest()]):[3,3];case 2:return[2,s.apply(void 0,[f.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var l}))}))}function Ko(e){var t=e.headers,n=e.query,r=Object(mn.__rest)(e,["headers","query"]);return Object(mn.__assign)(Object(mn.__assign)({},r),{headers:Object(mn.__assign)({},t),query:n?Vo(n):void 0})}function Vo(e){return Object.keys(e).reduce((function(t,n){var r,o=e[n];return Object(mn.__assign)(Object(mn.__assign)({},t),((r={})[n]=Array.isArray(o)?Object(mn.__spread)(o):o,r))}),{})}function Yo(e){var t,n;e="function"==typeof e.clone?e.clone():Ko(e);try{for(var r=Object(mn.__values)(Object.keys(e.headers)),o=r.next();!o.done;o=r.next()){var i=o.value;To.indexOf(i.toLowerCase())>-1&&delete e.headers[i]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return e}function Zo(e){return function(e){if("number"==typeof e)return new Date(1e3*e);if("string"==typeof e)return Number(e)?new Date(1e3*Number(e)):new Date(e);return e}(e).toISOString().replace(/\.\d{3}Z$/,"Z")}var Jo=function(){function e(e){var t=e.applyChecksum,n=e.credentials,r=e.region,o=e.service,i=e.sha256,a=e.uriEscapePath,s=void 0===a||a;this.service=o,this.sha256=i,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=ei(r),this.credentialProvider=ti(n)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),Object(mn.__awaiter)(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,f,l,d,h,p,g,v,m,y,b,w,_,S,E,x,A;return Object(mn.__generator)(this,(function(O){switch(O.label){case 0:return n=t.signingDate,r=void 0===n?new Date:n,o=t.expiresIn,i=void 0===o?3600:o,a=t.unsignableHeaders,s=t.unhoistableHeaders,u=t.signableHeaders,c=t.signingRegion,f=t.signingService,[4,this.credentialProvider()];case 1:return l=O.sent(),null==c?[3,2]:(h=c,[3,4]);case 2:return[4,this.regionProvider()];case 3:h=O.sent(),O.label=4;case 4:return d=h,p=Xo(r),g=p.longDate,v=p.shortDate,i>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(m=Do(v,d,null!=f?f:this.service),y=function(e,t){var n,r,o;void 0===t&&(t={});var i="function"==typeof e.clone?e.clone():Ko(e),a=i.headers,s=i.query,u=void 0===s?{}:s;try{for(var c=Object(mn.__values)(Object.keys(a)),f=c.next();!f.done;f=c.next()){var l=f.value,d=l.toLowerCase();"x-amz-"!==d.substr(0,6)||(null===(o=t.unhoistableHeaders)||void 0===o?void 0:o.has(d))||(u[l]=a[l],delete a[l])}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return Object(mn.__assign)(Object(mn.__assign)({},e),{headers:a,query:u})}(Yo(e),{unhoistableHeaders:s}),l.sessionToken&&(y.query["X-Amz-Security-Token"]=l.sessionToken),y.query["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",y.query["X-Amz-Credential"]=l.accessKeyId+"/"+m,y.query["X-Amz-Date"]=g,y.query["X-Amz-Expires"]=i.toString(10),b=Go(y,a,u),y.query["X-Amz-SignedHeaders"]=Qo(b),w=y.query,_="X-Amz-Signature",S=this.getSignature,E=[g,m,this.getSigningKey(l,d,v,f)],x=this.createCanonicalRequest,A=[y,b],[4,$o(e,this.sha256)]);case 5:return[4,S.apply(this,E.concat([x.apply(this,A.concat([O.sent()]))]))];case 6:return w[_]=O.sent(),[2,y]}}))}))},e.prototype.sign=function(e,t){return Object(mn.__awaiter)(this,void 0,void 0,(function(){return Object(mn.__generator)(this,(function(n){return"string"==typeof e?[2,this.signString(e,t)]:e.headers&&e.payload?[2,this.signEvent(e,t)]:[2,this.signRequest(e,t)]}))}))},e.prototype.signEvent=function(e,t){var n=e.headers,r=e.payload,o=t.signingDate,i=void 0===o?new Date:o,a=t.priorSignature,s=t.signingRegion,u=t.signingService;return Object(mn.__awaiter)(this,void 0,void 0,(function(){var e,t,o,c,f,l,d,h,p,g,v;return Object(mn.__generator)(this,(function(m){switch(m.label){case 0:return null==s?[3,1]:(t=s,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=m.sent(),m.label=3;case 3:return e=t,o=Xo(i),c=o.shortDate,f=o.longDate,l=Do(c,e,null!=u?u:this.service),[4,$o({headers:{},body:r},this.sha256)];case 4:return d=m.sent(),(h=new this.sha256).update(n),g=Co,[4,h.digest()];case 5:return p=g.apply(void 0,[m.sent()]),v=[Bo,f,l,a,p,d].join("\n"),[2,this.signString(v,{signingDate:i,signingRegion:e,signingService:u})]}}))}))},e.prototype.signString=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signingRegion,a=n.signingService;return Object(mn.__awaiter)(this,void 0,void 0,(function(){var t,n,r,s,u,c,f,l;return Object(mn.__generator)(this,(function(d){switch(d.label){case 0:return[4,this.credentialProvider()];case 1:return t=d.sent(),null==i?[3,2]:(r=i,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=d.sent(),d.label=4;case 4:return n=r,s=Xo(o).shortDate,f=(c=this.sha256).bind,[4,this.getSigningKey(t,n,s,a)];case 5:return(u=new(f.apply(c,[void 0,d.sent()]))).update(e),l=Co,[4,u.digest()];case 6:return[2,l.apply(void 0,[d.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signableHeaders,a=n.unsignableHeaders,s=n.signingRegion,u=n.signingService;return Object(mn.__awaiter)(this,void 0,void 0,(function(){var t,n,r,c,f,l,d,h,p,g,v;return Object(mn.__generator)(this,(function(m){switch(m.label){case 0:return[4,this.credentialProvider()];case 1:return t=m.sent(),null==s?[3,2]:(r=s,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=m.sent(),m.label=4;case 4:return n=r,c=Yo(e),f=Xo(o),l=f.longDate,d=f.shortDate,h=Do(d,n,null!=u?u:this.service),c.headers[Po]=l,t.sessionToken&&(c.headers[Ro]=t.sessionToken),[4,$o(c,this.sha256)];case 5:return p=m.sent(),!function(e,t){var n,r;e=e.toLowerCase();try{for(var o=Object(mn.__values)(Object.keys(t)),i=o.next();!i.done;i=o.next()){if(e===i.value.toLowerCase())return!0}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}("x-amz-content-sha256",c.headers)&&this.applyChecksum&&(c.headers["x-amz-content-sha256"]=p),g=Go(c,a,i),[4,this.getSignature(l,h,this.getSigningKey(t,n,d,u),this.createCanonicalRequest(c,g,p))];case 6:return v=m.sent(),c.headers.authorization="AWS4-HMAC-SHA256 Credential="+t.accessKeyId+"/"+h+", SignedHeaders="+Qo(g)+", Signature="+v,[2,c]}}))}))},e.prototype.createCanonicalRequest=function(e,t,n){var r=Object.keys(t).sort();return e.method+"\n"+this.getCanonicalPath(e)+"\n"+function(e){var t,n,r=e.query,o=void 0===r?{}:r,i=[],a={},s=function(e){if(e.toLowerCase()===jo)return"continue";i.push(e);var t=o[e];"string"==typeof t?a[e]=Ho(e)+"="+Ho(t):Array.isArray(t)&&(a[e]=t.slice(0).sort().reduce((function(t,n){return t.concat([Ho(e)+"="+Ho(n)])}),[]).join("&"))};try{for(var u=Object(mn.__values)(Object.keys(o).sort()),c=u.next();!c.done;c=u.next()){s(c.value)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return i.map((function(e){return a[e]})).filter((function(e){return e})).join("&")}(e)+"\n"+r.map((function(e){return e+":"+t[e]})).join("\n")+"\n\n"+r.join(";")+"\n"+n},e.prototype.createStringToSign=function(e,t,n){return Object(mn.__awaiter)(this,void 0,void 0,(function(){var r,o;return Object(mn.__generator)(this,(function(i){switch(i.label){case 0:return(r=new this.sha256).update(n),[4,r.digest()];case 1:return o=i.sent(),[2,"AWS4-HMAC-SHA256\n"+e+"\n"+t+"\n"+Co(o)]}}))}))},e.prototype.getCanonicalPath=function(e){var t=e.path;return this.uriEscapePath?"/"+encodeURIComponent(t.replace(/^\//,"")).replace(/%2F/g,"/"):t},e.prototype.getSignature=function(e,t,n,r){return Object(mn.__awaiter)(this,void 0,void 0,(function(){var o,i,a,s,u;return Object(mn.__generator)(this,(function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,r)];case 1:return o=c.sent(),s=(a=this.sha256).bind,[4,n];case 2:return(i=new(s.apply(a,[void 0,c.sent()]))).update(o),u=Co,[4,i.digest()];case 3:return[2,u.apply(void 0,[c.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,n,r){return function(e,t,n,r,o){return Object(mn.__awaiter)(void 0,void 0,void 0,(function(){var i,a,s,u,c,f,l,d,h;return Object(mn.__generator)(this,(function(p){switch(p.label){case 0:return[4,qo(e,t.secretAccessKey,t.accessKeyId)];case 1:if(i=p.sent(),(a=n+":"+r+":"+o+":"+Co(i)+":"+t.sessionToken)in Uo)return[2,Uo[a]];for(Fo.push(a);Fo.length>50;)delete Uo[Fo.shift()];s="AWS4"+t.secretAccessKey,p.label=2;case 2:p.trys.push([2,7,8,9]),u=Object(mn.__values)([n,r,o,"aws4_request"]),c=u.next(),p.label=3;case 3:return c.done?[3,6]:(f=c.value,[4,qo(e,s,f)]);case 4:s=p.sent(),p.label=5;case 5:return c=u.next(),[3,3];case 6:return[3,9];case 7:return l=p.sent(),d={error:l},[3,9];case 8:try{c&&!c.done&&(h=u.return)&&h.call(u)}finally{if(d)throw d.error}return[7];case 9:return[2,Uo[a]=s]}}))}))}(this.sha256,e,n,t,r||this.service)},e}(),Xo=function(e){var t=Zo(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.substr(0,8)}},Qo=function(e){return Object.keys(e).sort().join(";")},ei=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},ti=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function ni(e){var t,n=this,r=ri(e.credentials||e.credentialDefaultProvider(e)),o=e.signingEscapePath,i=void 0===o||o,a=e.systemClockOffset,s=void 0===a?e.systemClockOffset||0:a,u=e.sha256;return t=e.signer?ri(e.signer):function(){return ri(e.region)().then((function(t){return Object(mn.__awaiter)(n,void 0,void 0,(function(){return Object(mn.__generator)(this,(function(n){switch(n.label){case 0:return[4,e.regionInfoProvider(t)];case 1:return[2,[n.sent()||{},t]]}}))}))})).then((function(t){var n=Object(mn.__read)(t,2),o=n[0],a=n[1],s=o.signingRegion,c=o.signingService;return e.signingRegion=e.signingRegion||s||a,e.signingName=e.signingName||c||e.serviceId,new Jo({credentials:r,region:e.signingRegion,service:e.signingName,sha256:u,uriEscapePath:i})}))},Object(mn.__assign)(Object(mn.__assign)({},e),{systemClockOffset:s,signingEscapePath:i,credentials:r,signer:t})}function ri(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}var oi=function(e){return new Date(Date.now()+e)};function ii(e){return function(t,n){return function(r){return Object(mn.__awaiter)(this,void 0,void 0,(function(){var o,i,a,s,u,c,f,l,d;return Object(mn.__generator)(this,(function(h){switch(h.label){case 0:return yn.isInstance(r.request)?"function"!=typeof e.signer?[3,2]:[4,e.signer()]:[2,t(r)];case 1:return i=h.sent(),[3,3];case 2:i=e.signer,h.label=3;case 3:return o=i,s=t,u=[Object(mn.__assign)({},r)],d={},[4,o.sign(r.request,{signingDate:new Date(Date.now()+e.systemClockOffset),signingRegion:n.signing_region,signingService:n.signing_service})];case 4:return[4,s.apply(void 0,[mn.__assign.apply(void 0,u.concat([(d.request=h.sent(),d)]))])];case 5:return a=h.sent(),c=a.response.headers,(f=c&&(c.date||c.Date))&&(l=Date.parse(f),p=l,g=e.systemClockOffset,Math.abs(oi(g).getTime()-p)>=3e5&&(e.systemClockOffset=l-Date.now())),[2,a]}var p,g}))}))}}}var ai={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0};function si(e){return Object(mn.__assign)(Object(mn.__assign)({},e),{customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent})}var ui,ci=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,fi=function(e){var t=Object(mn.__read)(e,2),n=t[0],r=t[1],o=n.indexOf("/"),i=n.substring(0,o),a=n.substring(o+1);return"api"===i&&(a=a.toLowerCase()),[i,a,r].filter((function(e){return e&&e.length>0})).map((function(e){return null==e?void 0:e.replace(ci,"_")})).join("/")},li={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},di=function(e){return{applyToStack:function(t){var n;t.add((n=e,function(e,t){return function(r){return Object(mn.__awaiter)(void 0,void 0,void 0,(function(){var o,i,a,s,u,c,f,l;return Object(mn.__generator)(this,(function(d){switch(d.label){case 0:return o=r.request,yn.isInstance(o)?(i=o.headers,a=(null===(f=null==t?void 0:t.userAgent)||void 0===f?void 0:f.map(fi))||[],[4,n.defaultUserAgentProvider()]):[2,e(r)];case 1:return s=d.sent().map(fi),u=(null===(l=null==n?void 0:n.customUserAgent)||void 0===l?void 0:l.map(fi))||[],i["x-amz-user-agent"]=Object(mn.__spread)(s,a,u).join(" "),c=Object(mn.__spread)(s.filter((function(e){return e.startsWith("aws-sdk-")})),u).join(" "),"browser"!==n.runtime&&c&&(i["user-agent"]=i["user-agent"]?i["user-agent"]+" "+c:c),[2,e(Object(mn.__assign)(Object(mn.__assign)({},r),{request:o}))]}}))}))}}),li)}}},hi=function(e){function t(t){var n,r=this,o=ge(ge({},po),t),i=yo(o),a=ni(go(i)),s=si(Qr(a));return(r=e.call(this,s)||this).config=s,r.middlewareStack.use((n=r.config,{applyToStack:function(e){e.addRelativeTo(ii(n),ai)}})),r.middlewareStack.use(Gr(r.config)),r.middlewareStack.use(_o(r.config)),r.middlewareStack.use(Eo(r.config)),r.middlewareStack.use(Ao(r.config)),r.middlewareStack.use(di(r.config)),r}return pe(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(vr),pi={},gi=function(){function e(){}return e.setItem=function(e,t){return pi[e]=t,pi[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call(pi,e)?pi[e]:void 0},e.removeItem=function(e){return delete pi[e]},e.clear=function(){return pi={}},e}(),vi=function(){function e(){try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.amplify.test-ls",1),this.storageWindow.removeItem("aws.amplify.test-ls")}catch(e){this.storageWindow=gi}}return e.prototype.getStorage=function(){return this.storageWindow},e}(),mi=(ui=function(e,t){return(ui=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}ui(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),yi=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},bi=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},wi=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},_i=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(wi(arguments[t]));return e},Si=new g("Util"),Ei=function(e){function t(t){var n=e.call(this,t)||this;return n.nonRetryable=!0,n}return mi(t,e),t}(Error);function xi(e,t,n,r){return void 0===r&&(r=1),yi(this,void 0,void 0,(function(){var o,i;return bi(this,(function(a){switch(a.label){case 0:if("function"!=typeof e)throw Error("functionToRetry must be a function");Si.debug(e.name+" attempt #"+r+" with this vars: "+JSON.stringify(t)),a.label=1;case 1:return a.trys.push([1,3,,8]),[4,e.apply(void 0,_i(t))];case 2:return[2,a.sent()];case 3:if(o=a.sent(),Si.debug("error on "+e.name,o),(s=o)&&s.nonRetryable)throw Si.debug(e.name+" non retryable error",o),o;return i=n(r,t,o),Si.debug(e.name+" retrying in "+i+" ms"),!1===i?[3,6]:[4,new Promise((function(e){return setTimeout(e,i)}))];case 4:return a.sent(),[4,xi(e,t,n,r+1)];case 5:return[2,a.sent()];case 6:throw o;case 7:return[3,8];case 8:return[2]}var s}))}))}function Ai(e){void 0===e&&(e=3e5);return function(t){var n=100*Math.pow(2,t)+100*Math.random();return!(n>e)&&n}}var Oi=function(e,t,n){return void 0===n&&(n=3e5),xi(e,t,Ai(n))},ki=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Li=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Ii=new g("CognitoCredentials"),Ci=new Promise((function(e,t){return Object(U.b)().isBrowser?(window.gapi&&window.gapi.auth2?window.gapi.auth2:null)?(Ii.debug("google api already loaded"),e()):void setTimeout((function(){return e()}),2e3):(Ii.debug("not in the browser, directly resolved"),e())})),Pi=function(){function e(){this.initialized=!1,this.refreshGoogleToken=this.refreshGoogleToken.bind(this),this._refreshGoogleTokenImpl=this._refreshGoogleTokenImpl.bind(this)}return e.prototype.refreshGoogleToken=function(){return ki(this,void 0,void 0,(function(){return Li(this,(function(e){switch(e.label){case 0:return this.initialized?[3,2]:(Ii.debug("need to wait for the Google SDK loaded"),[4,Ci]);case 1:e.sent(),this.initialized=!0,Ii.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshGoogleTokenImpl()]}}))}))},e.prototype._refreshGoogleTokenImpl=function(){var e=null;return Object(U.b)().isBrowser&&(e=window.gapi&&window.gapi.auth2?window.gapi.auth2:null),e?new Promise((function(t,n){e.getAuthInstance().then((function(e){e||(Ii.debug("google Auth undefined"),n(new Ei("google Auth undefined")));var r=e.currentUser.get();r.isSignedIn()?(Ii.debug("refreshing the google access token"),r.reloadAuthResponse().then((function(e){var n=e.id_token,r=e.expires_at;t({token:n,expires_at:r})})).catch((function(e){e&&"network_error"===e.error?n("Network error reloading google auth response"):n(new Ei("Failed to reload google auth response"))}))):n(new Ei("User is not signed in with Google"))})).catch((function(e){Ii.debug("Failed to refresh google token",e),n(new Ei("Failed to refresh google token"))}))})):(Ii.debug("no gapi auth2 available"),Promise.reject("no gapi auth2 available"))},e}(),Ti=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},ji=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Ri=new g("CognitoCredentials"),Mi=new Promise((function(e,t){return Object(U.b)().isBrowser?window.FB?(Ri.debug("FB SDK already loaded"),e()):void setTimeout((function(){return e()}),2e3):(Ri.debug("not in the browser, directly resolved"),e())})),Ni=function(){function e(){this.initialized=!1,this.refreshFacebookToken=this.refreshFacebookToken.bind(this),this._refreshFacebookTokenImpl=this._refreshFacebookTokenImpl.bind(this)}return e.prototype.refreshFacebookToken=function(){return Ti(this,void 0,void 0,(function(){return ji(this,(function(e){switch(e.label){case 0:return this.initialized?[3,2]:(Ri.debug("need to wait for the Facebook SDK loaded"),[4,Mi]);case 1:e.sent(),this.initialized=!0,Ri.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshFacebookTokenImpl()]}}))}))},e.prototype._refreshFacebookTokenImpl=function(){var e=null;if(Object(U.b)().isBrowser&&(e=window.FB),!e){return Ri.debug("no fb sdk available"),Promise.reject(new Ei("no fb sdk available"))}return new Promise((function(t,n){e.getLoginStatus((function(e){if(e&&e.authResponse){var r=e.authResponse,o=r.accessToken,i=1e3*r.expiresIn+(new Date).getTime();if(!o){a="the jwtToken is undefined";Ri.debug(a),n(new Ei(a))}t({token:o,expires_at:i})}else{var a="no response from facebook when refreshing the jwt token";Ri.debug(a),n(new Ei(a))}}),{scope:"public_profile,email"})}))},e}(),zi=new Pi,Bi=new Ni,Ui=function(e,t){return(Ui=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function Fi(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Ui(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Di=function(){return(Di=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function qi(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function Gi(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;function Hi(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var Wi,$i,Ki,Vi,Yi,Zi,Ji,Xi,Qi,ea,ta,na,ra,oa,ia,aa,sa,ua,ca,fa,la,da,ha,pa,ga,va,ma,ya,ba,wa,_a,Sa,Ea,xa,Aa,Oa,ka,La,Ia,Ca,Pa,Ta,ja,Ra,Ma,Na,za,Ba,Ua,Fa,Da,qa,Ga,Ha,Wa,$a,Ka;Object.create;!function(e){e.AUTHENTICATED_ROLE="AuthenticatedRole",e.DENY="Deny"}(Wi||(Wi={})),($i||($i={})).filterSensitiveLog=function(e){return Di({},e)},(Ki||(Ki={})).filterSensitiveLog=function(e){return Di({},e)},(Vi||(Vi={})).filterSensitiveLog=function(e){return Di({},e)},(Yi||(Yi={})).filterSensitiveLog=function(e){return Di({},e)},function(e){e.filterSensitiveLog=function(e){return Di({},e)}}(Zi||(Zi={})),function(e){e.filterSensitiveLog=function(e){return Di({},e)}}(Ji||(Ji={})),(Xi||(Xi={})).filterSensitiveLog=function(e){return Di({},e)},(Qi||(Qi={})).filterSensitiveLog=function(e){return Di({},e)},(ea||(ea={})).filterSensitiveLog=function(e){return Di({},e)},(ta||(ta={})).filterSensitiveLog=function(e){return Di({},e)},function(e){e.ACCESS_DENIED="AccessDenied",e.INTERNAL_SERVER_ERROR="InternalServerError"}(na||(na={})),(ra||(ra={})).filterSensitiveLog=function(e){return Di({},e)},(oa||(oa={})).filterSensitiveLog=function(e){return Di({},e)},(ia||(ia={})).filterSensitiveLog=function(e){return Di({},e)},function(e){e.filterSensitiveLog=function(e){return Di({},e)}}(aa||(aa={})),(sa||(sa={})).filterSensitiveLog=function(e){return Di({},e)},(ua||(ua={})).filterSensitiveLog=function(e){return Di({},e)},(ca||(ca={})).filterSensitiveLog=function(e){return Di({},e)},(fa||(fa={})).filterSensitiveLog=function(e){return Di({},e)},(la||(la={})).filterSensitiveLog=function(e){return Di({},e)},(da||(da={})).filterSensitiveLog=function(e){return Di({},e)},(ha||(ha={})).filterSensitiveLog=function(e){return Di({},e)},(pa||(pa={})).filterSensitiveLog=function(e){return Di({},e)},(ga||(ga={})).filterSensitiveLog=function(e){return Di({},e)},(va||(va={})).filterSensitiveLog=function(e){return Di({},e)},(ma||(ma={})).filterSensitiveLog=function(e){return Di({},e)},function(e){e.CONTAINS="Contains",e.EQUALS="Equals",e.NOT_EQUAL="NotEqual",e.STARTS_WITH="StartsWith"}(ya||(ya={})),(ba||(ba={})).filterSensitiveLog=function(e){return Di({},e)},(wa||(wa={})).filterSensitiveLog=function(e){return Di({},e)},function(e){e.RULES="Rules",e.TOKEN="Token"}(_a||(_a={})),(Sa||(Sa={})).filterSensitiveLog=function(e){return Di({},e)},(Ea||(Ea={})).filterSensitiveLog=function(e){return Di({},e)},(xa||(xa={})).filterSensitiveLog=function(e){return Di({},e)},(Aa||(Aa={})).filterSensitiveLog=function(e){return Di({},e)},(Oa||(Oa={})).filterSensitiveLog=function(e){return Di({},e)},(ka||(ka={})).filterSensitiveLog=function(e){return Di({},e)},(La||(La={})).filterSensitiveLog=function(e){return Di({},e)},(Ia||(Ia={})).filterSensitiveLog=function(e){return Di({},e)},(Ca||(Ca={})).filterSensitiveLog=function(e){return Di({},e)},(Pa||(Pa={})).filterSensitiveLog=function(e){return Di({},e)},(Ta||(Ta={})).filterSensitiveLog=function(e){return Di({},e)},(ja||(ja={})).filterSensitiveLog=function(e){return Di({},e)},(Ra||(Ra={})).filterSensitiveLog=function(e){return Di({},e)},(Ma||(Ma={})).filterSensitiveLog=function(e){return Di({},e)},(Na||(Na={})).filterSensitiveLog=function(e){return Di({},e)},(za||(za={})).filterSensitiveLog=function(e){return Di({},e)},(Ba||(Ba={})).filterSensitiveLog=function(e){return Di({},e)},(Ua||(Ua={})).filterSensitiveLog=function(e){return Di({},e)},(Fa||(Fa={})).filterSensitiveLog=function(e){return Di({},e)},(Da||(Da={})).filterSensitiveLog=function(e){return Di({},e)},(qa||(qa={})).filterSensitiveLog=function(e){return Di({},e)},(Ga||(Ga={})).filterSensitiveLog=function(e){return Di({},e)},(Ha||(Ha={})).filterSensitiveLog=function(e){return Di({},e)},(Wa||(Wa={})).filterSensitiveLog=function(e){return Di({},e)},($a||($a={})).filterSensitiveLog=function(e){return Di({},e)},(Ka||(Ka={})).filterSensitiveLog=function(e){return Di({},e)};var Va=function(e,t){return qi(void 0,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,f,l,d,h,p,g,v;return Gi(this,(function(m){switch(m.label){case 0:return r=[Di({},e)],v={},[4,Es(e.body,t)];case 1:switch(n=Di.apply(void 0,r.concat([(v.body=m.sent(),v)])),i="UnknownError",i=xs(e,n.body),i){case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":return[3,2];case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":return[3,4];case"InvalidIdentityPoolConfigurationException":case"com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException":return[3,6];case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":return[3,8];case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":return[3,10];case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":return[3,12];case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":return[3,14];case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":return[3,16]}return[3,18];case 2:return a=[{}],[4,Za(n,t)];case 3:return o=Di.apply(void 0,[Di.apply(void 0,a.concat([m.sent()])),{name:i,$metadata:ws(e)}]),[3,19];case 4:return s=[{}],[4,Ja(n,t)];case 5:return o=Di.apply(void 0,[Di.apply(void 0,s.concat([m.sent()])),{name:i,$metadata:ws(e)}]),[3,19];case 6:return u=[{}],[4,Xa(n,t)];case 7:return o=Di.apply(void 0,[Di.apply(void 0,u.concat([m.sent()])),{name:i,$metadata:ws(e)}]),[3,19];case 8:return c=[{}],[4,Qa(n,t)];case 9:return o=Di.apply(void 0,[Di.apply(void 0,c.concat([m.sent()])),{name:i,$metadata:ws(e)}]),[3,19];case 10:return f=[{}],[4,ts(n,t)];case 11:return o=Di.apply(void 0,[Di.apply(void 0,f.concat([m.sent()])),{name:i,$metadata:ws(e)}]),[3,19];case 12:return l=[{}],[4,ns(n,t)];case 13:return o=Di.apply(void 0,[Di.apply(void 0,l.concat([m.sent()])),{name:i,$metadata:ws(e)}]),[3,19];case 14:return d=[{}],[4,rs(n,t)];case 15:return o=Di.apply(void 0,[Di.apply(void 0,d.concat([m.sent()])),{name:i,$metadata:ws(e)}]),[3,19];case 16:return h=[{}],[4,os(n,t)];case 17:return o=Di.apply(void 0,[Di.apply(void 0,h.concat([m.sent()])),{name:i,$metadata:ws(e)}]),[3,19];case 18:p=n.body,i=p.code||p.Code||i,o=Di(Di({},p),{name:""+i,message:p.message||p.Message||i,$fault:"client",$metadata:ws(e)}),m.label=19;case 19:return g=o.message||o.Message||i,o.message=g,delete o.Message,[2,Promise.reject(Object.assign(new Error(g),o))]}}))}))},Ya=function(e,t){return qi(void 0,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,f,l,d,h,p,g,v;return Gi(this,(function(m){switch(m.label){case 0:return r=[Di({},e)],v={},[4,Es(e.body,t)];case 1:switch(n=Di.apply(void 0,r.concat([(v.body=m.sent(),v)])),i="UnknownError",i=xs(e,n.body),i){case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":return[3,2];case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":return[3,4];case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":return[3,6];case"LimitExceededException":case"com.amazonaws.cognitoidentity#LimitExceededException":return[3,8];case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":return[3,10];case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":return[3,12];case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":return[3,14];case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":return[3,16]}return[3,18];case 2:return a=[{}],[4,Za(n,t)];case 3:return o=Di.apply(void 0,[Di.apply(void 0,a.concat([m.sent()])),{name:i,$metadata:ws(e)}]),[3,19];case 4:return s=[{}],[4,Ja(n,t)];case 5:return o=Di.apply(void 0,[Di.apply(void 0,s.concat([m.sent()])),{name:i,$metadata:ws(e)}]),[3,19];case 6:return u=[{}],[4,Qa(n,t)];case 7:return o=Di.apply(void 0,[Di.apply(void 0,u.concat([m.sent()])),{name:i,$metadata:ws(e)}]),[3,19];case 8:return c=[{}],[4,es(n,t)];case 9:return o=Di.apply(void 0,[Di.apply(void 0,c.concat([m.sent()])),{name:i,$metadata:ws(e)}]),[3,19];case 10:return f=[{}],[4,ts(n,t)];case 11:return o=Di.apply(void 0,[Di.apply(void 0,f.concat([m.sent()])),{name:i,$metadata:ws(e)}]),[3,19];case 12:return l=[{}],[4,ns(n,t)];case 13:return o=Di.apply(void 0,[Di.apply(void 0,l.concat([m.sent()])),{name:i,$metadata:ws(e)}]),[3,19];case 14:return d=[{}],[4,rs(n,t)];case 15:return o=Di.apply(void 0,[Di.apply(void 0,d.concat([m.sent()])),{name:i,$metadata:ws(e)}]),[3,19];case 16:return h=[{}],[4,os(n,t)];case 17:return o=Di.apply(void 0,[Di.apply(void 0,h.concat([m.sent()])),{name:i,$metadata:ws(e)}]),[3,19];case 18:p=n.body,i=p.code||p.Code||i,o=Di(Di({},p),{name:""+i,message:p.message||p.Message||i,$fault:"client",$metadata:ws(e)}),m.label=19;case 19:return g=o.message||o.Message||i,o.message=g,delete o.Message,[2,Promise.reject(Object.assign(new Error(g),o))]}}))}))},Za=function(e,t){return qi(void 0,void 0,void 0,(function(){var n,r;return Gi(this,(function(o){return n=e.body,r=cs(n,t),[2,Di({name:"ExternalServiceException",$fault:"client",$metadata:ws(e)},r)]}))}))},Ja=function(e,t){return qi(void 0,void 0,void 0,(function(){var n,r;return Gi(this,(function(o){return n=e.body,r=ds(n,t),[2,Di({name:"InternalErrorException",$fault:"server",$metadata:ws(e)},r)]}))}))},Xa=function(e,t){return qi(void 0,void 0,void 0,(function(){var n,r;return Gi(this,(function(o){return n=e.body,r=hs(n,t),[2,Di({name:"InvalidIdentityPoolConfigurationException",$fault:"client",$metadata:ws(e)},r)]}))}))},Qa=function(e,t){return qi(void 0,void 0,void 0,(function(){var n,r;return Gi(this,(function(o){return n=e.body,r=ps(n,t),[2,Di({name:"InvalidParameterException",$fault:"client",$metadata:ws(e)},r)]}))}))},es=function(e,t){return qi(void 0,void 0,void 0,(function(){var n,r;return Gi(this,(function(o){return n=e.body,r=gs(n,t),[2,Di({name:"LimitExceededException",$fault:"client",$metadata:ws(e)},r)]}))}))},ts=function(e,t){return qi(void 0,void 0,void 0,(function(){var n,r;return Gi(this,(function(o){return n=e.body,r=vs(n,t),[2,Di({name:"NotAuthorizedException",$fault:"client",$metadata:ws(e)},r)]}))}))},ns=function(e,t){return qi(void 0,void 0,void 0,(function(){var n,r;return Gi(this,(function(o){return n=e.body,r=ms(n,t),[2,Di({name:"ResourceConflictException",$fault:"client",$metadata:ws(e)},r)]}))}))},rs=function(e,t){return qi(void 0,void 0,void 0,(function(){var n,r;return Gi(this,(function(o){return n=e.body,r=ys(n,t),[2,Di({name:"ResourceNotFoundException",$fault:"client",$metadata:ws(e)},r)]}))}))},os=function(e,t){return qi(void 0,void 0,void 0,(function(){var n,r;return Gi(this,(function(o){return n=e.body,r=bs(n,t),[2,Di({name:"TooManyRequestsException",$fault:"client",$metadata:ws(e)},r)]}))}))},is=function(e,t){return Di(Di(Di({},void 0!==e.CustomRoleArn&&null!==e.CustomRoleArn&&{CustomRoleArn:e.CustomRoleArn}),void 0!==e.IdentityId&&null!==e.IdentityId&&{IdentityId:e.IdentityId}),void 0!==e.Logins&&null!==e.Logins&&{Logins:ss(e.Logins,t)})},as=function(e,t){return Di(Di(Di({},void 0!==e.AccountId&&null!==e.AccountId&&{AccountId:e.AccountId}),void 0!==e.IdentityPoolId&&null!==e.IdentityPoolId&&{IdentityPoolId:e.IdentityPoolId}),void 0!==e.Logins&&null!==e.Logins&&{Logins:ss(e.Logins,t)})},ss=function(e,t){return Object.entries(e).reduce((function(e,t){var n,r=Hi(t,2),o=r[0],i=r[1];return null===i?e:Di(Di({},e),((n={})[o]=i,n))}),{})},us=function(e,t){return{AccessKeyId:void 0!==e.AccessKeyId&&null!==e.AccessKeyId?e.AccessKeyId:void 0,Expiration:void 0!==e.Expiration&&null!==e.Expiration?new Date(Math.round(1e3*e.Expiration)):void 0,SecretKey:void 0!==e.SecretKey&&null!==e.SecretKey?e.SecretKey:void 0,SessionToken:void 0!==e.SessionToken&&null!==e.SessionToken?e.SessionToken:void 0}},cs=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},fs=function(e,t){return{Credentials:void 0!==e.Credentials&&null!==e.Credentials?us(e.Credentials):void 0,IdentityId:void 0!==e.IdentityId&&null!==e.IdentityId?e.IdentityId:void 0}},ls=function(e,t){return{IdentityId:void 0!==e.IdentityId&&null!==e.IdentityId?e.IdentityId:void 0}},ds=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},hs=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},ps=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},gs=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},vs=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},ms=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},ys=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},bs=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},ws=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},_s=function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)},Ss=function(e,t,n,r,o){return qi(void 0,void 0,void 0,(function(){var i,a,s,u,c,f;return Gi(this,(function(l){switch(l.label){case 0:return[4,e.endpoint()];case 1:return i=l.sent(),a=i.hostname,s=i.protocol,u=void 0===s?"https":s,c=i.port,f={protocol:u,hostname:a,port:c,method:"POST",path:n,headers:t},void 0!==r&&(f.hostname=r),void 0!==o&&(f.body=o),[2,new yn(f)]}}))}))},Es=function(e,t){return function(e,t){return _s(e,t).then((function(e){return t.utf8Encoder(e)}))}(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},xs=function(e,t){var n,r,o=function(e){var t=e;return t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=(n=e.headers,r="x-amzn-errortype",Object.keys(n).find((function(e){return e.toLowerCase()===r.toLowerCase()})));return void 0!==i?o(e.headers[i]):void 0!==t.code?o(t.code):void 0!==t.__type?o(t.__type):""},As=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return Fi(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(dr(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"CognitoIdentityClient",commandName:"GetCredentialsForIdentityCommand",inputFilterSensitiveLog:la.filterSensitiveLog,outputFilterSensitiveLog:ha.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return qi(void 0,void 0,void 0,(function(){var n,r;return Gi(this,(function(o){return n={"content-type":"application/x-amz-json-1.1","x-amz-target":"AWSCognitoIdentityService.GetCredentialsForIdentity"},r=JSON.stringify(is(e,t)),[2,Ss(t,n,"/",void 0,r)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return qi(void 0,void 0,void 0,(function(){var n,r,o;return Gi(this,(function(i){switch(i.label){case 0:return e.statusCode>=300?[2,Va(e,t)]:[4,Es(e.body,t)];case 1:return n=i.sent(),{},r=fs(n,t),o=Di({$metadata:ws(e)},r),[2,Promise.resolve(o)]}}))}))}(e,t)},t}(mr),Os=function(e){function t(t,n){void 0===n&&(n=!0);var r=e.call(this,t)||this;return r.tryNextLink=n,r}return Object(mn.__extends)(t,e),t}(Error);function ks(e){return Promise.all(Object.keys(e).reduce((function(t,n){var r=e[n];return"string"==typeof r?t.push([n,r]):t.push(r().then((function(e){return[n,e]}))),t}),[])).then((function(e){return e.reduce((function(e,t){var n=Object(mn.__read)(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})}))}function Ls(e){var t=this;return function(){return Object(mn.__awaiter)(t,void 0,void 0,(function(){var t,n,r,o,i,a,s,u,c,f,l,d,h;return Object(mn.__generator)(this,(function(p){switch(p.label){case 0:return f=(c=e.client).send,l=As.bind,h={CustomRoleArn:e.customRoleArn,IdentityId:e.identityId},e.logins?[4,ks(e.logins)]:[3,2];case 1:return d=p.sent(),[3,3];case 2:d=void 0,p.label=3;case 3:return[4,f.apply(c,[new(l.apply(As,[void 0,(h.Logins=d,h)]))])];case 4:return t=p.sent().Credentials,n=void 0===t?function(){throw new Os("Response from Amazon Cognito contained no credentials")}():t,r=n.AccessKeyId,o=void 0===r?function(){throw new Os("Response from Amazon Cognito contained no access key ID")}():r,i=n.Expiration,a=n.SecretKey,s=void 0===a?function(){throw new Os("Response from Amazon Cognito contained no secret key")}():a,u=n.SessionToken,[2,{identityId:e.identityId,accessKeyId:o,secretAccessKey:s,sessionToken:u,expiration:i}]}}))}))}}var Is=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return Fi(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(dr(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"CognitoIdentityClient",commandName:"GetIdCommand",inputFilterSensitiveLog:ga.filterSensitiveLog,outputFilterSensitiveLog:va.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return qi(void 0,void 0,void 0,(function(){var n,r;return Gi(this,(function(o){return n={"content-type":"application/x-amz-json-1.1","x-amz-target":"AWSCognitoIdentityService.GetId"},r=JSON.stringify(as(e,t)),[2,Ss(t,n,"/",void 0,r)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return qi(void 0,void 0,void 0,(function(){var n,r,o;return Gi(this,(function(i){switch(i.label){case 0:return e.statusCode>=300?[2,Ya(e,t)]:[4,Es(e.body,t)];case 1:return n=i.sent(),{},r=ls(n,t),o=Di({$metadata:ws(e)},r),[2,Promise.resolve(o)]}}))}))}(e,t)},t}(mr),Cs=function(){function e(e){void 0===e&&(e="aws:cognito-identity-ids"),this.dbName=e}return e.prototype.getItem=function(e){return this.withObjectStore("readonly",(function(t){var n=t.get(e);return new Promise((function(e){n.onerror=function(){return e(null)},n.onsuccess=function(){return e(n.result?n.result.value:null)}}))})).catch((function(){return null}))},e.prototype.removeItem=function(e){return this.withObjectStore("readwrite",(function(t){var n=t.delete(e);return new Promise((function(e,t){n.onerror=function(){return t(n.error)},n.onsuccess=function(){return e()}}))}))},e.prototype.setItem=function(e,t){return this.withObjectStore("readwrite",(function(n){var r=n.put({id:e,value:t});return new Promise((function(e,t){r.onerror=function(){return t(r.error)},r.onsuccess=function(){return e()}}))}))},e.prototype.getDb=function(){var e=self.indexedDB.open(this.dbName,1);return new Promise((function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)},e.onblocked=function(){n(new Error("Unable to access DB"))},e.onupgradeneeded=function(){var t=e.result;t.onerror=function(){n(new Error("Failed to create object store"))},t.createObjectStore("IdentityIds",{keyPath:"id"})}}))},e.prototype.withObjectStore=function(e,t){return this.getDb().then((function(n){var r=n.transaction("IdentityIds",e);return r.oncomplete=function(){return n.close()},new Promise((function(e,n){r.onerror=function(){return n(r.error)},e(t(r.objectStore("IdentityIds")))})).catch((function(e){throw n.close(),e}))}))},e}(),Ps=new(function(){function e(e){void 0===e&&(e={}),this.store=e}return e.prototype.getItem=function(e){return e in this.store?this.store[e]:null},e.prototype.removeItem=function(e){delete this.store[e]},e.prototype.setItem=function(e,t){this.store[e]=t},e}());function Ts(e){var t=this,n=e.accountId,r=e.cache,o=void 0===r?"object"==typeof self&&self.indexedDB?new Cs:"object"==typeof window&&window.localStorage?window.localStorage:Ps:r,i=e.client,a=e.customRoleArn,s=e.identityPoolId,u=e.logins,c=e.userIdentifier,f=void 0===c?u&&0!==Object.keys(u).length?void 0:"ANONYMOUS":c,l=f?"aws:cognito-identity-credentials:"+s+":"+f:void 0,d=function(){return Object(mn.__awaiter)(t,void 0,void 0,(function(){var e,t,r,c,f,h,p,g,v;return Object(mn.__generator)(this,(function(m){switch(m.label){case 0:return(t=l)?[4,o.getItem(l)]:[3,2];case 1:t=m.sent(),m.label=2;case 2:return(e=t)?[3,7]:(h=(f=i).send,p=Is.bind,v={AccountId:n,IdentityPoolId:s},u?[4,ks(u)]:[3,4]);case 3:return g=m.sent(),[3,5];case 4:g=void 0,m.label=5;case 5:return[4,h.apply(f,[new(p.apply(Is,[void 0,(v.Logins=g,v)]))])];case 6:r=m.sent().IdentityId,c=void 0===r?function(){throw new Os("Response from Amazon Cognito contained no identity ID")}():r,e=c,l&&Promise.resolve(o.setItem(l,e)).catch((function(){})),m.label=7;case 7:return[2,(d=Ls({client:i,customRoleArn:a,logins:u,identityId:e}))()]}}))}))};return function(){return d().catch((function(e){return Object(mn.__awaiter)(t,void 0,void 0,(function(){return Object(mn.__generator)(this,(function(t){throw l&&Promise.resolve(o.removeItem(l)).catch((function(){})),e}))}))}))}}var js=function(e,t){return(js=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function Rs(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}js(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ms=function(){return(Ms=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function Ns(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function zs(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;function Bs(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}Object.create;var Us,Fs,Ds,qs,Gs,Hs,Ws,$s,Ks,Vs,Ys,Zs,Js,Xs,Qs,eu,tu,nu,ru,ou,iu,au,su,uu,cu,fu,lu,du,hu,pu,gu,vu,mu,yu,bu,wu,_u,Su,Eu,xu,Au,Ou,ku,Lu,Iu,Cu,Pu,Tu,ju,Ru,Mu,Nu,zu,Bu,Uu,Fu,Du,qu=n(21),Gu=new Set(["af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-south-1","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-north-1","eu-south-1","eu-west-1","eu-west-2","eu-west-3","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"]),Hu=new Set(["cn-north-1","cn-northwest-1"]),Wu=new Set(["us-iso-east-1"]),$u=new Set(["us-isob-east-1"]),Ku=new Set(["us-gov-east-1","us-gov-west-1"]),Vu={apiVersion:"2014-06-30",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var n=void 0;switch(e){case"ap-northeast-1":n={hostname:"cognito-identity.ap-northeast-1.amazonaws.com",partition:"aws"};break;case"ap-northeast-2":n={hostname:"cognito-identity.ap-northeast-2.amazonaws.com",partition:"aws"};break;case"ap-south-1":n={hostname:"cognito-identity.ap-south-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-1":n={hostname:"cognito-identity.ap-southeast-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-2":n={hostname:"cognito-identity.ap-southeast-2.amazonaws.com",partition:"aws"};break;case"ca-central-1":n={hostname:"cognito-identity.ca-central-1.amazonaws.com",partition:"aws"};break;case"cn-north-1":n={hostname:"cognito-identity.cn-north-1.amazonaws.com.cn",partition:"aws-cn"};break;case"eu-central-1":n={hostname:"cognito-identity.eu-central-1.amazonaws.com",partition:"aws"};break;case"eu-north-1":n={hostname:"cognito-identity.eu-north-1.amazonaws.com",partition:"aws"};break;case"eu-west-1":n={hostname:"cognito-identity.eu-west-1.amazonaws.com",partition:"aws"};break;case"eu-west-2":n={hostname:"cognito-identity.eu-west-2.amazonaws.com",partition:"aws"};break;case"eu-west-3":n={hostname:"cognito-identity.eu-west-3.amazonaws.com",partition:"aws"};break;case"fips-us-east-1":n={hostname:"cognito-identity-fips.us-east-1.amazonaws.com",partition:"aws",signingRegion:"us-east-1"};break;case"fips-us-east-2":n={hostname:"cognito-identity-fips.us-east-2.amazonaws.com",partition:"aws",signingRegion:"us-east-2"};break;case"fips-us-gov-west-1":n={hostname:"cognito-identity-fips.us-gov-west-1.amazonaws.com",partition:"aws-us-gov",signingRegion:"us-gov-west-1"};break;case"fips-us-west-2":n={hostname:"cognito-identity-fips.us-west-2.amazonaws.com",partition:"aws",signingRegion:"us-west-2"};break;case"sa-east-1":n={hostname:"cognito-identity.sa-east-1.amazonaws.com",partition:"aws"};break;case"us-east-1":n={hostname:"cognito-identity.us-east-1.amazonaws.com",partition:"aws"};break;case"us-east-2":n={hostname:"cognito-identity.us-east-2.amazonaws.com",partition:"aws"};break;case"us-gov-west-1":n={hostname:"cognito-identity.us-gov-west-1.amazonaws.com",partition:"aws-us-gov"};break;case"us-west-1":n={hostname:"cognito-identity.us-west-1.amazonaws.com",partition:"aws"};break;case"us-west-2":n={hostname:"cognito-identity.us-west-2.amazonaws.com",partition:"aws"};break;default:Gu.has(e)&&(n={hostname:"cognito-identity.{region}.amazonaws.com".replace("{region}",e),partition:"aws"}),Hu.has(e)&&(n={hostname:"cognito-identity.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),Wu.has(e)&&(n={hostname:"cognito-identity.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),$u.has(e)&&(n={hostname:"cognito-identity.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),Ku.has(e)&&(n={hostname:"cognito-identity.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov"}),void 0===n&&(n={hostname:"cognito-identity.{region}.amazonaws.com".replace("{region}",e),partition:"aws"})}return Promise.resolve(Ms({signingService:"cognito-identity"},n))},serviceId:"Cognito Identity",urlParser:lo},Yu=Ms(Ms({},Vu),{runtime:"browser",base64Decoder:zr,base64Encoder:Br,bodyLengthChecker:to,credentialDefaultProvider:function(e){return function(){return Promise.reject(new Error("Credential is missing"))}},defaultUserAgentProvider:oo({serviceId:Vu.serviceId,clientVersion:qu.version}),maxAttempts:3,region:Dr("Region is missing"),requestHandler:new Ir,sha256:Or.Sha256,streamCollector:Ur,utf8Decoder:io.fromUtf8,utf8Encoder:io.toUtf8}),Zu=function(e){function t(t){var n=this,r=Ms(Ms({},Yu),t),o=yo(r),i=ni(go(o)),a=si(Qr(i));return(n=e.call(this,a)||this).config=a,n.middlewareStack.use(Gr(n.config)),n.middlewareStack.use(_o(n.config)),n.middlewareStack.use(Eo(n.config)),n.middlewareStack.use(Ao(n.config)),n.middlewareStack.use(di(n.config)),n}return Rs(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(vr);!function(e){e.AUTHENTICATED_ROLE="AuthenticatedRole",e.DENY="Deny"}(Us||(Us={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Fs||(Fs={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Ds||(Ds={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(qs||(qs={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Gs||(Gs={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Hs||(Hs={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Ws||(Ws={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}($s||($s={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Ks||(Ks={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Vs||(Vs={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Ys||(Ys={})),function(e){e.ACCESS_DENIED="AccessDenied",e.INTERNAL_SERVER_ERROR="InternalServerError"}(Zs||(Zs={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Js||(Js={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Xs||(Xs={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Qs||(Qs={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(eu||(eu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(tu||(tu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(nu||(nu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(ru||(ru={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(ou||(ou={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(iu||(iu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(au||(au={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(su||(su={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(uu||(uu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(cu||(cu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(fu||(fu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(lu||(lu={})),function(e){e.CONTAINS="Contains",e.EQUALS="Equals",e.NOT_EQUAL="NotEqual",e.STARTS_WITH="StartsWith"}(du||(du={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(hu||(hu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(pu||(pu={})),function(e){e.RULES="Rules",e.TOKEN="Token"}(gu||(gu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(vu||(vu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(mu||(mu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(yu||(yu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(bu||(bu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(wu||(wu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(_u||(_u={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Su||(Su={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Eu||(Eu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(xu||(xu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Au||(Au={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Ou||(Ou={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(ku||(ku={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Lu||(Lu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Iu||(Iu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Cu||(Cu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Pu||(Pu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Tu||(Tu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(ju||(ju={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Ru||(Ru={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Mu||(Mu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Nu||(Nu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(zu||(zu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Bu||(Bu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Uu||(Uu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Fu||(Fu={})),function(e){e.filterSensitiveLog=function(e){return Ms({},e)}}(Du||(Du={}));var Ju=function(e,t){return Ns(void 0,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,f,l,d,h,p,g,v;return zs(this,(function(m){switch(m.label){case 0:return r=[Ms({},e)],v={},[4,Oc(e.body,t)];case 1:switch(n=Ms.apply(void 0,r.concat([(v.body=m.sent(),v)])),i="UnknownError",i=kc(e,n.body),i){case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":return[3,2];case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":return[3,4];case"InvalidIdentityPoolConfigurationException":case"com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException":return[3,6];case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":return[3,8];case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":return[3,10];case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":return[3,12];case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":return[3,14];case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":return[3,16]}return[3,18];case 2:return a=[{}],[4,Qu(n,t)];case 3:return o=Ms.apply(void 0,[Ms.apply(void 0,a.concat([m.sent()])),{name:i,$metadata:Ec(e)}]),[3,19];case 4:return s=[{}],[4,ec(n,t)];case 5:return o=Ms.apply(void 0,[Ms.apply(void 0,s.concat([m.sent()])),{name:i,$metadata:Ec(e)}]),[3,19];case 6:return u=[{}],[4,tc(n,t)];case 7:return o=Ms.apply(void 0,[Ms.apply(void 0,u.concat([m.sent()])),{name:i,$metadata:Ec(e)}]),[3,19];case 8:return c=[{}],[4,nc(n,t)];case 9:return o=Ms.apply(void 0,[Ms.apply(void 0,c.concat([m.sent()])),{name:i,$metadata:Ec(e)}]),[3,19];case 10:return f=[{}],[4,oc(n,t)];case 11:return o=Ms.apply(void 0,[Ms.apply(void 0,f.concat([m.sent()])),{name:i,$metadata:Ec(e)}]),[3,19];case 12:return l=[{}],[4,ic(n,t)];case 13:return o=Ms.apply(void 0,[Ms.apply(void 0,l.concat([m.sent()])),{name:i,$metadata:Ec(e)}]),[3,19];case 14:return d=[{}],[4,ac(n,t)];case 15:return o=Ms.apply(void 0,[Ms.apply(void 0,d.concat([m.sent()])),{name:i,$metadata:Ec(e)}]),[3,19];case 16:return h=[{}],[4,sc(n,t)];case 17:return o=Ms.apply(void 0,[Ms.apply(void 0,h.concat([m.sent()])),{name:i,$metadata:Ec(e)}]),[3,19];case 18:p=n.body,i=p.code||p.Code||i,o=Ms(Ms({},p),{name:""+i,message:p.message||p.Message||i,$fault:"client",$metadata:Ec(e)}),m.label=19;case 19:return g=o.message||o.Message||i,o.message=g,delete o.Message,[2,Promise.reject(Object.assign(new Error(g),o))]}}))}))},Xu=function(e,t){return Ns(void 0,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,f,l,d,h,p,g,v;return zs(this,(function(m){switch(m.label){case 0:return r=[Ms({},e)],v={},[4,Oc(e.body,t)];case 1:switch(n=Ms.apply(void 0,r.concat([(v.body=m.sent(),v)])),i="UnknownError",i=kc(e,n.body),i){case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":return[3,2];case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":return[3,4];case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":return[3,6];case"LimitExceededException":case"com.amazonaws.cognitoidentity#LimitExceededException":return[3,8];case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":return[3,10];case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":return[3,12];case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":return[3,14];case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":return[3,16]}return[3,18];case 2:return a=[{}],[4,Qu(n,t)];case 3:return o=Ms.apply(void 0,[Ms.apply(void 0,a.concat([m.sent()])),{name:i,$metadata:Ec(e)}]),[3,19];case 4:return s=[{}],[4,ec(n,t)];case 5:return o=Ms.apply(void 0,[Ms.apply(void 0,s.concat([m.sent()])),{name:i,$metadata:Ec(e)}]),[3,19];case 6:return u=[{}],[4,nc(n,t)];case 7:return o=Ms.apply(void 0,[Ms.apply(void 0,u.concat([m.sent()])),{name:i,$metadata:Ec(e)}]),[3,19];case 8:return c=[{}],[4,rc(n,t)];case 9:return o=Ms.apply(void 0,[Ms.apply(void 0,c.concat([m.sent()])),{name:i,$metadata:Ec(e)}]),[3,19];case 10:return f=[{}],[4,oc(n,t)];case 11:return o=Ms.apply(void 0,[Ms.apply(void 0,f.concat([m.sent()])),{name:i,$metadata:Ec(e)}]),[3,19];case 12:return l=[{}],[4,ic(n,t)];case 13:return o=Ms.apply(void 0,[Ms.apply(void 0,l.concat([m.sent()])),{name:i,$metadata:Ec(e)}]),[3,19];case 14:return d=[{}],[4,ac(n,t)];case 15:return o=Ms.apply(void 0,[Ms.apply(void 0,d.concat([m.sent()])),{name:i,$metadata:Ec(e)}]),[3,19];case 16:return h=[{}],[4,sc(n,t)];case 17:return o=Ms.apply(void 0,[Ms.apply(void 0,h.concat([m.sent()])),{name:i,$metadata:Ec(e)}]),[3,19];case 18:p=n.body,i=p.code||p.Code||i,o=Ms(Ms({},p),{name:""+i,message:p.message||p.Message||i,$fault:"client",$metadata:Ec(e)}),m.label=19;case 19:return g=o.message||o.Message||i,o.message=g,delete o.Message,[2,Promise.reject(Object.assign(new Error(g),o))]}}))}))},Qu=function(e,t){return Ns(void 0,void 0,void 0,(function(){var n,r;return zs(this,(function(o){return n=e.body,r=dc(n,t),[2,Ms({name:"ExternalServiceException",$fault:"client",$metadata:Ec(e)},r)]}))}))},ec=function(e,t){return Ns(void 0,void 0,void 0,(function(){var n,r;return zs(this,(function(o){return n=e.body,r=gc(n,t),[2,Ms({name:"InternalErrorException",$fault:"server",$metadata:Ec(e)},r)]}))}))},tc=function(e,t){return Ns(void 0,void 0,void 0,(function(){var n,r;return zs(this,(function(o){return n=e.body,r=vc(n,t),[2,Ms({name:"InvalidIdentityPoolConfigurationException",$fault:"client",$metadata:Ec(e)},r)]}))}))},nc=function(e,t){return Ns(void 0,void 0,void 0,(function(){var n,r;return zs(this,(function(o){return n=e.body,r=mc(n,t),[2,Ms({name:"InvalidParameterException",$fault:"client",$metadata:Ec(e)},r)]}))}))},rc=function(e,t){return Ns(void 0,void 0,void 0,(function(){var n,r;return zs(this,(function(o){return n=e.body,r=yc(n,t),[2,Ms({name:"LimitExceededException",$fault:"client",$metadata:Ec(e)},r)]}))}))},oc=function(e,t){return Ns(void 0,void 0,void 0,(function(){var n,r;return zs(this,(function(o){return n=e.body,r=bc(n,t),[2,Ms({name:"NotAuthorizedException",$fault:"client",$metadata:Ec(e)},r)]}))}))},ic=function(e,t){return Ns(void 0,void 0,void 0,(function(){var n,r;return zs(this,(function(o){return n=e.body,r=wc(n,t),[2,Ms({name:"ResourceConflictException",$fault:"client",$metadata:Ec(e)},r)]}))}))},ac=function(e,t){return Ns(void 0,void 0,void 0,(function(){var n,r;return zs(this,(function(o){return n=e.body,r=_c(n,t),[2,Ms({name:"ResourceNotFoundException",$fault:"client",$metadata:Ec(e)},r)]}))}))},sc=function(e,t){return Ns(void 0,void 0,void 0,(function(){var n,r;return zs(this,(function(o){return n=e.body,r=Sc(n,t),[2,Ms({name:"TooManyRequestsException",$fault:"client",$metadata:Ec(e)},r)]}))}))},uc=function(e,t){return Ms(Ms(Ms({},void 0!==e.CustomRoleArn&&null!==e.CustomRoleArn&&{CustomRoleArn:e.CustomRoleArn}),void 0!==e.IdentityId&&null!==e.IdentityId&&{IdentityId:e.IdentityId}),void 0!==e.Logins&&null!==e.Logins&&{Logins:fc(e.Logins,t)})},cc=function(e,t){return Ms(Ms(Ms({},void 0!==e.AccountId&&null!==e.AccountId&&{AccountId:e.AccountId}),void 0!==e.IdentityPoolId&&null!==e.IdentityPoolId&&{IdentityPoolId:e.IdentityPoolId}),void 0!==e.Logins&&null!==e.Logins&&{Logins:fc(e.Logins,t)})},fc=function(e,t){return Object.entries(e).reduce((function(e,t){var n,r=Bs(t,2),o=r[0],i=r[1];return null===i?e:Ms(Ms({},e),((n={})[o]=i,n))}),{})},lc=function(e,t){return{AccessKeyId:void 0!==e.AccessKeyId&&null!==e.AccessKeyId?e.AccessKeyId:void 0,Expiration:void 0!==e.Expiration&&null!==e.Expiration?new Date(Math.round(1e3*e.Expiration)):void 0,SecretKey:void 0!==e.SecretKey&&null!==e.SecretKey?e.SecretKey:void 0,SessionToken:void 0!==e.SessionToken&&null!==e.SessionToken?e.SessionToken:void 0}},dc=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},hc=function(e,t){return{Credentials:void 0!==e.Credentials&&null!==e.Credentials?lc(e.Credentials):void 0,IdentityId:void 0!==e.IdentityId&&null!==e.IdentityId?e.IdentityId:void 0}},pc=function(e,t){return{IdentityId:void 0!==e.IdentityId&&null!==e.IdentityId?e.IdentityId:void 0}},gc=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},vc=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},mc=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},yc=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},bc=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},wc=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},_c=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Sc=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Ec=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},xc=function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)},Ac=function(e,t,n,r,o){return Ns(void 0,void 0,void 0,(function(){var i,a,s,u,c,f;return zs(this,(function(l){switch(l.label){case 0:return[4,e.endpoint()];case 1:return i=l.sent(),a=i.hostname,s=i.protocol,u=void 0===s?"https":s,c=i.port,f={protocol:u,hostname:a,port:c,method:"POST",path:n,headers:t},void 0!==r&&(f.hostname=r),void 0!==o&&(f.body=o),[2,new yn(f)]}}))}))},Oc=function(e,t){return function(e,t){return xc(e,t).then((function(e){return t.utf8Encoder(e)}))}(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},kc=function(e,t){var n,r,o=function(e){var t=e;return t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=(n=e.headers,r="x-amzn-errortype",Object.keys(n).find((function(e){return e.toLowerCase()===r.toLowerCase()})));return void 0!==i?o(e.headers[i]):void 0!==t.code?o(t.code):void 0!==t.__type?o(t.__type):""},Lc=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return Rs(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(dr(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"CognitoIdentityClient",commandName:"GetIdCommand",inputFilterSensitiveLog:cu.filterSensitiveLog,outputFilterSensitiveLog:fu.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return Ns(void 0,void 0,void 0,(function(){var n,r;return zs(this,(function(o){return n={"content-type":"application/x-amz-json-1.1","x-amz-target":"AWSCognitoIdentityService.GetId"},r=JSON.stringify(cc(e,t)),[2,Ac(t,n,"/",void 0,r)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Ns(void 0,void 0,void 0,(function(){var n,r,o;return zs(this,(function(i){switch(i.label){case 0:return e.statusCode>=300?[2,Xu(e,t)]:[4,Oc(e.body,t)];case 1:return n=i.sent(),{},r=pc(n,t),o=Ms({$metadata:Ec(e)},r),[2,Promise.resolve(o)]}}))}))}(e,t)},t}(mr),Ic=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return Rs(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(dr(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"CognitoIdentityClient",commandName:"GetCredentialsForIdentityCommand",inputFilterSensitiveLog:iu.filterSensitiveLog,outputFilterSensitiveLog:su.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return Ns(void 0,void 0,void 0,(function(){var n,r;return zs(this,(function(o){return n={"content-type":"application/x-amz-json-1.1","x-amz-target":"AWSCognitoIdentityService.GetCredentialsForIdentity"},r=JSON.stringify(uc(e,t)),[2,Ac(t,n,"/",void 0,r)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return Ns(void 0,void 0,void 0,(function(){var n,r,o;return zs(this,(function(i){switch(i.label){case 0:return e.statusCode>=300?[2,Ju(e,t)]:[4,Oc(e.body,t)];case 1:return n=i.sent(),{},r=hc(n,t),o=Ms({$metadata:Ec(e)},r),[2,Promise.resolve(o)]}}))}))}(e,t)},t}(mr),Cc=function(){return(Cc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Pc=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Tc=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},jc=new g("Credentials"),Rc=function(){function e(e){this._gettingCredPromise=null,this._refreshHandlers={},this.Auth=void 0,this.configure(e),this._refreshHandlers.google=zi.refreshGoogleToken,this._refreshHandlers.facebook=Bi.refreshFacebookToken}return e.prototype.getModuleName=function(){return"Credentials"},e.prototype.getCredSource=function(){return this._credentials_source},e.prototype.configure=function(e){if(!e)return this._config||{};this._config=Object.assign({},this._config,e);var t=this._config.refreshHandlers;return t&&(this._refreshHandlers=Cc(Cc({},this._refreshHandlers),t)),this._storage=this._config.storage,this._storage||(this._storage=(new vi).getStorage()),this._storageSync=Promise.resolve(),"function"==typeof this._storage.sync&&(this._storageSync=this._storage.sync()),this._config},e.prototype.get=function(){return jc.debug("getting credentials"),this._pickupCredentials()},e.prototype._getCognitoIdentityIdStorageKey=function(e){return"CognitoIdentityId-"+e},e.prototype._pickupCredentials=function(){return jc.debug("picking up credentials"),this._gettingCredPromise&&this._gettingCredPromise.isPending()?jc.debug("getting old cred promise"):(jc.debug("getting new cred promise"),this._gettingCredPromise=Object(U.i)(this._keepAlive())),this._gettingCredPromise},e.prototype._keepAlive=function(){return Pc(this,void 0,void 0,(function(){var e,t,n,r,o,i,a;return Tc(this,(function(s){switch(s.label){case 0:if(jc.debug("checking if credentials exists and not expired"),(e=this._credentials)&&!this._isExpired(e)&&!this._isPastTTL())return jc.debug("credentials not changed and not expired, directly return"),[2,Promise.resolve(e)];if(jc.debug("need to get a new credential or refresh the existing one"),t=this.Auth,!(n=void 0===t?b.Auth:t)||"function"!=typeof n.currentUserCredentials)return[2,Promise.reject("No Auth module registered in Amplify")];if(this._isExpired(e)||!this._isPastTTL())return[3,6];jc.debug("ttl has passed but token is not yet expired"),s.label=1;case 1:return s.trys.push([1,5,,6]),[4,n.currentUserPoolUser()];case 2:return r=s.sent(),[4,n.currentSession()];case 3:return o=s.sent(),i=o.refreshToken,[4,new Promise((function(e,t){r.refreshSession(i,(function(n,r){return n?t(n):e(r)}))}))];case 4:return s.sent(),[3,6];case 5:return a=s.sent(),jc.debug("Error attempting to refreshing the session",a),[3,6];case 6:return[2,n.currentUserCredentials()]}}))}))},e.prototype.refreshFederatedToken=function(e){jc.debug("Getting federated credentials");var t=e.provider,n=e.user,r=e.token,o=e.identity_id,i=e.expires_at;i=1970===new Date(i).getFullYear()?1e3*i:i;return jc.debug("checking if federated jwt token expired"),i>(new Date).getTime()?(jc.debug("token not expired"),this._setCredentialsFromFederation({provider:t,token:r,user:n,identity_id:o,expires_at:i})):this._refreshHandlers[t]&&"function"==typeof this._refreshHandlers[t]?(jc.debug("getting refreshed jwt token from federation provider"),this._providerRefreshWithRetry({refreshHandler:this._refreshHandlers[t],provider:t,user:n})):(jc.debug("no refresh handler for provider:",t),this.clear(),Promise.reject("no refresh handler for provider"))},e.prototype._providerRefreshWithRetry=function(e){var t=this,n=e.refreshHandler,r=e.provider,o=e.user;return Oi(n,[],1e4).then((function(e){return jc.debug("refresh federated token sucessfully",e),t._setCredentialsFromFederation({provider:r,token:e.token,user:o,identity_id:e.identity_id,expires_at:e.expires_at})})).catch((function(e){return"string"==typeof e&&0===e.toLowerCase().lastIndexOf("network error",e.length)||t.clear(),jc.debug("refresh federated token failed",e),Promise.reject("refreshing federation token failed: "+e)}))},e.prototype._isExpired=function(e){if(!e)return jc.debug("no credentials for expiration check"),!0;jc.debug("are these credentials expired?",e);var t=Date.now();return e.expiration.getTime()<=t},e.prototype._isPastTTL=function(){return this._nextCredentialsRefresh<=Date.now()},e.prototype._setCredentialsForGuest=function(){return Pc(this,void 0,void 0,(function(){var e,t,n,r,o,i,a,s=this;return Tc(this,(function(u){switch(u.label){case 0:return jc.debug("setting credentials for guest"),e=this._config,t=e.identityPoolId,n=e.region,e.mandatorySignIn?[2,Promise.reject("cannot get guest credentials when mandatory signin enabled")]:t?n?(o=this,[4,this._getGuestIdentityId()]):(jc.debug("region is not configured for getting the credentials"),[2,Promise.reject("region is not configured for getting the credentials")]):(jc.debug("No Cognito Identity pool provided for unauthenticated access"),[2,Promise.reject("No Cognito Identity pool provided for unauthenticated access")]);case 1:return r=o._identityId=u.sent(),i=new Zu({region:n,customUserAgent:_()}),a=void 0,a=r?Ls({identityId:r,client:i})():function(){return Pc(s,void 0,void 0,(function(){var e;return Tc(this,(function(n){switch(n.label){case 0:return[4,i.send(new Lc({IdentityPoolId:t}))];case 1:return e=n.sent().IdentityId,this._identityId=e,[2,Ls({client:i,identityId:e})()]}}))}))}().catch((function(e){return Pc(s,void 0,void 0,(function(){return Tc(this,(function(t){throw e}))}))})),[2,this._loadCredentials(a,"guest",!1,null).then((function(e){return e})).catch((function(e){return Pc(s,void 0,void 0,(function(){var n=this;return Tc(this,(function(o){switch(o.label){case 0:return"ResourceNotFoundException"!==e.name||e.message!=="Identity '"+r+"' not found."?[3,2]:(jc.debug("Failed to load guest credentials"),[4,this._removeGuestIdentityId()]);case 1:return o.sent(),a=function(){return Pc(n,void 0,void 0,(function(){var e;return Tc(this,(function(n){switch(n.label){case 0:return[4,i.send(new Lc({IdentityPoolId:t}))];case 1:return e=n.sent().IdentityId,this._identityId=e,[2,Ls({client:i,identityId:e})()]}}))}))}().catch((function(e){return Pc(n,void 0,void 0,(function(){return Tc(this,(function(t){throw e}))}))})),[2,this._loadCredentials(a,"guest",!1,null)];case 2:return[2,e]}}))}))}))]}}))}))},e.prototype._setCredentialsFromFederation=function(e){var t=e.provider,n=e.token,r=e.identity_id,o={google:"accounts.google.com",facebook:"graph.facebook.com",amazon:"www.amazon.com",developer:"cognito-identity.amazonaws.com"}[t]||t;if(!o)return Promise.reject("You must specify a federated provider");var i={};i[o]=n;var a=this._config,s=a.identityPoolId,u=a.region;if(!s)return jc.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");if(!u)return jc.debug("region is not configured for getting the credentials"),Promise.reject("region is not configured for getting the credentials");var c=new Zu({region:u,customUserAgent:_()}),f=void 0;r?f=Ls({identityId:r,logins:i,client:c})():f=Ts({logins:i,identityPoolId:s,client:c})();return this._loadCredentials(f,"federated",!0,e)},e.prototype._setCredentialsFromSession=function(e){var t=this;jc.debug("set credentials from session");var n=e.getIdToken().getJwtToken(),r=this._config,o=r.region,i=r.userPoolId,a=r.identityPoolId;if(!a)return jc.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");if(!o)return jc.debug("region is not configured for getting the credentials"),Promise.reject("region is not configured for getting the credentials");var s={};s["cognito-idp."+o+".amazonaws.com/"+i]=n;var u=new Zu({region:o,customUserAgent:_()}),c=Pc(t,void 0,void 0,(function(){var e,t,n,r,o,i,c,f,l,d;return Tc(this,(function(h){switch(h.label){case 0:return[4,this._getGuestIdentityId()];case 1:return(e=h.sent())?[3,3]:[4,u.send(new Lc({IdentityPoolId:a,Logins:s}))];case 2:n=h.sent().IdentityId,t=n,h.label=3;case 3:return[4,u.send(new Ic({IdentityId:e||t,Logins:s}))];case 4:return r=h.sent(),o=r.Credentials,i=o.AccessKeyId,c=o.Expiration,f=o.SecretKey,l=o.SessionToken,d=r.IdentityId,this._identityId=d,e?(jc.debug("The guest identity "+e+" has been successfully linked to the logins"),e===d&&jc.debug("The guest identity "+e+" has become the primary identity"),[4,this._removeGuestIdentityId()]):[3,6];case 5:h.sent(),h.label=6;case 6:return[2,{accessKeyId:i,secretAccessKey:f,sessionToken:l,expiration:c,identityId:d}]}}))})).catch((function(e){return Pc(t,void 0,void 0,(function(){return Tc(this,(function(t){throw e}))}))}));return this._loadCredentials(c,"userPool",!0,null)},e.prototype._loadCredentials=function(e,t,n,r){var o=this,i=this;return new Promise((function(a,s){e.then((function(e){return Pc(o,void 0,void 0,(function(){var o,s,u,c,f;return Tc(this,(function(l){switch(l.label){case 0:if(jc.debug("Load credentials successfully",e),this._identityId&&!e.identityId&&(e.identityId=this._identityId),i._credentials=e,i._credentials.authenticated=n,i._credentials_source=t,i._nextCredentialsRefresh=(new Date).getTime()+3e6,"federated"===t){o=Object.assign({id:this._credentials.identityId},r.user),s=r.provider,u=r.token,c=r.expires_at,f=r.identity_id;try{this._storage.setItem("aws-amplify-federatedInfo",JSON.stringify({provider:s,token:u,user:o,expires_at:c,identity_id:f}))}catch(e){jc.debug("Failed to put federated info into auth storage",e)}}return"guest"!==t?[3,2]:[4,this._setGuestIdentityId(e.identityId)];case 1:l.sent(),l.label=2;case 2:return a(i._credentials),[2]}}))}))})).catch((function(t){if(t)return jc.debug("Failed to load credentials",e),jc.debug("Error loading credentials",t),void s(t)}))}))},e.prototype.set=function(e,t){return"session"===t?this._setCredentialsFromSession(e):"federation"===t?this._setCredentialsFromFederation(e):"guest"===t?this._setCredentialsForGuest():(jc.debug("no source specified for setting credentials"),Promise.reject("invalid source"))},e.prototype.clear=function(){return Pc(this,void 0,void 0,(function(){return Tc(this,(function(e){return this._credentials=null,this._credentials_source=null,jc.debug("removing aws-amplify-federatedInfo from storage"),this._storage.removeItem("aws-amplify-federatedInfo"),[2]}))}))},e.prototype._getGuestIdentityId=function(){return Pc(this,void 0,void 0,(function(){var e,t;return Tc(this,(function(n){switch(n.label){case 0:e=this._config.identityPoolId,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this._storageSync];case 2:return n.sent(),[2,this._storage.getItem(this._getCognitoIdentityIdStorageKey(e))];case 3:return t=n.sent(),jc.debug("Failed to get the cached guest identityId",t),[3,4];case 4:return[2]}}))}))},e.prototype._setGuestIdentityId=function(e){return Pc(this,void 0,void 0,(function(){var t,n;return Tc(this,(function(r){switch(r.label){case 0:t=this._config.identityPoolId,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this._storageSync];case 2:return r.sent(),this._storage.setItem(this._getCognitoIdentityIdStorageKey(t),e),[3,4];case 3:return n=r.sent(),jc.debug("Failed to cache guest identityId",n),[3,4];case 4:return[2]}}))}))},e.prototype._removeGuestIdentityId=function(){return Pc(this,void 0,void 0,(function(){var e;return Tc(this,(function(t){return e=this._config.identityPoolId,jc.debug("removing "+this._getCognitoIdentityIdStorageKey(e)+" from storage"),this._storage.removeItem(this._getCognitoIdentityIdStorageKey(e)),[2]}))}))},e.prototype.shear=function(e){return{accessKeyId:e.accessKeyId,sessionToken:e.sessionToken,secretAccessKey:e.secretAccessKey,identityId:e.identityId,authenticated:e.authenticated}},e}(),Mc=new Rc(null);b.register(Mc);var Nc=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},zc=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Bc=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Uc=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Bc(arguments[t]));return e},Fc=new g("AWSCloudWatch"),Dc=function(){function e(e){this.configure(e),this._dataTracker={eventUploadInProgress:!1,logEvents:[]},this._currentLogBatch=[],this._initiateLogPushInterval()}return e.prototype.getProviderName=function(){return e.PROVIDER_NAME},e.prototype.getCategoryName=function(){return e.CATEGORY},e.prototype.getLogQueue=function(){return this._dataTracker.logEvents},e.prototype.configure=function(e){if(!e)return this._config||{};var t=Object.assign({},this._config,le(e).Logging,e);return this._config=t,this._config},e.prototype.createLogGroup=function(e){return Nc(this,void 0,void 0,(function(){var t,n;return zc(this,(function(r){switch(r.label){case 0:Fc.debug("creating new log group in CloudWatch - ",e.logGroupName),t=new br(e),r.label=1;case 1:return r.trys.push([1,4,,5]),[4,this._ensureCredentials()];case 2:if(!r.sent())throw new Error(c);return[4,this._initCloudWatchLogs().send(t)];case 3:return[2,r.sent()];case 4:throw n=r.sent(),Fc.error("error creating log group - "+n),n;case 5:return[2]}}))}))},e.prototype.getLogGroups=function(e){return Nc(this,void 0,void 0,(function(){var t,n;return zc(this,(function(r){switch(r.label){case 0:Fc.debug("getting list of log groups"),t=new wr(e),r.label=1;case 1:return r.trys.push([1,4,,5]),[4,this._ensureCredentials()];case 2:if(!r.sent())throw new Error(c);return[4,this._initCloudWatchLogs().send(t)];case 3:return[2,r.sent()];case 4:throw n=r.sent(),Fc.error("error getting log group - "+n),n;case 5:return[2]}}))}))},e.prototype.createLogStream=function(e){return Nc(this,void 0,void 0,(function(){var t,n;return zc(this,(function(r){switch(r.label){case 0:Fc.debug("creating new log stream in CloudWatch - ",e.logStreamName),t=new _r(e),r.label=1;case 1:return r.trys.push([1,4,,5]),[4,this._ensureCredentials()];case 2:if(!r.sent())throw new Error(c);return[4,this._initCloudWatchLogs().send(t)];case 3:return[2,r.sent()];case 4:throw n=r.sent(),Fc.error("error creating log stream - "+n),n;case 5:return[2]}}))}))},e.prototype.getLogStreams=function(e){return Nc(this,void 0,void 0,(function(){var t,n;return zc(this,(function(r){switch(r.label){case 0:Fc.debug("getting list of log streams"),t=new Sr(e),r.label=1;case 1:return r.trys.push([1,4,,5]),[4,this._ensureCredentials()];case 2:if(!r.sent())throw new Error(c);return[4,this._initCloudWatchLogs().send(t)];case 3:return[2,r.sent()];case 4:throw n=r.sent(),Fc.error("error getting log stream - "+n),n;case 5:return[2]}}))}))},e.prototype.getLogEvents=function(e){return Nc(this,void 0,void 0,(function(){var t,n;return zc(this,(function(r){switch(r.label){case 0:Fc.debug("getting log events from stream - ",e.logStreamName),t=new Er(e),r.label=1;case 1:return r.trys.push([1,4,,5]),[4,this._ensureCredentials()];case 2:if(!r.sent())throw new Error(c);return[4,this._initCloudWatchLogs().send(t)];case 3:return[2,r.sent()];case 4:throw n=r.sent(),Fc.error("error getting log events - "+n),n;case 5:return[2]}}))}))},e.prototype.pushLogs=function(e){Fc.debug("pushing log events to Cloudwatch..."),this._dataTracker.logEvents=Uc(this._dataTracker.logEvents,e)},e.prototype._validateLogGroupExistsAndCreate=function(e){return Nc(this,void 0,void 0,(function(){var t,n,r,o;return zc(this,(function(i){switch(i.label){case 0:if(this._dataTracker.verifiedLogGroup)return[2,this._dataTracker.verifiedLogGroup];i.label=1;case 1:return i.trys.push([1,5,,6]),[4,this._ensureCredentials()];case 2:if(!i.sent())throw new Error(c);return[4,this.getLogGroups({logGroupNamePrefix:e})];case 3:return"string"!=typeof(t=i.sent())&&t.logGroups&&(n=t.logGroups.filter((function(t){return t.logGroupName===e}))).length>0?(this._dataTracker.verifiedLogGroup=n[0],[2,n[0]]):[4,this.createLogGroup({logGroupName:e})];case 4:return i.sent(),[2,null];case 5:throw r=i.sent(),o="failure during log group search: "+r,Fc.error(o),r;case 6:return[2]}}))}))},e.prototype._validateLogStreamExists=function(e,t){return Nc(this,void 0,void 0,(function(){var n,r,o,i;return zc(this,(function(a){switch(a.label){case 0:return a.trys.push([0,4,,5]),[4,this._ensureCredentials()];case 1:if(!a.sent())throw new Error(c);return[4,this.getLogStreams({logGroupName:e,logStreamNamePrefix:t})];case 2:return(n=a.sent()).logStreams&&(r=n.logStreams.filter((function(e){return e.logStreamName===t}))).length>0?(this._nextSequenceToken=r[0].uploadSequenceToken,[2,r[0]]):[4,this.createLogStream({logGroupName:e,logStreamName:t})];case 3:return a.sent(),[2,null];case 4:throw o=a.sent(),i="failure during log stream search: "+o,Fc.error(i),o;case 5:return[2]}}))}))},e.prototype._sendLogEvents=function(e){return Nc(this,void 0,void 0,(function(){var t,n,r;return zc(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),[4,this._ensureCredentials()];case 1:if(!o.sent())throw new Error(c);return Fc.debug("sending log events to stream - ",e.logStreamName),t=new xr(e),[4,this._initCloudWatchLogs().send(t)];case 2:return[2,o.sent()];case 3:return n=o.sent(),r="failure during log push: "+n,Fc.error(r),[3,4];case 4:return[2]}}))}))},e.prototype._initCloudWatchLogs=function(){return new hi({region:this._config.region,credentials:this._config.credentials,customUserAgent:_(),endpoint:this._config.endpoint})},e.prototype._ensureCredentials=function(){return Nc(this,void 0,void 0,(function(){var e=this;return zc(this,(function(t){switch(t.label){case 0:return[4,Mc.get().then((function(t){if(!t)return!1;var n=Mc.shear(t);return Fc.debug("set credentials for logging",n),e._config.credentials=n,!0})).catch((function(e){return Fc.warn("ensure credentials error",e),!1}))];case 1:return[2,t.sent()]}}))}))},e.prototype._getNextSequenceToken=function(){return Nc(this,void 0,void 0,(function(){var e,t;return zc(this,(function(n){switch(n.label){case 0:if(this._nextSequenceToken&&this._nextSequenceToken.length>0)return[2,this._nextSequenceToken];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,this._validateLogGroupExistsAndCreate(this._config.logGroupName)];case 2:return n.sent(),this._nextSequenceToken=void 0,[4,this._validateLogStreamExists(this._config.logGroupName,this._config.logStreamName)];case 3:return(e=n.sent())&&(this._nextSequenceToken=e.uploadSequenceToken),[2,this._nextSequenceToken];case 4:throw t=n.sent(),Fc.error("failure while getting next sequence token: "+t),t;case 5:return[2]}}))}))},e.prototype._safeUploadLogEvents=function(){return Nc(this,void 0,void 0,(function(){var e,t,n,r,o;return zc(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this._getNextSequenceToken()];case 1:return e=i.sent(),t=0===this._currentLogBatch.length?this._getBufferedBatchOfLogs():this._currentLogBatch,n={logGroupName:this._config.logGroupName,logStreamName:this._config.logStreamName,logEvents:t,sequenceToken:e},this._dataTracker.eventUploadInProgress=!0,[4,this._sendLogEvents(n)];case 2:return r=i.sent(),this._nextSequenceToken=r.nextSequenceToken,this._dataTracker.eventUploadInProgress=!1,this._currentLogBatch=[],[2,r];case 3:if(o=i.sent(),Fc.error("error during _safeUploadLogEvents: "+o),!f.includes(o.name))throw this._dataTracker.eventUploadInProgress=!1,o;return this._getNewSequenceTokenAndSubmit({logEvents:this._currentLogBatch,logGroupName:this._config.logGroupName,logStreamName:this._config.logStreamName}),[3,4];case 4:return[2]}}))}))},e.prototype._getBufferedBatchOfLogs=function(){for(var e=0,t=0;e<this._dataTracker.logEvents.length;){var n=this._dataTracker.logEvents[e],r=n?(new TextEncoder).encode(n.message).length+o:0;if(r>a){var s="Log entry exceeds maximum size for CloudWatch logs. Log size: "+r+". Truncating log message.";Fc.warn(s),n.message=n.message.substring(0,r)}if(t+r>i)break;t+=r,e++}return this._currentLogBatch=this._dataTracker.logEvents.splice(0,e),this._currentLogBatch},e.prototype._getNewSequenceTokenAndSubmit=function(e){return Nc(this,void 0,void 0,(function(){var t,n,r;return zc(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),this._nextSequenceToken=void 0,this._dataTracker.eventUploadInProgress=!0,[4,this._getNextSequenceToken()];case 1:return t=o.sent(),e.sequenceToken=t,[4,this._sendLogEvents(e)];case 2:return n=o.sent(),this._dataTracker.eventUploadInProgress=!1,this._currentLogBatch=[],[2,n];case 3:throw r=o.sent(),Fc.error("error when retrying log submission with new sequence token: "+r),this._dataTracker.eventUploadInProgress=!1,r;case 4:return[2]}}))}))},e.prototype._initiateLogPushInterval=function(){var e=this;this._timer&&clearInterval(this._timer),this._timer=setInterval((function(){return Nc(e,void 0,void 0,(function(){var e;return zc(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),this._getDocUploadPermissibility()?[4,this._safeUploadLogEvents()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[3,4];case 3:return e=t.sent(),Fc.error("error when calling _safeUploadLogEvents in the timer interval - "+e),[3,4];case 4:return[2]}}))}))}),2e3)},e.prototype._getDocUploadPermissibility=function(){return(0!==this._dataTracker.logEvents.length||0!==this._currentLogBatch.length)&&!this._dataTracker.eventUploadInProgress},e.PROVIDER_NAME=u,e.CATEGORY=s,e}(),qc={},Gc={addEventListener:function(e,t){}},Hc=Object(U.b)().isBrowser?(new vi).getStorage():void 0;function Wc(e){return(Wc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var $c=function(){function e(){this._logger=new g("ServiceWorker")}return Object.defineProperty(e.prototype,"serviceWorker",{get:function(){return this._serviceWorker},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var n=this;return void 0===e&&(e="/service-worker.js"),void 0===t&&(t="/"),this._logger.debug("registering "+e),this._logger.debug("registering service worker with scope "+t),new Promise((function(r,o){if(!navigator||!("serviceWorker"in navigator))return o(new Error("Service Worker not available"));navigator.serviceWorker.register(e,{scope:t}).then((function(e){return e.installing?n._serviceWorker=e.installing:e.waiting?n._serviceWorker=e.waiting:e.active&&(n._serviceWorker=e.active),n._registration=e,n._setupListeners(),n._logger.debug("Service Worker Registration Success: "+e),r(e)})).catch((function(e){return n._logger.debug("Service Worker Registration Failed "+e),o(e)}))}))},e.prototype.enablePush=function(e){var t=this;if(!this._registration)throw new Error("Service Worker not registered");return this._publicKey=e,new Promise((function(n,r){if(!Object(U.b)().isBrowser)return r(new Error("Service Worker not available"));t._registration.pushManager.getSubscription().then((function(r){if(!r)return t._logger.debug("User is NOT subscribed to push"),t._registration.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t._urlB64ToUint8Array(e)}).then((function(e){t._subscription=e,t._logger.debug("User subscribed: "+JSON.stringify(e)),n(e)})).catch((function(e){t._logger.error(e)}));t._subscription=r,t._logger.debug("User is subscribed to push: "+JSON.stringify(r)),n(r)}))}))},e.prototype._urlB64ToUint8Array=function(e){for(var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=window.atob(t),r=new Uint8Array(n.length),o=0;o<n.length;++o)r[o]=n.charCodeAt(o);return r},e.prototype.send=function(e){this._serviceWorker&&this._serviceWorker.postMessage("object"===Wc(e)?JSON.stringify(e):e)},e.prototype._setupListeners=function(){var e=this;this._serviceWorker.addEventListener("statechange",(function(t){var n=e._serviceWorker.state;e._logger.debug("ServiceWorker statechange: "+n),b.Analytics&&"function"==typeof b.Analytics.record&&b.Analytics.record({name:"ServiceWorker",attributes:{state:n}})})),this._serviceWorker.addEventListener("message",(function(t){e._logger.debug("ServiceWorker message event: "+t)}))},e}(),Kc=n(5);function Vc(e,t){void 0===t&&(t={});var n=function(e){if(e&&"j"===e[0]&&":"===e[1])return e.substr(2);return e}(e);if(function(e,t){return void 0===t&&(t=!e||"{"!==e[0]&&"["!==e[0]&&'"'!==e[0]),!t}(n,t.doNotParse))try{return JSON.parse(n)}catch(e){}return e}var Yc=function(){return(Yc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Zc=function(){function e(e,t){var n=this;this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.cookies=function(e,t){return"string"==typeof e?Kc.parse(e,t):"object"==typeof e&&null!==e?e:{}}(e,t),new Promise((function(){n.HAS_DOCUMENT_COOKIE="object"==typeof document&&"string"==typeof document.cookie})).catch((function(){}))}return e.prototype._updateBrowserValues=function(e){this.HAS_DOCUMENT_COOKIE&&(this.cookies=Kc.parse(document.cookie,e))},e.prototype._emitChange=function(e){for(var t=0;t<this.changeListeners.length;++t)this.changeListeners[t](e)},e.prototype.get=function(e,t,n){return void 0===t&&(t={}),this._updateBrowserValues(n),Vc(this.cookies[e],t)},e.prototype.getAll=function(e,t){void 0===e&&(e={}),this._updateBrowserValues(t);var n={};for(var r in this.cookies)n[r]=Vc(this.cookies[r],e);return n},e.prototype.set=function(e,t,n){var r;"object"==typeof t&&(t=JSON.stringify(t)),this.cookies=Yc(Yc({},this.cookies),((r={})[e]=t,r)),this.HAS_DOCUMENT_COOKIE&&(document.cookie=Kc.serialize(e,t,n)),this._emitChange({name:e,value:t,options:n})},e.prototype.remove=function(e,t){var n=t=Yc(Yc({},t),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Yc({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=Kc.serialize(e,"",n)),this._emitChange({name:e,value:void 0,options:t})},e.prototype.addChangeListener=function(e){this.changeListeners.push(e)},e.prototype.removeChangeListener=function(e){var t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1)},e}(),Jc=Object(U.b)().isBrowser,Xc=function(){function e(e){void 0===e&&(e={}),this.cookies=new Zc,this.store=Jc?window.localStorage:Object.create(null),this.cookies=e.req?new Zc(e.req.headers.cookie):new Zc,Object.assign(this.store,this.cookies.getAll())}return Object.defineProperty(e.prototype,"length",{get:function(){return Object.entries(this.store).length},enumerable:!0,configurable:!0}),e.prototype.clear=function(){var e=this;Array.from(new Array(this.length)).map((function(t,n){return e.key(n)})).forEach((function(t){return e.removeItem(t)}))},e.prototype.getItem=function(e){return this.getLocalItem(e)},e.prototype.getLocalItem=function(e){return Object.prototype.hasOwnProperty.call(this.store,e)?this.store[e]:null},e.prototype.getUniversalItem=function(e){return this.cookies.get(e)},e.prototype.key=function(e){return Object.keys(this.store)[e]},e.prototype.removeItem=function(e){this.removeLocalItem(e),this.removeUniversalItem(e)},e.prototype.removeLocalItem=function(e){delete this.store[e]},e.prototype.removeUniversalItem=function(e){this.cookies.remove(e,{path:"/"})},e.prototype.setItem=function(e,t){switch(this.setLocalItem(e,t),e.split(".").pop()){case"LastAuthUser":case"accessToken":case"refreshToken":case"idToken":Jc?this.setUniversalItem(e,t):this.setLocalItem(e,t)}},e.prototype.setLocalItem=function(e,t){this.store[e]=t},e.prototype.setUniversalItem=function(e,t){this.cookies.set(e,t,{path:"/",sameSite:!0,secure:"localhost"!==window.location.hostname})},e}(),Qc="undefined"!=typeof Symbol&&"function"==typeof Symbol.for,ef=Qc?Symbol.for("INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER"):"@@INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER",tf=Qc?Symbol.for("INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER"):"@@INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER",nf="x-amz-user-agent",rf=function(){function e(){this._queue=[],this._pending=!1}return e.prototype.isLocked=function(){return this._pending},e.prototype.acquire=function(){var e=this,t=new Promise((function(t){return e._queue.push(t)}));return this._pending||this._dispatchNext(),t},e.prototype.runExclusive=function(e){return this.acquire().then((function(t){var n;try{n=e()}catch(e){throw t(),e}return Promise.resolve(n).then((function(e){return t(),e}),(function(e){throw t(),e}))}))},e.prototype._dispatchNext=function(){this._queue.length>0?(this._pending=!0,this._queue.shift()(this._dispatchNext.bind(this))):this._pending=!1},e}(),of=n(22),af=n.n(of).a,sf=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},uf=function(){function e(){}return e.prototype.networkMonitor=function(t){if(Object(U.b)().isNode)return af.from([{online:!0}]);var n=Object(U.h)()?self:window;return new af((function(t){t.next({online:n.navigator.onLine});var r=function(){return t.next({online:!0})},o=function(){return t.next({online:!1})};return n.addEventListener("online",r),n.addEventListener("offline",o),e._observers.push(t),function(){n.removeEventListener("online",r),n.removeEventListener("offline",o),e._observers=e._observers.filter((function(e){return e!==t}))}}))},e._observerOverride=function(t){var n,r,o=function(n){if(n.closed)return e._observers=e._observers.filter((function(e){return e!==n})),"continue";n.next(t)};try{for(var i=sf(e._observers),a=i.next();!a.done;a=i.next()){o(a.value)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e._observers=[],e}();function cf(e){return e.split("").map((function(e){return e.charCodeAt(0).toString(16).padStart(2,"0")})).join("")}function ff(e){return e.match(/.{2}/g).map((function(e){return String.fromCharCode(parseInt(e,16))})).join("")}var lf={userAgent:w.userAgent};t.default=b},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return o}));var r=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return o}));var r=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}}])}));
|
|
76
|
+
t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,u=(1<<s)-1,c=u>>1,f=-7,l=n?o-1:0,d=n?-1:1,h=e[t+l];for(l+=d,i=h&(1<<-f)-1,h>>=-f,f+=s;f>0;i=256*i+e[t+l],l+=d,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=r;f>0;a=256*a+e[t+l],l+=d,f-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),i-=c}return(h?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,u,c=8*i-o-1,f=(1<<c)-1,l=f>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+l>=1?d/u:d*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(t*u-1)*Math.pow(2,o),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;e[n+h]=255&s,h+=p,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[n+h]=255&a,h+=p,a/=256,c-=8);e[n+h-p]|=128*v}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0<e.length;)t[0]=e[0];return t}return Uint32Array.from(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(17).__exportStar)(n(49),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(17),o=n(18),i=n(50),a=n(51),s=function(){function e(e){if(this.hash=new i.RawSha256,e){this.outer=new i.RawSha256;var t=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>o.BLOCK_SIZE){var n=new i.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(o.BLOCK_SIZE);return r.set(t),r}(e),n=new Uint8Array(o.BLOCK_SIZE);n.set(t);for(var r=0;r<o.BLOCK_SIZE;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(r=0;r<t.byteLength;r++)t[r]=0}}return e.prototype.update=function(e){if(!(0,a.isEmptyData)(e)&&!this.error)try{this.hash.update((0,a.convertToBuffer)(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return(0,r.__awaiter)(this,void 0,void 0,(function(){return(0,r.__generator)(this,(function(e){return[2,this.digestSync()]}))}))},e}();t.Sha256=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(18),o=function(){function e(){this.state=Int32Array.from(r.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>r.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===r.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%r.BLOCK_SIZE>=r.BLOCK_SIZE-8){for(var o=this.bufferLength;o<r.BLOCK_SIZE;o++)t.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(o=this.bufferLength;o<r.BLOCK_SIZE-8;o++)t.setUint8(o,0);t.setUint32(r.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(r.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(r.DIGEST_LENGTH);for(o=0;o<8;o++)i[4*o]=this.state[o]>>>24&255,i[4*o+1]=this.state[o]>>>16&255,i[4*o+2]=this.state[o]>>>8&255,i[4*o+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],o=t[1],i=t[2],a=t[3],s=t[4],u=t[5],c=t[6],f=t[7],l=0;l<r.BLOCK_SIZE;l++){if(l<16)this.temp[l]=(255&e[4*l])<<24|(255&e[4*l+1])<<16|(255&e[4*l+2])<<8|255&e[4*l+3];else{var d=this.temp[l-2],h=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,p=((d=this.temp[l-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[l]=(h+this.temp[l-7]|0)+(p+this.temp[l-16]|0)}var v=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&u^~s&c)|0)+(f+(r.KEY[l]+this.temp[l]|0)|0)|0,g=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&o^n&i^o&i)|0;f=c,c=u,u=s,s=a+v|0,a=i,i=o,o=n,n=v+g|0}t[0]+=n,t[1]+=o,t[2]+=i,t[3]+=a,t[4]+=s,t[5]+=u,t[6]+=c,t[7]+=f},e}();t.RawSha256=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var r=n(52);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(53);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(54);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(55);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var r=n(68),o=void 0!==e&&e.from?function(t){return e.from(t,"utf8")}:r.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?o(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}).call(this,n(16).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0<e.length;)t[0]=e[0];return t}return Uint32Array.from(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(19).__exportStar(n(57),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsZeroByteGCM=t.supportsSubtleCrypto=t.supportsSecureRandom=t.supportsWebCrypto=void 0;var r=n(19),o=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function i(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function a(e){return e&&o.every((function(t){return"function"==typeof e[t]}))}t.supportsWebCrypto=function(e){return!(!i(e)||"object"!=typeof e.crypto.subtle)&&a(e.crypto.subtle)},t.supportsSecureRandom=i,t.supportsSubtleCrypto=a,t.supportsZeroByteGCM=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(n){switch(n.label){case 0:if(!a(e))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=n.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===n.sent().byteLength];case 4:return n.sent(),[2,!1];case 5:return[2]}}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(59);r.__exportStar(n(60),t),r.__exportStar(n(61),t),r.__exportStar(n(62),t),r.__exportStar(n(63),t),r.__exportStar(n(64),t)},function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return i})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return f})),n.d(t,"__generator",(function(){return l})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return h})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return v})),n.d(t,"__spread",(function(){return g})),n.d(t,"__spreadArrays",(function(){return y})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return b})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return _})),n.d(t,"__makeTemplateObject",(function(){return S})),n.d(t,"__importStar",(function(){return E})),n.d(t,"__importDefault",(function(){return x})),n.d(t,"__classPrivateFieldGet",(function(){return A})),n.d(t,"__classPrivateFieldSet",(function(){return k}));
|
|
77
|
+
/*! *****************************************************************************
|
|
78
|
+
Copyright (c) Microsoft Corporation.
|
|
79
|
+
|
|
80
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
81
|
+
purpose with or without fee is hereby granted.
|
|
82
|
+
|
|
83
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
84
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
85
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
86
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
87
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
88
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
89
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
90
|
+
***************************************************************************** */
|
|
91
|
+
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function h(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof m?Promise.resolve(n.value.v).then(u,c):f(i[0][2],n)}catch(e){f(i[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function f(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function x(e){return e&&e.__esModule?e:{default:e}}function A(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function k(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var r=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,n=t.getRandomValues,o=t.subtle;return r.map((function(e){return o[e]})).concat(n).every((function(e){return"function"==typeof e}))}return!1}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}Object.defineProperty(t,"__esModule",{value:!0}),t.Observable=void 0;var a=function(){return"function"==typeof Symbol},s=function(e){return a()&&Boolean(Symbol[e])},u=function(e){return s(e)?Symbol[e]:"@@"+e};a()&&!s("observable")&&(Symbol.observable=Symbol("observable"));var c=u("iterator"),f=u("observable"),l=u("species");function d(e,t){var n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function h(e){var t=e.constructor;return void 0!==t&&null===(t=t[l])&&(t=void 0),void 0!==t?t:E}function p(e){return e instanceof E}function v(e){v.log?v.log(e):setTimeout((function(){throw e}))}function g(e){Promise.resolve().then((function(){try{e()}catch(e){v(e)}}))}function y(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var n=d(t,"unsubscribe");n&&n.call(t)}}catch(e){v(e)}}function m(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function b(e,t,n){e._state="running";var r=e._observer;try{var o=d(r,t);switch(t){case"next":o&&o.call(r,n);break;case"error":if(m(e),!o)throw n;o.call(r,n);break;case"complete":m(e),o&&o.call(r)}}catch(e){v(e)}"closed"===e._state?y(e):"running"===e._state&&(e._state="ready")}function w(e,t,n){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:n}],void g((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var n=0;n<t.length&&(b(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}(e)}))):void b(e,t,n);e._queue.push({type:t,value:n})}}var _=function(){function e(t,n){r(this,e),this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";var o=new S(this);try{this._cleanup=n.call(void 0,o)}catch(e){o.error(e)}"initializing"===this._state&&(this._state="ready")}return i(e,[{key:"unsubscribe",value:function(){"closed"!==this._state&&(m(this),y(this))}},{key:"closed",get:function(){return"closed"===this._state}}]),e}(),S=function(){function e(t){r(this,e),this._subscription=t}return i(e,[{key:"next",value:function(e){w(this._subscription,"next",e)}},{key:"error",value:function(e){w(this._subscription,"error",e)}},{key:"complete",value:function(){w(this._subscription,"complete")}},{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),E=function(){function e(t){if(r(this,e),!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}return i(e,[{key:"subscribe",value:function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new _(e,this._subscriber)}},{key:"forEach",value:function(e){var t=this;return new Promise((function(n,r){if("function"==typeof e)var o=t.subscribe({next:function(t){try{e(t,i)}catch(e){r(e),o.unsubscribe()}},error:r,complete:n});else r(new TypeError(e+" is not a function"));function i(){o.unsubscribe(),n()}}))}},{key:"map",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(h(this))((function(n){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))}},{key:"filter",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(h(this))((function(n){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))}},{key:"reduce",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=h(this),r=arguments.length>1,o=!1,i=arguments[1],a=i;return new n((function(n){return t.subscribe({next:function(t){var i=!o;if(o=!0,!i||r)try{a=e(a,t)}catch(e){return n.error(e)}else a=t},error:function(e){n.error(e)},complete:function(){if(!o&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(a),n.complete()}})}))}},{key:"concat",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=h(this);return new o((function(t){var r,i=0;return function e(a){r=a.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){i===n.length?(r=void 0,t.complete()):e(o.from(n[i++]))}})}(e),function(){r&&(r.unsubscribe(),r=void 0)}}))}},{key:"flatMap",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=h(this);return new n((function(r){var o=[],i=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return r.error(e)}var i=n.from(t).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var e=o.indexOf(i);e>=0&&o.splice(e,1),a()}});o.push(i)},error:function(e){r.error(e)},complete:function(){a()}});function a(){i.closed&&0===o.length&&r.complete()}return function(){o.forEach((function(e){return e.unsubscribe()})),i.unsubscribe()}}))}},{key:f,value:function(){return this}}],[{key:"from",value:function(t){var n="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var r=d(t,f);if(r){var o=r.call(t);if(Object(o)!==o)throw new TypeError(o+" is not an object");return p(o)&&o.constructor===n?o:new n((function(e){return o.subscribe(e)}))}if(s("iterator")&&(r=d(t,c)))return new n((function(e){g((function(){if(!e.closed){var n=!0,o=!1,i=void 0;try{for(var a,s=r.call(t)[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var u=a.value;if(e.next(u),e.closed)return}}catch(e){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}e.complete()}}))}));if(Array.isArray(t))return new n((function(e){g((function(){if(!e.closed){for(var n=0;n<t.length;++n)if(e.next(t[n]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")}},{key:"of",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o="function"==typeof this?this:e;return new o((function(e){g((function(){if(!e.closed){for(var t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}}))}))}},{key:l,get:function(){return this}}]),e}();t.Observable=E,a()&&Object.defineProperty(E,Symbol("extensions"),{value:{symbol:f,hostReportError:v},configurable:!0})},function(e,t,n){"use strict";n.r(t),n.d(t,"AmplifyClass",(function(){return S})),n.d(t,"ClientDevice",(function(){return P})),n.d(t,"ConsoleLogger",(function(){return w})),n.d(t,"Logger",(function(){return w})),n.d(t,"missingConfig",(function(){return L})),n.d(t,"invalidParameter",(function(){return T})),n.d(t,"Hub",(function(){return j})),n.d(t,"I18n",(function(){return z})),n.d(t,"isEmpty",(function(){return F.e})),n.d(t,"sortByField",(function(){return F.k})),n.d(t,"objectLessAttributes",(function(){return F.j})),n.d(t,"filenameToContentType",(function(){return F.c})),n.d(t,"isTextFile",(function(){return F.g})),n.d(t,"generateRandomString",(function(){return F.d})),n.d(t,"makeQuerablePromise",(function(){return F.i})),n.d(t,"isWebWorker",(function(){return F.h})),n.d(t,"browserOrNode",(function(){return F.b})),n.d(t,"transferKeyToLowerCase",(function(){return F.l})),n.d(t,"transferKeyToUpperCase",(function(){return F.m})),n.d(t,"isStrictObject",(function(){return F.f})),n.d(t,"JS",(function(){return F.a})),n.d(t,"Signer",(function(){return nn})),n.d(t,"parseMobileHubConfig",(function(){return on})),n.d(t,"Parser",(function(){return an})),n.d(t,"AWSCloudWatchProvider",(function(){return hu})),n.d(t,"FacebookOAuth",(function(){return sa})),n.d(t,"GoogleOAuth",(function(){return aa})),n.d(t,"Linking",(function(){return pu})),n.d(t,"AppState",(function(){return vu})),n.d(t,"AsyncStorage",(function(){return gu})),n.d(t,"Credentials",(function(){return lu})),n.d(t,"CredentialsClass",(function(){return fu})),n.d(t,"ServiceWorker",(function(){return mu})),n.d(t,"StorageHelper",(function(){return Ki})),n.d(t,"MemoryStorage",(function(){return $i})),n.d(t,"UniversalStorage",(function(){return xu})),n.d(t,"Platform",(function(){return x})),n.d(t,"getAmplifyUserAgent",(function(){return A})),n.d(t,"INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER",(function(){return ku})),n.d(t,"INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER",(function(){return Ou})),n.d(t,"USER_AGENT_HEADER",(function(){return Pu})),n.d(t,"Constants",(function(){return Mu})),n.d(t,"NonRetryableError",(function(){return Yi})),n.d(t,"isNonRetryableError",(function(){return Zi})),n.d(t,"retry",(function(){return Ji})),n.d(t,"jitteredBackoff",(function(){return Xi})),n.d(t,"jitteredExponentialRetry",(function(){return Qi})),n.d(t,"Mutex",(function(){return Lu})),n.d(t,"Reachability",(function(){return Cu})),n.d(t,"DateUtils",(function(){return V})),n.d(t,"urlSafeEncode",(function(){return ju})),n.d(t,"urlSafeDecode",(function(){return Ru})),n.d(t,"AWS_CLOUDWATCH_BASE_BUFFER_SIZE",(function(){return d})),n.d(t,"AWS_CLOUDWATCH_CATEGORY",(function(){return v})),n.d(t,"AWS_CLOUDWATCH_MAX_BATCH_EVENT_SIZE",(function(){return h})),n.d(t,"AWS_CLOUDWATCH_MAX_EVENT_SIZE",(function(){return p})),n.d(t,"AWS_CLOUDWATCH_PROVIDER_NAME",(function(){return g})),n.d(t,"NO_CREDS_ERROR_STRING",(function(){return y})),n.d(t,"RETRY_ERROR_CODES",(function(){return m})),n.d(t,"Amplify",(function(){return E}));var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function s(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;function u(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function c(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function f(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(c(arguments[t]));return e}Object.create;var l,d=26,h=1048576,p=256e3,v="Logging",g="AWSCloudWatch",y="No credentials",m=["ResourceNotFoundException","InvalidSequenceTokenException"],b={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5};!function(e){e.DEBUG="DEBUG",e.ERROR="ERROR",e.INFO="INFO",e.WARN="WARN",e.VERBOSE="VERBOSE"}(l||(l={}));var w=function(){function e(e,t){void 0===t&&(t=l.WARN),this.name=e,this.level=t,this._pluggables=[]}return e.prototype._padding=function(e){return e<10?"0"+e:""+e},e.prototype._ts=function(){var e=new Date;return[this._padding(e.getMinutes()),this._padding(e.getSeconds())].join(":")+"."+e.getMilliseconds()},e.prototype.configure=function(e){return e?(this._config=e,this._config):this._config},e.prototype._log=function(t){for(var n,r,o=[],i=1;i<arguments.length;i++)o[i-1]=arguments[i];var a=this.level;e.LOG_LEVEL&&(a=e.LOG_LEVEL),"undefined"!=typeof window&&window.LOG_LEVEL&&(a=window.LOG_LEVEL);var s=b[a],c=b[t];if(c>=s){var f=console.log.bind(console);t===l.ERROR&&console.error&&(f=console.error.bind(console)),t===l.WARN&&console.warn&&(f=console.warn.bind(console));var d="["+t+"] "+this._ts()+" "+this.name,h="";if(1===o.length&&"string"==typeof o[0])f(h=d+" - "+o[0]);else if(1===o.length)h=d+" "+o[0],f(d,o[0]);else if("string"==typeof o[0]){var p=o.slice(1);1===p.length&&(p=p[0]),h=d+" - "+o[0]+" "+p,f(d+" - "+o[0],p)}else h=d+" "+o,f(d,o);try{for(var v=u(this._pluggables),g=v.next();!g.done;g=v.next()){var y=g.value,m={message:h,timestamp:Date.now()};y.pushLogs([m])}}catch(e){n={error:e}}finally{try{g&&!g.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}}},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,f([l.INFO],e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,f([l.INFO],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,f([l.WARN],e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,f([l.ERROR],e))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,f([l.DEBUG],e))},e.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,f([l.VERBOSE],e))},e.prototype.addPluggable=function(e){e&&e.getCategoryName()===v&&(this._pluggables.push(e),e.configure(this._config))},e.prototype.listPluggables=function(){return this._pluggables},e.LOG_LEVEL=null,e}(),_=new w("Amplify"),S=function(){function e(){this._components=[],this._config={},this._modules={},this.Auth=null,this.Analytics=null,this.API=null,this.Credentials=null,this.Storage=null,this.I18n=null,this.Cache=null,this.PubSub=null,this.Interactions=null,this.Pushnotification=null,this.UI=null,this.XR=null,this.Predictions=null,this.DataStore=null,this.Geo=null,this.Notifications=null,this.Logger=w,this.ServiceWorker=null}return e.prototype.register=function(e){_.debug("component registered in amplify",e),this._components.push(e),"function"==typeof e.getModuleName?(this._modules[e.getModuleName()]=e,this[e.getModuleName()]=e):_.debug("no getModuleName method for component",e),e.configure(this._config)},e.prototype.configure=function(e){var t=this;return e?(this._config=Object.assign(this._config,e),_.debug("amplify config",this._config),Object.entries(this._modules).forEach((function(e){var n=c(e,2),r=(n[0],n[1]);Object.keys(r).forEach((function(e){t._modules[e]&&(r[e]=t._modules[e])}))})),this._components.map((function(e){e.configure(t._config)})),this._config):this._config},e.prototype.addPluggable=function(e){e&&e.getCategory&&"function"==typeof e.getCategory&&this._components.map((function(t){t.addPluggable&&"function"==typeof t.addPluggable&&t.addPluggable(e)}))},e}(),E=new S,x={userAgent:"aws-amplify/4.7.6 js",product:"",navigator:null,isReactNative:!1};if("undefined"!=typeof navigator&&navigator.product)switch(x.product=navigator.product||"",x.navigator=navigator||null,navigator.product){case"ReactNative":x.userAgent="aws-amplify/4.7.6 react-native",x.isReactNative=!0;break;default:x.userAgent="aws-amplify/4.7.6 js",x.isReactNative=!1}var A=function(e){return""+x.userAgent+(e||"")},k=new w("ClientDevice_Browser");function O(){return"undefined"==typeof window?{}:function(){if("undefined"==typeof window)return k.warn("No window object available to get browser client info"),{};var e=window.navigator;if(!e)return k.warn("No navigator object available to get browser client info"),{};var t=e.platform,n=e.product,r=e.vendor,o=e.userAgent,i=e.language,a=function(e){var t=/.+(Opera[\s[A-Z]*|OPR[\sA-Z]*)\/([0-9\.]+).*/i.exec(e);if(t)return{type:t[1],version:t[2]};var n=/.+(Trident|Edge)\/([0-9\.]+).*/i.exec(e);if(n)return{type:n[1],version:n[2]};var r=/.+(Chrome|Firefox|FxiOS)\/([0-9\.]+).*/i.exec(e);if(r)return{type:r[1],version:r[2]};var o=/.+(Safari)\/([0-9\.]+).*/i.exec(e);if(o)return{type:o[1],version:o[2]};var i=/.+(AppleWebKit)\/([0-9\.]+).*/i.exec(e);if(i)return{type:i[1],version:i[2]};var a=/.*([A-Z]+)\/([0-9\.]+).*/i.exec(e);if(a)return{type:a[1],version:a[2]};return{type:"",version:""}}(o),s=(u=/\(([A-Za-z\s].*)\)/.exec((new Date).toString()),u&&u[1]||"");var u;return{platform:t,make:n||r,model:a.type,version:a.version,appVersion:[a.type,a.version].join("/"),language:i,timezone:s}}()}var P=function(){function e(){}return e.clientInfo=function(){return O()},e.dimension=function(){return"undefined"==typeof window?(k.warn("No window object available to get browser client info"),{width:320,height:320}):{width:window.innerWidth,height:window.innerHeight}},e}();function L(e){return new Error("Missing config value of "+e)}function T(e){return new Error("Invalid parameter value of "+e)}var I=new w("Hub"),C="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default";var j=new(function(){function e(e){this.listeners=[],this.patterns=[],this.protectedChannels=["core","auth","api","analytics","interactions","pubsub","storage","ui","xr"],this.name=e}return e.prototype.remove=function(e,t){if(e instanceof RegExp){var n=this.patterns.find((function(t){return t.pattern.source===e.source}));if(!n)return void I.warn("No listeners for "+e);this.patterns=f(this.patterns.filter((function(e){return e!==n})))}else{var r=this.listeners[e];if(!r)return void I.warn("No listeners for "+e);this.listeners[e]=f(r.filter((function(e){return e.callback!==t})))}},e.prototype.dispatch=function(e,t,n,r){(void 0===n&&(n=""),this.protectedChannels.indexOf(e)>-1)&&(r===C||I.warn("WARNING: "+e+" is protected and dispatching on it can have unintended consequences"));var o={channel:e,payload:i({},t),source:n,patternInfo:[]};try{this._toListeners(o)}catch(e){I.error(e)}},e.prototype.listen=function(e,t,n){var r,o=this;if(void 0===n&&(n="noname"),function(e){return void 0!==e.onHubCapsule}(t))I.warn("WARNING onHubCapsule is Deprecated. Please pass in a callback."),r=t.onHubCapsule.bind(t);else{if("function"!=typeof t)throw new Error("No callback supplied to Hub");r=t}if(e instanceof RegExp)this.patterns.push({pattern:e,callback:r});else{var i=this.listeners[e];i||(i=[],this.listeners[e]=i),i.push({name:n,callback:r})}return function(){o.remove(e,r)}},e.prototype._toListeners=function(e){var t=e.channel,n=e.payload,r=this.listeners[t];if(r&&r.forEach((function(r){I.debug("Dispatching to "+t+" with ",n);try{r.callback(e)}catch(e){I.error(e)}})),this.patterns.length>0){if(!n.message)return void I.warn("Cannot perform pattern matching without a message key");var o=n.message;this.patterns.forEach((function(t){var n=o.match(t.pattern);if(n){var r=c(n).slice(1),a=i(i({},e),{patternInfo:r});try{t.callback(a)}catch(e){I.error(e)}}}))}},e}())("__default__"),R=new w("I18n"),M=function(){function e(e){this._options=null,this._lang=null,this._dict={},this._options=Object.assign({},e),this._lang=this._options.language,!this._lang&&"undefined"!=typeof window&&window&&window.navigator&&(this._lang=window.navigator.language),R.debug(this._lang)}return e.prototype.setLanguage=function(e){this._lang=e},e.prototype.get=function(e,t){if(void 0===t&&(t=void 0),!this._lang)return void 0!==t?t:e;var n=this._lang,r=this.getByLanguage(e,n);return r||(n.indexOf("-")>0&&(r=this.getByLanguage(e,n.split("-")[0])),r||(void 0!==t?t:e))},e.prototype.getByLanguage=function(e,t,n){if(void 0===n&&(n=null),!t)return n;var r=this._dict[t];return r?r[e]:n},e.prototype.putVocabulariesForLanguage=function(e,t){var n=this._dict[e];n||(n=this._dict[e]={}),Object.assign(n,t)},e.prototype.putVocabularies=function(e){var t=this;Object.keys(e).map((function(n){t.putVocabulariesForLanguage(n,e[n])}))},e}(),N=new w("I18n"),B=null,U=null,z=function(){function e(){}return e.configure=function(t){return N.debug("configure I18n"),t?(B=Object.assign({},B,t.I18n||t),e.createInstance(),B):B},e.getModuleName=function(){return"I18n"},e.createInstance=function(){N.debug("create I18n instance"),U||(U=new M(B))},e.setLanguage=function(t){return e.checkConfig(),U.setLanguage(t)},e.get=function(t,n){return e.checkConfig()?U.get(t,n):void 0===n?t:n},e.putVocabulariesForLanguage=function(t,n){return e.checkConfig(),U.putVocabulariesForLanguage(t,n)},e.putVocabularies=function(t){return e.checkConfig(),U.putVocabularies(t)},e.checkConfig=function(){return U||(U=new M(B)),!0},e}();E.register(z);for(var F=n(0),D=n(6),q={},G={},H=0;H<256;H++){var W=H.toString(16).toLowerCase();1===W.length&&(W="0"+W),q[H]=W,G[W]=H}function $(e){for(var t="",n=0;n<e.byteLength;n++)t+=q[e[n]];return t}var K=n(2),V={clockOffset:0,getDateWithClockOffset:function(){return V.clockOffset?new Date((new Date).getTime()+V.clockOffset):new Date},getClockOffset:function(){return V.clockOffset},getHeaderStringFromDate:function(e){return void 0===e&&(e=V.getDateWithClockOffset()),e.toISOString().replace(/[:\-]|\.\d{3}/g,"")},getDateFromHeaderString:function(e){var t=c(e.match(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2}).+/),7),n=t[1],r=t[2],o=t[3],i=t[4],a=t[5],s=t[6];return new Date(Date.UTC(Number(n),Number(r)-1,Number(o),Number(i),Number(a),Number(s)))},isClockSkewed:function(e){return Math.abs(e.getTime()-V.getDateWithClockOffset().getTime())>=3e5},isClockSkewError:function(e){if(!e.response||!e.response.headers)return!1;var t=e.response.headers;return Boolean(["BadRequestException","InvalidSignatureException"].includes(t["x-amzn-errortype"])&&(t.date||t.Date))},setClockOffset:function(e){V.clockOffset=e}};function Y(e){return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Z,J,X,Q,ee,te,ne,re,oe,ie,ae,se,ue,ce,fe,le,de,he,pe,ve,ge,ye,me,be,we,_e,Se,Ee,xe,Ae,ke,Oe,Pe,Le,Te,Ie,Ce,je,Re,Me,Ne,Be,Ue,ze,Fe,De,qe,Ge,He,We,$e,Ke,Ve,Ye,Ze,Je,Xe,Qe,et,tt,nt,rt,ot,it,at,st,ut,ct,ft,lt,dt,ht,pt,vt,gt,yt,mt,bt,wt,_t,St,Et,xt,At,kt,Ot,Pt,Lt,Tt,It,Ct,jt,Rt,Mt,Nt,Bt,Ut,zt,Ft,Dt,qt,Gt,Ht,Wt,$t=new w("Signer"),Kt=function(e,t){var n=new D.Sha256(e);return n.update(t),n.digestSync()},Vt=function(e){var t=e||"",n=new D.Sha256;return n.update(t),$(n.digestSync())},Yt=function(e){return Object.keys(e).map((function(e){return e.toLowerCase()})).sort().join(";")},Zt=function(e){var t,n,r=Object(K.parse)(e.url);return[e.method||"/",encodeURIComponent(r.pathname).replace(/%2F/gi,"/"),(n=r.query,n&&0!==n.length?n.split("&").map((function(e){var t=e.split("=");if(1===t.length)return e;var n=t[1].replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}));return t[0]+"="+n})).sort((function(e,t){var n=e.split("=")[0],r=t.split("=")[0];return n===r?e<t?-1:1:n<r?-1:1})).join("&"):""),(t=e.headers,t&&0!==Object.keys(t).length?Object.keys(t).map((function(e){return{key:e.toLowerCase(),value:t[e]?t[e].trim().replace(/\s+/g," "):""}})).sort((function(e,t){return e.key<t.key?-1:1})).map((function(e){return e.key+":"+e.value})).join("\n")+"\n":""),Yt(e.headers),Vt(e.data)].join("\n")},Jt=function(e){var t=(Object(K.parse)(e.url).host.match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com$/)||[]).slice(1,3);return"es"===t[1]&&(t=t.reverse()),{service:e.service||t[0],region:e.region||t[1]}},Xt=function(e,t,n){return[e,t,n,"aws4_request"].join("/")},Qt=function(e,t,n,r){return[e,n,r,Vt(t)].join("\n")},en=function(e,t,n){$t.debug(n);var r=Kt("AWS4"+e,t),o=Kt(r,n.region),i=Kt(o,n.service);return Kt(i,"aws4_request")},tn=function(e,t){return $(Kt(e,t))},nn=function(){function e(){}return e.sign=function(e,t,n){if(void 0===n&&(n=null),e.headers=e.headers||{},e.body&&!e.data)throw new Error('The attribute "body" was found on the request object. Please use the attribute "data" instead.');var r=V.getDateWithClockOffset().toISOString().replace(/[:\-]|\.\d{3}/g,""),o=r.substr(0,8),i=Object(K.parse)(e.url);e.headers.host=i.host,e.headers["x-amz-date"]=r,t.session_token&&(e.headers["X-Amz-Security-Token"]=t.session_token);var a=Zt(e);$t.debug(a);var s=n||Jt(e),u=Xt(o,s.region,s.service),c=Qt("AWS4-HMAC-SHA256",a,r,u),f=en(t.secret_key,o,s),l=tn(f,c),d=function(e,t,n,r,o){return[e+" Credential="+t+"/"+n,"SignedHeaders="+r,"Signature="+o].join(", ")}("AWS4-HMAC-SHA256",t.access_key,u,Yt(e.headers),l);return e.headers.Authorization=d,e},e.signUrl=function(e,t,n,r){var o="object"===Y(e)?e.url:e,a="object"===Y(e)?e.method:"GET",s="object"===Y(e)?e.body:void 0,u=V.getDateWithClockOffset().toISOString().replace(/[:\-]|\.\d{3}/g,""),c=u.substr(0,8),f=Object(K.parse)(o,!0,!0),l=(f.search,function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(f,["search"])),d={host:l.host},h=n||Jt({url:Object(K.format)(l)}),p=h.region,v=h.service,g=Xt(c,p,v),y=t.session_token&&"iotdevicegateway"!==v,m=i(i(i({"X-Amz-Algorithm":"AWS4-HMAC-SHA256","X-Amz-Credential":[t.access_key,g].join("/"),"X-Amz-Date":u.substr(0,16)},y?{"X-Amz-Security-Token":""+t.session_token}:{}),r?{"X-Amz-Expires":""+r}:{}),{"X-Amz-SignedHeaders":Object.keys(d).join(",")}),b=Zt({method:a,url:Object(K.format)(i(i({},l),{query:i(i({},l.query),m)})),headers:d,data:s}),w=Qt("AWS4-HMAC-SHA256",b,u,g),_=en(t.secret_key,c,{region:p,service:v}),S=tn(_,w),E=i({"X-Amz-Signature":S},t.session_token&&{"X-Amz-Security-Token":t.session_token});return Object(K.format)({protocol:l.protocol,slashes:!0,hostname:l.hostname,port:l.port,pathname:l.pathname,query:i(i(i({},l.query),m),E)})},e}(),rn=new w("Parser"),on=function(e){var t,n={};if(e.aws_mobile_analytics_app_id){var r={AWSPinpoint:{appId:e.aws_mobile_analytics_app_id,region:e.aws_mobile_analytics_app_region}};n.Analytics=r}return(e.aws_cognito_identity_pool_id||e.aws_user_pools_id)&&(n.Auth={userPoolId:e.aws_user_pools_id,userPoolWebClientId:e.aws_user_pools_web_client_id,region:e.aws_cognito_region,identityPoolId:e.aws_cognito_identity_pool_id,identityPoolRegion:e.aws_cognito_region,mandatorySignIn:"enable"===e.aws_mandatory_sign_in,signUpVerificationMethod:e.aws_cognito_sign_up_verification_method||"code"}),t=e.aws_user_files_s3_bucket?{AWSS3:{bucket:e.aws_user_files_s3_bucket,region:e.aws_user_files_s3_bucket_region,dangerouslyConnectToHttpEndpointForTesting:e.aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing}}:e?e.Storage||e:{},e.Logging&&(n.Logging=i(i({},e.Logging),{region:e.aws_project_region})),e.geo&&(n.Geo=Object.assign({},e.geo),e.geo.amazon_location_service&&(n.Geo={AmazonLocationService:e.geo.amazon_location_service})),n.Analytics=Object.assign({},n.Analytics,e.Analytics),n.Auth=Object.assign({},n.Auth,e.Auth),n.Storage=Object.assign({},t),n.Logging=Object.assign({},n.Logging,e.Logging),rn.debug("parse config",e,"to amplifyconfig",n),n},an=function(){function e(){}return e.parseMobilehubConfig=on,e}();(Z||(Z={})).filterSensitiveLog=function(e){return i({},e)},(J||(J={})).filterSensitiveLog=function(e){return i({},e)},(X||(X={})).filterSensitiveLog=function(e){return i({},e)},(Q||(Q={})).filterSensitiveLog=function(e){return i({},e)},(ee||(ee={})).filterSensitiveLog=function(e){return i({},e)},(te||(te={})).filterSensitiveLog=function(e){return i({},e)},(ne||(ne={})).filterSensitiveLog=function(e){return i({},e)},(re||(re={})).filterSensitiveLog=function(e){return i({},e)},(oe||(oe={})).filterSensitiveLog=function(e){return i({},e)},(ie||(ie={})).filterSensitiveLog=function(e){return i({},e)},(ae||(ae={})).filterSensitiveLog=function(e){return i({},e)},(se||(se={})).filterSensitiveLog=function(e){return i({},e)},(ue||(ue={})).filterSensitiveLog=function(e){return i({},e)},(ce||(ce={})).filterSensitiveLog=function(e){return i({},e)},(fe||(fe={})).filterSensitiveLog=function(e){return i({},e)},(le||(le={})).filterSensitiveLog=function(e){return i({},e)},(de||(de={})).filterSensitiveLog=function(e){return i({},e)},(he||(he={})).filterSensitiveLog=function(e){return i({},e)},(pe||(pe={})).filterSensitiveLog=function(e){return i({},e)},(ve||(ve={})).filterSensitiveLog=function(e){return i({},e)},(ge||(ge={})).filterSensitiveLog=function(e){return i({},e)},(ye||(ye={})).filterSensitiveLog=function(e){return i({},e)},(me||(me={})).filterSensitiveLog=function(e){return i({},e)},(be||(be={})).filterSensitiveLog=function(e){return i({},e)},(we||(we={})).filterSensitiveLog=function(e){return i({},e)},(_e||(_e={})).filterSensitiveLog=function(e){return i({},e)},function(e){e.CANCELLED="CANCELLED",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e.PENDING="PENDING",e.PENDING_CANCEL="PENDING_CANCEL",e.RUNNING="RUNNING"}(Se||(Se={})),(Ee||(Ee={})).filterSensitiveLog=function(e){return i({},e)},(xe||(xe={})).filterSensitiveLog=function(e){return i({},e)},(Ae||(Ae={})).filterSensitiveLog=function(e){return i({},e)},(ke||(ke={})).filterSensitiveLog=function(e){return i({},e)},(Oe||(Oe={})).filterSensitiveLog=function(e){return i({},e)},(Pe||(Pe={})).filterSensitiveLog=function(e){return i({},e)},(Le||(Le={})).filterSensitiveLog=function(e){return i({},e)},(Te||(Te={})).filterSensitiveLog=function(e){return i({},e)},function(e){e.LastEventTime="LastEventTime",e.LogStreamName="LogStreamName"}(Ie||(Ie={})),(Ce||(Ce={})).filterSensitiveLog=function(e){return i({},e)},(je||(je={})).filterSensitiveLog=function(e){return i({},e)},(Re||(Re={})).filterSensitiveLog=function(e){return i({},e)},(Me||(Me={})).filterSensitiveLog=function(e){return i({},e)},(Ne||(Ne={})).filterSensitiveLog=function(e){return i({},e)},(Be||(Be={})).filterSensitiveLog=function(e){return i({},e)},(Ue||(Ue={})).filterSensitiveLog=function(e){return i({},e)},function(e){e.Cancelled="Cancelled",e.Complete="Complete",e.Failed="Failed",e.Running="Running",e.Scheduled="Scheduled"}(ze||(ze={})),(Fe||(Fe={})).filterSensitiveLog=function(e){return i({},e)},(De||(De={})).filterSensitiveLog=function(e){return i({},e)},(qe||(qe={})).filterSensitiveLog=function(e){return i({},e)},(Ge||(Ge={})).filterSensitiveLog=function(e){return i({},e)},(He||(He={})).filterSensitiveLog=function(e){return i({},e)},(We||(We={})).filterSensitiveLog=function(e){return i({},e)},($e||($e={})).filterSensitiveLog=function(e){return i({},e)},(Ke||(Ke={})).filterSensitiveLog=function(e){return i({},e)},(Ve||(Ve={})).filterSensitiveLog=function(e){return i({},e)},(Ye||(Ye={})).filterSensitiveLog=function(e){return i({},e)},function(e){e.ByLogStream="ByLogStream",e.Random="Random"}(Ze||(Ze={})),(Je||(Je={})).filterSensitiveLog=function(e){return i({},e)},(Xe||(Xe={})).filterSensitiveLog=function(e){return i({},e)},(Qe||(Qe={})).filterSensitiveLog=function(e){return i({},e)},(et||(et={})).filterSensitiveLog=function(e){return i({},e)},(tt||(tt={})).filterSensitiveLog=function(e){return i({},e)},(nt||(nt={})).filterSensitiveLog=function(e){return i({},e)},(rt||(rt={})).filterSensitiveLog=function(e){return i({},e)},(ot||(ot={})).filterSensitiveLog=function(e){return i({},e)},(it||(it={})).filterSensitiveLog=function(e){return i({},e)},(at||(at={})).filterSensitiveLog=function(e){return i({},e)},(st||(st={})).filterSensitiveLog=function(e){return i({},e)},(ut||(ut={})).filterSensitiveLog=function(e){return i({},e)},(ct||(ct={})).filterSensitiveLog=function(e){return i({},e)},(ft||(ft={})).filterSensitiveLog=function(e){return i({},e)},(lt||(lt={})).filterSensitiveLog=function(e){return i({},e)},(dt||(dt={})).filterSensitiveLog=function(e){return i({},e)},(ht||(ht={})).filterSensitiveLog=function(e){return i({},e)},(pt||(pt={})).filterSensitiveLog=function(e){return i({},e)},(vt||(vt={})).filterSensitiveLog=function(e){return i({},e)},(gt||(gt={})).filterSensitiveLog=function(e){return i({},e)},(yt||(yt={})).filterSensitiveLog=function(e){return i({},e)},(mt||(mt={})).filterSensitiveLog=function(e){return i({},e)},(bt||(bt={})).filterSensitiveLog=function(e){return i({},e)},(wt||(wt={})).filterSensitiveLog=function(e){return i({},e)},(_t||(_t={})).filterSensitiveLog=function(e){return i({},e)},(St||(St={})).filterSensitiveLog=function(e){return i({},e)},(Et||(Et={})).filterSensitiveLog=function(e){return i({},e)},(xt||(xt={})).filterSensitiveLog=function(e){return i({},e)},(At||(At={})).filterSensitiveLog=function(e){return i({},e)},(kt||(kt={})).filterSensitiveLog=function(e){return i({},e)},(Ot||(Ot={})).filterSensitiveLog=function(e){return i({},e)},(Pt||(Pt={})).filterSensitiveLog=function(e){return i({},e)},(Lt||(Lt={})).filterSensitiveLog=function(e){return i({},e)},(Tt||(Tt={})).filterSensitiveLog=function(e){return i({},e)},(It||(It={})).filterSensitiveLog=function(e){return i({},e)},(Ct||(Ct={})).filterSensitiveLog=function(e){return i({},e)},(jt||(jt={})).filterSensitiveLog=function(e){return i({},e)},(Rt||(Rt={})).filterSensitiveLog=function(e){return i({},e)},(Mt||(Mt={})).filterSensitiveLog=function(e){return i({},e)},(Nt||(Nt={})).filterSensitiveLog=function(e){return i({},e)},(Bt||(Bt={})).filterSensitiveLog=function(e){return i({},e)},(Ut||(Ut={})).filterSensitiveLog=function(e){return i({},e)},(zt||(zt={})).filterSensitiveLog=function(e){return i({},e)},(Ft||(Ft={})).filterSensitiveLog=function(e){return i({},e)},(Dt||(Dt={})).filterSensitiveLog=function(e){return i({},e)},(qt||(qt={})).filterSensitiveLog=function(e){return i({},e)},(Gt||(Gt={})).filterSensitiveLog=function(e){return i({},e)},(Ht||(Ht={})).filterSensitiveLog=function(e){return i({},e)},(Wt||(Wt={})).filterSensitiveLog=function(e){return i({},e)};var sn=function(){function e(e){this.statusCode=e.statusCode,this.headers=e.headers||{},this.body=e.body}return e.isInstance=function(e){if(!e)return!1;var t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers},e}();
|
|
92
|
+
/*! *****************************************************************************
|
|
93
|
+
Copyright (c) Microsoft Corporation.
|
|
94
|
+
|
|
95
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
96
|
+
purpose with or without fee is hereby granted.
|
|
97
|
+
|
|
98
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
99
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
100
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
101
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
102
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
103
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
104
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
105
|
+
***************************************************************************** */var un=function(){return(un=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function cn(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var fn=function(){function e(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.substr(-1)?e.protocol+":":e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/"+e.path:e.path:"/"}return e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers},e.prototype.clone=function(){var t,n=new e(un(un({},this),{headers:un({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var r,o=t[n];return un(un({},e),((r={})[n]=Array.isArray(o)?function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(cn(arguments[t]));return e}(o):o,r))}),{}))),n},e}();var ln=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,o,a,u,c,f,l,d,h,p,v;return s(this,(function(s){switch(s.label){case 0:return r=[i({},e)],v={},[4,er(e.body,t)];case 1:switch(n=i.apply(void 0,r.concat([(v.body=s.sent(),v)])),a="UnknownError",a=tr(e,n.body),a){case"InvalidParameterException":case"com.amazonaws.cloudwatchlogs#InvalidParameterException":return[3,2];case"LimitExceededException":case"com.amazonaws.cloudwatchlogs#LimitExceededException":return[3,4];case"OperationAbortedException":case"com.amazonaws.cloudwatchlogs#OperationAbortedException":return[3,6];case"ResourceAlreadyExistsException":case"com.amazonaws.cloudwatchlogs#ResourceAlreadyExistsException":return[3,8];case"ServiceUnavailableException":case"com.amazonaws.cloudwatchlogs#ServiceUnavailableException":return[3,10]}return[3,12];case 2:return u=[{}],[4,mn(n,t)];case 3:return o=i.apply(void 0,[i.apply(void 0,u.concat([s.sent()])),{name:a,$metadata:Jn(e)}]),[3,13];case 4:return c=[{}],[4,wn(n,t)];case 5:return o=i.apply(void 0,[i.apply(void 0,c.concat([s.sent()])),{name:a,$metadata:Jn(e)}]),[3,13];case 6:return f=[{}],[4,_n(n,t)];case 7:return o=i.apply(void 0,[i.apply(void 0,f.concat([s.sent()])),{name:a,$metadata:Jn(e)}]),[3,13];case 8:return l=[{}],[4,Sn(n,t)];case 9:return o=i.apply(void 0,[i.apply(void 0,l.concat([s.sent()])),{name:a,$metadata:Jn(e)}]),[3,13];case 10:return d=[{}],[4,xn(n,t)];case 11:return o=i.apply(void 0,[i.apply(void 0,d.concat([s.sent()])),{name:a,$metadata:Jn(e)}]),[3,13];case 12:h=n.body,a=h.code||h.Code||a,o=i(i({},h),{name:""+a,message:h.message||h.Message||a,$fault:"client",$metadata:Jn(e)}),s.label=13;case 13:return p=o.message||o.Message||a,o.message=p,delete o.Message,[2,Promise.reject(Object.assign(new Error(p),o))]}}))}))},dn=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,o,a,u,c,f,l,d,h,p;return s(this,(function(s){switch(s.label){case 0:return r=[i({},e)],p={},[4,er(e.body,t)];case 1:switch(n=i.apply(void 0,r.concat([(p.body=s.sent(),p)])),a="UnknownError",a=tr(e,n.body),a){case"InvalidParameterException":case"com.amazonaws.cloudwatchlogs#InvalidParameterException":return[3,2];case"ResourceAlreadyExistsException":case"com.amazonaws.cloudwatchlogs#ResourceAlreadyExistsException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.cloudwatchlogs#ResourceNotFoundException":return[3,6];case"ServiceUnavailableException":case"com.amazonaws.cloudwatchlogs#ServiceUnavailableException":return[3,8]}return[3,10];case 2:return u=[{}],[4,mn(n,t)];case 3:return o=i.apply(void 0,[i.apply(void 0,u.concat([s.sent()])),{name:a,$metadata:Jn(e)}]),[3,11];case 4:return c=[{}],[4,Sn(n,t)];case 5:return o=i.apply(void 0,[i.apply(void 0,c.concat([s.sent()])),{name:a,$metadata:Jn(e)}]),[3,11];case 6:return f=[{}],[4,En(n,t)];case 7:return o=i.apply(void 0,[i.apply(void 0,f.concat([s.sent()])),{name:a,$metadata:Jn(e)}]),[3,11];case 8:return l=[{}],[4,xn(n,t)];case 9:return o=i.apply(void 0,[i.apply(void 0,l.concat([s.sent()])),{name:a,$metadata:Jn(e)}]),[3,11];case 10:d=n.body,a=d.code||d.Code||a,o=i(i({},d),{name:""+a,message:d.message||d.Message||a,$fault:"client",$metadata:Jn(e)}),s.label=11;case 11:return h=o.message||o.Message||a,o.message=h,delete o.Message,[2,Promise.reject(Object.assign(new Error(h),o))]}}))}))},hn=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,o,a,u,c,f,l,d;return s(this,(function(s){switch(s.label){case 0:return r=[i({},e)],d={},[4,er(e.body,t)];case 1:switch(n=i.apply(void 0,r.concat([(d.body=s.sent(),d)])),a="UnknownError",a=tr(e,n.body),a){case"InvalidParameterException":case"com.amazonaws.cloudwatchlogs#InvalidParameterException":return[3,2];case"ServiceUnavailableException":case"com.amazonaws.cloudwatchlogs#ServiceUnavailableException":return[3,4]}return[3,6];case 2:return u=[{}],[4,mn(n,t)];case 3:return o=i.apply(void 0,[i.apply(void 0,u.concat([s.sent()])),{name:a,$metadata:Jn(e)}]),[3,7];case 4:return c=[{}],[4,xn(n,t)];case 5:return o=i.apply(void 0,[i.apply(void 0,c.concat([s.sent()])),{name:a,$metadata:Jn(e)}]),[3,7];case 6:f=n.body,a=f.code||f.Code||a,o=i(i({},f),{name:""+a,message:f.message||f.Message||a,$fault:"client",$metadata:Jn(e)}),s.label=7;case 7:return l=o.message||o.Message||a,o.message=l,delete o.Message,[2,Promise.reject(Object.assign(new Error(l),o))]}}))}))},pn=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,o,a,u,c,f,l,d,h;return s(this,(function(s){switch(s.label){case 0:return r=[i({},e)],h={},[4,er(e.body,t)];case 1:switch(n=i.apply(void 0,r.concat([(h.body=s.sent(),h)])),a="UnknownError",a=tr(e,n.body),a){case"InvalidParameterException":case"com.amazonaws.cloudwatchlogs#InvalidParameterException":return[3,2];case"ResourceNotFoundException":case"com.amazonaws.cloudwatchlogs#ResourceNotFoundException":return[3,4];case"ServiceUnavailableException":case"com.amazonaws.cloudwatchlogs#ServiceUnavailableException":return[3,6]}return[3,8];case 2:return u=[{}],[4,mn(n,t)];case 3:return o=i.apply(void 0,[i.apply(void 0,u.concat([s.sent()])),{name:a,$metadata:Jn(e)}]),[3,9];case 4:return c=[{}],[4,En(n,t)];case 5:return o=i.apply(void 0,[i.apply(void 0,c.concat([s.sent()])),{name:a,$metadata:Jn(e)}]),[3,9];case 6:return f=[{}],[4,xn(n,t)];case 7:return o=i.apply(void 0,[i.apply(void 0,f.concat([s.sent()])),{name:a,$metadata:Jn(e)}]),[3,9];case 8:l=n.body,a=l.code||l.Code||a,o=i(i({},l),{name:""+a,message:l.message||l.Message||a,$fault:"client",$metadata:Jn(e)}),s.label=9;case 9:return d=o.message||o.Message||a,o.message=d,delete o.Message,[2,Promise.reject(Object.assign(new Error(d),o))]}}))}))},vn=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,o,a,u,c,f,l,d,h;return s(this,(function(s){switch(s.label){case 0:return r=[i({},e)],h={},[4,er(e.body,t)];case 1:switch(n=i.apply(void 0,r.concat([(h.body=s.sent(),h)])),a="UnknownError",a=tr(e,n.body),a){case"InvalidParameterException":case"com.amazonaws.cloudwatchlogs#InvalidParameterException":return[3,2];case"ResourceNotFoundException":case"com.amazonaws.cloudwatchlogs#ResourceNotFoundException":return[3,4];case"ServiceUnavailableException":case"com.amazonaws.cloudwatchlogs#ServiceUnavailableException":return[3,6]}return[3,8];case 2:return u=[{}],[4,mn(n,t)];case 3:return o=i.apply(void 0,[i.apply(void 0,u.concat([s.sent()])),{name:a,$metadata:Jn(e)}]),[3,9];case 4:return c=[{}],[4,En(n,t)];case 5:return o=i.apply(void 0,[i.apply(void 0,c.concat([s.sent()])),{name:a,$metadata:Jn(e)}]),[3,9];case 6:return f=[{}],[4,xn(n,t)];case 7:return o=i.apply(void 0,[i.apply(void 0,f.concat([s.sent()])),{name:a,$metadata:Jn(e)}]),[3,9];case 8:l=n.body,a=l.code||l.Code||a,o=i(i({},l),{name:""+a,message:l.message||l.Message||a,$fault:"client",$metadata:Jn(e)}),s.label=9;case 9:return d=o.message||o.Message||a,o.message=d,delete o.Message,[2,Promise.reject(Object.assign(new Error(d),o))]}}))}))},gn=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,o,a,u,c,f,l,d,h,p,v,g;return s(this,(function(s){switch(s.label){case 0:return r=[i({},e)],g={},[4,er(e.body,t)];case 1:switch(n=i.apply(void 0,r.concat([(g.body=s.sent(),g)])),a="UnknownError",a=tr(e,n.body),a){case"DataAlreadyAcceptedException":case"com.amazonaws.cloudwatchlogs#DataAlreadyAcceptedException":return[3,2];case"InvalidParameterException":case"com.amazonaws.cloudwatchlogs#InvalidParameterException":return[3,4];case"InvalidSequenceTokenException":case"com.amazonaws.cloudwatchlogs#InvalidSequenceTokenException":return[3,6];case"ResourceNotFoundException":case"com.amazonaws.cloudwatchlogs#ResourceNotFoundException":return[3,8];case"ServiceUnavailableException":case"com.amazonaws.cloudwatchlogs#ServiceUnavailableException":return[3,10];case"UnrecognizedClientException":case"com.amazonaws.cloudwatchlogs#UnrecognizedClientException":return[3,12]}return[3,14];case 2:return u=[{}],[4,yn(n,t)];case 3:return o=i.apply(void 0,[i.apply(void 0,u.concat([s.sent()])),{name:a,$metadata:Jn(e)}]),[3,15];case 4:return c=[{}],[4,mn(n,t)];case 5:return o=i.apply(void 0,[i.apply(void 0,c.concat([s.sent()])),{name:a,$metadata:Jn(e)}]),[3,15];case 6:return f=[{}],[4,bn(n,t)];case 7:return o=i.apply(void 0,[i.apply(void 0,f.concat([s.sent()])),{name:a,$metadata:Jn(e)}]),[3,15];case 8:return l=[{}],[4,En(n,t)];case 9:return o=i.apply(void 0,[i.apply(void 0,l.concat([s.sent()])),{name:a,$metadata:Jn(e)}]),[3,15];case 10:return d=[{}],[4,xn(n,t)];case 11:return o=i.apply(void 0,[i.apply(void 0,d.concat([s.sent()])),{name:a,$metadata:Jn(e)}]),[3,15];case 12:return h=[{}],[4,An(n,t)];case 13:return o=i.apply(void 0,[i.apply(void 0,h.concat([s.sent()])),{name:a,$metadata:Jn(e)}]),[3,15];case 14:p=n.body,a=p.code||p.Code||a,o=i(i({},p),{name:""+a,message:p.message||p.Message||a,$fault:"client",$metadata:Jn(e)}),s.label=15;case 15:return v=o.message||o.Message||a,o.message=v,delete o.Message,[2,Promise.reject(Object.assign(new Error(v),o))]}}))}))},yn=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n=e.body,r=Rn(n,t),[2,i({name:"DataAlreadyAcceptedException",$fault:"client",$metadata:Jn(e)},r)]}))}))},mn=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n=e.body,r=Un(n,t),[2,i({name:"InvalidParameterException",$fault:"client",$metadata:Jn(e)},r)]}))}))},bn=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n=e.body,r=zn(n,t),[2,i({name:"InvalidSequenceTokenException",$fault:"client",$metadata:Jn(e)},r)]}))}))},wn=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n=e.body,r=Fn(n,t),[2,i({name:"LimitExceededException",$fault:"client",$metadata:Jn(e)},r)]}))}))},_n=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n=e.body,r=Gn(n,t),[2,i({name:"OperationAbortedException",$fault:"client",$metadata:Jn(e)},r)]}))}))},Sn=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n=e.body,r=Kn(n,t),[2,i({name:"ResourceAlreadyExistsException",$fault:"client",$metadata:Jn(e)},r)]}))}))},En=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n=e.body,r=Vn(n,t),[2,i({name:"ResourceNotFoundException",$fault:"client",$metadata:Jn(e)},r)]}))}))},xn=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n=e.body,r=Yn(n,t),[2,i({name:"ServiceUnavailableException",$fault:"server",$metadata:Jn(e)},r)]}))}))},An=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n=e.body,r=Zn(n,t),[2,i({name:"UnrecognizedClientException",$fault:"client",$metadata:Jn(e)},r)]}))}))},kn=function(e,t){return i(i(i({},void 0!==e.kmsKeyId&&null!==e.kmsKeyId&&{kmsKeyId:e.kmsKeyId}),void 0!==e.logGroupName&&null!==e.logGroupName&&{logGroupName:e.logGroupName}),void 0!==e.tags&&null!==e.tags&&{tags:jn(e.tags,t)})},On=function(e,t){return i(i({},void 0!==e.logGroupName&&null!==e.logGroupName&&{logGroupName:e.logGroupName}),void 0!==e.logStreamName&&null!==e.logStreamName&&{logStreamName:e.logStreamName})},Pn=function(e,t){return i(i(i({},void 0!==e.limit&&null!==e.limit&&{limit:e.limit}),void 0!==e.logGroupNamePrefix&&null!==e.logGroupNamePrefix&&{logGroupNamePrefix:e.logGroupNamePrefix}),void 0!==e.nextToken&&null!==e.nextToken&&{nextToken:e.nextToken})},Ln=function(e,t){return i(i(i(i(i(i({},void 0!==e.descending&&null!==e.descending&&{descending:e.descending}),void 0!==e.limit&&null!==e.limit&&{limit:e.limit}),void 0!==e.logGroupName&&null!==e.logGroupName&&{logGroupName:e.logGroupName}),void 0!==e.logStreamNamePrefix&&null!==e.logStreamNamePrefix&&{logStreamNamePrefix:e.logStreamNamePrefix}),void 0!==e.nextToken&&null!==e.nextToken&&{nextToken:e.nextToken}),void 0!==e.orderBy&&null!==e.orderBy&&{orderBy:e.orderBy})},Tn=function(e,t){return i(i(i(i(i(i(i({},void 0!==e.endTime&&null!==e.endTime&&{endTime:e.endTime}),void 0!==e.limit&&null!==e.limit&&{limit:e.limit}),void 0!==e.logGroupName&&null!==e.logGroupName&&{logGroupName:e.logGroupName}),void 0!==e.logStreamName&&null!==e.logStreamName&&{logStreamName:e.logStreamName}),void 0!==e.nextToken&&null!==e.nextToken&&{nextToken:e.nextToken}),void 0!==e.startFromHead&&null!==e.startFromHead&&{startFromHead:e.startFromHead}),void 0!==e.startTime&&null!==e.startTime&&{startTime:e.startTime})},In=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return i(i({},void 0!==e.message&&null!==e.message&&{message:e.message}),void 0!==e.timestamp&&null!==e.timestamp&&{timestamp:e.timestamp})}(e)}))},Cn=function(e,t){return i(i(i(i({},void 0!==e.logEvents&&null!==e.logEvents&&{logEvents:In(e.logEvents)}),void 0!==e.logGroupName&&null!==e.logGroupName&&{logGroupName:e.logGroupName}),void 0!==e.logStreamName&&null!==e.logStreamName&&{logStreamName:e.logStreamName}),void 0!==e.sequenceToken&&null!==e.sequenceToken&&{sequenceToken:e.sequenceToken})},jn=function(e,t){return Object.entries(e).reduce((function(e,t){var n,r=c(t,2),o=r[0],a=r[1];return null===a?e:i(i({},e),((n={})[o]=a,n))}),{})},Rn=function(e,t){return{expectedSequenceToken:void 0!==e.expectedSequenceToken&&null!==e.expectedSequenceToken?e.expectedSequenceToken:void 0,message:void 0!==e.message&&null!==e.message?e.message:void 0}},Mn=function(e,t){return{logGroups:void 0!==e.logGroups&&null!==e.logGroups?Dn(e.logGroups,t):void 0,nextToken:void 0!==e.nextToken&&null!==e.nextToken?e.nextToken:void 0}},Nn=function(e,t){return{logStreams:void 0!==e.logStreams&&null!==e.logStreams?qn(e.logStreams,t):void 0,nextToken:void 0!==e.nextToken&&null!==e.nextToken?e.nextToken:void 0}},Bn=function(e,t){return{events:void 0!==e.events&&null!==e.events?Hn(e.events,t):void 0,nextBackwardToken:void 0!==e.nextBackwardToken&&null!==e.nextBackwardToken?e.nextBackwardToken:void 0,nextForwardToken:void 0!==e.nextForwardToken&&null!==e.nextForwardToken?e.nextForwardToken:void 0}},Un=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},zn=function(e,t){return{expectedSequenceToken:void 0!==e.expectedSequenceToken&&null!==e.expectedSequenceToken?e.expectedSequenceToken:void 0,message:void 0!==e.message&&null!==e.message?e.message:void 0}},Fn=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Dn=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{arn:void 0!==e.arn&&null!==e.arn?e.arn:void 0,creationTime:void 0!==e.creationTime&&null!==e.creationTime?e.creationTime:void 0,kmsKeyId:void 0!==e.kmsKeyId&&null!==e.kmsKeyId?e.kmsKeyId:void 0,logGroupName:void 0!==e.logGroupName&&null!==e.logGroupName?e.logGroupName:void 0,metricFilterCount:void 0!==e.metricFilterCount&&null!==e.metricFilterCount?e.metricFilterCount:void 0,retentionInDays:void 0!==e.retentionInDays&&null!==e.retentionInDays?e.retentionInDays:void 0,storedBytes:void 0!==e.storedBytes&&null!==e.storedBytes?e.storedBytes:void 0}}(e)}))},qn=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{arn:void 0!==e.arn&&null!==e.arn?e.arn:void 0,creationTime:void 0!==e.creationTime&&null!==e.creationTime?e.creationTime:void 0,firstEventTimestamp:void 0!==e.firstEventTimestamp&&null!==e.firstEventTimestamp?e.firstEventTimestamp:void 0,lastEventTimestamp:void 0!==e.lastEventTimestamp&&null!==e.lastEventTimestamp?e.lastEventTimestamp:void 0,lastIngestionTime:void 0!==e.lastIngestionTime&&null!==e.lastIngestionTime?e.lastIngestionTime:void 0,logStreamName:void 0!==e.logStreamName&&null!==e.logStreamName?e.logStreamName:void 0,storedBytes:void 0!==e.storedBytes&&null!==e.storedBytes?e.storedBytes:void 0,uploadSequenceToken:void 0!==e.uploadSequenceToken&&null!==e.uploadSequenceToken?e.uploadSequenceToken:void 0}}(e)}))},Gn=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Hn=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{ingestionTime:void 0!==e.ingestionTime&&null!==e.ingestionTime?e.ingestionTime:void 0,message:void 0!==e.message&&null!==e.message?e.message:void 0,timestamp:void 0!==e.timestamp&&null!==e.timestamp?e.timestamp:void 0}}(e)}))},Wn=function(e,t){return{nextSequenceToken:void 0!==e.nextSequenceToken&&null!==e.nextSequenceToken?e.nextSequenceToken:void 0,rejectedLogEventsInfo:void 0!==e.rejectedLogEventsInfo&&null!==e.rejectedLogEventsInfo?$n(e.rejectedLogEventsInfo,t):void 0}},$n=function(e,t){return{expiredLogEventEndIndex:void 0!==e.expiredLogEventEndIndex&&null!==e.expiredLogEventEndIndex?e.expiredLogEventEndIndex:void 0,tooNewLogEventStartIndex:void 0!==e.tooNewLogEventStartIndex&&null!==e.tooNewLogEventStartIndex?e.tooNewLogEventStartIndex:void 0,tooOldLogEventEndIndex:void 0!==e.tooOldLogEventEndIndex&&null!==e.tooOldLogEventEndIndex?e.tooOldLogEventEndIndex:void 0}},Kn=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Vn=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Yn=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Zn=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Jn=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},Xn=function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)},Qn=function(e,t,n,r,o){return a(void 0,void 0,void 0,(function(){var i,a,u,c,f,l;return s(this,(function(s){switch(s.label){case 0:return[4,e.endpoint()];case 1:return i=s.sent(),a=i.hostname,u=i.protocol,c=void 0===u?"https":u,f=i.port,l={protocol:c,hostname:a,port:f,method:"POST",path:n,headers:t},void 0!==r&&(l.hostname=r),void 0!==o&&(l.body=o),[2,new fn(l)]}}))}))},er=function(e,t){return function(e,t){return Xn(e,t).then((function(e){return t.utf8Encoder(e)}))}(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},tr=function(e,t){var n,r,o=function(e){var t=e;return t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=(n=e.headers,r="x-amzn-errortype",Object.keys(n).find((function(e){return e.toLowerCase()===r.toLowerCase()})));return void 0!==i?o(e.headers[i]):void 0!==t.code?o(t.code):void 0!==t.__type?o(t.__type):""};var nr=function(){return(nr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function rr(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function or(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var ir={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},ar={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function sr(e,t,n){return{applyToStack:function(r){r.add(function(e,t){return function(n,r){return function(r){return rr(void 0,void 0,void 0,(function(){var o,i;return or(this,(function(a){switch(a.label){case 0:return[4,n(r)];case 1:return o=a.sent().response,[4,t(o,e)];case 2:return i=a.sent(),[2,{response:o,output:i}]}}))}))}}}(e,n),ir),r.add(function(e,t){return function(n,r){return function(r){return rr(void 0,void 0,void 0,(function(){var o;return or(this,(function(i){switch(i.label){case 0:return[4,t(r.input,e)];case 1:return o=i.sent(),[2,n(nr(nr({},r),{request:o}))]}}))}))}}}(e,t),ar)}}}
|
|
106
|
+
/*! *****************************************************************************
|
|
107
|
+
Copyright (c) Microsoft Corporation.
|
|
108
|
+
|
|
109
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
110
|
+
purpose with or without fee is hereby granted.
|
|
111
|
+
|
|
112
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
113
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
114
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
115
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
116
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
117
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
118
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
119
|
+
***************************************************************************** */var ur=function(){return(ur=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function cr(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function fr(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function lr(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(fr(arguments[t]));return e}var dr=function(){var e=[],t=[],n=new Set,r=function(n){return e.forEach((function(e){n.add(e.middleware,ur({},e))})),t.forEach((function(e){n.addRelativeTo(e.middleware,ur({},e))})),n},o=function(e){var t=[];return e.before.forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,lr(o(e)))})),t.push(e),e.after.reverse().forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,lr(o(e)))})),t},i=function(){var n,r=[],i=[],a={};return e.forEach((function(e){var t=ur(ur({},e),{before:[],after:[]});t.name&&(a[t.name]=t),r.push(t)})),t.forEach((function(e){var t=ur(ur({},e),{before:[],after:[]});t.name&&(a[t.name]=t),i.push(t)})),i.forEach((function(e){if(e.toMiddleware){var t=a[e.toMiddleware];if(void 0===t)throw new Error(e.toMiddleware+" is not found when adding "+(e.name||"anonymous")+" middleware "+e.relation+" "+e.toMiddleware);"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}})),(n=r,n.sort((function(e,t){return hr[t.step]-hr[e.step]||pr[t.priority||"normal"]-pr[e.priority||"normal"]}))).map(o).reduce((function(e,t){return e.push.apply(e,lr(t)),e}),[]).map((function(e){return e.middleware}))},a={add:function(t,r){void 0===r&&(r={});var o=r.name,i=r.override,a=ur({step:"initialize",priority:"normal",middleware:t},r);if(o){if(n.has(o)){if(!i)throw new Error("Duplicate middleware name '"+o+"'");var s=e.findIndex((function(e){return e.name===o})),u=e[s];if(u.step!==a.step||u.priority!==a.priority)throw new Error('"'+o+'" middleware with '+u.priority+" priority in "+u.step+" step cannot be overridden by same-name middleware with "+a.priority+" priority in "+a.step+" step.");e.splice(s,1)}n.add(o)}e.push(a)},addRelativeTo:function(e,r){var o=r.name,i=r.override,a=ur({middleware:e},r);if(o){if(n.has(o)){if(!i)throw new Error("Duplicate middleware name '"+o+"'");var s=t.findIndex((function(e){return e.name===o})),u=t[s];if(u.toMiddleware!==a.toMiddleware||u.relation!==a.relation)throw new Error('"'+o+'" middleware '+u.relation+' "'+u.toMiddleware+'" middleware cannot be overridden by same-name middleware '+a.relation+' "'+a.toMiddleware+'" middleware.');t.splice(s,1)}n.add(o)}t.push(a)},clone:function(){return r(dr())},use:function(e){e.applyToStack(a)},remove:function(r){return"string"==typeof r?function(r){var o=!1,i=function(e){return!e.name||e.name!==r||(o=!0,n.delete(r),!1)};return e=e.filter(i),t=t.filter(i),o}(r):function(r){var o=!1,i=function(e){return e.middleware!==r||(o=!0,e.name&&n.delete(e.name),!1)};return e=e.filter(i),t=t.filter(i),o}(r)},removeByTag:function(r){var o=!1,i=function(e){var t=e.tags,i=e.name;return!t||!t.includes(r)||(i&&n.delete(i),o=!0,!1)};return e=e.filter(i),t=t.filter(i),o},concat:function(e){var t=r(dr());return t.use(e),t},applyToStack:r,resolve:function(e,t){var n,r;try{for(var o=cr(i().reverse()),a=o.next();!a.done;a=o.next()){e=(0,a.value)(e,t)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return e}};return a},hr={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},pr={high:3,normal:2,low:1},vr=function(){function e(e){this.middlewareStack=dr(),this.config=e}return e.prototype.send=function(e,t,n){var r="function"!=typeof t?t:void 0,o="function"==typeof t?t:n,i=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!o)return i(e).then((function(e){return e.output}));i(e).then((function(e){return o(null,e.output)}),(function(e){return o(e)})).catch((function(){}))},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),gr=function(){this.middlewareStack=dr()};var yr=function(e,t){return(yr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function mr(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function br(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(mr(arguments[t]));return e}var wr=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,br([null],arguments)),n=new t;return Object.setPrototypeOf(n,e.prototype),n};wr.prototype=Object.create(String.prototype,{constructor:{value:wr,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(wr,String);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}(function(e,t){function n(){this.constructor=e}yr(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)})(t,e),t.prototype.deserializeJSON=function(){return JSON.parse(e.prototype.toString.call(this))},t.prototype.toJSON=function(){return e.prototype.toString.call(this)},t.fromObject=function(e){return e instanceof t?e:new t(e instanceof String||"string"==typeof e?e:JSON.stringify(e))}}(wr);var _r=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return o(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(sr(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"CloudWatchLogsClient",commandName:"CreateLogGroupCommand",inputFilterSensitiveLog:se.filterSensitiveLog,outputFilterSensitiveLog:function(e){return e}},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n={"content-type":"application/x-amz-json-1.1","x-amz-target":"Logs_20140328.CreateLogGroup"},r=JSON.stringify(kn(e,t)),[2,Qn(t,n,"/",void 0,r)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return e.statusCode>=300?[2,ln(e,t)]:[4,Xn(e.body,t)];case 1:return r.sent(),n={$metadata:Jn(e)},[2,Promise.resolve(n)]}}))}))}(e,t)},t}(gr),Sr=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return o(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(sr(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"CloudWatchLogsClient",commandName:"DescribeLogGroupsCommand",inputFilterSensitiveLog:Pe.filterSensitiveLog,outputFilterSensitiveLog:Te.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n={"content-type":"application/x-amz-json-1.1","x-amz-target":"Logs_20140328.DescribeLogGroups"},r=JSON.stringify(Pn(e,t)),[2,Qn(t,n,"/",void 0,r)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,o;return s(this,(function(a){switch(a.label){case 0:return e.statusCode>=300?[2,hn(e,t)]:[4,er(e.body,t)];case 1:return n=a.sent(),{},r=Mn(n,t),o=i({$metadata:Jn(e)},r),[2,Promise.resolve(o)]}}))}))}(e,t)},t}(gr),Er=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return o(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(sr(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"CloudWatchLogsClient",commandName:"CreateLogStreamCommand",inputFilterSensitiveLog:ue.filterSensitiveLog,outputFilterSensitiveLog:function(e){return e}},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n={"content-type":"application/x-amz-json-1.1","x-amz-target":"Logs_20140328.CreateLogStream"},r=JSON.stringify(On(e,t)),[2,Qn(t,n,"/",void 0,r)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return e.statusCode>=300?[2,dn(e,t)]:[4,Xn(e.body,t)];case 1:return r.sent(),n={$metadata:Jn(e)},[2,Promise.resolve(n)]}}))}))}(e,t)},t}(gr),xr=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return o(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(sr(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"CloudWatchLogsClient",commandName:"DescribeLogStreamsCommand",inputFilterSensitiveLog:Ce.filterSensitiveLog,outputFilterSensitiveLog:Re.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n={"content-type":"application/x-amz-json-1.1","x-amz-target":"Logs_20140328.DescribeLogStreams"},r=JSON.stringify(Ln(e,t)),[2,Qn(t,n,"/",void 0,r)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,o;return s(this,(function(a){switch(a.label){case 0:return e.statusCode>=300?[2,pn(e,t)]:[4,er(e.body,t)];case 1:return n=a.sent(),{},r=Nn(n,t),o=i({$metadata:Jn(e)},r),[2,Promise.resolve(o)]}}))}))}(e,t)},t}(gr),Ar=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return o(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(sr(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"CloudWatchLogsClient",commandName:"GetLogEventsCommand",inputFilterSensitiveLog:ot.filterSensitiveLog,outputFilterSensitiveLog:at.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n={"content-type":"application/x-amz-json-1.1","x-amz-target":"Logs_20140328.GetLogEvents"},r=JSON.stringify(Tn(e,t)),[2,Qn(t,n,"/",void 0,r)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,o;return s(this,(function(a){switch(a.label){case 0:return e.statusCode>=300?[2,vn(e,t)]:[4,er(e.body,t)];case 1:return n=a.sent(),{},r=Bn(n,t),o=i({$metadata:Jn(e)},r),[2,Promise.resolve(o)]}}))}))}(e,t)},t}(gr),kr=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return o(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(sr(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"CloudWatchLogsClient",commandName:"PutLogEventsCommand",inputFilterSensitiveLog:Et.filterSensitiveLog,outputFilterSensitiveLog:At.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n={"content-type":"application/x-amz-json-1.1","x-amz-target":"Logs_20140328.PutLogEvents"},r=JSON.stringify(Cn(e,t)),[2,Qn(t,n,"/",void 0,r)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,o;return s(this,(function(a){switch(a.label){case 0:return e.statusCode>=300?[2,gn(e,t)]:[4,er(e.body,t)];case 1:return n=a.sent(),{},r=Wn(n,t),o=i({$metadata:Jn(e)},r),[2,Promise.resolve(o)]}}))}))}(e,t)},t}(gr),Or=n(23),Pr=n(4);function Lr(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function Tr(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function Ir(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Cr(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var jr=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,Rr)},Rr=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};for(var Mr=function(){function e(e){var t=(void 0===e?{}:e).requestTimeout;this.requestTimeout=t}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var n=(void 0===t?{}:t).abortSignal,r=this.requestTimeout;if(null==n?void 0:n.aborted){var o=new Error("Request aborted");return o.name="AbortError",Promise.reject(o)}var i=e.path;if(e.query){var a=function(e){var t,n,r=[];try{for(var o=Cr(Object.keys(e).sort()),i=o.next();!i.done;i=o.next()){var a=i.value,s=e[a];if(a=jr(a),Array.isArray(s))for(var u=0,c=s.length;u<c;u++)r.push(a+"="+jr(s[u]));else{var f=a;(s||"string"==typeof s)&&(f+="="+jr(s)),r.push(f)}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r.join("&")}(e.query);a&&(i+="?"+a)}var s=e.port,u=e.method,c=e.protocol+"//"+e.hostname+(s?":"+s:"")+i,f={body:"GET"===u||"HEAD"===u?void 0:e.body,headers:new Headers(e.headers),method:u};"undefined"!=typeof AbortController&&(f.signal=n);var l,d=new Request(c,f),h=[fetch(d).then((function(e){var t,n,r=e.headers,o={};try{for(var i=Ir(r.entries()),a=i.next();!a.done;a=i.next()){var s=a.value;o[s[0]]=s[1]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new sn({headers:o,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new sn({headers:o,statusCode:e.status,body:t})}}))})),(l=r,void 0===l&&(l=0),new Promise((function(e,t){l&&setTimeout((function(){var e=new Error("Request did not complete within "+l+" ms");e.name="TimeoutError",t(e)}),l)})))];return n&&h.push(new Promise((function(e,t){n.onabort=function(){var e=new Error("Request aborted");e.name="AbortError",t(e)}}))),Promise.race(h)},e}(),Nr={},Br=new Array(64),Ur=0,zr="A".charCodeAt(0),Fr="Z".charCodeAt(0);Ur+zr<=Fr;Ur++){var Dr=String.fromCharCode(Ur+zr);Nr[Dr]=Ur,Br[Ur]=Dr}for(Ur=0,zr="a".charCodeAt(0),Fr="z".charCodeAt(0);Ur+zr<=Fr;Ur++){Dr=String.fromCharCode(Ur+zr);var qr=Ur+26;Nr[Dr]=qr,Br[qr]=Dr}for(Ur=0;Ur<10;Ur++){Nr[Ur.toString(10)]=Ur+52;Dr=Ur.toString(10),qr=Ur+52;Nr[Dr]=qr,Br[qr]=Dr}Nr["+"]=62,Br[62]="+",Nr["/"]=63,Br[63]="/";function Gr(e){var t=e.length/4*3;"=="===e.substr(-2)?t-=2:"="===e.substr(-1)&&t--;for(var n=new ArrayBuffer(t),r=new DataView(n),o=0;o<e.length;o+=4){for(var i=0,a=0,s=o,u=o+3;s<=u;s++)"="!==e[s]?(i|=Nr[e[s]]<<6*(u-s),a+=6):i>>=6;var c=o/4*3;i>>=a%8;for(var f=Math.floor(a/8),l=0;l<f;l++){var d=8*(f-l-1);r.setUint8(c+l,(i&255<<d)>>d)}}return new Uint8Array(n)}function Hr(e){for(var t="",n=0;n<e.length;n+=3){for(var r=0,o=0,i=n,a=Math.min(n+3,e.length);i<a;i++)r|=e[i]<<8*(a-i-1),o+=8;var s=Math.ceil(o/6);r<<=6*s-o;for(var u=1;u<=s;u++){var c=6*(s-u);t+=Br[(r&63<<c)>>c]}t+="==".slice(0,4-s)}return t}var Wr=function(e){return"function"==typeof Blob&&e instanceof Blob?function(e){return Lr(this,void 0,void 0,(function(){var t,n;return Tr(this,(function(r){switch(r.label){case 0:return[4,$r(e)];case 1:return t=r.sent(),n=Gr(t),[2,new Uint8Array(n)]}}))}))}(e):function(e){return Lr(this,void 0,void 0,(function(){var t,n,r,o,i,a,s;return Tr(this,(function(u){switch(u.label){case 0:t=new Uint8Array(0),n=e.getReader(),r=!1,u.label=1;case 1:return r?[3,3]:[4,n.read()];case 2:return o=u.sent(),i=o.done,(a=o.value)&&(s=t,(t=new Uint8Array(s.length+a.length)).set(s),t.set(a,s.length)),r=i,[3,1];case 3:return[2,t]}}))}))}(e)};function $r(e){return new Promise((function(t,n){var r=new FileReader;r.onloadend=function(){var e;if(2!==r.readyState)return n(new Error("Reader aborted too early"));var o=null!==(e=r.result)&&void 0!==e?e:"",i=o.indexOf(","),a=i>-1?i+1:o.length;t(o.substring(a))},r.onabort=function(){return n(new Error("Read aborted"))},r.onerror=function(){return n(r.error)},r.readAsDataURL(e)}))}var Kr=function(e){return function(){return Promise.reject(e)}};var Vr=function(){return(Vr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function Yr(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function Zr(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function Jr(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var Xr=function(e){return function(t,n){return function(r){return Yr(void 0,void 0,void 0,(function(){var o;return Zr(this,(function(i){return(null===(o=null==e?void 0:e.retryStrategy)||void 0===o?void 0:o.mode)&&(n.userAgent=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Jr(arguments[t]));return e}(n.userAgent||[],[["cfg/retry-mode",e.retryStrategy.mode]])),[2,e.retryStrategy.retry(t,r)]}))}))}}},Qr={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},eo=function(e){return{applyToStack:function(t){t.add(Xr(e),Qr)}}},to=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],no=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],ro=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],oo=[500,502,503,504],io=function(e){var t,n;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||no.includes(e.name)||1==(null===(n=e.$retryable)||void 0===n?void 0:n.throttling)},ao=n(21),so=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},uo=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return to.includes(e.name)}(e)||io(e)||function(e){var t;return ro.includes(e.name)||oo.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},co=function(){function e(e,t){var n,r,o,i,a,s,u,c;this.maxAttemptsProvider=e,this.mode="standard",this.retryDecider=null!==(n=null==t?void 0:t.retryDecider)&&void 0!==n?n:uo,this.delayDecider=null!==(r=null==t?void 0:t.delayDecider)&&void 0!==r?r:so,this.retryQuota=null!==(o=null==t?void 0:t.retryQuota)&&void 0!==o?o:(a=i=500,s=i,u=function(e){return"TimeoutError"===e.name?10:5},c=function(e){return u(e)<=s},Object.freeze({hasRetryTokens:c,retrieveRetryTokens:function(e){if(!c(e))throw new Error("No retry token available");var t=u(e);return s-=t,t},releaseRetryTokens:function(e){s+=null!=e?e:1,s=Math.min(s,a)}}))}return e.prototype.shouldRetry=function(e,t,n){return t<n&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return Yr(this,void 0,void 0,(function(){var e;return Zr(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.maxAttemptsProvider()];case 1:return e=t.sent(),[3,3];case 2:return t.sent(),e=3,[3,3];case 3:return[2,e]}}))}))},e.prototype.retry=function(e,t){return Yr(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,c;return Zr(this,(function(f){switch(f.label){case 0:return r=0,o=0,[4,this.getMaxAttempts()];case 1:i=f.sent(),a=t.request,fn.isInstance(a)&&(a.headers["amz-sdk-invocation-id"]=Object(ao.v4)()),s=function(){var s,c,f,l,d;return Zr(this,(function(h){switch(h.label){case 0:return h.trys.push([0,2,,5]),fn.isInstance(a)&&(a.headers["amz-sdk-request"]="attempt="+(r+1)+"; max="+i),[4,e(t)];case 1:return s=h.sent(),c=s.response,f=s.output,u.retryQuota.releaseRetryTokens(n),f.$metadata.attempts=r+1,f.$metadata.totalRetryDelay=o,[2,{value:{response:c,output:f}}];case 2:return l=h.sent(),r++,u.shouldRetry(l,r,i)?(n=u.retryQuota.retrieveRetryTokens(l),d=u.delayDecider(io(l)?500:100,r),o+=d,[4,new Promise((function(e){return setTimeout(e,d)}))]):[3,4];case 3:return h.sent(),[2,"continue"];case 4:throw l.$metadata||(l.$metadata={}),l.$metadata.attempts=r,l.$metadata.totalRetryDelay=o,l;case 5:return[2]}}))},u=this,f.label=2;case 2:return[5,s()];case 3:return"object"==typeof(c=f.sent())?[2,c.value]:[3,2];case 4:return[2]}}))}))},e}(),fo=function(e){var t=lo(e.maxAttempts);return Vr(Vr({},e),{maxAttempts:t,retryStrategy:e.retryStrategy||new co(t)})},lo=function(e){if(void 0===e&&(e=3),"number"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function ho(e){if("string"==typeof e){for(var t=e.length,n=t-1;n>=0;n--){var r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2)}return t}return"number"==typeof e.byteLength?e.byteLength:"number"==typeof e.size?e.size:void 0}
|
|
120
|
+
/*! *****************************************************************************
|
|
121
|
+
Copyright (c) Microsoft Corporation.
|
|
122
|
+
|
|
123
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
124
|
+
purpose with or without fee is hereby granted.
|
|
125
|
+
|
|
126
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
127
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
128
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
129
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
130
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
131
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
132
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
133
|
+
***************************************************************************** */function po(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function vo(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var go=n(22),yo=n.n(go),mo=function(e){var t=e.serviceId,n=e.clientVersion;return function(){return po(void 0,void 0,void 0,(function(){var e,r,o,i,a,s,u,c,f;return vo(this,(function(l){return e=(null===(o=null===window||void 0===window?void 0:window.navigator)||void 0===o?void 0:o.userAgent)?yo.a.parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",n],["os/"+((null===(i=null==e?void 0:e.os)||void 0===i?void 0:i.name)||"other"),null===(a=null==e?void 0:e.os)||void 0===a?void 0:a.version],["lang/js"],["md/browser",(null!==(u=null===(s=null==e?void 0:e.browser)||void 0===s?void 0:s.name)&&void 0!==u?u:"unknown")+"_"+(null!==(f=null===(c=null==e?void 0:e.browser)||void 0===c?void 0:c.version)&&void 0!==f?f:"unknown")]],t&&r.push(["api/"+t,n]),[2,r]}))}))}};var bo=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},wo=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)},_o=new Set(["af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-south-1","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-north-1","eu-south-1","eu-west-1","eu-west-2","eu-west-3","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"]),So=new Set(["cn-north-1","cn-northwest-1"]),Eo=new Set(["us-iso-east-1"]),xo=new Set(["us-isob-east-1"]),Ao=new Set(["us-gov-east-1","us-gov-west-1"]);function ko(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Oo(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var Po=function(e){var t,n=new URL(e),r=n.hostname,o=n.pathname,i=n.port,a=n.protocol,s=n.search;return s&&(t=function(e){var t,n,r={};if(e=e.replace(/^\?/,""))try{for(var o=ko(e.split("&")),i=o.next();!i.done;i=o.next()){var a=Oo(i.value.split("="),2),s=a[0],u=a[1],c=void 0===u?null:u;s=decodeURIComponent(s),c&&(c=decodeURIComponent(c)),s in r?Array.isArray(r[s])?r[s].push(c):r[s]=[r[s],c]:r[s]=c}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(s)),{hostname:r,port:i?parseInt(i):void 0,protocol:a,path:o,query:t}},Lo={apiVersion:"2014-03-28",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var n=void 0;switch(e){case"af-south-1":n={hostname:"logs.af-south-1.amazonaws.com",partition:"aws"};break;case"ap-east-1":n={hostname:"logs.ap-east-1.amazonaws.com",partition:"aws"};break;case"ap-northeast-1":n={hostname:"logs.ap-northeast-1.amazonaws.com",partition:"aws"};break;case"ap-northeast-2":n={hostname:"logs.ap-northeast-2.amazonaws.com",partition:"aws"};break;case"ap-south-1":n={hostname:"logs.ap-south-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-1":n={hostname:"logs.ap-southeast-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-2":n={hostname:"logs.ap-southeast-2.amazonaws.com",partition:"aws"};break;case"ca-central-1":n={hostname:"logs.ca-central-1.amazonaws.com",partition:"aws"};break;case"cn-north-1":n={hostname:"logs.cn-north-1.amazonaws.com.cn",partition:"aws-cn"};break;case"cn-northwest-1":n={hostname:"logs.cn-northwest-1.amazonaws.com.cn",partition:"aws-cn"};break;case"eu-central-1":n={hostname:"logs.eu-central-1.amazonaws.com",partition:"aws"};break;case"eu-north-1":n={hostname:"logs.eu-north-1.amazonaws.com",partition:"aws"};break;case"eu-south-1":n={hostname:"logs.eu-south-1.amazonaws.com",partition:"aws"};break;case"eu-west-1":n={hostname:"logs.eu-west-1.amazonaws.com",partition:"aws"};break;case"eu-west-2":n={hostname:"logs.eu-west-2.amazonaws.com",partition:"aws"};break;case"eu-west-3":n={hostname:"logs.eu-west-3.amazonaws.com",partition:"aws"};break;case"fips-us-east-1":n={hostname:"logs-fips.us-east-1.amazonaws.com",partition:"aws",signingRegion:"us-east-1"};break;case"fips-us-east-2":n={hostname:"logs-fips.us-east-2.amazonaws.com",partition:"aws",signingRegion:"us-east-2"};break;case"fips-us-west-1":n={hostname:"logs-fips.us-west-1.amazonaws.com",partition:"aws",signingRegion:"us-west-1"};break;case"fips-us-west-2":n={hostname:"logs-fips.us-west-2.amazonaws.com",partition:"aws",signingRegion:"us-west-2"};break;case"me-south-1":n={hostname:"logs.me-south-1.amazonaws.com",partition:"aws"};break;case"sa-east-1":n={hostname:"logs.sa-east-1.amazonaws.com",partition:"aws"};break;case"us-east-1":n={hostname:"logs.us-east-1.amazonaws.com",partition:"aws"};break;case"us-east-2":n={hostname:"logs.us-east-2.amazonaws.com",partition:"aws"};break;case"us-gov-east-1":n={hostname:"logs.us-gov-east-1.amazonaws.com",partition:"aws-us-gov",signingRegion:"us-gov-east-1"};break;case"us-gov-west-1":n={hostname:"logs.us-gov-west-1.amazonaws.com",partition:"aws-us-gov",signingRegion:"us-gov-west-1"};break;case"us-iso-east-1":n={hostname:"logs.us-iso-east-1.c2s.ic.gov",partition:"aws-iso"};break;case"us-isob-east-1":n={hostname:"logs.us-isob-east-1.sc2s.sgov.gov",partition:"aws-iso-b"};break;case"us-west-1":n={hostname:"logs.us-west-1.amazonaws.com",partition:"aws"};break;case"us-west-2":n={hostname:"logs.us-west-2.amazonaws.com",partition:"aws"};break;default:_o.has(e)&&(n={hostname:"logs.{region}.amazonaws.com".replace("{region}",e),partition:"aws"}),So.has(e)&&(n={hostname:"logs.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),Eo.has(e)&&(n={hostname:"logs.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),xo.has(e)&&(n={hostname:"logs.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),Ao.has(e)&&(n={hostname:"logs.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov"}),void 0===n&&(n={hostname:"logs.{region}.amazonaws.com".replace("{region}",e),partition:"aws"})}return Promise.resolve(i({signingService:"logs"},n))},serviceId:"CloudWatch Logs",urlParser:Po},To=i(i({},Lo),{runtime:"browser",base64Decoder:Gr,base64Encoder:Hr,bodyLengthChecker:ho,credentialDefaultProvider:function(e){return function(){return Promise.reject(new Error("Credential is missing"))}},defaultUserAgentProvider:mo({serviceId:Lo.serviceId,clientVersion:Or.version}),maxAttempts:3,region:Kr("Region is missing"),requestHandler:new Mr,sha256:Pr.Sha256,streamCollector:Wr,utf8Decoder:bo,utf8Encoder:wo});var Io=function(){return(Io=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function Co(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function jo(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var Ro=function(e){var t;return Io(Io({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:e.endpoint?Mo(e):function(){return No(e)},isCustomEndpoint:!!e.endpoint})},Mo=function(e){var t=e.endpoint,n=e.urlParser;if("string"==typeof t){var r=Promise.resolve(n(t));return function(){return r}}if("object"==typeof t){var o=Promise.resolve(t);return function(){return o}}return t},No=function(e){return Co(void 0,void 0,void 0,(function(){var t,n,r,o,i;return jo(this,(function(a){switch(a.label){case 0:return t=e.tls,n=void 0===t||t,[4,e.region()];case 1:if(r=a.sent(),!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(r))throw new Error("Invalid region in client config");return[4,e.regionInfoProvider(r)];case 2:if(!(o=(null!==(i=a.sent())&&void 0!==i?i:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser((n?"https:":"http:")+"//"+o)]}}))}))},Bo=function(e){if(!e.region)throw new Error("Region is missing");return Io(Io({},e),{region:Uo(e.region)})},Uo=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var zo=function(){return(zo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function Fo(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function Do(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var qo={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Go=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(n){return function(r){return Fo(t,void 0,void 0,(function(){var t,o,i,a,s;return Do(this,(function(u){return t=r.request,fn.isInstance(t)&&(o=t.body,i=t.headers,o&&-1===Object.keys(i).map((function(e){return e.toLowerCase()})).indexOf("content-length")&&void 0!==(a=e(o))&&(t.headers=zo(zo({},t.headers),((s={})["content-length"]=String(a),s)))),[2,n(zo(zo({},r),{request:t}))]}))}))}}}(e.bodyLengthChecker),qo)}}};function Ho(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function Wo(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var $o={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Ko=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(n){return Ho(void 0,void 0,void 0,(function(){var r,o;return Wo(this,(function(i){return fn.isInstance(n.request)?(r=n.request,o=(e.requestHandler.metadata||{}).handlerProtocol,(void 0===o?"":o).indexOf("h2")>=0&&!r.headers[":authority"]?(delete r.headers.host,r.headers[":authority"]=""):r.headers.host||(r.headers.host=r.hostname),[2,t(n)]):[2,t(n)]}))}))}}}(e),$o)}}};function Vo(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function Yo(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var Zo=function(){return function(e,t){return function(n){return Vo(void 0,void 0,void 0,(function(){var r,o,i,a,s,u,c,f,l;return Yo(this,(function(d){switch(d.label){case 0:return r=t.clientName,o=t.commandName,i=t.inputFilterSensitiveLog,a=t.logger,s=t.outputFilterSensitiveLog,[4,e(n)];case 1:return u=d.sent(),a?("function"==typeof a.info&&(c=u.output,f=c.$metadata,l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(c,["$metadata"]),a.info({clientName:r,commandName:o,input:i(n.input),output:s(l),metadata:f})),[2,u]):[2,u]}}))}))}}},Jo={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Xo=function(e){return{applyToStack:function(e){e.add(Zo(),Jo)}}};var Qo=function(){return(Qo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function ei(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function ti(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function ni(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ri(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var oi="X-Amz-Date".toLowerCase(),ii=["authorization",oi,"date"],ai="X-Amz-Signature".toLowerCase(),si="X-Amz-Security-Token".toLowerCase(),ui={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},ci=/^proxy-/,fi=/^sec-/,li="AWS4-HMAC-SHA256-PAYLOAD",di={},hi=[];function pi(e,t,n){return e+"/"+t+"/"+n+"/aws4_request"}function vi(e,t,n){var r=new e(t);return r.update(n),r.digest()}function gi(e,t,n){var r,o,i=e.headers,a={};try{for(var s=ni(Object.keys(i).sort()),u=s.next();!u.done;u=s.next()){var c=u.value,f=c.toLowerCase();(f in ui||(null==t?void 0:t.has(f))||ci.test(f)||fi.test(f))&&(!n||n&&!n.has(f))||(a[f]=i[c].trim().replace(/\s+/g," "))}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return a}var yi=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,mi)},mi=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};function bi(e,t){var n=e.headers,r=e.body;return ei(this,void 0,void 0,(function(){var e,o,i,a,s,u,c;return ti(this,(function(f){switch(f.label){case 0:try{for(e=ni(Object.keys(n)),o=e.next();!o.done;o=e.next())if("x-amz-content-sha256"===(i=o.value).toLowerCase())return[2,n[i]]}catch(e){u={error:e}}finally{try{o&&!o.done&&(c=e.return)&&c.call(e)}finally{if(u)throw u.error}}return null!=r?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"==typeof r||ArrayBuffer.isView(r)||(l=r,"function"==typeof ArrayBuffer&&l instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(l))?((a=new t).update(r),s=$,[4,a.digest()]):[3,3];case 2:return[2,s.apply(void 0,[f.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var l}))}))}function wi(e){var t=e.headers,n=e.query,r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["headers","query"]);return Qo(Qo({},r),{headers:Qo({},t),query:n?_i(n):void 0})}function _i(e){return Object.keys(e).reduce((function(t,n){var r,o=e[n];return Qo(Qo({},t),((r={})[n]=Array.isArray(o)?function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(ri(arguments[t]));return e}(o):o,r))}),{})}function Si(e){var t,n;e="function"==typeof e.clone?e.clone():wi(e);try{for(var r=ni(Object.keys(e.headers)),o=r.next();!o.done;o=r.next()){var i=o.value;ii.indexOf(i.toLowerCase())>-1&&delete e.headers[i]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return e}function Ei(e){return function(e){if("number"==typeof e)return new Date(1e3*e);if("string"==typeof e)return Number(e)?new Date(1e3*Number(e)):new Date(e);return e}(e).toISOString().replace(/\.\d{3}Z$/,"Z")}var xi=function(){function e(e){var t=e.applyChecksum,n=e.credentials,r=e.region,o=e.service,i=e.sha256,a=e.uriEscapePath,s=void 0===a||a;this.service=o,this.sha256=i,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=Oi(r),this.credentialProvider=Pi(n)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),ei(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,c,f,l,d,h,p,v,g,y,m,b,w,_,S,E,x,A;return ti(this,(function(k){switch(k.label){case 0:return n=t.signingDate,r=void 0===n?new Date:n,o=t.expiresIn,i=void 0===o?3600:o,a=t.unsignableHeaders,s=t.unhoistableHeaders,u=t.signableHeaders,c=t.signingRegion,f=t.signingService,[4,this.credentialProvider()];case 1:return l=k.sent(),null==c?[3,2]:(h=c,[3,4]);case 2:return[4,this.regionProvider()];case 3:h=k.sent(),k.label=4;case 4:return d=h,p=Ai(r),v=p.longDate,g=p.shortDate,i>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(y=pi(g,d,null!=f?f:this.service),m=function(e,t){var n,r,o;void 0===t&&(t={});var i="function"==typeof e.clone?e.clone():wi(e),a=i.headers,s=i.query,u=void 0===s?{}:s;try{for(var c=ni(Object.keys(a)),f=c.next();!f.done;f=c.next()){var l=f.value,d=l.toLowerCase();"x-amz-"!==d.substr(0,6)||(null===(o=t.unhoistableHeaders)||void 0===o?void 0:o.has(d))||(u[l]=a[l],delete a[l])}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return Qo(Qo({},e),{headers:a,query:u})}(Si(e),{unhoistableHeaders:s}),l.sessionToken&&(m.query["X-Amz-Security-Token"]=l.sessionToken),m.query["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",m.query["X-Amz-Credential"]=l.accessKeyId+"/"+y,m.query["X-Amz-Date"]=v,m.query["X-Amz-Expires"]=i.toString(10),b=gi(m,a,u),m.query["X-Amz-SignedHeaders"]=ki(b),w=m.query,_="X-Amz-Signature",S=this.getSignature,E=[v,y,this.getSigningKey(l,d,g,f)],x=this.createCanonicalRequest,A=[m,b],[4,bi(e,this.sha256)]);case 5:return[4,S.apply(this,E.concat([x.apply(this,A.concat([k.sent()]))]))];case 6:return w[_]=k.sent(),[2,m]}}))}))},e.prototype.sign=function(e,t){return ei(this,void 0,void 0,(function(){return ti(this,(function(n){return"string"==typeof e?[2,this.signString(e,t)]:e.headers&&e.payload?[2,this.signEvent(e,t)]:[2,this.signRequest(e,t)]}))}))},e.prototype.signEvent=function(e,t){var n=e.headers,r=e.payload,o=t.signingDate,i=void 0===o?new Date:o,a=t.priorSignature,s=t.signingRegion,u=t.signingService;return ei(this,void 0,void 0,(function(){var e,t,o,c,f,l,d,h,p,v,g;return ti(this,(function(y){switch(y.label){case 0:return null==s?[3,1]:(t=s,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=y.sent(),y.label=3;case 3:return e=t,o=Ai(i),c=o.shortDate,f=o.longDate,l=pi(c,e,null!=u?u:this.service),[4,bi({headers:{},body:r},this.sha256)];case 4:return d=y.sent(),(h=new this.sha256).update(n),v=$,[4,h.digest()];case 5:return p=v.apply(void 0,[y.sent()]),g=[li,f,l,a,p,d].join("\n"),[2,this.signString(g,{signingDate:i,signingRegion:e,signingService:u})]}}))}))},e.prototype.signString=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signingRegion,a=n.signingService;return ei(this,void 0,void 0,(function(){var t,n,r,s,u,c,f,l;return ti(this,(function(d){switch(d.label){case 0:return[4,this.credentialProvider()];case 1:return t=d.sent(),null==i?[3,2]:(r=i,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=d.sent(),d.label=4;case 4:return n=r,s=Ai(o).shortDate,f=(c=this.sha256).bind,[4,this.getSigningKey(t,n,s,a)];case 5:return(u=new(f.apply(c,[void 0,d.sent()]))).update(e),l=$,[4,u.digest()];case 6:return[2,l.apply(void 0,[d.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signableHeaders,a=n.unsignableHeaders,s=n.signingRegion,u=n.signingService;return ei(this,void 0,void 0,(function(){var t,n,r,c,f,l,d,h,p,v,g;return ti(this,(function(y){switch(y.label){case 0:return[4,this.credentialProvider()];case 1:return t=y.sent(),null==s?[3,2]:(r=s,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=y.sent(),y.label=4;case 4:return n=r,c=Si(e),f=Ai(o),l=f.longDate,d=f.shortDate,h=pi(d,n,null!=u?u:this.service),c.headers[oi]=l,t.sessionToken&&(c.headers[si]=t.sessionToken),[4,bi(c,this.sha256)];case 5:return p=y.sent(),!function(e,t){var n,r;e=e.toLowerCase();try{for(var o=ni(Object.keys(t)),i=o.next();!i.done;i=o.next()){if(e===i.value.toLowerCase())return!0}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}("x-amz-content-sha256",c.headers)&&this.applyChecksum&&(c.headers["x-amz-content-sha256"]=p),v=gi(c,a,i),[4,this.getSignature(l,h,this.getSigningKey(t,n,d,u),this.createCanonicalRequest(c,v,p))];case 6:return g=y.sent(),c.headers.authorization="AWS4-HMAC-SHA256 Credential="+t.accessKeyId+"/"+h+", SignedHeaders="+ki(v)+", Signature="+g,[2,c]}}))}))},e.prototype.createCanonicalRequest=function(e,t,n){var r=Object.keys(t).sort();return e.method+"\n"+this.getCanonicalPath(e)+"\n"+function(e){var t,n,r=e.query,o=void 0===r?{}:r,i=[],a={},s=function(e){if(e.toLowerCase()===ai)return"continue";i.push(e);var t=o[e];"string"==typeof t?a[e]=yi(e)+"="+yi(t):Array.isArray(t)&&(a[e]=t.slice(0).sort().reduce((function(t,n){return t.concat([yi(e)+"="+yi(n)])}),[]).join("&"))};try{for(var u=ni(Object.keys(o).sort()),c=u.next();!c.done;c=u.next()){s(c.value)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return i.map((function(e){return a[e]})).filter((function(e){return e})).join("&")}(e)+"\n"+r.map((function(e){return e+":"+t[e]})).join("\n")+"\n\n"+r.join(";")+"\n"+n},e.prototype.createStringToSign=function(e,t,n){return ei(this,void 0,void 0,(function(){var r,o;return ti(this,(function(i){switch(i.label){case 0:return(r=new this.sha256).update(n),[4,r.digest()];case 1:return o=i.sent(),[2,"AWS4-HMAC-SHA256\n"+e+"\n"+t+"\n"+$(o)]}}))}))},e.prototype.getCanonicalPath=function(e){var t=e.path;return this.uriEscapePath?"/"+encodeURIComponent(t.replace(/^\//,"")).replace(/%2F/g,"/"):t},e.prototype.getSignature=function(e,t,n,r){return ei(this,void 0,void 0,(function(){var o,i,a,s,u;return ti(this,(function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,r)];case 1:return o=c.sent(),s=(a=this.sha256).bind,[4,n];case 2:return(i=new(s.apply(a,[void 0,c.sent()]))).update(o),u=$,[4,i.digest()];case 3:return[2,u.apply(void 0,[c.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,n,r){return function(e,t,n,r,o){return ei(void 0,void 0,void 0,(function(){var i,a,s,u,c,f,l,d,h;return ti(this,(function(p){switch(p.label){case 0:return[4,vi(e,t.secretAccessKey,t.accessKeyId)];case 1:if(i=p.sent(),(a=n+":"+r+":"+o+":"+$(i)+":"+t.sessionToken)in di)return[2,di[a]];for(hi.push(a);hi.length>50;)delete di[hi.shift()];s="AWS4"+t.secretAccessKey,p.label=2;case 2:p.trys.push([2,7,8,9]),u=ni([n,r,o,"aws4_request"]),c=u.next(),p.label=3;case 3:return c.done?[3,6]:(f=c.value,[4,vi(e,s,f)]);case 4:s=p.sent(),p.label=5;case 5:return c=u.next(),[3,3];case 6:return[3,9];case 7:return l=p.sent(),d={error:l},[3,9];case 8:try{c&&!c.done&&(h=u.return)&&h.call(u)}finally{if(d)throw d.error}return[7];case 9:return[2,di[a]=s]}}))}))}(this.sha256,e,n,t,r||this.service)},e}(),Ai=function(e){var t=Ei(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.substr(0,8)}},ki=function(e){return Object.keys(e).sort().join(";")},Oi=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},Pi=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function Li(e){var t,n=this,r=Ti(e.credentials||e.credentialDefaultProvider(e)),o=e.signingEscapePath,i=void 0===o||o,a=e.systemClockOffset,s=void 0===a?e.systemClockOffset||0:a,u=e.sha256;return t=e.signer?Ti(e.signer):function(){return Ti(e.region)().then((function(t){return ei(n,void 0,void 0,(function(){return ti(this,(function(n){switch(n.label){case 0:return[4,e.regionInfoProvider(t)];case 1:return[2,[n.sent()||{},t]]}}))}))})).then((function(t){var n=ri(t,2),o=n[0],a=n[1],s=o.signingRegion,c=o.signingService;return e.signingRegion=e.signingRegion||s||a,e.signingName=e.signingName||c||e.serviceId,new xi({credentials:r,region:e.signingRegion,service:e.signingName,sha256:u,uriEscapePath:i})}))},Qo(Qo({},e),{systemClockOffset:s,signingEscapePath:i,credentials:r,signer:t})}function Ti(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}var Ii=function(e){return new Date(Date.now()+e)};function Ci(e){return function(t,n){return function(r){return ei(this,void 0,void 0,(function(){var o,i,a,s,u,c,f,l,d;return ti(this,(function(h){switch(h.label){case 0:return fn.isInstance(r.request)?"function"!=typeof e.signer?[3,2]:[4,e.signer()]:[2,t(r)];case 1:return i=h.sent(),[3,3];case 2:i=e.signer,h.label=3;case 3:return o=i,s=t,u=[Qo({},r)],d={},[4,o.sign(r.request,{signingDate:new Date(Date.now()+e.systemClockOffset),signingRegion:n.signing_region,signingService:n.signing_service})];case 4:return[4,s.apply(void 0,[Qo.apply(void 0,u.concat([(d.request=h.sent(),d)]))])];case 5:return a=h.sent(),c=a.response.headers,(f=c&&(c.date||c.Date))&&(l=Date.parse(f),p=l,v=e.systemClockOffset,Math.abs(Ii(v).getTime()-p)>=3e5&&(e.systemClockOffset=l-Date.now())),[2,a]}var p,v}))}))}}}var ji={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0};var Ri=function(){return(Ri=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function Mi(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function Ni(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function Bi(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function Ui(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Bi(arguments[t]));return e}function zi(e){return Ri(Ri({},e),{customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent})}var Fi=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Di=function(e){var t=Bi(e,2),n=t[0],r=t[1],o=n.indexOf("/"),i=n.substring(0,o),a=n.substring(o+1);return"api"===i&&(a=a.toLowerCase()),[i,a,r].filter((function(e){return e&&e.length>0})).map((function(e){return null==e?void 0:e.replace(Fi,"_")})).join("/")},qi={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Gi=function(e){return{applyToStack:function(t){var n;t.add((n=e,function(e,t){return function(r){return Mi(void 0,void 0,void 0,(function(){var o,i,a,s,u,c,f,l;return Ni(this,(function(d){switch(d.label){case 0:return o=r.request,fn.isInstance(o)?(i=o.headers,a=(null===(f=null==t?void 0:t.userAgent)||void 0===f?void 0:f.map(Di))||[],[4,n.defaultUserAgentProvider()]):[2,e(r)];case 1:return s=d.sent().map(Di),u=(null===(l=null==n?void 0:n.customUserAgent)||void 0===l?void 0:l.map(Di))||[],i["x-amz-user-agent"]=Ui(s,a,u).join(" "),c=Ui(s.filter((function(e){return e.startsWith("aws-sdk-")})),u).join(" "),"browser"!==n.runtime&&c&&(i["user-agent"]=i["user-agent"]?i["user-agent"]+" "+c:c),[2,e(Ri(Ri({},r),{request:o}))]}}))}))}}),qi)}}},Hi=function(e){function t(t){var n,r=this,o=i(i({},To),t),a=Bo(o),s=Li(Ro(a)),u=zi(fo(s));return(r=e.call(this,u)||this).config=u,r.middlewareStack.use((n=r.config,{applyToStack:function(e){e.addRelativeTo(Ci(n),ji)}})),r.middlewareStack.use(eo(r.config)),r.middlewareStack.use(Go(r.config)),r.middlewareStack.use(Ko(r.config)),r.middlewareStack.use(Xo(r.config)),r.middlewareStack.use(Gi(r.config)),r}return o(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(vr),Wi={},$i=function(){function e(){}return e.setItem=function(e,t){return Wi[e]=t,Wi[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call(Wi,e)?Wi[e]:void 0},e.removeItem=function(e){return delete Wi[e]},e.clear=function(){return Wi={}},e}(),Ki=function(){function e(){try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.amplify.test-ls",1),this.storageWindow.removeItem("aws.amplify.test-ls")}catch(e){this.storageWindow=$i}}return e.prototype.getStorage=function(){return this.storageWindow},e}(),Vi=new w("Util"),Yi=function(e){function t(t){var n=e.call(this,t)||this;return n.nonRetryable=!0,n}return o(t,e),t}(Error),Zi=function(e){return e&&e.nonRetryable};function Ji(e,t,n,r){return void 0===r&&(r=1),a(this,void 0,void 0,(function(){var o,i;return s(this,(function(a){switch(a.label){case 0:if("function"!=typeof e)throw Error("functionToRetry must be a function");Vi.debug(e.name+" attempt #"+r+" with this vars: "+JSON.stringify(t)),a.label=1;case 1:return a.trys.push([1,3,,8]),[4,e.apply(void 0,f(t))];case 2:return[2,a.sent()];case 3:if(o=a.sent(),Vi.debug("error on "+e.name,o),Zi(o))throw Vi.debug(e.name+" non retryable error",o),o;return i=n(r,t,o),Vi.debug(e.name+" retrying in "+i+" ms"),!1===i?[3,6]:[4,new Promise((function(e){return setTimeout(e,i)}))];case 4:return a.sent(),[4,Ji(e,t,n,r+1)];case 5:return[2,a.sent()];case 6:throw o;case 7:return[3,8];case 8:return[2]}}))}))}function Xi(e){void 0===e&&(e=3e5);return function(t){var n=100*Math.pow(2,t)+100*Math.random();return!(n>e)&&n}}var Qi=function(e,t,n){return void 0===n&&(n=3e5),Ji(e,t,Xi(n))},ea=new w("CognitoCredentials"),ta=new Promise((function(e,t){return Object(F.b)().isBrowser?(window.gapi&&window.gapi.auth2?window.gapi.auth2:null)?(ea.debug("google api already loaded"),e()):void setTimeout((function(){return e()}),2e3):(ea.debug("not in the browser, directly resolved"),e())})),na=function(){function e(){this.initialized=!1,this.refreshGoogleToken=this.refreshGoogleToken.bind(this),this._refreshGoogleTokenImpl=this._refreshGoogleTokenImpl.bind(this)}return e.prototype.refreshGoogleToken=function(){return a(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return this.initialized?[3,2]:(ea.debug("need to wait for the Google SDK loaded"),[4,ta]);case 1:e.sent(),this.initialized=!0,ea.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshGoogleTokenImpl()]}}))}))},e.prototype._refreshGoogleTokenImpl=function(){var e=null;return Object(F.b)().isBrowser&&(e=window.gapi&&window.gapi.auth2?window.gapi.auth2:null),e?new Promise((function(t,n){e.getAuthInstance().then((function(e){e||(ea.debug("google Auth undefined"),n(new Yi("google Auth undefined")));var r=e.currentUser.get();r.isSignedIn()?(ea.debug("refreshing the google access token"),r.reloadAuthResponse().then((function(e){var n=e.id_token,r=e.expires_at;t({token:n,expires_at:r})})).catch((function(e){e&&"network_error"===e.error?n("Network error reloading google auth response"):n(new Yi("Failed to reload google auth response"))}))):n(new Yi("User is not signed in with Google"))})).catch((function(e){ea.debug("Failed to refresh google token",e),n(new Yi("Failed to refresh google token"))}))})):(ea.debug("no gapi auth2 available"),Promise.reject("no gapi auth2 available"))},e}(),ra=new w("CognitoCredentials"),oa=new Promise((function(e,t){return Object(F.b)().isBrowser?window.FB?(ra.debug("FB SDK already loaded"),e()):void setTimeout((function(){return e()}),2e3):(ra.debug("not in the browser, directly resolved"),e())})),ia=function(){function e(){this.initialized=!1,this.refreshFacebookToken=this.refreshFacebookToken.bind(this),this._refreshFacebookTokenImpl=this._refreshFacebookTokenImpl.bind(this)}return e.prototype.refreshFacebookToken=function(){return a(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return this.initialized?[3,2]:(ra.debug("need to wait for the Facebook SDK loaded"),[4,oa]);case 1:e.sent(),this.initialized=!0,ra.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshFacebookTokenImpl()]}}))}))},e.prototype._refreshFacebookTokenImpl=function(){var e=null;if(Object(F.b)().isBrowser&&(e=window.FB),!e){return ra.debug("no fb sdk available"),Promise.reject(new Yi("no fb sdk available"))}return new Promise((function(t,n){e.getLoginStatus((function(e){if(e&&e.authResponse){var r=e.authResponse,o=r.accessToken,i=1e3*r.expiresIn+(new Date).getTime();if(!o){a="the jwtToken is undefined";ra.debug(a),n(new Yi(a))}t({token:o,expires_at:i})}else{var a="no response from facebook when refreshing the jwt token";ra.debug(a),n(new Yi(a))}}),{scope:"public_profile,email"})}))},e}(),aa=new na,sa=new ia,ua=function(e,t){return(ua=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};var ca,fa,la,da,ha,pa,va,ga,ya,ma,ba,wa,_a,Sa,Ea,xa,Aa,ka,Oa,Pa,La,Ta,Ia,Ca,ja,Ra,Ma,Na,Ba,Ua,za,Fa,Da,qa,Ga,Ha,Wa,$a,Ka,Va,Ya,Za,Ja,Xa,Qa,es,ts,ns,rs,os,is,as,ss,us,cs,fs,ls;function ds(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function hs(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function ps(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}!function(e){e.AUTHENTICATED_ROLE="AuthenticatedRole",e.DENY="Deny"}(ca||(ca={})),(fa||(fa={})).filterSensitiveLog=function(e){return i({},e)},(la||(la={})).filterSensitiveLog=function(e){return i({},e)},(da||(da={})).filterSensitiveLog=function(e){return i({},e)},(ha||(ha={})).filterSensitiveLog=function(e){return i({},e)},function(e){e.filterSensitiveLog=function(e){return i({},e)}}(pa||(pa={})),function(e){e.filterSensitiveLog=function(e){return i({},e)}}(va||(va={})),(ga||(ga={})).filterSensitiveLog=function(e){return i({},e)},(ya||(ya={})).filterSensitiveLog=function(e){return i({},e)},(ma||(ma={})).filterSensitiveLog=function(e){return i({},e)},(ba||(ba={})).filterSensitiveLog=function(e){return i({},e)},function(e){e.ACCESS_DENIED="AccessDenied",e.INTERNAL_SERVER_ERROR="InternalServerError"}(wa||(wa={})),(_a||(_a={})).filterSensitiveLog=function(e){return i({},e)},(Sa||(Sa={})).filterSensitiveLog=function(e){return i({},e)},(Ea||(Ea={})).filterSensitiveLog=function(e){return i({},e)},function(e){e.filterSensitiveLog=function(e){return i({},e)}}(xa||(xa={})),(Aa||(Aa={})).filterSensitiveLog=function(e){return i({},e)},(ka||(ka={})).filterSensitiveLog=function(e){return i({},e)},(Oa||(Oa={})).filterSensitiveLog=function(e){return i({},e)},(Pa||(Pa={})).filterSensitiveLog=function(e){return i({},e)},(La||(La={})).filterSensitiveLog=function(e){return i({},e)},(Ta||(Ta={})).filterSensitiveLog=function(e){return i({},e)},(Ia||(Ia={})).filterSensitiveLog=function(e){return i({},e)},(Ca||(Ca={})).filterSensitiveLog=function(e){return i({},e)},(ja||(ja={})).filterSensitiveLog=function(e){return i({},e)},(Ra||(Ra={})).filterSensitiveLog=function(e){return i({},e)},(Ma||(Ma={})).filterSensitiveLog=function(e){return i({},e)},function(e){e.CONTAINS="Contains",e.EQUALS="Equals",e.NOT_EQUAL="NotEqual",e.STARTS_WITH="StartsWith"}(Na||(Na={})),(Ba||(Ba={})).filterSensitiveLog=function(e){return i({},e)},(Ua||(Ua={})).filterSensitiveLog=function(e){return i({},e)},function(e){e.RULES="Rules",e.TOKEN="Token"}(za||(za={})),(Fa||(Fa={})).filterSensitiveLog=function(e){return i({},e)},(Da||(Da={})).filterSensitiveLog=function(e){return i({},e)},(qa||(qa={})).filterSensitiveLog=function(e){return i({},e)},(Ga||(Ga={})).filterSensitiveLog=function(e){return i({},e)},(Ha||(Ha={})).filterSensitiveLog=function(e){return i({},e)},(Wa||(Wa={})).filterSensitiveLog=function(e){return i({},e)},($a||($a={})).filterSensitiveLog=function(e){return i({},e)},(Ka||(Ka={})).filterSensitiveLog=function(e){return i({},e)},(Va||(Va={})).filterSensitiveLog=function(e){return i({},e)},(Ya||(Ya={})).filterSensitiveLog=function(e){return i({},e)},(Za||(Za={})).filterSensitiveLog=function(e){return i({},e)},(Ja||(Ja={})).filterSensitiveLog=function(e){return i({},e)},(Xa||(Xa={})).filterSensitiveLog=function(e){return i({},e)},(Qa||(Qa={})).filterSensitiveLog=function(e){return i({},e)},(es||(es={})).filterSensitiveLog=function(e){return i({},e)},(ts||(ts={})).filterSensitiveLog=function(e){return i({},e)},(ns||(ns={})).filterSensitiveLog=function(e){return i({},e)},(rs||(rs={})).filterSensitiveLog=function(e){return i({},e)},(os||(os={})).filterSensitiveLog=function(e){return i({},e)},(is||(is={})).filterSensitiveLog=function(e){return i({},e)},(as||(as={})).filterSensitiveLog=function(e){return i({},e)},(ss||(ss={})).filterSensitiveLog=function(e){return i({},e)},(us||(us={})).filterSensitiveLog=function(e){return i({},e)},(cs||(cs={})).filterSensitiveLog=function(e){return i({},e)},(fs||(fs={})).filterSensitiveLog=function(e){return i({},e)},(ls||(ls={})).filterSensitiveLog=function(e){return i({},e)};var vs=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,o,a,u,c,f,l,d,h,p,v,g,y,m;return s(this,(function(s){switch(s.label){case 0:return r=[i({},e)],m={},[4,Hs(e.body,t)];case 1:switch(n=i.apply(void 0,r.concat([(m.body=s.sent(),m)])),a="UnknownError",a=Ws(e,n.body),a){case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":return[3,2];case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":return[3,4];case"InvalidIdentityPoolConfigurationException":case"com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException":return[3,6];case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":return[3,8];case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":return[3,10];case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":return[3,12];case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":return[3,14];case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":return[3,16]}return[3,18];case 2:return u=[{}],[4,ys(n,t)];case 3:return o=i.apply(void 0,[i.apply(void 0,u.concat([s.sent()])),{name:a,$metadata:Ds(e)}]),[3,19];case 4:return c=[{}],[4,ms(n,t)];case 5:return o=i.apply(void 0,[i.apply(void 0,c.concat([s.sent()])),{name:a,$metadata:Ds(e)}]),[3,19];case 6:return f=[{}],[4,bs(n,t)];case 7:return o=i.apply(void 0,[i.apply(void 0,f.concat([s.sent()])),{name:a,$metadata:Ds(e)}]),[3,19];case 8:return l=[{}],[4,ws(n,t)];case 9:return o=i.apply(void 0,[i.apply(void 0,l.concat([s.sent()])),{name:a,$metadata:Ds(e)}]),[3,19];case 10:return d=[{}],[4,Ss(n,t)];case 11:return o=i.apply(void 0,[i.apply(void 0,d.concat([s.sent()])),{name:a,$metadata:Ds(e)}]),[3,19];case 12:return h=[{}],[4,Es(n,t)];case 13:return o=i.apply(void 0,[i.apply(void 0,h.concat([s.sent()])),{name:a,$metadata:Ds(e)}]),[3,19];case 14:return p=[{}],[4,xs(n,t)];case 15:return o=i.apply(void 0,[i.apply(void 0,p.concat([s.sent()])),{name:a,$metadata:Ds(e)}]),[3,19];case 16:return v=[{}],[4,As(n,t)];case 17:return o=i.apply(void 0,[i.apply(void 0,v.concat([s.sent()])),{name:a,$metadata:Ds(e)}]),[3,19];case 18:g=n.body,a=g.code||g.Code||a,o=i(i({},g),{name:""+a,message:g.message||g.Message||a,$fault:"client",$metadata:Ds(e)}),s.label=19;case 19:return y=o.message||o.Message||a,o.message=y,delete o.Message,[2,Promise.reject(Object.assign(new Error(y),o))]}}))}))},gs=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,o,a,u,c,f,l,d,h,p,v,g,y,m;return s(this,(function(s){switch(s.label){case 0:return r=[i({},e)],m={},[4,Hs(e.body,t)];case 1:switch(n=i.apply(void 0,r.concat([(m.body=s.sent(),m)])),a="UnknownError",a=Ws(e,n.body),a){case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":return[3,2];case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":return[3,4];case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":return[3,6];case"LimitExceededException":case"com.amazonaws.cognitoidentity#LimitExceededException":return[3,8];case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":return[3,10];case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":return[3,12];case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":return[3,14];case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":return[3,16]}return[3,18];case 2:return u=[{}],[4,ys(n,t)];case 3:return o=i.apply(void 0,[i.apply(void 0,u.concat([s.sent()])),{name:a,$metadata:Ds(e)}]),[3,19];case 4:return c=[{}],[4,ms(n,t)];case 5:return o=i.apply(void 0,[i.apply(void 0,c.concat([s.sent()])),{name:a,$metadata:Ds(e)}]),[3,19];case 6:return f=[{}],[4,ws(n,t)];case 7:return o=i.apply(void 0,[i.apply(void 0,f.concat([s.sent()])),{name:a,$metadata:Ds(e)}]),[3,19];case 8:return l=[{}],[4,_s(n,t)];case 9:return o=i.apply(void 0,[i.apply(void 0,l.concat([s.sent()])),{name:a,$metadata:Ds(e)}]),[3,19];case 10:return d=[{}],[4,Ss(n,t)];case 11:return o=i.apply(void 0,[i.apply(void 0,d.concat([s.sent()])),{name:a,$metadata:Ds(e)}]),[3,19];case 12:return h=[{}],[4,Es(n,t)];case 13:return o=i.apply(void 0,[i.apply(void 0,h.concat([s.sent()])),{name:a,$metadata:Ds(e)}]),[3,19];case 14:return p=[{}],[4,xs(n,t)];case 15:return o=i.apply(void 0,[i.apply(void 0,p.concat([s.sent()])),{name:a,$metadata:Ds(e)}]),[3,19];case 16:return v=[{}],[4,As(n,t)];case 17:return o=i.apply(void 0,[i.apply(void 0,v.concat([s.sent()])),{name:a,$metadata:Ds(e)}]),[3,19];case 18:g=n.body,a=g.code||g.Code||a,o=i(i({},g),{name:""+a,message:g.message||g.Message||a,$fault:"client",$metadata:Ds(e)}),s.label=19;case 19:return y=o.message||o.Message||a,o.message=y,delete o.Message,[2,Promise.reject(Object.assign(new Error(y),o))]}}))}))},ys=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n=e.body,r=Ts(n,t),[2,i({name:"ExternalServiceException",$fault:"client",$metadata:Ds(e)},r)]}))}))},ms=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n=e.body,r=js(n,t),[2,i({name:"InternalErrorException",$fault:"server",$metadata:Ds(e)},r)]}))}))},bs=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n=e.body,r=Rs(n,t),[2,i({name:"InvalidIdentityPoolConfigurationException",$fault:"client",$metadata:Ds(e)},r)]}))}))},ws=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n=e.body,r=Ms(n,t),[2,i({name:"InvalidParameterException",$fault:"client",$metadata:Ds(e)},r)]}))}))},_s=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n=e.body,r=Ns(n,t),[2,i({name:"LimitExceededException",$fault:"client",$metadata:Ds(e)},r)]}))}))},Ss=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n=e.body,r=Bs(n,t),[2,i({name:"NotAuthorizedException",$fault:"client",$metadata:Ds(e)},r)]}))}))},Es=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n=e.body,r=Us(n,t),[2,i({name:"ResourceConflictException",$fault:"client",$metadata:Ds(e)},r)]}))}))},xs=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n=e.body,r=zs(n,t),[2,i({name:"ResourceNotFoundException",$fault:"client",$metadata:Ds(e)},r)]}))}))},As=function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n=e.body,r=Fs(n,t),[2,i({name:"TooManyRequestsException",$fault:"client",$metadata:Ds(e)},r)]}))}))},ks=function(e,t){return i(i(i({},void 0!==e.CustomRoleArn&&null!==e.CustomRoleArn&&{CustomRoleArn:e.CustomRoleArn}),void 0!==e.IdentityId&&null!==e.IdentityId&&{IdentityId:e.IdentityId}),void 0!==e.Logins&&null!==e.Logins&&{Logins:Ps(e.Logins,t)})},Os=function(e,t){return i(i(i({},void 0!==e.AccountId&&null!==e.AccountId&&{AccountId:e.AccountId}),void 0!==e.IdentityPoolId&&null!==e.IdentityPoolId&&{IdentityPoolId:e.IdentityPoolId}),void 0!==e.Logins&&null!==e.Logins&&{Logins:Ps(e.Logins,t)})},Ps=function(e,t){return Object.entries(e).reduce((function(e,t){var n,r=c(t,2),o=r[0],a=r[1];return null===a?e:i(i({},e),((n={})[o]=a,n))}),{})},Ls=function(e,t){return{AccessKeyId:void 0!==e.AccessKeyId&&null!==e.AccessKeyId?e.AccessKeyId:void 0,Expiration:void 0!==e.Expiration&&null!==e.Expiration?new Date(Math.round(1e3*e.Expiration)):void 0,SecretKey:void 0!==e.SecretKey&&null!==e.SecretKey?e.SecretKey:void 0,SessionToken:void 0!==e.SessionToken&&null!==e.SessionToken?e.SessionToken:void 0}},Ts=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Is=function(e,t){return{Credentials:void 0!==e.Credentials&&null!==e.Credentials?Ls(e.Credentials):void 0,IdentityId:void 0!==e.IdentityId&&null!==e.IdentityId?e.IdentityId:void 0}},Cs=function(e,t){return{IdentityId:void 0!==e.IdentityId&&null!==e.IdentityId?e.IdentityId:void 0}},js=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Rs=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Ms=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Ns=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Bs=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Us=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},zs=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Fs=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Ds=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},qs=function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)},Gs=function(e,t,n,r,o){return a(void 0,void 0,void 0,(function(){var i,a,u,c,f,l;return s(this,(function(s){switch(s.label){case 0:return[4,e.endpoint()];case 1:return i=s.sent(),a=i.hostname,u=i.protocol,c=void 0===u?"https":u,f=i.port,l={protocol:c,hostname:a,port:f,method:"POST",path:n,headers:t},void 0!==r&&(l.hostname=r),void 0!==o&&(l.body=o),[2,new fn(l)]}}))}))},Hs=function(e,t){return function(e,t){return qs(e,t).then((function(e){return t.utf8Encoder(e)}))}(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},Ws=function(e,t){var n,r,o=function(e){var t=e;return t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=(n=e.headers,r="x-amzn-errortype",Object.keys(n).find((function(e){return e.toLowerCase()===r.toLowerCase()})));return void 0!==i?o(e.headers[i]):void 0!==t.code?o(t.code):void 0!==t.__type?o(t.__type):""},$s=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return o(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(sr(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"CognitoIdentityClient",commandName:"GetCredentialsForIdentityCommand",inputFilterSensitiveLog:La.filterSensitiveLog,outputFilterSensitiveLog:Ia.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n={"content-type":"application/x-amz-json-1.1","x-amz-target":"AWSCognitoIdentityService.GetCredentialsForIdentity"},r=JSON.stringify(ks(e,t)),[2,Gs(t,n,"/",void 0,r)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,o;return s(this,(function(a){switch(a.label){case 0:return e.statusCode>=300?[2,vs(e,t)]:[4,Hs(e.body,t)];case 1:return n=a.sent(),{},r=Is(n,t),o=i({$metadata:Ds(e)},r),[2,Promise.resolve(o)]}}))}))}(e,t)},t}(gr),Ks=function(e){function t(t,n){void 0===n&&(n=!0);var r=e.call(this,t)||this;return r.tryNextLink=n,r}return function(e,t){function n(){this.constructor=e}ua(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Error);function Vs(e){return Promise.all(Object.keys(e).reduce((function(t,n){var r=e[n];return"string"==typeof r?t.push([n,r]):t.push(r().then((function(e){return[n,e]}))),t}),[])).then((function(e){return e.reduce((function(e,t){var n=ps(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})}))}function Ys(e){var t=this;return function(){return ds(t,void 0,void 0,(function(){var t,n,r,o,i,a,s,u,c,f,l,d,h;return hs(this,(function(p){switch(p.label){case 0:return f=(c=e.client).send,l=$s.bind,h={CustomRoleArn:e.customRoleArn,IdentityId:e.identityId},e.logins?[4,Vs(e.logins)]:[3,2];case 1:return d=p.sent(),[3,3];case 2:d=void 0,p.label=3;case 3:return[4,f.apply(c,[new(l.apply($s,[void 0,(h.Logins=d,h)]))])];case 4:return t=p.sent().Credentials,n=void 0===t?function(){throw new Ks("Response from Amazon Cognito contained no credentials")}():t,r=n.AccessKeyId,o=void 0===r?function(){throw new Ks("Response from Amazon Cognito contained no access key ID")}():r,i=n.Expiration,a=n.SecretKey,s=void 0===a?function(){throw new Ks("Response from Amazon Cognito contained no secret key")}():a,u=n.SessionToken,[2,{identityId:e.identityId,accessKeyId:o,secretAccessKey:s,sessionToken:u,expiration:i}]}}))}))}}var Zs=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return o(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(sr(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"CognitoIdentityClient",commandName:"GetIdCommand",inputFilterSensitiveLog:ja.filterSensitiveLog,outputFilterSensitiveLog:Ra.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r;return s(this,(function(o){return n={"content-type":"application/x-amz-json-1.1","x-amz-target":"AWSCognitoIdentityService.GetId"},r=JSON.stringify(Os(e,t)),[2,Gs(t,n,"/",void 0,r)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return a(void 0,void 0,void 0,(function(){var n,r,o;return s(this,(function(a){switch(a.label){case 0:return e.statusCode>=300?[2,gs(e,t)]:[4,Hs(e.body,t)];case 1:return n=a.sent(),{},r=Cs(n,t),o=i({$metadata:Ds(e)},r),[2,Promise.resolve(o)]}}))}))}(e,t)},t}(gr),Js=function(){function e(e){void 0===e&&(e="aws:cognito-identity-ids"),this.dbName=e}return e.prototype.getItem=function(e){return this.withObjectStore("readonly",(function(t){var n=t.get(e);return new Promise((function(e){n.onerror=function(){return e(null)},n.onsuccess=function(){return e(n.result?n.result.value:null)}}))})).catch((function(){return null}))},e.prototype.removeItem=function(e){return this.withObjectStore("readwrite",(function(t){var n=t.delete(e);return new Promise((function(e,t){n.onerror=function(){return t(n.error)},n.onsuccess=function(){return e()}}))}))},e.prototype.setItem=function(e,t){return this.withObjectStore("readwrite",(function(n){var r=n.put({id:e,value:t});return new Promise((function(e,t){r.onerror=function(){return t(r.error)},r.onsuccess=function(){return e()}}))}))},e.prototype.getDb=function(){var e=self.indexedDB.open(this.dbName,1);return new Promise((function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)},e.onblocked=function(){n(new Error("Unable to access DB"))},e.onupgradeneeded=function(){var t=e.result;t.onerror=function(){n(new Error("Failed to create object store"))},t.createObjectStore("IdentityIds",{keyPath:"id"})}}))},e.prototype.withObjectStore=function(e,t){return this.getDb().then((function(n){var r=n.transaction("IdentityIds",e);return r.oncomplete=function(){return n.close()},new Promise((function(e,n){r.onerror=function(){return n(r.error)},e(t(r.objectStore("IdentityIds")))})).catch((function(e){throw n.close(),e}))}))},e}(),Xs=new(function(){function e(e){void 0===e&&(e={}),this.store=e}return e.prototype.getItem=function(e){return e in this.store?this.store[e]:null},e.prototype.removeItem=function(e){delete this.store[e]},e.prototype.setItem=function(e,t){this.store[e]=t},e}());function Qs(e){var t=this,n=e.accountId,r=e.cache,o=void 0===r?"object"==typeof self&&self.indexedDB?new Js:"object"==typeof window&&window.localStorage?window.localStorage:Xs:r,i=e.client,a=e.customRoleArn,s=e.identityPoolId,u=e.logins,c=e.userIdentifier,f=void 0===c?u&&0!==Object.keys(u).length?void 0:"ANONYMOUS":c,l=f?"aws:cognito-identity-credentials:"+s+":"+f:void 0,d=function(){return ds(t,void 0,void 0,(function(){var e,t,r,c,f,h,p,v,g;return hs(this,(function(y){switch(y.label){case 0:return(t=l)?[4,o.getItem(l)]:[3,2];case 1:t=y.sent(),y.label=2;case 2:return(e=t)?[3,7]:(h=(f=i).send,p=Zs.bind,g={AccountId:n,IdentityPoolId:s},u?[4,Vs(u)]:[3,4]);case 3:return v=y.sent(),[3,5];case 4:v=void 0,y.label=5;case 5:return[4,h.apply(f,[new(p.apply(Zs,[void 0,(g.Logins=v,g)]))])];case 6:r=y.sent().IdentityId,c=void 0===r?function(){throw new Ks("Response from Amazon Cognito contained no identity ID")}():r,e=c,l&&Promise.resolve(o.setItem(l,e)).catch((function(){})),y.label=7;case 7:return[2,(d=Ys({client:i,customRoleArn:a,logins:u,identityId:e}))()]}}))}))};return function(){return d().catch((function(e){return ds(t,void 0,void 0,(function(){return hs(this,(function(t){throw l&&Promise.resolve(o.removeItem(l)).catch((function(){})),e}))}))}))}}var eu=n(24),tu=new Set(["af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-south-1","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-north-1","eu-south-1","eu-west-1","eu-west-2","eu-west-3","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"]),nu=new Set(["cn-north-1","cn-northwest-1"]),ru=new Set(["us-iso-east-1"]),ou=new Set(["us-isob-east-1"]),iu=new Set(["us-gov-east-1","us-gov-west-1"]),au={apiVersion:"2014-06-30",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var n=void 0;switch(e){case"ap-northeast-1":n={hostname:"cognito-identity.ap-northeast-1.amazonaws.com",partition:"aws"};break;case"ap-northeast-2":n={hostname:"cognito-identity.ap-northeast-2.amazonaws.com",partition:"aws"};break;case"ap-south-1":n={hostname:"cognito-identity.ap-south-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-1":n={hostname:"cognito-identity.ap-southeast-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-2":n={hostname:"cognito-identity.ap-southeast-2.amazonaws.com",partition:"aws"};break;case"ca-central-1":n={hostname:"cognito-identity.ca-central-1.amazonaws.com",partition:"aws"};break;case"cn-north-1":n={hostname:"cognito-identity.cn-north-1.amazonaws.com.cn",partition:"aws-cn"};break;case"eu-central-1":n={hostname:"cognito-identity.eu-central-1.amazonaws.com",partition:"aws"};break;case"eu-north-1":n={hostname:"cognito-identity.eu-north-1.amazonaws.com",partition:"aws"};break;case"eu-west-1":n={hostname:"cognito-identity.eu-west-1.amazonaws.com",partition:"aws"};break;case"eu-west-2":n={hostname:"cognito-identity.eu-west-2.amazonaws.com",partition:"aws"};break;case"eu-west-3":n={hostname:"cognito-identity.eu-west-3.amazonaws.com",partition:"aws"};break;case"fips-us-east-1":n={hostname:"cognito-identity-fips.us-east-1.amazonaws.com",partition:"aws",signingRegion:"us-east-1"};break;case"fips-us-east-2":n={hostname:"cognito-identity-fips.us-east-2.amazonaws.com",partition:"aws",signingRegion:"us-east-2"};break;case"fips-us-gov-west-1":n={hostname:"cognito-identity-fips.us-gov-west-1.amazonaws.com",partition:"aws-us-gov",signingRegion:"us-gov-west-1"};break;case"fips-us-west-2":n={hostname:"cognito-identity-fips.us-west-2.amazonaws.com",partition:"aws",signingRegion:"us-west-2"};break;case"sa-east-1":n={hostname:"cognito-identity.sa-east-1.amazonaws.com",partition:"aws"};break;case"us-east-1":n={hostname:"cognito-identity.us-east-1.amazonaws.com",partition:"aws"};break;case"us-east-2":n={hostname:"cognito-identity.us-east-2.amazonaws.com",partition:"aws"};break;case"us-gov-west-1":n={hostname:"cognito-identity.us-gov-west-1.amazonaws.com",partition:"aws-us-gov"};break;case"us-west-1":n={hostname:"cognito-identity.us-west-1.amazonaws.com",partition:"aws"};break;case"us-west-2":n={hostname:"cognito-identity.us-west-2.amazonaws.com",partition:"aws"};break;default:tu.has(e)&&(n={hostname:"cognito-identity.{region}.amazonaws.com".replace("{region}",e),partition:"aws"}),nu.has(e)&&(n={hostname:"cognito-identity.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),ru.has(e)&&(n={hostname:"cognito-identity.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),ou.has(e)&&(n={hostname:"cognito-identity.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),iu.has(e)&&(n={hostname:"cognito-identity.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov"}),void 0===n&&(n={hostname:"cognito-identity.{region}.amazonaws.com".replace("{region}",e),partition:"aws"})}return Promise.resolve(i({signingService:"cognito-identity"},n))},serviceId:"Cognito Identity",urlParser:Po},su=i(i({},au),{runtime:"browser",base64Decoder:Gr,base64Encoder:Hr,bodyLengthChecker:ho,credentialDefaultProvider:function(e){return function(){return Promise.reject(new Error("Credential is missing"))}},defaultUserAgentProvider:mo({serviceId:au.serviceId,clientVersion:eu.version}),maxAttempts:3,region:Kr("Region is missing"),requestHandler:new Mr,sha256:Pr.Sha256,streamCollector:Wr,utf8Decoder:bo,utf8Encoder:wo}),uu=function(e){function t(t){var n=this,r=i(i({},su),t),o=Bo(r),a=Li(Ro(o)),s=zi(fo(a));return(n=e.call(this,s)||this).config=s,n.middlewareStack.use(eo(n.config)),n.middlewareStack.use(Go(n.config)),n.middlewareStack.use(Ko(n.config)),n.middlewareStack.use(Xo(n.config)),n.middlewareStack.use(Gi(n.config)),n}return o(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(vr),cu=new w("Credentials"),fu=function(){function e(e){this._gettingCredPromise=null,this._refreshHandlers={},this.Auth=void 0,this.configure(e),this._refreshHandlers.google=aa.refreshGoogleToken,this._refreshHandlers.facebook=sa.refreshFacebookToken}return e.prototype.getModuleName=function(){return"Credentials"},e.prototype.getCredSource=function(){return this._credentials_source},e.prototype.configure=function(e){if(!e)return this._config||{};this._config=Object.assign({},this._config,e);var t=this._config.refreshHandlers;return t&&(this._refreshHandlers=i(i({},this._refreshHandlers),t)),this._storage=this._config.storage,this._storage||(this._storage=(new Ki).getStorage()),this._storageSync=Promise.resolve(),"function"==typeof this._storage.sync&&(this._storageSync=this._storage.sync()),this._config},e.prototype.get=function(){return cu.debug("getting credentials"),this._pickupCredentials()},e.prototype._getCognitoIdentityIdStorageKey=function(e){return"CognitoIdentityId-"+e},e.prototype._pickupCredentials=function(){return cu.debug("picking up credentials"),this._gettingCredPromise&&this._gettingCredPromise.isPending()?cu.debug("getting old cred promise"):(cu.debug("getting new cred promise"),this._gettingCredPromise=Object(F.i)(this._keepAlive())),this._gettingCredPromise},e.prototype._keepAlive=function(){return a(this,void 0,void 0,(function(){var e,t,n,r,o,i,a;return s(this,(function(s){switch(s.label){case 0:if(cu.debug("checking if credentials exists and not expired"),(e=this._credentials)&&!this._isExpired(e)&&!this._isPastTTL())return cu.debug("credentials not changed and not expired, directly return"),[2,Promise.resolve(e)];if(cu.debug("need to get a new credential or refresh the existing one"),t=this.Auth,!(n=void 0===t?E.Auth:t)||"function"!=typeof n.currentUserCredentials)return[2,Promise.reject("No Auth module registered in Amplify")];if(this._isExpired(e)||!this._isPastTTL())return[3,6];cu.debug("ttl has passed but token is not yet expired"),s.label=1;case 1:return s.trys.push([1,5,,6]),[4,n.currentUserPoolUser()];case 2:return r=s.sent(),[4,n.currentSession()];case 3:return o=s.sent(),i=o.refreshToken,[4,new Promise((function(e,t){r.refreshSession(i,(function(n,r){return n?t(n):e(r)}))}))];case 4:return s.sent(),[3,6];case 5:return a=s.sent(),cu.debug("Error attempting to refreshing the session",a),[3,6];case 6:return[2,n.currentUserCredentials()]}}))}))},e.prototype.refreshFederatedToken=function(e){cu.debug("Getting federated credentials");var t=e.provider,n=e.user,r=e.token,o=e.identity_id,i=e.expires_at;i=1970===new Date(i).getFullYear()?1e3*i:i;return cu.debug("checking if federated jwt token expired"),i>(new Date).getTime()?(cu.debug("token not expired"),this._setCredentialsFromFederation({provider:t,token:r,user:n,identity_id:o,expires_at:i})):this._refreshHandlers[t]&&"function"==typeof this._refreshHandlers[t]?(cu.debug("getting refreshed jwt token from federation provider"),this._providerRefreshWithRetry({refreshHandler:this._refreshHandlers[t],provider:t,user:n})):(cu.debug("no refresh handler for provider:",t),this.clear(),Promise.reject("no refresh handler for provider"))},e.prototype._providerRefreshWithRetry=function(e){var t=this,n=e.refreshHandler,r=e.provider,o=e.user;return Qi(n,[],1e4).then((function(e){return cu.debug("refresh federated token sucessfully",e),t._setCredentialsFromFederation({provider:r,token:e.token,user:o,identity_id:e.identity_id,expires_at:e.expires_at})})).catch((function(e){return"string"==typeof e&&0===e.toLowerCase().lastIndexOf("network error",e.length)||t.clear(),cu.debug("refresh federated token failed",e),Promise.reject("refreshing federation token failed: "+e)}))},e.prototype._isExpired=function(e){if(!e)return cu.debug("no credentials for expiration check"),!0;cu.debug("are these credentials expired?",e);var t=Date.now();return e.expiration.getTime()<=t},e.prototype._isPastTTL=function(){return this._nextCredentialsRefresh<=Date.now()},e.prototype._setCredentialsForGuest=function(){return a(this,void 0,void 0,(function(){var e,t,n,r,o,i,u,c=this;return s(this,(function(f){switch(f.label){case 0:return cu.debug("setting credentials for guest"),e=this._config,t=e.identityPoolId,n=e.region,e.mandatorySignIn?[2,Promise.reject("cannot get guest credentials when mandatory signin enabled")]:t?n?(o=this,[4,this._getGuestIdentityId()]):(cu.debug("region is not configured for getting the credentials"),[2,Promise.reject("region is not configured for getting the credentials")]):(cu.debug("No Cognito Identity pool provided for unauthenticated access"),[2,Promise.reject("No Cognito Identity pool provided for unauthenticated access")]);case 1:return r=o._identityId=f.sent(),i=new uu({region:n,customUserAgent:A()}),u=void 0,u=r?Ys({identityId:r,client:i})():function(){return a(c,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,i.send(new Zs({IdentityPoolId:t}))];case 1:return e=n.sent().IdentityId,this._identityId=e,[2,Ys({client:i,identityId:e})()]}}))}))}().catch((function(e){return a(c,void 0,void 0,(function(){return s(this,(function(t){throw e}))}))})),[2,this._loadCredentials(u,"guest",!1,null).then((function(e){return e})).catch((function(e){return a(c,void 0,void 0,(function(){var n=this;return s(this,(function(o){switch(o.label){case 0:return"ResourceNotFoundException"!==e.name||e.message!=="Identity '"+r+"' not found."?[3,2]:(cu.debug("Failed to load guest credentials"),[4,this._removeGuestIdentityId()]);case 1:return o.sent(),u=function(){return a(n,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return[4,i.send(new Zs({IdentityPoolId:t}))];case 1:return e=n.sent().IdentityId,this._identityId=e,[2,Ys({client:i,identityId:e})()]}}))}))}().catch((function(e){return a(n,void 0,void 0,(function(){return s(this,(function(t){throw e}))}))})),[2,this._loadCredentials(u,"guest",!1,null)];case 2:return[2,e]}}))}))}))]}}))}))},e.prototype._setCredentialsFromFederation=function(e){var t=e.provider,n=e.token,r=e.identity_id,o={google:"accounts.google.com",facebook:"graph.facebook.com",amazon:"www.amazon.com",developer:"cognito-identity.amazonaws.com"}[t]||t;if(!o)return Promise.reject("You must specify a federated provider");var i={};i[o]=n;var a=this._config,s=a.identityPoolId,u=a.region;if(!s)return cu.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");if(!u)return cu.debug("region is not configured for getting the credentials"),Promise.reject("region is not configured for getting the credentials");var c=new uu({region:u,customUserAgent:A()}),f=void 0;r?f=Ys({identityId:r,logins:i,client:c})():f=Qs({logins:i,identityPoolId:s,client:c})();return this._loadCredentials(f,"federated",!0,e)},e.prototype._setCredentialsFromSession=function(e){var t=this;cu.debug("set credentials from session");var n=e.getIdToken().getJwtToken(),r=this._config,o=r.region,i=r.userPoolId,u=r.identityPoolId;if(!u)return cu.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");if(!o)return cu.debug("region is not configured for getting the credentials"),Promise.reject("region is not configured for getting the credentials");var c={};c["cognito-idp."+o+".amazonaws.com/"+i]=n;var f=new uu({region:o,customUserAgent:A()}),l=a(t,void 0,void 0,(function(){var e,t,n,r,o,i,a,l,d,h;return s(this,(function(s){switch(s.label){case 0:return[4,this._getGuestIdentityId()];case 1:return(e=s.sent())?[3,3]:[4,f.send(new Zs({IdentityPoolId:u,Logins:c}))];case 2:n=s.sent().IdentityId,t=n,s.label=3;case 3:return[4,f.send(new $s({IdentityId:e||t,Logins:c}))];case 4:return r=s.sent(),o=r.Credentials,i=o.AccessKeyId,a=o.Expiration,l=o.SecretKey,d=o.SessionToken,h=r.IdentityId,this._identityId=h,e?(cu.debug("The guest identity "+e+" has been successfully linked to the logins"),e===h&&cu.debug("The guest identity "+e+" has become the primary identity"),[4,this._removeGuestIdentityId()]):[3,6];case 5:s.sent(),s.label=6;case 6:return[2,{accessKeyId:i,secretAccessKey:l,sessionToken:d,expiration:a,identityId:h}]}}))})).catch((function(e){return a(t,void 0,void 0,(function(){return s(this,(function(t){throw e}))}))}));return this._loadCredentials(l,"userPool",!0,null)},e.prototype._loadCredentials=function(e,t,n,r){var o=this,i=this;return new Promise((function(u,c){e.then((function(e){return a(o,void 0,void 0,(function(){var o,a,c,f,l;return s(this,(function(s){switch(s.label){case 0:if(cu.debug("Load credentials successfully",e),this._identityId&&!e.identityId&&(e.identityId=this._identityId),i._credentials=e,i._credentials.authenticated=n,i._credentials_source=t,i._nextCredentialsRefresh=(new Date).getTime()+3e6,"federated"===t){o=Object.assign({id:this._credentials.identityId},r.user),a=r.provider,c=r.token,f=r.expires_at,l=r.identity_id;try{this._storage.setItem("aws-amplify-federatedInfo",JSON.stringify({provider:a,token:c,user:o,expires_at:f,identity_id:l}))}catch(e){cu.debug("Failed to put federated info into auth storage",e)}}return"guest"!==t?[3,2]:[4,this._setGuestIdentityId(e.identityId)];case 1:s.sent(),s.label=2;case 2:return u(i._credentials),[2]}}))}))})).catch((function(t){if(t)return cu.debug("Failed to load credentials",e),cu.debug("Error loading credentials",t),void c(t)}))}))},e.prototype.set=function(e,t){return"session"===t?this._setCredentialsFromSession(e):"federation"===t?this._setCredentialsFromFederation(e):"guest"===t?this._setCredentialsForGuest():(cu.debug("no source specified for setting credentials"),Promise.reject("invalid source"))},e.prototype.clear=function(){return a(this,void 0,void 0,(function(){return s(this,(function(e){return this._credentials=null,this._credentials_source=null,cu.debug("removing aws-amplify-federatedInfo from storage"),this._storage.removeItem("aws-amplify-federatedInfo"),[2]}))}))},e.prototype._getGuestIdentityId=function(){return a(this,void 0,void 0,(function(){var e,t;return s(this,(function(n){switch(n.label){case 0:e=this._config.identityPoolId,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this._storageSync];case 2:return n.sent(),[2,this._storage.getItem(this._getCognitoIdentityIdStorageKey(e))];case 3:return t=n.sent(),cu.debug("Failed to get the cached guest identityId",t),[3,4];case 4:return[2]}}))}))},e.prototype._setGuestIdentityId=function(e){return a(this,void 0,void 0,(function(){var t,n;return s(this,(function(r){switch(r.label){case 0:t=this._config.identityPoolId,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this._storageSync];case 2:return r.sent(),this._storage.setItem(this._getCognitoIdentityIdStorageKey(t),e),[3,4];case 3:return n=r.sent(),cu.debug("Failed to cache guest identityId",n),[3,4];case 4:return[2]}}))}))},e.prototype._removeGuestIdentityId=function(){return a(this,void 0,void 0,(function(){var e;return s(this,(function(t){return e=this._config.identityPoolId,cu.debug("removing "+this._getCognitoIdentityIdStorageKey(e)+" from storage"),this._storage.removeItem(this._getCognitoIdentityIdStorageKey(e)),[2]}))}))},e.prototype.shear=function(e){return{accessKeyId:e.accessKeyId,sessionToken:e.sessionToken,secretAccessKey:e.secretAccessKey,identityId:e.identityId,authenticated:e.authenticated}},e}(),lu=new fu(null);E.register(lu);var du=new w("AWSCloudWatch"),hu=function(){function e(e){this.configure(e),this._dataTracker={eventUploadInProgress:!1,logEvents:[]},this._currentLogBatch=[],this._initiateLogPushInterval()}return e.prototype.getProviderName=function(){return e.PROVIDER_NAME},e.prototype.getCategoryName=function(){return e.CATEGORY},e.prototype.getLogQueue=function(){return this._dataTracker.logEvents},e.prototype.configure=function(e){if(!e)return this._config||{};var t=Object.assign({},this._config,on(e).Logging,e);return this._config=t,this._config},e.prototype.createLogGroup=function(e){return a(this,void 0,void 0,(function(){var t,n;return s(this,(function(r){switch(r.label){case 0:du.debug("creating new log group in CloudWatch - ",e.logGroupName),t=new _r(e),r.label=1;case 1:return r.trys.push([1,4,,5]),[4,this._ensureCredentials()];case 2:if(!r.sent())throw new Error(y);return[4,this._initCloudWatchLogs().send(t)];case 3:return[2,r.sent()];case 4:throw n=r.sent(),du.error("error creating log group - "+n),n;case 5:return[2]}}))}))},e.prototype.getLogGroups=function(e){return a(this,void 0,void 0,(function(){var t,n;return s(this,(function(r){switch(r.label){case 0:du.debug("getting list of log groups"),t=new Sr(e),r.label=1;case 1:return r.trys.push([1,4,,5]),[4,this._ensureCredentials()];case 2:if(!r.sent())throw new Error(y);return[4,this._initCloudWatchLogs().send(t)];case 3:return[2,r.sent()];case 4:throw n=r.sent(),du.error("error getting log group - "+n),n;case 5:return[2]}}))}))},e.prototype.createLogStream=function(e){return a(this,void 0,void 0,(function(){var t,n;return s(this,(function(r){switch(r.label){case 0:du.debug("creating new log stream in CloudWatch - ",e.logStreamName),t=new Er(e),r.label=1;case 1:return r.trys.push([1,4,,5]),[4,this._ensureCredentials()];case 2:if(!r.sent())throw new Error(y);return[4,this._initCloudWatchLogs().send(t)];case 3:return[2,r.sent()];case 4:throw n=r.sent(),du.error("error creating log stream - "+n),n;case 5:return[2]}}))}))},e.prototype.getLogStreams=function(e){return a(this,void 0,void 0,(function(){var t,n;return s(this,(function(r){switch(r.label){case 0:du.debug("getting list of log streams"),t=new xr(e),r.label=1;case 1:return r.trys.push([1,4,,5]),[4,this._ensureCredentials()];case 2:if(!r.sent())throw new Error(y);return[4,this._initCloudWatchLogs().send(t)];case 3:return[2,r.sent()];case 4:throw n=r.sent(),du.error("error getting log stream - "+n),n;case 5:return[2]}}))}))},e.prototype.getLogEvents=function(e){return a(this,void 0,void 0,(function(){var t,n;return s(this,(function(r){switch(r.label){case 0:du.debug("getting log events from stream - ",e.logStreamName),t=new Ar(e),r.label=1;case 1:return r.trys.push([1,4,,5]),[4,this._ensureCredentials()];case 2:if(!r.sent())throw new Error(y);return[4,this._initCloudWatchLogs().send(t)];case 3:return[2,r.sent()];case 4:throw n=r.sent(),du.error("error getting log events - "+n),n;case 5:return[2]}}))}))},e.prototype.pushLogs=function(e){du.debug("pushing log events to Cloudwatch..."),this._dataTracker.logEvents=f(this._dataTracker.logEvents,e)},e.prototype._validateLogGroupExistsAndCreate=function(e){return a(this,void 0,void 0,(function(){var t,n,r,o;return s(this,(function(i){switch(i.label){case 0:if(this._dataTracker.verifiedLogGroup)return[2,this._dataTracker.verifiedLogGroup];i.label=1;case 1:return i.trys.push([1,5,,6]),[4,this._ensureCredentials()];case 2:if(!i.sent())throw new Error(y);return[4,this.getLogGroups({logGroupNamePrefix:e})];case 3:return"string"!=typeof(t=i.sent())&&t.logGroups&&(n=t.logGroups.filter((function(t){return t.logGroupName===e}))).length>0?(this._dataTracker.verifiedLogGroup=n[0],[2,n[0]]):[4,this.createLogGroup({logGroupName:e})];case 4:return i.sent(),[2,null];case 5:throw r=i.sent(),o="failure during log group search: "+r,du.error(o),r;case 6:return[2]}}))}))},e.prototype._validateLogStreamExists=function(e,t){return a(this,void 0,void 0,(function(){var n,r,o,i;return s(this,(function(a){switch(a.label){case 0:return a.trys.push([0,4,,5]),[4,this._ensureCredentials()];case 1:if(!a.sent())throw new Error(y);return[4,this.getLogStreams({logGroupName:e,logStreamNamePrefix:t})];case 2:return(n=a.sent()).logStreams&&(r=n.logStreams.filter((function(e){return e.logStreamName===t}))).length>0?(this._nextSequenceToken=r[0].uploadSequenceToken,[2,r[0]]):[4,this.createLogStream({logGroupName:e,logStreamName:t})];case 3:return a.sent(),[2,null];case 4:throw o=a.sent(),i="failure during log stream search: "+o,du.error(i),o;case 5:return[2]}}))}))},e.prototype._sendLogEvents=function(e){return a(this,void 0,void 0,(function(){var t,n,r;return s(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),[4,this._ensureCredentials()];case 1:if(!o.sent())throw new Error(y);return du.debug("sending log events to stream - ",e.logStreamName),t=new kr(e),[4,this._initCloudWatchLogs().send(t)];case 2:return[2,o.sent()];case 3:return n=o.sent(),r="failure during log push: "+n,du.error(r),[3,4];case 4:return[2]}}))}))},e.prototype._initCloudWatchLogs=function(){return new Hi({region:this._config.region,credentials:this._config.credentials,customUserAgent:A(),endpoint:this._config.endpoint})},e.prototype._ensureCredentials=function(){return a(this,void 0,void 0,(function(){var e=this;return s(this,(function(t){switch(t.label){case 0:return[4,lu.get().then((function(t){if(!t)return!1;var n=lu.shear(t);return du.debug("set credentials for logging",n),e._config.credentials=n,!0})).catch((function(e){return du.warn("ensure credentials error",e),!1}))];case 1:return[2,t.sent()]}}))}))},e.prototype._getNextSequenceToken=function(){return a(this,void 0,void 0,(function(){var e,t;return s(this,(function(n){switch(n.label){case 0:if(this._nextSequenceToken&&this._nextSequenceToken.length>0)return[2,this._nextSequenceToken];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,this._validateLogGroupExistsAndCreate(this._config.logGroupName)];case 2:return n.sent(),this._nextSequenceToken=void 0,[4,this._validateLogStreamExists(this._config.logGroupName,this._config.logStreamName)];case 3:return(e=n.sent())&&(this._nextSequenceToken=e.uploadSequenceToken),[2,this._nextSequenceToken];case 4:throw t=n.sent(),du.error("failure while getting next sequence token: "+t),t;case 5:return[2]}}))}))},e.prototype._safeUploadLogEvents=function(){return a(this,void 0,void 0,(function(){var e,t,n,r,o;return s(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this._getNextSequenceToken()];case 1:return e=i.sent(),t=0===this._currentLogBatch.length?this._getBufferedBatchOfLogs():this._currentLogBatch,n={logGroupName:this._config.logGroupName,logStreamName:this._config.logStreamName,logEvents:t,sequenceToken:e},this._dataTracker.eventUploadInProgress=!0,[4,this._sendLogEvents(n)];case 2:return r=i.sent(),this._nextSequenceToken=r.nextSequenceToken,this._dataTracker.eventUploadInProgress=!1,this._currentLogBatch=[],[2,r];case 3:if(o=i.sent(),du.error("error during _safeUploadLogEvents: "+o),!m.includes(o.name))throw this._dataTracker.eventUploadInProgress=!1,o;return this._getNewSequenceTokenAndSubmit({logEvents:this._currentLogBatch,logGroupName:this._config.logGroupName,logStreamName:this._config.logStreamName}),[3,4];case 4:return[2]}}))}))},e.prototype._getBufferedBatchOfLogs=function(){for(var e=0,t=0;e<this._dataTracker.logEvents.length;){var n=this._dataTracker.logEvents[e],r=n?(new TextEncoder).encode(n.message).length+d:0;if(r>p){var o="Log entry exceeds maximum size for CloudWatch logs. Log size: "+r+". Truncating log message.";du.warn(o),n.message=n.message.substring(0,r)}if(t+r>h)break;t+=r,e++}return this._currentLogBatch=this._dataTracker.logEvents.splice(0,e),this._currentLogBatch},e.prototype._getNewSequenceTokenAndSubmit=function(e){return a(this,void 0,void 0,(function(){var t,n,r;return s(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),this._nextSequenceToken=void 0,this._dataTracker.eventUploadInProgress=!0,[4,this._getNextSequenceToken()];case 1:return t=o.sent(),e.sequenceToken=t,[4,this._sendLogEvents(e)];case 2:return n=o.sent(),this._dataTracker.eventUploadInProgress=!1,this._currentLogBatch=[],[2,n];case 3:throw r=o.sent(),du.error("error when retrying log submission with new sequence token: "+r),this._dataTracker.eventUploadInProgress=!1,r;case 4:return[2]}}))}))},e.prototype._initiateLogPushInterval=function(){var e=this;this._timer&&clearInterval(this._timer),this._timer=setInterval((function(){return a(e,void 0,void 0,(function(){var e;return s(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),this._getDocUploadPermissibility()?[4,this._safeUploadLogEvents()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[3,4];case 3:return e=t.sent(),du.error("error when calling _safeUploadLogEvents in the timer interval - "+e),[3,4];case 4:return[2]}}))}))}),2e3)},e.prototype._getDocUploadPermissibility=function(){return(0!==this._dataTracker.logEvents.length||0!==this._currentLogBatch.length)&&!this._dataTracker.eventUploadInProgress},e.PROVIDER_NAME=g,e.CATEGORY=v,e}(),pu={},vu={addEventListener:function(e,t){}},gu=Object(F.b)().isBrowser?(new Ki).getStorage():void 0;function yu(e){return(yu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var mu=function(){function e(){this._logger=new w("ServiceWorker")}return Object.defineProperty(e.prototype,"serviceWorker",{get:function(){return this._serviceWorker},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var n=this;return void 0===e&&(e="/service-worker.js"),void 0===t&&(t="/"),this._logger.debug("registering "+e),this._logger.debug("registering service worker with scope "+t),new Promise((function(r,o){if(!navigator||!("serviceWorker"in navigator))return o(new Error("Service Worker not available"));navigator.serviceWorker.register(e,{scope:t}).then((function(e){return e.installing?n._serviceWorker=e.installing:e.waiting?n._serviceWorker=e.waiting:e.active&&(n._serviceWorker=e.active),n._registration=e,n._setupListeners(),n._logger.debug("Service Worker Registration Success: "+e),r(e)})).catch((function(e){return n._logger.debug("Service Worker Registration Failed "+e),o(e)}))}))},e.prototype.enablePush=function(e){var t=this;if(!this._registration)throw new Error("Service Worker not registered");return this._publicKey=e,new Promise((function(n,r){if(!Object(F.b)().isBrowser)return r(new Error("Service Worker not available"));t._registration.pushManager.getSubscription().then((function(r){if(!r)return t._logger.debug("User is NOT subscribed to push"),t._registration.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t._urlB64ToUint8Array(e)}).then((function(e){t._subscription=e,t._logger.debug("User subscribed: "+JSON.stringify(e)),n(e)})).catch((function(e){t._logger.error(e)}));t._subscription=r,t._logger.debug("User is subscribed to push: "+JSON.stringify(r)),n(r)}))}))},e.prototype._urlB64ToUint8Array=function(e){for(var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=window.atob(t),r=new Uint8Array(n.length),o=0;o<n.length;++o)r[o]=n.charCodeAt(o);return r},e.prototype.send=function(e){this._serviceWorker&&this._serviceWorker.postMessage("object"===yu(e)?JSON.stringify(e):e)},e.prototype._setupListeners=function(){var e=this;this._serviceWorker.addEventListener("statechange",(function(t){var n=e._serviceWorker.state;e._logger.debug("ServiceWorker statechange: "+n),E.Analytics&&"function"==typeof E.Analytics.record&&E.Analytics.record({name:"ServiceWorker",attributes:{state:n}})})),this._serviceWorker.addEventListener("message",(function(t){e._logger.debug("ServiceWorker message event: "+t)}))},e}(),bu=n(3);function wu(e,t){void 0===t&&(t={});var n=function(e){if(e&&"j"===e[0]&&":"===e[1])return e.substr(2);return e}(e);if(function(e,t){return void 0===t&&(t=!e||"{"!==e[0]&&"["!==e[0]&&'"'!==e[0]),!t}(n,t.doNotParse))try{return JSON.parse(n)}catch(e){}return e}var _u=function(){return(_u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Su=function(){function e(e,t){var n=this;this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.cookies=function(e,t){return"string"==typeof e?bu.parse(e,t):"object"==typeof e&&null!==e?e:{}}(e,t),new Promise((function(){n.HAS_DOCUMENT_COOKIE="object"==typeof document&&"string"==typeof document.cookie})).catch((function(){}))}return e.prototype._updateBrowserValues=function(e){this.HAS_DOCUMENT_COOKIE&&(this.cookies=bu.parse(document.cookie,e))},e.prototype._emitChange=function(e){for(var t=0;t<this.changeListeners.length;++t)this.changeListeners[t](e)},e.prototype.get=function(e,t,n){return void 0===t&&(t={}),this._updateBrowserValues(n),wu(this.cookies[e],t)},e.prototype.getAll=function(e,t){void 0===e&&(e={}),this._updateBrowserValues(t);var n={};for(var r in this.cookies)n[r]=wu(this.cookies[r],e);return n},e.prototype.set=function(e,t,n){var r;"object"==typeof t&&(t=JSON.stringify(t)),this.cookies=_u(_u({},this.cookies),((r={})[e]=t,r)),this.HAS_DOCUMENT_COOKIE&&(document.cookie=bu.serialize(e,t,n)),this._emitChange({name:e,value:t,options:n})},e.prototype.remove=function(e,t){var n=t=_u(_u({},t),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=_u({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=bu.serialize(e,"",n)),this._emitChange({name:e,value:void 0,options:t})},e.prototype.addChangeListener=function(e){this.changeListeners.push(e)},e.prototype.removeChangeListener=function(e){var t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1)},e}(),Eu=Object(F.b)().isBrowser,xu=function(){function e(e){void 0===e&&(e={}),this.cookies=new Su,this.store=Eu?window.localStorage:Object.create(null),this.cookies=e.req?new Su(e.req.headers.cookie):new Su,Object.assign(this.store,this.cookies.getAll())}return Object.defineProperty(e.prototype,"length",{get:function(){return Object.entries(this.store).length},enumerable:!0,configurable:!0}),e.prototype.clear=function(){var e=this;Array.from(new Array(this.length)).map((function(t,n){return e.key(n)})).forEach((function(t){return e.removeItem(t)}))},e.prototype.getItem=function(e){return this.getLocalItem(e)},e.prototype.getLocalItem=function(e){return Object.prototype.hasOwnProperty.call(this.store,e)?this.store[e]:null},e.prototype.getUniversalItem=function(e){return this.cookies.get(e)},e.prototype.key=function(e){return Object.keys(this.store)[e]},e.prototype.removeItem=function(e){this.removeLocalItem(e),this.removeUniversalItem(e)},e.prototype.removeLocalItem=function(e){delete this.store[e]},e.prototype.removeUniversalItem=function(e){this.cookies.remove(e,{path:"/"})},e.prototype.setItem=function(e,t){switch(this.setLocalItem(e,t),e.split(".").pop()){case"LastAuthUser":case"accessToken":case"refreshToken":case"idToken":Eu?this.setUniversalItem(e,t):this.setLocalItem(e,t)}},e.prototype.setLocalItem=function(e,t){this.store[e]=t},e.prototype.setUniversalItem=function(e,t){this.cookies.set(e,t,{path:"/",sameSite:!0,secure:"localhost"!==window.location.hostname})},e}(),Au="undefined"!=typeof Symbol&&"function"==typeof Symbol.for,ku=Au?Symbol.for("INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER"):"@@INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER",Ou=Au?Symbol.for("INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER"):"@@INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER",Pu="x-amz-user-agent",Lu=function(){function e(){this._queue=[],this._pending=!1}return e.prototype.isLocked=function(){return this._pending},e.prototype.acquire=function(){var e=this,t=new Promise((function(t){return e._queue.push(t)}));return this._pending||this._dispatchNext(),t},e.prototype.runExclusive=function(e){return this.acquire().then((function(t){var n;try{n=e()}catch(e){throw t(),e}return Promise.resolve(n).then((function(e){return t(),e}),(function(e){throw t(),e}))}))},e.prototype._dispatchNext=function(){this._queue.length>0?(this._pending=!0,this._queue.shift()(this._dispatchNext.bind(this))):this._pending=!1},e}(),Tu=n(25),Iu=n.n(Tu).a,Cu=function(){function e(){}return e.prototype.networkMonitor=function(t){if(Object(F.b)().isNode)return Iu.from([{online:!0}]);var n=Object(F.h)()?self:window;return new Iu((function(t){t.next({online:n.navigator.onLine});var r=function(){return t.next({online:!0})},o=function(){return t.next({online:!1})};return n.addEventListener("online",r),n.addEventListener("offline",o),e._observers.push(t),function(){n.removeEventListener("online",r),n.removeEventListener("offline",o),e._observers=e._observers.filter((function(e){return e!==t}))}}))},e._observerOverride=function(t){var n,r,o=function(n){if(n.closed)return e._observers=e._observers.filter((function(e){return e!==n})),"continue";n.next(t)};try{for(var i=u(e._observers),a=i.next();!a.done;a=i.next()){o(a.value)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e._observers=[],e}();function ju(e){return e.split("").map((function(e){return e.charCodeAt(0).toString(16).padStart(2,"0")})).join("")}function Ru(e){return e.match(/.{2}/g).map((function(e){return String.fromCharCode(parseInt(e,16))})).join("")}var Mu={userAgent:x.userAgent};t.default=E},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return o}));var r=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return o}));var r=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296==(64512&o)&&56320==(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}}])}));
|
|
32
134
|
//# sourceMappingURL=aws-amplify-core.min.js.map
|