{"version":3,"sources":["webpack:///./src/pages/otp-verification.js"],"names":["customStyles","content","top","left","right","bottom","marginRight","transform","alertBoxStyle","width","initialFormValue","fullName","companyName","countryGuid","uuid","email","mobileNo","password","otp","TrialOTPVerification","trialRegisterationData","location","state","language","React","useContext","I18nextContext","canonicalUrl","GATSBY_LANDING_PAGE_URL","hrefUrl","JSON","parse","stringify","t","useTranslation","useState","alert_message","setAlertMessage","formValues","setformValues","isLoading","setLoading","isModalOpen","setModelOpen","checked","setCheckBoxValue","isAlertModalOpen","setAlertModelOpen","otpRef","useRef","handleAlertModalClose","event","a","useEffect","formValue","Object","assign","setAutoFocusForOTP","currentLanguage","navigate","clearAlertType","submitHandler","preventDefault","confirmOTP","handleModalClose","current","focus","inputObj","confirmRegistration","then","res","confirmTrialUserRegisterationProcess","catch","err","errMessage","response","data","errorMessage","confirmTrialUserRegistration","readUserPoolDataAndLoginUserToApplication","deleteCognitoTokenFromLocalStorage","deleteCookie","getLoginUserPoolInformation","userResult","Array","isArray","length","userObj","authenticateUserCredential","getMessages","MESSAGE","USER_DOES_NOT_EXIST","validationMessage","Tenant","clientId","userPoolId","authenticationDetails","AuthenticationDetails","Username","Password","poolData","UserPoolId","ClientId","userPool","CognitoUserPool","userData","Pool","Storage","CustomStorage","CognitoUser","authenticateUser","onSuccess","session","setCookieValue","configureUserPool","redirectApplication","onFailure","message","error","hasOwnProperty","tenantData","region","identityPoolId","awsPoolConfiguration","aws_project_region","aws_cognito_identity_pool_id","aws_cognito_region","aws_user_pools_id","aws_user_pools_web_client_id","Amplify","configure","Auth","currentSession","setCookie","window","replace","GATSBY_LOGIPULSE_APPLICATION_URL","rel","href","hreflang","className","lang","to","src","alt","id","disabled","onSubmit","autoComplete","onClick","inputData","resendOTP","valueFields","V1","getValueMessages","OTP_SENT_TO_MAIL","Group","controlId","Label","Control","type","name","value","ref","onChange","target","required","defaultChecked","isOpen","ariaHideApp","onRequestClose","contentLabel","style","aria-labelledby","centered","data-dismiss","aria-label","aria-h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ification-js-a05a0c023eaaa5c58acc.js","sourcesContent":["import React, { useEffect, useState, useRef } from \"react\";\nimport { Trans, I18nextContext, Link } from 'gatsby-plugin-react-i18next';\nimport Photo from \"../components/Photo\";\nimport \"bootstrap/dist/css/bootstrap.min.css\";\nimport Form from \"react-bootstrap/Form\";\nimport \"../styles/purchase.scss\";\nimport \"../styles/freetrial.scss\";\nimport \"../styles/common_style.scss\";\nimport { navigate } from \"gatsby\";\nimport Modal from 'react-modal';\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faExclamationCircle } from \"@fortawesome/free-solid-svg-icons\";\nimport { useTranslation } from \"react-i18next\";\nimport {\n confirmRegistration, resendOTP, confirmTrialUserRegistration,\n getLoginUserPoolInformation\n} from \"../services/tenant-identity-service\";\nimport 'react-phone-input-2/lib/style.css';\nimport { Helmet } from \"react-helmet\";\nimport { MESSAGE } from '../constant/message-enum';\nimport { getMessages, getValueMessages } from '../services/language-service';\nimport * as uuid from \"uuid\";\nimport { CustomStorage } from '../custom-storage';\nimport { AuthenticationDetails, CognitoUser, CognitoUserPool } from 'amazon-cognito-identity-js';\nimport { deleteCookie, deleteCognitoTokenFromLocalStorage, setCookie } from \"../services/cookie-storage-service\";\nimport awsPoolConfiguration from \"../aws-exports\";\nimport { Auth, Amplify } from \"aws-amplify\";\n\nconst GATSBY_LANDING_PAGE_URL = process.env.GATSBY_LANDING_PAGE_URL;\nconst GATSBY_LOGIPULSE_APPLICATION_URL = process.env.GATSBY_LOGIPULSE_APPLICATION_URL;\nconst GATSBY_LOGIPULSE_APPLICATION_LANDING_REDIRECTION_URL = process.env.GATSBY_LOGIPULSE_APPLICATION_LANDING_REDIRECTION_URL;\n\nconst customStyles = {\n content: {\n top: '50%',\n left: '50%',\n right: 'auto',\n bottom: 'auto',\n marginRight: '-50%',\n transform: 'translate(-50%, -50%)',\n // width: '800px',\n // padding: '48px'\n }\n};\n\nconst alertBoxStyle = {\n content: {\n top: '50%',\n left: '50%',\n right: 'auto',\n bottom: 'auto',\n marginRight: '-50%',\n transform: 'translate(-50%, -50%)',\n width: '500px',\n // padding: '48px',\n }\n};\n\nconst initialFormValue = {\n fullName: \"\",\n companyName: \"\",\n countryGuid: uuid.NIL,\n email: \"\",\n mobileNo: \"\",\n password: \"\",\n otp: \"\"\n}\n\nfunction TrialOTPVerification({ location }) {\n const trialRegisterationData = location.state;\n\n const { language } = React.useContext(I18nextContext);\n const buildCanonicalUrl = () =>\n language === \"en\"\n ? GATSBY_LANDING_PAGE_URL + \"/otp-verification/\"\n\n : GATSBY_LANDING_PAGE_URL + `/${language}/otp-verification/`;\n\n const canonicalUrl = buildCanonicalUrl();\n\n const buildHrefUrl = () =>\n language === \"en\"\n ? JSON.parse(JSON.stringify(GATSBY_LANDING_PAGE_URL + \"/\"))\n : JSON.parse(JSON.stringify(GATSBY_LANDING_PAGE_URL + `/${language}/`))\n const hrefUrl = buildHrefUrl();\n\n const { t } = useTranslation();\n\n const [alert_message, setAlertMessage] = useState('');\n const [formValues, setformValues] = useState(initialFormValue);\n const [isLoading, setLoading] = useState(false);\n const [isModalOpen, setModelOpen] = useState(false);\n const [checked, setCheckBoxValue] = useState(false);\n const [isAlertModalOpen, setAlertModelOpen] = useState(false);\n const otpRef = useRef(null);\n\n const handleAlertModalClose = async (event) => {\n setAlertModelOpen(false);\n }\n\n const initializeFormValues = () => {\n let formValue = Object.assign(initialFormValue, trialRegisterationData);\n setformValues(formValue);\n setAutoFocusForOTP();\n }\n\n useEffect(() => {\n initializeFormValues();\n\n if (!trialRegisterationData) {\n let currentLanguage = `${language}`;\n if (currentLanguage === 'en') {\n navigate('/');\n }\n else {\n navigate(`/${currentLanguage}/`);\n }\n }\n\n return () => {\n };\n }, [language]);\n\n const handleChange = (event) => {\n const value = { ...formValues };\n value[event.target.name] = event.target.value;\n setformValues(value);\n }\n\n const clearAlertType = async () => {\n setAlertMessage(\"\");\n }\n\n const submitHandler = async (event) => {\n event.preventDefault();\n await clearAlertType();\n if (!checked) {\n setAlertMessage(\"You must agree with terms and conditions.\");\n setAlertModelOpen(true);\n } else {\n await confirmOTP();\n }\n }\n\n const handleModalOpen = event => {\n setModelOpen(true);\n }\n\n const handleModalClose = event => {\n setModelOpen(false);\n }\n\n const handleCheck = () => {\n setCheckBoxValue(!checked);\n }\n\n const setAutoFocusForOTP = () => {\n if (otpRef.current) {\n otpRef.current.focus();\n }\n }\n\n const confirmOTP = async () => {\n setLoading(true);\n let inputObj = {\n \"email\": formValues.email,\n \"confirmationCode\": formValues.otp\n }\n\n confirmRegistration(inputObj).then(async (res) => {\n setLoading(false);\n await confirmTrialUserRegisterationProcess()\n }).catch(err => {\n setLoading(false);\n let errMessage = err.response.data.errorMessage;\n setAlertMessage(errMessage);\n setAlertModelOpen(true);\n setAutoFocusForOTP();\n });\n }\n\n const resendConfirmationCode = (event) => {\n event.preventDefault();\n setLoading(true);\n let currentLanguage = `${language}`;\n\n let inputData = {\n \"email\": formValues.email\n }\n\n resendOTP(inputData).then(async (res) => {\n let valueFields = { V1: formValues.email };\n let validationMessage = await getValueMessages(MESSAGE.OTP_SENT_TO_MAIL, currentLanguage, JSON.stringify(valueFields));\n await setAlertMessage(validationMessage);\n await setAlertModelOpen(true);\n setLoading(false);\n }).catch(err => {\n let errMessage = err.response.data.errorMessage;\n setAlertMessage(errMessage);\n setAlertModelOpen(true);\n setLoading(false);\n });\n }\n\n const confirmTrialUserRegisterationProcess = async () => {\n setLoading(true);\n let inputObj = {\n \"email\": formValues.email\n }\n\n confirmTrialUserRegistration(inputObj).then(async (res) => {\n setLoading(false);\n await readUserPoolDataAndLoginUserToApplication();\n }).catch(async (err) => {\n setLoading(false);\n let errorMessage = err.response.data.errorMessage;\n setAlertMessage(errorMessage);\n setAlertModelOpen(true);\n });\n }\n\n const readUserPoolDataAndLoginUserToApplication = async () => {\n try {\n let currentLanguage = `${language}`;\n setLoading(true);\n await deleteCognitoTokenFromLocalStorage();\n await deleteCookie();\n let { email } = formValues;\n let userResult = await getLoginUserPoolInformation(email);\n\n if (Array.isArray(userResult) && userResult.length > 0) {\n let userObj = userResult[0];\n await authenticateUserCredential(userObj);\n } else {\n let validationMessage = await getMessages(MESSAGE.USER_DOES_NOT_EXIST, currentLanguage);\n setAlertMessage(validationMessage);\n setAlertModelOpen(true);\n setLoading(false);\n }\n } catch (error) {\n setLoading(false);\n let errMessage = error.response.data.errorMessage;\n setAlertMessage(errMessage);\n setAlertModelOpen(true);\n }\n }\n\n const authenticateUserCredential = async (userResult) => {\n try {\n let { Tenant } = userResult;\n let { email, password } = formValues;\n let { clientId, userPoolId } = Tenant;\n\n let authenticationDetails = new AuthenticationDetails({\n Username: email,\n Password: password,\n });\n\n let poolData = {\n UserPoolId: userPoolId,\n ClientId: clientId\n };\n\n let userPool = new CognitoUserPool(poolData);\n let userData = {\n Username: email,\n Pool: userPool,\n Storage: CustomStorage\n };\n\n var cognitoUser = new CognitoUser(userData);\n\n cognitoUser.authenticateUser(authenticationDetails, {\n onSuccess: async (session) => {\n await setCookieValue();\n await configureUserPool(Tenant);\n await redirectApplication();\n await setLoading(false);\n },\n onFailure: async (err) => {\n setLoading(false);\n setAlertModelOpen(true);\n setAlertMessage(err.message);\n }\n });\n } catch (error) {\n let errorMessage = error.hasOwnProperty('errorMessage') ? error.errorMessage : error.message;\n setAlertModelOpen(true);\n setAlertMessage(errorMessage);\n setLoading(false);\n }\n }\n\n const configureUserPool = async (tenantData) => {\n let { region, identityPoolId, userPoolId, clientId } = tenantData;\n\n awsPoolConfiguration.aws_project_region = region;\n awsPoolConfiguration.aws_cognito_identity_pool_id = identityPoolId;\n awsPoolConfiguration.aws_cognito_region = region;\n awsPoolConfiguration.aws_user_pools_id = userPoolId;\n awsPoolConfiguration.aws_user_pools_web_client_id = clientId;\n\n Amplify.configure(awsPoolConfiguration);\n Auth.configure(awsPoolConfiguration);\n\n await Auth.currentSession()\n .then(async (res) => {\n })\n .catch((error) => {\n let errorMessage = error.hasOwnProperty('errorMessage') ? error.errorMessage : error.message;\n setAlertModelOpen(true);\n setAlertMessage(errorMessage);\n setLoading(false);\n });\n }\n\n const setCookieValue = async () => {\n let currentLanguage = `${language}`;\n setCookie(\"isSignIn\", true);\n setCookie(\"isLoginIn\", true);\n setCookie(\"currentLanguage\", currentLanguage);\n }\n\n const redirectApplication = async () => {\n window.location.replace(GATSBY_LOGIPULSE_APPLICATION_URL + GATSBY_LOGIPULSE_APPLICATION_LANDING_REDIRECTION_URL);\n }\n\n return (\n
\n \n \n {t(\"Logipulse – Free-Trial\")}\n \n \n \n\n \n
\n
\n
\n
\n
\n
\n {\" \"}{\" \"}\n

Here starts your novel opportunity to lead the competition.Logipulse renders you a digital transformation to your Logistics operation.Spread out your wings around the world and manage them from a single platform.Head out of adversity!

\n
\n
\n
\n
\n
\n
\n Sign Up\n
\n
\n
    \n
  • \n
  • \n
\n
\n
\n
\n
\n
\n
\n Resend OTP\n
\n
\n\n
\n \n OTP\n \n \n
\n
\n OTP_MESSAGE\n
\n
\n
\n
\n \n\n
\n I agree Terms & Conditions\n
\n
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n \n
\n
Terms & Conditions
\n \n
\n
\n
USE OF SITE
\n
The contents of this Site are the property of STELLOSYS or are licensed to STELLOSYS by a third party. Except as stated above, or unless otherwise expressly stated, no license is granted herein expressly, implied or otherwise under any patent, trademark, copyright or other intellectual property of STELLOSYS or any third party.
\n
ACCESS AND INTERFERENCE
\n
The contents of this Site are the property of STELLOSYS or are licensed to STELLOSYS by a third party. Except as stated above, or unless otherwise expressly stated, no license is granted herein expressly, implied or otherwise under any patent, trademark, copyright or other intellectual property of STELLOSYS or any third party.
\n
NON-DISCLOSURE
\n
Unless otherwise agreed, each contracting party will treat any information (including documentation, samples etc.) disclosed to it by STELLOSYS as a trade secret, use such information solely for the purpose of the Contract, and refrain from disclosing it to any third parties.
\n
LIMITATION OF LIABILITY
\n
Except for actions or claims arising from the gross negligence or intentional or wilful misconduct, liability to STELLOSYS shall be limited to the compensation fees based upon the contract.
\n
LINKS TO THIRD PARTY SITES
\n
STELLOSYS does not review or control and is thus not responsible for any third-party sites or their content. Such links should not be assumed to constitute an endorsement or recommendation by STELLOSYS. By clicking on any of these links, you are leaving the STELLOSYS Site and accessing these other sites at your own risk.
\n\n
COMMUNITY FORUMS
\n
STELLOSYS may provide chat room, bulletin boards, blogs or other user forums (“Forums”) that allow third parties to post content and comments. STELLOSYS has the right, but not the obligation, to review or monitor third postings (“Submissions”) and to remove Submissions that contains material STELLOSYS deems offensive, abusive, defamatory, obscene or otherwise unacceptable. However, STELLOSYS shall not be liable for claims arising from those Submissions whether arising under the laws of copyright, libel, privacy, obscenity or otherwise.
\n\n
GOVERNING LAW
\n
These Terms shall be governed in all respects by the laws of the The Cybersecurity Framework (NCFS)
\n\n
IMPORT/EXPORT
\n
You may not access, download, use, or export information (including software, products or services) contained on this Site in violation of any applicable laws or regulations including, but not limited to the export laws of the European Union and United States.
\n\n
PRIVACY
\n
For information on how STELLOSYS handles your personal information, see our Privacy Policy.
\n\n
INDEMNIFICATION
\n
You agree to indemnify, defend and hold harmless, STELLOSYS, its subsidiaries, affiliates, joint ventures, business partners, licensors, employees, agents and third-party information providers from and against all losses, expenses, damages and costs, including attorney fees, resulting from any violation of these Terms (including negligent or wrongful conduct) by you or your use and access to the Site.
\n\n\n\n
\n
\n
Learn more
\n \n
\n\n \n\n \n
\n
{alert_message}
\n
\n
\n \n
\n\n \n\n \n
\n
\n )\n}\n\nexport default TrialOTPVerification;\n\nexport const query = graphql`\n query($language: String!) {\n locales: allLocale(filter: { language: { eq: $language } }) {\n edges {\n node {\n ns\n data\n language\n }\n }\n }\n }\n`\n"],"sourceRoot":""}