1/*! For license information please see commons-7a6aeb38c4c376b0c591.js.LICENSE.txt */ 2(self.webpackChunkgatsby_starter_blog=self.webpackChunkgatsby_starter_blog||[]).push([[351],{72721:function(e,t,n){"use strict";n.d(t,{g:function(){return un}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o,s,a,u=function(){return u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},u.apply(this,arguments)};function c(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function f(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function d(e){return e&&!!["provider"].find((function(t){return e.hasOwnProperty(t)}))}function h(e){return void 0!==e.redirectSignIn}!function(e){e.Cognito="COGNITO",e.Google="Google",e.Facebook="Facebook",e.Amazon="LoginWithAmazon",e.Apple="SignInWithApple"}(o||(o={})),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"}(s||(s={})),function(e){e.API_KEY="API_KEY",e.AWS_IAM="AWS_IAM",e.OPENID_CONNECT="OPENID_CONNECT",e.AMAZON_COGNITO_USER_POOLS="AMAZON_COGNITO_USER_POOLS",e.AWS_LAMBDA="AWS_LAMBDA"}(a||(a={}));var p=n(69719),g=function(){return g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},g.apply(this,arguments)},m=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},y=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},v=new p.k("Hub"),b="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default";var w=new(function(){function e(e){this.listeners=[],this.patterns=[],this.protectedChannels=["core","auth","api","analytics","interactions","pubsub","storage","ui","xr"],this.name=e}return e.prototype._remove=function(e,t){if(e instanceof RegExp){var n=this.patterns.find((function(t){return t.pattern.source===e.source}));if(!n)return void v.warn("No listeners for ".concat(e));this.patterns=y([],m(this.patterns.filter((function(e){return e!==n}))),!1)}else{var r=this.listeners[e];if(!r)return void v.warn("No listeners for ".concat(e));this.listeners[e]=y([],m(r.filter((function(e){return e.callback!==t}))),!1)}},e.prototype.remove=function(e,t){this._remove(e,t)},e.prototype.dispatch=function(e,t,n,r){(void 0===n&&(n=""),this.protectedChannels.indexOf(e)>-1)&&(r===b||v.warn("WARNING: ".concat(e," is protected and dispatching on it can have unintended consequences")));var i={channel:e,payload:g({},t),source:n,patternInfo:[]};try{this._toListeners(i)}catch(o){v.error(o)}},e.prototype.listen=function(e,t,n){var r,i=this;if(void 0===n&&(n="noname"),function(e){return void 0!==e.onHubCapsule}(t))v.warn("WARNING onHubCapsule is Deprecated. Please pass in a callback."),r=t.onHubCapsule.bind(t);else{if("function"!=typeof t)throw new Error("No callback supplied to Hub");r=t}if(e instanceof RegExp)this.patterns.push({pattern:e,callback:r});else{var o=this.listeners[e];o||(o=[],this.listeners[e]=o),o.push({name:n,callback:r})}return function(){i._remove(e,r)}},e.prototype._toListeners=function(e){var t=e.channel,n=e.payload,r=this.listeners[t];if(r&&r.forEach((function(r){v.debug("Dispatching to ".concat(t," with "),n);try{r.callback(e)}catch(i){v.error(i)}})),this.patterns.length>0){if(!n.message)return void v.warn("Cannot perform pattern matching without a message
2key");var i=n.message;this.patterns.forEach((function(t){var n=i.match(t.pattern);if(n){var r=m(n).slice(1),o=g(g({},e),{patternInfo:r});try{t.callback(o)}catch(s){v.error(s)}}}))}},e}())("__default__"),S={},C=function(){function e(){}return e.setItem=function(e,t){return S[e]=t,S[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call(S,e)?S[e]:void 0},e.removeItem=function(e){return delete S[e]},e.clear=function(){return S={}},e}(),E=function(){function e(){try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.amplify.test-ls",1),this.storageWindow.removeItem("aws.amplify.test-ls")}catch(e){this.storageWindow=C}}return e.prototype.getStorage=function(){return this.storageWindow},e}(),_=function(){return{isBrowser:"undefined"!=typeof window&&void 0!==window.document,isNode:"undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node}},A=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),I=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},P=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(u){a=[6,u],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},O=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},x=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},T=new p.k("Util"),k=function(e){function t(t){var n=e.call(this,t)||this;return n.nonRetryable=!0,n}return A(t,e),t}(Error);var U=3e5;function D(e){void 0===e&&(e=U);return function(t){var n=100*Math.pow(2,t)+100*Math.random();return!(n>e)&&n}}var R,N,M,F,j,L,V,B,q,K,G,W,H,Q=function(e,t,n,r){return void 0===n&&(n=U),function(e,t,n,r){return I(this,void 0,void 0,(function(){var i=this;return P(this,(function(o){if("function"!=typeof e)throw Error("functionToRetry must be a function");return[2,new Promise((function(o,s){return I(i,void 0,void 0,(function(){var i,a,u,c,l,f,d;return P(this,(function(h){switch(h.label){case 0:i=0,a=!1,c=function(){},r&&r.then((function(){a=!0,clearTimeout(u),c()})),f=function(){var r,f,d,h;return P(this,(function(p){switch(p.label){case 0:i++,T.debug("".concat(e.name," attempt #").concat(i," with this vars: ").concat(JSON.stringify(t))),p.label=1;
2case 1:return p.trys.push([1,3,,7]),r={},f=o,[4,e.apply(void 0,x([],O(t),!1))];case 2:return[2,(r.value=f.apply(void 0,[p.sent()]),r)];case 3:return d=p.sent(),l=d,T.debug("error on ".concat(e.name),d),(g=d)&&g.nonRetryable?(T.debug("".concat(e.name," non retryable error"),d),[2,{value:s(d)}]):(h=n(i,t,d),T.debug("".concat(e.name," retrying in ").concat(h," ms")),!1===h||a?[2,{value:s(d)}]:[3,4]);case 4:return[4,new Promise((function(e){c=e,u=setTimeout(c,h)}))];case 5:p.sent(),p.label=6;case 6:return[3,7];case 7:return[2]}var g}))},h.label=1;case 1:return a?[3,3]:[5,f()];case 2:return"object"==typeof(d=h.sent())?[2,d.value]:[3,1];case 3:return s(l),[2]}}))}))}))]}))}))}(e,t,D(n),r)},$=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},z=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(u){a=[6,u],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},Y=new p.k("CognitoCredentials"),Z=new Promise((function(e,t){return _().isBrowser?(window.gapi&&window.gapi.auth2?window.gapi.auth2:null)?(Y.debug("google api already loaded"),e()):void setTimeout((function(){return e()}),2e3):(Y.debug("not in the browser, directly resolved"),e())})),J=function(){function e(){this.initialized=!1,this.refreshGoogleToken=this.refreshGoogleToken.bind(this),this._refreshGoogleTokenImpl=this._refreshGoogleTokenImpl.bind(this)}return e.prototype.refreshGoogleToken=function(){return $(this,void 0,void 0,(function(){return z(this,(function(e){switch(e.label){case 0:return this.initialized?[3,2]:(Y.debug("need to wait for the Google SDK loaded"),[4,Z]);case 1:e.sent(),this.initialized=!0,Y.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshGoogleTokenImpl()]}}))}))},e.prototype._refreshGoogleTokenImpl=function(){var e=null;return _().isBrowser&&(e=window.gapi&&window.gapi.auth2?window.gapi.auth2:null),e?new Promise((function(t,n){e.getAuthInstance().then((function(e){e||(Y.debug("google Auth undefined"),n(new k("google Auth undefined")));var r=e.currentUser.get();r.isSignedIn()?(Y.debug("refreshing the google access token"),r.reloadAuthResponse().then((function(e){var n=e.id_token,r=e.expires_at;t({token:n,expires_at:r})})).catch((function(e){e&&"network_error"===e.error?n("Network error reloading google auth response"):n(new k("Failed to reload google auth response"))}))):n(new k("User is not signed in with Google"))})).catch((function(e){Y.debug("Failed to refresh google token",e),n(new k("Failed to refresh google token"))}))})):(Y.debug("no gapi auth2 available"),Promise.reject("no gapi auth2 available"))},e}(),X=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},ee=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;
2function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(u){a=[6,u],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},te=new p.k("CognitoCredentials"),ne=new Promise((function(e,t){return _().isBrowser?window.FB?(te.debug("FB SDK already loaded"),e()):void setTimeout((function(){return e()}),2e3):(te.debug("not in the browser, directly resolved"),e())})),re=function(){function e(){this.initialized=!1,this.refreshFacebookToken=this.refreshFacebookToken.bind(this),this._refreshFacebookTokenImpl=this._refreshFacebookTokenImpl.bind(this)}return e.prototype.refreshFacebookToken=function(){return X(this,void 0,void 0,(function(){return ee(this,(function(e){switch(e.label){case 0:return this.initialized?[3,2]:(te.debug("need to wait for the Facebook SDK loaded"),[4,ne]);case 1:e.sent(),this.initialized=!0,te.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshFacebookTokenImpl()]}}))}))},e.prototype._refreshFacebookTokenImpl=function(){var e=null;if(_().isBrowser&&(e=window.FB),!e){var t="no fb sdk available";return te.debug(t),Promise.reject(new k(t))}return new Promise((function(t,n){e.getLoginStatus((function(e){if(e&&e.authResponse){var r=e.authResponse,i=r.accessToken,o=1e3*r.expiresIn+(new Date).getTime();if(!i){s="the jwtToken is undefined";te.debug(s),n(new k(s))}t({token:i,expires_at:o})}else{var s="no response from facebook when refreshing the jwt token";te.debug(s),n(new k(s))}}),{scope:"public_profile,email"})}))},e}(),ie=new J,oe=new re,se=n(25387),ae={id:"aws",outputs:{dnsSuffix:"amazonaws.com"},regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",regions:["aws-global"]},ue={partitions:[ae,{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn"},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:["aws-cn-global"]}]},ce=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},le=function(e){var t,n,r=ue.partitions;try{for(var i=ce(r),o=i.next();!o.done;o=i.next()){var s=o.value,a=s.regions,u=s.outputs,c=s.regionRegex,l=new RegExp(c);if(a.includes(e)||l.test(e))return u.dnsSuffix}}catch(f){t={error:f}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return ae.outputs.dnsSuffix},fe=function(){return fe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},fe.apply(this,arguments)},de=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},he=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(u){a=[6,u],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}
2,pe=function(e,t){if(null==t?void 0:t.aborted)return Promise.resolve();var n,r,i=new Promise((function(t){r=t,n=setTimeout(t,e)}));return null==t||t.addEventListener("abort",(function e(i){clearTimeout(n),null==t||t.removeEventListener("abort",e),r()})),i},ge=function(e,t){var n;"[object Object]"===Object.prototype.toString.call(e)&&(e.$metadata=fe(fe({},null!==(n=e.$metadata)&&void 0!==n?n:{}),{attempts:t}))},me=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},ye=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(u){a=[6,u],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},ve=function(e,t){return function(n,r){for(var i={},o=function(t){return e(t,r)},s=t.length-1;s>=0;s--){o=(0,t[s])(r)(o,i)}return o(n)}},be=(n(21060),function(e){var t;return function(){return t||(t=e()),t}}),we=function(){return we=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},we.apply(this,arguments)},Se=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},Ce=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(u){a=[6,u],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},Ee=function(e){return!["HEAD","GET","DELETE"].includes(e.toUpperCase())},_e=ve((function(e,t){var n=e.url,r=e.method,i=e.headers,o=e.body,s=t.abortSignal;return Se(void 0,void 0,void 0,(function(){var e,t,a,u,c,l,f;return Ce(this,(function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),[4,fetch(n,{method:r,headers:i,body:Ee(r)?o:void 0,signal:s})];case 1:return e=d.sent(),[3,3];case 2:if((t=d.sent())instanceof TypeError)throw new Error("Network error");throw t;case 3:return a={},null===(l=e.headers)||void 0===l||l.forEach((function(e,t){a[t.toLowerCase()]=e})),u={statusCode:e.status,headers:a,body:null},c=Object.assign(null!==(f=e.body)&&void 0!==f?f:{},{text:be((function(){return e.text()})),blob:be((function(){return e.blob()})),json:be((function(){return e.json()}))}),[2,we(we({},u),{body:c})]}}))}))}),[function(e){var t=e.userAgentHeader,n=void 0===t?"x-amz-user-agent":t,r=e.userAgentValue,i=void 0===r?"":r;return function(e){return function(t){return me(this,void 0,void 0,(function(){var r;return ye(this,(function(o){switch(o.label){case 0:return 0!==i.trim().length?[3,2]:[4,e(t)];case 1:return[2,o.sent()];case 2:return r=n.toLowerCase(),t.headers[r]=t.headers[r]?"".concat(t.headers[r]," ").concat(i):i,[4,e(t)];case 3:return[2,o.sent()]}}))}))}}},function(e){var t=e.maxAttempts,n=void 0===t?3:t,r=e.retryDecider,i=e.computeDelay,o=e.abortSignal;if(n<1)throw new Error("maxAttempts must be greater than 0");return function(e,t){return function(s){var a;return de(this,void 0,void 0,(function(){var u,c,l,f,d,h;return he(this,(function(p){switch(p.label){case 0:c=null!==(a=t.attemptsCount)&&void 0!==a?a:0,f=function(){if(l)return ge(l,c),l;throw ge(u,c),u},p.label=1;case 1:if((null==o?void 0:o.aborted)||!(c<n))return[3,11];p.label=2;case 2:return p.trys.push([2,4,,5]),[4,e(s)];case 3:return l=p.sent(),u=void 0,[3,5];case 4:return d=p.sent(),u=d,l=void 0,[3,5];case 5:return c=t.attemptsCount>c?t.attemptsCount:c+1,t.attemptsCount=c,[4,r(l,u)];case 6:return p.sent()?!(null==o?void 0:o.aborted)&&c<n?(h=i(c),[4,pe(h,o)]):[3,8]:[3,9];case 7:p.sent(),p.label=8;case 8:return[3,1];case 9:return[2,f()];case 10:return[3,1];case 11:if(null==o?void 0:o.aborted)throw new Error("Request aborted.");return[2,f()]}}))}))}}}]),Ae=function(){return Ae=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ae.apply(this,arguments)},Ie=function(e){var t,n,r=e.headers,i=e.statusCode;return Ae(Ae({},Pe(e)?e.$metadata:{}),{httpStatusCode:i,requestId:null!==(n=null!==(t=r["x-amzn-requestid"])&&void 0!==t?t:r["x-amzn-request-id"])&&void 0!==n?n:r["x-amz-request-id"],extendedRequestId:r["x-amz-id-2"],cfId:r["x-amz-cf-id"]})},Pe=function(e){return"object"==typeof(null==e?void 0:e.$metadata)}
2,Oe=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},xe=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(u){a=[6,u],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},Te=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},ke=function(e){return Oe(void 0,void 0,void 0,(function(){var t,n,r,i,o,s,a,u,c;return xe(this,(function(l){switch(l.label){case 0:return!e||e.statusCode<300?[2]:[4,Ue(e)];case 1:return t=l.sent(),n=function(e){var t=Te(e.toString().split(/[\,\:]+/),1)[0];return t.includes("#")?t.split("#")[1]:t}(null!==(a=null!==(s=null!==(o=e.headers["x-amzn-errortype"])&&void 0!==o?o:t.code)&&void 0!==s?s:t.__type)&&void 0!==a?a:"UnknownError"),r=null!==(c=null!==(u=t.message)&&void 0!==u?u:t.Message)&&void 0!==c?c:"Unknown error",i=new Error(r),[2,Object.assign(i,{name:n,$metadata:Ie(e)})]}}))}))},Ue=function(e){return Oe(void 0,void 0,void 0,(function(){var t;return xe(this,(function(n){switch(n.label){case 0:if(!e.body)throw new Error("Missing response payload");return[4,e.body.json()];case 1:return t=n.sent(),[2,Object.assign(t,{$metadata:Ie(e)})]}}))}))},De=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch","BadRequestException"],Re=function(e){return De.includes(e)},Ne=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},Me=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(u){a=[6,u],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},Fe=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException"],je=["TimeoutError","RequestTimeout","RequestTimeoutException"],Le=function(e,t){return 429===e||Fe.includes(t)},Ve=function(e){return"Network error"===(null==e?void 0:e.name)},Be=function(e,t){return[500,502,503,504].includes(e)||je.includes(t)},qe=3e5;!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.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"}(N||(N={})),function(e){e.Record="1",e.UpdateEndpoint="2"}(M||(M={})),function(e){e.GraphQl="1",e.Get="2",e.Post="3",e.Put="4",e.Patch="5",e.Del="6",e.Head="7"}(F||(F={})),function(e){e.FederatedSignIn="30"}(j||(j={})),function(e){e.Subscribe="1",e.GraphQl="2"}(L||(L={})),function(e){e.None="0"}(V||(V={})),function(e){e.None="0"}(B||(B={})),function(e){e.None="0"}(q||(q={})),function(e){e.Convert="1",e.Identify="2",e.Interpret="3"}(K||(K={})),function(e){e.Subscribe="1"}(G||(G={})),function(e){e.None="0"}(W||(W={})),function(e){e.Put="1",e.Get="2",e.List="3",e.Copy="4",e.Remove="5",e.GetProperties="6"}(H||(H={}));var Ke="5.3.15",Ge=function(){return void 0!==n.g},We=function(){return"undefined"!=typeof window},He=function(){return"undefined"!=typeof document},Qe=function(){return"undefined"!=typeof process}
2,$e=function(e,t){return!!Object.keys(e).find((function(e){return e.startsWith(t)}))};var ze,Ye=[{platform:R.Expo,detectionMethod:function(){return Ge()&&void 0!==n.g.expo}},{platform:R.ReactNative,detectionMethod:function(){return"undefined"!=typeof navigator&&void 0!==navigator.product&&"ReactNative"===navigator.product}},{platform:R.NextJs,detectionMethod:function(){return We()&&window.next&&"object"==typeof window.next}},{platform:R.Nuxt,detectionMethod:function(){return We()&&(void 0!==window.__NUXT__||void 0!==window.$nuxt)}},{platform:R.Angular,detectionMethod:function(){var e=Boolean(He()&&document.querySelector("[ng-version]")),t=Boolean(We()&&void 0!==window.ng);return e||t}},{platform:R.React,detectionMethod:function(){var e=function(e){return e.startsWith("_react")||e.startsWith("__react")};return He()&&Array.from(document.querySelectorAll("[id]")).some((function(t){return Object.keys(t).find(e)}))}},{platform:R.VueJs,detectionMethod:function(){return We()&&$e(window,"__VUE")}},{platform:R.Svelte,detectionMethod:function(){return We()&&$e(window,"__SVELTE")}},{platform:R.WebUnknown,detectionMethod:function(){return We()}},{platform:R.NextJsSSR,detectionMethod:function(){return Ge()&&($e(n.g,"__next")||$e(n.g,"__NEXT"))}},{platform:R.NuxtSSR,detectionMethod:function(){return Ge()&&void 0!==n.g.__NUXT_PATHS__}},{platform:R.ReactSSR,detectionMethod:function(){return Qe()&&void 0!=={}&&!!Object.keys({}).find((function(e){return e.includes("react")}))}},{platform:R.VueJsSSR,detectionMethod:function(){return Ge()&&$e(n.g,"__VUE")}},{platform:R.AngularSSR,detectionMethod:function(){var e;return Qe()&&"object"==typeof{}&&(null===(e={}.npm_lifecycle_script)||void 0===e?void 0:e.startsWith("ng "))||!1}},{platform:R.SvelteSSR,detectionMethod:function(){return Qe()&&void 0!=={}&&!!Object.keys({}).find((function(e){return e.includes("svelte")}))}}];var Ze=[],Je=!1,Xe=function(){if(!ze){if(ze=(null===(e=Ye.find((function(e){return e.detectionMethod()})))||void 0===e?void 0:e.platform)||R.ServerSideUnknown,Je)for(;Ze.length;)Ze.pop()();else Ze.forEach((function(e){return e()}));tt(R.ServerSideUnknown,10),tt(R.WebUnknown,10)}var e;return ze},et=function(e){Je||Ze.push(e)};function tt(e,t){ze!==e||Je||setTimeout((function(){ze=void 0,Je=!0,setTimeout(Xe,1e3)}),t)}var nt,rt=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},it="aws-amplify",ot=new(function(){function e(){this.userAgent="".concat(it,"/").concat(Ke)}return Object.defineProperty(e.prototype,"framework",{get:function(){return Xe()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isReactNative",{get:function(){return this.framework===R.ReactNative||this.framework===R.Expo},enumerable:!1,configurable:!0}),e.prototype.observeFrameworkChanges=function(e){et(e)},e}()),st=function(e){return function(e){var t=void 0===e?{}:e,n=t.category,r=t.action,i=(t.framework,[[it,Ke]]);return n&&i.push([n,r]),i.push(["framework",Xe()]),i}(e).map((function(e){var t=rt(e,2),n=t[0],r=t[1];return"".concat(n,"/").concat(r)})).join(" ")},at=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},ut=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(u){a=[6,u],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},ct=ve(_e,[function(){return function(e,t){return function(t){return at(this,void 0,void 0,(function(){return ut(this,(function(n){return t.headers["cache-control"]="no-store",[2,e(t)]}))}))}}}]),lt={service:"cognito-identity",endpointResolver:function(e){var t=e.region;
2return{url:new URL("https://cognito-identity.".concat(t,".").concat(le(t)))}},retryDecider:(nt=ke,function(e,t){return Ne(void 0,void 0,void 0,(function(){var n,r,i,o;return Me(this,(function(s){switch(s.label){case 0:return null==t?[3,1]:(r=t,[3,3]);case 1:return[4,nt(e)];case 2:r=s.sent(),s.label=3;case 3:return n=(null!==(o=r)&&void 0!==o?o:{}).name,i=null==e?void 0:e.statusCode,[2,Ve(t)||Le(i,n)||Re(n)||Be(i,n)]}}))}))}),computeDelay:function(e){var t=D(qe)(e);return!1===t?qe:t},userAgentValue:st()};et((function(){lt.userAgentValue=st()}));var ft=function(e){return{"content-type":"application/x-amz-json-1.1","x-amz-target":"AWSCognitoIdentityService.".concat(e)}},dt=function(e,t,n){return{headers:t,url:e.url,body:n,method:"POST"}},ht=function(){return ht=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ht.apply(this,arguments)},pt=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},gt=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(u){a=[6,u],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},mt=function(e,t,n,r){return function(i,o){return pt(void 0,void 0,void 0,(function(){var s,a,u,c;return gt(this,(function(l){switch(l.label){case 0:return[4,(s=ht(ht({},r),i)).endpointResolver(s,o)];case 1:return a=l.sent(),[4,t(o,a)];case 2:return u=l.sent(),[4,e(u,ht({},s))];case 3:return c=l.sent(),[4,n(c)];case 4:return[2,l.sent()]}}))}))}},yt=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},vt=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(u){a=[6,u],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},bt=mt(ct,(function(e,t){var n=ft("GetId"),r=JSON.stringify(e);return dt(t,n,r)}),(function(e){return yt(void 0,void 0,void 0,(function(){return vt(this,(function(t){switch(t.label){case 0:return e.statusCode>=300?[4,ke(e)]:[3,2];case 1:throw t.sent();case 2:return[4,Ue(e)];case 3:return[2,{IdentityId:t.sent().IdentityId,$metadata:Ie(e)}]}}))}))}
2),lt),wt=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},St=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(u){a=[6,u],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},Ct=function(e){return void 0===e&&(e={}),{AccessKeyId:e.AccessKeyId,SecretKey:e.SecretKey,SessionToken:e.SessionToken,Expiration:new Date(1e3*e.Expiration)}},Et=mt(ct,(function(e,t){var n=ft("GetCredentialsForIdentity"),r=JSON.stringify(e);return dt(t,n,r)}),(function(e){return wt(void 0,void 0,void 0,(function(){var t;return St(this,(function(n){switch(n.label){case 0:return e.statusCode>=300?[4,ke(e)]:[3,2];case 1:throw n.sent();case 2:return[4,Ue(e)];case 3:return[2,{IdentityId:(t=n.sent()).IdentityId,Credentials:Ct(t.Credentials),$metadata:Ie(e)}]}}))}))}),lt),_t=function(){return _t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_t.apply(this,arguments)},At=new p.k("Parser"),It=function(e){var t,n={};if(e.aws_mobile_analytics_app_id){var r={AWSPinpoint:{appId:e.aws_mobile_analytics_app_id,region:e.aws_mobile_analytics_app_region}};n.Analytics=r}return(e.aws_cognito_identity_pool_id||e.aws_user_pools_id)&&(n.Auth={userPoolId:e.aws_user_pools_id,userPoolWebClientId:e.aws_user_pools_web_client_id,region:e.aws_cognito_region,identityPoolId:e.aws_cognito_identity_pool_id,identityPoolRegion:e.aws_cognito_region,mandatorySignIn:"enable"===e.aws_mandatory_sign_in,signUpVerificationMethod:e.aws_cognito_sign_up_verification_method||"code"}),t=e.aws_user_files_s3_bucket?{AWSS3:{bucket:e.aws_user_files_s3_bucket,region:e.aws_user_files_s3_bucket_region,dangerouslyConnectToHttpEndpointForTesting:e.aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing}}:e?e.Storage||e:{},e.Logging&&(n.Logging=_t(_t({},e.Logging),{region:e.aws_project_region})),e.geo&&(n.Geo=Object.assign({},e.geo),e.geo.amazon_location_service&&(n.Geo={AmazonLocationService:e.geo.amazon_location_service})),n.Analytics=Object.assign({},n.Analytics,e.Analytics),n.Auth=Object.assign({},n.Auth,e.Auth),n.Storage=Object.assign({},t),n.Logging=Object.assign({},n.Logging,e.Logging),At.debug("parse config",e,"to amplifyconfig",n),n},Pt=function(){return Pt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Pt.apply(this,arguments)},Ot=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},xt=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;
2function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(u){a=[6,u],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},Tt=new p.k("Credentials"),kt="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",Ut=function(){function e(e){this._gettingCredPromise=null,this._refreshHandlers={},this.Auth=void 0,this.configure(e),this._refreshHandlers.google=ie.refreshGoogleToken,this._refreshHandlers.facebook=oe.refreshFacebookToken}return e.prototype.getModuleName=function(){return"Credentials"},e.prototype.getCredSource=function(){return this._credentials_source},e.prototype.configure=function(e){if(!e)return this._config||{};this._config=Object.assign({},this._config,e);var t,n,r,i=this._config.refreshHandlers;return i&&(this._refreshHandlers=Pt(Pt({},this._refreshHandlers),i)),this._storage=this._config.storage,this._storage||(this._storage=(new E).getStorage()),this._storageSync=Promise.resolve(),"function"==typeof this._storage.sync&&(this._storageSync=this._storage.sync()),t="credentials_configured",n=null,r="Credentials has been configured successfully",w.dispatch("core",{event:t,data:n,message:r},"Credentials",kt),this._config},e.prototype.get=function(){return Tt.debug("getting credentials"),this._pickupCredentials()},e.prototype._getCognitoIdentityIdStorageKey=function(e){return"".concat("CognitoIdentityId-").concat(e)},e.prototype._pickupCredentials=function(){return Tt.debug("picking up credentials"),this._gettingCredPromise&&this._gettingCredPromise.isPending()?Tt.debug("getting old cred promise"):(Tt.debug("getting new cred promise"),this._gettingCredPromise=function(e){if(e.isResolved)return e;var t=!0,n=!1,r=!1,i=e.then((function(e){return r=!0,t=!1,e}),(function(e){throw n=!0,t=!1,e}));return i.isFullfilled=function(){return r},i.isPending=function(){return t},i.isRejected=function(){return n},i}(this._keepAlive())),this._gettingCredPromise},e.prototype._keepAlive=function(){return Ot(this,void 0,void 0,(function(){var e,t,n,r,i,o,s;return xt(this,(function(a){switch(a.label){case 0:if(Tt.debug("checking if credentials exists and not expired"),(e=this._credentials)&&!this._isExpired(e)&&!this._isPastTTL())return Tt.debug("credentials not changed and not expired, directly return"),[2,Promise.resolve(e)];if(Tt.debug("need to get a new credential or refresh the existing one"),t=this.Auth,!(n=void 0===t?se.d.Auth:t)||"function"!=typeof n.currentUserCredentials)return[2,this._setCredentialsForGuest()];if(this._isExpired(e)||!this._isPastTTL())return[3,6];Tt.debug("ttl has passed but token is not yet expired"),a.label=1;case 1:return a.trys.push([1,5,,6]),[4,n.currentUserPoolUser()];case 2:return r=a.sent(),[4,n.currentSession()];case 3:return i=a.sent(),o=i.refreshToken,[4,new Promise((function(e,t){r.refreshSession(o,(function(n,r){return n?t(n):e(r)}))}))];case 4:return a.sent(),[3,6];case 5:return s=a.sent(),Tt.debug("Error attempting to refreshing the session",s),[3,6];case 6:return[2,n.currentUserCredentials()]}}))}))},e.prototype.refreshFederatedToken=function(e){Tt.debug("Getting federated credentials");var t=e.provider,n=e.user,r=e.token,i=e.identity_id,o=e.expires_at;o=1970===new Date(o).getFullYear()?1e3*o:o;var s=this;return Tt.debug("checking if federated jwt token expired"),o>(new Date).getTime()?(Tt.debug("token not expired"),this._setCredentialsFromFederation({provider:t,token:r,user:n,identity_id:i,expires_at:o})):s._refreshHandlers[t]&&"function"==typeof s._refreshHandlers[t]?(Tt.debug("getting refreshed jwt token from federation provider"),this._providerRefreshWithRetry({refreshHandler:s._refreshHandlers[t],provider:t,user:n})):(Tt.debug("no refresh handler for provider:",t),this.clear(),Promise.reject("no refresh handler for provider"))},e.prototype._providerRefreshWithRetry=function(e){var t=this,n=e.refreshHandler,r=e.provider,i=e.user;
2return Q(n,[],1e4).then((function(e){return Tt.debug("refresh federated token sucessfully",e),t._setCredentialsFromFederation({provider:r,token:e.token,user:i,identity_id:e.identity_id,expires_at:e.expires_at})})).catch((function(e){return"string"==typeof e&&0===e.toLowerCase().lastIndexOf("network error",e.length)||t.clear(),Tt.debug("refresh federated token failed",e),Promise.reject("refreshing federation token failed: "+e)}))},e.prototype._isExpired=function(e){if(!e)return Tt.debug("no credentials for expiration check"),!0;Tt.debug("are these credentials expired?",e);var t=Date.now();return e.expiration.getTime()<=t},e.prototype._isPastTTL=function(){return this._nextCredentialsRefresh<=Date.now()},e.prototype._setCredentialsForGuest=function(){var e;return Ot(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u,c,l,f=this;return xt(this,(function(d){switch(d.label){case 0:return Tt.debug("setting credentials for guest"),(null===(e=this._config)||void 0===e?void 0:e.identityPoolId)||(this._config=Object.assign({},this._config,It(this._config||{}).Auth)),t=this._config,n=t.identityPoolId,r=t.region,i=t.mandatorySignIn,o=t.identityPoolRegion,i?[2,Promise.reject("cannot get guest credentials when mandatory signin enabled")]:n?o||r?(a=this,[4,this._getGuestIdentityId()]):(Tt.debug("region is not configured for getting the credentials"),[2,Promise.reject("region is not configured for getting the credentials")]):(Tt.debug("No Cognito Identity pool provided for unauthenticated access"),[2,Promise.reject("No Cognito Identity pool provided for unauthenticated access")]);case 1:return s=a._identityId=d.sent(),u={region:null!=o?o:r},c=function(){return Ot(f,void 0,void 0,(function(){var e,t;return xt(this,(function(r){switch(r.label){case 0:return s?[3,2]:[4,bt(u,{IdentityPoolId:n})];case 1:e=r.sent().IdentityId,this._identityId=e,r.label=2;case 2:return[4,Et(u,{IdentityId:this._identityId})];case 3:return t=r.sent().Credentials,[2,{identityId:this._identityId,accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretKey,sessionToken:t.SessionToken,expiration:t.Expiration}]}}))}))},l=c().catch((function(e){return Ot(f,void 0,void 0,(function(){return xt(this,(function(t){throw e}))}))})),[2,this._loadCredentials(l,"guest",!1,null).then((function(e){return e})).catch((function(e){return Ot(f,void 0,void 0,(function(){var t,r=this;return xt(this,(function(i){switch(i.label){case 0:return"ResourceNotFoundException"!==e.name||e.message!=="Identity '".concat(s,"' not found.")?[3,2]:(Tt.debug("Failed to load guest credentials"),[4,this._removeGuestIdentityId()]);case 1:return i.sent(),t=function(){return Ot(r,void 0,void 0,(function(){var e,t;return xt(this,(function(r){switch(r.label){case 0:return[4,bt(u,{IdentityPoolId:n})];case 1:return e=r.sent().IdentityId,this._identityId=e,[4,Et(u,{IdentityId:e})];case 2:return t=r.sent().Credentials,[2,{identityId:e,accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretKey,sessionToken:t.SessionToken,expiration:t.Expiration}]}}))}))},l=t().catch((function(e){return Ot(r,void 0,void 0,(function(){return xt(this,(function(t){throw e}))}))})),[2,this._loadCredentials(l,"guest",!1,null)];case 2:return[2,e]}}))}))}))]}}))}))},e.prototype._setCredentialsFromFederation=function(e){var t=this,n=e.provider,r=e.token,i=e.identity_id,o={google:"accounts.google.com",facebook:"graph.facebook.com",amazon:"www.amazon.com",developer:"cognito-identity.amazonaws.com"}[n]||n;if(!o)return Promise.reject("You must specify a federated provider");var s={};s[o]=r;var a=this._config,u=a.identityPoolId,c=a.region,l=a.identityPoolRegion;if(!u)return Tt.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");if(!l&&!c)return Tt.debug("region is not configured for getting the credentials"),Promise.reject("region is not configured for getting the credentials");var f={region:null!=l?l:c},d=Ot(t,void 0,void 0,(function(){var e,t;return xt(this,(function(n){switch(n.label){case 0:return i?[3,2]:[4,bt(f,{IdentityPoolId:u,Logins:s})];case 1:e=n.sent().IdentityId,i=e,n.label=2;case 2:return[4,Et(f,{IdentityId:i,Logins:s})];case 3:return t=n.sent().Credentials,[2,{identityId:i,accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretKey,sessionToken:t.SessionToken,expiration:t.Expiration}]}}))})).catch((function(e){return Ot(t,void 0,void 0,(function(){return xt(this,(function(t){throw e}))}))}));return this._loadCredentials(d,"federated",!0,e)},e.prototype._setCredentialsFromSession=function(e){var t=this;Tt.debug("set credentials from session");var n=e.getIdToken().getJwtToken(),r=this._config,i=r.region,o=r.userPoolId,s=r.identityPoolId,a=r.identityPoolRegion;if(!s)return Tt.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");
2if(!a&&!i)return Tt.debug("region is not configured for getting the credentials"),Promise.reject("region is not configured for getting the credentials");var u={};u["cognito-idp."+i+".amazonaws.com/"+o]=n;var c={region:null!=a?a:i},l=Ot(t,void 0,void 0,(function(){var e,t,n,r,i,o,a,l,f,d;return xt(this,(function(h){switch(h.label){case 0:return[4,this._getGuestIdentityId()];case 1:return(e=h.sent())?[3,3]:[4,bt(c,{IdentityPoolId:s,Logins:u})];case 2:n=h.sent().IdentityId,t=n,h.label=3;case 3:return[4,Et(c,{IdentityId:e||t,Logins:u})];case 4:return r=h.sent(),i=r.Credentials,o=i.AccessKeyId,a=i.Expiration,l=i.SecretKey,f=i.SessionToken,d=r.IdentityId,this._identityId=d,e?(Tt.debug("The guest identity ".concat(e," has been successfully linked to the logins")),e===d&&Tt.debug("The guest identity ".concat(e," has become the primary identity")),[4,this._removeGuestIdentityId()]):[3,6];case 5:h.sent(),h.label=6;case 6:return[2,{accessKeyId:o,secretAccessKey:l,sessionToken:f,expiration:a,identityId:d}]}}))})).catch((function(e){return Ot(t,void 0,void 0,(function(){return xt(this,(function(t){throw e}))}))}));return this._loadCredentials(l,"userPool",!0,null)},e.prototype._loadCredentials=function(e,t,n,r){var i=this,o=this;return new Promise((function(s,a){e.then((function(e){return Ot(i,void 0,void 0,(function(){var i,a,u,c,l;return xt(this,(function(f){switch(f.label){case 0:if(Tt.debug("Load credentials successfully",e),this._identityId&&!e.identityId&&(e.identityId=this._identityId),o._credentials=e,o._credentials.authenticated=n,o._credentials_source=t,o._nextCredentialsRefresh=(new Date).getTime()+3e6,"federated"===t){i=Object.assign({id:this._credentials.identityId},r.user),a=r.provider,u=r.token,c=r.expires_at,l=r.identity_id;try{this._storage.setItem("aws-amplify-federatedInfo",JSON.stringify({provider:a,token:u,user:i,expires_at:c,identity_id:l}))}catch(d){Tt.debug("Failed to put federated info into auth storage",d)}}return"guest"!==t?[3,2]:[4,this._setGuestIdentityId(e.identityId)];case 1:f.sent(),f.label=2;case 2:return s(o._credentials),[2]}}))}))})).catch((function(t){if(t)return Tt.debug("Failed to load credentials",e),Tt.debug("Error loading credentials",t),void a(t)}))}))},e.prototype.set=function(e,t){return"session"===t?this._setCredentialsFromSession(e):"federation"===t?this._setCredentialsFromFederation(e):"guest"===t?this._setCredentialsForGuest():(Tt.debug("no source specified for setting credentials"),Promise.reject("invalid source"))},e.prototype.clear=function(){return Ot(this,void 0,void 0,(function(){return xt(this,(function(e){return this._credentials=null,this._credentials_source=null,Tt.debug("removing aws-amplify-federatedInfo from storage"),this._storage.removeItem("aws-amplify-federatedInfo"),[2]}))}))},e.prototype._getGuestIdentityId=function(){return Ot(this,void 0,void 0,(function(){var e,t;return xt(this,(function(n){switch(n.label){case 0:e=this._config.identityPoolId,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this._storageSync];case 2:return n.sent(),[2,this._storage.getItem(this._getCognitoIdentityIdStorageKey(e))];case 3:return t=n.sent(),Tt.debug("Failed to get the cached guest identityId",t),[3,4];case 4:return[2]}}
2))}))},e.prototype._setGuestIdentityId=function(e){return Ot(this,void 0,void 0,(function(){var t,n;return xt(this,(function(r){switch(r.label){case 0:t=this._config.identityPoolId,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this._storageSync];case 2:return r.sent(),this._storage.setItem(this._getCognitoIdentityIdStorageKey(t),e),[3,4];case 3:return n=r.sent(),Tt.debug("Failed to cache guest identityId",n),[3,4];case 4:return[2]}}))}))},e.prototype._removeGuestIdentityId=function(){return Ot(this,void 0,void 0,(function(){var e;return xt(this,(function(t){return e=this._config.identityPoolId,Tt.debug("removing ".concat(this._getCognitoIdentityIdStorageKey(e)," from storage")),this._storage.removeItem(this._getCognitoIdentityIdStorageKey(e)),[2]}))}))},e.prototype.shear=function(e){return{accessKeyId:e.accessKeyId,sessionToken:e.sessionToken,secretAccessKey:e.secretAccessKey,identityId:e.identityId,authenticated:e.authenticated}},e}(),Dt=new Ut(null);se.d.register(Dt);var Rt=n(76489);function Nt(e,t){void 0===t&&(t={});var n=function(e){if(e&&"j"===e[0]&&":"===e[1])return e.substr(2);return e}(e);if(function(e,t){return void 0===t&&(t=!e||"{"!==e[0]&&"["!==e[0]&&'"'!==e[0]),!t}(n,t.doNotParse))try{return JSON.parse(n)}catch(r){}return e}var Mt=function(){return Mt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Mt.apply(this,arguments)},Ft=function(){function e(e,t){var n=this;this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.cookies=function(e,t){return"string"==typeof e?Rt.Q(e,t):"object"==typeof e&&null!==e?e:{}}(e,t),new Promise((function(){n.HAS_DOCUMENT_COOKIE="object"==typeof document&&"string"==typeof document.cookie})).catch((function(){}))}return e.prototype._updateBrowserValues=function(e){this.HAS_DOCUMENT_COOKIE&&(this.cookies=Rt.Q(document.cookie,e))},e.prototype._emitChange=function(e){for(var t=0;t<this.changeListeners.length;++t)this.changeListeners[t](e)},e.prototype.get=function(e,t,n){return void 0===t&&(t={}),this._updateBrowserValues(n),Nt(this.cookies[e],t)},e.prototype.getAll=function(e,t){void 0===e&&(e={}),this._updateBrowserValues(t);var n={};for(var r in this.cookies)n[r]=Nt(this.cookies[r],e);return n},e.prototype.set=function(e,t,n){var r;"object"==typeof t&&(t=JSON.stringify(t)),this.cookies=Mt(Mt({},this.cookies),((r={})[e]=t,r)),this.HAS_DOCUMENT_COOKIE&&(document.cookie=Rt.q(e,t,n)),this._emitChange({name:e,value:t,options:n})},e.prototype.remove=function(e,t){var n=t=Mt(Mt({},t),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Mt({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=Rt.q(e,"",n)),this._emitChange({name:e,value:void 0,options:t})},e.prototype.addChangeListener=function(e){this.changeListeners.push(e)},e.prototype.removeChangeListener=function(e){var t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1)},e}(),jt=function(){return jt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},jt.apply(this,arguments)},Lt=_().isBrowser,Vt=function(){function e(e){void 0===e&&(e={}),this.cookies=new Ft,this.store=Lt?window.localStorage:Object.create(null),this.cookies=e.req?new Ft(decodeURIComponent(e.req.headers.cookie)):new Ft,Object.assign(this.store,this.cookies.getAll())}return Object.defineProperty(e.prototype,"length",{get:function(){return Object.entries(this.store).length},enumerable:!1,configurable:!0}),e.prototype.clear=function(){var e=this;Array.from(new Array(this.length)).map((function(t,n){return e.key(n)})).forEach((function(t){return e.removeItem(t)}))},e.prototype.getItem=function(e){return this.getLocalItem(e)},e.prototype.getLocalItem=function(e){return Object.prototype.hasOwnProperty.call(this.store,e)?this.store[e]:null},e.prototype.getUniversalItem=function(e){return this.cookies.get(e)},e.prototype.key=function(e){return Object.keys(this.store)[e]},e.prototype.removeItem=function(e){this.removeLocalItem(e),this.removeUniversalItem(e)},e.prototype.removeLocalItem=function(e){delete this.store[e]},e.prototype.removeUniversalItem=function(e){this.cookies.remove(e,{path:"/"})},e.prototype.setItem=function(e,t){this.setLocalItem(e,t);var n=e.split(".").pop();["LastAuthUser","accessToken","refreshToken","idToken"].includes(null!=n?n:"")&&this.setUniversalItem(e,t,{expires:new Date(Date.now()+31536e6)})},e.prototype.setLocalItem=function(e,t){this.store[e]=t},e.prototype.setUniversalItem=function(e,t,n){void 0===n&&(n={}),this.cookies.set(e,t,jt(jt({},n),{path:"/",sameSite:!0,secure:!Lt||"localhost"!==window.location.hostname}))},e}();var Bt,qt=n(23477),Kt=n(14716),Gt=n(8575),Wt=function(e){var t=window.open(e,"_self");
2return t?Promise.resolve(t):Promise.reject()},Ht=n(48764),Qt=("undefined"!=typeof Symbol&&"function"==typeof Symbol.for&&Symbol.for("INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER"),n(41938)),$t="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",zt=function(e,t,n){w.dispatch("auth",{event:e,data:t,message:n},"Auth",$t)},Yt=new p.k("OAuth"),Zt=function(){function e(e){var t=e.config,n=e.cognitoClientId,r=e.scopes,i=void 0===r?[]:r;if(this._urlOpener=t.urlOpener||Wt,this._config=t,this._cognitoClientId=n,!this.isValidScopes(i))throw Error("scopes must be a String Array");this._scopes=i}return e.prototype.isValidScopes=function(e){return Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))},e.prototype.oauthSignIn=function(e,t,n,r,i,s){void 0===e&&(e="code"),void 0===i&&(i=o.Cognito);var a=this._generateState(32),c=s?a+"-"+s.split("").map((function(e){return e.charCodeAt(0).toString(16).padStart(2,"0")})).join(""):a;!function(e){window.sessionStorage.setItem("oauth_state",e)}(c);var l,d=this._generateRandom(128);l=d,window.sessionStorage.setItem("ouath_pkce_key",l);var h=this._generateChallenge(d),p=this._scopes.join(" "),g="https://"+t+"/oauth2/authorize?"+Object.entries(u(u({redirect_uri:n,response_type:e,client_id:r,identity_provider:i,scope:p,state:c},"code"===e?{code_challenge:h}:{}),"code"===e?{code_challenge_method:"S256"}:{})).map((function(e){var t=f(e,2),n=t[0],r=t[1];return encodeURIComponent(n)+"="+encodeURIComponent(r)})).join("&");Yt.debug("Redirecting to "+g),this._urlOpener(g,n)},e.prototype._handleCodeFlow=function(e){return c(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,c,d,p,g,m,y,v,b,w;return l(this,(function(l){switch(l.label){case 0:return t=((0,Gt.Qc)(e).query||"").split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var n,r=f(t,2),i=r[0],o=r[1];return u(u({},e),((n={})[i]=o,n))}),{code:void 0}).code,n=(0,Gt.Qc)(e).pathname||"/",r=(0,Gt.Qc)(this._config.redirectSignIn).pathname||"/",t&&n===r?(i="https://"+this._config.domain+"/oauth2/token",zt("codeFlow",{},"Retrieving tokens from "+i),o=h(this._config)?this._cognitoClientId:this._config.clientID,s=h(this._config)?this._config.redirectSignIn:this._config.redirectUri,S=window.sessionStorage.getItem("ouath_pkce_key"),window.sessionStorage.removeItem("ouath_pkce_key"),c=u({grant_type:"authorization_code",code:t,client_id:o,redirect_uri:s},(a=S)?{code_verifier:a}:{}),Yt.debug("Calling token endpoint: "+i+" with",c),d=Object.entries(c).map((function(e){var t=f(e,2),n=t[0],r=t[1];return encodeURIComponent(n)+"="+encodeURIComponent(r)})).join("&"),p={category:N.Auth,action:j.FederatedSignIn},[4,fetch(i,{method:"POST",headers:(w={"Content-Type":"application/x-www-form-urlencoded"},w["x-amz-user-agent"]=st(p),w),body:d})]):[2];case 1:return[4,l.sent().json()];case 2:if(g=l.sent(),m=g.access_token,y=g.refresh_token,v=g.id_token,b=g.error)throw new Error(b);return[2,{accessToken:m,refreshToken:y,idToken:v}]}var S}))}))},e.prototype._handleImplicitFlow=function(e){return c(this,void 0,void 0,(function(){var t,n,r;return l(this,(function(i){return t=((0,Gt.Qc)(e).hash||"#").substr(1).split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var n,r=f(t,2),i=r[0],o=r[1];return u(u({},e),((n={})[i]=o,n))}),{id_token:void 0,access_token:void 0}),n=t.id_token,r=t.access_token,zt("implicitFlow",{},"Got tokens from "+e),Yt.debug("Retrieving implicit tokens from "+e+" with"),[2,{accessToken:r,idToken:n,refreshToken:null}]}))}))},e.prototype.handleAuthResponse=function(e){return c(this,void 0,void 0,(function(){var t,n,r,i,o,s,a;return l(this,(function(c){switch(c.label){case 0:if(c.trys.push([0,5,,6]),t=e?u(u({},((0,Gt.Qc)(e).hash||"#").substr(1).split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var n=f(t,2),r=n[0],i=n[1];return e[r]=i,e}),{})),((0,Gt.Qc)(e).query||"").split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var n=f(t,2),r=n[0],i=n[1];return e[r]=i,e}),{})):{},n=t.error,r=t.error_description,n)throw new Error(r);
2return i=this._validateState(t),Yt.debug("Starting "+this._config.responseType+" flow with "+e),"code"!==this._config.responseType?[3,2]:(o=[{}],[4,this._handleCodeFlow(e)]);case 1:return[2,u.apply(void 0,[u.apply(void 0,o.concat([c.sent()])),{state:i}])];case 2:return s=[{}],[4,this._handleImplicitFlow(e)];case 3:return[2,u.apply(void 0,[u.apply(void 0,s.concat([c.sent()])),{state:i}])];case 4:return[3,6];case 5:throw a=c.sent(),Yt.debug("Error handling auth response.",a),a;case 6:return[2]}}))}))},e.prototype._validateState=function(e){if(e){var t,n=(t=window.sessionStorage.getItem("oauth_state"),window.sessionStorage.removeItem("oauth_state"),t),r=e.state;if(n&&n!==r)throw new Error("Invalid state in OAuth flow");return r}},e.prototype.signOut=function(){return c(this,void 0,void 0,(function(){var e,t,n;return l(this,(function(r){return e="https://"+this._config.domain+"/logout?",t=h(this._config)?this._cognitoClientId:this._config.oauth.clientID,n=h(this._config)?this._config.redirectSignOut:this._config.returnTo,e+=Object.entries({client_id:t,logout_uri:encodeURIComponent(n)}).map((function(e){var t=f(e,2);return t[0]+"="+t[1]})).join("&"),zt("oAuthSignOut",{oAuth:"signOut"},"Signing out from "+e),Yt.debug("Signing out from "+e),[2,this._urlOpener(e,n)]}))}))},e.prototype._generateState=function(e){for(var t="",n=e,r="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";n>0;--n)t+=r[Math.round(61*Math.random())];return t},e.prototype._generateChallenge=function(e){var t=new Qt.Sha256;t.update(e);var n=t.digestSync(),r=Ht.lW.from(n).toString("base64");return this._base64URL(r)},e.prototype._base64URL=function(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},e.prototype._generateRandom=function(e){var t=new Uint8Array(e);if("undefined"!=typeof window&&window.crypto)window.crypto.getRandomValues(t);else for(var n=0;n<e;n+=1)t[n]=66*Math.random()|0;return this._bufferToString(t)},e.prototype._bufferToString=function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[],r=0;r<e.byteLength;r+=1){var i=e[r]%62;n.push(t[i])}return n.join("")},e}();!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"}(Bt||(Bt={}));var Jt=new p.k("AuthError"),Xt=function(e){function t(n){var r=this,i=tn[n],o=i.message,s=i.log;return(r=e.call(this,o)||this).constructor=t,Object.setPrototypeOf(r,t.prototype),r.name="AuthError",r.log=s||o,Jt.error(r.log),r}return i(t,e),t}(Error),en=function(e){function t(n){var r=e.call(this,n)||this;return r.constructor=t,Object.setPrototypeOf(r,t.prototype),r.name="NoUserPoolError",r}return i(t,e),t}(Xt),tn={noConfig:{message:Bt.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:Bt.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:Bt.EMPTY_USERNAME},invalidUsername:{message:Bt.INVALID_USERNAME},emptyPassword:{message:Bt.EMPTY_PASSWORD},emptyCode:{message:Bt.EMPTY_CODE},signUpError:{message:Bt.SIGN_UP_ERROR,log:"The first parameter should either be non-null string or object"},noMFA:{message:Bt.NO_MFA},invalidMFA:{message:Bt.INVALID_MFA},emptyChallengeResponse:{message:Bt.EMPTY_CHALLENGE},noUserSession:{message:Bt.NO_USER_SESSION},deviceConfig:{message:Bt.DEVICE_CONFIG}
2,networkError:{message:Bt.NETWORK_ERROR},autoSignInError:{message:Bt.AUTOSIGNIN_ERROR},default:{message:Bt.DEFAULT_MSG}},nn=new p.k("AuthClass"),rn="aws.cognito.signin.user.admin",on="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",sn=function(e,t,n){w.dispatch("auth",{event:e,data:t,message:n},"Auth",on)},an=function(){function e(e){var t=this;this.userPool=null,this.user=null,this.oAuthFlowInProgress=!1,this.autoSignInInitiated=!1,this.inflightSessionPromise=null,this.inflightSessionPromiseCounter=0,this.Credentials=Dt,this.wrapRefreshSessionCallback=function(e){return function(t,n){return n?sn("tokenRefresh",void 0,"New token retrieved"):sn("tokenRefresh_failure",t,"Failed to retrieve new token"),e(t,n)}},this.configure(e),this.currentCredentials=this.currentCredentials.bind(this),this.currentUserCredentials=this.currentUserCredentials.bind(this),w.listen("auth",(function(e){switch(e.payload.event){case"verify":case"signIn":t._storage.setItem("amplify-signin-with-hostedUI","false");break;case"signOut":t._storage.removeItem("amplify-signin-with-hostedUI");break;case"cognitoHostedUI":t._storage.setItem("amplify-signin-with-hostedUI","true")}})),(0,Kt.Bs)(),(0,Kt.m0)(ot.framework),ot.observeFrameworkChanges((function(){(0,Kt.m0)(ot.framework)}))}return e.prototype.getModuleName=function(){return"Auth"},e.prototype.configure=function(e){var t=this;if(!e)return this._config||{};nn.debug("configure Auth");var n=Object.assign({},this._config,It(e).Auth,e);this._config=n;var r=this._config,i=r.userPoolId,o=r.userPoolWebClientId,a=r.cookieStorage,u=r.oauth,c=r.region,l=r.identityPoolId,f=r.mandatorySignIn,d=r.refreshHandlers,p=r.identityPoolRegion,g=r.clientMetadata,m=r.endpoint,y=r.storage;if(y){if(!this._isValidAuthStorage(y))throw nn.error("The storage in the Auth config is not valid!"),new Error("Empty storage object");this._storage=y}else this._storage=a?new qt.eR(a):e.ssr?new Vt:(new E).getStorage();if(this._storageSync=Promise.resolve(),"function"==typeof this._storage.sync&&(this._storageSync=this._storage.sync()),i){var v={UserPoolId:i,ClientId:o,endpoint:m};v.Storage=this._storage,this.userPool=new qt.AM(v,this.wrapRefreshSessionCallback)}this.Credentials.configure({mandatorySignIn:f,region:c,userPoolId:i,identityPoolId:l,refreshHandlers:d,storage:this._storage,identityPoolRegion:p});var b=u?h(this._config.oauth)?u:u.awsCognito:void 0;if(b){var w=Object.assign({cognitoClientId:o,UserPoolId:i,domain:b.domain,scopes:b.scope,redirectSignIn:b.redirectSignIn,redirectSignOut:b.redirectSignOut,responseType:b.responseType,Storage:this._storage,urlOpener:b.urlOpener,clientMetadata:g},b.options);this._oAuthHandler=new Zt({scopes:w.scopes,config:w,cognitoClientId:w.cognitoClientId});var S={};!function(e){if(_().isBrowser&&window.location)e({url:window.location.href});else if(!_().isNode)throw new Error("Not supported")}((function(e){var n=e.url;S[n]||(S[n]=!0,t._handleAuthResponse(n))}))}(sn("configured",null,"The Auth category has been configured successfully"),this.autoSignInInitiated||"function"!=typeof this._storage.getItem)||(this.isTrueStorageValue("amplify-polling-started")&&(sn("autoSignIn_failure",null,s.AutoSignInError),this._storage.removeItem("amplify-auto-sign-in")),this._storage.removeItem("amplify-polling-started"));return this._config},e.prototype.signUp=function(e){for(var t,n,r,i=this,o=[],a=1;a<arguments.length;a++)o[a-1]=arguments[a];if(!this.userPool)return this.rejectNoUserPool();var u,c=null,l=null,f=[],d=null,h={enabled:!1},p={},g={};if(e&&"string"==typeof e){c=e,l=o?o[0]:null;var m=o?o[1]:null,y=o?o[2]:null;m&&f.push(new qt.KC({Name:"email",Value:m})),y&&f.push(new qt.KC({Name:"phone_number",Value:y}))}else{if(!e||"object"!=typeof e)return this.rejectAuthError(s.SignUpError);c=e.username,l=e.password,e&&e.clientMetadata?u=e.clientMetadata:this._config.clientMetadata&&(u=this._config.clientMetadata);var v=e.attributes;v&&Object.keys(v).map((function(e){f.push(new qt.KC({Name:e,Value:v[e]}))}));var b=e.validationData;b&&(d=[],Object.keys(b).map((function(e){d.push(new qt.KC({Name:e,Value:b[e]}))}))),(h=null!==(t=e.autoSignIn)&&void 0!==t?t:{enabled:!1}).enabled&&(this._storage.setItem("amplify-auto-sign-in","true"),p=null!==(n=h.validationData)&&void 0!==n?n:{},g=null!==(r=h.clientMetaData)&&void 0!==r?r:{})}return c?l?(nn.debug("signUp attrs:",f),nn.debug("signUp validation data:",d),new Promise((function(e,t){i.userPool.signUp(c,l,f,d,(function(n,r){n?(sn("signUp_failure",n,c+" failed to signup"),t(n)):(sn("signUp",r,c+" has signed up successfully"),h.enabled&&i.handleAutoSignIn(c,l,p,g,r),e(r))}),u)}))):this.rejectAuthError(s.EmptyPassword):this.rejectAuthError(s.EmptyUsername)}
2,e.prototype.handleAutoSignIn=function(e,t,n,r,i){this.autoSignInInitiated=!0;var o=new qt.sD({Username:e,Password:t,ValidationData:n,ClientMetadata:r});i.userConfirmed?this.signInAfterUserConfirmed(o):"link"===this._config.signUpVerificationMethod?this.handleLinkAutoSignIn(o):this.handleCodeAutoSignIn(o)},e.prototype.handleCodeAutoSignIn=function(e){var t=this,n=function(r){"confirmSignUp"===r.payload.event&&t.signInAfterUserConfirmed(e,n)};w.listen("auth",n)},e.prototype.handleLinkAutoSignIn=function(e){var t=this;this._storage.setItem("amplify-polling-started","true");var n=Date.now(),r=setInterval((function(){Date.now()-n>18e4?(clearInterval(r),sn("autoSignIn_failure",null,"Please confirm your account and use your credentials to sign in."),t._storage.removeItem("amplify-auto-sign-in")):t.signInAfterUserConfirmed(e,null,r)}),5e3)},e.prototype.signInAfterUserConfirmed=function(e,t,n){return c(this,void 0,void 0,(function(){var r,i,o=this;return l(this,(function(s){switch(s.label){case 0:r=this.createCognitoUser(e.getUsername()),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,r.authenticateUser(e,this.authCallbacks(r,(function(r){sn("autoSignIn",r,e.getUsername()+" has signed in successfully"),t&&w.remove("auth",t),n&&(clearInterval(n),o._storage.removeItem("amplify-polling-started")),o._storage.removeItem("amplify-auto-sign-in")}),(function(e){nn.error(e),o._storage.removeItem("amplify-auto-sign-in")})))];case 2:return s.sent(),[3,4];case 3:return i=s.sent(),nn.error(i),[3,4];case 4:return[2]}}
2))}))},e.prototype.confirmSignUp=function(e,t,n){var r=this;if(!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(s.EmptyUsername);if(!t)return this.rejectAuthError(s.EmptyCode);var i,o=this.createCognitoUser(e),a=!n||"boolean"!=typeof n.forceAliasCreation||n.forceAliasCreation;return n&&n.clientMetadata?i=n.clientMetadata:this._config.clientMetadata&&(i=this._config.clientMetadata),new Promise((function(n,u){o.confirmRegistration(t,a,(function(t,i){t?u(t):(sn("confirmSignUp",i,e+" has been confirmed successfully"),r.isTrueStorageValue("amplify-auto-sign-in")&&!r.autoSignInInitiated&&(sn("autoSignIn_failure",null,s.AutoSignInError),r._storage.removeItem("amplify-auto-sign-in")),n(i))}),i)}))},e.prototype.isTrueStorageValue=function(e){var t=this._storage.getItem(e);return!!t&&"true"===t},e.prototype.resendSignUp=function(e,t){if(void 0===t&&(t=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(s.EmptyUsername);var n=this.createCognitoUser(e);return new Promise((function(e,r){n.resendConfirmationCode((function(t,n){t?r(t):e(n)}),t)}))},e.prototype.signIn=function(e,t,n){if(void 0===n&&(n=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();var r=null,i=null,o={};if("string"==typeof e)r=e,i=t;else{if(!e.username)return this.rejectAuthError(s.InvalidUsername);void 0!==t&&nn.warn("The password should be defined under the first parameter object!"),r=e.username,i=e.password,o=e.validationData}if(!r)return this.rejectAuthError(s.EmptyUsername);var a=new qt.sD({Username:r,Password:i,ValidationData:o,ClientMetadata:n});return i?this.signInWithPassword(a):this.signInWithoutPassword(a)},e.prototype.authCallbacks=function(e,t,n){var r=this,i=this;return{onSuccess:function(o){return c(r,void 0,void 0,(function(){var r,s,a,u;return l(this,(function(c){switch(c.label){case 0:nn.debug(o),delete e.challengeName,delete e.challengeParam,c.label=1;case 1:return c.trys.push([1,4,5,9]),[4,this.Credentials.clear()];case 2:return c.sent(),[4,this.Credentials.set(o,"session")];case 3:return r=c.sent(),nn.debug("succeed to get cognito credentials",r),[3,9];case 4:return s=c.sent(),nn.debug("cannot get cognito credentials",s),[3,9];case 5:return c.trys.push([5,7,,8]),[4,this.currentUserPoolUser()];case 6:return a=c.sent(),i.user=a,sn("signIn",a,"A user "+e.getUsername()+" has been signed in"),t(a),[3,8];case 7:return u=c.sent(),nn.error("Failed to get the signed in user",u),n(u),[3,8];case 8:return[7];case 9:return[2]}}
2))}))},onFailure:function(t){nn.debug("signIn failure",t),sn("signIn_failure",t,e.getUsername()+" failed to signin"),n(t)},customChallenge:function(n){nn.debug("signIn custom challenge answer required"),e.challengeName="CUSTOM_CHALLENGE",e.challengeParam=n,t(e)},mfaRequired:function(n,r){nn.debug("signIn MFA required"),e.challengeName=n,e.challengeParam=r,t(e)},mfaSetup:function(n,r){nn.debug("signIn mfa setup",n),e.challengeName=n,e.challengeParam=r,t(e)},newPasswordRequired:function(n,r){nn.debug("signIn new password"),e.challengeName="NEW_PASSWORD_REQUIRED",e.challengeParam={userAttributes:n,requiredAttributes:r},t(e)},totpRequired:function(n,r){nn.debug("signIn totpRequired"),e.challengeName=n,e.challengeParam=r,t(e)},selectMFAType:function(n,r){nn.debug("signIn selectMFAType",n),e.challengeName=n,e.challengeParam=r,t(e)}}},e.prototype.signInWithPassword=function(e){var t=this;if(this.pendingSignIn)throw new Error("Pending sign-in attempt already in progress");var n=this.createCognitoUser(e.getUsername());return this.pendingSignIn=new Promise((function(r,i){n.authenticateUser(e,t.authCallbacks(n,(function(e){t.pendingSignIn=null,r(e)}),(function(e){t.pendingSignIn=null,i(e)})))})),this.pendingSignIn},e.prototype.signInWithoutPassword=function(e){var t=this,n=this.createCognitoUser(e.getUsername());return n.setAuthenticationFlowType("CUSTOM_AUTH"),new Promise((function(r,i){n.initiateAuth(e,t.authCallbacks(n,r,i))}))},e.prototype.getMFAOptions=function(e){return new Promise((function(t,n){e.getMFAOptions((function(e,r){if(e)return nn.debug("get MFA Options failed",e),void n(e);nn.debug("get MFA options success",r),t(r)}))}))},e.prototype.getPreferredMFA=function(e,t){var n=this,r=this;return new Promise((function(i,o){var s=n._config.clientMetadata,a=!!t&&t.bypassCache;e.getUserData((function(t,s){return c(n,void 0,void 0,(function(){var n,a;return l(this,(function(u){switch(u.label){case 0:if(!t)return[3,5];if(nn.debug("getting preferred mfa failed",t),!this.isSessionInvalid(t))return[3,4];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(e)];case 2:return u.sent(),[3,4];case 3:return n=u.sent(),o(new Error("Session is invalid due to: "+t.message+" and failed to clean up invalid session: "+n.message)),[2];case 4:return o(t),[2];case 5:return(a=r._getMfaTypeFromUserData(s))?(i(a),[2]):(o("invalid MFA Type"),[2])}}))}))}),{bypassCache:a,clientMetadata:s})}))},e.prototype._getMfaTypeFromUserData=function(e){var t=null,n=e.PreferredMfaSetting;if(n)t=n;else{var r=e.UserMFASettingList;if(r)0===r.length?t="NOMFA":nn.debug("invalid case for getPreferredMFA",e);else t=e.MFAOptions?"SMS_MFA":"NOMFA"}return t},e.prototype._getUserData=function(e,t){var n=this;return new Promise((function(r,i){e.getUserData((function(t,o){return c(n,void 0,void 0,(function(){var n;return l(this,(function(s){switch(s.label){case 0:if(!t)return[3,5];if(nn.debug("getting user data failed",t),!this.isSessionInvalid(t))return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(e)];case 2:return s.sent(),[3,4];case 3:return n=s.sent(),i(new Error("Session is invalid due to: "+t.message+" and failed to clean up invalid session: "+n.message)),[2];case 4:return i(t),[2];case 5:r(o),s.label=6;case 6:return[2]}}
2))}))}),t)}))},e.prototype.setPreferredMFA=function(e,t){return c(this,void 0,void 0,(function(){var n,r,i,o,a,u,f=this;return l(this,(function(d){switch(d.label){case 0:return n=this._config.clientMetadata,[4,this._getUserData(e,{bypassCache:!0,clientMetadata:n})];case 1:switch(r=d.sent(),i=null,o=null,t){case"TOTP":case"SOFTWARE_TOKEN_MFA":return[3,2];case"SMS":case"SMS_MFA":return[3,3];case"NOMFA":return[3,4]}return[3,6];case 2:return o={PreferredMfa:!0,Enabled:!0},[3,7];case 3:return i={PreferredMfa:!0,Enabled:!0},[3,7];case 4:return a=r.UserMFASettingList,[4,this._getMfaTypeFromUserData(r)];case 5:if("NOMFA"===(u=d.sent()))return[2,Promise.resolve("No change for mfa type")];if("SMS_MFA"===u)i={PreferredMfa:!1,Enabled:!1};else{if("SOFTWARE_TOKEN_MFA"!==u)return[2,this.rejectAuthError(s.InvalidMFA)];o={PreferredMfa:!1,Enabled:!1}}return a&&0!==a.length&&a.forEach((function(e){"SMS_MFA"===e?i={PreferredMfa:!1,Enabled:!1}:"SOFTWARE_TOKEN_MFA"===e&&(o={PreferredMfa:!1,Enabled:!1})})),[3,7];case 6:return nn.debug("no validmfa method provided"),[2,this.rejectAuthError(s.NoMFA)];case 7:return this,[2,new Promise((function(t,r){e.setUserMfaPreference(i,o,(function(i,o){if(i)return nn.debug("Set user mfa preference error",i),r(i);nn.debug("Set user mfa success",o),nn.debug("Caching the latest user data into local"),e.getUserData((function(n,i){return c(f,void 0,void 0,(function(){var i;return l(this,(function(s){switch(s.label){case 0:if(!n)return[3,5];if(nn.debug("getting user data failed",n),!this.isSessionInvalid(n))return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(e)];case 2:return s.sent(),[3,4];case 3:return i=s.sent(),r(new Error("Session is invalid due to: "+n.message+" and failed to clean up invalid session: "+i.message)),[2];case 4:return[2,r(n)];case 5:return[2,t(o)]}}))}))}),{bypassCache:!0,clientMetadata:n})}))}))]}}))}))},e.prototype.disableSMS=function(e){return new Promise((function(t,n){e.disableMFA((function(e,r){if(e)return nn.debug("disable mfa failed",e),void n(e);nn.debug("disable mfa succeed",r),t(r)}))}))},e.prototype.enableSMS=function(e){return new Promise((function(t,n){e.enableMFA((function(e,r){if(e)return nn.debug("enable mfa failed",e),void n(e);nn.debug("enable mfa succeed",r),t(r)}))}))},e.prototype.setupTOTP=function(e){return new Promise((function(t,n){e.associateSoftwareToken({onFailure:function(e){nn.debug("associateSoftwareToken failed",e),n(e)},associateSecretCode:function(e){nn.debug("associateSoftwareToken success",e),t(e)}})}))},e.prototype.verifyTotpToken=function(e,t){var n;nn.debug("verification totp token",e,t),e&&"function"==typeof e.getSignInUserSession&&(n=e.getSignInUserSession());var r=null==n?void 0:n.isValid();return new Promise((function(n,i){e.verifySoftwareToken(t,"My TOTP device",{onFailure:function(e){nn.debug("verifyTotpToken failed",e),i(e)},onSuccess:function(t){r||sn("signIn",e,"A user "+e.getUsername()+" has been signed in"),sn("verify",e,"A user "+e.getUsername()+" has been verified"),nn.debug("verifyTotpToken success",t),n(t)}})}))},e.prototype.confirmSignIn=function(e,t,n,r){var i=this;if(void 0===r&&(r=this._config.clientMetadata),!t)return this.rejectAuthError(s.EmptyCode);var o=this;return new Promise((function(s,a){e.sendMFACode(t,{onSuccess:function(t){return c(i,void 0,void 0,(function(){var n,r,i,a;return l(this,(function(u){switch(u.label){case 0:nn.debug(t),u.label=1;case 1:return u.trys.push([1,4,5,10]),[4,this.Credentials.clear()];case 2:return u.sent(),[4,this.Credentials.set(t,"session")];case 3:return n=u.sent(),nn.debug("succeed to get cognito credentials",n),[3,10];case 4:return r=u.sent(),nn.debug("cannot get cognito credentials",r),[3,10];case 5:o.user=e,u.label=6;case 6:return u.trys.push([6,8,,9]),[4,this.currentUserPoolUser()];case 7:return i=u.sent(),e.attributes=i.attributes,[3,9];case 8:return a=u.sent(),nn.debug("cannot get updated Cognito User",a),[3,9];case 9:return sn("signIn",e,"A user "+e.getUsername()+" has been signed in"),s(e),[7];case 10:return[2]}}
2))}))},onFailure:function(e){nn.debug("confirm signIn failure",e),a(e)}},n,r)}))},e.prototype.completeNewPassword=function(e,t,n,r){var i=this;if(void 0===n&&(n={}),void 0===r&&(r=this._config.clientMetadata),!t)return this.rejectAuthError(s.EmptyPassword);var o=this;return new Promise((function(s,a){e.completeNewPasswordChallenge(t,n,{onSuccess:function(t){return c(i,void 0,void 0,(function(){var n,r;return l(this,(function(i){switch(i.label){case 0:nn.debug(t),i.label=1;case 1:return i.trys.push([1,4,5,6]),[4,this.Credentials.clear()];case 2:return i.sent(),[4,this.Credentials.set(t,"session")];case 3:return n=i.sent(),nn.debug("succeed to get cognito credentials",n),[3,6];case 4:return r=i.sent(),nn.debug("cannot get cognito credentials",r),[3,6];case 5:return o.user=e,sn("signIn",e,"A user "+e.getUsername()+" has been signed in"),s(e),[7];case 6:return[2]}}))}))},onFailure:function(e){nn.debug("completeNewPassword failure",e),sn("completeNewPassword_failure",e,i.user+" failed to complete the new password flow"),a(e)},mfaRequired:function(t,n){nn.debug("signIn MFA required"),e.challengeName=t,e.challengeParam=n,s(e)},mfaSetup:function(t,n){nn.debug("signIn mfa setup",t),e.challengeName=t,e.challengeParam=n,s(e)},totpRequired:function(t,n){nn.debug("signIn mfa setup",t),e.challengeName=t,e.challengeParam=n,s(e)}},r)}))},e.prototype.sendCustomChallengeAnswer=function(e,t,n){var r=this;if(void 0===n&&(n=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!t)return this.rejectAuthError(s.EmptyChallengeResponse);return new Promise((function(i,o){e.sendCustomChallengeAnswer(t,r.authCallbacks(e,i,o),n)}))},e.prototype.deleteUserAttributes=function(e,t){var n=this;return new Promise((function(r,i){n.userSession(e).then((function(n){e.deleteAttributes(t,(function(e,t){return e?i(e):r(t)}))}))}))},e.prototype.deleteUser=function(){return c(this,void 0,void 0,(function(){var e,t,n=this;return l(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this._storageSync];case 1:return r.sent(),[3,3];case 2:throw e=r.sent(),nn.debug("Failed to sync cache info into memory",e),new Error(e);case 3:return t=this._oAuthHandler&&"true"===this._storage.getItem("amplify-signin-with-hostedUI"),[2,new Promise((function(e,r){return c(n,void 0,void 0,(function(){var n,i=this;return l(this,(function(o){if(this.userPool){if(!(n=this.userPool.getCurrentUser()))return nn.debug("Failed to get user from user pool"),[2,r(new Error("No current user."))];n.getSession((function(o,s){return c(i,void 0,void 0,(function(){var i,s=this;return l(this,(function(a){switch(a.label){case 0:if(!o)return[3,5];if(nn.debug("Failed to get the user session",o),!this.isSessionInvalid(o))return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(n)];case 2:return a.sent(),[3,4];case 3:return i=a.sent(),r(new Error("Session is invalid due to: "+o.message+" and failed to clean up invalid session: "+i.message)),[2];case 4:return[2,r(o)];case 5:n.deleteUser((function(i,o){if(i)r(i);else{sn("userDeleted",o,"The authenticated user has been deleted."),n.signOut(),s.user=null;try{s.cleanCachedItems()}catch(a){nn.debug("failed to clear cached items")}t?s.oAuthSignOutRedirect(e,r):(sn("signOut",s.user,"A user has been signed out"),e(o))}})),a.label=6;case 6:return[2]}}
2))}))}))}else nn.debug("no Congito User pool"),r(new Error("Cognito User pool does not exist"));return[2]}))}))}))]}}))}))},e.prototype.updateUserAttributes=function(e,t,n){var r=this;void 0===n&&(n=this._config.clientMetadata);var i=[],o=this;return new Promise((function(s,a){o.userSession(e).then((function(o){for(var u in t)if("sub"!==u&&u.indexOf("_verified")<0){var c={Name:u,Value:t[u]};i.push(c)}e.updateAttributes(i,(function(e,n,i){if(e)return sn("updateUserAttributes_failure",e,"Failed to update attributes"),a(e);var o=r.createUpdateAttributesResultList(t,null==i?void 0:i.CodeDeliveryDetailsList);return sn("updateUserAttributes",o,"Attributes successfully updated"),s(n)}),n)}))}))},e.prototype.createUpdateAttributesResultList=function(e,t){var n={};return Object.keys(e).forEach((function(e){n[e]={isUpdated:!0};var r=null==t?void 0:t.find((function(t){return t.AttributeName===e}));r&&(n[e].isUpdated=!1,n[e].codeDeliveryDetails=r)})),n},e.prototype.userAttributes=function(e){var t=this;return new Promise((function(n,r){t.userSession(e).then((function(t){e.getUserAttributes((function(e,t){e?r(e):n(t)}))}))}))},e.prototype.verifiedContact=function(e){var t=this;return this.userAttributes(e).then((function(e){var n=t.attributesToObject(e),r={},i={};return n.email&&(n.email_verified?i.email=n.email:r.email=n.email),n.phone_number&&(n.phone_number_verified?i.phone_number=n.phone_number:r.phone_number=n.phone_number),{verified:i,unverified:r}}))},e.prototype.isErrorWithMessage=function(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"message")},e.prototype.isTokenRevokedError=function(e){return this.isErrorWithMessage(e)&&"Access Token has been revoked"===e.message},e.prototype.isRefreshTokenRevokedError=function(e){return this.isErrorWithMessage(e)&&"Refresh Token has been revoked"===e.message},e.prototype.isUserDisabledError=function(e){return this.isErrorWithMessage(e)&&"User is disabled."===e.message},e.prototype.isUserDoesNotExistError=function(e){return this.isErrorWithMessage(e)&&"User does not exist."===e.message},e.prototype.isRefreshTokenExpiredError=function(e){return this.isErrorWithMessage(e)&&"Refresh Token has expired"===e.message},e.prototype.isPasswordResetRequiredError=function(e){return this.isErrorWithMessage(e)&&"Password reset required for the user"===e.message},e.prototype.isSignedInHostedUI=function(){return this._oAuthHandler&&"true"===this._storage.getItem("amplify-signin-with-hostedUI")},e.prototype.isSessionInvalid=function(e){return this.isUserDisabledError(e)||this.isUserDoesNotExistError(e)||this.isTokenRevokedError(e)||this.isRefreshTokenRevokedError(e)||this.isRefreshTokenExpiredError(e)||this.isPasswordResetRequiredError(e)},e.prototype.cleanUpInvalidSession=function(e){return c(this,void 0,void 0,(function(){var t=this;return l(this,(function(n){switch(n.label){case 0:e.signOut(),this.user=null,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.cleanCachedItems()];case 2:return n.sent(),[3,4];case 3:return n.sent(),nn.debug("failed to clear cached items"),[3,4];case 4:return this.isSignedInHostedUI()?[2,new Promise((function(e,n){t.oAuthSignOutRedirect(e,n)}))]:(sn("signOut",this.user,"A user has been signed out"),[2])}}))}))},e.prototype.currentUserPoolUser=function(e){var t=this;return this.userPool?new Promise((function(n,r){t._storageSync.then((function(){return c(t,void 0,void 0,(function(){var t,i,o,s,a,u,f=this;return l(this,(function(d){switch(d.label){case 0:return this.isOAuthInProgress()?(nn.debug("OAuth signIn in progress, waiting for resolution..."),[4,new Promise((function(e){var t=setTimeout((function(){nn.debug("OAuth signIn in progress timeout"),w.remove("auth",n),e()}),1e4);function n(r){var i=r.payload.event;"cognitoHostedUI"!==i&&"cognitoHostedUI_failure"!==i||(nn.debug("OAuth signIn resolved: "+i),clearTimeout(t),w.remove("auth",n),e())}w.listen("auth",n)}))]):[3,2];case 1:d.sent(),d.label=2;case 2:if(!(t=this.userPool.getCurrentUser()))return nn.debug("Failed to get user from user pool"),r("No current user"),[2];d.label=3;case 3:return d.trys.push([3,7,,8]),[4,this._userSession(t)];case 4:return i=d.sent(),(o=!!e&&e.bypassCache)?[4,this.Credentials.clear()]:[3,6];case 5:d.sent(),d.label=6;case 6:return s=this._config.clientMetadata,a=i.getAccessToken().decodePayload().scope,(void 0===a?"":a).split(" ").includes(rn)?(t.getUserData((function(e,i){return c(f,void 0,void 0,(function(){var o,s,a,u,c,f,d;return l(this,(function(l){switch(l.label){case 0:if(!e)return[3,7];if(nn.debug("getting user data failed",e),!this.isSessionInvalid(e))return[3,5];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(t)];case 2:return l.sent(),[3,4];
2case 3:return o=l.sent(),r(new Error("Session is invalid due to: "+e.message+" and failed to clean up invalid session: "+o.message)),[2];case 4:return r(e),[3,6];case 5:n(t),l.label=6;case 6:return[2];case 7:for(s=i.PreferredMfaSetting||"NOMFA",a=[],u=0;u<i.UserAttributes.length;u++)c={Name:i.UserAttributes[u].Name,Value:i.UserAttributes[u].Value},f=new qt.KC(c),a.push(f);return d=this.attributesToObject(a),Object.assign(t,{attributes:d,preferredMFA:s}),[2,n(t)]}}))}))}),{bypassCache:o,clientMetadata:s}),[3,8]):(nn.debug("Unable to get the user data because the "+rn+" is not in the scopes of the access token"),[2,n(t)]);case 7:return u=d.sent(),r(u),[3,8];case 8:return[2]}}))}))})).catch((function(e){return nn.debug("Failed to sync cache info into memory",e),r(e)}))})):this.rejectNoUserPool()},e.prototype.isOAuthInProgress=function(){return this.oAuthFlowInProgress},e.prototype.currentAuthenticatedUser=function(e){return c(this,void 0,void 0,(function(){var t,n,r,i,o;return l(this,(function(s){switch(s.label){case 0:nn.debug("getting current authenticated user"),t=null,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this._storageSync];case 2:return s.sent(),[3,4];case 3:throw n=s.sent(),nn.debug("Failed to sync cache info into memory",n),n;case 4:try{(r=JSON.parse(this._storage.getItem("aws-amplify-federatedInfo")))&&(t=u(u({},r.user),{token:r.token}))}catch(a){nn.debug("cannot load federated user from auth storage")}return t?(this.user=t,nn.debug("get current authenticated federated user",this.user),[2,this.user]):[3,5];case 5:nn.debug("get current authenticated userpool user"),i=null,s.label=6;case 6:return s.trys.push([6,8,,9]),[4,this.currentUserPoolUser(e)];case 7:return i=s.sent(),[3,9];case 8:return"No userPool"===(o=s.sent())&&nn.error("Cannot get the current user because the user pool is missing. Please make sure the Auth module is configured with a valid Cognito User Pool ID"),nn.debug("The user is not authenticated by the error",o),[2,Promise.reject("The user is not authenticated")];case 9:return this.user=i,[2,this.user]}}))}))},e.prototype.currentSession=function(){var e=this;return nn.debug("Getting current session"),this.userPool?new Promise((function(t,n){e.currentUserPoolUser().then((function(r){e.userSession(r).then((function(e){t(e)})).catch((function(e){nn.debug("Failed to get the current session",e),n(e)}))})).catch((function(e){nn.debug("Failed to get the current user",e),n(e)}))})):Promise.reject(new Error("No User Pool in the configuration."))},e.prototype._userSession=function(e){return c(this,void 0,void 0,(function(){var t,n,r=this;return l(this,(function(i){switch(i.label){case 0:if(!e)return nn.debug("the user is null"),[2,this.rejectAuthError(s.NoUserSession)];t=this._config.clientMetadata,0===this.inflightSessionPromiseCounter&&(this.inflightSessionPromise=new Promise((function(n,i){e.getSession((function(t,o){return c(r,void 0,void 0,(function(){var r;return l(this,(function(s){switch(s.label){case 0:if(!t)return[3,5];if(nn.debug("Failed to get the session from user",e),!this.isSessionInvalid(t))return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(e)];case 2:return s.sent(),[3,4];case 3:return r=s.sent(),i(new Error("Session is invalid due to: "+t.message+" and failed to clean up invalid session: "+r.message)),[2];case 4:return i(t),[2];case 5:return nn.debug("Succeed to get the user session",o),n(o),[2]}}))}))}),{clientMetadata:t})}))),this.inflightSessionPromiseCounter++,i.label=1;case 1:return i.trys.push([1,,3,4]),[4,this.inflightSessionPromise];case 2:return n=i.sent(),e.signInUserSession=n,[2,n];case 3:return this.inflightSessionPromiseCounter--,[7];case 4:return[2]}}
2))}))},e.prototype.userSession=function(e){return this._userSession(e)},e.prototype.currentUserCredentials=function(){return c(this,void 0,void 0,(function(){var e,t,n=this;return l(this,(function(r){switch(r.label){case 0:nn.debug("Getting current user credentials"),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this._storageSync];case 2:return r.sent(),[3,4];case 3:throw e=r.sent(),nn.debug("Failed to sync cache info into memory",e),e;case 4:t=null;try{t=JSON.parse(this._storage.getItem("aws-amplify-federatedInfo"))}catch(i){nn.debug("failed to get or parse item aws-amplify-federatedInfo",i)}return t?[2,this.Credentials.refreshFederatedToken(t)]:[2,this.currentSession().then((function(e){return nn.debug("getting session success",e),n.Credentials.set(e,"session")})).catch((function(){return nn.debug("getting guest credentials"),n.Credentials.set(null,"guest")}))]}}))}))},e.prototype.currentCredentials=function(){return nn.debug("getting current credentials"),this.Credentials.get()},e.prototype.verifyUserAttribute=function(e,t,n){return void 0===n&&(n=this._config.clientMetadata),new Promise((function(r,i){e.getAttributeVerificationCode(t,{onSuccess:function(e){return r(e)},onFailure:function(e){return i(e)}},n)}))},e.prototype.verifyUserAttributeSubmit=function(e,t,n){return n?new Promise((function(r,i){e.verifyAttribute(t,n,{onSuccess:function(e){r(e)},onFailure:function(e){i(e)}})})):this.rejectAuthError(s.EmptyCode)},e.prototype.verifyCurrentUserAttribute=function(e){var t=this;return t.currentUserPoolUser().then((function(n){return t.verifyUserAttribute(n,e)}))},e.prototype.verifyCurrentUserAttributeSubmit=function(e,t){var n=this;return n.currentUserPoolUser().then((function(r){return n.verifyUserAttributeSubmit(r,e,t)}))},e.prototype.cognitoIdentitySignOut=function(e,t){return c(this,void 0,void 0,(function(){var n,r,i=this;return l(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this._storageSync];case 1:return o.sent(),[3,3];case 2:throw n=o.sent(),nn.debug("Failed to sync cache info into memory",n),n;case 3:return r=this._oAuthHandler&&"true"===this._storage.getItem("amplify-signin-with-hostedUI"),[2,new Promise((function(n,o){if(e&&e.global){nn.debug("user global sign out",t);var s=i._config.clientMetadata;t.getSession((function(e,s){return c(i,void 0,void 0,(function(){var i,s=this;return l(this,(function(a){switch(a.label){case 0:if(!e)return[3,5];if(nn.debug("failed to get the user session",e),!this.isSessionInvalid(e))return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.cleanUpInvalidSession(t)];case 2:return a.sent(),[3,4];case 3:return i=a.sent(),o(new Error("Session is invalid due to: "+e.message+" and failed to clean up invalid session: "+i.message)),[2];case 4:return[2,o(e)];case 5:return t.globalSignOut({onSuccess:function(e){if(nn.debug("global sign out success"),!r)return n();s.oAuthSignOutRedirect(n,o)},onFailure:function(e){return nn.debug("global sign out failed",e),o(e)}}),[2]}}))}))}),{clientMetadata:s})}else nn.debug("user sign out",t),t.signOut((function(){if(!r)return n();i.oAuthSignOutRedirect(n,o)}))}))]}}))}))},e.prototype.oAuthSignOutRedirect=function(e,t){_().isBrowser?this.oAuthSignOutRedirectOrReject(t):this.oAuthSignOutAndResolve(e)},e.prototype.oAuthSignOutAndResolve=function(e){this._oAuthHandler.signOut(),e()},e.prototype.oAuthSignOutRedirectOrReject=function(e){this._oAuthHandler.signOut(),setTimeout((function(){return e(Error("Signout timeout fail"))}),3e3)},e.prototype.signOut=function(e){return c(this,void 0,void 0,(function(){var t;return l(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.cleanCachedItems()];case 1:return n.sent(),[3,3];case 2:return n.sent(),nn.debug("failed to clear cached items"),[3,3];case 3:return this.userPool?(t=this.userPool.getCurrentUser())?[4,this.cognitoIdentitySignOut(e,t)]:[3,5]:[3,7];case 4:return n.sent(),[3,6];case 5:nn.debug("no current Cognito user"),n.label=6;case 6:return[3,8];case 7:nn.debug("no Cognito User pool"),n.label=8;case 8:return sn("signOut",this.user,"A user has been signed out"),this.user=null,[2]}}))}))},e.prototype.cleanCachedItems=function(){return c(this,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return[4,this.Credentials.clear()];case 1:return e.sent(),[2]}}))}))},e.prototype.changePassword=function(e,t,n,r){var i=this;return void 0===r&&(r=this._config.clientMetadata),new Promise((function(o,s){i.userSession(e).then((function(i){e.changePassword(t,n,(function(e,t){return e?(nn.debug("change password failure",e),s(e)):o(t)}),r)}))}))},e.prototype.forgotPassword=function(e,t){if(void 0===t&&(t=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(s.EmptyUsername);var n=this.createCognitoUser(e);return new Promise((function(r,i){n.forgotPassword({onSuccess:function(){r()},onFailure:function(t){nn.debug("forgot password failure",t),sn("forgotPassword_failure",t,e+" forgotPassword failed"),i(t)},inputVerificationCode:function(t){sn("forgotPassword",n,e+" has initiated forgot password flow"),r(t)}},t)}))},e.prototype.forgotPasswordSubmit=function(e,t,n,r){if(void 0===r&&(r=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(s.EmptyUsername);if(!t)return this.rejectAuthError(s.EmptyCode);if(!n)return this.rejectAuthError(s.EmptyPassword);var i=this.createCognitoUser(e);return new Promise((function(o,s){i.confirmPassword(t,n,{onSuccess:function(t){sn("forgotPasswordSubmit",i,e+" forgotPasswordSubmit successful"),o(t)}
2,onFailure:function(t){sn("forgotPasswordSubmit_failure",t,e+" forgotPasswordSubmit failed"),s(t)}},r)}))},e.prototype.currentUserInfo=function(){return c(this,void 0,void 0,(function(){var e,t,n,r,i,o,s;return l(this,(function(a){switch(a.label){case 0:return(e=this.Credentials.getCredSource())&&"aws"!==e&&"userPool"!==e?[3,9]:[4,this.currentUserPoolUser().catch((function(e){return nn.error(e)}))];case 1:if(!(s=a.sent()))return[2,null];a.label=2;case 2:return a.trys.push([2,8,,9]),[4,this.userAttributes(s)];case 3:t=a.sent(),n=this.attributesToObject(t),r=null,a.label=4;case 4:return a.trys.push([4,6,,7]),[4,this.currentCredentials()];case 5:return r=a.sent(),[3,7];case 6:return i=a.sent(),nn.debug("Failed to retrieve credentials while getting current user info",i),[3,7];case 7:return[2,{id:r?r.identityId:void 0,username:s.getUsername(),attributes:n}];case 8:return o=a.sent(),nn.error("currentUserInfo error",o),[2,{}];case 9:return"federated"===e?[2,(s=this.user)||{}]:[2]}}))}))},e.prototype.federatedSignIn=function(e,t,n){return c(this,void 0,void 0,(function(){var r,i,s,a,u,c,f,p,g,m,y;return l(this,(function(l){switch(l.label){case 0:if(!this._config.identityPoolId&&!this._config.userPoolId)throw new Error("Federation requires either a User Pool or Identity Pool in config");if(void 0===e&&this._config.identityPoolId&&!this._config.userPoolId)throw new Error("Federation with Identity Pools requires tokens passed as arguments");return d(e)||(v=e)&&["customProvider"].find((function(e){return v.hasOwnProperty(e)}))||function(e){return e&&!!["customState"].find((function(t){return e.hasOwnProperty(t)}))}(e)||void 0===e?(r=e||{provider:o.Cognito},u=d(r)?r.provider:r.customProvider,d(r),i=r.customState,this._config.userPoolId&&(s=h(this._config.oauth)?this._config.userPoolWebClientId:this._config.oauth.clientID,a=h(this._config.oauth)?this._config.oauth.redirectSignIn:this._config.oauth.redirectUri,this._oAuthHandler.oauthSignIn(this._config.oauth.responseType,this._config.oauth.domain,a,s,u,i)),[3,4]):[3,1];case 1:u=e;try{(c=JSON.stringify(JSON.parse(this._storage.getItem("aws-amplify-federatedInfo")).user))&&nn.warn("There is already a signed in user: "+c+" in your app.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tYou should not call Auth.federatedSignIn method again as it may cause unexpected behavior.")}catch(b){}return f=t.token,p=t.identity_id,g=t.expires_at,[4,this.Credentials.set({provider:u,token:f,identity_id:p,user:n,expires_at:g},"federation")];case 2:return m=l.sent(),[4,this.currentAuthenticatedUser()];case 3:return y=l.sent(),sn("signIn",y,"A user "+y.username+" has been signed in"),nn.debug("federated sign in credentials",m),[2,m];case 4:return[2]}var v}))}))},e.prototype._handleAuthResponse=function(e){return c(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u,c,d,h,p,g,m;return l(this,(function(l){switch(l.label){case 0:if(this.oAuthFlowInProgress)return nn.debug("Skipping URL "+e+" current flow in progress"),[2];l.label=1;case 1:if(l.trys.push([1,,8,9]),this.oAuthFlowInProgress=!0,!this._config.userPoolId)throw new Error("OAuth responses require a User Pool defined in config");if(sn("parsingCallbackUrl",{url:e},"The callback url is being parsed"),t=e||(_().isBrowser?window.location.href:""),n=!!((0,Gt.Qc)(t).query||"").split("&").map((function(e){return e.split("=")})).find((function(e){var t=f(e,1)[0];return"code"===t||"error"===t})),r=!!((0,Gt.Qc)(t).hash||"#").substr(1).split("&").map((function(e){return e.split("=")})).find((function(e){var t=f(e,1)[0];return"access_token"===t||"error"===t})),!n&&!r)return[3,7];this._storage.setItem("amplify-redirected-from-hosted-ui","true"),l.label=2;case 2:return l.trys.push([2,6,,7]),[4,this._oAuthHandler.handleAuthResponse(t)];case 3:return i=l.sent(),o=i.accessToken,s=i.idToken,a=i.refreshToken,u=i.state,c=new qt.MZ({IdToken:new qt.xk({IdToken:s}),RefreshToken:new qt.bR({RefreshToken:a}),AccessToken:new qt.ZA({AccessToken:o})}),d=void 0,this._config.identityPoolId?[4,this.Credentials.set(c,"session")]:[3,5];case 4:d=l.sent(),nn.debug("AWS credentials",d),l.label=5;case 5:return h=/-/.test(u),(p=this.createCognitoUser(c.getIdToken().decodePayload()["cognito:username"])).setSignInUserSession(c),window&&void 0!==window.history&&window.history.replaceState(window.history.state,"",this._config.oauth.redirectSignIn),sn("signIn",p,"A user "+p.getUsername()+" has been signed in"),sn("cognitoHostedUI",p,"A user "+p.getUsername()+" has been signed in via Cognito Hosted UI"),h&&(g=u.split("-").splice(1).join("-"),sn("customOAuthState",g.match(/.{2}/g).map((function(e){return String.fromCharCode(parseInt(e,16))})).join(""),"State for user "+p.getUsername())),[2,d];case 6:return m=l.sent(),nn.debug("Error in cognito hosted auth response",m),window&&void 0!==window.history&&window.history.replaceState(window.history.state,"",this._config.oauth.redirectSignIn),sn("signIn_failure",m,"The OAuth response flow failed"),sn("cognitoHostedUI_failure",m,"A failure occurred when returning to the Cognito Hosted UI"),sn("customState_failure",m,"A failure occurred when returning state"),[3,7];case 7:return[3,9];case 8:return this.oAuthFlowInProgress=!1,[7];case 9:return[2]}}
2))}))},e.prototype.essentialCredentials=function(e){return{accessKeyId:e.accessKeyId,sessionToken:e.sessionToken,secretAccessKey:e.secretAccessKey,identityId:e.identityId,authenticated:e.authenticated}},e.prototype.attributesToObject=function(e){var t=this,n={};return e&&e.map((function(e){"email_verified"===e.Name||"phone_number_verified"===e.Name?n[e.Name]=t.isTruthyString(e.Value)||!0===e.Value:n[e.Name]=e.Value})),n},e.prototype.isTruthyString=function(e){return"function"==typeof e.toLowerCase&&"true"===e.toLowerCase()},e.prototype.createCognitoUser=function(e){var t={Username:e,Pool:this.userPool};t.Storage=this._storage;var n=this._config.authenticationFlowType,r=new qt.ws(t);return n&&r.setAuthenticationFlowType(n),r},e.prototype._isValidAuthStorage=function(e){return!!e&&"function"==typeof e.getItem&&"function"==typeof e.setItem&&"function"==typeof e.removeItem&&"function"==typeof e.clear},e.prototype.noUserPoolErrorHandler=function(e){return!e||e.userPoolId&&e.identityPoolId?s.NoConfig:s.MissingAuthConfig},e.prototype.rejectAuthError=function(e){return Promise.reject(new Xt(e))},e.prototype.rejectNoUserPool=function(){var e=this.noUserPoolErrorHandler(this._config);return Promise.reject(new en(e))},e.prototype.rememberDevice=function(){return c(this,void 0,void 0,(function(){var e,t;return l(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.currentUserPoolUser()];case 1:return e=n.sent(),[3,3];case 2:return t=n.sent(),nn.debug("The user is not authenticated by the error",t),[2,Promise.reject("The user is not authenticated")];case 3:return e.getCachedDeviceKeyAndPassword(),[2,new Promise((function(t,n){e.setDeviceStatusRemembered({onSuccess:function(e){t(e)},onFailure:function(e){"InvalidParameterException"===e.code?n(new Xt(s.DeviceConfig)):"NetworkError"===e.code?n(new Xt(s.NetworkError)):n(e)}})}))]}}))}))},e.prototype.forgetDevice=function(){return c(this,void 0,void 0,(function(){var e,t;return l(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.currentUserPoolUser()];case 1:return e=n.sent(),[3,3];case 2:return t=n.sent(),nn.debug("The user is not authenticated by the error",t),[2,Promise.reject("The user is not authenticated")];case 3:return e.getCachedDeviceKeyAndPassword(),[2,new Promise((function(t,n){e.forgetDevice({onSuccess:function(e){t(e)},onFailure:function(e){"InvalidParameterException"===e.code?n(new Xt(s.DeviceConfig)):"NetworkError"===e.code?n(new Xt(s.NetworkError)):n(e)}})}))]}}))}))},e.prototype.fetchDevices=function(){return c(this,void 0,void 0,(function(){var e,t;return l(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.currentUserPoolUser()];case 1:return e=n.sent(),[3,3];case 2:throw t=n.sent(),nn.debug("The user is not authenticated by the error",t),new Error("The user is not authenticated");case 3:return e.getCachedDeviceKeyAndPassword(),[2,new Promise((function(t,n){var r={onSuccess:function(e){var n=e.Devices.map((function(e){var t=e.DeviceAttributes.find((function(e){return"device_name"===e.Name}))||{};return{id:e.DeviceKey,name:t.Value}}));t(n)},onFailure:function(e){"InvalidParameterException"===e.code?n(new Xt(s.DeviceConfig)):"NetworkError"===e.code?n(new Xt(s.NetworkError)):n(e)}};e.listDevices(60,null,r)}))]}}))}))},e}(),un=new an(null);se.d.register(un)},10914:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(89945),i=function(){function e(){this.state=Int32Array.from(r.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>r.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===r.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%r.BLOCK_SIZE>=r.BLOCK_SIZE-8){for(var i=this.bufferLength;i<r.BLOCK_SIZE;
vendor: 4,436 bytes, line 2
2i++)t.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(i=this.bufferLength;i<r.BLOCK_SIZE-8;i++)t.setUint8(i,0);t.setUint32(r.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(r.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var o=new Uint8Array(r.DIGEST_LENGTH);for(i=0;i<8;i++)o[4*i]=this.state[i]>>>24&255,o[4*i+1]=this.state[i]>>>16&255,o[4*i+2]=this.state[i]>>>8&255,o[4*i+3]=this.state[i]>>>0&255;return o},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],i=t[1],o=t[2],s=t[3],a=t[4],u=t[5],c=t[6],l=t[7],f=0;f<r.BLOCK_SIZE;f++){if(f<16)this.temp[f]=(255&e[4*f])<<24|(255&e[4*f+1])<<16|(255&e[4*f+2])<<8|255&e[4*f+3];else{var d=this.temp[f-2],h=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,p=((d=this.temp[f-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[f]=(h+this.temp[f-7]|0)+(p+this.temp[f-16]|0)}var g=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&u^~a&c)|0)+(l+(r.KEY[f]+this.temp[f]|0)|0)|0,m=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&i^n&o^i&o)|0;l=c,c=u,u=a,a=s+g|0,s=o,o=i,i=n,n=g+m|0}t[0]+=n,t[1]+=i,t[2]+=o,t[3]+=s,t[4]+=a,t[5]+=u,t[6]+=c,t[7]+=l},e}();t.RawSha256=i},89945:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},41938:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(73541).__exportStar)(n(65430),t)},65430:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(73541),i=n(89945),o=n(10914),s=n(20892),a=function(){function e(e){if(this.hash=new o.RawSha256,e){this.outer=new o.RawSha256;var t=function(e){var t=(0,s.convertToBuffer)(e);if(t.byteLength>i.BLOCK_SIZE){var n=new o.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(i.BLOCK_SIZE);return r.set(t),r}(e),n=new Uint8Array(i.BLOCK_SIZE);n.set(t);for(var r=0;r<i.BLOCK_SIZE;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(r=0;r<t.byteLength;r++)t[r]=0}}return e.prototype.update=function(e){if(!(0,s.isEmptyData)(e)&&!this.error)try{this.hash.update((0,s.convertToBuffer)(e))}catch(t){this.error=t}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return(0,r.__awaiter)(this,void 0,void 0,(function(){return(0,r.__generator)(this,(function(e){return[2,this.digestSync()]}))}))},e}();t.Sha256=a},39145:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var r=n(46930),i="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:r.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}},20892:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var r=n(39145);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var i=n(7450);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return i.isEmptyData}});var o=n(30639);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return o.numToUint8}});var s=n(60321);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return s.uint32ArrayFrom}})},7450:function(e,t){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},30639:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},60321:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0<e.length;)t[0]=e[0];return t}return Uint32Array.from(e)}},46930:function(e,t,n){"use strict";n.r(t),n.d(t,{fromUtf8:function(){return r},toUtf8:function(){return i}});const r=e=>"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):(e=>{const t=[];for(let n=0,r=e.length;n<r;n++){const r=e.charCodeAt(n);if(r<128)t.push(r);else if(r<2048)t.push(r>>6|192,63&r|128);else if(n+1<e.length&&55296==(64512&r)&&56320==(64512&e.charCodeAt(n+1))){const i=65536+((1023&r)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(r>>12|224,r>>6&63|128,63&r|128)}return Uint8Array.from(t)})(e),i=e=>"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):(e=>{let t="";for(let n=0,r=e.length;n<r;n++){const r=e[n];if(r<128)t+=String.fromCharCode(r);else if(192<=r&&r<224){const i=e[++n];t+=String.fromCharCode((31&r)<<6|63&i)}else if(240<=r&&r<365){const i="%"+[r,e[++n],e[++n],e[++n]].map((e=>e.toString(16))).join("%");t+=decodeURIComponent(i)}else t+=String.fromCharCode((15&r)<<12|(63&e[++n])<<6|63&e[++n])}return t})(e)},73541:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return o},__asyncDelegator:function(){return w},__asyncGenerator:function(){return b},__asyncValues:function(){return S},__await:function(){return v},__awaiter:function(){return l},__classPrivateFieldGet:function(){return A},__classPrivateFieldSet:function(){return I},__createBinding:function(){return d},__decorate:function(){return a},__exportStar:function(){return h},__extends:function(){return i},__generator:function(){return f},__importDefault:function(){return _},__importStar:function(){return E}
vendor: 5,336 bytes, line 2
2,__makeTemplateObject:function(){return C},__metadata:function(){return c},__param:function(){return u},__read:function(){return g},__rest:function(){return s},__spread:function(){return m},__spreadArrays:function(){return y},__values:function(){return p}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function a(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(t){o(t)}}function a(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function h(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function m(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r}function v(e){return this instanceof v?(this.v=e,this):new v(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=i[e](t)).value instanceof v?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(r){l(o[0][3],r)}var n}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function S(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function C(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
2function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function _(e){return e&&e.__esModule?e:{default:e}}function A(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function I(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},56949:function(e,t,n){"use strict";n.d(t,{t4:function(){return r},ij:function(){return i}});var r={userAgent:"aws-amplify/5.0.4",isReactNative:"undefined"!=typeof navigator&&"ReactNative"===navigator.product},i=function(){return r.userAgent}},14716:function(e,t,n){"use strict";n.d(t,{Bs:function(){return o},m0:function(){return s},Zm:function(){return a}});var r=n(56949);function i(){}i.prototype.userAgent=(0,r.ij)();var o=function(){i.category="auth"},s=function(e){i.framework=e},a=function(e){var t=i.category?" "+i.category:"",n=i.framework?" framework/"+i.framework:"";return""+i.prototype.userAgent+t+n}},23477:function(e,t,n){"use strict";n.d(t,{sD:function(){return i},ZA:function(){return O},xk:function(){return T},bR:function(){return k},ws:function(){return q},KC:function(){return F},AM:function(){return te},MZ:function(){return D},eR:function(){return re}});var r,i=function(){function e(e){var t=e||{},n=t.ValidationData,r=t.Username,i=t.Password,o=t.AuthParameters,s=t.ClientMetadata;this.validationData=n||{},this.authParameters=o||{},this.clientMetadata=s||{},this.username=r,this.password=i}var t=e.prototype;return t.getUsername=function(){return this.username},t.getPassword=function(){return this.password},t.getValidationData=function(){return this.validationData},t.getAuthParameters=function(){return this.authParameters},t.getClientMetadata=function(){return this.clientMetadata},e}(),o=n(48764);if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==n.g&&n.g.crypto&&(r=n.g.crypto),!r)try{r=n(56249)}catch(ie){}function s(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(ie){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(ie){}}throw new Error("Native crypto module could not be used to get secure random number.")}var a,u=function(){function e(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length}var t=e.prototype;return t.random=function(t){for(var n=[],r=0;r<t;r+=4)n.push(s());return new e(n,t)},t.toString=function(){return function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")}(this)},e}(),c=n(41938),l=f;function f(e,t){null!=e&&this.fromString(e,t)}function d(){return new f(null)}var h="undefined"!=typeof navigator;h&&"Microsoft Internet Explorer"==navigator.appName?(f.prototype.am=function(e,t,n,r,i,o){for(var s=32767&t,a=t>>15;--o>=0;){var u=32767&this[e],c=this[e++]>>15,l=a*u+c*s;i=((u=s*u+((32767&l)<<15)+n[r]+(1073741823&i))>>>30)+(l>>>15)+a*c+(i>>>30),n[r++]=1073741823&u}return i},a=30):h&&"Netscape"!=navigator.appName?(f.prototype.am=function(e,t,n,r,i,o){for(;--o>=0;){var s=t*this[e++]+n[r]+i;i=Math.floor(s/67108864),n[r++]=67108863&s}return i},a=26):(f.prototype.am=function(e,t,n,r,i,o){for(var s=16383&t,a=t>>14;--o>=0;){var u=16383&this[e],c=this[e++]>>14,l=a*u+c*s;i=((u=s*u+((16383&l)<<14)+n[r]+i)>>28)+(l>>14)+a*c,n[r++]=268435455&u}return i},a=28),f.prototype.DB=a,f.prototype.DM=(1<<a)-1,f.prototype.DV=1<<a;f.prototype.FV=Math.pow(2,52),f.prototype.F1=52-a,f.prototype.F2=2*a-52;var p,g,m="0123456789abcdefghijklmnopqrstuvwxyz",y=new Array;for(p="0".charCodeAt(0),g=0;g<=9;++g)y[p++]=g;for(p="a".charCodeAt(0),g=10;g<36;++g)y[p++]=g;for(p="A".charCodeAt(0),g=10;g<36;++g)y[p++]=g;function v(e){return m.charAt(e)}function b(e,t){var n=y[e.charCodeAt(t)];return null==n?-1:n}function w(e){var t=d();return t.fromInt(e),t}function S(e){var t,n=1;return 0!=(t=e>>>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 C(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>
vendor: 8,867 bytes, line 2
2>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function E(e){return o.lW.from((new u).random(e).toString(),"hex")}C.prototype.convert=function(e){var t=d();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(f.ZERO)>0&&this.m.subTo(t,t),t},C.prototype.revert=function(e){var t=d();return e.copyTo(t),this.reduce(t),t},C.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=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)},C.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},C.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},f.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},f.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},f.prototype.fromString=function(e,t){var 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;for(var r=e.length,i=!1,o=0;--r>=0;){var s=b(e,r);s<0?"-"==e.charAt(r)&&(i=!0):(i=!1,0==o?this[this.t++]=s:o+n>this.DB?(this[this.t-1]|=(s&(1<<this.DB-o)-1)<<o,this[this.t++]=s>>this.DB-o):this[this.t-1]|=s<<o,(o+=n)>=this.DB&&(o-=this.DB))}this.clamp(),i&&f.ZERO.subTo(this,this)},f.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},f.prototype.dlShiftTo=function(e,t){var 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},f.prototype.drShiftTo=function(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},f.prototype.lShiftTo=function(e,t){var n,r=e%this.DB,i=this.DB-r,o=(1<<i)-1,s=Math.floor(e/this.DB),a=this.s<<r&this.DM;for(n=this.t-1;n>=0;--n)t[n+s+1]=this[n]>>i|a,a=(this[n]&o)<<r;for(n=s-1;n>=0;--n)t[n]=0;t[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()},f.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,i=this.DB-r,o=(1<<r)-1;t[0]=this[n]>>r;for(var s=n+1;s<this.t;++s)t[s-n-1]|=(this[s]&o)<<i,t[s-n]=this[s]>>r;r>0&&(t[this.t-n-1]|=(this.s&o)<<i),t.t=this.t-n,t.clamp()}},f.prototype.subTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]-e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e[n],t[n++]=r&this.DM,r>>=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()},f.prototype.multiplyTo=function(e,t){var n=this.abs(),r=e.abs(),i=n.t;for(t.t=i+r.t;--i>=0;)t[i]=0;for(i=0;i<r.t;++i)t[i+n.t]=n.am(0,r[i],t,i,0,n.t);t.s=0,t.clamp(),this.s!=e.s&&f.ZERO.subTo(t,t)},f.prototype.squareTo=function(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=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()},f.prototype.divRemTo=function(e,t,n){var r=e.abs();if(!(r.t<=0)){var i=this.abs();if(i.t<r.t)return null!=t&&t.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=d());var o=d(),s=this.s,a=e.s,u=this.DB-S(r[r.t-1]);u>0?(r.lShiftTo(u,o),i.lShiftTo(u,n)):(r.copyTo(o),i.copyTo(n));var c=o.t,l=o[c-1];if(0!=l){var h=l*(1<<this.F1)+(c>1?o[c-2]>>this.F2:0),p=this.FV/h,g=(1<<this.F1)/h,m=1<<this.F2,y=n.t,v=y-c,b=null==t?d():t;for(o.dlShiftTo(v,b),n.compareTo(b)>=0&&(n[n.t++]=1,n.subTo(b,n)),f.ONE.dlShiftTo(c,b),b.subTo(o,o);o.t<c;)o[o.t++]=0;for(;--v>=0;){var w=n[--y]==l?this.DM:Math.floor(n[y]*p+(n[y-1]+m)*g);if((n[y]+=o.am(0,w,n,v,0,c))<w)for(o.dlShiftTo(v,b),n.subTo(b,n);n[y]<--w;)n.subTo(b,n)}null!=t&&(n.drShiftTo(c,t),s!=a&&f.ZERO.subTo(t,t)),n.t=c,n.clamp(),u>0&&n.rShiftTo(u,n),s<0&&f.ZERO.subTo(n,n)}}},f.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},f.prototype.addTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]+e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e[n],t[n++]=r&this.DM,r>>=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()},f.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var 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}var n,r=(1<<t)-1,i=!1,o="",s=this.t,a=this.DB-s*this.DB%t;if(s-- >0)for(a<this.DB&&(n=this[s]>>a)>0&&(i=!0,o=v(n));s>=0;)a<t?(n=(this[s]&(1<<a)-1)<<t-a,n|=this[--s]>>(a+=this.DB-t)):(n=this[s]>>(a-=t)&r,a<=0&&(a+=this.DB,--s)),n>0&&(i=!0),i&&(o+=v(n));return i?o:"0"},f.prototype.negate=function(){var e=d();return f.ZERO.subTo(this,e),e},f.prototype.abs=function(){return this.s<0?this.negate():this},f.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},f.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+S(this[this.t-1]^this.s&this.DM)},f.prototype.mod=function(e){var t=d();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(f.ZERO)>0&&e.subTo(t,t),t},f.prototype.equals=function(e){return 0==this.compareTo(e)},f.prototype.add=function(e){var t=d();return this.addTo(e,t),t},f.prototype.subtract=function(e){var t=d();return this.subTo(e,t),t},f.prototype.multiply=function(e){var t=d();return this.multiplyTo(e,t),t},f.prototype.divide=function(e){var t=d();return this.divRemTo(e,t,null),t},f.prototype.modPow=function(e,t,n){var r,i=e.bitLength(),o=w(1),s=new C(t);if(i<=0)return o;r=i<18?1:i<48?3:i<144?4:i<768?5:6;var a=new Array,u=3,c=r-1,l=(1<<r)-1;if(a[1]=s.convert(this),r>1){var f=d();for(s.sqrTo(a[1],f);u<=l;)a[u]=d(),s.mulTo(f,a[u-2],a[u]),u+=2}var h,p,g=e.t-1,m=!0,y=d();for(i=S(e[g])-1;g>=0;){for(i>=c?h=e[g]>>i-c&l:(h=(e[g]&(1<<i+1)-1)<<c-i,g>0&&(h|=e[g-1]>>this.DB+i-c)),u=r;0==(1&h);)h>>=1,--u;if((i-=u)<0&&(i+=this.DB,--g),m)a[h].copyTo(o),m=!1;else{for(;u>1;)s.sqrTo(o,y),s.sqrTo(y,o),u-=2;u>0?s.sqrTo(o,y):(p=o,o=y,y=p),s.mulTo(y,a[h],o)}for(;g>=0&&0==(e[g]&1<<i);)s.sqrTo(o,y),p=o,o=y,y=p,--i<0&&(i=this.DB-1,--g)}var v=s.revert(o);return n(null,v),v},f.ZERO=w(0),f.ONE=w(1);var _=/^[89a-f]/i,A=function(){function e(e){this.N=new l("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",16),this.g=new l("2",16),this.k=new l(this.hexHash(""+this.padHex(this.N)+this.padHex(this.g)),16),this.smallAValue=this.generateRandomSmallA(),this.getLargeAValue((function(){})),this.infoBits=o.lW.from("Caldera Derived Key","utf8"),this.poolName=e}var t=e.prototype;return t.getSmallAValue=function(){return this.smallAValue},t.getLargeAValue=function(e){var t=this;this.largeAValue?e(null,this.largeAValue):this.calculateA(this.smallAValue,(function(n,r){n&&e(n,null),t.largeAValue=r,e(null,t.largeAValue)}))},t.generateRandomSmallA=function(){var e=E(128).toString("hex");return new l(e,16)},t.generateRandomString=function(){return E(40).toString("base64")},t.getRandomPassword=function(){return this.randomPassword},t.getSaltDevices=function(){return this.SaltToHashDevices},t.getVerifierDevices=function(){return this.verifierDevices},t.generateHashDevice=function(e,t,n){var r=this;this.randomPassword=this.generateRandomString();var i=""+e+t+":"+this.randomPassword,o=this.hash(i),s=E(16).toString("hex");this.SaltToHashDevices=this.padHex(new l(s,16)),this.g.modPow(new l(this.hexHash(this.SaltToHashDevices+o),16),this.N,(function(e,t){e&&n(e,null),r.verifierDevices=r.padHex(t),n(null,null)}))},t.calculateA=function(e,t){var n=this;this.g.modPow(e,this.N,(function(e,r){e&&t(e,null),r.mod(n.N).equals(l.ZERO)&&t(new Error("Illegal paramater. A mod N cannot be 0."),null),t(null,r)}
2))},t.calculateU=function(e,t){return this.UHexHash=this.hexHash(this.padHex(e)+this.padHex(t)),new l(this.UHexHash,16)},t.hash=function(e){var t=new c.Sha256;t.update(e);var n=t.digestSync(),r=o.lW.from(n).toString("hex");return new Array(64-r.length).join("0")+r},t.hexHash=function(e){return this.hash(o.lW.from(e,"hex"))},t.computehkdf=function(e,t){var n=o.lW.concat([this.infoBits,o.lW.from(String.fromCharCode(1),"utf8")]),r=new c.Sha256(t);r.update(e);var i=r.digestSync(),s=new c.Sha256(i);return s.update(n),s.digestSync().slice(0,16)},t.getPasswordAuthenticationKey=function(e,t,n,r,i){var s=this;if(n.mod(this.N).equals(l.ZERO))throw new Error("B cannot be zero.");if(this.UValue=this.calculateU(this.largeAValue,n),this.UValue.equals(l.ZERO))throw new Error("U cannot be zero.");var a=""+this.poolName+e+":"+t,u=this.hash(a),c=new l(this.hexHash(this.padHex(r)+u),16);this.calculateS(c,n,(function(e,t){e&&i(e,null);var n=s.computehkdf(o.lW.from(s.padHex(t),"hex"),o.lW.from(s.padHex(s.UValue),"hex"));i(null,n)}))},t.calculateS=function(e,t,n){var r=this;this.g.modPow(e,this.N,(function(i,o){i&&n(i,null),t.subtract(r.k.multiply(o)).modPow(r.smallAValue.add(r.UValue.multiply(e)),r.N,(function(e,t){e&&n(e,null),n(null,t.mod(r.N))}))}))},t.getNewPasswordRequiredChallengeUserAttributePrefix=function(){return"userAttributes."},t.padHex=function(e){if(!(e instanceof l))throw new Error("Not a BigInteger");var t=e.compareTo(l.ZERO)<0,n=e.abs().toString(16);if(n=n.length%2!=0?"0"+n:n,n=_.test(n)?"00"+n:n,t){var r=n.split("").map((function(e){var t=15&~parseInt(e,16);return"0123456789ABCDEF".charAt(t)})).join("");(n=new l(r,16).add(l.ONE).toString(16)).toUpperCase().startsWith("FF8")&&(n=n.substring(2))}return n},e}(),I=function(){function e(e){this.jwtToken=e||"",this.payload=this.decodePayload()}var t=e.prototype;return t.getJwtToken=function(){return this.jwtToken},t.getExpiration=function(){return this.payload.exp},t.getIssuedAt=function(){return this.payload.iat},t.decodePayload=function(){var e=this.jwtToken.split(".")[1];try{return JSON.parse(o.lW.from(e,"base64").toString("utf8"))}catch(ie){return{}}},e}();function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}var O=function(e){var t,n;function r(t){var n=(void 0===t?{}:t).AccessToken;return e.call(this,n||"")||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,P(t,n),r}(I);function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}var T=function(e){var t,n;function r(t){var n=(void 0===t?{}:t).IdToken;return e.call(this,n||"")||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,x(t,n),r}(I),k=function(){function e(e){var t=(void 0===e?{}:e).RefreshToken;this.token=t||""}return e.prototype.getToken=function(){return this.token},e}(),U=n(56949),D=function(){function e(e){var t=void 0===e?{}:e,n=t.IdToken,r=t.RefreshToken,i=t.AccessToken,o=t.ClockDrift;if(null==i||null==n)throw new Error("Id token and Access Token must be present.");this.idToken=n,this.refreshToken=r,this.accessToken=i,this.clockDrift=void 0===o?this.calculateClockDrift():o}var t=e.prototype;return t.getIdToken=function(){return this.idToken},t.getRefreshToken=function(){return this.refreshToken},t.getAccessToken=function(){return this.accessToken},t.getClockDrift=function(){return this.clockDrift},t.calculateClockDrift=function(){return Math.floor(new Date/1e3)-Math.min(this.accessToken.getIssuedAt(),this.idToken.getIssuedAt())},t.isValid=function(){var e=Math.floor(new Date/1e3)-this.clockDrift;return e<this.accessToken.getExpiration()&&e<this.idToken.getExpiration()},e}(),R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],N=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],M=function(){function e(){}return e.prototype.getNowString=function(){var e=new Date,t=N[e.getUTCDay()],n=R[e.getUTCMonth()],r=e.getUTCDate(),i=e.getUTCHours();i<10&&(i="0"+i);var o=e.getUTCMinutes();o<10&&(o="0"+o);var s=e.getUTCSeconds();return s<10&&(s="0"+s),t+" "+n+" "+r+" "+i+":"+o+":"+s+" UTC "+e.getUTCFullYear()},e}(),F=function(){function e(e){var t=void 0===e?{}:e,n=t.Name,r=t.Value;this.Name=n||"",this.Value=r||""}var t=e.prototype;return t.getValue=function(){return this.Value},t.setValue=function(e){return this.Value=e,this},t.getName=function(){return this.Name},t.setName=function(e){return this.Name=e,this},t.toString=function(){return JSON.stringify(this)},t.toJSON=function(){return{Name:this.Name,Value:this.Value}},e}(),j={},L=function(){function e(){}return e.setItem=function(e,t){return j[e]=t,j[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call(j,e)?j[e]:void 0},e.removeItem=function(e){return delete j[e]},e.clear=function(){return j={}},e}(),V=function(){function e(){try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.cognito.test-ls",1),this.storageWindow.removeItem("aws.cognito.test-ls")}catch(e){this.storageWindow=L}}return e.prototype.getStorage=function(){return this.storageWindow},e}(),B="undefined"!=typeof navigator?U.t4.isReactNative?"react-native":navigator.userAgent:"nodejs",q=function(){function e(e){if(null==e||null==e.Username||null==e.Pool)throw new Error("Username and Pool information are required.");this.username=e.Username||"",this.pool=e.Pool,this.Session=null,this.client=e.Pool.client,this.signInUserSession=null,this.authenticationFlowType="USER_SRP_AUTH",this.storage=e.Storage||(new V).getStorage(),this.keyPrefix="CognitoIdentityServiceProvider."+this.pool.getClientId(),this.userDataKey=this.keyPrefix+"."+this.username+".userData"}var t=e.prototype;return t.setSignInUserSession=function(e){this.clearCachedUserData(),this.signInUserSession=e,this.cacheTokens()},t.getSignInUserSession=function(){return this.signInUserSession},t.getUsername=function(){return this.username},t.getAuthenticationFlowType=function(){return this.authenticationFlowType},t.setAuthenticationFlowType=function(e){this.authenticationFlowType=e},t.initiateAuth=function(e,t){var n=this,r=e.getAuthParameters();r.USERNAME=this.username;var i=0!==Object.keys(e.getValidationData()).length?e.getValidationData():e.getClientMetadata(),o={AuthFlow:"CUSTOM_AUTH",ClientId:this.pool.getClientId(),AuthParameters:r,ClientMetadata:i};this.getUserContextData()&&(o.UserContextData=this.getUserContextData()),this.client.request("InitiateAuth",o,(function(e,r){if(e)return t.onFailure(e);var i=r.ChallengeName,o=r.ChallengeParameters;return"CUSTOM_CHALLENGE"===i?(n.Session=r.Session,t.customChallenge(o)):(n.signInUserSession=n.getCognitoUserSession(r.AuthenticationResult),n.cacheTokens(),t.onSuccess(n.signInUserSession))}))},t.authenticateUser=function(e,t){return"USER_PASSWORD_AUTH"===this.authenticationFlowType?this.authenticateUserPlainUsernamePassword(e,t):"USER_SRP_AUTH"===this.authenticationFlowType||"CUSTOM_AUTH"===this.authenticationFlowType?this.authenticateUserDefaultAuth(e,t):t.onFailure(new Error("Authentication flow type is invali
2d."))},t.authenticateUserDefaultAuth=function(e,t){var n,r,i=this,s=new A(this.pool.getUserPoolName()),a=new M,u={};null!=this.deviceKey&&(u.DEVICE_KEY=this.deviceKey),u.USERNAME=this.username,s.getLargeAValue((function(f,d){f&&t.onFailure(f),u.SRP_A=d.toString(16),"CUSTOM_AUTH"===i.authenticationFlowType&&(u.CHALLENGE_NAME="SRP_A");var h=0!==Object.keys(e.getValidationData()).length?e.getValidationData():e.getClientMetadata(),p={AuthFlow:i.authenticationFlowType,ClientId:i.pool.getClientId(),AuthParameters:u,ClientMetadata:h};i.getUserContextData(i.username)&&(p.UserContextData=i.getUserContextData(i.username)),i.client.request("InitiateAuth",p,(function(u,f){if(u)return t.onFailure(u);var d=f.ChallengeParameters;i.username=d.USER_ID_FOR_SRP,i.userDataKey=i.keyPrefix+"."+i.username+".userData",n=new l(d.SRP_B,16),r=new l(d.SALT,16),i.getCachedDeviceKeyAndPassword(),s.getPasswordAuthenticationKey(i.username,e.getPassword(),n,r,(function(e,n){e&&t.onFailure(e);var r=a.getNowString(),u=o.lW.concat([o.lW.from(i.pool.getUserPoolName(),"utf8"),o.lW.from(i.username,"utf8"),o.lW.from(d.SECRET_BLOCK,"base64"),o.lW.from(r,"utf8")]),l=new c.Sha256(n);l.update(u);var p=l.digestSync(),g=o.lW.from(p).toString("base64"),m={};m.USERNAME=i.username,m.PASSWORD_CLAIM_SECRET_BLOCK=d.SECRET_BLOCK,m.TIMESTAMP=r,m.PASSWORD_CLAIM_SIGNATURE=g,null!=i.deviceKey&&(m.DEVICE_KEY=i.deviceKey);var y={ChallengeName:"PASSWORD_VERIFIER",ClientId:i.pool.getClientId(),ChallengeResponses:m,Session:f.Session,ClientMetadata:h};i.getUserContextData()&&(y.UserContextData=i.getUserContextData()),function e(t,n){return i.client.request("RespondToAuthChallenge",t,(function(r,o){return r&&"ResourceNotFoundException"===r.code&&-1!==r.message.toLowerCase().indexOf("device")?(m.DEVICE_KEY=null,i.deviceKey=null,i.randomPassword=null,i.deviceGroupKey=null,i.clearCachedDeviceKeyAndPassword(),e(t,n)):n(r,o)}))}(y,(function(e,n){return e?t.onFailure(e):i.authenticateUserInternal(n,s,t)}))}))}))}))},t.authenticateUserPlainUsernamePassword=function(e,t){var n=this,r={};if(r.USERNAME=this.username,r.PASSWORD=e.getPassword(),r.PASSWORD){var i=new A(this.pool.getUserPoolName());this.getCachedDeviceKeyAndPassword(),null!=this.deviceKey&&(r.DEVICE_KEY=this.deviceKey);var o=0!==Object.keys(e.getValidationData()).length?e.getValidationData():e.getClientMetadata(),s={AuthFlow:"USER_PASSWORD_AUTH",ClientId:this.pool.getClientId(),AuthParameters:r,ClientMetadata:o};this.getUserContextData(this.username)&&(s.UserContextData=this.getUserContextData(this.username)),this.client.request("InitiateAuth",s,(function(e,r){return e?t.onFailure(e):n.authenticateUserInternal(r,i,t)}))}else t.onFailure(new Error("PASSWORD parameter is required"))},t.authenticateUserInternal=function(e,t,n){var r=this,i=e.ChallengeName,s=e.ChallengeParameters;if("SMS_MFA"===i)return this.Session=e.Session,n.mfaRequired(i,s);if("SELECT_MFA_TYPE"===i)return this.Session=e.Session,n.selectMFAType(i,s);if("MFA_SETUP"===i)return this.Session=e.Session,n.mfaSetup(i,s);if("SOFTWARE_TOKEN_MFA"===i)return this.Session=e.Session,n.totpRequired(i,s);if("CUSTOM_CHALLENGE"===i)return this.Session=e.Session,n.customChallenge(s);if("NEW_PASSWORD_REQUIRED"===i){this.Session=e.Session;var a=null,u=null,c=[],l=t.getNewPasswordRequiredChallengeUserAttributePrefix();if(s&&(a=JSON.parse(e.ChallengeParameters.userAttributes),u=JSON.parse(e.ChallengeParameters.requiredAttributes)),u)for(var f=0;f<u.length;f++)c[f]=u[f].substr(l.length);return n.newPasswordRequired(a,c)}if("DEVICE_SRP_AUTH"===i)return this.Session=e.Session,void this.getDeviceResponse(n);this.signInUserSession=this.getCognitoUserSession(e.AuthenticationResult),this.challengeName=i,this.cacheTokens();var d=e.AuthenticationResult.NewDeviceMetadata;if(null==d)return n.onSuccess(this.signInUserSession);t.generateHashDevice(e.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,e.AuthenticationResult.NewDeviceMetadata.DeviceKey,(function(i){if(i)return n.onFailure(i);var s={Salt:o.lW.from(t.getSaltDevices(),"hex").toString("base64"),PasswordVerifier:o.lW.from(t.getVerifierDevices(),"hex").toString("base64")};r.verifierDevices=s.PasswordVerifier,r.deviceGroupKey=d.DeviceGroupKey,r.randomPassword=t.getRandomPassword(),r.client.request("ConfirmDevice",{DeviceKey:d.DeviceKey,AccessToken:r.signInUserSession.getAccessToken().getJwtToken(),DeviceSecretVerifierConfig:s,DeviceName:B},(function(t,i){return t?n.onFailure(t):(r.deviceKey=e.AuthenticationResult.
vendor: 7,808 bytes, line 2
2NewDeviceMetadata.DeviceKey,r.cacheDeviceKeyAndPassword(),!0===i.UserConfirmationNecessary?n.onSuccess(r.signInUserSession,i.UserConfirmationNecessary):n.onSuccess(r.signInUserSession))}))}))},t.completeNewPasswordChallenge=function(e,t,n,r){var i=this;if(!e)return n.onFailure(new Error("New password is required."));var o=new A(this.pool.getUserPoolName()),s=o.getNewPasswordRequiredChallengeUserAttributePrefix(),a={};t&&Object.keys(t).forEach((function(e){a[s+e]=t[e]})),a.NEW_PASSWORD=e,a.USERNAME=this.username;var u={ChallengeName:"NEW_PASSWORD_REQUIRED",ClientId:this.pool.getClientId(),ChallengeResponses:a,Session:this.Session,ClientMetadata:r};this.getUserContextData()&&(u.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",u,(function(e,t){return e?n.onFailure(e):i.authenticateUserInternal(t,o,n)}))},t.getDeviceResponse=function(e,t){var n=this,r=new A(this.deviceGroupKey),i=new M,s={};s.USERNAME=this.username,s.DEVICE_KEY=this.deviceKey,r.getLargeAValue((function(a,u){a&&e.onFailure(a),s.SRP_A=u.toString(16);var f={ChallengeName:"DEVICE_SRP_AUTH",ClientId:n.pool.getClientId(),ChallengeResponses:s,ClientMetadata:t,Session:n.Session};n.getUserContextData()&&(f.UserContextData=n.getUserContextData()),n.client.request("RespondToAuthChallenge",f,(function(t,s){if(t)return e.onFailure(t);var a=s.ChallengeParameters,u=new l(a.SRP_B,16),f=new l(a.SALT,16);r.getPasswordAuthenticationKey(n.deviceKey,n.randomPassword,u,f,(function(t,r){if(t)return e.onFailure(t);var u=i.getNowString(),l=o.lW.concat([o.lW.from(n.deviceGroupKey,"utf8"),o.lW.from(n.deviceKey,"utf8"),o.lW.from(a.SECRET_BLOCK,"base64"),o.lW.from(u,"utf8")]),f=new c.Sha256(r);f.update(l);var d=f.digestSync(),h=o.lW.from(d).toString("base64"),p={};p.USERNAME=n.username,p.PASSWORD_CLAIM_SECRET_BLOCK=a.SECRET_BLOCK,p.TIMESTAMP=u,p.PASSWORD_CLAIM_SIGNATURE=h,p.DEVICE_KEY=n.deviceKey;var g={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:n.pool.getClientId(),ChallengeResponses:p,Session:s.Session};n.getUserContextData()&&(g.UserContextData=n.getUserContextData()),n.client.request("RespondToAuthChallenge",g,(function(t,r){return t?e.onFailure(t):(n.signInUserSession=n.getCognitoUserSession(r.AuthenticationResult),n.cacheTokens(),e.onSuccess(n.signInUserSession))}))}))}))}))},t.confirmRegistration=function(e,t,n,r){var i={ClientId:this.pool.getClientId(),ConfirmationCode:e,Username:this.username,ForceAliasCreation:t,ClientMetadata:r};this.getUserContextData()&&(i.UserContextData=this.getUserContextData()),this.client.request("ConfirmSignUp",i,(function(e){return e?n(e,null):n(null,"SUCCESS")}))},t.sendCustomChallengeAnswer=function(e,t,n){var r=this,i={};i.USERNAME=this.username,i.ANSWER=e;var o=new A(this.pool.getUserPoolName());this.getCachedDeviceKeyAndPassword(),null!=this.deviceKey&&(i.DEVICE_KEY=this.deviceKey);var s={ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:i,ClientId:this.pool.getClientId(),Session:this.Session,ClientMetadata:n};this.getUserContextData()&&(s.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",s,(function(e,n){return e?t.onFailure(e):r.authenticateUserInternal(n,o,t)}))},t.sendMFACode=function(e,t,n,r){var i=this,s={};s.USERNAME=this.username,s.SMS_MFA_CODE=e;var a=n||"SMS_MFA";"SOFTWARE_TOKEN_MFA"===a&&(s.SOFTWARE_TOKEN_MFA_CODE=e),null!=this.deviceKey&&(s.DEVICE_KEY=this.deviceKey);var u={ChallengeName:a,ChallengeResponses:s,ClientId:this.pool.getClientId(),Session:this.Session,ClientMetadata:r};this.getUserContextData()&&(u.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",u,(function(e,n){if(e)return t.onFailure(e);if("DEVICE_SRP_AUTH"!==n.ChallengeName){if(i.signInUserSession=i.getCognitoUserSession(n.AuthenticationResult),i.cacheTokens(),null==n.AuthenticationResult.NewDeviceMetadata)return t.onSuccess(i.signInUserSession);var r=new A(i.pool.getUserPoolName());r.generateHashDevice(n.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,n.AuthenticationResult.NewDeviceMetadata.DeviceKey,(function(e){if(e)return t.onFailure(e);var s={Salt:o.lW.from(r.getSaltDevices(),"hex").toString("base64"),PasswordVerifier:o.lW.from(r.getVerifierDevices(),"hex").toString("base64")};i.verifierDevices=s.PasswordVerifier,i.deviceGroupKey=n.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,i.randomPassword=r.getRandomPassword(),i.client.request("ConfirmDevice",{DeviceKey:n.AuthenticationResult.NewDeviceMetadata.DeviceKey,AccessToken:i.signInUserSession.getAccessToken().getJwtToken(),DeviceSecretVerifierConfig:s,DeviceName:B},(function(e,r){return e?t.onFailure(e):(i.deviceKey=n.AuthenticationResult.NewDeviceMetadata.DeviceKey,i.cacheDeviceKeyAndPassword(),!0===r.UserConfirmationNecessary?t.onSuccess(i.signInUserSession,r.UserConfirmationNecessary):t.onSuccess(i.signInUserSession))}))}))}else i.getDeviceResponse(t)}))},t.changePassword=function(e,t,n,r){if(null==this.signInUserSession||!this.signInUserSession.isValid())return n(new Error("User is not authenticated"),null);this.client.request("ChangePassword",{PreviousPassword:e,ProposedPassword:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:r},(function(e){return e?n(e,null):n(null,"SUCCESS")}))},t.enableMFA=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);var t=[];t.push({DeliveryMedium:"SMS",AttributeName:"phone_number"}),this.client.request("SetUserSettings",{MFAOptions:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(t){return t?e(t,null):e(null,"SUCCESS")}))},t.setUserMfaPreference=function(e,t,n){if(null==this.signInUserSession||!this.signInUserSession.isValid())return n(new Error("User is not authenticated"),null);this.client.request("SetUserMFAPreference",{SMSMfaSettings:e,SoftwareTokenMfaSettings:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(e){return e?n(e,null):n(null,"SUCCESS")}))},t.disableMFA=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("SetUserSettings",{MFAOptions:[],AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(t){return t?e(t,null):e(null,"SUCCESS")}))},t.deleteUser=function(e,t){var n=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("DeleteUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:t},(function(t){return t?e(t,null):(n.clearCachedUser(),e(null,"SUCCESS"))}))},t.updateAttributes=function(e,t,n){var r=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return t(new Error("User is not authenticated"),null);this.client.request("UpdateUserAttributes",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),UserAttributes:e,ClientMetadata:n},(function(e,n){return e?t(e,null):r.getUserData((function(){return t(null,"SUCCESS",n)}),{bypassCache:!0})}))},t.getUserAttributes=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(t,n){if(t)return e(t,null);for(var r=[],i=0;i<n.UserAttributes.length;i++){var o={Name:n.UserAttributes[i].Name,Value:n.UserAttributes[i].Value},s=new F(o);r.push(s)}return e(null,r)}))},t.getMFAOptions=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()}
2,(function(t,n){return t?e(t,null):e(null,n.MFAOptions)}))},t.createGetUserRequest=function(){return this.client.promisifyRequest("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()})},t.refreshSessionIfPossible=function(e){var t=this;return void 0===e&&(e={}),new Promise((function(n){var r=t.signInUserSession.getRefreshToken();r&&r.getToken()?t.refreshSession(r,n,e.clientMetadata):n()}))},t.getUserData=function(e,t){var n=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return this.clearCachedUserData(),e(new Error("User is not authenticated"),null);var r=this.getUserDataFromCache();if(r)if(this.isFetchUserDataAndTokenRequired(t))this.fetchUserData().then((function(e){return n.refreshSessionIfPossible(t).then((function(){return e}))})).then((function(t){return e(null,t)})).catch(e);else try{return void e(null,JSON.parse(r))}catch(ie){return this.clearCachedUserData(),void e(ie,null)}else this.fetchUserData().then((function(t){e(null,t)})).catch(e)},t.getUserDataFromCache=function(){return this.storage.getItem(this.userDataKey)},t.isFetchUserDataAndTokenRequired=function(e){var t=(e||{}).bypassCache;return void 0!==t&&t},t.fetchUserData=function(){var e=this;return this.createGetUserRequest().then((function(t){return e.cacheUserData(t),t}))},t.deleteAttributes=function(e,t){var n=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return t(new Error("User is not authenticated"),null);this.client.request("DeleteUserAttributes",{UserAttributeNames:e,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(e){return e?t(e,null):n.getUserData((function(){return t(null,"SUCCESS")}),{bypassCache:!0})}))},t.resendConfirmationCode=function(e,t){var n={ClientId:this.pool.getClientId(),Username:this.username,ClientMetadata:t};this.client.request("ResendConfirmationCode",n,(function(t,n){return t?e(t,null):e(null,n)}))},t.getSession=function(e,t){if(void 0===t&&(t={}),null==this.username)return e(new Error("Username is null. Cannot retrieve a new session"),null);if(null!=this.signInUserSession&&this.signInUserSession.isValid())return e(null,this.signInUserSession);var n="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,r=n+".idToken",i=n+".accessToken",o=n+".refreshToken",s=n+".clockDrift";if(this.storage.getItem(r)){var a=new T({IdToken:this.storage.getItem(r)}),u=new O({AccessToken:this.storage.getItem(i)}),c=new k({RefreshToken:this.storage.getItem(o)}),l=parseInt(this.storage.getItem(s),0)||0,f=new D({IdToken:a,AccessToken:u,RefreshToken:c,ClockDrift:l});if(f.isValid())return this.signInUserSession=f,e(null,this.signInUserSession);if(!c.getToken())return e(new Error("Cannot retrieve a new session. Please authenticate."),null);this.refreshSession(c,e,t.clientMetadata)}else e(new Error("Local storage is missing an ID Token, Please authenticate"),null)},t.refreshSession=function(e,t,n){var r=this,i=this.pool.wrapRefreshSessionCallback?this.pool.wrapRefreshSessionCallback(t):t,o={};o.REFRESH_TOKEN=e.getToken();var s="CognitoIdentityServiceProvider."+this.pool.getClientId(),a=s+".LastAuthUser";if(this.storage.getItem(a)){this.username=this.storage.getItem(a);var u=s+"."+this.username+".deviceKey";this.deviceKey=this.storage.getItem(u),o.DEVICE_KEY=this.deviceKey}var c={ClientId:this.pool.getClientId(),AuthFlow:"REFRESH_TOKEN_AUTH",AuthParameters:o,ClientMetadata:n};this.getUserContextData()&&(c.UserContextData=this.getUserContextData()),this.client.request("InitiateAuth",c,(function(t,n){if(t)return"NotAuthorizedException"===t.code&&r.clearCachedUser(),i(t,null);if(n){var o=n.AuthenticationResult;return Object.prototype.hasOwnProperty.call(o,"RefreshToken")||(o.RefreshToken=e.getToken()),r.signInUserSession=r.getCognitoUserSession(o),r.cacheTokens(),i(null,r.signInUserSession)}}))},t.cacheTokens=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId(),t=e+"."+this.username+".idToken",n=e+"."+this.username+".accessToken",r=e+"."+this.username+".refreshToken",i=e+"."+this.username+".clockDrift",o=e+".LastAuthUser";this.storage.setItem(t,this.signInUserSession.getIdToken().getJwtToken()),this.storage.setItem(n,this.signInUserSession.getAccessToken().getJwtToken()),this.storage.setItem(r,this.signInUserSession.getRefreshToken().getToken()),this.storage.setItem(i,""+this.signInUserSession.getClockDrift()),this.storage.setItem(o,this.username)},t.cacheUserData=function(e){this.storage.setItem(this.userDataKey,JSON.stringify(e))},t.clearCachedUserData=function(){this.storage.removeItem(this.userDataKey)},t.clearCachedUser=function(){this.clearCachedTokens(),this.clearCachedUserData()}
2,t.cacheDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",n=e+".randomPasswordKey",r=e+".deviceGroupKey";this.storage.setItem(t,this.deviceKey),this.storage.setItem(n,this.randomPassword),this.storage.setItem(r,this.deviceGroupKey)},t.getCachedDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",n=e+".randomPasswordKey",r=e+".deviceGroupKey";this.storage.getItem(t)&&(this.deviceKey=this.storage.getItem(t),this.randomPassword=this.storage.getItem(n),this.deviceGroupKey=this.storage.getItem(r))},t.clearCachedDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",n=e+".randomPasswordKey",r=e+".deviceGroupKey";this.storage.removeItem(t),this.storage.removeItem(n),this.storage.removeItem(r)},t.clearCachedTokens=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId(),t=e+"."+this.username+".idToken",n=e+"."+this.username+".accessToken",r=e+"."+this.username+".refreshToken",i=e+".LastAuthUser",o=e+"."+this.username+".clockDrift";this.storage.removeItem(t),this.storage.removeItem(n),this.storage.removeItem(r),this.storage.removeItem(i),this.storage.removeItem(o)},t.getCognitoUserSession=function(e){var t=new T(e),n=new O(e),r=new k(e);return new D({IdToken:t,AccessToken:n,RefreshToken:r})},t.forgotPassword=function(e,t){var n={ClientId:this.pool.getClientId(),Username:this.username,ClientMetadata:t};this.getUserContextData()&&(n.UserContextData=this.getUserContextData()),this.client.request("ForgotPassword",n,(function(t,n){return t?e.onFailure(t):"function"==typeof e.inputVerificationCode?e.inputVerificationCode(n):e.onSuccess(n)}))},t.confirmPassword=function(e,t,n,r){var i={ClientId:this.pool.getClientId(),Username:this.username,ConfirmationCode:e,Password:t,ClientMetadata:r};this.getUserContextData()&&(i.UserContextData=this.getUserContextData()),this.client.request("ConfirmForgotPassword",i,(function(e){return e?n.onFailure(e):n.onSuccess("SUCCESS")}))},t.getAttributeVerificationCode=function(e,t,n){if(null==this.signInUserSession||!this.signInUserSession.isValid())return t.onFailure(new Error("User is not authenticated"));this.client.request("GetUserAttributeVerificationCode",{AttributeName:e,AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:n},(function(e,n){return e?t.onFailure(e):"function"==typeof t.inputVerificationCode?t.inputVerificationCode(n):t.onSuccess("SUCCESS")}))},t.verifyAttribute=function(e,t,n){if(null==this.signInUserSession||!this.signInUserSession.isValid())return n.onFailure(new Error("User is not authenticated"));this.client.request("VerifyUserAttribute",{AttributeName:e,Code:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(e){return e?n.onFailure(e):n.onSuccess("SUCCESS")}))},t.getDevice=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("GetDevice",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey},(function(t,n){return t?e.onFailure(t):e.onSuccess(n)}))},t.forgetSpecificDevice=function(e,t){if(null==this.signInUserSession||!this.signInUserSession.isValid())return t.onFailure(new Error("User is not authenticated"));this.client.request("ForgetDevice",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:e},(function(e){return e?t.onFailure(e):t.onSuccess("SUCCESS")}))},t.forgetDevice=function(e){var t=this;this.forgetSpecificDevice(this.deviceKey,{onFailure:e.onFailure,onSuccess:function(n){return t.deviceKey=null,t.deviceGroupKey=null,t.randomPassword=null,t.clearCachedDeviceKeyAndPassword(),e.onSuccess(n)}})},t.setDeviceStatusRemembered=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("UpdateDeviceStatus",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey,DeviceRememberedStatus:"remembered"},(function(t){return t?e.onFailure(t):e.onSuccess("SUCCESS")}))},t.setDeviceStatusNotRemembered=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("UpdateDeviceStatus",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey,DeviceRememberedStatus:"not_remembered"},(function(t){return t?e.onFailure(t):e.onSuccess("SUCCESS")}))},t.listDevices=function(e,t,n){if(null==this.signInUserSession||!this.signInUserSession.isValid())return n.onFailure(new Error("User is not authenticated"));var r={AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),Limit:e};t&&(r.PaginationToken=t),this.client.request("ListDevices",r,(function(e,t){return e?n.onFailure(e):n.onSuccess(t)}))},t.globalSignOut=function(e){var t=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("GlobalSignOut",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(n){return n?e.onFailure(n):(t.clearCachedUser(),e.onSuccess("SUCCESS"))}))},t.signOut=function(e){var t=this;
2e&&"function"==typeof e?this.getSession((function(n,r){if(n)return e(n);t.revokeTokens((function(n){t.cleanClientData(),e(n)}))})):this.cleanClientData()},t.revokeTokens=function(e){if(void 0===e&&(e=function(){}),"function"!=typeof e)throw new Error("Invalid revokeTokenCallback. It should be a function.");if(!this.signInUserSession)return e(new Error("User is not authenticated"));if(!this.signInUserSession.getAccessToken())return e(new Error("No Access token available"));var t=this.signInUserSession.getRefreshToken().getToken(),n=this.signInUserSession.getAccessToken();if(this.isSessionRevocable(n)&&t)return this.revokeToken({token:t,callback:e});e()},t.isSessionRevocable=function(e){if(e&&"function"==typeof e.decodePayload)try{return!!e.decodePayload().origin_jti}catch(ie){}return!1},t.cleanClientData=function(){this.signInUserSession=null,this.clearCachedUser()},t.revokeToken=function(e){var t=e.token,n=e.callback;this.client.requestWithRetry("RevokeToken",{Token:t,ClientId:this.pool.getClientId()},(function(e){if(e)return n(e);n()}))},t.sendMFASelectionAnswer=function(e,t){var n=this,r={};r.USERNAME=this.username,r.ANSWER=e;var i={ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:r,ClientId:this.pool.getClientId(),Session:this.Session};this.getUserContextData()&&(i.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",i,(function(r,i){return r?t.onFailure(r):(n.Session=i.Session,"SMS_MFA"===e?t.mfaRequired(i.ChallengeName,i.ChallengeParameters):"SOFTWARE_TOKEN_MFA"===e?t.totpRequired(i.ChallengeName,i.ChallengeParameters):void 0)}))},t.getUserContextData=function(){return this.pool.getUserContextData(this.username)},t.associateSoftwareToken=function(e){var t=this;null!=this.signInUserSession&&this.signInUserSession.isValid()?this.client.request("AssociateSoftwareToken",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(t,n){return t?e.onFailure(t):e.associateSecretCode(n.SecretCode)})):this.client.request("AssociateSoftwareToken",{Session:this.Session},(function(n,r){return n?e.onFailure(n):(t.Session=r.Session,e.associateSecretCode(r.SecretCode))}))},t.verifySoftwareToken=function(e,t,n){var r=this;null!=this.signInUserSession&&this.signInUserSession.isValid()?this.client.request("VerifySoftwareToken",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),UserCode:e,FriendlyDeviceName:t},(function(e,t){return e?n.onFailure(e):n.onSuccess(t)})):this.client.request("VerifySoftwareToken",{Session:this.Session,UserCode:e,FriendlyDeviceName:t},(function(e,t){if(e)return n.onFailure(e);r.Session=t.Session;var i={};i.USERNAME=r.username;var o={ChallengeName:"MFA_SETUP",ClientId:r.pool.getClientId(),ChallengeResponses:i,Session:r.Session};r.getUserContextData()&&(o.UserContextData=r.getUserContextData()),r.client.request("RespondToAuthChallenge",o,(function(e,t){return e?n.onFailure(e):(r.signInUserSession=r.getCognitoUserSession(t.AuthenticationResult),r.cacheTokens(),n.onSuccess(r.signInUserSession))}))}))},e}(),K=(n(21060),n(14716));function G(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Q(e,t)}function W(e){var t="function"==typeof Map?new Map:void 0;return W=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return H(e,arguments,$(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Q(n,e)},W(e)}function H(e,t,n){return H=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Q(i,n.prototype),i},H.apply(null,arguments)}
2function Q(e,t){return Q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Q(e,t)}function $(e){return $=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$(e)}var z=function(e){function t(t,n,r,i){var o;return(o=e.call(this,t)||this).code=n,o.name=r,o.statusCode=i,o}return G(t,e),t}(W(Error)),Y=function(){function e(e,t,n){this.endpoint=t||"https://cognito-idp."+e+".amazonaws.com/";var r=(n||{}).credentials;this.fetchOptions=r?{credentials:r}:{}}var t=e.prototype;return t.promisifyRequest=function(e,t){var n=this;return new Promise((function(r,i){n.request(e,t,(function(e,t){e?i(new z(e.message,e.code,e.name,e.statusCode)):r(t)}))}))},t.requestWithRetry=function(e,t,n){var r=this;(function(e,t,n){void 0===n&&(n=ee);return X(e,t,function(e){var t=100,n=100;return function(r){var i=Math.pow(2,r)*t+n*Math.random();return!(i>e)&&i}}(n))})((function(t){return new Promise((function(n,i){r.request(e,t,(function(e,t){e?i(e):n(t)}))}))}),[t],5e3).then((function(e){return n(null,e)})).catch((function(e){return n(e)}))},t.request=function(e,t,n){var r,i={"Content-Type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityProviderService."+e,"X-Amz-User-Agent":(0,K.Zm)(),"Cache-Control":"no-store"},o=Object.assign({},this.fetchOptions,{headers:i,method:"POST",mode:"cors",body:JSON.stringify(t)});fetch(this.endpoint,o).then((function(e){return r=e,e}),(function(e){if(e instanceof TypeError)throw new Error("Network error");throw e})).then((function(e){return e.json().catch((function(){return{}}))})).then((function(e){if(r.ok)return n(null,e);e;var t=(e.__type||e.code).split("#").pop(),i=new Error(e.message||e.Message||null);return i.name=t,i.code=t,n(i)})).catch((function(e){if(r&&r.headers&&r.headers.get("x-amzn-errortype"))try{var t=r.headers.get("x-amzn-errortype").split(":")[0],i=new Error(r.status?r.status.toString():null);return i.code=t,i.name=t,i.statusCode=r.status,n(i)}catch(o){return n(e)}else e instanceof Error&&"Network error"===e.message&&(e.code="NetworkError");return n(e)}))},e}(),Z={debug:function(){}},J=function(e){return e&&e.nonRetryable};function X(e,t,n,r){if(void 0===r&&(r=1),"function"!=typeof e)throw Error("functionToRetry must be a function");return Z.debug(e.name+" attempt #"+r+" with args: "+JSON.stringify(t)),e.apply(void 0,t).catch((function(i){if(Z.debug("error on "+e.name,i),J(i))throw Z.debug(e.name+" non retryable error",i),i;var o=n(r,t,i);if(Z.debug(e.name+" retrying in "+o+" ms"),!1!==o)return new Promise((function(e){return setTimeout(e,o)})).then((function(){return X(e,t,n,r+1)}));throw i}))}var ee=3e5;var te=function(){function e(e,t){var n=e||{},r=n.UserPoolId,i=n.ClientId,o=n.endpoint,s=n.fetchOptions,a=n.AdvancedSecurityDataCollectionFlag;if(!r||!i)throw new Error("Both UserPoolId and ClientId are required.");if(r.length>55||!/^[\w-]+_[0-9a-zA-Z]+$/.test(r))throw new Error("Invalid UserPoolId format.");var u=r.split("_")[0];this.userPoolId=r,this.clientId=i,this.client=new Y(u,o,s),this.advancedSecurityDataCollectionFlag=!1!==a,this.storage=e.Storage||(new V).getStorage(),t&&(this.wrapRefreshSessionCallback=t)}var t=e.prototype;return t.getUserPoolId=function(){return this.userPoolId},t.getUserPoolName=function(){return this.getUserPoolId().split("_")[1]},t.getClientId=function(){return this.clientId},t.signUp=function(e,t,n,r,i,o){var s=this,a={ClientId:this.clientId,Username:e,Password:t,UserAttributes:n,ValidationData:r,ClientMetadata:o};this.getUserContextData(e)&&(a.UserContextData=this.getUserContextData(e)),this.client.request("SignUp",a,(function(t,n){if(t)return i(t,null);var r={Username:e,Pool:s,Storage:s.storage},o={user:new q(r),userConfirmed:n.UserConfirmed,userSub:n.UserSub,codeDeliveryDetails:n.CodeDeliveryDetails};return i(null,o)}))},t.getCurrentUser=function(){var e="CognitoIdentityServiceProvider."+this.clientId+".LastAuthUser",t=this.storage.getItem(e);if(t){var n={Username:t,Pool:this,Storage:this.storage};return new q(n)}return null},t.getUserContextData=function(e){if("undefined"!=typeof AmazonCognitoAdvancedSecurityData){var t=AmazonCognitoAdvancedSecurityData;if(this.advancedSecurityDataCollectionFlag){var n=t.getData(e,this.userPoolId,this.clientId);if(n)return{EncodedData:n}}return{}}},e}(),ne=n(36808),re=function(){function e(e){if(void 0===e&&(e={}),e.domain&&(this.domain=e.domain),e.path?this.path=e.path:this.path="/",Object.prototype.hasOwnProperty.call(e,"expires")?this.expires=e.expires:this.expires=365,Object.prototype.hasOwnProperty.call(e,"secure")?this.secure=e.secure:this.secure=!0,Object.prototype.hasOwnProperty.call(e,"sameSite")){if(!["strict","lax","none"].includes(e.sameSite))throw new Error('The sameSite value of cookieStorage must be "lax", "strict" or "none".');if("none"===e.sameSite&&!this.secure)throw new Error("sameSite = None requires the Secure attribute in latest browser versions.");this.sameSite=e.sameSite}else this.sameSite=null}var t=e.prototype;return t.setItem=function(e,t){var n={path:this.path,expires:this.expires,domain:this.domain,secure:this.secure};return this.sameSite&&(n.sameSite=this.sameSite),ne.set(e,t,n),ne.get(e)},t.getItem=function(e){return ne.get(e)},t.removeItem=function(e){var t={path:this.path,expires:this.expires,domain:this.domain,secure:this.secure};return this.sameSite&&(t.sameSite=this.sameSite),ne.remove(e,t)},t.clear=function(){for(var e=ne.get(),t=Object.keys(e).length,n=0;n<t;++n)this.removeItem(Object.keys(e)[n]);return{}},e}()},79742:function(e,t){"use strict";t.byteLength=function(e){var t=a(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,o=a(e),s=o[0],u=o[1],c=new i(function(e,t,n){return 3*(t+n)/4-n}(0,s,u)),l=0,f=u>0?s-4:s;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===u&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[l++]=255&t);1===u&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],s=16383,a=0,c=r-i;a<c;a+=s)o.push(u(e,a,a+s>c?c:a+s));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
2+/",s=0;s<64;++s)n[s]=o[s],r[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,r){for(var i,o,s=[],a=t;a<r;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},48764:function(e,t,n){"use strict";var r=n(79742),i=n(80645),o=n(87300);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=d(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n);e=a(e,r);var i=e.write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|h(t.length);return 0===(e=a(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?a(e,0):d(e,t);if("Buffer"===t.type&&o(t.data))return d(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=a(e,t<0?0:0|h(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|h(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function h(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(e).length;default:if(r)return B(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return O(this,t,n);case"latin1":case"binary":return x(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var o,s=1,a=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var l=-1;for(o=n;o<a;
vendor: 6,642 bytes, line 2
2o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var f=!0,d=0;d<u;d++)if(c(e,o+d)!==c(t,d)){f=!1;break}if(f)return o}return-1}function b(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function w(e,t,n,r){return K(B(t,e.length-n),e,n,r)}function S(e,t,n,r){return K(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function C(e,t,n,r){return S(e,t,n,r)}function E(e,t,n,r){return K(q(t),e,n,r)}function _(e,t,n,r){return K(function(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)r=(n=e.charCodeAt(s))>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function I(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,u,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=f}return function(e){var t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=P));return n}(r)}t.lW=u,t.h2=50,u.TYPED_ARRAY_SUPPORT=void 0!==n.g.TYPED_ARRAY_SUPPORT?n.g.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}(),s(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return c(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return l(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return f(null,e)},u.allocUnsafeSlow=function(e){return f(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?I(this,0,e):g.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.h2;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),c=this.slice(r,i),l=e.slice(t,n),f=0;f<a;++f)if(c[f]!==l[f]){o=c[f],s=l[f];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return S(this,e,t,n);case"latin1":case"binary":return C(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var P=4096;function O(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function x(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function T(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=V(e[o]);return i}
vendor: 7,796 bytes, line 2
2function k(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function U(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function N(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function M(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(e,t,n,r,o){return o||M(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function j(e,t,n,r,o){return o||M(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||U(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||U(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||U(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||U(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||U(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||U(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||U(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||U(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||U(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||U(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||U(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||U(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||U(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||U(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||U(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||U(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||U(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||U(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return F(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return F(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return j(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return j(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=u.isBuffer(e)?e:B(new u(e,r).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var L=/[^+\/0-9A-Za-z-_]/g;function V(e){return e<16?"0"+e.toString(16):e.toString(16)}function B(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>
2-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function q(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}},87300:function(e){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},76489:function(e,t){"use strict";t.Q=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var r={},i=t||{},s=e.split(";"),a=i.decode||n,u=0;u<s.length;u++){var c=s[u],l=c.indexOf("=");if(!(l<0)){var f=c.substring(0,l).trim();if(null==r[f]){var d=c.substring(l+1,c.length).trim();'"'===d[0]&&(d=d.slice(1,-1)),r[f]=o(d,a)}}}return r},t.q=function(e,t,n){var o=n||{},s=o.encode||r;if("function"!=typeof s)throw new TypeError("option encode is invalid");if(!i.test(e))throw new TypeError("argument name is invalid");var a=s(t);if(a&&!i.test(a))throw new TypeError("argument val is invalid");var u=e+"="+a;if(null!=o.maxAge){var c=o.maxAge-0;if(isNaN(c)||!isFinite(c))throw new TypeError("option maxAge is invalid");u+="; Max-Age="+Math.floor(c)}if(o.domain){if(!i.test(o.domain))throw new TypeError("option domain is invalid");u+="; Domain="+o.domain}if(o.path){if(!i.test(o.path))throw new TypeError("option path is invalid");u+="; Path="+o.path}if(o.expires){if("function"!=typeof o.expires.toUTCString)throw new TypeError("option expires is invali
2d");u+="; Expires="+o.expires.toUTCString()}o.httpOnly&&(u+="; HttpOnly");o.secure&&(u+="; Secure");if(o.sameSite){switch("string"==typeof o.sameSite?o.sameSite.toLowerCase():o.sameSite){case!0:u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"strict":u+="; SameSite=Strict";break;case"none":u+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return u};var n=decodeURIComponent,r=encodeURIComponent,i=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function o(e,t){try{return t(e)}catch(n){return e}}},58875:function(e,t,n){var r;!function(){"use strict";var i=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:i,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:i&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:i&&!!window.screen};void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)}()},21060:function(e,t,n){"use strict";e.exports=n.g.fetch},9712:function(e,t){t.polyfill=e=>e},64022:function(e,t,n){"use strict";n.d(t,{ZP:function(){return x}});var r=n(64572),i=n(53131),o=n.n(i),s=n(18721),a=n.n(s),u=n(27361),c=n.n(u),l=n(64721),f=n.n(l),d=n(67294),h=n(85945),p=n(64469),g=n(69451),m=n(72721),y=n(2043),v=n.n(y),b=n(83253),w=n.n(b),S=n(87536);const C={content:{position:"relative",marginTop:"3rem",inset:0,top:0,left:0,right:0,bottom:0}};var E=()=>{const{0:e,1:t}=(0,d.useState)(!1),n=(0,h.NL)(),{0:r,1:i}=(0,d.useState)(void 0),{register:o,handleSubmit:s,watch:a,formState:{errors:u}}=(0,S.cI)(),c=(0,p.D)({mutationFn:async e=>{let{username:t,password:n}=e;return await m.g.signIn(t,n)},onSuccess:e=>{v().info({data:e},"LoginModal:submitLoginMutation onSuccess"),n.invalidateQueries({queryKey:["currentUser"]}),n.invalidateQueries({queryKey:["GetCart"]}),t(!1)},onError:e=>{v().error({err:e},"LoginModal:submitLoginMutation onError"),i(e)}}),l=()=>t(!1),f=void 0!==r?d.createElement("div",{className:"cell small-12 callout alert"},d.createElement("h3",null,"Login Error"),d.createElement("p",null,r.name),d.createElement("p",null,r.message)):null;return[d.createElement(w(),{isOpen:e,onRequestClose:l,contentLabel:"Login",aria:{modal:!0},ariaHideApp:!1,style:C},d.createElement("div",{className:"cell small-12 medium-8 medium-offset-2"},d.createElement("button",{className:"button transparent modal--close",onClick:l},d.createElement("i",{className:"fi-x","aria-hidden":"true"})," close"),d.createElement("form",{className:"grid-x grid-margin-x",onSubmit:s((e=>{let{username:t,password:n}=e;return c.mutate({username:t,password:n})}))},d.createElement("div",{className:"cell small-12"},d.createElement("label",null,"Username",d.createElement("input",Object.assign({},o("username",{required:!0}),{"aria-invalid":!!u.username||void 0,"aria-describedby":u.username?"login-username-error":void 0}))),u.username&&d.createElement("span",{id:"login-username-error",role:"alert"},"This field is required")),d.createElement("div",{className:"cell small-12 medium-6"},d.createElement("label",null,"Password",d.createElement("input",Object.assign({type:"password"},o("password",{required:!0}),{"aria-invalid":!!u.password||void 0,"aria-describedby":u.password?"login-password-error":void 0}))),u.password&&d.createElement("span",{id:"login-password-error",role:"alert"},"This field is required")),d.createElement("input",{type:"submit",value:"Login"}),f))),t]};function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const{Consumer:A,Provider:I}=d.createContext("authentication"),P=async()=>{const e=await m.g.currentCredentials(),{identityId:t}=e;let n;try{n=await m.g.currentAuthenticatedUser()}catch(s){}const i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({identityId:t},{username:(o=(o=n)||{}).username,isAdmin:f()(c()(o,["signInUserSession","accessToken","payload","cognito:groups"])||[],"admin"),isLoggedIn:a()(o,["attributes","sub"])});var o;return v().debug({User:i},"resolved user"),i},O=e=>{let{children:t}=e;const n=(0,h.NL)(),[r,i]=E(),s=o()(i,!0),a=(0,p.D)((async()=>m.g.signOut()),{onSuccess:()=>{v().debug("signed out successfully"),n.invalidateQueries({queryKey:["currentUser"]}),n.invalidateQueries({queryKey:["GetCart"]})}}),u=(0,g.a)(["currentUser"],P,{staleTime:6e4});return d.createElement(I,{value:{User:u,LoginModalRendered:r,handleLoginClick:s,logoutMutation:a}},t)};O.Consumer=A,O.Provider=O;var x={Consumer:A,Provider:O}},80552:function(e,t,n){"use strict";var r=n(64572),i=n(12297),o=n.n(i),s=n(63105),a=n.n(s),u=n(24350),c=n.n(u),l=n(27361),f=n.n(l),d=n(35161),h=n.n(d),p=n(9752
20),g=n.n(p),m=n(67294),y=n(20173),v=n(21268);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const S=m.createContext(void 0),{Consumer:C,Provider:E}=S;t.Z={Consumer:C,Provider:e=>{var t,n,r;let{children:i}=e;const{0:s,1:u}=(0,m.useState)(!1),l=(0,v.uZ)(),d=g()(h()(f()(l,["data","GetCart","Products"]),(e=>{let{Id:t}=e;return t}))),p=(0,y.nV)({Products:d.map((e=>({Id:e})))}),b=c()(null===(t=p.data)||void 0===t?void 0:t.Products,(e=>{let{Id:t}=e;return t})),S=h()(f()(l,["data","GetCart","Products"]),(e=>{let{Id:t,Quantity:n,PlantType:r}=e;const i=f()(b,t),o=((e,t)=>{if(!e)return 0;const{Price:n,PricePlugtrays:r}=e;switch(t){case"POT":case"COLLECTION":return n;case"PLUGTRAY":return r;default:throw new Error("invalid PlantType "+t)}})(i,r),s=o*n;return w(w({},i),{},{Id:t,Quantity:n,PlantType:r,UnitPrice:o,LinePrice:s})})),C=a()(S,(e=>{let{PlantType:t}=e;return"PLUGTRAY"===t})),_=a()(S,(e=>{let{PlantType:t}=e;return"POT"===t})),A=o()(h()(S,(e=>{let{LinePrice:t}=e;return t}))),I=o()(h()(C,(e=>{let{Quantity:t}=e;return t}))),P=o()(h()(_,(e=>{let{Quantity:t}=e;return t}))),O=null===(n=l.data)||void 0===n||null===(r=n.GetCart)||void 0===r?void 0:r.GiftCards;return m.createElement(E,{value:{Cart:l,CartProducts:p,ShowWidget:()=>{u(!0),setTimeout((()=>{u(!1)}),5e3)},WidgetVisible:s,SetWidgetVisible:u,Subtotal:A,PlugtrayCount:I,PotCount:P,CartProductsHydrated:S,GiftCards:O}},i)},Context:S}},57853:function(e,t,n){"use strict";n.d(t,{L:function(){return a},X:function(){return u}});var r=n(35161),i=n.n(r),o=n(67294),s=n(12527);const a=e=>{let{imageSrc:t,alt:n,headline:r,content:i,link:s,linkText:a,showLinkAsButton:u}=e,c="link";return u&&(c="button secondary"),o.createElement("div",{className:"teaser"},o.createElement("div",{className:"teaser--image"},o.createElement("img",{src:""+t,alt:n})),o.createElement("div",{className:"teaser--content"},r&&o.createElement("h2",null,r),o.createElement("p",null,i),o.createElement("p",null,o.createElement("a",{className:c,href:s},a))))},u=e=>{let{props:t}=e;return o.createElement("div",{className:"grid-x grid-margin-x grid-margin-y"},i()(t.edges,((e,t)=>{let{node:n}=e;return o.createElement("div",{key:t,className:"featured-content featured-content__no-image cell small-6"},o.createElement(s.Link,{to:"/blog/"+n.slug},o.createElement("h4",null,n.frontmatter.title),o.createElement("p",null,n.frontmatter.description)))})))}},80317:function(e,t,n){"use strict";n.d(t,{Z:function(){return Ae}});var r=n(67294),i=n(3905),o=n(32161),s=n(30819),a=n(30081),u=n(72379),c=n(89643);class l extends c.F{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||s._,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||function(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?null!=r?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.cache.remove(this)}setData(e,t){const n=(0,o.oE)(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),n}setState(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})}cancel(e){var t;const n=this.promise;return null==(t=this.retryer)||t.cancel(e),n?n.then(o.ZT).catch(o.ZT):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some((e=>!1!==e.options.enabled))}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some((e=>e.getCurrentResult().isStale))}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!(0,o.Kp)(this.state.dataUpdatedAt,e)}onFocus(){var e;const t=this.observers.find((e=>e.shouldFetchOnWindowFocus()));t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}onOnline(){var e;const t=this.observers.find((e=>e.shouldFetchOnReconnect()));t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter((t=>
2t!==e)),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,t){var n,r;if("idle"!==this.state.fetchStatus)if(this.state.dataUpdatedAt&&null!=t&&t.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return null==(i=this.retryer)||i.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}const s=(0,o.G9)(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},c=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>{if(s)return this.abortSignalConsumed=!0,s.signal}})};c(a);const l={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'")};var f;(c(l),null==(n=this.options.behavior)||n.onFetch(l),this.revertState=this.state,"idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(r=l.fetchOptions)?void 0:r.meta))&&this.dispatch({type:"fetch",meta:null==(f=l.fetchOptions)?void 0:f.meta});const d=e=>{var t,n,r,i;((0,u.DV)(e)&&e.silent||this.dispatch({type:"error",error:e}),(0,u.DV)(e))||(null==(t=(n=this.cache.config).onError)||t.call(n,e,this),null==(r=(i=this.cache.config).onSettled)||r.call(i,this.state.data,e,this));this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=(0,u.Mz)({fn:l.fetchFn,abort:null==s?void 0:s.abort.bind(s),onSuccess:e=>{var t,n,r,i;void 0!==e?(this.setData(e),null==(t=(n=this.cache.config).onSuccess)||t.call(n,e,this),null==(r=(i=this.cache.config).onSettled)||r.call(i,e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1):d(new Error(this.queryHash+" data is undefined"))},onError:d,onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){this.state=(t=>{var n,r;switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null!=(n=e.meta)?n:null,fetchStatus:(0,u.Kw)(this.options.networkMode)?"fetching":"paused",...!t.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:null!=(r=e.dataUpdatedAt)?r:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=e.error;return(0,u.DV)(i)&&i.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...t,error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),a.V.batch((()=>{this.observers.forEach((t=>{t.onQueryUpdate(e)})),this.cache.notify({query:this,type:"updated",action:e})}))}}var f=n(33989);class d extends f.l{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,t,n){var r;const i=t.queryKey,s=null!=(r=t.queryHash)?r:(0,o.Rm)(i,t);let a=this.get(s);return a||(a=new l({cache:this,logger:e.getLogger(),queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(a)),a}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter((t=>t!==e)),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){a.V.batch((()=>
2{this.queries.forEach((e=>{this.remove(e)}))}))}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,t){const[n]=(0,o.I6)(e,t);return void 0===n.exact&&(n.exact=!0),this.queries.find((e=>(0,o._x)(n,e)))}findAll(e,t){const[n]=(0,o.I6)(e,t);return Object.keys(n).length>0?this.queries.filter((e=>(0,o._x)(n,e))):this.queries}notify(e){a.V.batch((()=>{this.listeners.forEach((({listener:t})=>{t(e)}))}))}onFocus(){a.V.batch((()=>{this.queries.forEach((e=>{e.onFocus()}))}))}onOnline(){a.V.batch((()=>{this.queries.forEach((e=>{e.onOnline()}))}))}}var h=n(89886);class p extends f.l{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,t,n){const r=new h.m({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0});return this.add(r),r}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter((t=>t!==e)),this.notify({type:"removed",mutation:e})}clear(){a.V.batch((()=>{this.mutations.forEach((e=>{this.remove(e)}))}))}getAll(){return this.mutations}find(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find((t=>(0,o.X7)(e,t)))}findAll(e){return this.mutations.filter((t=>(0,o.X7)(e,t)))}notify(e){a.V.batch((()=>{this.listeners.forEach((({listener:t})=>{t(e)}))}))}resumePausedMutations(){var e;return this.resuming=(null!=(e=this.resuming)?e:Promise.resolve()).then((()=>{const e=this.mutations.filter((e=>
2e.state.isPaused));return a.V.batch((()=>e.reduce(((e,t)=>e.then((()=>t.continue().catch(o.ZT)))),Promise.resolve())))})).then((()=>{this.resuming=void 0})),this.resuming}}var g=n(15761),m=n(96474);function y(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,i,o,s;const a=null==(t=e.fetchOptions)||null==(n=t.meta)?void 0:n.refetchPage,u=null==(r=e.fetchOptions)||null==(i=r.meta)?void 0:i.fetchMore,c=null==u?void 0:u.pageParam,l="forward"===(null==u?void 0:u.direction),f="backward"===(null==u?void 0:u.direction),d=(null==(o=e.state.data)?void 0:o.pages)||[],h=(null==(s=e.state.data)?void 0:s.pageParams)||[];let p=h,g=!1;const m=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),y=(e,t,n,r)=>(p=r?[t,...p]:[...p,t],r?[n,...e]:[...e,n]),w=(t,n,r,i)=>{if(g)return Promise.reject("Cancelled");if(void 0===r&&!n&&t.length)return Promise.resolve(t);const o={queryKey:e.queryKey,pageParam:r,meta:e.options.meta};var s;s=o,Object.defineProperty(s,"signal",{enumerable:!0,get:()=>{var t,n;return null!=(t=e.signal)&&t.aborted?g=!0:null==(n=e.signal)||n.addEventListener("abort",(()=>{g=!0})),e.signal}});const a=m(o);return Promise.resolve(a).then((e=>y(t,r,e,i)))};let S;if(d.length)if(l){const t=void 0!==c,n=t?c:v(e.options,d);S=w(d,t,n)}else if(f){const t=void 0!==c,n=t?c:b(e.options,d);S=w(d,t,n,!0)}else{p=[];const t=void 0===e.options.getNextPageParam;S=!a||!d[0]||a(d[0],0,d)?w([],t,h[0]):Promise.resolve(y([],h[0],d[0]));for(let n=1;n<d.length;n++)S=S.then((r=>{if(!a||!d[n]||a(d[n],n,d)){const i=t?h[n]:v(e.options,r);return w(r,t,i)}return Promise.resolve(y(r,h[n],d[n]))}))}else S=w([]);return S.then((e=>({pages:e,pageParams:p})))}}}}function v(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}function b(e,t){return null==e.getPreviousPageParam?void 0:e.getPreviousPageParam(t[0],t)}var w=n(85945);const S=function(){return null};var C=n(12527),E=n(11349),_=n.n(E),A=n(27361),I=n.n(A),P=n(64022),O=n(35161),x=n.n(O),T=n(43063),k=n.n(T),U=n(63105),D=n.n(U),R=n(14841),N=n.n(R),M=n(80552),F=n(2043),j=n.n(F);var L=()=>{const{Cart:e,WidgetVisible:t,SetWidgetVisible:n,Subtotal:i,PlugtrayCount:o,PotCount:s,CartProductsHydrated:a,GiftCards:u}=(0,r.useContext)(M.Z.Context);j().debug({Cart:e,CartProductsHydrated:a,GiftCards:u},"got data from cart!");const c=(0,r.useRef)(null),l=e=>{c.current&&!c.current.contains(e.target)&&n(!1)};(0,r.useEffect)((()=>(document.addEventListener("mousedown",l),()=>{document.removeEventListener("mousedown",l)})));const{0:f,1:d}=(0,r.useState)(""),h=(0,r.useRef)(null);(0,r.useEffect)((()=>{if(!I()(e,["data","GetCart"]))return;const t=s+"|"+o;null!==h.current?h.current!==t&&(h.current=t,d("Cart updated: "+s+" plant"+(1===s?"":"s")+", "+o+" plug tray"+(1===o?"":"s"))):h.current=t}),[e,s,o]);const p=D()(a,{PlantType:"PLUGTRAY"}),g=k()(a,{PlantType:"PLUGTRAY"}),m=e=>{let{Id:t,CommonName:n,BotanicalName:i,Name:o,NamePlugtrays:s,Quantity:a,PlantType:u,UnitPrice:c}=e;return r.createElement("li",{key:t+"-"+u,className:"minicart--product "+("PLUGTRAY"==u?"minicart--product__plugtray":"minicart--product__pot")+" grid-x grid-padding-y"},r.createElement("p",{className:"cell small-10"},i&&r.createElement(r.Fragment,null,r.createElement("em",null,i),r.createElement("br",null)),n||o||s," ",(e=>{switch(e){case"POT":return"3-inch pot";case"PLUGTRAY":return"plug tray";case"COLLECTION":return"collection";default:throw new Error("invalid plant type "+e)}})(u)),r.createElement("p",{className:"minicart--product-quantity cell small-2"},r.createElement("strong",null,"$",c," ",r.createElement("br",null),"x",a)))};return r.createElement("li",{key:"cartWidget",ref:c},r.createElement("span",{className:"show-for-sr",role:"status","aria-atomic":"true"},f),r.createElement("button",{type:"button",className:"menu toggle "+(t?"open":"closed"),"aria-controls":"minicart","aria-expanded":t,onClick:()=>n(!t)},r.createElement("i",{className:"fi-shopping-cart","aria-hidden":"true"})," Your Cart"),r.createElement("ul",{className:"submenu",id:"minicart"},I()(e,["data","GetCart","Products"])?r.createElement(r.Fragment,null,o>0&&r.createElement("li",null,r.createElement("ul",null,r.createElement("h2",{className:"header__small-caps minicart--section-header"},"Plug trays"),x()(p,m))),g.length>0&&r.createElement("li",null,r.createElement("ul",null,r.createElement("h2",{className:"header__small-caps minicart--section-header"},"Pots"),x()(g,m))),u&&r.createElement("li",null,r.createElement("ul",null,r.createElement("h2",{className:"header__small-caps minicart--section-header"},"Gift cards"),x()(u,((e,t)=>
2{let{Id:n,RecipientName:i,Amount:o}=e;return r.createElement("li",{key:t+"-giftcard",className:"minicart--product grid-x grid-padding-y"},r.createElement("p",{className:"cell small-10"},"Gift card for ",i),r.createElement("p",{className:"minicart--product-quantity cell small-2"},r.createElement("strong",null,"$",o)))})))),r.createElement("li",{className:"minicart--summary"},r.createElement("p",{className:"minicart--subtotal"},"Subtotal ",r.createElement("span",null,(y=i,N()(y).toFixed(2)))),r.createElement("hr",null),r.createElement(C.Link,{to:"/app/cart",className:"button secondary minicart--checkout-button"},"View cart and check out"))):r.createElement("p",null,"Cart is empty!")));var y};const V=_().get();var B=()=>r.createElement(P.ZP.Consumer,null,(e=>{let{User:t,LoginModalRendered:n,handleLoginClick:i,logoutMutation:o}=e;return r.createElement("div",null,n,r.createElement("ul",{className:"menu dropdown"},r.createElement("li",{className:"site-nav--contact__mobile show-for-small-only"},r.createElement("p",null,r.createElement("i",{className:"fi-mail"}),r.createElement("a",{href:"mailto:[email protected]"},"Email us"))),(e=>{let{User:t,handleLoginClick:n,logoutMutation:i}=e,o=[];return I()(t,"data.username")?o.push(r.createElement("li",{key:"logout"},t.data.username,r.createElement("button",{type:"button",onClick:i.mutate},r.createElement("i",{className:"fi-eject","aria-hidden":"true"}),"Log out"))):V.loginEnabled&&o.push(r.createElement("li",{key:"login"},r.createElement("button",{type:"button",onClick:n},r.createElement("i",{className:"fi-torso","aria-hidden":"true"}),"Log in"))),I()(t,"data.isAdmin")&&o.push(r.createElement("li",{key:"admin"},r.createElement(C.Link,{to:"/app/admin"},r.createElement("i",{className:"fi-lock"}),"Admin Dashboard"))),o.push(r.createElement(L,{key:"cart"})),o})({User:t,handleLoginClick:i,logoutMutation:o})))})),q=n(74402);const K=()=>r.createElement(C.StaticQuery,{query:"3420822124",render:e=>1==e.allMdx.edges[0].node.frontmatter.show&&r.createElement("div",{className:"site-banner--message cell small-12 callout"},r.createElement(q.MDXRenderer,null,e.allMdx.edges[0].node.body))});K.defaultProps={data:void 0};var G=K;const W="859a24e43d545dc45ab25caba3b8384e0edf2e7c";var H=()=>r.createElement(r.Fragment,null,r.createElement("div",{className:"site-banner"},(0,E.isDev)()&&r.createElement("div",{className:"cell small-12 callout warning"},r.createElement("strong",null,"You are viewing a development version of this site."," ",r.createElement("a",{style:{color:"blue",textDecoration:"underline"},href:"https://mountainvalleygrowers.com"},"Click here to go to the production site.")),r.createElement("br",null),W?r.createElement("i",null,"Version: ",W):null),r.createElement("div",{className:"grid-container"},r.createElement("div",{className:"top-bar"},r.createElement("div",{className:"top-bar-left"},r.createElement("nav",{"aria-label":"Site switcher"},r.createElement("ul",{className:"menu"},r.createElement("li",{className:"current-item site-tab mvg","aria-current":"page"},r.createElement(C.Link,{to:"/"},"Mountain Valley Growers")),r.createElement("li",{className:"site-tab plugtrays"},r.createElement("a",{href:"https://www.plugtrays.com"},"Organic Plug Trays"))))),r.createElement("div",{className:"top-bar-right"},r.createElement(B,null))))),r.createElement(G,null));const Q=e=>{let t;try{t=e.data.node.frontmatter}catch(n){throw console.error({data:e},"got bum data!"),n}return j().debug({data:e},"summaryMarkup"),r.createElement("div",{className:"faimly--summary"},r.createElement(q.MDXRenderer,null,e.data.node.body))};var $=e=>{const t=(0,C.useStaticQuery)("372735709");let n;if(t)for(const r of t.allMdx.edges)r.node.frontmatter.family.toLowerCase()===e.family.toLowerCase()&&(n=r);if(!t||n)return r.createElement(Q,{data:n})},z=n(7334),Y=n.n(z),Z=n(11876),J=n(31304),X=n.n(J);const ee=(e,t)=>r.createElement(r.Fragment,{key:t},r.createElement("li",null,r.createElement(C.Link,{to:"/"+Y()(e.page)+"/"},e.name))),te=e=>{const t=(0,r.useRef)(null),{0:n,1:i}=(0,r.useState)(!1),o=e=>{t.current&&!t.current.contains(e.target)&&i(!1)};return(0,r.useEffect)((()=>(document.addEventListener("mousedown",o),()=>{document.removeEventListener("mousedown",o)}))),r.createElement("li",{key:"shop-all"},r.createElement("button",{className:"button clear menu toggle "+(!0===n?"open":"closed"),id:"mobile-menu","aria-controls":"mobile-menu","aria-expanded":n,onClick:()=>{i(!n)}},"Shop all organic plants"),r.createElement("div",{className:"submenu",role:"region","aria-labelledby":"mobile-menu"},r.createElement(Z.UQ,{allowZeroExpanded:!0,className:"nav__mobile--accordion"},x()(Object.keys(e),(t=>((e,t)=>{const n=t[e];return r.createElement(Z.Qd,{key:e},r.createElement(Z.Ol,null,r.createElement(Z.on,{key:"button"},r.createElement("i",{className:"fi-plus"}),n.meta.groupName)),r.createElement(Z.Mt,null,r.createElement("ul",null,x()(n.products,ee),n.meta.more&&r.createElement(C.Link,{key:"complete-list",className:"submenu--more",to:"/"+n.meta.more},"View complete list of organic ",n.meta.groupName))))})(t,e))))))},ne=()=>{const e=(0,C.useStaticQuery)("582016579").site.siteMetadata.siteCategories;return r.createElement(r.Fragment,null,r.createElement("ul",{className:"menu show-for-medium"},x()(Object.keys(e),(t=>((e,t)=>{const n=t[e],i=(0,r.useRef)(null),{0:o,1:s}=(0,r.useState)(!1),a=e=>{i.current&&!i.current.contains(e.target)&&s(!1)};return(0,r.useEffect)((()=>(document.addEventListener("mousedown",a),()=>{document.removeEventListener("mousedown",a)}))),r.createElement("li",{key:e,ref:i,className:"menu dropdown"},r.createElement("button",{className:"button clear menu toggle "+(!0===o?"open":"closed"),id:X()(Y()(e)),"aria-controls":X()(Y()(e)),"aria-expanded":o,onClick:()=>{s(!o)}},n.meta.groupName),r.createElement("div",{className:!0===n.meta.displayColumns?"submenu submenu__has-columns":"submenu",role:"region","aria-labelledby":X()(Y()(e))},r.createElement("ul",{className:n.meta.displayColumns?"submenu--columns":null},x()(n.products,ee)),n.meta.more&&r.createElement(C.Link,{className:"submenu--more",to:"/"+n.meta.more},"View complete list of organic ",n.meta.groupName)))})(t,e))),r.createElement("li",null,r.createElement(C.Link,{to:"/gift-cards"},"Gift cards"))),r.createElement("ul",{className:"menu show-for-small-only nav__mobile"},te(e)))};ne.defaultProps={wrapperElement:"span"};var re=ne,ie=n.p+"static/[email protected]",oe=n.p+"static/[email protected]";var se=()=>{const{0:e,1:t}=(0,r.useState)("");return r.createElement(r.Fragment,null,r.createElement("div",{className:"header grid-container"},r.createElement("div",{className:"grid-x grid-margin-x grid-padding-x align-bottom"},r.createElement("div",{className:"cell large-4 show-for-medium"},r.createElement("small",null,"Questions? Need help? Email us at [email protected]")),r.createElement("div",{className:"cell large-4"},r.createElement(C.Link,{to:"/",className:"logo"},r.createElement("img",{src:ie,srcSet:oe+" 2x",alt:"Mountain Valley Growers logo"}))),r.createElement("div",{className:"cell medium-8 medium-offset-2 large-4 large-offset-0"},r.createElement("form",{onSubmit:t=>{t.preventDefault(),(0,C.navigate)("/search/?q="+encodeURIComponent(e))}},r.createElement("div",{className:"input-group float-right"},r.createElement("input",{className:"input-group-field",type:"text",placeholder:"Search for plants","aria-label":"Search",name:"q",value:e,onCh
2ange:e=>t(e.target.value)}),r.createElement("div",{className:"input-group-button"},r.createElement("button",{className:"button secondary"},"Search"))))),r.createElement("nav",{className:"cell site-nav","aria-label":"main menu"},r.createElement(re,null)))))},ae=n.p+"static/[email protected]",ue=n.p+"static/[email protected]",ce=n.p+"static/[email protected]",le=n.p+"static/[email protected]";const fe=e=>{let{service:t}=e;return r.createElement("a",{href:t.link,target:"_blank",rel:"noopener noreferrer","aria-label":t.icon_alt_text},r.createElement("i",{className:"fi-social-"+t.name,"aria-hidden":"true"}))},de=e=>{let{linkData:t}=e;return r.createElement("li",null,"internal"===t.type&&r.createElement(C.Link,{to:t.link},t.text),"external"===t.type&&r.createElement("a",{href:t.link,target:"_blank",rel:"noopener noreferrer"},t.text),"email"===t.type&&r.createElement("a",{href:t.link},t.text))},he=e=>{let{componentText:t}=e;const{frontmatter:n}=t;return r.createElement("footer",null,r.createElement("div",{className:"footer--newsletter-bar"},r.createElement("div",{className:"grid-container"},r.createElement("div",{className:"grid-x grid-padding-y"},r.createElement("div",{className:"footer--newsletter-bar__content cell small-12"},r.createElement("p",null,r.createElement("i",{className:"fi-mail","aria-hidden":"true"})," ",r.createElement("a",{href:"https://admailemail.com/form/12641/1218/",target:"_blank",rel:"noopener noreferrer"},"Sign up for our newsletter to get garden tips and be notified of sales!")," ",r.createElement("em",null,"We'll never share, sell, or spam your email.")))))),r.createElement("div",{className:"grid-container"},r.createElement("div",{className:"grid-x"},r.createElement("div",{className:"cell small-12 medium-6 footer--logo-container"},r.createElement("img",{src:ae,srcSet:ue+" 2x",alt:"USDA certified organic logo",width:"100"}),r.createElement("img",{src:ce,srcSet:le+" 2x",alt:"Organic plants from Mountain Valley Growers",width:"200"})),r.createElement("div",{className:"cell small-12 medium-6"},r.createElement("div",{className:"footer--social"},n.social.map((e=>r.createElement(fe,{service:e,key:e.name})))),r.createElement("p",{className:"header__small-caps"},n.link_heading),r.createElement("ul",null,n.links.map(((e,t)=>r.createElement(de,{linkData:e,key:t}))))),r.createElement("div",{className:"cell small-12 footer--tagline"},r.createElement("p",null,r.createElement("small",null,"Growing USDA Certified Organic Herbs, Perennials, and Vegetables since 1985."))))),r.createElement("div",{className:"footer--copyright"},"© 1997 - ",(new Date).getFullYear(),", Mountain Valley Growers, Inc."),r.createElement("span",{itemProp:"brand",itemType:"https://schema.org/Organization",itemScope:!0,id:"mvg-org"},r.createElement("meta",{itemProp:"url",content:"https://mountainvalleygrowers.com"}),r.createElement("meta",{itemProp:"name",content:"Mountain Valley Growers"}),r.createElement("link",{itemProp:"sameAs",href:"https://www.pinterest.com/mvgorganic/"}),r.createElement("link",{itemProp:"sameAs",href:"https://www.instagram.com/mountainvalleygrowers/"})),r.createElement("span",{itemProp:"seller",itemType:"https://schema.org/Organization",itemScope:!0,id:"plugtrays-org"},r.createElement("link",{itemProp:"additionalType",href:"http://schema.org/WebSite"}),r.createElement("meta",{itemProp:"url",content:"https://plugtrays.com"}),r.createElement("meta",{itemProp:"name",content:"Organic Plug Trays"}),r.createElement("link",{itemProp:"sameAs",href:"https://www.pinterest.com/mvgorganic/"}),r.createElement("link",{itemProp:"sameAs",href:"https://www.instagram.com/mountainvalleygrowers/"})))};var pe=()=>{const e=(0,C.useStaticQuery)("1386216851");return r.createElement(he,{componentText:e.allMdx.edges[0].node})};var ge=e=>{let{align:t,alt:n,src:i,children:o}=e,s="plant-image";t&&(s+=" align-"+t);const a=null!=i&&i.startsWith("https://")?i:"../../images/"+i;return r.createElement("figure",{className:s},r.createElement("img",{src:a,alt:n}),o&&r.createElement("figcaption",null,o))};var me=e=>r.createElement("div",{className:"image-row image-row--items-"+e.children.length},e.children);const ye=e=>{let t;try{t=e.data.node.frontmatter}catch(n){throw console.error({data:e},"got bum data!"),n}return j().debug({data:e},"recipeMarkup"),r.createElement("div",{className:"recipe-card"},r.createElement("h2",{className:"recipe-card--title"},t.title),t.description&&r.createElement("p",{className:"recipe-card--description"},t.description),r.createElement("div",{className:"recipe-card--directions"},r.createElement(q.MDXRenderer,null,e.data.node.body)))};var ve=e=>{const t=(0,C.useStaticQuery)("2951372793");if(t){let n;for(const r of t.allMdx.edges)r.node.frontmatter.slug===e.slug&&(n=r);if(t&&!n)throw new Error("could not resolve recipe for item "+e.slug);return r.createElement(ye,{data:n})}},be=n(57853),we=n(60201);var Se=e=>{const{featuredProducts:t,headline:n,description:i,link:o,linkText:s,optionalAdditionalResourceLink:a,optionalAdditionalResourceText:u}=e;return r.createElement("div",{className:"featured-product--row"},r.createElement("div",{className:"grid-x"},r.createElement("div",{className:"cell small-12 medium-6 medium-offset-3"},n&&r.createElement("h3",null,n),i&&r.createElement("p",null,i))),r.createElement("div",{className:"grid-x grid-margin-x grid-margin-y"},x()(t,((e,t)=>
2{const{BotanicalName:n,CommonName:i,Name:o,Price:s,Slug:a}=e.node,u=(0,we.tD)(e.node.ImageHashes[0],we.VN);return r.createElement("div",{key:t,className:"cell small-12 medium-6 large-3 product-thumb--card"},r.createElement(C.Link,{to:"/organic-plants/"+a,className:"product-thumb--link__product"},r.createElement("div",{className:"product-thumb--image",style:{backgroundImage:"url("+u+")"}}),n?r.createElement("p",{className:"product-thumb--title"},r.createElement("em",null,n)," ",r.createElement("br",null),r.createElement("strong",null,i)):r.createElement("p",{className:"product-thumb--title"},r.createElement("strong",null,o)),r.createElement("div",null,r.createElement("p",{className:"product-thumb---price"},r.createElement("span",null,"$"),r.createElement("span",null,s),' / 3" pot'))))})),r.createElement("div",{className:"featured-product--resources cell small-12 medium-3"},r.createElement("p",null,r.createElement("strong",null,r.createElement(C.Link,{to:o},s))),a&&r.createElement("p",null,r.createElement("strong",null,r.createElement(C.Link,{to:a},u))))))},Ce=n(81084);const Ee=["BAD_USER_INPUT","UPS_SHIPPING_ERROR"],_e=new class{constructor(e={}){this.queryCache=e.queryCache||new d,this.mutationCache=e.mutationCache||new p,this.logger=e.logger||s._,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=g.j.subscribe((()=>{g.j.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())})),this.unsubscribeOnline=m.N.subscribe((()=>{m.N.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())})))}unmount(){var e,t;this.mountCount--,0===this.mountCount&&(null==(e=this.unsubscribeFocus)||e.call(this),this.unsubscribeFocus=void 0,null==(t=this.unsubscribeOnline)||t.call(this),this.unsubscribeOnline=void 0)}isFetching(e,t){const[n]=(0,o.I6)(e,t);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data}ensureQueryData(e,t,n){const r=(0,o._v)(e,t,n),i=this.getQueryData(r.queryKey);return i?Promise.resolve(i):this.fetchQuery(r)}getQueriesData(e){return this.getQueryCache().findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,n){const r=this.queryCache.find(e),i=null==r?void 0:r.state.data,s=(0,o.SE)(t,i);if(void 0===s)return;const a=(0,o._v)(e),u=this.defaultQueryOptions(a);return this.queryCache.build(this,u).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return a.V.batch((()=>this.getQueryCache().findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,n)]))))}getQueryState(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state}removeQueries(e,t){const[n]=(0,o.I6)(e,t),r=this.queryCache;a.V.batch((()=>{r.findAll(n).forEach((e=>{r.remove(e)}))}))}resetQueries(e,t,n){const[r,i]=(0,o.I6)(e,t,n),s=this.queryCache,u={type:"active",...r};return a.V.batch((()=>(s.findAll(r).forEach((e=>{e.reset()})),this.refetchQueries(u,i))))}cancelQueries(e,t,n){const[r,i={}]=(0,o.I6)(e,t,n);void 0===i.revert&&(i.revert=!0);const s=a.V.batch((()=>this.queryCache.findAll(r).map((e=>e.cancel(i)))));return Promise.all(s).then(o.ZT).catch(o.ZT)}invalidateQueries(e,t,n){const[r,i]=(0,o.I6)(e,t,n);return a.V.batch((()=>{var e,t;if(this.queryCache.findAll(r).forEach((e=>{e.invalidate()})),"none"===r.refetchType)return Promise.resolve();const n={...r,type:null!=(e=null!=(t=r.refetchType)?t:r.type)?e:"active"};return this.refetchQueries(n,i)}))}refetchQueries(e,t,n){const[r,i]=(0,o.I6)(e,t,n),s=a.V.batch((()=>this.queryCache.findAll(r).filter((e=>!e.isDisabled())).map((e=>{var t;return e.fetch(void 0,{...i,cancelRefetch:null==(t=null==i?void 0:i.cancelRefetch)||t,meta:{refetchPage:r.refetchPage}})}))));let u=Promise.all(s).then(o.ZT);return null!=i&&i.throwOnError||(u=u.catch(o.ZT)),u}fetchQuery(e,t,n){const r=(0,o._v)(e,t,n),i=this.defaultQueryOptions(r);void 0===i.retry&&(i.retry=!1);const s=this.queryCache.build(this,i);return s.isStaleByTime(i.staleTime)?s.fetch(i):Promise.resolve(s.state.data)}prefetchQuery(e,t,n){return this.fetchQuery(e,t,n).then(o.ZT).catch(o.ZT)}
2fetchInfiniteQuery(e,t,n){const r=(0,o._v)(e,t,n);return r.behavior=y(),this.fetchQuery(r)}prefetchInfiniteQuery(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(o.ZT).catch(o.ZT)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){const n=this.queryDefaults.find((t=>(0,o.yF)(e)===(0,o.yF)(t.queryKey)));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;const t=this.queryDefaults.find((t=>(0,o.to)(e,t.queryKey)));return null==t?void 0:t.defaultOptions}setMutationDefaults(e,t){const n=this.mutationDefaults.find((t=>(0,o.yF)(e)===(0,o.yF)(t.mutationKey)));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;const t=this.mutationDefaults.find((t=>(0,o.to)(e,t.mutationKey)));return null==t?void 0:t.defaultOptions}defaultQueryOptions(e){if(null!=e&&e._defaulted)return e;const t={...this.defaultOptions.queries,...this.getQueryDefaults(null==e?void 0:e.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=(0,o.Rm)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.useErrorBoundary&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return null!=e&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==e?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}({defaultOptions:{queries:{staleTime:6e4},mutations:{retry:(e,t)=>{var n,r;return t instanceof Ce.Yt&&Ee.includes(null==t||null===(n=t.errors[0])||void 0===n||null===(r=n.extensions)||void 0===r?void 0:r.code)?(j().warn({error:t},"queryClient: got BAD_USER_INPUT error, not retrying request"),!1):e<3}}}});var Ae=e=>{let{children:t}=e;const n={FamilySummary:$,Image:ge,ImageRow:me,Recipe:ve,FeaturedContent:be.X,FeaturedContentWithImage:be.L,FeaturedProducts:Se};return r.createElement(w.aH,{client:_e},r.createElement(P.ZP.Provider,null,r.createElement(M.Z.Provider,null,r.createElement("a",{className:"skip-link",href:"#main-content"},"Skip to main content"),r.createElement("header",{className:"site-header"},r.createElement(H,{siteTitle:"Mountain Valley Growers"}),r.createElement(se,null)),r.createElement("main",{id:"main-content",tabIndex:-1,className:"grid-container"},r.createElement(i.MDXProvider,{components:n},t)),r.createElement(pe,null),r.createElement(S,{initialIsOpen:!1}))))}},89764:function(e,t,n){"use strict";n.d(t,{Z:function(){return I}});var r=n(67294),i=n(12527),o=n(11349),s=n.n(o),a=n(53131),u=n.n(a),c=n(35161),l=n.n(c),f=n(21268),d=n(60201),h=n(2043),p=n.n(h);const g="USD",m=(e,t,n)=>n?e>0?"https://schema.org/InStock":t>0?"https://schema.org/PreOrder":"https://schema.org/OutOfStock":"https://schema.org/Discontinued",y=e=>e.BotanicalName&&e.CommonName?e.CommonName+" ("+e.BotanicalName+") Plant":e.Name?e.Name+" Plant":(p().error({product:e},"cannot generate product title. Product Requires CommonName/BotanicalName or Name. Falling back to returning Id where it should be text!"),e.Id+" Plant"),v=e=>{let{siteUrl:t,product:n}=e;const i=l()(n.ImageHashes,(e=>(0,d.tD)(e,d.h2.Medium))),o=t+"/organic-plants/"+n.Slug,s=y(n);let a=[{"@type":"Offer",name:s+" - 3 in. potted plant",url:o,priceCurrency:g,price:String(n.Price),itemCondition:"http://schema.org/NewCondition",availability:m(n.InStock,n.BackorderLimit,n.DisplayMVG)},{"@type":"Offer",name:s+" - 1 ct. Plugtray (128 potted plant plugs per tray)",url:o,priceCurrency:g,price:String(n.PricePlugtrays),itemCondition:"http://schema.org/NewCondition",availability:m(n.InStockPlugtrays,0,n.DisplayPlugtrays)}];return n.Type===f.kv.Collection&&(a=[{"@type":"Offer",name:s+" - Collection ("+n.CollectionProductCount+" - 3 in. potted plants)",url:o,priceCurrency:g,price:String(n.Price),itemCondition:"http://schema.org/NewCondition",availability:m(n.InStock,n.BackorderLimit,n.DisplayMVG)}]),r.createElement("script",{id:"product-ld",type:"application/ld+json",key:"product-ld"},JSON.stringify({"@context":"http://schema.org/","@type":"Product","@id":n.Id,name:s,url:o,sku:n.Id,mpn:n.Id,height:n.Height,image:i,description:n.Description,brand:{"@type":"Thing",name:"Mountain Valley Growers"},aggregateRating:{"@type":"AggregateRating",ratingValue:0,reviewCount:0},offers:a}))},b=(e,t,n)=>({"@type":"ListItem",position:n+1,name:y(t),url:e+"/organic-plants/"+t.Slug}),w=e=>{let{siteUrl:t,products:n,title:i}=e;return r.createElement("script",{id:"collection-ld",type:"application/ld+json"},JSON.stringify({"@context":"http://schema.org","@type":"CollectionPage",name:i,mainEntity:{"@type":"ItemList",itemListElement:l()(n,u()(b,t))}}))};var S=n(27361),C=n.n(S);const E="Mountain Valley Growers",_=e=>{let{siteUrl:t,product:n}=e;const i=y(n),o=t+"/organic-plants/"+n.Slug,s=(0,d.tD)(C()(n,["ImageHashes",0],d.Mo),d.h2.Medium);return r.createElement(r.Fragment,null,r.createElement("meta",{id:"name",itemProp:"name",content:i+" | "+E}),r.createElement("meta",{id:"description",itemProp:"description",content:n.Description}),r.createElement("meta",{id:"image",itemProp:"image",content:s}),r.createElement("meta",{id:"og-url",property:"og:url",content:o}),r.createElement("meta",{id:"og-type",property:"og:type",content:"website"}),r.createElement("meta",{id:"og-title",property:"og:title",content:i+" | "+E}),r.createElement("meta",{id:"og-description",property:"og:description",content:n.Description}),r.createElement("meta",{id:"og-image",property:"og:image",content:s}),r.createElement("meta",{id:"twitter-card",name:"twitter:card",content:"summary_large_image"}),r.createElement("meta",{id:"twitter-title",name:"twitter:title",content:i+" | "+E}),r.createElement("meta",{id:"twitter-description",name:"twitter:description",content:n.Description}),r.createElement("meta",{id:"twitter-image",name:"twitter:image",content:s}))},A=s().get();var I=e=>{const{children:t,includeAcceptJS:n}=e,o=(0,i.useStaticQuery)("806557615").site.siteMetadata,s=o.siteUrl,a=e.title||o.title,u=(e.description||o.description,n?r.createElement(i.Script,{id:"acceptjs",src:A.authorizeAcceptJsUrl,key:"acceptjs"}):void 0);let c;return e.product&&(c=r.createElement(r.Fragment,{key:"product-jsonld"},r.createElement(v,{siteUrl:s,product:e.product}),r.createElement(_,{siteUrl:s,product:e.product}
2))),e.products&&(c=r.createElement(r.Fragment,{key:"collection-products-jsonld"},r.createElement(w,{siteUrl:s,products:e.products,title:a}))),r.createElement(r.Fragment,null,r.createElement("title",null,a),r.createElement("meta",{name:"robots",content:"all"}),u,t,c,r.createElement(i.Script,{key:"gtag",id:"gtag",src:"https://www.googletagmanager.com/gtag/js?id="+A.googleTag}),r.createElement(i.Script,{key:"gtag-init",id:"gtag:init"},"window.dataLayer = window.dataLayer || [];\nfunction gtag(){dataLayer.push(arguments);}\ngtag('js', new Date());\n \ngtag('config', '"+A.googleTag+"');"))}},81084:function(e,t,n){"use strict";n.d(t,{Yt:function(){return oe},rQ:function(){return se}});for(var r=n(44925),i=n(64572),o=n(94578),s=n(52146),a=n(35161),u=n.n(a),c=n(72721),l=(n(23477),c.g),f=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},d={clockOffset:0,getDateWithClockOffset:function(){return d.clockOffset?new Date((new Date).getTime()+d.clockOffset):new Date},getClockOffset:function(){return d.clockOffset},getHeaderStringFromDate:function(e){return void 0===e&&(e=d.getDateWithClockOffset()),e.toISOString().replace(/[:\-]|\.\d{3}/g,"")},getDateFromHeaderString:function(e){var t=f(e.match(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2}).+/),7),n=t[1],r=t[2],i=t[3],o=t[4],s=t[5],a=t[6];return new Date(Date.UTC(Number(n),Number(r)-1,Number(i),Number(o),Number(s),Number(a)))},isClockSkewed:function(e){return Math.abs(e.getTime()-d.getDateWithClockOffset().getTime())>=3e5},isClockSkewError:function(e){if(!e.response||!e.response.headers)return!1;var t=e.response.headers;return Boolean(["BadRequestException","InvalidSignatureException"].includes(t["x-amzn-errortype"])&&(t.date||t.Date))},setClockOffset:function(e){d.clockOffset=e}},h=function(e){return Object.keys(e).map((function(e){return e.toLowerCase()})).sort().join(";")},p="X-Amz-Date",g="X-Amz-Security-Token",m="host",y=p.toLowerCase(),v=g.toLowerCase(),b="aws4_request",w="AWS4-HMAC-SHA256",S=function(e){var t,n,r=e.credentials,i=e.signingDate,o=void 0===i?new Date:i,s=e.signingRegion,a=e.signingService,u=e.uriEscapePath,c=void 0===u||u,l=r.accessKeyId,f=r.secretAccessKey,d=r.sessionToken,h=function(e){var t=e.toISOString().replace(/[:\-]|\.\d{3}/g,"");return{longDate:t,shortDate:t.slice(0,8)}}(o),p=h.longDate,g=h.shortDate;return{accessKeyId:l,credentialScope:(t=s,n=a,"".concat(g,"/").concat(t,"/").concat(n,"/").concat(b)),longDate:p,secretAccessKey:f,sessionToken:d,shortDate:g,signingRegion:s,signingService:a,uriEscapePath:c}},C=n(41938),E={},_={},A=0;A<256;A++){var I=A.toString(16).toLowerCase();1===I.length&&(I="0"+I),E[A]=I,_[I]=A}var P=function(e,t){var n=new C.Sha256(e);return n.update(t),n.digestSync()},O=function(e,t){return function(e){for(var t="",n=0;n<e.byteLength;n++)t+=E[e[n]];return t}(P(e,t))},x=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},T=function(e){return Object.entries(e).map((function(e){var t,n=x(e,2),r=n[0],i=n[1];return{key:r.toLowerCase(),value:null!==(t=null==i?void 0:i.trim().replace(/\s+/g," "))&&void 0!==t?t:""}})).sort((function(e,t){return e.key<t.key?-1:1})).map((function(e){return"".concat(e.key,":").concat(e.value,"\n")})).join("")},k=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},U=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,D)},D=function(e){return"%".concat(e.charCodeAt(0).toString(16).toUpperCase())},R=function(e,t){return void 0===t&&(t=!0),e?t?encodeURIComponent(e).replace(/%2F/g,"/"):e:"/"},N=function(e){return null==e?"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855":M(e)?O(null,e):"UNSIGNED-PAYLOAD"},M=function(e){return"string"==typeof e||ArrayBuffer.isView(e)||F(e)},F=function(e){return"function"==typeof ArrayBuffer&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e)},j=function(e,t){var n=t.credentialScope,r=t.longDate,i=t.secretAccessKey,o=t.shortDate,s=t.signingRegion,a=t.signingService,u=function(e,t){var n,r=e.body,i=e.headers,o=e.method,s=e.url;return void 0===t&&(t=!0),[o,R(s.pathname,t),(n=s.searchParams,Array.from(n).sort((function(e,t){var n=k(e,2),r=n[0],i=n[1],o=k(t,2),s=o[0],a=o[1];return r===s?i<a?-1:1:r<s?-1:1})).map((function(e){var t=k(e,2),n=t[0],r=t[1];return"".concat(U(n),"=").concat(U(r))})).join("&")),T(i),h(i),N(r)].join("\n")}(e,t.uriEscapePath),c=function(e,t,n){return[w,e,t,n].join("\n")}(r,n,O(null,u)),l=O(function(e,t,n,r){var i="".concat("AWS4").concat(e),o=P(i,t),s=P(o,n),a=P(s,r);return P(a,b)}(i,o,s,a),c);return l},L=function(){return L=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},L.apply(this,arguments)},V=function(){return V=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},V.apply(this,arguments)},B=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},q=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},K=function(){return K=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},K.apply(this,arguments)},G=/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com(.cn)?$/,W=function(){function e(){}return e.sign=function(e,t,n){if(e.headers=e.headers||{},e.body&&!e.data)throw new Error('The attribute "body" was found on the request object. Please use the attribute "data" instead.');var r=K(K({},e),{body:e.data,url:new URL(e.url)}),i=function(e,t){var n=S(t),r=n.accessKeyId,i=n.credentialScope,o=n.longDate,s=n.sessionToken,a=L({},e.headers);a[m]=e.url.host,a[y]=o,s&&(a[v]=s);var u=L(L({},e),{headers:a}),c=j(u,n),l="Credential=".concat(r,"/").concat(i),f="SignedHeaders=".concat(h(a)),d="Signature=".concat(c);return a.authorization="".concat(w," ").concat(l,", ").concat(f,", ").concat(d),u}(r,H(r,t,n));return i.url=i.url.toString(),i.headers.Authorization=i.headers.authorization,i.headers["X-Amz-Security-Token"]=i.headers["x-amz-security-token"],delete i.headers.authorization,delete i.headers["x-amz-security-token"],i},e.signUrl=function(e,t,n,r){var i="object"==typeof e?e.url:e,o="object"==typeof e?e.method:"GET",s={body:"object"==typeof e?e.body:void 0,method:o,url:new URL(i)},a=H(s,t,n,r),u=function(e,t){var n,r,i,o,s=e.body,a=e.method,u=void 0===a?"GET":a,c=e.url,l=t.expiration,f=B(t,["expiration"]),d=S(f),h=d.accessKeyId,y=d.credentialScope,v=d.longDate,b=d.sessionToken,C=new URL(c);Object.entries(V(V((n={},n["X-Amz-Algorithm"]=w,n["X-Amz-Credential"]="".concat(h,"/").concat(y),n[p]=v,n["X-Amz-SignedHeaders"]=m,n),l&&(r={},r["X-Amz-Expires"]=l.toString(),r)),b&&(i={}
2,i[g]=b,i))).forEach((function(e){var t=q(e,2),n=t[0],r=t[1];C.searchParams.append(n,r)}));var E={body:s,headers:(o={},o[m]=c.host,o),method:u,url:C},_=j(E,d);return C.searchParams.append("X-Amz-Signature",_),C}(s,a);return t.session_token&&!$(a.signingService)&&u.searchParams.append(g,t.session_token),u.toString()},e}(),H=function(e,t,n,r){var i=null!=t?t:{},o=i.access_key,s=i.secret_key,a=i.session_token,u=Q(e.url),c=u.region,l=u.service,f=null!=n?n:{},h=f.region,p=void 0===h?c:h,g=f.service,m=void 0===g?l:g,y=K({accessKeyId:o,secretAccessKey:s},$(m)?{sessionToken:a}:{});return K({credentials:y,signingDate:d.getDateWithClockOffset(),signingRegion:p,signingService:m},r&&{expiration:r})},Q=function(e){var t,n=(null!==(t=e.host.match(G))&&void 0!==t?t:[]).slice(1,3);return"es"===n[1]&&(n=n.reverse()),{service:n[0],region:n[1]}},$=function(e){return"iotdevicegateway"!==e},z=n(8575),Y=n(2043),Z=n.n(Y),J=n(21060),X=n.n(J),ee=n(11349);const te=["search"];function ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ie=ee.get();let oe=function(e){function t(t){var n,r,i;let{data:o,errors:s}=t;return(i=e.call(this,(null===(n=s[0])||void 0===n||null===(r=n.extensions)||void 0===r?void 0:r.code)||"UNKNOWN_ERROR")||this).name="AcornGraphqlError",i.errors=s,i.data=o,i}return(0,o.Z)(t,e),t.prototype.toString=function(){return u()(this.errors,(e=>{let{message:t,extensions:n}=e;return(null==n?void 0:n.code)+": "+t})).join(", ")},t}((0,s.Z)(Error));const se=(e,t,n)=>async()=>{const n=await(async(e,t)=>{const n=await ae(ie.grahpqlApiCdnSigningHost,{query:e,variables:t});delete n.headers.host;const r=await X()(ie.graphqlApiCdn,{method:"POST",headers:re(re({},n.headers),{},{"Content-Type":"application/json"}),body:n.data});if(!r.ok)throw Z().warn({result:r},"Non-ok result code from fetch call"),new Error("Unexpected response code from server: "+r.status+": "+r.statusText+".");const i=await r.json();if("errors"in i)throw Z().warn({bodyJson:i},"fetchFromGraphql: got errors in Graphql response from server"),new oe(i);return i})(e,t);return n.data},ae=async(e,t)=>{const n=z.Qc(e,!0,!0),{search:i}=n,o=(0,r.Z)(n,te),s=z.WU(re(re({},o),{},{query:re({},o.query)})),a=await l.currentCredentials(),u=await l.essentialCredentials(a);let c={headers:{},data:JSON.stringify(t),method:"POST",url:s};const f={secret_key:u.secretAccessKey,access_key:u.accessKeyId,session_token:u.sessionToken},d={region:ie.region,service:"execute-api"};return await W.sign(c,f,d)}},21268:function(e,t,n){"use strict";n.d(t,{$s:function(){return O},$w:function(){return $},BF:function(){return M},Cd:function(){return j},Dd:function(){return h},F7:function(){return z},LX:function(){return s},Ls:function(){return b},Rb:function(){return w},VF:function(){return q},Vr:function(){return T},Y0:function(){return g},bZ:function(){return f},ir:function(){return I},j0:function(){return H},kZ:function(){return y},kv:function(){return a},o$:function(){return R},uZ:function(){return C},uz:function(){return U},w2:function(){return V},x7:function(){return _},zw:function(){return G}});var r=n(64469),i=n(69451),o=n(81084);let s=function(e){return e.Collection="COLLECTION",e.Plugtray="PLUGTRAY",e.Pot="POT",e}({}),a=function(e){return e.Collection="COLLECTION",e.Plant="PLANT",e}({});const u="\n fragment CoreCartFieldsV1 on Cart {\n Products {\n Id\n Quantity\n PlantType\n }\n Shipping {\n FirstName\n LastName\n Address\n Address2\n City\n State\n Zip\n Phone\n Email\n }\n Billing {\n FirstName\n LastName\n Address\n Address2\n City\n State\n Zip\n Phone\n Email\n }\n Payment {\n Token\n }\n ShippingService {\n shippingService {\n DaysInTransit\n DeliveryTime\n Price\n ServiceCode\n }\n DeliveryInstructions\n IsGift\n GiftMessage\n WaiveWarranty\n }\n GiftCards {\n Index\n RecipientName\n RecipientEmail\n SenderName\n Amount\n Message\n }\n GiftCardRedemptions {\n Id\n Balance\n }\n WaiveWarranty\n WaiveWarrantyPlugtrays\n}
2\n ",c="\n fragment CoreCheckoutFieldsV1 on CheckoutResult {\n OrderId\n Errors\n Status\n Total\n Tax\n Subtotal\n GiftCardSubtotal\n WarrantyValid\n PaymentRequired\n GiftCardBalanceAvailable\n GiftCardRedemptionsTotal\n TotalToCharge\n PotCount\n PlugtrayCount\n Cart {\n Products {\n Id\n Quantity\n Status\n QuantityValidated\n QuantityBackorder\n CommonName\n BotanicalName\n NamePlugtrays\n Name\n PricePlugtrays\n Price\n Slug\n PlantType\n LineSubtotal\n PotCount\n PlugtrayCount\n ImageHashes\n }\n Shipping {\n FirstName\n LastName\n Address\n Address2\n City\n State\n Zip\n Phone\n Email\n }\n Billing {\n FirstName\n LastName\n Address\n Address2\n City\n State\n Zip\n Phone\n Email\n }\n Payment {\n Token\n }\n ShippingService {\n shippingService {\n DaysInTransit\n DeliveryTime\n Price\n ServiceCode\n }\n DeliveryInstructions\n IsGift\n GiftMessage\n WaiveWarranty\n }\n GiftCards {\n Index\n RecipientName\n RecipientEmail\n SenderName\n Amount\n Message\n }\n GiftCardRedemptions {\n Id\n Balance\n }\n }\n Storefront\n WaiveWarranty\n WaiveWarrantyPlugtrays\n MeetsMinimums\n BoxSpaceRemainingPots\n}\n ",l="\n mutation addCartGiftCard($GiftCard: GiftCardInput!) {\n AddCartGiftCard(GiftCard: $GiftCard) {\n ...CoreCartFieldsV1\n }\n}\n "+u,f=e=>(0,r.D)(["addCartGiftCard"],(e=>(0,o.rQ)(l,e)()),e),d="\n mutation checkout($Review: Boolean!) {\n CheckoutV1(Review: $Review, Storefront: MVG) {\n ...CoreCheckoutFieldsV1\n }\n}\n "+c,h=e=>(0,r.D)(["checkout"],(e=>(0,o.rQ)(d,e)()),e),p="\n query checkoutV1Review {\n CheckoutV1Review(Storefront: MVG) {\n ...CoreCheckoutFieldsV1\n }\n}\n "+c,g=(e,t)=>(0,i.a)(void 0===e?["checkoutV1Review"]:["checkoutV1Review",e],(0,o.rQ)(p,e),t),m="\n query checkoutV1ReviewShippingFinalized {\n CheckoutV1Review(Storefront: MVG, ShippingFinalized: true) {\n ...CoreCheckoutFieldsV1\n }\n}\n "+c,y=(e,t)=>(0,i.a)(void 0===e?["checkoutV1ReviewShippingFinalized"]:["checkoutV1ReviewShippingFinalized",e],(0,o.rQ)(m,e),t),v="\n query checkoutV1ReviewWithWarrantyStates {\n CheckoutV1Review(Storefront: MVG) {\n ...CoreCheckoutFieldsV1\n }\n GetWarrantyStatesV1 {\n WarrantyStates\n WaiverRequiredStates\n }\n}\n "+c,b=(e,t)=>(0,i.a)(void 0===e?["checkoutV1ReviewWithWarrantyStates"]:["checkoutV1ReviewWithWarrantyStates",e],(0,o.rQ)(v,e),t),w=e=>(0,r.D)(["createProductNotificationV1"],(e=>(0,o.rQ)("\n mutation createProductNotificationV1($Id: String!, $Email: String!, $PlantType: PlantType!) {\n CreateProductNotificationV1(Id: $Id, Email: $Email, PlantType: $PlantType)\n}\n ",e)()),e),S="\n query GetCart {\n GetCart {\n ...CoreCartFieldsV1\n }\n}\n "+u,C=(e,t)=>(0,i.a)(void 0===e?["GetCart"]:["GetCart",e],(0,o.rQ)(S,e),t),E="\n query GetMyOrders {\n GetMyOrders {\n Products {\n Id\n Quantity\n Status\n QuantityValidated\n PricePlugtrays\n NamePlugtrays\n }\n ShippingService {\n shippingService {\n DaysInTransit\n DeliveryTime\n Price\n ServiceCode\n }\n DeliveryInstructions\n IsGift\n GiftMessage\n WaiveWarranty\n }\n Shipping {\n FirstName\n LastName\n Address\n Address2\n City\n State\n Zip\n Phone\n Email\n }\n Billing {\n FirstName\n LastName\n Address\n Address2\n City\n State\n Zip\n Phone\n Email\n }\n Payment {\n Token\n }\n Id\n PaymentAuthorization {\n ResponseCode\n }\n SourceIp\n Status\n Subtotal\n Tax\n TimestampCreated\n Total\n UserId\n }\n}\n ",_=(e,t)=>(0,i.a)(void 0===e?["GetMyOrders"]:["GetMyOrders",e],(0,o.rQ)(E,e),t),A="\n query getOrder($Id: String!) {\n GetOrder(Id: $Id) {\n ...CoreOrderFieldsV1\n }\n}\n \n fragment CoreOrderFieldsV1 on Order {\n Products {\n Id\n Quantity\n Status\n QuantityValidated\n PricePlugtrays\n NamePlugtrays\n }\n ShippingService {\n shippingService {\n DaysInTransit\n DeliveryTime\n Price\n ServiceCode\n }\n DeliveryInstructions\n IsGift\n GiftMessage\n WaiveWarranty\n }\n Shipping {\n FirstName\n LastName\n Address\n Address2\n City\n State\n Zip\n Phone\n Email\n }\n Billing {\n FirstName\n LastName\n Address\n Address2\n City\n State\n Zip\n Phone\n Email\n }\n Payment {\n Token\n }\n Id\n PaymentAuthorization {\n ResponseCode\n }\n SourceIp\n Status\n Subtotal\n GiftCardSubtotal\n Tax\n TimestampCreated\n Total\n UserId\n InvoiceId\n WarrantyValid\n GiftCards {\n Index\n RecipientName\n RecipientEmail\n SenderName\n Amount\n Message\n }\n}\n ",I=(e,t)=>(0,i.a)(["getOrder",e],(0,o.rQ)(A,e),t),P="\n query getShippingOptions($Address: GetShippingAddressInput!, $PlugtrayCount: Int!, $PotCount: Int!) {\n GetShippingOptions(\n Address: $Address\n PlugtrayCount: $PlugtrayCount\n PotCount: $PotCount\n ) {\n DaysInTransit\n DeliveryTime\n Price\n PriceCurrency\n ServiceCode\n BillingWeight\n }\n}\n ",O=(e,t)=>(0,i.a)(["getShippingOptions",e],(0,o.rQ)(P,e),t),x="\n mutation redeemGiftCard($Id: String!, $Pin: String!) {\n RedeemGiftCard(Id: $Id, Pin: $Pin) {\
2n GiftCardRedemptions {\n Id\n }\n }\n CheckoutV1(Review: true, Storefront: MVG) {\n ...CoreCheckoutFieldsV1\n }\n}\n "+c,T=e=>(0,r.D)(["redeemGiftCard"],(e=>(0,o.rQ)(x,e)()),e),k="\n mutation removeGiftCardCheckout($Index: Int!) {\n RemoveCartGiftCard(Index: $Index) {\n GiftCards {\n Index\n }\n }\n CheckoutV1(Review: true, Storefront: MVG) {\n ...CoreCheckoutFieldsV1\n }\n}\n "+c,U=e=>(0,r.D)(["removeGiftCardCheckout"],(e=>(0,o.rQ)(k,e)()),e),D="\n mutation removeGiftCardToRedeem($Index: Int!) {\n RemoveGiftCardToRedeem(Index: $Index) {\n GiftCardRedemptions {\n Id\n }\n }\n CheckoutV1(Review: true, Storefront: MVG) {\n ...CoreCheckoutFieldsV1\n }\n}\n "+c,R=e=>(0,r.D)(["removeGiftCardToRedeem"],(e=>(0,o.rQ)(D,e)()),e),N="\n mutation saveCartBillingOnly($FirstName: String!, $LastName: String!, $Address: String!, $Address2: String, $City: String!, $State: String!, $Zip: String!, $Phone: String!, $Email: String!, $CreateAccountPassword: String) {\n SaveCart(\n Billing: {FirstName: $FirstName, LastName: $LastName, Address: $Address, Address2: $Address2, City: $City, State: $State, Zip: $Zip, Phone: $Phone, Email: $Email}\n CreateAccount: {Password: $CreateAccountPassword}\n ) {\n Products {\n Id\n Quantity\n }\n }\n CheckoutV1(Review: true, Storefront: MVG) {\n ...CoreCheckoutFieldsV1\n }\n}\n "+c,M=e=>(0,r.D)(["saveCartBillingOnly"],(e=>(0,o.rQ)(N,e)()),e),F="\n mutation saveCartBillingPayment($FirstName: String!, $LastName: String!, $Address: String!, $Address2:
2String, $City: String!, $State: String!, $Zip: String!, $Phone: String!, $Email: String!, $Token: String!, $CreateAccountPassword: String) {\n SaveCart(\n Billing: {FirstName: $FirstName, LastName: $LastName, Address: $Address, Address2: $Address2, City: $City, State: $State, Zip: $Zip, Phone: $Phone, Email: $Email}\n Payment: {Token: $Token}\n CreateAccount: {Password: $CreateAccountPassword}\n ) {\n Products {\n Id\n Quantity\n }\n }\n CheckoutV1(Review: true, Storefront: MVG) {\n ...CoreCheckoutFieldsV1\n }\n}\n "+c,j=e=>(0,r.D)(["saveCartBillingPayment"],(e=>(0,o.rQ)(F,e)()),e),L="\n mutation saveCartShipping($DaysInTransit: String, $DeliveryTime: String, $Price: Float, $ServiceCode: String, $DeliveryInstructions: String, $IsGift: Boolean, $GiftMessage: String) {\n SaveCart(\n ShippingService: {shippingService: {DaysInTransit: $DaysInTransit, DeliveryTime: $DeliveryTime, Price: $Price, ServiceCode: $ServiceCode}, DeliveryInstructions: $DeliveryInstructions, IsGift: $IsGift, GiftMessage: $GiftMe
2ssage}\n ) {\n Products {\n Id\n Quantity\n PlantType\n }\n }\n CheckoutV1(Review: true, Storefront: MVG) {\n ...CoreCheckoutFieldsV1\n }\n}\n "+c,V=e=>(0,r.D)(["saveCartShipping"],(e=>(0,o.rQ)(L,e)()),e),B="\n mutation saveCartShippingAddress($FirstName: String!, $LastName: String!, $Company: String, $Address: String!, $Address2: String, $City: String!, $State: String!, $Zip: String!, $Phone: String!, $Email: String!, $WaiveWarrantyPlugtrays: Boolean!, $WaiveWarranty: Boolean!) {\n SaveCart(\n Shipping: {FirstName: $FirstName, LastName: $LastName, Company: $Company, Address: $Address, Address2: $Address2, City: $City, State: $State, Zip: $Zip, Phone: $Phone, Email: $Email}\n WaiveWarrantyPlugtrays: $WaiveWarrantyPlugtrays\n WaiveWarranty: $WaiveWarranty\n ) {\n Products {\n Id\n Quantity\n }\n }\n CheckoutV1(Review: true, Storefront: MVG) {\n ...CoreCheckoutFieldsV1\n }\n}\n "+c,q=e=>(0,r.D)(["saveCartShippingAddress"],(e=>(0,o.rQ)(B,e)()),e),K="\n mutation setCartProductQuantity($Id: String!, $Quantity: Int!, $PlantType: PlantType!) {\n SaveCartProduct(Id: $Id, Quantity: $Quantity, PlantType: $PlantType) {\n ...CoreCartFieldsV1\n }\n}\n "+u,G=e=>(0,r.D)(["setCartProductQuantity"],(e=>(0,o.rQ)(K,e)()),e),W="\n mutation setCartProductQuantityWithCheckoutReview($Id: String!, $Quantity: Int!, $PlantType: PlantType!) {\n SaveCartProduct(Id: $Id, Quantity: $Quantity, PlantType: $PlantType) {\n Products {\n Id\n Quantity\n PlantType\n }\n }\n CheckoutV1(Review: true, Storefront: MVG) {\n ...CoreCheckoutFieldsV1\n }\n}\n "+c,H=e=>(0,r.D)(["setCartProductQuantityWithCheckoutReview"],(e=>(0,o.rQ)(W,e)()),e),Q="\n mutation updateCartGiftCard($Index: Int!, $GiftCard: GiftCardInput!) {\n UpdateCartGiftCard(Index: $Index, GiftCard: $GiftCard) {\n ...CoreCartFieldsV1\n }\n}\n "+u,$=e=>(0,r.D)(["updateCartGiftCard"],(e=>(0,o.rQ)(Q,e)()),e),z=e=>(0,r.D)(["ValidateAddressV1"],(e=>(0,o.rQ)("\n mutation ValidateAddressV1($Address: AddressInput!) {\n ValidateAddressV1(Address: $Address) {\n Address\n Address2\n City\n State\n Zip\n }\n}\n ",e)()),e)},60201:function(e,t,n){"use strict";n.d(t,{Mo:function(){return l},Q_:function(){return d},VN:function(){return c},Vl:function(){return h},h2:function(){return u},tD:function(){return f}});var r=n(64721),i=n.n(r),o=n(67294),s=n(11349);const a=n.n(s)().get();let u=function(e){return e.Original="original",e.Small="small",e.Medium="medium",e.Large="large",e}({});const c="medium",l="image-placeholder-98f519",f=(e,t)=>{if(!i()([u.Original,u.Small,u.Medium,u.Large],t))throw new Error("generateImageCdnPath: invalid size:"+t);return a.imageCdnPrefix+"/"+(e||l)+"-"+t+".jpg"},d=e=>f(l,e),h=e=>o.createElement("img",{alt:"Gift card",src:f("gift-card-f8e886",e)})},20173:function(e,t,n){"use strict";n.d(t,{CP:function(){return p},kN:function(){return g},nV:function(){return m},s3:function(){return d}});var r=n(15785),i=(n(84238),n(21060)),o=n.n(i),s=n(2043),a=n.n(s),u=n(11349),c=n.n(u),l=n(69451);const f=c().get().publicApi,d=async e=>{if(!e||e.length<1)return a().debug({query:e,fn:"searchProducts"},"got empty query, returning empty list"),{IndexId:"none",Version:"none",Products:[]};const t=await o()(f+"?type=search&query="+encodeURIComponent(e));if(t.status>=400)throw new Error("Bad response "+t.status+" from server.");return await t.json()},h=async e=>{const t=await o()(f+"?"+new URLSearchParams(e).toString());if(t.status>=400)throw new Error("Bad response "+t.status+" from server.");const n=await t.json();return a().debug({resultJson:n,args:e},"got fetchProducts"),n};let p=function(e){return e.InStock="instock",e.InStockMvg="instockmvg",e.Search="search",e.Id="id",e.Tag="tag",e}({});const g=e=>(0,l.a)(["search:"+e.type],(async()=>h(e))),m=e=>{let{Products:t}=e;const n=t&&t.length>0?t.map((e=>{let{Id:t}=e;return t})):[];return(0,l.a)({queryFn:async()=>h({type:"id",ids:n}),queryKey:["hydrateProducts"].concat((0,r.Z)(n)),enabled:n.length>0,placeholderData:{IndexId:"Initial",Version:"Initial-Static",Products:t}})}},74402:function(e,t,n){const r=n(41814);e.exports={MDXRenderer:r}},41814:function(e,t,n){var r=n(861),i=n(3515),o=n(38416),s=n(70215);const a=["scope","children"];function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
2t%2?u(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const l=n(67294),{mdx:f}=n(3905),{useMDXScope:d}=n(37020);e.exports=function(e){let{scope:t,children:n}=e,o=s(e,a);const u=d(t),h=l.useMemo((()=>{if(!n)return null;const e=c({React:l,mdx:f},u),t=Object.keys(e),o=t.map((t=>e[t]));return i(Function,["_fn"].concat(t,[""+n])).apply(void 0,[{}].concat(r(o)))}),[n,t]);return l.createElement(h,c({},o))}},80645:function(e,t){t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,l=-7,f=n?i-1:0,d=n?-1:1,h=e[t+f];for(f+=d,o=h&(1<<-l)-1,h>>=-l,l+=a;l>0;o=256*o+e[t+f],f+=d,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+e[t+f],f+=d,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,r),o-=c}return(h?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?d/u:d*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*u-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[n+h]=255&a,h+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[n+h]=255&s,h+=p,s/=256,c-=8);e[n+h-p]|=128*g}},36808:function(e,t,n){var r,i;!function(o){if(void 0===(i="function"==typeof(r=o)?r.call(t,n,t,e):r)||(e.exports=i),!0,e.exports=o(),!!0){var s=window.Cookies,a=window.Cookies=o();a.noConflict=function(){return window.Cookies=s,a}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2}
2)+/g,decodeURIComponent)}return function n(r){function i(){}function o(t,n,o){if("undefined"!=typeof document){"number"==typeof(o=e({path:"/"},i.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var s=JSON.stringify(n);/^[\{\[]/.test(s)&&(n=s)}catch(c){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a="";for(var u in o)o[u]&&(a+="; "+u,!0!==o[u]&&(a+="="+o[u].split(";")[0]));return document.cookie=t+"="+n+a}}function s(e,n){if("undefined"!=typeof document){for(var i={},o=document.cookie?document.cookie.split("; "):[],s=0;s<o.length;s++){var a=o[s].split("="),u=a.slice(1).join("=");n||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var c=t(a[0]);if(u=(r.read||r)(u,c)||t(u),n)try{u=JSON.parse(u)}catch(l){}if(i[c]=u,e===c)break}catch(l){}}return e?i[e]:i}}return i.set=o,i.get=function(e){return s(e,!1)},i.getJSON=function(e){return s(e,!0)},i.remove=function(t,n){o(t,"",e(n,{expires:-1}))},i.defaults={},i.withConverter=n,i}((function(){}))}))},18552:function(e,t,n){var r=n(10852)(n(55639),"DataView");e.exports=r},96425:function(e,t,n){var r=n(3118),i=n(9435);function o(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}o.prototype=r(i.prototype),o.prototype.constructor=o,e.exports=o},7548:function(e,t,n){var r=n(3118),i=n(9435);function o(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}o.prototype=r(i.prototype),o.prototype.constructor=o,e.exports=o},53818:function(e,t,n){var r=n(10852)(n(55639),"Promise");e.exports=r},58525:function(e,t,n){var r=n(10852)(n(55639),"Set");e.exports=r},88668:function(e,t,n){var r=n(83369),i=n(90619),o=n(72385);function s(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}s.prototype.add=s.prototype.push=i,s.prototype.has=o,e.exports=s},46384:function(e,t,n){var r=n(38407),i=n(37465),o=n(63779),s=n(67599),a=n(44758),u=n(34309);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=s,c.prototype.has=a,c.prototype.set=u,e.exports=c},11149:function(e,t,n){var r=n(55639).Uint8Array;e.exports=r},70577:function(e,t,n){var r=n(10852)(n(55639),"WeakMap");e.exports=r},96874:function(e){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},44174:function(e){e.exports=function(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}},77412:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},34963:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}},47443:function(e,t,n){var r=n(42118);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},62488:function(e){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},82908:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},48983:function(e,t,n){var r=n(40371)("length");e.exports=r},81119:function(e,t,n){var r=n(89881);e.exports=function(e,t,n,i){return r(e,(function(e,r,o){t(i,e,n(e),o)})),i}},89465:function(e,t,n){var r=n(38777);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},3118:function(e,t,n){var r=n(13218),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},89881:function(e,t,n){var r=n(47816),i=n(99291)(r);e.exports=i},80760:function(e,t,n){var r=n(89881);e.exports=function(e,t){var n=[];return r(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}},28483:function(e,t,n){var r=n(25063)();e.exports=r},47816:function(e,t,n){var r=n(28483),i=n(3674);e.exports=function(e,t){return e&&r(e,t,i)}},68866:function(e,t,n){var r=n(62488),i=n(1469);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},78565:function(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},13:function(e){e.exports=function(e,t){return null!=e&&t in Object(e)}},90939:function(e,t,n){var r=n(2492),i=n(37005);e.exports=function e(t,n,o,s,a){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,o,s,e,a))}},2492:function(e,t,n){var r=n(46384),i=n(67114),o=n(18351),s=n(16096),a=n(64160),u=n(1469),c=n(44144),l=n(36719),f="[object Arguments]",d="[object Array]",h="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,m,y){var v=u(e),b=u(t),w=v?d:a(e),S=b?d:a(t),C=(w=w==f?h:w)==h,E=(S=S==f?h:S)==h,_=w==S;if(_&&c(e)){if(!c(t))return!1;v=!0,C=!1}if(_&&!C)return y||(y=new r),v||l(e)?i(e,t,n,g,m,y):o(e,t,w,n,g,m,y);if(!(1&n)){var A=C&&p.call(e,"__wrapped__"),I=E&&p.call(t,"__wrapped__");
vendor: 7,151 bytes, line 2
2if(A||I){var P=A?e.value():e,O=I?t.value():t;return y||(y=new r),m(P,O,n,g,y)}}return!!_&&(y||(y=new r),s(e,t,n,g,m,y))}},2958:function(e,t,n){var r=n(46384),i=n(90939);e.exports=function(e,t,n,o){var s=n.length,a=s,u=!o;if(null==e)return!a;for(e=Object(e);s--;){var c=n[s];if(u&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<a;){var l=(c=n[s])[0],f=e[l],d=c[1];if(u&&c[2]){if(void 0===f&&!(l in e))return!1}else{var h=new r;if(o)var p=o(f,d,l,e,t,h);if(!(void 0===p?i(d,f,3,o,h):p))return!1}}return!0}},67206:function(e,t,n){var r=n(91573),i=n(16432),o=n(6557),s=n(1469),a=n(39601);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?s(e)?i(e[0],e[1]):r(e):a(e)}},9435:function(e){e.exports=function(){}},69199:function(e,t,n){var r=n(89881),i=n(98612);e.exports=function(e,t){var n=-1,o=i(e)?Array(e.length):[];return r(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}},91573:function(e,t,n){var r=n(2958),i=n(1499),o=n(42634);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},16432:function(e,t,n){var r=n(90939),i=n(27361),o=n(79095),s=n(15403),a=n(89162),u=n(42634),c=n(40327);e.exports=function(e,t){return s(e)&&a(t)?u(c(e),t):function(n){var s=i(n,e);return void 0===s&&s===t?o(n,e):r(t,s,3)}}},40371:function(e){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},79152:function(e,t,n){var r=n(97786);e.exports=function(e){return function(t){return r(t,e)}}},5976:function(e,t,n){var r=n(6557),i=n(45357),o=n(30061);e.exports=function(e,t){return o(i(e,t,r),e+"")}},28045:function(e,t,n){var r=n(6557),i=n(89250),o=i?function(e,t){return i.set(e,t),e}:r;e.exports=o},56560:function(e,t,n){var r=n(75703),i=n(38777),o=n(6557),s=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=s},93680:function(e,t,n){var r=n(77813);e.exports=function(e,t){for(var n=-1,i=e.length,o=0,s=[];++n<i;){var a=e[n],u=t?t(a):a;if(!n||!r(u,c)){var c=u;s[o++]=0===a?0:a}}return s}},67762:function(e){e.exports=function(e,t){for(var n,r=-1,i=e.length;++r<i;){var o=t(e[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n}},74757:function(e){e.exports=function(e,t){return e.has(t)}},52157:function(e){var t=Math.max;e.exports=function(e,n,r,i){for(var o=-1,s=e.length,a=r.length,u=-1,c=n.length,l=t(s-a,0),f=Array(c+l),d=!i;++u<c;)f[u]=n[u];for(;++o<a;)(d||o<s)&&(f[r[o]]=e[o]);for(;l--;)f[u++]=e[o++];return f}},14054:function(e){var t=Math.max;e.exports=function(e,n,r,i){for(var o=-1,s=e.length,a=-1,u=r.length,c=-1,l=n.length,f=t(s-u,0),d=Array(f+l),h=!i;++o<f;)d[o]=e[o];for(var p=o;++c<l;)d[p+c]=n[c];for(;++a<u;)(h||o<s)&&(d[p+r[a]]=e[o++]);return d}},278:function(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},97991:function(e){e.exports=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}},55189:function(e,t,n){var r=n(44174),i=n(81119),o=n(67206),s=n(1469);e.exports=function(e,t){return function(n,a){var u=s(n)?r:i,c=t?t():{};return u(n,e,o(a,2),c)}}},99291:function(e,t,n){var r=n(98612);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var o=n.length,s=t?o:-1,a=Object(n);(t?s--:++s<o)&&!1!==i(a[s],s,a););return n}}},25063:function(e){e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var u=s[e?a:++i];if(!1===n(o[u],u,o))break}return t}}},22402:function(e,t,n){var r=n(71774),i=n(55639);e.exports=function(e,t,n){var o=1&t,s=r(e);return function t(){return(this&&this!==i&&this instanceof t?s:e).apply(o?n:this,arguments)}}},71774:function(e,t,n){var r=n(3118),i=n(13218);e.exports=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=r(e.prototype),o=e.apply(n,t);return i(o)?o:n}}},46347:function(e,t,n){var r=n(96874),i=n(71774),o=n(86935),s=n(94487),a=n(20893),u=n(46460),c=n(55639);e.exports=function(e,t,n){var l=i(e);return function i(){for(var f=arguments.length,d=Array(f),h=f,p=a(i);h--;)d[h]=arguments[h];var g=f<3&&d[0]!==p&&d[f-1]!==p?[]:u(d,p);return(f-=g.length)<n?s(e,t,o,i.placeholder,void 0,d,g,void 0,void 0,n-f):r(this&&this!==c&&this instanceof i?l:e,this,d)}}},86935:function(e,t,n){var r=n(52157),i=n(14054),o=n(97991),s=n(71774),a=n(94487),u=n(20893),c=n(90451),l=n(46460),f=n(55639);e.exports=function e(t,n,d,h,p,g,m,y,v,b){var w=128&n,S=1&n,C=2&n,E=24&n,_=512&n,A=C?void 0:s(t);return function I(){for(var P=arguments.length,O=Array(P),x=P;x--;)O[x]=arguments[x];if(E)var T=u(I),k=o(O,T);if(h&&(O=r(O,h,p,E)),g&&(O=i(O,g,m,E)),P-=k,E&&P<b){var U=l(O,T);return a(t,n,e,I.placeholder,d,O,U,y,v,b-P)}var D=S?d:this,R=C?D[t]:t;return P=O.length,y?O=c(O,y):_&&P>1&&O.reverse(),w&&v<P&&(O.length=v),this&&this!==f&&this instanceof I&&(R=A||s(R)),R.apply(D,O)}}},84375:function(e,t,n){var r=n(96874),i=n(71774),o=n(55639);e.exports=function(e,t,n,s){var a=1&t,u=i(e);return function t(){for(var i=-1,c=arguments.length,l=-1,f=s.length,d=Array(f+c),h=this&&this!==o&&this instanceof t?u:e;++l<f;)d[l]=s[l];for(;c--;)d[l++]=arguments[++i];return r(h,a?n:this,d)}}},94487:function(e,t,n){var r=n(86528),i=n(258),o=n(69255);e.exports=function(e,t,n,s,a,u,c,l,f,d){var h=8&t;t|=h?32:64,4&(t&=~(h?64:32))||(t&=-4);var p=[e,t,a,h?u:void 0,h?c:void 0,h?void 0:u,h?void 0:c,l,f,d],g=n.apply(void 0,p);return r(e)&&i(g,p),g.placeholder=s,o(g,e,t)}},97727:function(e,t,n){var r=n(28045),i=n(22402),o=n(46347),s=n(86935),a=n(84375),u=n(66833),c=n(63833),l=n(258),f=n(69255),d=n(40554),h=Math.max;e.exports=function(e,t,n,p,g,m,y,v){var b=2&t;if(!b&&"function"!=typeof e)throw new TypeError("Expected a function");var w=p?p.length:0;if(w||(t&=-97,p=g=void 0),y=void 0===y?y:h(d(y),0),v=void 0===v?v:d(v),w-=g?g.length:0,64&t){var S=p,C=g;p=g=void 0}var E=b?void 0:u(e),_=[e,t,n,p,g,S,C,m,y,v];if(E&&c(_,E),e=_[0],t=_[1],n=_[2],p=_[3],g=_[4],!(v=_[9]=void 0===_[9]?b?0:e.length:h(_[9]-w,0))&&24&t&&(t&=-25),t&&1!=t)A=8==t||16==t?o(e,t,v):32!=t&&33!=t||g.length?s.apply(void 0,_):a(e,t,n,p);else var A=i(e,t,n);return f((E?r:l)(A,_),e,t)}},38777:function(e,t,n){var r=n(10852),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=i},67114:function(e,t,n){var r=n(88668),i=n(82908),o=n(74757);e.exports=function(e,t,n,s,a,u){var c=1&n,l=e.length,f=t.length;if(l!=f&&!(c&&f>l))return!1;var d=u.get(e),h=u.get(t);if(d&&h)return d==t&&h==e;var p=-1,g=!0,m=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++p<l;){var y=e[p],v=t[p];if(s)var b=c?s(v,y,p,t,e,u):s(y,v,p,e,t,u);if(void 0!==b){if(b)continue;g=!1;break}if(m){if(!i(t,(function(e,t){if(!o(m,t)&&(y===e||a(y,e,n,s,u)))return m.push(t)}))){g=!1;break}}else if(y!==v&&!a(y,v,n,s,u)){g=!1;break}}return u.delete(e),u.delete(t),g}},18351:function(e,t,n){var r=n(62705),i=n(11149),o=n(77813),s=n(67114),a=n(68776),u=n(21814),
vendor: 2,515 bytes, line 2
2c=r?r.prototype:void 0,l=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,f,d){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=a;case"[object Set]":var p=1&r;if(h||(h=u),e.size!=t.size&&!p)return!1;var g=d.get(e);if(g)return g==t;r|=2,d.set(e,t);var m=s(h(e),h(t),r,c,f,d);return d.delete(e),m;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},16096:function(e,t,n){var r=n(58234),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,s,a){var u=1&n,c=r(e),l=c.length;if(l!=r(t).length&&!u)return!1;for(var f=l;f--;){var d=c[f];if(!(u?d in t:i.call(t,d)))return!1}var h=a.get(e),p=a.get(t);if(h&&p)return h==t&&p==e;var g=!0;a.set(e,t),a.set(t,e);for(var m=u;++f<l;){var y=e[d=c[f]],v=t[d];if(o)var b=u?o(v,y,d,t,e,a):o(y,v,d,e,t,a);if(!(void 0===b?y===v||s(y,v,n,o,a):b)){g=!1;break}m||(m="constructor"==d)}if(g&&!m){var w=e.constructor,S=t.constructor;w==S||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof S&&S instanceof S||(g=!1)}return a.delete(e),a.delete(t),g}},58234:function(e,t,n){var r=n(68866),i=n(99551),o=n(3674);e.exports=function(e){return r(e,o,i)}},66833:function(e,t,n){var r=n(89250),i=n(50308),o=r?function(e){return r.get(e)}:i;e.exports=o},97658:function(e,t,n){var r=n(52060),i=Object.prototype.hasOwnProperty;e.exports=function(e){for(var t=e.name+"",n=r[t],o=i.call(r,t)?n.length:0;o--;){var s=n[o],a=s.func;if(null==a||a==e)return s.name}return t}},20893:function(e){e.exports=function(e){return e.placeholder}},1499:function(e,t,n){var r=n(89162),i=n(3674);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var o=t[n],s=e[o];t[n]=[o,s,r(s)]}return t}},99551:function(e,t,n){var r=n(34963),i=n(70479),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),r(s(e),(function(t){return o.call(e,t)})))}:i;e.exports=a},64160:function(e,t,n){var r=n(18552),i=n(57071),o=n(53818),s=n(58525),a=n(70577),u=n(44239),c=n(80346),l="[object Map]",f="[object Promise]",d="[object Set]",h="[object WeakMap]",p="[object DataView]",g=c(r),m=c(i),y=c(o),v=c(s),b=c(a),w=u;
2(r&&w(new r(new ArrayBuffer(1)))!=p||i&&w(new i)!=l||o&&w(o.resolve())!=f||s&&w(new s)!=d||a&&w(new a)!=h)&&(w=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case g:return p;case m:return l;case y:return f;case v:return d;case b:return h}return t}),e.exports=w},58775:function(e){var t=/\{\n\/\* \[wrapped with (.+)\] \*/,n=/,? & /;e.exports=function(e){var r=e.match(t);return r?r[1].split(n):[]}},222:function(e,t,n){var r=n(71811),i=n(35694),o=n(1469),s=n(65776),a=n(41780),u=n(40327);e.exports=function(e,t,n){for(var c=-1,l=(t=r(t,e)).length,f=!1;++c<l;){var d=u(t[c]);if(!(f=null!=e&&n(e,d)))break;e=e[d]}return f||++c!=l?f:!!(l=null==e?0:e.length)&&a(l)&&s(d,l)&&(o(e)||i(e))}},62689:function(e){var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},83112:function(e){var t=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;e.exports=function(e,n){var r=n.length;if(!r)return e;var i=r-1;return n[i]=(r>1?"& ":"")+n[i],n=n.join(r>2?", ":" "),e.replace(t,"{\n/* [wrapped with "+n+"] */\n")}},86528:function(e,t,n){var r=n(96425),i=n(66833),o=n(97658),s=n(8111);e.exports=function(e){var t=o(e),n=s[t];if("function"!=typeof n||!(t in r.prototype))return!1;if(e===n)return!0;var a=i(n);return!!a&&e===a[0]}},89162:function(e,t,n){var r=n(13218);e.exports=function(e){return e==e&&!r(e)}},68776:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},42634:function(e){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},63833:function(e,t,n){var r=n(52157),i=n(14054),o=n(46460),s="__lodash_placeholder__",a=128,u=Math.min;e.exports=function(e,t){var n=e[1],c=t[1],l=n|c,f=l<131,d=c==a&&8==n||c==a&&256==n&&e[7].length<=t[8]||384==c&&t[7].length<=t[8]&&8==n;if(!f&&!d)return e;1&c&&(e[2]=t[2],l|=1&n?0:4);var h=t[3];if(h){var p=e[3];e[3]=p?r(p,h,t[4]):h,e[4]=p?o(e[3],s):t[4]}return(h=t[5])&&(p=e[5],e[5]=p?i(p,h,t[6]):h,e[6]=p?o(e[5],s):t[6]),(h=t[7])&&(e[7]=h),c&a&&(e[8]=null==e[8]?t[8]:u(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=l,e}},89250:function(e,t,n){var r=n(70577),i=r&&new r;e.exports=i},45357:function(e,t,n){var r=n(96874),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=i(o.length-t,0),u=Array(a);++s<a;)u[s]=o[t+s];s=-1;for(var c=Array(t+1);++s<t;)c[s]=o[s];return c[t]=n(u),r(e,this,c)}}},52060:function(e){e.exports={}},90451:function(e,t,n){var r=n(278),i=n(65776),o=Math.min;e.exports=function(e,t){for(var n=e.length,s=o(t.length,n),a=r(e);s--;){var u=t[s];e[s]=i(u,n)?a[u]:void 0}return e}},46460:function(e){var t="__lodash_placeholder__";e.exports=function(e,n){for(var r=-1,i=e.length,o=0,s=[];++r<i;){var a=e[r];a!==n&&a!==t||(e[r]=t,s[o++]=r)}return s}},90619:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},72385:function(e){e.exports=function(e){return this.__data__.has(e)}},258:function(e,t,n){var r=n(28045),i=n(21275)(r);e.exports=i},21814:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},30061:function(e,t,n){var r=n(56560),i=n(21275)(r);e.exports=i},69255:function(e,t,n){var r=n(58775),i=n(83112),o=n(30061),s=n(87241);e.exports=function(e,t,n){var a=t+"";return o(e,i(a,s(r(a),n)))}},21275:function(e){var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var i=t(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},37465:function(e,t,n){var r=n(38407);e.exports=function(){this.__data__=new r,this.size=0}},63779:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},67599:function(e){e.exports=function(e){return this.__data__.get(e)}},44758:function(e){e.exports=function(e){return this.__data__.has(e)}},34309:function(e,t,n){var r=n(38407),i=n(57071),o=n(83369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!i||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(s)}return n.set(e,t),this.size=n.size,this}},88016:function(e,t,n){var r=n(48983),i=n(62689),o=n(21903);e.exports=function(e){return i(e)?o(e):r(e)}},21903:function(e){var t="\\ud800-\\udfff",n="["+t+"]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^"+t+"]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+r+"|"+i+")"+"?",c="[\\ufe0e\\ufe0f]?",l=c+u+("(?:\\u200d(?:"+[o,s,a].join("|")+")"+c+u+")*"),f="(?:"+[o+r+"?",r,s,a,n].join("|")+")",d=RegExp(i+"(?="+i+")|"+f+l,"g");e.exports=function(e){for(var t=d.lastIndex=0;d.test(e);)++t;return t}},87241:function(e,t,n){var r=n(77412),i=n(47443),o=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];e.exports=function(e,t){return r(o,(function(n){var r="_."+n[0];
2t&n[1]&&!i(e,r)&&e.push(r)})),e.sort()}},21913:function(e,t,n){var r=n(96425),i=n(7548),o=n(278);e.exports=function(e){if(e instanceof r)return e.clone();var t=new i(e.__wrapped__,e.__chain__);return t.__actions__=o(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}},75703:function(e){e.exports=function(e){return function(){return e}}},63105:function(e,t,n){var r=n(34963),i=n(80760),o=n(67206),s=n(1469);e.exports=function(e,t){return(s(e)?r:i)(e,o(t,3))}},18721:function(e,t,n){var r=n(78565),i=n(222);e.exports=function(e,t){return null!=e&&i(e,t,r)}},79095:function(e,t,n){var r=n(13),i=n(222);e.exports=function(e,t){return null!=e&&i(e,t,r)}},6557:function(e){e.exports=function(e){return e}},24350:function(e,t,n){var r=n(89465),i=n(55189)((function(e,t,n){r(e,n,t)}));e.exports=i},35161:function(e,t,n){var r=n(29932),i=n(67206),o=n(69199),s=n(1469);e.exports=function(e,t){return(s(e)?r:o)(e,i(t,3))}},94885:function(e){e.exports=function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}},50308:function(e){e.exports=function(){}},53131:function(e,t,n){var r=n(5976),i=n(97727),o=n(20893),s=n(46460),a=r((function(e,t){var n=s(t,o(a));return i(e,32,void 0,t,n)}));a.placeholder={},e.exports=a},39601:function(e,t,n){var r=n(40371),i=n(79152),o=n(15403),s=n(40327);e.exports=function(e){return o(e)?r(s(e)):i(e)}},43063:function(e,t,n){var r=n(34963),i=n(80760),o=n(67206),s=n(1469),a=n(94885);e.exports=function(e,t){return(s(e)?r:i)(e,a(o(t,3)))}},84238:function(e,t,n){var r=n(280),i=n(64160),o=n(98612),s=n(47037),a=n(88016);e.exports=function(e){if(null==e)return 0;if(o(e))return s(e)?a(e):e.length;var t=i(e);return"[object Map]"==t||"[object Set]"==t?e.size:r(e).length}},97520:function(e,t,n){var r=n(93680);e.exports=function(e){return e&&e.length?r(e):[]}},70479:function(e){e.exports=function(){return[]}},12297:function(e,t,n){var r=n(67762),i=n(6557);e.exports=function(e){return e&&e.length?r(e,i):0}},7334:function(e,t,n){var r=n(79833);e.exports=function(e){return r(e).toLowerCase()}},8111:function(e,t,n){var r=n(96425),i=n(7548),o=n(9435),s=n(1469),a=n(37005),u=n(21913),c=Object.prototype.hasOwnProperty;function l(e){if(a(e)&&!s(e)&&!(e instanceof r)){if(e instanceof i)return e;if(c.call(e,"__wrapped__"))return u(e)}return new i(e)}l.prototype=o.prototype,l.prototype.constructor=l,e.exports=l},62587:function(e){"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,r,i){n=n||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(n);var a=1e3;i&&"number"==typeof i.maxKeys&&(a=i.maxKeys);var u=e.length;a>0&&u>a&&(u=a);for(var c=0;c<u;++c){var l,f,d,h,p=e[c].replace(s,"%20"),g=p.indexOf(r);g>=0?(l=p.substr(0,g),f=p.substr(g+1)):(l=p,f=""),d=decodeURIComponent(l),h=decodeURIComponent(f),t(o,d)?Array.isArray(o[d])?o[d].push(h):o[d]=[o[d],h]:o[d]=h}return o}},12361:function(e){"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,n,r,i){return n=n||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(i){var o=encodeURIComponent(t(i))+r;return Array.isArray(e[i])?e[i].map((function(e){return o+encodeURIComponent(t(e))})).join(n):o+encodeURIComponent(t(e[i]))})).join(n):i?encodeURIComponent(t(i))+r+encodeURIComponent(t(e)):""}},17673:function(e,t,n){"use strict";t.decode=t.parse=n(62587),t.encode=t.stringify=n(12361)},11876:function(e,t,n){"use strict";n.d(t,{Mt:function(){return ne},Ol:function(){return ee},Qd:function(){return j},UQ:function(){return P},on:function(){return J}});var r=n(67294);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
2t%2?i(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e,t){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(e,t)}function p(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}(this,n)}}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(u){a=!0,i=u}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){if(e){if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var S=u((function e(t){var n=this,r=t.expanded,i=void 0===r?[]:r,a=t.allowMultipleExpanded,u=void 0!==a&&a,l=t.allowZeroExpanded,f=void 0!==l&&l;s(this,e),c(this,"expanded",void 0),c(this,"allowMultipleExpanded",void 0),c(this,"allowZeroExpanded",void 0),c(this,"toggleExpanded",(function(e){return n.isItemDisabled(e)?n:n.isItemExpanded(e)?n.augment({expanded:n.expanded.filter((function(t){return t!==e}))}
2):n.augment({expanded:n.allowMultipleExpanded?[].concat(v(n.expanded),[e]):[e]})})),c(this,"isItemDisabled",(function(e){var t=n.isItemExpanded(e),r=1===n.expanded.length;return Boolean(t&&!n.allowZeroExpanded&&r)})),c(this,"isItemExpanded",(function(e){return-1!==n.expanded.indexOf(e)})),c(this,"getPanelAttributes",(function(e,t){var r=null!=t?t:n.isItemExpanded(e);return{role:n.allowMultipleExpanded?void 0:"region","aria-hidden":n.allowMultipleExpanded?!r:void 0,"aria-labelledby":n.getButtonId(e),id:n.getPanelId(e),hidden:!r||void 0}})),c(this,"getHeadingAttributes",(function(){return{role:"heading"}})),c(this,"getButtonAttributes",(function(e,t){var r=null!=t?t:n.isItemExpanded(e),i=n.isItemDisabled(e);return{id:n.getButtonId(e),"aria-disabled":i,"aria-expanded":r,"aria-controls":n.getPanelId(e),role:"button",tabIndex:0}})),c(this,"getPanelId",(function(e){return"accordion__panel-".concat(e)})),c(this,"getButtonId",(function(e){return"accordion__heading-".concat(e)})),c(this,"augment",(function(t){return new e(o({expanded:n.expanded,allowMultipleExpanded:n.allowMultipleExpanded,allowZeroExpanded:n.allowZeroExpanded},t))})),this.expanded=i,this.allowMultipleExpanded=u,this.allowZeroExpanded=f})),C=(0,r.createContext)(null),E=function(e){f(n,e);var t=m(n);function n(){var e;s(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return c(g(e=t.call.apply(t,[this].concat(i))),"state",new S({expanded:e.props.preExpanded,allowMultipleExpanded:e.props.allowMultipleExpanded,allowZeroExpanded:e.props.allowZeroExpanded})),c(g(e),"toggleExpanded",(function(t){e.setState((function(e){return e.toggleExpanded(t)}),(function(){e.props.onChange&&e.props.onChange(e.state.expanded)}))})),c(g(e),"isItemDisabled",(function(t){return e.state.isItemDisabled(t)})),c(g(e),"isItemExpanded",(function(t){return e.state.isItemExpanded(t)})),c(g(e),"getPanelAttributes",(function(t,n){return e.state.getPanelAttributes(t,n)})),c(g(e),"getHeadingAttributes",(function(){return e.state.getHeadingAttributes()})),c(g(e),"getButtonAttributes",(function(t,n){return e.state.getButtonAttributes(t,n)})),e}return u(n,[{key:"render",value:function(){var e=this.state,t=e.allowZeroExpanded,n=e.allowMultipleExpanded;return(0,r.createElement)(C.Provider,{value:{allowMultipleExpanded:n,allowZeroExpanded:t,toggleExpanded:this.toggleExpanded,isItemDisabled:this.isItemDisabled,isItemExpanded:this.isItemExpanded,getPanelAttributes:this.getPanelAttributes,getHeadingAttributes:this.getHeadingAttributes,getButtonAttributes:this.getButtonAttributes}},this.props.children||null)}}]),n}(r.PureComponent);c(E,"defaultProps",{allowMultipleExpanded:!1,allowZeroExpanded:!1});var _,A=function(e){f(n,e);var t=m(n);function n(){var e;s(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return c(g(e=t.call.apply(t,[this].concat(i))),"renderChildren",(function(t){return t?e.props.children(t):null})),e}return u(n,[{key:"render",value:function(){return(0,r.createElement)(C.Consumer,null,this.renderChildren)}}]),n}(r.PureComponent),I=["className","allowMultipleExpanded","allowZeroExpanded","onChange","preExpanded"],P=function(e){var t=e.className,n=void 0===t?"accordion":t,i=e.allowMultipleExpanded,o=e.allowZeroExpanded,s=e.onChange,a=e.preExpanded,u=p(e,I);return(0,r.createElement)(E,{preExpanded:a,allowMultipleExpanded:i,allowZeroExpanded:o,onChange:s},(0,r.createElement)("div",l({"data-accordion-component":"Accordion",className:n},u)))};!function(e){e.Accordion="Accordion",e.AccordionItem="AccordionItem",e.AccordionItemButton="AccordionItemButton",e.AccordionItemHeading="AccordionItemHeading",e.AccordionItemPanel="AccordionItemPanel"}(_||(_={}));var O=_,x=0;var T=r.useId||function(){var e=x;return x+=1,"raa-".concat(e)},k=/[\u0009\u000a\u000c\u000d\u0020]/g;function U(e){return""!==e&&!k.test(e)||(console.error('uuid must be a valid HTML5 id but was given "'.concat(e,'", ASCII whitespaces are forbidden')),!1)}var D=(0,r.createContext)(null),R=function(e){var t=e.children,n=e.uuid,i=e.accordionContext,o=e.dangerouslySetExpanded,s=function(){i.toggleExpanded(n)},a=function(e){var i=null!=o?o:e.isItemExpanded(n),a=e.isItemDisabled(n),u=e.getPanelAttributes(n,o),c=e.getHeadingAttributes(n),l=e.getButtonAttributes(n,o);return(0,r.createElement)(D.Provider,{value:{uuid:n,expanded:i,disabled:a,toggleExpanded:s,panelAttributes:u,headingAttributes:c,buttonAttributes:l}},t)};return(0,r.createElement)(A,null,a)},N=function(e){return(0,r.createElement)(A,null,(function(t){return(0,r.createElement)(R,l({},e,{accordionContext:t}))}))},M=function(e){var t=e.children,n=function(e){return e?t(e):null};return(0,r.createElement)(D.Consumer,null,n)},F=["uuid","dangerouslySetExpanded","className","activeClassName"],j=function(e){var t=e.uuid,n=e.dangerouslySetExpanded,i=e.className,o=void 0===i?"accordion__item":i,s=e.activeClassName,a=p(e,F),u=y((0,r.useState)(T()),1)[0],c=null!=t?t:u,f=function(e){var t=e.expanded&&s?s:o;return(0,r.createElement)("div",l({"data-accordion-component":"AccordionItem",className:t},a))};return U(c.toString()),a.id&&U(a.id),(0,r.createElement)(N,{uuid:c,dangerouslySetExpanded:n},(0,r.createElement)(M,null,f))};function L(e){return e&&(e.matches('[data-accordion-component="Accordion"]')?e:L(e.parentElement))}function V(e){var t=L(e);return t&&Array.from(t.querySelectorAll('[data-accordion-component="AccordionItemButton"]'))}j.displayName=O.AccordionItem;var B="End",q="Enter",K="Home",G=" ",W="Spacebar",H="ArrowUp",Q="ArrowDown",$="ArrowLeft",z="ArrowRight",Y=["toggleExpanded","className"],Z=function(e){var t=e.toggleExpanded,n=e.className,i=void 0===n?"accordion__button":n,o=p(e,Y);return o.id&&U(o.id),(0,r.createElement)("div",l({className:i},o,{role:"button",tabIndex:0,onClick:t,onKeyDown:function(e){var n,r,i=e.key;if(i!==q&&i!==G&&i!==W||(e.preventDefault(),t()),e.target instanceof HTMLElement)switch(i){case K:e.preventDefault(),n=e.target,(r=(V(n)||[])[0])&&r.focus();break;case B:e.preventDefault(),function(e){var t=V(e)||[],n=t[t.length-1];n&&n.focus()}(e.target);break;case $:case H:e.preventDefault(),function(e){var t=V(e)||[],n=t.indexOf(e);if(-1!==n){var r=t[n-1];r&&r.focus()}}(e.target);break;case z:case Q:e.preventDefault(),function(e){var t=V(e)||[],n=t.indexOf(e);if(-1!==n){var r=t[n+1];r&&r.focus()}}(e.target)}},"data-accordion-component":"AccordionItemButton"}))},J=function(e){return(0,r.createElement)(M,null,(function(t){var n=t.toggleExpanded,i=t.buttonAttributes;return(0,r.createElement)(Z,l({toggleExpanded:n},e,i))}))},X=function(e){f(n,e);var t=m(n);function n(){var e;s(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return c(g(e=t.call.apply(t,[this].concat(i))),"ref",void 0),c(g(e),"setRef",(function(t){e.ref=t})),e}
2return u(n,[{key:"componentDidUpdate",value:function(){n.VALIDATE(this.ref)}},{key:"componentDidMount",value:function(){n.VALIDATE(this.ref)}},{key:"render",value:function(){return(0,r.createElement)("div",l({"data-accordion-component":"AccordionItemHeading"},this.props,{ref:this.setRef}))}}],[{key:"VALIDATE",value:function(e){if(void 0===e)throw new Error("ref is undefined");if(1!==e.childElementCount||!e.firstElementChild||"AccordionItemButton"!==e.firstElementChild.getAttribute("data-accordion-component"))throw new Error("AccordionItemButton may contain only one child element, which must be an instance of AccordionItemButton.\n\nFrom the WAI-ARIA spec (https://www.w3.org/TR/wai-aria-practices-1.1/#accordion):\n\nâThe button element is the only element inside the heading element. That is, if there are other visually persistent elements, they are not included inside the heading element.â\n\n")}}]),n}(r.PureComponent);c(X,"defaultProps",{className:"accordion__heading","aria-level":3});var ee=function(e){return(0,r.createElement)(M,null,(function(t){var n=t.headingAttributes;return e.id&&U(e.id),(0,r.createElement)(X,l({},e,n))}))};ee.displayName=O.AccordionItemHeading;var te=["className","region","id"],ne=function(e){var t=e.className,n=void 0===t?"accordion__panel":t,i=e.region,s=e.id,a=p(e,te),u=function(e){var t=e.panelAttributes;s&&U(s);var u=o(o({},t),{},{"aria-labelledby":i?t["aria-labelledby"]:void 0});return(0,r.createElement)("div",l({"data-accordion-component":"AccordionItemPanel",className:n},a,u,{role:i?"region":void 0}))};return(0,r.createElement)(M,null,u)}},29983:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(67294),s=p(o),a=p(n(73935)),u=p(n(45697)),c=p(n(28747)),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(57149)),f=n(51112),d=p(f),h=n(9712);function p(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var m=t.portalClassName="ReactModalPortal",y=t.bodyOpenClassName="ReactModal__Body--open",v=f.canUseDOM&&void 0!==a.default.createPortal,b=function(e){return document.createElement(e)},w=function(){return v?a.default.createPortal:a.default.unstable_renderSubtreeIntoContainer};function S(e){return e()}var C=function(e){function t(){var e,n,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,u=Array(o),l=0;l<o;l++)u[l]=arguments[l];return n=i=g(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),i.removePortal=function(){!v&&a.default.unmountComponentAtNode(i.node);var e=S(i.props.parentSelector);e&&e.contains(i.node)?e.removeChild(i.node):console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.')},i.portalRef=function(e){i.portal=e},i.renderPortal=function(e){var n=w()(i,s.default.createElement(c.default,r({defaultStyles:t.defaultStyles},e)),i.node);i.portalRef(n)},g(i,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){f.canUseDOM&&(v||(this.node=b("div")),this.node.className=this.props.portalClassName,S(this.props.parentSelector).appendChild(this.node),!v&&this.renderPortal(this.props))}},{key:"getSnapshotBeforeUpdate",value:function(e){return{prevParent:S(e.parentSelector),nextParent:S(this.props.parentSelector)}}},{key:"componentDidUpdate",value:function(e,t,n){if(f.canUseDOM){var r=this.props,i=r.isOpen,o=r.portalClassName;e.portalClassName!==o&&(this.node.className=o);var s=n.prevParent,a=n.nextParent;a!==s&&(s.removeChild(this.node),a.appendChild(this.node)),(e.isOpen||i)&&!v&&this.renderPortal(this.props)}}},{key:"componentWillUnmount",value:function(){if(f.canUseDOM&&this.node&&this.portal){var e=this.portal.state,t=Date.now(),n=e.isOpen&&this.props.closeTimeoutMS&&(e.closesAt||t+this.props.closeTimeoutMS);n?(e.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,n-t)):this.removePortal()}}},{key:"render",value:function(){return f.canUseDOM&&v?(!this.node&&v&&(this.node=b("div")),w()(s.default.createElement(c.default,r({ref:this.portalRef,defaultStyles:t.defaultStyles},this.props)),this.node)):null}}],[{key:"setAppElement",value:function(e){l.setElement(e)}}]),t}(o.Component);C.propTypes={isOpen:u.default.bool.isRequired,style:u.default.shape({content:u.default.object,overlay:u.default.object}),portalClassName:u.default.string,bodyOpenClassName:u.default.string,htmlOpenClassName:u.default.string,className:u.default.oneOfType([u.default.string,u.default.shape({base
vendor: 5,093 bytes, line 2
2:u.default.string.isRequired,afterOpen:u.default.string.isRequired,beforeClose:u.default.string.isRequired})]),overlayClassName:u.default.oneOfType([u.default.string,u.default.shape({base:u.default.string.isRequired,afterOpen:u.default.string.isRequired,beforeClose:u.default.string.isRequired})]),appElement:u.default.oneOfType([u.default.instanceOf(d.default),u.default.instanceOf(f.SafeHTMLCollection),u.default.instanceOf(f.SafeNodeList),u.default.arrayOf(u.default.instanceOf(d.default))]),onAfterOpen:u.default.func,onRequestClose:u.default.func,closeTimeoutMS:u.default.number,ariaHideApp:u.default.bool,shouldFocusAfterRender:u.default.bool,shouldCloseOnOverlayClick:u.default.bool,shouldReturnFocusAfterClose:u.default.bool,preventScroll:u.default.bool,parentSelector:u.default.func,aria:u.default.object,data:u.default.object,role:u.default.string,contentLabel:u.default.string,shouldCloseOnEsc:u.default.bool,overlayRef:u.default.func,contentRef:u.default.func,id:u.default.string,overlayElement:u.default.func,contentElement:u.default.func},C.defaultProps={isOpen:!1,portalClassName:m,bodyOpenClassName:y,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,preventScroll:!1,parentSelector:function(){return document.body},overlayElement:function(e,t){return s.default.createElement("div",e,t)},contentElement:function(e,t){return s.default.createElement("div",e,t)}},C.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},(0,h.polyfill)(C),t.default=C},28747:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(67294),a=m(n(45697)),u=g(n(99685)),c=m(n(88338)),l=g(n(57149)),f=g(n(32409)),d=n(51112),h=m(d),p=m(n(89623));function g(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function m(e){return e&&e.__esModule?e:{default:e}}n(35063);var y={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},v=0,b=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setOverlayRef=function(e){n.overlay=e,n.props.overlayRef&&n.props.overlayRef(e)},n.setContentRef=function(e){n.content=e,n.props.contentRef&&n.props.contentRef(e)},n.afterClose=function(){var e=n.props,t=e.appElement,r=e.ariaHideApp,i=e.htmlOpenClassName,o=e.bodyOpenClassName,s=e.parentSelector,a=s&&s().ownerDocument||document;o&&f.remove(a.body,o),i&&f.remove(a.getElementsByTagName("html")[0],i),r&&v>0&&0===(v-=1)&&l.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(u.returnFocus(n.props.preventScroll),u.teardownScopedFocus()):u.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),p.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(u.setupScopedFocus(n.node),u.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.ke
vendor: 1,684 bytes, line 2
2yCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var r="object"===(void 0===t?"undefined":i(t))?t:{base:y[e],afterOpen:y[e]+"--after-open",beforeClose:y[e]+"--before-close"},o=r.base;return n.state.afterOpen&&(o=o+" "+r.afterOpen),n.state.beforeClose&&(o=o+" "+r.beforeClose),"string"==typeof t&&t?o+" "+t:o},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,r){return n[e+"-"+r]=t[r],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}
vendor: 4,735 bytes, line 2
2(t,e),o(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,r=e.htmlOpenClassName,i=e.bodyOpenClassName,o=e.parentSelector,s=o&&o().ownerDocument||document;i&&f.add(s.body,i),r&&f.add(s.getElementsByTagName("html")[0],r),n&&(v+=1,l.hide(t)),p.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,i=e.overlayClassName,o=e.defaultStyles,s=e.children,a=n?{}:o.content,u=i?{}:o.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",i),style:r({},u,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},l=r({id:t,ref:this.setContentRef,style:r({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",r({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),f=this.props.contentElement(l,s);return this.props.overlayElement(c,f)}}]),t}(s.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:a.default.bool.isRequired,defaultStyles:a.default.shape({content:a.default.object,overlay:a.default.object}),style:a.default.shape({content:a.default.object,overlay:a.default.object}),className:a.default.oneOfType([a.default.string,a.default.object]),overlayClassName:a.default.oneOfType([a.default.string,a.default.object]),parentSelector:a.default.func,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,ariaHideApp:a.default.bool,appElement:a.default.oneOfType([a.default.instanceOf(h.default),a.default.instanceOf(d.SafeHTMLCollection),a.default.instanceOf(d.SafeNodeList),a.default.arrayOf(a.default.instanceOf(h.default))]),onAfterOpen:a.default.func,onAfterClose:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,role:a.default.string,contentLabel:a.default.string,aria:a.default.object,data:a.default.object,children:a.default.node,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func,testId:a.default.string},t.default=b,e.exports=t.default},57149:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){a&&(a.removeAttribute?a.removeAttribute("aria-hidden"):null!=a.length?a.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(a).forEach((function(e){return e.removeAttribute("aria-hidden")})));a=null},t.log=function(){0},t.assertNodeList=u,t.setElement=function(e){var t=e;if("string"==typeof t&&s.canUseDOM){var n=document.querySelectorAll(t);u(n,t),t=n}return a=t||a},t.validateElement=c,t.hide=function(e){var t=!0,n=!1,r=void 0;try{for(var i,o=c(e)[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){i.value.setAttribute("aria-hidden","true")}}catch(s){n=!0,r=s}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}},t.show=function(e){var t=!0,n=!1,r=void 0;try{for(var i,o=c(e)[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){i.value.removeAttribute("aria-hidden")}}catch(s){n=!0,r=s}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}},t.documentNotReadyOrSSRTesting=function(){a=null};var r,i=n(42473),o=(r=i)&&r.__esModule?r:{default:r},s=n(51112);var a=null;function u(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function c(e){var t=e||a;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,o.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},35063:function(e,t,n){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[s,a],t=0;t<e.length;t++){var n=e[t];n&&(n.parentNode&&n.parentNode.removeChild(n))}s=a=null,u=[]},t.log=function(){console.log("bodyTrap ----------"),console.log(u.length);for(var e=[s,a],t=0;t<e.length;t++){var n=e[t]||{};console.log(n.nodeName,n.className,n.id)}console.log("edn bodyTrap ----------")};var r,i=n(89623),o=(r=i)&&r.__esModule?r:{default:r};var s=void 0,a=void 0,u=[];function c(){0!==u.length&&u[u.length-1].focusContent()}o.default.subscribe((function(e,t){s||a||((s=document.createElement("div")).setAttribute("data-react-modal-body-trap",""),s.style.position="absolute",s.style.opacity="0",s.setAttribute("tabindex","0"),s.addEventListener("focus",c),(a=s.cloneNode()).addEventListener("focus",c)),(u=t).length>0?(document.body.firstChild!==s&&document.body.insertBefore(s,document.body.firstChild),document.body.lastChild!==a&&document.body.appendChild(a)):(s.parentElement&&s.parentElement.removeChild(s),a.parentElement&&a.parentElement.removeChild(a))}))},32409:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in n)i(e,n[t]);var o=document.body;for(var s in r)i(o,r[s]);n={},r={}},t.log=function(){0};var n={},r={};function i(e,t){e.classList.remove(t)}t.add=function(e,t){return i=e.classList,o="html"==e.nodeName.toLowerCase()?n:r,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(o,e),i.add(e)}));var i,o},t.remove=function(e,t){return i=e.classList,o="html"==e.nodeName.toLowerCase()?n:r,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(o,e),0===o[e]&&i.remove(e)}));var i,o}},99685:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){s=[]},t.log=function(){0},t.handleBlur=c,t.handleFocus=l,t.markForFocusLater=function(){s.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==s.length&&(t=s.pop()).focus({preventScroll:e}))}catch(n){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){s.length>0&&s.pop()},t.setupScopedFocus=function(e){a=e,window.addEventListener?(window.addEventListener("blur",c,!1),document.addEventListener("focus",l,!0)):(window.attachEvent("onBlur",c),document.attachEvent("onFocus",l))},t.teardownScopedFocus=function(){a=null,window.addEventListener?(window.removeEventListener("blur",c),document.removeEventListener("focus",l)):(window.detachEvent("onBlur",c),document.detachEvent("onFocus",l))};var r,i=n(37845),o=(r=i)&&r.__esModule?r:{default:r};var s=[],a=null,u=!1;function c(){u=!0}function l(){if(u){if(u=!1,!a)return;setTimeout((function(){a.contains(document.activeElement)||((0,o.default)(a)[0]||a).focus()}),0)}}},89623:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(r.openInstances.length),r.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){r=new n};var n=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},r=new n;t.default=r},51112:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var r,i=n(58875);var o=((r=i)&&r.__esModule?r:{default:r}).default,s=o.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=o.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=o.canUseDOM?window.NodeList:{},t.canUseDOM=o.canUseDOM;t.default=s},88338:function(e,t,n){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,o.default)(e);if(!n.length)return void t.preventDefault();var r=void 0,i=t.shiftKey,a=n[0],u=n[n.length-1],c=s();if(e===c){if(!i)return;r=u}u!==c||i||(r=a);a===c&&i&&(r=u);if(r)return t.preventDefault(),void r.focus();var l=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null==l||"Chrome"==l[1]||null!=/\biPod\b|\biPad\b/g.exec(navigator.userAgent))return;var f=n.indexOf(c);f>-1&&(f+=i?-1:1);if(void 0===(r=n[f]))return t.preventDefault(),void(r=i?u:a).focus();t.preventDefault(),r.focus()};var r,i=n(37845),o=(r=i)&&r.__esModule?r:{default:r};function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?s(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},37845:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var n=[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]);return n.filter(a)};var n="none",r="contents",i=/input|select|textarea|button|object|iframe/;function o(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var i=window.getComputedStyle(e),o=i.getPropertyValue("display");return t?o!==r&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,i):o===n}catch(s){return console.warn("Failed to inspect element style"),!1}}function s(e,t){var n=e.nodeName.toLowerCase();return(i.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),o(t))return!1;t=t.parentNode}return!0}(e)}function a(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&s(e,!n)}e.exports=t.default},83253:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(29983),o=(r=i)&&r.__esModule?r:{default:r};t.default=o.default,e.exports=t.default},31304:function(e){var t;t=function(){var e=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","Â¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","Ã":"A","Ã":"A","Ã":"A","Ã":"A","Ã":"A","Ã
":"A","Ã":"AE","Ã":"C","Ã":"E","Ã":"E","Ã":"E","Ã":"E","Ã":"I","Ã":"I","Ã":"I","Ã":"I","Ã":"D","Ã":"N","Ã":"O","Ã":"O","Ã":"O","Ã":"O","Ã":"O","Ã":"O","Ã":"U","Ã":"U","Ã":"U","Ã":"U","Ã":"Y","Ã":"TH","Ã":"ss","à ":"a","á":"a","â":"a","ã":"a","ä":"a","Ã¥":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","Ã":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ä":"A","Ä":"a","Ä":"A","Ä":"a","Ä":"A","Ä
":"a","Ä":"C","Ä":"c","Ä":"C","Ä":"c","Ä":"D","Ä":"d","Ä":"DJ","Ä":"dj","Ä":"E","Ä":"e","Ä":"E","Ä":"e","Ä":"e","Ä":"e","Ä":"E","Ä":"e","Ä":"G","Ä":"g","Ä¢":"G","Ä£":"g","Ĩ":"I","Ä©":"i","Ī":"i","Ä«":"i","Ä®":"I","į":"i","İ":"I","ı":"i","Ķ":"k","Ä·":"k","Ä»":"L","ļ":"l","Ľ":"L","ľ":"l","Å":"L","Å":"l","Å":"N","Å":"n","Å
":"N","Å":"n","Å":"N","Å":"n","Å":"O","Å":"o","Å":"O","Å":"o","Å":"OE","Å":"oe","Å":"R","Å":"r","Å":"R","Å":"r","Å":"S","Å":"s","Å":"S","Å":"s","Å ":"S","Å¡":"s","Å¢":"T","Å£":"t","Ť":"T","Å¥":"t","Ũ":"U","Å©":"u","Ū":"u","Å«":"u","Å®":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Å´":"W","ŵ":"w","Ŷ":"Y","Å·":"y","Ÿ":"Y","Ź":"Z","ź":"z","Å»":"Z","ż":"z","Ž":"Z","ž":"z","Æ":"E","Æ":"f","Æ ":"O","Æ¡":"o","Ư":"U","ư":"u","Ç":"LJ","Ç":"lj","Ç":"NJ","Ç":"nj","È":"S","È":"s","È":"T","È":"t","É":"e","Ë":"o","Î":"A","Î":"E","Î":"H","Î":"I","Î":"O","Î":"Y","Î":"W","Î":"i","Î":"A","Î":"B","Î":"G","Î":"D","Î":"E","Î":"Z","Î":"H","Î":"8","Î":"I","Î":"K","Î":"L","Î":"M","Î":"N","Î":"3","Î":"O","Î ":"P","Ρ":"R","Σ":"S","Τ":"T","Î¥":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","Î":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","Ï":"p","Ï":"r","Ï":"s","Ï":"s","Ï":"t","Ï
":"y","Ï":"f","Ï":"x","Ï":"ps","Ï":"w","Ï":"i","Ï":"y","Ï":"o","Ï":"y","Ï":"w","Ð":"Yo","Ð":"DJ","Ð":"Ye","Ð":"I","Ð":"Yi","Ð":"J","Ð":"LJ","Ð":"NJ","Ð":"C","Ð":"DZ","Ð":"A","Ð":"B","Ð":"V","Ð":"G","Ð":"D","Ð":"E","Ð":"Zh","Ð":"Z","Ð":"I","Ð":"J","Ð":"K","Ð":"L","Ð":"M","Ð":"N","Ð":"O","Ð":"P","Ð ":"R","С":"S","Т":"T","У":"U","Ф":"F","Ð¥":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Ð":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","Ñ":"r","Ñ":"s","Ñ":"t","Ñ":"u","Ñ":"f","Ñ
":"h","Ñ":"c","Ñ":"ch","Ñ":"sh","Ñ":"sh","Ñ":"u","Ñ":"y","Ñ":"","Ñ":"e","Ñ":"yu","Ñ":"ya","Ñ":"yo","Ñ":"dj","Ñ":"ye","Ñ":"i","Ñ":"yi","Ñ":"j","Ñ":"lj","Ñ":"nj","Ñ":"c","Ñ":"u","Ñ":"dz","Ò":"G","Ò":"g","Ò":"GH","Ò":"gh","Ò":"KH","Ò":"kh","Ò¢":"NG","Ò£":"ng","Ò®":"UE","Ò¯":"ue","Ò°":"U","Ò±":"u","Òº":"H","Ò»":"h","Ó":"AE","Ó":"ae","Ó¨"
2:"OE","Ó©":"oe","Ô±":"A","Ô²":"B","Ô³":"G","Ô´":"D","Ôµ":"E","Ô¶":"Z","Ô·":"E\'","Ô¸":"Y\'","Ô¹":"T\'","Ôº":"JH","Ô»":"I","Ô¼":"L","Ô½":"X","Ô¾":"C\'","Ô¿":"K","Õ":"H","Õ":"D\'","Õ":"GH","Õ":"TW","Õ":"M","Õ
":"Y","Õ":"N","Õ":"SH","Õ":"CH","Õ":"P","Õ":"J","Õ":"R\'","Õ":"S","Õ":"V","Õ":"T","Õ":"R","Õ":"C","Õ":"P\'","Õ":"Q\'","Õ":"O\'\'","Õ":"F","Ö":"EV","Ø¡":"a","Ø¢":"aa","Ø£":"a","ؤ":"u","Ø¥":"i","ئ":"e","ا":"a","ب":"b","Ø©":"h","ت":"t","Ø«":"th","ج":"j","Ø":"h","Ø®":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","Ø´":"sh","ص":"s","ض":"dh","Ø·":"t","ظ":"z","ع":"a","غ":"gh","Ù":"f","Ù":"q","Ù":"k","Ù":"l","Ù
":"m","Ù":"n","Ù":"h","Ù":"w","Ù":"a","Ù":"y","Ù":"an","Ù":"on","Ù":"en","Ù":"a","Ù":"u","Ù":"e","Ù":"","Ù ":"0","Ù¡":"1","Ù¢":"2","Ù£":"3","Ù¤":"4","Ù¥":"5","Ù¦":"6","Ù§":"7","Ù¨":"8","Ù©":"9","Ù¾":"p","Ú":"ch","Ú":"zh","Ú©":"k","Ú¯":"g","Û":"y","Û°":"0","Û±":"1","Û²":"2","Û³":"3","Û´":"4","Ûµ":"5","Û¶":"6","Û·":"7","Û¸":"8","Û¹":"9","฿":"baht","á":"a","á":"b","á":"g","á":"d","á":"e","á":"v","á":"z","á":"t","á":"i","á":"k","á":"l","á":"m","á":"n","á":"o","á":"p","á":"zh","á ":"r","á¡":"s","á¢":"t","á£":"u","á¤":"f","á¥":"k","á¦":"gh","á§":"q","á¨":"sh","á©":"ch","áª":"ts","á«":"dz","á¬":"ts","á":"ch","á®":"kh","á¯":"j","á°":"h","á¹¢":"S","á¹£":"s","áº":"W","áº":"w","áº":"W","áº":"w","áº":"W","áº
":"w","áº":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","áº":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","á»":"E","á»":"e","á»":"E","á»":"e","á»":"E","á»
":"e","á»":"E","á»":"e","á»":"I","á»":"i","á»":"I","á»":"i","á»":"O","á»":"o","á»":"O","á»":"o","á»":"O","á»":"o","á»":"O","á»":"o","á»":"O","á»":"o","á»":"O","á»":"o","á»":"O","á»":"o","á»":"O","á»":"o","á»":"O","á»":"o","á»":"O","á»":"o","á» ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","á»§":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","á»":"u","á»®":"U","ữ":"u","á»°":"U","á»±":"u","Ỳ":"Y","ỳ":"y","á»´":"Y","ỵ":"y","á»¶":"Y","á»·":"y","Ỹ":"Y","ỹ":"y","â":"-","â":"\'","â":"\'","â":"\\"","â":"\\"","â":"\\"","â ":"+","â¢":"*","â¦":"...","â ":"ecu","â¢":"cruzeiro","â£":"french franc","â¤":"lira","â¥":"mill","â¦":"naira","â§":"peseta","â¨":"rupee","â©":"won","âª":"new shequel","â«":"dong","â¬":"euro","â":"kip","â®":"tugrik","â¯":"drachma","â°":"penny","â±":"peso","â²":"guarani","â³":"austral","â´":"hryvnia","âµ":"cedi","â¸":"kazakhstani tenge","â¹":"indian rupee","âº":"turkish lira","â½":"russian ruble","â¿":"bitcoin","â ":"sm","â¢":"tm","â":"d","â":"delta","â":"sum","â":"infinity","â¥":"love","å
":"yuan","å":"yen","ï·¼":"rial","ﻵ":"laa","ï»·":"laa","ﻹ":"lai","ï»»":"la"}'),t=JSON.parse('{"bg":{"Ð":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","Ñ":"ts","Ñ":"sht","Ñ":"a","Ñ":"y"},"de":{"Ã":"AE","ä":"ae","Ã":"OE","ö":"oe","Ã":"UE","ü":"ue","Ã":"ss","%":"prozent","&":"und","|":"oder","â":"summe","â":"unendlich","â¥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","â£":"francos","â":"suma","â":"infinito","â¥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","â£":"franc","â":"somme","â":"infini","â¥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","â":"soma","£":"libra","â":"infinito","â¥":"amor"},"uk":{"Ð":"Y","и":"y","Ð":"Y","й":"y","Ц":"Ts","Ñ":"ts","Ð¥":"Kh","Ñ
":"kh","Щ":"Shch","Ñ":"shch","Ð":"H","г":"h"},"vi":{"Ä":"D","Ä":"d"},"da":{"Ã":"OE","ø":"oe","Ã
":"AA","Ã¥":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Ã
":"AA","Ã":"AE","Ã":"OE","Ã¥":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Ã
":"AA","Ã":"AE","Ã":"OE","Ã¥":"aa","ä":"ae","ö":"oe"}}');function n(n,r){if("string"!=typeof n)throw new Error("slugify: string argument expected");var i=t[(r="string"==typeof r?{replacement:r}:r||{}).locale]||{},o=void 0===r.replacement?"-":r.replacement,s=void 0===r.trim||r.trim,a=n.normalize().split("").reduce((function(t,n){var s=i[n];return void 0===s&&(s=e[n]),void 0===s&&(s=n),s===o&&(s=" "),t+s.replace(r.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")}),"");return r.strict&&(a=a.replace(/[^A-Za-z0-9\s]/g,"")),s&&(a=a.trim()),a=a.replace(/\s+/g,o),r.lower&&(a=a.toLowerCase()),a}return n.extend=function(t){Object.assign(e,t)},n},e.exports=t(),e.exports.default=t()},52511:function(e,t,n){var r;e=n.nmd(e),function(i){t&&t.nodeType,e&&e.nodeType;var o="object"==typeof n.g&&n.g;o.global!==o&&o.window!==o&&o.self;var s,a=2147483647,u=36,c=1,l=26,f=38,d=700,h=72,p=128,g="-",m=/^xn--/,y=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >
2= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=u-c,S=Math.floor,C=String.fromCharCode;function E(e){throw RangeError(b[e])}function _(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function A(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+_((e=e.replace(v,".")).split("."),t).join(".")}function I(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function P(e){return _(e,(function(e){var t="";return e>65535&&(t+=C((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=C(e)})).join("")}function O(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function x(e,t,n){var r=0;for(e=n?S(e/d):e>>1,e+=S(e/t);e>w*l>>1;r+=u)e=S(e/w);return S(r+(w+1)*e/(e+f))}function T(e){var t,n,r,i,o,s,f,d,m,y,v,b=[],w=e.length,C=0,_=p,A=h;for((n=e.lastIndexOf(g))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&E("not-basic"),b.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<w;){for(o=C,s=1,f=u;i>=w&&E("invalid-input"),((d=(v=e.charCodeAt(i++))-48<10?v-22:v-65<26?v-65:v-97<26?v-97:u)>=u||d>S((a-C)/s))&&E("overflow"),C+=d*s,!(d<(m=f<=A?c:f>=A+l?l:f-A));f+=u)s>S(a/(y=u-m))&&E("overflow"),s*=y;A=x(C-o,t=b.length+1,0==o),S(C/t)>a-_&&E("overflow"),_+=S(C/t),C%=t,b.splice(C++,0,_)}return P(b)}function k(e){var t,n,r,i,o,s,f,d,m,y,v,b,w,_,A,P=[];for(b=(e=I(e)).length,t=p,n=0,o=h,s=0;s<b;++s)(v=e[s])<128&&P.push(C(v));for(r=i=P.length,i&&P.push(g);r<b;){for(f=a,s=0;s<b;++s)(v=e[s])>=t&&v<f&&(f=v);for(f-t>S((a-n)/(w=r+1))&&E("overflow"),n+=(f-t)*w,t=f,s=0;s<b;++s)if((v=e[s])<t&&++n>a&&E("overflow"),v==t){for(d=n,m=u;!(d<(y=m<=o?c:m>=o+l?l:m-o));m+=u)A=d-y,_=u-y,P.push(C(O(y+A%_,0))),d=S(A/_);P.push(C(O(d,0))),o=x(n,w,r==i),n=0,++r}++n,++t}return P.join("")}s={version:"1.3.2",ucs2:{decode:I,encode:P},decode:T,encode:k,toASCII:function(e){return A(e,(function(e){return y.test(e)?"xn--"+k(e):e}))},toUnicode:function(e){return A(e,(function(e){return m.test(e)?T(e.slice(4).toLowerCase()):e}))}},void 0===(r=function(){return s}.call(t,n,t,e))||(e.exports=r)}()},8575:function(e,t,n){"use strict";var r=n(52511),i=n(62502);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.Qc=b,t.WU=function(e){i.isString(e)&&(e=b(e));return e instanceof o?e.format():o.prototype.format.call(e)};var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),f=["%","/","?",";","#"].concat(l),d=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=n(17673);function b(e,t,n){if(e&&i.isObject(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,n),r}o.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",c=e.split(a);c[0]=c[0].replace(/\\/g,"/");var b=e=c.join(a);if(b=b.trim(),!n&&1===e.split("#").length){var w=u.exec(b);if(w)return this.path=b,this.href=b,this.pathname=w[1],w[2]?(this.search=w[2],this.query=t?v.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var S=s.exec(b);if(S){var C=(S=S[0]).toLowerCase();this.protocol=C,b=b.substr(S.length)}if(n||S||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var E="//"===b.substr(0,2);!E||S&&m[S]||(b=b.substr(2),this.slashes=!0)}if(!m[S]&&(E||S&&!y[S])){for(var _,A,I=-1,P=0;P<d.length;P++){-1!==(O=b.indexOf(d[P]))&&(-1===I||O<I)&&(I=O)}-1!==(A=-1===I?b.lastIndexOf("@"):b.lastIndexOf("@",I))&&(_=b.slice(0,A),b=b.slice(A+1),this.auth=decodeURIComponent(_)),I=-1;for(P=0;P<f.length;P++){var O;-1!==(O=b.indexOf(f[P]))&&(-1===I||O<I)&&(I=O)}-1===I&&(I=b.length),this.host=b.slice(0,I),b=b.slice(I),this.parseHost(),this.hostname=this.hostname||"";var x="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!x)for(var T=this.hostname.split(/\./),k=(P=0,T.length);P<k;P++){var U=T[P];if(U&&!U.match(h)){for(var D="",R=0,N=U.length;R<N;R++)U.charCodeAt(R)>127?D+="x":D+=U[R];if(!D.match(h)){var M=T.slice(0,P),F=T.slice(P+1),j=U.match(p);j&&(M.push(j[1]),F.unshift(j[2])),F.length&&(b="/"+F.join(".")+b),this.hostname=M.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),x||(this.hostname=r.toASCII(this.hostname));var L=this.port?":"+this.port:"",V=this.hostname||"";this.host=V+L,this.href+=this.host,x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!g[C])for(P=0,k=l.length;P<k;P++){var B=l[P];if(-1!==b.indexOf(B)){var q=encodeURIComponent(B);q===B&&(q=escape(B)),b=b.split(B).join(q)}}var K=b.indexOf("#");-1!==K&&(this.hash=b.substr(K),b=b.slice(0,K));var G=b.indexOf("?");if(-1!==G?(this.search=b.substr(G),this.query=b.substr(G+1),t&&(this.query=v.parse(this.query)),b=b.slice(0,G)):t&&(this.search="",this.query={}),b&&(this.pathname=b),y[C]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){L=this.pathname||"";var W=this.search||"";this.path=L+W}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,s="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(s=v.stringify(this.query));var a=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||y[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace("#","%23"))+r},o.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(i.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var n=new o,r=Object.keys(this),s=0;s<r.length;s++){var a=r[s];n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),c=0;c<u.length;c++){var l=u[c];"protocol"!==l&&(n[l]=e[l])}return y[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!y[e.protocol]){for(var f=Object.keys(e),d=0;d<f.length;d++){var h=f[d];n[h]=e[h]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||m[e.protocol])n.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),n.pathname=p.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var g=n.pathname||"",v=n.search||"";n.path=g+v}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var b=n.pathname&&"/"===n.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),S=w||b||n.host&&e.pathname,C=S,E=n.pathname&&n.pathname.split("/")||[],_=(p=e.pathname&&e.pathname.split("/")||[],n.protocol&&!y[n.protocol]);if(_&&(n.hostname="",n.port=null,n.host&&(""===E[0]?E[0]=n.host:E.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),S=S&&(""===p[0]||""===E[0])),w)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,E=p;else if(p.length)E||(E=[]),E.pop(),E=E.concat(p),n.search=e.search,n.query=e.query;else if(!i.isNullOrUndefined(e.search)){if(_)n.hostname=n.host=E.shift(),(x=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=x.shift(),n.host=n.hostname=x.shift());return n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!E.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var A=E.slice(-1)[0],I=(n.host||e.host||E.length>1)&&("."===A||".."===A)||""===A,P=0,O=E.length;O>=0;O--)"."===(A=E[O])?E.splice(O,1):".."===A?(E.splice(O,1),P++):P&&(E.splice(O,1),P--);if(!S&&!C)for(;P--;P)E.unshift("..");!S||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),I&&"/"!==E.join("/").substr(-1)&&E.push("");var x,T=""===E[0]||E[0]&&"/"===E[0].charAt(0);_&&(n.hostname=n.host=T?"":E.length?E.shift():"",(x=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=x.shift(),n.host=n.hostname=x.shift()));return(S=S||n.host&&E.length)&&!T&&E.unshift(""),E.length?n.pathname=E.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},62502:function(e){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},53250:function(e,t,n){"use strict";var r=n(67294);var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,s=r.useEffect,a=r.useLayoutEffect,u=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(r){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return a((function(){i.value=n,i.getSnapshot=t,c(i)&&l({inst:i})}),[e,n,t]),s((function(){return c(i)&&l({inst:i}),e((function(){c(i)&&l({inst:i})}))}),[e]),u(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},61688:function(e,t,n){"use strict";e.exports=n(53250)},42473:function(e){"use strict";var t=function(){};e.exports=t},56249:function(){},73897:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},63405:function(e,t,n){var r=n(73897);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.__esModule=!0,e.exports.default=e.exports},3515:function(e,t,n){var r=n(6015),i=n(69617);e.exports=function(e,t,n){if(i())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var s=new(e.bind.apply(e,o));return n&&r(s,n.prototype),s},e.exports.__esModule=!0,e.exports.default=e.exports},38416:function(e,t,n){var r=n(64062);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},69617:function(e){function t(){try{var n=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(n){}return(e.exports=t=function(){return!!n},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},79498:function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},42281:function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},70215:function(e,t,n){var r=n(7071);e.exports=function(e,t){if(null==e)return{};var n,i,o=r(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},e.exports.__esModule=!0,e.exports.default=e.exports},7071:function(e){e.exports=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i},e.exports.__esModule=!0,e.exports.default=e.exports},861:function(e,t,n){var r=n(63405),i=n(79498),o=n(86116),s=n(42281);e.exports=function(e){return r(e)||i(e)||o(e)||s()},e.exports.__esModule=!0,e.exports.default=e.exports},95036:function(e,t,n){var r=n(18698).default;e.exports=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},64062:function(e,t,n){var r=n(18698).default,i=n(95036);e.exports=function(e){var t=i(e,"string");return"symbol"==r(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},18698:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},86116:function(e,t,n){var r=n(73897);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},15761:function(e,t,n){"use strict";n.d(t,{j:function(){return s}});var r=n(33989),i=n(32161);class o extends r.l{constructor(){super(),this.setup=e=>{if(!i.sk&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),()=>{window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}
2onFocus(){this.listeners.forEach((({listener:e})=>{e()}))}isFocused(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)}}const s=new o},30819:function(e,t,n){"use strict";n.d(t,{_:function(){return r}});const r=console},89886:function(e,t,n){"use strict";n.d(t,{R:function(){return u},m:function(){return a}});var r=n(30819),i=n(30081),o=n(89643),s=n(72379);class a extends o.F{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||r._,this.observers=[],this.state=e.state||u(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter((t=>t!==e)),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||("loading"===this.state.status?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,t;return null!=(e=null==(t=this.retryer)?void 0:t.continue())?e:this.execute()}async execute(){const e=()=>{var e;return this.retryer=(0,s.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},t="loading"===this.state.status;try{var n,r,i,o,a,u,c,l;if(!t){var f,d,h,p;this.dispatch({type:"loading",variables:this.options.variables}),await(null==(f=(d=this.mutationCache.config).onMutate)?void 0:f.call(d,this.state.variables,this));const e=await(null==(h=(p=this.options).onMutate)?void 0:h.call(p,this.state.variables));e!==this.state.context&&this.dispatch({type:"loading",context:e,variables:this.state.variables})}const s=await e();return await(null==(n=(r=this.mutationCache.config).onSuccess)?void 0:n.call(r,s,this.state.variables,this.state.context,this)),await(null==(i=(o=this.options).onSuccess)?void 0:i.call(o,s,this.state.variables,this.state.context)),await(null==(a=(u=this.mutationCache.config).onSettled)?void 0:a.call(u,s,null,this.state.variables,this.state.context,this)),await(null==(c=(l=this.options).onSettled)?void 0:c.call(l,s,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:s}),s}catch(E){try{var g,m,y,v,b,w,S,C;throw await(null==(g=(m=this.mutationCache.config).onError)?void 0:g.call(m,E,this.state.variables,this.state.context,this)),await(null==(y=(v=this.options).onError)?void 0:y.call(v,E,this.state.variables,this.state.context)),await(null==(b=(w=this.mutationCache.config).onSettled)?void 0:b.call(w,void 0,E,this.state.variables,this.state.context,this)),await(null==(S=(C=this.options).onSettled)?void 0:S.call(C,void 0,E,this.state.variables,this.state.context)),E}finally{this.dispatch({type:"error",error:E})}}}dispatch(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"loading":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!(0,s.Kw)(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...t,...e.state}}})(this.state),i.V.batch((()=>
2{this.observers.forEach((t=>{t.onMutationUpdate(e)})),this.mutationCache.notify({mutation:this,type:"updated",action:e})}))}}function u(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}},30081:function(e,t,n){"use strict";n.d(t,{V:function(){return i}});var r=n(32161);const i=function(){let e=[],t=0,n=e=>{e()},i=e=>{e()};const o=i=>{t?e.push(i):(0,r.A4)((()=>{n(i)}))},s=()=>{const t=e;e=[],t.length&&(0,r.A4)((()=>{i((()=>{t.forEach((e=>{n(e)}))}))}))};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||s()}return n},batchCalls:e=>(...t)=>{o((()=>{e(...t)}))},schedule:o,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{i=e}}}()},96474:function(e,t,n){"use strict";n.d(t,{N:function(){return a}});var r=n(33989),i=n(32161);const o=["online","offline"];class s extends r.l{constructor(){super(),this.setup=e=>{if(!i.sk&&window.addEventListener){const t=()=>e();return o.forEach((e=>{window.addEventListener(e,t,!1)})),()=>{o.forEach((e=>{window.removeEventListener(e,t)}))}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((e=>{"boolean"==typeof e?this.setOnline(e):this.onOnline()}))}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach((({listener:e})=>{e()}))}isOnline(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine}}const a=new s},89643:function(e,t,n){"use strict";n.d(t,{F:function(){return i}});var r=n(32161);class i{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,r.PN)(this.cacheTime)&&(this.gcTimeout=setTimeout((()=>{this.optionalRemove()}),this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,null!=e?e:r.sk?1/0:3e5)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}},72379:function(e,t,n){"use strict";n.d(t,{DV:function(){return c},Kw:function(){return a},Mz:function(){return l}});var r=n(15761),i=n(96474),o=n(32161);function s(e){return Math.min(1e3*2**e,3e4)}function a(e){return"online"!==(null!=e?e:"online")||i.N.isOnline()}class u{constructor(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}}function c(e){return e instanceof u}function l(e){let t,n,c,l=!1,f=0,d=!1;const h=new Promise(((e,t)=>{n=e,c=t})),p=()=>!r.j.isFocused()||"always"!==e.networkMode&&!i.N.isOnline(),g=r=>{d||(d=!0,null==e.onSuccess||e.onSuccess(r),null==t||t(),n(r))},m=n=>{d||(d=!0,null==e.onError||e.onError(n),null==t||t(),c(n))},y=()=>new Promise((n=>{t=e=>{const t=d||!p();return t&&n(e),t},null==e.onPause||e.onPause()})).then((()=>{t=void 0,d||null==e.onContinue||e.onContinue()})),v=()=>{if(d)return;let t;try{t=e.fn()}catch(n){t=Promise.reject(n)}Promise.resolve(t).then(g).catch((t=>{var n,r;if(d)return;const i=null!=(n=e.retry)?n:3,a=null!=(r=e.retryDelay)?r:s,u="function"==typeof a?a(f,t):a,c=!0===i||"number"==typeof i&&f<i||"function"==typeof i&&i(f,t);!l&&c?(f++,null==e.onFail||e.onFail(f,t),(0,o.Gh)(u).then((()=>
2{if(p())return y()})).then((()=>{l?m(t):v()}))):m(t)}))};return a(e.networkMode)?v():y().then(v),{promise:h,cancel:t=>{d||(m(new u(t)),null==e.abort||e.abort())},continue:()=>(null==t?void 0:t())?h:Promise.resolve(),cancelRetry:()=>{l=!0},continueRetry:()=>{l=!1}}}},33989:function(e,t,n){"use strict";n.d(t,{l:function(){return r}});class r{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const t={listener:e};return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}},32161:function(e,t,n){"use strict";n.d(t,{A4:function(){return _},G9:function(){return A},Gh:function(){return E},I6:function(){return l},Kp:function(){return a},PN:function(){return s},Rm:function(){return h},SE:function(){return o},VS:function(){return v},X7:function(){return d},ZT:function(){return i},_v:function(){return u},_x:function(){return f},lV:function(){return c},oE:function(){return I},sk:function(){return r},to:function(){return g},yF:function(){return p}});const r="undefined"==typeof window||"Deno"in window;function i(){}function o(e,t){return"function"==typeof e?e(t):e}function s(e){return"number"==typeof e&&e>=0&&e!==1/0}function a(e,t){return Math.max(e+(t||0)-Date.now(),0)}function u(e,t,n){return C(e)?"function"==typeof t?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function c(e,t,n){return C(e)?"function"==typeof t?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:"function"==typeof e?{...t,mutationFn:e}:{...e}}function l(e,t,n){return C(e)?[{...t,queryKey:e},n]:[e||{},t]}function f(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(C(s))if(r){if(t.queryHash!==h(s,t.options))return!1}else if(!g(t.queryKey,s))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&((void 0===i||i===t.state.fetchStatus)&&!(o&&!o(t)))}function d(e,t){const{exact:n,fetching:r,predicate:i,mutationKey:o}=e;if(C(o)){if(!t.options.mutationKey)return!1;if(n){if(p(t.options.mutationKey)!==p(o))return!1}else if(!g(t.options.mutationKey,o))return!1}return("boolean"!=typeof r||"loading"===t.state.status===r)&&!(i&&!i(t))}function h(e,t){return((null==t?void 0:t.queryKeyHashFn)||p)(e)}function p(e){return JSON.stringify(e,((e,t)=>w(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))}function g(e,t){return m(e,t)}function m(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((n=>!m(e[n],t[n]))))}function y(e,t){if(e===t)return e;const n=b(e)&&b(t);if(n||w(e)&&w(t)){const r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),o=i.length,s=n?[]:{};let a=0;for(let u=0;u<o;u++){const r=n?u:i[u];s[r]=y(e[r],t[r]),s[r]===e[r]&&a++}return r===o&&a===r?e:s}return t}function v(e,t){if(e&&!t||t&&!e)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function b(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function w(e){if(!S(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!S(n)&&!!n.hasOwnProperty("isPrototypeOf")}function S(e){return"[object Object]"===Object.prototype.toString.call(e)}function C(e){return Array.isArray(e)}function E(e){return new Promise((t=>{setTimeout(t,e)}))}function _(e){E(0).then(e)}function A(){if("function"==typeof AbortController)return new AbortController}function I(e,t,n){return null!=n.isDataEqual&&n.isDataEqual(e,t)?e:"function"==typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?y(e,t):t}},85945:function(e,t,n){"use strict";n.d(t,{NL:function(){return a},aH:function(){return u}});var r=n(67294);const i=r.createContext(void 0),o=r.createContext(!1);function s(e,t){return e||(t&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=i),window.ReactQueryClientContext):i)}const a=({context:e}={})=>{const t=r.useContext(s(e,r.useContext(o)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},u=({client:e,children:t,context:n,contextSharing:i=!1})=>{r.useEffect((()=>(e.mount(),()=>{e.unmount()})),[e]);const a=s(n,i);return r.createElement(o.Provider,{value:!n&&i},r.createElement(a.Provider,{value:e},t))}},64469:function(e,t,n){"use strict";n.d(t,{D:function(){return d}});var r=n(67294),i=n(32161),o=n(89886),s=n(30081),a=n(33989);class u extends a.l{constructor(e,t){super(),this.client=e,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const n=this.options;this.options=this.client.defaultMutationOptions(e),(0,i.VS)(n,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),null==(t=this.currentMutation)||t.setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||(null==(e=this.currentMutation)||e.removeObserver(this))}onMutationUpdate(e){this.updateResult();const t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:void 0!==e?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const e=this.currentMutation?this.currentMutation.state:(0,o.R)(),t={...e,isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(e){s.V.batch((()=>{var t,n,r,i;if(this.mutateOptions&&this.hasListeners())if(e.onSuccess)null==(t=(n=this.mutateOptions).onSuccess)||t.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),null==(r=(i=this.mutateOptions).onSettled)||r.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context);else if(e.onError){var o,s,a,u;null==(o=(s=this.mutateOptions).onError)||o.call(s,this.currentResult.error,this.currentResult.variables,this.currentResult.context),null==(a=(u=this.mutateOptions).onSettled)||a.call(u,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}
2e.listeners&&this.listeners.forEach((({listener:e})=>{e(this.currentResult)}))}))}}var c=n(464),l=n(85945),f=n(24798);function d(e,t,n){const o=(0,i.lV)(e,t,n),a=(0,l.NL)({context:o.context}),[d]=r.useState((()=>new u(a,o)));r.useEffect((()=>{d.setOptions(o)}),[d,o]);const p=(0,c.$)(r.useCallback((e=>d.subscribe(s.V.batchCalls(e))),[d]),(()=>d.getCurrentResult()),(()=>d.getCurrentResult())),g=r.useCallback(((e,t)=>{d.mutate(e,t).catch(h)}),[d]);if(p.error&&(0,f.L)(d.options.useErrorBoundary,[p.error]))throw p.error;return{...p,mutate:g,mutateAsync:p.mutate}}function h(){}},69451:function(e,t,n){"use strict";n.d(t,{a:function(){return O}});var r=n(32161),i=n(30081),o=n(15761),s=n(33989),a=n(72379);class u extends s.l{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.currentQuery.addObserver(this),c(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return l(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return l(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){const n=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),(0,r.VS)(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const o=this.hasListeners();o&&f(this.currentQuery,i,this.options,n)&&this.executeFetch(),this.updateResult(t),!o||this.currentQuery===i&&this.options.enabled===n.enabled&&this.options.staleTime===n.staleTime||this.updateStaleTimeout();const s=this.computeRefetchInterval();!o||this.currentQuery===i&&this.options.enabled===n.enabled&&s===this.currentRefetchInterval||this.updateRefetchInterval(s)}getOptimisticResult(e){const t=this.client.getQueryCache().build(this.client,e),n=this.createResult(t,e);return function(e,t,n){if(n.keepPreviousData)return!1;if(void 0!==n.placeholderData)return t.isPlaceholderData;if(!(0,r.VS)(e.getCurrentResult(),t))return!0;return!1}(this,n,e)&&(this.currentResult=n,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),n}getCurrentResult(){return this.currentResult}trackResult(e){const t={};return Object.keys(e).forEach((n=>{Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})})),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){const t=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,t);return n.isFetchingOptimistic=!0,n.fetch().then((()=>this.createResult(n,t)))}fetch(e){var t;return this.executeFetch({...e,cancelRefetch:null==(t=e.cancelRefetch)||t}).then((()=>(this.updateResult(),this.currentResult)))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return null!=e&&e.throwOnError||(t=t.catch(r.ZT)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),r.sk||this.currentResult.isStale||!(0,r.PN)(this.options.staleTime))return;const e=(0,r.Kp)(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout((()=>{this.currentResult.isStale||this.updateResult()}),e)}computeRefetchInterval(){var e;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!r.sk&&!1!==this.options.enabled&&(0,r.PN)(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval((()=>
2{(this.options.refetchIntervalInBackground||o.j.isFocused())&&this.executeFetch()}),this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,t){const n=this.currentQuery,i=this.options,o=this.currentResult,s=this.currentResultState,u=this.currentResultOptions,l=e!==n,h=l?e.state:this.currentQueryInitialState,p=l?this.currentResult:this.previousQueryResult,{state:g}=e;let m,{dataUpdatedAt:y,error:v,errorUpdatedAt:b,fetchStatus:w,status:S}=g,C=!1,E=!1;if(t._optimisticResults){const r=this.hasListeners(),o=!r&&c(e,t),s=r&&f(e,n,t,i);(o||s)&&(w=(0,a.Kw)(e.options.networkMode)?"fetching":"paused",y||(S="loading")),"isRestoring"===t._optimisticResults&&(w="idle")}if(t.keepPreviousData&&!g.dataUpdatedAt&&null!=p&&p.isSuccess&&"error"!==S)m=p.data,y=p.dataUpdatedAt,S=p.status,C=!0;else if(t.select&&void 0!==g.data)if(o&&g.data===(null==s?void 0:s.data)&&t.select===this.selectFn)m=this.selectResult;else try{this.selectFn=t.select,m=t.select(g.data),m=(0,r.oE)(null==o?void 0:o.data,m,t),this.selectResult=m,this.selectError=null}catch(P){0,this.selectError=P}else m=g.data;if(void 0!==t.placeholderData&&void 0===m&&"loading"===S){let e;if(null!=o&&o.isPlaceholderData&&t.placeholderData===(null==u?void 0:u.placeholderData))e=o.data;else if(e="function"==typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),this.selectError=null}catch(P){0,this.selectError=P}void 0!==e&&(S="success",m=(0,r.oE)(null==o?void 0:o.data,e,t),E=!0)}this.selectError&&(v=this.selectError,m=this.selectResult,b=Date.now(),S="error");const _="fetching"===w,A="loading"===S,I="error"===S;return{status:S,fetchStatus:w,isLoading:A,isSuccess:"success"===S,isError:I,isInitialLoading:A&&_,data:m,dataUpdatedAt:y,error:v,errorUpdatedAt:b,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:_,isRefetching:_&&!A,isLoadingError:I&&0===g.dataUpdatedAt,isPaused:"paused"===w,isPlaceholderData:E,isPreviousData:C,isRefetchError:I&&0!==g.dataUpdatedAt,isStale:d(e,t),refetch:this.refetch,remove:this.remove}}updateResult(e){const t=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,(0,r.VS)(n,t))return;this.currentResult=n;const i={cache:!0};!1!==(null==e?void 0:e.listeners)&&(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options,n="function"==typeof e?e():e;if("all"===n||!n&&!this.trackedProps.size)return!0;const r=new Set(null!=n?n:this.trackedProps);return this.options.useErrorBoundary&&r.add("error"),Object.keys(this.currentResult).some((e=>{const n=e;return this.currentResult[n]!==t[n]&&r.has(n)}))})()&&(i.listeners=!0),this.notify({...i,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const t={};"success"===e.type?t.onSuccess=!e.manual:"error"!==e.type||(0,a.DV)(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(e){i.V.batch((()=>{var t,n,r,i;if(e.onSuccess)null==(t=(n=this.options).onSuccess)||t.call(n,this.currentResult.data),null==(r=(i=this.options).onSettled)||r.call(i,this.currentResult.data,null);else if(e.onError){var o,s,a,u;null==(o=(s=this.options).onError)||o.call(s,this.currentResult.error),null==(a=(u=this.options).onSettled)||a.call(u,void 0,this.currentResult.error)}
2e.listeners&&this.listeners.forEach((({listener:e})=>{e(this.currentResult)})),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})}))}}function c(e,t){return function(e,t){return!(!1===t.enabled||e.state.dataUpdatedAt||"error"===e.state.status&&!1===t.retryOnMount)}(e,t)||e.state.dataUpdatedAt>0&&l(e,t,t.refetchOnMount)}function l(e,t,n){if(!1!==t.enabled){const r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&d(e,t)}return!1}function f(e,t,n,r){return!1!==n.enabled&&(e!==t||!1===r.enabled)&&(!n.suspense||"error"!==e.state.status)&&d(e,n)}function d(e,t){return e.isStaleByTime(t.staleTime)}var h=n(67294),p=n(464);function g(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const m=h.createContext(g()),y=()=>h.useContext(m);var v=n(85945);const b=h.createContext(!1),w=()=>h.useContext(b);b.Provider;var S=n(24798);const C=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},E=e=>{h.useEffect((()=>{e.clearReset()}),[e])},_=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&(0,S.L)(n,[e.error,r]),A=e=>{e.suspense&&"number"!=typeof e.staleTime&&(e.staleTime=1e3)},I=(e,t,n)=>(null==e?void 0:e.suspense)&&((e,t)=>e.isLoading&&e.isFetching&&!t)(t,n),P=(e,t,n)=>t.fetchOptimistic(e).then((({data:t})=>{null==e.onSuccess||e.onSuccess(t),null==e.onSettled||e.onSettled(t,null)})).catch((t=>{n.clearReset(),null==e.onError||e.onError(t),null==e.onSettled||e.onSettled(void 0,t)}));function O(e,t,n){return function(e,t){const n=(0,v.NL)({context:e.context}),r=w(),o=y(),s=n.defaultQueryOptions(e);s._optimisticResults=r?"isRestoring":"optimistic",s.onError&&(s.onError=i.V.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=i.V.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=i.V.batchCalls(s.onSettled)),A(s),C(s,o),E(o);const[a]=h.useState((()=>new t(n,s))),u=a.getOptimisticResult(s);if((0,p.$)(h.useCallback((e=>{const t=r?()=>{}:a.subscribe(i.V.batchCalls(e));return a.updateResult(),t}),[a,r]),(()=>a.getCurrentResult()),(()=>a.getCurrentResult())),h.useEffect((()=>{a.setOptions(s,{listeners:!1})}),[s,a]),I(s,u,r))throw P(s,a,o);if(_({result:u,errorResetBoundary:o,useErrorBoundary:s.useErrorBoundary,query:a.getCurrentQuery()}))throw u.error;return s.notifyOnChangeProps?u:a.trackResult(u)}((0,r._v)(e,t,n),u)}},464:function(e,t,n){"use strict";n.d(t,{$:function(){return r}});const r=n(61688).useSyncExternalStore},24798:function(e,t,n){"use strict";function r(e,t){return"function"==typeof e?e(...t):!!e}n.d(t,{L:function(){return r}})},87536:function(e,t,n){"use strict";n.d(t,{cI:function(){return Ee}});var r=n(67294),i=e=>"checkbox"===e.type,o=e=>e instanceof Date,s=e=>null==e;const a=e=>"object"==typeof e;var u=e=>!s(e)&&!Array.isArray(e)&&a(e)&&!o(e),c=e=>u(e)&&e.target?i(e.target)?e.target.checked:e.target.value:e,l=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),f=e=>{const t=e.constructor&&e.constructor.prototype;return u(t)&&t.hasOwnProperty("isPrototypeOf")},d="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function h(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(d&&(e instanceof Blob||e instanceof FileList)||!n&&!u(e))return e;if(t=n?[]:{},n||f(e))for(const n in e)e.hasOwnProperty(n)&&(t[n]=h(e[n]));else t=e}return t}var p=e=>Array.isArray(e)?e.filter(Boolean):[],g=e=>void 0===e,m=(e,t,n)=>{if(!t||!u(e))return n;const r=p(t.split(/[,[\].]+?/)).reduce(((e,t)=>s(e)?e:e[t]),e);return g(r)||r===e?g(e[t])?n:e[t]:r},y=e=>"boolean"==typeof e;const v={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},b={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},w="max",S="min",C="maxLength",E="minLength",_="pattern",A="required",I="validate";r.createContext(null);var P=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const i=o;return t._proxyFormState[i]!==b.all&&(t._proxyFormState[i]=!r||b.all),n&&(n[i]=!0),e[i]}});return i},O=e=>u(e)&&!Object.keys(e).length,x=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return O(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find((e=>t[e]===(!r||b.all)))},T=e=>Array.isArray(e)?e:[e];function k(e){const t=r.useRef(e);t.current=e,r.useEffect((()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}}),[e.disabled])}var U=e=>"string"==typeof e,D=(e,t,n,r,i)=>U(e)?(r&&t.watch.add(e),m(n,e,i)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),m(n,e)))):(r&&(t.watchAll=!0),n);var R=e=>/^\w*$/.test(e),N=e=>p(e.replace(/["|']|\]/g,"").split(/\.|\[/)),M=(e,t,n)=>{let r=-1;const i=R(t)?[t]:N(t),o=i.length,s=o-1;for(;++r<o;){const t=i[r];let o=n;if(r!==s){const n=e[t];o=u(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}e[t]=o,e=e[t]}return e};var F=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},j=e=>({isOnSubmit:!e||e===b.onSubmit,isOnBlur:e===b.onBlur,isOnChange:e===b.onChange,isOnAll:e===b.all,isOnTouch:e===b.onTouched}),L=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))));const V=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const n=m(e,i);if(n){const{_f:e,...o}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r)break;
vendor: 7,768 bytes, line 2
2if(e.ref&&t(e.ref,e.name)&&!r)break;V(o,t)}else u(o)&&V(o,t)}}};var B=(e,t,n)=>{const r=p(m(e,n));return M(r,"root",t[n]),M(e,n,r),e},q=e=>"file"===e.type,K=e=>"function"==typeof e,G=e=>{if(!d)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},W=e=>U(e),H=e=>"radio"===e.type,Q=e=>e instanceof RegExp;const $={value:!1,isValid:!1},z={value:!0,isValid:!0};var Y=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!g(e[0].attributes.value)?g(e[0].value)||""===e[0].value?z:{value:e[0].value,isValid:!0}:z:$}return $};const Z={isValid:!1,value:null};var J=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),Z):Z;function X(e,t,n="validate"){if(W(e)||Array.isArray(e)&&e.every(W)||y(e)&&!e)return{type:n,message:W(e)?e:"",ref:t}}var ee=e=>u(e)&&!Q(e)?e:{value:e,message:""},te=async(e,t,n,r,o)=>{const{ref:a,refs:c,required:l,maxLength:f,minLength:d,min:h,max:p,pattern:v,validate:b,name:P,valueAsNumber:x,mount:T,disabled:k}=e._f,D=m(t,P);if(!T||k)return{};const R=c?c[0]:a,N=e=>{r&&R.reportValidity&&(R.setCustomValidity(y(e)?"":e||""),R.reportValidity())},M={},j=H(a),L=i(a),V=j||L,B=(x||q(a))&&g(a.value)&&g(D)||G(a)&&""===a.value||""===D||Array.isArray(D)&&!D.length,$=F.bind(null,P,n,M),z=(e,t,n,r=C,i=E)=>{const o=e?t:n;M[P]={type:e?r:i,message:o,ref:a,...$(e?r:i,o)}};if(o?!Array.isArray(D)||!D.length:l&&(!V&&(B||s(D))||y(D)&&!D||L&&!Y(c).isValid||j&&!J(c).isValid)){const{value:e,message:t}=W(l)?{value:!!l,message:l}:ee(l);if(e&&(M[P]={type:A,message:t,ref:R,...$(A,t)},!n))return N(t),M}if(!(B||s(h)&&s(p))){let e,t;const r=ee(p),i=ee(h);if(s(D)||isNaN(D)){const n=a.valueAsDate||new Date(D),o=e=>new Date((new Date).toDateString()+" "+e),s="time"==a.type,u="week"==a.type;U(r.value)&&D&&(e=s?o(D)>o(r.value):u?D>r.value:n>new Date(r.value)),U(i.value)&&D&&(t=s?o(D)<o(i.value):u?D<i.value:n<new Date(i.value))}else{const n=a.valueAsNumber||(D?+D:D);s(r.value)||(e=n>r.value),s(i.value)||(t=n<i.value)}if((e||t)&&(z(!!e,r.message,i.message,w,S),!n))return N(M[P].message),M}if((f||d)&&!B&&(U(D)||o&&Array.isArray(D))){const e=ee(f),t=ee(d),r=!s(e.value)&&D.length>+e.value,i=!s(t.value)&&D.length<+t.value;if((r||i)&&(z(r,e.message,t.message),!n))return N(M[P].message),M}if(v&&!B&&U(D)){const{value:e,message:t}=ee(v);if(Q(e)&&!D.match(e)&&(M[P]={type:_,message:t,ref:a,...$(_,t)},!n))return N(t),M}if(b)if(K(b)){const e=X(await b(D,t),R);if(e&&(M[P]={...e,...$(I,e.message)},!n))return N(e.message),M}else if(u(b)){let e={};for(const r in b){if(!O(e)&&!n)break;const i=X(await b[r](D,t),R,r);i&&(e={...i,...$(r,i.message)},N(i.message),n&&(M[P]=e))}if(!O(e)&&(M[P]={ref:R,...e},!n))return M}return N(!0),M};function ne(e,t){const n=Array.isArray(t)?t:R(t)?[t]:N(t),r=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=g(e)?r++:e[t[r++]];return e}(e,n),i=n.length-1,o=n[i];return r&&delete r[o],0!==i&&(u(r)&&O(r)||Array.isArray(r)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!g(e[t]))return!1;return!0}(r))&&ne(e,n.slice(0,-1)),e}var re=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}},ie=e=>s(e)||!a(e);function oe(e,t){if(ie(e)||ie(t))return e===t;if(o(e)&&o(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const n=e[i];if(!r.includes(i))return!1;if("ref"!==i){const e=t[i];if(o(n)&&o(e)||u(n)&&u(e)||Array.isArray(n)&&Array.isArray(e)?!oe(n,e):n!==e)return!1}}return!0}var se=e=>"select-multiple"===e.type,ae=e=>H(e)||i(e),ue=e=>G(e)&&e.isConnected,ce=e=>{for(const t in e)if(K(e[t]))return!0;return!1};function le(e,t={}){const n=Array.isArray(e);if(u(e)||n)for(const r in e)Array.isArray(e[r])||u(e[r])&&!ce(e[r])?(t[r]=Array.isArray(e[r])?[]:{},le(e[r],t[r])):s(e[r])||(t[r]=!0);return t}function fe(e,t,n){const r=Array.isArray(e);if(u(e)||r)for(const i in e)Array.isArray(e[i])||u(e[i])&&!ce(e[i])?g(t)||ie(n[i])?n[i]=Array.isArray(e[i])?le(e[i],[]):{...le(e[i])}:fe(e[i],s(t)?{}:t[i],n[i]):n[i]=!oe(e[i],t[i]);return n}var de=(e,t)=>fe(e,t,le(t)),he=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>g(e)?e:t?""===e?NaN:e?+e:e:n&&U(e)?new Date(e):r?r(e):e;function pe(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return q(t)?t.files:H(t)?J(e.refs).value:se(t)?[...t.selectedOptions].map((({value:e})=>e)):i(t)?Y(e.refs).value:he(g(t.value)?e.ref.value:t.value,e)}var ge=(e,t,n,r)=>{const i={};for(const o of e){const e=m(t,o);e&&M(i,o,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},me=e=>g(e)?e:Q(e)?e.source:u(e)?Q(e.value)?e.value.source:e.value:e,ye=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function ve(e,t,n){const r=m(e,n);if(r||R(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),o=m(t,r),s=m(e,r);if(o&&!Array.isArray(o)&&n!==r)return{name:n};if(s&&s.type)return{name:r,error:s};i.pop()}return{name:n}}var be=(e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e),we=(e,t)=>!p(m(e,t)).length&&ne(e,t);const Se={mode:b.onSubmit,reValidateMode:b.onChange,shouldFocusError:!0};function Ce(e={},t){let n,r={...Se,...e},a={submitCount:0,isDirty:!1,isLoading:K(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:r.errors||{},disabled:r.disabled||!1},f={},w=(u(r.defaultValues)||u(r.values))&&h(r.defaultValues||r.values)||{},S=r.shouldUnregister?{}:h(w),C={action:!1,mount:!1,watch:!1},E={mount:new Set,unMount:new Set,array:new Set,watch:new Set},_=0;const A={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},I={values:re(),array:re(),state:re()},P=j(r.mode),x=j(r.reValidateMode),k=r.criteriaMode===b.all,R=async e=>{if(A.isValid||e){const e=r.resolver?O((await Q()).errors):await $(f,!0);e!==a.isValid&&I.state.next({isValid:e})}},N=e=>A.isValidating&&I.state.next({isValidating:e}),F=(e,t,n,r)=>{const i=m(f,e);if(i){const o=m(S,e,g(n)?m(w,e):n);g(o)||r&&r.defaultChecked||t?M(S,e,t?o:pe(i._f)):Z(e,o),C.mount&&R()}},W=(e,t,n,r,i)=>{let o=!1,s=!1;const u={name:e},c=!(!m(f,e)||!m(f,e)._f.disabled);if(!n||r){A.isDirty&&(s=a.isDirty,a.isDirty=u.isDirty=z(),o=s!==u.isDirty);const n=c||oe(m(w,e),t);s=!(c||!m(a.dirtyFields,e)),n||c?ne(a.dirtyFields,e):M(a.dirtyFields,e,!0),u.dirtyFields=a.dirtyFields,o=o||A.dirtyFields&&s!==!n}if(n){const t=m(a.touchedFields,e);t||(M(a.touchedFields,e,n),u.touchedFields=a.touchedFields,o=o||A.touchedFields&&t!==n)}return o&&i&&I.state.next(u),o?u:{}},H=(t,r,i,o)=>{const s=m(a.errors,t),u=A.isValid&&y(r)&&a.isValid!==r;var c;if(e.delayError&&i?(c=()=>((e,t)=>{M(a.errors,e,t),I.state.next({errors:a.errors})})(t,i),n=e=>{clearTimeout(_),_=setTimeout(c,e)},n(e.delayError)):(clearTimeout(_),n=null,i?M(a.errors,t,i):ne(a.errors,t)),(i?!oe(s,i):s)||!O(o)||u){const e={...o,...u&&y(r)?{isValid:r}:{},errors:a.errors,name:t};a={...a,...e},I.state.next(e)}N(!1)},Q=async e=>r.resolver(S,r.context,ge(e||E.mount,f,r.criteriaMode,r.shouldUseNativeValidation)),$=async(e,t,n={valid:!0})=>{for(const i in e){const o=e[i];if(o){const{_f:e,...i}=o;if(e){const i=E.array.has(e.name),s=await te(o,S,k,r.shouldUseNativeValidation&&!t,i);if(s[e.name]&&(n.valid=!1,t))break;!t&&(m(s,e.name)?i?B(a.errors,s,e.name):M(a.errors,e.name,s[e.name]):ne(a.errors,e.name))}i&&await $(i,t,n)}}return n.valid},z=(e,t)=>
2(e&&t&&M(S,e,t),!oe(fe(),w)),Y=(e,t,n)=>D(e,E,{...C.mount?S:g(t)?w:U(e)?{[e]:t}:t},n,t),Z=(e,t,n={})=>{const r=m(f,e);let o=t;if(r){const n=r._f;n&&(!n.disabled&&M(S,e,he(t,n)),o=G(n.ref)&&s(t)?"":t,se(n.ref)?[...n.ref.options].forEach((e=>e.selected=o.includes(e.value))):n.refs?i(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(o)?!!o.find((t=>t===e.value)):o===e.value))):n.refs[0]&&(n.refs[0].checked=!!o):n.refs.forEach((e=>e.checked=e.value===o)):q(n.ref)?n.ref.value="":(n.ref.value=o,n.ref.type||I.values.next({name:e,values:{...S}})))}(n.shouldDirty||n.shouldTouch)&&W(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&le(e)},J=(e,t,n)=>{for(const r in t){const i=t[r],s=`${e}.${r}`,a=m(f,s);!E.array.has(e)&&ie(i)&&(!a||a._f)||o(i)?Z(s,i,n):J(s,i,n)}},X=(e,n,r={})=>{const i=m(f,e),o=E.array.has(e),u=h(n);M(S,e,u),o?(I.array.next({name:e,values:{...S}}),(A.isDirty||A.dirtyFields)&&r.shouldDirty&&I.state.next({name:e,dirtyFields:de(w,S),isDirty:z(e,u)})):!i||i._f||s(u)?Z(e,u,r):J(e,u,r),L(e,E)&&I.state.next({...a}),I.values.next({name:e,values:{...S}}),!C.mount&&t()},ee=async e=>{const t=e.target;let i=t.name,o=!0;const s=m(f,i),u=e=>{o=Number.isNaN(e)||e===m(S,i,e)};if(s){let l,d;const h=t.type?pe(s._f):c(e),p=e.type===v.BLUR||e.type===v.FOCUS_OUT,g=!ye(s._f)&&!r.resolver&&!m(a.errors,i)&&!s._f.deps||be(p,m(a.touchedFields,i),a.isSubmitted,x,P),y=L(i,E,p);M(S,i,h),p?(s._f.onBlur&&s._f.onBlur(e),n&&n(0)):s._f.onChange&&s._f.onChange(e);const b=W(i,h,p,!1),w=!O(b)||y;if(!p&&I.values.next({name:i,type:e.type,values:{...S}}),g)return A.isValid&&R(),w&&I.state.next({name:i,...y?{}:b});if(!p&&y&&I.state.next({...a}),N(!0),r.resolver){const{errors:e}=await Q([i]);if(u(h),o){const t=ve(a.errors,f,i),n=ve(e,f,t.name||i);l=n.error,i=n.name,d=O(e)}}else l=(await te(s,S,k,r.shouldUseNativeValidation))[i],u(h),o&&(l?d=!1:A.isValid&&(d=await $(f,!0)));o&&(s._f.deps&&le(s._f.deps),H(i,d,l,b))}},ce=(e,t)=>{if(m(a.errors,t)&&e.focus)return e.focus(),1},le=async(e,t={})=>{let n,i;const o=T(e);if(N(!0),r.resolver){const t=await(async e=>{const{errors:t}=await Q(e);if(e)for(const n of e){const e=m(t,n);e?M(a.errors,n,e):ne(a.errors,n)}else a.errors=t;return t})(g(e)?e:o);n=O(t),i=e?!o.some((e=>m(t,e))):n}else e?(i=(await Promise.all(o.map((async e=>{const t=m(f,e);return await $(t&&t._f?{[e]:t}:t)})))).every(Boolean),(i||a.isValid)&&R()):i=n=await $(f);return I.state.next({...!U(e)||A.isValid&&n!==a.isValid?{}:{name:e},...r.resolver||!e?{isValid:n}:{},errors:a.errors,isValidating:!1}),t.shouldFocus&&!i&&V(f,ce,e?o:E.mount),i},fe=e=>{const t={...w,...C.mount?S:{}};return g(e)?t:U(e)?m(t,e):e.map((e=>m(t,e)))},Ce=(e,t)=>({invalid:!!m((t||a).errors,e),isDirty:!!m((t||a).dirtyFields,e),isTouched:!!m((t||a).touchedFields,e),error:m((t||a).errors,e)}),Ee=(e,t,n)=>{const r=(m(f,e,{_f:{}})._f||{}).ref;M(a.errors,e,{...t,ref:r}),I.state.next({name:e,errors:a.errors,isValid:!1}),n&&n.shouldFocus&&r&&r.focus&&r.focus()},_e=(e,t={})=>{for(const n of e?T(e):E.mount)E.mount.delete(n),E.array.delete(n),t.keepValue||(ne(f,n),ne(S,n)),!t.keepError&&ne(a.errors,n),!t.keepDirty&&ne(a.dirtyFields,n),!t.keepTouched&&ne(a.touchedFields,n),!r.shouldUnregister&&!t.keepDefaultValue&&ne(w,n);I.values.next({values:{...S}}),I.state.next({...a,...t.keepDirty?{isDirty:z()}:{}}),!t.keepIsValid&&R()},Ae=({disabled:e,name:t,field:n,fields:r,value:i})=>{if(y(e)){const o=e?void 0:g(i)?pe(n?n._f:m(r,t)._f):i;M(S,t,o),W(t,o,!1,!1,!0)}},Ie=(e,t={})=>{let n=m(f,e);const i=y(t.disabled);return M(f,e,{...n||{},_f:{...n&&n._f?n._f:{ref:{name:e}},name:e,mount:!0,...t}}),E.mount.add(e),n?Ae({field:n,disabled:t.disabled,name:e,value:t.value}):F(e,!0,t.value),{...i?{disabled:t.disabled}:{},...r.progressive?{required:!!t.required,min:me(t.min),max:me(t.max),minLength:me(t.minLength),maxLength:me(t.maxLength),pattern:me(t.pattern)}:{},name:e,onChange:ee,onBlur:ee,ref:i=>{if(i){Ie(e,t),n=m(f,e);const r=g(i.value)&&i.querySelectorAll&&i.querySelectorAll("input,select,textarea")[0]||i,o=ae(r),s=n._f.refs||[];if(o?s.find((e=>e===r)):r===n._f.ref)return;M(f,e,{_f:{...n._f,...o?{refs:[...s.filter(ue),r,...Array.isArray(m(w,e))?[{}]:[]],ref:{type:r.type,name:e}}:{ref:r}}}),F(e,!1,void 0,r)}else n=m(f,e,{}),n._f&&(n._f.mount=!1),(r.shouldUnregister||t.shouldUnregister)&&(!l(E.array,e)||!C.action)&&E.unMount.add(e)}}},Pe=()=>r.shouldFocusError&&V(f,ce,E.mount),Oe=(e,t)=>
2async n=>{n&&(n.preventDefault&&n.preventDefault(),n.persist&&n.persist());let i=h(S);if(I.state.next({isSubmitting:!0}),r.resolver){const{errors:e,values:t}=await Q();a.errors=e,i=t}else await $(f);ne(a.errors,"root"),O(a.errors)?(I.state.next({errors:{}}),await e(i,n)):(t&&await t({...a.errors},n),Pe(),setTimeout(Pe)),I.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:O(a.errors),submitCount:a.submitCount+1,errors:a.errors})},xe=(n,r={})=>{const i=n?h(n):w,o=h(i),s=n&&!O(n)?o:w;if(r.keepDefaultValues||(w=i),!r.keepValues){if(r.keepDirtyValues)for(const e of E.mount)m(a.dirtyFields,e)?M(s,e,m(S,e)):X(e,m(s,e));else{if(d&&g(n))for(const e of E.mount){const t=m(f,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(G(e)){const t=e.closest("form");if(t){t.reset();break}}}}f={}}S=e.shouldUnregister?r.keepDefaultValues?h(w):{}:h(s),I.array.next({values:{...s}}),I.values.next({values:{...s}})}E={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!C.mount&&t(),C.mount=!A.isValid||!!r.keepIsValid,C.watch=!!e.shouldUnregister,I.state.next({submitCount:r.keepSubmitCount?a.submitCount:0,isDirty:r.keepDirty?a.isDirty:!(!r.keepDefaultValues||oe(n,w)),isSubmitted:!!r.keepIsSubmitted&&a.isSubmitted,dirtyFields:r.keepDirtyValues?a.dirtyFields:r.keepDefaultValues&&n?de(w,n):{},touchedFields:r.keepTouched?a.touchedFields:{},errors:r.keepErrors?a.errors:{},isSubmitSuccessful:!!r.keepIsSubmitSuccessful&&a.isSubmitSuccessful,isSubmitting:!1})},Te=(e,t)=>
vendor: 3,611 bytes, lines 2-3
2xe(K(e)?e(S):e,t);return{control:{register:Ie,unregister:_e,getFieldState:Ce,handleSubmit:Oe,setError:Ee,_executeSchema:Q,_getWatch:Y,_getDirty:z,_updateValid:R,_removeUnmounted:()=>{for(const e of E.unMount){const t=m(f,e);t&&(t._f.refs?t._f.refs.every((e=>!ue(e))):!ue(t._f.ref))&&_e(e)}E.unMount=new Set},_updateFieldArray:(e,t=[],n,r,i=!0,o=!0)=>{if(r&&n){if(C.action=!0,o&&Array.isArray(m(f,e))){const t=n(m(f,e),r.argA,r.argB);i&&M(f,e,t)}if(o&&Array.isArray(m(a.errors,e))){const t=n(m(a.errors,e),r.argA,r.argB);i&&M(a.errors,e,t),we(a.errors,e)}if(A.touchedFields&&o&&Array.isArray(m(a.touchedFields,e))){const t=n(m(a.touchedFields,e),r.argA,r.argB);i&&M(a.touchedFields,e,t)}A.dirtyFields&&(a.dirtyFields=de(w,S)),I.state.next({name:e,isDirty:z(e,t),dirtyFields:a.dirtyFields,errors:a.errors,isValid:a.isValid})}else M(S,e,t)},_updateDisabledField:Ae,_getFieldArray:t=>p(m(C.mount?S:w,t,e.shouldUnregister?m(w,t,[]):[])),_reset:xe,_resetDefaultValues:()=>K(r.defaultValues)&&r.defaultValues().then((e=>{Te(e,r.resetOptions),I.state.next({isLoading:!1})})),_updateFormState:e=>{a={...a,...e}},_disableForm:e=>{y(e)&&(I.state.next({disabled:e}),V(f,((t,n)=>{let r=e;const i=m(f,n);i&&y(i._f.disabled)&&(r||(r=i._f.disabled)),t.disabled=r}),0,!1))},_subjects:I,_proxyFormState:A,_setErrors:e=>{a.errors=e,I.state.next({errors:a.errors,isValid:!1})},get _fields(){return f},get _formValues(){return S},get _state(){return C},set _state(e){C=e},get _defaultValues(){return w},get _names(){return E},set _names(e){E=e},get _formState(){return a},set _formState(e){a=e},get _options(){return r},set _options(e){r={...r,...e}}},trigger:le,register:Ie,handleSubmit:Oe,watch:(e,t)=>K(e)?I.values.subscribe({next:n=>e(Y(void 0,t),n)}):Y(e,t,!0),setValue:X,getValues:fe,reset:Te,resetField:(e,t={})=>{m(f,e)&&(g(t.defaultValue)?X(e,h(m(w,e))):(X(e,t.defaultValue),M(w,e,h(t.defaultValue))),t.keepTouched||ne(a.touchedFields,e),t.keepDirty||(ne(a.dirtyFields,e),a.isDirty=t.defaultValue?z(e,h(m(w,e))):z()),t.keepError||(ne(a.errors,e),A.isValid&&R()),I.state.next({...a}))},clearErrors:e=>{e&&T(e).forEach((e=>ne(a.errors,e))),I.state.next({errors:e?a.errors:{}})},unregister:_e,setError:Ee,setFocus:(e,t={})=>{const n=m(f,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:Ce}}function Ee(e={}){const t=r.useRef(),n=r.useRef(),[i,o]=r.useState({isDirty:!1,isValidating:!1,isLoading:K(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:K(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Ce(e,(()=>o((e=>({...e}))))),formState:i});const s=t.current.control;return s._options=e,k({subject:s._subjects.state,next:e=>{x(e,s._proxyFormState,s._updateFormState,!0)&&o({...s._formState})}}),r.useEffect((()=>s._disableForm(e.disabled)),[s,e.disabled]),r.useEffect((()=>{if(s._proxyFormState.isDirty){const e=s._getDirty();e!==i.isDirty&&s._subjects.state.next({isDirty:e})}}),[s,i.isDirty]),r.useEffect((()=>{e.values&&!oe(e.values,n.current)?(s._reset(e.values,s._options.resetOptions),n.current=e.values,o((e=>({...e})))):s._resetDefaultValues()}),[e.values,s]),r.useEffect((()=>{e.errors&&s._setErrors(e.errors)}),[e.errors,s]),r.useEffect((()=>{s._state.mount||(s._updateValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()})),t.current.formState=P(i,s),t.current}}}]); 3//# sourceMappingURL=commons-7a6aeb38c4c376b0c591.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.