{"version":3,"file":"dist/build-client/static/js/Pages-CreateNewPasswordPage-CreateNewPasswordPage.6ae0406f.chunk.js","mappings":"oIAyHMA,GAAmBC,E,QAAAA,IAAO,UAAQC,EAAAA,EAAAA,IAAAA,EAAAA,EAAAA,IAAAA,EAAAA,EAAAA,GAAA,GAdd,CACxBC,OAAQ,UACRC,QAAS,OACTC,WAAY,SACZC,eAAgB,SAChBC,GAAI,OACJ,WAAY,CACVC,aAAc,GAEhB,UAAW,CACTA,aAAc,KAnHY,CAC5BC,SAAU,CACRC,MAAO,CACLC,QAAS,CACPC,gBAAiB,iBACjBF,MAAO,SACP,UAAW,CACTE,gBAAiB,iCAEnB,aAAc,CACZA,gBAAiB,yBACjBF,MAAO,WACPP,OAAQ,gBAGZU,UAAW,CACTD,gBAAiB,mBACjBF,MAAO,SACPI,WAAY,SACZ,UAAW,CACTF,gBAAiB,mCAEnB,aAAc,CACZA,gBAAiB,mBACjBG,QAAS,MACTL,MAAO,SACPP,OAAQ,gBAGZa,YAAa,CACXJ,gBAAiB,cACjBF,MAAO,iBACP,aAAc,CACZE,gBAAiB,yBACjBF,MAAO,WACPO,OAAQ,2BACRd,OAAQ,gBAGZe,OAAQ,CACNN,gBAAiB,UACjBF,MAAO,eACPS,YAAa,kBAEfC,OAAQ,CACNR,gBAAiB,iBACjBF,MAAO,SACPO,OAAQ,mBACR,UAAW,CACTL,gBAAiB,iCAEnB,aAAc,CACZA,gBAAiB,yBACjBF,MAAO,WACPP,OAAQ,gBAGZkB,UAAW,CACTT,gBAAiB,mBACjBF,MAAO,SACPI,WAAY,SACZ,UAAW,CACTF,gBAAiB,mCAEnB,aAAc,CACZA,gBAAiB,mBACjBG,QAAS,MACTL,MAAO,SACPP,OAAQ,iBAIdc,OAAQ,CACNK,KAAM,CACJL,OAAQ,6BAGZM,KAAM,CACJC,EAAG,CACDC,GAAI,EACJC,GAAI,EACJC,GAAI,EACJC,WAAY,QAEdC,EAAG,CACDJ,GAAI,OACJC,GAAI,QAENI,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AAU,qBAAqB,CACxDS,OAAQ,OACRC,QAAS,CACP,eAAgB,mBAChB,yBAA0BC,KAAKC,UAAU,CACvCC,gBAAiB1F,KAGrB2F,KAAMH,KAAKC,UAAUtE,KACpB,KAAD,EATO,OAAH2D,EAAGuC,EAAAzB,KAAAyB,EAAAnC,KAAA,EAUUJ,EAAIe,OAAO,KAAD,EACT,OADdvD,EAAI+E,EAAAzB,KACVnF,GAAa,GAAO4G,EAAAC,OAAA,SAEbhF,GAAI,yBAAA+E,EAAAvB,OAAA,GAAAsB,EAAA,MACZ/C,MAAA,KAAAC,UAAA,C","sources":["Atoms/Buttons/BaseButtonStyle.ts","Atoms/Buttons/CtaButton.tsx","Atoms/Label/Label.tsx","Atoms/Input/Input.tsx","Atoms/Input/InputValidation.tsx","Pages/CreateNewPasswordPage/CreateNewPasswordPage.tsx","Pages/ForgotPasswordPage/Account.ts"],"sourcesContent":["import { styled } from '../../stitches.config';\r\n\r\nexport const ButtonVariants = {\r\n variants: {\r\n color: {\r\n primary: {\r\n backgroundColor: '$buttonPrimary',\r\n color: '$black',\r\n '&:hover': {\r\n backgroundColor: '$buttonHoverBackgroundPrimary',\r\n },\r\n '&:disabled': {\r\n backgroundColor: '$buttonPrimaryDisabled',\r\n color: '$grey700',\r\n cursor: 'not-allowed',\r\n },\r\n },\r\n secondary: {\r\n backgroundColor: '$buttonSecondary',\r\n color: '$white',\r\n fontWeight: '$fw600',\r\n '&:hover': {\r\n backgroundColor: '$buttonHoverBackgroundSecondary',\r\n },\r\n '&:disabled': {\r\n backgroundColor: '$buttonSecondary',\r\n opacity: '0.6',\r\n color: '$white',\r\n cursor: 'not-allowed',\r\n },\r\n },\r\n transparent: {\r\n backgroundColor: 'transparent',\r\n color: '$buttonPrimary',\r\n '&:disabled': {\r\n backgroundColor: '$buttonPrimaryDisabled',\r\n color: '$grey700',\r\n border: '1px solid $buttonPrimary',\r\n cursor: 'not-allowed',\r\n },\r\n },\r\n accent: {\r\n backgroundColor: '$accent',\r\n color: '$textPrimary',\r\n borderColor: '$borderPrimary',\r\n },\r\n cancel: {\r\n backgroundColor: '$buttonPrimary',\r\n color: '$black',\r\n border: '1px solid $black',\r\n '&:hover': {\r\n backgroundColor: '$buttonHoverBackgroundPrimary',\r\n },\r\n '&:disabled': {\r\n backgroundColor: '$buttonPrimaryDisabled',\r\n color: '$grey700',\r\n cursor: 'not-allowed',\r\n },\r\n },\r\n clearCart: {\r\n backgroundColor: '$buttonSecondary',\r\n color: '$white',\r\n fontWeight: '$fw600',\r\n '&:hover': {\r\n backgroundColor: '$buttonHoverBackgroundSecondary',\r\n },\r\n '&:disabled': {\r\n backgroundColor: '$buttonSecondary',\r\n opacity: '0.6',\r\n color: '$white',\r\n cursor: 'not-allowed',\r\n },\r\n },\r\n },\r\n border: {\r\n true: {\r\n border: '1px solid $buttonPrimary',\r\n },\r\n },\r\n size: {\r\n s: {\r\n px: 4,\r\n py: 2,\r\n fs: 7,\r\n lineHeight: '20px',\r\n },\r\n m: {\r\n px: '40px',\r\n py: '16px',\r\n },\r\n l: {\r\n py: 6,\r\n px: 10,\r\n },\r\n input: {\r\n h: 11,\r\n },\r\n },\r\n loading: {\r\n true: {\r\n opacity: 0.7,\r\n fs: 7,\r\n },\r\n },\r\n },\r\n};\r\n\r\nexport const ButtonBase = {\r\n cursor: 'pointer',\r\n display: 'flex',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n br: '40px',\r\n '&:active': {\r\n outlineWidth: 0,\r\n },\r\n '&:focus': {\r\n outlineWidth: 0,\r\n },\r\n};\r\n\r\nconst BaseButtonStyled = styled('button', {\r\n ...ButtonBase,\r\n ...ButtonVariants,\r\n fontWeight: '$fw500',\r\n fontSize: '10px',\r\n lineHeight: '16px',\r\n letterSpacing: '1px',\r\n '@mediaMinLarge': {\r\n fontSize: '12px',\r\n lineHeight: '24px',\r\n },\r\n});\r\n\r\nexport default BaseButtonStyled;\r\n","import KexLink from '../../Kex/KexLink';\r\nimport { styled } from '../../stitches.config';\r\nimport { LoadingCircle } from '../Icons';\r\nimport BaseButtonStyled from './BaseButtonStyle';\r\nimport BaseButtonType from './BaseButtonType';\r\n\r\ntype CtaButtonButtonBaseType = BaseButtonType & {\r\n onClick?: () => void;\r\n href?: string;\r\n css?: any;\r\n isLoading?: boolean;\r\n children?: any;\r\n uppercase?: boolean;\r\n};\r\n\r\nfunction CtaButton({\r\n onClick,\r\n css,\r\n isLoading,\r\n children,\r\n type,\r\n href,\r\n size,\r\n uppercase,\r\n ...rest\r\n}: CtaButtonButtonBaseType) {\r\n return !href ? (\r\n onClick && onClick()}\r\n {...rest}\r\n uppercase={uppercase}\r\n >\r\n {isLoading ? (\r\n \r\n \r\n \r\n ) : (\r\n children\r\n )}\r\n \r\n ) : (\r\n onClick && onClick()}\r\n noUnderline\r\n uppercase={uppercase}\r\n {...rest}\r\n >\r\n {isLoading ? (\r\n \r\n \r\n \r\n ) : (\r\n children\r\n )}\r\n \r\n );\r\n}\r\nexport default CtaButton;\r\n\r\nconst StyledButton = styled(BaseButtonStyled, {\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n py: 5.5,\r\n px: 6,\r\n fontSize: '10px',\r\n lineHeight: '16px',\r\n letterSpacing: '1px',\r\n fontWeight: '$fw400',\r\n textAlign: 'center',\r\n w: '100%',\r\n h: '40px',\r\n '@mediaMinSmall': {\r\n px: 10,\r\n },\r\n '@mediaMinLarge': {\r\n h: '56px',\r\n fontSize: '12px',\r\n lineHeight: '24px',\r\n },\r\n variants: {\r\n isLoading: {\r\n true: {\r\n backgroundColor: '$grey400',\r\n },\r\n false: {\r\n backgroundColor: '$buttonPrimary',\r\n },\r\n },\r\n uppercase: {\r\n true: {\r\n textTransform: 'uppercase',\r\n },\r\n },\r\n size: {\r\n s: {\r\n py: 2,\r\n fs: 7,\r\n lineHeight: '20px',\r\n },\r\n clearCart: {\r\n padding: '14px 23px 14px 23px',\r\n borderRadius: '40px',\r\n fontSize: '10px',\r\n fontWeight: '500',\r\n lineHeight: '16px',\r\n letterSpacing: '1px',\r\n height: '44px',\r\n },\r\n },\r\n },\r\n});\r\n\r\nconst StyledLink = styled(KexLink, {\r\n backgroundColor: '$buttonPrimary',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n fontWeight: '$fw400',\r\n fs: 5,\r\n py: 3.5,\r\n px: 6,\r\n br: 10,\r\n '@mediaMaxSmall': {\r\n lineHeight: '16px',\r\n },\r\n '@mediaMinSmall': {\r\n py: 4,\r\n px: 10,\r\n fs: 6,\r\n lineHeight: '24px',\r\n },\r\n variants: {\r\n type: {\r\n primary: {\r\n backgroundColor: '$buttonPrimary',\r\n color: '$black',\r\n '&:hover': {\r\n backgroundColor: '$buttonHoverBackgroundPrimary',\r\n },\r\n '&:disabled': {\r\n backgroundColor: '$buttonPrimaryDisabled',\r\n color: '$grey700',\r\n cursor: 'not-allowed',\r\n },\r\n },\r\n secondary: {\r\n backgroundColor: '$buttonSecondary',\r\n color: '$white',\r\n '&:hover': {\r\n backgroundColor: '$buttonHoverBackgroundSecondary',\r\n },\r\n '&:disabled': {\r\n backgroundColor: '$buttonSecondary',\r\n opacity: '0.6',\r\n color: '$grey700',\r\n },\r\n },\r\n },\r\n uppercase: {\r\n true: {\r\n textTransform: 'uppercase',\r\n },\r\n },\r\n },\r\n});\r\n\r\nconst StyledLoadingCircle = styled('div', {\r\n w: 9,\r\n my: -2,\r\n stroke: '$white',\r\n});\r\n","import React from 'react';\r\nimport { styled } from '../../stitches.config';\r\n\r\ntype LabelType = {\r\n hasError: boolean;\r\n children: React.ReactNode;\r\n css?: any;\r\n htmlFor?: string;\r\n};\r\n\r\nconst Label = ({ hasError, children, css, htmlFor }: LabelType) => (\r\n \r\n {children}\r\n \r\n);\r\n\r\nconst FormLabel = styled('label', {\r\n fontSize: '14px',\r\n fontWeight: '$fw700',\r\n backgroundColor: 'inherit',\r\n variants: {\r\n color: {\r\n default: {\r\n color: 'inherit',\r\n },\r\n error: {\r\n color: '$errorText',\r\n },\r\n },\r\n },\r\n});\r\n\r\nexport default Label;\r\n","import React, { useEffect, useState } from 'react';\r\nimport { styled } from '../../stitches.config';\r\nimport Label from '../Label/Label';\r\nimport { useInputValidation, ValidationParams } from './InputValidation';\r\n\r\ntype InputValidationType = {\r\n validation?: ValidationParams;\r\n};\r\n\r\ntype InputType = InputValidationType & {\r\n onChange?: (value: string) => void;\r\n onBlur?: (value: string) => void;\r\n onKeyDown?: (event: React.KeyboardEvent) => void;\r\n title: string;\r\n type?: string;\r\n name?: string;\r\n placeholder?: string;\r\n round?: boolean;\r\n disabled?: boolean;\r\n};\r\n\r\nconst Input = ({\r\n title,\r\n type = 'Text',\r\n onChange,\r\n onBlur,\r\n onKeyDown,\r\n name,\r\n validation,\r\n placeholder,\r\n round,\r\n disabled = false,\r\n}: InputType) => {\r\n const validationDispatch = useInputValidation();\r\n\r\n const [hasError, setHasError] = useState(false);\r\n const [errorMessage, setErrorMessage] = useState('');\r\n const [hasTouched, setHasTouched] = useState(false);\r\n const [hasValue, setHasValue] = useState(false);\r\n\r\n const onInputChange = (val: string) => {\r\n doValidation(val);\r\n onChange && onChange(val);\r\n };\r\n\r\n const doValidation = (currentValue: string) => {\r\n if (!!validation) {\r\n const errorMessage = validation.errorMessage || '';\r\n let validationError = false;\r\n if (validation.active !== undefined && !validation.active) {\r\n return;\r\n }\r\n\r\n if (validation.pattern) {\r\n if (!validation.pattern.test(currentValue)) {\r\n validationError = true;\r\n }\r\n if (validation.pattern.test(currentValue)) {\r\n validationError = false;\r\n }\r\n } else if (validation.required) {\r\n if (!currentValue) {\r\n validationError = true;\r\n }\r\n } else if (validation.minLength) {\r\n if (\r\n !currentValue ||\r\n (currentValue && currentValue.length < validation.minLength)\r\n ) {\r\n validationError = true;\r\n }\r\n } else if (validation.maxLength) {\r\n if (currentValue && currentValue.length > validation.maxLength) {\r\n validationError = true;\r\n }\r\n }\r\n\r\n if (validationError) {\r\n setHasError(true);\r\n setErrorMessage(errorMessage);\r\n } else {\r\n setHasError(false);\r\n }\r\n\r\n setHasValue(!!currentValue);\r\n }\r\n };\r\n\r\n const onInputBlur = (e: React.FocusEvent) => {\r\n const currentValue: string = e.currentTarget.value;\r\n\r\n doValidation(currentValue);\r\n onBlur && onBlur(e.currentTarget.value);\r\n };\r\n\r\n const onInputFocus = (e: React.FocusEvent) => {\r\n if (!!validation && validation.onTouched) {\r\n validation.onTouched(name); // TODO: Refactor? While it's okay to use callbacks since they was passed down, I don't like the fact\r\n }\r\n\r\n setHasError(false);\r\n setHasTouched(true);\r\n };\r\n\r\n useEffect(() => {\r\n validationDispatch({\r\n type: 'register',\r\n name: name,\r\n payload: {\r\n hasTouched: hasTouched,\r\n hasError: hasError,\r\n hasValue: hasValue,\r\n },\r\n });\r\n\r\n if (!!validation) {\r\n if (validation.backendValidation) {\r\n setHasError(true);\r\n setErrorMessage(validation.backendValidation.message);\r\n }\r\n }\r\n\r\n return () => {\r\n validationDispatch({ type: 'unregister', name: name, payload: {} });\r\n };\r\n }, [validationDispatch, name, hasTouched, hasError, hasValue, validation]);\r\n\r\n return (\r\n \r\n \r\n onInputChange(e.currentTarget.value),\r\n })}\r\n {...(onKeyDown && { onKeyDown })}\r\n onBlur={onInputBlur}\r\n onFocus={onInputFocus}\r\n onInput={onInputBlur}\r\n name={name}\r\n placeholder={placeholder ? placeholder : ''}\r\n round={round}\r\n disabled={disabled}\r\n />\r\n \r\n );\r\n};\r\n\r\nconst InputGroup = styled('div', {\r\n position: 'relative',\r\n});\r\n\r\nconst FormInput = styled('input', {\r\n fs: 8,\r\n fontWeight: '$fw700',\r\n ls: '$ls08',\r\n backgroundColor: 'inherit',\r\n w: '100%',\r\n h: 11,\r\n my: 2,\r\n px: 3,\r\n bw: 0.25,\r\n borderStyle: 'solid',\r\n borderColor: '$borderPrimary',\r\n '&:focus': {\r\n border: '1px solid $blue',\r\n outline: '1px solid $blue',\r\n },\r\n variants: {\r\n color: {\r\n default: {\r\n color: 'inherit',\r\n },\r\n error: {\r\n color: '$errorText',\r\n },\r\n },\r\n round: {\r\n true: {\r\n br: 2.5,\r\n border: '1px solid $grey100',\r\n },\r\n },\r\n },\r\n '&::placeholder': {\r\n color: '$grey500',\r\n fs: 5,\r\n fontWeight: '$fw400',\r\n '@mediaMinLarge': {\r\n fs: 7,\r\n },\r\n },\r\n});\r\n\r\nexport default Input;\r\n","import React, { useEffect, useReducer } from 'react';\r\n\r\ntype ValidationPropType = {\r\n children: React.ReactNode;\r\n onInputsValid?: Function;\r\n onInputsInvalid?: Function;\r\n};\r\n\r\ntype ValidationAction = {\r\n type: string;\r\n name?: string;\r\n payload: ValidationPayload;\r\n};\r\n\r\ntype ValidationPayload = {\r\n hasTouched?: boolean;\r\n hasError?: boolean;\r\n hasValue?: boolean;\r\n};\r\n\r\nexport type BackendValidation = {\r\n message: string;\r\n code: number;\r\n};\r\n\r\nexport type ValidationDictionary = {\r\n [key: string]: T;\r\n};\r\n\r\nexport type ValidationParams = {\r\n active?: boolean;\r\n\r\n required?: boolean;\r\n minLength?: number;\r\n maxLength?: number;\r\n pattern?: RegExp;\r\n\r\n errorMessage?: string;\r\n validationKey?: string;\r\n\r\n backendValidation?: BackendValidation;\r\n onTouched?: Function;\r\n};\r\n\r\nconst reducer = (\r\n state: { count: number; inputs: ValidationDictionary },\r\n action: ValidationAction\r\n) => {\r\n switch (action.type) {\r\n case 'register': {\r\n const newInputs = { ...state.inputs };\r\n let newCount = state.count;\r\n\r\n if (action.name !== undefined) {\r\n newInputs[action.name] = action.payload;\r\n newCount = state.count + 1;\r\n }\r\n\r\n return {\r\n count: newCount,\r\n inputs: { ...newInputs },\r\n };\r\n }\r\n case 'unregister': {\r\n const count = state.count - 1;\r\n const newInputs = { ...state.inputs };\r\n\r\n if (action.name !== undefined && newInputs.hasOwnProperty(action.name)) {\r\n delete newInputs[action.name];\r\n }\r\n\r\n return {\r\n count: count < 0 ? 0 : count,\r\n inputs: { ...newInputs },\r\n };\r\n }\r\n default: {\r\n return state;\r\n }\r\n }\r\n};\r\n\r\nconst ValidationDispatchContext = React.createContext({});\r\n\r\nconst initialReducerState = {\r\n count: 0,\r\n inputs: {},\r\n};\r\n\r\nfunction InputValidation({\r\n children,\r\n onInputsValid,\r\n onInputsInvalid,\r\n}: ValidationPropType) {\r\n const [{ count, inputs }, dispatch] = useReducer(\r\n reducer,\r\n initialReducerState\r\n );\r\n\r\n useEffect(() => {\r\n let validCount = 0;\r\n\r\n if (count > 0) {\r\n for (const key in inputs) {\r\n if (inputs.hasOwnProperty(key)) {\r\n const payload = inputs[key];\r\n\r\n if (payload.hasValue && !payload.hasError) {\r\n validCount++;\r\n }\r\n }\r\n }\r\n\r\n if (validCount === count) {\r\n onInputsValid && onInputsValid();\r\n } else {\r\n onInputsInvalid && onInputsInvalid();\r\n }\r\n }\r\n }, [count, onInputsValid, onInputsInvalid, inputs]);\r\n\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n}\r\n\r\nconst useInputValidation: () => React.Dispatch = () => {\r\n return React.useContext(\r\n ValidationDispatchContext\r\n ) as React.Dispatch;\r\n};\r\n\r\nexport { useInputValidation, InputValidation };\r\n","import { useState } from 'react';\r\nimport CtaButton from '../../Atoms/Buttons/CtaButton';\r\nimport ExclamationMarkIcon from '../../Atoms/Icons/ExclamationMarkIcon';\r\nimport Input from '../../Atoms/Input/Input';\r\nimport { InputValidation } from '../../Atoms/Input/InputValidation';\r\nimport { H1, H2 } from '../../Atoms/Typography/Headings/Heading';\r\nimport CreateNewPasswordPageModel from '../../CreateNewPasswordPage/Models/CreateNewPasswordPageModel.interface';\r\nimport UserCredentials from '../../LoginPage/Models/UserCredentials.interface';\r\nimport useCurrentPage from '../../Shared/Hooks/useCurrentPage';\r\nimport { useAppSettingsData } from '../../Shared/Providers/AppSettingsProvider';\r\nimport { useTranslationData } from '../../Shared/Providers/TranslationProvider';\r\nimport { useUserStateData } from '../../Shared/UserContextProvider/UserContextProvider';\r\nimport { styled } from '../../stitches.config';\r\nimport { CreateNewPassword } from '../ForgotPasswordPage/Account';\r\n\r\nfunction CreateNewPasswordPage() {\r\n const {\r\n 'account/createNewPassword': createNewPasswordLabel,\r\n 'customerInfo/newPassword': newPasswordLabel,\r\n 'customerInfo/newPasswordConfirm': newPasswordConfirmLabel,\r\n 'account/resetPwdSuccess': successLabel,\r\n 'account/resetPwdError': errorLabel,\r\n } = useTranslationData();\r\n\r\n const { pageHeading, pageIntroText, createNewPasswordText, channelId } =\r\n useCurrentPage();\r\n\r\n const { languageRoute } = useAppSettingsData();\r\n const { userName } = useUserStateData();\r\n\r\n const [newPassword, setNewPassword] = useState('');\r\n const [repeatNewPassword, setRepeatNewPassword] = useState('');\r\n const [isLoading, setIsLoading] = useState(false);\r\n const [success, setSuccess] = useState(false);\r\n const [error, setError] = useState(false);\r\n const [validationMessage, setValidationMessage] = useState('');\r\n\r\n const userCredentials: UserCredentials = {\r\n userName: userName,\r\n newPassword: newPassword,\r\n };\r\n\r\n const createNewPassword = () => {\r\n CreateNewPassword(\r\n languageRoute,\r\n channelId,\r\n userCredentials,\r\n setIsLoading\r\n ).then((data) => {\r\n if (data && data.statusCode === 200) {\r\n setSuccess(true);\r\n setValidationMessage(successLabel);\r\n } else {\r\n setError(true);\r\n setValidationMessage(errorLabel);\r\n }\r\n });\r\n };\r\n\r\n const disabled =\r\n newPassword.length === 0 ||\r\n repeatNewPassword.length === 0 ||\r\n newPassword !== repeatNewPassword;\r\n\r\n return (\r\n
\r\n \r\n \r\n {pageHeading}\r\n {pageIntroText}\r\n \r\n \r\n \r\n {createNewPasswordLabel}\r\n {createNewPasswordText}\r\n {(error || success) && (\r\n \r\n \r\n {validationMessage}\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {createNewPasswordLabel}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n\r\nexport default CreateNewPasswordPage;\r\n\r\nconst Container = styled('div', {\r\n display: 'grid',\r\n gg: 4,\r\n gridTemplateColumns: '1fr',\r\n wh: '100%',\r\n justifyContent: 'center',\r\n grg: 0,\r\n mx: 'auto',\r\n '@mediaMinLarge': {\r\n gridTemplateColumns: '2fr 3.5fr',\r\n gg: 0,\r\n },\r\n maxW: '$contentMaxWidth',\r\n});\r\n\r\nconst IconStyleError = {\r\n wh: 4,\r\n mr: 2,\r\n mt: 1,\r\n};\r\n\r\nconst StyledExclamationMarkIcon = styled(ExclamationMarkIcon, {\r\n wh: 4,\r\n});\r\n\r\nconst GridBox = styled('div', {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n p: 8,\r\n});\r\n\r\nconst InfoGridBox = styled(GridBox, {});\r\n\r\nconst FormGridBox = styled(GridBox, {});\r\n\r\nconst StyledH1 = styled(H1, {});\r\n\r\nconst StyledH2 = styled(H2, {\r\n pb: 3,\r\n});\r\n\r\nconst IntroText = styled('p', {\r\n fontSize: '14px',\r\n lineHeight: '20px',\r\n ls: '1px',\r\n});\r\n\r\nconst FormContainer = styled('div', {\r\n fs: 13,\r\n fontWeight: '$fw300',\r\n lineHeight: '$lh15',\r\n ls: '$ls125',\r\n pb: 16,\r\n '@mediaMinGreat': {\r\n px: 47,\r\n py: 6,\r\n },\r\n});\r\n\r\nconst FromDetailText = styled('p', {\r\n fs: 8,\r\n fontWeight: '$fw400',\r\n lineHeight: '$lh1625',\r\n mb: 6,\r\n mt: 0,\r\n});\r\n\r\nconst ValidationMessage = styled('div', {\r\n fs: 8,\r\n fontWeight: '$fw400',\r\n lineHeight: '$lh1625',\r\n backgroundColor: '$errorBackground',\r\n color: '$errorText',\r\n p: 6,\r\n my: 6,\r\n display: 'flex',\r\n variants: {\r\n success: {\r\n true: {\r\n backgroundColor: '$successBackground',\r\n color: '$successText',\r\n },\r\n },\r\n },\r\n});\r\n\r\nconst ErrorMessage = styled('p', {\r\n flexGrow: 1,\r\n flexShrink: 1,\r\n flexBasis: '0%',\r\n m: 0,\r\n});\r\n\r\nconst ButtonContainer = styled('div', {\r\n display: 'flex',\r\n justifyContent: 'center',\r\n mt: 8,\r\n});\r\n\r\nconst ForgotPasswordButton = styled(CtaButton, {});\r\n","import UserCredentials from '../../LoginPage/Models/UserCredentials.interface';\r\n\r\nexport async function ForgotPassword(\r\n userCredentials: UserCredentials,\r\n forgotPasswordPageUrl: string,\r\n channelId: string,\r\n pageId: string,\r\n setSuccess: (value: boolean) => void,\r\n setError: (value: boolean) => void,\r\n setValidationMessage: (value: string) => void,\r\n setIsLoading: (value: boolean) => void\r\n) {\r\n setIsLoading(true);\r\n setError(false);\r\n setValidationMessage('');\r\n const accountUrl = `/api/${userCredentials.language || 'en'}/account/`;\r\n\r\n userCredentials.channelId = channelId;\r\n\r\n const res = await fetch(`${accountUrl}ForgotPassword?pageId=${pageId}`, {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n 'litium-request-context': JSON.stringify({\r\n channelSystemId: channelId,\r\n }),\r\n },\r\n body: JSON.stringify(userCredentials),\r\n });\r\n const data = await res.json();\r\n\r\n if (data && data.statusCode === 200) {\r\n setSuccess(true);\r\n setValidationMessage(data.message);\r\n } else {\r\n setError(true);\r\n setValidationMessage(data.message);\r\n }\r\n setIsLoading(false);\r\n}\r\n\r\nexport async function CheckForgotPassword(\r\n language: string,\r\n link: string,\r\n channelId: string,\r\n createNewPasswordUrl: string,\r\n setError: (value: boolean) => void,\r\n setValidationMessage: (value: string) => void,\r\n setIsLoading: (value: boolean) => void\r\n) {\r\n setIsLoading(true);\r\n setError(false);\r\n setValidationMessage('');\r\n const accountUrl = `/api/${language || 'en'}/account/`;\r\n\r\n const res = await fetch(`${accountUrl}CheckForgotPassword?link=${link}`, {\r\n method: 'GET',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n 'litium-request-context': JSON.stringify({\r\n channelSystemId: channelId,\r\n }),\r\n },\r\n });\r\n const data = await res.json();\r\n\r\n if (data && data.statusCode === 200) {\r\n window.location.href = `${\r\n createNewPasswordUrl ? createNewPasswordUrl : data.redirectUrl\r\n }`;\r\n } else {\r\n setError(true);\r\n setValidationMessage(data.message);\r\n }\r\n setIsLoading(false);\r\n}\r\n\r\nexport async function CreateNewPassword(\r\n language: string,\r\n channelId: string,\r\n userCredentials: UserCredentials,\r\n setIsLoading: (value: boolean) => void\r\n) {\r\n setIsLoading(true);\r\n const accountUrl = `/api/${language || 'en'}/account/`;\r\n\r\n const res = await fetch(`${accountUrl}CreateNewPassword`, {\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n 'litium-request-context': JSON.stringify({\r\n channelSystemId: channelId,\r\n }),\r\n },\r\n body: JSON.stringify(userCredentials),\r\n });\r\n const data = await res.json();\r\n setIsLoading(false);\r\n\r\n return data;\r\n}\r\n"],"names":["BaseButtonStyled","styled","_objectSpread","cursor","display","alignItems","justifyContent","br","outlineWidth","variants","color","primary","backgroundColor","secondary","fontWeight","opacity","transparent","border","accent","borderColor","cancel","clearCart","true","size","s","px","py","fs","lineHeight","m","l","input","h","loading","fontSize","letterSpacing","_ref","onClick","css","isLoading","children","type","href","uppercase","rest","_objectWithoutProperties","_excluded","_jsx","StyledLink","noUnderline","StyledLoadingCircle","LoadingCircle","StyledButton","textAlign","w","false","textTransform","padding","borderRadius","height","KexLink","my","stroke","FormLabel","default","error","hasError","htmlFor","InputGroup","position","FormInput","ls","bw","borderStyle","outline","round","title","_ref$type","onChange","onBlur","onKeyDown","name","validation","placeholder","_ref$disabled","disabled","validationDispatch","useInputValidation","_useState","useState","_useState2","_slicedToArray","setHasError","_useState3","_useState4","errorMessage","setErrorMessage","_useState5","_useState6","hasTouched","setHasTouched","_useState7","_useState8","hasValue","setHasValue","onInputChange","val","doValidation","currentValue","validationError","undefined","active","pattern","test","required","minLength","length","maxLength","onInputBlur","e","currentTarget","value","useEffect","payload","backendValidation","message","_jsxs","Label","onFocus","onTouched","onInput","reducer","state","action","newInputs","inputs","newCount","count","hasOwnProperty","ValidationDispatchContext","React","initialReducerState","InputValidation","onInputsValid","onInputsInvalid","_useReducer","useReducer","_useReducer2","_useReducer2$","dispatch","validCount","key","Provider","_useTranslationData","useTranslationData","createNewPasswordLabel","newPasswordLabel","newPasswordConfirmLabel","successLabel","errorLabel","_useCurrentPage","useCurrentPage","pageHeading","pageIntroText","createNewPasswordText","channelId","languageRoute","useAppSettingsData","userName","useUserStateData","newPassword","setNewPassword","repeatNewPassword","setRepeatNewPassword","setIsLoading","success","setSuccess","_useState9","_useState10","setError","_useState11","_useState12","validationMessage","setValidationMessage","userCredentials","Container","InfoGridBox","StyledH1","noMargin","IntroText","FormGridBox","FormContainer","StyledH2","FromDetailText","ValidationMessage","ExclamationMarkIcon","IconStyleError","ErrorMessage","Input","ButtonContainer","ForgotPasswordButton","CreateNewPassword","then","data","statusCode","gg","gridTemplateColumns","wh","grg","mx","maxW","mr","mt","GridBox","flexDirection","p","H1","H2","pb","mb","flexGrow","flexShrink","flexBasis","CtaButton","ForgotPassword","_x","_x2","_x3","_x4","_x5","_x6","_x7","_x8","_ForgotPassword","apply","arguments","_asyncToGenerator","_regeneratorRuntime","mark","_callee","forgotPasswordPageUrl","pageId","accountUrl","res","wrap","_context","prev","next","concat","language","fetch","method","headers","JSON","stringify","channelSystemId","body","sent","json","stop","CheckForgotPassword","_x9","_x10","_x11","_x12","_x13","_x14","_x15","_CheckForgotPassword","_callee2","link","createNewPasswordUrl","_context2","window","location","redirectUrl","_x16","_x17","_x18","_x19","_CreateNewPassword","_callee3","_context3","abrupt"],"sourceRoot":""}