1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f2c51645-c3bb-4a31-a953-9123d22da696",e._sentryDebugIdIdentifier="sentry-dbid-f2c51645-c3bb-4a31-a953-9123d22da696")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2551],{84465:function(e,t,n){"use strict";n.d(t,{f:function(){return h}});var r=n(4252),i=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),o=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],s=function(){function e(){this.state=Int32Array.from(o),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,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>9007199254740991)throw Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,64===this.bufferLength&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%64>=56){for(var r=this.bufferLength;r<64;r++)t.setUint8(r,0);this.hashBuffer(),this.bufferLength=0}for(var r=this.bufferLength;r<56;r++)t.setUint8(r,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}for(var i=new Uint8Array(32),r=0;r<8;r++)i[4*r]=this.state[r]>>>24&255,i[4*r+1]=this.state[r]>>>16&255,i[4*r+2]=this.state[r]>>>8&255,i[4*r+3]=this.state[r]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],r=t[1],o=t[2],s=t[3],a=t[4],u=t[5],c=t[6],h=t[7],l=0;l<64;l++){if(l<16)this.temp[l]=(255&e[4*l])<<24|(255&e[4*l+1])<<16|(255&e[4*l+2])<<8|255&e[4*l+3];else{var d=this.temp[l-2],f=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,g=((d=this.temp[l-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[l]=(f+this.temp[l-7]|0)+(g+this.temp[l-16]|0)}var p=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&u^~a&c)|0)+(h+(i[l]+this.temp[l]|0)|0)|0,y=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&r^n&o^r&o)|0;h=c,c=u,u=a,a=s+p|0,s=o,o=r,r=n,n=p+y|0}t[0]+=n,t[1]+=r,t[2]+=o,t[3]+=s,t[4]+=a,t[5]+=u,t[6]+=c,t[7]+=h},e}(),a=n(24282).lW,u=void 0!==a&&a.from?function(e){return a.from(e,"utf8")}:e=>new TextEncoder().encode(e);function c(e){return e instanceof Uint8Array?e:"string"==typeof e?u(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}var h=function(){function e(e){this.secret=e,this.hash=new s,this.reset()}return e.prototype.update=function(e){if(("string"==typeof e?0!==e.length:0!==e.byteLength)&&!this.error)try{this.hash.update(c(e))}catch(e){this.error=e}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return(0,r.mG)(this,void 0,void 0,function(){return(0,r.Jh)(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new s,this.secret){this.outer=new s;var e=function(e){var t=c(e);if(t.byteLength>64){var n=new s;n.update(t),t=n.digest()}
1var r=new Uint8Array(64);return r.set(t),r}(this.secret),t=new Uint8Array(64);t.set(e);for(var n=0;n<64;n++)e[n]^=54,t[n]^=92;this.hash.update(e),this.outer.update(t);for(var n=0;n<e.byteLength;n++)e[n]=0}},e}()},11820:function(e,t,n){"use strict";let r={},i={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),r[e]=t,i[t]=e}},84259:function(e,t){"use strict";t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return(n+r)*3/4-r},t.toByteArray=function(e){var t,n,o=u(e),s=o[0],a=o[1],c=new i((s+a)*3/4-a),h=0,l=a>0?s-4:s;for(n=0;n<l;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],c[h++]=t>>16&255,c[h++]=t>>8&255,c[h++]=255&t;return 2===a&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[h++]=255&t),1===a&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[h++]=t>>8&255,c[h++]=255&t),c},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],s=0,a=r-i;s<a;s+=16383)o.push(function(e,t,r){for(var i,o=[],s=t;s<r;s+=3)o.push(n[(i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]))>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return o.join("")}(e,s,s+16383>a?a:s+16383));return 1===i?o.push(n[(t=e[r-1])>>2]+n[t<<4&63]+"=="):2===i&&o.push(n[(t=(e[r-2]<<8)+e[r-1])>>10]+n[t>>4&63]+n[t<<2&63]+"="),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)n[s]=o[s],r[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 n=e.indexOf("=");-1===n&&(n=t);var r=n===t?0:4-n%4;return[n,r]}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},24282:function(e,t,n){"use strict";/*! 2 * The buffer module from node.js, for the browser. 3 * 4 * @author Feross Aboukhadijeh <http://feross.org> 5 * @license MIT 6 */var r=n(84259),i=n(6787),o=n(95849);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!u.TYPED_ARRAY_SUPPORT&&!(this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw Error("If encoding is specified then the first argument must be a string");return l(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=d(e,t),e}(e,t,n,r):"string"==typeof t?function(e,t,n){if(("string"!=typeof n||""===n)&&(n="utf8"),!u.isEncoding(n))throw TypeError('"encoding" must be a valid string encoding');var r=0|g(t,n),i=(e=a(e,r)).write(t,n);return i!==r&&(e=e.slice(0,i)),e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n,r=0|f(t.length);return 0===(e=a(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||(n=t.length)!=n?a(e,0):d(e,t);if("Buffer"===t.type&&o(t.data))return d(e,t.data)}throw TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(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 l(e,t){if(h(t),e=a(e,t<0?0:0|f(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|f(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function f(e){if(e>=s())throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function g(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&
6(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return k(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return R(e).length;default:if(r)return k(e).length;t=(""+t).toLowerCase(),r=!0}}function p(e,t,n){var i,o,s=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===n||n>this.length)&&(n=this.length),n<=0||(n>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,n){var r,i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var o="",s=t;s<n;++s)o+=(r=e[s])<16?"0"+r.toString(16):r.toString(16);return o}(this,t,n);case"utf8":case"utf-8":return v(this,t,n);case"ascii":return function(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}(this,t,n);case"latin1":case"binary":return function(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}(this,t,n);case"base64":return i=t,o=n,0===i&&o===this.length?r.fromByteArray(this):r.fromByteArray(this.slice(i,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}(this,t,n);default:if(s)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),s=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(e,t,n,r,i){if(0===e.length)return -1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),isNaN(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return -1;n=e.length-1}else if(n<0){if(!i)return -1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,i);if("number"==typeof t)return(t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,i);throw TypeError("val must be string, number or Buffer")}function w(e,t,n,r,i){var o,s=1,a=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return -1;s=2,a/=2,u/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var h=-1;for(o=n;o<a;o++)if(c(e,o)===c(t,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===u)return h*s}else -1!==h&&(o-=o-h),h=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var l=!0,d=0;d<u;d++)if(c(e,o+d)!==c(t,d)){l=!1;break}if(l)return o}return -1}function v(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,u,c=e[i],h=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=n)switch(l){case 1:c<128&&(h=c);break;case 2:(192&(o=e[i+1]))==128&&(u=(31&c)<<6|63&o)>127&&(h=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)&&(h=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&&(h=u)}null===h?(h=65533,l=1):h>65535&&(h-=65536,r.push(h>>>10&1023|55296),h=56320|1023&h),r.push(h),i+=l}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}function I(e,t,n){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>n)throw RangeError("Trying to access beyond buffer length")}function A(e,t,n,r,i,o){if(!u.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(n+r>e.length)throw RangeError("Index out of range")}function S(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>(r?i:1-i)*8}function b(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>(r?i:3-i)*8&255}function E(e,t,n,r,i,o){if(n+r>e.length||n<0)throw RangeError("Index out of range")}function C(e,t,n,r,o){return o||E(e,t,n,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,n,r,23,4),n+4}function _(e,t,n,r,o){return o||E(e,t,n,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,n,r,52,8),n+8}t.lW=u,t.h2=50,u.TYPED_ARRAY_SUPPORT=void 0!==n.g.TYPED_ARRAY_SUPPORT?n.g.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),s(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return c(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0}
6)),u.alloc=function(e,t,n){return(h(e),e<=0)?a(null,e):void 0!==t?"string"==typeof n?a(null,e).fill(t,n):a(null,e).fill(t):a(null,e)},u.allocUnsafe=function(e){return l(null,e)},u.allocUnsafeSlow=function(e){return l(null,e)},u.isBuffer=function(e){return!!(null!=e&&e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!o(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);if(void 0===t)for(n=0,t=0;n<e.length;++n)t+=e[n].length;var n,r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!u.isBuffer(s))throw TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},u.byteLength=g,u.prototype._isBuffer=!0,u.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)y(this,t,t+1);return this},u.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)y(this,t,t+3),y(this,t+1,t+2);return this},u.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)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0==arguments.length?v(this,0,e):p.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.h2;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return -1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,s=n-t,a=Math.min(o,s),c=this.slice(r,i),h=e.slice(t,n),l=0;l<a;++l)if(c[l]!==h[l]){o=c[l],s=h[l];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,n){return -1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else if(isFinite(t))t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,o,s,a,u,c,h,l,d,f,g,p,y=this.length-t;if((void 0===n||n>y)&&(n=y),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var m=!1;;)switch(r){case"hex":return function(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))break;e[n+s]=a}return s}(this,e,t,n);case"utf8":case"utf-8":return u=t,c=n,O(k(e,this.length-u),this,u,c);case"ascii":return h=t,l=n,O(T(e),this,h,l);case"latin1":case"binary":return i=this,o=e,s=t,a=n,O(T(o),i,s,a);case"base64":return d=t,f=n,O(R(e),this,d,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g=t,p=n,O(function(e,t){for(var n,r,i=[],o=0;o<e.length&&!((t-=2)<0);++o)r=(n=e.charCodeAt(o))>>8,i.push(n%256),i.push(r);return i}(e,this.length-g),this,g,p);default:if(m)throw TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),m=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},u.prototype.slice=function(e,t){var n,r=this.length;if(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),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return(t||I(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},u.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){var i=Math.pow(2,8*n)-1;A(this,e,t,n,i,0)}var o=1,s=0;for(this[t]=255&e;++s<n&&(o*=256);)this[t+s]=e/o&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){var i=Math.pow(2,8*n)-1;A(this,e,t,n,i,0)}var o=n-1,s=1;for(this[t+o]=255&e;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):S(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):S(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):b(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):b(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);A(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);A(this,e,t,n,i-1,-i)}var o=n-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+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):S(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):S(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):b(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):b(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return C(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return C(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return _(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return _(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw RangeError("sourceStart out of bounds");if(r<0)throw RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i,o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw RangeError("Out of range index");if(n<=t)return this;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var s=u.isBuffer(e)?e:k(new u(e,r).toString()),a=s.length;for(i=0;i<n-t;++i)this[i+t]=s[i%a]}return this};var P=/[^+\/0-9A-Za-z-_]/g;
6function k(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319||s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else if(n<1114112){if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}else throw Error("Invalid code point")}return o}function T(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function R(e){return r.toByteArray(function(e){var t;if((e=((t=e).trim?t.trim():t.replace(/^\s+|\s+$/g,"")).replace(P,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function O(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length)&&!(i>=e.length);++i)t[i+n]=e[i];return i}},6787:function(e,t){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,h=-7,l=n?i-1:0,d=n?-1:1,f=e[t+l];for(l+=d,o=f&(1<<-h)-1,f>>=-h,h+=a;h>0;o=256*o+e[t+l],l+=d,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=r;h>0;s=256*s+e[t+l],l+=d,h-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,r),o-=c}return(f?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,u,c=8*o-i-1,h=(1<<c)-1,l=h>>1,d=23===i?5960464477539062e-23:0,f=r?0:o-1,g=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(a=isNaN(t)?1:0,s=h):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+l>=1?t+=d/u:t+=d*Math.pow(2,1-l),t*u>=2&&(s++,u/=2),s+l>=h?(a=0,s=h):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[n+f]=255&a,f+=g,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[n+f]=255&s,f+=g,s/=256,c-=8);e[n+f-g]|=128*p}},95849:function(e){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},66220:function(e,t,n){"use strict";n.d(t,{default:function(){return i.a}});var r=n(88714),i=n.n(r)},88714:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let r=n(98575);n(91486),n(3731);let i=r._(n(90497));function o(e,t){var n;let r={loading:e=>{let{error:t,isLoading:n,pastDelay:r}=e;return null}};"function"==typeof e&&(r.loader=e);let o={...r,...t};return(0,i.default)({...o,modules:null==(n=o.loadableGenerated)?void 0:n.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},50040:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return i}});let r=n(11925);function i(e){let{reason:t,children:n}=e;if("undefined"==typeof window)throw new r.BailoutToCSRError(t);return n}},90497:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return c}});let r=n(91486),i=n(3731),o=n(50040),s=n(42748);function a(e){return{default:e&&"default"in e?e.default:e}}let u={loader:()=>Promise.resolve(a(()=>null)),loading:null,ssr:!0},c=function(e){let t={...u,...e},n=(0,i.lazy)(()=>t.loader().then(a)),c=t.loading;function h(e){let a=c?(0,r.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,u=t.ssr?(0,r.jsxs)(r.Fragment,{children:["undefined"==typeof window?(0,r.jsx)(s.PreloadCss,{moduleIds:t.modules}):null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(i.Suspense,{fallback:a,children:u})}return h.displayName="LoadableComponent",h}},42748:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadCss",{enumerable:!0,get:function(){return o}});let r=n(91486),i=n(55418);function o(e){let{moduleIds:t}=e;if("undefined"!=typeof window)return null;let n=(0,i.getExpectedRequestStore)("next/dynamic css"),o=[];if(n.reactLoadableManifest&&t){let e=n.reactLoadableManifest;for(let n of t){if(!e[n])continue;let t=e[n].files.filter(e=>e.endsWith(".css"));o.push(...t)}}return 0===o.length?null:(0,r.jsx)(r.Fragment,{children:o.map(e=>(0,r.jsx)("link",{precedence:"dynamic",rel:"stylesheet",href:n.assetPrefix+"/_next/"+encodeURI(e),as:"style"},e))})}},4664:function(e,t,n){"use strict";n.d(t,{l:function(){return i}});var r=n(55257);class i extends r._{constructor(e){super(e),this.constructor=i,Object.setPrototypeOf(this,i.prototype)}}},86144:function(e,t,n){"use strict";n.d(t,{EU:function(){return o},Jg:function(){return i},MA:function(){return a},VL:function(){return h},hj:function(){return d},mP:function(){return s},sX:function(){return f},vC:function(){return u},wW:function(){return l},x9:function(){return c}});var r=n(4664);let i="UserUnAuthenticatedException",o="UserAlreadyAuthenticatedException",s="DeviceMetadataNotFoundException",a="AutoSignInException",u=new r.l({name:"InvalidRedirectException",message:"signInRedirect or signOutRedirect had an invali
6d format or was not found.",recoverySuggestion:"Please make sure the signIn/Out redirect in your oauth config is valid."});new r.l({name:"InvalidAppSchemeException",message:"A valid non-http app scheme was not found in the config.",recoverySuggestion:"Please make sure a valid custom app scheme is present in the config."});let c=new r.l({name:"InvalidPreferredRedirectUrlException",message:"The given preferredRedirectUrl does not match any items in the redirectSignOutUrls array from the config.",recoverySuggestion:"Please make sure a matching preferredRedirectUrl is provided."}),h=new r.l({name:"InvalidOriginException",message:"redirect is coming from a different origin. The oauth flow needs to be initiated from the same origin",recoverySuggestion:"Please call signInWithRedirect from the same origin."}),l="OAuthSignOutException",d="TokenRefreshException",f="UnexpectedSignInInterruptionException"},67303:function(e,t,n){"use strict";n.d(t,{R:function(){return o}});var r=n(70964),i=n(4664);function o(e){if(!e||"Error"===e.name||e instanceof TypeError)throw new i.l({name:r.Z.Unknown,message:"An unknown error has occurred.",underlyingError:e})}},81604:function(e,t,n){"use strict";n.d(t,{t:function(){return r}});let r="cognito-idp"},64570:function(e,t,n){"use strict";n.d(t,{n:function(){return a}});var r=n(62093),i=n(53533),o=n(73100),s=n(31573);let a={service:n(81604).t,retryDecider:(0,r.j)(i.f),computeDelay:o.k,userAgentValue:(0,s.Zm)(),cache:"no-store"}},19590:function(e,t,n){"use strict";n.d(t,{N:function(){return u}});var r=n(66247),i=n(2397),o=n(30944),s=n(73446),a=n(64570);let u=e=>(0,r.z)(s.x,(0,i.u)("InitiateAuth"),(0,o.o)(),{...a.n,...e})},73446:function(e,t,n){"use strict";n.d(t,{x:function(){return o}});var r=n(28262),i=n(26477);let o=(0,r.V)(i.y,[()=>(e,t)=>async function(t){return t.headers["cache-control"]="no-store",e(t)}])},30944:function(e,t,n){"use strict";n.d(t,{o:function(){return s}});var r=n(53533),i=n(67303),o=n(4664);let s=()=>async e=>{if(e.statusCode>=300){let t=await (0,r.f)(e);throw(0,i.R)(t),new o.l({name:t.name,message:t.message})}return(0,r.e)(e)}},2397:function(e,t,n){"use strict";n.d(t,{u:function(){return r}});let r=e=>(t,n)=>o(n,i(e),JSON.stringify(t)),i=e=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${e}`}),o=({url:e},t,n)=>({headers:t,url:e,body:n,method:"POST"})},50076:function(e,t,n){"use strict";n.d(t,{N:function(){return o},y:function(){return i}});var r=n(4664);function i(e){let t=e?.split("_")[0];if(!e||0>e.indexOf("_")||!t||"string"!=typeof t)throw new r.l({name:"InvalidUserPoolId",message:"Invalid user pool id provided."});return t}function o(e){if(!e||!e.includes(":"))throw new r.l({name:"InvalidIdentityPoolIdException",message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."});return e.split(":")[0]}},3095:function(e,t,n){"use strict";n.d(t,{e:function(){return a}});var r=n(46712),i=n(89541),o=n(81604);let s=({region:e})=>({url:new r.a(`https://${o.t}.${e}.${(0,i.b)(e)}`)}),a=({endpointOverride:e})=>t=>e?{url:new r.a(e)}:s(t)},37653:function(e,t,n){"use strict";n.d(t,{sI:function(){return l},_X:function(){return f}});var r,i=n(43327),o=n(4664);let s={accessToken:"accessToken",idToken:"idToken",oidcProvider:"oidcProvider",clockDrift:"clockDrift",refreshToken:"refreshToken",deviceKey:"deviceKey",randomPasswordKey:"randomPasswordKey",deviceGroupKey:"deviceGroupKey",signInDetails:"signInDetails",oauthMetadata:"oauthMetadata"};var a=n(96007);(r||(r={})).InvalidAuthTokens="InvalidAuthTokens";let u={[r.InvalidAuthTokens]:{message:"Invalid tokens.",recoverySuggestion:"Make sure the tokens are valid."}},c=(0,a.$)(u),h="CognitoIdentityServiceProvider";class l{getKeyValueStorage(){if(!this.keyValueStorage)throw new o.l({name:"KeyValueStorageNotFoundException",message:"KeyValueStorage was not found in TokenStore"});return this.keyValueStorage}setKeyValueStorage(e){this.keyValueStorage=e}setAuthConfig(e){this.authConfig=e}async loadTokens(){try{let e=await this.getAuthKeys(),t=await this.getKeyValueStorage().getItem(e.accessToken);if(!t)throw new o.l({name:"NoSessionFoundException",message:"Auth session was not found. Make sure to call signIn."});let n=(0,i.xp)(t),r=await this.getKeyValueStorage().getItem(e.idToken),s=r?(0,i.xp)(r):void 0,a=await this.getKeyValueStorage().getItem(e.refreshToken)??void 0,u=await this.getKeyValueStorage().getItem(e.clockDrift)??"0",c=Number.parseInt(u),h=await this.getKeyValueStorage().getItem(e.signInDetail
6s),l={accessToken:n,idToken:s,refreshToken:a,deviceMetadata:await this.getDeviceMetadata()??void 0,clockDrift:c,username:await this.getLastAuthUser()};return h&&(l.signInDetails=JSON.parse(h)),l}catch(e){return null}}async storeTokens(e){c(void 0!==e,r.InvalidAuthTokens);let t=e.username;await this.getKeyValueStorage().setItem(this.getLastAuthUserKey(),t);let n=await this.getAuthKeys();await this.getKeyValueStorage().setItem(n.accessToken,e.accessToken.toString()),e.idToken?await this.getKeyValueStorage().setItem(n.idToken,e.idToken.toString()):await this.getKeyValueStorage().removeItem(n.idToken),e.refreshToken?await this.getKeyValueStorage().setItem(n.refreshToken,e.refreshToken):await this.getKeyValueStorage().removeItem(n.refreshToken),e.deviceMetadata&&(e.deviceMetadata.deviceKey&&await this.getKeyValueStorage().setItem(n.deviceKey,e.deviceMetadata.deviceKey),e.deviceMetadata.deviceGroupKey&&await this.getKeyValueStorage().setItem(n.deviceGroupKey,e.deviceMetadata.deviceGroupKey),await this.getKeyValueStorage().setItem(n.randomPasswordKey,e.deviceMetadata.randomPassword)),e.signInDetails?await this.getKeyValueStorage().setItem(n.signInDetails,JSON.stringify(e.signInDetails)):await this.getKeyValueStorage().removeItem(n.signInDetails),await this.getKeyValueStorage().setItem(n.clockDrift,`${e.clockDrift}`)}async clearTokens(){let e=await this.getAuthKeys();await Promise.all([this.getKeyValueStorage().removeItem(e.accessToken),this.getKeyValueStorage().removeItem(e.idToken),this.getKeyValueStorage().removeItem(e.clockDrift),this.getKeyValueStorage().removeItem(e.refreshToken),this.getKeyValueStorage().removeItem(e.signInDetails),this.getKeyValueStorage().removeItem(this.getLastAuthUserKey()),this.getKeyValueStorage().removeItem(e.oauthMetadata)])}async getDeviceMetadata(e){let t=await this.getAuthKeys(e),n=await this.getKeyValueStorage().getItem(t.deviceKey),r=await this.getKeyValueStorage().getItem(t.deviceGroupKey),i=await this.getKeyValueStorage().getItem(t.randomPasswordKey);return i&&r&&n?{deviceKey:n,deviceGroupKey:r,randomPassword:i}:null}async clearDeviceMetadata(e){let t=await this.getAuthKeys(e);await Promise.all([this.getKeyValueStorage().removeItem(t.deviceKey),this.getKeyValueStorage().removeItem(t.deviceGroupKey),this.getKeyValueStorage().removeItem(t.randomPasswordKey)])}async getAuthKeys(e){(0,i.FG)(this.authConfig?.Cognito);let t=e??await this.getLastAuthUser();return d(h,`${this.authConfig.Cognito.userPoolClientId}.${t}`)}getLastAuthUserKey(){(0,i.FG)(this.authConfig?.Cognito);let e=this.authConfig.Cognito.userPoolClientId;return`${h}.${e}.LastAuthUser`}async getLastAuthUser(){return await this.getKeyValueStorage().getItem(this.getLastAuthUserKey())??"username"}async setOAuthMetadata(e){let{oauthMetadata:t}=await this.getAuthKeys();await this.getKeyValueStorage().setItem(t,JSON.stringify(e))}async getOAuthMetadata(){let{oauthMetadata:e}=await this.getAuthKeys(),t=await this.getKeyValueStorage().getItem(e);return t&&JSON.parse(t)}}let d=(e,t)=>f(s)(`${e}`,t);function f(e){let t=Object.values({...e});return(e,n)=>t.reduce((t,r)=>({...t,[r]:`${e}.${n}.${r}`}),{})}},54720:function(e,t,n){"use strict";let r;n.d(t,{D:function(){return E},C:function(){return C}});var i,o=n(12545),s=n(43327),a=n(50076),u=n(46640),c=n(4664),h=n(19590),l=n(3095),d=n(23134);let f=(i=async({tokens:e,authConfig:t,username:n})=>{(0,s.FG)(t?.Cognito);let{userPoolId:r,userPoolClientId:i,userPoolEndpoint:o}=t.Cognito,f=(0,a.y)(r);(0,u.XD)(e);let g=e.refreshToken,p={REFRESH_TOKEN:g};e.deviceMetadata?.deviceKey&&(p.DEVICE_KEY=e.deviceMetadata.deviceKey);let y=(0,d.u)({username:n,userPoolId:r,userPoolClientId:i}),m=(0,h.N)({endpointResolver:(0,l.e)({endpointOverride:o})}),{AuthenticationResult:w}=await m({region:f},{ClientId:i,AuthFlow:"REFRESH_TOKEN_AUTH",AuthParameters:p,UserContextData:y}),v=(0,s.xp)(w?.AccessToken??""),I=w?.IdToken?(0,s.xp)(w.IdToken):void 0,{iat:A}=v.payload;if(!A)throw new c.l({name:"iatNotFoundException",message:"iat not found in access token"});return{accessToken:v,idToken:I,clockDrift:1e3*A-new Date().getTime(),refreshToken:g,username:n}},async(...e)=>r||(r=new Promise((t,n)=>{i(...e).then(e=>{t(e)}).catch(e=>{n(e)}).finally(()=>{r=void 0})})));var g=n(37653),p=n(2086),y=n(35313);function m({expiresAt:e,clockDrift:t,tolerance:n=5e3}){return Date.now()+t+n>e}var w=n(70964),v=n(67303),I=n(70305),A=n(88552);class S{constructor(){this.waitForInflightOAuth=(0,y.j)()?async()=>await I.V.loadOAuthInFlight()?(this.inflightPromise||(this.inflightPromise=new Promise((e,t)=>
6{(0,A.q)(e)})),this.inflightPromise):void 0:async()=>{}}setAuthConfig(e){I.V.setAuthConfig(e.Cognito),this.authConfig=e}setTokenRefresher(e){this.tokenRefresher=e}setAuthTokenStore(e){this.tokenStore=e}getTokenStore(){if(!this.tokenStore)throw new c.l({name:"EmptyTokenStoreException",message:"TokenStore not set"});return this.tokenStore}getTokenRefresher(){if(!this.tokenRefresher)throw new c.l({name:"EmptyTokenRefresherException",message:"TokenRefresher not set"});return this.tokenRefresher}async getTokens(e){let t;try{(0,s.FG)(this.authConfig?.Cognito)}catch(e){return null}await this.waitForInflightOAuth(),this.inflightPromise=void 0,t=await this.getTokenStore().loadTokens();let n=await this.getTokenStore().getLastAuthUser();if(null===t)return null;let r=!!t?.idToken&&m({expiresAt:(t.idToken?.payload?.exp??0)*1e3,clockDrift:t.clockDrift??0}),i=m({expiresAt:(t.accessToken?.payload?.exp??0)*1e3,clockDrift:t.clockDrift??0});return(e?.forceRefresh||r||i)&&null===(t=await this.refreshTokens({tokens:t,username:n}))?null:{accessToken:t?.accessToken,idToken:t?.idToken,signInDetails:t?.signInDetails}}async refreshTokens({tokens:e,username:t}){try{let{signInDetails:n}=e,r=await this.getTokenRefresher()({tokens:e,authConfig:this.authConfig,username:t});return r.signInDetails=n,await this.setTokens({tokens:r}),p.Xb.dispatch("auth",{event:"tokenRefresh"},"Auth",p.SQ),r}catch(e){return this.handleErrors(e)}}handleErrors(e){if((0,v.R)(e),e.name!==w.Z.NetworkError&&this.clearTokens(),p.Xb.dispatch("auth",{event:"tokenRefresh_failure",data:{error:e}},"Auth",p.SQ),e.name.startsWith("NotAuthorizedException"))return null;throw e}async setTokens({tokens:e}){return this.getTokenStore().storeTokens(e)}async clearTokens(){return this.getTokenStore().clearTokens()}getDeviceMetadata(e){return this.getTokenStore().getDeviceMetadata(e)}clearDeviceMetadata(e){return this.getTokenStore().clearDeviceMetadata(e)}setOAuthMetadata(e){return this.getTokenStore().setOAuthMetadata(e)}getOAuthMetadata(){return this.getTokenStore().getOAuthMetadata()}}class b{constructor(){this.authTokenStore=new g.sI,this.authTokenStore.setKeyValueStorage(o.Fm),this.tokenOrchestrator=new S,this.tokenOrchestrator.setAuthTokenStore(this.authTokenStore),this.tokenOrchestrator.setTokenRefresher(f)}getTokens({forceRefresh:e}={forceRefresh:!1}){return this.tokenOrchestrator.getTokens({forceRefresh:e})}setKeyValueStorage(e){this.authTokenStore.setKeyValueStorage(e)}setAuthConfig(e){this.authTokenStore.setAuthConfig(e),this.tokenOrchestrator.setAuthConfig(e)}}let E=new b,{tokenOrchestrator:C}=E},88552:function(e,t,n){"use strict";n.d(t,{P:function(){return o},q:function(){return i}});let r=[],i=e=>{r.push(e)},o=()=>{for(;r.length;)r.pop()?.()}},70305:function(e,t,n){"use strict";n.d(t,{V:function(){return i}});var r=n(12545);let i=new(n(16331)).R(r.Fm)},16331:function(e,t,n){"use strict";n.d(t,{R:function(){return u}});var r=n(43327),i=n(37653),o=n(46640);let s="amplify-signin-with-hostedUI",a="CognitoIdentityServiceProvider";class u{constructor(e){this.keyValueStorage=e}async clearOAuthInflightData(){(0,r.FG)(this.cognitoConfig);let e=c(a,this.cognitoConfig.userPoolClientId);await Promise.all([this.keyValueStorage.removeItem(e.inflightOAuth),this.keyValueStorage.removeItem(e.oauthPKCE),this.keyValueStorage.removeItem(e.oauthState)])}async clearOAuthData(){(0,r.FG)(this.cognitoConfig);let e=c(a,this.cognitoConfig.userPoolClientId);return await this.clearOAuthInflightData(),await this.keyValueStorage.removeItem(s),this.keyValueStorage.removeItem(e.oauthSignIn)}loadOAuthState(){(0,r.FG)(this.cognitoConfig);let e=c(a,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(e.oauthState)}storeOAuthState(e){(0,r.FG)(this.cognitoConfig);let t=c(a,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(t.oauthState,e)}loadPKCE(){(0,r.FG)(this.cognitoConfig);let e=c(a,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(e.oauthPKCE)}storePKCE(e){(0,r.FG)(this.cognitoConfig);let t=c(a,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(t.oauthPKCE,e)}setAuthConfig(e){this.cognitoConfig=e}async loadOAuthInFlight(){(0,r.FG)(this.cognitoConfig);let e=c(a,this.cognitoConfig.userPoolClientId);return await this.keyValueStorage.getItem(e.inflightOAuth)==="true"}async storeOAuthInFlight(e){(0,r.FG)(this.cognitoConfig);let t=c(a,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(t.inflightOAuth,`${e}`)}async loadOAuthSignIn(){(0,r.FG)(this.cognitoConfig);let e=c(a,this.cognitoConfig.userPoolClientId),t=await this.keyValueStorage.getItem(s),[n,i]=(await this.keyValueStorage.getItem(e.oauthSignIn))?.split(",")??[];return{isOAuthSignIn:"true"===n||"true"===t,preferPrivateSession:"true"===i}}async storeOAuthSignIn(e,t=!1){(0,r.FG)(this.cognitoConfig);let n=c(a,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(n.oauthSignIn,`${e},${t}`)}}let c=(e,t)=>(0,i._X)(o.Bx)(e,t)},46640:function(e,t,n){"use strict";n.d(t,{Bx:function(){return l},CA:function(){return o},Cg:function(){return s},XD:function(){return c},tr:function(){return h}});var r=n(4664),i=n(86144);function o(e){if(!e||!e.accessToken)throw new r.l({name:i.Jg,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}function s(e){if(!e||!e.idToken)throw new r.l({name:i.Jg,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}let a=new r.l({name:i.hj,message:`Token refresh is not supported when authenticated with the 'implicit grant' (token) oauth flow. 7 Please change your oauth configuration to use 'code grant' flow.`,recoverySuggestion:`Please logout and change your Amplify configuration to use "code grant" flow. 8 E.g { responseType: 'code' }`}),u=new r.l({name:i.Jg,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."});function c(e){if(d(e)&&!e?.refreshToken)throw a;if(!(d(e)&&e?.refreshToken))throw u}function h(e){if(!e||!e.deviceKey||!e.deviceGroupKey||!e.randomPassword)throw new r.l({name:i.mP,message:"Either deviceKey, deviceGroupKey or secretPassword were not found during the sign-in process.",recoverySuggestion:"Make sure to not clear storage after calling the signIn API."})}let l={inflightOAuth:"inflightOAuth",oauthSignIn:"oauthSignIn",oauthPKCE:"oauthPKCE",oauthState:"oauthState"};function d(e){return e?.accessToken||e?.idToken}},23134:function(e,t,n){"use strict";function r({username:e,userPoolId:t,userPoolClientId:n}
8){if("undefined"==typeof window)return;let r=window.AmazonCognitoAdvancedSecurityData;if(void 0===r)return;let i=r.getData(e,t,n);return i?{EncodedData:i}:{}}n.d(t,{u:function(){return r}})},2086:function(e,t,n){"use strict";n.d(t,{SQ:function(){return s},Xb:function(){return c},qC:function(){return h}});var r=n(57590),i=n(47544),o=n(55257);let s="undefined"!=typeof Symbol?Symbol("amplify_default"):"@@amplify_default",a=new r.k("Hub");class u{constructor(e){this.listeners=new Map,this.protectedChannels=["core","auth","api","analytics","interactions","pubsub","storage","ui","xr"],this.name=e}_remove(e,t){let n=this.listeners.get(e);if(!n){a.warn(`No listeners for ${e}`);return}this.listeners.set(e,[...n.filter(({callback:e})=>e!==t)])}dispatch(e,t,n,r){"string"==typeof e&&this.protectedChannels.indexOf(e)>-1&&r!==s&&a.warn(`WARNING: ${e} is protected and dispatching on it can have unintended consequences`);let i={channel:e,payload:{...t},source:n,patternInfo:[]};try{this._toListeners(i)}catch(e){a.error(e)}}listen(e,t,n="noname"){if("function"!=typeof t)throw new o._({name:i.z2,message:"No callback supplied to Hub"});let r=this.listeners.get(e);return r||(r=[],this.listeners.set(e,r)),r.push({name:n,callback:t}),()=>{this._remove(e,t)}}_toListeners(e){let{channel:t,payload:n}=e,r=this.listeners.get(t);r&&r.forEach(r=>{a.debug(`Dispatching to ${t} with `,n);try{r.callback(e)}catch(e){a.error(e)}})}}let c=new u("__default__"),h=new u("internal-hub")},57590:function(e,t,n){"use strict";n.d(t,{k:function(){return a}});var r,i,o=n(47544);(r=i||(i={})).DEBUG="DEBUG",r.ERROR="ERROR",r.INFO="INFO",r.WARN="WARN",r.VERBOSE="VERBOSE",r.NONE="NONE";let s={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,NONE:6};class a{constructor(e,t=i.WARN){this.name=e,this.level=t,this._pluggables=[]}_padding(e){return e<10?"0"+e:""+e}_ts(){let e=new Date;return[this._padding(e.getMinutes()),this._padding(e.getSeconds())].join(":")+"."+e.getMilliseconds()}configure(e){return e&&(this._config=e),this._config}_log(e,...t){let n=this.level;a.LOG_LEVEL&&(n=a.LOG_LEVEL),"undefined"!=typeof window&&window.LOG_LEVEL&&(n=window.LOG_LEVEL);let r=s[n];if(!(s[e]>=r))return;let o=console.log.bind(console);e===i.ERROR&&console.error&&(o=console.error.bind(console)),e===i.WARN&&console.warn&&(o=console.warn.bind(console)),a.BIND_ALL_LOG_LEVELS&&(e===i.INFO&&console.info&&(o=console.info.bind(console)),e===i.DEBUG&&console.debug&&(o=console.debug.bind(console)));let u=`[${e}] ${this._ts()} ${this.name}`,c="";if(1===t.length&&"string"==typeof t[0])o(c=`${u} - ${t[0]}`);else if(1===t.length)c=`${u} ${t[0]}`,o(u,t[0]);else if("string"==typeof t[0]){let e=t.slice(1);1===e.length&&(e=e[0]),c=`${u} - ${t[0]} ${e}`,o(`${u} - ${t[0]}`,e)}else c=`${u} ${t}`,o(u,t);for(let e of this._pluggables){let t={message:c,timestamp:Date.now()};e.pushLogs([t])}}log(...e){this._log(i.INFO,...e)}info(...e){this._log(i.INFO,...e)}warn(...e){this._log(i.WARN,...e)}error(...e){this._log(i.ERROR,...e)}debug(...e){this._log(i.DEBUG,...e)}verbose(...e){this._log(i.VERBOSE,...e)}addPluggable(e){e&&e.getCategoryName()===o.YG&&(this._pluggables.push(e),e.configure(this._config))}listPluggables(){return this._pluggables}}a.LOG_LEVEL=null,a.BIND_ALL_LOG_LEVELS=!1},33807:function(e,t,n){"use strict";let r;n.d(t,{Cj:function(){return m},QW:function(){return w}});var i=n(7569),o=n(27059);let s=()=>"undefined"!=typeof global,a=()=>"undefined"!=typeof window,u=()=>"undefined"!=typeof document,c=()=>void 0!==o,h=(e,t)=>!!Object.keys(e).find(e=>e.startsWith(t));var l=n(27059),d=n(27059),f=n(27059);let g=[{platform:i.gQ.Expo,detectionMethod:function(){return s()&&void 0!==global.expo}},{platform:i.gQ.ReactNative,detectionMethod:function(){return"undefined"!=typeof navigator&&void 0!==navigator.product&&"ReactNative"===navigator.product}},{platform:i.gQ.NextJs,detectionMethod:function(){return a()&&window.next&&"object"==typeof window.next}},{platform:i.gQ.Nuxt,detectionMethod:function(){return a()&&(void 0!==window.__NUXT__||void 0!==window.$nuxt)}},{platform:i.gQ.Angular,detectionMethod:function(){let e=!!(u()&&document.querySelector("[ng-version]")),t=!!(a()&&void 0!==window.ng);return e||t}},{platform:i.gQ.React,detectionMethod:function(){let e=e=>e.startsWith("_react")||e.startsWith("__react");return u()&&Array.from(document.querySelectorAll("[id]")).some(t=>Object.keys(t).find(e))}},{platform:i.gQ.VueJs,detectionMethod:function(){return a()&&h(window,"__VUE")}},{platform:i.gQ.Svelte,detectionMethod:function(){return a()&&h(window,"__SVELTE")}},{platform:i.gQ.WebUnknown,detectionMethod:function(){return a()}},{platform:i.gQ.NextJsSSR,detectionMethod:function(){return s()&&(h(global,"__next")||h(global,"__NEXT"))}},{platform:i.gQ.NuxtSSR,detectionMethod:function(){return s()&&void 0!==global.__NUXT_PATHS__}},{platform:i.gQ.ReactSSR,detectionMethod:function(){return c()&&void 0!==l.env&&!!Object.keys(l.env).find(e=>e.includes("react"))}},{platform:i.gQ.VueJsSSR,detectionMethod:function(){return s()&&h(global,"__VUE")}},{platform:i.gQ.AngularSSR,detectionMethod:function(){return c()&&"object"==typeof f.env&&f.env.npm_lifecycle_script?.startsWith("ng ")||!1}},{platform:i.gQ.SvelteSSR,detectionMethod:function(){return c()&&void 0!==d.env&&!!Object.keys(d.env).find(e=>e.includes("svelte"))}}],p=[],y=!1,m=()=>{if(!r){if(r=g.find(e=>e.detectionMethod())?.platform||i.gQ.ServerSideUnknown,y)for(;p.length;)p.pop()?.();
8else p.forEach(e=>{e()});v(i.gQ.ServerSideUnknown,10),v(i.gQ.WebUnknown,10)}return r},w=e=>{y||p.push(e)};function v(e,t){r!==e||y||setTimeout(()=>{r=void 0,y=!0,setTimeout(m,1e3)},t)}},31573:function(e,t,n){"use strict";n.d(t,{Zm:function(){return d}});var r=n(7569);let i="6.13.0";var o=n(33807);let s={},a=(e,t)=>s[e]?.[t]?.additionalDetails,u="aws-amplify",c=e=>e.replace(/\+.*/,"");class h{constructor(){this.userAgent=`${u}/${c(i)}`}get framework(){return(0,o.Cj)()}get isReactNative(){return this.framework===r.gQ.ReactNative||this.framework===r.gQ.Expo}observeFrameworkChanges(e){(0,o.QW)(e)}}new h;let l=({category:e,action:t}={})=>{let n=[[u,c(i)]];if(e&&n.push([e,t]),n.push(["framework",(0,o.Cj)()]),e&&t){let r=a(e,t);r&&r.forEach(e=>{n.push(e)})}return n},d=e=>l(e).map(([e,t])=>e&&t?`${e}/${t}`:e).join(" ")},7569:function(e,t,n){"use strict";var r,i,o,s,a,u,c,h,l,d,f,g,p,y,m,w,v,I,A,S,b,E,C,_,P,k;n.d(t,{WD:function(){return i},g4:function(){return u},gQ:function(){return r}}),(m=r||(r={})).WebUnknown="0",m.React="1",m.NextJs="2",m.Angular="3",m.VueJs="4",m.Nuxt="5",m.Svelte="6",m.ServerSideUnknown="100",m.ReactSSR="101",m.NextJsSSR="102",m.AngularSSR="103",m.VueJsSSR="104",m.NuxtSSR="105",m.SvelteSSR="106",m.ReactNative="201",m.Expo="202",(w=i||(i={})).AI="ai",w.API="api",w.Auth="auth",w.Analytics="analytics",w.DataStore="datastore",w.Geo="geo",w.InAppMessaging="inappmessaging",w.Interactions="interactions",w.Predictions="predictions",w.PubSub="pubsub",w.PushNotification="pushnotification",w.Storage="storage",(v=o||(o={})).CreateConversation="1",v.GetConversation="2",v.ListConversations="3",v.DeleteConversation="4",v.SendMessage="5",v.ListMessages="6",v.OnMessage="7",v.Generation="8",v.UpdateConversation="9",(I=s||(s={})).Record="1",I.IdentifyUser="2",(A=a||(a={})).GraphQl="1",A.Get="2",A.Post="3",A.Put="4",A.Patch="5",A.Del="6",A.Head="7",(S=u||(u={})).SignUp="1",S.ConfirmSignUp="2",S.ResendSignUpCode="3",S.SignIn="4",S.FetchMFAPreference="6",S.UpdateMFAPreference="7",S.SetUpTOTP="10",S.VerifyTOTPSetup="11",S.ConfirmSignIn="12",S.DeleteUserAttributes="15",S.DeleteUser="16",S.UpdateUserAttributes="17",S.FetchUserAttributes="18",S.ConfirmUserAttribute="22",S.SignOut="26",S.UpdatePassword="27",S.ResetPassword="28",S.ConfirmResetPassword="29",S.FederatedSignIn="30",S.RememberDevice="32",S.ForgetDevice="33",S.FetchDevices="34",S.SendUserAttributeVerificationCode="35",S.SignInWithRedirect="36",S.StartWebAuthnRegistration="37",S.CompleteWebAuthnRegistration="38",S.ListWebAuthnCredentials="39",S.DeleteWebAuthnCredential="40",(b=c||(c={})).Subscribe="1",b.GraphQl="2",(E=h||(h={})).SearchByText="0",E.SearchByCoordinates="1",E.SearchForSuggestions="2",E.SearchByPlaceId="3",E.SaveGeofences="4",E.GetGeofence="5",E.ListGeofences="6",E.DeleteGeofences="7",(C=l||(l={})).SyncMessages="1",C.IdentifyUser="2",C.NotifyMessageInteraction="3",(d||(d={})).None="0",(_=f||(f={})).Convert="1",_.Identify="2",_.Interpret="3",(g||(g={})).Subscribe="1",(P=p||(p={})).InitializePushNotifications="1",P.IdentifyUser="2",(k=y||(y={})).UploadData="1",k.DownloadData="2",k.List="3",k.Copy="4",k.Remove="5",k.GetProperties="6",k.GetUrl="7",k.GetDataAccess="8",k.ListCallerAccessGrants="9"},89541:function(e,t,n){"use strict";n.d(t,{b:function(){return o}});let r={id:"aws",outputs:{dnsSuffix:"amazonaws.com"},regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",regions:["aws-global"]},i={partitions:[r,{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn"},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:["aws-cn-global"]}]},o=e=>{let{partitions:t}=i;for(let{regions:n,outputs:r,regionRegex:i}of t){let t=new RegExp(i);if(n.includes(e)||t.test(e))return r.dnsSuffix}return r.outputs.dnsSuffix}},26477:function(e,t,n){"use strict";n.d(t,{y:function(){return d}});let r=3,i=(e,t)=>{let n,r;if(t?.aborted)return Promise.resolve();let i=new Promise(t=>{r=t,n=setTimeout(t,e)});return t?.addEventListener("abort",function e(i){clearTimeout(n),t?.removeEventListener("abort",e),r()}),i},o=(e,t)=>{"[object Object]"===Object.prototype.toString.call(e)&&(e.$metadata={...e.$metadata??{},attempts:t})};var s=n(28262),a=n(55257),u=n(70964);let c=e=>{let t;return()=>(t||(t=e()),t)},h=e=>!["HEAD","GET","DELETE"].includes(e.toUpperCase()),l=async({url:e,method:t,headers:n,body:r},{abortSignal:i,cache:o,withCrossDomainCredentials:s})=>{let l;try{l=await fetch(e,{method:t,headers:n,body:h(t)?r:void 0,signal:i,cache:o,credentials:s?"include":"same-origin"})}catch(e){if(e instanceof TypeError)throw new a._({name:u.Z.NetworkError,message:"A network error has occurred.",underlyingError:e});throw e}let d={};l.headers?.forEach((e,t)=>{d[t.toLowerCase()]=e});let f={statusCode:l.status,headers:d,body:null},g=Object.assign(l.body??{},{text:c(()=>l.text()),blob:c(()=>l.blob()),json:c(()=>l.json())});return{...f,body:g}},d=(0,s.V)(l,[({userAgentHeader:e="x-amz-user-agent",userAgentValue:t=""})=>n=>async function(r){if(0===t.trim().length)return await n(r);{let i=e.toLowerCase();return r.headers[i]=r.headers[i]?`${r.headers[i]} ${t}`:t,await n(r)}},({maxAttempts:e=r,retryDecider:t,computeDelay:n,abortSignal:s})=>{if(e<1)throw Error("maxAttempts must be greater than 0");return(r,a)=>async function(u){let c,h;let l=a.attemptsCount??0,d=()=>
8{if(h)return o(h,l),h;throw o(c,l),c};for(;!s?.aborted&&l<e;){try{h=await r(u),c=void 0}catch(e){c=e,h=void 0}l=(a.attemptsCount??0)>l?a.attemptsCount??0:l+1,a.attemptsCount=l;let{isCredentialsExpiredError:o,retryable:f}=await t(h,c,a);if(!f)return d();if(a.isCredentialsExpired=!!o,!s?.aborted&&l<e){let e=n(l);await i(e,s)}}if(!s?.aborted)return d();throw Error("Request aborted.")}}])},66247:function(e,t,n){"use strict";n.d(t,{z:function(){return r}});let r=(e,t,n,r)=>async(i,o)=>{let s={...r,...i},a=await s.endpointResolver(s,o),u=await t(o,a);return n(await e(u,{...s}))}},28262:function(e,t,n){"use strict";n.d(t,{V:function(){return r}});let r=(e,t)=>(n,r)=>{let i={},o=t=>e(t,r);for(let e=t.length-1;e>=0;e--)o=(0,t[e])(r)(o,i);return o(n)}},62093:function(e,t,n){"use strict";n.d(t,{j:function(){return s}});var r=n(70964);let i=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch","BadRequestException"],o=e=>!!e&&i.includes(e),s=e=>async(t,n)=>{let r=n??await e(t)??void 0,i=r?.code||r?.name,s=t?.statusCode;return{retryable:h(n)||c(s,i)||o(i)||l(s,i)}},a=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException"],u=["TimeoutError","RequestTimeout","RequestTimeoutException"],c=(e,t)=>429===e||!!t&&a.includes(t),h=e=>[r.Z.NetworkError,"ERR_NETWORK"].includes(e?.name),l=(e,t)=>!!e&&[500,502,503,504].includes(e)||!!t&&u.includes(t)},73100:function(e,t,n){"use strict";n.d(t,{k:function(){return r}});let r=e=>{let t=(function(e=3e5){return t=>{let n=2**t*100+100*Math.random();return!(n>e)&&n}})(3e5)(e);return!1===t?3e5:t}},53533:function(e,t,n){"use strict";n.d(t,{e:function(){return o},f:function(){return i}});var r=n(61160);let i=async e=>{if(!e||e.statusCode<300)return;let t=await o(e),n=(e=>{let[t]=e.toString().split(/[,:]+/);return t.includes("#")?t.split("#")[1]:t})(e.headers["x-amzn-errortype"]??t.code??t.__type??"UnknownError");return Object.assign(Error(t.message??t.Message??"Unknown error"),{name:n,$metadata:(0,r.B)(e)})},o=async e=>{if(!e.body)throw Error("Missing response payload");return Object.assign(await e.body.json(),{$metadata:(0,r.B)(e)})}},61160:function(e,t,n){"use strict";n.d(t,{B:function(){return r}});let r=e=>{let{headers:t,statusCode:n}=e;return{...i(e)?e.$metadata:{},httpStatusCode:n,requestId:t["x-amzn-requestid"]??t["x-amzn-request-id"]??t["x-amz-request-id"],extendedRequestId:t["x-amz-id-2"],cfId:t["x-amz-cf-id"]}},i=e=>"object"==typeof e?.$metadata},47544:function(e,t,n){"use strict";n.d(t,{Mt:function(){return i},YG:function(){return r},z2:function(){return o}});let r="Logging",i="x-amz-user-agent",o="NoHubcallbackProvidedException"},55257:function(e,t,n){"use strict";n.d(t,{_:function(){return r}});class r extends Error{constructor({message:e,name:t,recoverySuggestion:n,underlyingError:i}){super(e),this.name=t,this.underlyingError=i,this.recoverySuggestion=n,this.constructor=r,Object.setPrototypeOf(this,r.prototype)}}},96007:function(e,t,n){"use strict";n.d(t,{$:function(){return i}});var r=n(55257);let i=(e,t=r._)=>(n,r,i)=>{let{message:o,recoverySuggestion:s}=e[r];if(!n)throw new t({name:r,message:i?`${o} ${i}`:o,recoverySuggestion:s})}},1663:function(e,t,n){"use strict";n.d(t,{d:function(){return c}});var r=n(2086);let i=e=>{for(let t of Reflect.ownKeys(e)){let n=e[t];(n&&"object"==typeof n||"function"==typeof n)&&i(n)}return Object.freeze(e)};var o=n(70413),s=n(59402);n(84465),n(11820);class a{configure(e,t){this.authConfig=e,this.authOptions=t}async fetchAuthSession(e={}){let t,n;let r=await this.getTokens(e);return r?(n=r.accessToken?.payload?.sub,t=await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,tokens:r,authenticated:!0,forceRefresh:e.forceRefresh})):t=await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,authenticated:!1,forceRefresh:e.forceRefresh}),{tokens:r,credentials:t?.credentials,identityId:t?.identityId,userSub:n}}async clearCredentials(){await this.authOptions?.credentialsProvider?.clearCredentialsAndIdentityId()}async getTokens(e){return await this.authOptions?.tokenProvider?.getTokens(e)??void 0}}class u{constructor(){this.oAuthListener=void 0,this.resourcesConfig={},this.libraryOptions={},this.Auth=new a}configure(e,t){let n=(0,s.h)(e);this.resourcesConfig=n,t&&(this.libraryOptions=t),this.resourcesConfig=i(this.resourcesConfig),this.Auth.configure(this.resourcesConfig.Auth,this.libraryOptions.Auth),r.Xb.dispatch("core",{event:"configure",data:this.resourcesConfig},"Configure",r.SQ),this.notifyOAuthListener()}getConfig(){return this.resourcesConfig}[o.w](e){this.resourcesConfig.Auth?.Cognito.loginWith?.oauth?e(this.resourcesConfig.Auth?.Cognito):this.oAuthListener=e}notifyOAuthListener(){this.resourcesConfig.Auth?.Cognito.loginWith?.oauth&&this.oAuthListener&&(this.oAuthListener(this.resourcesConfig.Auth?.Cognito),this.oAuthListener=void 0)}}let c=new u},43327:function(e,t,n){"use strict";n.d(t,{YE:function(){return l},V0:function(){return h},FG:function(){return c},xp:function(){return d}});var r,i,o=n(41371),s=n(96007);(r=i||(i={})).AuthTokenConfigException="AuthTokenConfigException",r.AuthUserPoolAndIdentityPoolException="AuthUserPoolAndIdentityPoolException",r.AuthUserPoolException="AuthUserPoolException",r.InvalidIdentityPoolIdException="InvalidIdentityPoolIdException",r.OAuthNotConfigureException="OAuthNotConfigureException";let a={[i.AuthTokenConfigException]:{message:"Auth Token Provider not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app."},[i.AuthUserPoolAndIdentityPoolException]:{message:"Auth UserPool or IdentityPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId."},[i.AuthUserPoolException]:{message:"Auth UserPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId."},[i.InvalidIdentityPoolIdException]:{message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."},[i.OAuthNotConfigureException]:{message:"oauth param not configured.",recoverySuggestion:"Make sure to call Amplify.configure with oauth parameter in your app."}},u=(0,s.$)(a);function c(e){u(!!e&&!!e.userPoolId&&!!e.userPoolClientId,i.AuthUserPoolException)}function h(e){u(!!e?.loginWith?.oauth?.domain&&!!e?.loginWith?.oauth?.redirectSignOut&&!!e?.loginWith?.oauth?.redirectSignIn&&!!e?.loginWith?.oauth?.responseType,i.OAuthNotConfigureException)}function l(e){u(!!e?.identityPoolId,i.InvalidIdentityPoolIdException)}function d(e){let t=e.split(".");if(3!==t.length)throw Error("Invalid token");try{let n=t[1].replace(/-/g,"+").replace(/_/g,"/"),r=decodeURIComponent(o.$.convert(n).split("").map(e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")),i=JSON.parse(r);return{toString:()=>e,payload:i}}catch(e){throw Error("Invalid token payload")}}},70413:function(e,t,n){"use strict";n.d(t,{w:function(){return r}});let r=Symbol("oauth-listener")},13312:function(e,t,n){"use strict";n.d(t,{e:function(){return i}});var r=n(86809);class i{constructor(e={}){let{path:t,domain:n,expires:r,sameSite:i,secure:o}=e;if(this.domain=n,this.path=t||"/",this.expires=Object.prototype.hasOwnProperty.call(e,"expires")?r:365,this.secure=!Object.prototype.hasOwnProperty.call(e,"secure")||o,Object.prototype.hasOwnProperty.call(e,"sameSite")){if(!i||!["strict","lax","none"].includes(i))throw Error('The sameSite value of cookieStorage must be "lax", "strict" or "none".');if("none"===i&&!this.secure)throw Error("sameSite = None requires the Secure attribute in latest browser versions.");this.sameSite=i}}async setItem(e,t){r.Z.set(e,t,this.getData())}async getItem(e){return r.Z.get(e)??null}async removeItem(e){r.Z.remove(e,this.getData())}async clear(){let e=Object.keys(r.Z.get()).map(e=>this.removeItem(e));await Promise.all(e)}getData(){return{path:this.path,expires:this.expires,domain:this.domain,secure:this.secure,...this.sameSite&&{sameSite:this.sameSite}}}}},12545:function(e,t,n){"use strict";n.d(t,{Fm:function(){return y},$2:function(){return m}});var r=n(70964),i=n(55257);class o extends i._{constructor(){super({name:r.Z.PlatformNotSupported,message:"Function not supported on current platform"})}}class s{constructor(e){this.storage=e}async setItem(e,t){if(!this.storage)throw new o;this.storage.setItem(e,t)}async getItem(e){if(!this.storage)throw new o;return this.storage.getItem(e)}async removeItem(e){if(!this.storage)throw new o;this.storage.removeItem(e)}async clear(){if(!this.storage)throw new o;this.storage.clear()}}var a=n(57590);class u{constructor(){this.storage=new Map}get length(){return this.storage.size}key(e){return e>this.length-1?null:Array.from(this.storage.keys())[e]}setItem(e,t){this.storage.set(e,t)}getItem(e){return this.storage.get(e)??null}removeItem(e){this.storage.delete(e)}clear(){this.storage.clear()}}let c=new a.k("CoreStorageUtils"),h=()=>{try{if("undefined"!=typeof window&&window.localStorage)return window.localStorage}catch(e){c.info("localStorage not found. InMemoryStorage is used as a fallback.")}return new u},l=()=>{try{if("undefined"!=typeof window&&window.sessionStorage)return window.sessionStorage.getItem("test"),window.sessionStorage;throw Error("sessionStorage is not defined")}catch(e){return c.info("sessionStorage not found. InMemoryStorage is used as a fallback."),new u}};class d extends s{constructor(){super(h())}}class f extends s{constructor(){super(l())}}class g{constructor(e){this._storage=e}get storage(){if(!this._storage)throw new o;return this._storage}setItem(e,t){this.storage.setItem(e,t)}getItem(e){return this.storage.getItem(e)}removeItem(e){this.storage.removeItem(e)}clear(){this.storage.clear()}}class p extends g{constructor(){super(l())}}let y=new d;new f;let m=new p;new s(new u)},70964:function(e,t,n){"use strict";var r,i;n.d(t,{Z:function(){return r}}),(i=r||(r={})).NoEndpointId="NoEndpointId",i.PlatformNotSupported="PlatformNotSupported",i.Unknown="Unknown",i.NetworkError="NetworkError"},46712:function(e,t,n){"use strict";n.d(t,{a:function(){return r}});let r=URL},41371:function(e,t,n){"use strict";n.d(t,{$:function(){return i}});var r=n(83135);let i={convert(e,t){let n=e;return t?.urlSafe&&(n=n.replace(/-/g,"+").replace(/_/g,"/")),(0,r.tl)()(n)}}},83135:function(e,t,n){"use strict";n.d(t,{Ds:function(){return o},MX:function(){return i},tl:function(){return s}});var r=n(55257);let i=()=>
8{if("object"==typeof window&&"object"==typeof window.crypto)return window.crypto;if("object"==typeof crypto)return crypto;throw new r._({name:"MissingPolyfill",message:"Cannot resolve the `crypto` function from the environment."})},o=()=>{if("undefined"!=typeof window&&"function"==typeof window.btoa)return window.btoa;if("function"==typeof btoa)return btoa;throw new r._({name:"Base64EncoderError",message:"Cannot resolve the `btoa` function from the environment."})},s=()=>{if("undefined"!=typeof window&&"function"==typeof window.atob)return window.atob;if("function"==typeof atob)return atob;throw new r._({name:"Base64EncoderError",message:"Cannot resolve the `atob` function from the environment."})}},35313:function(e,t,n){"use strict";n.d(t,{j:function(){return r}});let r=()=>"undefined"!=typeof window&&void 0!==window.document},59402:function(e,t,n){"use strict";n.d(t,{h:function(){return f}});var r=n(57590),i=n(55257);let o=new r.k("parseAWSExports"),s={API_KEY:"apiKey",AWS_IAM:"iam",AMAZON_COGNITO_USER_POOLS:"userPool",OPENID_CONNECT:"oidc",NONE:"none",AWS_LAMBDA:"lambda",LAMBDA:"lambda"},a=(e={})=>{if(!Object.prototype.hasOwnProperty.call(e,"aws_project_region"))throw new i._({name:"InvalidParameterException",message:"Invalid config parameter.",recoverySuggestion:"Ensure passing the config object imported from `amplifyconfiguration.json`."});let{aws_appsync_apiKey:t,aws_appsync_authenticationType:n,aws_appsync_graphqlEndpoint:r,aws_appsync_region:a,aws_bots_config:u,aws_cognito_identity_pool_id:l,aws_cognito_sign_up_verification_method:d,aws_cognito_mfa_configuration:f,aws_cognito_mfa_types:g,aws_cognito_password_protection_settings:p,aws_cognito_verification_mechanisms:y,aws_cognito_signup_attributes:m,aws_cognito_social_providers:w,aws_cognito_username_attributes:v,aws_mandatory_sign_in:I,aws_mobile_analytics_app_id:A,aws_mobile_analytics_app_region:S,aws_user_files_s3_bucket:b,aws_user_files_s3_bucket_region:E,aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing:C,aws_user_pools_id:_,aws_user_pools_web_client_id:P,geo:k,oauth:T,predictions:R,aws_cloud_logic_custom:O,Notifications:x,modelIntrospection:U}=e,L={};A&&(L.Analytics={Pinpoint:{appId:A,region:S}});let{InAppMessaging:M,Push:N}=x??{};if(M?.AWSPinpoint||N?.AWSPinpoint){if(M?.AWSPinpoint){let{appId:e,region:t}=M.AWSPinpoint;L.Notifications={InAppMessaging:{Pinpoint:{appId:e,region:t}}}}if(N?.AWSPinpoint){let{appId:e,region:t}=N.AWSPinpoint;L.Notifications={...L.Notifications,PushNotification:{Pinpoint:{appId:e,region:t}}}}}if(Array.isArray(u)&&(L.Interactions={LexV1:Object.fromEntries(u.map(e=>[e.name,e]))}),r){let e=s[n];e||o.debug(`Invalid authentication type ${n}. Falling back to IAM.`),L.API={GraphQL:{endpoint:r,apiKey:t,region:a,defaultAuthMode:e??"iam"}},U&&(L.API.GraphQL.modelIntrospection=U)}let D=f?{status:f&&f.toLowerCase(),totpEnabled:g?.includes("TOTP")??!1,smsEnabled:g?.includes("SMS")??!1}:void 0,K=p?{minLength:p.passwordPolicyMinLength,requireLowercase:p.passwordPolicyCharacters?.includes("REQUIRES_LOWERCASE")??!1,requireUppercase:p.passwordPolicyCharacters?.includes("REQUIRES_UPPERCASE")??!1,requireNumbers:p.passwordPolicyCharacters?.includes("REQUIRES_NUMBERS")??!1,requireSpecialCharacters:p.passwordPolicyCharacters?.includes("REQUIRES_SYMBOLS")??!1}:void 0,V=Array.from(new Set([...y??[],...m??[]])).reduce((e,t)=>({...e,[t.toLowerCase()]:{required:!0}}),{}),B=v?.includes("EMAIL")??!1,G=v?.includes("PHONE_NUMBER")??!1;(l||_)&&(L.Auth={Cognito:{identityPoolId:l,allowGuestAccess:"enable"!==I,signUpVerificationMethod:d,userAttributes:V,userPoolClientId:P,userPoolId:_,mfa:D,passwordFormat:K,loginWith:{username:!(B||G),email:B,phone:G}}});let j=!!T&&Object.keys(T).length>0,F=!!w&&w.length>0;if(L.Auth&&j&&(L.Auth.Cognito.loginWith={...L.Auth.Cognito.loginWith,oauth:{...c(T),...F&&{providers:h(w)}}}),b&&(L.Storage={S3:{bucket:b,region:E,dangerouslyConnectToHttpEndpointForTesting:C}}),k){let{amazon_location_service:e}=k;L.Geo={LocationService:{maps:e.maps,geofenceCollections:e.geofenceCollections,searchIndices:e.search_indices,region:e.region}}}if(O&&(L.API={...L.API,REST:O.reduce((e,t)=>
8{let{name:n,endpoint:r,region:i,service:o}=t;return{...e,[n]:{endpoint:r,...o?{service:o}:void 0,...i?{region:i}:void 0}}},{})}),R){let{VoiceId:e}=R?.convert?.speechGenerator?.defaults??{};L.Predictions=e?{...R,convert:{...R.convert,speechGenerator:{...R.convert.speechGenerator,defaults:{voiceId:e}}}}:R}return L},u=e=>e?.split(",")??[],c=({domain:e,scope:t,redirectSignIn:n,redirectSignOut:r,responseType:i})=>({domain:e,scopes:t,redirectSignIn:u(n),redirectSignOut:u(r),responseType:i}),h=e=>e.map(e=>{let t=e.toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)}),l={AMAZON_COGNITO_USER_POOLS:"userPool",API_KEY:"apiKey",AWS_IAM:"iam",AWS_LAMBDA:"lambda",OPENID_CONNECT:"oidc"},d={GOOGLE:"Google",LOGIN_WITH_AMAZON:"Amazon",FACEBOOK:"Facebook",SIGN_IN_WITH_APPLE:"Apple"},f=e=>Object.keys(e).some(e=>e.startsWith("aws_"))?a(e):!function(e){let{version:t}=e;return!!t&&t.startsWith("1")}(e)?e:function(e){let t={};if(e.storage&&(t.Storage=function(e){if(!e)return;let{bucket_name:t,aws_region:n,buckets:r}=e;return{S3:{bucket:t,region:n,buckets:r&&function(e){let t={};return e.forEach(({name:e,bucket_name:n,aws_region:r,paths:i})=>{if(e in t)throw Error(`Duplicate friendly name found: ${e}. Name must be unique.`);let o=i?Object.entries(i).reduce((e,[t,n])=>(void 0!==n&&(e[t]=n),e),{}):void 0;t[e]={bucketName:n,region:r,paths:o}}),t}(r)}}}(e.storage)),e.auth&&(t.Auth=function(e){if(!e)return;let{user_pool_id:t,user_pool_client_id:n,identity_pool_id:r,password_policy:i,mfa_configuration:o,mfa_methods:s,unauthenticated_identities_enabled:a,oauth:u,username_attributes:c,standard_required_attributes:h,groups:l}=e,f={Cognito:{userPoolId:t,userPoolClientId:n,groups:l}};return r&&(f.Cognito={...f.Cognito,identityPoolId:r}),i&&(f.Cognito.passwordFormat={requireLowercase:i.require_lowercase,requireNumbers:i.require_numbers,requireUppercase:i.require_uppercase,requireSpecialCharacters:i.require_symbols,minLength:i.min_length??6}),o&&(f.Cognito.mfa={status:"OPTIONAL"===o?"optional":"REQUIRED"===o?"on":"off",smsEnabled:s?.includes("SMS"),totpEnabled:s?.includes("TOTP")}),a&&(f.Cognito.allowGuestAccess=a),u&&(f.Cognito.loginWith={oauth:{domain:u.domain,redirectSignIn:u.redirect_sign_in_uri,redirectSignOut:u.redirect_sign_out_uri,responseType:"token"===u.response_type?"token":"code",scopes:u.scopes,providers:function(e=[]){return e.reduce((e,t)=>(void 0!==d[t]&&e.push(d[t]),e),[])}(u.identity_providers)}}),c&&(f.Cognito.loginWith={...f.Cognito.loginWith,email:c.includes("email"),phone:c.includes("phone_number"),username:c.includes("username")}),h&&(f.Cognito.userAttributes=h.reduce((e,t)=>({...e,[t]:{required:!0}}),{})),f}(e.auth)),e.analytics&&(t.Analytics=function(e){if(!e?.amazon_pinpoint)return;let{amazon_pinpoint:t}=e;return{Pinpoint:{appId:t.app_id,region:t.aws_region}}}(e.analytics)),e.geo&&(t.Geo=function(e){if(!e)return;let{aws_region:t,geofence_collections:n,maps:r,search_indices:i}=e;return{LocationService:{region:t,searchIndices:i,geofenceCollections:n,maps:r}}}(e.geo)),e.data&&(t.API=function(e){if(!e)return;let{aws_region:t,default_authorization_type:n,url:r,api_key:i,model_introspection:o}=e;return{GraphQL:{endpoint:r,defaultAuthMode:l[n],region:t,apiKey:i,modelIntrospection:o}}}(e.data)),e.custom){let n=function(e){if(!e?.events)return;let{url:t,aws_region:n,api_key:r,default_authorization_type:i}=e.events;return{Events:{endpoint:t,defaultAuthMode:l[i],region:n,apiKey:r}}}(e.custom);n&&"Events"in n&&(t.API={...t.API,...n})}return e.notifications&&(t.Notifications=function(e){if(!e)return;let{aws_region:t,channels:n,amazon_pinpoint_app_id:r}=e,i=n.includes("IN_APP_MESSAGING"),o=n.includes("APNS")||n.includes("FCM");if(!(i||o))return;let s={};return i&&(s.InAppMessaging={Pinpoint:{appId:r,region:t}}),o&&(s.PushNotification={Pinpoint:{appId:r,region:t}}),s}(e.notifications)),t}(e)},89381:function(e,t,n){"use strict";n.d(t,{V:function(){return W}});var r=n(1663),i=n(13312),o=n(12545),s=n(59402),a=n(54720),u=n(57590),c=n(43327),h=n(37653);let l={identityId:"identityId"},d=new u.k("DefaultIdentityIdStore");class f{setAuthConfig(e){(0,c.YE)(e.Cognito),this.authConfig=e,this._authKeys=g("C
8ognito",e.Cognito.identityPoolId)}constructor(e){this._authKeys={},this._hasGuestIdentityId=!1,this.keyValueStorage=e}async loadIdentityId(){(0,c.YE)(this.authConfig?.Cognito);try{if(this._primaryIdentityId)return{id:this._primaryIdentityId,type:"primary"};{let e=await this.keyValueStorage.getItem(this._authKeys.identityId);if(e)return this._hasGuestIdentityId=!0,{id:e,type:"guest"};return null}}catch(e){return d.log("Error getting stored IdentityId.",e),null}}async storeIdentityId(e){(0,c.YE)(this.authConfig?.Cognito),"guest"===e.type?(this.keyValueStorage.setItem(this._authKeys.identityId,e.id),this._primaryIdentityId=void 0,this._hasGuestIdentityId=!0):(this._primaryIdentityId=e.id,this._hasGuestIdentityId&&(this.keyValueStorage.removeItem(this._authKeys.identityId),this._hasGuestIdentityId=!1))}async clearIdentityId(){this._primaryIdentityId=void 0,await this.keyValueStorage.removeItem(this._authKeys.identityId)}}let g=(e,t)=>(0,h._X)(l)(`com.amplify.${e}`,t);n(84465),n(11820);var p=n(61160),y=n(53533),m=n(66247),w=n(89541),v=n(26477),I=n(73100),A=n(62093),S=n(46712),b=n(28262),E=n(31573),C=n(33807);let _=(0,b.V)(v.y,[()=>e=>async function(t){return t.headers["cache-control"]="no-store",e(t)}]),P={service:"cognito-identity",endpointResolver:({region:e})=>({url:new S.a(`https://cognito-identity.${e}.${(0,w.b)(e)}`)}),retryDecider:(0,A.j)(y.f),computeDelay:I.k,userAgentValue:(0,E.Zm)(),cache:"no-store"};(0,C.QW)(()=>{P.userAgentValue=(0,E.Zm)()});let k=e=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${e}`}),T=({url:e},t,n)=>({headers:t,url:e,body:n,method:"POST"}),R=async e=>{if(e.statusCode>=300)throw await (0,y.f)(e);{let t=await (0,y.e)(e);return{IdentityId:t.IdentityId,Credentials:O(t.Credentials),$metadata:(0,p.B)(e)}}},O=({AccessKeyId:e,SecretKey:t,SessionToken:n,Expiration:r}={})=>({AccessKeyId:e,SecretKey:t,SessionToken:n,Expiration:r&&new Date(1e3*r)}),x=(0,m.z)(_,(e,t)=>T(t,k("GetCredentialsForIdentity"),JSON.stringify(e)),R,P);var U=n(4664),L=n(50076),M=n(46640);let N=async e=>{if(!(e.statusCode>=300))return{IdentityId:(await (0,y.e)(e)).IdentityId,$metadata:(0,p.B)(e)};throw await (0,y.f)(e)},D=(0,m.z)(_,(e,t)=>T(t,k("GetId"),JSON.stringify(e)),N,P);function K(e){let t=(0,c.xp)(e).payload.iss,n={};if(!t)throw new U.l({name:"InvalidIdTokenException",message:"Invalid Idtoken."});return n[t.replace(/(^\w+:|^)\/\//,"")]=e,n}let V=new u.k("CognitoIdentityIdProvider");async function B({tokens:e,authConfig:t,identityIdStore:n}){n.setAuthConfig({Cognito:t});let r=await n.loadIdentityId();if(e){if(r&&"primary"===r.type)return r.id;{let n=e.idToken?K(e.idToken.toString()):{},i=await G(n,t);r&&r.id===i&&V.debug(`The guest identity ${r.id} has become the primary identity.`),r={id:i,type:"primary"}}}else{if(r&&"guest"===r.type)return r.id;r={id:await G({},t),type:"guest"}}return n.storeIdentityId(r),r.id}async function G(e,t){let n=t?.identityPoolId,r=(0,L.N)(n),i=(await D({region:r},{IdentityPoolId:n,Logins:e})).IdentityId;if(!i)throw new U.l({name:"GetIdResponseException",message:"Received undefined response from getId operation",recoverySuggestion:"Make sure to pass a valid identityPoolId in the configuration."});return i}let j=new u.k("CognitoCredentialsProvider");class F{constructor(e){this._nextCredentialsRefresh=0,this._identityIdStore=e}async clearCredentialsAndIdentityId(){j.debug("Clearing out credentials and identityId"),this._credentialsAndIdentityId=void 0,await this._identityIdStore.clearIdentityId()}async clearCredentials(){j.debug("Clearing out in-memory credentials"),this._credentialsAndIdentityId=void 0}async getCredentialsAndIdentityId(e){let t=e.authenticated,{tokens:n}=e,{authConfig:r}=e;try{(0,c.YE)(r?.Cognito)}catch{return}if(!t&&!r.Cognito.allowGuestAccess)return;let{forceRefresh:i}=e,o=this.hasTokenChanged(n),s=await B({tokens:n,authConfig:r.Cognito,identityIdStore:this._identityIdStore});return((i||o)&&this.clearCredentials(),t)?((0,M.Cg)(n),this.credsForOIDCTokens(r.Cognito,n,s)):this.getGuestCredentials(s,r.Cognito)}async getGuestCredentials(e,t){if(this._credentialsAndIdentityId&&!this.isPastTTL()&&!1===this._credentialsAndIdentityId.isAuthenticatedCreds)return j.info("returning stored credentials as they neither past TTL n
8or expired."),this._credentialsAndIdentityId;this.clearCredentials();let n=(0,L.N)(t.identityPoolId),r=await x({region:n},{IdentityId:e});if(r.Credentials&&r.Credentials.AccessKeyId&&r.Credentials.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+3e6;let t={credentials:{accessKeyId:r.Credentials.AccessKeyId,secretAccessKey:r.Credentials.SecretKey,sessionToken:r.Credentials.SessionToken,expiration:r.Credentials.Expiration},identityId:e},n=r.IdentityId;return n&&(t.identityId=n,this._identityIdStore.storeIdentityId({id:n,type:"guest"})),this._credentialsAndIdentityId={...t,isAuthenticatedCreds:!1},t}throw new U.l({name:"CredentialsNotFoundException",message:"Cognito did not respond with either Credentials, AccessKeyId or SecretKey."})}async credsForOIDCTokens(e,t,n){if(this._credentialsAndIdentityId&&!this.isPastTTL()&&!0===this._credentialsAndIdentityId.isAuthenticatedCreds)return j.debug("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();let r=t.idToken?K(t.idToken.toString()):{},i=(0,L.N)(e.identityPoolId),o=await x({region:i},{IdentityId:n,Logins:r});if(o.Credentials&&o.Credentials.AccessKeyId&&o.Credentials.SecretKey){let e={credentials:{accessKeyId:o.Credentials.AccessKeyId,secretAccessKey:o.Credentials.SecretKey,sessionToken:o.Credentials.SessionToken,expiration:o.Credentials.Expiration},identityId:n};this._credentialsAndIdentityId={...e,isAuthenticatedCreds:!0,associatedIdToken:t.idToken?.toString()},this._nextCredentialsRefresh=new Date().getTime()+3e6;let r=o.IdentityId;return r&&(e.identityId=r,this._identityIdStore.storeIdentityId({id:r,type:"primary"})),e}throw new U.l({name:"CredentialsException",message:"Cognito did not respond with either Credentials, AccessKeyId or SecretKey."})}isPastTTL(){return void 0===this._nextCredentialsRefresh||this._nextCredentialsRefresh<=Date.now()}hasTokenChanged(e){return!!e&&!!this._credentialsAndIdentityId?.associatedIdToken&&e.idToken?.toString()!==this._credentialsAndIdentityId.associatedIdToken}}let $=new F(new f(o.Fm)),W={configure(e,t){let n=(0,s.h)(e);if(!n.Auth||t?.Auth){r.d.configure(n,t);return}if(!r.d.libraryOptions.Auth){a.D.setAuthConfig(n.Auth),a.D.setKeyValueStorage(t?.ssr?new i.e({sameSite:"lax"}):o.Fm),r.d.configure(n,{...t,Auth:{tokenProvider:a.D,credentialsProvider:$}});return}if(t){void 0!==t.ssr&&a.D.setKeyValueStorage(t.ssr?new i.e({sameSite:"lax"}):o.Fm),r.d.configure(n,{Auth:r.d.libraryOptions.Auth,...t});return}r.d.configure(n)},getConfig:()=>r.d.getConfig()}},86809:function(e,t,n){"use strict";/*! js-cookie v3.0.5 | MIT */function r(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}n.d(t,{Z:function(){return i}});var i=function e(t,n){function i(e,i,o){if("undefined"!=typeof document){"number"==typeof(o=r({},n,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in o)o[a]&&(s+="; "+a,!0!==o[a]&&(s+="="+o[a].split(";")[0]));return document.cookie=e+"="+t.write(i,e)+s}}return Object.create({set:i,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),s=o.slice(1).join("=");try{var a=decodeURIComponent(o[0]);if(r[a]=t.read(s,a),e===a)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){i(e,"",r({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,r({},this.attributes,t))},withConverter:function(t){return e(r({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}}]);
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.