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AA,EAAA,uCACAA,EAAAA,EAAA,iCACAA,EAAAA,EAAA,mCAJUA,GAAL,CAAKA,GAAA,G","sources":["webpack://white_knight/./app/javascript/src/functions/getThemeName.ts","webpack://white_knight/./app/javascript/unauthenticated/src/components/TwoFactorAuth/TwoFactorAuth.tsx","webpack://white_knight/./app/javascript/unauthenticated/src/components/TwoFactorAuthOTP/TwoFactorAuthOTP.tsx","webpack://white_knight/./app/javascript/unauthenticated/src/components/Login/Login.tsx","webpack://white_knight/./app/javascript/src/components/VerificationSent/VerificationSent.tsx","webpack://white_knight/./app/javascript/unauthenticated/src/components/SignUp/RightHandPanel.tsx","webpack://white_knight/./app/javascript/src/components/UnauthenticatedStartContent/UnauthenticatedStartContent.tsx","webpack://white_knight/./app/javascript/unauthenticated/src/components/Unauthenticated/Unauthenticated.tsx","webpack://white_knight/./app/javascript/unauthenticated/src/store/rootReducer.ts","webpack://white_knight/./app/javascript/packs/unauthenticated.tsx","webpack://white_knight/./app/javascript/src/components/Start/StartHeader/StartHeader.tsx","webpack://white_knight/./app/javascript/src/selectors/selectUserId.ts","webpack://white_knight/./app/javascript/src/components/Start/StartLayout/StartLayout.tsx","webpack://white_knight/./app/javascript/src/functions/formSubmit.ts","webpack://white_knight/./app/javascript/unauthenticated/src/components/DividerWithText/DividerWithText.tsx","webpack://white_knight/./app/javascript/unauthenticated/src/components/SignUp/SignUp.tsx","webpack://white_knight/./app/javascript/unauthenticated/src/store/authentication/authenticationSlice.ts","webpack://white_knight/./app/javascript/unauthenticated/src/store/authentication/authenticationThunks.ts","webpack://white_knight/./app/javascript/unauthenticated/src/store/signup/signupSlice.ts","webpack://white_knight/./app/javascript/unauthenticated/src/types/signupPage.ts"],"sourcesContent":["export const getThemeName = () => {\n const host = window.location.hostname.toLowerCase();\n const subdomainOnly = ['test', 'development'].some(\n value => process.env.NODE_ENV === value\n );\n return host === 'newstream.adoptech.co.uk' ||\n (subdomainOnly && host.startsWith('newstream'))\n ? 'newStream'\n : 'adoptech';\n};\n","import classNames from 'classnames';\nimport React, { useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport {\n AdoptechButton,\n AdoptechButtonVariant,\n} from '../../../../src/components/AdoptechButton/AdoptechButton';\nimport { LoadingSpinner } from '../../../../src/components/LoadingSpinner/LoadingSpinner';\nimport { Panel } from '../../../../src/components/Panel/Panel';\nimport {\n sendSms,\n sendToken,\n} from '../../store/authentication/authenticationThunks';\nimport { ApplicationState } from '../../types/applicationState';\nimport { InputField } from '../InputField/InputField';\nimport './TwoFactorAuth.scss';\n\ninterface TwoFactorAuthProps {\n email: string;\n}\n\nexport const TwoFactorAuth: React.FC = props => {\n const [token, setToken] = useState('');\n\n const dispatch = useDispatch();\n const requestSms = () => dispatch(sendSms(props.email));\n\n const authenticationState = useSelector(\n (state: ApplicationState) => state.authentication\n );\n\n const {\n smsRequesting,\n tokenVerifying,\n isAuthenticated,\n authySmsRequestSuccess: smsMessage,\n authySmsRequestWarning: smsMessageWarning,\n authyTokenError: errorMessage,\n } = authenticationState;\n\n const baseCss = 'twoFactorAuth';\n\n const errorMessageClasses = classNames({\n [`${baseCss}--infoMessage`]: true,\n [`${baseCss}--infoMessage--error`]: !!errorMessage,\n [`${baseCss}--infoMessage--hidden`]: !errorMessage,\n });\n\n const smsMessageClasses = classNames({\n [`${baseCss}--smsMessage`]: true,\n [`${baseCss}--smsMessage--error`]: !!smsMessageWarning,\n [`${baseCss}--smsMessage--hidden`]: !smsMessage && !smsMessageWarning,\n });\n\n if (isAuthenticated) return ; // If all form requests finished, and redirecting to dashboard\n return (\n
\n
\n \n
\n
\n Two Factor Authentication\n
\n\n
\n Please enter the token sent via the Authy App. If you have not\n installed the app, please request for a SMS.\n
\n\n
Token
\n\n
\n setToken(value)}\n placeholder=\"Enter Token\"\n type=\"text\"\n />\n
\n
{errorMessage}
\n
\n {smsMessageWarning ? smsMessageWarning : smsMessage}\n
\n
\n {smsRequesting ? (\n 'Requesting SMS...'\n ) : (\n
\n Request for SMS\n
\n )}\n {\n const obj = { email: props.email, token };\n dispatch(sendToken(obj));\n }}\n busy={tokenVerifying}\n variant={AdoptechButtonVariant.Primary}\n >\n Verify\n \n
\n
\n
\n
\n
\n );\n};\n","import classNames from 'classnames';\nimport React, { useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport {\n AdoptechButton,\n AdoptechButtonVariant,\n} from '../../../../src/components/AdoptechButton/AdoptechButton';\nimport { LoadingSpinner } from '../../../../src/components/LoadingSpinner/LoadingSpinner';\nimport { Panel } from '../../../../src/components/Panel/Panel';\nimport { sendOTP } from '../../store/authentication/authenticationThunks';\nimport { ApplicationState } from '../../types/applicationState';\nimport { InputField } from '../InputField/InputField';\nimport './TwoFactorAuthOTP.scss';\n\ninterface TwoFactorAuthOTPProps {\n email: string;\n password: string;\n qrCode: string;\n}\n\nexport const TwoFactorAuthOTP: React.FC = props => {\n const [otpAttempt, setOtpAttempt] = useState('');\n\n const dispatch = useDispatch();\n\n const authenticationState = useSelector(\n (state: ApplicationState) => state.authentication\n );\n\n const {\n tokenVerifying,\n isAuthenticated,\n otpAttemptError: errorMessage,\n } = authenticationState;\n\n const baseCss = 'twoFactorAuthOTP';\n\n const errorMessageClasses = classNames({\n [`${baseCss}--infoMessage`]: true,\n [`${baseCss}--infoMessage--error`]: !!errorMessage,\n [`${baseCss}--infoMessage--hidden`]: !errorMessage,\n });\n\n if (isAuthenticated) return ; // If all form requests finished, and redirecting to dashboard\n return (\n
\n
\n \n
\n
\n Two Factor Authentication\n
\n\n {props.qrCode ? (\n <>\n
\n Scan the QR code below using any authenticator application,\n such as Google or Microsoft Authenticator.\n
\n\n
\n \n
\n\n
\n After scanning, enter the 6-digit code generated by your\n authenticator app to complete the authentication process.\n
\n \n ) : (\n
\n Enter the 6-digit code from your authenticator app to complete\n the authentication process.\n
\n )}\n\n
One-Time Code
\n\n
\n setOtpAttempt(value)}\n placeholder=\"Enter one-time code\"\n type=\"text\"\n />\n
\n
{errorMessage}
\n
\n {\n const credentials = {\n email: props.email,\n password: props.password,\n otpAttempt,\n };\n dispatch(sendOTP(credentials));\n }}\n busy={tokenVerifying}\n variant={AdoptechButtonVariant.Primary}\n >\n Verify\n \n
\n
\n
\n
\n
\n );\n};\n","import classNames from 'classnames';\nimport { push } from 'connected-react-router';\nimport React, { useEffect, useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport {\n AdoptechButton,\n AdoptechButtonVariant,\n} from '../../../../src/components/AdoptechButton/AdoptechButton';\nimport { MessageToast } from '../../../../src/components/MessageToast/MessageToast';\nimport { toggleForgottenPasswordFlow } from '../../store/authentication/authenticationSlice';\nimport {\n login,\n sendConfirmationEmail,\n sendPasswordReset,\n} from '../../store/authentication/authenticationThunks';\nimport { ApplicationState } from '../../types/applicationState';\nimport DividerWithText from '../DividerWithText/DividerWithText';\nimport { InputField } from '../InputField/InputField';\nimport { TwoFactorAuth } from '../TwoFactorAuth/TwoFactorAuth';\nimport { TwoFactorAuthOTP } from '../TwoFactorAuthOTP/TwoFactorAuthOTP';\nimport './Login.scss';\nimport { StartLayout } from '../../../../src/components/Start/StartLayout/StartLayout';\nimport GetStarted from 'images/get-started.svg';\nimport {\n externalProvidersRoutes,\n signupRoute,\n} from '../../../../src/components/Routes/Routes';\nimport { formSubmit } from '../../../../src/functions/formSubmit';\n\nconst loginRedirectCallback = (path: string) => () => {\n formSubmit('post', path, {\n prompt: 'select_account',\n });\n};\n\nexport const Login: React.FC = () => {\n const [showAlreadyConfirmed, setShowAlreadyConfirmed] = useState(false);\n\n const authenticationState = useSelector(\n (state: ApplicationState) => state.authentication\n );\n\n const location = useSelector(\n (state: ApplicationState) => state.router.location\n );\n\n useEffect(() => {\n if (location.query.already_confirmed) {\n setShowAlreadyConfirmed(true);\n }\n }, []);\n\n let prompt = authenticationState.forgottenPasswordFlow\n ? 'Enter your email below and we will send you password reset instructions'\n : 'Please log in below';\n\n if (authenticationState.confirmationSent) {\n prompt = 'Email successfully sent';\n }\n\n let confirmLink = false;\n if (authenticationState.loginError) {\n prompt = authenticationState.loginError;\n if (\n prompt === 'You have to confirm your email address before continuing.'\n ) {\n confirmLink = true;\n }\n }\n\n const emailFieldClasses = classNames({\n 'login--emailField': true,\n 'login--emailField-red': authenticationState.loginError !== undefined,\n 'login--emailField-flex': authenticationState.forgottenPasswordFlow,\n });\n\n const passwordFieldClasses = classNames({\n 'login--passwordField': true,\n 'login--passwordField-hidden': authenticationState.forgottenPasswordFlow,\n 'login--passwordField-red': authenticationState.loginError !== undefined,\n });\n\n const resetPasswordClasses = classNames({\n 'login--resetPasswordMessage': true,\n 'login--resetPasswordMessage-hidden':\n !authenticationState.hasSentPasswordReset,\n });\n\n const subheaderClasses = classNames({\n 'login--subheader': true,\n 'login--subheader-red': authenticationState.loginError !== undefined,\n });\n\n const isAuthenticated = useSelector(\n (state: ApplicationState) => state.authentication.isAuthenticated\n );\n\n const is2FAVerifying = useSelector(\n (state: ApplicationState) => state.authentication.is2FAVerifying\n );\n\n const is2FAVerifyingOTP = useSelector(\n (state: ApplicationState) => state.authentication.is2FAVerifyingOTP\n );\n\n const qrCode = useSelector(\n (state: ApplicationState) => state.authentication.qrCode\n );\n\n if (isAuthenticated) {\n window.location.href = location.pathname + location.search;\n }\n\n const [email, setEmail] = useState('');\n const [password, setPassword] = useState('');\n\n const dispatch = useDispatch();\n\n const handleSubmit = (e: any) => {\n if (e !== null && e.target.id === 'forgottenPassword') {\n dispatch(toggleForgottenPasswordFlow());\n return;\n }\n\n if (e !== null && e.target.id === 'createAccount') {\n dispatch(push(signupRoute));\n return;\n }\n\n if (authenticationState.forgottenPasswordFlow) {\n dispatch(sendPasswordReset(email));\n } else {\n dispatch(login(email, password));\n }\n };\n\n if (is2FAVerifying) {\n return ;\n }\n\n if (is2FAVerifyingOTP) {\n return (\n \n );\n }\n\n return (\n \n setShowAlreadyConfirmed(false)}\n show={showAlreadyConfirmed}\n >\n Your account email has already been confirmed. Please login after\n closing this message.\n \n {!showAlreadyConfirmed && (\n {\n if (e.charCode === 13) {\n handleSubmit(e);\n }\n }}\n >\n
\n
\n
\n {authenticationState.forgottenPasswordFlow\n ? 'Forgot your password?'\n : 'Login'}\n
\n {!authenticationState.forgottenPasswordFlow && (\n <>\n
\n
Don't have an account?
\n dispatch(push(signupRoute))}\n tabIndex={0}\n >\n Get started\n
\n
\n\n
\n \n Continue with Google\n \n
\n
\n \n Continue with Microsoft\n \n
\n \n \n )}\n {(authenticationState.forgottenPasswordFlow ||\n authenticationState.loginError) && (\n
\n {prompt}\n {confirmLink && (\n
\n {\" Didn't get the email? Click \"}\n\n {\n dispatch(sendConfirmationEmail(email));\n }}\n tabIndex={0}\n >\n here\n
\n {' to resend it'}\n
\n )}\n
\n )}\n
\n setEmail(value)}\n placeholder=\"Enter your email address\"\n type=\"email\"\n />\n
\n
\n setPassword(value)}\n placeholder=\"Enter your password\"\n type=\"password\"\n />\n
\n
\n We have sent you an email with instructions on how to reset your\n password. Please follow the instructions there to continue.\n
\n {!authenticationState.hasSentPasswordReset && (\n <>\n
\n {\n handleSubmit(null);\n }}\n busy={authenticationState.isLoggingIn}\n variant={AdoptechButtonVariant.Primary}\n extraClass=\"login--button\"\n >\n \n {authenticationState.forgottenPasswordFlow\n ? 'SEND'\n : 'LOGIN'}\n \n \n
\n {\n dispatch(toggleForgottenPasswordFlow());\n }}\n tabIndex={0}\n >\n {authenticationState.forgottenPasswordFlow\n ? 'Return to Login'\n : 'Forgotten your password?'}\n \n \n )}\n \n \n \n )}\n \n );\n};\n","import React from 'react';\nimport './VerificationSent.scss';\nimport { ApplicationState } from '../../../unauthenticated/src/types/applicationState';\nimport { useSelector } from 'react-redux';\n\nexport const VerificationSent: React.FC = () => {\n const emailAddress = useSelector(\n (state: ApplicationState) => state.authentication.email\n );\n return (\n
\n
Verification email sent
\n
\n In order to verify your email address and email has been sent to:\n
\n
{emailAddress}
\n
\n Please click on the link within the email and remember to check your\n spam folder.\n
\n {/*
*/}\n {/*
Didn't get the email?
*/}\n {/*
*/}\n {/* Click here to resend.*/}\n {/*
*/}\n {/*
*/}\n
\n );\n};\n","import { faCheck } from '@fortawesome/pro-regular-svg-icons/faCheck';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport React from 'react';\nimport './RightHandPanel.scss';\n\nconst DescriptionRow: React.FC<{ text: string }> = props => {\n const baseCss = 'rightHandPanel';\n return (\n
\n \n {props.text}\n
\n );\n};\n\nconst titles = ['With Adoptech', 'Expert support'];\nconst topRows = [\n 'Cyber Essentials Certification',\n 'ISO 27001',\n 'ISO 9001',\n 'SOC 2',\n '70+ Company Policies, Agreements and Checklists',\n 'Suite of platform tools and automations',\n '£25K Cyber Insurance',\n];\n\nconst bottomRows = [\n 'UK based team on-hand to help',\n 'Dedicated Project Manager',\n];\n\nexport const RightHandPanel: React.FC = () => {\n const baseCss = 'rightHandPanel';\n\n return (\n
\n
{titles[0]}
\n
\n {topRows.map(row => (\n \n ))}\n
\n
{titles[1]}
\n
\n {bottomRows.map(row => (\n \n ))}\n
\n
\n );\n};\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { ApplicationState } from '../../../unauthenticated/src/types/applicationState';\nimport { SignupPage } from '../../../unauthenticated/src/types/signupPage';\nimport { StartLayout } from '../Start/StartLayout/StartLayout';\nimport SignUp from '../../../unauthenticated/src/components/SignUp/SignUp';\nimport VerificationSentSvg from 'images/verification-sent.svg';\nimport { VerificationSent } from '../VerificationSent/VerificationSent';\nimport { RightHandPanel } from '../../../unauthenticated/src/components/SignUp/RightHandPanel';\n\nconst UnauthenticatedStartContent: React.FC = () => {\n const currentPage = useSelector(\n (state: ApplicationState) => state.signup.currentPage\n );\n const isGetStarted = currentPage === SignupPage.GetStarted;\n\n if (isGetStarted)\n return (\n }>\n \n \n );\n\n return (\n \n \n \n );\n};\n\nexport default UnauthenticatedStartContent;\n","import { configureStore, getDefaultMiddleware } from '@reduxjs/toolkit';\nimport classNames from 'classnames';\nimport { createBrowserHistory } from 'history';\nimport moment from 'moment';\nimport React, { lazy, Suspense, useEffect } from 'react';\nimport { Provider } from 'react-redux';\nimport { Route, Switch } from 'react-router';\nimport { ConnectedRouter, routerMiddleware } from 'connected-react-router';\nimport { getSentryReduxEnhancer } from '../../../../packs/sentry';\nimport { ErrorToast } from '../../../../src/components/ErrorToast/ErrorToast';\nimport { getThemeName } from '../../../../src/functions/getThemeName';\nimport { errorHandler } from '../../../../src/middleware/errorHandler';\nimport { rootReducer } from '../../store/rootReducer';\nimport { Login } from '../Login/Login';\nimport './Unauthenticated.scss';\nimport { GoogleReCaptchaProvider } from 'react-google-recaptcha-v3';\nimport { LoadingScreen } from '../../../../src/components/LoadingScreen/LoadingScreen';\nimport UnauthenticatedStartContent from '../../../../src/components/UnauthenticatedStartContent/UnauthenticatedStartContent';\nimport { signupRoute } from '../../../../src/components/Routes/Routes';\nimport { initChatWidget } from '../../../../src/functions/chatWidgetHelper';\n\nconst Register = lazy(() => import('../Register/Register'));\nconst SignUp = lazy(() => import('../SignUp/SignUp'));\n\nconst history = createBrowserHistory();\n\nconst sentryEnhancer = getSentryReduxEnhancer();\n\nconst store = configureStore({\n reducer: rootReducer(history),\n middleware: [\n ...getDefaultMiddleware(),\n routerMiddleware(history),\n errorHandler,\n ],\n enhancers: sentryEnhancer ? [sentryEnhancer] : undefined,\n});\n\n// @ts-ignore\nmoment.locale(window.navigator.userLanguage || window.navigator.language);\n\nexport const Unauthenticated: React.FC = () => {\n useEffect(() => {\n initChatWidget();\n }, []);\n return (\n }>\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n );\n};\n","import { connectRouter } from 'connected-react-router';\nimport { History } from 'history';\nimport { combineReducers } from 'redux';\nimport AuthenticationReducer from './authentication/authenticationSlice';\nimport GlobalReducer from '../../../src/store/global/globalSlice';\nimport SignupReducer from './signup/signupSlice';\n\nexport const rootReducer = (history: History) =>\n combineReducers({\n authentication: AuthenticationReducer,\n global: GlobalReducer,\n router: connectRouter(history),\n signup: SignupReducer,\n });\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Unauthenticated } from '../unauthenticated/src/components/Unauthenticated/Unauthenticated';\nimport { sentryInit } from './sentry';\n\nsentryInit();\n\ndocument.addEventListener('DOMContentLoaded', () => {\n ReactDOM.render(, document.getElementById('root'));\n});\n","import React, { useEffect, useState } from 'react';\nimport { ProgressBar } from '../../ProgressBar/ProgressBar';\nimport './StartHeader.scss';\nimport adoptechLogoDark from 'images/adoptech-logo-dark.svg';\nimport { Link } from 'react-router-dom';\nimport { ApplicationState } from '../../../../unauthenticated/src/types/applicationState';\nimport { useSelector } from 'react-redux';\nimport { SignupPage } from '../../../../unauthenticated/src/types/signupPage';\nimport { signupRoute, welcomeRoute } from '../../Routes/Routes';\nimport { logoutUser } from '../../../store/user/userThunks';\nimport { useAppDispatch } from '../../../hooks/useAppDispatch';\n\ninterface StartHeaderProps {\n showLogin: boolean;\n showProgress: boolean;\n}\n\nexport const StartHeader: React.FC = props => {\n const currentPage = useSelector(\n (state: ApplicationState) => state.signup.currentPage\n );\n\n const numberOfStages = Object.keys(SignupPage).length / 2;\n const dispatch = useAppDispatch();\n const [progress, setProgress] = useState(0);\n const [previousProgress, setPreviousProgress] = useState(0);\n const handleCancel = () => dispatch(logoutUser());\n\n useEffect(() => {\n setTimeout(() => {\n setProgress((currentPage + 1) * (100 / numberOfStages));\n setPreviousProgress(currentPage * (100 / numberOfStages));\n }, 100);\n }, [currentPage]);\n\n const isSignupRoute =\n window.location.pathname.includes(welcomeRoute) ||\n window.location.pathname.includes(signupRoute);\n return (\n
\n {props.showProgress && (\n
\n {progress > 0 && (\n \n )}\n
\n )}\n\n
\n
\n \n
\n {isSignupRoute && (\n
\n
\n Have an account? \n
\n
\n \n Sign in here\n \n
\n
\n )}\n
\n
\n );\n};\n\nexport default StartHeader;\n","import { ApplicationState } from '../types/applicationState';\nimport { UserDetails } from '../swagger';\nimport { createSelector } from '@reduxjs/toolkit';\n\nconst getUserDetails = (state: ApplicationState) => state.user?.userDetails;\n\nexport const selectUserId = createSelector(\n getUserDetails,\n (userDetails: UserDetails) => {\n return userDetails?.id;\n }\n);\n","import React, { ReactElement } from 'react';\nimport StartHeader from '../StartHeader/StartHeader';\nimport StartFooter from '../StartFooter/StartFooter';\nimport './StartLayout.scss';\nimport { useSelector } from 'react-redux';\nimport { selectUserId } from '../../../selectors/selectUserId';\n\ninterface StartLayoutProps {\n rightHandPanelImage?: string;\n rightHandPanel?: ReactElement;\n showLogin?: boolean;\n showProgress?: boolean;\n}\n\nexport const StartLayout: React.FC = props => {\n const userId = useSelector(selectUserId);\n\n return (\n
\n \n
\n
\n
{props.children}
\n
\n
\n
\n {props.rightHandPanelImage && (\n \n )}\n\n {props.rightHandPanel && props.rightHandPanel}\n
\n
\n
\n \n
\n );\n};\n\nStartLayout.defaultProps = {\n showLogin: true,\n showProgress: true,\n};\n","import { getMetaContent } from './getMetaContent';\n\nexport const formSubmit = (\n method: 'get' | 'post',\n path: string,\n params: Record\n) => {\n const hiddenForm = document.createElement('form');\n hiddenForm.method = method;\n hiddenForm.action = path;\n\n params['authenticity_token'] = getMetaContent('csrf-token');\n for (const key in params) {\n const hiddenInput = document.createElement('input');\n hiddenInput.type = 'hidden';\n hiddenInput.name = key;\n hiddenInput.value = params[key];\n hiddenForm.appendChild(hiddenInput);\n }\n\n document.body.appendChild(hiddenForm);\n hiddenForm.submit();\n};\n","import React from 'react';\nimport './DividerWithText.scss';\n\ninterface DividerWithTextProps {\n text: string;\n}\n\nconst DividerWithText: React.FC = ({ text }) => {\n return (\n
\n
\n {text}\n
\n
\n );\n};\n\nexport default DividerWithText;\n","import classNames from 'classnames';\nimport React, { useCallback, useState } from 'react';\nimport { useGoogleReCaptcha } from 'react-google-recaptcha-v3';\nimport { useDispatch, useSelector } from 'react-redux';\nimport zxcvbn from 'zxcvbn';\nimport {\n AdoptechButton,\n AdoptechButtonVariant,\n} from '../../../../src/components/AdoptechButton/AdoptechButton';\nimport { isValidEmailAddress } from '../../../../src/functions/isValidEmailAddress';\nimport { sendAnalytics } from '../../../../src/functions/sendAnalytics';\nimport { clearSignUpError } from '../../store/authentication/authenticationSlice';\nimport { signUp } from '../../store/authentication/authenticationThunks';\nimport { ApplicationState } from '../../types/applicationState';\nimport DividerWithText from '../DividerWithText/DividerWithText';\nimport { InputField } from '../InputField/InputField';\nimport { PasswordStrength } from '../PasswordStrength/PasswordStrength';\nimport './SignUp.scss';\nimport { AdoptechCheckbox } from '../../../../src/components/AdoptechCheckbox/AdoptechCheckbox';\nimport {\n externalProvidersRoutes,\n portalRoutes,\n} from '../../../../src/components/Routes/Routes';\nimport { formSubmit } from '../../../../src/functions/formSubmit';\n\nconst SignUp: React.FC = () => {\n const { executeRecaptcha } = useGoogleReCaptcha();\n const [email, setEmail] = useState('');\n const [password, setPassword] = useState('');\n const [repeatPassword, setRepeatPassword] = useState('');\n const [termsChecked, setTermsChecked] = useState(false);\n\n let signUpError = useSelector(\n (state: ApplicationState) => state.authentication.signUpError\n );\n\n const isSigningUp = useSelector(\n (state: ApplicationState) => state.authentication.isSigningUp\n );\n\n const signupRedirectCallback = (path: string) => () => {\n formSubmit('post', path, {\n prompt: 'select_account',\n });\n };\n\n let mismatchedPasswords = false;\n const showEmailInvalidError = email !== '' && !isValidEmailAddress(email);\n const showPasswordMismatchError =\n repeatPassword !== '' && password != '' && repeatPassword !== password;\n if (showPasswordMismatchError) {\n mismatchedPasswords = true;\n signUpError = signUpError\n ? signUpError + ' The passwords do not match.'\n : 'The passwords do not match.';\n }\n const passwordStrength = zxcvbn(password);\n const passwordInvalid =\n password === '' ||\n repeatPassword === '' ||\n passwordStrength.score < 2 ||\n mismatchedPasswords;\n\n const showPasswordInvalidError =\n (repeatPassword !== '' && password !== '' && passwordStrength.score < 2) ||\n mismatchedPasswords;\n\n const signUpButtonDisabled =\n passwordInvalid || !isValidEmailAddress(email) || !termsChecked;\n\n // Show terms error only after \"disabled button wrapper div click\" to make it unobtrusive ( display less validation errors )\n const formValidExceptTerms =\n !passwordInvalid && isValidEmailAddress(email) && !termsChecked;\n const showTermsCheckedError = termsChecked === null;\n\n const baseCss = 'signUp';\n\n const emailFieldClasses = classNames({\n [`${baseCss}--emailField`]: true,\n [`${baseCss}--emailField-red`]: showEmailInvalidError,\n });\n\n const passwordFieldClasses = classNames({\n [`${baseCss}--passwordField`]: true,\n [`${baseCss}--passwordField-red`]: showPasswordInvalidError,\n });\n\n const handleSubmit = useCallback(async () => {\n dispatch(clearSignUpError());\n if (!executeRecaptcha) {\n alert('ReCaptcha not available');\n return;\n }\n\n const recaptchaResult = await executeRecaptcha('signup');\n sendAnalytics('sign_up');\n\n dispatch(signUp(email, password, repeatPassword, recaptchaResult));\n }, [email, executeRecaptcha, password, repeatPassword]);\n\n const dispatch = useDispatch();\n return (\n
\n
\n
\n
Get started
\n
\n \n Sign up with Google\n \n
\n
\n \n Sign up with Microsoft\n \n
\n \n
\n {\n setEmail(value);\n }}\n placeholder=\"Enter your email address\"\n type=\"email\"\n />\n
\n
\n
\n {\n setPassword(value);\n }}\n type=\"password\"\n />\n
\n
\n {\n setRepeatPassword(value);\n }}\n type=\"password\"\n />\n
\n \n {signUpError && (\n
\n {signUpError}\n
\n )}\n
\n \n {\n setTermsChecked(e.currentTarget.checked);\n }}\n label={\n
\n Tick to agree to the{' '}\n \n Privacy Policy\n {' '}\n and{' '}\n \n Terms & Conditions\n \n
\n }\n />\n
\n {showTermsCheckedError && (\n
\n You must agree to the Privacy Policy and Terms & Conditions\n
\n )}\n {\n if (formValidExceptTerms) {\n setTermsChecked(null);\n }\n }}\n >\n {\n handleSubmit();\n }}\n uppercase\n disabled={signUpButtonDisabled}\n busy={isSigningUp}\n variant={AdoptechButtonVariant.Primary}\n >\n Sign up with email\n \n
\n
\n \n \n );\n};\n\nexport default SignUp;\n","import { createSlice, PayloadAction } from '@reduxjs/toolkit';\nimport { UserDetails } from '../../../../src/swagger/models';\nimport { AuthenticationState } from './authenticationState';\n\nconst authenticationSlice = createSlice({\n initialState: {\n forgottenPasswordFlow: false,\n confirmationSent: false,\n } as unknown as AuthenticationState,\n name: 'authenticationSlice',\n reducers: {\n fetchEmailRequest: state => {\n state.fetchingEmailError = undefined;\n state.isFetchingEmail = true;\n },\n fetchEmailSuccess: (state, action: PayloadAction) => {\n state.email = action.payload;\n state.isFetchingEmail = false;\n },\n fetchEmailFailure: (state, action: PayloadAction) => {\n state.fetchingEmailError = action.payload;\n state.isFetchingEmail = false;\n },\n loginRequest: state => {\n state.isLoggingIn = true;\n state.loginError = undefined;\n },\n\n loginSuccess: state => {\n state.isAuthenticated = true;\n state.isLoggingIn = false;\n state.email = undefined;\n },\n loginFailure: (state, action: PayloadAction) => {\n state.isLoggingIn = false;\n state.loginError = action.payload;\n },\n registerRequest: state => {\n state.isRegistering = true;\n state.registerError = undefined;\n },\n registerSuccess: state => {\n state.isRegistering = false;\n },\n registerFailure: (state, action: PayloadAction) => {\n state.isRegistering = false;\n state.registerError = action.payload;\n },\n resetPasswordRequest: state => {\n state.isResettingPassword = true;\n state.resetPasswordError = undefined;\n },\n resetPasswordSuccess: state => {\n state.hasResetPassword = true;\n state.isResettingPassword = false;\n },\n resetPasswordFailure: (state, action: PayloadAction) => {\n state.isResettingPassword = false;\n state.resetPasswordError = action.payload;\n },\n sendPasswordResetRequest: state => {\n state.isSendingPasswordReset = true;\n state.sendPasswordResetError = undefined;\n },\n sendPasswordResetSuccess: state => {\n state.isSendingPasswordReset = false;\n state.hasSentPasswordReset = true;\n },\n sendPasswordResetFailure: (state, action: PayloadAction) => {\n state.isSendingPasswordReset = false;\n state.sendPasswordResetError = action.payload;\n },\n signUpRequest: (state, action: PayloadAction) => {\n state.email = action.payload;\n state.isSigningUp = true;\n state.signUpError = undefined;\n },\n clearSignUpError: state => {\n state.signUpError = undefined;\n },\n signUpSuccess: state => {\n state.isSigningUp = false;\n },\n signUpFailure: (state, action: PayloadAction) => {\n state.isSigningUp = false;\n state.signUpError = action.payload;\n },\n toggleForgottenPasswordFlow: state => {\n state.forgottenPasswordFlow = !state.forgottenPasswordFlow;\n },\n confirmationSent: state => {\n state.confirmationSent = true;\n state.loginError = undefined;\n },\n twoFactorAuthBypassOpen: (state, action: PayloadAction) => {\n state.isLoggingIn = false;\n state.is2FAVerifyingOTP = true;\n state.qrCode = action.payload;\n },\n twoFactorAuthVerifyOpen: (state, user: PayloadAction) => {\n state.isLoggingIn = false;\n state.is2FAVerifying = true;\n state.email = undefined;\n },\n authyTokenRequest: state => {\n state.tokenVerifying = true;\n state.authyTokenError = undefined;\n state.authySmsRequestSuccess = undefined;\n state.authySmsRequestWarning = undefined;\n },\n authyTokenSuccess: state => {\n state.tokenVerifying = false;\n state.isAuthenticated = true;\n state.isLoggingIn = false;\n },\n authyTokenFailure: (state, action: PayloadAction) => {\n state.tokenVerifying = false;\n state.authyTokenError = action.payload;\n },\n otpAttemptRequest: state => {\n state.tokenVerifying = true;\n state.otpAttemptError = undefined;\n },\n otpAttemptSuccess: state => {\n state.tokenVerifying = false;\n state.isAuthenticated = true;\n state.isLoggingIn = false;\n },\n otpAttemptFailure: (state, action: PayloadAction) => {\n state.tokenVerifying = false;\n state.otpAttemptError = action.payload;\n },\n authySmsRequest: state => {\n state.smsRequesting = true;\n state.authySmsRequestSuccess = undefined;\n state.authyTokenError = undefined;\n state.authySmsRequestWarning = undefined;\n },\n authySmsRequestMessage: (state, action: PayloadAction) => {\n state.smsRequesting = false;\n state.authySmsRequestSuccess = action.payload;\n },\n authySmsRequestMessageWarning: (state, action: PayloadAction) => {\n state.smsRequesting = false;\n state.authySmsRequestWarning = action.payload;\n },\n },\n});\n\nexport const {\n fetchEmailRequest,\n fetchEmailSuccess,\n fetchEmailFailure,\n loginRequest,\n loginSuccess,\n loginFailure,\n registerRequest,\n registerSuccess,\n registerFailure,\n resetPasswordRequest,\n resetPasswordSuccess,\n resetPasswordFailure,\n sendPasswordResetRequest,\n sendPasswordResetSuccess,\n sendPasswordResetFailure,\n signUpRequest,\n signUpSuccess,\n signUpFailure,\n toggleForgottenPasswordFlow,\n confirmationSent,\n twoFactorAuthBypassOpen,\n twoFactorAuthVerifyOpen,\n authyTokenRequest,\n authyTokenFailure,\n authySmsRequest,\n authySmsRequestMessage,\n authySmsRequestMessageWarning,\n authyTokenSuccess,\n otpAttemptRequest,\n otpAttemptSuccess,\n otpAttemptFailure,\n clearSignUpError,\n} = authenticationSlice.actions;\n\nexport default authenticationSlice.reducer;\n","import { push } from 'connected-react-router';\nimport { api } from '../../../../src/api/api';\nimport { getApiErrorMessage } from '../../../../src/functions/getApiErrorMessage';\nimport { getMetaContent } from '../../../../src/functions/getMetaContent';\nimport { UNKNOWN_ERROR } from '../../../../src/types/constants';\nimport { VoidThunk } from '../../../../src/types/voidThunk';\nimport {\n authySmsRequest,\n authySmsRequestMessage,\n authySmsRequestMessageWarning,\n authyTokenFailure,\n authyTokenRequest,\n authyTokenSuccess,\n otpAttemptFailure,\n otpAttemptRequest,\n otpAttemptSuccess,\n confirmationSent,\n fetchEmailFailure,\n fetchEmailRequest,\n fetchEmailSuccess,\n loginFailure,\n loginRequest,\n loginSuccess,\n registerFailure,\n registerRequest,\n registerSuccess,\n resetPasswordFailure,\n resetPasswordRequest,\n resetPasswordSuccess,\n sendPasswordResetFailure,\n sendPasswordResetRequest,\n sendPasswordResetSuccess,\n signUpFailure,\n signUpRequest,\n signUpSuccess,\n twoFactorAuthBypassOpen,\n twoFactorAuthVerifyOpen,\n} from './authenticationSlice';\nimport { forward } from '../signup/signupSlice';\nimport { welcomeRoute } from '../../../../src/components/Routes/Routes';\nimport { isArray } from 'util';\n\nexport const fetchEmail = (): VoidThunk => async (dispatch, getState) => {\n try {\n const token = getState().router.location.query['invitation_token'];\n dispatch(fetchEmailRequest());\n const response = await api().usersInvitationsTokenGet({ token });\n dispatch(fetchEmailSuccess(response.email));\n } catch (err) {\n if (err instanceof Response) {\n console.log(\n 'API error',\n `Status: ${err.status} Message: ${err.statusText}`\n );\n const apiErrorMessage = await getApiErrorMessage(err);\n if (apiErrorMessage) {\n dispatch(fetchEmailFailure(apiErrorMessage));\n } else {\n dispatch(\n fetchEmailFailure(\n 'An error occurred fetching invitation details. Please try again or contact support.'\n )\n );\n }\n } else {\n dispatch(fetchEmailFailure(UNKNOWN_ERROR));\n }\n setTimeout(() => dispatch(push('/r/welcome')), 2000);\n }\n};\n\nexport const login =\n (email: string, password: string): VoidThunk =>\n async dispatch => {\n try {\n dispatch(loginRequest());\n const payload = JSON.stringify({ user: { email, password } });\n const response = await fetch('/users/sign_in', {\n body: payload,\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': getMetaContent('csrf-token'),\n },\n method: 'POST',\n });\n\n if (response.status === 200) {\n const qrCode = (await response.json()).qr_code;\n dispatch(twoFactorAuthBypassOpen(qrCode));\n } else if (response.status === 201) {\n dispatch(loginSuccess());\n } else if (response.status === 204) {\n /** Redirect to 2FA step */\n dispatch(twoFactorAuthVerifyOpen(email));\n } else {\n const message = await getApiErrorMessage(response);\n\n dispatch(loginFailure(message));\n }\n } catch (err) {\n if (err instanceof Response) {\n console.log(\n 'API error',\n `Status: ${err.status} Message: ${err.statusText}`\n );\n const apiErrorMessage = await getApiErrorMessage(err);\n if (apiErrorMessage) {\n dispatch(loginFailure(apiErrorMessage));\n } else {\n dispatch(\n loginFailure(\n 'An error occurred logging in. Please try again or contact support.'\n )\n );\n }\n } else {\n console.log(err);\n dispatch(loginFailure(UNKNOWN_ERROR));\n }\n }\n };\n\nexport const register =\n (password: string, token: string): VoidThunk =>\n async dispatch => {\n try {\n dispatch(registerRequest());\n const payload = JSON.stringify({\n user: {\n invitation_token: token,\n password,\n password_confirmation: password,\n },\n });\n const response = await fetch('/users/invitation', {\n body: payload,\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': getMetaContent('csrf-token'),\n },\n method: 'PUT',\n });\n if (response.status === 204) {\n dispatch(registerSuccess());\n const redirectLocation = response.headers.get('Location');\n window.location.href =\n // For \"assessment response invite link\" vendor is required\n redirectLocation && redirectLocation.includes('assessment')\n ? welcomeRoute\n : redirectLocation || process.env.REACT_APP_DEFAULT_ROUTE;\n } else {\n const message =\n response.status === 401\n ? await getApiErrorMessage(response)\n : 'We were unable to accept the invitation. Please try again or contact support.';\n\n console.log(response);\n dispatch(registerFailure(message));\n }\n } catch (err) {\n if (err instanceof Response) {\n console.log(\n 'API error',\n `Status: ${err.status} Message: ${err.statusText}`\n );\n const apiErrorMessage = await getApiErrorMessage(err);\n if (apiErrorMessage) {\n dispatch(registerFailure(apiErrorMessage));\n } else {\n dispatch(\n registerFailure(\n 'An error occurred accepting the invitation. Please try again or contact support.'\n )\n );\n }\n } else {\n console.log(err);\n dispatch(registerFailure(UNKNOWN_ERROR));\n }\n }\n };\n\nexport const resetPassword =\n (password: string, token: string): VoidThunk =>\n async dispatch => {\n try {\n dispatch(resetPasswordRequest());\n const payload = JSON.stringify({\n user: {\n reset_password_token: token,\n password,\n password_confirmation: password,\n },\n });\n const response = await fetch('/users/password', {\n body: payload,\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': getMetaContent('csrf-token'),\n },\n method: 'PUT',\n });\n if (response.status === 204) {\n dispatch(resetPasswordSuccess());\n dispatch(push(process.env.REACT_APP_DEFAULT_ROUTE));\n } else {\n console.log(response);\n dispatch(\n resetPasswordFailure(\n 'We were unable to reset the password. Please try again or contact support.'\n )\n );\n }\n } catch (err) {\n if (err instanceof Response) {\n console.log(\n 'API error',\n `Status: ${err.status} Message: ${err.statusText}`\n );\n const apiErrorMessage = await getApiErrorMessage(err);\n if (apiErrorMessage) {\n dispatch(resetPasswordFailure(apiErrorMessage));\n } else {\n dispatch(\n resetPasswordFailure(\n 'An error occurred resetting the password. Please try again or contact support.'\n )\n );\n }\n } else {\n console.log(err);\n dispatch(resetPasswordFailure(UNKNOWN_ERROR));\n }\n }\n };\n\nexport const sendPasswordReset =\n (email: string): VoidThunk =>\n async dispatch => {\n try {\n dispatch(sendPasswordResetRequest());\n const payload = JSON.stringify({\n user: { email },\n });\n const response = await fetch('/users/password', {\n body: payload,\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': getMetaContent('csrf-token'),\n },\n method: 'POST',\n });\n console.log(response);\n if (response.statusText == 'Not Found' || response.status == 404) {\n dispatch(sendPasswordResetFailure('Email not found'));\n } else if (response.status === 401) {\n const message = await getApiErrorMessage(response);\n dispatch(sendPasswordResetFailure(message));\n } else {\n dispatch(sendPasswordResetSuccess());\n }\n } catch (err) {\n if (err instanceof Response) {\n console.log(\n 'API error',\n `Status: ${err.status} Message: ${err.statusText}`\n );\n const apiErrorMessage = await getApiErrorMessage(err);\n if (apiErrorMessage) {\n dispatch(sendPasswordResetFailure(apiErrorMessage));\n } else {\n dispatch(\n sendPasswordResetFailure(\n 'An error occurred sending the password reset instructions. Please try again or contact support.'\n )\n );\n }\n } else {\n console.log(err);\n dispatch(sendPasswordResetFailure(UNKNOWN_ERROR));\n }\n }\n };\n\nexport const signUp =\n (\n email: string,\n password: string,\n passwordConfirmation: string,\n recaptcha: string\n ): VoidThunk =>\n async dispatch => {\n try {\n dispatch(signUpRequest(email));\n const payload = JSON.stringify({\n 'g-recaptcha-response': recaptcha,\n user: {\n email,\n password,\n password_confirmation: passwordConfirmation,\n },\n });\n const response = await fetch('/api/v1/users', {\n body: payload,\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': getMetaContent('csrf-token'),\n },\n method: 'POST',\n });\n\n if (response.status === 201) {\n dispatch(signUpSuccess());\n dispatch(forward());\n } else {\n const json = await response.json();\n if (json?.errors?.email?.[0] === 'has already been taken') {\n dispatch(\n signUpFailure(\n 'This email address has already been taken. Please try again.'\n )\n );\n } else {\n dispatch(\n signUpFailure(\n 'There was a problem registering your details. Please try again.'\n )\n );\n }\n }\n } catch (err) {\n if (err instanceof Response) {\n console.log(\n 'API error',\n `Status: ${err.status} Message: ${err.statusText}`\n );\n const apiErrorMessage = await getApiErrorMessage(err);\n if (apiErrorMessage) {\n dispatch(signUpFailure(apiErrorMessage));\n } else {\n dispatch(\n signUpFailure(\n 'An error occurred during sign up. Please try again or contact support.'\n )\n );\n }\n } else {\n console.log(err);\n dispatch(signUpFailure(UNKNOWN_ERROR));\n }\n }\n };\n\nexport const sendConfirmationEmail =\n (email: string): VoidThunk =>\n async dispatch => {\n try {\n dispatch(registerRequest());\n const payload = JSON.stringify({\n email,\n });\n const response = await fetch('/users/confirmation', {\n body: payload,\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': getMetaContent('csrf-token'),\n },\n method: 'PUT',\n });\n if (response.status === 200) {\n dispatch(confirmationSent());\n } else {\n console.log(response);\n dispatch(\n registerFailure(\n 'We were unable to accept the invitation. Please try again or contact support.'\n )\n );\n }\n } catch (err) {\n if (err instanceof Response) {\n console.log(\n 'API error',\n `Status: ${err.status} Message: ${err.statusText}`\n );\n const apiErrorMessage = await getApiErrorMessage(err);\n if (apiErrorMessage) {\n dispatch(registerFailure(apiErrorMessage));\n } else {\n dispatch(\n registerFailure(\n 'An error occurred accepting the invitation. Please try again or contact support.'\n )\n );\n }\n } else {\n console.log(err);\n dispatch(registerFailure(UNKNOWN_ERROR));\n }\n }\n };\n\nexport const sendToken =\n (obj: any): VoidThunk =>\n async dispatch => {\n try {\n dispatch(authyTokenRequest());\n await api().usersVerifyTokenPost({ payload: { obj } });\n dispatch(authyTokenSuccess());\n } catch (err) {\n if (err instanceof Response) {\n console.log(\n 'API error',\n `Status: ${err.status} Message: ${err.statusText}`\n );\n const apiErrorMessage = await getApiErrorMessage(err);\n if (apiErrorMessage) {\n dispatch(authyTokenFailure(apiErrorMessage));\n } else {\n dispatch(\n authyTokenFailure(\n 'An error sending the request. Please try again or contact support.'\n )\n );\n }\n } else {\n dispatch(authyTokenFailure(UNKNOWN_ERROR));\n }\n }\n };\n\nexport const sendOTP =\n (mfa: any): VoidThunk =>\n async dispatch => {\n try {\n dispatch(otpAttemptRequest());\n await api().usersVerifyOtpPost({ payload: { mfa } });\n dispatch(otpAttemptSuccess());\n } catch (err) {\n if (err instanceof Response) {\n console.log(\n 'API error',\n `Status: ${err.status} Message: ${err.statusText}`\n );\n const apiErrorMessage = await getApiErrorMessage(err);\n if (apiErrorMessage) {\n dispatch(otpAttemptFailure(apiErrorMessage));\n } else {\n dispatch(\n otpAttemptFailure(\n 'An error sending the request. Please try again or contact support.'\n )\n );\n }\n } else {\n dispatch(authyTokenFailure(UNKNOWN_ERROR));\n }\n }\n };\n\nexport const sendSms =\n (email: string): VoidThunk =>\n async dispatch => {\n try {\n dispatch(authySmsRequest());\n await api().usersSmsRequestPost({ payload: { email } });\n dispatch(authySmsRequestMessage('SMS successfully sent'));\n } catch (err) {\n if (err instanceof Response) {\n console.log(\n 'API error',\n `Status: ${err.status} Message: ${err.statusText}`\n );\n const apiErrorMessage = await getApiErrorMessage(err);\n if (apiErrorMessage) {\n dispatch(authySmsRequestMessageWarning(apiErrorMessage));\n } else {\n dispatch(\n authySmsRequestMessageWarning(\n 'An error sending the request. Please try again or contact support.'\n )\n );\n }\n } else {\n dispatch(authySmsRequestMessageWarning(UNKNOWN_ERROR));\n }\n }\n };\n","import { SignupPage } from '../../types/signupPage';\nimport { createSlice, PayloadAction } from '@reduxjs/toolkit';\n\nconst signupSlice = createSlice({\n initialState: {\n currentPage: SignupPage.GetStarted,\n },\n name: 'signupSlice',\n reducers: {\n forward: state => {\n state.currentPage++;\n },\n setCurrentPage: (state, action: PayloadAction) => {\n state.currentPage = action.payload;\n },\n },\n});\n\nexport const { forward, setCurrentPage } = signupSlice.actions;\n\nexport default signupSlice.reducer;\n","export enum SignupPage {\n GetStarted,\n VerificationSent,\n CreateProfile,\n CompanyProfile,\n}\n"],"names":["getThemeName","host","window","location","hostname","toLowerCase","subdomainOnly","some","value","startsWith","TwoFactorAuth","props","token","setToken","useState","dispatch","authenticationState","state","authentication","smsRequesting","tokenVerifying","isAuthenticated","authySmsRequestSuccess","smsMessage","authySmsRequestWarning","smsMessageWarning","authyTokenError","errorMessage","baseCss","errorMessageClasses","smsMessageClasses","LoadingSpinner","className","Panel","placedOnDarkBackground","InputField","autoFocus","disableAutoComplete","onChange","placeholder","type","onClick","email","AdoptechButton","disabled","trim","length","obj","busy","variant","Primary","TwoFactorAuthOTP","otpAttempt","setOtpAttempt","otpAttemptError","qrCode","src","alt","credentials","password","loginRedirectCallback","path","formSubmit","prompt","Login","showAlreadyConfirmed","setShowAlreadyConfirmed","router","useEffect","query","already_confirmed","forgottenPasswordFlow","confirmationSent","confirmLink","loginError","emailFieldClasses","passwordFieldClasses","resetPasswordClasses","hasSentPasswordReset","subheaderClasses","is2FAVerifying","is2FAVerifyingOTP","href","pathname","search","setEmail","setPassword","handleSubmit","e","target","id","StartLayout","rightHandPanelImage","showLogin","showProgress","MessageToast","onClose","show","onKeyPress","charCode","tabIndex","Google","google","Microsoft","microsoft","DividerWithText","text","isPassword","isLoggingIn","extraClass","VerificationSent","emailAddress","DescriptionRow","icon","faCheck","titles","topRows","bottomRows","RightHandPanel","map","row","key","signup","currentPage","GetStarted","rightHandPanel","SignUp","Register","lazy","sentryEnhancer","store","reducer","history","global","middleware","errorHandler","enhancers","navigator","userLanguage","language","Unauthenticated","Suspense","fallback","LoadingScreen","reCaptchaKey","ErrorToast","exact","component","sentry","document","addEventListener","getElementById","numberOfStages","Object","keys","useAppDispatch","progress","setProgress","previousProgress","setPreviousProgress","setTimeout","isSignupRoute","includes","ProgressBar","to","selectUserId","user","userDetails","userId","children","StartFooter","defaultProps","method","params","hiddenForm","createElement","action","hiddenInput","name","appendChild","body","submit","executeRecaptcha","repeatPassword","setRepeatPassword","termsChecked","setTermsChecked","signUpError","isSigningUp","signupRedirectCallback","mismatchedPasswords","showEmailInvalidError","passwordStrength","passwordInvalid","score","showPasswordInvalidError","signUpButtonDisabled","formValidExceptTerms","showTermsCheckedError","useCallback","alert","recaptchaResult","result","checked","currentTarget","label","privacy","rel","terms","uppercase","authenticationSlice","initialState","reducers","fetchEmailRequest","fetchingEmailError","isFetchingEmail","fetchEmailSuccess","payload","fetchEmailFailure","loginRequest","loginSuccess","loginFailure","registerRequest","isRegistering","registerError","registerSuccess","registerFailure","resetPasswordRequest","isResettingPassword","resetPasswordError","resetPasswordSuccess","hasResetPassword","resetPasswordFailure","sendPasswordResetRequest","isSendingPasswordReset","sendPasswordResetError","sendPasswordResetSuccess","sendPasswordResetFailure","signUpRequest","clearSignUpError","signUpSuccess","signUpFailure","toggleForgottenPasswordFlow","twoFactorAuthBypassOpen","twoFactorAuthVerifyOpen","authyTokenRequest","authyTokenSuccess","authyTokenFailure","otpAttemptRequest","otpAttemptSuccess","otpAttemptFailure","authySmsRequest","authySmsRequestMessage","authySmsRequestMessageWarning","actions","fetchEmail","getState","response","usersInvitationsTokenGet","err","Response","console","log","status","statusText","apiErrorMessage","login","JSON","stringify","fetch","headers","Accept","json","qr_code","message","register","invitation_token","password_confirmation","redirectLocation","get","resetPassword","reset_password_token","sendPasswordReset","signUp","passwordConfirmation","recaptcha","errors","sendConfirmationEmail","sendToken","usersVerifyTokenPost","sendOTP","mfa","usersVerifyOtpPost","sendSms","usersSmsRequestPost","signupSlice","forward","setCurrentPage","SignupPage"],"sourceRoot":""}