/*! For license information please see main.82dc35f2.js.LICENSE.txt */ (()=>{var e={4228(e,t,n){"use strict";n.d(t,{I:()=>f});function r(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{l(r.next(e))}catch(t){a(t)}}function s(e){try{l(r.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,s)}l((r=r.apply(e,t||[])).next())})}function o(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"===typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]l)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===a&&(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%a>=56){for(var r=this.bufferLength;r>>24&255,o[4*r+1]=this.state[r]>>>16&255,o[4*r+2]=this.state[r]>>>8&255,o[4*r+3]=this.state[r]>>>0&255;return o},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],r=t[1],o=t[2],s=t[3],l=t[4],u=t[5],c=t[6],d=t[7],f=0;f>>17|p<<15)^(p>>>19|p<<13)^p>>>10,m=((p=this.temp[f-15])>>>7|p<<25)^(p>>>18|p<<14)^p>>>3;this.temp[f]=(h+this.temp[f-7]|0)+(m+this.temp[f-16]|0)}var v=(((l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))+(l&u^~l&c)|0)+(d+(i[f]+this.temp[f]|0)|0)|0,g=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&r^n&o^r&o)|0;d=c,c=u,u=l,l=s+v|0,s=o,o=r,r=n,n=v+g|0}t[0]+=n,t[1]+=r,t[2]+=o,t[3]+=s,t[4]+=l,t[5]+=u,t[6]+=c,t[7]+=d},e}();var c="undefined"!==typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function d(e){return e instanceof Uint8Array?e:"string"===typeof e?c(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}var f=function(){function e(e){this.secret=e,this.hash=new u,this.reset()}return e.prototype.update=function(e){var t;if(("string"===typeof(t=e)?0!==t.length:0!==t.byteLength)&&!this.error)try{this.hash.update(d(e))}catch(n){this.error=n}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return r(this,void 0,void 0,function(){return o(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new u,this.secret){this.outer=new u;var e=function(e){var t=d(e);if(t.byteLength>a){var n=new u;n.update(t),t=n.digest()}var r=new Uint8Array(a);return r.set(t),r}(this.secret),t=new Uint8Array(a);t.set(e);for(var n=0;nd)&&(a[l]=d,p.push(l,d),o[l]=s));if("undefined"!==typeof r&&"undefined"===typeof a[r]){var h=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(h)}return o},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,n,r){var o=t.single_source_shortest_paths(e,n,r);return t.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(e){var n,r=t.PriorityQueue,o={};for(n in e=e||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=e.sorter||r.default_sorter,o},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},5558(e){"use strict";e.exports=function(e){for(var t=[],n=e.length,r=0;r=55296&&o<=56319&&n>r+1){var a=e.charCodeAt(r+1);a>=56320&&a<=57343&&(o=1024*(o-55296)+a-56320+65536,r+=1)}o<128?t.push(o):o<2048?(t.push(o>>6|192),t.push(63&o|128)):o<55296||o>=57344&&o<65536?(t.push(o>>12|224),t.push(o>>6&63|128),t.push(63&o|128)):o>=65536&&o<=1114111?(t.push(o>>18|240),t.push(o>>12&63|128),t.push(o>>6&63|128),t.push(63&o|128)):t.push(239,191,189)}return new Uint8Array(t).buffer}},7685(e,t,n){var r=n(7937)(n(6552),"DataView");e.exports=r},8724(e,t,n){var r=n(7615),o=n(5051),a=n(2154),i=n(8734),s=n(2662);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(a--,i):void 0,s&&o(n[0],n[1],s)&&(i=a<3?void 0:i,a=1),t=Object(t);++rc))return!1;var f=l.get(e),p=l.get(t);if(f&&p)return f==t&&p==e;var h=-1,m=!0,v=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++h-1&&e%1==0&&e-1}},1714(e,t,n){var r=n(1340);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},7251(e,t,n){var r=n(8724),o=n(7160),a=n(5204);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},7159(e,t,n){var r=n(2622);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},438(e,t,n){var r=n(2622);e.exports=function(e){return r(this,e).get(e)}},9394(e,t,n){var r=n(2622);e.exports=function(e){return r(this,e).has(e)}},6874(e,t,n){var r=n(2622);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},4160(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},1310(e){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},8259(e,t,n){var r=n(5797);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},5575(e,t,n){var r=n(7937)(Object,"create");e.exports=r},1143(e,t,n){var r=n(3028)(Object.keys,Object);e.exports=r},3516(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},6832(e,t,n){e=n.nmd(e);var r=n(7105),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,s=function(){try{var e=a&&a.require&&a.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(t){}}();e.exports=s},6095(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},3028(e){e.exports=function(e,t){return function(n){return e(t(n))}}},5636(e,t,n){var r=n(1170),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var a=arguments,i=-1,s=o(a.length-t,0),l=Array(s);++i0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},4545(e,t,n){var r=n(7160);e.exports=function(){this.__data__=new r,this.size=0}},793(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7760(e){e.exports=function(e){return this.__data__.get(e)}},3892(e){e.exports=function(e){return this.__data__.has(e)}},6788(e,t,n){var r=n(7160),o=n(5204),a=n(4816);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},4079(e,t,n){var r=n(8259),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,i=r(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,function(e,n,r,o){t.push(r?o.replace(a,"$1"):n||e)}),t});e.exports=i},914(e,t,n){var r=n(9841);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},6996(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(n){}}return""}},1540(e){var t="\\ud800-\\udfff",n="\\u2700-\\u27bf",r="a-z\\xdf-\\xf6\\xf8-\\xff",o="A-Z\\xc0-\\xd6\\xd8-\\xde",a="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",i="["+a+"]",s="\\d+",l="["+n+"]",u="["+r+"]",c="[^"+t+a+s+n+r+o+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",p="["+o+"]",h="(?:"+u+"|"+c+")",m="(?:"+p+"|"+c+")",v="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",g="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",y="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",b="[\\ufe0e\\ufe0f]?",E=b+y+("(?:\\u200d(?:"+["[^"+t+"]",d,f].join("|")+")"+b+y+")*"),S="(?:"+[l,d,f].join("|")+")"+E,C=RegExp([p+"?"+u+"+"+v+"(?="+[i,p,"$"].join("|")+")",m+"+"+g+"(?="+[i,p+h,"$"].join("|")+")",p+"?"+h+"+"+v,p+"+"+g,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",s,S].join("|"),"g");e.exports=function(e){return e.match(C)||[]}},2541(e){e.exports=function(e){return function(){return e}}},4971(e,t,n){var r=n(3086),o=n(1069),a=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=o(e))&&e.replace(a,r).replace(i,"")}},3211(e){e.exports=function(e,t){return e===t||e!==e&&t!==t}},3097(e,t,n){var r=n(2969);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},3366(e,t,n){var r=n(7894),o=n(9057);e.exports=function(e,t){return null!=e&&o(e,t,r)}},3279(e){e.exports=function(e){return e}},2777(e,t,n){var r=n(5193),o=n(2761),a=Object.prototype,i=a.hasOwnProperty,s=a.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},4052(e){var t=Array.isArray;e.exports=t},6571(e,t,n){var r=n(1629),o=n(6173);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},6272(e,t,n){var r=n(6571),o=n(2761);e.exports=function(e){return o(e)&&r(e)}},4543(e,t,n){e=n.nmd(e);var r=n(6552),o=n(14),a=t&&!t.nodeType&&t,i=a&&e&&!e.nodeType&&e,s=i&&i.exports===a?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||o;e.exports=l},1629(e,t,n){var r=n(6913),o=n(6686);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},6173(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},6686(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},2761(e){e.exports=function(e){return null!=e&&"object"==typeof e}},2322(e,t,n){var r=n(6913),o=n(5990),a=n(2761),i=Function.prototype,s=Object.prototype,l=i.toString,u=s.hasOwnProperty,c=l.call(Object);e.exports=function(e){if(!a(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==c}},9841(e,t,n){var r=n(6913),o=n(2761);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},1268(e,t,n){var r=n(5428),o=n(7574),a=n(6832),i=a&&a.isTypedArray,s=i?o(i):r;e.exports=s},940(e,t,n){var r=n(6882)(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()});e.exports=r},8673(e,t,n){var r=n(3204),o=n(3713),a=n(6571);e.exports=function(e){return a(e)?r(e):o(e)}},474(e,t,n){var r=n(3204),o=n(8122),a=n(6571);e.exports=function(e){return a(e)?r(e,!0):o(e)}},5797(e,t,n){var r=n(4816);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},4677(e,t,n){var r=n(3253),o=n(4570)(function(e,t,n){r(e,t,n)});e.exports=o},7273(e,t,n){var r=n(149),o=n(9096),a=n(7449),i=n(8592);e.exports=function(e,t){if(null==e)return{};var n=r(i(e),function(e){return[e]});return t=o(t),a(e,n,function(e,n){return t(e,n[0])})}},3932(e,t,n){var r=n(396),o=n(2866),a=n(2597),i=n(914);e.exports=function(e){return a(e)?r(i(e)):o(e)}},7828(e){e.exports=function(){return[]}},14(e){e.exports=function(){return!1}},1609(e,t,n){var r=n(6614),o=n(474);e.exports=function(e){return r(e,o(e))}},1069(e,t,n){var r=n(8541);e.exports=function(e){return null==e?"":r(e)}},7676(e,t,n){var r=n(9648),o=n(5967),a=n(1069),i=n(1540);e.exports=function(e,t,n){return e=a(e),void 0===(t=n?void 0:t)?o(e)?i(e):r(e):e.match(t)||[]}},8970(e,t,n){const r=n(6116),o=n(4772),a=n(2182),i=n(5487);function s(e,t,n,a,i){const s=[].slice.call(arguments,1),l=s.length,u="function"===typeof s[l-1];if(!u&&!r())throw new Error("Callback required as last argument");if(!u){if(l<1)throw new Error("Too few arguments provided");return 1===l?(n=t,t=a=void 0):2!==l||t.getContext||(a=n,n=t,t=void 0),new Promise(function(r,i){try{const i=o.create(n,a);r(e(i,t,a))}catch(s){i(s)}})}if(l<2)throw new Error("Too few arguments provided");2===l?(i=n,n=t,t=a=void 0):3===l&&(t.getContext&&"undefined"===typeof i?(i=a,a=void 0):(i=a,a=n,n=t,t=void 0));try{const r=o.create(n,a);i(null,e(r,t,a))}catch(c){i(c)}}t.create=o.create,t.toCanvas=s.bind(null,a.render),t.toDataURL=s.bind(null,a.renderToDataURL),t.toString=s.bind(null,function(e,t,n){return i.render(e,n)})},6116(e){e.exports=function(){return"function"===typeof Promise&&Promise.prototype&&Promise.prototype.then}},9382(e,t,n){const r=n(7969).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,n=r(e),o=145===n?26:2*Math.ceil((n-13)/(2*t-2)),a=[n-7];for(let r=1;r>>7-e%8&1)},put:function(e,t){for(let n=0;n>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},4661(e){function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,n,r){const o=e*this.size+t;this.data[o]=n,r&&(this.reservedBit[o]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},8697(e,t,n){const r=n(5558),o=n(7421);function a(e){this.mode=o.BYTE,this.data=new Uint8Array(r(e))}a.getBitsLength=function(e){return 8*e},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(e){for(let t=0,n=this.data.length;t=0&&e.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!==typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(r){return n}}},9021(e,t,n){const r=n(7969).getSymbolSize;t.getPositions=function(e){const t=r(e);return[[0,0],[t-7,0],[0,t-7]]}},350(e,t,n){const r=n(7969),o=r.getBCHDigit(1335);t.getEncodedBits=function(e,t){const n=e.bit<<3|t;let a=n<<10;for(;r.getBCHDigit(a)-o>=0;)a^=1335<=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),e.put(n,13)}},e.exports=a},4833(e,t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const n=3,r=3,o=40,a=10;function i(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2===0;case t.Patterns.PATTERN001:return n%2===0;case t.Patterns.PATTERN010:return r%3===0;case t.Patterns.PATTERN011:return(n+r)%3===0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2===0;case t.Patterns.PATTERN101:return n*r%2+n*r%3===0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2===0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const t=e.size;let r=0,o=0,a=0,i=null,s=null;for(let l=0;l=5&&(r+=n+(o-5)),i=t,o=1),t=e.get(u,l),t===s?a++:(a>=5&&(r+=n+(a-5)),s=t,a=1)}o>=5&&(r+=n+(o-5)),a>=5&&(r+=n+(a-5))}return r},t.getPenaltyN2=function(e){const t=e.size;let n=0;for(let r=0;r=10&&(1488===r||93===r)&&n++,a=a<<1&2047|e.get(i,o),i>=10&&(1488===a||93===a)&&n++}return n*o},t.getPenaltyN4=function(e){let t=0;const n=e.data.length;for(let r=0;r=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return o.testNumeric(e)?t.NUMERIC:o.testAlphanumeric(e)?t.ALPHANUMERIC:o.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!==typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(r){return n}}},900(e,t,n){const r=n(7421);function o(e){this.mode=r.NUMERIC,this.data=e.toString()}o.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);const o=this.data.length-t;o>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,3*o+1))},e.exports=o},1312(e,t,n){const r=n(1166);t.mul=function(e,t){const n=new Uint8Array(e.length+t.length-1);for(let o=0;o=0;){const e=n[0];for(let a=0;a>a&1),a<6?e.set(a,8,i,!0):a<8?e.set(a+1,8,i,!0):e.set(r-15+a,8,i,!0),a<8?e.set(8,r-a-1,i,!0):a<9?e.set(8,15-a-1+1,i,!0):e.set(8,15-a-1,i,!0);e.set(r-8,8,1,!0)}function g(e,t,n){const o=new a;n.forEach(function(t){o.put(t.mode.bit,4),o.put(t.getLength(),h.getCharCountIndicator(t.mode,e)),t.write(o)});const i=8*(r.getSymbolTotalCodewords(e)-c.getTotalCodewordsCount(e,t));for(o.getLengthInBits()+4<=i&&o.put(0,4);o.getLengthInBits()%8!==0;)o.putBit(0);const s=(i-o.getLengthInBits())/8;for(let r=0;r=0&&r<=6&&(0===o||6===o)||o>=0&&o<=6&&(0===r||6===r)||r>=2&&r<=4&&o>=2&&o<=4?e.set(t+r,a+o,!0,!0):e.set(t+r,a+o,!1,!0))}}(h,t),function(e){const t=e.size;for(let n=8;n=7&&function(e,t){const n=e.size,r=f.getEncodedBits(t);let o,a,i;for(let s=0;s<18;s++)o=Math.floor(s/3),a=s%3+n-8-3,i=1===(r>>s&1),e.set(o,a,i,!0),e.set(a,o,i,!0)}(h,t),function(e,t){const n=e.size;let r=-1,o=n-1,a=7,i=0;for(let s=n-1;s>0;s-=2)for(6===s&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(o,s-n)){let r=!1;i>>a&1)),e.set(o,s-n,r),a--,-1===a&&(i++,a=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(h,d),isNaN(o)&&(o=u.getBestMask(h,v.bind(null,h,n))),u.applyMask(o,h),v(h,n,o),{modules:h,version:t,errorCorrectionLevel:n,maskPattern:o,segments:a}}t.create=function(e,t){if("undefined"===typeof e||""===e)throw new Error("No input text");let n,a,i=o.M;return"undefined"!==typeof t&&(i=o.from(t.errorCorrectionLevel,o.M),n=f.from(t.version),a=u.from(t.maskPattern),t.toSJISFunc&&r.setToSJISFunction(t.toSJISFunc)),y(e,n,i,a)}},8177(e,t,n){const r=n(1312);function o(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(e){this.degree=e,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const n=r.mod(t,this.genPoly),o=this.degree-n.length;if(o>0){const e=new Uint8Array(this.degree);return e.set(n,o),e}return n},e.exports=o},8511(e,t){const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";t.KANJI=new RegExp(r,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(o,"g"),t.NUMERIC=new RegExp(n,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const a=new RegExp("^"+r+"$"),i=new RegExp("^"+n+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return a.test(e)},t.testNumeric=function(e){return i.test(e)},t.testAlphanumeric=function(e){return s.test(e)}},4004(e,t,n){const r=n(7421),o=n(900),a=n(9642),i=n(8697),s=n(5200),l=n(8511),u=n(7969),c=n(7347);function d(e){return unescape(encodeURIComponent(e)).length}function f(e,t,n){const r=[];let o;for(;null!==(o=e.exec(n));)r.push({data:o[0],index:o.index,mode:t,length:o[0].length});return r}function p(e){const t=f(l.NUMERIC,r.NUMERIC,e),n=f(l.ALPHANUMERIC,r.ALPHANUMERIC,e);let o,a;u.isKanjiModeEnabled()?(o=f(l.BYTE,r.BYTE,e),a=f(l.KANJI,r.KANJI,e)):(o=f(l.BYTE_KANJI,r.BYTE,e),a=[]);return t.concat(n,o,a).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function h(e,t){switch(t){case r.NUMERIC:return o.getBitsLength(e);case r.ALPHANUMERIC:return a.getBitsLength(e);case r.KANJI:return s.getBitsLength(e);case r.BYTE:return i.getBitsLength(e)}}function m(e,t){let n;const l=r.getBestModeForData(e);if(n=r.from(t,l),n!==r.BYTE&&n.bit=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}(s))},t.rawSplit=function(e){return t.fromArray(p(e,u.isKanjiModeEnabled()))}},7969(e,t){let n;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return r[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!==typeof e)throw new Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return"undefined"!==typeof n},t.toSJIS=function(e){return n(e)}},3257(e,t){t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},4980(e,t,n){const r=n(7969),o=n(1805),a=n(3891),i=n(7421),s=n(3257),l=r.getBCHDigit(7973);function u(e,t){return i.getCharCountIndicator(e,t)+4}function c(e,t){let n=0;return e.forEach(function(e){const r=u(e.mode,t);n+=r+e.getBitsLength()}),n}t.from=function(e,t){return s.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,n){if(!s.isValid(e))throw new Error("Invalid QR Code version");"undefined"===typeof n&&(n=i.BYTE);const a=8*(r.getSymbolTotalCodewords(e)-o.getTotalCodewordsCount(e,t));if(n===i.MIXED)return a;const l=a-u(n,e);switch(n){case i.NUMERIC:return Math.floor(l/10*3);case i.ALPHANUMERIC:return Math.floor(l/11*2);case i.KANJI:return Math.floor(l/13);case i.BYTE:default:return Math.floor(l/8)}},t.getBestVersionForData=function(e,n){let r;const o=a.from(n,a.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let r=1;r<=40;r++)if(c(e,r)<=t.getCapacity(r,n,i.MIXED))return r}(e,o);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,n,r){for(let o=1;o<=40;o++)if(n<=t.getCapacity(o,r,e))return o}(r.mode,r.getLength(),o)},t.getEncodedBits=function(e){if(!s.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;r.getBCHDigit(t)-l>=0;)t^=7973<':"",d="0&&u>0&&e[l-1]||(r+=i?a("M",u+n,.5+c+n):a("m",o,0),o=0,i=!1),u+1',f='viewBox="0 0 '+u+" "+u+'"',p=''+c+d+"\n";return"function"===typeof n&&n(null,p),p}},8293(e,t){function n(e){if("number"===typeof e&&(e=e.toString()),"string"!==typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");const n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});const t="undefined"===typeof e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,o=e.scale||4;return{width:r,scale:r?4:o,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){const r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){const o=n.modules.size,a=n.modules.data,i=t.getScale(o,r),s=Math.floor((o+2*r.margin)*i),l=r.margin*i,u=[r.color.light,r.color.dark];for(let t=0;t=l&&n>=l&&tp});var r=n(2600),o=n(3),a=n(3740),i=(n(4228),n(7266)),s=n(6016),l=n(9715),u=n(9931),c=n(8447),d=n(5264),f=n(6093);async function p(e){let{username:t,password:n,clientMetadata:p,config:h,tokenOrchestrator:m,authFlow:v,preferredChallenge:g}=e;const{userPoolId:y,userPoolClientId:b,userPoolEndpoint:E}=h,S=y?.split("_")[1]||"",C=await(0,a.H)(S),w={USERNAME:t,SRP_A:C.A.toString(16)};"USER_AUTH"===v&&g&&(w.PREFERRED_CHALLENGE=g);const x={AuthFlow:v,AuthParameters:w,ClientMetadata:p,ClientId:b,UserContextData:(0,o.d)({username:t,userPoolId:y,userPoolClientId:b})},k=(0,i.R)({endpointResolver:(0,s.o)({endpointOverride:E})}),_=await k({region:(0,l.J)(y),userAgentValue:(0,u.A)(r.BM.SignIn)},x),{ChallengeParameters:I,Session:A}=_,P=I?.USERNAME??t;return(0,f.d)(P),"PASSWORD_VERIFIER"===_.ChallengeName?(0,d.i)(c.f,[n,I,p,A,C,h,m],P,m):_}},9707(e,t,n){"use strict";var r=n(4464),o=n(6814);n.d(t,["n",0,e=>{if(e instanceof Error){if("AbortError"===e.name){const{message:t,recoverySuggestion:n}=o.VX[o.Au.PasskeyOperationAborted];return new o.pX({name:o.Au.PasskeyOperationAborted,message:t,recoverySuggestion:n,underlyingError:e})}if("SecurityError"===e.name){const{message:t,recoverySuggestion:n}=o.VX[o.Au.RelyingPartyMismatch];return new o.pX({name:o.Au.RelyingPartyMismatch,message:t,recoverySuggestion:n,underlyingError:e})}}return new o.pX({name:r.m.Unknown,message:"An unknown error has occurred.",underlyingError:e})}])},6814(e,t,n){"use strict";n.d(t,{pX:()=>i,Au:()=>s,xk:()=>d,VX:()=>c});var r=n(1439),o=n(8895);const a="Passkeys may not be supported on this device. Ensure your application is running in a secure context (HTTPS) and Web Authentication API is supported.";class i extends r.x{constructor(e){super(e),this.constructor=i,Object.setPrototypeOf(this,i.prototype)}}var s;!function(e){e.PasskeyNotSupported="PasskeyNotSupported",e.PasskeyAlreadyExists="PasskeyAlreadyExists",e.InvalidPasskeyRegistrationOptions="InvalidPasskeyRegistrationOptions",e.InvalidPasskeyAuthenticationOptions="InvalidPasskeyAuthenticationOptions",e.RelyingPartyMismatch="RelyingPartyMismatch",e.PasskeyRegistrationFailed="PasskeyRegistrationFailed",e.PasskeyRetrievalFailed="PasskeyRetrievalFailed",e.PasskeyRegistrationCanceled="PasskeyRegistrationCanceled",e.PasskeyAuthenticationCanceled="PasskeyAuthenticationCanceled",e.PasskeyOperationAborted="PasskeyOperationAborted"}(s||(s={}));const l="User may have canceled the ceremony or another interruption has occurred. Check underlying error for details.",u="Ensure your user pool is configured to support the WEB_AUTHN as an authentication factor.",c={[s.PasskeyNotSupported]:{message:"Passkeys may not be supported on this device.",recoverySuggestion:a},[s.InvalidPasskeyRegistrationOptions]:{message:"Invalid passkey registration options.",recoverySuggestion:u},[s.InvalidPasskeyAuthenticationOptions]:{message:"Invalid passkey authentication options.",recoverySuggestion:u},[s.PasskeyRegistrationFailed]:{message:"Device failed to create passkey.",recoverySuggestion:a},[s.PasskeyRetrievalFailed]:{message:"Device failed to retrieve passkey.",recoverySuggestion:"Passkeys may not be available on this device. Try an alternative authentication factor like PASSWORD, EMAIL_OTP, or SMS_OTP."},[s.PasskeyAlreadyExists]:{message:"Passkey already exists in authenticator.",recoverySuggestion:"Proceed with existing passkey or try again after deleting the credential."},[s.PasskeyRegistrationCanceled]:{message:"Passkey registration ceremony has been canceled.",recoverySuggestion:l},[s.PasskeyAuthenticationCanceled]:{message:"Passkey authentication ceremony has been canceled.",recoverySuggestion:l},[s.PasskeyOperationAborted]:{message:"Passkey operation has been aborted.",recoverySuggestion:l},[s.RelyingPartyMismatch]:{message:"Relying party does not match current domain.",recoverySuggestion:"Ensure relying party identifier matches current domain."}},d=(0,o.p)(c,i)},7645(e,t,n){"use strict";var r=n(4163);n.d(t,["H",0,()=>(0,r.B)()&&window.isSecureContext&&"credentials"in navigator&&"function"===typeof window.PublicKeyCredential])},9672(e,t,n){"use strict";n.d(t,{At:()=>s,ZA:()=>u,Uv:()=>c,KN:()=>l});var r=n(676);const o=e=>r.Y.convert(new Uint8Array(e),{urlSafe:!0,skipPadding:!0});var a=n(846);const i=e=>Uint8Array.from(a.m.convert(e,{urlSafe:!0}),e=>e.charCodeAt(0)).buffer,s=e=>{const t=i(e.user.id),n=i(e.challenge),r=(e.excludeCredentials||[]).map(e=>({...e,id:i(e.id)}));return{...e,excludeCredentials:r,challenge:n,user:{...e.user,id:t}}},l=e=>{const t={clientDataJSON:o(e.response.clientDataJSON),attestationObject:o(e.response.attestationObject),transports:e.response.getTransports(),publicKeyAlgorithm:e.response.getPublicKeyAlgorithm(),authenticatorData:o(e.response.getAuthenticatorData())},n=e.response.getPublicKey();n&&(t.publicKey=o(n));const r={type:e.type,id:e.id,rawId:o(e.rawId),clientExtensionResults:e.getClientExtensionResults(),response:t};return e.authenticatorAttachment&&(r.authenticatorAttachment=e.authenticatorAttachment),r},u=e=>{const t=i(e.challenge),n=(e.allowCredentials||[]).map(e=>({...e,id:i(e.id)}));return{...e,challenge:t,allowCredentials:n}},c=e=>{const t={clientDataJSON:o(e.response.clientDataJSON),authenticatorData:o(e.response.authenticatorData),signature:o(e.response.signature)};e.response.userHandle&&(t.userHandle=o(e.response.userHandle));const n={id:e.id,rawId:o(e.rawId),type:e.type,clientExtensionResults:e.getClientExtensionResults(),response:t};return e.authenticatorAttachment&&(n.authenticatorAttachment=e.authenticatorAttachment),n}},1649(e,t,n){"use strict";n.d(t,{Y:()=>o,u:()=>a});var r=n(6814);function o(e){(0,r.xk)(e&&e instanceof PublicKeyCredential&&e.response instanceof AuthenticatorAttestationResponse,r.Au.PasskeyRegistrationFailed)}function a(e){(0,r.xk)(e&&e instanceof PublicKeyCredential&&e.response instanceof AuthenticatorAssertionResponse,r.Au.PasskeyRetrievalFailed)}},3761(e,t,n){"use strict";n.d(t,{wr:()=>c});var r=n(8937);const o="CognitoSignInState",a={username:`${o}.username`,challengeName:`${o}.challengeName`,signInSession:`${o}.signInSession`,expiry:`${o}.expiry`},i=()=>{for(const e of Object.values(a))r.pR.removeItem(e)},s=()=>({username:void 0,challengeName:void 0,signInSession:void 0}),l=()=>{const e=r.pR.getItem(a.expiry);if(!e||Number(e)<=Date.now())return i(),s();return{username:r.pR.getItem(a.username)??void 0,challengeName:r.pR.getItem(a.challengeName)??void 0,signInSession:r.pR.getItem(a.signInSession)??void 0}},u=(e=>{let t=e(s(),{type:"SET_INITIAL_STATE"});return{getState:()=>t,dispatch:n=>{t=e(t,n)}}})((e,t)=>{switch(t.type){case"SET_SIGN_IN_SESSION":return d({signInSession:t.value}),{...e,signInSession:t.value};case"SET_SIGN_IN_STATE":return d(t.value),{...t.value};case"SET_CHALLENGE_NAME":return d({challengeName:t.value}),{...e,challengeName:t.value};case"SET_USERNAME":return d({username:t.value}),{...e,username:t.value};case"SET_INITIAL_STATE":return l();case"RESET_STATE":return i(),s();default:return e}});function c(e){u.dispatch({type:"SET_SIGN_IN_STATE",value:e})}const d=e=>{let{challengeName:t,signInSession:n,username:o}=e;o&&r.pR.setItem(a.username,o),t&&r.pR.setItem(a.challengeName,t),n&&(r.pR.setItem(a.signInSession,n),r.pR.setItem(a.expiry,String(Date.now()+18e4)))};n.d(t,["c$",0,u,"jN",0,()=>{u.dispatch({type:"RESET_STATE"})}])},2200(e,t,n){"use strict";n.d(t,{fs:()=>a,nC:()=>i});var r=n(5119);const o={[r.P.EmptyChallengeResponse]:{message:"challengeResponse is required to confirmSignIn"},[r.P.EmptyConfirmResetPasswordUsername]:{message:"username is required to confirmResetPassword"},[r.P.EmptyConfirmSignUpCode]:{message:"code is required to confirmSignUp"},[r.P.EmptyConfirmSignUpUsername]:{message:"username is required to confirmSignUp"},[r.P.EmptyConfirmResetPasswordConfirmationCode]:{message:"confirmationCode is required to confirmResetPassword"},[r.P.EmptyConfirmResetPasswordNewPassword]:{message:"newPassword is required to confirmResetPassword"},[r.P.EmptyResendSignUpCodeUsername]:{message:"username is required to confirmSignUp"},[r.P.EmptyResetPasswordUsername]:{message:"username is required to resetPassword"},[r.P.EmptySignInPassword]:{message:"password is required to signIn"},[r.P.EmptySignInUsername]:{message:"username is required to signIn"},[r.P.EmptySignUpPassword]:{message:"password is required to signUp"},[r.P.EmptySignUpUsername]:{message:"username is required to signUp"},[r.P.CustomAuthSignInPassword]:{message:"A password is not needed when signing in with CUSTOM_WITHOUT_SRP",recoverySuggestion:"Do not include a password in your signIn call."},[r.P.IncorrectMFAMethod]:{message:"Incorrect MFA method was chosen. It should be either SMS, TOTP, or EMAIL",recoverySuggestion:"Try to pass SMS, TOTP, or EMAIL as the challengeResponse"},[r.P.EmptyVerifyTOTPSetupCode]:{message:"code is required to verifyTotpSetup"},[r.P.EmptyUpdatePassword]:{message:"oldPassword and newPassword are required to changePassword"},[r.P.EmptyConfirmUserAttributeCode]:{message:"confirmation code is required to confirmUserAttribute"},[r.P.InvalidPreferredChallenge]:{message:"The preferred challenge is not enabled in your backend configuration",recoverySuggestion:"Ensure the authentication method is enabled in your Amplify backend configuration"}};var a,i;!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",e.OAUTH_ERROR="Couldn't finish OAuth flow, check your User Pool HostedUI settings"}(a||(a={})),function(e){e.SignInException="SignInException",e.OAuthSignInError="OAuthSignInException"}(i||(i={})),n.d(t,["ut",0,o])},2096(e,t,n){"use strict";n.d(t,{l:()=>o});var r=n(1439);class o extends r.x{constructor(e){super(e),this.constructor=o,Object.setPrototypeOf(this,o.prototype)}}},7387(e,t,n){"use strict";var r=n(2096);const o=new r.l({name:"InvalidRedirectException",message:"signInRedirect or signOutRedirect had an invalid format or was not found.",recoverySuggestion:"Please make sure the signIn/Out redirect in your oauth config is valid."}),a=(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."}),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."})),i=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."});n.d(t,["$6",0,i,"A0",0,"AutoSignInException","Cs",0,"TokenRefreshException","RW",0,o,"jK",0,a,"kM",0,"DeviceMetadataNotFoundException","mh",0,"OAuthSignOutException","yA",0,"UnexpectedSignInInterruptionException","z0",0,"UserAlreadyAuthenticatedException","zz",0,"UserUnAuthenticatedException"])},5119(e,t,n){"use strict";var r;n.d(t,{P:()=>r}),function(e){e.EmptySignInUsername="EmptySignInUsername",e.EmptySignInPassword="EmptySignInPassword",e.CustomAuthSignInPassword="CustomAuthSignInPassword",e.EmptySignUpUsername="EmptySignUpUsername",e.EmptySignUpPassword="EmptySignUpPassword",e.EmptyConfirmSignUpUsername="EmptyConfirmSignUpUsername",e.EmptyConfirmSignUpCode="EmptyConfirmSignUpCode",e.EmptyResendSignUpCodeUsername="EmptyresendSignUpCodeUsername",e.EmptyChallengeResponse="EmptyChallengeResponse",e.EmptyConfirmResetPasswordUsername="EmptyConfirmResetPasswordUsername",e.EmptyConfirmResetPasswordNewPassword="EmptyConfirmResetPasswordNewPassword",e.EmptyConfirmResetPasswordConfirmationCode="EmptyConfirmResetPasswordConfirmationCode",e.EmptyResetPasswordUsername="EmptyResetPasswordUsername",e.EmptyVerifyTOTPSetupCode="EmptyVerifyTOTPSetupCode",e.EmptyConfirmUserAttributeCode="EmptyConfirmUserAttributeCode",e.IncorrectMFAMethod="IncorrectMFAMethod",e.EmptyUpdatePassword="EmptyUpdatePassword",e.InvalidPreferredChallenge="InvalidPreferredChallenge"}(r||(r={}))},9109(e,t,n){"use strict";n.d(t,{e:()=>a});var r=n(4464),o=n(2096);function a(e){if(!e||"Error"===e.name||e instanceof TypeError)throw new o.l({name:r.m.Unknown,message:"An unknown error has occurred.",underlyingError:e})}},2013(e,t,n){"use strict";n.d(t,{M:()=>a});var r=n(2200),o=n(2096);function a(e,t){const{message:n,recoverySuggestion:a}=r.ut[t];if(!e)throw new o.l({name:t,message:n,recoverySuggestion:a})}},9169(e,t,n){"use strict";n.d(t,["M",0,"cognito-idp"])},7675(e,t,n){"use strict";var r=n(9209),o=n(5122),a=n(1068),i=n(5560);const s={service:n(9169).M,retryDecider:(0,o.D)(a.F),computeDelay:r.y,get userAgentValue(){return(0,i.fE)()},cache:"no-store"};n.d(t,["C",0,s])},7266(e,t,n){"use strict";var r=n(7161),o=n(5215),a=n(2190),i=n(8016),s=n(7675);n.d(t,["R",0,e=>(0,r.A)(i.e,(0,o._)("InitiateAuth"),(0,a.T)(),{...s.C,...e})])},2604(e,t,n){"use strict";var r=n(7161),o=n(8016),a=n(5215),i=n(2190),s=n(7675);n.d(t,["H",0,e=>(0,r.A)(o.e,(0,a._)("RespondToAuthChallenge"),(0,i.T)(),{...s.C,...e})])},8016(e,t,n){"use strict";var r=n(3413),o=n(5909),a=n(6129);const i=(0,o.q)(a.F,[()=>(e,t)=>async function(t){return t.headers={...t.headers,"cache-control":"no-store",...await(r.H.libraryOptions?.Auth?.headers?.())},e(t)}]);n.d(t,["e",0,i])},2190(e,t,n){"use strict";var r=n(1068),o=n(9109),a=n(2096);n.d(t,["T",0,()=>async e=>{if(e.statusCode>=300){const t=await(0,r.F)(e);throw(0,o.e)(t),new a.l({name:t.name,message:t.message,metadata:t.$metadata})}return(0,r.Y)(e)}])},5215(e,t,n){"use strict";const r=e=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${e}`}),o=(e,t,n)=>{let{url:r}=e;return{headers:t,url:r,body:n,method:"POST"}};n.d(t,["_",0,e=>(t,n)=>{const a=r(e),i=JSON.stringify(t);return o(n,a,i)}])},9715(e,t,n){"use strict";n.d(t,{C:()=>a,J:()=>o});var r=n(2096);function o(e){const t=e?.split("_")[0];if(!e||e.indexOf("_")<0||!t||"string"!==typeof t)throw new r.l({name:"InvalidUserPoolId",message:"Invalid user pool id provided."});return t}function a(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]}},1580(e,t,n){"use strict";n.d(t,{H:()=>i});var r=n(3413),o=n(2770),a=n(2242);const i=async()=>(async e=>{const t=e.getConfig().Auth?.Cognito;(0,o.$y)(t);const n=await e.Auth.getTokens({forceRefresh:!1});(0,a.H0)(n);const{"cognito:username":r,sub:i}=n.idToken?.payload??{},s={username:r,userId:i},l=function(e){return e?.signInDetails}(n);return l&&(s.signInDetails=l),s})(r.H)},7841(e,t,n){"use strict";n.d(t,{$:()=>H});var r=n(3413),o=n(2770);var a=n(4163),i=n(2600),s=n(4492),l=n(9931),u=n(2311),c=n(727),d=n(2206);var f=n(8173),p=n(6998),h=n(155),m=n(851),v=n(3643),g=n(4619),y=n(2200);new g.C("AuthError");Error;const b={oauthSignInError:{message:y.fs.OAUTH_ERROR,log:"Make sure Cognito Hosted UI has been configured correctly"},noConfig:{message:y.fs.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\t\t\t\tRefer to our docs site for help upgrading Amplify packages (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js)\n "},missingAuthConfig:{message:y.fs.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:y.fs.EMPTY_USERNAME},invalidUsername:{message:y.fs.INVALID_USERNAME},emptyPassword:{message:y.fs.EMPTY_PASSWORD},emptyCode:{message:y.fs.EMPTY_CODE},signUpError:{message:y.fs.SIGN_UP_ERROR,log:"The first parameter should either be non-null string or object"},noMFA:{message:y.fs.NO_MFA},invalidMFA:{message:y.fs.INVALID_MFA},emptyChallengeResponse:{message:y.fs.EMPTY_CHALLENGE},noUserSession:{message:y.fs.NO_USER_SESSION},deviceConfig:{message:y.fs.DEVICE_CONFIG},networkError:{message:y.fs.NETWORK_ERROR},autoSignInError:{message:y.fs.AUTOSIGNIN_ERROR},default:{message:y.fs.DEFAULT_MSG}};var E=n(2096);const S=(e,t)=>new E.l({message:e??"An error has occurred during the oauth process.",name:y.nC.OAuthSignInError,recoverySuggestion:t??b.oauthSignInError.log});var C;!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",e.OAuthSignInError="oauthSignInError"}(C||(C={}));const w=async e=>{const t=await u.f.loadOAuthState(),n=e===t?t:void 0;if(!n)throw new E.l({name:C.OAuthSignInError,message:null===e?"`signInWithRedirect` has been canceled.":"An error occurred while validating the state.",recoverySuggestion:null===e?void 0:"Try to initiate an OAuth flow from Amplify"});return n},x=async e=>{let{currentUrl:t,userAgentValue:n,clientId:r,redirectUri:o,responseType:a,domain:i,preferPrivateSession:s}=e;const l=new c.o(t),u=l.searchParams.get("error"),d=l.searchParams.get("error_description");if(u)throw S(d??u);return"code"===a?k({currentUrl:t,userAgentValue:n,clientId:r,redirectUri:o,domain:i,preferPrivateSession:s}):_({currentUrl:t,redirectUri:o,preferPrivateSession:s})},k=async e=>{let{currentUrl:t,userAgentValue:n,clientId:r,redirectUri:a,domain:i,preferPrivateSession:s}=e;const l=new c.o(t),f=l.searchParams.get("code"),h=l.searchParams.get("state");if(!f||!h)throw S("User cancelled OAuth flow.");const m=await w(h),v="https://"+i+"/oauth2/token",g=await u.f.loadPKCE(),y={grant_type:"authorization_code",code:f,client_id:r,redirect_uri:a,...g?{code_verifier:g}:{}},b=Object.entries(y).map(e=>{let[t,n]=e;return`${encodeURIComponent(t)}=${encodeURIComponent(n)}`}).join("&"),{access_token:E,refresh_token:C,id_token:x,error:k,error_message:_,token_type:A,expires_in:P}=await(await fetch(v,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",[d.YJ]:n},body:b})).json();if(k)throw S(_??k);const T=(E&&(0,o.Cq)(E).payload.username)??"username";return await(0,p.i)({username:T,AccessToken:E,IdToken:x,RefreshToken:C}),I({redirectUri:a,state:m,preferPrivateSession:s})},_=async e=>{let{currentUrl:t,redirectUri:n,preferPrivateSession:r}=e;const a=new c.o(t),{id_token:i,access_token:s,state:l,token_type:u,expires_in:d,error_description:f,error:h}=(a.hash??"#").substring(1).split("&").map(e=>e.split("=")).reduce((e,t)=>{let[n,r]=t;return{...e,[n]:r}},{id_token:void 0,access_token:void 0,state:void 0,token_type:void 0,expires_in:void 0,error_description:void 0,error:void 0});if(h)throw S(f??h);if(!s)throw S("No access token returned from OAuth flow.");const m=await w(l),v=(s&&(0,o.Cq)(s).payload.username)??"username";return await(0,p.i)({username:v,AccessToken:s,IdToken:i}),I({redirectUri:n,state:m,preferPrivateSession:r})},I=async e=>{let{redirectUri:t,state:n,preferPrivateSession:r}=e;var o;await v.o.setOAuthMetadata({oauthSignIn:!0}),await u.f.clearOAuthData(),await u.f.storeOAuthSignIn(!0,r),(0,m.i)(),T(t),A(n)&&f.YZ.dispatch("auth",{event:"customOAuthState",data:(o=P(n),(o.match(/.{2}/g)||[]).map(e=>String.fromCharCode(parseInt(e,16))).join(""))},"Auth",f.U9),f.YZ.dispatch("auth",{event:"signInWithRedirect"},"Auth",f.U9),await(0,h.Q)()},A=e=>/-/.test(e),P=e=>e.split("-").splice(1).join("-"),T=e=>{"undefined"!==typeof window&&"undefined"!==typeof window.history&&window.history.replaceState(window.history.state,"",e)};var N=n(4872);const R=async e=>{(0,m.i)(),await u.f.clearOAuthInflightData(),f.YZ.dispatch("auth",{event:"signInWithRedirect_failure",data:{error:e}},"Auth",f.U9)},O=async e=>{try{(0,o.$y)(e),(0,o.G6)(e),u.f.setAuthConfig(e)}catch(t){return}if(await u.f.loadOAuthInFlight())try{const t=window.location.href,{loginWith:n,userPoolClientId:r}=e,{domain:o,redirectSignIn:a,responseType:s}=n.oauth,u=(0,N.M)(a);await x({currentUrl:t,clientId:r,domain:o,redirectUri:u,responseType:s,userAgentValue:(0,l.A)(i.BM.SignInWithRedirect)})}catch(n){await R(n)}};(0,a.B)()&&r.H[s.$](O);const M={Google:"Google",Facebook:"Facebook",Amazon:"LoginWithAmazon",Apple:"SignInWithApple"};var U=n(1384),D=n(8085),F=n(4228),L=n(7886),z=n(676);const W="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",j=e=>{const t=new Uint8Array(e);(0,L.MY)().getRandomValues(t);let n,r="";for(const o of t)r+=W.charAt(o%62);return{value:r,method:"S256",toCodeChallenge:()=>n||(n=function(e){const t=new F.I;t.update(e);const n=(r=z.Y.convert(t.digestSync(),{urlSafe:!0}),r.replace(/=/g,""));var r;return n}(r),n)}};const B=()=>(e=>{const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[],r=new Uint8Array(e);(0,L.MY)().getRandomValues(r);for(const o of r)n.push(t[o%62]);return n.join("")})(32);async function H(e){const t=r.H.getConfig().Auth?.Cognito;(0,o.$y)(t),(0,o.G6)(t),u.f.setAuthConfig(t),e?.options?.prompt||await(0,D.AR)();let n,a="COGNITO";return"string"===typeof e?.provider?a=M[e.provider]:e?.provider?.custom?a=e.provider.custom:e?.provider?.idpIdentifier&&({idpIdentifier:n}=e.provider),$({oauthConfig:t.loginWith.oauth,clientId:t.userPoolClientId,provider:a,idpIdentifier:n,customState:e?.customState,preferPrivateSession:e?.options?.preferPrivateSession,options:{loginHint:e?.options?.loginHint,lang:e?.options?.lang,nonce:e?.options?.nonce,prompt:e?.options?.prompt},authSessionOpener:e?.options?.authSessionOpener})}const $=async e=>{let{oauthConfig:t,provider:n,idpIdentifier:r,clientId:o,customState:s,preferPrivateSession:c,options:d,authSessionOpener:f}=e;const{domain:p,redirectSignIn:h,responseType:m,scopes:v}=t,{loginHint:g,lang:y,nonce:b,prompt:E}=d??{},C=B(),w=f||U.z,k=s?`${C}-${_=s,_.split("").map(e=>e.charCodeAt(0).toString(16).padStart(2,"0")).join("")}`:C;var _;const{value:I,method:A,toCodeChallenge:P}=j(128),T=(0,N.M)(t.redirectSignIn);(0,a.B)()&&u.f.storeOAuthInFlight(!0),u.f.storeOAuthState(k),u.f.storePKCE(I);const O=new URLSearchParams;O.append("redirect_uri",T),O.append("response_type",m),O.append("client_id",o),r?O.append("idp_identifier",r):O.append("identity_provider",n),O.append("scope",v.join(" ")),g&&O.append("login_hint",g),y&&O.append("lang",y),b&&O.append("nonce",b),E&&O.append("prompt",E.toLowerCase()),O.append("state",k),"code"===m&&(O.append("code_challenge",P()),O.append("code_challenge_method",A));const M=`https://${p}/oauth2/authorize?${O.toString()}`;var D;D=u.f,window.addEventListener("pageshow",async function e(t){if(t.persisted&&await D.loadOAuthInFlight()){const e=S("User cancelled OAuth flow.");await R(e)}window.removeEventListener("pageshow",e)});const{type:F,error:L,url:z}=await w(M,h,c)??{};try{if("error"===F)throw S(String(L));if("canceled"===F)throw S(String(F));"success"===F&&z&&await x({currentUrl:z,clientId:o,domain:p,redirectUri:T,responseType:m,userAgentValue:(0,l.A)(i.BM.SignInWithRedirect),preferPrivateSession:c})}catch(W){throw await R(W),W}}},6016(e,t,n){"use strict";n.d(t,{o:()=>i});var r=n(727),o=n(3249),a=n(9169);const i=e=>{let{endpointOverride:t}=e;return e=>t?{url:new r.o(t)}:(e=>{let{region:t}=e;return{url:new r.o(`https://${a.M}.${t}.${(0,o.R)(t)}`)}})(e)}},7485(e,t,n){"use strict";n.d(t,{Uv:()=>d,Qm:()=>p});var r=n(2770),o=n(2096);const a={accessToken:"accessToken",idToken:"idToken",oidcProvider:"oidcProvider",clockDrift:"clockDrift",refreshToken:"refreshToken",deviceKey:"deviceKey",randomPasswordKey:"randomPasswordKey",deviceGroupKey:"deviceGroupKey",signInDetails:"signInDetails",oauthMetadata:"oauthMetadata"};var i,s=n(8895);!function(e){e.InvalidAuthTokens="InvalidAuthTokens"}(i||(i={}));const l={[i.InvalidAuthTokens]:{message:"Invalid tokens.",recoverySuggestion:"Make sure the tokens are valid."}},u=(0,s.p)(l),c="CognitoIdentityServiceProvider";class d{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{const 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."});const n=(0,r.Cq)(t),a=await this.getKeyValueStorage().getItem(e.idToken),i=a?(0,r.Cq)(a):void 0,s=await this.getKeyValueStorage().getItem(e.refreshToken)??void 0,l=await this.getKeyValueStorage().getItem(e.clockDrift)??"0",u=Number.parseInt(l),c=await this.getKeyValueStorage().getItem(e.signInDetails),d={accessToken:n,idToken:i,refreshToken:s,deviceMetadata:await this.getDeviceMetadata()??void 0,clockDrift:u,username:await this.getLastAuthUser()};return c&&(d.signInDetails=JSON.parse(c)),d}catch(e){return null}}async storeTokens(e){u(void 0!==e,i.InvalidAuthTokens);const t=e.username;await this.getKeyValueStorage().setItem(this.getLastAuthUserKey(),t);const 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(){const 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){const t=await this.getAuthKeys(e),n=await this.getKeyValueStorage().getItem(t.deviceKey),r=await this.getKeyValueStorage().getItem(t.deviceGroupKey),o=await this.getKeyValueStorage().getItem(t.randomPasswordKey);return o&&r&&n?{deviceKey:n,deviceGroupKey:r,randomPassword:o}:null}async clearDeviceMetadata(e){const 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,r.$y)(this.authConfig?.Cognito);const t=e??await this.getLastAuthUser();return f(c,`${this.authConfig.Cognito.userPoolClientId}.${t}`)}getLastAuthUserKey(){(0,r.$y)(this.authConfig?.Cognito);const e=this.authConfig.Cognito.userPoolClientId;return`${c}.${e}.LastAuthUser`}async getLastAuthUser(){return await this.getKeyValueStorage().getItem(this.getLastAuthUserKey())??"username"}async setOAuthMetadata(e){const{oauthMetadata:t}=await this.getAuthKeys();await this.getKeyValueStorage().setItem(t,JSON.stringify(e))}async getOAuthMetadata(){const{oauthMetadata:e}=await this.getAuthKeys(),t=await this.getKeyValueStorage().getItem(e);return t&&JSON.parse(t)}}const f=(e,t)=>p(a)(`${e}`,t);function p(e){const t=Object.values({...e});return(e,n)=>t.reduce((t,r)=>({...t,[r]:`${e}.${n}.${r}`}),{})}},6998(e,t,n){"use strict";n.d(t,{i:()=>i});var r=n(2770),o=n(1439),a=n(3643);async function i(e){if(!e.AccessToken)throw new o.x({message:"Invalid tokens",name:"InvalidTokens",recoverySuggestion:"Check Cognito UserPool settings"});{const t=(0,r.Cq)(e.AccessToken),n=1e3*(t.payload.iat||0),o=(new Date).getTime(),i=n>0?n-o:0;let s,l,u;e.RefreshToken&&(l=e.RefreshToken),e.IdToken&&(s=(0,r.Cq)(e.IdToken)),e?.NewDeviceMetadata&&(u=e.NewDeviceMetadata);const c={accessToken:t,idToken:s,refreshToken:l,clockDrift:i,deviceMetadata:u,username:e.username};e?.signInDetails&&(c.signInDetails=e.signInDetails),await a.o.setTokens({tokens:c})}}},3643(e,t,n){"use strict";n.d(t,{Q:()=>x,o:()=>k});var r=n(8937),o=n(2770);var a=n(9715),i=n(2242),s=n(2096),l=n(6016),u=n(7161),c=n(5215),d=n(2190),f=n(8016),p=n(7675);const h=async e=>{let{tokens:t,authConfig:n,username:r,clientMetadata:h}=e;(0,o.$y)(n?.Cognito);const{userPoolId:m,userPoolClientId:v,userPoolEndpoint:g}=n.Cognito,y=(0,a.J)(m);(0,i.X4)(t);const b=(E={endpointResolver:(0,l.o)({endpointOverride:g})},(0,u.A)(f.e,(0,c._)("GetTokensFromRefreshToken"),(0,d.T)(),{...p.C,...E}));var E;const{AuthenticationResult:S}=await b({region:y},{ClientId:v,RefreshToken:t.refreshToken,DeviceKey:t.deviceMetadata?.deviceKey,ClientMetadata:h}),C=(0,o.Cq)(S?.AccessToken??""),w=S?.IdToken?(0,o.Cq)(S.IdToken):void 0,{iat:x}=C.payload;if(!x)throw new s.l({name:"iatNotFoundException",message:"iat not found in access token"});return{accessToken:C,idToken:w,clockDrift:1e3*x-(new Date).getTime(),refreshToken:S?.RefreshToken??t.refreshToken,username:r}},m=(e=>{let t;return async function(){for(var n=arguments.length,r=new Array(n),o=0;o{e(...r).then(e=>{n(e)}).catch(e=>{o(e)}).finally(()=>{t=void 0})}),t)}})(h);var v=n(7485),g=n(8173),y=n(4163);function b(e){let{expiresAt:t,clockDrift:n,tolerance:r=5e3}=e;return Date.now()+n+r>t}var E=n(9109),S=n(2311),C=n(851);class w{constructor(){this.waitForInflightOAuth=(0,y.B)()?async()=>{if(await S.f.loadOAuthInFlight())return this.inflightPromise||(this.inflightPromise=new Promise((e,t)=>{(0,C.I)(e)})),this.inflightPromise}:async()=>{}}setAuthConfig(e){S.f.setAuthConfig(e.Cognito),this.authConfig=e}setTokenRefresher(e){this.tokenRefresher=e}setAuthTokenStore(e){this.tokenStore=e}getTokenStore(){if(!this.tokenStore)throw new s.l({name:"EmptyTokenStoreException",message:"TokenStore not set"});return this.tokenStore}getTokenRefresher(){if(!this.tokenRefresher)throw new s.l({name:"EmptyTokenRefresherException",message:"TokenRefresher not set"});return this.tokenRefresher}setClientMetadataProvider(e){this.clientMetadataProvider=e}async getTokens(e){let t;try{(0,o.$y)(this.authConfig?.Cognito)}catch(i){return null}await this.waitForInflightOAuth(),this.inflightPromise=void 0,t=await this.getTokenStore().loadTokens();const n=await this.getTokenStore().getLastAuthUser();if(null===t)return null;const r=!!t?.idToken&&b({expiresAt:1e3*(t.idToken?.payload?.exp??0),clockDrift:t.clockDrift??0}),a=b({expiresAt:1e3*(t.accessToken?.payload?.exp??0),clockDrift:t.clockDrift??0});return(e?.forceRefresh||r||a)&&(t=await this.refreshTokens({tokens:t,username:n,clientMetadata:e?.clientMetadata??await(this.clientMetadataProvider?.())}),null===t)?null:{accessToken:t?.accessToken,idToken:t?.idToken,signInDetails:t?.signInDetails}}async refreshTokens(e){let{tokens:t,username:n,clientMetadata:r}=e;try{const{signInDetails:e}=t,o=await this.getTokenRefresher()({tokens:t,authConfig:this.authConfig,username:n,clientMetadata:r});return o.signInDetails=e,await this.setTokens({tokens:o}),g.YZ.dispatch("auth",{event:"tokenRefresh"},"Auth",g.U9),o}catch(o){return this.handleErrors(o)}}handleErrors(e){(0,E.e)(e);if(this.isAuthenticationError(e)&&this.clearTokens(),g.YZ.dispatch("auth",{event:"tokenRefresh_failure",data:{error:e}},"Auth",g.U9),e.name.startsWith("NotAuthorizedException"))return null;throw e}isAuthenticationError(e){return["NotAuthorizedException","TokenRevokedException","UserNotFoundException","PasswordResetRequiredException","UserNotConfirmedException","RefreshTokenReuseException"].some(t=>e?.name?.startsWith?.(t))}async setTokens(e){let{tokens:t}=e;return this.getTokenStore().storeTokens(t)}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()}}const x=new class{constructor(){this.authTokenStore=new v.Uv,this.authTokenStore.setKeyValueStorage(r.ZL),this.tokenOrchestrator=new w,this.tokenOrchestrator.setAuthTokenStore(this.authTokenStore),this.tokenOrchestrator.setTokenRefresher(m)}getTokens(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.tokenOrchestrator.getTokens(e)}setKeyValueStorage(e){this.authTokenStore.setKeyValueStorage(e)}setClientMetadataProvider(e){this.tokenOrchestrator.setClientMetadataProvider(e)}setAuthConfig(e){this.authTokenStore.setAuthConfig(e),this.tokenOrchestrator.setAuthConfig(e)}},{tokenOrchestrator:k}=x},8342(e,t,n){"use strict";var r,o,a,i,s,l,u,c,d,f,p,h,m,v,g,y,b,E,S,C,w,x,k,_;n.d(t,{AU:()=>S,zh:()=>g}),function(e){e.ConcurrentModificationException="ConcurrentModificationException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException"}(r||(r={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(o||(o={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UsernameExistsException="UsernameExistsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(a||(a={})),function(e){e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyFailedAttemptsException="TooManyFailedAttemptsException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(i||(i={})),function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyFailedAttemptsException="TooManyFailedAttemptsException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"}(s||(s={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(l||(l={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(u||(u={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(c||(c={})),function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"}(d||(d={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(f||(f={})),function(e){e.ExternalServiceException="ExternalServiceException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceConflictException="ResourceConflictException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException"}(p||(p={})),function(e){e.ExternalServiceException="ExternalServiceException",e.InternalErrorException="InternalErrorException",e.InvalidIdentityPoolConfigurationException="InvalidIdentityPoolConfigurationException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceConflictException="ResourceConflictException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException"}(h||(h={})),function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(m||(m={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException"}(v||(v={})),function(e){e.PasswordResetRequiredException="PasswordResetRequiredException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(g||(g={})),function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"}(y||(y={})),function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.MFAMethodNotFoundException="MFAMethodNotFoundException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(b||(b={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(E||(E={})),function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UsernameExistsException="UsernameExistsException"}(S||(S={})),function(e){e.AliasExistsException="AliasExistsException",e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(C||(C={})),function(e){e.CodeMismatchException="CodeMismatchException",e.EnableSoftwareTokenMFAException="EnableSoftwareTokenMFAException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(w||(w={})),function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(x||(x={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(k||(k={})),function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"}(_||(_={}))},155(e,t,n){"use strict";var r=n(8173),o=n(1580),a=n(7387),i=n(2096);n.d(t,["Q",0,async()=>{try{r.YZ.dispatch("auth",{event:"signedIn",data:await(0,o.H)()},"Auth",r.U9)}catch(e){if(e.name===a.zz)throw new i.l({name:a.yA,message:"Unable to get user session following successful sign-in.",recoverySuggestion:"This most likely is due to auth tokens not being persisted. If you are using cookie store, please ensure cookies can be correctly set from your server."});throw e}}])},4364(e,t,n){"use strict";n.d(t,{i:()=>h});var r=n(676);const o=async()=>{const{userAgentData:e}=navigator;if(!e)return navigator.userAgent;const{platform:t="",platformVersion:n="",model:r="",architecture:o="",fullVersionList:a=[]}=await e.getHighEntropyValues(["platform","platformVersion","architecture","model","fullVersionList"]);return[t,n,o,r,t,a.map(e=>`${e.brand}/${e.version}`).join(";")].filter(e=>e).join(" ")||navigator.userAgent};var a=n(7161),i=n(8016),s=n(5215),l=n(2190),u=n(7675);var c=n(6016),d=n(9715),f=n(3740),p=n(8941);n(4228);async function h(e){let{userPoolId:t,userPoolEndpoint:n,newDeviceMetadata:h,accessToken:m}=e;if(!h)return;const v=t.split("_")[1]||"",g=await(0,f.H)(v),y=h?.DeviceKey,b=h?.DeviceGroupKey;try{await g.generateHashDevice(b??"",y??"")}catch(w){return}const E={Salt:r.Y.convert((0,p.d)(g.getSaltToHashDevices())),PasswordVerifier:r.Y.convert((0,p.d)(g.getVerifierDevices()))},S=g.getRandomPassword();try{const e=(C={endpointResolver:(0,c.o)({endpointOverride:n})},(0,a.A)(i.e,(0,s._)("ConfirmDevice"),(0,l.T)(),{...u.C,...C}));return await e({region:(0,d.J)(t)},{AccessToken:m,DeviceName:await o(),DeviceKey:h?.DeviceKey,DeviceSecretVerifierConfig:E}),{deviceKey:y,deviceGroupKey:b,randomPassword:S}}catch(x){return}var C}},6210(e,t,n){"use strict";n.d(t,{O:()=>f});var r=n(2604),o=n(6016),a=n(9715),i=n(2242),s=n(3740),l=n(3600),u=n(4750),c=n(5378),d=n(3);async function f(e){let{username:t,config:n,clientMetadata:f,session:p,tokenOrchestrator:h}=e;const{userPoolId:m,userPoolEndpoint:v}=n,g=n.userPoolClientId,y=await(h?.getDeviceMetadata(t));(0,i.O_)(y);const b=await(0,s.H)(y.deviceGroupKey),E={ChallengeName:"DEVICE_SRP_AUTH",ClientId:g,ChallengeResponses:{USERNAME:t,SRP_A:b.A.toString(16),DEVICE_KEY:y.deviceKey},ClientMetadata:f,Session:p},S=(0,r.H)({endpointResolver:(0,o.o)({endpointOverride:v})}),{ChallengeParameters:C,Session:w}=await S({region:(0,a.J)(m)},E);return async function(e,t,n,s,f,p,h){let{userPoolId:m,userPoolClientId:v,userPoolEndpoint:g}=p;const y=await(h?.getDeviceMetadata(e));(0,i.O_)(y);const b=new c.A(t?.SRP_B,16),E=new c.A(t?.SALT,16),{deviceKey:S}=y,{deviceGroupKey:C}=y,w=await f.getPasswordAuthenticationKey({username:y.deviceKey,password:y.randomPassword,serverBValue:b,salt:E}),x=(0,l.q)(),k={USERNAME:t?.USERNAME??e,PASSWORD_CLAIM_SECRET_BLOCK:t?.SECRET_BLOCK,TIMESTAMP:x,PASSWORD_CLAIM_SIGNATURE:(0,u.I)({username:S,userPoolName:C,challengeParameters:t,dateNow:x,hkdf:w}),DEVICE_KEY:S},_=(0,d.d)({username:e,userPoolId:m,userPoolClientId:v}),I={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:v,ChallengeResponses:k,Session:s,ClientMetadata:n,UserContextData:_},A=(0,r.H)({endpointResolver:(0,o.o)({endpointOverride:g})});return A({region:(0,a.J)(m)},I)}(t,C,f,w,b,n,h)}},8447(e,t,n){"use strict";n.d(t,{f:()=>f});var r=n(2096),o=n(2604),a=n(6016),i=n(9715),s=n(5378),l=(n(4228),n(3600)),u=n(4750),c=n(3),d=n(6210);async function f(e,t,n,f,p,h,m){const{userPoolId:v,userPoolClientId:g,userPoolEndpoint:y}=h,b=v?.split("_")[1]||"",E=new s.A(t?.SRP_B,16),S=new s.A(t?.SALT,16),C=t?.USER_ID_FOR_SRP;if(!C)throw new r.l({name:"EmptyUserIdForSRPException",message:"USER_ID_FOR_SRP was not found in challengeParameters"});const w=await p.getPasswordAuthenticationKey({username:C,password:e,serverBValue:E,salt:S}),x=(0,l.q)(),k={USERNAME:C,PASSWORD_CLAIM_SECRET_BLOCK:t?.SECRET_BLOCK,TIMESTAMP:x,PASSWORD_CLAIM_SIGNATURE:(0,u.I)({username:C,userPoolName:b,challengeParameters:t,dateNow:x,hkdf:w})},_=await m.getDeviceMetadata(C);_&&_.deviceKey&&(k.DEVICE_KEY=_.deviceKey);const I={ChallengeName:"PASSWORD_VERIFIER",ChallengeResponses:k,ClientMetadata:n,Session:f,ClientId:g,UserContextData:(0,c.d)({username:C,userPoolId:v,userPoolClientId:g})},A=(0,o.H)({endpointResolver:(0,a.o)({endpointOverride:y})}),P=await A({region:(0,i.J)(v)},I);return"DEVICE_SRP_AUTH"===P.ChallengeName?(0,d.O)({username:C,config:h,clientMetadata:n,session:P.Session,tokenOrchestrator:m}):P}},4872(e,t,n){"use strict";n.d(t,{M:()=>o});var r=n(7387);function o(e,t){if(t){const n=e?.find(e=>e===t);if(!n)throw r.jK;return n}{const t=e?.find(a)??e?.find(i),n=e?.find(l)??e?.find(s);if(t)return t;if(n)throw r.$6;throw r.RW}}const a=e=>e.startsWith(String(window.location.origin+(window.location.pathname||"/"))),i=e=>e.includes(String(window.location.hostname)),s=e=>e.startsWith("http://"),l=e=>e.startsWith("https://")},851(e,t,n){"use strict";const r=[];n.d(t,["I",0,e=>{r.push(e)},"i",0,()=>{for(;r.length;)r.pop()?.()}])},2311(e,t,n){"use strict";var r=n(8937);const o=new(n(9876).S)(r.ZL);n.d(t,["f",0,o])},5264(e,t,n){"use strict";n.d(t,{i:()=>o});var r=n(2096);async function o(e,t,n,o){try{return await e(...t)}catch(a){if(a instanceof r.l&&"ResourceNotFoundException"===a.name&&a.message.includes("Device does not exist."))return await o.clearDeviceMetadata(n),e(...t);throw a}}},6093(e,t,n){"use strict";n.d(t,{d:()=>o});var r=n(3761);function o(e){const{dispatch:t}=r.c$;t({type:"SET_USERNAME",value:e})}},8085(e,t,n){"use strict";n.d(t,{AR:()=>oe,ni:()=>ae,q2:()=>K,m$:()=>Z,XE:()=>X,ty:()=>q,tE:()=>G,h5:()=>$,Zw:()=>V});var r=n(3413),o=n(2600),a=n(2770),i=n(727),s=n(2096),l=n(8342),u=n(2200),c=n(5119),d=n(2013),f=n(7387),p=n(1580),h=n(9931),m=n(7266),v=n(2604),g=n(7161),y=n(8016),b=n(5215),E=n(2190),S=n(7675);var C=n(6016),w=n(9715),x=n(6998),k=n(155),_=n(3761),I=n(6814),A=n(9707);var P=n(7645),T=n(9672),N=n(1649);const R=async e=>{try{const t=(0,P.H)();(0,I.xk)(t,I.Au.PasskeyNotSupported);const n=(0,T.ZA)(e),r=await navigator.credentials.get({publicKey:n});return(0,N.u)(r),(0,T.Uv)(r)}catch(t){throw(e=>{if(e instanceof I.pX)return e;if(e instanceof Error&&"NotAllowedError"===e.name){const{message:t,recoverySuggestion:n}=I.VX[I.Au.PasskeyAuthenticationCanceled];return new I.pX({name:I.Au.PasskeyAuthenticationCanceled,message:t,recoverySuggestion:n,underlyingError:e})}return(0,A.n)(e)})(t)}};var O=n(4364);var M=n(4706);var U=n(3),D=n(6093);var F=n(3740),L=(n(4228),n(5264)),z=n(8447);var W=n(6210);const j="userAttributes.";async function B(e){let{challengeResponse:t,clientMetadata:n,session:r,username:a,config:i,tokenOrchestrator:s}=e;const{userPoolId:l,userPoolClientId:u,userPoolEndpoint:c}=i,d={USERNAME:a,ANSWER:t},f=await(s?.getDeviceMetadata(a));f&&f.deviceKey&&(d.DEVICE_KEY=f.deviceKey);const p={ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:d,Session:r,ClientMetadata:n,ClientId:u,UserContextData:(0,U.d)({username:a,userPoolId:l,userPoolClientId:u})},m=(0,v.H)({endpointResolver:(0,C.o)({endpointOverride:c})}),g=await m({region:(0,w.J)(l),userAgentValue:(0,h.A)(o.BM.ConfirmSignIn)},p);return"DEVICE_SRP_AUTH"===g.ChallengeName?(0,W.O)({username:a,config:i,clientMetadata:n,session:g.Session,tokenOrchestrator:s}):g}async function H(e){let{challengeResponse:t,username:n,clientMetadata:r,session:a,deviceName:i,config:l}=e;const{userPoolId:c,userPoolClientId:d,userPoolEndpoint:f}=l;if("EMAIL"===t)return{ChallengeName:"MFA_SETUP",Session:a,ChallengeParameters:{MFAS_CAN_SETUP:'["EMAIL_OTP"]'},$metadata:{}};if("TOTP"===t)return{ChallengeName:"MFA_SETUP",Session:a,ChallengeParameters:{MFAS_CAN_SETUP:'["SOFTWARE_TOKEN_MFA"]'},$metadata:{}};const p={USERNAME:n};if(/^\d+$/.test(t)){const e=(e=>(0,g.A)(y.e,(0,b._)("VerifySoftwareToken"),(0,E.T)(),{...S.C,...e}))({endpointResolver:(0,C.o)({endpointOverride:f})}),{Session:n}=await e({region:(0,w.J)(c),userAgentValue:(0,h.A)(o.BM.ConfirmSignIn)},{UserCode:t,Session:a,FriendlyDeviceName:i});_.c$.dispatch({type:"SET_SIGN_IN_SESSION",value:n});const s={ChallengeName:"MFA_SETUP",ChallengeResponses:p,Session:n,ClientMetadata:r,ClientId:d};return(0,v.H)({endpointResolver:(0,C.o)({endpointOverride:f})})({region:(0,w.J)(c),userAgentValue:(0,h.A)(o.BM.ConfirmSignIn)},s)}if(t.includes("@")){p.EMAIL=t;const e={ChallengeName:"MFA_SETUP",ChallengeResponses:p,Session:a,ClientMetadata:r,ClientId:d};return(0,v.H)({endpointResolver:(0,C.o)({endpointOverride:f})})({region:(0,w.J)(c),userAgentValue:(0,h.A)(o.BM.ConfirmSignIn)},e)}throw new s.l({name:u.nC.SignInException,message:`Cannot proceed with MFA setup using challengeResponse: ${t}`,recoverySuggestion:'Try passing "EMAIL", "TOTP", a valid email, or OTP code as the challengeResponse.'})}async function $(e,t,n,r,a){const{userPoolClientId:i,userPoolId:s,userPoolEndpoint:l}=r,u={USERNAME:e,PASSWORD:t},c=await a.getDeviceMetadata(e);c&&c.deviceKey&&(u.DEVICE_KEY=c.deviceKey);const d={AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:u,ClientMetadata:n,ClientId:i,UserContextData:(0,U.d)({username:e,userPoolId:s,userPoolClientId:i})},f=(0,m.R)({endpointResolver:(0,C.o)({endpointOverride:l})}),p=await f({region:(0,w.J)(s),userAgentValue:(0,h.A)(o.BM.SignIn)},d),v=p.ChallengeParameters?.USERNAME??p.ChallengeParameters?.USER_ID_FOR_SRP??e;return(0,D.d)(v),"DEVICE_SRP_AUTH"===p.ChallengeName?(0,W.O)({username:v,config:r,clientMetadata:n,session:p.Session,tokenOrchestrator:a}):p}async function V(e,t,n,r,o){return(0,M.L)({username:e,password:t,clientMetadata:n,config:r,tokenOrchestrator:o,authFlow:"USER_SRP_AUTH"})}async function q(e,t,n,r){const{userPoolClientId:a,userPoolId:i,userPoolEndpoint:s}=n,l={USERNAME:e},u=await r.getDeviceMetadata(e);u&&u.deviceKey&&(l.DEVICE_KEY=u.deviceKey);const c={AuthFlow:"CUSTOM_AUTH",AuthParameters:l,ClientMetadata:t,ClientId:a,UserContextData:(0,U.d)({username:e,userPoolId:i,userPoolClientId:a})},d=(0,m.R)({endpointResolver:(0,C.o)({endpointOverride:s})}),f=await d({region:(0,w.J)(i),userAgentValue:(0,h.A)(o.BM.SignIn)},c),p=f.ChallengeParameters?.USERNAME??e;return(0,D.d)(p),"DEVICE_SRP_AUTH"===f.ChallengeName?(0,W.O)({username:p,config:n,clientMetadata:t,session:f.Session,tokenOrchestrator:r}):f}async function G(e,t,n,r,i){(0,a.$y)(r);const{userPoolId:s,userPoolClientId:l,userPoolEndpoint:u}=r,c=s?.split("_")[1]||"",d=await(0,F.H)(c),f={AuthFlow:"CUSTOM_AUTH",AuthParameters:{USERNAME:e,SRP_A:d.A.toString(16),CHALLENGE_NAME:"SRP_A"},ClientMetadata:n,ClientId:l,UserContextData:(0,U.d)({username:e,userPoolId:s,userPoolClientId:l})},p=(0,m.R)({endpointResolver:(0,C.o)({endpointOverride:u})}),{ChallengeParameters:v,Session:g}=await p({region:(0,w.J)(s),userAgentValue:(0,h.A)(o.BM.SignIn)},f),y=v?.USERNAME??e;return(0,D.d)(y),(0,L.i)(z.f,[t,v,n,g,d,r,i],y,i)}async function K(e){const{challengeName:t,challengeParameters:n,availableChallenges:i}=e,l=r.H.getConfig().Auth?.Cognito;switch((0,a.$y)(l),t){case"CUSTOM_CHALLENGE":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE",additionalInfo:n}};case"MFA_SETUP":{const{signInSession:e,username:t}=_.c$.getState(),r=ne(re(n.MFAS_CAN_SETUP))||[],o=r.filter(e=>"EMAIL"===e||"TOTP"===e),a=o.includes("TOTP"),i=o.includes("EMAIL");if(a&&i)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION",allowedMFATypes:o}};if(i)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"}};if(a){const n=(c={endpointResolver:(0,C.o)({endpointOverride:l.userPoolEndpoint})},(0,g.A)(y.e,(0,b._)("AssociateSoftwareToken"),(0,E.T)(),{...S.C,...c})),{Session:r,SecretCode:o}=await n({region:(0,w.J)(l.userPoolId)},{Session:e});return _.c$.dispatch({type:"SET_SIGN_IN_SESSION",value:r}),{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_TOTP_SETUP",totpSetupDetails:Y(o,t)}}}throw new s.l({name:u.nC.SignInException,message:`Cannot initiate MFA setup from available types: ${r}`})}case"NEW_PASSWORD_REQUIRED":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",missingAttributes:Q(n.requiredAttributes)}};case"SELECT_MFA_TYPE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SELECTION",allowedMFATypes:ne(re(n.MFAS_CAN_CHOOSE))}};case"SMS_OTP":case"SMS_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_SMS_CODE",codeDeliveryDetails:{deliveryMedium:n.CODE_DELIVERY_DELIVERY_MEDIUM,destination:n.CODE_DELIVERY_DESTINATION}}};case"SOFTWARE_TOKEN_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_TOTP_CODE"}};case"EMAIL_OTP":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_EMAIL_CODE",codeDeliveryDetails:{deliveryMedium:n.CODE_DELIVERY_DELIVERY_MEDIUM,destination:n.CODE_DELIVERY_DESTINATION}}};case"WEB_AUTHN":{const e=await async function(e){const t=r.H.getConfig().Auth?.Cognito;(0,a.$y)(t);const{username:n,signInSession:i,signInDetails:l,challengeName:c}=_.c$.getState();if("WEB_AUTHN"!==c||!n)throw new s.l({name:u.nC.SignInException,message:"Unable to proceed due to invalid sign in state."});const{CREDENTIAL_REQUEST_OPTIONS:d}=e;(0,I.xk)(!!d,I.Au.InvalidPasskeyAuthenticationOptions);const f=await R(JSON.parse(d)),p=(0,v.H)({endpointResolver:(0,C.o)({endpointOverride:t.userPoolEndpoint})}),{ChallengeName:m,ChallengeParameters:g,AuthenticationResult:y,Session:b}=await p({region:(0,w.J)(t.userPoolId),userAgentValue:(0,h.A)(o.BM.ConfirmSignIn)},{ChallengeName:"WEB_AUTHN",ChallengeResponses:{USERNAME:n,CREDENTIAL:JSON.stringify(f)},ClientId:t.userPoolClientId,Session:i});if((0,_.wr)({signInSession:b,username:n,challengeName:m,signInDetails:l}),y)return await(0,x.i)({...y,username:n,NewDeviceMetadata:await(0,O.i)({userPoolId:t.userPoolId,userPoolEndpoint:t.userPoolEndpoint,newDeviceMetadata:y.NewDeviceMetadata,accessToken:y.AccessToken}),signInDetails:l}),_.c$.dispatch({type:"RESET_STATE"}),await(0,k.Q)(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};if("WEB_AUTHN"===m)throw new s.l({name:u.nC.SignInException,message:"Sequential WEB_AUTHN challenges returned from underlying service cannot be handled."});return{challengeName:m,challengeParameters:g}}(n);return function(e){return"isSignedIn"in e&&"nextStep"in e}(e)?e:K(e)}case"PASSWORD":case"PASSWORD_SRP":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_PASSWORD"}};case"SELECT_CHALLENGE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_FIRST_FACTOR_SELECTION",availableChallenges:i}}}var c;throw new s.l({name:u.nC.SignInException,message:`An error occurred during the sign in process. ${t} challengeName returned by the underlying service was not addressed.`})}function Y(e,t){return{sharedSecret:e,getSetupUri:(n,r)=>{const o=`otpauth://totp/${n}:${r??t}?secret=${e}&issuer=${n}`;return new i.o(o)}}}function Z(e){return e===l.zh.PasswordResetRequiredException?{isSignedIn:!1,nextStep:{signInStep:"RESET_PASSWORD"}}:e===l.zh.UserNotConfirmedException?{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_UP"}}:void 0}function Q(e){if(!e)return[];return JSON.parse(e).map(e=>e.includes(j)?e.replace(j,""):e)}function J(e){if(!e)return{};const t={};return Object.entries(e).forEach(e=>{let[n,r]=e;r&&(t[`${j}${n}`]=r)}),t}async function X(e,t,n,r,a,i,l,f){const p=f?.userAttributes,m=f?.friendlyDeviceName;switch(t){case"WEB_AUTHN":case"SELECT_CHALLENGE":return"PASSWORD_SRP"===r||"PASSWORD"===r?{ChallengeName:r,Session:n,$metadata:{}}:async function(e){let{username:t,session:n,selectedChallenge:r,config:a,clientMetadata:i}=e;return(0,v.H)({endpointResolver:(0,C.o)({endpointOverride:a.userPoolEndpoint})})({region:(0,w.J)(a.userPoolId),userAgentValue:(0,h.A)(o.BM.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:{USERNAME:t,ANSWER:r},ClientId:a.userPoolClientId,Session:n,ClientMetadata:i})}({username:e,session:n,selectedChallenge:r,config:a,clientMetadata:l});case"SELECT_MFA_TYPE":return async function(e){let{challengeResponse:t,username:n,clientMetadata:r,session:a,config:i}=e;const{userPoolId:s,userPoolClientId:l,userPoolEndpoint:u}=i;(0,d.M)("TOTP"===t||"SMS"===t||"EMAIL"===t,c.P.IncorrectMFAMethod);const f={ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:{USERNAME:n,ANSWER:ee(t)},Session:a,ClientMetadata:r,ClientId:l,UserContextData:(0,U.d)({username:n,userPoolId:s,userPoolClientId:l})};return(0,v.H)({endpointResolver:(0,C.o)({endpointOverride:u})})({region:(0,w.J)(s),userAgentValue:(0,h.A)(o.BM.ConfirmSignIn)},f)}({challengeResponse:r,clientMetadata:l,session:n,username:e,config:a});case"MFA_SETUP":return H({challengeResponse:r,clientMetadata:l,session:n,username:e,deviceName:m,config:a});case"NEW_PASSWORD_REQUIRED":return async function(e){let{challengeResponse:t,clientMetadata:n,session:r,username:a,requiredAttributes:i,config:s}=e;const{userPoolId:l,userPoolClientId:u,userPoolEndpoint:c}=s,d={ChallengeName:"NEW_PASSWORD_REQUIRED",ChallengeResponses:{...J(i),NEW_PASSWORD:t,USERNAME:a},ClientMetadata:n,Session:r,ClientId:u,UserContextData:(0,U.d)({username:a,userPoolId:l,userPoolClientId:u})};return(0,v.H)({endpointResolver:(0,C.o)({endpointOverride:c})})({region:(0,w.J)(l),userAgentValue:(0,h.A)(o.BM.ConfirmSignIn)},d)}({challengeResponse:r,clientMetadata:l,session:n,username:e,requiredAttributes:p,config:a});case"CUSTOM_CHALLENGE":return(0,L.i)(B,[{challengeResponse:r,clientMetadata:l,session:n,username:e,config:a,tokenOrchestrator:i}],e,i);case"SMS_MFA":case"SOFTWARE_TOKEN_MFA":case"SMS_OTP":case"EMAIL_OTP":return async function(e){let{challengeName:t,challengeResponse:n,clientMetadata:r,session:a,username:i,config:s,tokenOrchestrator:l}=e;const{userPoolId:u,userPoolClientId:c,userPoolEndpoint:d}=s,f={USERNAME:i};"EMAIL_OTP"===t&&(f.EMAIL_OTP_CODE=n);"SMS_MFA"===t&&(f.SMS_MFA_CODE=n);"SMS_OTP"===t&&(f.SMS_OTP_CODE=n);"SOFTWARE_TOKEN_MFA"===t&&(f.SOFTWARE_TOKEN_MFA_CODE=n);const p=await(l?.getDeviceMetadata(i));p&&p.deviceKey&&(f.DEVICE_KEY=p.deviceKey);const m=(0,U.d)({username:i,userPoolId:u,userPoolClientId:c}),g={ChallengeName:t,ChallengeResponses:f,Session:a,ClientMetadata:r,ClientId:c,UserContextData:m},y=(0,v.H)({endpointResolver:(0,C.o)({endpointOverride:d})}),b=await y({region:(0,w.J)(u),userAgentValue:(0,h.A)(o.BM.ConfirmSignIn)},g);if("DEVICE_SRP_AUTH"===b.ChallengeName)return(0,W.O)({username:i,config:s,clientMetadata:r,session:b.Session,tokenOrchestrator:l});return b}({challengeName:t,challengeResponse:r,clientMetadata:l,session:n,username:e,config:a,tokenOrchestrator:i});case"PASSWORD":return async function(e,t,n,r,a){const{userPoolId:i,userPoolClientId:s,userPoolEndpoint:l}=r,u={ANSWER:"PASSWORD",USERNAME:e,PASSWORD:t},c=(0,U.d)({username:e,userPoolId:i,userPoolClientId:s}),d=(0,v.H)({endpointResolver:(0,C.o)({endpointOverride:l})}),f=await d({region:(0,w.J)(i),userAgentValue:(0,h.A)(o.BM.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:u,ClientId:s,ClientMetadata:n,Session:a,UserContextData:c}),p=f.ChallengeParameters?.USERNAME??e;return(0,D.d)(p),f}(e,r,l,a,n);case"PASSWORD_SRP":return async function(e,t,n,r,a,i){const{userPoolId:s,userPoolClientId:l,userPoolEndpoint:u}=r,c=s.split("_")[1]||"",d=await(0,F.H)(c),f={ANSWER:"PASSWORD_SRP",USERNAME:e,SRP_A:d.A.toString(16)},p=(0,U.d)({username:e,userPoolId:s,userPoolClientId:l}),m=(0,v.H)({endpointResolver:(0,C.o)({endpointOverride:u})}),g=await m({region:(0,w.J)(s),userAgentValue:(0,h.A)(o.BM.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:f,ClientId:l,ClientMetadata:n,Session:a,UserContextData:p}),y=g.ChallengeParameters?.USERNAME??e;return(0,D.d)(y),"PASSWORD_VERIFIER"===g.ChallengeName?(0,L.i)(z.f,[t,g.ChallengeParameters,n,g.Session,d,r,i],y,i):g}(e,r,l,a,n,i)}throw new s.l({name:u.nC.SignInException,message:`An error occurred during the sign in process.\n\t\t${t} challengeName returned by the underlying service was not addressed.`})}function ee(e){let t="SMS_MFA";return"TOTP"===e&&(t="SOFTWARE_TOKEN_MFA"),"EMAIL"===e&&(t="EMAIL_OTP"),t}function te(e){return"SMS_MFA"===e?"SMS":"SOFTWARE_TOKEN_MFA"===e?"TOTP":"EMAIL_OTP"===e?"EMAIL":void 0}function ne(e){if(e)return e.map(te).filter(Boolean)}function re(e){return e?JSON.parse(e):[]}async function oe(){let e;try{e=await(0,p.H)()}catch(t){}if(e&&e.userId&&e.username)throw new s.l({name:f.z0,message:"There is already a signed in user.",recoverySuggestion:"Call signOut before calling signIn again."})}function ae(e){return _.c$.getState().username??e}},9876(e,t,n){"use strict";n.d(t,{S:()=>l});var r=n(2770),o=n(7485),a=n(2242);const i="amplify-signin-with-hostedUI",s="CognitoIdentityServiceProvider";class l{constructor(e){this.keyValueStorage=e}async clearOAuthInflightData(){(0,r.$y)(this.cognitoConfig);const e=u(s,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.$y)(this.cognitoConfig);const e=u(s,this.cognitoConfig.userPoolClientId);return await this.clearOAuthInflightData(),await this.keyValueStorage.removeItem(i),this.keyValueStorage.removeItem(e.oauthSignIn)}loadOAuthState(){(0,r.$y)(this.cognitoConfig);const e=u(s,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(e.oauthState)}storeOAuthState(e){(0,r.$y)(this.cognitoConfig);const t=u(s,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(t.oauthState,e)}loadPKCE(){(0,r.$y)(this.cognitoConfig);const e=u(s,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(e.oauthPKCE)}storePKCE(e){(0,r.$y)(this.cognitoConfig);const t=u(s,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(t.oauthPKCE,e)}setAuthConfig(e){this.cognitoConfig=e}async loadOAuthInFlight(){(0,r.$y)(this.cognitoConfig);const e=u(s,this.cognitoConfig.userPoolClientId);return"true"===await this.keyValueStorage.getItem(e.inflightOAuth)}async storeOAuthInFlight(e){(0,r.$y)(this.cognitoConfig);const t=u(s,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(t.inflightOAuth,`${e}`)}async loadOAuthSignIn(){(0,r.$y)(this.cognitoConfig);const e=u(s,this.cognitoConfig.userPoolClientId),t=await this.keyValueStorage.getItem(i),[n,o]=(await this.keyValueStorage.getItem(e.oauthSignIn))?.split(",")??[];return{isOAuthSignIn:"true"===n||"true"===t,preferPrivateSession:"true"===o}}async storeOAuthSignIn(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,r.$y)(this.cognitoConfig);const n=u(s,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(n.oauthSignIn,`${e},${t}`)}}const u=(e,t)=>(0,o.Qm)(a.f3)(e,t)},5378(e,t,n){"use strict";function r(e,t){null!=e&&this.fromString(e,t)}function o(){return new r(null,null)}let a;n.d(t,{A:()=>r});const i="undefined"!==typeof navigator;i&&"Microsoft Internet Explorer"===navigator.appName?(r.prototype.am=function(e,t,n,r,o,a){const i=32767&t,s=t>>15;for(;--a>=0;){let t=32767&this[e];const a=this[e++]>>15,l=s*t+a*i;t=i*t+((32767&l)<<15)+n[r]+(1073741823&o),o=(t>>>30)+(l>>>15)+s*a+(o>>>30),n[r++]=1073741823&t}return o},a=30):i&&"Netscape"!==navigator.appName?(r.prototype.am=function(e,t,n,r,o,a){for(;--a>=0;){const a=t*this[e++]+n[r]+o;o=Math.floor(a/67108864),n[r++]=67108863&a}return o},a=26):(r.prototype.am=function(e,t,n,r,o,a){const i=16383&t,s=t>>14;for(;--a>=0;){let t=16383&this[e];const a=this[e++]>>14,l=s*t+a*i;t=i*t+((16383&l)<<14)+n[r]+o,o=(t>>28)+(l>>14)+s*a,n[r++]=268435455&t}return o},a=28),r.prototype.DB=a,r.prototype.DM=(1<>>16)&&(e=t,n+=16),0!==(t=e>>8)&&(e=t,n+=8),0!==(t=e>>4)&&(e=t,n+=4),0!==(t=e>>2)&&(e=t,n+=2),0!==(t=e>>1)&&(e=t,n+=1),n}function h(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(t,t),t},h.prototype.revert=function(e){const t=o();return e.copyTo(t),this.reduce(t),t},h.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(let t=0;t>15)*this.mpl&this.um)<<15)&e.DM;for(n=t+this.m.t,e[n]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},h.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},h.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},r.prototype.copyTo=function(e){for(let t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},r.prototype.fromInt=function(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},r.prototype.fromString=function(e,t){let n;if(16===t)n=4;else if(8===t)n=3;else if(2===t)n=1;else if(32===t)n=5;else{if(4!==t)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");n=2}this.t=0,this.s=0;let o=e.length,a=!1,i=0;for(;--o>=0;){const t=d(e,o);t<0?"-"===e.charAt(o)&&(a=!0):(a=!1,0===i?this[this.t++]=t:i+n>this.DB?(this[this.t-1]|=(t&(1<>this.DB-i):this[this.t-1]|=t<=this.DB&&(i-=this.DB))}this.clamp(),a&&r.ZERO.subTo(this,this)},r.prototype.clamp=function(){const e=this.s&this.DM;for(;this.t>0&&this[this.t-1]==e;)--this.t},r.prototype.dlShiftTo=function(e,t){let n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},r.prototype.drShiftTo=function(e,t){for(let n=e;n=0;--i)t[i+a+1]=this[i]>>r|s,s=(this[i]&o)<=0;--i)t[i]=0;t[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()},r.prototype.rShiftTo=function(e,t){t.s=this.s;const n=Math.floor(e/this.DB);if(n>=this.t)return void(t.t=0);const r=e%this.DB,o=this.DB-r,a=(1<>r;for(let i=n+1;i>r;r>0&&(t[this.t-n-1]|=(this.s&a)<>=this.DB;if(e.t>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()},r.prototype.multiplyTo=function(e,t){const n=this.abs(),o=e.abs();let a=n.t;for(t.t=a+o.t;--a>=0;)t[a]=0;for(a=0;a=0;)e[n]=0;for(n=0;n=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},r.prototype.divRemTo=function(e,t,n){const a=e.abs();if(a.t<=0)return;const i=this.abs();if(i.t0?(a.lShiftTo(c,s),i.lShiftTo(c,n)):(a.copyTo(s),i.copyTo(n));const d=s.t,f=s[d-1];if(0===f)return;const h=f*(1<1?s[d-2]>>this.F2:0),m=this.FV/h,v=(1<=0&&(n[n.t++]=1,n.subTo(E,n)),r.ONE.dlShiftTo(d,E),E.subTo(s,s);s.t=0;){let e=n[--y]===f?this.DM:Math.floor(n[y]*m+(n[y-1]+g)*v);if((n[y]+=s.am(0,e,n,b,0,d))0&&n.rShiftTo(c,n),l<0&&r.ZERO.subTo(n,n)},r.prototype.invDigit=function(){if(this.t<1)return 0;const e=this[0];if(0===(1&e))return 0;let t=3&e;return t=t*(2-(15&e)*t)&15,t=t*(2-(255&e)*t)&255,t=t*(2-((65535&e)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t},r.prototype.addTo=function(e,t){let n=0,r=0;const o=Math.min(e.t,this.t);for(;n>=this.DB;if(e.t>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()},r.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);let t;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)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");t=2}const n=(1<0)for(s>s)>0&&(o=!0,a=c(r));i>=0;)s>(s+=this.DB-t)):(r=this[i]>>(s-=t)&n,s<=0&&(s+=this.DB,--i)),r>0&&(o=!0),o&&(a+=c(r));return o?a:"0"},r.prototype.negate=function(){const e=o();return r.ZERO.subTo(this,e),e},r.prototype.abs=function(){return this.s<0?this.negate():this},r.prototype.compareTo=function(e){let t=this.s-e.s;if(0!=t)return t;let n=this.t;if(t=n-e.t,0!=t)return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},r.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this[this.t-1]^this.s&this.DM)},r.prototype.mod=function(e){const t=o();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(r.ZERO)>0&&e.subTo(t,t),t},r.prototype.equals=function(e){return 0===this.compareTo(e)},r.prototype.add=function(e){const t=o();return this.addTo(e,t),t},r.prototype.subtract=function(e){const t=o();return this.subTo(e,t),t},r.prototype.multiply=function(e){const t=o();return this.multiplyTo(e,t),t},r.prototype.divide=function(e){const t=o();return this.divRemTo(e,t,null),t},r.prototype.modPow=function(e,t,n){let r,a=e.bitLength(),i=f(1);const s=new h(t);if(a<=0)return i;r=a<18?1:a<48?3:a<144?4:a<768?5:6;const l=[];let u=3;const c=r-1,d=(1<1){const e=o();for(s.sqrTo(l[1],e);u<=d;)l[u]=o(),s.mulTo(e,l[u-2],l[u]),u+=2}let m,v,g=e.t-1,y=!0,b=o();for(a=p(e[g])-1;g>=0;){for(a>=c?m=e[g]>>a-c&d:(m=(e[g]&(1<0&&(m|=e[g-1]>>this.DB+a-c)),u=r;0===(1&m);)m>>=1,--u;if((a-=u)<0&&(a+=this.DB,--g),y)l[m].copyTo(i),y=!1;else{for(;u>1;)s.sqrTo(i,b),s.sqrTo(b,i),u-=2;u>0?s.sqrTo(i,b):(v=i,i=b,b=v),s.mulTo(b,l[m],i)}for(;g>=0&&0===(e[g]&1<E});var r=n(2096),o=n(7767),a=n(5378);var i=n(8941),s=n(4228),l=n(6538);const u=e=>{let t="";for(let n=0;n{const t=new s.I;t.update(e);const n=t.digestSync(),r=u(n);return new Array(64-r.length).join("0")+r},d=e=>c((0,i.d)(e)),f=/^[89a-f]/i,p=e=>{if(!(e instanceof a.A))throw new Error("Not a BigInteger");const t=e.compareTo(a.A.ZERO)<0;let n=e.abs().toString(16);if(n=n.length%2!==0?`0${n}`:n,n=f.test(n)?`00${n}`:n,t){const e=n.split("").map(e=>{const t=15&~parseInt(e,16);return"0123456789ABCDEF".charAt(t)}).join("");n=new a.A(e,16).add(a.A.ONE).toString(16),n.toUpperCase().startsWith("FF8")&&(n=n.substring(2))}return n};var h=n(7886);function m(){return(0,h.MY)().getRandomValues(new Uint32Array(1))[0]}class v{constructor(e,t){this.words=[];let n=e;n=this.words=n||[],this.sigBytes=void 0!==t?t:4*n.length}random(e){const t=[];for(let n=0;n>>2]>>>24-o%4*8&255;r.push((e>>>4).toString(16)),r.push((15&e).toString(16))}return r.join("")}(this)}}const g=e=>{const t=(new v).random(e).toString();return(0,i.d)(t)};var y=n(676);class b{constructor(e){let{userPoolName:t,a:n,g:r,A:i,N:s}=e;this.encoder=o.U,this.userPoolName=t,this.a=n,this.g=r,this.A=i,this.N=s,this.k=new a.A(d(`${p(s)}${p(r)}`),16)}getRandomPassword(){if(!this.randomPassword)throw new r.l({name:"EmptyBigIntegerRandomPassword",message:"random password is empty"});return this.randomPassword}getSaltToHashDevices(){if(!this.saltToHashDevices)throw new r.l({name:"EmptyBigIntegersaltToHashDevices",message:"saltToHashDevices is empty"});return this.saltToHashDevices}getVerifierDevices(){if(!this.verifierDevices)throw new r.l({name:"EmptyBigIntegerVerifierDevices",message:"verifyDevices is empty"});return this.verifierDevices}async generateHashDevice(e,t){this.randomPassword=y.Y.convert(g(40));const n=`${e}${t}:${this.randomPassword}`,r=c(n),o=u(g(16));return this.saltToHashDevices=p(new a.A(o,16)),new Promise((e,t)=>{this.g.modPow(new a.A(d(this.saltToHashDevices+r),16),this.N,(n,r)=>{n?t(n):(this.verifierDevices=p(r),e())})})}async getPasswordAuthenticationKey(e){let{username:t,password:n,serverBValue:r,salt:o}=e;if(r.mod(this.N).equals(a.A.ZERO))throw new Error("B cannot be zero.");const l=(e=>{let{A:t,B:n}=e;const r=new a.A(d(p(t)+p(n)),16);if(r.equals(a.A.ZERO))throw new Error("U cannot be zero.");return r})({A:this.A,B:r}),u=`${this.userPoolName}${t}:${n}`,f=c(u),h=new a.A(d(p(o)+f),16),m=await(async e=>{let{a:t,g:n,k:r,x:o,B:a,N:i,U:s}=e;return new Promise((e,l)=>{n.modPow(o,i,(n,u)=>{n?l(n):a.subtract(r.multiply(u)).modPow(t.add(s.multiply(o)),i,(t,n)=>{t?l(t):e(n.mod(i))})})})})({a:this.a,g:this.g,k:this.k,x:h,B:r,N:this.N,U:l}),v=this.encoder.convert("Caldera Derived Key"),g=this.encoder.convert(String.fromCharCode(1)),y=new Uint8Array(v.byteLength+g.byteLength);y.set(v,0),y.set(g,v.byteLength);const b=((e,t,n)=>{const r=new s.I(t);r.update(e);const o=r.digestSync(),a=new s.I(o);return a.update(n),a.digestSync().slice(0,16)})((0,i.d)(p(m)),(0,i.d)(p(l)),y);return b}}const E=async e=>{const t=new a.A(l.oA,16),n=new a.A("2",16),r=S(),o=await(async e=>{let{a:t,g:n,N:r}=e;return new Promise((e,o)=>{n.modPow(t,r,(t,n)=>{t?o(t):n.mod(r).equals(a.A.ZERO)?o(new Error("Illegal parameter. A mod N cannot be 0.")):e(n)})})})({a:r,g:n,N:t});return new b({userPoolName:e,a:r,g:n,A:o,N:t})},S=()=>{const e=u(g(128));return new a.A(e,16)}},8941(e,t,n){"use strict";var r=n(6538);n.d(t,["d",0,e=>{if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n{const e=new Date,t=o[e.getUTCDay()],n=r[e.getUTCMonth()],a=e.getUTCDate();let i=e.getUTCHours();i<10&&(i=`0${i}`);let s=e.getUTCMinutes();s<10&&(s=`0${s}`);let l=e.getUTCSeconds();l<10&&(l=`0${l}`);return`${t} ${n} ${a} ${i}:${s}:${l} UTC ${e.getUTCFullYear()}`}])},4750(e,t,n){"use strict";var r=n(4228),o=n(846),a=n(676),i=n(7767);const s=e=>{const t=(e+"=".repeat((4-e.length%4)%4)).replace(/-/g,"+").replace(/_/g,"/"),n=o.m.convert(t),r=new Uint8Array(n.length);for(let o=0;o{let{userPoolName:t,username:n,challengeParameters:o,dateNow:l,hkdf:u}=e;const c=i.U.convert(t),d=i.U.convert(n),f=s(o.SECRET_BLOCK),p=i.U.convert(l),h=new Uint8Array(c.byteLength+d.byteLength+f.byteLength+p.byteLength);h.set(c,0),h.set(d,c.byteLength),h.set(f,c.byteLength+d.byteLength),h.set(p,c.byteLength+d.byteLength+f.byteLength);const m=new r.I(u);m.update(h);const v=m.digestSync();return a.Y.convert(v)}])},7767(e,t,n){"use strict";const r={convert:e=>(new TextEncoder).encode(e)};n.d(t,["U",0,r])},2242(e,t,n){"use strict";n.d(t,{H0:()=>a,OW:()=>i,O_:()=>c,X4:()=>u});var r=n(2096),o=n(7387);function a(e){if(!e||!e.accessToken)throw new r.l({name:o.zz,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}function i(e){if(!e||!e.idToken)throw new r.l({name:o.zz,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}const s=new r.l({name:o.Cs,message:"Token refresh is not supported when authenticated with the 'implicit grant' (token) oauth flow. \n\tPlease change your oauth configuration to use 'code grant' flow.",recoverySuggestion:"Please logout and change your Amplify configuration to use \"code grant\" flow. \n\tE.g { responseType: 'code' }"}),l=new r.l({name:o.zz,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."});function u(e){if(function(e){return d(e)&&!e?.refreshToken}(e))throw s;if(!function(e){return d(e)&&e?.refreshToken}(e))throw l}function c(e){if(!e||!e.deviceKey||!e.deviceGroupKey||!e.randomPassword)throw new r.l({name:o.kM,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."})}function d(e){return e?.accessToken||e?.idToken}n.d(t,["f3",0,{inflightOAuth:"inflightOAuth",oauthSignIn:"oauthSignIn",oauthPKCE:"oauthPKCE",oauthState:"oauthState"}])},3(e,t,n){"use strict";function r(e){let{username:t,userPoolId:n,userPoolClientId:r}=e;if("undefined"===typeof window)return;const o=window.AmazonCognitoAdvancedSecurityData;if("undefined"===typeof o)return;const a=o.getData(t,n,r);if(a){return{EncodedData:a}}return{}}n.d(t,{d:()=>r})},9931(e,t,n){"use strict";var r=n(5560),o=n(2600);n.d(t,["A",0,(e,t)=>(0,r.fE)({category:o.b7.Auth,action:e,...t})])},1384(e,t,n){"use strict";n.d(t,["z",0,async e=>{window?.location&&(window.location.href=e.replace("http://","https://"))}])},8173(e,t,n){"use strict";var r=n(4619),o=n(2206),a=n(1439);const i="undefined"!==typeof Symbol?Symbol("amplify_default"):"@@amplify_default",s=new r.C("Hub");class l{constructor(e){this.listeners=new Map,this.protectedChannels=["core","auth","api","analytics","interactions","pubsub","storage","ui","xr"],this.name=e}_remove(e,t){const n=this.listeners.get(e);n?this.listeners.set(e,[...n.filter(e=>{let{callback:n}=e;return n!==t})]):s.warn(`No listeners for ${e}`)}dispatch(e,t,n,r){if("string"===typeof e&&this.protectedChannels.indexOf(e)>-1){r===i||s.warn(`WARNING: ${e} is protected and dispatching on it can have unintended consequences`)}const o={channel:e,payload:{...t},source:n,patternInfo:[]};try{this._toListeners(o)}catch(a){s.error(a)}}listen(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"noname";if("function"!==typeof t)throw new a.x({name:o.d1,message:"No callback supplied to Hub"});n=t;let i=this.listeners.get(e);return i||(i=[],this.listeners.set(e,i)),i.push({name:r,callback:n}),()=>{this._remove(e,n)}}_toListeners(e){const{channel:t,payload:n}=e,r=this.listeners.get(t);r&&r.forEach(r=>{s.debug(`Dispatching to ${t} with `,n);try{r.callback(e)}catch(o){s.error(o)}})}}const u=new l("__default__"),c=new l("internal-hub");n.d(t,["U9",0,i,"YZ",0,u,"f3",0,c])},4619(e,t,n){"use strict";n.d(t,{C:()=>i});var r,o=n(2206);!function(e){e.DEBUG="DEBUG",e.ERROR="ERROR",e.INFO="INFO",e.WARN="WARN",e.VERBOSE="VERBOSE",e.NONE="NONE"}(r||(r={}));const a={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,NONE:6};class i{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.WARN;this.name=e,this.level=t,this._pluggables=[]}_padding(e){return e<10?"0"+e:""+e}_ts(){const e=new Date;return[this._padding(e.getMinutes()),this._padding(e.getSeconds())].join(":")+"."+e.getMilliseconds()}configure(e){return e?(this._config=e,this._config):this._config}_log(e){let t=this.level;i.LOG_LEVEL&&(t=i.LOG_LEVEL),"undefined"!==typeof window&&window.LOG_LEVEL&&(t=window.LOG_LEVEL);if(!(a[e]>=a[t]))return;let n=console.log.bind(console);e===r.ERROR&&console.error&&(n=console.error.bind(console)),e===r.WARN&&console.warn&&(n=console.warn.bind(console)),i.BIND_ALL_LOG_LEVELS&&(e===r.INFO&&console.info&&(n=console.info.bind(console)),e===r.DEBUG&&console.debug&&(n=console.debug.bind(console)));const o=`[${e}] ${this._ts()} ${this.name}`;let s="";for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c{r[e.category]=e.apis.reduce((t,n)=>({...t,[n]:{refCount:t[n]?.refCount?t[n].refCount+1:1,additionalDetails:e.additionalDetails}}),r[e.category]??{});let t=!1;return()=>{t||(t=!0,e.apis.forEach(t=>{const n=r[e.category][t].refCount;n>1?r[e.category][t].refCount=n-1:(delete r[e.category][t],Object.keys(r[e.category]).length||delete r[e.category])}))}},"e",0,(e,t)=>r[e]?.[t]?.additionalDetails])},5560(e,t,n){"use strict";n.d(t,{fE:()=>y});var r=n(2600);const o=()=>"undefined"!==typeof globalThis,a=()=>"undefined"!==typeof window,i=()=>"undefined"!==typeof document,s=()=>"undefined"!==typeof process,l=(e,t)=>!!Object.keys(e).find(e=>e.startsWith(t));const u=[{platform:r.dT.Expo,detectionMethod:function(){return o()&&"undefined"!==typeof globalThis.expo}},{platform:r.dT.ReactNative,detectionMethod:function(){return"undefined"!==typeof navigator&&"undefined"!==typeof navigator.product&&"ReactNative"===navigator.product}},{platform:r.dT.NextJs,detectionMethod:function(){return a()&&window.next&&"object"===typeof window.next}},{platform:r.dT.Nuxt,detectionMethod:function(){return a()&&(void 0!==window.__NUXT__||void 0!==window.$nuxt)}},{platform:r.dT.Angular,detectionMethod:function(){const e=Boolean(i()&&document.querySelector("[ng-version]")),t=Boolean(a()&&"undefined"!==typeof window.ng);return e||t}},{platform:r.dT.React,detectionMethod:function(){const e=e=>e.startsWith("_react")||e.startsWith("__react");return i()&&Array.from(document.querySelectorAll("[id]")).some(t=>Object.keys(t).find(e))}},{platform:r.dT.VueJs,detectionMethod:function(){return a()&&l(window,"__VUE")}},{platform:r.dT.Svelte,detectionMethod:function(){return a()&&l(window,"__SVELTE")}},{platform:r.dT.WebUnknown,detectionMethod:function(){return a()}},{platform:r.dT.NextJsSSR,detectionMethod:function(){return o()&&(l(globalThis,"__next")||l(globalThis,"__NEXT"))}},{platform:r.dT.NuxtSSR,detectionMethod:function(){return o()&&"undefined"!==typeof globalThis.__NUXT_PATHS__}},{platform:r.dT.ReactSSR,detectionMethod:function(){return s()&&!!Object.keys({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}).find(e=>e.includes("react"))}},{platform:r.dT.VueJsSSR,detectionMethod:function(){return o()&&l(globalThis,"__VUE")}},{platform:r.dT.AngularSSR,detectionMethod:function(){return s(),!1}},{platform:r.dT.SvelteSSR,detectionMethod:function(){return s()&&!!Object.keys({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}).find(e=>e.includes("svelte"))}}];let c;const d=[];let f=!1;const p=()=>{if(!c){if(c=u.find(e=>e.detectionMethod())?.platform||r.dT.ServerSideUnknown,f)for(;d.length;)d.pop()?.();else d.forEach(e=>{e()});h(r.dT.ServerSideUnknown,10),h(r.dT.WebUnknown,10)}return c};function h(e,t){c!==e||f||setTimeout(()=>{c=void 0,f=!0,setTimeout(p,1e3)},t)}var m=n(6920);const v="aws-amplify",g=e=>e.replace(/\+.*/,"");new class{constructor(){this.userAgent=`${v}/${g("6.20.0")}`}get framework(){return p()}get isReactNative(){return this.framework===r.dT.ReactNative||this.framework===r.dT.Expo}observeFrameworkChanges(e){(e=>{f||d.push(e)})(e)}};const y=e=>{const t=function(){let{category:e,action:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=[[v,g("6.20.0")]];if(e&&n.push([e,t]),n.push(["framework",p()]),e&&t){const r=(0,m.e)(e,t);r&&r.forEach(e=>{n.push(e)})}return n}(e);return t.map(e=>{let[t,n]=e;return t&&n?`${t}/${n}`:t}).join(" ")}},2600(e,t,n){"use strict";var r,o,a,i,s,l,u,c,d,f,p,h,m,v;n.d(t,{BM:()=>l,ID:()=>c,b7:()=>o,dT:()=>r,r5:()=>d,rn:()=>a,sZ:()=>v}),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"}(r||(r={})),function(e){e.AI="ai",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"}(o||(o={})),function(e){e.CreateConversation="1",e.GetConversation="2",e.ListConversations="3",e.DeleteConversation="4",e.SendMessage="5",e.ListMessages="6",e.OnMessage="7",e.Generation="8",e.UpdateConversation="9"}(a||(a={})),function(e){e.Record="1",e.IdentifyUser="2"}(i||(i={})),function(e){e.GraphQl="1",e.Get="2",e.Post="3",e.Put="4",e.Patch="5",e.Del="6",e.Head="7"}(s||(s={})),function(e){e.SignUp="1",e.ConfirmSignUp="2",e.ResendSignUpCode="3",e.SignIn="4",e.FetchMFAPreference="6",e.UpdateMFAPreference="7",e.SetUpTOTP="10",e.VerifyTOTPSetup="11",e.ConfirmSignIn="12",e.DeleteUserAttributes="15",e.DeleteUser="16",e.UpdateUserAttributes="17",e.FetchUserAttributes="18",e.ConfirmUserAttribute="22",e.SignOut="26",e.UpdatePassword="27",e.ResetPassword="28",e.ConfirmResetPassword="29",e.FederatedSignIn="30",e.RememberDevice="32",e.ForgetDevice="33",e.FetchDevices="34",e.SendUserAttributeVerificationCode="35",e.SignInWithRedirect="36",e.StartWebAuthnRegistration="37",e.CompleteWebAuthnRegistration="38",e.ListWebAuthnCredentials="39",e.DeleteWebAuthnCredential="40"}(l||(l={})),function(e){e.Subscribe="1",e.GraphQl="2"}(u||(u={})),function(e){e.SearchByText="0",e.SearchByCoordinates="1",e.SearchForSuggestions="2",e.SearchByPlaceId="3",e.SaveGeofences="4",e.GetGeofence="5",e.ListGeofences="6",e.DeleteGeofences="7"}(c||(c={})),function(e){e.SyncMessages="1",e.IdentifyUser="2",e.NotifyMessageInteraction="3"}(d||(d={})),function(e){e.None="0"}(f||(f={})),function(e){e.Convert="1",e.Identify="2",e.Interpret="3"}(p||(p={})),function(e){e.Subscribe="1"}(h||(h={})),function(e){e.InitializePushNotifications="1",e.IdentifyUser="2",e.RegisterDevice="3",e.RemoveDevice="4"}(m||(m={})),function(e){e.UploadData="1",e.DownloadData="2",e.List="3",e.Copy="4",e.Remove="5",e.GetProperties="6",e.GetUrl="7",e.GetDataAccess="8",e.ListCallerAccessGrants="9"}(v||(v={}))},3249(e,t,n){"use strict";n.d(t,{R:()=>a});const r={id:"aws",outputs:{dnsSuffix:"amazonaws.com"},regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",regions:["aws-global"]},o={partitions:[r,{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn"},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:["aws-cn-global"]}]},a=e=>{const{partitions:t}=o;for(const{regions:n,outputs:r,regionRegex:o}of t){const t=new RegExp(o);if(n.includes(e)||t.test(e))return r.dnsSuffix}return r.outputs.dnsSuffix}},6129(e,t,n){"use strict";n.d(t,{F:()=>g});const r=(e,t)=>{if(t?.aborted)return Promise.resolve();let n,r;const o=new Promise(t=>{r=t,n=setTimeout(t,e)});return t?.addEventListener("abort",function e(o){clearTimeout(n),t?.removeEventListener("abort",e),r()}),o},o=(e,t)=>{"[object Object]"===Object.prototype.toString.call(e)&&(e.$metadata={...e.$metadata??{},attempts:t})},a={randomUUID:"undefined"!==typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let i;const s=new Uint8Array(16);const l=[];for(let y=0;y<256;++y)l.push((y+256).toString(16).slice(1));function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase()}const c=function(e,t,n){if(a.randomUUID&&!t&&!e)return a.randomUUID();const r=(e=e||{}).random??e.rng?.()??function(){if(!i){if("undefined"===typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");i=crypto.getRandomValues.bind(crypto)}return i(s)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return u(r)};n(4228),n(1547);const d="amz-sdk-invocation-id";var f=n(5909),p=n(1439),h=n(4464);const m=e=>{let t;return()=>(t||(t=e()),t)},v=e=>!["HEAD","GET"].includes(e.toUpperCase()),g=(0,f.q)(async(e,t)=>{let n,{url:r,method:o,headers:a,body:i}=e,{abortSignal:s,cache:l,withCrossDomainCredentials:u}=t;try{n=await fetch(r,{method:o,headers:a,body:v(o)?i:void 0,signal:s,cache:l,credentials:u?"include":"same-origin"})}catch(d){if(d instanceof TypeError)throw new p.x({name:h.m.NetworkError,message:"A network error has occurred.",underlyingError:d});throw d}const c={};n.headers?.forEach((e,t)=>{c[t.toLowerCase()]=e});return{...{statusCode:n.status,headers:c,body:null},body:Object.assign(n.body??{},{text:m(()=>n.text()),blob:m(()=>n.blob()),json:m(()=>n.json())})}},[e=>{let{userAgentHeader:t="x-amz-user-agent",userAgentValue:n=""}=e;return e=>async function(r){if(0===n.trim().length){return await e(r)}{const o=t.toLowerCase();r.headers[o]=r.headers[o]?`${r.headers[o]} ${n}`:n;return await e(r)}}},()=>e=>async function(t){return t.headers[d]||(t.headers[d]=c()),e(t)},e=>{let{maxAttempts:t=3,retryDecider:n,computeDelay:a,abortSignal:i}=e;if(t<1)throw new Error("maxAttempts must be greater than 0");return(e,s)=>async function(l){let u,c,d=s.attemptsCount??0;const f=()=>{if(c)return o(c,d),c;throw o(u,d),u};for(;!i?.aborted&&dd?s.attemptsCount??0:d+1,s.attemptsCount=d;const{isCredentialsExpiredError:o,retryable:h}=await n(c,u,s);if(!h)return f();if(s.isCredentialsExpired=!!o,!i?.aborted&&d{let{maxAttempts:t=3}=e;return(e,n)=>async function(r){const o=n.attemptsCount??0;return r.headers["amz-sdk-request"]=`attempt=${o+1}; max=${t}`,e(r)}}])},7161(e,t,n){"use strict";n.d(t,["A",0,(e,t,n,r)=>async(o,a)=>{const i={...r,...o},s=await i.endpointResolver(i,a),l=await t(a,s),u=await e(l,{...i});return n(u)}])},5909(e,t,n){"use strict";n.d(t,["q",0,(e,t)=>(n,r)=>{const o={};let a=t=>e(t,r);for(let e=t.length-1;e>=0;e--){a=(0,t[e])(r)(a,o)}return a(n)}])},5122(e,t,n){"use strict";n.d(t,{D:()=>a});var r=n(4464);const o=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch","BadRequestException"],a=e=>async(t,n)=>{const r=n??await e(t)??void 0,a=r?.code||r?.name,i=t?.statusCode;return{retryable:u(n)||l(i,a)||(e=>!!e&&o.includes(e))(a)||c(i,a)}},i=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException"],s=["TimeoutError","RequestTimeout","RequestTimeoutException"],l=(e,t)=>429===e||!!t&&i.includes(t),u=e=>[r.m.NetworkError,"ERR_NETWORK"].includes(e?.name),c=(e,t)=>!!e&&[500,502,503,504].includes(e)||!!t&&s.includes(t)},9209(e,t,n){"use strict";n.d(t,{y:()=>r});const r=e=>{const t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e5;return t=>{const n=2**t*100+100*Math.random();return!(n>e)&&n}}(3e5),n=t(e);return!1===n?3e5:n}},1068(e,t,n){"use strict";var r=n(3827);const o=async e=>{if(!e.body)throw new Error("Missing response payload");const t=await e.body.json();return Object.assign(t,{$metadata:(0,r.j)(e)})};n.d(t,["F",0,async e=>{if(!e||e.statusCode<300)return;const t=await o(e),n=(e=>{const[t]=e.toString().split(/[,:]+/);return t.includes("#")?t.split("#")[1]:t})(e.headers["x-amzn-errortype"]??t.code??t.__type??"UnknownError"),a=t.message??t.Message??"Unknown error",i=new Error(a);return Object.assign(i,{name:n,$metadata:(0,r.j)(e)})},"Y",0,o])},3827(e,t,n){"use strict";const r=e=>"object"===typeof e?.$metadata;n.d(t,["j",0,e=>{const{headers:t,statusCode:n}=e;return{...r(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"]}}])},2206(e,t,n){"use strict";n.d(t,["OU",0,"Logging","YJ",0,"x-amz-user-agent","d1",0,"NoHubcallbackProvidedException"])},1439(e,t,n){"use strict";n.d(t,{x:()=>r});class r extends Error{constructor(e){let{message:t,name:n,recoverySuggestion:o,underlyingError:a,metadata:i}=e;if(super(t),this.name=n,this.underlyingError=a,this.recoverySuggestion=o,i){const{extendedRequestId:e,httpStatusCode:t,requestId:n}=i;this.metadata={extendedRequestId:e,httpStatusCode:t,requestId:n}}this.constructor=r,Object.setPrototypeOf(this,r.prototype)}}},8895(e,t,n){"use strict";var r=n(1439);n.d(t,["p",0,function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.x;return(n,r,o)=>{const{message:a,recoverySuggestion:i}=e[r];if(!n)throw new t({name:r,message:o?`${a} ${o}`:a,recoverySuggestion:i})}}])},3413(e,t,n){"use strict";n.d(t,{H:()=>d});var r=n(8173);const o=e=>{const t=Reflect.ownKeys(e);for(const n of t){const t=e[n];(t&&"object"===typeof t||"function"===typeof t)&&o(t)}return Object.freeze(e)};var a=n(4492),i=n(1095);n(4228),n(1547);const s=new(n(4619).C)("Auth");class l{configure(e,t){this.authConfig=e,this.authOptions=t,e&&e.Cognito?.userPoolEndpoint&&s.warn(u("Amazon Cognito User Pool")),e&&e.Cognito?.identityPoolEndpoint&&s.warn(u("Amazon Cognito Identity Pool"))}async fetchAuthSession(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=await this.getTokens(n);return r?(t=r.accessToken?.payload?.sub,e=await(this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,tokens:r,authenticated:!0,forceRefresh:n.forceRefresh}))):e=await(this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,authenticated:!1,forceRefresh:n.forceRefresh})),{tokens:r,credentials:e?.credentials,identityId:e?.identityId,userSub:t}}async clearCredentials(){await(this.authOptions?.credentialsProvider?.clearCredentialsAndIdentityId())}async getTokens(e){return await(this.authOptions?.tokenProvider?.getTokens(e))??void 0}}const u=e=>`You are using a custom Amazon ${e} endpoint, ensure the endpoint is correct.`;class c{constructor(){this.oAuthListener=void 0,this.isConfigured=!1,this.resourcesConfig={},this.libraryOptions={},this.Auth=new l}configure(e,t){const n=(0,i.M)(e);this.resourcesConfig=n,t&&(this.libraryOptions=t),this.resourcesConfig=o(this.resourcesConfig),this.Auth.configure(this.resourcesConfig.Auth,this.libraryOptions.Auth),(this.resourcesConfig.Analytics?.Pinpoint||this.resourcesConfig.Notifications?.InAppMessaging?.Pinpoint||this.resourcesConfig.Notifications?.PushNotification?.Pinpoint)&&console.warn("AWS will end support for Amazon Pinpoint on October 30, 2026. The guidance is to use AWS End User Messaging for push notifications and SMS, Amazon Simple Email Service for sending emails, Amazon Connect for campaigns, journeys, endpoints, and engagement analytics. Pinpoint recommends Amazon Kinesis for event collection and mobile analytics."),r.YZ.dispatch("core",{event:"configure",data:this.resourcesConfig},"Configure",r.U9),this.notifyOAuthListener(),this.isConfigured=!0}getConfig(){return this.isConfigured||console.warn("Amplify has not been configured. Please call Amplify.configure() before using this service."),this.resourcesConfig}[a.$](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)}}const d=new c},2770(e,t,n){"use strict";n.d(t,{Eh:()=>c,G6:()=>u,$y:()=>l,Cq:()=>d});var r,o=n(846),a=n(8895);!function(e){e.AuthTokenConfigException="AuthTokenConfigException",e.AuthUserPoolAndIdentityPoolException="AuthUserPoolAndIdentityPoolException",e.AuthUserPoolException="AuthUserPoolException",e.InvalidIdentityPoolIdException="InvalidIdentityPoolIdException",e.OAuthNotConfigureException="OAuthNotConfigureException"}(r||(r={}));const i={[r.AuthTokenConfigException]:{message:"Auth Token Provider not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app."},[r.AuthUserPoolAndIdentityPoolException]:{message:"Auth UserPool or IdentityPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId."},[r.AuthUserPoolException]:{message:"Auth UserPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId."},[r.InvalidIdentityPoolIdException]:{message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."},[r.OAuthNotConfigureException]:{message:"oauth param not configured.",recoverySuggestion:"Make sure to call Amplify.configure with oauth parameter in your app."}},s=(0,a.p)(i);function l(e){let t=!0;t=!!e&&(!!e.userPoolId&&!!e.userPoolClientId),s(t,r.AuthUserPoolException)}function u(e){s(!!e?.loginWith?.oauth?.domain&&!!e?.loginWith?.oauth?.redirectSignOut&&!!e?.loginWith?.oauth?.redirectSignIn&&!!e?.loginWith?.oauth?.responseType,r.OAuthNotConfigureException)}function c(e){s(!!e?.identityPoolId,r.InvalidIdentityPoolIdException)}function d(e){const t=e.split(".");if(3!==t.length)throw new Error("Invalid token");try{const n=t[1].replace(/-/g,"+").replace(/_/g,"/"),r=decodeURIComponent(o.m.convert(n).split("").map(e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`).join(""));return{toString:()=>e,payload:JSON.parse(r)}}catch(n){throw new Error("Invalid token payload")}}},9731(e,t,n){"use strict";var r=n(3413),o=n(8059);n.d(t,["$",0,e=>(0,o.$)(r.H,e)])},8059(e,t,n){"use strict";n.d(t,["$",0,(e,t)=>e.Auth.fetchAuthSession(t)])},4492(e,t,n){"use strict";const r=Symbol("oauth-listener");n.d(t,["$",0,r])},8937(e,t,n){"use strict";n.d(t,{ZL:()=>f,pR:()=>p});var r=n(4464),o=n(1439);class a extends o.x{constructor(){super({name:r.m.PlatformNotSupported,message:"Function not supported on current platform"})}}class i{constructor(e){this.storage=e}async setItem(e,t){if(!this.storage)throw new a;this.storage.setItem(e,t)}async getItem(e){if(!this.storage)throw new a;return this.storage.getItem(e)}async removeItem(e){if(!this.storage)throw new a;this.storage.removeItem(e)}async clear(){if(!this.storage)throw new a;this.storage.clear()}}var s=n(4619);class l{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()}}const u=new s.C("CoreStorageUtils"),c=()=>{try{if("undefined"!==typeof window&&window.sessionStorage)return window.sessionStorage.getItem("test"),window.sessionStorage;throw new Error("sessionStorage is not defined")}catch(e){return u.info("sessionStorage not found. InMemoryStorage is used as a fallback."),new l}};class d{constructor(e){this._storage=e}get storage(){if(!this._storage)throw new a;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()}}const f=new class extends i{constructor(){super((()=>{try{if("undefined"!==typeof window&&window.localStorage)return window.localStorage}catch(e){u.info("localStorage not found. InMemoryStorage is used as a fallback.")}return new l})())}},p=(new class extends i{constructor(){super(c())}},new class extends d{constructor(){super(c())}});new i(new l)},4464(e,t,n){"use strict";var r;n.d(t,{m:()=>r}),function(e){e.NoEndpointId="NoEndpointId",e.PlatformNotSupported="PlatformNotSupported",e.Unknown="Unknown",e.NetworkError="NetworkError"}(r||(r={}))},727(e,t,n){"use strict";const r=URL;n.d(t,["o",0,r])},846(e,t,n){"use strict";var r=n(7886);const o={convert(e,t){let n=e;return t?.urlSafe&&(n=n.replace(/-/g,"+").replace(/_/g,"/")),(0,r.nW)()(n)}};n.d(t,["m",0,o])},676(e,t,n){"use strict";n.d(t,{Y:()=>o});var r=n(7886);const o={convert(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{urlSafe:!1,skipPadding:!1};const n="string"===typeof e?e:function(e){return Array.from(e,e=>String.fromCodePoint(e)).join("")}(e);let o=(0,r.xA)()(n);return t.urlSafe&&(o=o.replace(/\+/g,"-").replace(/\//g,"_")),t.skipPadding&&(o=o.replace(/=/g,"")),o}}},7886(e,t,n){"use strict";var r=n(1439);n.d(t,["MY",0,()=>{if("object"===typeof window&&"object"===typeof window.crypto)return window.crypto;if("object"===typeof crypto)return crypto;throw new r.x({name:"MissingPolyfill",message:"Cannot resolve the `crypto` function from the environment."})},"nW",0,()=>{if("undefined"!==typeof window&&"function"===typeof window.atob)return window.atob;if("function"===typeof atob)return atob;throw new r.x({name:"Base64EncoderError",message:"Cannot resolve the `atob` function from the environment."})},"xA",0,()=>{if("undefined"!==typeof window&&"function"===typeof window.btoa)return window.btoa;if("function"===typeof btoa)return btoa;throw new r.x({name:"Base64EncoderError",message:"Cannot resolve the `btoa` function from the environment."})}])},4163(e,t,n){"use strict";n.d(t,["B",0,()=>"undefined"!==typeof window&&"undefined"!==typeof window.document])},1095(e,t,n){"use strict";n.d(t,{M:()=>g});var r=n(4619),o=n(1439);const a=new r.C("parseAWSExports"),i={API_KEY:"apiKey",AWS_IAM:"iam",AMAZON_COGNITO_USER_POOLS:"userPool",OPENID_CONNECT:"oidc",NONE:"none",AWS_LAMBDA:"lambda",LAMBDA:"lambda"},s=e=>e?.split(",")??[],l=e=>{let{domain:t,scope:n,redirectSignIn:r,redirectSignOut:o,responseType:a}=e;return{domain:t,scopes:n,redirectSignIn:s(r),redirectSignOut:s(o),responseType:a}},u=e=>e.map(e=>{const t=e.toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)});function c(e){const t={};if(e.storage&&(t.Storage=function(e){if(!e)return;const{bucket_name:t,aws_region:n,buckets:r}=e;return{S3:{bucket:t,region:n,buckets:r&&v(r)}}}(e.storage)),e.auth&&(t.Auth=function(e){if(!e)return;const{user_pool_id:t,user_pool_client_id:n,identity_pool_id:r,password_policy:o,mfa_configuration:a,mfa_methods:i,unauthenticated_identities_enabled:s,oauth:l,username_attributes:u,standard_required_attributes:c,groups:d,passwordless:f}=e,p={Cognito:{userPoolId:t,userPoolClientId:n,groups:d}};return r&&(p.Cognito={...p.Cognito,identityPoolId:r}),o&&(p.Cognito.passwordFormat={requireLowercase:o.require_lowercase,requireNumbers:o.require_numbers,requireUppercase:o.require_uppercase,requireSpecialCharacters:o.require_symbols,minLength:o.min_length??6}),a&&(p.Cognito.mfa={status:m(a),smsEnabled:i?.includes("SMS"),totpEnabled:i?.includes("TOTP")}),s&&(p.Cognito.allowGuestAccess=s),l&&(p.Cognito.loginWith={oauth:{domain:l.domain,redirectSignIn:l.redirect_sign_in_uri,redirectSignOut:l.redirect_sign_out_uri,responseType:"token"===l.response_type?"token":"code",scopes:l.scopes,providers:h(l.identity_providers)}}),u&&(p.Cognito.loginWith={...p.Cognito.loginWith,email:u.includes("email"),phone:u.includes("phone_number"),username:u.includes("username")}),c&&(p.Cognito.userAttributes=c.reduce((e,t)=>({...e,[t]:{required:!0}}),{})),f&&(p.Cognito.passwordless={emailOtpEnabled:f.email_otp_enabled,smsOtpEnabled:f.sms_otp_enabled,webAuthn:f.web_authn?{relyingPartyId:f.web_authn.relying_party_id,userVerification:f.web_authn.user_verification}:void 0,preferredChallenge:f.preferred_challenge}),p}(e.auth)),e.analytics&&(t.Analytics=function(e){if(!e?.amazon_pinpoint)return;const{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;const{aws_region:t,geofence_collections:n,maps:r,search_indices:o}=e;return{LocationService:{region:t,searchIndices:o,geofenceCollections:n,maps:r}}}(e.geo)),e.data&&(t.API=function(e){if(!e)return;const{aws_region:t,default_authorization_type:n,url:r,api_key:o,model_introspection:a}=e;return{GraphQL:{endpoint:r,defaultAuthMode:f(n),region:t,apiKey:o,modelIntrospection:a}}}(e.data)),e.custom){const n=function(e){if(!e?.events)return;const{url:t,aws_region:n,api_key:r,default_authorization_type:o}=e.events;return{Events:{endpoint:t,defaultAuthMode:f(o),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;const{aws_region:t,channels:n,amazon_pinpoint_app_id:r,amazon_connect:o}=e,a=n??[],i=a.includes("IN_APP_MESSAGING"),s=a.includes("APNS")||a.includes("FCM");if(!(i||s||o))return;const l={};i&&r&&t&&(l.InAppMessaging={Pinpoint:{appId:r,region:t}});const u={};return s&&r&&t&&(u.Pinpoint={appId:r,region:t}),o&&(u.CustomerProfiles={endpoint:o.endpoint,region:o.aws_region}),Object.keys(u).length>0&&(l.PushNotification=u),l}(e.notifications)),t}const d={AMAZON_COGNITO_USER_POOLS:"userPool",API_KEY:"apiKey",AWS_IAM:"iam",AWS_LAMBDA:"lambda",OPENID_CONNECT:"oidc"};function f(e){return d[e]}const p={GOOGLE:"Google",LOGIN_WITH_AMAZON:"Amazon",FACEBOOK:"Facebook",SIGN_IN_WITH_APPLE:"Apple"};function h(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((e,t)=>(void 0!==p[t]&&e.push(p[t]),e),[])}function m(e){return"OPTIONAL"===e?"optional":"REQUIRED"===e?"on":"off"}function v(e){const t={};return e.forEach(e=>{let{name:n,bucket_name:r,aws_region:o,paths:a}=e;if(n in t)throw new Error(`Duplicate friendly name found: ${n}. Name must be unique.`);const i=a?Object.entries(a).reduce((e,t)=>{let[n,r]=t;return void 0!==r&&(e[n]=r),e},{}):void 0;t[n]={bucketName:r,region:o,paths:i}}),t}const g=e=>Object.keys(e).some(e=>e.startsWith("aws_"))?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Object.prototype.hasOwnProperty.call(e,"aws_project_region"))throw new o.x({name:"InvalidParameterException",message:"Invalid config parameter.",recoverySuggestion:"Ensure passing the config object imported from `amplifyconfiguration.json`."});const{aws_appsync_apiKey:t,aws_appsync_authenticationType:n,aws_appsync_graphqlEndpoint:r,aws_appsync_region:s,aws_bots_config:c,aws_cognito_identity_pool_id:d,aws_cognito_sign_up_verification_method:f,aws_cognito_mfa_configuration:p,aws_cognito_mfa_types:h,aws_cognito_password_protection_settings:m,aws_cognito_verification_mechanisms:v,aws_cognito_signup_attributes:g,aws_cognito_social_providers:y,aws_cognito_username_attributes:b,aws_mandatory_sign_in:E,aws_mobile_analytics_app_id:S,aws_mobile_analytics_app_region:C,aws_user_files_s3_bucket:w,aws_user_files_s3_bucket_region:x,aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing:k,aws_user_pools_id:_,aws_user_pools_web_client_id:I,geo:A,oauth:P,predictions:T,aws_cloud_logic_custom:N,Notifications:R,modelIntrospection:O}=e,M={};S&&(M.Analytics={Pinpoint:{appId:S,region:C}});const{InAppMessaging:U,Push:D}=R??{};if(U?.AWSPinpoint||D?.AWSPinpoint){if(U?.AWSPinpoint){const{appId:e,region:t}=U.AWSPinpoint;M.Notifications={InAppMessaging:{Pinpoint:{appId:e,region:t}}}}if(D?.AWSPinpoint){const{appId:e,region:t}=D.AWSPinpoint;M.Notifications={...M.Notifications,PushNotification:{Pinpoint:{appId:e,region:t}}}}}if(Array.isArray(c)&&(M.Interactions={LexV1:Object.fromEntries(c.map(e=>[e.name,e]))}),r){const e=i[n];e||a.debug(`Invalid authentication type ${n}. Falling back to IAM.`),M.API={GraphQL:{endpoint:r,apiKey:t,region:s,defaultAuthMode:e??"iam"}},O&&(M.API.GraphQL.modelIntrospection=O)}const F=p?{status:p&&p.toLowerCase(),totpEnabled:h?.includes("TOTP")??!1,smsEnabled:h?.includes("SMS")??!1}:void 0,L=m?{minLength:m.passwordPolicyMinLength,requireLowercase:m.passwordPolicyCharacters?.includes("REQUIRES_LOWERCASE")??!1,requireUppercase:m.passwordPolicyCharacters?.includes("REQUIRES_UPPERCASE")??!1,requireNumbers:m.passwordPolicyCharacters?.includes("REQUIRES_NUMBERS")??!1,requireSpecialCharacters:m.passwordPolicyCharacters?.includes("REQUIRES_SYMBOLS")??!1}:void 0,z=Array.from(new Set([...v??[],...g??[]])).reduce((e,t)=>({...e,[t.toLowerCase()]:{required:!0}}),{}),W=b?.includes("EMAIL")??!1,j=b?.includes("PHONE_NUMBER")??!1;(d||_)&&(M.Auth={Cognito:{identityPoolId:d,allowGuestAccess:"enable"!==E,signUpVerificationMethod:f,userAttributes:z,userPoolClientId:I,userPoolId:_,mfa:F,passwordFormat:L,loginWith:{username:!(W||j),email:W,phone:j}}});const B=!!P&&Object.keys(P).length>0,H=!!y&&y.length>0;if(M.Auth&&B&&(M.Auth.Cognito.loginWith={...M.Auth.Cognito.loginWith,oauth:{...l(P),...H&&{providers:u(y)}}}),w&&(M.Storage={S3:{bucket:w,region:x,dangerouslyConnectToHttpEndpointForTesting:k}}),A){const{amazon_location_service:e}=A;M.Geo={LocationService:{maps:e.maps,geofenceCollections:e.geofenceCollections,searchIndices:e.search_indices,region:e.region}}}if(N&&(M.API={...M.API,REST:N.reduce((e,t)=>{const{name:n,endpoint:r,region:o,service:a}=t;return{...e,[n]:{endpoint:r,...a?{service:a}:void 0,...o?{region:o}:void 0}}},{})}),T){const{VoiceId:e}=T?.convert?.speechGenerator?.defaults??{};M.Predictions=e?{...T,convert:{...T.convert,speechGenerator:{...T.convert.speechGenerator,defaults:{voiceId:e}}}}:T}return M}(e):function(e){const{version:t}=e;return!!t&&t.startsWith("1")}(e)?c(e):e}};const t={};function n(r){const o=t[r];if(void 0!==o)return o.exports;const a=t[r]={id:r,loaded:!1,exports:{}};return e[r](a,a.exports,n),a.loaded=!0,a.exports}n.m=e,n.cw=e=>{var t;return()=>{if(e){var n=e;e=0,t={exports:{}},n.call(t.exports,t,t.exports)}return t.exports}},(()=>{const e=Object.getPrototypeOf;let t;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"===typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"===typeof r.then)return r}const a=Object.create(null);n.r(a);const i={};t||=[null,e({}),e([]),e(e)];for(var s=2&o&&r;("object"==typeof s||"function"==typeof s)&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach(e=>i[e]=()=>r[e]);return i.default=()=>r,n.d(a,i),a}})(),n.d=(e,t)=>{if(Array.isArray(t))for(var r=0;rPromise.all(Object.keys(n.f).reduce((t,r)=>(n.f[r](e,t),t),[])),n.u=e=>"static/js/"+e+"."+{8:"9d5dd638",453:"ca3ee05e"}[e]+".chunk.js",n.miniCssF=e=>{},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e={},t="react-app:";n.l=(r,o,a,i)=>{if(e[r])return void e[r].push(o);let s,l;if(void 0!==a){const e=document.getElementsByTagName("script");for(var u=0;u{s.onerror=s.onload=null,clearTimeout(d);const o=e[r];if(delete e[r],s.parentNode?.removeChild(s),o?.forEach(e=>e(n)),t)return t(n)},d=setTimeout(c.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=c.bind(null,s.onerror),s.onload=c.bind(null,s.onload),l&&document.head.appendChild(s)}})(),n.r=e=>{Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.p="/",(()=>{const e={792:0};n.f.j=(t,r)=>{let o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{const a=new Promise((n,r)=>o=e[t]=[n,r]);r.push(o[2]=a);const i=new Error,s=r=>{if(n.o(e,t)&&(o=e[t],0!==o&&(e[t]=void 0),o)){const e=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;i.message="Loading chunk "+t+" failed.\n("+e+": "+n+")",i.name="ChunkLoadError",i.type=e,i.request=n,i.event=r,o[1](i)}};n.l(n.p+n.u(t),s,"chunk-"+t,t)}};const t=(t,r)=>{let[o,a,i]=r;var s,l,u=0;if(o.some(t=>0!==e[t])){for(s in a)n.o(a,s)&&(n.m[s]=a[s]);if(i)i(n)}for(t&&t(r);u{"use strict";var e=n.cw(function(e,t){var n=c(),r=s(),a=o();function i(e){var t="https://react.dev/errors/"+e;if(1W||(e.current=z[W],z[W]=null,W--)}function H(e,t){W++,z[W]=e.current,e.current=t}var $,V,q=j(null),G=j(null),K=j(null),Y=j(null);function Z(e,t){switch(H(K,t),H(G,e),H(q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?bd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=Ed(t=bd(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(q),H(q,e)}function Q(){B(q),B(G),B(K)}function J(e){null!==e.memoizedState&&H(Y,e);var t=q.current,n=Ed(t,e.type);t!==n&&(H(G,e),H(q,n))}function X(e){G.current===e&&(B(q),B(G)),Y.current===e&&(B(Y),pf._currentValue=L)}function ee(e){if(void 0===$)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);$=t&&t[1]||"",V=-1)":-1--o||l[r]!==u[o]){var c="\n"+l[r].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}}while(1<=r&&0<=o);break}}}finally{te=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ee(n):""}function re(e,t){switch(e.tag){case 26:case 27:case 5:return ee(e.type);case 16:return ee("Lazy");case 13:return e.child!==t&&null!==t?ee("Suspense Fallback"):ee("Suspense");case 19:return ee("SuspenseList");case 0:case 15:return ne(e.type,!1);case 11:return ne(e.type.render,!1);case 1:return ne(e.type,!0);case 31:return ee("Activity");default:return""}}function oe(e){try{var t="",n=null;do{t+=re(e,n),n=e,e=e.return}while(e);return t}catch(r){return"\nError generating stack: "+r.message+"\n"+r.stack}}var ae=Object.prototype.hasOwnProperty,ie=n.unstable_scheduleCallback,se=n.unstable_cancelCallback,le=n.unstable_shouldYield,ue=n.unstable_requestPaint,ce=n.unstable_now,de=n.unstable_getCurrentPriorityLevel,fe=n.unstable_ImmediatePriority,pe=n.unstable_UserBlockingPriority,he=n.unstable_NormalPriority,me=n.unstable_LowPriority,ve=n.unstable_IdlePriority,ge=n.log,ye=n.unstable_setDisableYieldValue,be=null,Ee=null;function Se(e){if("function"===typeof ge&&ye(e),Ee&&"function"===typeof Ee.setStrictMode)try{Ee.setStrictMode(be,e)}catch(t){}}var Ce=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(we(e)/xe|0)|0},we=Math.log,xe=Math.LN2;var ke=256,_e=262144,Ie=4194304;function Ae(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Pe(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var o=0,a=e.suspendedLanes,i=e.pingedLanes;e=e.warmLanes;var s=134217727&r;return 0!==s?0!==(r=s&~a)?o=Ae(r):0!==(i&=s)?o=Ae(i):n||0!==(n=s&~e)&&(o=Ae(n)):0!==(s=r&~a)?o=Ae(s):0!==i?o=Ae(i):n||0!==(n=r&~e)&&(o=Ae(n)),0===o?0:0!==t&&t!==o&&0===(t&a)&&((a=o&-o)>=(n=t&-t)||32===a&&0!==(4194048&n))?t:o}function Te(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Ne(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Re(){var e=Ie;return 0===(62914560&(Ie<<=1))&&(Ie=4194304),e}function Oe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Me(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ue(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ce(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|261930&n}function De(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ce(n),o=1<=An),Nn=String.fromCharCode(32),Rn=!1;function On(e,t){switch(e){case"keyup":return-1!==_n.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Un=!1;var Dn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Fn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Dn[e.type]:"textarea"===t}function Ln(e,t,n,r){Ft?Lt?Lt.push(r):Lt=[r]:Ft=r,0<(t=ad(t,"onChange")).length&&(n=new on("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var zn=null,Wn=null;function jn(e){Qc(e,0)}function Bn(e){if(vt(et(e)))return e}function Hn(e,t){if("change"===e)return t}var $n=!1;if(Ht){var Vn;if(Ht){var qn="oninput"in document;if(!qn){var Gn=document.createElement("div");Gn.setAttribute("oninput","return;"),qn="function"===typeof Gn.oninput}Vn=qn}else Vn=!1;$n=Vn&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=nr(r)}}function or(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?or(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function ar(e){for(var t=gt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=gt((e=t.contentWindow).document)}return t}function ir(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var sr=Ht&&"documentMode"in document&&11>=document.documentMode,lr=null,ur=null,cr=null,dr=!1;function fr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;dr||null==lr||lr!==gt(r)||("selectionStart"in(r=lr)&&ir(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},cr&&tr(cr,r)||(cr=r,0<(r=ad(ur,"onSelect")).length&&(t=new on("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=lr)))}function pr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var hr={animationend:pr("Animation","AnimationEnd"),animationiteration:pr("Animation","AnimationIteration"),animationstart:pr("Animation","AnimationStart"),transitionrun:pr("Transition","TransitionRun"),transitionstart:pr("Transition","TransitionStart"),transitioncancel:pr("Transition","TransitionCancel"),transitionend:pr("Transition","TransitionEnd")},mr={},vr={};function gr(e){if(mr[e])return mr[e];if(!hr[e])return e;var t,n=hr[e];for(t in n)if(n.hasOwnProperty(t)&&t in vr)return mr[e]=n[t];return e}Ht&&(vr=document.createElement("div").style,"AnimationEvent"in window||(delete hr.animationend.animation,delete hr.animationiteration.animation,delete hr.animationstart.animation),"TransitionEvent"in window||delete hr.transitionend.transition);var yr=gr("animationend"),br=gr("animationiteration"),Er=gr("animationstart"),Sr=gr("transitionrun"),Cr=gr("transitionstart"),wr=gr("transitioncancel"),xr=gr("transitionend"),kr=new Map,_r="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ir(e,t){kr.set(e,t),at(t,[e])}_r.push("scrollEnd");var Ar="function"===typeof reportError?reportError:function(e){if("object"===typeof window&&"function"===typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===typeof e&&null!==e&&"string"===typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"===typeof process&&"function"===typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},Pr=[],Tr=0,Nr=0;function Rr(){for(var e=Tr,t=Nr=Tr=0;t>=i,o-=i,oo=1<<32-Ce(t)+o|n<m?(v=d,d=null):v=d.sibling;var g=p(o,d,s[m],l);if(null===g){null===d&&(d=v);break}e&&d&&null===g.alternate&&t(o,d),i=a(g,i,m),null===c?u=g:c.sibling=g,c=g,d=v}if(m===s.length)return n(o,d),ho&&io(o,m),u;if(null===d){for(;mv?(g=m,m=null):g=m.sibling;var b=p(o,m,y.value,u);if(null===b){null===m&&(m=g);break}e&&m&&null===b.alternate&&t(o,m),s=a(b,s,v),null===d?c=b:d.sibling=b,d=b,m=g}if(y.done)return n(o,m),ho&&io(o,v),c;if(null===m){for(;!y.done;v++,y=l.next())null!==(y=f(o,y.value,u))&&(s=a(y,s,v),null===d?c=y:d.sibling=y,d=y);return ho&&io(o,v),c}for(m=r(m);!y.done;v++,y=l.next())null!==(y=h(m,o,v,y.value,u))&&(e&&null!==y.alternate&&m.delete(null===y.key?v:y.key),s=a(y,s,v),null===d?c=y:d.sibling=y,d=y);return e&&m.forEach(function(e){return t(o,e)}),ho&&io(o,v),c}(l,u,c=v.call(c),d)}if("function"===typeof c.then)return m(l,u,fa(c),d);if(c.$$typeof===w)return m(l,u,Do(l,c),d);ha(l,c)}return"string"===typeof c&&""!==c||"number"===typeof c||"bigint"===typeof c?(c=""+c,null!==u&&6===u.tag?(n(l,u.sibling),(d=o(u,c)).return=l,l=d):(n(l,u),(d=qr(c,l.mode,d)).return=l,l=d),s(l)):n(l,u)}return function(e,t,n,r){try{da=0;var o=m(e,t,n,r);return ca=null,o}catch(i){if(i===ea||i===na)throw i;var a=Wr(29,i,null,e.mode);return a.lanes=r,a.return=e,a}}}var va=ma(!0),ga=ma(!1),ya=!1;function ba(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ea(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Sa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ca(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&mu)){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,t=Fr(e),Dr(e,null,n),t}return Or(e,r,t,n),Fr(e)}function wa(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194048&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,De(e,n)}}function xa(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var i={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===a?o=a=i:a=a.next=i,n=n.next}while(null!==n);null===a?o=a=t:a=a.next=t}else o=a=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var ka=!1;function _a(){if(ka){if(null!==Go)throw Go}}function Ia(e,t,n,r){ka=!1;var o=e.updateQueue;ya=!1;var a=o.firstBaseUpdate,i=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,u=l.next;l.next=null,null===i?a=u:i.next=u,i=l;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==i&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(null!==a){var d=o.baseState;for(i=0,c=u=l=null,s=a;;){var f=-536870913&s.lane,p=f!==s.lane;if(p?(yu&f)===f:(r&f)===f){0!==f&&f===qo&&(ka=!0),null!==c&&(c=c.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var h=e,v=s;f=t;var g=n;switch(v.tag){case 1:if("function"===typeof(h=v.payload)){d=h.call(g,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null===(f="function"===typeof(h=v.payload)?h.call(g,d,f):h)||void 0===f)break e;d=m({},d,f);break e;case 2:ya=!0}}null!==(f=s.callback)&&(e.flags|=64,p&&(e.flags|=8192),null===(p=o.callbacks)?o.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(u=c=p,l=d):c=c.next=p,i|=f;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(p=s).next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}null===c&&(l=d),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,null===a&&(o.shared.lanes=0),_u|=i,e.lanes=i,e.memoizedState=d}}function Aa(e,t){if("function"!==typeof e)throw Error(i(191,e));e.call(t)}function Pa(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;ea?a:8;var i=D.T,s={};D.T=s,ps(e,!1,t,n);try{var l=o(),u=D.S;if(null!==u&&u(s,l),null!==l&&"object"===typeof l&&"function"===typeof l.then)fs(e,t,function(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var e=0;e<\/script>",a=a.removeChild(a.firstChild);break;case"select":a="string"===typeof r.is?s.createElement("select",{is:r.is}):s.createElement("select"),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a="string"===typeof r.is?s.createElement(o,{is:r.is}):s.createElement(o)}}a[He]=t,a[$e]=r;e:for(s=t.child;null!==s;){if(5===s.tag||6===s.tag)a.appendChild(s.stateNode);else if(4!==s.tag&&27!==s.tag&&null!==s.child){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;null===s.sibling;){if(null===s.return||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=a;e:switch(hd(a,o,r),o){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&ul(t)}}return hl(t),cl(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&ul(t);else{if("string"!==typeof r&&null===t.stateNode)throw Error(i(166));if(e=K.current,So(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(o=fo))switch(o.tag){case 27:case 5:r=o.memoizedProps}e[He]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||dd(e.nodeValue,n)))||yo(t,!0)}else(e=yd(e).createTextNode(r))[He]=t,t.stateNode=e}return hl(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(r=So(t),null!==n){if(null===e){if(!r)throw Error(i(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(i(557));e[He]=t}else Co(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;hl(t),e=!1}else n=wo(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(ja(t),t):(ja(t),null);if(0!==(128&t.flags))throw Error(i(558))}return hl(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(o=So(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(i(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(i(317));o[He]=t}else Co(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;hl(t),o=!1}else o=wo(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return 256&t.flags?(ja(t),t):(ja(t),null)}return ja(t),0!==(128&t.flags)?(t.lanes=n,t):(n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(o=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(o=r.alternate.memoizedState.cachePool.pool),a=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(a=r.memoizedState.cachePool.pool),a!==o&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),fl(t,t.updateQueue),hl(t),null);case 4:return Q(),null===e&&td(t.stateNode.containerInfo),hl(t),null;case 10:return Po(t.type),hl(t),null;case 19:if(B(Ba),null===(r=t.memoizedState))return hl(t),null;if(o=0!==(128&t.flags),null===(a=r.rendering))if(o)pl(r,!1);else{if(0!==ku||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(a=Ha(e))){for(t.flags|=128,pl(r,!1),e=a.updateQueue,t.updateQueue=e,fl(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Hr(n,e),n=n.sibling;return H(Ba,1&Ba.current|2),ho&&io(t,r.treeForkCount),t.child}e=e.sibling}null!==r.tail&&ce()>Du&&(t.flags|=128,o=!0,pl(r,!1),t.lanes=4194304)}else{if(!o)if(null!==(e=Ha(a))){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,fl(t,e),pl(r,!0),null===r.tail&&"hidden"===r.tailMode&&!a.alternate&&!ho)return hl(t),null}else 2*ce()-r.renderingStartTime>Du&&536870912!==n&&(t.flags|=128,o=!0,pl(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=r.last)?e.sibling=a:t.child=a,r.last=a)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ce(),e.sibling=null,n=Ba.current,H(Ba,o?1&n|2:1&n),ho&&io(t,r.treeForkCount),e):(hl(t),null);case 22:case 23:return ja(t),Ma(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?0!==(536870912&n)&&0===(128&t.flags)&&(hl(t),6&t.subtreeFlags&&(t.flags|=8192)):hl(t),null!==(n=t.updateQueue)&&fl(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&B(Zo),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Po(jo),hl(t),null;case 25:case 30:return null}throw Error(i(156,t.tag))}function vl(e,t){switch(uo(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Po(jo),Q(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return X(t),null;case 31:if(null!==t.memoizedState){if(ja(t),null===t.alternate)throw Error(i(340));Co()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(ja(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(i(340));Co()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return B(Ba),null;case 4:return Q(),null;case 10:return Po(t.type),null;case 22:case 23:return ja(t),Ma(),null!==e&&B(Zo),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return Po(jo),null;default:return null}}function gl(e,t){switch(uo(t),t.tag){case 3:Po(jo),Q();break;case 26:case 27:case 5:X(t);break;case 4:Q();break;case 31:null!==t.memoizedState&&ja(t);break;case 13:ja(t);break;case 19:B(Ba);break;case 10:Po(t.type);break;case 22:case 23:ja(t),Ma(),null!==e&&B(Zo);break;case 24:Po(jo)}}function yl(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var o=r.next;n=o;do{if((n.tag&e)===e){r=void 0;var a=n.create,i=n.inst;r=a(),i.destroy=r}n=n.next}while(n!==o)}}catch(s){kc(t,t.return,s)}}function bl(e,t,n){try{var r=t.updateQueue,o=null!==r?r.lastEffect:null;if(null!==o){var a=o.next;r=a;do{if((r.tag&e)===e){var i=r.inst,s=i.destroy;if(void 0!==s){i.destroy=void 0,o=t;var l=n,u=s;try{u()}catch(c){kc(o,l,c)}}}r=r.next}while(r!==a)}}catch(c){kc(t,t.return,c)}}function El(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Pa(t,n)}catch(r){kc(e,e.return,r)}}}function Sl(e,t,n){n.props=ks(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){kc(e,t,r)}}function Cl(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"===typeof n?e.refCleanup=n(r):n.current=r}}catch(o){kc(e,t,o)}}function wl(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"===typeof r)try{r()}catch(o){kc(e,t,o)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"===typeof n)try{n(null)}catch(a){kc(e,t,a)}else n.current=null}function xl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(o){kc(e,e.return,o)}}function kl(e,t,n){try{var r=e.stateNode;!function(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,a=null,s=null,l=null,u=null,c=null,d=null;for(h in n){var f=n[h];if(n.hasOwnProperty(h)&&null!=f)switch(h){case"checked":case"value":break;case"defaultValue":u=f;default:r.hasOwnProperty(h)||fd(e,t,h,null,r,f)}}for(var p in r){var h=r[p];if(f=n[p],r.hasOwnProperty(p)&&(null!=h||null!=f))switch(p){case"type":a=h;break;case"name":o=h;break;case"checked":c=h;break;case"defaultChecked":d=h;break;case"value":s=h;break;case"defaultValue":l=h;break;case"children":case"dangerouslySetInnerHTML":if(null!=h)throw Error(i(137,t));break;default:h!==f&&fd(e,t,p,h,r,f)}}return void Et(e,s,l,u,c,d,a,o);case"select":for(a in h=s=l=p=null,n)if(u=n[a],n.hasOwnProperty(a)&&null!=u)switch(a){case"value":break;case"multiple":h=u;default:r.hasOwnProperty(a)||fd(e,t,a,null,r,u)}for(o in r)if(a=r[o],u=n[o],r.hasOwnProperty(o)&&(null!=a||null!=u))switch(o){case"value":p=a;break;case"defaultValue":l=a;break;case"multiple":s=a;default:a!==u&&fd(e,t,o,a,r,u)}return t=l,n=s,r=h,void(null!=p?wt(e,!!n,p,!1):!!r!==!!n&&(null!=t?wt(e,!!n,t,!0):wt(e,!!n,n?[]:"",!1)));case"textarea":for(l in h=p=null,n)if(o=n[l],n.hasOwnProperty(l)&&null!=o&&!r.hasOwnProperty(l))switch(l){case"value":case"children":break;default:fd(e,t,l,null,r,o)}for(s in r)if(o=r[s],a=n[s],r.hasOwnProperty(s)&&(null!=o||null!=a))switch(s){case"value":p=o;break;case"defaultValue":h=o;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=o)throw Error(i(91));break;default:o!==a&&fd(e,t,s,o,r,a)}return void xt(e,p,h);case"option":for(var m in n)if(p=n[m],n.hasOwnProperty(m)&&null!=p&&!r.hasOwnProperty(m))if("selected"===m)e.selected=!1;else fd(e,t,m,null,r,p);for(u in r)if(p=r[u],h=n[u],r.hasOwnProperty(u)&&p!==h&&(null!=p||null!=h))if("selected"===u)e.selected=p&&"function"!==typeof p&&"symbol"!==typeof p;else fd(e,t,u,p,r,h);return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var v in n)p=n[v],n.hasOwnProperty(v)&&null!=p&&!r.hasOwnProperty(v)&&fd(e,t,v,null,r,p);for(c in r)if(p=r[c],h=n[c],r.hasOwnProperty(c)&&p!==h&&(null!=p||null!=h))switch(c){case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(i(137,t));break;default:fd(e,t,c,p,r,h)}return;default:if(Tt(t)){for(var g in n)p=n[g],n.hasOwnProperty(g)&&void 0!==p&&!r.hasOwnProperty(g)&&pd(e,t,g,void 0,r,p);for(d in r)p=r[d],h=n[d],!r.hasOwnProperty(d)||p===h||void 0===p&&void 0===h||pd(e,t,d,p,r,h);return}}for(var y in n)p=n[y],n.hasOwnProperty(y)&&null!=p&&!r.hasOwnProperty(y)&&fd(e,t,y,null,r,p);for(f in r)p=r[f],h=n[f],!r.hasOwnProperty(f)||p===h||null==p&&null==h||fd(e,t,f,p,r,h)}(r,e.type,n,t),r[$e]=t}catch(o){kc(e,e.return,o)}}function _l(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&Ad(e.type)||4===e.tag}function Il(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||_l(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&Ad(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Al(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Mt));else if(4!==r&&(27===r&&Ad(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(Al(e,t,n),e=e.sibling;null!==e;)Al(e,t,n),e=e.sibling}function Pl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&Ad(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(Pl(e,t,n),e=e.sibling;null!==e;)Pl(e,t,n),e=e.sibling}function Tl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);hd(t,r,n),t[He]=e,t[$e]=n}catch(a){kc(e,e.return,a)}}var Nl=!1,Rl=!1,Ol=!1,Ml="function"===typeof WeakSet?WeakSet:Set,Ul=null;function Dl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Zl(e,n),4&r&&yl(5,n);break;case 1:if(Zl(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(i){kc(n,n.return,i)}else{var o=ks(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(s){kc(n,n.return,s)}}64&r&&El(n),512&r&&Cl(n,n.return);break;case 3:if(Zl(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{Pa(e,t)}catch(i){kc(n,n.return,i)}}break;case 27:null===t&&4&r&&Tl(n);case 26:case 5:Zl(e,n),null===t&&4&r&&xl(n),512&r&&Cl(n,n.return);break;case 12:Zl(e,n);break;case 31:Zl(e,n),4&r&&Bl(e,n);break;case 13:Zl(e,n),4&r&&Hl(e,n),64&r&&(null!==(e=n.memoizedState)&&(null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=Pc.bind(null,n))));break;case 22:if(!(r=null!==n.memoizedState||Nl)){t=null!==t&&null!==t.memoizedState||Rl,o=Nl;var a=Rl;Nl=r,(Rl=t)&&!a?Jl(e,n,0!==(8772&n.subtreeFlags)):Zl(e,n),Nl=o,Rl=a}break;case 30:break;default:Zl(e,n)}}function Fl(e){var t=e.alternate;null!==t&&(e.alternate=null,Fl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&Qe(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ll=null,zl=!1;function Wl(e,t,n){for(n=n.child;null!==n;)jl(e,t,n),n=n.sibling}function jl(e,t,n){if(Ee&&"function"===typeof Ee.onCommitFiberUnmount)try{Ee.onCommitFiberUnmount(be,n)}catch(a){}switch(n.tag){case 26:Rl||wl(n,t),Wl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Rl||wl(n,t);var r=Ll,o=zl;Ad(n.type)&&(Ll=n.stateNode,zl=!1),Wl(e,t,n),Wd(n.stateNode),Ll=r,zl=o;break;case 5:Rl||wl(n,t);case 6:if(r=Ll,o=zl,Ll=null,Wl(e,t,n),zl=o,null!==(Ll=r))if(zl)try{(9===Ll.nodeType?Ll.body:"HTML"===Ll.nodeName?Ll.ownerDocument.body:Ll).removeChild(n.stateNode)}catch(i){kc(n,t,i)}else try{Ll.removeChild(n.stateNode)}catch(i){kc(n,t,i)}break;case 18:null!==Ll&&(zl?(Pd(9===(e=Ll).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),Gf(e)):Pd(Ll,n.stateNode));break;case 4:r=Ll,o=zl,Ll=n.stateNode.containerInfo,zl=!0,Wl(e,t,n),Ll=r,zl=o;break;case 0:case 11:case 14:case 15:bl(2,n,t),Rl||bl(4,n,t),Wl(e,t,n);break;case 1:Rl||(wl(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount&&Sl(n,t,r)),Wl(e,t,n);break;case 21:Wl(e,t,n);break;case 22:Rl=(r=Rl)||null!==n.memoizedState,Wl(e,t,n),Rl=r;break;default:Wl(e,t,n)}}function Bl(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&null!==(e=e.memoizedState))){e=e.dehydrated;try{Gf(e)}catch(n){kc(t,t.return,n)}}}function Hl(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&(null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))))try{Gf(e)}catch(n){kc(t,t.return,n)}}function $l(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new Ml),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new Ml),t;default:throw Error(i(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Tc.bind(null,e,t);t.then(r,r)}})}function Vl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r title"))),hd(a,r,n),a[He]=e,nt(a),r=a;break e;case"link":var s=of("link","href",o).get(r+(n.href||""));if(s)for(var l=0;ls)break;var c=l.transferSize,d=l.initiatorType;c&&md(d)&&(i+=c*((l=l.responseEnd)lf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(o)}}:null}(d,h)))return Bu=a,e.cancelPendingCommit=h(gc.bind(null,e,t,a,n,r,o,i,s,l,c,d,null,f,p)),void ec(e,a,i,!u)}gc(e,t,a,n,r,o,i,s,l)}function Xu(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&(null!==(n=t.updateQueue)&&null!==(n=n.stores)))for(var r=0;rv&&(i=v,v=m,m=i);var g=rr(s,m),y=rr(s,v);if(g&&y&&(1!==p.rangeCount||p.anchorNode!==g.node||p.anchorOffset!==g.offset||p.focusNode!==y.node||p.focusOffset!==y.offset)){var b=d.createRange();b.setStart(g.node,g.offset),p.removeAllRanges(),m>v?(p.addRange(b),p.extend(y.node,y.offset)):(b.setEnd(y.node,y.offset),p.addRange(b))}}}}for(d=[],p=s;p=p.parentNode;)1===p.nodeType&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for("function"===typeof s.focus&&s.focus(),s=0;sn?32:n,D.T=null,n=$u,$u=null;var a=Wu,s=Bu;if(zu=0,ju=Wu=null,Bu=0,0!==(6&mu))throw Error(i(331));var l=mu;if(mu|=4,cu(a.current),nu(a,a.current,s,n),mu=l,Lc(0,!1),Ee&&"function"===typeof Ee.onPostCommitFiberRoot)try{Ee.onPostCommitFiberRoot(be,a)}catch(u){}return!0}finally{F.p=o,D.T=r,Sc(e,t)}}function xc(e,t,n){t=Zr(n,t),null!==(e=Ca(e,t=Ns(e.stateNode,t,2),2))&&(Me(e,2),Fc(e))}function kc(e,t,n){if(3===e.tag)xc(e,e,n);else for(;null!==t;){if(3===t.tag){xc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Lu||!Lu.has(r))){e=Zr(n,e),null!==(r=Ca(t,n=Rs(2),2))&&(Os(n,r,t,e),Me(r,2),Fc(r));break}}t=t.return}}function _c(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new hu;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(wu=!0,o.add(n),e=Ic.bind(null,e,t,n),t.then(e,e))}function Ic(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,vu===e&&(yu&n)===n&&(4===ku||3===ku&&(62914560&yu)===yu&&300>ce()-Mu?0===(2&mu)&&rc(e,0):Au|=n,Tu===yu&&(Tu=0)),Fc(e)}function Ac(e,t){0===t&&(t=Re()),null!==(e=Ur(e,t))&&(Me(e,t),Fc(e))}function Pc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Ac(e,n)}function Tc(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}null!==r&&r.delete(t),Ac(e,n)}var Nc=null,Rc=null,Oc=!1,Mc=!1,Uc=!1,Dc=0;function Fc(e){e!==Rc&&null===e.next&&(null===Rc?Nc=Rc=e:Rc=Rc.next=e),Mc=!0,Oc||(Oc=!0,_d(function(){0!==(6&mu)?ie(fe,zc):Wc()}))}function Lc(e,t){if(!Uc&&Mc){Uc=!0;do{for(var n=!1,r=Nc;null!==r;){if(!t)if(0!==e){var o=r.pendingLanes;if(0===o)var a=0;else{var i=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ce(42|e)+1)-1,a=201326741&(a&=o&~(i&~s))?201326741&a|1:a?2|a:0}0!==a&&(n=!0,Hc(r,a))}else a=yu,0===(3&(a=Pe(r,r===vu?a:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||Te(r,a)||(n=!0,Hc(r,a));r=r.next}}while(n);Uc=!1}}function zc(){Wc()}function Wc(){Mc=Oc=!1;var e=0;0!==Dc&&function(){var e=window.event;if(e&&"popstate"===e.type)return e!==Cd&&(Cd=e,!0);return Cd=null,!1}()&&(e=Dc);for(var t=ce(),n=null,r=Nc;null!==r;){var o=r.next,a=jc(r,t);0===a?(r.next=null,null===n?Nc=o:n.next=o,null===o&&(Rc=n)):(n=r,(0!==e||0!==(3&a))&&(Mc=!0)),r=o}0!==zu&&5!==zu||Lc(e,!1),0!==Dc&&(Dc=0)}function jc(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,a=-62914561&e.pendingLanes;0 title"):null)}function sf(e){return"stylesheet"!==e.type||0!==(3&e.state.loading)}var lf=0;function uf(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)df(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var cf=null;function df(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,cf=new Map,t.forEach(ff,e),cf=null,uf.call(e))}function ff(e,t){if(!(4&t.state.loading)){var n=cf.get(e);if(n)var r=n.get(null);else{n=new Map,cf.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a>>1,o=e[r];if(!(0>>1;ra(l,n))ua(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(ua(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"===typeof performance&&"function"===typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var u=[],c=[],d=1,f=null,p=3,h=!1,m=!1,v=!1,g=!1,y="function"===typeof setTimeout?setTimeout:null,b="function"===typeof clearTimeout?clearTimeout:null,E="undefined"!==typeof setImmediate?setImmediate:null;function S(e){for(var t=r(c);null!==t;){if(null===t.callback)o(c);else{if(!(t.startTime<=e))break;o(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function C(e){if(v=!1,S(e),!m)if(null!==r(u))m=!0,x||(x=!0,w());else{var t=r(c);null!==t&&R(C,t.startTime-e)}}var w,x=!1,k=-1,_=5,I=-1;function A(){return!!g||!(t.unstable_now()-I<_)}function P(){if(g=!1,x){var e=t.unstable_now();I=e;var n=!0;try{e:{m=!1,v&&(v=!1,b(k),k=-1),h=!0;var a=p;try{t:{for(S(e),f=r(u);null!==f&&!(f.expirationTime>e&&A());){var i=f.callback;if("function"===typeof i){f.callback=null,p=f.priorityLevel;var s=i(f.expirationTime<=e);if(e=t.unstable_now(),"function"===typeof s){f.callback=s,S(e),n=!0;break t}f===r(u)&&o(u),S(e)}else o(u);f=r(u)}if(null!==f)n=!0;else{var l=r(c);null!==l&&R(C,l.startTime-e),n=!1}}break e}finally{f=null,p=a,h=!1}n=void 0}}finally{n?w():x=!1}}}if("function"===typeof E)w=function(){E(P)};else if("undefined"!==typeof MessageChannel){var T=new MessageChannel,N=T.port2;T.port1.onmessage=P,w=function(){N.postMessage(null)}}else w=function(){y(P,0)};function R(e,n){k=y(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125i?(e.sortIndex=a,n(c,e),null===r(u)&&e===r(c)&&(v?(b(k),k=-1):v=!0,R(C,a-i))):(e.sortIndex=s,n(u,e),m||h||(m=!0,x||(x=!0,w()))),e},t.unstable_shouldYield=A,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}}),c=n.cw(function(e,t){e.exports=u()}),d=n.cw(function(e,t){var n=s();var r="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},o=n.useState,a=n.useEffect,i=n.useLayoutEffect,l=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(o){return!0}}var c="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),s=r[0].inst,c=r[1];return i(function(){s.value=n,s.getSnapshot=t,u(s)&&c({inst:s})},[e,n,t]),a(function(){return u(s)&&c({inst:s}),e(function(){u(s)&&c({inst:s})})},[e]),l(n),n};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c}),f=n.cw(function(e,t){var n=s(),r=p();var o="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},a=r.useSyncExternalStore,i=n.useRef,l=n.useEffect,u=n.useMemo,c=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,s){var d=i(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=u(function(){function e(e){if(!l){if(l=!0,a=e,e=r(e),void 0!==s&&f.hasValue){var t=f.value;if(s(t,e))return i=t}return i=e}if(t=i,o(a,e))return t;var n=r(e);return void 0!==s&&s(t,n)?(a=e,t):(a=e,i=n)}var a,i,l=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,n,r,s]);var p=a(e,d[0],d[1]);return l(function(){f.hasValue=!0,f.value=p},[p]),c(p),p}}),p=n.cw(function(e,t){e.exports=d()}),h=n.cw(function(e,t){e.exports=f()}),m={};function v(){return v.c||(v.c=n.t(s(),2))}function g(e){for(var t=1;tOa,kp:()=>Ra,ZT:()=>Pa,Sw:()=>La,Vw:()=>Ma,tS:()=>Ua,z3:()=>Da,D:()=>Fa,H7:()=>Ea,zp:()=>ba,xl:()=>xa,AS:()=>Wa,tN:()=>ka,IS:()=>Ia,ni:()=>Ta,ds:()=>Na,Hf:()=>Sa,Um:()=>Ca,_4:()=>wa}),s(),r();var y=function e(t,n){function r(e,r,o){if("undefined"!==typeof document){"number"===typeof(o=g({},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 a="";for(var i in o)o[i]&&(a+="; "+i,!0!==o[i]&&(a+="="+o[i].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+a}}return Object.create({set:r,get:function(e){if("undefined"!==typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},o=0;o0&&void 0!==arguments[0]?arguments[0]:{};const{path:t,domain:n,expires:r,sameSite:o,secure:a}=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")||a,Object.prototype.hasOwnProperty.call(e,"sameSite")){if(!o||!["strict","lax","none"].includes(o))throw new Error('The sameSite value of cookieStorage must be "lax", "strict" or "none".');if("none"===o&&!this.secure)throw new Error("sameSite = None requires the Secure attribute in latest browser versions.");this.sameSite=o}}async setItem(e,t){y.set(e,t,this.getData())}async getItem(e){return y.get(e)??null}async removeItem(e){y.remove(e,this.getData())}async clear(){const e=y.get(),t=Object.keys(e).map(e=>this.removeItem(e));await Promise.all(t)}getData(){return{path:this.path,expires:this.expires,domain:this.domain,secure:this.secure,...this.sameSite&&{sameSite:this.sameSite}}}}var E=n(8937),S=n(3413),C=n(1095),w=n(4619),x=(n(4228),n(1547),n(5560)),k=n(3827),_=n(1068),I=n(7161),A=n(9209),P=n(5122);const T="cognito-identity",N={service:T,retryDecider:(0,P.D)(_.F),computeDelay:A.y,cache:"no-store"};var R=n(6129);const O=(0,n(5909).q)(R.F,[()=>e=>async function(t){return t.headers["cache-control"]="no-store",e(t)}]),M=e=>(t,n)=>{const r=U(e),o=JSON.stringify(t);return D(n,r,o)},U=e=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${e}`}),D=(e,t,n)=>{let{url:r}=e;return{headers:t,url:r,body:n,method:"POST"}},F=e=>(0,I.A)(O,M("GetCredentialsForIdentity"),L,{...N,...e,userAgentValue:(0,x.fE)()}),L=async e=>{if(e.statusCode>=300){throw await(0,_.F)(e)}const t=await(0,_.Y)(e);return{IdentityId:t.IdentityId,Credentials:z(t.Credentials),$metadata:(0,k.j)(e)}},z=function(){let{Expiration:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{...t,Expiration:e&&new Date(1e3*e)}};var W=n(2770),j=n(2096),B=n(9109),H=n(9715),$=n(2242),V=n(3249),q=n(727);const G=e=>{let{endpointOverride:t}=e;return e=>t?{url:new q.o(t)}:(e=>{let{region:t}=e;return{url:new q.o(`https://${T}.${t}.${(0,V.R)(t)}`)}})(e)},K=async e=>{if(e.statusCode>=300){throw await(0,_.F)(e)}return{IdentityId:(await(0,_.Y)(e)).IdentityId,$metadata:(0,k.j)(e)}};function Y(e){const t=(0,W.Cq)(e).payload.iss,n={};if(!t)throw new j.l({name:"InvalidIdTokenException",message:"Invalid Idtoken."});return n[t.replace(/(^\w+:|^)\/\//,"")]=e,n}async function Z(e){let{tokens:t,authConfig:n,identityIdStore:r}=e;r.setAuthConfig({Cognito:n});const o=await r.loadIdentityId();if(o)return o.id;const a=t?.idToken?Y(t.idToken.toString()):{},i=await async function(e,t){const n=t?.identityPoolId,r=(0,H.C)(n),o=(a={endpointResolver:G({endpointOverride:t.identityPoolEndpoint})},(0,I.A)(O,M("GetId"),K,{...N,...a,userAgentValue:(0,x.fE)()}));var a;let i;try{i=(await o({region:r},{IdentityPoolId:n,Logins:e})).IdentityId}catch(s){throw(0,B.e)(s),new j.l(s)}if(!i)throw new j.l({name:"GetIdResponseException",message:"Received undefined response from getId operation",recoverySuggestion:"Make sure to pass a valid identityPoolId in the configuration."});return i}(a,n);return r.storeIdentityId({id:i,type:t?"primary":"guest"}),i}const Q=new w.C("CognitoCredentialsProvider"),J=3e6;class X{constructor(e){this._nextCredentialsRefresh=0,this._identityIdStore=e}async clearCredentialsAndIdentityId(){Q.debug("Clearing out credentials and identityId"),this._credentialsAndIdentityId=void 0,await this._identityIdStore.clearIdentityId()}async clearCredentials(){Q.debug("Clearing out in-memory credentials"),this._credentialsAndIdentityId=void 0}async getCredentialsAndIdentityId(e){const t=e.authenticated,{tokens:n}=e,{authConfig:r}=e;try{(0,W.Eh)(r?.Cognito)}catch{return}if(!t&&!r.Cognito.allowGuestAccess)return;const{forceRefresh:o}=e,a=this.hasTokenChanged(n),i=await Z({tokens:n,authConfig:r.Cognito,identityIdStore:this._identityIdStore});return(o||a)&&this.clearCredentials(),t?((0,$.OW)(n),this.credsForOIDCTokens(r.Cognito,n,i)):this.getGuestCredentials(i,r.Cognito)}async getGuestCredentials(e,t){if(this._credentialsAndIdentityId&&!this.isPastTTL()&&!1===this._credentialsAndIdentityId.isAuthenticatedCreds)return Q.info("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();const n=(0,H.C)(t.identityPoolId),r=F({endpointResolver:G({endpointOverride:t.identityPoolEndpoint})});let o;try{o=await r({region:n},{IdentityId:e})}catch(a){throw(0,B.e)(a),new j.l(a)}if(o?.Credentials?.AccessKeyId&&o?.Credentials?.SecretKey){this._nextCredentialsRefresh=(new Date).getTime()+J;const t={credentials:{accessKeyId:o.Credentials.AccessKeyId,secretAccessKey:o.Credentials.SecretKey,sessionToken:o.Credentials.SessionToken,expiration:o.Credentials.Expiration},identityId:e};return o.IdentityId&&(t.identityId=o.IdentityId,this._identityIdStore.storeIdentityId({id:o.IdentityId,type:"guest"})),this._credentialsAndIdentityId={...t,isAuthenticatedCreds:!1},t}throw new j.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 Q.debug("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();const r=t.idToken?Y(t.idToken.toString()):{},o=(0,H.C)(e.identityPoolId),a=F({endpointResolver:G({endpointOverride:e.identityPoolEndpoint})});let i;try{i=await a({region:o},{IdentityId:n,Logins:r})}catch(s){throw(0,B.e)(s),new j.l(s)}if(i?.Credentials?.AccessKeyId&&i?.Credentials?.SecretKey){this._nextCredentialsRefresh=(new Date).getTime()+J;const e={credentials:{accessKeyId:i.Credentials.AccessKeyId,secretAccessKey:i.Credentials.SecretKey,sessionToken:i.Credentials.SessionToken,expiration:i.Credentials.Expiration},identityId:n};return i.IdentityId&&(e.identityId=i.IdentityId,this._identityIdStore.storeIdentityId({id:i.IdentityId,type:"primary"})),this._credentialsAndIdentityId={...e,isAuthenticatedCreds:!0,associatedIdToken:t.idToken?.toString()},e}throw new j.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}}var ee=n(7485);const te={identityId:"identityId"},ne=new w.C("DefaultIdentityIdStore");class re{setAuthConfig(e){(0,W.Eh)(e.Cognito),this.authConfig=e,this._authKeys=oe("Cognito",e.Cognito.identityPoolId)}constructor(e){this._authKeys={},this._hasGuestIdentityId=!1,this.keyValueStorage=e}async loadIdentityId(){(0,W.Eh)(this.authConfig?.Cognito);try{if(this._primaryIdentityId)return{id:this._primaryIdentityId,type:"primary"};{const e=await this.keyValueStorage.getItem(this._authKeys.identityId);return e?(this._hasGuestIdentityId=!0,{id:e,type:"guest"}):null}}catch(e){return ne.log("Error getting stored IdentityId.",e),null}}async storeIdentityId(e){(0,W.Eh)(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)}}const oe=(e,t)=>(0,ee.Qm)(te)(`com.amplify.${e}`,t),ae=new X(new re(E.ZL));var ie=n(3643);const se={configure(e,t){const n=(0,C.M)(e),r=new b({sameSite:"lax"}),o=t?.ssr?r:E.ZL,a=t?.ssr?new X(new re(r)):ae;n.Auth&&!t?.Auth?(ie.Q.setAuthConfig(n.Auth),ie.Q.setKeyValueStorage(o),S.H.configure(n,{...t,Auth:{tokenProvider:ie.Q,credentialsProvider:a}})):S.H.configure(n,t)},getConfig:()=>S.H.getConfig()},le={Auth:{Cognito:{userPoolId:"ap-south-1_Qa1z8QJWq",userPoolClientId:"42bthem1t0s9quq6qnje0qe7pr",loginWith:{email:!0}}},API:{baseUrl:""}};var ue=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,ce=/^[\\/]{2}/;function de(e,t){return t+e.replace(/\\/g,"/")}var fe="popstate";function pe(e){return"object"===typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function he(){return Se(function(e,t){let n=t.state?.masked,{pathname:r,search:o,hash:a}=n||e.location;return ye("",{pathname:r,search:o,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default",n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)},function(e,t){return"string"===typeof t?t:be(t)},null,arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}function me(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function ve(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function ge(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ye(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return{pathname:"string"===typeof e?e:e.pathname,search:"",hash:"",..."string"===typeof t?Ee(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10),mask:o}}function be(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function Ee(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Se(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},{window:o=document.defaultView,v5Compat:a=!1}=r,i=o.history,s="POP",l=null,u=c();function c(){return(i.state||{idx:null}).idx}function d(){s="POP";let e=c(),t=null==e?null:e-u;u=e,l&&l({action:s,location:p.location,delta:t})}function f(e){return Ce(o,e)}null==u&&(u=0,i.replaceState({...i.state,idx:u},""));let p={get action(){return s},get location(){return e(o,i)},listen(e){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(fe,d),l=e,()=>{o.removeEventListener(fe,d),l=null}},createHref:e=>t(o,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s="PUSH";let r=pe(e)?e:ye(p.location,e,t);n&&n(r,e),u=c()+1;let d=ge(r,u),f=p.createHref(r.mask||r);try{i.pushState(d,"",f)}catch(h){if(h instanceof DOMException&&"DataCloneError"===h.name)throw h;o.location.assign(f)}a&&l&&l({action:s,location:p.location,delta:1})},replace:function(e,t){s="REPLACE";let r=pe(e)?e:ye(p.location,e,t);n&&n(r,e),u=c();let o=ge(r,u),d=p.createHref(r.mask||r);i.replaceState(o,"",d),a&&l&&l({action:s,location:p.location,delta:0})},go:e=>i.go(e)};return p}function Ce(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r="http://localhost";e&&(r="null"!==e.location.origin?e.location.origin:e.location.href),me(r,"No window.location.(origin|href) available to create URL");let o="string"===typeof t?t:be(t);return o=o.replace(/ $/,"%20"),!n&&ce.test(o)&&(o=r+o),new URL(o,r)}new WeakMap;function we(e,t){return xe(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/",!1)}function xe(e,t,n,r,o){let a=je(("string"===typeof t?Ee(t):t).pathname||"/",n);if(null==a)return null;let i=o??ke(e),s=null,l=We(a);for(let u=0;null==s&&ue.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(t),t}function _e(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=function(e,a){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,s=arguments.length>3?arguments[3]:void 0,l={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};if(l.relativePath.startsWith("/")){if(!l.relativePath.startsWith(r)&&i)return;me(l.relativePath.startsWith(r),`Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(r.length)}let u=Ke([r,l.relativePath]),c=n.concat(l);e.children&&e.children.length>0&&(me(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),_e(e.children,t,c,u,i)),(null!=e.path||e.index)&&t.push({path:u,score:Ue(u,e.index),routesMeta:c.map((e,t)=>{let[n,r]=ze(e.relativePath,e.caseSensitive,t===c.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of Ie(e.path))a(e,t,!0,n);else a(e,t)}),t}function Ie(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(0===r.length)return o?[a,""]:[a];let i=Ie(r.join("/")),s=[];return s.push(...i.map(e=>""===e?a:[a,e].join("/"))),o&&s.push(...i),s.map(t=>e.startsWith("/")&&""===t?"/":t)}var Ae=/^:[\w-]+$/,Pe=3,Te=2,Ne=1,Re=10,Oe=-2,Me=e=>"*"===e;function Ue(e,t){let n=e.split("/"),r=n.length;return n.some(Me)&&(r+=Oe),t&&(r+=Te),n.filter(e=>!Me(e)).reduce((e,t)=>e+(Ae.test(t)?Pe:""===t?Ne:Re),r)}function De(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],{routesMeta:r}=e,o={},a="/",i=[];for(let s=0;s{let{paramName:r,isOptional:o}=t;if("*"===r){let e=s[n]||"";i=Ye(a.slice(0,a.length-e.length),1)}const l=s[n];return e[r]=o&&!l?void 0:(l||"").replace(/%2F/g,"/"),e},{}),pathname:a,pathnameBase:i,pattern:e}}function ze(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];ve("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,o,a)=>{if(r.push({paramName:t,isOptional:null!=n}),n){let t=a.charAt(o+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function We(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return ve(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function je(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function Be(e,t){let n=Ye(t).split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function He(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function $e(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function Ve(e){let t=$e(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function qe(e,t,n){let r,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];"string"===typeof e?r=Ee(e):(r={...e},me(!r.pathname||!r.pathname.includes("?"),He("?","pathname","search",r)),me(!r.pathname||!r.pathname.includes("#"),He("#","pathname","hash",r)),me(!r.search||!r.search.includes("#"),He("#","search","hash",r)));let a,i=""===e||""===r.pathname,s=i?"/":r.pathname;if(null==s)a=n;else{let e=t.length-1;if(!o&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;r.pathname=t.join("/")}a=e>=0?t[e]:"/"}let l=function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",{pathname:r,search:o="",hash:a=""}="string"===typeof e?Ee(e):e;return r?(r=Ge(r),t=r.startsWith("/")||r.startsWith("\\")?Be(r.substring(1),"/"):Be(r,n)):t=n,{pathname:t,search:Qe(o),hash:Je(a)}}(r,a),u=s&&"/"!==s&&s.endsWith("/"),c=(i||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!u&&!c||(l.pathname+="/"),l}var Ge=e=>e.replace(/[\\/]{2,}/g,"/"),Ke=e=>Ge(e.join("/"));function Ye(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.length;for(;n>t&&47===e.charCodeAt(n-1);)n--;return n===e.length?e:e.slice(0,n)}var Ze=e=>Ye(e).replace(/^\/*/,"/"),Qe=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Je=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var Xe=class{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function et(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}function tt(e){let t=e.map(e=>e.route.path).filter(Boolean);return Ke(t)||"/"}var nt="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement;function rt(e,t){let n=e;if("string"!==typeof n||!ue.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(nt)try{let e=new URL(window.location.href),r=ce.test(n)?new URL(de(n,e.protocol)):new URL(n),a=je(r.pathname,t);r.origin===e.origin&&null!=a?n=a+r.search+r.hash:o=!0}catch(a){ve(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:n}}Symbol("Uninstrumented");Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var ot=new URL("http://localhost");function at(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),ot)}catch{return ot}}function it(e,t){return e.origin===t.origin&&("null"!==e.origin||e.protocol===t.protocol&&e.host===t.host)}function st(e,t,n,r){let o=null;try{o=null==e?null:new URL(e,n)}catch{}let a=new URL(t,n),i=null!=o&&!it(o,n),s=!it(a,n);if("reject"===r){if(i||s)throw new Error("External navigation is not allowed")}else if(s&&(null==o||!function(e,t){if(e.startsWith("//"))return!0;let n=t.protocol.toLowerCase();return!!e.toLowerCase().startsWith(n)&&(""===t.host||e.slice(n.length).startsWith("//"))}(e,o)||!it(o,a)))throw new Error("External navigation is not allowed")}var lt=["POST","PUT","PATCH","DELETE"],ut=(new Set(lt),["GET",...lt]);new Set(ut),Symbol("ResetLoaderData");new WeakMap,new WeakMap,new WeakMap,new WeakMap;var ct=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function dt(e){try{return ct.includes(new URL(e).protocol)}catch{return!1}}var ft=i().createContext(null);ft.displayName="DataRouter";var pt=i().createContext(null);pt.displayName="DataRouterState";var ht=i().createContext(!1);function mt(){return i().useContext(ht)}var vt=i().createContext({isTransitioning:!1});vt.displayName="ViewTransition";var gt=i().createContext(new Map);gt.displayName="Fetchers";var yt=i().createContext(null);yt.displayName="Await";var bt=i().createContext(null);bt.displayName="Navigation";var Et=i().createContext(null);Et.displayName="Location";var St=i().createContext({outlet:null,matches:[],isDataRoute:!1});St.displayName="Route";var Ct=i().createContext(null);Ct.displayName="RouteError";var wt="REACT_ROUTER_ERROR";function xt(){return null!=i().useContext(Et)}function kt(){return me(xt(),"useLocation() may be used only in the context of a component."),i().useContext(Et).location}var _t="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function It(e){i().useContext(bt).static||i().useLayoutEffect(e)}function At(){let{isDataRoute:e}=i().useContext(St);return e?function(){let{router:e}=zt("useNavigate"),t=jt("useNavigate"),n=i().useRef(!1);It(()=>{n.current=!0});let r=i().useCallback(async function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ve(n.current,_t),n.current&&("number"===typeof r?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...o}))},[e,t]);return r}():function(){me(xt(),"useNavigate() may be used only in the context of a component.");let e=i().useContext(ft),{basename:t,navigator:n}=i().useContext(bt),{matches:r}=i().useContext(St),{pathname:o}=kt(),a=JSON.stringify(Ve(r)),s=i().useRef(!1);It(()=>{s.current=!0});let l=i().useCallback(function(r){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(ve(s.current,_t),!s.current)return;if("number"===typeof r)return void n.go(r);let l=qe(r,JSON.parse(a),o,"path"===i.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:Ke([t,l.pathname])),st("string"===typeof r?r:be(r),n.createHref(l),at(n),"reject"),(i.replace?n.replace:n.push)(l,i.state,i)},[t,n,a,o,e]);return l}()}i().createContext(null);function Pt(e){let{relative:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{matches:n}=i().useContext(St),{pathname:r}=kt(),o=JSON.stringify(Ve(n));return i().useMemo(()=>qe(e,JSON.parse(o),r,"path"===t),[e,o,r,t])}function Tt(e,t,n){me(xt(),"useRoutes() may be used only in the context of a component.");let{navigator:r}=i().useContext(bt),{matches:o}=i().useContext(St),a=o[o.length-1],s=a?a.params:{},l=a?a.pathname:"/",u=a?a.pathnameBase:"/",c=a&&a.route;{let e=c&&c.path||"";$t(l,!c||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${l}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent to .`)}let d,f=kt();if(t){let e="string"===typeof t?Ee(t):t;me("/"===u||e.pathname?.startsWith(u),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=f;let p=d.pathname||"/",h=p;if("/"!==u){let e=u.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(e.length).join("/")}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):we(e,{pathname:h});ve(c||null!=m,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),ve(null==m||void 0!==m[m.length-1].route.element||void 0!==m[m.length-1].route.Component||void 0!==m[m.length-1].route.lazy,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let v=Ft(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:Ke([u,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:Ke([u,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),o,n);return t&&v?i().createElement(Et.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},v):v}function Nt(){let e=Bt(),t=et(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=i().createElement(i().Fragment,null,i().createElement("p",null,"\ud83d\udcbf Hey developer \ud83d\udc4b"),i().createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",i().createElement("code",{style:a},"ErrorBoundary")," or"," ",i().createElement("code",{style:a},"errorElement")," prop on your route.")),i().createElement(i().Fragment,null,i().createElement("h2",null,"Unexpected Application Error!"),i().createElement("h3",{style:{fontStyle:"italic"}},t),n?i().createElement("pre",{style:o},n):null,s)}var Rt=i().createElement(Nt,null),Ot=class extends i().Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"===typeof e&&e&&"digest"in e&&"string"===typeof e.digest){const t=function(e){if(e.startsWith(`${wt}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"===typeof t&&t&&"number"===typeof t.status&&"string"===typeof t.statusText)return new Xe(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?i().createElement(St.Provider,{value:this.props.routeContext},i().createElement(Ct.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?i().createElement(Ut,{error:e},t):t}};Ot.contextType=ht;var Mt=new WeakMap;function Ut(e){let{children:t,error:n}=e,{basename:r,navigator:o}=i().useContext(bt);if("object"===typeof n&&n&&"digest"in n&&"string"===typeof n.digest){let e=function(e){if(e.startsWith(`${wt}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"===typeof t&&t&&"number"===typeof t.status&&"string"===typeof t.statusText&&"string"===typeof t.location&&"boolean"===typeof t.reloadDocument&&"boolean"===typeof t.replace)return t}catch{}}(n.digest);if(e){let t=Mt.get(n);if(t)throw t;let a=rt(e.location,r),s=a.absoluteURL||a.to;if(st(e.location,s,at(o),"allow-explicit"),dt(s))throw new Error("Invalid redirect location");if(nt&&!Mt.get(n)){if(!a.isExternal&&!e.reloadDocument){const t=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw Mt.set(n,t),t}window.location.href=s}return i().createElement("meta",{httpEquiv:"refresh",content:`0;url=${s}`})}}return t}function Dt(e){let{routeContext:t,match:n,children:r}=e,o=i().useContext(ft);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),i().createElement(St.Provider,{value:t},r)}function Ft(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,r=n?.state;if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let o=e,a=r?.errors;if(null!=a){let e=o.findIndex(e=>e.route.id&&void 0!==a?.[e.route.id]);me(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),o=o.slice(0,Math.min(o.length,e+1))}let s=!1,l=-1;if(n&&r){s=r.renderFallback;for(let e=0;e=0?o.slice(0,l+1):[o[0]];break}}}}let u=n?.onError,c=r&&u?(e,t)=>{u(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:tt(r.matches),errorInfo:t})}:void 0;return o.reduceRight((e,n,u)=>{let d,f=!1,p=null,h=null;r&&(d=a&&n.route.id?a[n.route.id]:void 0,p=n.route.errorElement||Rt,s&&(l<0&&0===u?($t("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,h=null):l===u&&(f=!0,h=n.route.hydrateFallbackElement||null)));let m=t.concat(o.slice(0,u+1)),v=()=>{let t;return t=d?p:f?h:n.route.Component?i().createElement(n.route.Component,null):n.route.element?n.route.element:e,i().createElement(Dt,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===u)?i().createElement(Ot,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:v(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:c}):v()},null)}function Lt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zt(e){let t=i().useContext(ft);return me(t,Lt(e)),t}function Wt(e){let t=i().useContext(pt);return me(t,Lt(e)),t}function jt(e){let t=function(e){let t=i().useContext(St);return me(t,Lt(e)),t}(e),n=t.matches[t.matches.length-1];return me(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Bt(){let e=i().useContext(Ct),t=Wt("useRouteError"),n=jt("useRouteError");return void 0!==e?e:t.errors?.[n]}var Ht={};function $t(e,t,n){t||Ht[e]||(Ht[e]=!0,ve(!1,n))}var Vt={};function qt(e,t){e||Vt[t]||(Vt[t]=!0,console.warn(t))}v().useOptimistic;i().memo(Gt);function Gt(e){let{routes:t,manifest:n,future:r,state:o,isStatic:a,onError:i}=e;return Tt(t,void 0,{manifest:n,state:o,isStatic:a,onError:i,future:r})}function Kt(e){me(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function Yt(e){let{basename:t="/",children:n=null,location:r,navigationType:o="POP",navigator:a,static:s=!1,useTransitions:l}=e;me(!xt(),"You cannot render a inside another . You should never have more than one in your app.");let u=t.replace(/^\/*/,"/"),c=i().useMemo(()=>({basename:u,navigator:a,static:s,useTransitions:l,future:{}}),[u,a,s,l]);"string"===typeof r&&(r=Ee(r));let{pathname:d="/",search:f="",hash:p="",state:h=null,key:m="default",mask:v}=r,g=i().useMemo(()=>{let e=je(d,u);return null==e?null:{location:{pathname:e,search:f,hash:p,state:h,key:m,mask:v},navigationType:o}},[u,d,f,p,h,m,o,v]);return ve(null!=g,` is not able to match the URL "${d}${f}${p}" because it does not start with the basename, so the won't render anything.`),null==g?null:i().createElement(bt.Provider,{value:c},i().createElement(Et.Provider,{children:n,value:g}))}function Zt(e){let{children:t,location:n}=e;return Tt(Qt(t),n)}i().Component;function Qt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[];return i().Children.forEach(e,(e,r)=>{if(!i().isValidElement(e))return;let o=[...t,r];if(e.type===i().Fragment)return void n.push.apply(n,Qt(e.props.children,o));me(e.type===Kt,`[${"string"===typeof e.type?e.type:e.type.name}] is not a component. All component children of must be a or `),me(!e.props.index||!e.props.children,"An index route cannot have child routes.");let a={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Qt(e.props.children,o)),n.push(a)}),n}var Jt="get",Xt="application/x-www-form-urlencoded";function en(e){return"undefined"!==typeof HTMLElement&&e instanceof HTMLElement}var tn=null;var nn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function rn(e){return null==e||nn.has(e)?e:(ve(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${Xt}"`),null)}function on(e,t){let n,r,o,a,i;if(en(s=e)&&"form"===s.tagName.toLowerCase()){let i=e.getAttribute("action");r=i?je(i,t):null,n=e.getAttribute("method")||Jt,o=rn(e.getAttribute("enctype"))||Xt,a=new FormData(e)}else if(function(e){return en(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return en(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a