{"version":3,"file":"SignUpModal-B_gQYxN7.js","sources":["../../../app/javascript/components/authentication_modals/UserConfirmationModal.jsx","../../../app/assets/images/authentication_modals/sign-up.svg","../../../app/javascript/components/LoadingDots.tsx","../../../app/javascript/components/authentication_modals/pages/ContactSupport.tsx","../../../app/assets/images/authentication_modals/sign-in.svg","../../../app/javascript/components/authentication_modals/pages/EnterCode.jsx","../../../app/javascript/components/authentication_modals/pages/SetPassword.jsx","../../../app/assets/images/authentication_modals/email.svg","../../../app/javascript/components/authentication_modals/pages/EnterEmail.jsx","../../../app/javascript/components/authentication_modals/pages/InvalidEmail.tsx","../../../app/javascript/components/authentication_modals/pages/EnterPassword.jsx","../../../app/javascript/components/authentication_modals/pages/EmailNotFound.jsx","../../../app/javascript/components/authentication_modals/pages/PendingApproval.jsx","../../../app/javascript/components/authentication_modals/pages/VerifyUser.jsx","../../../app/javascript/components/authentication_modals/SignInModal.jsx","../../../app/assets/images/authentication_modals/agency-on.svg","../../../app/assets/images/authentication_modals/agency-off.svg","../../../app/assets/images/authentication_modals/supplier-on.svg","../../../app/assets/images/authentication_modals/supplier-off.svg","../../../app/assets/images/authentication_modals/arrow.svg","../../../app/javascript/components/authentication_modals/pages/ChooseUserType.tsx","../../../app/javascript/components/authentication_modals/pages/SignUpPage1.jsx","../../../app/javascript/components/authentication_modals/pages/SignUpPage2.jsx","../../../app/javascript/components/authentication_modals/pages/SignIn.jsx","../../../app/javascript/components/authentication_modals/SignUpModal.jsx"],"sourcesContent":["// TODO: CONVERT TO TYPESCRIPT\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\nclass UserConfirmationModal extends React.Component {\n constructor (props) {\n super(props)\n\n this.$modal = $(`#${props.modalId}`)\n this.state = {\n pagesVisited: [],\n currentPage: this.props.initialPage,\n isRevealed: false\n }\n }\n\n componentDidMount () {\n this.$modal.on('open.zf.reveal', () => {\n this.setState({ isRevealed: true })\n })\n\n this.$modal.on('closed.zf.reveal', () => {\n if (this.props.onModalClose) {\n this.props.onModalClose(this.close)\n }\n })\n\n if (window.location.hash === '#confirm_user') {\n this.$modal.foundation()\n this.open()\n }\n }\n\n open = () => {\n this.$modal.foundation('open')\n this.setState({ isRevealed: true })\n }\n\n close = () => {\n this.setState({\n currentPage: this.props.initialPage,\n pagesVisited: [],\n isRevealed: false\n })\n\n this.$modal.foundation('close')\n }\n\n advanceToPage = (page) => {\n this.setState((prevState) => {\n return {\n pagesVisited: [...prevState.pagesVisited, prevState.currentPage],\n currentPage: page\n }\n })\n }\n\n goBackToPreviousPage = () => {\n if (this.state.pagesVisited.length === 0) {\n return\n }\n\n this.setState(({ pagesVisited }) => {\n return {\n currentPage: pagesVisited[pagesVisited.length - 1],\n pagesVisited: pagesVisited.slice(0, -1)\n }\n })\n }\n\n render () {\n return this.props.render({\n currentPage: this.state.currentPage,\n isRevealed: this.state.isRevealed,\n advanceToPage: this.advanceToPage,\n goBackToPreviousPage: this.goBackToPreviousPage,\n close: this.close\n })\n }\n}\n\nUserConfirmationModal.propTypes = {\n render: PropTypes.func.isRequired,\n initialPage: PropTypes.string.isRequired,\n onModalClose: PropTypes.func.isRequired\n}\n\nUserConfirmationModal.defaultProps = {\n onModalClose: () => {\n }\n}\n\nexport default UserConfirmationModal\n","export default \"data:image/svg+xml,%3csvg%20width='34'%20height='34'%20viewBox='0%200%2034%2034'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20opacity='0.4'%20d='M34%2016.0893V17.9107C34%2018.1523%2033.9041%2018.3839%2033.7333%2018.5547C33.5625%2018.7255%2033.3308%2018.8214%2033.0893%2018.8214H29.4464V22.4643C29.4464%2022.7058%2029.3505%2022.9375%2029.1797%2023.1083C29.0089%2023.2791%2028.7773%2023.375%2028.5357%2023.375H26.7143C26.4727%2023.375%2026.2411%2023.2791%2026.0703%2023.1083C25.8995%2022.9375%2025.8036%2022.7058%2025.8036%2022.4643V18.8214H22.1607C21.9192%2018.8214%2021.6875%2018.7255%2021.5167%2018.5547C21.3459%2018.3839%2021.25%2018.1523%2021.25%2017.9107V16.0893C21.25%2015.8477%2021.3459%2015.6161%2021.5167%2015.4453C21.6875%2015.2745%2021.9192%2015.1786%2022.1607%2015.1786H25.8036V11.5357C25.8036%2011.2942%2025.8995%2011.0625%2026.0703%2010.8917C26.2411%2010.721%2026.4727%2010.625%2026.7143%2010.625H28.5357C28.7773%2010.625%2029.0089%2010.721%2029.1797%2010.8917C29.3505%2011.0625%2029.4464%2011.2942%2029.4464%2011.5357V15.1786H33.0893C33.3308%2015.1786%2033.5625%2015.2745%2033.7333%2015.4453C33.9041%2015.6161%2034%2015.8477%2034%2016.0893Z'%20fill='%234B7FD5'/%3e%3cpath%20d='M11.5104%2018.0625C12.8113%2018.0625%2014.083%2017.6575%2015.1646%2016.8986C16.2463%2016.1397%2017.0893%2015.0611%2017.5871%2013.7992C18.085%2012.5372%2018.2152%2011.1486%2017.9614%209.80891C17.7076%208.46923%2017.0812%207.23865%2016.1613%206.2728C15.2415%205.30694%2014.0695%204.64918%2012.7936%204.3827C11.5177%204.11623%2010.1952%204.25299%208.99336%204.77571C7.7915%205.29843%206.76426%206.18362%206.04152%207.31935C5.31879%208.45507%204.93304%209.79033%204.93304%2011.1563C4.93304%2012.9879%205.62601%2014.7445%206.85951%2016.0397C8.093%2017.3349%209.76599%2018.0625%2011.5104%2018.0625ZM16.1146%2019.7891H15.2564C14.0819%2020.3578%2012.8038%2020.6523%2011.5104%2020.6523C10.217%2020.6523%208.93894%2020.3578%207.76439%2019.7891H6.90625C5.07472%2019.7895%203.31833%2020.5536%202.02325%2021.9135C0.728161%2023.2733%200.000408686%2025.1175%200%2027.0406L0%2027.1602C0%2027.847%200.259864%2028.5058%200.722426%2028.9915C1.18499%2029.4771%201.81236%2029.75%202.46652%2029.75H20.5543C21.2085%2029.75%2021.8358%2029.4771%2022.2984%2028.9915C22.761%2028.5058%2023.0208%2027.847%2023.0208%2027.1602V27.0406C23.0204%2025.1175%2022.2927%2023.2733%2020.9976%2021.9135C19.7025%2020.5536%2017.9461%2019.7895%2016.1146%2019.7891Z'%20fill='%234B7FD5'/%3e%3c/svg%3e\"","import React from 'react'\nimport PropTypes from 'prop-types'\n\nexport interface LoadingDotsProps {\n show: boolean\n}\n\nconst LoadingDots = ({ show }: LoadingDotsProps): React.ReactElement => {\n return (\n
\n We emailed a code to your email address {props.email}. Please enter the code below.\n
}\n\n The code will expire in 30 minutes.\n
\n >\n )\n\n const formSchema = Yup.object({\n verification: Yup.string()\n .required('Required')\n .min(4, 'Must be 4 characters')\n .max(4, 'Must be 4 characters')\n })\n\n const handleSubmission = (values, { setFieldError }) => {\n props.confirmVerificationCode({\n email: props.email,\n verificationCode: values.verification\n }).then((response) => {\n if (response.data.status === 'success') {\n props.onSuccess()\n } else {\n setFieldError('verification', 'Incorrect Code, Try Again')\n }\n })\n }\n\n return (\n\n We are unable to find an account associated with {email}. If you have not signed up, please click Sign Up to continue\n
\n\n We will notify you via email when you have been approved.\n
\nOne last step!
\nEnter the password for your {this.state.email} account.
\n >\n }\n onGoBack={goBackToPreviousPage}\n onSuccess={(data) => {\n const redirectTo = localStorage.getItem('redirect_to')\n localStorage.removeItem('redirect_to')\n if (redirectTo) {\n window.location.href = redirectTo\n } else {\n window.location.href = data.redirect_link || ''\n }\n }}\n onResetPassword={() => advanceToPage('EnterCode')}\n />\n )\n case 'EnterCode':\n return (\n\n Are you a buyer or supplier? Choose one.\n
\n\n Procurated is a private platform of procurement professionals\n from governments, education institutions, and non-profits,\n across the country.\n
\n\n Submit your information to request access.\n
\n >\n }\n onGoBack={goBackToPreviousPage}\n onSuccess={() => {\n advanceToPage('EnterCode')\n }}\n />\n )\n case 'SignIn':\n return (\n