forked from lynndylanhurley/redux-auth
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
2 lines (2 loc) · 55.7 KB
/
index.js
1
2
!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.fetch=t.hideDestroyAccountErrorModal=t.hideDestroyAccountSuccessModal=t.hideUpdatePasswordErrorModal=t.hideUpdatePasswordSuccessModal=t.hidePasswordResetRequestErrorModal=t.hidePasswordResetRequestSuccessModal=t.hidePasswordResetErrorModal=t.hideFirstTimeLoginErrorModal=t.showPasswordResetErrorModal=t.showFirstTimeLoginErrorModal=t.hidePasswordResetSuccessModal=t.hideFirstTimeLoginSuccessModal=t.showPasswordResetSuccessModal=t.showFirstTimeLoginSuccessModal=t.hideEmailSignUpErrorModal=t.hideEmailSignUpSuccessModal=t.hideSignOutErrorModal=t.hideSignOutSuccessModal=t.hideOAuthSignInErrorModal=t.hideOAuthSignInSuccessModal=t.hideEmailSignInErrorModal=t.hideEmailSignInSuccessModal=t.getApiUrl=t.verifyAuth=t.destroyAccount=t.updatePasswordModalFormUpdate=t.updatePasswordModal=t.updatePasswordFormUpdate=t.updatePassword=t.requestPasswordResetFormUpdate=t.requestPasswordReset=t.oAuthSignIn=t.emailSignUpFormUpdate=t.emailSignUp=t.signOut=t.emailSignInFormUpdate=t.emailSignIn=t.authenticate=t.configure=t.authStateReducer=void 0;var o=r(5);Object.defineProperty(t,"configure",{enumerable:!0,get:function(){return o.configure}});var i=r(24);Object.defineProperty(t,"authenticate",{enumerable:!0,get:function(){return i.authenticate}});var u=r(26);Object.defineProperty(t,"emailSignIn",{enumerable:!0,get:function(){return u.emailSignIn}}),Object.defineProperty(t,"emailSignInFormUpdate",{enumerable:!0,get:function(){return u.emailSignInFormUpdate}});var a=r(30);Object.defineProperty(t,"signOut",{enumerable:!0,get:function(){return a.signOut}});var s=r(27);Object.defineProperty(t,"emailSignUp",{enumerable:!0,get:function(){return s.emailSignUp}}),Object.defineProperty(t,"emailSignUpFormUpdate",{enumerable:!0,get:function(){return s.emailSignUpFormUpdate}});var d=r(28);Object.defineProperty(t,"oAuthSignIn",{enumerable:!0,get:function(){return d.oAuthSignIn}});var c=r(33);Object.defineProperty(t,"requestPasswordReset",{enumerable:!0,get:function(){return c.requestPasswordReset}}),Object.defineProperty(t,"requestPasswordResetFormUpdate",{enumerable:!0,get:function(){return c.requestPasswordResetFormUpdate}});var l=r(36);Object.defineProperty(t,"updatePassword",{enumerable:!0,get:function(){return l.updatePassword}}),Object.defineProperty(t,"updatePasswordFormUpdate",{enumerable:!0,get:function(){return l.updatePasswordFormUpdate}});var _=r(35);Object.defineProperty(t,"updatePasswordModal",{enumerable:!0,get:function(){return _.updatePasswordModal}}),Object.defineProperty(t,"updatePasswordModalFormUpdate",{enumerable:!0,get:function(){return _.updatePasswordModalFormUpdate}});var f=r(25);Object.defineProperty(t,"destroyAccount",{enumerable:!0,get:function(){return f.destroyAccount}});var E=r(10);Object.defineProperty(t,"getApiUrl",{enumerable:!0,get:function(){return E.getApiUrl}});var S=r(34);Object.defineProperty(t,"hideEmailSignInSuccessModal",{enumerable:!0,get:function(){return S.hideEmailSignInSuccessModal}}),Object.defineProperty(t,"hideEmailSignInErrorModal",{enumerable:!0,get:function(){return S.hideEmailSignInErrorModal}}),Object.defineProperty(t,"hideOAuthSignInSuccessModal",{enumerable:!0,get:function(){return S.hideOAuthSignInSuccessModal}}),Object.defineProperty(t,"hideOAuthSignInErrorModal",{enumerable:!0,get:function(){return S.hideOAuthSignInErrorModal}}),Object.defineProperty(t,"hideSignOutSuccessModal",{enumerable:!0,get:function(){return S.hideSignOutSuccessModal}}),Object.defineProperty(t,"hideSignOutErrorModal",{enumerable:!0,get:function(){return S.hideSignOutErrorModal}}),Object.defineProperty(t,"hideEmailSignUpSuccessModal",{enumerable:!0,get:function(){return S.hideEmailSignUpSuccessModal}}),Object.defineProperty(t,"hideEmailSignUpErrorModal",{enumerable:!0,get:function(){return S.hideEmailSignUpErrorModal}}),Object.defineProperty(t,"showFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return S.showFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"showPasswordResetSuccessModal",{enumerable:!0,get:function(){return S.showPasswordResetSuccessModal}}),Object.defineProperty(t,"hideFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return S.hideFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"hidePasswordResetSuccessModal",{enumerable:!0,get:function(){return S.hidePasswordResetSuccessModal}}),Object.defineProperty(t,"showFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return S.showFirstTimeLoginErrorModal}}),Object.defineProperty(t,"showPasswordResetErrorModal",{enumerable:!0,get:function(){return S.showPasswordResetErrorModal}}),Object.defineProperty(t,"hideFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return S.hideFirstTimeLoginErrorModal}}),Object.defineProperty(t,"hidePasswordResetErrorModal",{enumerable:!0,get:function(){return S.hidePasswordResetErrorModal}}),Object.defineProperty(t,"hidePasswordResetRequestSuccessModal",{enumerable:!0,get:function(){return S.hidePasswordResetRequestSuccessModal}}),Object.defineProperty(t,"hidePasswordResetRequestErrorModal",{enumerable:!0,get:function(){return S.hidePasswordResetRequestErrorModal}}),Object.defineProperty(t,"hideUpdatePasswordSuccessModal",{enumerable:!0,get:function(){return S.hideUpdatePasswordSuccessModal}}),Object.defineProperty(t,"hideUpdatePasswordErrorModal",{enumerable:!0,get:function(){return S.hideUpdatePasswordErrorModal}}),Object.defineProperty(t,"hideDestroyAccountSuccessModal",{enumerable:!0,get:function(){return S.hideDestroyAccountSuccessModal}}),Object.defineProperty(t,"hideDestroyAccountErrorModal",{enumerable:!0,get:function(){return S.hideDestroyAccountErrorModal}});var p=r(11);Object.defineProperty(t,"fetch",{enumerable:!0,get:function(){return n(p)["default"]}});var O=r(47),R=n(O),T=r(48),P=n(T),A=r(59),g=n(A),M=r(56),I=n(M),h=r(50),m=n(h),D=r(51),y=n(D),v=r(52),U=n(v),b=r(53),N=n(b),C=r(58),L=n(C),w=r(57),j=n(w),K=r(54),G=n(K),H=r(55),F=n(H),W=r(49),k=n(W),V=r(9),Y=r(41),q=n(Y);t.authStateReducer=(0,V.combineReducers)({configure:P["default"],emailSignIn:m["default"],emailSignUp:y["default"],signOut:F["default"],authentication:R["default"],requestPasswordReset:N["default"],oAuthSignIn:U["default"],updatePassword:L["default"],updatePasswordModal:j["default"],destroyAccount:k["default"],server:G["default"],ui:I["default"],user:g["default"]});t.verifyAuth=q["default"]},,,,function(e,t){e.exports=require("immutable")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,r){return{type:A,endpoints:e,currentEndpointKey:t,defaultEndpointKey:r}}function u(e){return{type:g,currentEndpointKey:e}}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(r){if(t.currentLocation&&t.currentLocation.match(/blank=true/))return Promise.resolve({blank:!0});r((0,l.authenticateStart)());var n=void 0,o=void 0,u=void 0,a=void 0,s=void 0;if(t.isServer)n=(0,O["default"])(e,t).then(function(e){var t=e.user,n=e.headers,o=e.firstTimeLogin,u=e.mustResetPassword,a=e.currentEndpoint,s=e.currentEndpointKey,d=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({headers:n,user:t,firstTimeLogin:o,mustResetPassword:u})),r(i(Object.keys(a),s,d)),t})["catch"](function(e){var t=e.reason,n=e.firstTimeLogin,o=e.mustResetPassword,u=e.currentEndpoint,a=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({firstTimeLogin:n,mustResetPassword:o})),r(i(Object.keys(u||{}),null,a)),Promise.reject({reason:t})});else{var c=document.getElementById("token-bridge");if(c){var p=c.innerHTML;if(p){var R=JSON.parse(p);s=R.headers,a=R.user,o=R.firstTimeLogin,u=R.mustResetPassword,a&&(r((0,l.authenticateComplete)(a)),t.initialCredentials=R),r((0,f.ssAuthTokenUpdate)({user:a,headers:s,mustResetPassword:u,firstTimeLogin:o}))}}var A=(0,T["default"])(window.location),g=A.authRedirectPath,M=A.authRedirectHeaders;g&&r((0,P.push)({pathname:g})),M&&M.uid&&M["access-token"]&&(t.initialCredentials=(0,d["default"])({},t.initialCredentials,M)),(!t.clientOnly&&!t.initialCredentials||t.cleanSession)&&(0,S.destroySession)(),n=Promise.resolve((0,E.applyConfig)({dispatch:r,endpoint:e,settings:t}))}return n.then(function(e){return r((0,l.authenticateComplete)(e)),o&&r((0,_.showFirstTimeLoginSuccessModal)()),u&&r((0,_.showPasswordResetSuccessModal)()),e})["catch"](function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.reason;return r((0,l.authenticateError)([t])),o&&r((0,_.showFirstTimeLoginErrorModal)()),u&&r((0,_.showPasswordResetErrorModal)()),Promise.resolve({reason:t})})}}Object.defineProperty(t,"__esModule",{value:!0}),t.STORE_CURRENT_ENDPOINT_KEY=t.SET_ENDPOINT_KEYS=void 0,t.setEndpointKeys=i,t.storeCurrentEndpointKey=u,t.configure=a;var s=r(15),d=o(s),c=r(18),l=(n(c),r(24)),_=r(34),f=r(29),E=r(60),S=r(10),p=r(41),O=o(p),R=r(37),T=o(R),P=r(138),A=t.SET_ENDPOINT_KEYS="SET_ENDPOINT_KEYS",g=t.STORE_CURRENT_ENDPOINT_KEY="STORE_CURRENT_ENDPOINT_KEY"},,,,function(e,t){e.exports=require("redux-immutablejs")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e){G.authState.currentSettings=e}function u(){return G.authState.currentSettings}function a(e){G.authState.currentEndpoint=e}function s(){return G.authState.currentEndpoint}function d(e){N(K.SAVED_CONFIG_KEY,e||_())}function c(){return C(K.SAVED_CONFIG_KEY)||_()}function l(e){N(K.DEFAULT_CONFIG_KEY,e)}function _(){return C(K.DEFAULT_CONFIG_KEY)}function f(){G.authState=G.authState||{},G.authState.currentSettings={},G.authState.currentEndpoint={},E()}function E(){var e=[K.SAVED_CREDS_KEY,K.SAVED_CONFIG_KEY];for(var t in e)t=e[t],G.localStorage&&G.localStorage.removeItem(t),w["default"].erase(t,{path:G.authState.currentSettings.cookiePath||"/"})}function S(e){return e&&e.replace(/("|')/g,"")}function p(){return S(w["default"].get(K.SAVED_CONFIG_KEY)||G.localStorage&&G.localStorage.getItem(K.SAVED_CONFIG_KEY))}function O(e){var t=e||c();if(t)return t;throw"You must configure redux-auth before use."}function R(e){return s()[O(e)]}function T(e){return""+v(e)+R(e).accountDeletePath}function P(e){return"https://0faeb3f0-9907-4a5b-876d-a91fea376d6e.mock.pstmn.io"+R(e).signOutPath}function A(e){return"https://0faeb3f0-9907-4a5b-876d-a91fea376d6e.mock.pstmn.io"+R(e).emailSignInPath}function g(e){return""+v(e)+R(e).emailRegistrationPath+"?config_name="+e}function M(e){return""+v(e)+R(e).passwordResetPath+"?config_name="+e}function I(e){return"https://0faeb3f0-9907-4a5b-876d-a91fea376d6e.mock.pstmn.io"+R(e).passwordUpdatePath}function h(e){return""+v(e)+R(e).tokenValidationPath}function m(e){var t=e.provider,r=e.params,n=e.endpointKey,o=v(n)+R(n).authProviderPaths[t]+"?auth_origin_url="+encodeURIComponent(G.location.href)+"&config_name="+encodeURIComponent(O(n));if(r)for(var i in r)o+="&",o+=encodeURIComponent(i),o+="=",o+=encodeURIComponent(r[i]);return o}function D(){return G.authState.currentSettings.confirmationSuccessUrl()}function y(){return G.authState.currentSettings.confirmationSuccessUrl()}function v(e){var t=O(e);return G.authState.currentEndpoint[t].apiUrl}function U(){return G.authState.currentSettings.tokenFormat}function b(e){switch(G.authState.currentSettings.storage){case"localStorage":G.localStorage.removeItem(e);break;default:w["default"].erase(e)}}function N(e,t){switch(t=JSON.stringify(t),G.authState.currentSettings.storage){case"localStorage":G.localStorage.setItem(e,t);break;default:w["default"].set(e,t,{expires:G.authState.currentSettings.cookieExpiry,path:G.authState.currentSettings.cookiePath})}}function C(e,t){var r=null;switch(t||G.authState.currentSettings.storage){case"localStorage":r=G.localStorage&&G.localStorage.getItem(e);break;default:r=w["default"].get(e)}try{return JSON.parse(r)}catch(n){return S(r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.setCurrentSettings=i,t.getCurrentSettings=u,t.setCurrentEndpoint=a,t.getCurrentEndpoint=s,t.setCurrentEndpointKey=d,t.getCurrentEndpointKey=c,t.setDefaultEndpointKey=l,t.getDefaultEndpointKey=_,t.resetConfig=f,t.destroySession=E,t.getInitialEndpointKey=p,t.getSessionEndpointKey=O,t.getSessionEndpoint=R,t.getDestroyAccountUrl=T,t.getSignOutUrl=P,t.getEmailSignInUrl=A,t.getEmailSignUpUrl=g,t.getPasswordResetRequestUrl=M,t.getPasswordUpdateUrl=I,t.getTokenValidationPath=h,t.getOAuthUrl=m,t.getConfirmationSuccessUrl=D,t.getPasswordResetRedirectUrl=y,t.getApiUrl=v,t.getTokenFormat=U,t.removeData=b,t.persistData=N,t.retrieveData=C;var L=r(130),w=o(L),j=r(18),K=n(j),G=Function("return this")()||(0,eval)("this");G.authState={currentSettings:{},currentEndpoint:{},defaultEndpointKey:null}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){return Object.assign({},t,{Authorization:"Bearer "+e})}function u(e){if(S(e)){var t=(0,E.retrieveData)(l.SAVED_CREDS_KEY)||{},r={};r["If-Modified-Since"]="Mon, 26 Jul 1997 05:00:00 GMT";for(var n in(0,E.getTokenFormat)())r[n]=t[n];return i(t["access-token"],r)}return{}}function a(e){if(S(e.url)){var t={},r=!0;for(var n in(0,E.getTokenFormat)())t[n]=e.headers.get(n),t[n]&&(r=!1);r||(0,E.persistData)(l.SAVED_CREDS_KEY,t)}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.addAuthorizationHeader=i,t["default"]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.headers||(t.headers={}),(0,f["default"])(t.headers,u(e)),(0,d["default"])(e,t).then(function(e){return a(e)})};var s=r(42),d=o(s),c=r(18),l=n(c),_=r(15),f=o(_),E=r(10),S=function(e){return e.match((0,E.getApiUrl)((0,E.getSessionEndpointKey)()))}},,,,function(e,t){e.exports=require("extend")},function(e,t){"use strict";function r(e){var t=e.json();return e.status>=200&&e.status<300?t:t.then(function(e){return Promise.reject(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.parseResponse=r},,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.INITIAL_CONFIG_KEY="default",t.DEFAULT_CONFIG_KEY="defaultConfigKey",t.SAVED_CONFIG_KEY="currentConfigName",t.SAVED_CREDS_KEY="authHeaders"},,,,,,function(e,t){"use strict";function r(){return{type:i}}function n(e){return{type:u,user:e}}function o(e){return{type:a,errors:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.authenticateStart=r,t.authenticateComplete=n,t.authenticateError=o;var i=t.AUTHENTICATE_START="AUTHENTICATE_START",u=t.AUTHENTICATE_COMPLETE="AUTHENTICATE_COMPLETE",a=t.AUTHENTICATE_ERROR="AUTHENTICATE_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function i(e,t){return{type:E,endpoint:t,message:e}}function u(e,t){return{type:S,endpoint:t,errors:e}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getDestroyAccountUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){var n=r.message;t(i(n,e));var o=(0,s.getDefaultEndpointKey)();t((0,c.storeCurrentEndpointKey)(o)),(0,s.setCurrentEndpointKey)(o)})["catch"](function(r){var n=r.errors;return t(u(n,e))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.DESTROY_ACCOUNT_ERROR=t.DESTROY_ACCOUNT_COMPLETE=t.DESTROY_ACCOUNT_START=void 0,t.destroyAccountStart=o,t.destroyAccountComplete=i,t.destroyAccountError=u,t.destroyAccount=a;var s=r(10),d=r(16),c=r(5),l=r(11),_=n(l),f=t.DESTROY_ACCOUNT_START="DESTROY_ACCOUNT_START",E=t.DESTROY_ACCOUNT_COMPLETE="DESTROY_ACCOUNT_COMPLETE",S=t.DESTROY_ACCOUNT_ERROR="DESTROY_ACCOUNT_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:O,endpoint:e,key:t,value:r}}function i(e){return{type:E,endpoint:e}}function u(e,t){return{type:S,user:t,endpoint:e}}function a(e,t){return{type:p,errors:t,endpoint:e}}function s(e,t){return function(r){var n=(0,d.getCurrentEndpointKey)();(0,d.setCurrentEndpointKey)(t);var o=(0,d.getCurrentEndpointKey)();return r((0,c.storeCurrentEndpointKey)(o)),r(i(o)),(0,f["default"])((0,d.getEmailSignInUrl)(o),{headers:{Accept:"application/json","Content-Type":"application/json","x-api-key":"5d5c82fa2e6749f58a6a8053ba91edbf","x-mock-response-code":"200"},method:"post",body:JSON.stringify(e)}).then(l.parseResponse).then(function(e){return r(u(o,e))})["catch"](function(e){throw(0,d.setCurrentEndpointKey)(n),r((0,c.storeCurrentEndpointKey)(n)),r(a(o,e)),e})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_IN_FORM_UPDATE=t.EMAIL_SIGN_IN_ERROR=t.EMAIL_SIGN_IN_COMPLETE=t.EMAIL_SIGN_IN_START=void 0,t.emailSignInFormUpdate=o,t.emailSignInStart=i,t.emailSignInComplete=u,t.emailSignInError=a,t.emailSignIn=s;var d=r(10),c=r(5),l=r(16),_=r(11),f=n(_),E=t.EMAIL_SIGN_IN_START="EMAIL_SIGN_IN_START",S=t.EMAIL_SIGN_IN_COMPLETE="EMAIL_SIGN_IN_COMPLETE",p=t.EMAIL_SIGN_IN_ERROR="EMAIL_SIGN_IN_ERROR",O=t.EMAIL_SIGN_IN_FORM_UPDATE="EMAIL_SIGN_IN_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function i(e){return{type:S,endpoint:e}}function u(e,t){return{type:p,user:e,endpoint:t}}function a(e,t){return{type:O,errors:e,endpoint:t}}function s(e,t){return function(r){return r(i(t)),(0,E["default"])((0,d.getEmailSignUpUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{confirm_success_url:(0,d.getConfirmationSuccessUrl)()}))}).then(c.parseResponse).then(function(e){var n=e.data;return r(u(n,t))})["catch"](function(e){var n=e.errors;throw r(a(n,t)),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_UP_FORM_UPDATE=t.EMAIL_SIGN_UP_ERROR=t.EMAIL_SIGN_UP_COMPLETE=t.EMAIL_SIGN_UP_START=void 0,t.emailSignUpFormUpdate=o,t.emailSignUpStart=i,t.emailSignUpComplete=u,t.emailSignUpError=a,t.emailSignUp=s;var d=r(10),c=r(16),l=r(15),_=n(l),f=r(11),E=n(f),S=t.EMAIL_SIGN_UP_START="EMAIL_SIGN_UP_START",p=t.EMAIL_SIGN_UP_COMPLETE="EMAIL_SIGN_UP_COMPLETE",O=t.EMAIL_SIGN_UP_ERROR="EMAIL_SIGN_UP_ERROR",R=t.EMAIL_SIGN_UP_FORM_UPDATE="EMAIL_SIGN_UP_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e,t,r,n,o){if(!n)return new Promise(function(n,o){i(e,t,r,n,o)});var u=void 0;try{u=(0,f.getAllParams)(t.location)}catch(a){}u&&u.uid?(t.close(),(0,E.persistData)(_.SAVED_CREDS_KEY,(0,f.normalizeTokenKeys)(u)),(0,R["default"])((0,E.getTokenValidationPath)(e)).then(p.parseResponse).then(function(e){var t=e.data;return n(t)})["catch"](function(e){var t=e.errors;return o({errors:t})})):t.closed?o({errors:"Authentication was cancelled."}):setTimeout(function(){i(e,t,r,n,o)},0)}function u(e){var t=e.endpointKey,r=e.provider,n=e.url,o=e.tab,u=void 0!==o&&o,a=u?"_blank":r,s=I(r,n,a);return i(t,s,r)}function a(e,t){return{type:A,provider:e,endpoint:t}}function s(e,t){return{type:g,user:e,endpoint:t}}function d(e,t){return{type:M,errors:e,endpoint:t}}function c(e){var t=e.provider,r=e.params,n=e.endpointKey;return function(e){var o=(0,E.getCurrentEndpointKey)();(0,E.setCurrentEndpointKey)(n),e((0,S.storeCurrentEndpointKey)(n));var i=(0,E.getCurrentEndpointKey)();e(a(t,i));var c=(0,E.getOAuthUrl)({provider:t,params:r,currentEndpointKey:i});return u({endpointKey:n,provider:t,url:c}).then(function(t){return e(s(t,i))})["catch"](function(t){var r=t.errors;throw(0,E.setCurrentEndpointKey)(o),e((0,S.storeCurrentEndpointKey)(o)),e(d(r,i)),r})}}Object.defineProperty(t,"__esModule",{value:!0}),t.OAUTH_SIGN_IN_ERROR=t.OAUTH_SIGN_IN_COMPLETE=t.OAUTH_SIGN_IN_START=void 0,t.oAuthSignInStart=a,t.oAuthSignInComplete=s,t.oAuthSignInError=d,t.oAuthSignIn=c;var l=r(18),_=o(l),f=r(37),E=r(10),S=r(5),p=r(16),O=r(11),R=n(O),T=r(61),P=n(T),A=t.OAUTH_SIGN_IN_START="OAUTH_SIGN_IN_START",g=t.OAUTH_SIGN_IN_COMPLETE="OAUTH_SIGN_IN_COMPLETE",M=t.OAUTH_SIGN_IN_ERROR="OAUTH_SIGN_IN_ERROR",I=P["default"]},function(e,t){"use strict";function r(e){var t=e.user,r=e.headers,o=e.mustResetPassword,i=e.firstTimeLogin,u=e.endpointKey;return{type:n,user:t,headers:r,mustResetPassword:o,firstTimeLogin:i,endpointKey:u}}Object.defineProperty(t,"__esModule",{value:!0}),t.ssAuthTokenUpdate=r;var n=t.SS_AUTH_TOKEN_UPDATE="SS_AUTH_TOKEN_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function i(e,t){return{type:E,user:t,endpoint:e}}function u(e,t){return{type:S,endpoint:e,errors:t}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getSignOutUrl)(e),{method:"delete",headers:{"x-api-key":"5d5c82fa2e6749f58a6a8053ba91edbf","x-mock-response-code":"200"}}).then(d.parseResponse).then(function(r){t(i(e,r)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)()})["catch"](function(r){var n=r.errors;throw t(u(e,n)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)(),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.SIGN_OUT_ERROR=t.SIGN_OUT_COMPLETE=t.SIGN_OUT_START=void 0,t.signOutStart=o,t.signOutComplete=i,t.signOutError=u,t.signOut=a;var s=r(10),d=r(16),c=r(5),l=r(11),_=n(l),f=t.SIGN_OUT_START="SIGN_OUT_START",E=t.SIGN_OUT_COMPLETE="SIGN_OUT_COMPLETE",S=t.SIGN_OUT_ERROR="SIGN_OUT_ERROR"},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function i(e){return{type:S,endpoint:e}}function u(e,t){return{type:p,endpoint:e,message:t}}function a(e,t){return{type:O,endpoint:e,errors:t}}function s(e,t){return function(r){return r(i(t)),(0,E["default"])((0,d.getPasswordResetRequestUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{redirect_url:(0,d.getPasswordResetRedirectUrl)(t)}))}).then(c.parseResponse).then(function(e){var n=e.message;return r(u(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.REQUEST_PASSWORD_RESET_FORM_UPDATE=t.REQUEST_PASSWORD_RESET_ERROR=t.REQUEST_PASSWORD_RESET_COMPLETE=t.REQUEST_PASSWORD_RESET_START=void 0,t.requestPasswordResetFormUpdate=o,t.requestPasswordResetStart=i,t.requestPasswordResetComplete=u,t.requestPasswordResetError=a,t.requestPasswordReset=s;var d=r(10),c=r(16),l=r(15),_=n(l),f=r(11),E=n(f),S=t.REQUEST_PASSWORD_RESET_START="REQUEST_PASSWORD_RESET_START",p=t.REQUEST_PASSWORD_RESET_COMPLETE="REQUEST_PASSWORD_RESET_COMPLETE",O=t.REQUEST_PASSWORD_RESET_ERROR="REQUEST_PASSWORD_RESET_ERROR",R=t.REQUEST_PASSWORD_RESET_FORM_UPDATE="REQUEST_PASSWORD_RESET_FORM_UPDATE"},function(e,t){"use strict";function r(){return{type:I}}function n(){return{type:h}}function o(){return{type:m}}function i(){return{type:D}}function u(){return{type:v}}function a(){return{type:y}}function s(){return{type:U}}function d(){return{type:b}}function c(){return{type:N}}function l(){return{type:w}}function _(){return{type:C}}function f(){return{type:L}}function E(){return{type:j}}function S(){return{type:H}}function p(){return{type:K}}function O(){return{type:G}}function R(){return{type:F}}function T(){return{type:W}}function P(){return{type:k}}function A(){return{type:V}}function g(){return{type:Y}}function M(){return{type:q}}Object.defineProperty(t,"__esModule",{value:!0}),t.hideEmailSignInSuccessModal=r,t.hideEmailSignInErrorModal=n,t.hideOAuthSignInSuccessModal=o,t.hideOAuthSignInErrorModal=i,t.hideSignOutSuccessModal=u,t.hideSignOutErrorModal=a,t.hideEmailSignUpSuccessModal=s,t.hideEmailSignUpErrorModal=d,t.showFirstTimeLoginSuccessModal=c,t.showPasswordResetSuccessModal=l,t.hideFirstTimeLoginSuccessModal=_,t.hidePasswordResetSuccessModal=f,t.showFirstTimeLoginErrorModal=E,t.showPasswordResetErrorModal=S,t.hideFirstTimeLoginErrorModal=p,t.hidePasswordResetErrorModal=O,t.hidePasswordResetRequestSuccessModal=R,t.hidePasswordResetRequestErrorModal=T,t.hideUpdatePasswordSuccessModal=P,t.hideUpdatePasswordErrorModal=A,t.hideDestroyAccountSuccessModal=g,t.hideDestroyAccountErrorModal=M;var I=t.HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL="HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL",h=t.HIDE_EMAIL_SIGN_IN_ERROR_MODAL="HIDE_EMAIL_SIGN_IN_ERROR_MODAL",m=t.HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL="HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL",D=t.HIDE_OAUTH_SIGN_IN_ERROR_MODAL="HIDE_OAUTH_SIGN_IN_ERROR_MODAL",y=t.HIDE_SIGN_OUT_ERROR_MODAL="HIDE_SIGN_OUT_ERROR_MODAL",v=t.HIDE_SIGN_OUT_SUCCESS_MODAL="HIDE_SIGN_OUT_SUCCESS_MODAL",U=t.HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL="HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL",b=t.HIDE_EMAIL_SIGN_UP_ERROR_MODAL="HIDE_EMAIL_SIGN_UP_ERROR_MODAL",N=t.SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL="SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL",C=t.HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL="HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL",L=t.HIDE_PASSWORD_RESET_SUCCESS_MODAL="HIDE_PASSWORD_RESET_SUCCESS_MODAL",w=t.SHOW_PASSWORD_RESET_SUCCESS_MODAL="SHOW_PASSWORD_RESET_SUCCESS_MODAL",j=t.SHOW_FIRST_TIME_LOGIN_ERROR_MODAL="SHOW_FIRST_TIME_LOGIN_ERROR_MODAL",K=t.HIDE_FIRST_TIME_LOGIN_ERROR_MODAL="HIDE_FIRST_TIME_LOGIN_ERROR_MODAL",G=t.HIDE_PASSWORD_RESET_ERROR_MODAL="HIDE_PASSWORD_RESET_ERROR_MODAL",H=t.SHOW_PASSWORD_RESET_ERROR_MODAL="SHOW_PASSWORD_RESET_ERROR_MODAL",F=t.HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL="HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL",W=t.HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL="HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL",k=t.HIDE_UPDATE_PASSWORD_SUCCESS_MODAL="HIDE_UPDATE_PASSWORD_SUCCESS_MODAL",V=t.HIDE_UPDATE_PASSWORD_ERROR_MODAL="HIDE_UPDATE_PASSWORD_ERROR_MODAL",Y=t.HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL="HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL",q=t.HIDE_DESTROY_ACCOUNT_ERROR_MODAL="HIDE_DESTROY_ACCOUNT_ERROR_MODAL"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function i(e){return{type:f,endpoint:e}}function u(e,t){return{type:E,endpoint:e,user:t}}function a(e,t){return{type:S,endpoint:e,errors:t}}function s(e,t){return function(r){return r(i(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(u(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_MODAL_FORM_UPDATE=t.UPDATE_PASSWORD_MODAL_ERROR=t.UPDATE_PASSWORD_MODAL_COMPLETE=t.UPDATE_PASSWORD_MODAL_START=void 0,t.updatePasswordModalFormUpdate=o,t.updatePasswordModalStart=i,t.updatePasswordModalComplete=u,t.updatePasswordModalError=a,t.updatePasswordModal=s;var d=r(10),c=r(16),l=r(11),_=n(l),f=t.UPDATE_PASSWORD_MODAL_START="UPDATE_PASSWORD_MODAL_START",E=t.UPDATE_PASSWORD_MODAL_COMPLETE="UPDATE_PASSWORD_MODAL_COMPLETE",S=t.UPDATE_PASSWORD_MODAL_ERROR="UPDATE_PASSWORD_MODAL_ERROR",p=t.UPDATE_PASSWORD_MODAL_FORM_UPDATE="UPDATE_PASSWORD_MODAL_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function i(e){return{type:f,endpoint:e}}function u(e,t){return{type:E,endpoint:e,user:t}}function a(e,t){return{type:S,endpoint:e,errors:t}}function s(e,t){return function(r){return r(i(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json","x-api-key":"5d5c82fa2e6749f58a6a8053ba91edbf","x-mock-response-code":"200"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(u(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_FORM_UPDATE=t.UPDATE_PASSWORD_ERROR=t.UPDATE_PASSWORD_COMPLETE=t.UPDATE_PASSWORD_START=void 0,t.updatePasswordFormUpdate=o,t.updatePasswordStart=i,t.updatePasswordComplete=u,t.updatePasswordError=a,t.updatePassword=s;var d=r(10),c=r(16),l=r(11),_=n(l),f=t.UPDATE_PASSWORD_START="UPDATE_PASSWORD_START",E=t.UPDATE_PASSWORD_COMPLETE="UPDATE_PASSWORD_COMPLETE",S=t.UPDATE_PASSWORD_ERROR="UPDATE_PASSWORD_ERROR",p=t.UPDATE_PASSWORD_FORM_UPDATE="UPDATE_PASSWORD_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.token&&(e["access-token"]=e.token,delete e.token),e.auth_token&&(e["access-token"]=e.auth_token,delete e.auth_token),e.client_id&&(e.client=e.client_id,delete e.client_id),e.config&&(e.endpointKey=e.config,delete e.config),e}function i(e){return(0,c["default"])({},f(e),_(e))}function u(e){if(e){var t=["access-token","token","auth_token","config","client","client_id","expiry","uid","reset_password","account_confirmation_success"],r=S(e,t),n=p(e,t);return n!==e?{authRedirectHeaders:r,authRedirectPath:n}:{}}return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeTokenKeys=o,t.getAllParams=i,t["default"]=u;var a=r(136),s=n(a),d=r(15),c=n(d),l=function(e){var t=e.anchor||"",r=t.split("?");return r.length>1?r[1]:null},_=function(e){var t=e.search||"",r=t.replace("?",""),n=r?s["default"].parse(r):{};return n},f=function(e){var t=l(e),r=t?s["default"].parse(t):{};return r},E=function(e,t){for(var r in t)delete e[t[r]];return e},S=function(e,t){var r=i(e),n={},u=!0,a=!1,s=void 0;try{for(var d,c=t[Symbol.iterator]();!(u=(d=c.next()).done);u=!0){var l=d.value;n[l]=r[l]}}catch(_){a=!0,s=_}finally{try{!u&&c["return"]&&c["return"]()}finally{if(a)throw s}}return o(n)},p=function(e,t){var r=s["default"].stringify(E(_(e),t)),n=s["default"].stringify(E(f(e),t)),o=(e.hash||"").split("?")[0];r&&(r="?"+r),n&&(o+="?"+n),o&&!o.match(/^#/)&&(o="#/"+o);var i=e.pathname+r+o;return i}},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(e){for(var t in e)return t}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e.constructor!==Array){t=s.INITIAL_CONFIG_KEY;var r={};r[t]=e,e=[r]}for(var n={},o=0;o<e.length;o++){var u=i(e[o]);t||(t=u),n[u]=(0,c["default"])({},l,e[o][u])}return{defaultEndpointKey:t,currentEndpoint:n}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=u;var a=r(18),s=o(a),d=r(15),c=n(d),l={apiUrl:"/api",signOutPath:"/auth/sign_out",emailSignInPath:"/auth/sign_in",emailRegistrationPath:"/auth",accountUpdatePath:"/auth",accountDeletePath:"/auth",passwordResetPath:"/auth/password",passwordUpdatePath:"/auth/password",tokenValidationPath:"/auth/validate_token",authProviderPaths:{github:"/auth/github",facebook:"/auth/facebook",google:"/auth/google_oauth2"}}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e){for(var t={},r=!0,n=["access-token","token-type","client","expiry","uid","config","endpointKey"],o=0;o<n.length;o++){var i=n[o];t[i]=e[i],t[i]&&("object"===s(t[i])&&(t[i]=t[i][0]),r=!1)}if(!r)return t}function u(e){var t=e.rawEndpoints,r=e.cookies,n=e.currentLocation,o=(0,
E["default"])(A["default"].parse(n)),u=o.authRedirectHeaders;return new Promise(function(e,n){if(r||u){var o=_["default"].parse(r||"{}"),a=JSON.parse(o.authHeaders||"false"),s=void 0,d=void 0,l=void 0,f=void 0;if(u&&u.uid&&u["access-token"]?(f=i(u),l=u.endpointKey||null,d=JSON.parse(u.reset_password||"false"),s=JSON.parse(u.account_confirmation_success||"false")):o&&a&&(f=a,l=JSON.parse(o[p.SAVED_CONFIG_KEY]||"null"),d=JSON.parse(a.mustResetPassword||"false"),s=JSON.parse(a.firstTimeLogin||"false")),!f)return n({reason:"No creds",currentEndpoint:R,defaultEndpointKey:P});var E,S=(0,T["default"])(t),R=S.currentEndpoint,P=S.defaultEndpointKey,A=R[l||P],g=A.apiUrl,M=A.tokenValidationPath,I=""+g+M+"?unbatch=true";return(0,c["default"])(I,{headers:(0,O.addAuthorizationHeader)(f["access-token"],f)}).then(function(e){return E=i(e.headers.raw()),e.json()}).then(function(t){return t.success?e({headers:E,user:t.data,mustResetPassword:d,firstTimeLogin:s,currentEndpoint:R,currentEndpointKey:l,defaultEndpointKey:P}):n({reason:t.errors,mustResetPassword:d,firstTimeLogin:s,currentEndpoint:R,defaultEndpointKey:P})})["catch"](function(e){return n({reason:e,firstTimeLogin:s,mustResetPassword:d,currentEndpoint:R,defaultEndpointKey:P})})}var h=(0,T["default"])(t),m=h.currentEndpoint,D=h.defaultEndpointKey;n({reason:"No creds",currentEndpoint:m,defaultEndpointKey:D})})}function a(e,t){var r=t.isServer,n=t.cookies,o=t.currentLocation;return new Promise(function(t,i){if(r)return u({rawEndpoints:e,cookies:n,currentLocation:o}).then(function(e){return t(e)})["catch"](function(e){return i(e)})})}Object.defineProperty(t,"__esModule",{value:!0});var s="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};t.fetchToken=u;var d=r(42),c=o(d),l=r(131),_=o(l),f=r(37),E=o(f),S=r(18),p=n(S),O=r(11),R=r(40),T=o(R),P=r(139),A=o(P);t["default"]=a},function(e,t){e.exports=require("isomorphic-fetch")},,,,,function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0});var u,a=r(4),s=o(a),d=r(9),c=r(24),l=n(c),_=s["default"].fromJS({loading:!1,valid:!1,errors:null});t["default"]=(0,d.createReducer)(_,(u={},i(u,l.AUTHENTICATE_START,function(e){return e.set("loading",!0)}),i(u,l.AUTHENTICATE_COMPLETE,function(e){return e.merge({loading:!1,errors:null,valid:!0})}),i(u,l.AUTHENTICATE_ERROR,function(e){return e.merge({loading:!1,errors:"Invalid token",valid:!1})}),u))},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0});var u,a=r(4),s=o(a),d=r(9),c=r(5),l=n(c),_=s["default"].fromJS({loading:!0,errors:null,config:null,endpointKeys:null,defaultEndpointKey:null,currentEndpointKey:null});t["default"]=(0,d.createReducer)(_,(u={},i(u,l.CONFIGURE_START,function(e){return e.set("loading",!0)}),i(u,l.STORE_CURRENT_ENDPOINT_KEY,function(e,t){var r=t.currentEndpointKey;return e.merge({currentEndpointKey:r})}),i(u,l.SET_ENDPOINT_KEYS,function(e,t){var r=t.endpointKeys,n=t.defaultEndpointKey,o=t.currentEndpointKey;return e.merge({endpointKeys:r,defaultEndpointKey:n,currentEndpointKey:o})}),i(u,l.CONFIGURE_COMPLETE,function(e,t){var r=t.config;return e.merge({loading:!1,errors:null,config:r})}),i(u,l.CONFIGURE_ERROR,function(e,t){var r=t.errors;return e.merge({loading:!1,errors:r})}),u))},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0});var u,a=r(4),s=o(a),d=r(9),c=r(25),l=n(c),_=r(5),f={loading:!1,errors:null};t["default"]=(0,d.createReducer)(s["default"].fromJS({}),(u={},i(u,_.SET_ENDPOINT_KEYS,function(e,t){var r=t.endpoints;return e.merge(r.reduce(function(e,t){return e[t]=s["default"].fromJS(f),e},{}))}),i(u,l.DESTROY_ACCOUNT_START,function(e,t){var r=t.endpoint;return e.setIn([r,"loading"],!0)}),i(u,l.DESTROY_ACCOUNT_COMPLETE,function(e,t){var r=t.endpoint;return e.merge(i({},r,f))}),i(u,l.DESTROY_ACCOUNT_ERROR,function(e,t){var r=t.endpoint,n=t.errors;return e.merge(i({},r,{loading:!1,errors:n}))}),u))},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0});var u,a=r(4),s=o(a),d=r(9),c=r(26),l=n(c),_=r(5),f={loading:!1,errors:null,form:{}};t["default"]=(0,d.createReducer)(s["default"].fromJS({}),(u={},i(u,_.SET_ENDPOINT_KEYS,function(e,t){var r=t.endpoints;return e.merge(r.reduce(function(e,t){return e[t]=s["default"].fromJS(f),e},{}))}),i(u,l.EMAIL_SIGN_IN_START,function(e,t){var r=t.endpoint;return e.setIn([r,"loading"],!0)}),i(u,l.EMAIL_SIGN_IN_COMPLETE,function(e,t){var r=t.endpoint;return e.merge(i({},r,f))}),i(u,l.EMAIL_SIGN_IN_ERROR,function(e,t){var r=t.endpoint,n=t.errors;return e.mergeDeep(i({},r,{loading:!1,errors:n}))}),i(u,l.EMAIL_SIGN_IN_FORM_UPDATE,function(e,t){var r=t.endpoint,n=t.key,o=t.value;return e.mergeDeep(i({},r,{form:i({},n,o)}))}),u))},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0});var u,a=r(4),s=o(a),d=r(9),c=r(27),l=n(c),_=r(5),f={loading:!1,errors:null,form:{}};t["default"]=(0,d.createReducer)(s["default"].fromJS({}),(u={},i(u,_.SET_ENDPOINT_KEYS,function(e,t){var r=t.endpoints;return e.merge(r.reduce(function(e,t){return e[t]=s["default"].fromJS(f),e},{}))}),i(u,l.EMAIL_SIGN_UP_START,function(e,t){var r=t.endpoint;return e.setIn([r,"loading"],!0)}),i(u,l.EMAIL_SIGN_UP_COMPLETE,function(e,t){var r=t.endpoint;return e.merge(i({},r,f))}),i(u,l.EMAIL_SIGN_UP_ERROR,function(e,t){var r=t.endpoint,n=t.errors;return e.mergeDeep(i({},r,{loading:!1,errors:n}))}),i(u,l.EMAIL_SIGN_UP_FORM_UPDATE,function(e,t){var r=t.endpoint,n=t.key,o=t.value;return e.mergeDeep(i({},r,{form:i({},n,o)}))}),u))},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0});var u,a=r(4),s=o(a),d=r(9),c=r(28),l=n(c),_=r(5),f={loading:!1,errors:null};t["default"]=(0,d.createReducer)(s["default"].fromJS({}),(u={},i(u,_.SET_ENDPOINT_KEYS,function(e,t){var r=t.endpoints;return e.merge(r.reduce(function(e,t){return e[t]=s["default"].fromJS(f),e},{}))}),i(u,l.OAUTH_SIGN_IN_START,function(e,t){var r=t.endpoint;return e.setIn([r,"loading"],!0)}),i(u,l.OAUTH_SIGN_IN_COMPLETE,function(e,t){var r=t.endpoint;return e.mergeDeep(i({},r,{loading:!1,errors:null}))}),i(u,l.OAUTH_SIGN_IN_ERROR,function(e,t){var r=t.endpoint,n=t.errors;return e.mergeDeep(i({},r,{loading:!1,errors:n}))}),u))},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0});var u,a=r(4),s=o(a),d=r(9),c=r(33),l=n(c),_=r(5),f={loading:!1,errors:null,form:{}};t["default"]=(0,d.createReducer)(s["default"].fromJS({}),(u={},i(u,_.SET_ENDPOINT_KEYS,function(e,t){var r=t.endpoints;return e.merge(r.reduce(function(e,t){return e[t]=s["default"].fromJS(f),e},{}))}),i(u,l.REQUEST_PASSWORD_RESET_START,function(e,t){var r=t.endpoint;return e.setIn([r,"loading"],!0)}),i(u,l.REQUEST_PASSWORD_RESET_COMPLETE,function(e,t){var r=t.endpoint;return e.merge(i({},r,f))}),i(u,l.REQUEST_PASSWORD_RESET_ERROR,function(e,t){var r=t.endpoint,n=t.errors;return e.mergeDeep(i({},r,{loading:!1,errors:n}))}),i(u,l.REQUEST_PASSWORD_RESET_FORM_UPDATE,function(e,t){var r=t.endpoint,n=t.key,o=t.value;return e.mergeDeep(i({},r,{form:i({},n,o)}))}),u))},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0});var u=r(4),a=o(u),s=r(9),d=r(29),c=n(d),l=a["default"].fromJS({user:null,headers:null,firstTimeLogin:!1,mustResetPassword:!1});t["default"]=(0,s.createReducer)(l,i({},c.SS_AUTH_TOKEN_UPDATE,function(e,t){var r=t.user,n=void 0===r?null:r,o=t.headers,i=void 0===o?null:o,u=t.mustResetPassword,a=void 0!==u&&u,s=t.firstTimeLogin,d=void 0!==s&&s;return e.merge({user:n,headers:i,mustResetPassword:a,firstTimeLogin:d})}))},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0});var u,a=r(4),s=o(a),d=r(9),c=r(30),l=n(c),_=r(5),f={loading:!1,errors:null};t["default"]=(0,d.createReducer)(s["default"].fromJS({}),(u={},i(u,_.SET_ENDPOINT_KEYS,function(e,t){var r=t.endpoints;return e.merge(r.reduce(function(e,t){return e[t]=s["default"].fromJS(f),e},{}))}),i(u,l.SIGN_OUT_START,function(e,t){var r=t.endpoint;return e.setIn([r,"loading"],!0)}),i(u,l.SIGN_OUT_COMPLETE,function(e,t){var r=t.endpoint;return e.mergeDeep(i({},r,{loading:!1,errors:null}))}),i(u,l.SIGN_OUT_ERROR,function(e,t){var r=t.endpoint,n=t.errors;return e.mergeDeep(i({},r,{loading:!1,errors:n}))}),u))},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0});var u,a=r(4),s=o(a),d=r(9),c=r(34),l=n(c),_=r(26),f=n(_),E=r(27),S=n(E),p=r(30),O=n(p),R=r(33),T=n(R),P=r(28),A=n(P),g=r(36),M=n(g),I=r(25),h=n(I),m=r(35),D=n(m),y=r(29),v=n(y),U=s["default"].fromJS({emailSignInSuccessModalVisible:!1,emailSignInErrorModalVisible:!1,oAuthSignInSuccessModalVisible:!1,oAuthSignInErrorModalVisible:!1,oAuthSignInLoadingProvider:null,signOutSuccessModalVisible:!1,signOutErrorModalVisible:!1,emailSignUpSuccessModalVisible:!1,emailSignUpAddress:null,firstTimeLoginSuccessModalVisible:!1,firstTimeLoginErrorModalVisible:!1,requestPasswordResetSuccessModalVisible:!1,requestPasswordResetErrorModalVisible:!1,requestPasswordResetSuccessMessage:null,updatePasswordSuccessModalVisible:!1,updatePasswordErrorModalVisible:!1,destroyAccountSuccessModalVisible:!1,destroyAccountErrorModalVisible:!1,destroyAccountMessage:null,passwordResetSuccessModalVisible:!1,passwordResetErrorModalVisible:!1});t["default"]=(0,d.createReducer)(U,(u={},i(u,f.EMAIL_SIGN_IN_COMPLETE,function(e){return e.set("emailSignInSuccessModalVisible",!0)}),i(u,f.EMAIL_SIGN_IN_ERROR,function(e){return e.set("emailSignInErrorModalVisible",!0)}),i(u,A.OAUTH_SIGN_IN_COMPLETE,function(e){return e.merge({oAuthSignInSuccessModalVisible:!0,oAuthSignInLoadingProvider:null})}),i(u,A.OAUTH_SIGN_IN_ERROR,function(e){return e.merge({oAuthSignInErrorModalVisible:!0,oAuthSignInLoadingProvider:null})}),i(u,A.OAUTH_SIGN_IN_START,function(e,t){var r=t.provider;return e.merge({oAuthSignInLoadingProvider:r})}),i(u,l.HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL,function(e){return e.set("emailSignInSuccessModalVisible",!1)}),i(u,l.HIDE_EMAIL_SIGN_IN_ERROR_MODAL,function(e){return e.set("emailSignInErrorModalVisible",!1)}),i(u,O.SIGN_OUT_COMPLETE,function(e){return e.set("signOutSuccessModalVisible",!0)}),i(u,O.SIGN_OUT_ERROR,function(e){return e.set("signOutErrorModalVisible",!0)}),i(u,l.HIDE_SIGN_OUT_SUCCESS_MODAL,function(e){return e.set("signOutSuccessModalVisible",!1)}),i(u,l.HIDE_SIGN_OUT_ERROR_MODAL,function(e){return e.set("signOutErrorModalVisible",!1)}),i(u,S.EMAIL_SIGN_UP_COMPLETE,function(e,t){var r=t.user;return e.merge({emailSignUpSuccessModalVisible:!0,emailSignUpAddress:r.email})}),i(u,S.EMAIL_SIGN_UP_ERROR,function(e){return e.set("emailSignUpErrorModalVisible",!0)}),i(u,l.HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL,function(e){return e.merge({emailSignUpSuccessModalVisible:!1,emailSignUpAddress:null})}),i(u,l.HIDE_EMAIL_SIGN_UP_ERROR_MODAL,function(e){return e.set("emailSignUpErrorModalVisible",!1)}),i(u,l.SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL,function(e){return e.set("firstTimeLoginSuccessModalVisible",!0)}),i(u,l.HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL,function(e){return e.set("firstTimeLoginSuccessModalVisible",!1)}),i(u,l.HIDE_PASSWORD_RESET_SUCCESS_MODAL,function(e){return e.set("passwordResetSuccessModalVisible",!1)}),i(u,l.SHOW_PASSWORD_RESET_SUCCESS_MODAL,function(e){return e.set("passwordResetSuccessModalVisible",!0)}),i(u,l.SHOW_FIRST_TIME_LOGIN_ERROR_MODAL,function(e){return e.set("firstTimeLoginErrorModalVisible",!0)}),i(u,l.HIDE_FIRST_TIME_LOGIN_ERROR_MODAL,function(e){return e.set("firstTimeLoginErrorModalVisible",!1)}),i(u,l.HIDE_PASSWORD_RESET_ERROR_MODAL,function(e){return e.set("passwordResetErrorModalVisible",!1)}),i(u,l.SHOW_PASSWORD_RESET_ERROR_MODAL,function(e){return e.set("passwordResetErrorModalVisible",!0)}),i(u,T.REQUEST_PASSWORD_RESET_COMPLETE,function(e,t){var r=t.message;return e.merge({requestPasswordResetSuccessModalVisible:!0,requestPasswordResetSuccessMessage:r})}),i(u,T.REQUEST_PASSWORD_RESET_ERROR,function(e){return e.set("requestPasswordResetErrorModalVisible",!0)}),i(u,l.HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL,function(e){return e.merge({requestPasswordResetSuccessModalVisible:!1,requestPasswordResetSuccessMessage:null})}),i(u,l.HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL,function(e){return e.set("requestPasswordResetErrorModalVisible",!1)}),i(u,l.HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL,function(e){return e.set("oAuthSignInSuccessModalVisible",!1)}),i(u,l.HIDE_OAUTH_SIGN_IN_ERROR_MODAL,function(e){return e.set("oAuthSignInErrorModalVisible",!1)}),i(u,M.UPDATE_PASSWORD_COMPLETE,function(e){return e.set("updatePasswordSuccessModalVisible",!0)}),i(u,M.UPDATE_PASSWORD_ERROR,function(e){return e.set("updatePasswordErrorModalVisible",!0)}),i(u,l.HIDE_UPDATE_PASSWORD_SUCCESS_MODAL,function(e){return e.set("updatePasswordSuccessModalVisible",!1)}),i(u,l.HIDE_UPDATE_PASSWORD_ERROR_MODAL,function(e){return e.set("updatePasswordErrorModalVisible",!1)}),i(u,h.DESTROY_ACCOUNT_COMPLETE,function(e,t){var r=t.message;return e.merge({destroyAccountSuccessModalVisible:!0,destroyAccountMessage:r})}),i(u,h.DESTROY_ACCOUNT_ERROR,function(e){return e.set("destroyAccountErrorModalVisible",!0)}),i(u,l.HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL,function(e){return e.merge({destroyAccountSuccessModalVisible:!1,destroyAccountMessage:null})}),i(u,l.HIDE_DESTROY_ACCOUNT_ERROR_MODAL,function(e){return e.set("destroyAccountErrorModalVisible",!1)}),i(u,v.SS_AUTH_TOKEN_UPDATE,function(e,t){var r=t.mustResetPassword,n=t.firstTimeLogin;return e.merge({passwordResetSuccessModalVisible:r,firstTimeLoginSuccessModalVisible:n})}),i(u,l.HIDE_PASSWORD_RESET_SUCCESS_MODAL,function(e){return e.set("passwordResetSuccessModalVisible",!1)}),i(u,l.HIDE_PASSWORD_RESET_ERROR_MODAL,function(e){return e.set("passwordResetSuccessModalVisible",!1)}),i(u,D.UPDATE_PASSWORD_MODAL_COMPLETE,function(e){return e.merge({passwordResetSuccessModalVisible:!1,updatePasswordSuccessModalVisible:!0})}),u))},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0});var u,a=r(4),s=o(a),d=r(9),c=r(35),l=n(c),_=r(5),f={loading:!1,errors:null,form:{}};t["default"]=(0,d.createReducer)(s["default"].fromJS({}),(u={},i(u,_.SET_ENDPOINT_KEYS,function(e,t){var r=t.endpoints;return e.merge(r.reduce(function(e,t){return e[t]=s["default"].fromJS(f),e},{}))}),i(u,l.UPDATE_PASSWORD_MODAL_START,function(e,t){var r=t.endpoint;return e.setIn([r,"loading"],!0)}),i(u,l.UPDATE_PASSWORD_MODAL_COMPLETE,function(e,t){var r=t.endpoint;return e.merge(i({},r,f))}),i(u,l.UPDATE_PASSWORD_MODAL_ERROR,function(e,t){var r=t.endpoint,n=t.errors;return e.mergeDeep(i({},r,{loading:!1,errors:n}))}),i(u,l.UPDATE_PASSWORD_MODAL_FORM_UPDATE,function(e,t){var r=t.endpoint,n=t.key,o=t.value;return e.mergeDeep(i({},r,{form:i({},n,o)}))}),u))},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0});var u,a=r(4),s=o(a),d=r(9),c=r(36),l=n(c),_=r(5),f={loading:!1,errors:null,form:{}};t["default"]=(0,d.createReducer)(s["default"].fromJS({}),(u={},i(u,_.SET_ENDPOINT_KEYS,function(e,t){var r=t.endpoints;return e.merge(r.reduce(function(e,t){return e[t]=s["default"].fromJS(f),e},{}))}),i(u,l.UPDATE_PASSWORD_START,function(e,t){var r=t.endpoint;return e.setIn([r,"loading"],!0)}),i(u,l.UPDATE_PASSWORD_COMPLETE,function(e,t){var r=t.endpoint;return e.merge(i({},r,f))}),i(u,l.UPDATE_PASSWORD_ERROR,function(e,t){var r=t.endpoint,n=t.errors;return e.mergeDeep(i({},r,{loading:!1,errors:n}))}),i(u,l.UPDATE_PASSWORD_FORM_UPDATE,function(e,t){var r=t.endpoint,n=t.key,o=t.value;return e.mergeDeep(i({},r,{form:i({},n,o)}))}),u))},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0});var u,a=r(4),s=o(a),d=r(9),c=r(10),l=r(24),_=n(l),f=r(26),E=r(27),S=r(30),p=r(28),O=r(25),R=r(29),T=n(R),P=r(5),A=s["default"].fromJS({attributes:null,isSignedIn:!1,firstTimeLogin:!1,mustResetPassword:!1,endpointKey:null});t["default"]=(0,d.createReducer)(A,(u={},i(u,_.AUTHENTICATE_COMPLETE,function(e,t){var r=t.user;return e.merge({attributes:r,isSignedIn:!0,endpointKey:(0,c.getCurrentEndpointKey)()})}),i(u,T.SS_TOKEN_VALIDATION_COMPLETE,function(e,t){var r=t.user,n=t.mustResetPassword,o=t.firstTimeLogin;return e.merge({attributes:r,isSignedIn:!0,firstTimeLogin:o,mustResetPassword:n})}),i(u,P.STORE_CURRENT_ENDPOINT_KEY,function(e,t){var r=t.currentEndpointKey;return e.set("endpointKey",r)}),i(u,P.SET_ENDPOINT_KEYS,function(e,t){var r=t.currentEndpointKey;return e.set("endpointKey",r)}),i(u,f.EMAIL_SIGN_IN_COMPLETE,function(e,t){var r=t.endpoint,n=t.user;return e.merge({attributes:n.data,isSignedIn:!0,endpointKey:r})}),i(u,E.EMAIL_SIGN_UP_COMPLETE,function(e,t){var r=t.endpoint,n=t.user;return n.uid?e.merge({attributes:n,isSignedIn:!0,endpointKey:r}):e}),i(u,p.OAUTH_SIGN_IN_COMPLETE,function(e,t){var r=t.endpoint,n=t.user;return e.merge({attributes:n,isSignedIn:!0,endpointKey:r})}),i(u,T.SS_AUTH_TOKEN_UPDATE,function(e,t){var r=t.user,n=t.mustResetPassword,o=t.firstTimeLogin;return e.merge({mustResetPassword:n,firstTimeLogin:o,isSignedIn:!!r,attributes:r})}),i(u,_.AUTHENTICATE_FAILURE,function(e){return e.merge(A)}),i(u,T.SS_TOKEN_VALIDATION_ERROR,function(e){return e.merge(A)}),i(u,S.SIGN_OUT_COMPLETE,function(e){return e.merge(A)}),i(u,S.SIGN_OUT_ERROR,function(e){return e.merge(A)}),i(u,O.DESTROY_ACCOUNT_COMPLETE,function(e){return e.merge(A)}),u))},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.dispatch,r=e.endpoint,n=void 0===r?{}:r,o=e.settings,i=void 0===o?{}:o,u=e.reset,s=void 0!==u&&u,c=void 0;s&&resetConfig(),i.initialCredentials&&(c=i.initialCredentials.currentEndpointKey),(0,S.setCurrentSettings)((0,d["default"])({},O,i));var _=(0,f["default"])(n,(0,S.getInitialEndpointKey)()),p=_.defaultEndpointKey,R=_.currentEndpoint;c||(c=p),(0,S.setDefaultEndpointKey)(p),(0,S.setCurrentEndpoint)(R),t((0,E.setEndpointKeys)(Object.keys(R),c,p)),(0,S.setCurrentEndpointKey)(c);var T=(0,S.retrieveData)(a.SAVED_CREDS_KEY);if((0,S.getCurrentSettings)().initialCredentials){var P=(0,S.getCurrentSettings)().initialCredentials,A=P.user,g=P.headers;return(0,S.persistData)(a.SAVED_CREDS_KEY,g),Promise.resolve(A)}return T?(0,l["default"])(""+(0,S.getApiUrl)(c)+R[c].tokenValidationPath).then(function(e){return e.status>=200&&e.status<300?e.json().then(function(e){var t=e.data;return t}):((0,S.removeData)(a.SAVED_CREDS_KEY),Promise.reject({reason:"No credentials."}))}):Promise.reject({reason:"No credentials."})}Object.defineProperty(t,"__esModule",{value:!0}),t.applyConfig=i;var u=r(18),a=o(u),s=r(15),d=n(s),c=r(11),l=n(c),_=r(40),f=n(_),E=r(5),S=r(10),p=Function("return this")()||(0,eval)("this"),O={proxyIf:function(){return!1},proxyUrl:"/proxy",forceHardRedirect:!1,storage:"cookies",cookieExpiry:14,cookiePath:"/",initialCredentials:null,passwordResetSuccessUrl:function(){return p.location.href},confirmationSuccessUrl:function(){return p.location.href},tokenFormat:{"access-token":"{{ access-token }}","token-type":"Bearer",client:"{{ client }}",expiry:"{{ expiry }}",uid:"{{ uid }}"},parseExpiry:function(e){return 1e3*parseInt(e.expiry,10)||null},handleLoginResponse:function(e){return e.data},handleAccountUpdateResponse:function(e){return e.data},handleTokenValidationResponse:function(e){return e.data}}},function(e,t){"use strict";function r(e){var t=e.width,r=e.height,n=window.screenLeft?window.screenLeft:window.screenX,o=window.screenTop?window.screenTop:window.screenY,i=n+window.innerWidth/2-t/2,u=o+window.innerHeight/2-r/2;return{top:u,left:i}}function n(e){switch(e){case"facebook":return{width:580,height:400};case"google":return{width:452,height:633};case"github":return{width:1020,height:618};case"linkedin":return{width:527,height:582};case"twitter":return{width:495,height:645};case"live":return{width:500,height:560};case"yahoo":return{width:559,height:519};default:return{width:1020,height:618}}}function o(e){var t=n(e),o=t.width,i=t.height,u=r({width:o,height:i}),a=u.top,s=u.left;return"width="+o+",height="+i+",top="+a+",left="+s}function i(e,t,r){return window.open(t,r,u+","+o(e))}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=i;var u="scrollbars=no,toolbar=no,location=no,titlebar=no,directories=no,status=no,menubar=no"},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=require("browser-cookies")},function(e,t){e.exports=require("cookie")},,,,,function(e,t){e.exports=require("querystring")},,function(e,t){e.exports=require("react-router-redux")},function(e,t){e.exports=require("url")}]));