{"version":3,"file":"index-p-VCXyfr.js","sources":["../../../app/frontend/features/auth/components/SignInCarousel.tsx","../../../app/frontend/features/auth/components/SignInLayout.tsx","../../../app/frontend/features/auth/api/useUsers.tsx","../../../app/frontend/features/auth/constants/index.tsx","../../../app/frontend/assets/images/foundation_icon_logo.svg","../../../app/frontend/features/auth/components/FoundationFeatureLogo.tsx","../../../app/frontend/features/auth/components/SignInLoader.tsx","../../../app/frontend/features/auth/routes/SignUp/index.tsx","../../../app/frontend/features/auth/components/PasswordForm.tsx","../../../app/frontend/features/auth/components/CheckEmailForm.tsx","../../../app/frontend/assets/images/illustrations/mail.svg","../../../app/frontend/features/auth/components/CheckEmailDisplay.tsx","../../../app/frontend/features/auth/helpers/index.ts","../../../app/frontend/features/auth/routes/SignIn/index.tsx","../../../app/frontend/features/auth/components/SignUpLoader.tsx","../../../app/frontend/features/auth/routes/ConfirmEmail/index.tsx","../../../app/frontend/features/auth/components/ResetPasswordEmailForm.tsx","../../../app/frontend/features/auth/components/ResetPasswordForm.tsx","../../../app/frontend/features/auth/routes/ResetPassword/index.tsx","../../../app/frontend/features/auth/components/SetPasswordForm.tsx","../../../app/frontend/features/auth/routes/SetPassword/index.tsx"],"sourcesContent":["import { Box } from '@mui/material';\nimport { Carousel as BaseCarousel } from 'react-responsive-carousel';\nimport 'react-responsive-carousel/lib/styles/carousel.min.css';\nimport { CarouselArrow, CarouselIndicator, Typography, theme } from '@commercefoundation/fractal';\nimport SignInIllustration from '@/assets/images/illustrations/sign-in-illustration.svg';\n\nconst CAROUSEL_ITEMS = [\n {\n image: SignInIllustration,\n title: 'Easy Order Configuration',\n handle: 'easy-order-configuration',\n description:\n 'Set Minimum Order Value (MOV) and Minimum Order Quantity (MOQ) effortlessly. Align orders with your goals for boosted profits and satisfied customers.',\n },\n {\n image: SignInIllustration,\n title: 'Build Excellent Customer Relationships',\n handle: 'build-excellent-customer-relationships',\n description:\n 'Increase your customer base by providing them with a self-onboarding and frictionless experience. Empower your sales team by understanding all customer interactions with your business.',\n },\n {\n image: SignInIllustration,\n title: 'Superior Shopping Experience',\n handle: 'superior-shopping-experience',\n description:\n 'Provide a consumer-like shopping experience purpose-built for business customers to order products in bulk. Increase SEO through vendor and product pages.',\n },\n];\n\nexport const SignInCarousel = () => {\n return (\n \n \n \n hasNext && (\n \n )\n }\n renderArrowPrev={(onClickHandler, hasPrev) =>\n hasPrev && (\n \n )\n }\n renderIndicator={(onClickHandler, isSelected, index) => (\n \n )}\n width=\"400px\"\n >\n {CAROUSEL_ITEMS.map((item) => (\n \n \"Sign\n \n \n {item.title}\n \n \n {item.description}\n \n \n \n ))}\n \n \n \n );\n};\n","import { Box } from '@mui/material';\nimport type { ReactNode } from 'react';\nimport { theme } from '@commercefoundation/fractal';\nimport Grid from '@mui/material/Unstable_Grid2';\nimport { SignInCarousel } from './SignInCarousel';\n\nexport const SignInLayout = ({ children }: { children: ReactNode }) => {\n return (\n \n \n \n \n \n \n {children}\n \n \n \n );\n};\n","import {\n useMutation,\n UseMutationOptions,\n useQuery,\n type UseQueryOptions,\n} from '@tanstack/react-query';\nimport type {\n ConfirmTokenResponse,\n SignInBody,\n SignInResponse,\n SignUpData,\n SignUpResponse,\n TResetPassword,\n TSetPassword,\n} from '../types';\nimport { axios } from '@/lib/axios';\nimport type { AxiosError } from 'axios';\n\nexport const useCheckEmail = (\n email: string,\n queryProps?: UseQueryOptions<\n unknown,\n AxiosError,\n {\n exists: boolean;\n uses_password: boolean;\n }\n >\n) => {\n return useQuery<\n unknown,\n AxiosError,\n {\n exists: boolean;\n uses_password: boolean;\n }\n >(\n [`check-email_${email}`],\n () => {\n return axios.get(`/users/check_email?email=${email}`);\n },\n {\n ...queryProps,\n }\n );\n};\n\ntype RequestMagicLink = {\n email: string;\n remember_me?: boolean;\n return_to?: string;\n};\n\nexport const useRequestMagicLink = (\n queryProps?: UseMutationOptions\n) => {\n return useMutation((body) => {\n return axios.post(`/users/magic_link`, {\n user: body,\n });\n }, queryProps);\n};\n\nexport const useSignIn = (\n queryProps?: UseMutationOptions\n) => {\n return useMutation((body) => {\n return axios.post(`/users/sign_in`, {\n user: body,\n });\n }, queryProps);\n};\n\nexport const useSignUp = (\n queryProps?: UseMutationOptions\n) => {\n return useMutation((data) => {\n return axios.post(`/users/sign_up`, {\n user: {\n email: data.email,\n full_name: data.full_name,\n custom_data: {\n sign_up: {\n company_name: data.company_name,\n business_type: data.business_type,\n },\n },\n },\n });\n }, queryProps);\n};\n\nexport const useRequestConfirmationToken = (\n queryProps?: UseMutationOptions\n) => {\n return useMutation((email) => {\n return axios.post(`/users/confirmation`, {\n user: {\n email: email,\n },\n });\n }, queryProps);\n};\n\nexport const useConfirmConfirmationToken = (\n email: string,\n token: string,\n queryProps?: UseQueryOptions\n) => {\n return useQuery(\n [`confirm_confirmation_token_${email}_${token}`],\n () => {\n return axios.get(`/users/confirmation?email=${email}&confirmation_token=${token}`);\n },\n {\n ...queryProps,\n }\n );\n};\n\nexport const useRequestPasswordResetToken = (\n queryProps?: UseMutationOptions\n) => {\n return useMutation((email) => {\n return axios.post(`/users/password`, {\n user: {\n email: email,\n },\n });\n }, queryProps);\n};\n\nexport const useResetPassword = (\n queryProps?: UseMutationOptions\n) => {\n return useMutation((body) => {\n return axios.patch(`/users/password`, {\n user: body,\n });\n }, queryProps);\n};\n\nexport const useSetPassword = (\n queryProps?: UseMutationOptions\n) => {\n return useMutation((body) => {\n return axios.patch(`/users/invitation`, {\n user: body,\n });\n }, queryProps);\n};\n","import { FeatureIcon } from '@commercefoundation/fractal';\n\nexport const USER_TYPE_OPTIONS = [\n {\n label: \"I'm a wholesaler\",\n iconVariant: 'checkCircle',\n Icon: () => ,\n value: 'wholesaler',\n },\n {\n label: \"I'm a vendor or brand\",\n iconVariant: 'checkCircle',\n Icon: () => ,\n value: 'vendor',\n },\n {\n label: \"I'm an independent sales rep\",\n iconVariant: 'checkCircle',\n Icon: () => ,\n value: 'isr',\n },\n {\n label: \"I'm a distributor\",\n iconVariant: 'checkCircle',\n Icon: () => ,\n value: 'distributor',\n },\n {\n label: 'Not quite any of these',\n iconVariant: 'checkCircle',\n Icon: () => ,\n value: 'other',\n },\n];\n\nexport const errorMessagesMap: {\n [key: string]: string;\n} = {\n 'Invalid confirmation token or email': 'Invalid verification code or email',\n};\n","export default \"data:image/svg+xml,%3csvg%20width='28'%20height='29'%20viewBox='0%200%2028%2029'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.29687%2023.778H19.2085C23.2299%2023.778%2025.271%2018.9957%2022.4693%2016.1457L8.55767%201.99005C5.71173%20-0.904295%200.75%201.08903%200.75%205.12559V19.2785C0.75%2021.7625%202.78558%2023.778%205.29687%2023.778Z'%20fill='%23EB567B'/%3e%3cpath%20d='M22.5268%205.22266H8.61512C4.59374%205.22266%202.55262%2010.005%205.35431%2012.855L19.266%2027.0106C22.1119%2029.905%2027.0736%2027.9117%2027.0736%2023.8751V9.7222C27.0736%207.23816%2025.0381%205.22266%2022.5268%205.22266Z'%20fill='%233FBCF8'/%3e%3cpath%20d='M22.4729%2016.162L11.7286%205.22266H8.60319C4.59233%205.22266%202.55656%209.99512%205.35092%2012.8392L16.0953%2023.7785H19.2206C23.2315%2023.7785%2025.2673%2019.0061%2022.4729%2016.162Z'%20fill='%23465AB5'/%3e%3c/svg%3e\"","import { Box } from '@mui/material';\nimport { theme } from '@commercefoundation/fractal';\nimport FoundationIconLoco from '@/assets/images/foundation_icon_logo.svg';\n\nexport const FoundationFeatureLogo = () => (\n \n \"foundation-logo\"\n \n);\n","import { LoadingIndicator, Typography, theme } from '@commercefoundation/fractal';\nimport { Box } from '@mui/material';\n\nexport const SignInLoader = () => {\n return (\n \n \n Simplifying Commerce\n \n \n one step at a time ....\n \n \n \n \n \n );\n};\n","import { Box } from '@mui/material';\nimport { SignInLayout } from '../../components/SignInLayout';\nimport { useSignUp } from '../../api/useUsers';\nimport { TextInput, Typography, RadioGroup, Button, theme } from '@commercefoundation/fractal';\nimport { Controller, useForm } from 'react-hook-form';\nimport type { SignUpData } from '../../types';\nimport { SignUpSchema } from '../../schemas';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { Link, useNavigate, useSearchParams } from 'react-router-dom';\nimport { USER_TYPE_OPTIONS } from '../../constants';\nimport { FoundationFeatureLogo } from '../../components/FoundationFeatureLogo';\nimport { useState } from 'react';\nimport { SignInLoader } from '../../components/SignInLoader';\n\nexport const SignUp = () => {\n const navigate = useNavigate();\n const [searchParams] = useSearchParams();\n const email = decodeURIComponent(searchParams.get('email') || '');\n\n const [isSigningUp, setIsSigningUp] = useState(false);\n\n const {\n control,\n handleSubmit,\n formState: { errors },\n setError,\n } = useForm({\n defaultValues: {\n full_name: '',\n email: email,\n company_name: '',\n business_type: '',\n },\n resolver: yupResolver(SignUpSchema),\n });\n\n const onSubmit = (data: SignUpData) => {\n setIsSigningUp(true);\n signUp(data);\n };\n\n const { mutate: signUp } = useSignUp({\n onSuccess: ({ email }) => {\n navigate(`/ui/confirm_email?email=${encodeURIComponent(email)}`);\n },\n onError: (error) => {\n setIsSigningUp(false);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n for (const [errorType, errorValue] of Object.entries(error.response?.data as any) as any) {\n if (errorValue[0]) {\n setError(errorType, { message: `${errorType} ${errorValue}` });\n }\n }\n },\n });\n\n if (isSigningUp)\n return (\n \n \n \n \n \n );\n\n return (\n \n \n
\n \n \n \n \n \n \n Let's get started!\n \n \n Tell us a little bit about youself to get started.\n \n \n (\n \n )}\n />\n \n (\n \n )}\n />\n \n (\n \n )}\n />\n \n What best describes you?\n \n \n (\n \n )}\n />\n {errors['business_type'] && (\n \n {errors['business_type'].message}\n \n )}\n \n \n Continue\n \n \n \n Already have an account?\n \n \n \n \n \n \n \n \n
\n );\n};\n","import { Button, Checkbox, Icon, TextInput, Typography, theme } from '@commercefoundation/fractal';\nimport { Box } from '@mui/material';\nimport { Controller, useForm } from 'react-hook-form';\nimport { useRequestMagicLink } from '../api/useUsers';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { PasswordFormSchema } from '../schemas';\nimport { useNavigate, useSearchParams } from 'react-router-dom';\nimport { FoundationFeatureLogo } from './FoundationFeatureLogo';\n\ntype PasswordFormProps = {\n initialEmail: string;\n onPasswordEntered: (data: { email: string; password: string }) => void;\n onMagicLinkRequested: () => void;\n disabled: boolean;\n errorMessages?: string[];\n};\n\nexport const PasswordForm = ({\n initialEmail,\n onPasswordEntered,\n onMagicLinkRequested,\n disabled,\n errorMessages,\n}: PasswordFormProps) => {\n const [searchParams] = useSearchParams();\n const returnToUrl = decodeURIComponent(searchParams.get('return_to') || '');\n\n const { mutate: requestMagicLink, isLoading: isRequestingMagicLink } = useRequestMagicLink({\n onSuccess: () => onMagicLinkRequested(),\n });\n const {\n control,\n handleSubmit,\n formState: { errors },\n } = useForm({\n defaultValues: {\n email: initialEmail,\n password: '',\n remember_me: true,\n },\n resolver: yupResolver(PasswordFormSchema),\n });\n\n const onEmailMagicLink = () => {\n requestMagicLink({\n email: initialEmail,\n ...(returnToUrl && { return_to: returnToUrl }),\n });\n };\n\n const navigate = useNavigate();\n\n return (\n
\n \n \n \n \n Sign In\n \n \n Enter your password or request a magic link to continue.\n \n \n \n (\n \n )}\n />\n \n (\n \n )}\n />\n \n \n (\n \n )}\n />\n \n \n {errorMessages?.map((errorMessage) => (\n \n {errorMessage}\n \n ))}\n \n \n Sign In\n \n \n }\n >\n Email magic link instead\n \n \n \n \n );\n};\n","import { Button, TextInput, Typography, theme } from '@commercefoundation/fractal';\nimport { Box } from '@mui/material';\nimport { Controller, useForm } from 'react-hook-form';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { CheckEmailSchema } from '../schemas';\nimport { FoundationFeatureLogo } from './FoundationFeatureLogo';\nimport { Link } from 'react-router-dom';\n\ntype CheckEmailFormProps = {\n onEmailEntered: (email: string) => void;\n disabled: boolean;\n errorMessages?: string[];\n};\n\nexport const CheckEmailForm = ({\n onEmailEntered,\n disabled,\n errorMessages,\n}: CheckEmailFormProps) => {\n const {\n control,\n handleSubmit,\n getValues,\n formState: { errors },\n } = useForm({\n defaultValues: {\n email: '',\n },\n resolver: yupResolver(CheckEmailSchema),\n });\n\n const onSubmit = (data: { email: string }) => {\n onEmailEntered(data.email);\n };\n\n return (\n
\n \n \n \n \n Welcome Back!\n \n \n Keep going! Just enter your email to sign in.\n \n \n \n (\n \n )}\n />\n {errorMessages?.map((errorMessage) => (\n \n {errorMessage}\n \n ))}\n \n \n Continue\n \n \n \n Don't have an account?\n \n \n \n \n \n \n \n );\n};\n","export default \"data:image/svg+xml,%3csvg%20width='51'%20height='53'%20viewBox='0%200%2051%2053'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M46.7111%2051.8702H4.2889C2.20243%2051.8702%200.5%2050.1687%200.5%2048.0922V22.4986C0.5%2020.1299%201.73129%2017.931%203.75441%2016.6875L21.9823%205.49153C24.1875%204.13744%2026.9748%204.14138%2029.1761%205.50337L47.2614%2016.6835C49.2727%2017.9271%2050.5%2020.1221%2050.5%2022.4828V48.0882C50.5%2050.1687%2048.7936%2051.8663%2046.7111%2051.8663V51.8702Z'%20fill='%233E4784'%20stroke='%233E4784'%20stroke-width='0.433696'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M47.0217%2049.6917H2.67383C4.28382%2041.0207%205.56943%2021.8202%204.51325%201.88118C11.3211%201.88118%2039.2368%201.00111%2039.2368%201.00111C41.5034%200.914674%2046.8239%205.90435%2046.8239%207.48769C46.8239%2023.9104%2047.0217%2049.6957%2047.0217%2049.6957V49.6917Z'%20fill='%23F5F8FF'%20stroke='%233E4784'%20stroke-width='0.433696'%20stroke-miterlimit='10'/%3e%3cpath%20d='M0.93457%2049.7308L22.3685%2035.3584C24.3852%2034.1842%2026.8784%2034.1842%2028.8951%2035.3584L50.4998%2049.2072C50.1345%2050.4409%2048.745%2051.869%2046.903%2051.869H4.36066C2.55035%2051.869%201.42685%2050.798%200.93457%2049.7308Z'%20fill='%23B2CCFF'%20stroke='%233E4784'%20stroke-width='0.433696'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M29.1953%2035.5076L50.4997%2022.7384V48.1174C50.4997%2048.5355%2050.4447%2048.9257%2050.2956%2049.2602L29.1953%2035.5076Z'%20fill='%23B2CCFF'%20stroke='%233E4784'%20stroke-width='0.433696'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M46.804%207.73913C46.6095%205.13043%2041.2795%205.52908%2041.2795%205.52908C41.8211%202.74146%2040.4926%201.01186%2039.1953%201.01186C39.1953%201.01186%2040.9289%200.685445%2044.0494%203.45806C47.0214%206.09869%2046.804%207.73913%2046.804%207.73913Z'%20fill='%23B2CCFF'%20stroke='%233E4784'%20stroke-width='0.433696'%20stroke-miterlimit='10'/%3e%3cpath%20d='M22.7941%206.21764H10.8158C9.92138%206.21764%209.19629%206.95567%209.19629%207.86608V8.04745C9.19629%208.95786%209.92138%209.6959%2010.8158%209.6959H22.7941C23.6886%209.6959%2024.4137%208.95786%2024.4137%208.04745V7.86608C24.4137%206.95567%2023.6886%206.21764%2022.7941%206.21764Z'%20fill='%233E4784'/%3e%3cpath%20d='M41.6761%2015.0453C41.6761%2015.0453%2029.7428%2015.0453%2025.9354%2015.1966C22.128%2015.3479%2010.1947%2015.3479%2010.1947%2015.3479C9.64399%2015.3479%209.19629%2014.9259%209.19629%2014.4122C9.19629%2013.8986%209.64399%2013.4766%2010.1947%2013.4766C10.1947%2013.4766%2021.9141%2013.3253%2025.9354%2013.3253C29.9568%2013.3253%2041.6761%2013.174%2041.6761%2013.174C42.2269%2013.174%2042.6746%2013.596%2042.6746%2013.9583V14.257C42.6746%2014.9219%2042.2269%2015.0413%2041.6761%2015.0413V15.0453Z'%20fill='%23B2CCFF'/%3e%3cpath%20d='M41.6761%2019.8283C41.6761%2019.8283%2029.7428%2019.8283%2025.9354%2019.9796C22.128%2020.1309%2010.1947%2020.1309%2010.1947%2020.1309C9.64399%2020.1309%209.19629%2019.7088%209.19629%2019.1952C9.19629%2018.6816%209.64399%2018.2595%2010.1947%2018.2595C10.1947%2018.2595%2021.9141%2018.1082%2025.9354%2018.1082C29.9568%2018.1082%2041.6761%2017.9569%2041.6761%2017.9569C42.2269%2017.9569%2042.6746%2018.379%2042.6746%2018.8926C42.6746%2019.4062%2042.2269%2019.8283%2041.6761%2019.8283Z'%20fill='%23B2CCFF'/%3e%3cpath%20d='M41.6761%2024.6097C41.6761%2024.6097%2029.7428%2024.6097%2025.9354%2024.761C22.128%2024.9123%2010.1947%2024.9123%2010.1947%2024.9123C9.64399%2024.9123%209.19629%2024.4903%209.19629%2023.9767C9.19629%2023.4631%209.64399%2023.041%2010.1947%2023.041C10.1947%2023.041%2021.9141%2022.8897%2025.9354%2022.8897C29.9568%2022.8897%2041.6761%2022.7384%2041.6761%2022.7384C42.2269%2022.7384%2042.6746%2023.1605%2042.6746%2023.6741C42.6746%2024.1877%2042.2269%2024.6097%2041.6761%2024.6097Z'%20fill='%23B2CCFF'/%3e%3cpath%20d='M30.3641%2029.9674C30.3641%2029.9674%2022.2477%2029.8047%2018.4261%2029.9674C14.6046%2030.13%2010.1984%2030.13%2010.1984%2030.13C9.64565%2030.13%209.19629%2029.6764%209.19629%2029.1243C9.19629%2028.5723%209.64565%2028.1187%2010.1984%2028.1187C14.3898%2028.063%208.52025%2027.9561%2020.1321%2027.9561C24.1685%2027.9561%2030.3681%2027.9561%2030.3681%2027.9561C30.9208%2027.9561%2031.3702%2028.4097%2031.3702%2028.9617C31.3702%2029.5138%2030.9208%2029.9674%2030.3681%2029.9674H30.3641Z'%20fill='%23B2CCFF'/%3e%3cpath%20d='M0.5%2022.7384L22.2391%2035.2703L0.87454%2049.6949C0.645873%2049.2426%200.519713%2048.687%200.5%2048.0322V22.7384Z'%20fill='%23B2CCFF'%20stroke='%233E4784'%20stroke-width='0.433696'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e\"","import { Box } from '@mui/material';\nimport { Button, Typography, Icon, theme } from '@commercefoundation/fractal';\nimport { useRequestMagicLink } from '../api/useUsers';\nimport { useEffect, useState } from 'react';\nimport { useSearchParams } from 'react-router-dom';\nimport MailIllultration from '@/assets/images/illustrations/mail.svg';\n\ntype CheckEmailDisplayProps = {\n email: string;\n onBack: () => void;\n};\n\nexport const CheckEmailDisplay = ({ email, onBack }: CheckEmailDisplayProps) => {\n const [searchParams] = useSearchParams();\n const returnToUrl = decodeURIComponent(searchParams.get('return_to') || '');\n\n const { mutate: requestMagicLink } = useRequestMagicLink({\n onSuccess: () => {\n setCountdownSeconds(60);\n },\n });\n const onResendMagicLink = () => {\n requestMagicLink({\n email,\n ...(returnToUrl && { return_to: returnToUrl }),\n });\n };\n\n const [countdownSeconds, setCountdownSeconds] = useState(0);\n\n useEffect(() => {\n const interval = setInterval(() => {\n if (countdownSeconds > 0) {\n setCountdownSeconds(countdownSeconds - 1);\n }\n }, 1000);\n return () => clearInterval(interval);\n }, [countdownSeconds]);\n\n const isResendDisabled = countdownSeconds > 0;\n\n return (\n \n \n \"mail-illustration\"\n \n \n Magic link in your inbox!\n \n \n We've sent a sign in link to{' '}\n \n {email}\n \n . Once you click it, you'll be signed in.\n \n \n \n Resend link {isResendDisabled && `(in ${countdownSeconds}s)`}\n \n }\n sx={{ mt: '2rem' }}\n onClick={onBack}\n >\n Back to sign in\n \n \n \n );\n};\n","import type { AxiosError } from 'axios';\n\nexport const getErrorMessages = (error: AxiosError) => {\n const errorMessages = error.response?.data as Record;\n if (errorMessages['error']) {\n return [errorMessages['error']];\n }\n return [];\n};\n","import { Box } from '@mui/material';\nimport { useState, useRef } from 'react';\nimport { useCheckEmail, useRequestMagicLink, useSignIn } from '../../api/useUsers';\nimport type { SignInBody } from '../../types';\nimport { PasswordForm } from '../../components/PasswordForm';\nimport { CheckEmailForm } from '../../components/CheckEmailForm';\nimport { CheckEmailDisplay } from '../../components/CheckEmailDisplay';\nimport { SignInLayout } from '../../components/SignInLayout';\nimport type { AxiosError } from 'axios';\nimport { getErrorMessages } from '../../helpers';\nimport { useSearchParams } from 'react-router-dom';\nimport { SignInLoader } from '../../components/SignInLoader';\n\nexport const SignIn = () => {\n const [email, setEmail] = useState('');\n const [magicLinkRequested, setMagicLinkRequested] = useState(false);\n const [errorMessages, setErrorMessages] = useState([]);\n const [searchParams] = useSearchParams();\n const returnToUrl = decodeURIComponent(searchParams.get('return_to') || '');\n\n const hasRequestedMagicLink = useRef(false);\n\n const { mutate: requestMagicLink, isLoading: isRequestingMagicLink } = useRequestMagicLink({\n onSuccess: () => onMagicLinkRequested(),\n onError: () => {\n hasRequestedMagicLink.current = false;\n },\n });\n\n const { data: checkedEmail, isFetching: isCheckingEmail } = useCheckEmail(\n encodeURIComponent(email),\n {\n enabled: !!email,\n suspense: false,\n onSuccess: (data) => {\n if (data.exists) setErrorMessages([]);\n if (data.exists && !data.uses_password && !hasRequestedMagicLink.current) {\n hasRequestedMagicLink.current = true;\n requestMagicLink({\n email,\n ...(returnToUrl && { return_to: returnToUrl }),\n });\n }\n if (!data.exists) setErrorMessages(['Email not found.']);\n },\n onError: () => {\n setErrorMessages(['Unable to validate email.']);\n },\n }\n );\n\n const { mutate: signIn, isLoading: isSigningIn } = useSignIn({\n onSuccess: (response) => {\n setErrorMessages([]);\n const return_to = returnToUrl.trim() || response.return_to?.trim();\n window.location.href = return_to || '/';\n },\n onError: (error: AxiosError) => {\n setErrorMessages(getErrorMessages(error));\n },\n });\n\n const onEmailUpdated = (email: string) => {\n setEmail(email);\n };\n\n const onPasswordEntered = (data: SignInBody) => {\n signIn(data);\n };\n\n const onMagicLinkRequested = () => {\n setMagicLinkRequested(true);\n hasRequestedMagicLink.current = false;\n };\n\n const onBackToSignIn = () => {\n setEmail('');\n setMagicLinkRequested(false);\n };\n\n if (isCheckingEmail || isRequestingMagicLink || isSigningIn) {\n return (\n \n \n \n \n \n );\n }\n\n if (magicLinkRequested) {\n return (\n \n \n \n \n \n );\n }\n\n if (email && checkedEmail && checkedEmail.exists && checkedEmail.uses_password) {\n return (\n \n \n \n \n \n );\n }\n\n return (\n \n \n \n \n \n );\n};\n","import { Box } from '@mui/material';\nimport SignInIllustration from '@/assets/images/illustrations/sign-in-illustration.svg';\nimport { LoadingIndicator, Typography, theme } from '@commercefoundation/fractal';\n\nexport const SignUpLoader = () => {\n return (\n \n \n \n \n \n Simplifying Commerce\n \n \n one step at a time ....\n \n \n \n \n
\n );\n};\n","import { Box } from '@mui/material';\nimport { Button, FeatureIcon, OTPInput, Typography, theme } from '@commercefoundation/fractal';\nimport { useSearchParams } from 'react-router-dom';\nimport { useEffect, useState } from 'react';\nimport { useConfirmConfirmationToken, useRequestConfirmationToken } from '../../api/useUsers';\nimport { errorMessagesMap } from '../../constants';\nimport { SignInLayout } from '../../components/SignInLayout';\nimport MailIllustration from '@/assets/images/illustrations/mail.svg';\nimport { SignUpLoader } from '../../components/SignUpLoader';\n\nexport const ConfirmEmail = () => {\n const [searchParams] = useSearchParams();\n const email = decodeURIComponent(searchParams.get('email') || '');\n const token = searchParams.get('confirmation_token') || '';\n\n const [optValue, setOptValue] = useState(token);\n const [errorMessage, setErrorMessage] = useState('');\n const [confirmationToken, setConfirmationToken] = useState('');\n const [countdownSeconds, setCountdownSeconds] = useState(0);\n const [isCheckingEmail, setIsCheckingEmail] = useState(false);\n\n useEffect(() => {\n const interval = setInterval(() => {\n if (countdownSeconds > 0) {\n setCountdownSeconds(countdownSeconds - 1);\n }\n }, 1000);\n return () => clearInterval(interval);\n }, [countdownSeconds]);\n\n const { data: confirmTokenData } = useConfirmConfirmationToken(\n encodeURIComponent(email),\n confirmationToken,\n {\n enabled: !!confirmationToken && !!email,\n onError: (error) => {\n setIsCheckingEmail(false);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const errorResponse = error.response?.data as any;\n if (errorResponse.status && errorResponse.status === 'error' && errorResponse.message) {\n setErrorMessage(errorResponse.message);\n }\n },\n }\n );\n\n const { mutate: requestConfirmationToken } = useRequestConfirmationToken({\n onSuccess: () => {\n setCountdownSeconds(60);\n },\n });\n\n useEffect(() => {\n const firstElement = document.getElementById('otp-input-input-0');\n firstElement?.focus();\n }, []);\n\n const handleRequestConfirmationToken = () => {\n requestConfirmationToken(email);\n };\n\n const handleValidateToken = () => {\n setIsCheckingEmail(true);\n setConfirmationToken(optValue);\n setErrorMessage('');\n };\n\n useEffect(() => {\n if (confirmTokenData?.status === 'success') {\n window.location.href = confirmTokenData.return_to.trim() || '/';\n }\n }, [confirmTokenData]);\n\n const isResendDisabled = countdownSeconds > 0;\n\n if (isCheckingEmail) {\n return ;\n }\n\n return (\n \n \n \n {errorMessage ? (\n \n ) : (\n \"mail-illustration\"\n )}\n \n Please check your email!\n \n \n \n We've send a code to\n \n \n {email}\n \n \n {errorMessage && (\n \n \n {errorMessagesMap[errorMessage] || errorMessage}\n \n \n )}\n \n setOptValue(newValue)}\n size=\"long\"\n />\n \n \n \n Didn't get a code?\n \n {\n if (!isResendDisabled) handleRequestConfirmationToken();\n }}\n >\n Click to resend {isResendDisabled && `(in ${countdownSeconds}s)`}\n \n \n \n \n Verify\n \n \n \n \n \n );\n};\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { Box } from '@mui/material';\nimport { Controller, useForm } from 'react-hook-form';\nimport { ResetPasswordEmailFormSchema } from '../schemas';\nimport { Button, TextInput } from '@commercefoundation/fractal';\nimport { useRequestPasswordResetToken } from '../api/useUsers';\n\nexport const ResetPasswordEmailForm = () => {\n const { mutate: requestPasswordResetToken } = useRequestPasswordResetToken({\n onSuccess: () => {\n window.location.href = '/ui/sign_in';\n },\n });\n const {\n control,\n handleSubmit,\n formState: { errors },\n } = useForm({\n defaultValues: {\n email: '',\n },\n resolver: yupResolver(ResetPasswordEmailFormSchema),\n });\n const onSubmit = async (data: any) => {\n const { email } = data;\n await requestPasswordResetToken(email);\n };\n return (\n
\n \n \n (\n \n )}\n />\n \n\n \n \n \n \n
\n );\n};\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { useEffect } from 'react';\nimport { Button, TextInput } from '@commercefoundation/fractal';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { Box } from '@mui/material';\nimport { Controller, useForm } from 'react-hook-form';\nimport { ResetPasswordFormSchema } from '../schemas';\nimport { useResetPassword } from '../api/useUsers';\nimport { useSignout } from '@/features/auth';\n\nexport const ResetPasswordForm = ({ resetToken }: { resetToken: string }) => {\n const { mutateAsync: resetPassword } = useResetPassword({\n onSuccess: () => {\n window.location.href = '/ui/sign_in';\n },\n });\n\n const { mutate: signout } = useSignout({\n config: {},\n });\n\n useEffect(() => {\n signout();\n }, [signout]);\n\n const {\n control,\n handleSubmit,\n watch,\n formState: { errors },\n setError,\n } = useForm({\n defaultValues: {\n password: '',\n password_confirmation: '',\n },\n resolver: yupResolver(ResetPasswordFormSchema),\n });\n\n const password = watch('password');\n const password_confirmation = watch('password_confirmation');\n const passwordMatch = password === password_confirmation;\n\n const onSubmit = async (data: any) => {\n const { password, password_confirmation } = data;\n\n if (!passwordMatch) {\n setError('password_confirmation', { message: 'Passwords do not match' });\n return;\n }\n await resetPassword({\n password,\n reset_password_token: resetToken,\n password_confirmation: password_confirmation,\n });\n };\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};\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Box } from '@mui/material';\nimport { SignInLayout } from '../../components/SignInLayout';\nimport { Typography, theme } from '@commercefoundation/fractal';\n\nimport { FoundationFeatureLogo } from '../../components/FoundationFeatureLogo';\nimport { ResetPasswordEmailForm } from '../../components/ResetPasswordEmailForm';\nimport { ResetPasswordForm } from '../../components/ResetPasswordForm';\n\nexport const ResetPassword = () => {\n const resetToken = new URLSearchParams(window.location.search).get('reset_password_token');\n\n return (\n \n \n \n \n \n \n Reset Password\n \n \n {!resetToken && 'Enter your email to send a reset password link.'}\n \n \n \n {!resetToken && }\n {resetToken && }\n \n \n );\n};\n","import { Controller, useForm } from 'react-hook-form';\nimport { Box } from '@mui/material';\nimport { Button, TextInput } from '@commercefoundation/fractal';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { UserSetPasswordSchema } from '../schemas';\nimport { useSetPassword } from '../api/useUsers';\n\nexport const SetPasswordForm = ({ invitationToken }: { invitationToken: string }) => {\n const {\n control,\n handleSubmit,\n watch,\n formState: { errors },\n setError,\n } = useForm({\n defaultValues: {\n password: '',\n password_confirmation: '',\n },\n resolver: yupResolver(UserSetPasswordSchema),\n });\n\n const { mutateAsync: setPassword, isLoading } = useSetPassword({\n onSuccess: () => {\n window.location.href = '/ui/sign_in';\n },\n });\n\n const password = watch('password');\n const confirmPassword = watch('password_confirmation');\n const passwordMatch = password === confirmPassword;\n\n const onSubmit = async (data: any) => {\n const { password, password_confirmation } = data;\n\n if (!passwordMatch) {\n setError('password_confirmation', { message: 'Passwords do not match' });\n return;\n }\n await setPassword({\n password,\n invitation_token: invitationToken,\n password_confirmation: password_confirmation,\n });\n };\n\n return (\n
\n \n \n (\n \n )}\n />\n \n \n (\n \n )}\n />\n \n \n \n
\n );\n};\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Box } from '@mui/material';\nimport { SignInLayout } from '../../components/SignInLayout';\nimport { Typography, theme } from '@commercefoundation/fractal';\n\nimport { FoundationFeatureLogo } from '../../components/FoundationFeatureLogo';\nimport { SetPasswordForm } from '../../components/SetPasswordForm';\n\nexport const SetPassword = () => {\n const invitationToken = new URLSearchParams(window.location.search).get('invitation_token');\n\n return (\n \n \n \n \n \n \n Set Your Password\n \n \n To complete your registration and get started, please set a password for your account.\n \n \n \n {invitationToken && }\n \n \n );\n};\n"],"names":["CAROUSEL_ITEMS","SignInIllustration","SignInCarousel","jsx","Box","BaseCarousel","onClickHandler","hasNext","CarouselArrow","hasPrev","isSelected","index","CarouselIndicator","item","jsxs","Typography","theme","SignInLayout","children","Grid","useCheckEmail","email","queryProps","useQuery","axios","useRequestMagicLink","useMutation","body","useSignIn","useSignUp","data","useRequestConfirmationToken","useConfirmConfirmationToken","token","useRequestPasswordResetToken","useResetPassword","useSetPassword","USER_TYPE_OPTIONS","FeatureIcon","errorMessagesMap","FoundationIconLoco","FoundationFeatureLogo","SignInLoader","LoadingIndicator","SignUp","navigate","useNavigate","searchParams","useSearchParams","isSigningUp","setIsSigningUp","useState","control","handleSubmit","errors","setError","useForm","yupResolver","SignUpSchema","onSubmit","signUp","error","errorType","errorValue","Controller","field","TextInput","RadioGroup","Button","Link","PasswordForm","initialEmail","onPasswordEntered","onMagicLinkRequested","disabled","errorMessages","returnToUrl","requestMagicLink","isRequestingMagicLink","PasswordFormSchema","onEmailMagicLink","Checkbox","errorMessage","Icon","CheckEmailForm","onEmailEntered","getValues","CheckEmailSchema","MailIllustration","CheckEmailDisplay","onBack","setCountdownSeconds","onResendMagicLink","countdownSeconds","useEffect","interval","isResendDisabled","MailIllultration","getErrorMessages","SignIn","setEmail","magicLinkRequested","setMagicLinkRequested","setErrorMessages","hasRequestedMagicLink","useRef","checkedEmail","isCheckingEmail","signIn","isSigningIn","response","return_to","onEmailUpdated","onBackToSignIn","SignUpLoader","ConfirmEmail","optValue","setOptValue","setErrorMessage","confirmationToken","setConfirmationToken","setIsCheckingEmail","confirmTokenData","errorResponse","requestConfirmationToken","handleRequestConfirmationToken","handleValidateToken","OTPInput","newValue","ResetPasswordEmailForm","requestPasswordResetToken","ResetPasswordEmailFormSchema","ResetPasswordForm","resetToken","resetPassword","signout","useSignout","watch","ResetPasswordFormSchema","password","password_confirmation","passwordMatch","ResetPassword","SetPasswordForm","invitationToken","UserSetPasswordSchema","setPassword","isLoading","confirmPassword","SetPassword"],"mappings":"+bAMA,MAAMA,EAAiB,CACrB,CACE,MAAOC,EACP,MAAO,2BACP,OAAQ,2BACR,YACE,wJACJ,EACA,CACE,MAAOA,EACP,MAAO,yCACP,OAAQ,yCACR,YACE,0LACJ,EACA,CACE,MAAOA,EACP,MAAO,+BACP,OAA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