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CACCC,UAAU,UACVG,mBAAmB,aACnBC,MAAOxD,EAAiB,uBAAyB,GACjDyD,OAAQ,gBAAGgD,EAAH,EAAGA,MAAH,OAAe,uBAAK5H,UAAU,sBACrC,gBAACrB,EAAD,CACC0B,cAAc,gBACdd,OAAQ,SAACsI,GAAD,OAAW1D,EAAU2D,cAAc,OAAQD,EAA3C,EACRpI,QAASA,IAEV,2BACCO,UAAU,eACVoD,GAAG,UACHqB,YAAatD,EAAiB,GAAK,wBAC/ByG,IAVE,IAcT,uBAAK5H,UAAU,iBACd,gBAAC,EAAAiD,KAAD,CAAMjD,UAAU,aAAakD,GAAIyC,GAAjC,SAED,uBAAK3F,UAAU,eACd,gBAAC+H,EAAA,EAAD,CAAQ/H,UAAU,kBAAkBb,UAAWkF,GAA/C,YApCG,QA6DZ,ECtND,EAT0B,WACzB,OACC,gBAAC,EAAD,CACCK,mBAAmB,6CACnBvD,gBAAc,GAGhB,C","sources":["webpack://northern-tuna-portal/./common/react/components/Forms/Captcha.tsx","webpack://northern-tuna-portal/./common/react/components/Pages/Recover/SetPassword.tsx","webpack://northern-tuna-portal/./common/react/components/Pages/Recover/Recover.tsx","webpack://northern-tuna-portal/./ClientApp/components/Pages/Recover/Recover.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { generateGUID } from '@common/react/utils/utils';\n\ninterface CaptchaProps {\n\tupdate: any;\n\twithGuid?: boolean;\n\ticonClassName?: string;\n\tcounter?: number;\n}\n\ninterface CaptchaState {\n\tisLoading: boolean;\n\tsrc: string;\n}\n\nexport default class Captcha extends React.Component {\n\tpath: string;\n\tcode: string;\n\t/* eslint-disable */\n\tpublic static defaultProps: Partial = {\n\t\twithGuid: true,\n\t\ticonClassName: 'icon-refresh icons',\n\t};\n\n\tconstructor(props: CaptchaProps) {\n\t\tsuper(props);\n\n\t\tthis.path = 'captcha';\n\n\t\tthis.code = generateGUID();\n\n\t\tthis.state = {\n\t\t\tsrc: this.getSrc(),\n\t\t\tisLoading: false,\n\t\t};\n\n\t\tthis.reload = this.reload.bind(this);\n\t}\n\t/* eslint-enable */\n\n\tUNSAFE_componentWillMount() {\n\t\tthis.props.update(this.code);\n\t}\n\n\tUNSAFE_componentWillReceiveProps(nextProps: CaptchaProps) {\n\t\tif (nextProps.counter !== this.props.counter) {\n\t\t\tthis.setState({ src: this.getSrc() });\n\t\t}\n\t}\n\n\tgetSrc(): string {\n\t\treturn `${this.path}?${this.props.withGuid ? `guid=${this.code}` : 'id='}&refresh=${new Date().getTime()}`;\n\t}\n\n\treload(event: any) {\n\t\tevent.preventDefault();\n\n\t\tthis.setState({ src: this.getSrc() });\n\t}\n\n\trender(): JSX.Element {\n\t\treturn
\n\t\t\t\"captcha\"\n\t\t\t\n\t\t
;\n\t}\n}\n","import React from 'react';\nimport { useHistory, Link } from 'react-router-dom';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { bindActionCreators } from 'redux';\n\nimport * as Yup from 'yup';\n\nimport Modal from 'antd/lib/modal';\n\nimport { FieldProps, FormikProps } from 'formik';\n\nimport * as LoginState from '@common/react/store/Login';\nimport FormikField from '@common/react/components/Forms/FormikField/FormikField';\nimport { ConfirmationCodeInput } from '@common/react/components/Forms/ConfirmationCodeInput/ConfirmationCodeInput';\nimport { PreventDefaultButton } from '@common/react/components/Forms/Button';\nimport { simpleStringValidator } from '@common/react/utils/validationHelpers';\nimport { ItemProvider } from '@common/react/components/Core/ItemProvider/ItemProvider';\nimport { ItemEditor } from '@common/react/components/Core/ItemEditor/ItemEditor';\nimport { WithId } from '@common/typescript/objects/WithId';\nimport { RequestButton } from '@common/react/components/UI/LoadingButton/LoadingButton';\nimport { BaseUser } from '@common/typescript/objects/BaseUser';\nimport { BaseApplicationState } from '@common/react/store';\n\ninterface Props {\n\tphoneNumber: string;\n\tsetPasswordByPhoneRequest?: string;\n\tresendSetPasswordByPhoneCodeRequest?: string;\n\ttopMessage?: string;\n\twithFieldTitle?: boolean;\n\tonBack?: () => void;\n\tcustomReduxActions?: (dispatch, init: any) => void;\n\tafterLoginPath?: string;\n\trecoverPath?: string;\n}\n\ninterface ConfirmCode extends WithId {\n\tpath: string;\n\tpassword: string;\n\trepeat: string;\n\tcode: string;\n\tphoneNumber: string;\n}\n\nconst validationSchema = Yup.object().shape({\n\tcode: simpleStringValidator,\n\tpassword: simpleStringValidator,\n\trepeat: Yup.string().oneOf([Yup.ref('password'), null], 'Passwords are not equal').required(),\n});\n\nconst SetPassword: (p: Props) => React.ReactElement = (props) => {\n\tconst {\n\t\tphoneNumber,\n\t\tsetPasswordByPhoneRequest = 'setPasswordAndLoginByPhoneNumber',\n\t\tresendSetPasswordByPhoneCodeRequest = 'resendRecoverByPhoneCode',\n\t\ttopMessage = 'A phone number verification message has been sent to your current phone number.',\n\t\twithFieldTitle,\n\t\tonBack,\n\t\tcustomReduxActions,\n\t\tafterLoginPath = '/dashboard',\n\t\trecoverPath = '/recover',\n\t} = props;\n\tconst [time, setTime] = React.useState(30);\n\tconst ref = React.useRef(null);\n\n\tconst [success, setSuccess] = React.useState(false);\n\n\tconst loginState: LoginState.LoginState | null = useSelector((state: BaseApplicationState) => state.login);\n\tconst dispatch = useDispatch();\n\tconst loginActions = bindActionCreators(LoginState.getActionCreators(), dispatch);\n\n\tconst startTimer = () => {\n\t\tref.current = null;\n\t\tsetTime(60);\n\t\tref.current = setInterval(() => {\n\t\t\tsetTime((prev) => {\n\t\t\t\tconst newTime = prev - 1;\n\t\t\t\tif (!newTime && ref.current) {\n\t\t\t\t\tclearInterval(ref.current);\n\t\t\t\t\tref.current = null;\n\t\t\t\t}\n\t\t\t\treturn newTime;\n\t\t\t});\n\t\t}, 1000);\n\t\treturn () => {\n\t\t\tif (ref.current) {\n\t\t\t\tclearInterval(ref.current);\n\t\t\t}\n\t\t};\n\t};\n\n\tReact.useEffect(() => {\n\t\tstartTimer();\n\t}, []);\n\n\tconst history = useHistory();\n\n\tif (success) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t

\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\tYour password has been successfully changed\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\tLogin\n\t\t\t
\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t

Setup password

\n\t\t\t\t
\n\t\t\t\t

\n\t\t\t\t\t{topMessage}\n\t\t\t\t

\n\t\t\t
\n\t\t\t\n\t\t\t\tid={-1}\n\t\t\t\treadonly={false}\n\t\t\t\ttype={setPasswordByPhoneRequest}\n\t\t\t\tadd={{\n\t\t\t\t\tpath: '/',\n\t\t\t\t\tcode: '',\n\t\t\t\t\tpassword: '',\n\t\t\t\t\trepeat: '',\n\t\t\t\t\tphoneNumber,\n\t\t\t\t}}\n\t\t\t\tvalidationSchema={validationSchema}\n\t\t\t\ttransformAfterSave={() => ({\n\t\t\t\t\tpath: '/',\n\t\t\t\t\tcode: '',\n\t\t\t\t\tpassword: '',\n\t\t\t\t\trepeat: '',\n\t\t\t\t\tphoneNumber,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t\n\t\t\t\t\tsuccessMessage=\"\"\n\t\t\t\t\tafterSubmit={(item, res) => {\n\t\t\t\t\t\tconst init = res?.initObject;\n\n\t\t\t\t\t\tif (init && init.user && init.guid) {\n\t\t\t\t\t\t\t!loginState.user && customReduxActions && customReduxActions(dispatch, init);\n\n\t\t\t\t\t\t\tloginActions.setUserAndSession(init.user as BaseUser, init.guid as string);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsetSuccess(true);\n\t\t\t\t\t\t// history.push('/login');\n\t\t\t\t\t}}\n\t\t\t\t\tedit={(formikBag: FormikProps, _, { loading }) => <>\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tConfirm\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t
\n\t\t\t\t\tDidn't receive a code?\n\t\t\t\t\t{' '}\n\t\t\t\t\t{time ? `Resend code in ${time} seconds.`\n\t\t\t\t\t\t: (\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tstartTimer();\n\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tonError={(e) => {\n\t\t\t\t\t\t\t\t\tModal.error({\n\t\t\t\t\t\t\t\t\t\ttitle: 'Error',\n\t\t\t\t\t\t\t\t\t\tcontent: e,\n\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\tif (ref.current) {\n\t\t\t\t\t\t\t\t\t\tclearInterval(ref.current);\n\t\t\t\t\t\t\t\t\t\tref.current = null;\n\t\t\t\t\t\t\t\t\t\tsetTime(0);\n\t\t\t\t\t\t\t\t\t\tstartTimer();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\trequestType={resendSetPasswordByPhoneCodeRequest}\n\t\t\t\t\t\t\t\trequestProps={{ phoneNumber }}\n\t\t\t\t\t\t\t\tsuccessMessage=\"The confirmation code has been successfully sent.\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tResend code\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t
\n\t\t\t\t\t{onBack ? Try another method : \n\t\t\t\t\t\tTry another method\n\t\t\t\t\t}\n\t\t\t\t
\n\t\t\t\n\t\t\n\t);\n};\n\nexport default SetPassword;\n","import * as React from 'react';\nimport { Link } from 'react-router-dom';\n\nimport * as Yup from 'yup';\n\nimport Button from '@common/react/components/Forms/Button';\nimport Captcha from '@common/react/components/Forms/Captcha';\nimport { simpleStringValidator } from '@common/react/utils/validationHelpers';\nimport FormikField from '@common/react/components/Forms/FormikField/FormikField';\nimport PhoneOrEmailInput, { emailOrPhoneValidator } from '@common/react/components/Forms/PhoneOrEmailInput/PhoneOrEmailInput';\nimport SetPassword from '@common/react/components/Pages/Recover/SetPassword';\nimport ServerPageProvider from '@common/react/components/Core/ServerPageProvider/ServerPageProvider';\nimport { ItemProvider } from '@common/react/components/Core/ItemProvider/ItemProvider';\nimport { ItemEditor } from '@common/react/components/Core/ItemEditor/ItemEditor';\nimport { WithId } from '@common/typescript/objects/WithId';\nimport { RequestButton } from '@common/react/components/UI/LoadingButton/LoadingButton';\n\nimport '@common/react/scss/components/recover.scss';\nimport { BaseUser } from '@common/typescript/objects/BaseUser';\n\ninterface FormValues extends WithId {\n\tinfo: string;\n\tcaptcha: string;\n\tcode: string;\n}\n\ninterface Props {\n\tpath?: string;\n\tloginPath?: string;\n\tinfo?: boolean;\n\tlogo?: React.ReactNode;\n\tcontainerClassName?: string;\n\twithFieldTitle?: boolean;\n\twithResend?: boolean;\n\trecoverByPhoneRequest?: string;\n\trecoverByEmailRequest?: string;\n\tsetPasswordByPhoneRequest?: string;\n\tresendSetPasswordByPhoneCodeRequest?: string;\n\tcustomReduxActions?: (dispatch, init: any) => void;\n}\n\nconst validationSchema = Yup.object().shape({\n\tinfo: emailOrPhoneValidator,\n\tcaptcha: simpleStringValidator,\n});\n\nconst Recover: (p: Props) => React.ReactElement = (props) => {\n\tconst {\n\t\tpath = '/recover',\n\t\tloginPath = '/login',\n\t\tinfo = 'Enter the email or phone number you provided during registration'\n\t\t\t+ ' and we will send you a password reset email or confirmation code',\n\t\tlogo,\n\t\tcontainerClassName = 'recover-page',\n\t\twithFieldTitle,\n\t\twithResend = false,\n\t\trecoverByPhoneRequest = 'recoverByPhone',\n\t\trecoverByEmailRequest = 'recover',\n\t\tsetPasswordByPhoneRequest,\n\t\tresendSetPasswordByPhoneCodeRequest,\n\t\tcustomReduxActions,\n\t} = props;\n\tconst [success, setSuccess] = React.useState(false);\n\tconst [counter, setCounter] = React.useState(0);\n\tconst [phoneNumber, setPhoneNumber] = React.useState('');\n\tconst [visibleConfirm, setVisibleConfirm] = React.useState(false);\n\tconst [savedValues, setSavedValues] = React.useState();\n\n\tconst innerRender = () => {\n\t\tif (success) {\n\t\t\treturn
\n\t\t\t\t{visibleConfirm ? \n\t\t\t\t\trecoverPath={path}\n\t\t\t\t\tphoneNumber={phoneNumber}\n\t\t\t\t\twithFieldTitle={withFieldTitle}\n\t\t\t\t\tsetPasswordByPhoneRequest={setPasswordByPhoneRequest}\n\t\t\t\t\tresendSetPasswordByPhoneCodeRequest={resendSetPasswordByPhoneCodeRequest}\n\t\t\t\t\tonBack={() => {\n\t\t\t\t\t\tsetSuccess(false);\n\t\t\t\t\t\tsetPhoneNumber('');\n\t\t\t\t\t\tsetVisibleConfirm(false);\n\t\t\t\t\t}}\n\t\t\t\t\tcustomReduxActions={customReduxActions}\n\t\t\t\t/> :
\n\t\t\t\t\t
\n\t\t\t\t\t

Email confirmation

\n\t\t\t\t\t

\n\t\t\t\t\t\tWe have sent email to\n\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t{savedValues?.info}\n\t\t\t\t\t\t to confirm the validity of email address. After receiving the email follow\n\t\t\t\t\t\tthe link provided to complete recover.\n\t\t\t\t\t

\n\t\t\t\t\t{withResend && <>\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

\n\t\t\t\t\t\t\tIf you not get any mail\n\t\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\treturn !!(success && savedValues && savedValues.info.includes('@'));\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\trequestType={recoverByEmailRequest}\n\t\t\t\t\t\t\t\trequestProps={{ email: savedValues?.info }}\n\t\t\t\t\t\t\t\tsuccessMessage=\"The confirmation email has been successfully sent.\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tResend confirmation mail\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t

\n\t\t\t\t\t}\n\t\t\t\t
}\n\t\t\t
;\n\t\t}\n\n\t\treturn (\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t

Recover password

\n\t\t\t\t\t
\n\t\t\t\t\t

\n\t\t\t\t\t\t{info}\n\t\t\t\t\t

\n\t\t\t\t\t\n\t\t\t\t\t\tid={-1}\n\t\t\t\t\t\ttype=\"\"\n\t\t\t\t\t\treadonly={false}\n\t\t\t\t\t\tvalidationSchema={validationSchema}\n\t\t\t\t\t\tadd={{\n\t\t\t\t\t\t\tinfo: '',\n\t\t\t\t\t\t\tcaptcha: '',\n\t\t\t\t\t\t\tcode: '',\n\t\t\t\t\t\t}}\n\t\t\t\t\t\ttransformAfterSave={() => ({\n\t\t\t\t\t\t\tinfo: '',\n\t\t\t\t\t\t\tcaptcha: '',\n\t\t\t\t\t\t\tcode: '',\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tclearForSubmit={(values) => {\n\t\t\t\t\t\t\treturn values.info.includes('@') ? {\n\t\t\t\t\t\t\t\temail: values.info,\n\t\t\t\t\t\t\t\tcaptcha: values.captcha,\n\t\t\t\t\t\t\t\tcode: values.code,\n\t\t\t\t\t\t\t} : {\n\t\t\t\t\t\t\t\tphoneNumber: values.info,\n\t\t\t\t\t\t\t\tcaptcha: values.captcha,\n\t\t\t\t\t\t\t\tcode: values.code,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tonRequestError={() => setCounter((prev) => prev + 1)}\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tsuccessMessage=\"\"\n\t\t\t\t\t\t\tafterSubmit={() => {\n\t\t\t\t\t\t\t\tsetSuccess(true);\n\t\t\t\t\t\t\t\tsetCounter((prev) => prev + 1);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tresetFormAfterSubmit\n\t\t\t\t\t\t\tbeforeSubmit={(values, actions, submit) => {\n\t\t\t\t\t\t\t\treturn submit()\n\t\t\t\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\t\t\t\tconst isEmail = values.info.includes('@');\n\t\t\t\t\t\t\t\t\t\tsetVisibleConfirm(!isEmail);\n\t\t\t\t\t\t\t\t\t\tsetPhoneNumber(!isEmail ? values.info : '');\n\t\t\t\t\t\t\t\t\t\tsetSavedValues(values);\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tgetRequestName={(values) => (values.info.includes('@') ? recoverByEmailRequest : recoverByPhoneRequest)}\n\t\t\t\t\t\t\tedit={(formikBag, _, { loading }) => (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t formikBag.setFieldValue('code', value)}\n\t\t\t\t\t\t\t\t\t\t\t\tcounter={counter}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\tBack\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t};\n\n\treturn (\n\t\t
\n\t\t\t}\n\t\t\t\tinner={(serverPage) => <>}\n\t\t\t/>\n\t\t\t{logo}\n\t\t\t
\n\t\t\t\t{innerRender()}\n\t\t\t
\n\t\t
\n\t);\n};\n\nexport default Recover;\n","import * as React from 'react';\n\nimport RecoverPage from '@common/react/components/Pages/Recover/Recover';\n\nimport '@app/scss/pages/login.scss';\nimport '@app/scss/pages/recover.scss';\n\nconst Recover: React.FC = () => {\n\treturn (\n\t\t\n\t);\n};\n\nexport default Recover;\n"],"names":["Captcha","props","path","code","generateGUID","state","src","getSrc","isLoading","reload","bind","this","update","nextProps","counter","setState","withGuid","Date","getTime","event","preventDefault","className","alt","tabIndex","type","onClick","iconClassName","React","validationSchema","Yup","shape","simpleStringValidator","password","repeat","oneOf","required","phoneNumber","setPasswordByPhoneRequest","resendSetPasswordByPhoneCodeRequest","topMessage","withFieldTitle","onBack","customReduxActions","afterLoginPath","recoverPath","time","setTime","ref","success","setSuccess","loginState","useSelector","login","dispatch","useDispatch","loginActions","bindActionCreators","LoginState","startTimer","current","setInterval","prev","newTime","clearInterval","useHistory","style","marginTop","fontSize","lineHeight","marginBottom","Link","to","ItemProvider","id","readonly","add","transformAfterSave","ItemEditor","successMessage","afterSubmit","item","res","init","initObject","user","guid","setUserAndSession","edit","formikBag","_","loading","FormikField","fieldName","inputProps","placeholder","containerClassName","title","render","fieldProps","htmlFor","ConfirmationCodeInput","handleSubmit","beforeAction","onError","e","Modal","content","requestType","requestProps","info","emailOrPhoneValidator","captcha","loginPath","logo","withResend","recoverByPhoneRequest","recoverByEmailRequest","setCounter","setPhoneNumber","visibleConfirm","setVisibleConfirm","savedValues","setSavedValues","ServerPageProvider","defaultTitle","loader","inner","serverPage","fontWeight","color","padding","margin","includes","email","clearForSubmit","values","onRequestError","resetFormAfterSubmit","beforeSubmit","actions","submit","then","isEmail","getRequestName","PhoneOrEmailInput","field","value","setFieldValue","Button"],"sourceRoot":""}