1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2762],{855:(e,t,r)=>{var n=r(53910),i=r(2553),o=r(49959);e.exports=function(e){return o(e)?n(e):i(e)}},1552:(e,t,r)=>{var n=r(38254),i=r(47061),o=r(16187),s=r(46820),a=r(7536),u=r(56040);function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=s,c.prototype.has=a,c.prototype.set=u,e.exports=c},2553:(e,t,r)=>{var n=r(26950),i=r(31179),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},3102:(e,t,r)=>{e.exports=r(16799)(r(13892),"Map")},3312:(e,t,r)=>{"use strict";var n=r(42944);r.o(n,"useParams")&&r.d(t,{useParams:function(){return n.useParams}}),r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},4202:(e,t,r)=>{"use strict";r.d(t,{C6:()=>i,Cl:()=>o,Tt:()=>s,YH:()=>u,fX:()=>c,sH:()=>a});var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function a(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())})}function u(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return u([e,t])}}function u(a){if(r)throw TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}Object.create;function c(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}Object.create,"function"==typeof SuppressedError&&SuppressedError},5170:(e,t,r)=>{var n=r(92664);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},5291:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>w,__asyncGenerator:()=>b,__asyncValues:()=>_,__await:()=>m,__awaiter:()=>f,__classPrivateFieldGet:()=>E,__classPrivateFieldSet:()=>U,__createBinding:()=>h,__decorate:()=>a,__exportStar:()=>d,__extends:()=>i,__generator:()=>l,__importDefault:()=>I,__importStar:()=>
1A,__makeTemplateObject:()=>S,__metadata:()=>c,__param:()=>u,__read:()=>g,__rest:()=>s,__spread:()=>y,__spreadArrays:()=>v,__values:()=>p});var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function i(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function a(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function f(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())})}function l(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return u([e,t])}}function u(o){if(r)throw TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}}function h(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function d(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function v(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function b(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){i[e]&&(n[e]=function(t){return new Promise(function(r,n){o.push([e,t,r,n])>1||a(e,t)})})}function a(e,t){try{u(i[e](t))}catch(e){l(o[0][3],e)}}function u(e){e.value instanceof m?Promise.resolve(e.value.v).then(c,f):l(o[0][2],e)}function c(e){a("next",e)}function f(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function w(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:m(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function _(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=p(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){i(n,o,(t=e[r](t)).done,t.value)})}}function i(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
1function A(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function I(e){return e&&e.__esModule?e:{default:e}}function E(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function U(e,t,r){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},6553:(e,t,r)=>{var n,i;!function(o){var s;void 0===(i="function"==typeof(n=o)?n.call(t,r,t,e):n)||(e.exports=i),s=!0,e.exports=o(),s=!0}(function(){function e(){for(var e=0,t={};e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function r(n){function i(){}function o(t,r,o){if("undefined"!=typeof document){o=e({path:"/"},i.defaults,o),"number"==typeof o.expires&&(o.expires=new Date(new Date*1+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var s=JSON.stringify(r);/^[\{\[]/.test(s)&&(r=s)}catch(e){}r=n.write?n.write(r,t):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a="";for(var u in o)o[u]&&(a+="; "+u,!0!==o[u]&&(a+="="+o[u].split(";")[0]));return document.cookie=t+"="+r+a}}function s(e,r){if("undefined"!=typeof document){for(var i={},o=document.cookie?document.cookie.split("; "):[],s=0;s<o.length;s++){var a=o[s].split("="),u=a.slice(1).join("=");r||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var c=t(a[0]);if(u=(n.read||n)(u,c)||t(u),r)try{u=JSON.parse(u)}catch(e){}if(i[c]=u,e===c)break}catch(e){}}return e?i[e]:i}}return i.set=o,i.get=function(e){return s(e,!1)},i.getJSON=function(e){return s(e,!0)},i.remove=function(t,r){o(t,"",e(r,{expires:-1}))},i.defaults={},i.withConverter=r,i}return r(function(){})})},6644:e=>{e.exports=function(e){return function(t){return e(t)}}},7072:(e,t,r)=>{var n=r(80600).Global;e.exports={name:"oldIE-userDataStorage",write:u,read:c,each:f,remove:l,clearAll:h};var i="storejs",o=n.document,s=g(),a=(n.navigator?n.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function u(e,t){if(!a){var r=p(e);s(function(e){e.setAttribute(r,t),e.save(i)})}}function c(e){if(!a){var t=p(e),r=null;return s(function(e){r=e.getAttribute(t)}),r}}function f(e){s(function(t){for(var r=t.XMLDocument.documentElement.attributes,n=r.length-1;n>=0;n--){var i=r[n];e(t.getAttribute(i.name),i.name)}})}function l(e){var t=p(e);s(function(e){e.removeAttribute(t),e.save(i)})}function h(){s(function(e){var t=e.XMLDocument.documentElement.attributes;e.load(i);for(var r=t.length-1;r>=0;r--)e.removeAttribute(t[r].name);e.save(i)})}var d=RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function p(e){return e.replace(/^\d/,"___$&").replace(d,"___")}function g(){if(!o||!o.documentElement||!o.documentElement.addBehavior)return null;var e,t,r,n="script";try{(t=new ActiveXObject("htmlfile")).open(),t.write("<"+n+">document.w=window</"+n+'><iframe src="/favicon.ico"></iframe>'),t.close(),r=(e=t.w.frames[0].document).createElement("div")}catch(t){r=o.createElement("div"),e=o.body}return function(t){var n=[].slice.call(arguments,0);n.unshift(r),e.appendChild(r),r.addBehavior("#default#userData"),r.load(i),t.apply(this,n),e.removeChild(r)}}},7447:(e,t)=>{"use strict";t.byteLength=c,t.toByteArray=l,t.fromByteArray=p;for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function u(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function c(e){var t=u(e),r=t[0],n=t[1];return(r+n)*3/4-n}function f(e,t,r){return(t+r)*3/4-r}function l(e){var t,r,o=u(e),s=o[0],a=o[1],c=new i(f(e,s,a)),l=0,h=a>0?s-4:s;for(r=0;r<h;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c}function h(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function d(e,t,r){for(var n=[],i=t;i<r;i+=3)n.push(h((e[i]<<16&0xff0000)+(e[i+1]<<8&65280)+(255&e[i+2])));return n.join("")}function p(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,u=n-i;a<u;a+=s)o.push(d(e,a,a+s>u?u:a+s));return 1===i?o.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&o.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),o.join("")}n[45]=62,n[95]=63},7536:e=>{e.exports=function(e){return this.__data__.has(e)}},8209:e=>{e.exports=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;
1)e[i+r]=t[r];return e}},9141:(e,t,r)=>{var n=r(49038),i=r(93438);e.exports=function(e,t){return n(e,i(e),t)}},9654:(e,t,r)=>{var n=r(82430),i=1,o=4;e.exports=function(e){return n(e,i|o)}},11588:(e,t,r)=>{var n=r(73949);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},11998:(e,t,r)=>{var n=r(92664);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},13025:(e,t,r)=>{var n=r(80600),i=n.Global,o=n.trim;e.exports={name:"cookieStorage",read:a,write:c,each:u,remove:f,clearAll:l};var s=i.document;function a(e){if(!e||!h(e))return null;var t="(?:^|.*;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(s.cookie.replace(new RegExp(t),"$1"))}function u(e){for(var t=s.cookie.split(/; ?/g),r=t.length-1;r>=0;r--)if(o(t[r])){var n=t[r].split("="),i=unescape(n[0]),a=unescape(n[1]);e(a,i)}}function c(e,t){e&&(s.cookie=escape(e)+"="+escape(t)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function f(e){e&&h(e)&&(s.cookie=escape(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function l(){u(function(e,t){f(t)})}function h(e){return RegExp("(?:^|;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(s.cookie)}},13650:(e,t,r)=>{e.exports=n;function n(){return r(57666),{}}},13892:(e,t,r)=>{var n=r(88881),i="object"==typeof self&&self&&self.Object===Object&&self;e.exports=n||i||Function("return this")()},15726:(e,t,r)=>{var n=r(8209),i=r(80568);e.exports=function(e,t,r){var o=t(e);return i(e)?o:n(o,r(e))}},16187:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},16799:(e,t,r)=>{var n=r(33218),i=r(86097);e.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},17364:(e,t,r)=>{var n=r(63931),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},17952:(e,t,r)=>{var n=r(63931),i="__lodash_hash_undefined__",o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return r===i?void 0:r}return o.call(t,e)?t[e]:void 0}},19134:(e,t,r)=>{e.exports=r(16799)(r(13892),"WeakMap")},20569:(e,t,r)=>{var n=r(93139),i=r(90696),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols;e.exports=s?function(e){return null==e?[]:n(s(e=Object(e)),function(t){return o.call(e,t)})}:i},20746:(e,t,r)=>{var n=r(41409),i=r(30593),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var s=e[t];o.call(e,t)&&i(s,r)&&(void 0!==r||t in e)||n(e,t,r)}},22201:(e,t,r)=>{var n=r(77656),i=n?n.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},23171:(e,t,r)=>{var n=r(15726),i=r(20569),o=r(855);e.exports=function(e){return n(e,o,i)}},26950:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},27966:e=>{e.exports=function(){return!1}},29068:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var r=e.length,n=new e.constructor(r);return r&&"string"==typeof e[0]&&t.call(e,"index")&&(n.index=e.index,n.input=e.input),n}},30124:(e,t,r)=>{"use strict";var n=r(86943).hp;Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var i=r(58160),o=void 0!==n&&n.from?function(e){return n.from(e,"utf8")}:i.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)}},30239:(e,t,r)=>{var n=r(95001),i=r(39171),o="[object Arguments]";e.exports=function(e){return i(e)&&n(e)==o}},30593:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},30654:e=>{"use strict";function t(e){return Number.isInteger(e)&&e>=0}function r(e){this.name="ArgumentError",this.message=e}e.exports=function(e,n){if(n=n||{},"function"!=typeof e)throw new r("fetch must be a function");if("object"!=typeof n)throw new r("defaults must be an object");if(void 0!==n.retries&&!t(n.retries))throw new r("retries must be a positive integer");if(void 0!==n.retryDelay&&!t(n.retryDelay)&&"function"!=typeof n.retryDelay)throw new r("retryDelay must be a positive integer or a function returning a positive integer");if(void 0!==n.retryOn&&!Array.isArray(n.retryOn)&&"function"!=typeof n.retryOn)throw new r("retryOn property expects an array or function");return n=Object.assign({retries:3,retryDelay:1e3,retryOn:[]},n),function(i,o){var s=n.retries,a=n.retryDelay,u=n.retryOn;if(o&&void 0!==o.retries)if(t(o.retries))s=o.retries;else throw new r("retries must be a positive integer");if(o&&void 0!==o.retryDelay)if(t(o.retryDelay)||"function"==typeof o.retryDelay)a=o.retryDelay;else throw new r("retryDelay must be a positive integer or a function returning a positive integer");if(o&&o.retryOn)if(Array.isArray(o.retryOn)||"function"==typeof o.retryOn)u=o.retryOn;else throw new r("retryOn property expects an array or function");return new Promise(function(t,r){var n=function(n){e(i,o).then(function(e){if(Array.isArray(u)&&-1===u.indexOf(e.status))t(e);else if("function"==typeof u)try{return Promise.resolve(u(n,null,e)).then(function(r){r?c(n,null,e):t(e)}).catch(r)}catch(e){r(e)}else n<s?c(n,null,e):t(e)}).catch(function(e){if("function"==typeof u)try{Promise.resolve(u(n,e,null)).then(function(t){t?c(n,e,null):r(e)}).catch(function(e){r(e)})}catch(e){r(e)}else n<s?c(n,e,null):r(e)})};function c(e,t,r){setTimeout(function(){n(++e)},"function"==typeof a?a(e,t,r):a)}n(0)})}}},31179:(e,t,r)=>{e.exports=r(49718)(Object.keys,Object)},32591:(e,t,r)=>{var n=r(49038),i=r(98328);e.exports=function(e,t){return e&&n(t,i(t),e)}},33198:e=>{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},33218:(e,t,r)=>{var n=r(82347),i=r(75113),o=r(80964),s=r(72664),a=/[\\^$.*+?()[\]{}|]/g,u=/^\[object .+?Constructor\]$/,c=Object.prototype,f=Function.prototype.toString,l=c.hasOwnProperty,h=RegExp("^"+f.call(l).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(n(e)?h:u).test(s(e))}},33542:(e,t,r)=>{var n=r(92664);e.exports=function(e){return n(this.__data__,e)>-1}},34585:(e,t,r)=>{e=r.nmd(e);var n=r(13892),i=r(27966),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?n.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;e.exports=u},34723:(e,t,r)=>{e=r.nmd(e);var n=r(13892),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i?n.Buffer:void 0,a=s?s.allocUnsafe:void 0;function u(e,t){if(t)return e.slice();var r=e.length,n=a?a(r):new e.constructor(r);return e.copy(n),n}e.exports=u},35606:(e,t,r)=>{var n=r(99044),i=r(6644),o=r(90448),s=o&&o.isTypedArray;e.exports=s?i(s):n},35945:(e,t)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},38254:(e,t,r)=>{var n=r(77103),i=r(81841),o=r(5170),s=r(33542),a=r(11998);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},38352:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,r(5291).__exportStar)(r(87408),t)},39171:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},40585:(e,t,r)=>{"use strict";var n,i=r(7447),o=r(66354),s=r(76047);function a(){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}}function u(){return f.TYPED_ARRAY_SUPPORT?0x7fffffff:0x3fffffff}function c(e,t){if(u()<t)throw RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=f.prototype:(null===e&&(e=new f(t)),e.length=t),e}function f(e,t,r){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(e,t,r);if("number"==typeof e){if("string"==typeof t)throw Error("If encoding is specified then the first argument must be a string");return p(this,e)}return l(this,e,t,r)}function l(e,t,r,n){if("number"==typeof t)throw TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?v(e,t,r,n):"string"==typeof t?g(e,t,r):m(e,t)}function h(e){if("number"!=typeof e)throw TypeError('"size" argument must be a number');if(e<0)throw RangeError('"size" argument must not be negative')}function d(e,t,r,n){return(h(t),t<=0)?c(e,t):void 0!==r?"string"==typeof n?c(e,t).fill(r,n):c(e,t).fill(r):c(e,t)}function p(e,t){if(h(t),e=c(e,t<0?0:0|b(t)),!f.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function g(e,t,r){if(("string"!=typeof r||""===r)&&(r="utf8"),!f.isEncoding(r))throw TypeError('"encoding" must be a valid string encoding');var n=0|_(t,r),i=(e=c(e,n)).write(t,r);return i!==n&&(e=e.slice(0,i)),e}function y(e,t){var r=t.length<0?0:0|b(t.length);e=c(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function v(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw RangeError("'length' is out of bounds");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),f.TYPED_ARRAY_SUPPORT?(e=t).__proto__=f.prototype:e=y(e,t),e}function m(e,t){if(f.isBuffer(t)){var r=0|b(t.length);return 0===(e=c(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||er(t.length)?c(e,0):y(e,t);if("Buffer"===t.type&&s(t.data))return y(e,t.data)}throw TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function b(e){if(e>=u())throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|e}function w(e){return+e!=e&&(e=0),f.alloc(+e)}function _(e,t){if(f.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 r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return ee(e).length;default:if(n)return Z(e).length;t=(""+t).toLowerCase(),n=!0}}function S(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return M(this,t,r);case"utf8":case"utf-8":return R(this,t,r);case"ascii":return F(this,t,r);case"latin1":case"binary":return N(this,t,r);case"base64":return k(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,r);default:if(n)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function A(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function I(e,t,r,n,i){if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),isNaN(r*=1)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(i)return -1;else r=e.length-1;else if(r<0)if(!i)return -1;else r=0;if("string"==typeof t&&(t=f.from(t,n)),f.isBuffer(t))return 0===t.length?-1:E(e,t,r,n,i);if("number"==typeof t){if(t&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return E(e,[t],r,n,i)}throw TypeError("val must be string, number or Buffer")}function E(e,t,r,n,i){var o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var f=-1;for(o=r;o<a;o++)if(c(e,o)===c(t,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*s}else -1!==f&&(o-=o-f),f=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var l=!0,h=0;h<u;h++)if(c(e,o+h)!==c(t,h)){l=!1;break}if(l)return o}return -1}function U(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;if(o%2!=0)throw TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))break;e[r+s]=a}return s}function C(e,t,r,n){return et(Z(t,e.length-r),e,r,n)}function x(e,t,r,n){return et(X(t),e,r,n)}function T(e,t,r,n){return x(e,t,r,n)}function P(e,t,r,n){return et(ee(t),e,r,n)}function O(e,t,r,n){return et(Q(t,e.length-r),e,r,n)}
1function k(e,t,r){return 0===t&&r===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,r))}function R(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,s,a,u,c=e[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:(192&(o=e[i+1]))==128&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=e[i+1],s=e[i+2],(192&o)==128&&(192&s)==128&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],(192&o)==128&&(192&s)==128&&(192&a)==128&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return j(n)}t.hp=f,n=w,t.IS=50,f.TYPED_ARRAY_SUPPORT=void 0!==r.g.TYPED_ARRAY_SUPPORT?r.g.TYPED_ARRAY_SUPPORT:a(),n=u(),f.poolSize=8192,f._augment=function(e){return e.__proto__=f.prototype,e},f.from=function(e,t,r){return l(null,e,t,r)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(e,t,r){return d(null,e,t,r)},f.allocUnsafe=function(e){return p(null,e)},f.allocUnsafeSlow=function(e){return p(null,e)},f.isBuffer=function(e){return!!(null!=e&&e._isBuffer)},f.compare=function(e,t){if(!f.isBuffer(e)||!f.isBuffer(t))throw TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:+(n<r)},f.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}},f.concat=function(e,t){if(!s(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return f.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;var r,n=f.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(!f.isBuffer(o))throw TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},f.byteLength=_,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)A(this,t,t+1);return this},f.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)A(this,t,t+3),A(this,t+1,t+2);return this},f.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)A(this,t,t+7),A(this,t+1,t+6),A(this,t+2,t+5),A(this,t+3,t+4);return this},f.prototype.toString=function(){var e=0|this.length;return 0===e?"":0==arguments.length?R(this,0,e):S.apply(this,arguments)},f.prototype.equals=function(e){if(!f.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===f.compare(this,e)},f.prototype.inspect=function(){var e="",r=t.IS;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},f.prototype.compare=function(e,t,r,n,i){if(!f.isBuffer(e))throw TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var o=i-n,s=r-t,a=Math.min(o,s),u=this.slice(n,i),c=e.slice(t,r),l=0;l<a;++l)if(u[l]!==c[l]){o=u[l],s=c[l];break}return o<s?-1:+(s<o)},f.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},f.prototype.indexOf=function(e,t,r){return I(this,e,t,r,!0)},f.prototype.lastIndexOf=function(e,t,r){return I(this,e,t,r,!1)},f.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return U(this,e,t,r);case"utf8":case"utf-8":return C(this,e,t,r);case"ascii":return x(this,e,t,r);case"latin1":case"binary":return T(this,e,t,r);case"base64":return P(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,r);default:if(o)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var D=4096;function j(e){var t=e.length;if(t<=D)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=D));return r}function F(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function N(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function M(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=$(e[o]);return i}function B(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function L(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function V(e,t,r,n,i,o){if(!f.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function K(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i<o;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function G(e,t,r,n){t<0&&(t=0xffffffff+t+1);for(var i=0,o=Math.min(e.length-r,4);i<o;++i)e[r+i]=t>>
1>(n?i:3-i)*8&255}function q(e,t,r,n,i,o){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function H(e,t,r,n,i){return i||q(e,t,r,4,34028234663852886e22,-34028234663852886e22),o.write(e,t,r,n,23,4),r+4}function z(e,t,r,n,i){return i||q(e,t,r,8,17976931348623157e292,-17976931348623157e292),o.write(e,t,r,n,52,8),r+8}f.prototype.slice=function(e,t){var r,n=this.length;if(e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),f.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=f.prototype;else{var i=t-e;r=new f(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+e]}return r},f.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||L(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},f.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||L(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},f.prototype.readUInt8=function(e,t){return t||L(e,1,this.length),this[e]},f.prototype.readUInt16LE=function(e,t){return t||L(e,2,this.length),this[e]|this[e+1]<<8},f.prototype.readUInt16BE=function(e,t){return t||L(e,2,this.length),this[e]<<8|this[e+1]},f.prototype.readUInt32LE=function(e,t){return t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},f.prototype.readUInt32BE=function(e,t){return t||L(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},f.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||L(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},f.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||L(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},f.prototype.readInt8=function(e,t){return(t||L(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},f.prototype.readInt16LE=function(e,t){t||L(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},f.prototype.readInt16BE=function(e,t){t||L(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},f.prototype.readInt32LE=function(e,t){return t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},f.prototype.readInt32BE=function(e,t){return t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},f.prototype.readFloatLE=function(e,t){return t||L(e,4,this.length),o.read(this,e,!0,23,4)},f.prototype.readFloatBE=function(e,t){return t||L(e,4,this.length),o.read(this,e,!1,23,4)},f.prototype.readDoubleLE=function(e,t){return t||L(e,8,this.length),o.read(this,e,!0,52,8)},f.prototype.readDoubleBE=function(e,t){return t||L(e,8,this.length),o.read(this,e,!1,52,8)},f.prototype.writeUIntLE=function(e,t,r,n){if(e*=1,t|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;V(this,e,t,r,i,0)}var o=1,s=0;for(this[t]=255&e;++s<r&&(o*=256);)this[t+s]=e/o&255;return t+r},f.prototype.writeUIntBE=function(e,t,r,n){if(e*=1,t|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;V(this,e,t,r,i,0)}var o=r-1,s=1;for(this[t+o]=255&e;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+r},f.prototype.writeUInt8=function(e,t,r){return e*=1,t|=0,r||V(this,e,t,1,255,0),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},f.prototype.writeUInt16LE=function(e,t,r){return e*=1,t|=0,r||V(this,e,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):K(this,e,t,!0),t+2},f.prototype.writeUInt16BE=function(e,t,r){return e*=1,t|=0,r||V(this,e,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):K(this,e,t,!1),t+2},f.prototype.writeUInt32LE=function(e,t,r){return e*=1,t|=0,r||V(this,e,t,4,0xffffffff,0),f.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):G(this,e,t,!0),t+4},f.prototype.writeUInt32BE=function(e,t,r){return e*=1,t|=0,r||V(this,e,t,4,0xffffffff,0),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):G(this,e,t,!1),t+4},f.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t|=0,!n){var i=Math.pow(2,8*r-1);V(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+r},f.prototype.writeIntBE=function(e,t,r,n){if(e*=1,t|=0,!n){var i=Math.pow(2,8*r-1);V(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+r},f.prototype.writeInt8=function(e,t,r){return e*=1,t|=0,r||V(this,e,t,1,127,-128),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},f.prototype.writeInt16LE=function(e,t,r){return e*=1,t|=0,r||V(this,e,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):K(this,e,t,!0),t+2},f.prototype.writeInt16BE=function(e,t,r){return e*=1,t|=0,r||V(this,e,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):K(this,e,t,!1),t+2},f.prototype.writeInt32LE=function(e,t,r){return e*=1,t|=0,r||V(this,e,t,4,0x7fffffff,-0x80000000),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):G(this,e,t,!0),t+4},f.prototype.writeInt32BE=function(e,t,r){return e*=1,t|=0,r||V(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):G(this,e,t,!1),t+4},f.prototype.writeFloatLE=function(e,t,r){return H(this,e,t,!0,r)},f.prototype.writeFloatBE=function(e,t,r){return H(this,e,t,!1,r)},f.prototype.writeDoubleLE=function(e,t,r){return z(this,e,t,!0,r)},f.prototype.writeDoubleBE=function(e,t,r){return z(this,e,t,!1,r)},f.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("sourceStart out of bounds");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,o=n-r;if(this===e&&r<t&&t<n)for(i=o-1;i>=0;--i)e[i+t]=this[i+r];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},f.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i,o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var s=f.isBuffer(e)?e:Z(new f(e,n).toString()),a=s.length;for(i=0;i<r-t;++i)this[i+t]=s[i%a]}return this};var W=/[^+\/0-9A-Za-z-_]/g;function Y(e){if((e=J(e).replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function J(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function $(e){return e<16?"0"+e.toString(16):e.toString(16)}function Z(e,t){t=t||1/0;for(var r,n=e.length,i=null,o=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319||s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}
1else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function X(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function Q(e,t){for(var r,n,i=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(r=e.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}function ee(e){return i.toByteArray(Y(e))}function et(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function er(e){return e!=e}},40951:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},41409:(e,t,r)=>{var n=r(54330);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},43261:(e,t,r)=>{var n=r(75340),i=r(39171),o="[object Map]";e.exports=function(e){return i(e)&&n(e)==o}},44236:(e,t,r)=>{var n=r(75962);e.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=+(r.size!=i),this}},44965:(e,t,r)=>{e.exports=r(16799)(r(13892),"Promise")},45577:e=>{e.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},45980:(e,t,r)=>{var n=r(63931),i="__lodash_hash_undefined__";e.exports=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=n&&void 0===t?i:t,this}},46190:(e,t,r)=>{var n=r(11588),i=r(66936),o=r(62240),s=r(22201),a=r(81416),u="[object Boolean]",c="[object Date]",f="[object Map]",l="[object Number]",h="[object RegExp]",d="[object Set]",p="[object String]",g="[object Symbol]",y="[object ArrayBuffer]",v="[object DataView]",m="[object Float32Array]",b="[object Float64Array]",w="[object Int8Array]",_="[object Int16Array]",S="[object Int32Array]",A="[object Uint8Array]",I="[object Uint8ClampedArray]",E="[object Uint16Array]",U="[object Uint32Array]";e.exports=function(e,t,r){var C=e.constructor;switch(t){case y:return n(e);case u:case c:return new C(+e);case v:return i(e,r);case m:case b:case w:case _:case S:case A:case I:case E:case U:return a(e,r);case f:return new C;case l:case p:return new C(e);case h:return o(e);case d:return new C;case g:return s(e)}}},46820:e=>{e.exports=function(e){return this.__data__.get(e)}},47061:(e,t,r)=>{var n=r(38254);e.exports=function(){this.__data__=new n,this.size=0}},47145:(e,t)=>{"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([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),t.INIT=[0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19],t.MAX_HASHABLE_LENGTH=0x1fffffffffffff},48540:(e,t,r)=>{var n=r(74489),i=r(82471),o=r(17952),s=r(17364),a=r(45980);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},49038:(e,t,r)=>{var n=r(20746),i=r(41409);e.exports=function(e,t,r,o){var s=!r;r||(r={});for(var a=-1,u=t.length;++a<u;){var c=t[a],f=o?o(r[c],e[c],c,r,e):void 0;void 0===f&&(f=e[c]),s?i(r,c,f):n(r,c,f)}return r}},49718:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},49959:(e,t,r)=>{var n=r(82347),i=r(65551);e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},50798:(e,t,r)=>{var n=r(80600).Global;function i(){return n.localStorage}function o(e){return i().getItem(e)}function s(e){for(var t=i().length-1;t>=0;t--){var r=i().key(t);e(o(r),r)}}
1e.exports={name:"localStorage",read:o,write:function e(e,t){return i().setItem(e,t)},each:s,remove:function e(e){return i().removeItem(e)},clearAll:function e(){return i().clear()}}},51745:(e,t,r)=>{var n=r(80964),i=Object.create;e.exports=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}()},52302:e=>{"use strict";e.exports=self.fetch.bind(self),e.exports.default=e.exports},53910:(e,t,r)=>{var n=r(45577),i=r(91893),o=r(80568),s=r(34585),a=r(90584),u=r(35606),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=o(e),f=!r&&i(e),l=!r&&!f&&s(e),h=!r&&!f&&!l&&u(e),d=r||f||l||h,p=d?n(e.length,String):[],g=p.length;for(var y in e)(t||c.call(e,y))&&!(d&&("length"==y||l&&("offset"==y||"parent"==y)||h&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||a(y,g)))&&p.push(y);return p}},54330:(e,t,r)=>{var n=r(16799);e.exports=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},54979:(e,t,r)=>{var n=r(75962);e.exports=function(e){return n(this,e).get(e)}},55652:(e,t,r)=>{var n=r(75962);e.exports=function(e){return n(this,e).has(e)}},56040:(e,t,r)=>{var n=r(38254),i=r(3102),o=r(65676),s=200;e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!i||a.length<s-1)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new o(a)}return r.set(e,t),this.size=r.size,this}},56534:(e,t,r)=>{var n=r(80600),i=n.slice,o=n.pluck,s=n.each,a=n.bind,u=n.create,c=n.isList,f=n.isFunction,l=n.isObject;e.exports={createStore:p};var h={version:"2.0.12",enabled:!1,get:function(e,t){var r=this.storage.read(this._namespacePrefix+e);return this._deserialize(r,t)},set:function(e,t){return void 0===t?this.remove(e):(this.storage.write(this._namespacePrefix+e,this._serialize(t)),t)},remove:function(e){this.storage.remove(this._namespacePrefix+e)},each:function(e){var t=this;this.storage.each(function(r,n){e.call(t,t._deserialize(r),(n||"").replace(t._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(e){return this._namespacePrefix=="__storejs_"+e+"_"},createStore:function(){return p.apply(this,arguments)},addPlugin:function(e){this._addPlugin(e)},namespace:function(e){return p(this.storage,this.plugins,e)}};function d(){var e="undefined"==typeof console?null:console;if(e){var t=e.warn?e.warn:e.log;t.apply(e,arguments)}}function p(e,t,r){r||(r=""),e&&!c(e)&&(e=[e]),t&&!c(t)&&(t=[t]);var n=r?"__storejs_"+r+"_":"",p=r?RegExp("^"+n):null;if(!/^[a-zA-Z0-9_\-]*$/.test(r))throw Error("store.js namespaces can only have alphanumerics + underscores and dashes");var g=u({_namespacePrefix:n,_namespaceRegexp:p,_testStorage:function(e){try{var t="__storejs__test__";e.write(t,t);var r=e.read(t)===t;return e.remove(t),r}catch(e){return!1}},_assignPluginFnProp:function(e,t){var r=this[t];this[t]=function(){var t=i(arguments,0),n=this,o=[function(){if(r)return s(arguments,function(e,r){t[r]=e}),r.apply(n,t)}].concat(t);return e.apply(n,o)}},_serialize:function(e){return JSON.stringify(e)},_deserialize:function(e,t){if(!e)return t;var r="";try{r=JSON.parse(e)}catch(t){r=e}return void 0!==r?r:t},_addStorage:function(e){!this.enabled&&this._testStorage(e)&&(this.storage=e,this.enabled=!0)},_addPlugin:function(e){var t=this;if(c(e))return void s(e,function(e){t._addPlugin(e)});if(!o(this.plugins,function(t){return e===t})){if(this.plugins.push(e),!f(e))throw Error("Plugins must be function values that return objects");var r=e.call(this);if(!l(r))throw Error("Plugins must return an object of function properties");s(r,function(r,n){if(!f(r))throw Error("Bad plugin property: "+n+" from plugin "+e.name+". Plugins should only return functions.");t._assignPluginFnProp(r,n)})}},addStorage:function(e){d("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(e)}},h,{plugins:[]});return g.raw={},s(g,function(e,t){f(e)&&(g.raw[t]=a(g,e))}),s(e,function(e){g._addStorage(e)}),s(t,function(e){g._addPlugin(e)}),g}},57666:()=>{"object"!=typeof JSON&&(JSON={}),function(){"use strict";var gap,indent,meta,rep,rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(e){return e<10?"0"+e:e}function this_value(){return this.valueOf()}function quote(e){return rx_escapable.lastIndex=0,rx_escapable.test(e)?'"'+e.replace(rx_escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var r,n,i,o,s,a=gap,u=t[e];switch(u&&"object"==typeof u&&"function"==typeof u.toJSON&&(u=u.toJSON(e)),"function"==typeof rep&&(u=rep.call(t,e,u)),typeof u){case"string":return quote(u);case"number":return isFinite(u)?String(u):"null";case"boolean":case"null":return String(u);case"object":if(!u)return"null";if(gap+=indent,s=[],"[object Array]"===Object.prototype.toString.apply(u)){for(r=0,o=u.length;r<o;r+=1)s[r]=str(r,u)||"null";return i=0===s.length?"[]":gap?"[\n"+gap+s.join(",\n"+gap)+"\n"+a+"]":"["+s.join(",")+"]",gap=a,i}if(rep&&"object"==typeof rep)for(r=0,o=rep.length;r<o;r+=1)"string"==typeof rep[r]&&(i=str(n=rep[r],u))&&s.push(quote(n)+(gap?": ":":")+i);else for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(i=str(n,u))&&s.push(quote(n)+(gap?": ":":")+i);return i=0===s.length?"{}":gap?"{\n"+gap+s.join(",\n"+gap)+"\n"+a+"}":"{"+s.join(",")+"}",gap=a,i}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value),"function"!=typeof JSON.stringify&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(e,t,r){var n;if(gap="",indent="","number"==typeof r)for(n=0;n<r;n+=1)indent+=" ";else"string"==typeof r&&(indent=r);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){var j;function walk(e,t){var r,n,i=e[t];if(i&&"object"==typeof i)for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(void 0!==(n=walk(i,r))?i[r]=n:delete i[r]);return reviver.call(e,t,i)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}
1)),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw SyntaxError("JSON.parse")})}()},58160:(e,t,r)=>{"use strict";r.r(t),r.d(t,{fromUtf8:()=>a,toUtf8:()=>u});let n=e=>{let t=[];for(let r=0,n=e.length;r<n;r++){let n=e.charCodeAt(r);if(n<128)t.push(n);else if(n<2048)t.push(n>>6|192,63&n|128);else if(r+1<e.length&&(64512&n)==55296&&(64512&e.charCodeAt(r+1))==56320){let i=65536+((1023&n)<<10)+(1023&e.charCodeAt(++r));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(n>>12|224,n>>6&63|128,63&n|128)}return Uint8Array.from(t)},i=e=>{let t="";for(let r=0,n=e.length;r<n;r++){let n=e[r];n<128?t+=String.fromCharCode(n):192<=n&&n<224?t+=String.fromCharCode((31&n)<<6|63&e[++r]):240<=n&&n<365?t+=decodeURIComponent("%"+[n,e[++r],e[++r],e[++r]].map(e=>e.toString(16)).join("%")):t+=String.fromCharCode((15&n)<<12|(63&e[++r])<<6|63&e[++r])}return t};function o(e){return new TextEncoder().encode(e)}function s(e){return new TextDecoder("utf-8").decode(e)}let a=e=>"function"==typeof TextEncoder?o(e):n(e),u=e=>"function"==typeof TextDecoder?s(e):i(e)},59691:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},61892:(e,t,r)=>{var n=r(49038),i=r(855);e.exports=function(e,t){return e&&n(t,i(t),e)}},62240:e=>{var t=/\w*$/;e.exports=function(e){var r=new e.constructor(e.source,t.exec(e));return r.lastIndex=e.lastIndex,r}},62645:(e,t,r)=>{var n="/";!function(){var t={452:function(e){"use strict";e.exports=r(67229)}},i={};function o(e){var r=i[e];if(void 0!==r)return r.exports;var n=i[e]={exports:{}},s=!0;try{t[e](n,n.exports,o),s=!1}finally{s&&delete i[e]}return n.exports}o.ab=n+"/";var s={};!function(){var e,t=s,r=(e=o(452))&&"object"==typeof e&&"default"in e?e.default:e,n=/https?|ftp|gopher|file/;function i(e){"string"==typeof e&&(e=b(e));var t=function(e,t,r){var n=e.auth,i=e.hostname,o=e.protocol||"",s=e.pathname||"",a=e.hash||"",u=e.query||"",c=!1;n=n?encodeURIComponent(n).replace(/%3A/i,":")+"@":"",e.host?c=n+e.host:i&&(c=n+(~i.indexOf(":")?"["+i+"]":i),e.port&&(c+=":"+e.port)),u&&"object"==typeof u&&(u=t.encode(u));var f=e.search||u&&"?"+u||"";return o&&":"!==o.substr(-1)&&(o+=":"),e.slashes||(!o||r.test(o))&&!1!==c?(c="//"+(c||""),s&&"/"!==s[0]&&(s="/"+s)):c||(c=""),a&&"#"!==a[0]&&(a="#"+a),f&&"?"!==f[0]&&(f="?"+f),{protocol:o,host:c,pathname:s=s.replace(/[?#]/g,encodeURIComponent),search:f=f.replace("#","%23"),hash:a}}(e,r,n);return""+t.protocol+t.host+t.pathname+t.search+t.hash}var a="http://",u="w.w",c=a+u,f=/^([a-z0-9.+-]*:\/\/\/)([a-z0-9.+-]:\/*)?/i,l=/https?|ftp|gopher|file/;function h(e,t){var r="string"==typeof e?b(e):e;e="object"==typeof e?i(e):e;var n=b(t),o="";r.protocol&&!r.slashes&&(o=r.protocol,e=e.replace(r.protocol,""),o+="/"===t[0]||"/"===e[0]?"/":""),o&&n.protocol&&(o="",n.slashes||(o=n.protocol,t=t.replace(n.protocol,"")));var s=e.match(f);s&&!n.protocol&&(e=e.substr((o=s[1]+(s[2]||"")).length),/^\/\/[^/]/.test(t)&&(o=o.slice(0,-1)));var u=new URL(e,c+"/"),h=new URL(t,u).toString().replace(c,""),d=n.protocol||r.protocol;return d+=r.slashes||n.slashes?"//":"",!o&&d?h=h.replace(a,d):o&&(h=h.replace(a,"")),l.test(h)||~t.indexOf(".")||"/"===e.slice(-1)||"/"===t.slice(-1)||"/"!==h.slice(-1)||(h=h.slice(0,-1)),o&&(h=o+("/"===h[0]?h.substr(1):h)),h}function d(){}d.prototype.parse=b,d.prototype.format=i,d.prototype.resolve=h,d.prototype.resolveObject=h;var p=/^https?|ftp|gopher|file/,g=/^(.*?)([#?].*)/,y=/^([a-z0-9.+-]*:)(\/{0,3})(.*)/i,v=/^([a-z0-9.+-]*:)?\/\/\/*/i,m=/^([a-z0-9.+-]*:)(\/{0,2})\[(.*)\]$/i;function b(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=!1),e&&"object"==typeof e&&e instanceof d)return e;var o=(e=e.trim()).match(g);e=o?o[1].replace(/\\/g,"/")+o[2]:e.replace(/\\/g,"/"),m.test(e)&&"/"!==e.slice(-1)&&(e+="/");var s=!/(^javascript)/.test(e)&&e.match(y),a=v.test(e),f="";s&&(p.test(s[1])||(f=s[1].toLowerCase(),e=""+s[2]+s[3]),s[2]||(a=!1,p.test(s[1])?(f=s[1],e=""+s[3]):e="//"+s[3]),3!==s[2].length&&1!==s[2].length||(f=s[1],e="/"+s[3]));var l,h=(o?o[1]:e).match(/^https?:\/\/[^/]+(:[0-9]+)(?=\/|$)/),b=h&&h[1],w=new d,_="",S="";try{l=new URL(e)}catch(t){_=t,f||n||!/^\/\//.test(e)||/^\/\/.+[@.]/.test(e)||(S="/",e=e.substr(1));try{l=new URL(e,c)}catch(e){return w.protocol=f,w.href=f,w}}w.slashes=a&&!S,w.host=l.host===u?"":l.host,w.hostname=l.hostname===u?"":l.hostname.replace(/(\[|\])/g,""),w.protocol=_?f||null:l.protocol,w.search=l.search.replace(/\\/g,"%5C"),w.hash=l.hash.replace(/\\/g,"%5C");var A=e.split("#");!w.search&&~A[0].indexOf("?")&&(w.search="?"),w.hash||""!==A[1]||(w.hash="#"),w.query=t?r.decode(l.search.substr(1)):w.search.substr(1),w.pathname=S+(s?function(e){return e.replace(/['^|`]/g,function(e){return"%"+e.charCodeAt().toString(16).toUpperCase()}).replace(/((?:%[0-9A-F]{2})+)/g,function(e,t){try{return decodeURIComponent(t).split("").map(function(e){var t=e.charCodeAt();return t>256||/^[a-z0-9]$/i.test(e)?e:"%"+t.toString(16).toUpperCase()}).join("")}catch(e){return t}})}(l.pathname):l.pathname),"about:"===w.protocol&&"blank"===w.pathname&&(w.protocol="",w.pathname=""),_&&"/"!==e[0]&&(w.pathname=w.pathname.substr(1)),f&&!p.test(f)&&"/"!==e.slice(-1)&&"/"===w.pathname&&(w.pathname=""),w.path=w.pathname+w.search,w.auth=[l.username,l.password].map(decodeURIComponent).filter(
1Boolean).join(":"),w.port=l.port,b&&!w.host.endsWith(b)&&(w.host+=b,w.port=b.slice(1)),w.href=S?""+w.pathname+w.search+w.hash:i(w);var I=/^(file)/.test(w.href)?["host","hostname"]:[];return Object.keys(w).forEach(function(e){~I.indexOf(e)||(w[e]=w[e]||null)}),w}t.parse=b,t.format=i,t.resolve=h,t.resolveObject=function(e,t){return b(h(e,t))},t.Url=d}(),e.exports=s}()},63931:(e,t,r)=>{e.exports=r(16799)(Object,"create")},64298:(e,t)=>{"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),r=0;r<e.length;)t[r]=e[r];return t}return Uint32Array.from(e)}},64486:(e,t,r)=>{var n=r(56534),i=r(77393),o=[r(13650)];e.exports=n.createStore(i,o)},65551:e=>{var t=0x1fffffffffffff;e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=t}},65676:(e,t,r)=>{var n=r(76041),i=r(89815),o=r(54979),s=r(55652),a=r(44236);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},66240:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var n=r(30124);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return n.convertToBuffer}});var i=r(35945);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return i.isEmptyData}});var o=r(78183);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return o.numToUint8}});var s=r(64298);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return s.uint32ArrayFrom}})},66354:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,f=-7,l=r?i-1:0,h=r?-1:1,d=e[t+l];for(l+=h,o=d&(1<<-f)-1,d>>=-f,f+=a;f>0;o=256*o+e[t+l],l+=h,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+e[t+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=c}return(d?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=5960464477539062e-23*(23===i),d=n?0:o-1,p=n?1:-1,g=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(a=+!!isNaN(t),s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+l>=1?t+=h/u:t+=h*Math.pow(2,1-l),t*u>=2&&(s++,u/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(t*u-1)*Math.pow(2,i),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+d]=255&s,d+=p,s/=256,c-=8);e[r+d-p]|=128*g}},66936:(e,t,r)=>{var n=r(11588);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},67229:e=>{var t="/";!function(){"use strict";var r={815:function(e){function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,i,o){n=n||"&",i=i||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(n);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var f=0;f<c;++f){var l,h,d,p,g=e[f].replace(a,"%20"),y=g.indexOf(i);y>=0?(l=g.substr(0,y),h=g.substr(y+1)):(l=g,h=""),d=decodeURIComponent(l),p=decodeURIComponent(h),t(s,d)?r(s[d])?s[d].push(p):s[d]=[s[d],p]:s[d]=p}return s};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},577:function(e){var t=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,o,s,a){return(o=o||"&",s=s||"=",null===e&&(e=void 0),"object"==typeof e)?n(i(e),function(i){var a=encodeURIComponent(t(i))+s;return r(e[i])?n(e[i],function(e){return a+encodeURIComponent(t(e))}).join(o):a+encodeURIComponent(t(e[i]))}).join(o):a?encodeURIComponent(t(a))+s+encodeURIComponent(t(e)):""};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function n(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var i=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}},s=!0;try{r[e](o,o.exports,i),s=!1}finally{s&&delete n[e]}return o.exports}i.ab=t+"/";var o={};!function(){var e=o;e.decode=e.parse=i(815),e.encode=e.stringify=i(577)}(),e.exports=o}()},67806:(e,t,r)=>{var n=r(80964),i=r(26950),o=r(86836),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=i(e),r=[];for(var a in e)"constructor"==a&&(t||!s.call(e,a))||r.push(a);return r}},68488:(e,t,r)=>{e.exports=r(13892)["__core-js_shared__"]},69016:(e,t,r)=>{e.exports=r(16799)(r(13892),"Set")},70687:(e,t,r)=>{var n=r(80600).Global;function i(){return n.sessionStorage}function o(e){return i().getItem(e)}function s(e){for(var t=i().length-1;t>=0;t--){var r=i().key(t);e(o(r),r)}}
1e.exports={name:"sessionStorage",read:o,write:function e(e,t){return i().setItem(e,t)},each:s,remove:function e(e){return i().removeItem(e)},clearAll:function e(){return i().clear()}}},72664:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},73949:(e,t,r)=>{e.exports=r(13892).Uint8Array},74489:(e,t,r)=>{var n=r(63931);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},75113:(e,t,r)=>{var n=r(68488),i=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!i&&i in e}},75340:(e,t,r)=>{var n=r(98533),i=r(3102),o=r(44965),s=r(69016),a=r(19134),u=r(95001),c=r(72664),f="[object Map]",l="[object Object]",h="[object Promise]",d="[object Set]",p="[object WeakMap]",g="[object DataView]",y=c(n),v=c(i),m=c(o),b=c(s),w=c(a),_=u;(n&&_(new n(new ArrayBuffer(1)))!=g||i&&_(new i)!=f||o&&_(o.resolve())!=h||s&&_(new s)!=d||a&&_(new a)!=p)&&(_=function(e){var t=u(e),r=t==l?e.constructor:void 0,n=r?c(r):"";if(n)switch(n){case y:return g;case v:return f;case m:return h;case b:return d;case w:return p}return t}),e.exports=_},75370:(e,t,r)=>{var n=r(80600).Global;e.exports={name:"oldFF-globalStorage",read:o,write:s,each:a,remove:u,clearAll:c};var i=n.globalStorage;function o(e){return i[e]}function s(e,t){i[e]=t}function a(e){for(var t=i.length-1;t>=0;t--){var r=i.key(t);e(i[r],r)}}function u(e){return i.removeItem(e)}function c(){a(function(e,t){delete i[e]})}},75962:(e,t,r)=>{var n=r(59691);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},76041:(e,t,r)=>{var n=r(48540),i=r(38254),o=r(3102);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},76047:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},77103:e=>{e.exports=function(){this.__data__=[],this.size=0}},77256:(e,t,r)=>{var n=r(51745),i=r(91614),o=r(26950);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:n(i(e))}},77393:(e,t,r)=>{e.exports=[r(50798),r(75370),r(7072),r(13025),r(70687),r(84918)]},77656:(e,t,r)=>{e.exports=r(13892).Symbol},77946:(e,t,r)=>{var n=r(77656),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var i=s.call(e);return n&&(t?e[a]=r:delete e[a]),i}},78183:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(0xff000000&e)>>24,(0xff0000&e)>>16,(65280&e)>>8,255&e])}},79815:(e,t,r)=>{var n=r(75340),i=r(39171),o="[object Set]";e.exports=function(e){return i(e)&&n(e)==o}},80568:e=>{e.exports=Array.isArray},80600:(e,t,r)=>{var n=i();function i(){return Object.assign?Object.assign:function(e,t,r,n){for(var i=1;i<arguments.length;i++)c(Object(arguments[i]),function(t,r){e[r]=t});return e}}function o(){if(Object.create)return function(e,t,r,i){var o=u(arguments,1);return n.apply(this,[Object.create(e)].concat(o))};function e(){}return function(t,r,i,o){var s=u(arguments,1);return e.prototype=t,n.apply(this,[new e].concat(s))}}function s(){return String.prototype.trim?function(e){return String.prototype.trim.call(e)}:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function a(e,t){return function(){return t.apply(e,Array.prototype.slice.call(arguments,0))}}function u(e,t){return Array.prototype.slice.call(e,t||0)}function c(e,t){l(e,function(e,r){return t(e,r),!1})}function f(e,t){var r=h(e)?[]:{};return l(e,function(e,n){return r[n]=t(e,n),!1}),r}function l(e,t){if(h(e)){for(var r=0;r<e.length;r++)if(t(e[r],r))return e[r]}else for(var n in e)if(e.hasOwnProperty(n)&&t(e[n],n))return e[n]}function h(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}function d(e){return e&&"[object Function]"===({}).toString.call(e)}function p(e){return e&&"[object Object]"===({}).toString.call(e)}e.exports={assign:n,create:o(),trim:s(),bind:a,slice:u,each:c,map:f,pluck:l,isList:h,isFunction:d,isObject:p,Global:"undefined"!=typeof window?window:r.g}},80964:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},81416:(e,t,r)=>{var n=r(11588);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},81841:(e,t,r)=>{var n=r(92664),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);
1return!(r<0)&&(r==t.length-1?t.pop():i.call(t,r,1),--this.size,!0)}},82003:(e,t,r)=>{var n=r(43261),i=r(6644),o=r(90448),s=o&&o.isMap;e.exports=s?i(s):n},82347:(e,t,r)=>{var n=r(95001),i=r(80964),o="[object AsyncFunction]",s="[object Function]",a="[object GeneratorFunction]",u="[object Proxy]";e.exports=function(e){if(!i(e))return!1;var t=n(e);return t==s||t==a||t==o||t==u}},82430:(e,t,r)=>{var n=r(1552),i=r(96960),o=r(20746),s=r(61892),a=r(32591),u=r(34723),c=r(33198),f=r(91110),l=r(9141),h=r(23171),d=r(95436),p=r(75340),g=r(29068),y=r(46190),v=r(77256),m=r(80568),b=r(34585),w=r(82003),_=r(80964),S=r(94705),A=r(855),I=r(98328),E=1,U=2,C=4,x="[object Arguments]",T="[object Array]",P="[object Boolean]",O="[object Date]",k="[object Error]",R="[object Function]",D="[object GeneratorFunction]",j="[object Map]",F="[object Number]",N="[object Object]",M="[object RegExp]",B="[object Set]",L="[object String]",V="[object Symbol]",K="[object WeakMap]",G="[object ArrayBuffer]",q="[object DataView]",H="[object Float32Array]",z="[object Float64Array]",W="[object Int8Array]",Y="[object Int16Array]",J="[object Int32Array]",$="[object Uint8Array]",Z="[object Uint8ClampedArray]",X="[object Uint16Array]",Q="[object Uint32Array]",ee={};function et(e,t,r,T,P,O){var k,j=t&E,F=t&U,M=t&C;if(r&&(k=P?r(e,T,P,O):r(e)),void 0!==k)return k;if(!_(e))return e;var B=m(e);if(B){if(k=g(e),!j)return c(e,k)}else{var L=p(e),V=L==R||L==D;if(b(e))return u(e,j);if(L==N||L==x||V&&!P){if(k=F||V?{}:v(e),!j)return F?l(e,a(k,e)):f(e,s(k,e))}else{if(!ee[L])return P?e:{};k=y(e,L,j)}}O||(O=new n);var K=O.get(e);if(K)return K;O.set(e,k),S(e)?e.forEach(function(n){k.add(et(n,t,r,n,e,O))}):w(e)&&e.forEach(function(n,i){k.set(i,et(n,t,r,i,e,O))});var G=M?F?d:h:F?I:A,q=B?void 0:G(e);return i(q||e,function(n,i){q&&(n=e[i=n]),o(k,i,et(n,t,r,i,e,O))}),k}ee[x]=ee[T]=ee[G]=ee[q]=ee[P]=ee[O]=ee[H]=ee[z]=ee[W]=ee[Y]=ee[J]=ee[j]=ee[F]=ee[N]=ee[M]=ee[B]=ee[L]=ee[V]=ee[$]=ee[Z]=ee[X]=ee[Q]=!0,ee[k]=ee[R]=ee[K]=!1,e.exports=et},82471:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t}},84918:e=>{e.exports={name:"memoryStorage",read:r,write:n,each:i,remove:o,clearAll:s};var t={};function r(e){return t[e]}function n(e,r){t[e]=r}function i(e){for(var r in t)t.hasOwnProperty(r)&&e(t[r],r)}function o(e){delete t[e]}function s(e){t={}}},86097:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},86836:e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},86943:(e,t,r)=>{"use strict";var n;let i=r(7447),o=r(66354),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=c,n=w,t.IS=50;let a=0x7fffffff;function u(e){if(e>a)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return d(e)}return f(e,t,r)}function f(e,t,r){if("string"==typeof e)return p(e,t);if(ArrayBuffer.isView(e))return y(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(es(e,ArrayBuffer)||e&&es(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(es(e,SharedArrayBuffer)||e&&es(e.buffer,SharedArrayBuffer)))return v(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);let i=m(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function h(e,t,r){return(l(e),e<=0)?u(e):void 0!==t?"string"==typeof r?u(e).fill(t,r):u(e).fill(t):u(e)}function d(e){return l(e),u(e<0?0:0|b(e))}function p(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!c.isEncoding(t))throw TypeError("Unknown encoding: "+t);let r=0|_(e,t),n=u(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function g(e){let t=e.length<0?0:0|b(e.length),r=u(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function y(e){if(es(e,Uint8Array)){let t=new Uint8Array(e);return v(t.buffer,t.byteOffset,t.byteLength)}return g(e)}function v(e,t,r){let n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),c.prototype),n}function m(e){if(c.isBuffer(e)){let t=0|b(e.length),r=u(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||ea(e.length)?u
vendor: 10,702 bytes, line 1
1(0):g(e):"Buffer"===e.type&&Array.isArray(e.data)?g(e.data):void 0}function b(e){if(e>=a)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function w(e){return+e!=e&&(e=0),c.alloc(+e)}function _(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||es(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return et(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return ei(e).length;default:if(i)return n?-1:et(e).length;t=(""+t).toLowerCase(),i=!0}}function S(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return j(this,t,r);case"latin1":case"binary":return F(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(n)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function A(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function I(e,t,r,n,i){if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),ea(r*=1)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(i)return -1;else r=e.length-1;else if(r<0)if(!i)return -1;else r=0;if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:E(e,t,r,n,i);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return E(e,[t],r,n,i)}throw TypeError("val must be string, number or Buffer")}function E(e,t,r,n,i){let o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;o<a;o++)if(c(e,o)===c(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*s}else -1!==n&&(o-=o-n),n=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(c(e,o+n)!==c(t,n)){r=!1;break}if(r)return o}return -1}function U(e,t,r,n){let i;r=Number(r)||0;let o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;let s=t.length;for(n>s/2&&(n=s/2),i=0;i<n;++i){let n=parseInt(t.substr(2*i,2),16);if(ea(n))break;e[r+i]=n}return i}function C(e,t,r,n){return eo(et(t,e.length-r),e,r,n)}function x(e,t,r,n){return eo(er(t),e,r,n)}function T(e,t,r,n){return eo(ei(t),e,r,n)}function P(e,t,r,n){return eo(en(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,r))}function k(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i<r;){let t=e[i],o=null,s=t>239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,u;switch(s){case 1:t<128&&(o=t);break;case 2:(192&(r=e[i+1]))==128&&(u=(31&t)<<6|63&r)>127&&(o=u);break;case 3:r=e[i+1],n=e[i+2],(192&r)==128&&(192&n)==128&&(u=(15&t)<<12|(63&r)<<6|63&n)>2047&&(u<55296||u>57343)&&(o=u);break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],(192&r)==128&&(192&n)==128&&(192&a)==128&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a)>65535&&u<1114112&&(o=u)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return D(n)}n=0x7fffffff,c.TYPED_ARRAY_SUPPORT=function e(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return f(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return h(e,t,r)},c.allocUnsafe=function(e){return d(e)},c.allocUnsafeSlow=function(e){return d(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(es(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),es(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:+(n<r)},c.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}},c.concat=function(e,t){let r;if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;let n=c.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){let t=e[r];if(es(t,Uint8Array))i+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else if(c.isBuffer(t))t.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=t.length}return n},c.byteLength=_,c.prototype._isBuffer=!0,c.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)A(this,t,t+1);return this},c.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)A(this,t,t+3),A(this,t+1,t+2);return this},c.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)A(this,t,t+7),A(this,t+1,t+6),A(this,t+2,t+5),A(this,t+3,t+4);return this},c.prototype.toString=function(){let e=this.length;return 0===e?"":0==arguments.length?k(this,0,e):S.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="",r=t.IS;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},s&&(c.prototype[s]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,i){if(es(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),u=this.slice(n,i),f=e.slice(t,r);for(let e=0;e<a;++e)if(u[e]!==f[e]){o=u[e],s=f[e];break}return o<s?-1:+(s<o)},c.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return I(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return I(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return U(this,e,t,r);case"utf8":case"utf-8":return C(this,e,t,r);case"ascii":case"latin1":case"binary":return x(this,e,t,r);case"base64":return T(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,t,r);default:if(o)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};let R=4096;function D(e){let t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=R));return r}function j(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function F(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function N(e,t,r){let n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=eu[e[n]];return i}function M(e,t,r){let n=e.slice(t,r),i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function B(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function L(e,t,r,n,i,o){if(!c.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function V(e,t,r,n,i){$(t,n,i,e,r,7);let o=Number(t&BigInt(0xffffffff));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function K(e,t,r,n,i){$(t,n,i,e,r,7);let o=Number(t&BigInt(0xffffffff));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function G(e,t,r,n,i,o){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function q(e,t,r,n,i){return t*=1,r>>>=0,i||G(e,t,r,4,34028234663852886e22,-34028234663852886e22),o.write(e,t,r,n,23,4),r+4}function H(e,t,r,n,i){return t*=1,r>>>=0,i||G(e,t,r,8,17976931348623157e292,-17976931348623157e292),o.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){let r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);let n=this.subarray(e,t);
vendor: 7,981 bytes, line 1
1return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||B(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||B(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=ec(function(e){Z(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&X(e,this.length-8);let n=t+256*this[++e]+65536*this[++e]+0x1000000*this[++e],i=this[++e]+256*this[++e]+65536*this[++e]+0x1000000*r;return BigInt(n)+(BigInt(i)<<BigInt(32))}),c.prototype.readBigUInt64BE=ec(function(e){Z(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&X(e,this.length-8);let n=0x1000000*t+65536*this[++e]+256*this[++e]+this[++e],i=0x1000000*this[++e]+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||B(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||B(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return(e>>>=0,t||B(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||B(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||B(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=ec(function(e){Z(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&X(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24))<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+0x1000000*this[++e])}),c.prototype.readBigInt64BE=ec(function(e){Z(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&X(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<<BigInt(32))+BigInt(0x1000000*this[++e]+65536*this[++e]+256*this[++e]+r)}),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||B(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||B(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||B(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||B(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;L(this,e,t,r,n,0)}let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;L(this,e,t,r,n,0)}let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||L(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||L(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||L(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=ec(function(e,t=0){return V(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=ec(function(e,t=0){return K(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t>>>=0,!n){let n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e*=1,t>>>=0,!n){let n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||L(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||L(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||L(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=ec(function(e,t=0){return V(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=ec(function(e,t=0){return K(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeFloatLE=function(e,t,r){return q(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return q(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return H(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return H(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);let i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},c.prototype.fill=function(e,t,r,n){let i;if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){let t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{let o=c.isBuffer(e)?e:c.from(e,n),s=o.length;
1if(0===s)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%s]}return this};let z={};function W(e,t,r){z[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function Y(e){let t="",r=e.length,n=+("-"===e[0]);for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function J(e,t,r){Z(t,"offset"),(void 0===e[t]||void 0===e[t+r])&&X(t,e.length-(r+1))}function $(e,t,r,n,i,o){if(e>r||e<t){let n,i="bigint"==typeof t?"n":"";throw n=o>3?0===t||t===BigInt(0)?`>= 0${i} and < 2${i} ** ${(o+1)*8}${i}`:`>= -(2${i} ** ${(o+1)*8-1}${i}) and < 2 ** ${(o+1)*8-1}${i}`:`>= ${t}${i} and <= ${r}${i}`,new z.ERR_OUT_OF_RANGE("value",n,e)}J(n,i,o)}function Z(e,t){if("number"!=typeof e)throw new z.ERR_INVALID_ARG_TYPE(t,"number",e)}function X(e,t,r){if(Math.floor(e)!==e)throw Z(e,r),new z.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new z.ERR_BUFFER_OUT_OF_BOUNDS;throw new z.ERR_OUT_OF_RANGE(r||"offset",`>= ${+!!r} and <= ${t}`,e)}W("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),W("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),W("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>0x100000000?i=Y(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Y(i)),i+="n"),n+=` It must be ${t}. Received ${i}`},RangeError);let Q=/[^+/0-9A-Za-z-_]/g;function ee(e){if((e=(e=e.split("=")[0]).trim().replace(Q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function et(e,t){let r;t=t||1/0;let n=e.length,i=null,o=[];for(let s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319||s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function er(e){let t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function en(e,t){let r,n,i=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=(r=e.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}function ei(e){return i.toByteArray(ee(e))}function eo(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function es(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function ea(e){return e!=e}let eu=function(){let e="0123456789abcdef",t=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function ec(e){return"undefined"==typeof BigInt?ef:e}function ef(){throw Error("BigInt not supported")}},87081:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var n=r(47145);t.RawSha256=function(){function e(){this.state=Int32Array.from(n.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 Error("Attempted to update an already finished hash.");var t=0,r=e.byteLength;if(this.bytesHashed+=r,8*this.bytesHashed>n.MAX_HASHABLE_LENGTH)throw Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[t++],r--,this.bufferLength===n.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),r=this.bufferLength;if(t.setUint8(this.bufferLength++,128),r%n.BLOCK_SIZE>=n.BLOCK_SIZE-8){for(var i=this.bufferLength;i<n.BLOCK_SIZE;
1i++)t.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(var i=this.bufferLength;i<n.BLOCK_SIZE-8;i++)t.setUint8(i,0);t.setUint32(n.BLOCK_SIZE-8,Math.floor(e/0x100000000),!0),t.setUint32(n.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}for(var o=new Uint8Array(n.DIGEST_LENGTH),i=0;i<8;i++)o[4*i]=this.state[i]>>>24&255,o[4*i+1]=this.state[i]>>>16&255,o[4*i+2]=this.state[i]>>>8&255,o[4*i+3]=this.state[i]>>>0&255;return o},e.prototype.hashBuffer=function(){for(var e=this,t=e.buffer,r=e.state,i=r[0],o=r[1],s=r[2],a=r[3],u=r[4],c=r[5],f=r[6],l=r[7],h=0;h<n.BLOCK_SIZE;h++){if(h<16)this.temp[h]=(255&t[4*h])<<24|(255&t[4*h+1])<<16|(255&t[4*h+2])<<8|255&t[4*h+3];else{var d=this.temp[h-2],p=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,g=((d=this.temp[h-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[h]=(p+this.temp[h-7]|0)+(g+this.temp[h-16]|0)}var y=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&c^~u&f)|0)+(l+(n.KEY[h]+this.temp[h]|0)|0)|0,v=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&o^i&s^o&s)|0;l=f,f=c,c=u,u=a+y|0,a=s,s=o,o=i,i=y+v|0}r[0]+=i,r[1]+=o,r[2]+=s,r[3]+=a,r[4]+=u,r[5]+=c,r[6]+=f,r[7]+=l},e}()},87408:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var n=r(5291),i=r(47145),o=r(87081),s=r(66240);function a(e){var t=(0,s.convertToBuffer)(e);if(t.byteLength>i.BLOCK_SIZE){var r=new o.RawSha256;r.update(t),t=r.digest()}var n=new Uint8Array(i.BLOCK_SIZE);return n.set(t),n}t.Sha256=function(){function e(e){if(this.hash=new o.RawSha256,e){this.outer=new o.RawSha256;var t=a(e),r=new Uint8Array(i.BLOCK_SIZE);r.set(t);for(var n=0;n<i.BLOCK_SIZE;n++)t[n]^=54,r[n]^=92;this.hash.update(t),this.outer.update(r);for(var n=0;n<t.byteLength;n++)t[n]=0}}return e.prototype.update=function(e){if(!(0,s.isEmptyData)(e)&&!this.error)try{this.hash.update((0,s.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,n.__awaiter)(this,void 0,void 0,function(){return(0,n.__generator)(this,function(e){return[2,this.digestSync()]})})},e}()},88881:(e,t,r)=>{e.exports="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g},89815:(e,t,r)=>{var n=r(75962);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=!!t,t}},90448:(e,t,r)=>{e=r.nmd(e);var n=r(88881),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i&&n.process,a=function(){try{var e=o&&o.require&&o.require("util").types;if(e)return e;return s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},90584:e=>{var t=0x1fffffffffffff,r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var i=typeof e;return!!(n=null==n?t:n)&&("number"==i||"symbol"!=i&&r.test(e))&&e>-1&&e%1==0&&e<n}},90696:e=>{e.exports=function(){return[]}},91110:(e,t,r)=>{var n=r(49038),i=r(20569);e.exports=function(e,t){return n(e,i(e),t)}},91476:(e,t,r)=>{"use strict";r.d(t,{N:()=>iN});var n,i,o,s,a,u,c,f,l,h,d,p,g,y,v,m,b,w,_,S,A,I,E,U,C=r(5291);function x(e){var t=["provider"];return e&&!!t.find(function(t){return e.hasOwnProperty(t)})}function T(e){var t=["customProvider"];return e&&!!t.find(function(t){return e.hasOwnProperty(t)})}function P(e){var t=["customState"];return e&&!!t.find(function(t){return e.hasOwnProperty(t)})}function O(e){return void 0!==e.redirectSignIn}function k(e){return!!e.username}!function(e){e.Cognito="COGNITO",e.Google="Google",e.Facebook="Facebook",e.Amazon="LoginWithAmazon",e.Apple="SignInWithApple"}(n||(n={})),function(e){e.NoConfig="noConfig",e.MissingAuthConfig="missingAuthConfig",e.EmptyUsername="emptyUsername",e.InvalidUsername="invalidUsername",e.EmptyPassword="emptyPassword",e.EmptyCode="emptyCode",e.SignUpError="signUpError",e.NoMFA="noMFA",e.InvalidMFA="invalidMFA",e.EmptyChallengeResponse="emptyChallengeResponse",e.NoUserSession="noUserSession",e.Default="default",e.DeviceConfig="deviceConfig",e.NetworkError="networkError",e.AutoSignInError="autoSignInError"}(i||(i={})),function(e){e.API_KEY="API_KEY",e.AWS_IAM="AWS_IAM",e.OPENID_CONNECT="OPENID_CONNECT",e.AMAZON_COGNITO_USER_POOLS="AMAZON_COGNITO_USER_POOLS",e.AWS_LAMBDA="AWS_LAMBDA"}(o||(o={}));var R="Logging",D=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);
1if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},j=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},F=function(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},N={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"}(s||(s={}));var M=function(){function e(e,t){void 0===t&&(t=s.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},e.prototype._log=function(t){for(var r,n,i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];var a=this.level;e.LOG_LEVEL&&(a=e.LOG_LEVEL),"undefined"!=typeof window&&window.LOG_LEVEL&&(a=window.LOG_LEVEL);var u=N[a];if(N[t]>=u){var c=console.log.bind(console);t===s.ERROR&&console.error&&(c=console.error.bind(console)),t===s.WARN&&console.warn&&(c=console.warn.bind(console));var f="[".concat(t,"] ").concat(this._ts()," ").concat(this.name),l="";if(1===i.length&&"string"==typeof i[0])c(l="".concat(f," - ").concat(i[0]));else if(1===i.length)l="".concat(f," ").concat(i[0]),c(f,i[0]);else if("string"==typeof i[0]){var h=i.slice(1);1===h.length&&(h=h[0]),l="".concat(f," - ").concat(i[0]," ").concat(h),c("".concat(f," - ").concat(i[0]),h)}else l="".concat(f," ").concat(i),c(f,i);try{for(var d=D(this._pluggables),p=d.next();!p.done;p=d.next()){var g=p.value,y={message:l,timestamp:Date.now()};g.pushLogs([y])}}catch(e){r={error:e}}finally{try{p&&!p.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}}},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,F([s.INFO],j(e),!1))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,F([s.INFO],j(e),!1))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,F([s.WARN],j(e),!1))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,F([s.ERROR],j(e),!1))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,F([s.DEBUG],j(e),!1))},e.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,F([s.VERBOSE],j(e),!1))},e.prototype.addPluggable=function(e){e&&e.getCategoryName()===R&&(this._pluggables.push(e),e.configure(this._config))},e.prototype.listPluggables=function(){return this._pluggables},e.LOG_LEVEL=null,e}(),B=function(){return(B=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},L=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},V=function(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},K=new M("Hub"),G="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default";function q(e){return void 0!==e.onHubCapsule}var H=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 r=this.patterns.find(function(t){return t.pattern.source===e.source});if(!r)return void K.warn("No listeners for ".concat(e));this.patterns=V([],L(this.patterns.filter(function(e){return e!==r})),!1)}else{var n=this.listeners[e];if(!n)return void K.warn("No listeners for ".concat(e));this.listeners[e]=V([],L(n.filter(function(e){return e.callback!==t})),!1)}},e.prototype.remove=function(e,t){this._remove(e,t)},e.prototype.dispatch=function(e,t,r,n){void 0===r&&(r=""),this.protectedChannels.indexOf(e)>-1&&n!==G&&K.warn("WARNING: ".concat(e," is protected and dispatching on it can have unintended consequences"));var i={channel:e,payload:B({},t),source:r,patternInfo:[]};try{this._toListeners(i)}catch(e){K.error(e)}},e.prototype.listen=function(e,t,r){var n,i=this;if(void 0===r&&(r="noname"),q(t))K.warn("WARNING onHubCapsule is Deprecated. Please pass in a callback."),n=t.onHubCapsule.bind(t);else if("function"!=typeof t)throw Error("No callback supplied to Hub");else n=t;if(e instanceof RegExp)this.patterns.push({pattern:e,callback:n});else{var o=this.listeners[e];o||(o=[],this.listeners[e]=o),o.push({name:r,callback:n})}return function(){i._remove(e,n)}},e.prototype._toListeners=function(e){var t=e.channel,r=e.payload,n=this.listeners[t];
1if(n&&n.forEach(function(n){K.debug("Dispatching to ".concat(t," with "),r);try{n.callback(e)}catch(e){K.error(e)}}),this.patterns.length>0){if(!r.message)return void K.warn("Cannot perform pattern matching without a message key");var i=r.message;this.patterns.forEach(function(t){var r=i.match(t.pattern);if(r){var n=L(r).slice(1),o=B(B({},e),{patternInfo:n});try{t.callback(o)}catch(e){K.error(e)}}})}},e}())("__default__"),z={},W=function(){function e(){}return e.setItem=function(e,t){return z[e]=t,z[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call(z,e)?z[e]:void 0},e.removeItem=function(e){return delete z[e]},e.clear=function(){return z={}},e}(),Y=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=W}}return e.prototype.getStorage=function(){return this.storageWindow},e}(),J=r(37811),$=function(e){if(e.isResolved)return e;var t=!0,r=!1,n=!1,i=e.then(function(e){return n=!0,t=!1,e},function(e){throw r=!0,t=!1,e});return i.isFullfilled=function(){return n},i.isPending=function(){return t},i.isRejected=function(){return r},i},Z=function(){return{isBrowser:"undefined"!=typeof window&&void 0!==window.document,isNode:void 0!==J&&null!=J.versions&&null!=J.versions.node}},X=function(){var e=function(t,r){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Q=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())})},ee=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return u([e,t])}}function u(a){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},et=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},er=function(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},en=new M("Util"),ei=function(e){function t(t){var r=e.call(this,t)||this;return r.nonRetryable=!0,r}return X(t,e),t}(Error),eo=function(e){var t="nonRetryable";return e&&e[t]};function es(e,t,r,n){return Q(this,void 0,void 0,function(){var i=this;return ee(this,function(o){if("function"!=typeof e)throw Error("functionToRetry must be a function");return[2,new Promise(function(o,s){return Q(i,void 0,void 0,function(){var i,a,u,c,f,l,h;return ee(this,function(d){switch(d.label){case 0:i=0,a=!1,c=function(){},n&&n.then(function(){a=!0,clearTimeout(u),c()}),l=function(){var n,l,h,d;return ee(this,function(p){switch(p.label){case 0:i++,en.debug("".concat(e.name," attempt #").concat(i," with this vars: ").concat(JSON.stringify(t))),p.label=1;
1case 1:return p.trys.push([1,3,,7]),n={},l=o,[4,e.apply(void 0,er([],et(t),!1))];case 2:return[2,(n.value=l.apply(void 0,[p.sent()]),n)];case 3:if(f=h=p.sent(),en.debug("error on ".concat(e.name),h),eo(h))return en.debug("".concat(e.name," non retryable error"),h),[2,{value:s(h)}];if(d=r(i,t,h),en.debug("".concat(e.name," retrying in ").concat(d," ms")),!(!1===d||a))return[3,4];return[2,{value:s(h)}];case 4:return[4,new Promise(function(e){u=setTimeout(c=e,d)})];case 5:p.sent(),p.label=6;case 6:return[3,7];case 7:return[2]}})},d.label=1;case 1:if(a)return[3,3];return[5,l()];case 2:if("object"==typeof(h=d.sent()))return[2,h.value];return[3,1];case 3:return s(f),[2]}})})})]})})}var ea=3e5;function eu(e){void 0===e&&(e=ea);var t=100,r=100;return function(n){var i=Math.pow(2,n)*t+r*Math.random();return!(i>e)&&i}}var ec=function(e,t,r,n){return void 0===r&&(r=ea),es(e,t,eu(r),n)},ef=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())})},el=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return u([e,t])}}function u(a){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},eh=new M("CognitoCredentials"),ed=new Promise(function(e,t){return Z().isBrowser?(window.gapi&&window.gapi.auth2?window.gapi.auth2:null)?(eh.debug("google api already loaded"),e()):void setTimeout(function(){return e()},2e3):(eh.debug("not in the browser, directly resolved"),e())}),ep=function(){function e(){this.initialized=!1,this.refreshGoogleToken=this.refreshGoogleToken.bind(this),this._refreshGoogleTokenImpl=this._refreshGoogleTokenImpl.bind(this)}return e.prototype.refreshGoogleToken=function(){return ef(this,void 0,void 0,function(){return el(this,function(e){switch(e.label){case 0:if(this.initialized)return[3,2];return eh.debug("need to wait for the Google SDK loaded"),[4,ed];case 1:e.sent(),this.initialized=!0,eh.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshGoogleTokenImpl()]}})})},e.prototype._refreshGoogleTokenImpl=function(){var e=null;return(Z().isBrowser&&(e=window.gapi&&window.gapi.auth2?window.gapi.auth2:null),e)?new Promise(function(t,r){e.getAuthInstance().then(function(e){e||(eh.debug("google Auth undefined"),r(new ei("google Auth undefined")));var n=e.currentUser.get();n.isSignedIn()?(eh.debug("refreshing the google access token"),n.reloadAuthResponse().then(function(e){t({token:e.id_token,expires_at:e.expires_at})}).catch(function(e){e&&"network_error"===e.error?r("Network error reloading google auth response"):r(new ei("Failed to reload google auth response"))})):r(new ei("User is not signed in with Google"))}).catch(function(e){eh.debug("Failed to refresh google token",e),r(new ei("Failed to refresh google token"))})}):(eh.debug("no gapi auth2 available"),Promise.reject("no gapi auth2 available"))},e}(),eg=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())})},ey=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return u([e,t])}}function u(a){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},ev=new M("CognitoCredentials"),em=new Promise(function(e,t){return Z().isBrowser?window.FB?(ev.debug("FB SDK already loaded"),e()):void setTimeout(function(){return e()},2e3):(ev.debug("not in the browser, directly resolved"),e())}),eb=function(){function e(){this.initialized=!1,this.refreshFacebookToken=this.refreshFacebookToken.bind(this),this._refreshFacebookTokenImpl=this._refreshFacebookTokenImpl.bind(this)}return e.prototype.refreshFacebookToken=function(){return eg(this,void 0,void 0,function(){return ey(this,function(e){switch(e.label){case 0:if(this.initialized)return[3,2];return ev.debug("need to wait for the Facebook SDK loaded"),[4,em];case 1:e.sent(),this.initialized=!0,ev.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshFacebookTokenImpl()]}})})},e.prototype._refreshFacebookTokenImpl=function(){var e=null;if(Z().isBrowser&&(e=window.FB),!e){var t="no fb sdk available";return ev.debug(t),Promise.reject(new ei(t))}return new Promise(function(t,r){e.getLoginStatus(function(e){if(e&&e.authResponse){var n=e.authResponse,i=n.accessToken,o=1e3*n.expiresIn+new Date().getTime();if(!i){var s="the jwtToken is undefined";ev.debug(s),r(new ei(s))}t({token:i,expires_at:o})}else{var s="no response from facebook when refreshing the jwt token";ev.debug(s),r(new ei(s))}},{scope:"public_profile,email"})})},e}(),ew=new ep,e_=new eb,eS=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},eA=new M("Amplify"),eI=new(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=M,this.ServiceWorker=null}return e.prototype.register=function(e){eA.debug("component registered in amplify",e),this._components.push(e),"function"==typeof e.getModuleName?(this._modules[e.getModuleName()]=e,this[e.getModuleName()]=e):eA.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),eA.debug("amplify config",this._config),Object.entries(this._modules).forEac
1h(function(e){var r=eS(e,2),n=(r[0],r[1]);Object.keys(n).forEach(function(e){t._modules[e]&&(n[e]=t._modules[e])})}),this._components.map(function(e){e.configure(t._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}()),eE={id:"aws",outputs:{dnsSuffix:"amazonaws.com"},regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",regions:["aws-global"]},eU={partitions:[eE,{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn"},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:["aws-cn-global"]}]},eC=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ex=function(e){var t,r,n=eU.partitions;try{for(var i=eC(n),o=i.next();!o.done;o=i.next()){var s=o.value,a=s.regions,u=s.outputs,c=s.regionRegex,f=new RegExp(c);if(a.includes(e)||f.test(e))return u.dnsSuffix}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return eE.outputs.dnsSuffix},eT=function(){return(eT=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},eP=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())})},eO=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return u([e,t])}}function u(a){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},ek=3,eR=function(e){var t=e.maxAttempts,r=void 0===t?ek:t,n=e.retryDecider,i=e.computeDelay,o=e.abortSignal;if(r<1)throw Error("maxAttempts must be greater than 0");return function(e,t){return function(s){var a;return eP(this,void 0,void 0,function(){var u,c,f,l;return eO(this,function(h){switch(h.label){case 0:c=null!=(a=t.attemptsCount)?a:0,l=function(){if(f)return ej(f,c),f;throw ej(u,c),u},h.label=1;case 1:if(!(!(null==o?void 0:o.aborted)&&c<r))return[3,11];h.label=2;case 2:return h.trys.push([2,4,,5]),[4,e(s)];case 3:return f=h.sent(),u=void 0,[3,5];case 4:return u=h.sent(),f=void 0,[3,5];case 5:return c=t.attemptsCount>c?t.attemptsCount:c+1,t.attemptsCount=c,[4,n(f,u)];case 6:if(!h.sent())return[3,9];if(!(!(null==o?void 0:o.aborted)&&c<r))return[3,8];return[4,eD(i(c),o)];case 7:h.sent(),h.label=8;case 8:case 10:return[3,1];case 9:return[2,l()];case 11:if(null==o||!o.aborted)return[2,l()];throw Error("Request aborted.")}})})}}},eD=function(e,t){if(null==t?void 0:t.aborted)return Promise.resolve();var r,n,i=new Promise(function(t){n=t,r=setTimeout(t,e)});return null==t||t.addEventListener("abort",function e(i){clearTimeout(r),null==t||t.removeEventListener("abort",e),n()}),i},ej=function(e,t){var r;"[object Object]"===Object.prototype.toString.call(e)&&(e.$metadata=eT(eT({},null!=(r=e.$metadata)?r:{}),{attempts:t}))},eF=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())})},eN=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return u([e,t])}}function u(a){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},eM=function(e){var t=e.userAgentHeader,r=void 0===t?"x-amz-user-agent":t,n=e.userAgentValue,i=void 0===n?"":n;return function(e){return function(t){return eF(this,void 0,void 0,function(){var n;return eN(this,function(o){switch(o.label){case 0:if(0!==i.trim().length)return[3,2];return[4,e(t)];case 1:case 3:return[2,o.sent()];case 2:return n=r.toLowerCase(),t.headers[n]=t.headers[n]?"".concat(t.headers[n]," ").concat(i):i,[4,e(t)]}})})}}},eB=function(e,t){return function(r,n){for(var i={},o=function(t){return e(t,n)},s=t.length-1;s>=0;s--)o=(0,t[s])(n)(o,i);return o(r)}};r(52302);var eL=function(e){var t;return function(){return t||(t=e()),t}},eV=function(){return(eV=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},eK=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())})},eG=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return u([e,t])}}function u(a){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},eq=function(e){return!["HEAD","GET","DELETE"].includes(e.toUpperCase())},eH=eB(function(e,t){var r=e.url,n=e.method,i=e.headers,o=e.body,s=t.abortSignal;return eK(void 0,void 0,void 0,function(){var e,t,a,u,c,f,l;return eG(this,function(h){switch(h.label){case 0:return h.trys.push([0,2,,3]),[4,fetch(r,{method:n,headers:i,body:eq(n)?o:void 0,signal:s})];case 1:return e=h.sent(),[3,3];case 2:if((t=h.sent())instanceof TypeError)throw Error("Network error");throw t;case 3:return a={},null==(f=e.headers)||f.forEach(function(e,t){a[t.toLowerCase()]=e}),u={statusCode:e.status,headers:a,body:null},c=Object.assign(null!=(l=e.body)?l:{},{text:eL(function(){return e.text()}),blob:eL(function(){return e.blob()}),json:eL(function(){return e.json()})}),[2,eV(eV({},u),{body:c})]}})})},[eM,eR]),ez=function(){return(ez=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},eW=function(e){var t,r,n=e.headers,i=e.statusCode;return ez(ez({},eY(e)?e.$metadata:{}),{httpStatusCode:i,requestId:null!=(r=null!=(t=n["x-amzn-requestid"])?t:n["x-amzn-request-id"])?r:n["x-amz-request-id"],extendedRequestId:n["x-amz-id-2"],cfId:n["x-amz-cf-id"]})},eY=function(e){return"object"==typeof(null==e?void 0:e.$metadata)},eJ=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())})},e$=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return u([e,t])}}function u(a){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},eZ=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},eX=function(e){return eJ(void 0,void 0,void 0,function(){var t,r,n,i,o,s,a;return e$(this,function(u){switch(u.label){case 0:if(!e||e.statusCode<300)return[2];return[4,eQ(e)];case 1:return t=u.sent(),r=function(e){var t=eZ(e.toString().split(/[\,\:]+/),1)[0];return t.includes("#")?t.split("#")[1]:t}(null!=(o=null!=(i=null!=(n=e.headers["x-amzn-errortype"])?n:t.code)?i:t.__type)?o:"UnknownError"),[2,Object.assign(Error(null!=(a=null!=(s=t.message)?s:t.Message)?a:"Unknown error"),{name:r,$metadata:eW(e)})]}})})},eQ=function(e){return eJ(void 0,void 0,void 0,function(){return e$(this,function(t){switch(t.label){case 0:if(!e.body)throw Error("Missing response payload");return[4,e.body.json()];case 1:return[2,Object.assign(t.sent(),{$metadata:eW(e)})]}})})},e0=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch","BadRequestException"],e1=function(e){return e0.includes(e)},e2=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())})},e3=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return u([e,t])}}function u(a){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},e6=function(e){return function(t,r){return e2(void 0,void 0,void 0,function(){var n,i,o,s;return e3(this,function(a){switch(a.label){case 0:if(null==r)return[3,1];return i=r,[3,3];case 1:return[4,e(t)];case 2:i=a.sent(),a.label=3;case 3:return n=(null!=(s=i)?s:{}).name,o=null==t?void 0:t.statusCode,[2,e9(r)||e8(o,n)||e1(n)||e7(o,n)]}})})}},e5=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException"],e4=["TimeoutError","RequestTimeout","RequestTimeoutException"],e8=function(e,t){return 429===e||e5.includes(t)},e9=function(e){return(null==e?void 0:e.name)==="Network error"},e7=function(e,t){return[500,502,503,504].includes(e)||e4.includes(t)},te=3e5,tt=function(e){var t=eu(te)(e);return!1===t?te:t};!function(e){e.WebUnknown="0",e.React="1",e.NextJs="2",e.Angular="3",e.VueJs="4",e.Nuxt="5",e.Svelte="6",e.ServerSideUnknown="100",e.ReactSSR="101",e.NextJsSSR="102",e.AngularSSR="103",e.VueJsSSR="104",e.NuxtSSR="105",e.SvelteSSR="106",e.ReactNative="201",e.Expo="202"}(a||(a={})),function(e){e.API="api",e.Auth="auth",e.Analytics="analytics",e.DataStore="datastore",e.Geo="geo",e.InAppMessaging="inappmessaging",e.Interactions="interactions",e.Predictions="predictions",e.PubSub="pubsub",e.PushNotification="pushnotification",e.Storage="storage"}(u||(u={})),function(e){e.Record="1",e.UpdateEndpoint="2"}(c||(c={})),function(e){e.GraphQl="1",e.Get="2",e.Post="3",e.Put="4",e.Patch="5",e.Del="6",e.Head="7"}(f||(f={})),function(e){e.FederatedSignIn="30"}(l||(l={})),function(e){e.Subscribe="1",e.GraphQl="2"}(h||(h={})),function(e){e.None="0"}(d||(d={})),function(e){e.None="0"}(p||(p={})),function(e){e.None="0"}(g||(g={})),function(e){e.Convert="1",e.Identify="2",e.Interpret="3"}(y||(y={})),function(e){e.Subscribe="1"}(v||(v={})),function(e){e.None="0"}(m||(m={})),function(e){e.Put="1",e.Get="2",e.List="3",e.Copy="4",e.Remove="5",e.GetProperties="6"}(b||(b={}));var tr="5.3.26",tn=r(37811),ti=function(){return void 0!==r.g},to=function(){return"undefined"!=typeof window},ts=function(){return"undefined"!=typeof document},ta=function(){return void 0!==tn},tu=function(e,t){return!!Object.keys(e).find(function(e){return e.startsWith(t)})},tc=r(37811);function tf(){var e=function(e){return e.startsWith("_react")||e.startsWith("__react")},t=function(t){return Object.keys(t).find(e)}
1,r=function(){return Array.from(document.querySelectorAll("[id]"))};return ts()&&r().some(t)}function tl(){return ta()&&void 0!==tc.env&&!!Object.keys(tc.env).find(function(e){return e.includes("react")})}function th(){return to()&&tu(window,"__VUE")}function td(){return ti()&&tu(r.g,"__VUE")}var tp=r(37811);function tg(){return to()&&tu(window,"__SVELTE")}function ty(){return ta()&&void 0!==tp.env&&!!Object.keys(tp.env).find(function(e){return e.includes("svelte")})}function tv(){return to()&&window.next&&"object"==typeof window.next}function tm(){return ti()&&(tu(r.g,"__next")||tu(r.g,"__NEXT"))}function tb(){return to()&&(void 0!==window.__NUXT__||void 0!==window.$nuxt)}function tw(){return ti()&&void 0!==r.g.__NUXT_PATHS__}var t_=r(37811);function tS(){var e=!!(ts()&&document.querySelector("[ng-version]")),t=!!(to()&&void 0!==window.ng);return e||t}function tA(){var e;return ta()&&"object"==typeof t_.env&&(null==(e=t_.env.npm_lifecycle_script)?void 0:e.startsWith("ng "))||!1}function tI(){return"undefined"!=typeof navigator&&void 0!==navigator.product&&"ReactNative"===navigator.product}function tE(){return ti()&&void 0!==r.g.expo}function tU(){return to()}var tC=[{platform:a.Expo,detectionMethod:tE},{platform:a.ReactNative,detectionMethod:tI},{platform:a.NextJs,detectionMethod:tv},{platform:a.Nuxt,detectionMethod:tb},{platform:a.Angular,detectionMethod:tS},{platform:a.React,detectionMethod:tf},{platform:a.VueJs,detectionMethod:th},{platform:a.Svelte,detectionMethod:tg},{platform:a.WebUnknown,detectionMethod:tU},{platform:a.NextJsSSR,detectionMethod:tm},{platform:a.NuxtSSR,detectionMethod:tw},{platform:a.ReactSSR,detectionMethod:tl},{platform:a.VueJsSSR,detectionMethod:td},{platform:a.AngularSSR,detectionMethod:tA},{platform:a.SvelteSSR,detectionMethod:ty}];function tx(){var e;return(null==(e=tC.find(function(e){return e.detectionMethod()}))?void 0:e.platform)||a.ServerSideUnknown}var tT=[],tP=!1,tO=10,tk=10,tR=1e3,tD=function(){if(!w){if(w=tx(),tP)for(;tT.length;)tT.pop()();else tT.forEach(function(e){return e()});tN(a.ServerSideUnknown,tO),tN(a.WebUnknown,tk)}return w},tj=function(e){tP||tT.push(e)};function tF(){w=void 0}function tN(e,t){w!==e||tP||setTimeout(function(){tF(),tP=!0,setTimeout(tD,tR)},t)}var tM=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},tB="aws-amplify",tL=new(function(){function e(){this.userAgent="".concat(tB,"/").concat(tr)}return Object.defineProperty(e.prototype,"framework",{get:function(){return tD()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isReactNative",{get:function(){return this.framework===a.ReactNative||this.framework===a.Expo},enumerable:!1,configurable:!0}),e.prototype.observeFrameworkChanges=function(e){tj(e)},e}()),tV=function(e){var t=void 0===e?{}:e,r=t.category,n=t.action;t.framework;var i=[[tB,tr]];return r&&i.push([r,n]),i.push(["framework",tD()]),i},tK=function(e){return tV(e).map(function(e){var t=tM(e,2),r=t[0],n=t[1];return"".concat(r,"/").concat(n)}).join(" ")},tG=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())})},tq=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return u([e,t])}}function u(a){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},tH="cognito-identity",tz=function(e){var t=e.region;
1return{url:new URL("https://cognito-identity.".concat(t,".").concat(ex(t)))}},tW=eB(eH,[function(){return function(e,t){return function(t){return tG(this,void 0,void 0,function(){return tq(this,function(r){return t.headers["cache-control"]="no-store",[2,e(t)]})})}}}]),tY={service:tH,endpointResolver:tz,retryDecider:e6(eX),computeDelay:tt,userAgentValue:tK()};tj(function(){tY.userAgentValue=tK()});var tJ=function(e){return{"content-type":"application/x-amz-json-1.1","x-amz-target":"AWSCognitoIdentityService.".concat(e)}},t$=function(e,t,r){return{headers:t,url:e.url,body:r,method:"POST"}},tZ=function(){return(tZ=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},tX=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())})},tQ=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return u([e,t])}}function u(a){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},t0=function(e,t,r,n){return function(i,o){return tX(void 0,void 0,void 0,function(){var s;return tQ(this,function(a){switch(a.label){case 0:return[4,(s=tZ(tZ({},n),i)).endpointResolver(s,o)];case 1:return[4,t(o,a.sent())];case 2:return[4,e(a.sent(),tZ({},s))];case 3:return[4,r(a.sent())];case 4:return[2,a.sent()]}})})}},t1=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())})},t2=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return u([e,t])}}function u(a){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},t3=t0(tW,function(e,t){return t$(t,tJ("GetId"),JSON.stringify(e))},function(e){return t1(void 0,void 0,void 0,function(){return t2(this,function(t){switch(t.label){case 0:if(!(e.statusCode>=300))return[3,2];return[4,eX(e)];case 1:throw t.sent();case 2:return[4,eQ(e)];case 3:return[2,{IdentityId:t.sent().IdentityId,$metadata:eW(e)}]}})})},tY),t6=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())})},t5=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return u([e,t])}}function u(a){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},t4=function(e){return void 0===e&&(e={}),{AccessKeyId:e.AccessKeyId,SecretKey:e.SecretKey,SessionToken:e.SessionToken,Expiration:new Date(1e3*e.Expiration)}},t8=t0(tW,function(e,t){return t$(t,tJ("GetCredentialsForIdentity"),JSON.stringify(e))},function(e){return t6(void 0,void 0,void 0,function(){var t;return t5(this,function(r){switch(r.label){case 0:if(!(e.statusCode>=300))return[3,2];return[4,eX(e)];case 1:throw r.sent();case 2:return[4,eQ(e)];case 3:return[2,{IdentityId:(t=r.sent()).IdentityId,Credentials:t4(t.Credentials),$metadata:eW(e)}]}})})},tY),t9=function(){return(t9=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},t7=new M("Parser"),re=function(e){var t,r={};
1return e.aws_mobile_analytics_app_id&&(r.Analytics={AWSPinpoint:{appId:e.aws_mobile_analytics_app_id,region:e.aws_mobile_analytics_app_region}}),(e.aws_cognito_identity_pool_id||e.aws_user_pools_id)&&(r.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&&(r.Logging=t9(t9({},e.Logging),{region:e.aws_project_region})),e.geo&&(r.Geo=Object.assign({},e.geo),e.geo.amazon_location_service&&(r.Geo={AmazonLocationService:e.geo.amazon_location_service})),r.Analytics=Object.assign({},r.Analytics,e.Analytics),r.Auth=Object.assign({},r.Auth,e.Auth),r.Storage=Object.assign({},t),r.Logging=Object.assign({},r.Logging,e.Logging),t7.debug("parse config",e,"to amplifyconfig",r),r},rt=function(){return(rt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},rr=function(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?r(e.value):i(e.value).then(s,a)}u((n=n.apply(e,t||[])).next())})},rn=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return u([e,t])}}function u(a){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},ri=new M("Credentials"),ro=3e6,rs="CognitoIdentityId-",ra="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",ru=function(e,t,r){H.dispatch("core",{event:e,data:t,message:r},"Credentials",ra)},rc=new(function(){function e(e){this._gettingCredPromise=null,this._refreshHandlers={},this.Auth=void 0,this.configure(e),this._refreshHandlers.google=ew.refreshGoogleToken,this._refreshHandlers.facebook=e_.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=rt(rt({},this._refreshHandlers),t)),this._storage=this._config.storage,this._storage||(this._storage=new Y().getStorage()),this._storageSync=Promise.resolve(),"function"==typeof this._storage.sync&&(this._storageSync=this._storage.sync()),ru("credentials_configured",null,"Credentials has been configured successfully"),this._config},e.prototype.get=function(){return ri.debug("getting credentials"),this._pickupCredentials()},e.prototype._getCognitoIdentityIdStorageKey=function(e){return"".concat(rs).concat(e)},e.prototype._pickupCredentials=function(){return ri.debug("picking up credentials"),this._gettingCredPromise&&this._gettingCredPromise.isPending()?ri.debug("getting old cred promise"):(ri.debug("getting new cred promise"),this._gettingCredPromise=$(this._keepAlive())),this._gettingCredPromise},e.prototype._keepAlive=function(){return rr(this,void 0,void 0,function(){var e,t,r,n,i,o;return rn(this,function(s){switch(s.label){case 0:if(ri.debug("checking if credentials exists and not expired"),(e=this._credentials)&&!this._isExpired(e)&&!this._isPastTTL())return ri.debug("credentials not changed and not expired, directly return"),[2,Promise.resolve(e)];if(ri.debug("need to get a new credential or refresh the existing one"),!(r=void 0===(t=this.Auth)?eI.Auth:t)||"function"!=typeof r.currentUserCredentials)return[2,this._setCredentialsForGuest()];
1if(!(!this._isExpired(e)&&this._isPastTTL()))return[3,6];ri.debug("ttl has passed but token is not yet expired"),s.label=1;case 1:return s.trys.push([1,5,,6]),[4,r.currentUserPoolUser()];case 2:return n=s.sent(),[4,r.currentSession()];case 3:return i=s.sent().refreshToken,[4,new Promise(function(e,t){n.refreshSession(i,function(r,n){return r?t(r):e(n)})})];case 4:return s.sent(),[3,6];case 5:return o=s.sent(),ri.debug("Error attempting to refreshing the session",o),[3,6];case 6:return[2,r.currentUserCredentials()]}})})},e.prototype.refreshFederatedToken=function(e){ri.debug("Getting federated credentials");var t=e.provider,r=e.user,n=e.token,i=e.identity_id,o=e.expires_at;o=1970===new Date(o).getFullYear()?1e3*o:o;var s=this;return(ri.debug("checking if federated jwt token expired"),o>new Date().getTime())?(ri.debug("token not expired"),this._setCredentialsFromFederation({provider:t,token:n,user:r,identity_id:i,expires_at:o})):s._refreshHandlers[t]&&"function"==typeof s._refreshHandlers[t]?(ri.debug("getting refreshed jwt token from federation provider"),this._providerRefreshWithRetry({refreshHandler:s._refreshHandlers[t],provider:t,user:r})):(ri.debug("no refresh handler for provider:",t),this.clear(),Promise.reject("no refresh handler for provider"))},e.prototype._providerRefreshWithRetry=function(e){var t=this,r=e.refreshHandler,n=e.provider,i=e.user;return ec(r,[],1e4).then(function(e){return ri.debug("refresh federated token sucessfully",e),t._setCredentialsFromFederation({provider:n,token:e.token,user:i,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(),ri.debug("refresh federated token failed",e),Promise.reject("refreshing federation token failed: "+e)})},e.prototype._isExpired=function(e){if(!e)return ri.debug("no credentials for expiration check"),!0;ri.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(){var e;return rr(this,void 0,void 0,function(){var t,r,n,i,o,s,a,u,c,f=this;return rn(this,function(l){switch(l.label){case 0:if(ri.debug("setting credentials for guest"),(null==(e=this._config)?void 0:e.identityPoolId)||(this._config=Object.assign({},this._config,re(this._config||{}
1).Auth)),r=(t=this._config).identityPoolId,n=t.region,i=t.mandatorySignIn,o=t.identityPoolRegion,i)return[2,Promise.reject("cannot get guest credentials when mandatory signin enabled")];if(!r)return ri.debug("No Cognito Identity pool provided for unauthenticated access"),[2,Promise.reject("No Cognito Identity pool provided for unauthenticated access")];if(!o&&!n)return ri.debug("region is not configured for getting the credentials"),[2,Promise.reject("region is not configured for getting the credentials")];return a=this,[4,this._getGuestIdentityId()];case 1:return s=a._identityId=l.sent(),u={region:null!=o?o:n},c=(function(){return rr(f,void 0,void 0,function(){var e,t;return rn(this,function(n){switch(n.label){case 0:if(s)return[3,2];return[4,t3(u,{IdentityPoolId:r})];case 1:e=n.sent().IdentityId,this._identityId=e,n.label=2;case 2:return[4,t8(u,{IdentityId:this._identityId})];case 3:return t=n.sent().Credentials,[2,{identityId:this._identityId,accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretKey,sessionToken:t.SessionToken,expiration:t.Expiration}]}})})})().catch(function(e){return rr(f,void 0,void 0,function(){return rn(this,function(t){throw e})})}),[2,this._loadCredentials(c,"guest",!1,null).then(function(e){return e}).catch(function(e){return rr(f,void 0,void 0,function(){var t=this;return rn(this,function(n){switch(n.label){case 0:if("ResourceNotFoundException"!==e.name||e.message!=="Identity '".concat(s,"' not found."))return[3,2];return ri.debug("Failed to load guest credentials"),[4,this._removeGuestIdentityId()];case 1:return n.sent(),c=(function(){return rr(t,void 0,void 0,function(){var e,t;return rn(this,function(n){switch(n.label){case 0:return[4,t3(u,{IdentityPoolId:r})];case 1:return e=n.sent().IdentityId,this._identityId=e,[4,t8(u,{IdentityId:e})];case 2:return t=n.sent().Credentials,[2,{identityId:e,accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretKey,sessionToken:t.SessionToken,expiration:t.Expiration}]}})})})().catch(function(e){return rr(t,void 0,void 0,function(){return rn(this,function(t){throw e})})}),[2,this._loadCredentials(c,"guest",!1,null)];case 2:return[2,e]}})})})]}})})},e.prototype._setCredentialsFromFederation=function(e){var t=this,r=e.provider,n=e.token,i=e.identity_id,o={google:"accounts.google.com",facebook:"graph.facebook.com",amazon:"www.amazon.com",developer:"cognito-identity.amazonaws.com"}[r]||r;if(!o)return Promise.reject("You must specify a federated provider");var s={};s[o]=n;var a=this._config,u=a.identityPoolId,c=a.region,f=a.identityPoolRegion;if(!u)return ri.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");if(!f&&!c)return ri.debug("region is not configured for getting the credentials"),Promise.reject("region is not configured for getting the credentials");var l={region:null!=f?f:c},h=(function(){return rr(t,void 0,void 0,function(){var e;return rn(this,function(t){switch(t.label){case 0:if(i)return[3,2];return[4,t3(l,{IdentityPoolId:u,Logins:s})];case 1:i=t.sent().IdentityId,t.label=2;case 2:return[4,t8(l,{IdentityId:i,Logins:s})];case 3:return e=t.sent().Credentials,[2,{identityId:i,accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretKey,sessionToken:e.SessionToken,expiration:e.Expiration}]}})})})().catch(function(e){return rr(t,void 0,void 0,function(){return rn(this,function(t){throw e})})});return this._loadCredentials(h,"federated",!0,e)},e.prototype._setCredentialsFromSession=function(e){var t=this;ri.debug("set credentials from session");var r=e.getIdToken().getJwtToken(),n=this._config,i=n.region,o=n.userPoolId,s=n.identityPoolId,a=n.identityPoolRegion;if(!s)return ri.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");if(!a&&!i)return ri.debug("region is not configured for getting the credentials"),Promise.reject("region is not configured for getting the credentials");var u={};u["cognito-idp."+i+".amazonaws.com/"+o]=r;var c={region:null!=a?a:i},f=(function(){return rr(t,void 0,void 0,function(){var e,t,r,n,i,o,a,f,l;return rn(this,function(h){switch(h.label){case 0:return[4,this._getGuestIdentityId()];case 1:if(e=h.sent())return[3,3];return[4,t3(c,{IdentityPoolId:s,Logins:u})];case 2:t=h.sent().IdentityId,h.label=3;case 3:return[4,t8(c,{IdentityId:e||t,Logins:u})];case 4:if(i=(n=(r=h.sent()).Credentials).AccessKeyId,o=n.Expiration,a=n.SecretKey,f=n.SessionToken,l=r.IdentityId,this._identityId=l,!e)return[3,6];return ri.debug("The guest identity ".concat(e," has been successfully linked to the logins")),e===l&&ri.debug("The guest identity ".concat(e," has become the primary identity")),[4,this._removeGuestIdentityId()];case 5:h.sent(),h.label=6;case 6:return[2,{accessKeyId:i,secretAccessKey:a,sessionToken:f,expiration:o,identityId:l}]}})})})().catch(function(e){return rr(t,void 0,void 0,function(){return rn(this,function(t){throw e})})});return this._loadCredentials(f,"userPool",!0,null)},e.prototype._loadCredentials=function(e,t,r,n){var i=this,o=this;return new Promise(function(s,a){e.then(function(e){return rr(i,void 0,void 0,function(){var i,a,u,c,f;return rn(this,function(l){switch(l.label){case 0:if(ri.debug("Load credentials successfully",e),this._identityId&&!e.identityId&&(e.identityId=this._identityId),o._credentials=e,o._credentials.authenticated=r,o._credentials_source=t,o._nextCredentialsRefresh=new Date().getTime()+ro,"federated"===t){i=Object.assign({id:this._credentials.identityId},n.user),a=n.provider,u=n.token,c=n.expires_at,f=n.identity_id;try{this._storage.setItem("aws-amplify-federatedInfo",JSON.stringify({provider:a,token:u,user:i,expires_at:c,identity_id:f}))}catch(e){ri.debug("Failed to put federated info into auth storage",e)}}if("guest"!==t)return[3,2];return[4,this._setGuestIdentityId(e.identityId)];case 1:l.sent(),l.label=2;case 2:return s(o._credentials),[2]}})})}).catch(function(t){if(t){ri.debug("Failed to load credentials",e),ri.debug("Error loading credentials",t),a(t);return}})})},e.prototype.set=function(e,t){return"session"===t?this._setCredentialsFromSession(e):"federation"===t?this._setCredentialsFromFederation(e):"guest"===t?this._setCredentialsForGuest():(ri.debug("no source specified for setting credentials"),Promise.reject("invalid source"))},e.prototype.clear=function(){return rr(this,void 0,void 0,function(){return rn(this,function(e){return this._credentials=null,this._credentials_source=null,ri.debug("removing aws-amplify-federatedInfo from storage"),this._storage.removeItem("aws-amplify-federatedInfo"),[2]})})},e.prototype._getGuestIdentityId=function(){return rr(this,void 0,void 0,function(){var e,t;return rn(this,function(r){switch(r.label){case 0:e=this._config.identityPoolId,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this._storageSync];case 2:return r.sent(),[2,this._storage.getItem(this._getCognitoIdentityIdStorageKey(e))];case 3:return t=r.sent(),ri.debug("Failed to get the cached guest identityId",t),[3,4];case 4:return[2]}})})},e.prototype._setGuestIdentityId=function(e){return rr(this,void 0,void 0,function(){var t,r;return rn(this,function(n){switch(n.label){case 0:t=this._config.identityPoolId,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this._storageSync];case 2:return n.sent(),this._storage.setItem(this._getCognitoIdentityIdStorageKey(t),e),[3,4];case 3:return r=n.sent(),ri.debug("Failed to cache guest identityId",r),[3,4];case 4:return[2]}})})},e.prototype._removeGuestIdentityId=function(){return rr(this,void 0,void 0,function(){var e;return rn(this,function(t){return e=this._config.identityPoolId,ri.debug("removing ".concat(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}())(null);eI.register(rc);var rf={},rl=function(){if(_)return rf;_=1,rf.parse=s,rf.serialize=c;var e=Object.prototype.toString,t=Object.prototype.hasOwnProperty,r=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,n=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,i=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,o=/^[\u0020-\u003A\u003D-\u007E]*$/;function s(e,r){if("string"!=typeof e)throw TypeError("argument str must be a string");var n={},i=e.length;if(i<2)return n;var o=r&&r.decode||f,s=0,c=0,l=0;do{if(-1===(c=e.indexOf("=",s)))break;if(-1===(l=e.indexOf(";",s)))l=i;else if(c>l){s=e.lastIndexOf(";",c-1)+1;continue}var d=a(e,s,c),p=u(e,c,d),g=e.slice(d,p);if(!t.call(n,g)){var y=a(e,c+1,l),v=u(e,l,y);34===e.charCodeAt(y)&&34===e.charCodeAt(v-1)&&(y++,v--);var m=e.slice(y,v);n[g]=h(m,o)}s=l+1}while(s<i);return n}function a(e,t,r){do{var n=e.charCodeAt(t);if(32!==n&&9!==n)return t}while(++t<r);return r}function u(e,t,r){for(;t>r;){var n=e.charCodeAt(--t);if(32!==n&&9!==n)return t+1}return r}function c(e,t,s){var a=s&&s.encode||encodeURIComponent;if("function"!=typeof a)throw TypeError("option encode is invali
1d");if(!r.test(e))throw TypeError("argument name is invalid");var u=a(t);if(!n.test(u))throw TypeError("argument val is invalid");var c=e+"="+u;if(!s)return c;if(null!=s.maxAge){var f=Math.floor(s.maxAge);if(!isFinite(f))throw TypeError("option maxAge is invalid");c+="; Max-Age="+f}if(s.domain){if(!i.test(s.domain))throw TypeError("option domain is invalid");c+="; Domain="+s.domain}if(s.path){if(!o.test(s.path))throw TypeError("option path is invalid");c+="; Path="+s.path}if(s.expires){var h=s.expires;if(!l(h)||isNaN(h.valueOf()))throw TypeError("option expires is invalid");c+="; Expires="+h.toUTCString()}if(s.httpOnly&&(c+="; HttpOnly"),s.secure&&(c+="; Secure"),s.partitioned&&(c+="; Partitioned"),s.priority)switch("string"==typeof s.priority?s.priority.toLowerCase():s.priority){case"low":c+="; Priority=Low";break;case"medium":c+="; Priority=Medium";break;case"high":c+="; Priority=High";break;default:throw TypeError("option priority is invalid")}if(s.sameSite)switch("string"==typeof s.sameSite?s.sameSite.toLowerCase():s.sameSite){case!0:case"strict":c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"none":c+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return c}
1function f(e){return -1!==e.indexOf("%")?decodeURIComponent(e):e}function l(t){return"[object Date]"===e.call(t)}function h(e,t){try{return t(e)}catch(t){return e}}return rf}();function rh(){let e="undefined"==typeof global?void 0:global.TEST_HAS_DOCUMENT_COOKIE;return"boolean"==typeof e?e:"object"==typeof document&&"string"==typeof document.cookie}function rd(e){return"string"==typeof e?rl.parse(e):"object"==typeof e&&null!==e?e:{}}function rp(e,t={}){let r=rg(e);if(!t.doNotParse)try{return JSON.parse(r)}catch(e){}return e}function rg(e){return e&&"j"===e[0]&&":"===e[1]?e.substr(2):e}class ry{constructor(e,t={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;let e=this.cookies;this.cookies=rl.parse(document.cookie),this._checkChanges(e)};let r="undefined"==typeof document?"":document.cookie;this.cookies=rd(e||r),this.defaultSetOptions=t,this.HAS_DOCUMENT_COOKIE=rh()}_emitChange(e){for(let t=0;t<this.changeListeners.length;++t)this.changeListeners[t](e)}_checkChanges(e){new Set(Object.keys(e).concat(Object.keys(this.cookies))).forEach(t=>{e[t]!==this.cookies[t]&&this._emitChange({name:t,value:rp(this.cookies[t])})})}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(e,t={}){return t.doNotUpdate||this.update(),rp(this.cookies[e],t)}getAll(e={}){e.doNotUpdate||this.update();let t={};for(let r in this.cookies)t[r]=rp(this.cookies[r],e);return t}set(e,t,r){r=r?Object.assign(Object.assign({},this.defaultSetOptions),r):this.defaultSetOptions;let n="string"==typeof t?t:JSON.stringify(t);this.cookies=Object.assign(Object.assign({},this.cookies),{[e]:n}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=rl.serialize(e,n,r)),this._emitChange({name:e,value:t,options:r})}remove(e,t){let r=t=Object.assign(Object.assign(Object.assign({},this.defaultSetOptions),t),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Object.assign({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=rl.serialize(e,"",r)),this._emitChange({name:e,value:void 0,options:t})}addChangeListener(e){this.changeListeners.push(e),this.HAS_DOCUMENT_COOKIE&&1===this.changeListeners.length&&("object"==typeof window&&"cookieStore"in window?window.cookieStore.addEventListener("change",this.update):this._startPolling())}removeChangeListener(e){let t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1),this.HAS_DOCUMENT_COOKIE&&0===this.changeListeners.length&&("object"==typeof window&&"cookieStore"in window?window.cookieStore.removeEventListener("change",this.update):this._stopPolling())}}var rv=function(){return(rv=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},rm=Z().isBrowser,rb=31536e6,rw=function(){function e(e){void 0===e&&(e={}),this.cookies=new ry,this.store=rm?window.localStorage:Object.create(null),this.cookies=e.req?new ry(decodeURIComponent(e.req.headers.cookie)):new ry,Object.assign(this.store,this.cookies.getAll())}return Object.defineProperty(e.prototype,"length",{get:function(){return Object.entries(this.store).length},enumerable:!1,configurable:!0}),e.prototype.clear=function(){var e=this;Array.from(Array(this.length)).map(function(t,r){return e.key(r)}).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){this.setLocalItem(e,t);var r=e.split(".").pop();["LastAuthUser","accessToken","refreshToken","idToken"].includes(null!=r?r:"")&&this.setUniversalItem(e,t,{expires:new Date(Date.now()+rb)})},e.prototype.setLocalItem=function(e,t){this.store[e]=t},e.prototype.setUniversalItem=function(e,t,r){void 0===r&&(r={}),this.cookies.set(e,t,rv(rv({},r),{path:"/",sameSite:!0,secure:!rm||"localhost"!==window.location.hostname}))},e}();function r_(e){return e.split("").map(function(e){return e.charCodeAt(0).toString(16).padStart(2,"0")}).join("")}function rS(e){return e.match(/.{2}/g).map(function(e){return String.fromCharCode(parseInt(e,16))}).join("")}var rA=function(){function e(e){var t=e||{},r=t.ValidationData,n=t.Username,i=t.Password,o=t.AuthParameters,s=t.ClientMetadata;this.validationData=r||{},this.authParameters=o||{},this.clientMetadata=s||{},this.username=n,this.password=i}var t=e.prototype;return t.getUsername=function(){return this.username},t.getPassword=function(){return this.password},t.getValidationData=function(){return this.validationData},t.getAuthParameters=function(){return this.authParameters},t.getClientMetadata=function(){return this.clientMetadata},e}(),rI=r(40585);if("undefined"!=typeof window&&window.crypto&&(S=window.crypto),!S&&"undefined"!=typeof window&&window.msCrypto&&(S=window.msCrypto),!S&&void 0!==r.g&&r.g.crypto&&(S=r.g.crypto),!S)try{S=r(67461)}catch(e){}function rE(){if(S){if("function"==typeof S.getRandomValues)try{return S.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof S.randomBytes)try{return S.randomBytes(4).readInt32LE()}catch(e){}}throw Error("Native crypto module could not be used to get secure random number.")}function rU(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")}var rC=function(){function e(e,t){e=this.words=e||[],void 0!=t?this.sigBytes=t:this.sigBytes=4*e.length}var t=e.prototype;return t.random=function(t){for(var r=[],n=0;n<t;n+=4)r.push(rE());return new e(r,t)},t.toString=function(){return rU(this)},e}(),rx=r(38352);let rT=rP;function rP(e,t){null!=e&&this.fromString(e,t)}function rO(){return new rP(null)}var rk=!0;function rR(e,t,r,n,i,o){for(;--o>=0;){var s=t*this[e++]+r[n]+i;i=Math.floor(s/0x4000000),r[n++]=0x3ffffff&s}return i}function rD(e,t,r,n,i,o){for(var s=32767&t,a=t>>15;--o>=0;){var u=32767&this[e],c=this[e++]>>15,f=a*u+c*s;
1i=((u=s*u+((32767&f)<<15)+r[n]+(0x3fffffff&i))>>>30)+(f>>>15)+a*c+(i>>>30),r[n++]=0x3fffffff&u}return i}function rj(e,t,r,n,i,o){for(var s=16383&t,a=t>>14;--o>=0;){var u=16383&this[e],c=this[e++]>>14,f=a*u+c*s;i=((u=s*u+((16383&f)<<14)+r[n]+i)>>28)+(f>>14)+a*c,r[n++]=0xfffffff&u}return i}var rF="undefined"!=typeof navigator;rF&&rk&&"Microsoft Internet Explorer"==navigator.appName?(rP.prototype.am=rD,A=30):rF&&rk&&"Netscape"!=navigator.appName?(rP.prototype.am=rR,A=26):(rP.prototype.am=rj,A=28),rP.prototype.DB=A,rP.prototype.DM=(1<<A)-1,rP.prototype.DV=1<<A;var rN=52;rP.prototype.FV=Math.pow(2,rN),rP.prototype.F1=rN-A,rP.prototype.F2=2*A-rN;var rM="0123456789abcdefghijklmnopqrstuvwxyz",rB=[];for(E=0,I=48;E<=9;++E)rB[I++]=E;for(E=10,I=97;E<36;++E)rB[I++]=E;for(E=10,I=65;E<36;++E)rB[I++]=E;function rL(e){return rM.charAt(e)}function rV(e,t){var r=rB[e.charCodeAt(t)];return null==r?-1:r}function rK(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s}function rG(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0}function rq(e){var t=rO();return t.fromInt(e),t}function rH(e,t){if(16==t)r=4;else if(8==t)r=3;else if(2==t)r=1;else if(32==t)r=5;else if(4==t)r=2;else throw Error("Only radix 2, 4, 8, 16, 32 are supported");this.t=0,this.s=0;for(var r,n=e.length,i=!1,o=0;--n>=0;){var s=rV(e,n);if(s<0){"-"==e.charAt(n)&&(i=!0);continue}i=!1,0==o?this[this.t++]=s:o+r>this.DB?(this[this.t-1]|=(s&(1<<this.DB-o)-1)<<o,this[this.t++]=s>>this.DB-o):this[this.t-1]|=s<<o,(o+=r)>=this.DB&&(o-=this.DB)}this.clamp(),i&&rP.ZERO.subTo(this,this)}function rz(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t}function rW(e){if(this.s<0)return"-"+this.negate().toString(e);if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else if(4==e)t=2;else throw Error("Only radix 2, 4, 8, 16, 32 are supported");var t,r,n=(1<<t)-1,i=!1,o="",s=this.t,a=this.DB-s*this.DB%t;if(s-- >0)for(a<this.DB&&(r=this[s]>>a)>0&&(i=!0,o=rL(r));s>=0;)a<t?r=(this[s]&(1<<a)-1)<<t-a|this[--s]>>(a+=this.DB-t):(r=this[s]>>(a-=t)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=rL(r));return i?o:"0"}function rY(){var e=rO();return rP.ZERO.subTo(this,e),e}function rJ(){return this.s<0?this.negate():this}function r$(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this[r]-e[r]))return t;return 0}function rZ(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function rX(){return this.t<=0?0:this.DB*(this.t-1)+rZ(this[this.t-1]^this.s&this.DM)}function rQ(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s}function r0(e,t){for(var r=e;r<this.t;++r)t[r-e]=this[r];t.t=Math.max(this.t-e,0),t.s=this.s}function r1(e,t){var r,n=e%this.DB,i=this.DB-n,o=(1<<i)-1,s=Math.floor(e/this.DB),a=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)t[r+s+1]=this[r]>>i|a,a=(this[r]&o)<<n;for(r=s-1;r>=0;--r)t[r]=0;t[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()}function r2(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t){t.t=0;return}var n=e%this.DB,i=this.DB-n,o=(1<<n)-1;t[0]=this[r]>>n;for(var s=r+1;s<this.t;++s)t[s-r-1]|=(this[s]&o)<<i,t[s-r]=this[s]>>n;n>0&&(t[this.t-r-1]|=(this.s&o)<<i),t.t=this.t-r,t.clamp()}function r3(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this[r]-e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n-=e[r],t[r++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:n>0&&(t[r++]=n),t.t=r,t.clamp()}function r6(e,t){var r=this.abs(),n=e.abs(),i=r.t;for(t.t=i+n.t;--i>=0;)t[i]=0;for(i=0;i<n.t;++i)t[i+r.t]=r.am(0,n[i],t,i,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&rP.ZERO.subTo(t,t)}function r5(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e[r]=0;for(r=0;r<t.t-1;++r){var n=t.am(r,t[r],e,2*r,0,1);(e[r+t.t]+=t.am(r+1,2*t[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()}function r4(e,t,r){var n=e.abs();if(!(n.t<=0)){var i=this.abs();if(i.t<n.t){null!=t&&t.fromInt(0),null!=r&&this.copyTo(r);return}null==r&&(r=rO());var o=rO(),s=this.s,a=e.s,u=this.DB-rZ(n[n.t-1]);u>0?(n.lShiftTo(u,o),i.lShiftTo(u,r)):(n.copyTo(o),i.copyTo(r));var c=o.t,f=o[c-1];if(0!=f){var l=f*(1<<this.F1)+(c>1?o[c-2]>>this.F2:0),h=this.FV/l,d=(1<<this.F1)/l,p=1<<this.F2,g=r.t,y=g-c,v=null==t?rO():t;
1for(o.dlShiftTo(y,v),r.compareTo(v)>=0&&(r[r.t++]=1,r.subTo(v,r)),rP.ONE.dlShiftTo(c,v),v.subTo(o,o);o.t<c;)o[o.t++]=0;for(;--y>=0;){var m=r[--g]==f?this.DM:Math.floor(r[g]*h+(r[g-1]+p)*d);if((r[g]+=o.am(0,m,r,y,0,c))<m)for(o.dlShiftTo(y,v),r.subTo(v,r);r[g]<--m;)r.subTo(v,r)}null!=t&&(r.drShiftTo(c,t),s!=a&&rP.ZERO.subTo(t,t)),r.t=c,r.clamp(),u>0&&r.rShiftTo(u,r),s<0&&rP.ZERO.subTo(r,r)}}}function r8(e){var t=rO();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(rP.ZERO)>0&&e.subTo(t,t),t}function r9(){if(this.t<1)return 0;var e=this[0];if((1&e)==0)return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t}function r7(e){return 0==this.compareTo(e)}function ne(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this[r]+e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n+=e[r],t[r++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[r++]=n:n<-1&&(t[r++]=this.DV+n),t.t=r,t.clamp()}function nt(e){var t=rO();return this.addTo(e,t),t}function nr(e){var t=rO();return this.subTo(e,t),t}function nn(e){var t=rO();return this.multiplyTo(e,t),t}function ni(e){var t=rO();return this.divRemTo(e,t,null),t}function no(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function ns(e){var t=rO();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(rP.ZERO)>0&&this.m.subTo(t,t),t}function na(e){var t=rO();return e.copyTo(t),this.reduce(t),t}function nu(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=32767&e[t],n=r*this.mpl+((r*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e[r]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function nc(e,t){e.squareTo(t),this.reduce(t)}function nf(e,t,r){e.multiplyTo(t,r),this.reduce(r)}function nl(e,t,r){var n,i=e.bitLength(),o=rq(1),s=new no(t);if(i<=0)return o;var a=[],u=3,c=(n=i<18?1:i<48?3:i<144?4:i<768?5:6)-1,f=(1<<n)-1;if(a[1]=s.convert(this),n>1){var l=rO();for(s.sqrTo(a[1],l);u<=f;)a[u]=rO(),s.mulTo(l,a[u-2],a[u]),u+=2}var h,d,p=e.t-1,g=!0,y=rO();for(i=rZ(e[p])-1;p>=0;){for(i>=c?h=e[p]>>i-c&f:(h=(e[p]&(1<<i+1)-1)<<c-i,p>0&&(h|=e[p-1]>>this.DB+i-c)),u=n;(1&h)==0;)h>>=1,--u;if((i-=u)<0&&(i+=this.DB,--p),g)a[h].copyTo(o),g=!1;else{for(;u>1;)s.sqrTo(o,y),s.sqrTo(y,o),u-=2;u>0?s.sqrTo(o,y):(d=o,o=y,y=d),s.mulTo(y,a[h],o)}for(;p>=0&&(e[p]&1<<i)==0;)s.sqrTo(o,y),d=o,o=y,y=d,--i<0&&(i=this.DB-1,--p)}var v=s.revert(o);return r(null,v),v}function nh(e){return rI.hp.from(new rC().random(e).toString(),"hex")}no.prototype.convert=ns,no.prototype.revert=na,no.prototype.reduce=nu,no.prototype.mulTo=nf,no.prototype.sqrTo=nc,rP.prototype.copyTo=rK,rP.prototype.fromInt=rG,rP.prototype.fromString=rH,rP.prototype.clamp=rz,rP.prototype.dlShiftTo=rQ,rP.prototype.drShiftTo=r0,rP.prototype.lShiftTo=r1,rP.prototype.rShiftTo=r2,rP.prototype.subTo=r3,rP.prototype.multiplyTo=r6,rP.prototype.squareTo=r5,rP.prototype.divRemTo=r4,rP.prototype.invDigit=r9,rP.prototype.addTo=ne,rP.prototype.toString=rW,rP.prototype.negate=rY,rP.prototype.abs=rJ,rP.prototype.compareTo=r$,rP.prototype.bitLength=rX,rP.prototype.mod=r8,rP.prototype.equals=r7,rP.prototype.add=nt,rP.prototype.subtract=nr,rP.prototype.multiply=nn,rP.prototype.divide=ni,rP.prototype.modPow=nl,rP.ZERO=rq(0),rP.ONE=rq(1);var nd=/^[89a-f]/i,np="FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",ng="userAttributes.",ny=function(){function e(e){this.N=new rT(np,16),this.g=new rT("2",16),this.k=new rT(this.hexHash(""+this.padHex(this.N)+this.padHex(this.g)),16),this.smallAValue=this.generateRandomSmallA(),this.getLargeAValue(function(){}),this.infoBits=rI.hp.from("Caldera Derived Key","utf8"),this.poolName=e}var t=e.prototype;return t.getSmallAValue=function(){return this.smallAValue},t.getLargeAValue=function(e){var t=this;this.largeAValue?e(null,this.largeAValue):this.calculateA(this.smallAValue,function(r,n){r&&e(r,null),t.largeAValue=n,e(null,t.largeAValue)})},t.generateRandomSmallA=function(){return new rT(nh(128).toString("hex"),16)},t.generateRandomString=function(){return nh(40).toString("base64")},t.getRandomPassword=function(){return this.randomPassword},t.getSaltDevices=function(){return this.SaltToHashDevices},t.getVerifierDevices=function(){return this.verifierDevices},t.generateHashDevice=function(e,t,r){var n=this;this.randomPassword=this.generateRandomString();var i=""+e+t+":"+this.randomPassword,o=this.hash(i),s=nh(16).toString("hex");this.SaltToHashDevices=this.padHex(new rT(s,16)),this.g.modPow(new rT(this.hexHash(this.SaltToHashDevices+o),16),this.N,function(e,t){e&&r(e,null),n.verifierDevices=n.padHex(t),r(null,null)})},t.calculateA=function(e,t){var r=this;this.g.modPow(e,this.N,function(e,n){e&&t(e,null),n.mod(r.N).equals(rT.ZERO)&&t(Error("Illegal paramater. A mod N cannot be 0."),null),t(null,n)})},t.calculateU=function(e,t){return this.UHexHash=this.hexHash(this.padHex(e)+this.padHex(t)),new rT(this.UHexHash,16)},t.hash=function(e){var t=new rx.Sha256;t.update(e);var r=t.digestSync(),n=rI.hp.from(r).toString("hex");return Array(64-n.length).join("0")+n},t.hexHash=function(e){return this.hash(rI.hp.from(e,"hex"))},t.computehkdf=function(e,t){var r=rI.hp.concat([this.infoBits,rI.hp.from("\x01","utf8")]),n=new rx.Sha256(t);n.update(e);var i=n.digestSync(),o=new rx.Sha256(i);return o.update(r),o.digestSync().slice(0,16)},t.getPasswordAuthenticationKey=function(e,t,r,n,i){var o=this;if(r.mod(this.N).equals(rT.ZERO))throw Error("B cannot be zero.");if(this.UValue=this.calculateU(this.largeAValue,r),this.UValue.equals(rT.ZERO))throw Error("U cannot be zero.");var s=""+this.poolName+e+":"+t,a=this.hash(s),u=new rT(this.hexHash(this.padHex(n)+a),16);this.calculateS(u,r,function(e,t){e&&i(e,null),i(null,o.computehkdf(rI.hp.from(o.padHex(t),"hex"),rI.hp.from(o.padHex(o.UValue),"hex")))})},t.calculateS=function(e,t,r){var n=this;this.g.modPow(e,this.N,function(i,o){i&&r(i,null),t.subtract(n.k.multiply(o)).modPow(n.smallAValue.add(n.UValue.multiply(e)),n.N,function(e,t){e&&r(e,null),r(null,t.mod(n.N))})})},t.getNewPasswordRequiredChallengeUserAttributePrefix=function(){return ng},t.padHex=function(e){if(!(e instanceof rT))throw Error("Not a BigInteger");var t=0>
1e.compareTo(rT.ZERO),r=e.abs().toString(16);return r=r.length%2!=0?"0"+r:r,r=nd.test(r)?"00"+r:r,t&&(r=new rT(r.split("").map(function(e){var t=15&~parseInt(e,16);return"0123456789ABCDEF".charAt(t)}).join(""),16).add(rT.ONE).toString(16)).toUpperCase().startsWith("FF8")&&(r=r.substring(2)),r},e}(),nv=function(){function e(e){this.jwtToken=e||"",this.payload=this.decodePayload()}var t=e.prototype;return t.getJwtToken=function(){return this.jwtToken},t.getExpiration=function(){return this.payload.exp},t.getIssuedAt=function(){return this.payload.iat},t.decodePayload=function(){var e=this.jwtToken.split(".")[1];try{return JSON.parse(rI.hp.from(e,"base64").toString("utf8"))}catch(e){return{}}},e}();function nm(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,nb(e,t)}function nb(e,t){return(nb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var nw=function(e){function t(t){var r=(void 0===t?{}:t).AccessToken;return e.call(this,r||"")||this}return nm(t,e),t}(nv);function n_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,nS(e,t)}function nS(e,t){return(nS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var nA=function(e){function t(t){var r=(void 0===t?{}:t).IdToken;return e.call(this,r||"")||this}return n_(t,e),t}(nv),nI=function(){function e(e){var t=(void 0===e?{}:e).RefreshToken;this.token=t||""}return e.prototype.getToken=function(){return this.token},e}(),nE={userAgent:"aws-amplify/5.0.4",isReactNative:"undefined"!=typeof navigator&&"ReactNative"===navigator.product},nU=function(){return nE.userAgent},nC=function(){function e(e){var t=void 0===e?{}:e,r=t.IdToken,n=t.RefreshToken,i=t.AccessToken,o=t.ClockDrift;if(null==i||null==r)throw Error("Id token and Access Token must be present.");this.idToken=r,this.refreshToken=n,this.accessToken=i,this.clockDrift=void 0===o?this.calculateClockDrift():o}var t=e.prototype;return t.getIdToken=function(){return this.idToken},t.getRefreshToken=function(){return this.refreshToken},t.getAccessToken=function(){return this.accessToken},t.getClockDrift=function(){return this.clockDrift},t.calculateClockDrift=function(){return Math.floor(new Date/1e3)-Math.min(this.accessToken.getIssuedAt(),this.idToken.getIssuedAt())},t.isValid=function(){var e=Math.floor(new Date/1e3)-this.clockDrift;return e<this.accessToken.getExpiration()&&e<this.idToken.getExpiration()},e}(),nx=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],nT=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],nP=function(){function e(){}return e.prototype.getNowString=function(){var e=new Date,t=nT[e.getUTCDay()],r=nx[e.getUTCMonth()],n=e.getUTCDate(),i=e.getUTCHours();i<10&&(i="0"+i);var o=e.getUTCMinutes();o<10&&(o="0"+o);var s=e.getUTCSeconds();return s<10&&(s="0"+s),t+" "+r+" "+n+" "+i+":"+o+":"+s+" UTC "+e.getUTCFullYear()},e}(),nO=function(){function e(e){var t=void 0===e?{}:e,r=t.Name,n=t.Value;this.Name=r||"",this.Value=n||""}var t=e.prototype;return t.getValue=function(){return this.Value},t.setValue=function(e){return this.Value=e,this},t.getName=function(){return this.Name},t.setName=function(e){return this.Name=e,this},t.toString=function(){return JSON.stringify(this)},t.toJSON=function(){return{Name:this.Name,Value:this.Value}},e}(),nk={},nR=function(){function e(){}return e.setItem=function(e,t){return nk[e]=t,nk[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call(nk,e)?nk[e]:void 0},e.removeItem=function(e){return delete nk[e]},e.clear=function(){return nk={}},e}(),nD=function(){function e(){try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.cognito.test-ls",1),this.storageWindow.removeItem("aws.cognito.test-ls")}catch(e){this.storageWindow=nR}}return e.prototype.getStorage=function(){return this.storageWindow},e}(),nj="undefined"!=typeof navigator?nE.isReactNative?"react-native":navigator.userAgent:"nodejs",nF=function(){function e(e){if(null==e||null==e.Username||null==e.Pool)throw Error("Username and Pool information are required.");this.username=e.Username||"",this.pool=e.Pool,this.Session=null,this.client=e.Pool.client,this.signInUserSession=null,this.authenticationFlowType="USER_SRP_AUTH",this.storage=e.Storage||new nD().getStorage(),this.keyPrefix="CognitoIdentityServiceProvider."+this.pool.getClientId(),this.userDataKey=this.keyPrefix+"."+this.username+".userData"}var t=e.prototype;return t.setSignInUserSession=function(e){this.clearCachedUserData(),this.signInUserSession=e,this.cacheTokens()},t.getSignInUserSession=function(){return this.signInUserSession},t.getUsername=function(){return this.username},t.getAuthenticationFlowType=function(){return this.authenticationFlowType},t.setAuthenticationFlowType=function(e){this.authenticationFlowType=e},t.initiateAuth=function(e,t){var r=this,n=e.getAuthParameters();n.USERNAME=this.username;var i=0!==Object.keys(e.getValidationData()).length?e.getValidationData():e.getClientMetadata(),o={AuthFlow:"CUSTOM_AUTH",ClientId:this.pool.getClientId(),AuthParameters:n,ClientMetadata:i};this.getUserContextData()&&(o.UserContextData=this.getUserContextData()),this.client.request("InitiateAuth",o,function(e,n){if(e)return t.onFailure(e);var i=n.ChallengeName,o=n.ChallengeParameters;return"CUSTOM_CHALLENGE"===i?(r.Session=n.Session,t.customChallenge(o)):(r.signInUserSession=r.getCognitoUserSession(n.AuthenticationResult),r.cacheTokens(),t.onSuccess(r.signInUserSession))})},t.authenticateUser=function(e,t){return"USER_PASSWORD_AUTH"===this.authenticationFlowType?this.authenticateUserPlainUsernamePassword(e,t):"USER_SRP_AUTH"===this.authenticationFlowType||"CUSTOM_AUTH"===this.authenticationFlowType?this.authenticateUserDefaultAuth(e,t):t.onFailure(Error("Authentication flow type is invali
1d."))},t.authenticateUserDefaultAuth=function(e,t){var r,n,i=this,o=new ny(this.pool.getUserPoolName()),s=new nP,a={};null!=this.deviceKey&&(a.DEVICE_KEY=this.deviceKey),a.USERNAME=this.username,o.getLargeAValue(function(u,c){u&&t.onFailure(u),a.SRP_A=c.toString(16),"CUSTOM_AUTH"===i.authenticationFlowType&&(a.CHALLENGE_NAME="SRP_A");var f=0!==Object.keys(e.getValidationData()).length?e.getValidationData():e.getClientMetadata(),l={AuthFlow:i.authenticationFlowType,ClientId:i.pool.getClientId(),AuthParameters:a,ClientMetadata:f};i.getUserContextData(i.username)&&(l.UserContextData=i.getUserContextData(i.username)),i.client.request("InitiateAuth",l,function(a,u){if(a)return t.onFailure(a);var c=u.ChallengeParameters;i.username=c.USER_ID_FOR_SRP,i.userDataKey=i.keyPrefix+"."+i.username+".userData",r=new rT(c.SRP_B,16),n=new rT(c.SALT,16),i.getCachedDeviceKeyAndPassword(),o.getPasswordAuthenticationKey(i.username,e.getPassword(),r,n,function(e,r){e&&t.onFailure(e);var n=s.getNowString(),a=rI.hp.concat([rI.hp.from(i.pool.getUserPoolName(),"utf8"),rI.hp.from(i.username,"utf8"),rI.hp.from(c.SECRET_BLOCK,"base64"),rI.hp.from(n,"utf8")]),l=new rx.Sha256(r);l.update(a);var h=l.digestSync(),d=rI.hp.from(h).toString("base64"),p={};p.USERNAME=i.username,p.PASSWORD_CLAIM_SECRET_BLOCK=c.SECRET_BLOCK,p.TIMESTAMP=n,p.PASSWORD_CLAIM_SIGNATURE=d,null!=i.deviceKey&&(p.DEVICE_KEY=i.deviceKey);var g=function(e,t){return i.client.request("RespondToAuthChallenge",e,function(r,n){return r&&"ResourceNotFoundException"===r.code&&-1!==r.message.toLowerCase().indexOf("device")?(p.DEVICE_KEY=null,i.deviceKey=null,i.randomPassword=null,i.deviceGroupKey=null,i.clearCachedDeviceKeyAndPassword(),g(e,t)):t(r,n)})},y={ChallengeName:"PASSWORD_VERIFIER",ClientId:i.pool.getClientId(),ChallengeResponses:p,Session:u.Session,ClientMetadata:f};i.getUserContextData()&&(y.UserContextData=i.getUserContextData()),g(y,function(e,r){return e?t.onFailure(e):i.authenticateUserInternal(r,o,t)})})})})},t.authenticateUserPlainUsernamePassword=function(e,t){var r=this,n={};if(n.USERNAME=this.username,n.PASSWORD=e.getPassword(),!n.PASSWORD)return void t.onFailure(Error("PASSWORD parameter is required"));var i=new ny(this.pool.getUserPoolName());this.getCachedDeviceKeyAndPassword(),null!=this.deviceKey&&(n.DEVICE_KEY=this.deviceKey);var o=0!==Object.keys(e.getValidationData()).length?e.getValidationData():e.getClientMetadata(),s={AuthFlow:"USER_PASSWORD_AUTH",ClientId:this.pool.getClientId(),AuthParameters:n,ClientMetadata:o};this.getUserContextData(this.username)&&(s.UserContextData=this.getUserContextData(this.username)),this.client.request("InitiateAuth",s,function(e,n){return e?t.onFailure(e):r.authenticateUserInternal(n,i,t)})},t.authenticateUserInternal=function(e,t,r){var n=this,i=e.ChallengeName,o=e.ChallengeParameters;if("SMS_MFA"===i)return this.Session=e.Session,r.mfaRequired(i,o);if("SELECT_MFA_TYPE"===i)return this.Session=e.Session,r.selectMFAType(i,o);if("MFA_SETUP"===i)return this.Session=e.Session,r.mfaSetup(i,o);if("SOFTWARE_TOKEN_MFA"===i)return this.Session=e.Session,r.totpRequired(i,o);if("CUSTOM_CHALLENGE"===i)return this.Session=e.Session,r.customChallenge(o);if("NEW_PASSWORD_REQUIRED"===i){this.Session=e.Session;var s=null,a=null,u=[],c=t.getNewPasswordRequiredChallengeUserAttributePrefix();if(o&&(s=JSON.parse(e.ChallengeParameters.userAttributes),a=JSON.parse(e.ChallengeParameters.requiredAttributes)),a)for(var f=0;f<a.length;f++)u[f]=a[f].substr(c.length);return r.newPasswordRequired(s,u)}if("DEVICE_SRP_AUTH"===i){this.Session=e.Session,this.getDeviceResponse(r);return}this.signInUserSession=this.getCognitoUserSession(e.AuthenticationResult),this.challengeName=i,this.cacheTokens();var l=e.AuthenticationResult.NewDeviceMetadata;if(null==l)return r.onSuccess(this.signInUserSession);t.generateHashDevice(e.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,e.AuthenticationResult.NewDeviceMetadata.DeviceKey,function(i){if(i)return r.onFailure(i);var o={Salt:rI.hp.from(t.getSaltDevices(),"hex").toString("base64"),PasswordVerifier:rI.hp.from(t.getVerifierDevices(),"hex").toString("base64")};n.verifierDevices=o.PasswordVerifier,n.deviceGroupKey=l.DeviceGroupKey,n.randomPassword=t.getRandomPassword(),n.client.request("ConfirmDevice",{DeviceKey:l.DeviceKey,AccessToken:n.signInUserSession.getAccessToken().getJwtToken(),DeviceSecretVerifierConfig:o,DeviceName:nj},function(t,i){return t?r.onFailure(t):(n.deviceKey=e.AuthenticationResult.
1NewDeviceMetadata.DeviceKey,n.cacheDeviceKeyAndPassword(),!0===i.UserConfirmationNecessary)?r.onSuccess(n.signInUserSession,i.UserConfirmationNecessary):r.onSuccess(n.signInUserSession)})})},t.completeNewPasswordChallenge=function(e,t,r,n){var i=this;if(!e)return r.onFailure(Error("New password is required."));var o=new ny(this.pool.getUserPoolName()),s=o.getNewPasswordRequiredChallengeUserAttributePrefix(),a={};t&&Object.keys(t).forEach(function(e){a[s+e]=t[e]}),a.NEW_PASSWORD=e,a.USERNAME=this.username;var u={ChallengeName:"NEW_PASSWORD_REQUIRED",ClientId:this.pool.getClientId(),ChallengeResponses:a,Session:this.Session,ClientMetadata:n};this.getUserContextData()&&(u.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",u,function(e,t){return e?r.onFailure(e):i.authenticateUserInternal(t,o,r)})},t.getDeviceResponse=function(e,t){var r=this,n=new ny(this.deviceGroupKey),i=new nP,o={};o.USERNAME=this.username,o.DEVICE_KEY=this.deviceKey,n.getLargeAValue(function(s,a){s&&e.onFailure(s),o.SRP_A=a.toString(16);var u={ChallengeName:"DEVICE_SRP_AUTH",ClientId:r.pool.getClientId(),ChallengeResponses:o,ClientMetadata:t,Session:r.Session};r.getUserContextData()&&(u.UserContextData=r.getUserContextData()),r.client.request("RespondToAuthChallenge",u,function(t,o){if(t)return e.onFailure(t);var s=o.ChallengeParameters,a=new rT(s.SRP_B,16),u=new rT(s.SALT,16);n.getPasswordAuthenticationKey(r.deviceKey,r.randomPassword,a,u,function(t,n){if(t)return e.onFailure(t);var a=i.getNowString(),u=rI.hp.concat([rI.hp.from(r.deviceGroupKey,"utf8"),rI.hp.from(r.deviceKey,"utf8"),rI.hp.from(s.SECRET_BLOCK,"base64"),rI.hp.from(a,"utf8")]),c=new rx.Sha256(n);c.update(u);var f=c.digestSync(),l=rI.hp.from(f).toString("base64"),h={};h.USERNAME=r.username,h.PASSWORD_CLAIM_SECRET_BLOCK=s.SECRET_BLOCK,h.TIMESTAMP=a,h.PASSWORD_CLAIM_SIGNATURE=l,h.DEVICE_KEY=r.deviceKey;var d={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:r.pool.getClientId(),ChallengeResponses:h,Session:o.Session};r.getUserContextData()&&(d.UserContextData=r.getUserContextData()),r.client.request("RespondToAuthChallenge",d,function(t,n){return t?e.onFailure(t):(r.signInUserSession=r.getCognitoUserSession(n.AuthenticationResult),r.cacheTokens(),e.onSuccess(r.signInUserSession))})})})})},t.confirmRegistration=function(e,t,r,n){var i={ClientId:this.pool.getClientId(),ConfirmationCode:e,Username:this.username,ForceAliasCreation:t,ClientMetadata:n};this.getUserContextData()&&(i.UserContextData=this.getUserContextData()),this.client.request("ConfirmSignUp",i,function(e){return e?r(e,null):r(null,"SUCCESS")})},t.sendCustomChallengeAnswer=function(e,t,r){var n=this,i={};i.USERNAME=this.username,i.ANSWER=e;var o=new ny(this.pool.getUserPoolName());this.getCachedDeviceKeyAndPassword(),null!=this.deviceKey&&(i.DEVICE_KEY=this.deviceKey);var s={ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:i,ClientId:this.pool.getClientId(),Session:this.Session,ClientMetadata:r};this.getUserContextData()&&(s.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",s,function(e,r){return e?t.onFailure(e):n.authenticateUserInternal(r,o,t)})},t.sendMFACode=function(e,t,r,n){var i=this,o={};o.USERNAME=this.username,o.SMS_MFA_CODE=e;var s=r||"SMS_MFA";"SOFTWARE_TOKEN_MFA"===s&&(o.SOFTWARE_TOKEN_MFA_CODE=e),null!=this.deviceKey&&(o.DEVICE_KEY=this.deviceKey);var a={ChallengeName:s,ChallengeResponses:o,ClientId:this.pool.getClientId(),Session:this.Session,ClientMetadata:n};this.getUserContextData()&&(a.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",a,function(e,r){if(e)return t.onFailure(e);
1if("DEVICE_SRP_AUTH"===r.ChallengeName)return void i.getDeviceResponse(t);if(i.signInUserSession=i.getCognitoUserSession(r.AuthenticationResult),i.cacheTokens(),null==r.AuthenticationResult.NewDeviceMetadata)return t.onSuccess(i.signInUserSession);var n=new ny(i.pool.getUserPoolName());n.generateHashDevice(r.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,r.AuthenticationResult.NewDeviceMetadata.DeviceKey,function(e){if(e)return t.onFailure(e);var o={Salt:rI.hp.from(n.getSaltDevices(),"hex").toString("base64"),PasswordVerifier:rI.hp.from(n.getVerifierDevices(),"hex").toString("base64")};i.verifierDevices=o.PasswordVerifier,i.deviceGroupKey=r.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,i.randomPassword=n.getRandomPassword(),i.client.request("ConfirmDevice",{DeviceKey:r.AuthenticationResult.NewDeviceMetadata.DeviceKey,AccessToken:i.signInUserSession.getAccessToken().getJwtToken(),DeviceSecretVerifierConfig:o,DeviceName:nj},function(e,n){return e?t.onFailure(e):(i.deviceKey=r.AuthenticationResult.NewDeviceMetadata.DeviceKey,i.cacheDeviceKeyAndPassword(),!0===n.UserConfirmationNecessary)?t.onSuccess(i.signInUserSession,n.UserConfirmationNecessary):t.onSuccess(i.signInUserSession)})})})},t.changePassword=function(e,t,r,n){if(!(null!=this.signInUserSession&&this.signInUserSession.isValid()))return r(Error("User is not authenticated"),null);this.client.request("ChangePassword",{PreviousPassword:e,ProposedPassword:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:n},function(e){return e?r(e,null):r(null,"SUCCESS")})},t.enableMFA=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(Error("User is not authenticated"),null);var t=[],r={DeliveryMedium:"SMS",AttributeName:"phone_number"};t.push(r),this.client.request("SetUserSettings",{MFAOptions:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(t){return t?e(t,null):e(null,"SUCCESS")})},t.setUserMfaPreference=function(e,t,r){if(null==this.signInUserSession||!this.signInUserSession.isValid())return r(Error("User is not authenticated"),null);this.client.request("SetUserMFAPreference",{SMSMfaSettings:e,SoftwareTokenMfaSettings:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(e){return e?r(e,null):r(null,"SUCCESS")})},t.disableMFA=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(Error("User is not authenticated"),null);var t=[];this.client.request("SetUserSettings",{MFAOptions:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(t){return t?e(t,null):e(null,"SUCCESS")})},t.deleteUser=function(e,t){var r=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(Error("User is not authenticated"),null);this.client.request("DeleteUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:t},function(t){return t?e(t,null):(r.clearCachedUser(),e(null,"SUCCESS"))})},t.updateAttributes=function(e,t,r){var n=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return t(Error("User is not authenticated"),null);this.client.request("UpdateUserAttributes",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),UserAttributes:e,ClientMetadata:r},function(e,r){return e?t(e,null):n.getUserData(function(){return t(null,"SUCCESS",r)},{bypassCache:!0})})},t.getUserAttributes=function(e){if(!(null!=this.signInUserSession&&this.signInUserSession.isValid()))return e(Error("User is not authenticated"),null);this.client.request("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(t,r){if(t)return e(t,null);for(var n=[],i=0;i<r.UserAttributes.length;i++){var o=new nO({Name:r.UserAttributes[i].Name,Value:r.UserAttributes[i].Value});n.push(o)}return e(null,n)})},t.getMFAOptions=function(e){if(!(null!=this.signInUserSession&&this.signInUserSession.isValid()))return e(Error("User is not authenticated"),null);this.client.request("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(t,r){return t?e(t,null):e(null,r.MFAOptions)})},t.createGetUserRequest=function(){return this.client.promisifyRequest("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()})},t.refreshSessionIfPossible=function(e){var t=this;return void 0===e&&(e={}),new Promise(function(r){var n=t.signInUserSession.getRefreshToken();n&&n.getToken()?t.refreshSession(n,r,e.clientMetadata):r()})},t.getUserData=function(e,t){var r=this;if(!(null!=this.signInUserSession&&this.signInUserSession.isValid()))return this.clearCachedUserData(),e(Error("User is not authenticated"),null);
1var n=this.getUserDataFromCache();if(!n)return void this.fetchUserData().then(function(t){e(null,t)}).catch(e);if(this.isFetchUserDataAndTokenRequired(t))return void this.fetchUserData().then(function(e){return r.refreshSessionIfPossible(t).then(function(){return e})}).then(function(t){return e(null,t)}).catch(e);try{e(null,JSON.parse(n));return}catch(t){this.clearCachedUserData(),e(t,null);return}},t.getUserDataFromCache=function(){return this.storage.getItem(this.userDataKey)},t.isFetchUserDataAndTokenRequired=function(e){var t=(e||{}).bypassCache;return void 0!==t&&t},t.fetchUserData=function(){var e=this;return this.createGetUserRequest().then(function(t){return e.cacheUserData(t),t})},t.deleteAttributes=function(e,t){var r=this;if(!(null!=this.signInUserSession&&this.signInUserSession.isValid()))return t(Error("User is not authenticated"),null);this.client.request("DeleteUserAttributes",{UserAttributeNames:e,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(e){return e?t(e,null):r.getUserData(function(){return t(null,"SUCCESS")},{bypassCache:!0})})},t.resendConfirmationCode=function(e,t){var r={ClientId:this.pool.getClientId(),Username:this.username,ClientMetadata:t};this.client.request("ResendConfirmationCode",r,function(t,r){return t?e(t,null):e(null,r)})},t.getSession=function(e,t){if(void 0===t&&(t={}),null==this.username)return e(Error("Username is null. Cannot retrieve a new session"),null);if(null!=this.signInUserSession&&this.signInUserSession.isValid())return e(null,this.signInUserSession);var r="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,n=r+".idToken",i=r+".accessToken",o=r+".refreshToken",s=r+".clockDrift";if(this.storage.getItem(n)){var a=new nA({IdToken:this.storage.getItem(n)}),u=new nw({AccessToken:this.storage.getItem(i)}),c=new nI({RefreshToken:this.storage.getItem(o)}),f=new nC({IdToken:a,AccessToken:u,RefreshToken:c,ClockDrift:parseInt(this.storage.getItem(s),0)||0});if(f.isValid())return this.signInUserSession=f,e(null,this.signInUserSession);if(!c.getToken())return e(Error("Cannot retrieve a new session. Please authenticate."),null);this.refreshSession(c,e,t.clientMetadata)}else e(Error("Local storage is missing an ID Token, Please authenticate"),null)},t.refreshSession=function(e,t,r){var n=this,i=this.pool.wrapRefreshSessionCallback?this.pool.wrapRefreshSessionCallback(t):t,o={};o.REFRESH_TOKEN=e.getToken();var s="CognitoIdentityServiceProvider."+this.pool.getClientId(),a=s+".LastAuthUser";if(this.storage.getItem(a)){this.username=this.storage.getItem(a);var u=s+"."+this.username+".deviceKey";this.deviceKey=this.storage.getItem(u),o.DEVICE_KEY=this.deviceKey}var c={ClientId:this.pool.getClientId(),AuthFlow:"REFRESH_TOKEN_AUTH",AuthParameters:o,ClientMetadata:r};this.getUserContextData()&&(c.UserContextData=this.getUserContextData()),this.client.requestWithRetry("InitiateAuth",c,function(t,r){if(t)return"NotAuthorizedException"===t.code&&n.clearCachedUser(),i(t,null);if(r){var o=r.AuthenticationResult;return Object.prototype.hasOwnProperty.call(o,"RefreshToken")||(o.RefreshToken=e.getToken()),n.signInUserSession=n.getCognitoUserSession(o),n.cacheTokens(),i(null,n.signInUserSession)}})},t.cacheTokens=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId(),t=e+"."+this.username+".idToken",r=e+"."+this.username+".accessToken",n=e+"."+this.username+".refreshToken",i=e+"."+this.username+".clockDrift",o=e+".LastAuthUser";this.storage.setItem(t,this.signInUserSession.getIdToken().getJwtToken()),this.storage.setItem(r,this.signInUserSession.getAccessToken().getJwtToken()),this.storage.setItem(n,this.signInUserSession.getRefreshToken().getToken()),this.storage.setItem(i,""+this.signInUserSession.getClockDrift()),this.storage.setItem(o,this.username)},t.cacheUserData=function(e){this.storage.setItem(this.userDataKey,JSON.stringify(e))},t.clearCachedUserData=function(){this.storage.removeItem(this.userDataKey)},t.clearCachedUser=function(){this.clearCachedTokens(),this.clearCachedUserData()},t.cacheDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",r=e+".randomPasswordKey",n=e+".deviceGroupKey";this.storage.setItem(t,this.deviceKey),this.storage.setItem(r,this.randomPassword),this.storage.setItem(n,this.deviceGroupKey)},t.getCachedDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",r=e+".randomPasswordKey",n=e+".deviceGroupKey";this.storage.getItem(t)&&(this.deviceKey=this.storage.getItem(t),this.randomPassword=this.storage.getItem(r),this.deviceGroupKey=this.storage.getItem(n))},t.clearCachedDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",r=e+".randomPasswordKey",n=e+".deviceGroupKey";this.storage.removeItem(t),this.storage.removeItem(r),this.storage.removeItem(n)},t.clearCachedTokens=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId(),t=e+"."+this.username+".idToken",r=e+"."+this.username+".accessToken",n=e+"."+this.username+".refreshToken",
1i=e+".LastAuthUser",o=e+"."+this.username+".clockDrift";this.storage.removeItem(t),this.storage.removeItem(r),this.storage.removeItem(n),this.storage.removeItem(i),this.storage.removeItem(o)},t.getCognitoUserSession=function(e){return new nC({IdToken:new nA(e),AccessToken:new nw(e),RefreshToken:new nI(e)})},t.forgotPassword=function(e,t){var r={ClientId:this.pool.getClientId(),Username:this.username,ClientMetadata:t};this.getUserContextData()&&(r.UserContextData=this.getUserContextData()),this.client.request("ForgotPassword",r,function(t,r){return t?e.onFailure(t):"function"==typeof e.inputVerificationCode?e.inputVerificationCode(r):e.onSuccess(r)})},t.confirmPassword=function(e,t,r,n){var i={ClientId:this.pool.getClientId(),Username:this.username,ConfirmationCode:e,Password:t,ClientMetadata:n};this.getUserContextData()&&(i.UserContextData=this.getUserContextData()),this.client.request("ConfirmForgotPassword",i,function(e){return e?r.onFailure(e):r.onSuccess("SUCCESS")})},t.getAttributeVerificationCode=function(e,t,r){if(null==this.signInUserSession||!this.signInUserSession.isValid())return t.onFailure(Error("User is not authenticated"));this.client.request("GetUserAttributeVerificationCode",{AttributeName:e,AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:r},function(e,r){return e?t.onFailure(e):"function"==typeof t.inputVerificationCode?t.inputVerificationCode(r):t.onSuccess("SUCCESS")})},t.verifyAttribute=function(e,t,r){if(null==this.signInUserSession||!this.signInUserSession.isValid())return r.onFailure(Error("User is not authenticated"));this.client.request("VerifyUserAttribute",{AttributeName:e,Code:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(e){return e?r.onFailure(e):r.onSuccess("SUCCESS")})},t.getDevice=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(Error("User is not authenticated"));this.client.request("GetDevice",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey},function(t,r){return t?e.onFailure(t):e.onSuccess(r)})},t.forgetSpecificDevice=function(e,t){if(null==this.signInUserSession||!this.signInUserSession.isValid())return t.onFailure(Error("User is not authenticated"));this.client.request("ForgetDevice",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:e},function(e){return e?t.onFailure(e):t.onSuccess("SUCCESS")})},t.forgetDevice=function(e){var t=this;this.forgetSpecificDevice(this.deviceKey,{onFailure:e.onFailure,onSuccess:function(r){return t.deviceKey=null,t.deviceGroupKey=null,t.randomPassword=null,t.clearCachedDeviceKeyAndPassword(),e.onSuccess(r)}})},t.setDeviceStatusRemembered=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(Error("User is not authenticated"));this.client.request("UpdateDeviceStatus",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey,DeviceRememberedStatus:"remembered"},function(t){return t?e.onFailure(t):e.onSuccess("SUCCESS")})},t.setDeviceStatusNotRemembered=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(Error("User is not authenticated"));this.client.request("UpdateDeviceStatus",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey,DeviceRememberedStatus:"not_remembered"},function(t){return t?e.onFailure(t):e.onSuccess("SUCCESS")})},t.listDevices=function(e,t,r){if(null==this.signInUserSession||!this.signInUserSession.isValid())return r.onFailure(Error("User is not authenticated"));var n={AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),Limit:e};t&&(n.PaginationToken=t),this.client.request("ListDevices",n,function(e,t){return e?r.onFailure(e):r.onSuccess(t)})},t.globalSignOut=function(e){var t=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(Error("User is not authenticated"));this.client.request("GlobalSignOut",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(r){return r?e.onFailure(r):(t.clearCachedUser(),e.onSuccess("SUCCESS"))})},t.signOut=function(e){var t=this;if(!e||"function"!=typeof e)return void this.cleanClientData();
1this.getSession(function(r,n){if(r)return e(r);t.revokeTokens(function(r){t.cleanClientData(),e(r)})})},t.revokeTokens=function(e){if(void 0===e&&(e=function(){}),"function"!=typeof e)throw Error("Invalid revokeTokenCallback. It should be a function.");if(!this.signInUserSession)return e(Error("User is not authenticated"));if(!this.signInUserSession.getAccessToken())return e(Error("No Access token available"));var t=this.signInUserSession.getRefreshToken().getToken(),r=this.signInUserSession.getAccessToken();if(this.isSessionRevocable(r)&&t)return this.revokeToken({token:t,callback:e});e()},t.isSessionRevocable=function(e){if(e&&"function"==typeof e.decodePayload)try{return!!e.decodePayload().origin_jti}catch(e){}return!1},t.cleanClientData=function(){this.signInUserSession=null,this.clearCachedUser()},t.revokeToken=function(e){var t=e.token,r=e.callback;this.client.requestWithRetry("RevokeToken",{Token:t,ClientId:this.pool.getClientId()},function(e){if(e)return r(e);r()})},t.sendMFASelectionAnswer=function(e,t){var r=this,n={};n.USERNAME=this.username,n.ANSWER=e;var i={ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:n,ClientId:this.pool.getClientId(),Session:this.Session};this.getUserContextData()&&(i.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",i,function(n,i){return n?t.onFailure(n):(r.Session=i.Session,"SMS_MFA"===e)?t.mfaRequired(i.ChallengeName,i.ChallengeParameters):"SOFTWARE_TOKEN_MFA"===e?t.totpRequired(i.ChallengeName,i.ChallengeParameters):void 0})},t.getUserContextData=function(){return this.pool.getUserContextData(this.username)},t.associateSoftwareToken=function(e){var t=this;null!=this.signInUserSession&&this.signInUserSession.isValid()?this.client.request("AssociateSoftwareToken",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(t,r){return t?e.onFailure(t):e.associateSecretCode(r.SecretCode)}):this.client.request("AssociateSoftwareToken",{Session:this.Session},function(r,n){return r?e.onFailure(r):(t.Session=n.Session,e.associateSecretCode(n.SecretCode))})},t.verifySoftwareToken=function(e,t,r){var n=this;null!=this.signInUserSession&&this.signInUserSession.isValid()?this.client.request("VerifySoftwareToken",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),UserCode:e,FriendlyDeviceName:t},function(e,t){return e?r.onFailure(e):r.onSuccess(t)}):this.client.request("VerifySoftwareToken",{Session:this.Session,UserCode:e,FriendlyDeviceName:t},function(e,t){if(e)return r.onFailure(e);n.Session=t.Session;var i={};i.USERNAME=n.username;var o={ChallengeName:"MFA_SETUP",ClientId:n.pool.getClientId(),ChallengeResponses:i,Session:n.Session};n.getUserContextData()&&(o.UserContextData=n.getUserContextData()),n.client.request("RespondToAuthChallenge",o,function(e,t){return e?r.onFailure(e):(n.signInUserSession=n.getCognitoUserSession(t.AuthenticationResult),n.cacheTokens(),r.onSuccess(n.signInUserSession))})})},e}(),nN="auth";function nM(){}nM.prototype.userAgent=nU();var nB=function(){nM.category=nN},nL=function(e){nM.framework=e},nV=function(e){var t=nM.category?" "+nM.category:"",r=nM.framework?" framework/"+nM.framework:"";return""+nM.prototype.userAgent+t+r};function nK(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,nW(e,t)}function nG(e){var t="function"==typeof Map?new Map:void 0;return(nG=function(e){if(null===e||!nz(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return nq(e,arguments,nY(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),nW(r,e)})(e)}function nq(e,t,r){if(nH())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&nW(i,r.prototype),i}function nH(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nH=function(){return!!e})()}function nz(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}function nW(e,t){return(nW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function nY(e){return(nY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nJ=function(e){function t(t,r,n,i){var o;return(o=e.call(this,t)||this).code=r,o.name=n,o.statusCode=i,o}return nK(t,e),t}(nG(Error)),n$=function(){function e(e,t,r){this.endpoint=t||"https://cognito-idp."+e+".amazonaws.com/";var n=(r||{}).credentials;this.fetchOptions=n?{credentials:n}:{}}var t=e.prototype;return t.promisifyRequest=function(e,t){var r=this;return new Promise(function(n,i){r.request(e,t,function(e,t){e?i(new nJ(e.message,e.code,e.name,e.statusCode)):n(t)})})},t.requestWithRetry=function(e,t,r){var n=this;n2(function(t){return new Promise(function(r,i){n.request(e,t,function(e,t){e?i(e):r(t)})})},[t],5e3).then(function(e){return r(null,e)}).catch(function(e){return r(e)})},t.request=function(e,t,r){var n,i,o={"Content-Type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityProvi
1derService."+e,"X-Amz-User-Agent":nV(),"Cache-Control":"no-store"},s=Object.assign({},this.fetchOptions,{headers:o,method:"POST",mode:"cors",body:JSON.stringify(t)});fetch(this.endpoint,s).then(function(e){return n=e,e},function(e){if(e instanceof TypeError)throw Error("Network error");throw e}).then(function(e){return e.json().catch(function(){return{}})}).then(function(e){if(n.ok)return r(null,e);i=e;var t=(e.__type||e.code).split("#").pop(),o=Error(e.message||e.Message||null);return o.name=t,o.code=t,r(o)}).catch(function(e){if(n&&n.headers&&n.headers.get("x-amzn-errortype"))try{var t=n.headers.get("x-amzn-errortype").split(":")[0],i=Error(n.status?n.status.toString():null);return i.code=t,i.name=t,i.statusCode=n.status,r(i)}catch(e){}else e instanceof Error&&"Network error"===e.message&&(e.code="NetworkError");return r(e)})},e}(),nZ={debug:function(){}},nX=function(e){var t="nonRetryable";return e&&e[t]};function nQ(e,t,r,n){if(void 0===n&&(n=1),"function"!=typeof e)throw Error("functionToRetry must be a function");return nZ.debug(e.name+" attempt #"+n+" with args: "+JSON.stringify(t)),e.apply(void 0,t).catch(function(i){if(nZ.debug("error on "+e.name,i),nX(i))throw nZ.debug(e.name+" non retryable error",i),i;var o=r(n,t,i);if(nZ.debug(e.name+" retrying in "+o+" ms"),!1!==o)return new Promise(function(e){return setTimeout(e,o)}).then(function(){return nQ(e,t,r,n+1)});throw i})}function n0(e){var t=100,r=100;return function(n){var i=Math.pow(2,n)*t+r*Math.random();return!(i>e)&&i}}var n1=3e5;function n2(e,t,r){return void 0===r&&(r=n1),nQ(e,t,n0(r))}var n3=55,n6=function(){function e(e,t){var r=e||{},n=r.UserPoolId,i=r.ClientId,o=r.endpoint,s=r.fetchOptions,a=r.AdvancedSecurityDataCollectionFlag;if(!n||!i)throw Error("Both UserPoolId and ClientId are required.");if(n.length>n3||!/^[\w-]+_[0-9a-zA-Z]+$/.test(n))throw Error("Invalid UserPoolId format.");var u=n.split("_")[0];this.userPoolId=n,this.clientId=i,this.client=new n$(u,o,s),this.advancedSecurityDataCollectionFlag=!1!==a,this.storage=e.Storage||new nD().getStorage(),t&&(this.wrapRefreshSessionCallback=t)}var t=e.prototype;return t.getUserPoolId=function(){return this.userPoolId},t.getUserPoolName=function(){return this.getUserPoolId().split("_")[1]},t.getClientId=function(){return this.clientId},t.signUp=function(e,t,r,n,i,o){var s=this,a={ClientId:this.clientId,Username:e,Password:t,UserAttributes:r,ValidationData:n,ClientMetadata:o};this.getUserContextData(e)&&(a.UserContextData=this.getUserContextData(e)),this.client.request("SignUp",a,function(t,r){return t?i(t,null):i(null,{user:new nF({Username:e,Pool:s,Storage:s.storage}),userConfirmed:r.UserConfirmed,userSub:r.UserSub,codeDeliveryDetails:r.CodeDeliveryDetails})})},t.getCurrentUser=function(){var e="CognitoIdentityServiceProvider."+this.clientId+".LastAuthUser",t=this.storage.getItem(e);return t?new nF({Username:t,Pool:this,Storage:this.storage}):null},t.getUserContextData=function(e){if("undefined"!=typeof AmazonCognitoAdvancedSecurityData){var t=AmazonCognitoAdvancedSecurityData;if(this.advancedSecurityDataCollectionFlag){var r=t.getData(e,this.userPoolId,this.clientId);if(r)return{EncodedData:r}}return{}}},e}(),n5=r(6553),n4=function(){function e(e){if(void 0===e&&(e={}),e.domain&&(this.domain=e.domain),e.path?this.path=e.path:this.path="/",Object.prototype.hasOwnProperty.call(e,"expires")?this.expires=e.expires:this.expires=365,Object.prototype.hasOwnProperty.call(e,"secure")?this.secure=e.secure:this.secure=!0,Object.prototype.hasOwnProperty.call(e,"sameSite")){if(!["strict","lax","none"].includes(e.sameSite))throw Error('The sameSite value of cookieStorage must be "lax", "strict" or "none".');if("none"===e.sameSite&&!this.secure)throw Error("sameSite = None requires the Secure attribute in latest browser versions.");this.sameSite=e.sameSite}else this.sameSite=null}var t=e.prototype;return t.setItem=function(e,t){var r={path:this.path,expires:this.expires,domain:this.domain,secure:this.secure};return this.sameSite&&(r.sameSite=this.sameSite),n5.set(e,t,r),n5.get(e)},t.getItem=function(e){return n5.get(e)},t.removeItem=function(e){var t={path:this.path,expires:this.expires,domain:this.domain,secure:this.secure};return this.sameSite&&(t.sameSite=this.sameSite),n5.remove(e,t)},t.clear=function(){for(var e=n5.get(),t=Object.keys(e).length,r=0;r<t;++r)this.removeItem(Object.keys(e)[r]);return{}},e}(),n8=r(62645),n9="_self",n7=function(e){var t=window.open(e,n9);
1return t?Promise.resolve(t):Promise.reject()},ie=function(e){window.sessionStorage.setItem("oauth_state",e)},it=function(){var e=window.sessionStorage.getItem("oauth_state");return window.sessionStorage.removeItem("oauth_state"),e},ir=function(e){window.sessionStorage.setItem("ouath_pkce_key",e)},ii=function(){var e=window.sessionStorage.getItem("ouath_pkce_key");return window.sessionStorage.removeItem("ouath_pkce_key"),e};"undefined"!=typeof Symbol&&"function"==typeof Symbol.for&&Symbol.for("INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER");var io="x-amz-user-agent",is=r(4202),ia=64,iu=32,ic=new Uint32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),il=[0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19],ih=0x1fffffffffffff,id=function(){function e(){this.state=Int32Array.from(il),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 Error("Attempted to update an already finished hash.");var t=0,r=e.byteLength;if(this.bytesHashed+=r,8*this.bytesHashed>ih)throw Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[t++],r--,this.bufferLength===ia&&(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),r=this.bufferLength;if(t.setUint8(this.bufferLength++,128),r%ia>=ia-8){for(var n=this.bufferLength;n<ia;n++)t.setUint8(n,0);this.hashBuffer(),this.bufferLength=0}for(var n=this.bufferLength;n<ia-8;n++)t.setUint8(n,0);t.setUint32(ia-8,Math.floor(e/0x100000000),!0),t.setUint32(ia-4,e),this.hashBuffer(),this.finished=!0}for(var i=new Uint8Array(iu),n=0;n<8;n++)i[4*n]=this.state[n]>>>24&255,i[4*n+1]=this.state[n]>>>16&255,i[4*n+2]=this.state[n]>>>8&255,i[4*n+3]=this.state[n]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this,t=e.buffer,r=e.state,n=r[0],i=r[1],o=r[2],s=r[3],a=r[4],u=r[5],c=r[6],f=r[7],l=0;l<ia;l++){if(l<16)this.temp[l]=(255&t[4*l])<<24|(255&t[4*l+1])<<16|(255&t[4*l+2])<<8|255&t[4*l+3];else{var h=this.temp[l-2],d=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,p=((h=this.temp[l-15])>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[l]=(d+this.temp[l-7]|0)+(p+this.temp[l-16]|0)}var g=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&u^~a&c)|0)+(f+(ic[l]+this.temp[l]|0)|0)|0,y=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&i^n&o^i&o)|0;f=c,c=u,u=a,a=s+g|0,s=o,o=i,i=n,n=g+y|0}r[0]+=n,r[1]+=i,r[2]+=o,r[3]+=s,r[4]+=a,r[5]+=u,r[6]+=c,r[7]+=f},e}();let ip=e=>new TextEncoder().encode(e);var ig=r(86943).hp,iy=void 0!==ig&&ig.from?function(e){return ig.from(e,"utf8")}:ip;function iv(e){return e instanceof Uint8Array?e:"string"==typeof e?iy(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function im(e){return"string"==typeof e?0===e.length:0===e.byteLength}var ib=function(){function e(e){this.secret=e,this.hash=new id,this.reset()}return e.prototype.update=function(e){if(!im(e)&&!this.error)try{this.hash.update(iv(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,is.sH)(this,void 0,void 0,function(){return(0,is.YH)(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new id,this.secret){this.outer=new id;var e=iw(this.secret),t=new Uint8Array(ia);t.set(e);for(var r=0;r<ia;r++)e[r]^=54,t[r]^=92;this.hash.update(e),this.outer.update(t);for(var r=0;r<e.byteLength;r++)e[r]=0}},e}();function iw(e){var t=iv(e);if(t.byteLength>ia){var r=new id;r.update(t),t=r.digest()}var n=new Uint8Array(ia);return n.set(t),n}var i_="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",iS=function(e,t,r){H.dispatch("auth",{event:e,data:t,message:r},"Auth",i_)},iA=new M("OAuth");let iI=function(){function e(e){var t=e.config,r=e.cognitoClientId,n=e.scopes,i=void 0===n?[]:n;if(this._urlOpener=t.urlOpener||n7,this._config=t,this._cognitoClientId=r,!this.isValidScopes(i))throw Error("scopes must be a String Array");this._scopes=i}return e.prototype.isValidScopes=function(e){return Array.isArray(e)&&e.every(function(e){return"string"==typeof e})},e.prototype.oauthSignIn=function(e,t,r,i,o,s){void 0===e&&(e="code"),void 0===o&&(o=n.Cognito);var a=this._generateState(32),u=s?a+"-"+r_(s):a;ie(u);var c=this._generateRandom(128);ir(c);var f=this._generateChallenge(c),l="S256",h=this._scopes.join(" "),d="https://"+t+"/oauth2/authorize?"+Object.entries((0,C.__assign)((0,C.__assign)({redirect_uri:r,response_type:e,client_id:i,identity_provider:o,scope:h,state:u},"code"===e?{code_challenge:f}:{}),"code"===e?{code_challenge_method:l}:{})).map(function(e){var t=(0,C.__read)(e,2),r=t[0],n=t[1];return encodeURIComponent(r)+"="+encodeURIComponent(n)}).join("&");iA.debug("Redirecting to "+d),this._urlOpener(d,r)},e.prototype._handleCodeFlow=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){var t,r,n,i,o,s,a,c,f,h,d,p,g,y,v,m;return(0,C.__generator)(this,function(b){switch(b.label){case 0:if(t=((0,n8.parse)(e).query||"").split("&").map(function(e){return e.split("=")}).reduce(function(e,t){var r,n=(0,C.__read)(t,2),i=n[0],o=n[1];return(0,C.__assign)((0,C.__assign)({},e),((r={})[i]=o,r))},{code:void 0}).code,r=(0,n8.parse)(e).pathname||"/",n=(0,n8.parse)(this._config.redirectSignIn).pathname||"/",!t||r!==n)return[2];return iS("codeFlow",{},"Retrieving tokens from "+(i="https://"+this._config.domain+"/oauth2/token")),o=O(this._config)?this._cognitoClientId:this._config.clientID,s=O(this._config)?this._config.redirectSignIn:this._config.redirectUri,a=ii(),c=(0,C.__assign)({grant_type:"authorization_code",code:t,client_id:o,redirect_uri:s},a?{code_verifier:a}:{}),iA.debug("Calling token endpoint: "+i+" with",c),f=Object.entries(c).map(function(e){var t=(0,C.__read)(e,2),r=t[0],n=t[1];return encodeURIComponent(r)+"="+encodeURIComponent(n)}).join("&"),h={category:u.Auth,action:l.FederatedSignIn},[4,fetch(i,{method:"POST",headers:((m={"Content-Type":"application/x-www-form-urlencoded"})[io]=tK(h),m),body:f})];case 1:return[4,b.sent().json()];case 2:if(p=(d=b.sent()).access_token,g=d.refresh_token,y=d.id_token,v=d.error)throw Error(v);return[2,{accessToken:p,refreshToken:g,idToken:y}]}})})},e.prototype._handleImplicitFlow=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){var t,r,n;return(0,C.__generator)(this,function(i){return r=(t=((0,n8.parse)(e).hash||"#").substr(1).split("&").map(function(e){return e.split("=")}).reduce(function(e,t){var r,n=(0,C.__read)(t,2),i=n[0],o=n[1];return(0,C.__assign)((0,C.__assign)({},e),((r={})[i]=o,r))},{id_token:void 0,access_token:void 0})).id_token,n=t.access_token,iS("implicitFlow",{},"Got tokens from "+e),iA.debug("Retrieving implicit tokens from "+e+" with"),[2,{accessToken:n,idToken:r,refreshToken:null}]})})},e.prototype.handleAuthResponse=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){var t,r,n,i,o,s,a;return(0,C.__generator)(this,function(u){switch(u.label){case 0:if(u.trys.push([0,5,,6]),r=(t=e?(0,C.__assign)((0,C.__assign)({},((0,n8.parse)(e).hash||"#").substr(1).split("&").map(function(e){return e.split("=")}).reduce(function(e,t){var r=(0,C.__read)(t,2),n=r[0],i=r[1];return e[n]=i,e},{})),((0,n8.parse)(e).query||"").split("&").map(function(e){return e.split("=")}).reduce(function(e,t){var r=(0,C.__read)(t,2),n=r[0],i=r[1];return e[n]=i,e},{})):{}).error,n=t.error_description,r)throw Error(n);
1if(i=this._validateState(t),iA.debug("Starting "+this._config.responseType+" flow with "+e),"code"!==this._config.responseType)return[3,2];return o=[{}],[4,this._handleCodeFlow(e)];case 1:return[2,C.__assign.apply(void 0,[C.__assign.apply(void 0,o.concat([u.sent()])),{state:i}])];case 2:return s=[{}],[4,this._handleImplicitFlow(e)];case 3:return[2,C.__assign.apply(void 0,[C.__assign.apply(void 0,s.concat([u.sent()])),{state:i}])];case 4:return[3,6];case 5:throw a=u.sent(),iA.debug("Error handling auth response.",a),a;case 6:return[2]}})})},e.prototype._validateState=function(e){if(e){var t=it(),r=e.state;if(t&&t!==r)throw Error("Invalid state in OAuth flow");return r}},e.prototype.signOut=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){var e,t,r;return(0,C.__generator)(this,function(n){return e="https://"+this._config.domain+"/logout?",t=O(this._config)?this._cognitoClientId:this._config.oauth.clientID,r=O(this._config)?this._config.redirectSignOut:this._config.returnTo,iS("oAuthSignOut",{oAuth:"signOut"},"Signing out from "+(e+=Object.entries({client_id:t,logout_uri:encodeURIComponent(r)}).map(function(e){var t=(0,C.__read)(e,2);return t[0]+"="+t[1]}).join("&"))),iA.debug("Signing out from "+e),[2,this._urlOpener(e,r)]})})},e.prototype._generateState=function(e){for(var t="",r=e,n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";r>0;--r)t+=n[Math.round(Math.random()*(n.length-1))];return t},e.prototype._generateChallenge=function(e){var t=new ib;t.update(e);var r=t.digestSync(),n=rI.hp.from(r).toString("base64");return this._base64URL(n)},e.prototype._base64URL=function(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},e.prototype._generateRandom=function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=new Uint8Array(e);if("undefined"!=typeof window&&window.crypto)window.crypto.getRandomValues(r);else for(var n=0;n<e;n+=1)r[n]=Math.random()*t.length|0;return this._bufferToString(r)},e.prototype._bufferToString=function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=[],n=0;n<e.byteLength;n+=1){var i=e[n]%t.length;r.push(t[i])}return r.join("")},e}(),iE=function(e){if(Z().isBrowser&&window.location)e({url:window.location.href});else if(Z().isNode);else throw Error("Not supported")};!function(e){e.DEFAULT_MSG="Authentication Error",e.EMPTY_EMAIL="Email cannot be empty",e.EMPTY_PHONE="Phone number cannot be empty",e.EMPTY_USERNAME="Username cannot be empty",e.INVALID_USERNAME="The username should either be a string or one of the sign in types",e.EMPTY_PASSWORD="Password cannot be empty",e.EMPTY_CODE="Confirmation code cannot be empty",e.SIGN_UP_ERROR="Error creating account",e.NO_MFA="No valid MFA method provided",e.INVALID_MFA="Invalid MFA type",e.EMPTY_CHALLENGE="Challenge response cannot be empty",e.NO_USER_SESSION="Failed to get the session because the user is empty",e.NETWORK_ERROR="Network Error",e.DEVICE_CONFIG="Device tracking has not been configured in this User Pool",e.AUTOSIGNIN_ERROR="Please use your credentials to sign in"}(U||(U={}));var iU=new M("AuthError"),iC=function(e){function t(r){var n=this,i=iT[r],o=i.message,s=i.log;return(n=e.call(this,o)||this).constructor=t,Object.setPrototypeOf(n,t.prototype),n.name="AuthError",n.log=s||o,iU.error(n.log),n}return(0,C.__extends)(t,e),t}(Error),ix=function(e){function t(r){var n=e.call(this,r)||this;return n.constructor=t,Object.setPrototypeOf(n,t.prototype),n.name="NoUserPoolError",n}return(0,C.__extends)(t,e),t}(iC),iT={noConfig:{message:U.DEFAULT_MSG,log:"\n Error: Amplify has not been configured correctly.\n This error is typically caused by one of the following scenarios:\n\n 1. Make sure you're passing the awsconfig object to Amplify.configure() in your app's entry point\n See https://aws-amplify.github.io/docs/js/authentication#configure-your-app for more information\n \n 2. There might be multiple conflicting versions of amplify packages in your node_modules.\n Refer to our docs site for help upgrading Amplify packages (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js)\n "},missingAuthConfig:{message:U.DEFAULT_MSG,log:"\n Error: Amplify has not been configured correctly. \n The configuration object is missing required auth properties.\n This error is typically caused by one of the following scenarios:\n\n 1. Did you run `amplify push` after adding auth via `amplify add auth`?\n See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information\n\n 2. This could also be caused by multiple conflicting versions of amplify packages, see (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js) for help upgrading Amplify packages.\n "},emptyUsername:{message:U.EMPTY_USERNAME},invalidUsername:{message:U.INVALID_USERNAME},emptyPassword:{message:U.EMPTY_PASSWORD},emptyCode:{message:U.EMPTY_CODE},signUpError:{message:U.SIGN_UP_ERROR,log:"The first parameter should either be non-null string or object"},noMFA:{message:U.NO_MFA},invalidMFA:{message:U.INVALID_MFA},emptyChallengeResponse:{message:U.EMPTY_CHALLENGE},noUserSession:{message:U.NO_USER_SESSION},deviceConfig:{message:U.DEVICE_CONFIG}
1,networkError:{message:U.NETWORK_ERROR},autoSignInError:{message:U.AUTOSIGNIN_ERROR},default:{message:U.DEFAULT_MSG}},iP=new M("AuthClass"),iO="aws.cognito.signin.user.admin",ik=1e4,iR="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",iD=function(e,t,r){H.dispatch("auth",{event:e,data:t,message:r},"Auth",iR)},ij=60,iF=18e4,iN=new(function(){function e(e){var t=this;this.userPool=null,this.user=null,this.oAuthFlowInProgress=!1,this.autoSignInInitiated=!1,this.inflightSessionPromise=null,this.inflightSessionPromiseCounter=0,this.Credentials=rc,this.wrapRefreshSessionCallback=function(e){return function(t,r){return r?iD("tokenRefresh",void 0,"New token retrieved"):iD("tokenRefresh_failure",t,"Failed to retrieve new token"),e(t,r)}},this.configure(e),this.currentCredentials=this.currentCredentials.bind(this),this.currentUserCredentials=this.currentUserCredentials.bind(this),H.listen("auth",function(e){switch(e.payload.event){case"verify":case"signIn":t._storage.setItem("amplify-signin-with-hostedUI","false");break;case"signOut":t._storage.removeItem("amplify-signin-with-hostedUI");break;case"cognitoHostedUI":t._storage.setItem("amplify-signin-with-hostedUI","true")}}),nB(),nL(tL.framework),tL.observeFrameworkChanges(function(){nL(tL.framework)})}return e.prototype.getModuleName=function(){return"Auth"},e.prototype.configure=function(e){var t=this;if(!e)return this._config||{};iP.debug("configure Auth");var r=Object.assign({},this._config,re(e).Auth,e);this._config=r;var n=this._config,o=n.userPoolId,s=n.userPoolWebClientId,a=n.cookieStorage,u=n.oauth,c=n.region,f=n.identityPoolId,l=n.mandatorySignIn,h=n.refreshHandlers,d=n.identityPoolRegion,p=n.clientMetadata,g=n.endpoint,y=n.storage;if(y){if(!this._isValidAuthStorage(y))throw iP.error("The storage in the Auth config is not valid!"),Error("Empty storage object");this._storage=y}else a?this._storage=new n4(a):this._storage=e.ssr?new rw:new Y().getStorage();if(this._storageSync=Promise.resolve(),"function"==typeof this._storage.sync&&(this._storageSync=this._storage.sync()),o){var v={UserPoolId:o,ClientId:s,endpoint:g};v.Storage=this._storage,this.userPool=new n6(v,this.wrapRefreshSessionCallback)}this.Credentials.configure({mandatorySignIn:l,region:c,userPoolId:o,identityPoolId:f,refreshHandlers:h,storage:this._storage,identityPoolRegion:d});var m=u?O(this._config.oauth)?u:u.awsCognito:void 0;if(m){var b=Object.assign({cognitoClientId:s,UserPoolId:o,domain:m.domain,scopes:m.scope,redirectSignIn:m.redirectSignIn,redirectSignOut:m.redirectSignOut,responseType:m.responseType,Storage:this._storage,urlOpener:m.urlOpener,clientMetadata:p},m.options);this._oAuthHandler=new iI({scopes:b.scopes,config:b,cognitoClientId:b.cognitoClientId});var w={};iE(function(e){var r=e.url;w[r]||(w[r]=!0,t._handleAuthResponse(r))})}return iD("configured",null,"The Auth category has been configured successfully"),this.autoSignInInitiated||"function"!=typeof this._storage.getItem||(this.isTrueStorageValue("amplify-polling-started")&&(iD("autoSignIn_failure",null,i.AutoSignInError),this._storage.removeItem("amplify-auto-sign-in")),this._storage.removeItem("amplify-polling-started")),this._config},e.prototype.signUp=function(e){for(var t,r,n,o,s=this,a=[],u=1;u<arguments.length;u++)a[u-1]=arguments[u];if(!this.userPool)return this.rejectNoUserPool();var c=null,f=null,l=[],h=null,d={enabled:!1},p={},g={};if(e&&"string"==typeof e){c=e,f=a?a[0]:null;var y=a?a[1]:null,v=a?a[2]:null;y&&l.push(new nO({Name:"email",Value:y})),v&&l.push(new nO({Name:"phone_number",Value:v}))}else{if(!e||"object"!=typeof e)return this.rejectAuthError(i.SignUpError);c=e.username,f=e.password,e&&e.clientMetadata?o=e.clientMetadata:this._config.clientMetadata&&(o=this._config.clientMetadata);var m=e.attributes;m&&Object.keys(m).map(function(e){l.push(new nO({Name:e,Value:m[e]}))});var b=e.validationData;b&&(h=[],Object.keys(b).map(function(e){h.push(new nO({Name:e,Value:b[e]}))})),(d=null!=(t=e.autoSignIn)?t:{enabled:!1}).enabled&&(this._storage.setItem("amplify-auto-sign-in","true"),p=null!=(r=d.validationData)?r:{},g=null!=(n=d.clientMetaData)?n:{})}return c?f?(iP.debug("signUp attrs:",l),iP.debug("signUp validation data:",h),new Promise(function(e,t){s.userPool.signUp(c,f,l,h,function(r,n){r?(iD("signUp_failure",r,c+" failed to signup"),t(r)):(iD("signUp",n,c+" has signed up successfully"),d.enabled&&s.handleAutoSignIn(c,f,p,g,n),e(n))},o)})):this.rejectAuthError(i.EmptyPassword):this.rejectAuthError(i.EmptyUsername)}
1,e.prototype.handleAutoSignIn=function(e,t,r,n,i){this.autoSignInInitiated=!0;var o=new rA({Username:e,Password:t,ValidationData:r,ClientMetadata:n});i.userConfirmed?this.signInAfterUserConfirmed(o):"link"===this._config.signUpVerificationMethod?this.handleLinkAutoSignIn(o):this.handleCodeAutoSignIn(o)},e.prototype.handleCodeAutoSignIn=function(e){var t=this,r=function(n){"confirmSignUp"===n.payload.event&&t.signInAfterUserConfirmed(e,r)};H.listen("auth",r)},e.prototype.handleLinkAutoSignIn=function(e){var t=this;this._storage.setItem("amplify-polling-started","true");var r=Date.now(),n=setInterval(function(){Date.now()-r>iF?(clearInterval(n),iD("autoSignIn_failure",null,"Please confirm your account and use your credentials to sign in."),t._storage.removeItem("amplify-auto-sign-in")):t.signInAfterUserConfirmed(e,null,n)},5e3)},e.prototype.signInAfterUserConfirmed=function(e,t,r){return(0,C.__awaiter)(this,void 0,void 0,function(){var n,i,o=this;return(0,C.__generator)(this,function(s){switch(s.label){case 0:n=this.createCognitoUser(e.getUsername()),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,n.authenticateUser(e,this.authCallbacks(n,function(n){iD("autoSignIn",n,e.getUsername()+" has signed in successfully"),t&&H.remove("auth",t),r&&(clearInterval(r),o._storage.removeItem("amplify-polling-started")),o._storage.removeItem("amplify-auto-sign-in")},function(e){iP.error(e),o._storage.removeItem("amplify-auto-sign-in")}))];case 2:return s.sent(),[3,4];case 3:return i=s.sent(),iP.error(i),[3,4];case 4:return[2]}})})},e.prototype.confirmSignUp=function(e,t,r){var n,o=this;if(!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i.EmptyUsername);if(!t)return this.rejectAuthError(i.EmptyCode);var s=this.createCognitoUser(e),a=!r||"boolean"!=typeof r.forceAliasCreation||r.forceAliasCreation;return r&&r.clientMetadata?n=r.clientMetadata:this._config.clientMetadata&&(n=this._config.clientMetadata),new Promise(function(r,u){s.confirmRegistration(t,a,function(t,n){t?u(t):(iD("confirmSignUp",n,e+" has been confirmed successfully"),o.isTrueStorageValue("amplify-auto-sign-in")&&!o.autoSignInInitiated&&(iD("autoSignIn_failure",null,i.AutoSignInError),o._storage.removeItem("amplify-auto-sign-in")),r(n))},n)})},e.prototype.isTrueStorageValue=function(e){var t=this._storage.getItem(e);return!!t&&"true"===t},e.prototype.resendSignUp=function(e,t){if(void 0===t&&(t=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i.EmptyUsername);var r=this.createCognitoUser(e);return new Promise(function(e,n){r.resendConfirmationCode(function(t,r){t?n(t):e(r)},t)})},e.prototype.signIn=function(e,t,r){if(void 0===r&&(r=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();var n=null,o=null,s={};if("string"==typeof e)n=e,o=t;else{if(!k(e))return this.rejectAuthError(i.InvalidUsername);void 0!==t&&iP.warn("The password should be defined under the first parameter object!"),n=e.username,o=e.password,s=e.validationData}if(!n)return this.rejectAuthError(i.EmptyUsername);var a=new rA({Username:n,Password:o,ValidationData:s,ClientMetadata:r});return o?this.signInWithPassword(a):this.signInWithoutPassword(a)},e.prototype.authCallbacks=function(e,t,r){var n=this,i=this;return{onSuccess:function(o){return(0,C.__awaiter)(n,void 0,void 0,function(){var n,s,a,u;return(0,C.__generator)(this,function(c){switch(c.label){case 0:iP.debug(o),delete e.challengeName,delete e.challengeParam,c.label=1;case 1:return c.trys.push([1,4,5,9]),[4,this.Credentials.clear()];case 2:return c.sent(),[4,this.Credentials.set(o,"session")];case 3:return n=c.sent(),iP.debug("succeed to get cognito credentials",n),[3,9];case 4:return s=c.sent(),iP.debug("cannot get cognito credentials",s),[3,9];case 5:return c.trys.push([5,7,,8]),[4,this.currentUserPoolUser()];case 6:return i.user=a=c.sent(),iD("signIn",a,"A user "+e.getUsername()+" has been signed in"),t(a),[3,8];case 7:return u=c.sent(),iP.error("Failed to get the signed in user",u),r(u),[3,8];case 8:return[7];case 9:return[2]}})})},onFailure:function(t){iP.debug("signIn failure",t),iD("signIn_failure",t,e.getUsername()+" failed to signin"),r(t)},customChallenge:function(r){iP.debug("signIn custom challenge answer required"),e.challengeName="CUSTOM_CHALLENGE",e.challengeParam=r,t(e)},mfaRequired:function(r,n){iP.debug("signIn MFA required"),e.challengeName=r,e.challengeParam=n,t(e)},mfaSetup:function(r,n){iP.debug("signIn mfa setup",r),e.challengeName=r,e.challengeParam=n,t(e)},newPasswordRequired:function(r,n){iP.debug("signIn new password"),e.challengeName="NEW_PASSWORD_REQUIRED",e.challengeParam={userAttributes:r,requiredAttributes:n},t(e)},totpRequired:function(r,n){iP.debug("signIn totpRequired"),e.challengeName=r,e.challengeParam=n,t(e)},selectMFAType:function(r,n){iP.debug("signIn selectMFAType",r),e.challengeName=r,e.challengeParam=n,t(e)}}},e.prototype.signInWithPassword=function(e){var t=this;if(this.pendingSignIn)throw Error("Pending sign-in attempt already in progress");var r=this.createCognitoUser(e.getUsername());return this.pendingSignIn=new Promise(function(n,i){r.authenticateUser(e,t.authCallbacks(r,function(e){t.pendingSignIn=null,n(e)},function(e){t.pendingSignIn=null,i(e)}))}),this.pendingSignIn},e.prototype.signInWithoutPassword=function(e){var t=this,r=this.createCognitoUser(e.getUsername());return r.setAuthenticationFlowType("CUSTOM_AUTH"),new Promise(function(n,i){r.initiateAuth(e,t.authCallbacks(r,n,i))})},e.prototype.getMFAOptions=function(e){return new Promise(function(t,r){e.getMFAOptions(function(e,n){if(e){iP.debug("get MFA Options failed",e),r(e);return}iP.debug("get MFA options success",n),t(n)})})},e.prototype.getPreferredMFA=function(e,t){var r=this,n=this;return new Promise(function(i,o){var s=r._config.clientMetadata,a=!!t&&t.bypassCache;e.getUserData(function(t,s){return(0,C.__awaiter)(r,void 0,void 0,function(){var r,a;return(0,C.__generator)(this,function(u){switch(u.label){case 0:if(!t)return[3,5];if(iP.debug("getting preferred mfa failed",t),!this.isSessionInvalid(t))return[3,4];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(e)];case 2:return u.sent(),[3,4];
1case 3:return r=u.sent(),o(Error("Session is invalid due to: "+t.message+" and failed to clean up invalid session: "+r.message)),[2];case 4:return o(t),[2];case 5:if(!(a=n._getMfaTypeFromUserData(s)))return o("invalid MFA Type"),[2];return i(a),[2]}})})},{bypassCache:a,clientMetadata:s})})},e.prototype._getMfaTypeFromUserData=function(e){var t=null,r=e.PreferredMfaSetting;if(r)t=r;else{var n=e.UserMFASettingList;n?0===n.length?t="NOMFA":iP.debug("invalid case for getPreferredMFA",e):t=e.MFAOptions?"SMS_MFA":"NOMFA"}return t},e.prototype._getUserData=function(e,t){var r=this;return new Promise(function(n,i){e.getUserData(function(t,o){return(0,C.__awaiter)(r,void 0,void 0,function(){var r;return(0,C.__generator)(this,function(s){switch(s.label){case 0:if(!t)return[3,5];if(iP.debug("getting user data failed",t),!this.isSessionInvalid(t))return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(e)];case 2:return s.sent(),[3,4];case 3:return r=s.sent(),i(Error("Session is invalid due to: "+t.message+" and failed to clean up invalid session: "+r.message)),[2];case 4:return i(t),[2];case 5:n(o),s.label=6;case 6:return[2]}})})},t)})},e.prototype.setPreferredMFA=function(e,t){return(0,C.__awaiter)(this,void 0,void 0,function(){var r,n,o,s,a,u,c,f=this;return(0,C.__generator)(this,function(l){switch(l.label){case 0:return r=this._config.clientMetadata,[4,this._getUserData(e,{bypassCache:!0,clientMetadata:r})];case 1:switch(n=l.sent(),o=null,s=null,t){case"TOTP":case"SOFTWARE_TOKEN_MFA":return[3,2];case"SMS":case"SMS_MFA":return[3,3];case"NOMFA":return[3,4]}return[3,6];case 2:return s={PreferredMfa:!0,Enabled:!0},[3,7];case 3:return o={PreferredMfa:!0,Enabled:!0},[3,7];case 4:return a=n.UserMFASettingList,[4,this._getMfaTypeFromUserData(n)];case 5:if("NOMFA"===(u=l.sent()))return[2,Promise.resolve("No change for mfa type")];if("SMS_MFA"===u)o={PreferredMfa:!1,Enabled:!1};else{if("SOFTWARE_TOKEN_MFA"!==u)return[2,this.rejectAuthError(i.InvalidMFA)];s={PreferredMfa:!1,Enabled:!1}}return a&&0!==a.length&&a.forEach(function(e){"SMS_MFA"===e?o={PreferredMfa:!1,Enabled:!1}:"SOFTWARE_TOKEN_MFA"===e&&(s={PreferredMfa:!1,Enabled:!1})}),[3,7];case 6:return iP.debug("no validmfa method provided"),[2,this.rejectAuthError(i.NoMFA)];case 7:return c=this,[2,new Promise(function(t,n){e.setUserMfaPreference(o,s,function(i,o){if(i)return iP.debug("Set user mfa preference error",i),n(i);iP.debug("Set user mfa success",o),iP.debug("Caching the latest user data into local"),e.getUserData(function(r,i){return(0,C.__awaiter)(f,void 0,void 0,function(){var i;return(0,C.__generator)(this,function(s){switch(s.label){case 0:if(!r)return[3,5];if(iP.debug("getting user data failed",r),!this.isSessionInvalid(r))return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(e)];case 2:return s.sent(),[3,4];case 3:return i=s.sent(),n(Error("Session is invalid due to: "+r.message+" and failed to clean up invalid session: "+i.message)),[2];case 4:return[2,n(r)];case 5:return[2,t(o)]}})})},{bypassCache:!0,clientMetadata:r})})})]}})})},e.prototype.disableSMS=function(e){return new Promise(function(t,r){e.disableMFA(function(e,n){if(e){iP.debug("disable mfa failed",e),r(e);return}iP.debug("disable mfa succeed",n),t(n)})})},e.prototype.enableSMS=function(e){return new Promise(function(t,r){e.enableMFA(function(e,n){if(e){iP.debug("enable mfa failed",e),r(e);return}iP.debug("enable mfa succeed",n),t(n)})})},e.prototype.setupTOTP=function(e){return new Promise(function(t,r){e.associateSoftwareToken({onFailure:function(e){iP.debug("associateSoftwareToken failed",e),r(e)},associateSecretCode:function(e){iP.debug("associateSoftwareToken success",e),t(e)}})})},e.prototype.verifyTotpToken=function(e,t){iP.debug("verification totp token",e,t),e&&"function"==typeof e.getSignInUserSession&&(r=e.getSignInUserSession());var r,n=null==r?void 0:r.isValid();return new Promise(function(r,i){e.verifySoftwareToken(t,"My TOTP device",{onFailure:function(e){iP.debug("verifyTotpToken failed",e),i(e)},onSuccess:function(t){n||iD("signIn",e,"A user "+e.getUsername()+" has been signed in"),iD("verify",e,"A user "+e.getUsername()+" has been verified"),iP.debug("verifyTotpToken success",t),r(t)}})})},e.prototype.confirmSignIn=function(e,t,r,n){var o=this;if(void 0===n&&(n=this._config.clientMetadata),!t)return this.rejectAuthError(i.EmptyCode);var s=this;return new Promise(function(i,a){e.sendMFACode(t,{onSuccess:function(t){return(0,C.__awaiter)(o,void 0,void 0,function(){var r,n,o;return(0,C.__generator)(this,function(a){switch(a.label){case 0:iP.debug(t),a.label=1;case 1:return a.trys.push([1,4,5,10]),[4,this.Credentials.clear()];case 2:return a.sent(),[4,this.Credentials.set(t,"session")];case 3:return r=a.sent(),iP.debug("succeed to get cognito credentials",r),[3,10];case 4:return n=a.sent(),iP.debug("cannot get cognito credentials",n),[3,10];case 5:s.user=e,a.label=6;case 6:return a.trys.push([6,8,,9]),[4,this.currentUserPoolUser()];case 7:return e.attributes=a.sent().attributes,[3,9];case 8:return o=a.sent(),iP.debug("cannot get updated Cognito User",o),[3,9];case 9:return iD("signIn",e,"A user "+e.getUsername()+" has been signed in"),i(e),[7];case 10:return[2]}})})}
1,onFailure:function(e){iP.debug("confirm signIn failure",e),a(e)}},r,n)})},e.prototype.completeNewPassword=function(e,t,r,n){var o=this;if(void 0===r&&(r={}),void 0===n&&(n=this._config.clientMetadata),!t)return this.rejectAuthError(i.EmptyPassword);var s=this;return new Promise(function(i,a){e.completeNewPasswordChallenge(t,r,{onSuccess:function(t){return(0,C.__awaiter)(o,void 0,void 0,function(){var r,n;return(0,C.__generator)(this,function(o){switch(o.label){case 0:iP.debug(t),o.label=1;case 1:return o.trys.push([1,4,5,6]),[4,this.Credentials.clear()];case 2:return o.sent(),[4,this.Credentials.set(t,"session")];case 3:return r=o.sent(),iP.debug("succeed to get cognito credentials",r),[3,6];case 4:return n=o.sent(),iP.debug("cannot get cognito credentials",n),[3,6];case 5:return s.user=e,iD("signIn",e,"A user "+e.getUsername()+" has been signed in"),i(e),[7];case 6:return[2]}})})},onFailure:function(e){iP.debug("completeNewPassword failure",e),iD("completeNewPassword_failure",e,o.user+" failed to complete the new password flow"),a(e)},mfaRequired:function(t,r){iP.debug("signIn MFA required"),e.challengeName=t,e.challengeParam=r,i(e)},mfaSetup:function(t,r){iP.debug("signIn mfa setup",t),e.challengeName=t,e.challengeParam=r,i(e)},totpRequired:function(t,r){iP.debug("signIn mfa setup",t),e.challengeName=t,e.challengeParam=r,i(e)}},n)})},e.prototype.sendCustomChallengeAnswer=function(e,t,r){var n=this;return(void 0===r&&(r=this._config.clientMetadata),this.userPool)?t?new Promise(function(i,o){e.sendCustomChallengeAnswer(t,n.authCallbacks(e,i,o),r)}):this.rejectAuthError(i.EmptyChallengeResponse):this.rejectNoUserPool()},e.prototype.deleteUserAttributes=function(e,t){var r=this;return new Promise(function(n,i){r.userSession(e).then(function(r){e.deleteAttributes(t,function(e,t){return e?i(e):n(t)})})})},e.prototype.deleteUser=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){var e,t,r=this;return(0,C.__generator)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this._storageSync];case 1:return n.sent(),[3,3];case 2:throw e=n.sent(),iP.debug("Failed to sync cache info into memory",e),Error(e);case 3:return t=this._oAuthHandler&&"true"===this._storage.getItem("amplify-signin-with-hostedUI"),[2,new Promise(function(e,n){return(0,C.__awaiter)(r,void 0,void 0,function(){var r,i=this;return(0,C.__generator)(this,function(o){if(this.userPool){if(!(r=this.userPool.getCurrentUser()))return iP.debug("Failed to get user from user pool"),[2,n(Error("No current user."))];r.getSession(function(o,s){return(0,C.__awaiter)(i,void 0,void 0,function(){var i,s=this;return(0,C.__generator)(this,function(a){switch(a.label){case 0:if(!o)return[3,5];if(iP.debug("Failed to get the user session",o),!this.isSessionInvalid(o))return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(r)];case 2:return a.sent(),[3,4];case 3:return i=a.sent(),n(Error("Session is invalid due to: "+o.message+" and failed to clean up invalid session: "+i.message)),[2];case 4:return[2,n(o)];case 5:r.deleteUser(function(i,o){if(i)n(i);else{iD("userDeleted",o,"The authenticated user has been deleted."),r.signOut(),s.user=null;try{s.cleanCachedItems()}catch(e){iP.debug("failed to clear cached items")}t?s.oAuthSignOutRedirect(e,n):(iD("signOut",s.user,"A user has been signed out"),e(o))}}),a.label=6;case 6:return[2]}})})})}else iP.debug("no Congito User pool"),n(Error("Cognito User pool does not exist"));return[2]})})})]}})})},e.prototype.updateUserAttributes=function(e,t,r){var n=this;void 0===r&&(r=this._config.clientMetadata);var i=[],o=this;return new Promise(function(s,a){o.userSession(e).then(function(o){for(var u in t)if("sub"!==u&&0>u.indexOf("_verified")){var c={Name:u,Value:t[u]};i.push(c)}e.updateAttributes(i,function(e,r,i){return e?(iD("updateUserAttributes_failure",e,"Failed to update attributes"),a(e)):(iD("updateUserAttributes",n.createUpdateAttributesResultList(t,null==i?void 0:i.CodeDeliveryDetailsList),"Attributes successfully updated"),s(r))},r)})})},e.prototype.createUpdateAttributesResultList=function(e,t){var r={};return Object.keys(e).forEach(function(e){r[e]={isUpdated:!0};var n=null==t?void 0:t.find(function(t){return t.AttributeName===e});n&&(r[e].isUpdated=!1,r[e].codeDeliveryDetails=n)}),r},e.prototype.userAttributes=function(e){var t=this;return new Promise(function(r,n){t.userSession(e).then(function(t){e.getUserAttributes(function(e,t){e?n(e):r(t)})})})},e.prototype.verifiedContact=function(e){var t=this;return this.userAttributes(e).then(function(e){var r=t.attributesToObject(e),n={},i={};return r.email&&(r.email_verified?i.email=r.email:n.email=r.email),r.phone_number&&(r.phone_number_verified?i.phone_number=r.phone_number:n.phone_number=r.phone_number),{verified:i,unverified:n}})},e.prototype.isErrorWithMessage=function(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"message")},e.prototype.isTokenRevokedError=function(e){return this.isErrorWithMessage(e)&&"Access Token has been revoked"===e.message},e.prototype.isRefreshTokenRevokedError=function(e){return this.isErrorWithMessage(e)&&"Refresh Token has been revoked"===e.message},e.prototype.isUserDisabledError=function(e){return this.isErrorWithMessage(e)&&"User is disabled."===e.message},e.prototype.isUserDoesNotExistError=function(e){return this.isErrorWithMessage(e)&&"User does not exist."===e.message},e.prototype.isRefreshTokenExpiredError=function(e){return this.isErrorWithMessage(e)&&"Refresh Token has expired"===e.message},e.prototype.isPasswordResetRequiredError=function(e){return this.isErrorWithMessage(e)&&"Password reset required for the user"===e.message},e.prototype.isSignedInHostedUI=function(){return this._oAuthHandler&&"true"===this._storage.getItem("amplify-signin-with-hostedUI")},e.prototype.isSessionInvalid=function(e){return this.isUserDisabledError(e)||this.isUserDoesNotExistError(e)||this.isTokenRevokedError(e)||this.isRefreshTokenRevokedError(e)||this.isRefreshTokenExpiredError(e)||this.isPasswordResetRequiredError(e)},e.prototype.cleanUpInvalidSession=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){var t,r=this;return(0,C.__generator)(this,function(n){switch(n.label){case 0:e.signOut(),this.user=null,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.cleanCachedItems()];case 2:return n.sent(),[3,4];case 3:return t=n.sent(),iP.debug("failed to clear cached items"),[3,4];case 4:if(this.isSignedInHostedUI())return[2,new Promise(function(e,t){r.oAuthSignOutRedirect(e,t)})];return iD("signOut",this.user,"A user has been signed out"),[2]}})})},e.prototype.currentUserPoolUser=function(e){var t=this;return this.userPool?new Promise(function(r,n){t._storageSync.then(function(){return(0,C.__awaiter)(t,void 0,void 0,function(){var t,i,o,s,a,u=this;return(0,C.__generator)(this,function(c){switch(c.label){case 0:if(!this.isOAuthInProgress())return[3,2];return iP.debug("OAuth signIn in progress, waiting for resolution..."),[4,new Promise(function(e){var t=setTimeout(function(){iP.debug("OAuth signIn in progress timeout"),H.remove("auth",r),e()},ik);function r(n){var i=n.payload.event;("cognitoHostedUI"===i||"cognitoHostedUI_failure"===i)&&(iP.debug("OAuth signIn resolved: "+i),clearTimeout(t),H.remove("auth",r),e())}H.listen("auth",r)}
1)];case 1:c.sent(),c.label=2;case 2:if(!(t=this.userPool.getCurrentUser()))return iP.debug("Failed to get user from user pool"),n("No current user"),[2];c.label=3;case 3:return c.trys.push([3,7,,8]),[4,this._userSession(t)];case 4:if(i=c.sent(),!(o=!!e&&e.bypassCache))return[3,6];return[4,this.Credentials.clear()];case 5:c.sent(),c.label=6;case 6:if(s=this._config.clientMetadata,!(void 0===(a=i.getAccessToken().decodePayload().scope)?"":a).split(" ").includes(iO))return iP.debug("Unable to get the user data because the "+iO+" is not in the scopes of the access token"),[2,r(t)];return t.getUserData(function(e,i){return(0,C.__awaiter)(u,void 0,void 0,function(){var o,s,a,u,c,f;return(0,C.__generator)(this,function(l){switch(l.label){case 0:if(!e)return[3,7];if(iP.debug("getting user data failed",e),!this.isSessionInvalid(e))return[3,5];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(t)];case 2:return l.sent(),[3,4];case 3:return o=l.sent(),n(Error("Session is invalid due to: "+e.message+" and failed to clean up invalid session: "+o.message)),[2];case 4:return n(e),[3,6];case 5:r(t),l.label=6;case 6:return[2];case 7:for(u=0,s=i.PreferredMfaSetting||"NOMFA",a=[];u<i.UserAttributes.length;u++)c=new nO({Name:i.UserAttributes[u].Name,Value:i.UserAttributes[u].Value}),a.push(c);return f=this.attributesToObject(a),Object.assign(t,{attributes:f,preferredMFA:s}),[2,r(t)]}})})},{bypassCache:o,clientMetadata:s}),[3,8];case 7:return n(c.sent()),[3,8];case 8:return[2]}})})}).catch(function(e){return iP.debug("Failed to sync cache info into memory",e),n(e)})}):this.rejectNoUserPool()},e.prototype.isOAuthInProgress=function(){return this.oAuthFlowInProgress},e.prototype.currentAuthenticatedUser=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){var t,r,n,i,o;return(0,C.__generator)(this,function(s){switch(s.label){case 0:iP.debug("getting current authenticated user"),t=null,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this._storageSync];case 2:return s.sent(),[3,4];case 3:throw r=s.sent(),iP.debug("Failed to sync cache info into memory",r),r;case 4:try{(n=JSON.parse(this._storage.getItem("aws-amplify-federatedInfo")))&&(t=(0,C.__assign)((0,C.__assign)({},n.user),{token:n.token}))}catch(e){iP.debug("cannot load federated user from auth storage")}if(!t)return[3,5];return this.user=t,iP.debug("get current authenticated federated user",this.user),[2,this.user];case 5:iP.debug("get current authenticated userpool user"),i=null,s.label=6;case 6:return s.trys.push([6,8,,9]),[4,this.currentUserPoolUser(e)];case 7:return i=s.sent(),[3,9];case 8:return"No userPool"===(o=s.sent())&&iP.error("Cannot get the current user because the user pool is missing. Please make sure the Auth module is configured with a valid Cognito User Pool ID"),iP.debug("The user is not authenticated by the error",o),[2,Promise.reject("The user is not authenticated")];case 9:return this.user=i,[2,this.user]}})})},e.prototype.currentSession=function(){var e=this;return(iP.debug("Getting current session"),this.userPool)?new Promise(function(t,r){e.currentUserPoolUser().then(function(n){e.userSession(n).then(function(e){t(e)}).catch(function(e){iP.debug("Failed to get the current session",e),r(e)})}).catch(function(e){iP.debug("Failed to get the current user",e),r(e)})}):Promise.reject(Error("No User Pool in the configuration."))},e.prototype._userSession=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){var t,r,n=this;return(0,C.__generator)(this,function(o){switch(o.label){case 0:if(!e)return iP.debug("the user is null"),[2,this.rejectAuthError(i.NoUserSession)];t=this._config.clientMetadata,0===this.inflightSessionPromiseCounter&&(this.inflightSessionPromise=new Promise(function(r,i){e.getSession(function(t,o){return(0,C.__awaiter)(n,void 0,void 0,function(){var n;return(0,C.__generator)(this,function(s){switch(s.label){case 0:if(!t)return[3,5];if(iP.debug("Failed to get the session from user",e),!this.isSessionInvalid(t))return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(e)];case 2:return s.sent(),[3,4];
1case 3:return n=s.sent(),i(Error("Session is invalid due to: "+t.message+" and failed to clean up invalid session: "+n.message)),[2];case 4:return i(t),[2];case 5:return iP.debug("Succeed to get the user session",o),r(o),[2]}})})},{clientMetadata:t})})),this.inflightSessionPromiseCounter++,o.label=1;case 1:return o.trys.push([1,,3,4]),[4,this.inflightSessionPromise];case 2:return e.signInUserSession=r=o.sent(),[2,r];case 3:return this.inflightSessionPromiseCounter--,[7];case 4:return[2]}})})},e.prototype.userSession=function(e){return this._userSession(e)},e.prototype.currentUserCredentials=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){var e,t,r=this;return(0,C.__generator)(this,function(n){switch(n.label){case 0:iP.debug("Getting current user credentials"),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this._storageSync];case 2:return n.sent(),[3,4];case 3:throw e=n.sent(),iP.debug("Failed to sync cache info into memory",e),e;case 4:t=null;try{t=JSON.parse(this._storage.getItem("aws-amplify-federatedInfo"))}catch(e){iP.debug("failed to get or parse item aws-amplify-federatedInfo",e)}if(t)return[2,this.Credentials.refreshFederatedToken(t)];return[2,this.currentSession().then(function(e){return iP.debug("getting session success",e),r.Credentials.set(e,"session")}).catch(function(){return iP.debug("getting guest credentials"),r.Credentials.set(null,"guest")})]}})})},e.prototype.currentCredentials=function(){return iP.debug("getting current credentials"),this.Credentials.get()},e.prototype.verifyUserAttribute=function(e,t,r){return void 0===r&&(r=this._config.clientMetadata),new Promise(function(n,i){e.getAttributeVerificationCode(t,{onSuccess:function(e){return n(e)},onFailure:function(e){return i(e)}},r)})},e.prototype.verifyUserAttributeSubmit=function(e,t,r){return r?new Promise(function(n,i){e.verifyAttribute(t,r,{onSuccess:function(e){n(e)},onFailure:function(e){i(e)}})}):this.rejectAuthError(i.EmptyCode)},e.prototype.verifyCurrentUserAttribute=function(e){var t=this;return t.currentUserPoolUser().then(function(r){return t.verifyUserAttribute(r,e)})},e.prototype.verifyCurrentUserAttributeSubmit=function(e,t){var r=this;return r.currentUserPoolUser().then(function(n){return r.verifyUserAttributeSubmit(n,e,t)})},e.prototype.cognitoIdentitySignOut=function(e,t){return(0,C.__awaiter)(this,void 0,void 0,function(){var r,n,i=this;return(0,C.__generator)(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this._storageSync];case 1:return o.sent(),[3,3];case 2:throw r=o.sent(),iP.debug("Failed to sync cache info into memory",r),r;case 3:return n=this._oAuthHandler&&"true"===this._storage.getItem("amplify-signin-with-hostedUI"),[2,new Promise(function(r,o){if(e&&e.global){iP.debug("user global sign out",t);var s=i._config.clientMetadata;t.getSession(function(e,s){return(0,C.__awaiter)(i,void 0,void 0,function(){var i,s=this;return(0,C.__generator)(this,function(a){switch(a.label){case 0:if(!e)return[3,5];if(iP.debug("failed to get the user session",e),!this.isSessionInvalid(e))return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(t)];case 2:return a.sent(),[3,4];case 3:return i=a.sent(),o(Error("Session is invalid due to: "+e.message+" and failed to clean up invalid session: "+i.message)),[2];case 4:return[2,o(e)];case 5:return t.globalSignOut({onSuccess:function(e){if(iP.debug("global sign out success"),!n)return r();s.oAuthSignOutRedirect(r,o)},onFailure:function(e){return iP.debug("global sign out failed",e),o(e)}}),[2]}})})},{clientMetadata:s})}else iP.debug("user sign out",t),t.signOut(function(){if(!n)return r();i.oAuthSignOutRedirect(r,o)})})]}})})},e.prototype.oAuthSignOutRedirect=function(e,t){Z().isBrowser?this.oAuthSignOutRedirectOrReject(t):this.oAuthSignOutAndResolve(e)},e.prototype.oAuthSignOutAndResolve=function(e){this._oAuthHandler.signOut(),e()},e.prototype.oAuthSignOutRedirectOrReject=function(e){this._oAuthHandler.signOut(),setTimeout(function(){return e(Error("Signout timeout fail"))},3e3)},e.prototype.signOut=function(e){return void 0===e&&(e={}),(0,C.__awaiter)(this,void 0,void 0,function(){var t,r,n;return(0,C.__generator)(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.cleanCachedItems()];case 1:return i.sent(),[3,3];case 2:return t=i.sent(),iP.debug("failed to clear cached items"),[3,3];case 3:if(!this.userPool)return[3,11];i.label=4;case 4:return i.trys.push([4,6,,7]),[4,this._storageSync];case 5:return i.sent(),[3,7];case 6:throw r=i.sent(),iP.debug("Failed to sync cache info into memory",r),r;case 7:if(!(n=this.userPool.getCurrentUser()))return[3,9];return[4,this.cognitoIdentitySignOut(e,n)];case 8:return i.sent(),[3,10];case 9:iP.debug("no current Cognito user"),i.label=10;case 10:return[3,12];case 11:iP.debug("no Cognito User pool"),i.label=12;case 12:return iD("signOut",this.user,"A user has been signed out"),this.user=null,[2]}})})},e.prototype.cleanCachedItems=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){return(0,C.__generator)(this,function(e){switch(e.label){case 0:return[4,this.Credentials.clear()];case 1:return e.sent(),[2]}})})},e.prototype.changePassword=function(e,t,r,n){var i=this;return void 0===n&&(n=this._config.clientMetadata),new Promise(function(o,s){i.userSession(e).then(function(i){e.changePassword(t,r,function(e,t){return e?(iP.debug("change password failure",e),s(e)):o(t)},n)})})},e.prototype.forgotPassword=function(e,t){if(void 0===t&&(t=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i.EmptyUsername);var r=this.createCognitoUser(e);return new Promise(function(n,i){r.forgotPassword({onSuccess:function(){n()},onFailure:function(t){iP.debug("forgot password failure",t),iD("forgotPassword_failure",t,e+" forgotPassword failed"),i(t)},inputVerificationCode:function(t){iD("forgotPassword",r,e+" has initiated forgot password flow"),n(t)}},t)})},e.prototype.forgotPasswordSubmit=function(e,t,r,n){if(void 0===n&&(n=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i.EmptyUsername);if(!t)return this.rejectAuthError(i.EmptyCode);if(!r)return this.rejectAuthError(i.EmptyPassword);var o=this.createCognitoUser(e);return new Promise(function(i,s){o.confirmPassword(t,r,{onSuccess:function(t){iD("forgotPasswordSubmit",o,e+" forgotPasswordSubmit successful"),i(t)}
1,onFailure:function(t){iD("forgotPasswordSubmit_failure",t,e+" forgotPasswordSubmit failed"),s(t)}},n)})},e.prototype.currentUserInfo=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){var e,t,r,n,i,o,s;return(0,C.__generator)(this,function(a){switch(a.label){case 0:if(!(!(e=this.Credentials.getCredSource())||"aws"===e||"userPool"===e))return[3,9];return[4,this.currentUserPoolUser().catch(function(e){return iP.error(e)})];case 1:if(!(t=a.sent()))return[2,null];a.label=2;case 2:return a.trys.push([2,8,,9]),[4,this.userAttributes(t)];case 3:r=a.sent(),n=this.attributesToObject(r),i=null,a.label=4;case 4:return a.trys.push([4,6,,7]),[4,this.currentCredentials()];case 5:return i=a.sent(),[3,7];case 6:return o=a.sent(),iP.debug("Failed to retrieve credentials while getting current user info",o),[3,7];case 7:return[2,{id:i?i.identityId:void 0,username:t.getUsername(),attributes:n}];case 8:return s=a.sent(),iP.error("currentUserInfo error",s),[2,{}];case 9:if("federated"===e)return[2,(t=this.user)||{}];return[2]}})})},e.prototype.federatedSignIn=function(e,t,r){return(0,C.__awaiter)(this,void 0,void 0,function(){var i,o,s,a,u,c,f,l,h,d,p;return(0,C.__generator)(this,function(g){switch(g.label){case 0:if(!this._config.identityPoolId&&!this._config.userPoolId)throw Error("Federation requires either a User Pool or Identity Pool in config");if(void 0===e&&this._config.identityPoolId&&!this._config.userPoolId)throw Error("Federation with Identity Pools requires tokens passed as arguments");if(!(x(e)||T(e)||P(e)||void 0===e))return[3,1];return o=x(i=e||{provider:n.Cognito})?i.provider:i.customProvider,x(i),s=i.customState,this._config.userPoolId&&(a=O(this._config.oauth)?this._config.userPoolWebClientId:this._config.oauth.clientID,u=O(this._config.oauth)?this._config.oauth.redirectSignIn:this._config.oauth.redirectUri,this._oAuthHandler.oauthSignIn(this._config.oauth.responseType,this._config.oauth.domain,u,a,o,s)),[3,4];case 1:o=e;try{(c=JSON.stringify(JSON.parse(this._storage.getItem("aws-amplify-federatedInfo")).user))&&iP.warn("There is already a signed in user: "+c+" in your app.\n You should not call Auth.federatedSignIn method again as it may cause unexpected behavior.")}catch(e){}return f=t.token,l=t.identity_id,h=t.expires_at,[4,this.Credentials.set({provider:o,token:f,identity_id:l,user:r,expires_at:h},"federation")];case 2:return d=g.sent(),[4,this.currentAuthenticatedUser()];case 3:return iD("signIn",p=g.sent(),"A user "+p.username+" has been signed in"),iP.debug("federated sign in credentials",d),[2,d];case 4:return[2]}})})},e.prototype._handleAuthResponse=function(e){return(0,C.__awaiter)(this,void 0,void 0,function(){var t,r,n,i,o,s,a,u,c,f,l,h,d;return(0,C.__generator)(this,function(p){switch(p.label){case 0:if(this.oAuthFlowInProgress)return iP.debug("Skipping URL "+e+" current flow in progress"),[2];p.label=1;case 1:if(p.trys.push([1,,8,9]),this.oAuthFlowInProgress=!0,!this._config.userPoolId)throw Error("OAuth responses require a User Pool defined in config");if(iD("parsingCallbackUrl",{url:e},"The callback url is being parsed"),t=e||(Z().isBrowser?window.location.href:""),r=!!((0,n8.parse)(t).query||"").split("&").map(function(e){return e.split("=")}).find(function(e){var t=(0,C.__read)(e,1)[0];return"code"===t||"error"===t}),n=!!((0,n8.parse)(t).hash||"#").substr(1).split("&").map(function(e){return e.split("=")}).find(function(e){var t=(0,C.__read)(e,1)[0];return"access_token"===t||"error"===t}),!(r||n))return[3,7];this._storage.setItem("amplify-redirected-from-hosted-ui","true"),p.label=2;case 2:return p.trys.push([2,6,,7]),[4,this._oAuthHandler.handleAuthResponse(t)];case 3:if(o=(i=p.sent()).accessToken,s=i.idToken,a=i.refreshToken,u=i.state,c=new nC({IdToken:new nA({IdToken:s}),RefreshToken:new nI({RefreshToken:a}),AccessToken:new nw({AccessToken:o})}),f=void 0,!this._config.identityPoolId)return[3,5];return[4,this.Credentials.set(c,"session")];case 4:f=p.sent(),iP.debug("AWS credentials",f),p.label=5;case 5:return l=/-/.test(u),(h=this.createCognitoUser(c.getIdToken().decodePayload()["cognito:username"])).setSignInUserSession(c),window&&void 0!==window.history&&window.history.replaceState(window.history.state,"",this._config.oauth.redirectSignIn),iD("signIn",h,"A user "+h.getUsername()+" has been signed in"),iD("cognitoHostedUI",h,"A user "+h.getUsername()+" has been signed in via Cognito Hosted UI"),l&&iD("customOAuthState",rS(u.split("-").splice(1).join("-")),"State for user "+h.getUsername()),[2,f];case 6:return d=p.sent(),iP.debug("Error in cognito hosted auth response",d),window&&void 0!==window.history&&window.history.replaceState(window.history.state,"",this._config.oauth.redirectSignIn),iD("signIn_failure",d,"The OAuth response flow failed"),iD("cognitoHostedUI_failure",d,"A failure occurred when returning to the Cognito Hosted UI"),iD("customState_failure",d,"A failure occurred when returning state"),[3,7];case 7:return[3,9];case 8:return this.oAuthFlowInProgress=!1,[7];case 9:return[2]}})})},e.prototype.essentialCredentials=function(e){return{accessKeyId:e.accessKeyId,sessionToken:e.sessionToken,secretAccessKey:e.secretAccessKey,identityId:e.identityId,authenticated:e.authenticated}},e.prototype.attributesToObject=function(e){var t=this,r={};return e&&e.map(function(e){"email_verified"===e.Name||"phone_number_verified"===e.Name?r[e.Name]=t.isTruthyString(e.Value)||!0===e.Value:r[e.Name]=e.Value}),r},e.prototype.isTruthyString=function(e){return"function"==typeof e.toLowerCase&&"true"===e.toLowerCase()},e.prototype.createCognitoUser=function(e){var t={Username:e,Pool:this.userPool};t.Storage=this._storage;var r=this._config.authenticationFlowType,n=new nF(t);return r&&n.setAuthenticationFlowType(r),n},e.prototype._isValidAuthStorage=function(e){return!!e&&"function"==typeof e.getItem&&"function"==typeof e.setItem&&"function"==typeof e.removeItem&&"function"==typeof e.clear},e.prototype.noUserPoolErrorHandler=function(e){return!e||e.userPoolId&&e.identityPoolId?i.NoConfig:i.MissingAuthConfig},e.prototype.rejectAuthError=function(e){return Promise.reject(new iC(e))},e.prototype.rejectNoUserPool=function(){return Promise.reject(new ix(this.noUserPoolErrorHandler(this._config)))},e.prototype.rememberDevice=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){var e,t;return(0,C.__generator)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.currentUserPoolUser()];case 1:return e=r.sent(),[3,3];case 2:return t=r.sent(),iP.debug("The user is not authenticated by the error",t),[2,Promise.reject("The user is not authenticated")];case 3:return e.getCachedDeviceKeyAndPassword(),[2,new Promise(function(t,r){e.setDeviceStatusRemembered({onSuccess:function(e){t(e)},onFailure:function(e){"InvalidParameterException"===e.code?r(new iC(i.DeviceConfig)):"NetworkError"===e.code?r(new iC(i.NetworkError)):r(e)}})})]}})})},e.prototype.forgetDevice=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){var e,t;return(0,C.__generator)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.currentUserPoolUser()];case 1:return e=r.sent(),[3,3];case 2:return t=r.sent(),iP.debug("The user is not authenticated by the error",t),[2,Promise.reject("The user is not authenticated")];case 3:return e.getCachedDeviceKeyAndPassword(),[2,new Promise(function(t,r){e.forgetDevice({onSuccess:function(e){t(e)},onFailure:function(e){"InvalidParameterException"===e.code?r(new iC(i.DeviceConfig)):"NetworkError"===e.code?r(new iC(i.NetworkError)):r(e)}})})]}})})},e.prototype.fetchDevices=function(){return(0,C.__awaiter)(this,void 0,void 0,function(){var e,t;return(0,C.__generator)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.currentUserPoolUser()];case 1:return e=r.sent(),[3,3];case 2:throw t=r.sent(),iP.debug("The user is not authenticated by the error",t),Error("The user is not authenticated");case 3:return e.getCachedDeviceKeyAndPassword(),[2,new Promise(function(t,r){var n={onSuccess:function(e){t(e.Devices.map(function(e){var t=e.DeviceAttributes.find(function(e){return"device_name"===e.Name})||{};return{id:e.DeviceKey,name:t.Value}}))},onFailure:function(e){"InvalidParameterException"===e.code?r(new iC(i.DeviceConfig)):"NetworkError"===e.code?r(new iC(i.NetworkError)):r(e)}};e.listDevices(ij,null,n)})]}})})},e}())(null);eI.register(iN)},91614:(e,t,r)=>{e.exports=r(49718)(Object.getPrototypeOf,Object)},91893:(e,t,r)=>{var n=r(30239),i=r(39171),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable;e.exports=n(function(){return arguments}())?n:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")}},92664:(e,t,r)=>{var n=r(30593);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return -1}},93139:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}},93438:(e,t,r)=>
1{var n=r(8209),i=r(91614),o=r(20569),s=r(90696);e.exports=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,o(e)),e=i(e);return t}:s},94705:(e,t,r)=>{var n=r(79815),i=r(6644),o=r(90448),s=o&&o.isSet;e.exports=s?i(s):n},95001:(e,t,r)=>{var n=r(77656),i=r(77946),o=r(40951),s="[object Null]",a="[object Undefined]",u=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?a:s:u&&u in Object(e)?i(e):o(e)}},95436:(e,t,r)=>{var n=r(15726),i=r(93438),o=r(98328);e.exports=function(e){return n(e,o,i)}},96960:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},98328:(e,t,r)=>{var n=r(53910),i=r(67806),o=r(49959);e.exports=function(e){return o(e)?n(e,!0):i(e)}},98533:(e,t,r)=>{e.exports=r(16799)(r(13892),"DataView")},99044:(e,t,r)=>{var n=r(95001),i=r(65551),o=r(39171),s="[object Arguments]",a="[object Array]",u="[object Boolean]",c="[object Date]",f="[object Error]",l="[object Function]",h="[object Map]",d="[object Number]",p="[object Object]",g="[object RegExp]",y="[object Set]",v="[object String]",m="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",_="[object Float64Array]",S="[object Int8Array]",A="[object Int16Array]",I="[object Int32Array]",E="[object Uint8Array]",U="[object Uint8ClampedArray]",C="[object Uint16Array]",x="[object Uint32Array]",T={};T["[object Float32Array]"]=T[_]=T[S]=T[A]=T[I]=T[E]=T[U]=T[C]=T[x]=!0,T[s]=T[a]=T[b]=T[u]=T[w]=T[c]=T[f]=T[l]=T[h]=T[d]=T[p]=T[g]=T[y]=T[v]=T[m]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!T[n(e)]}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.