{"version":3,"sources":["StateManagement/LocalStorageService.ts","util/dateUtils.ts","Login/constants.ts","Login/reducer/loginReducer.ts","Login/actions/actionTypes.ts","ContactUs/reducer.ts","ContactUs/actions/actionTypes.ts","StateManagement/reducer.ts","StateManagement/GlobalState.tsx","util/appMapping.ts","util/brandMappings.ts","util/featureFlagUtils.ts","ConfigProvider.tsx","components/LoginPageContainer.tsx","components/LinkButtonComponent.ts","ContactUs/actions/actionCreator.ts","ContactUs/dataConstants.ts","ContactUs/ContactUsLink.tsx","ContactUs/ContactPhoneNumberDisplay.tsx","ContactUs/ContactUsComponent.tsx","components/dataConstants.ts","components/AlertComponent.tsx","components/NoBorderForm.tsx","components/TextBoxComponent.tsx","components/Header.tsx","components/PageTemplate.tsx","components/CopyElement.ts","components/DisplayBorder.tsx","components/NoSpacingButton.ts","components/CheckboxComponent.tsx","util/customTealiumEvent.ts","WheresMyCodeModal/constants.ts","WheresMyCodeModal/WheresMyCodeModal.tsx","util/fieldValidator.ts","Login/dataConstants.ts","util/contactUtilities.ts","initialState.ts","util/passwordlessStartProxy.ts","Login/actions/loginActionCreator.ts","util/shouldPasswordlessCallBeSkipped.ts","Login/MemberNumberInput.tsx","Login/Login.tsx","panels/NibAppPanel.tsx","panels/dataConstants.ts","panels/BasicPageTemplate.tsx","panels/HeaderPanel.tsx","panels/AdvertisingPageTemplate.tsx","panels/LoginPanelMaster.tsx","util/Auth0.ts","Login/OTP.tsx","Login/actions/otpActionCreator.ts","metrics/configureMetrics.ts","App.tsx","index.tsx"],"names":["loadLoginState","storedValue","state","JSON","parse","login","contact","hasBeenValidated","loginState","undefined","rememberContact","reconstituteState","stored","defaultState","reconstitutedState","key","useRememberState","useStateValue","isInitialMount","useRef","objectToPersist","removePropertiesNotSpecified","propertiesToStore","loginToPersist","isValid","displayMemberNumberForm","memberNumber","useEffect","valueToStore","current","localStorage","setItem","stringify","stateToStore","filteredState","previousContactType","lastPasswordlessStartSuccessResultTime","dateNow","Date","now","memberNumberDisplayStates","ON","OFF","contactLoginReducer","action","type","displayMemberNumberStates","currentState","newState","stateArray","validationMessage","contactSendingInProgress","alert","alertType","title","message","memberNumberState","previousType","otpReducer","code","verifying","loginReducer","otp","contactUsReducer","showComponent","reducer","contactUsFlow","GlobalStateContext","createContext","GlobalStateProvider","initialState","children","useReducer","dispatch","Provider","value","WithRememberState","useContext","appNames","apps","stage","appName","clientId","brandNamesToBrand","nib","gu","cignagu","apia","suncorp","ing","priceline","qantas","aami","brandDomainsToBrand","kaos","prod","enablePhoneNumberAuthStates","EnablePhoneNumberAuthFeatureFlag","setting","this","toLowerCase","searchQuery","window","location","search","slice","length","queryParams","qs","nonce","redirectUri","redirect_uri","clientID","Array","isArray","client","audience","scope","responseType","response_type","handOffNonce","currentApp","app","find","x","toUpperCase","trim","appForClient","process","featureFlags","enablePhoneNumberAuth","appConfiguration","tenant","domain","contactUsUrl","language","brand","brandName","needHelpUrl","brandDomainsForBrand","isProd","assetBaseUrl","isSingleSignOn","ConfigContext","ConfigProvider","useConfig","Colordiv","styled","div","breakpoint","colorLightest","props","themes","iap","LoginPageContainer","padding","data-testid","theme","halign","Unit","size","LinkButton","Link","attrs","component","useActionCreator","showContactUsComponent","hideContactUsComponent","englishTextConstants","contactUsModalTitle","contactUsDomesticText","contactUsInternationalText","contactUsLinkText","brandContactNumbers","contactUsDomesticNumber","domesticNumberText","contactUSInternationalNumber","internationalNumberText","contactUsConstants","ContactUsLink","id","toLower","config","constants","onClick","ContactPhoneNumberDisplay","Fragment","href","top","DockModalAtBottom","Modal","ContactUsComponent","actionCreator","visible","onClose","english","RESTART_AUTH_FLOW_LINK","AlertComponent","componentConstants","fullWidth","to","ReactRouterLink","NoBorder","Form","colorWhite","p","NoBorderForm","noValidate","InputBox","TextBox","TextBoxComponent","name","valid","validated","label","error","help","dataTestid","onChange","onBlur","autoFocus","disabled","otherTextBoxProps","width","e","HeaderEl","header","py","px","Header","bottom","align","Wrapper","Layout","CopyElement","Copy","DisplayBorder","requireShadow","background","borderRadius","xs","md","boxShadow","NoSpacingPrimaryButton","PrimaryButton","mb","CheckboxComponent","text","checked","fireCustomTealiumEvent","utag","link","content_id","tealium_event","event_label","baseConfigForLanguage","commonIssues","isOn","CORRECT_DETAILS","RECENT_CODE","CODE_IN_SPAM","COMMON_ISSUES_HEADING","COMMON_ISSUES","NEED_MORE_HELP","IAP_NEED_MORE_HELP","WheresMyCode","showHelp","showNeedMoreHelpLink","Object","keys","map","index","target","rel","emailRegex","phoneNumberRegex","codeRegex","numberRegex","validateContact","validators","isOff","push","reduce","validator","test","validateCode","validateMemberNumber","passwordlessFlowConstants","SUBMIT_BUTTON_TEXT","SYSTEM_ERROR_ALERT_TITLE","SYSTEM_ERROR_ALERT_MESSAGE","ENTER_CONTACT_DETAILS_HEADER_TITLE","ENTER_CONTACT_DETAILS_HEADER_SUBTEXT","ENTER_CONTACT_DETAILS_TEXTBOX_LABEL","ENTER_CONTACT_DETAILS_SUBMIT_BUTTON_LOADING_TEXT","ENTER_CONTACT_DETAILS_VALIDATION_MESSAGE","REMEMBER_CONTACT_DETAILS_CHECKBOX_LABEL","REMEMBER_CONTACT_DETAILS_CHECKBOX_TEXT","ENTER_CODE_HEADER_TITLE","HEADER_SUBTEXT_PART_ONE","HEADER_SUBTEXT_PART_TWO","ENTER_CODE_TEXTBOX_LABEL","ENTER_CODE_SUBMIT_BUTTON_LOADING_TEXT","ENTER_CODE_VALIDATION_MESSAGE","ENTER_CODE_WRONG_CODE_MESSAGE","ENTER_CODE_TOO_MANY_ATTEMPTS_ALERT_TITLE","ENTER_CODE_TOO_MANY_ATTEMPTS_ALERT_MESSAGE","ENTER_MEMBER_NUMBER_TEXTBOX_LABEL","ENTER_MEMBER_HELP_TEXT","ENTER_MEMBER_NUMBER_VALIDATION_MESSAGE","baseContent","smsSpecificContent","englishSpecificContent","brandSpecificContent","addSingleSignOnContent","isEmail","isPhoneNumber","connectionTypeForContact","ensurePlus61Format","stripSpaces","replace","ContactType","skipMemberNumberCheck","passwordlessStartDirect","a","noWhitespaceContact","body","client_id","connection","send","email","phone_number","options","method","uri","json","resolvedWithFullResponse","rp","NONE","dispatchValidateForm","shouldDisplayMemberNumberForm","isAEmail","RegExp","isAPhone","EMAIL","PHONE","validateForm","isEmptyContact","validateMemberNumberInput","requestPasswordlessStartDirect","history","lastSuccessRequest","moveToOtpScreen","displayStates","states","startsWithAnOn","endsWithAnOff","fireTealiumEvent","differenceInMinutes","updatedMemberNumberData","then","catch","err","console","log","Promise","resolve","submitForm","isContactValid","isMemberNumberValid","contactChanged","rememberContactChanged","memberNumberChanged","MemberNumberInput","helpText","pattern","Login","isDefaultLogin","useState","setShowHelp","onSubmit","event","space","data-id","isLoading","small","AppLink","BoxWithBackground","Box","PaddedBox","ClickThroughImage","img","NibAppPanel","NIB_APP_PANEL_HEADING","NIB_APP_PANEL_HEADING_SMALL","NIB_APP_PANEL_COPY","panelConstants","paddingTop","paddingRight","lg","below","above","src","alt","height","BasicPageTemplate","PageTemplate","sm","HeaderPanel","AdvertisingPageTemplate","loginPanel","advertisingPanel","verticalAlign","collapseBelow","flex","display","alignItems","allowedMultiPanelApps","LoginPanelMaster","includes","doAuth0PasswordlessLogin","contactWithoutSpaces","reject","auth0","WebAuth","auth","passwordlessLogin","phoneNumber","verificationCode","error_description","description","success","reason","responseTypes","accountLocked","badEmailCodeCombination","unknownError","ContactWrapper","span","HeadingSubText","CodeEntry","autoComplete","inputMode","updateCode","OTP","displayAlert","clearAlerts","completePasswordlessLogin","response","useClearAlertsOnLoadHook","alertState","useLayoutEffect","configureUtag","environmentVariables","tealiumTagOptions","account","REACT_APP_TELIUM_ACCOUNT","environment","REACT_APP_TELIUM_ENVIRONMENT","profile","REACT_APP_TELIUM_PROFILE","TealiumUniversalTag","manualPageView","initialRestoredState","getItem","getSavedState","restoreWithDefault","wrapWithMetrics","page","track","trackPage","channel","site_name","site_section","page_name","page_type","nibMetricsConfig","vendors","api","metrics","exact","path","ReactDOM","render","document","getElementById"],"mappings":"0NAiBM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C,EACAf,GAEA,IAAMgB,EAAQC,aAAU,CACtBC,QAAS,SACTC,UAAWxV,6BACXyV,aAAc,kBACdC,UAAW,oBACXC,UAAW,oBAGPC,EAAmB,CACvBC,QAAS,CACP,CACE1Q,KAAM,wBACN2Q,IAAK1B,GAAcC,MAIzB,OAAO0B,mBAAQH,EAARG,CAA0BV,EAAMD,ICd1BD,EAbH,WACV,OACE,kBAAC,IAAD,KACE,kBAAC,EAAD,CAAqB7Y,aAAcyY,IACjC,kBAAC,GAAD,KACE,kBAAC,IAAD,CAAOiB,OAAK,EAACC,KAAK,IAAI7T,UAAW8P,KACjC,kBAAC,IAAD,CAAO+D,KAAK,OAAO7T,UAAWwR,UAOV,eAAW5T,+fCpBzCkW,IAASC,OAAO,kBAAC,GAAD,MAASC,SAASC,eAAe,U","file":"static/js/main.2b6f5bb8.chunk.js","sourcesContent":["import { useEffect, useRef } from \"react\";\nimport { State } from \"../initialState\";\nimport { useStateValue } from \"./GlobalState\";\nconst localStateKey = \"authState\";\n\nconst getSavedState = (): State | undefined => {\n try {\n const storedValue = localStorage.getItem(localStateKey);\n if (storedValue) {\n return loadLoginState(storedValue);\n }\n return undefined;\n } catch {\n return undefined;\n }\n};\n\nconst loadLoginState = (storedValue: string): State | undefined => {\n const state = JSON.parse(storedValue);\n if (!state) {\n return undefined;\n }\n // do not set hasBeenValidated if the contact is not set, so that\n // the error box isn't visible on page load from an old invalid state\n const login = state?.login?.login;\n if (login && !login.contact) {\n login.hasBeenValidated = false;\n }\n\n // rememberContact was added in GRIP-1453. Before this it didn't exist and contact was always saved.\n // So if login has been stored previously but doesn't include rememberContact set rememberContact to true.\n const loginState = state?.login?.login;\n if (loginState && loginState.rememberContact === undefined) {\n loginState.rememberContact = true;\n }\n\n return state;\n};\n\nexport const restoreWithDefault = (defaultState: State): State | undefined => {\n const stored = getSavedState();\n // recurse through the default state and replace defaults with saved properties.\n return reconstituteState(stored, defaultState);\n};\n\nconst reconstituteState = (\n stored: State | undefined,\n defaultState: State | undefined,\n): State | undefined => {\n if (!stored) {\n return defaultState;\n }\n const reconstitutedState = {} as State;\n for (let key in defaultState) {\n if (typeof defaultState[key] === \"object\") {\n reconstitutedState[key] = reconstituteState(stored[key], defaultState[key]);\n } else {\n reconstitutedState[key] = stored[key] !== undefined ? stored[key] : defaultState[key];\n }\n }\n return reconstitutedState;\n};\n\nfunction setLocalStorage(valueToStore: Partial) {\n localStorage.setItem(localStateKey, JSON.stringify(valueToStore));\n}\n\nexport const useRememberState = () => {\n const { state } = useStateValue();\n const loginState = state?.login?.login;\n\n const isInitialMount = useRef(true);\n const objectToPersist = removePropertiesNotSpecified(propertiesToStore, state);\n\n // Don't persist login details if rememberContact isn't checked\n if (loginState?.rememberContact !== undefined && !loginState.rememberContact) {\n const loginToPersist = objectToPersist?.login?.login;\n\n if (loginToPersist?.contact !== undefined) {\n loginToPersist.contact = \"\";\n loginToPersist.isValid = true;\n loginToPersist.hasBeenValidated = false;\n loginToPersist.displayMemberNumberForm = false;\n }\n\n if (loginToPersist?.memberNumber?.memberNumber !== undefined) {\n loginToPersist.memberNumber.memberNumber = \"\";\n loginToPersist.memberNumber.isValid = true;\n loginToPersist.memberNumber.hasBeenValidated = false;\n }\n }\n\n useEffect(() => {\n if (isInitialMount.current) {\n isInitialMount.current = false;\n } else {\n setLocalStorage(objectToPersist);\n }\n }, [objectToPersist]);\n};\n\nconst removePropertiesNotSpecified = (propertiesToStore, stateToStore) => {\n const filteredState: Partial = {};\n\n if (!stateToStore) return filteredState;\n\n for (let key in propertiesToStore) {\n if (typeof propertiesToStore[key] === \"object\") {\n filteredState[key] = removePropertiesNotSpecified(propertiesToStore[key], stateToStore[key]);\n } else {\n if (stateToStore[key] !== undefined) {\n filteredState[key] = stateToStore[key];\n }\n }\n }\n return filteredState;\n};\n\nconst propertiesToStore = {\n login: {\n login: {\n contact: true,\n rememberContact: true,\n previousContactType: true,\n displayMemberNumberForm: true,\n isValid: true,\n hasBeenValidated: true,\n lastPasswordlessStartSuccessResultTime: true,\n memberNumber: {\n memberNumber: true,\n isValid: true,\n hasBeenValidated: true,\n },\n },\n },\n};\n","export const dateNow = Date.now;\n","export const memberNumberDisplayStates = {\n ON: \"On\",\n OFF: \"Off\",\n};\n\nexport const memberNumberTealiumLabel = \"login-with-member-contact-next-with-difficulties\";\n","import * as actionTypes from \"../actions/actionTypes\";\nimport { dateNow } from \"../../util/dateUtils\";\nimport { memberNumberDisplayStates } from \"../constants\";\nimport { ContactType, LoginState, MemberNumberState, OTPState } from \"../../initialState\";\nimport { BaseAction } from \"../../StateManagement/reducer\";\n\nexport interface LoginAction extends BaseAction {\n contact: string;\n rememberContact: boolean;\n isValid: boolean;\n displayMemberNumberForm: boolean;\n hasBeenValidated: boolean;\n validationMessage: string;\n alertType: string;\n title: string;\n message: string;\n memberNumberState: MemberNumberState;\n memberNumber: string;\n previousType: ContactType;\n}\n\nexport interface OTPAction extends BaseAction {\n code: string;\n isValid: boolean;\n hasBeenValidated: boolean;\n validationMessage: string;\n alertType: string;\n title: string;\n message: string;\n}\n\nfunction shouldAddState(currentState: boolean, newState: boolean, stateArray: string[]): string[] {\n if (currentState !== newState) {\n const modArray = [\n ...stateArray,\n newState ? memberNumberDisplayStates.ON : memberNumberDisplayStates.OFF,\n ];\n return modArray;\n }\n\n return stateArray;\n}\n\nconst contactLoginReducer = (state: LoginState, action: LoginAction): LoginState => {\n switch (action.type) {\n case actionTypes.UPDATE_CONTACT:\n return {\n ...state,\n contact: action.contact,\n isValid: action.isValid,\n hasBeenValidated: false,\n lastPasswordlessStartSuccessResultTime: undefined,\n displayMemberNumberForm: action.displayMemberNumberForm,\n displayMemberNumberStates: shouldAddState(\n state.displayMemberNumberForm,\n action.displayMemberNumberForm,\n state.displayMemberNumberStates,\n ),\n };\n case actionTypes.UPDATE_REMEMBER_CONTACT:\n return {\n ...state,\n rememberContact: action.rememberContact,\n // This is required to reset the 'don't send again within 5 mins' otp limit imposed by shouldPasswordlessCallBeSkipped(..).\n // Normally when login details change it is reset but when the rememberContact checkbox\n // is unchecked no login details are changed and so the otp time limit is not reset.\n lastPasswordlessStartSuccessResultTime: undefined,\n };\n case actionTypes.VALIDATE_FORM:\n return {\n ...state,\n hasBeenValidated: action.hasBeenValidated,\n isValid: action.isValid,\n validationMessage: action.validationMessage,\n };\n case actionTypes.SHOW_ALERT:\n return {\n ...state,\n contactSendingInProgress: false,\n alert: {\n type: action.alertType,\n title: action.title,\n message: action.message,\n },\n };\n case actionTypes.START_CONTACT_SENDING:\n return {\n ...state,\n memberNumber: action.memberNumberState,\n contactSendingInProgress: true,\n };\n case actionTypes.COMPLETE_CONTACT_SENDING:\n return {\n ...state,\n contactSendingInProgress: false,\n lastPasswordlessStartSuccessResultTime: dateNow(),\n };\n\n case actionTypes.CLEAR_ALERTS:\n return {\n ...state,\n alert: {},\n };\n case actionTypes.ACCOUNT_BLOCKED:\n return {\n ...state,\n lastPasswordlessStartSuccessResultTime: undefined,\n };\n\n case actionTypes.UPDATE_MEMBER_NUMBER:\n return {\n ...state,\n memberNumber: {\n ...state.memberNumber,\n memberNumber: action.memberNumber,\n isValid: action.isValid,\n hasBeenValidated: false,\n },\n lastPasswordlessStartSuccessResultTime: undefined,\n };\n case actionTypes.MEMBER_NUMBER_VALIDATE_INPUT:\n return {\n ...state,\n memberNumber: {\n ...state.memberNumber,\n hasBeenValidated: action.hasBeenValidated,\n validationMessage: action.validationMessage,\n },\n };\n case actionTypes.SET_CONTACT_TYPE:\n return {\n ...state,\n previousContactType: action.previousType,\n };\n\n default:\n return state;\n }\n};\nconst otpReducer = (state: OTPState, action: OTPAction): OTPState => {\n switch (action.type) {\n case actionTypes.UPDATE_CONTACT_CODE:\n return {\n ...state,\n code: action.code,\n isValid: action.isValid,\n };\n case actionTypes.VALIDATE_OTP_FORM:\n return {\n ...state,\n hasBeenValidated: action.hasBeenValidated,\n validationMessage: action.validationMessage,\n };\n case actionTypes.ACCOUNT_BLOCKED:\n case actionTypes.OTP_SHOW_ALERT:\n return {\n ...state,\n verifying: false,\n code: \"\",\n hasBeenValidated: false,\n alert: {\n type: action.alertType,\n title: action.title,\n message: action.message,\n },\n };\n case actionTypes.OTP_START_VERIFICATION:\n return {\n ...state,\n verifying: true,\n };\n case actionTypes.OTP_COMPLETE_VERIFICATION:\n return {\n ...state,\n verifying: false,\n };\n case actionTypes.WRONG_CODE:\n return {\n ...state,\n hasBeenValidated: true,\n isValid: false,\n validationMessage: action.message,\n verifying: false,\n };\n case actionTypes.CLEAR_ALERTS:\n return {\n ...state,\n alert: {},\n };\n default:\n return state;\n }\n};\n\nexport const loginReducer = (\n state: { login: LoginState; otp: OTPState },\n action: BaseAction,\n): {\n login: LoginState;\n otp: OTPState;\n} => {\n return {\n otp: otpReducer(state.otp, action as OTPAction),\n login: contactLoginReducer(state.login, action as LoginAction),\n };\n};\n","export const UPDATE_CONTACT = \"UPDATE-CONTACT\";\nexport const UPDATE_REMEMBER_CONTACT = \"UPDATE_REMEMBER_CONTACT\";\nexport const VALIDATE_FORM = \"VALIDATE-FORM\";\nexport const SHOW_ALERT = \"SHOW-ALERT\";\nexport const SHOW_ERROR = \"SHOW-ERROR\";\nexport const WRONG_CODE = \"WRONG_CODE\";\nexport const ACCOUNT_BLOCKED = \"ACCOUNT_BLOCKED\";\nexport const START_CONTACT_SENDING = \"START_CONTACT_SENDING\";\nexport const COMPLETE_CONTACT_SENDING = \"COMPLETE_CONTACT_SENDING\";\nexport const UPDATE_CONTACT_CODE = \"UPDATE-CONTACT-CODE\";\n\nexport const OTP_SHOW_ALERT = \"SHOW-OTP-ALERT\";\nexport const VALIDATE_OTP_FORM = \"VALIDATE-OTP-FORM\";\nexport const OTP_SHOW_ERROR = \"SHOW-OTP-ERROR\";\nexport const OTP_START_VERIFICATION = \"START_CONTACT_VERIFICATION\";\nexport const OTP_COMPLETE_VERIFICATION = \"COMPLETE_CONTACT_VERIFICATION\";\n\nexport const CLEAR_ALERTS = \"CLEAR-ALERTS\";\n\nexport const UPDATE_MEMBER_NUMBER = \"UPDATE-MEMBER-NUMBER\";\nexport const MEMBER_NUMBER_VALIDATE_INPUT = \"MEMBER-NUMBER-VALIDATE-INPUT\";\n\nexport const SET_CONTACT_TYPE = \"SET-CONTACT-TYPE\";\n","import { BaseAction } from \"../StateManagement/reducer\";\nimport * as actionTypes from \"./actions/actionTypes\";\n\nexport const contactUsReducer = (\n state: {\n showComponent: boolean;\n },\n action: BaseAction,\n) => {\n switch (action.type) {\n case actionTypes.SHOW_CONTACT_US_COMPONENT:\n return {\n ...state,\n showComponent: true,\n };\n case actionTypes.HIDE_CONTACT_US_COMPONENT:\n return {\n ...state,\n showComponent: false,\n };\n default:\n return state;\n }\n};\n","export const SHOW_CONTACT_US_COMPONENT = \"GLOBAL/SHOW-CONTACT-US-COMPONENT\";\nexport const HIDE_CONTACT_US_COMPONENT = \"GLOBAL/HIDE-CONTACT-US-COMPONENT\";\n","import { loginReducer } from \"../Login/reducer/loginReducer\";\nimport { contactUsReducer } from \"../ContactUs/reducer\";\nimport { State } from \"../initialState\";\n\nexport interface BaseAction {\n type: string;\n}\n\nexport const reducer = (state: State, action: BaseAction): State => {\n return {\n login: loginReducer(state.login, action),\n contactUsFlow: contactUsReducer(state.contactUsFlow, action),\n };\n};\n","import React, { createContext, useReducer, useContext } from \"react\";\nimport { useRememberState } from \"./LocalStorageService\";\nimport { reducer } from \"./reducer\";\nimport { State } from \"../initialState\";\n\nconst GlobalStateContext = createContext(\n {} as {\n state: State;\n dispatch: React.Dispatch;\n },\n);\n\nexport const GlobalStateProvider = ({\n initialState,\n children,\n}: {\n initialState: State;\n children: JSX.Element | JSX.Element[];\n}): JSX.Element => {\n const [state, dispatch] = useReducer(reducer, initialState);\n return (\n \n {children}\n \n );\n};\n\nconst WithRememberState = ({\n children,\n}: {\n children: JSX.Element | JSX.Element[];\n}): JSX.Element => {\n useRememberState();\n return <>{children};\n};\n\nexport const useStateValue = () => useContext(GlobalStateContext);\n","const kaos = \"KAOS\";\nconst prod = \"PROD\";\nexport const appForClient = (stage: string = \"KAOS\", clientId: string = \"\"): string | undefined => {\n const app = apps.find(\n (x) => x.stage === stage.toUpperCase().trim() && x.clientId === clientId.trim(),\n );\n return app ? app.appName : undefined;\n};\n\nexport const appNames = {\n nibOnlineServicesWeb: \"nibOnlineServicesWeb\",\n nibOnlineServicesWebTest: \"nibOnlineServicesWebTest\",\n apiaOnlineServicesWeb: \"apiaOnlineServicesWeb\",\n suncorpOnlineServicesWeb: \"suncorpOnlineServicesWeb\",\n};\n\nconst apps = [\n {\n stage: kaos,\n appName: appNames.nibOnlineServicesWeb,\n clientId: \"V1VC0ZttnpII2e1SU2jmWqc6wftcnvcl\",\n },\n {\n stage: kaos,\n appName: appNames.nibOnlineServicesWeb,\n clientId: \"fd6Im10KA7A3V6IJm1bk64YTOwJ23og9\",\n },\n {\n stage: kaos,\n appName: appNames.apiaOnlineServicesWeb,\n clientId: \"NO4BCaqRtp5k2S268xrOHuES5vtMm7qv\",\n },\n {\n stage: kaos,\n appName: appNames.suncorpOnlineServicesWeb,\n clientId: \"KYOqWxDsh4DSbg7K3GbNUq6wQwlzZ7VB\",\n },\n {\n stage: prod,\n appName: appNames.nibOnlineServicesWeb,\n clientId: \"bEmn1GzPj5Lq9gsBXcRW2QBnVAAznGVG\",\n },\n {\n stage: prod,\n appName: appNames.apiaOnlineServicesWeb,\n clientId: \"03dDlS3Vbpk4QrBHSQcpbJw6VodKrH93\",\n },\n {\n stage: prod,\n appName: appNames.suncorpOnlineServicesWeb,\n clientId: \"yxXVO30qd3wdS3qx5sk9eXysvdTp0OyT\",\n },\n];\n","const brandNamesToBrand = {\n nib: \"nib\",\n gu: \"GU Health\",\n cignagu: \"Cigna Australia by GU Health\",\n apia: \"Apia\",\n suncorp: \"Suncorp\",\n ing: \"ING Health Insurance\",\n priceline: \"Priceline Health Insurance\",\n qantas: \"Qantas Health Insurance\",\n aami: \"AAMI Health Insurance\",\n};\n\nconst brandDomainsToBrand = {\n kaos: {\n nib: \"my.nib-cf-test.com\",\n gu: \"guhealth-test.com\",\n cignagu: \"cigna.guhealth-test.com\",\n apia: \"health-test.apia.com.au\",\n suncorp: \"health-test.suncorp.com.au\",\n ing: \"health-test.ing.com.au\",\n priceline: \"health-test.priceline.com.au\",\n aami: \"health-test.aami.com.au\",\n qantas: \"health.stage.insurance.qantas.com\",\n },\n prod: {\n nib: \"my.nib.com.au\",\n gu: \"guhealth.com.au\",\n cignagu: \"cigna.guhealth.com.au\",\n apia: \"health.apia.com.au\",\n suncorp: \"health.suncorp.com.au\",\n ing: \"health.ing.com.au\",\n priceline: \"health.priceline.com.au\",\n },\n};\n\nexport const brandNameForBrand = (brand: string): string => {\n return brandNamesToBrand[brand];\n};\n\nexport const brandDomainsForBrand = (brand: string, stage: string): string => {\n return brandDomainsToBrand[stage.toLowerCase()][brand.toLowerCase()];\n};\n","type EnablePhoneNumberAuthStatesType = {\n on: string;\n off: string;\n silent: string;\n};\n\nconst enablePhoneNumberAuthStates: EnablePhoneNumberAuthStatesType = {\n on: \"on\",\n off: \"off\",\n silent: \"silent\",\n};\n\nexport class EnablePhoneNumberAuthFeatureFlag {\n setting: string;\n constructor(setting: string) {\n this.setting = setting.toLowerCase();\n }\n isOn() {\n return this.setting === enablePhoneNumberAuthStates.on;\n }\n isOff() {\n return this.setting === enablePhoneNumberAuthStates.off;\n }\n isSilent() {\n return this.setting === enablePhoneNumberAuthStates.silent;\n }\n}\n","import React, { createContext, useContext } from \"react\";\nimport { appForClient } from \"./util/appMapping\";\nimport qs from \"querystring\";\nimport { brandNameForBrand, brandDomainsForBrand } from \"./util/brandMappings\";\nimport { EnablePhoneNumberAuthFeatureFlag } from \"./util/featureFlagUtils\";\n\nlet searchQuery = window.location.search;\n\nif (searchQuery[0] === \"?\") {\n searchQuery = searchQuery.slice(1, searchQuery.length);\n}\n\nif (searchQuery[searchQuery.length - 1] === \"/\") {\n searchQuery = searchQuery.slice(0, -1);\n}\nconst brand = process.env.REACT_APP_BRAND || \"nib\";\nconst tenant = process.env.REACT_APP_TENANT || \"no_tenant_provided\";\n\nconst queryParams = qs.parse(searchQuery);\nconst nonce = queryParams.nonce as string | undefined;\nconst state = queryParams.state as string | undefined;\nconst domain = process.env.REACT_APP_AUTH_DOMAIN as string;\nconst redirectUri = queryParams.redirect_uri as string | undefined;\nconst clientID = Array.isArray(queryParams.client)\n ? queryParams.client[0]\n : (queryParams.client as string);\nconst audience = queryParams.audience as string | undefined;\nconst scope = queryParams.scope as string | undefined;\nconst responseType = queryParams.response_type as string | undefined;\nconst handOffNonce = queryParams.handOffNonce as string | undefined;\n\nconst contactUsUrl = \"https://www.guhealth.com.au/contact-us\";\n\nconst language = \"english\";\n\nconst currentApp = appForClient(process.env.REACT_APP_STAGE, clientID);\n\nconst enablePhoneNumberAuth = process.env.REACT_APP_ENABLE_PHONE_NUMBER_AUTH || \"off\";\nconst featureFlags = {\n enablePhoneNumberAuth: new EnablePhoneNumberAuthFeatureFlag(enablePhoneNumberAuth),\n};\nconst brandName = brandNameForBrand(brand);\nexport const stage = process.env.REACT_APP_STAGE || \"kaos\";\nconst assetBaseUrl = process.env.REACT_APP_ASSET_BASE_URL as string;\nconst needHelpUrl = `https://${brandDomainsForBrand(brand, stage)}/need-some-help`;\n\nexport type AppConfiguration = {\n domain: string;\n clientID: string;\n responseType?: string;\n redirectUri?: string;\n scope?: string;\n audience?: string;\n state?: string;\n tenant?: string;\n nonce?: string;\n contactUsUrl: string;\n language: string;\n brand: string;\n currentApp?: string;\n brandName: string;\n needHelpUrl: string;\n isProd: boolean;\n assetBaseUrl: string;\n featureFlags: {\n enablePhoneNumberAuth: EnablePhoneNumberAuthFeatureFlag;\n };\n isSingleSignOn: boolean;\n};\n\nconst appConfiguration: AppConfiguration = {\n tenant,\n nonce,\n state,\n redirectUri,\n clientID,\n audience,\n domain,\n scope,\n responseType,\n contactUsUrl,\n language,\n brand,\n currentApp,\n brandName,\n needHelpUrl,\n isProd: stage === \"prod\",\n assetBaseUrl,\n featureFlags,\n isSingleSignOn: handOffNonce ? true : false,\n};\n\nconst ConfigContext = createContext(appConfiguration);\n\nexport const ConfigProvider = ({\n children,\n}: {\n children: JSX.Element | JSX.Element[];\n}): JSX.Element => (\n {children}\n);\n\nexport const useConfig = (): AppConfiguration => useContext(ConfigContext);\n","import Theme, {\n nib,\n gu,\n gu as cignagu,\n suncorp,\n apia,\n colorLightest,\n ing,\n priceline,\n aami,\n qantas,\n} from \"@nib-components/theme\";\nimport { NibFonts } from \"@nib/fonts\";\nimport Grid from \"styled-components-grid\";\nimport Container from \"@nib-components/container\";\nimport breakpoint from \"styled-components-breakpoint\";\nimport React from \"react\";\nimport styled from \"styled-components\";\n\nconst Colordiv = styled.div`\n ${breakpoint(\"md\")`\n background-color: ${colorLightest};\n `}\n background-image:${(props) => (props.isProd ? \"\" : `url(${props.assetBaseUrl}/kaos-badge.png)`)};\n background-repeat: no-repeat;\n background-size: 42px;\n background-position: center top;\n border-top: ${(props) => (props.isProd ? \"\" : \"4px solid #F00\")};\n`;\n\ntype LoginPageContainerProps = {\n children?: JSX.Element | JSX.Element[];\n brand: string;\n isProd?: boolean;\n assetBaseUrl?: string;\n padding?: any;\n};\n\nconst themes = {\n nib,\n \"nib-iap\": nib,\n \"nib-health-services\": nib,\n gu,\n cignagu,\n suncorp,\n apia,\n ing,\n iap: nib,\n priceline,\n aami,\n qantas,\n};\n\nexport const LoginPageContainer = ({\n children,\n brand,\n isProd,\n assetBaseUrl,\n padding = 0,\n}: LoginPageContainerProps): JSX.Element => (\n
\n \n \n \n \n \n {children}\n \n \n \n \n
\n);\n","import styled from \"styled-components\";\nimport Link from \"@nib-components/link\";\n\nexport const LinkButton = styled(Link).attrs({ component: \"button\" })`\n appearance: none;\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n`;\n","import { useStateValue } from \"../../StateManagement\";\nimport * as actionTypes from \"./actionTypes\";\n\nexport const useActionCreator = () => {\n const { dispatch } = useStateValue();\n\n return {\n showContactUsComponent: () => {\n dispatch({\n type: actionTypes.SHOW_CONTACT_US_COMPONENT,\n });\n },\n\n hideContactUsComponent: () => {\n dispatch({\n type: actionTypes.HIDE_CONTACT_US_COMPONENT,\n });\n },\n };\n};\n","type EnglishTextConstants = {\n contactUsModalTitle: string;\n contactUsDomesticText: string;\n contactUsInternationalText: string;\n contactUsLinkText: string;\n};\n\nconst englishTextConstants: EnglishTextConstants = {\n //Contact us modal\n contactUsModalTitle: \"Contact us\",\n contactUsDomesticText: \"Inside Australia\",\n contactUsInternationalText: \"Outside Australia\",\n\n //Contact us link\n contactUsLinkText: \"Contact Us\",\n};\n\ntype BrandContactNumbers = {\n contactUsDomesticNumber: string;\n domesticNumberText: string;\n contactUSInternationalNumber: string;\n internationalNumberText: string;\n};\n\nconst brandContactNumbers = (brand?: string): BrandContactNumbers => {\n switch (brand) {\n case \"gu\":\n return {\n contactUsDomesticNumber: \"tel:1800249966\",\n domesticNumberText: \"1800 249 966\",\n contactUSInternationalNumber: \"tel:+61296924438\",\n internationalNumberText: \"+61 2 9692 4438\",\n };\n case \"cignagu\":\n return {\n contactUsDomesticNumber: \"tel:1800124214\",\n domesticNumberText: \"1800 124 214\",\n contactUSInternationalNumber: \"tel:+61296924436\",\n internationalNumberText: \"+61 2 9692 4436\",\n };\n case \"nib\":\n default:\n return {\n contactUsDomesticNumber: \"tel:131642\",\n domesticNumberText: \"13 16 42\",\n contactUSInternationalNumber: \"tel:+61296924300\",\n internationalNumberText: \"+61 2 9692 4300\",\n };\n }\n};\n\ntype ContactUsConstants = EnglishTextConstants & BrandContactNumbers;\n\nexport const contactUsConstants = (language: string, brand: string): ContactUsConstants => {\n switch (language) {\n case \"english\":\n return {\n ...englishTextConstants,\n ...brandContactNumbers(brand),\n };\n default:\n return {\n ...englishTextConstants,\n ...brandContactNumbers(brand),\n };\n }\n};\n","import React from \"react\";\nimport { LinkButton } from \"../components/LinkButtonComponent\";\nimport { useActionCreator } from \"./actions/actionCreator\";\nimport { contactUsConstants } from \"./dataConstants\";\nimport { useConfig } from \"../ConfigProvider\";\n\ntype ContactUsLinkProps = {\n id: string;\n toLower?: boolean;\n};\n\nexport const ContactUsLink = ({ id, toLower }: ContactUsLinkProps): JSX.Element => {\n const action = useActionCreator();\n const config = useConfig();\n const constants = contactUsConstants(config.language, config.brand);\n\n return (\n \n {toLower ? constants.contactUsLinkText.toLowerCase() + \".\" : constants.contactUsLinkText}\n \n );\n};\n","import React from \"react\";\n\nimport { Margin } from \"styled-components-spacing\";\nimport Grid from \"styled-components-grid\";\nimport Copy, { Bold } from \"@nib-components/copy\";\nimport Link from \"@nib-components/link\";\n\nimport { contactUsConstants } from \"./dataConstants\";\nimport { useConfig } from \"../ConfigProvider\";\n\nexport const ContactPhoneNumberDisplay = (): JSX.Element => {\n const config = useConfig();\n const constants = contactUsConstants(config.language, config.brand);\n return (\n \n \n \n \n {constants.contactUsDomesticText}\n \n \n \n \n {constants.domesticNumberText}\n \n \n \n\n \n \n \n \n {constants.contactUsInternationalText}\n \n \n \n \n {constants.internationalNumberText}\n \n \n \n \n \n );\n};\n","import React from \"react\";\n\nimport Modal from \"@nib-components/modal\";\nimport breakpoint from \"styled-components-breakpoint\";\nimport { useActionCreator } from \"./actions/actionCreator\";\nimport styled from \"styled-components\";\nimport { contactUsConstants } from \"./dataConstants\";\nimport { useConfig } from \"../ConfigProvider\";\nimport { useStateValue } from \"../StateManagement\";\nimport { ContactPhoneNumberDisplay } from \"./ContactPhoneNumberDisplay\";\n\n//If modal height is greater than the view height, then this will cause issues\nconst DockModalAtBottom = styled(Modal)`\n ${breakpoint(\"xs\", \"md\")`\n align-items: flex-end;\n `}\n`;\n\nexport const ContactUsComponent = (): JSX.Element => {\n const actionCreator = useActionCreator();\n const config = useConfig();\n const constants = contactUsConstants(config.language, config.brand);\n const { state } = useStateValue();\n return (\n \n \n \n );\n};\n","const english = {\n RESTART_AUTH_FLOW_LINK: \"Enter your mobile number or email again\",\n};\n\nexport const componentConstants = (language?: string) => {\n switch (language) {\n case \"english\":\n return english;\n default:\n return english;\n }\n};\n","import React from \"react\";\nimport Alert from \"@nib-components/alert\";\nimport Link from \"@nib-components/link\";\nimport { Link as ReactRouterLink } from \"react-router-dom\";\nimport { useConfig } from \"../ConfigProvider\";\nimport { ContactUsLink, ContactUsComponent } from \"../ContactUs\";\nimport { componentConstants } from \"./dataConstants\";\n\ntype AlertTypes = \"error\" | \"success\" | \"info\" | \"warning\";\n\nexport type AlertComponentProps = {\n title?: string;\n message?: string;\n type?: string;\n};\n\nexport const AlertComponent = ({\n title,\n message,\n type,\n}: AlertComponentProps): JSX.Element | null => {\n const config = useConfig();\n const constants = componentConstants(config.language);\n\n return type ? (\n
\n \n \n
\n {message} \n {type === \"blocked\" ? (\n \n {constants.RESTART_AUTH_FLOW_LINK}\n \n ) : type !== \"success\" ? (\n \n ) : null}\n
\n
\n
\n ) : null;\n};\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport Form from \"@nib-components/form\";\nimport { colorWhite } from \"@nib-components/theme\";\nimport { p } from \"styled-components-spacing\";\n\nconst NoBorder = styled(Form)`\n border: 0px;\n width: 100%;\n background: ${colorWhite};\n ${p(0)}\n`;\n\ntype NoBorderFormProps = {\n children: any;\n [x: string]: any;\n};\n\nexport const NoBorderForm = ({ children, ...props }: NoBorderFormProps): JSX.Element => (\n \n {children}\n \n);\n","import React from \"react\";\nimport TextBox from \"@nib-components/textbox\";\nimport styled from \"styled-components\";\nimport { colorLightest } from \"@nib-components/theme\";\nimport FormControl from \"@nib-components/form-control\";\n\nconst NoSpinnerBox = styled(TextBox)`\n background-color: ${colorLightest};\n ::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n ::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n`;\nconst InputBox = NoSpinnerBox;\n\ntype TextBoxComponentProps = {\n id?: string;\n name?: string;\n valid?: boolean;\n validated?: boolean;\n label?: string;\n error?: string;\n help?: any;\n dataTestid?: any;\n onChange?: any;\n onBlur?: any;\n value?: any;\n autoFocus?: any;\n disabled?: boolean;\n [x: string]: any;\n};\n\nexport const TextBoxComponent = ({\n id,\n name,\n valid,\n validated,\n label = \"\",\n error,\n help,\n dataTestid,\n onChange,\n onBlur,\n value,\n autoFocus,\n disabled,\n ...otherTextBoxProps\n}: TextBoxComponentProps): JSX.Element => {\n return (\n
\n \n onBlur(e)}\n autoFocus={autoFocus}\n {...otherTextBoxProps}\n />\n \n
\n );\n};\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { Margin, py, px } from \"styled-components-spacing\";\nimport Heading from \"@nib-components/heading\";\nimport breakpoint from \"styled-components-breakpoint\";\nimport { useConfig } from \"../ConfigProvider\";\n\nconst HeaderEl = styled.header`\n ${py(6)};\n ${px(5)};\n // On subsequent screen email is displayed in the header, we want to kepp form postion the same\n min-height: 130px;\n\n ${breakpoint(\"md\")`\n min-height: 0px;\n `}\n`;\n\ntype HeaderProps = {\n title?: string;\n children: JSX.Element | JSX.Element[];\n};\n\nconst Header = ({ title, children }: HeaderProps): JSX.Element => {\n const config = useConfig();\n\n return (\n \n \n \n {title}\n \n \n {children}\n \n );\n};\n\nexport default Header;\n","import React from \"react\";\nimport { LoginPageContainer } from \".\";\nimport styled from \"styled-components\";\nimport breakpoint from \"styled-components-breakpoint\";\n\nconst Wrapper = styled.div`\n display: flex;\n flex-direction: column;\n min-height: 100vh;\n justify-content: space-around;\n ${breakpoint(\"md\")`\n justify-content: center;\n `}\n`;\n\ntype LayoutProps = {\n brand: string;\n children?: JSX.Element | JSX.Element[];\n isProd?: boolean;\n assetBaseUrl?: string;\n padding?: any;\n};\n\nconst Layout = ({ brand, children, isProd, assetBaseUrl, padding }: LayoutProps) => (\n
\n \n {children}\n \n
\n);\n\nexport default Layout;\n","import breakpoint from \"styled-components-breakpoint\";\nimport styled from \"styled-components\";\nimport Copy from \"@nib-components/copy\";\n\nconst CopyElement = styled(Copy)`\n ${breakpoint(\"md\")`\n font-size: 1.125rem;\n `}\n`;\n\nexport default CopyElement;\n","import React from \"react\";\nimport { Box } from \"@nib/layout\";\n\ntype DisplayBorderProps = {\n children: JSX.Element | JSX.Element[];\n requireShadow?: boolean;\n};\n\nexport const DisplayBorder = ({\n children,\n requireShadow = true,\n}: DisplayBorderProps): JSX.Element => (\n \n {children}\n \n);\n","import styled from \"styled-components\";\nimport { mb } from \"styled-components-spacing\";\nimport { PrimaryButton } from \"@nib-components/button\";\nexport const NoSpacingPrimaryButton = styled(PrimaryButton)`\n ${mb(0)}\n`;\n","import React from \"react\";\nimport Checkbox from \"@nib-components/checkbox\";\nimport FormControl from \"@nib-components/form-control\";\n\ntype CheckboxComponentProps = {\n id?: string;\n name?: string;\n label?: string;\n text?: string;\n error?: string;\n help?: any;\n dataTestid?: any;\n onChange?: any;\n disabled?: boolean;\n checked: boolean;\n};\n\nexport const CheckboxComponent = (props: CheckboxComponentProps): JSX.Element => {\n const {\n id,\n name,\n label = \"\",\n text = \"\",\n error,\n help,\n dataTestid,\n onChange,\n disabled,\n checked,\n } = props;\n\n return (\n
\n \n \n \n
\n );\n};\n","/* eslint-disable no-undef */\nexport type CustomTealiumEventType = {\n name: string;\n label: string;\n};\n\ntype WindowWithUtag = Window &\n typeof globalThis & {\n utag?: any;\n };\n\nexport const fireCustomTealiumEvent = ({ name, label }: CustomTealiumEventType): void => {\n //tealium is blocked by adblockers, hence utag will be undefined\n return (window as WindowWithUtag).utag?.link({\n content_id: `${name}-${label}`,\n tealium_event: name,\n event_label: label,\n });\n};\n","import { EnablePhoneNumberAuthFeatureFlag } from \"../util/featureFlagUtils\";\n\nexport type BaseConfigForLanguage = {\n COMMON_ISSUES_HEADING: string;\n COMMON_ISSUES: {\n CORRECT_DETAILS: string;\n CODE_IN_SPAM?: string | undefined;\n RECENT_CODE: string;\n };\n\n NEED_MORE_HELP: string;\n IAP_NEED_MORE_HELP: string;\n};\n\nexport const componentConstants = ({\n language,\n featureFlags,\n}: {\n language: string;\n featureFlags: { enablePhoneNumberAuth: EnablePhoneNumberAuthFeatureFlag };\n}): BaseConfigForLanguage => {\n return baseConfigForLanguage(language, featureFlags.enablePhoneNumberAuth);\n};\n\nconst baseConfigForLanguage = (\n language: string,\n enablePhoneNumberAuth: EnablePhoneNumberAuthFeatureFlag,\n): BaseConfigForLanguage => {\n const commonIssues = !enablePhoneNumberAuth.isOn()\n ? {\n CORRECT_DETAILS: \"Did you type your email address correctly?\",\n CODE_IN_SPAM: \"Did your verification code go to your junk or spam folder?\",\n RECENT_CODE: \"Are you using the most recent verification code you received?\",\n }\n : {\n CORRECT_DETAILS: \"Did you type your mobile number or email address correctly?\",\n RECENT_CODE: \"Are you using the most recent verification code you received?\",\n };\n\n switch (language) {\n default:\n case \"english\": {\n return {\n COMMON_ISSUES_HEADING: \"Here are a few common issues to check...\",\n COMMON_ISSUES: commonIssues,\n NEED_MORE_HELP: \"Need more help?\",\n IAP_NEED_MORE_HELP: \"Please contact your account manager for assistance\",\n };\n }\n }\n};\n","import React from \"react\";\nimport Link from \"@nib-components/link\";\nimport Modal from \"@nib-components/modal\";\nimport Copy from \"@nib-components/copy\";\nimport { Margin } from \"styled-components-spacing\";\n\nimport { useConfig } from \"../ConfigProvider\";\nimport { componentConstants } from \"./constants\";\n\nexport type WheresMyCodeProps = {\n onClose?: () => void;\n showHelp: boolean;\n};\n\nexport const WheresMyCode = ({ onClose, showHelp }: WheresMyCodeProps): JSX.Element => {\n const config = useConfig();\n\n const constants = componentConstants(config);\n\n const showNeedMoreHelpLink = config.brand !== \"nib-health-services\";\n return (\n \n {constants.COMMON_ISSUES_HEADING && (\n \n {constants.COMMON_ISSUES_HEADING}\n \n )}\n {constants.COMMON_ISSUES && (\n \n
    \n {Object.keys(constants.COMMON_ISSUES).map((key, index) => {\n return (\n
  • \n {constants.COMMON_ISSUES[key]}\n
  • \n );\n })}\n
\n
\n )}\n {showNeedMoreHelpLink && (\n \n {config.brand !== \"iap\" ? (\n \n {constants.NEED_MORE_HELP}\n \n ) : (\n <>\n {constants.NEED_MORE_HELP && (\n \n {constants.NEED_MORE_HELP}\n \n )}\n {constants.IAP_NEED_MORE_HELP && (\n
    \n
  • \n {constants.IAP_NEED_MORE_HELP}\n
  • \n
\n )}\n \n )}\n
\n )}\n \n );\n};\n","import { AppConfiguration } from \"../ConfigProvider\";\n\nconst emailRegex = /^[\\w-.]+([+]?)+([\\w-.]?)+@([\\w-]+\\.)+[\\w-]*$/;\nconst phoneNumberRegex = /^(\\+61|0)\\s*(4|5)(\\s*\\d){8}$/;\nconst codeRegex = /^\\d{6}$/;\nconst numberRegex = /^\\d{8}$/;\n\nconst validateContact = (contact: string, config: AppConfiguration): boolean => {\n const validators = [emailRegex];\n if (\n config.featureFlags?.enablePhoneNumberAuth &&\n !config.featureFlags.enablePhoneNumberAuth.isOff()\n ) {\n validators.push(phoneNumberRegex);\n }\n const validContact = validators.reduce((valid, validator) => {\n return valid || validator.test(contact);\n }, false);\n return validContact;\n};\n\nconst validateCode = (code: string): boolean => {\n if (codeRegex.test(code)) {\n return true;\n }\n\n return false;\n};\n\nconst validateMemberNumber = (memberNumber: string): boolean => {\n if (numberRegex.test(memberNumber)) {\n return true;\n }\n\n return false;\n};\n\nexport { validateContact, validateCode, validateMemberNumber };\n","import { EnablePhoneNumberAuthFeatureFlag } from \"../util/featureFlagUtils\";\n\nexport type Content = {\n SUBMIT_BUTTON_TEXT: string;\n SYSTEM_ERROR_ALERT_TITLE: string;\n SYSTEM_ERROR_ALERT_MESSAGE: string;\n ENTER_MEMBER_NUMBER_TEXTBOX_LABEL: string;\n ENTER_CONTACT_DETAILS_HEADER_TITLE: string;\n ENTER_CODE_HEADER_TITLE: string;\n ENTER_CODE_SUBMIT_BUTTON_LOADING_TEXT: string;\n ENTER_MEMBER_HELP_TEXT: (brand: string) => string;\n ENTER_CONTACT_DETAILS_HEADER_SUBTEXT: string;\n ENTER_CONTACT_DETAILS_TEXTBOX_LABEL: string;\n ENTER_CONTACT_DETAILS_SUBMIT_BUTTON_LOADING_TEXT: string;\n ENTER_CONTACT_DETAILS_VALIDATION_MESSAGE: string;\n REMEMBER_CONTACT_DETAILS_CHECKBOX_LABEL: string;\n REMEMBER_CONTACT_DETAILS_CHECKBOX_TEXT: string;\n HEADER_SUBTEXT_PART_ONE: string;\n HEADER_SUBTEXT_PART_TWO: string;\n ENTER_CODE_TEXTBOX_LABEL: string;\n ENTER_CODE_VALIDATION_MESSAGE: string;\n ENTER_CODE_WRONG_CODE_MESSAGE: string;\n ENTER_CODE_TOO_MANY_ATTEMPTS_ALERT_TITLE: string;\n ENTER_CODE_TOO_MANY_ATTEMPTS_ALERT_MESSAGE: string;\n ENTER_MEMBER_NUMBER_VALIDATION_MESSAGE: string;\n};\n\nexport const passwordlessFlowConstants = ({\n language,\n featureFlags,\n brand,\n isSingleSignOn,\n}: {\n language?: string;\n featureFlags?: any;\n brand?: string;\n isSingleSignOn?: boolean;\n}): Content => {\n const { enablePhoneNumberAuth } = featureFlags;\n return {\n ...baseContent(language),\n ...smsSpecificContent(language, enablePhoneNumberAuth),\n ...brandSpecificContent(language, brand),\n ...addSingleSignOnContent(language, isSingleSignOn),\n };\n};\n\nfunction baseContent(language?: string): Content {\n switch (language) {\n case \"english\":\n return {\n SUBMIT_BUTTON_TEXT: \"Next\",\n SYSTEM_ERROR_ALERT_TITLE: \"This service is currently down\",\n SYSTEM_ERROR_ALERT_MESSAGE:\n \"Some of our services are currently down. We hope to be back up and running soon. Please try again later or\",\n\n //Enter email page\n ENTER_CONTACT_DETAILS_HEADER_TITLE: \"Welcome\",\n ENTER_CONTACT_DETAILS_HEADER_SUBTEXT: \"Please enter the email you use for your policy.\",\n ENTER_CONTACT_DETAILS_TEXTBOX_LABEL: \"Email address\",\n ENTER_CONTACT_DETAILS_SUBMIT_BUTTON_LOADING_TEXT: \"Sending email\",\n\n ENTER_CONTACT_DETAILS_VALIDATION_MESSAGE:\n \"Something doesn't look quite right! Please check it and try again.\",\n\n REMEMBER_CONTACT_DETAILS_CHECKBOX_LABEL: \"Remember my login details\",\n REMEMBER_CONTACT_DETAILS_CHECKBOX_TEXT:\n \"For security purposes, we recommend leaving this box unchecked on public or shared devices\",\n\n //Enter verification code page\n ENTER_CODE_HEADER_TITLE: \"Verify account\",\n HEADER_SUBTEXT_PART_ONE: \"We've sent a verification code to \",\n HEADER_SUBTEXT_PART_TWO: \". Enter the code to log in to your account.\",\n ENTER_CODE_TEXTBOX_LABEL: \"Verification code\",\n ENTER_CODE_SUBMIT_BUTTON_LOADING_TEXT: \"Verifying account\",\n\n ENTER_CODE_VALIDATION_MESSAGE:\n \"Something doesn't look quite right! Please check it and try again.\",\n ENTER_CODE_WRONG_CODE_MESSAGE:\n \"You have entered the wrong code. Please enter the code we sent you.\",\n ENTER_CODE_TOO_MANY_ATTEMPTS_ALERT_TITLE: \"Incorrect login details\",\n ENTER_CODE_TOO_MANY_ATTEMPTS_ALERT_MESSAGE: \"You seem to be having problems logging in.\",\n\n //Enter member number\n ENTER_MEMBER_NUMBER_TEXTBOX_LABEL: \"Member number\",\n ENTER_MEMBER_HELP_TEXT: (brand: string) =>\n `This is the 8-digit number on your ${brand} card.`,\n ENTER_MEMBER_NUMBER_VALIDATION_MESSAGE: `Please enter your 8-digit member number.`,\n };\n default:\n return {} as Content;\n }\n}\n\nfunction smsSpecificContent(\n language?: string,\n enablePhoneNumberAuth?: EnablePhoneNumberAuthFeatureFlag,\n) {\n if (!enablePhoneNumberAuth?.isOn()) {\n return {};\n }\n switch (language) {\n case \"english\":\n return {\n //Enter email page\n ENTER_CONTACT_DETAILS_HEADER_SUBTEXT:\n \"Please enter the mobile number or email address you use for your health insurance policy or GreenPass membership.\",\n ENTER_CONTACT_DETAILS_TEXTBOX_LABEL: \"Mobile number or email address\",\n ENTER_CONTACT_DETAILS_SUBMIT_BUTTON_LOADING_TEXT: \"Sending code\",\n };\n default:\n return {};\n }\n}\n\nfunction englishSpecificContent(brand?: string) {\n switch (brand) {\n case \"nib-health-services\":\n return {\n ENTER_CONTACT_DETAILS_HEADER_SUBTEXT: \"Please enter your email address to log in.\",\n };\n case \"iap\":\n return {\n ENTER_CONTACT_DETAILS_HEADER_TITLE: \"nib Gateway\",\n ENTER_CONTACT_DETAILS_HEADER_SUBTEXT: \"Please enter your email address.\",\n };\n case \"ing\":\n return {\n ENTER_CONTACT_DETAILS_HEADER_SUBTEXT:\n \"Please enter the mobile number or email address you use for your ING Health Insurance policy.\",\n };\n default:\n return {};\n }\n}\n\nfunction brandSpecificContent(language?: string, brand?: string) {\n switch (language) {\n case \"english\":\n return englishSpecificContent(brand);\n default:\n return {};\n }\n}\n\nfunction addSingleSignOnContent(language?: string, isSingleSignOn?: boolean) {\n if (!isSingleSignOn) {\n return {};\n }\n\n switch (language) {\n case \"english\":\n return {\n ENTER_CONTACT_DETAILS_HEADER_TITLE: \"Welcome back\",\n ENTER_CONTACT_DETAILS_HEADER_SUBTEXT: \"From time to time we need you to verify your login\",\n };\n default:\n return {};\n }\n}\n","export function isEmail(contact: string): boolean {\n const emailRegex = /^[\\w-.]+([+]?)+([\\w-.]?)+@([\\w-]+\\.)+[\\w-]/;\n if (emailRegex.test(contact)) {\n return true;\n }\n return false;\n}\nexport function isPhoneNumber(contact: string): boolean {\n const phoneNumberRegex = /^(\\+61|0)(4|5)\\d{8}$/;\n if (phoneNumberRegex.test(contact)) {\n return true;\n }\n return false;\n}\nexport function connectionTypeForContact(contact: string): string {\n // These need to be in a shared location\n if (isEmail(contact)) {\n return \"email\";\n }\n if (isPhoneNumber(contact)) {\n return \"sms\";\n }\n return \"\";\n}\n\nexport function ensurePlus61Format(contact: string): string {\n if (isPhoneNumber(contact) && contact[0] === \"0\") {\n return `+61${contact.slice(1, contact.length)}`;\n }\n return contact;\n}\n\nexport function stripSpaces(contact: string): string {\n return contact.replace(/ /g, \"\"); // replace all spaces with nothing\n}\n\nexport const skipMemberNumberCheck = (brand) => {\n switch (brand) {\n case \"nib-health-services\":\n return true;\n default:\n return false;\n }\n};\n","export enum ContactType {\n NONE = \"NO-CONTACT-TYPE\",\n EMAIL = \"EMAIL-CONTACT-TYPE\",\n PHONE = \"PHONE-CONTACT-TYPE\",\n}\n\nexport type MemberNumberState = {\n memberNumber: string;\n isValid: boolean;\n hasBeenValidated: boolean;\n validationMessage: string;\n};\n\nexport type LoginState = {\n contact: string;\n rememberContact: boolean;\n previousContactType: ContactType;\n isValid: boolean;\n hasBeenValidated: boolean;\n validationMessage: string;\n contactSendingInProgress: boolean;\n lastPasswordlessStartSuccessResultTime?: number;\n alert: {\n type?: string;\n message?: string;\n title?: string;\n };\n displayMemberNumberForm: boolean;\n displayMemberNumberStates: string[];\n memberNumber: MemberNumberState;\n};\n\nexport type OTPState = {\n code: string;\n isValid: boolean;\n hasBeenValidated: boolean;\n validationMessage: string;\n verifying: boolean;\n alert: {\n type?: string;\n message?: string;\n title?: string;\n };\n};\n\nexport type State = {\n login: {\n login: LoginState;\n otp: OTPState;\n };\n contactUsFlow: {\n showComponent: boolean;\n };\n};\n\nexport const initialState: State = {\n login: {\n login: {\n contact: \"\",\n rememberContact: false,\n previousContactType: ContactType.NONE,\n isValid: false,\n hasBeenValidated: false,\n validationMessage: \"\",\n contactSendingInProgress: false,\n lastPasswordlessStartSuccessResultTime: undefined,\n alert: {},\n displayMemberNumberForm: false,\n displayMemberNumberStates: [],\n memberNumber: {\n memberNumber: \"\",\n isValid: false,\n hasBeenValidated: false,\n validationMessage: \"\",\n },\n },\n otp: {\n code: \"\",\n isValid: false,\n hasBeenValidated: false,\n validationMessage: \"\",\n verifying: false,\n alert: {},\n },\n },\n contactUsFlow: {\n showComponent: false,\n },\n};\n","// Replaces authGatewayProxy as we now call Auth0 directly, instead of through a lambda.\nimport rp from \"request-promise\";\nimport { AppConfiguration } from \"../ConfigProvider\";\nimport {\n connectionTypeForContact,\n isPhoneNumber,\n isEmail,\n ensurePlus61Format,\n stripSpaces,\n} from \"./contactUtilities\";\n\nconst WEBAUTH_SEND_TYPE = \"code\";\n\nexport const passwordlessStartDirect = async (contact: string, config: AppConfiguration) => {\n const noWhitespaceContact = stripSpaces(contact);\n const { clientID, domain } = config;\n const body = {\n client_id: clientID,\n connection: connectionTypeForContact(noWhitespaceContact),\n send: WEBAUTH_SEND_TYPE,\n email: isEmail(noWhitespaceContact) ? noWhitespaceContact : undefined,\n phone_number: isPhoneNumber(noWhitespaceContact)\n ? ensurePlus61Format(noWhitespaceContact)\n : undefined,\n };\n\n const options = {\n method: \"POST\",\n uri: `https://${domain}/passwordless/start`,\n body,\n json: true,\n resolvedWithFullResponse: true,\n };\n\n return rp(options);\n};\n","import { History } from \"history\";\nimport * as actionTypes from \"./actionTypes\";\nimport { useStateValue } from \"../../StateManagement\";\nimport { useConfig } from \"../../ConfigProvider\";\nimport { validateContact, validateMemberNumber } from \"../../util/fieldValidator\";\nimport { passwordlessFlowConstants } from \"../dataConstants\";\nimport { shouldPasswordlessCallBeSkipped } from \"../../util/shouldPasswordlessCallBeSkipped\";\nimport { passwordlessStartDirect } from \"../../util/passwordlessStartProxy\";\nimport { memberNumberDisplayStates, memberNumberTealiumLabel } from \"../constants\";\n\nimport {\n isPhoneNumber,\n stripSpaces,\n isEmail,\n skipMemberNumberCheck,\n} from \"../../util/contactUtilities\";\nimport { ContactType } from \"../../initialState\";\nimport { CustomTealiumEventType } from \"../../util/customTealiumEvent\";\n\nexport const useActionCreator = (\n fireCustomTealiumEvent?: ({ name, label }: CustomTealiumEventType) => void,\n) => {\n const { state, dispatch } = useStateValue();\n const config = useConfig();\n const constants = passwordlessFlowConstants(config);\n\n const displayError = () => {\n dispatch({\n type: actionTypes.SHOW_ALERT,\n alertType: \"error\",\n title: constants.SYSTEM_ERROR_ALERT_TITLE,\n message: constants.SYSTEM_ERROR_ALERT_MESSAGE,\n });\n };\n\n const dispatchValidateForm = (contact: string, isValid: boolean) => {\n dispatch({\n type: actionTypes.VALIDATE_FORM,\n hasBeenValidated: true,\n isValid,\n validationMessage: constants.ENTER_CONTACT_DETAILS_VALIDATION_MESSAGE ?? \"\",\n });\n };\n\n function shouldDisplayMemberNumberForm(contact: string): boolean {\n const regex = new RegExp(\"@\");\n const isAEmail = regex.test(contact);\n\n const contactWithoutSpaces = stripSpaces(contact);\n const isAPhone = isPhoneNumber(contactWithoutSpaces);\n\n const previousType = state.login.login.previousContactType;\n\n if (isAEmail) {\n dispatch({\n type: actionTypes.SET_CONTACT_TYPE,\n previousType: ContactType.EMAIL,\n });\n return false;\n }\n\n if (isAPhone) {\n dispatch({\n type: actionTypes.SET_CONTACT_TYPE,\n previousType: ContactType.PHONE,\n });\n }\n\n return isAPhone || previousType === ContactType.PHONE;\n }\n\n const contactChanged = (contact: string) => {\n dispatch({\n type: actionTypes.UPDATE_CONTACT,\n contact: contact,\n isValid: validateContact(contact, config),\n displayMemberNumberForm: shouldDisplayMemberNumberForm(contact),\n });\n };\n\n const rememberContactChanged = (rememberContact: boolean) => {\n dispatch({\n type: actionTypes.UPDATE_REMEMBER_CONTACT,\n rememberContact: rememberContact,\n });\n };\n\n const memberNumberChanged = (memberNumber: string) => {\n dispatch({\n type: actionTypes.UPDATE_MEMBER_NUMBER,\n memberNumber: memberNumber,\n isValid: validateMemberNumber(memberNumber),\n });\n };\n\n const validateForm = () => {\n const contact = state.login.login.contact;\n\n const isEmptyContact = contact === \"\";\n const isValid = validateContact(contact, config);\n\n dispatch({\n type: actionTypes.VALIDATE_FORM,\n hasBeenValidated: true,\n isValid,\n validationMessage:\n isEmptyContact || isValid ? \"\" : constants.ENTER_CONTACT_DETAILS_VALIDATION_MESSAGE,\n });\n };\n\n const validateMemberNumberInput = () => {\n dispatch({\n type: actionTypes.MEMBER_NUMBER_VALIDATE_INPUT,\n hasBeenValidated: true,\n validationMessage: state.login.login.memberNumber.isValid\n ? \"\"\n : constants.ENTER_MEMBER_NUMBER_VALIDATION_MESSAGE,\n });\n };\n\n const fireTealiumEvent = () => {\n const displayStates = state.login.login.displayMemberNumberStates;\n const states = memberNumberDisplayStates;\n\n const startsWithAnOn = displayStates[0] === states.ON;\n const endsWithAnOff = displayStates[displayStates.length - 1] === states.OFF;\n\n if (startsWithAnOn && endsWithAnOff && fireCustomTealiumEvent) {\n fireCustomTealiumEvent({\n name: \"link_click\",\n label: memberNumberTealiumLabel,\n });\n }\n };\n\n const requestPasswordlessStartDirect = (history: History, contact: string) => {\n const lastPasswordlessStartSuccessResultTime =\n state.login.login.lastPasswordlessStartSuccessResultTime;\n const moveToOtpScreen = () => history.push(\"/otp\");\n\n fireTealiumEvent();\n\n if (shouldPasswordlessCallBeSkipped(lastPasswordlessStartSuccessResultTime ?? 0)) {\n moveToOtpScreen();\n } else {\n const updatedMemberNumberData = isEmail(state.login.login.contact)\n ? {\n ...state.login.login.memberNumber,\n memberNumber: \"\",\n isValid: false,\n hasBeenValidated: false,\n validationMessage: \"\",\n }\n : state.login.login.memberNumber;\n\n dispatch({\n type: actionTypes.START_CONTACT_SENDING,\n memberNumber: updatedMemberNumberData.memberNumber,\n memberNumberState: updatedMemberNumberData,\n });\n\n return passwordlessStartDirect(contact, config)\n .then(() => {\n dispatch({\n type: actionTypes.COMPLETE_CONTACT_SENDING,\n });\n moveToOtpScreen();\n })\n .catch((err) => {\n // eslint-disable-next-line no-console\n console.log(err);\n displayError();\n });\n }\n\n return Promise.resolve();\n };\n\n const submitForm = async (history: History, brand: string) => {\n let contact = stripSpaces(state.login.login.contact);\n let isContactValid = validateContact(contact, config);\n let isMemberNumberValid = validateMemberNumber(state.login.login.memberNumber?.memberNumber);\n\n const displayPhoneNumberAuth = config.featureFlags.enablePhoneNumberAuth.isOn();\n\n if (displayPhoneNumberAuth && isPhoneNumber(contact)) {\n //If pressing enter before entering customer number, then we must exit out and validate the form\n if (!state.login.login.hasBeenValidated) {\n validateMemberNumberInput();\n validateForm();\n return;\n }\n\n if (!isMemberNumberValid && !skipMemberNumberCheck(brand)) {\n return validateMemberNumberInput();\n }\n }\n\n if (!isContactValid) {\n return dispatchValidateForm(contact, isContactValid);\n }\n\n return await requestPasswordlessStartDirect(history, contact);\n };\n\n return {\n contactChanged,\n rememberContactChanged,\n memberNumberChanged,\n validateForm,\n validateMemberNumberInput,\n submitForm,\n };\n};\n","import differenceInMinutes from \"date-fns/differenceInMinutes\";\nimport { dateNow } from \"./dateUtils\";\nexport function shouldPasswordlessCallBeSkipped(lastSuccessRequest: Date | number): boolean {\n return !!lastSuccessRequest && !!(differenceInMinutes(dateNow(), lastSuccessRequest) < 5);\n}\n","import React from \"react\";\nimport { useStateValue } from \"../StateManagement\";\nimport { useActionCreator } from \"./actions/loginActionCreator\";\nimport { TextBoxComponent } from \"../components\";\nimport { useConfig } from \"../ConfigProvider\";\nimport { passwordlessFlowConstants } from \"./dataConstants\";\nimport { skipMemberNumberCheck } from \"../util/contactUtilities\";\n\nconst MemberNumberInput = () => {\n const { state } = useStateValue();\n const config = useConfig();\n const action = useActionCreator();\n const constants = passwordlessFlowConstants(config);\n\n const memberNumberState = state.login.login.memberNumber;\n\n const shouldShowInput = () => {\n const phoneFeature = config.featureFlags.enablePhoneNumberAuth;\n\n if (phoneFeature.isOff() || skipMemberNumberCheck(config?.brand)) {\n return false;\n }\n\n return state.login.login.displayMemberNumberForm;\n };\n\n const helpText = constants?.ENTER_MEMBER_HELP_TEXT\n ? constants.ENTER_MEMBER_HELP_TEXT(config.brandName)\n : undefined;\n\n return shouldShowInput() ? (\n action.memberNumberChanged(e.target.value)}\n onBlur={() => action.validateMemberNumberInput()}\n autoFocus={false}\n value={memberNumberState?.memberNumber}\n />\n ) : null;\n};\n\nexport default MemberNumberInput;\n","import Copy from \"@nib-components/copy\";\nimport { Stack } from \"@nib/layout\";\nimport React, { useState } from \"react\";\nimport { History } from \"history\";\nimport {\n AlertComponent,\n CopyElement,\n DisplayBorder,\n Header,\n LinkButton,\n NoBorderForm,\n NoSpacingPrimaryButton,\n TextBoxComponent,\n CheckboxComponent,\n} from \"../components\";\nimport { useConfig } from \"../ConfigProvider\";\nimport { useStateValue } from \"../StateManagement\";\nimport { fireCustomTealiumEvent } from \"../util/customTealiumEvent\";\nimport { WheresMyCode } from \"../WheresMyCodeModal\";\nimport { useActionCreator } from \"./actions/loginActionCreator\";\nimport { passwordlessFlowConstants } from \"./dataConstants\";\nimport MemberNumberInput from \"./MemberNumberInput\";\n\ntype LoginProps = {\n history?: History;\n isDefaultLogin?: boolean;\n};\n\nconst Login = ({ history, isDefaultLogin = true }: LoginProps): JSX.Element => {\n const action = useActionCreator(fireCustomTealiumEvent);\n const loginState = useStateValue().state.login.login;\n const config = useConfig();\n const constants = passwordlessFlowConstants(config);\n\n const [showHelp, setShowHelp] = useState(false);\n\n return (\n <>\n setShowHelp(false),\n }}\n />\n {isDefaultLogin ? (\n
\n {loginState.alert.type ? (\n \n ) : (\n \n {constants.ENTER_CONTACT_DETAILS_HEADER_SUBTEXT}\n \n )}\n
\n ) : null}\n \n action.submitForm(history as History, config?.brand)}\n >\n action.contactChanged(event.target.value)}\n onBlur={() => action.validateForm()}\n autoFocus={true}\n value={loginState.contact}\n />\n\n \n\n action.rememberContactChanged(target.checked)}\n checked={loginState.rememberContact}\n />\n\n \n \n {loginState.contactSendingInProgress\n ? constants.ENTER_CONTACT_DETAILS_SUBMIT_BUTTON_LOADING_TEXT\n : constants.SUBMIT_BUTTON_TEXT}\n \n\n \n setShowHelp(true)} type=\"button\">\n Are you having trouble logging in?\n \n \n \n \n \n \n );\n};\n\nexport default Login;\n","import Copy from \"@nib-components/copy\";\nimport Heading from \"@nib-components/heading\";\nimport Link from \"@nib-components/link\";\nimport { Box, Inline, Stack, Hidden } from \"@nib/layout\";\nimport React from \"react\";\nimport styled from \"styled-components\";\nimport breakpoint from \"styled-components-breakpoint\";\nimport { panelConstants } from \"./dataConstants\";\n\nconst AppLink = styled(Link)`\n display: inline-block;\n box-shadow: none;\n\n ${breakpoint(\"md\")`\n height: 52px;\n `}\n\n height: 42px;\n`;\n\nconst BoxWithBackground = styled(Box)`\n display: flex;\n align-items: center;\n ${breakpoint(\"md\")`\n background-image: ${(props) => `url(\"${props.assetBaseUrl}my_cover.png\")`};\n background-size: 150px;\n background-repeat: no-repeat;\n background-position: 92% 50%;`}\n`;\n\nconst PaddedBox = styled(Box)`\n ${breakpoint(\"md\")`\n padding-right: 250px;\n `}\n\n padding-right: 0px;\n`;\n\nconst ClickThroughImage = styled.img`\n pointer-events: none;\n`;\n\ntype NibAppPanelProps = {\n assetBaseUrl: string;\n};\n\nexport function NibAppPanel({ assetBaseUrl }: NibAppPanelProps): JSX.Element {\n const constants = panelConstants();\n\n return (\n \n \n \n \n {constants.NIB_APP_PANEL_HEADING}\n \n\n \n {constants.NIB_APP_PANEL_HEADING_SMALL}\n \n {constants.NIB_APP_PANEL_COPY}\n\n \n \n \n \n\n \n \n \n \n \n \n \n );\n}\n","type PanelConstants = {\n NIB_APP_PANEL_HEADING: string;\n NIB_APP_PANEL_HEADING_SMALL: string;\n NIB_APP_PANEL_COPY: string;\n};\n\nexport function panelConstants(language?: string): PanelConstants {\n switch (language) {\n default:\n case \"english\":\n return {\n NIB_APP_PANEL_HEADING: \"Manage your health on the go\",\n NIB_APP_PANEL_HEADING_SMALL: \"Download the nib App\",\n NIB_APP_PANEL_COPY:\n \"Access your membership wherever you are with the nib App. Snap a photo of your receipt to claim, check your inclusions, benefits and rewards on the go, and more.\",\n };\n }\n}\n","import React from \"react\";\nimport { PageTemplate } from \"../components\";\nimport { useConfig } from \"../ConfigProvider\";\n\nexport function BasicPageTemplate({\n children,\n}: {\n children: JSX.Element | JSX.Element[];\n}): JSX.Element {\n const config = useConfig();\n const defaultPaddingSizes = {\n sm: 0.8,\n md: 0.5,\n lg: 0.4,\n };\n return (\n \n {children}\n \n );\n}\n","import React from \"react\";\nimport { AlertComponent, Header, CopyElement } from \"../components\";\nimport { useConfig } from \"../ConfigProvider\";\nimport { passwordlessFlowConstants } from \"../Login/dataConstants\";\nimport { useStateValue } from \"../StateManagement\";\n\nexport function HeaderPanel(): JSX.Element {\n const { state } = useStateValue();\n const config = useConfig();\n const constants = passwordlessFlowConstants(config);\n\n return (\n
\n {state.login.login.alert.type ? (\n \n ) : (\n {constants.ENTER_CONTACT_DETAILS_HEADER_SUBTEXT}\n )}\n
\n );\n}\n","import React from \"react\";\nimport { PageTemplate } from \"../components\";\nimport { useConfig } from \"../ConfigProvider\";\nimport { Box, Columns, Column } from \"@nib/layout\";\nimport { HeaderPanel } from \"./HeaderPanel\";\n\nexport function AdvertisingPageTemplate({\n loginPanel,\n advertisingPanel,\n}: {\n loginPanel: JSX.Element | JSX.Element[];\n advertisingPanel: JSX.Element | JSX.Element[];\n}): JSX.Element {\n const config = useConfig();\n const loginWithPanelsPaddingSizes = {\n md: 0.8,\n lg: 0.9,\n };\n return (\n \n \n \n \n \n {loginPanel}\n \n \n\n {advertisingPanel}\n \n \n );\n}\n","import React from \"react\";\nimport { History } from \"history\";\nimport { useConfig } from \"../ConfigProvider\";\nimport { Login } from \"../Login\";\nimport { NibAppPanel } from \"./NibAppPanel\";\nimport { appNames } from \"../util/appMapping\";\nimport { BasicPageTemplate } from \"./BasicPageTemplate\";\nimport { AdvertisingPageTemplate } from \"./AdvertisingPageTemplate\";\n\nconst allowedMultiPanelApps = [appNames.nibOnlineServicesWeb, appNames.nibOnlineServicesWebTest];\n\ntype LoginPanelMasterProps = {\n history: History;\n};\n\nexport function LoginPanelMaster({ history }: LoginPanelMasterProps): JSX.Element {\n const config = useConfig();\n return allowedMultiPanelApps.includes(config.currentApp ?? \"\") ? (\n }\n advertisingPanel={}\n />\n ) : (\n \n \n \n );\n}\n","import auth0, { AuthOptions } from \"auth0-js\";\nimport { AppConfiguration } from \"../ConfigProvider\";\nimport {\n isEmail,\n isPhoneNumber,\n connectionTypeForContact,\n ensurePlus61Format,\n stripSpaces,\n} from \"./contactUtilities\";\n\ntype Auth0PasswordlessLogin = {\n success: boolean;\n reason?: string;\n err?: any;\n};\n\nconst auth = (config: AuthOptions): auth0.WebAuth => new auth0.WebAuth(config);\n\ntype DoAuth0PasswordlessLogin = {\n config: AppConfiguration;\n contact: string;\n memberNumber: string;\n code: string;\n};\n\nexport const doAuth0PasswordlessLogin = ({\n config,\n contact,\n memberNumber,\n code,\n}: DoAuth0PasswordlessLogin): Promise => {\n const contactWithoutSpaces = stripSpaces(contact);\n // Response information found here https://auth0.com/docs/api/authentication#post-passwordless-verify\n return new Promise((resolve, reject) => {\n auth(config).passwordlessLogin(\n {\n connection: connectionTypeForContact(contactWithoutSpaces),\n email: isEmail(contactWithoutSpaces) ? contactWithoutSpaces : undefined,\n phoneNumber: isPhoneNumber(contactWithoutSpaces)\n ? ensurePlus61Format(contactWithoutSpaces)\n : undefined,\n verificationCode: code,\n nonce: config.nonce,\n // @ts-ignore - The property is not declared in auth0 props, but kept to prevent breaking compatibility\n memberNumber: isPhoneNumber(contactWithoutSpaces) ? memberNumber : undefined,\n state: config.state,\n },\n (err) => {\n if (!err) {\n return resolve({ success: true });\n }\n // this all matches on multiple options because the response are different in different environments.\n if (\n err.code === \"invalid_user_password\" ||\n err.error === \"invalid_user_password\" ||\n err.code === \"access_denied\" ||\n err.error === \"access_denied\"\n ) {\n if (\n err.error_description ===\n \"You've reached the maximum number of attempts. Please try to login again.\" ||\n err.description ===\n \"You've reached the maximum number of attempts. Please try to login again.\"\n ) {\n // Matching on description because the error code is the same for bad code and too many codes.\n return resolve({\n success: false,\n reason: responseTypes.accountLocked,\n err,\n });\n }\n\n return resolve({\n success: false,\n reason: responseTypes.badEmailCodeCombination,\n err,\n });\n }\n\n if (err.code === \"too_many_attempts\" || err.error === \"too_many_attempts\") {\n return resolve({\n success: false,\n reason: responseTypes.accountLocked,\n err,\n });\n }\n\n return reject({\n success: false,\n reason: responseTypes.unknownError,\n err,\n });\n },\n );\n });\n};\n\nexport const responseTypes = {\n badEmailCodeCombination: \"Bad Email/Code combination\",\n accountLocked: \"Account Locked\",\n unknownError: \"unknownError\",\n};\n","import Copy, { Bold } from \"@nib-components/copy\";\nimport { Stack } from \"@nib/layout\";\nimport React, { useLayoutEffect, useState } from \"react\";\nimport styled from \"styled-components\";\nimport {\n AlertComponent,\n CopyElement,\n DisplayBorder,\n Header,\n LinkButton,\n NoBorderForm,\n NoSpacingPrimaryButton,\n TextBoxComponent,\n} from \"../components\";\nimport { AlertComponentProps } from \"../components/AlertComponent\";\nimport { useConfig } from \"../ConfigProvider\";\nimport { ContactUsComponent } from \"../ContactUs\";\nimport { State } from \"../initialState\";\nimport { BasicPageTemplate } from \"../panels\";\nimport { useStateValue } from \"../StateManagement\";\nimport { WheresMyCode } from \"../WheresMyCodeModal\";\nimport { useActionCreator } from \"./actions/otpActionCreator\";\nimport { Content, passwordlessFlowConstants } from \"./dataConstants\";\n\nconst ContactWrapper = styled.span`\n word-break: break-word;\n -ms-word-break: break-all;\n`;\n\ntype HeadingSubTextProps = {\n contact: string;\n constants: Content;\n};\n\nconst HeadingSubText = ({ contact, constants }: HeadingSubTextProps) => (\n \n {constants.HEADER_SUBTEXT_PART_ONE}\n \n {contact}\n \n {constants.HEADER_SUBTEXT_PART_TWO}\n \n);\n\ntype CodeEntryProps = {\n state: State;\n action: any;\n constants: Content;\n};\n\nconst CodeEntry = ({ state, action, constants }: CodeEntryProps) => {\n return (\n action.updateCode(e.target.value)}\n onBlur={() => action.validateForm()}\n autoFocus={true}\n value={state.login.otp.code}\n />\n );\n};\n\nconst alertComponent = (alertState: AlertComponentProps) => {\n return (\n \n );\n};\n\nconst OTP = (): JSX.Element => {\n const { state } = useStateValue();\n const config = useConfig();\n const action = useActionCreator();\n const constants = passwordlessFlowConstants(config);\n const [showHelp, setShowHelp] = useState(false);\n useClearAlertsOnLoadHook(state, action);\n const contact = state.login.login.contact;\n\n return (\n \n setShowHelp(false),\n }}\n />\n \n
\n {state.login.otp.alert.type ? (\n alertComponent(state.login.otp.alert)\n ) : (\n \n \n \n )}\n
\n \n \n \n \n action.validateForm()}\n data-testid={`ga-inlink-login-verify-otp-next${\n state.login.otp.verifying ? \"-spinner\" : \"\"\n }`}\n fullWidth\n type=\"submit\"\n isLoading={state.login.otp.verifying}\n disabled={state.login.otp.verifying}\n >\n {state.login.otp.verifying\n ? constants.ENTER_CODE_SUBMIT_BUTTON_LOADING_TEXT\n : constants.SUBMIT_BUTTON_TEXT}\n \n\n \n setShowHelp(true)} type=\"button\">\n Are you having trouble logging in?\n \n \n \n \n \n
\n );\n};\nexport default OTP;\n\nconst useClearAlertsOnLoadHook = (state: State, action) =>\n useLayoutEffect(() => {\n if (state.login.otp.alert.type) {\n action.clearAlerts();\n }\n // Passing in empty array ensures that use effect is used once\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n","import * as actionTypes from \"./actionTypes\";\nimport { useStateValue } from \"../../StateManagement\";\nimport { useConfig } from \"../../ConfigProvider\";\nimport { doAuth0PasswordlessLogin, responseTypes } from \"../../util/Auth0\";\nimport { validateCode } from \"../../util/fieldValidator\";\nimport { passwordlessFlowConstants } from \"../dataConstants\";\n\nexport const useActionCreator = () => {\n const { state, dispatch } = useStateValue();\n const config = useConfig();\n const constants = passwordlessFlowConstants(config);\n\n const displayAlert = ({ type, title, message }) => {\n dispatch({\n type: actionTypes.OTP_SHOW_ALERT,\n alertType: type,\n title,\n message,\n });\n };\n\n const clearAlerts = () => {\n dispatch({\n type: actionTypes.CLEAR_ALERTS,\n });\n };\n\n return {\n clearAlerts: () => {\n clearAlerts();\n },\n\n updateCode: (code) => {\n //removing everything but the numbers from the code\n code = code.replace(/\\D/g, \"\");\n clearAlerts();\n dispatch({\n type: actionTypes.UPDATE_CONTACT_CODE,\n code,\n isValid: validateCode(code),\n });\n },\n\n validateForm: () => {\n dispatch({\n type: actionTypes.VALIDATE_OTP_FORM,\n hasBeenValidated: true,\n validationMessage:\n state.login.otp.code === \"\" || state.login.otp.isValid\n ? \"\"\n : constants.ENTER_CODE_VALIDATION_MESSAGE,\n });\n },\n\n completePasswordlessLogin: () => {\n const isValid = state.login.otp.isValid;\n const memberNumber = state.login.login.memberNumber.memberNumber;\n\n if (isValid) {\n dispatch({\n type: actionTypes.OTP_START_VERIFICATION,\n verifying: true,\n });\n\n return doAuth0PasswordlessLogin({\n config,\n code: state.login.otp.code,\n contact: state.login.login.contact,\n memberNumber,\n })\n .then((response) => {\n if (response.success) {\n dispatch({\n type: actionTypes.OTP_COMPLETE_VERIFICATION,\n });\n return;\n }\n switch (response.reason) {\n case responseTypes.badEmailCodeCombination:\n dispatch({\n type: actionTypes.WRONG_CODE,\n message: constants.ENTER_CODE_WRONG_CODE_MESSAGE,\n });\n return;\n case responseTypes.accountLocked:\n dispatch({\n type: actionTypes.ACCOUNT_BLOCKED,\n alertType: \"blocked\",\n title: constants.ENTER_CODE_TOO_MANY_ATTEMPTS_ALERT_TITLE,\n message: constants.ENTER_CODE_TOO_MANY_ATTEMPTS_ALERT_MESSAGE,\n });\n return;\n case responseTypes.unknownError:\n default:\n displayAlert({\n type: \"error\",\n title: constants.SYSTEM_ERROR_ALERT_TITLE,\n message: constants.SYSTEM_ERROR_ALERT_MESSAGE,\n });\n return;\n }\n })\n .catch(() =>\n displayAlert({\n type: \"error\",\n title: constants.SYSTEM_ERROR_ALERT_TITLE,\n message: constants.SYSTEM_ERROR_ALERT_MESSAGE,\n }),\n );\n } else {\n return Promise.resolve();\n }\n },\n };\n};\n","import TealiumUniversalTag from \"@nib/tealium-universal-tag\";\n\nimport { metrics } from \"react-metrics\";\nimport trackPage from \"@nib/track-page\";\n\nconst configureUtag = (environmentVariables: any): any => {\n const tealiumTagOptions = {\n account: environmentVariables.REACT_APP_TELIUM_ACCOUNT || \"nib\",\n environment: environmentVariables.REACT_APP_TELIUM_ENVIRONMENT || \"qa\",\n profile: environmentVariables.REACT_APP_TELIUM_PROFILE || \"main\",\n };\n\n const tealiumUTag = new TealiumUniversalTag({\n ...tealiumTagOptions,\n manualPageView: true,\n });\n\n return tealiumUTag;\n};\n\nexport const wrapWithMetrics = (\n page: () => JSX.Element,\n environmentVariables: any,\n): (() => JSX.Element) => {\n const track = trackPage({\n channel: \"Online\",\n site_name: process.env.REACT_APP_AUTH_DOMAIN || \"id.guhealth.com.au\",\n site_section: \"online_services\",\n page_name: \"auth0-login-pages\",\n page_type: \"online_services\",\n });\n\n const nibMetricsConfig = {\n vendors: [\n {\n name: \"Tealium Universal Tag\",\n api: configureUtag(environmentVariables),\n },\n ],\n };\n return metrics(nibMetricsConfig)(track(page));\n};\n","import React from \"react\";\n\nimport { HashRouter as Router, Route } from \"react-router-dom\";\nimport { GlobalStateProvider } from \"./StateManagement\";\nimport { ConfigProvider } from \"./ConfigProvider\";\nimport { OTP } from \"./Login\";\nimport { initialState, State } from \"./initialState\";\nimport { wrapWithMetrics } from \"./metrics/configureMetrics\";\nimport { LoginPanelMaster } from \"./panels\";\nimport { restoreWithDefault } from \"./StateManagement/LocalStorageService\";\n\nconst initialRestoredState = restoreWithDefault(initialState) as State;\n\nconst App = (): JSX.Element => {\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nexport default wrapWithMetrics(App, { ...process.env });\n","import \"react-app-polyfill/ie11\";\nimport \"react-app-polyfill/stable\";\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport App from \"./App\";\n\nReactDOM.render(, document.getElementById(\"root\"));\n"],"sourceRoot":""}