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8B7J,SAEpD,OAAI+J,GAAiBA,EAAchK,OAAS,EACjCyC,EAAyBK,4BAG7BL,EAAyBwH,uBAAuB,C","sources":["webpack://Kristiania.Web/./Features/ApplicationApplets/Online/OnlineApplicationForm/FormProgressState/v1/ApplicationFormProgressState.ts","webpack://Kristiania.Web/./Features/ApplicationApplets/Online/OnlineApplicationForm/FormProgressState/v4/ApplicationFormProgressState.ts","webpack://Kristiania.Web/./Features/ApplicationApplets/Online/OnlineApplicationForm/FormProgressState/v4/MapperV1.ts","webpack://Kristiania.Web/./Features/ApplicationApplets/Online/OnlineApplicationForm/FormProgressState/v2/ApplicationFormProgressState.ts","webpack://Kristiania.Web/./Features/ApplicationApplets/Online/OnlineApplicationForm/FormProgressState/v4/MapperV2.ts","webpack://Kristiania.Web/./Features/ApplicationApplets/Online/OnlineApplicationForm/FormProgressState/ApplicationFormProgressStateManager.ts","webpack://Kristiania.Web/./Features/ApplicationApplets/Online/OnlineApplicationForm/FormProgressState/v4/MapperV3.ts","webpack://Kristiania.Web/./Features/ApplicationEvents/ApplicationEvents.ts","webpack://Kristiania.Web/./Features/CampusApplication/CampusApplicationProcessState.ts","webpack://Kristiania.Web/./Features/CampusApplication/CampusApplicationProcessUtils.ts","webpack://Kristiania.Web/./Features/NotificationPopup/NotificationPopup.tsx","webpack://Kristiania.Web/./Features/NotificationPopup/NotificationPopup.module.css?3238","webpack://Kristiania.Web/./Features/OnlineApplication/Events/OnlineApplicationEvents.ts","webpack://Kristiania.Web/./Features/OnlineApplication/OnlineApplicationProcessState.ts","webpack://Kristiania.Web/./Features/OnlineApplication/OnlineApplicationProcessUtils.ts","webpack://Kristiania.Web/./Features/Partials/GoogleTagManager/Analytics/CampusAnalytics.ts","webpack://Kristiania.Web/./Features/Partials/Nav/ApplicationProgressState.ts"],"sourcesContent":["// All types are snapshots from the V1 form progress state in order to be independent of the auto-generated code and application logic.\n\nenum Page {\n OrderDetails = 'OrderDetails',\n Login = 'Login',\n Registration = 'Registration',\n PaymentOptions = 'PaymentOptions',\n Payment = 'Payment',\n StartDate = 'StartDate',\n Confirmation = 'Confirmation',\n}\n\ninterface Money {\n amount: number;\n currencyCode: string;\n currencySymbol: string;\n}\n\ninterface OnlineStudySubject {\n code: string;\n name: string;\n credits: number;\n creditsLabel: string;\n price: Money;\n url: string;\n startDate?: string;\n}\n\ninterface ParentStudy {\n code: string;\n}\n\ninterface OnlineApplicationChoice {\n subject: OnlineStudySubject;\n parentStudy: ParentStudy;\n}\n\ninterface OrderLineItem {\n choice: OnlineApplicationChoice;\n parentStudyCode: string;\n subjectCode: string;\n subjectName: string;\n subjectCredits: number;\n subjectCreditsLabel: string;\n subjectOriginalPrice: Money;\n startDate?: string;\n}\n\ninterface Installments {\n numberOfInstallments: number;\n}\n\nexport enum Payer {\n Self = 0,\n Other = 1,\n}\n\ninterface InvoiceOtherPayer {\n name: string;\n address: string;\n postalCode: string;\n organizationNumber: string;\n city: string;\n contactPersonName: string;\n contactPersonPhone: string;\n contactPersonEmail: string;\n}\n\ninterface InvoiceSelfPaid {\n additionalFee: Money;\n paymentDueDays: number;\n}\n\ninterface Invoice {\n payer: Payer;\n otherPayer?: InvoiceOtherPayer;\n selfPaid?: InvoiceSelfPaid;\n}\n\ninterface OnlineApplicationOrder {\n orderReference: string;\n orderLineItems: OrderLineItem[];\n payeeReference: string;\n isPaid: boolean;\n discountCode: string;\n totalPoints: number;\n totalScotcat: number;\n personalInfo: PersonalInfo;\n withLoanFund: boolean;\n isFree: boolean;\n installments?: Installments;\n invoice?: Invoice;\n creditCard?: object;\n totalPrice?: Money;\n originalPrice?: Money;\n totalDiscount?: Money;\n additionalFee?: Money;\n}\n\ninterface PaymentMethod {\n isSupportedByPayEx: boolean;\n isInvoicePaymentOptionEnabled: boolean;\n isInstallmentsPaymentOptionEnabled: boolean;\n isCreditCardPaymentOptionEnabled: boolean;\n priceType?: string;\n urlPart?: string;\n}\n\nexport interface PersonalInfo {\n firstName: string;\n lastName: string;\n personalNumber: string;\n phoneCountryCode: string;\n phoneNumber: string;\n email: string;\n address: string;\n postalCode: string;\n postOffice: string;\n privacyConsent: boolean;\n countryCode: string;\n repeatedEmail?: string;\n isFormerStudent?: boolean;\n}\n\nexport interface ApplicationFormProgressState {\n paymentMethod: PaymentMethod;\n onlineStudiesTermsConsent: boolean;\n dataProtectionConsent: boolean;\n order: Partial;\n activePage: Page;\n version: undefined;\n paymentResourceUri?: string;\n}\n","// All types are snapshots from the V4 form progress state in order to be independent of the auto-generated code and application logic.\n\nexport enum Payer {\n Self = 'self',\n Other = 'other',\n}\n\nenum Page {\n OrderDetails = 'OrderDetails',\n Login = 'Login',\n Registration = 'Registration',\n PaymentOptions = 'PaymentOptions',\n Payment = 'Payment',\n StartDate = 'StartDate',\n Confirmation = 'Confirmation',\n}\n\ninterface Money {\n amount: number;\n currencyCode: string;\n currencySymbol: string;\n}\n\ninterface OnlineStudySubject {\n code: string;\n name: string;\n educationCategories: string[];\n credits: number;\n creditsLabel: string;\n price: Money;\n url: string;\n startDate?: string;\n}\n\ninterface OrderedSubjectItem {\n subject: OnlineStudySubject;\n subjectCode: string;\n subjectName: string;\n subjectCredits: number;\n subjectCreditsLabel: string;\n subjectOriginalPrice: Money;\n startDate?: string;\n}\n\ninterface Installments {\n numberOfInstallments: number;\n}\n\ninterface InvoiceOtherPayer {\n name: string;\n address: string;\n postalCode: string;\n organizationNumber: string;\n city: string;\n contactPersonName: string;\n contactPersonPhone: string;\n contactPersonEmail: string;\n}\n\ninterface InvoiceSelfPaid {\n additionalFee: Money;\n paymentDueDays: number;\n}\n\ninterface Invoice {\n payer: Payer;\n otherPayer?: InvoiceOtherPayer;\n selfPaid?: InvoiceSelfPaid;\n}\n\ninterface OnlineApplicationOrder {\n orderReference: string;\n orderedSubjectItems: OrderedSubjectItem[];\n payeeReference: string;\n isPaid: boolean;\n discountCode: string;\n parentStudyCode: string;\n totalPoints: number;\n totalScotcat: number;\n personalInfo: PersonalInfo;\n withLoanFund: boolean;\n isFree: boolean;\n installments?: Installments;\n invoice?: Invoice;\n creditCard?: object;\n totalPrice?: Money;\n originalPrice?: Money;\n totalDiscount?: Money;\n additionalFee?: Money;\n}\n\ninterface PaymentMethod {\n isSupportedByPayEx: boolean;\n isInvoicePaymentOptionEnabled: boolean;\n isInstallmentsPaymentOptionEnabled: boolean;\n isCreditCardPaymentOptionEnabled: boolean;\n priceType?: string;\n urlPart?: string;\n}\n\nexport interface PersonalInfo {\n firstName: string;\n lastName: string;\n personalNumber: string;\n phoneCountryCode: string;\n phoneNumber: string;\n email: string;\n address: string;\n postalCode: string;\n postOffice: string;\n privacyConsent: boolean;\n countryCode: string;\n repeatedEmail?: string;\n isFormerStudent?: boolean;\n}\n\nexport interface ApplicationFormProgressState {\n paymentMethod: PaymentMethod;\n onlineStudiesTermsConsent: boolean;\n dataProtectionConsent: boolean;\n order: Partial;\n activePage: Page;\n version: 'v4';\n paymentResourceUri?: string;\n}\n","import type {\n ApplicationFormProgressState as ApplicationFormProgressStateV1,\n PersonalInfo as PersonalInfoV1,\n} from '../v1/ApplicationFormProgressState';\nimport { Payer as PayerV1 } from '../v1/ApplicationFormProgressState';\nimport { Payer as PayerV4 } from '../v4/ApplicationFormProgressState';\nimport { assertNever } from '~/Partials/Utils/typeUtils';\nimport type { ApplicationFormProgressState as ApplicationFormProgressStateV4 } from './ApplicationFormProgressState';\n\nconst mapPayer = (payer: PayerV1): PayerV4 => {\n switch (payer) {\n case PayerV1.Self:\n return PayerV4.Self;\n case PayerV1.Other:\n return PayerV4.Other;\n default:\n assertNever(payer);\n }\n};\n\nexport const map = (\n progressState: ApplicationFormProgressStateV1,\n personalInfo: PersonalInfoV1 | undefined\n): ApplicationFormProgressStateV4 => {\n const { order } = progressState;\n const invoice = progressState.order &&\n order.invoice && {\n ...order.invoice,\n payer: mapPayer(order.invoice.payer ?? PayerV1.Self),\n };\n\n return {\n ...progressState,\n version: 'v4',\n order: {\n ...order,\n personalInfo,\n parentStudyCode: progressState.order.orderLineItems?.[0]?.parentStudyCode ?? '',\n orderedSubjectItems:\n progressState.order.orderLineItems?.map(item => ({\n subject: {\n ...item.choice.subject,\n educationCategories: [],\n },\n subjectCode: item.subjectCode,\n subjectName: item.subjectName,\n subjectCredits: item.subjectCredits,\n subjectCreditsLabel: item.subjectCreditsLabel,\n subjectOriginalPrice: item.subjectOriginalPrice,\n startDate: item.startDate,\n })) ?? [],\n invoice,\n },\n };\n};\n","// All types are snapshots from the V2 form progress state in order to be independent of the auto-generated code and application logic.\n\nenum Page {\n OrderDetails = 'OrderDetails',\n Login = 'Login',\n Registration = 'Registration',\n PaymentOptions = 'PaymentOptions',\n Payment = 'Payment',\n StartDate = 'StartDate',\n Confirmation = 'Confirmation',\n}\n\ninterface Money {\n amount: number;\n currencyCode: string;\n currencySymbol: string;\n}\n\ninterface OnlineStudySubject {\n code: string;\n name: string;\n credits: number;\n creditsLabel: string;\n price: Money;\n url: string;\n startDate?: string;\n}\n\ninterface OrderedSubjectItem {\n subject: OnlineStudySubject;\n subjectCode: string;\n subjectName: string;\n subjectCredits: number;\n subjectCreditsLabel: string;\n subjectOriginalPrice: Money;\n startDate?: string;\n}\n\ninterface Installments {\n numberOfInstallments: number;\n}\n\nexport enum Payer {\n Self = 0,\n Other = 1,\n}\n\ninterface InvoiceOtherPayer {\n name: string;\n address: string;\n postalCode: string;\n organizationNumber: string;\n city: string;\n contactPersonName: string;\n contactPersonPhone: string;\n contactPersonEmail: string;\n}\n\ninterface InvoiceSelfPaid {\n additionalFee: Money;\n paymentDueDays: number;\n}\n\ninterface Invoice {\n payer: Payer;\n otherPayer?: InvoiceOtherPayer;\n selfPaid?: InvoiceSelfPaid;\n}\n\ninterface OnlineApplicationOrder {\n orderReference: string;\n orderedSubjectItems: OrderedSubjectItem[];\n payeeReference: string;\n isPaid: boolean;\n discountCode: string;\n parentStudyCode: string;\n totalPoints: number;\n totalScotcat: number;\n personalInfo: PersonalInfo;\n withLoanFund: boolean;\n isFree: boolean;\n installments?: Installments;\n invoice?: Invoice;\n creditCard?: object;\n totalPrice?: Money;\n originalPrice?: Money;\n totalDiscount?: Money;\n additionalFee?: Money;\n}\n\ninterface PaymentMethod {\n isSupportedByPayEx: boolean;\n isInvoicePaymentOptionEnabled: boolean;\n isInstallmentsPaymentOptionEnabled: boolean;\n isCreditCardPaymentOptionEnabled: boolean;\n priceType?: string;\n urlPart?: string;\n}\n\nexport interface PersonalInfo {\n firstName: string;\n lastName: string;\n personalNumber: string;\n phoneCountryCode: string;\n phoneNumber: string;\n email: string;\n address: string;\n postalCode: string;\n postOffice: string;\n privacyConsent: boolean;\n countryCode: string;\n repeatedEmail?: string;\n isFormerStudent?: boolean;\n}\n\nexport interface ApplicationFormProgressState {\n paymentMethod: PaymentMethod;\n onlineStudiesTermsConsent: boolean;\n dataProtectionConsent: boolean;\n order: Partial;\n activePage: Page;\n version: 'v2';\n paymentResourceUri?: string;\n}\n","import type {\n ApplicationFormProgressState as ApplicationFormProgressStateV2,\n PersonalInfo as PersonalInfoV2,\n} from '../v2/ApplicationFormProgressState';\nimport { Payer as PayerV2 } from '../v2/ApplicationFormProgressState';\nimport { assertNever } from '~/Partials/Utils/typeUtils';\nimport { Payer as PayerV4 } from './ApplicationFormProgressState';\nimport type { ApplicationFormProgressState as ApplicationFormProgressStateV4 } from './ApplicationFormProgressState';\n\nconst mapPayer = (payer: PayerV2): PayerV4 => {\n switch (payer) {\n case PayerV2.Self:\n return PayerV4.Self;\n case PayerV2.Other:\n return PayerV4.Other;\n default:\n assertNever(payer);\n }\n};\n\nexport const map = (\n progressState: ApplicationFormProgressStateV2,\n personalInfo: PersonalInfoV2 | undefined\n): ApplicationFormProgressStateV4 => {\n const { order } = progressState;\n const invoice = progressState.order &&\n order.invoice && {\n ...order.invoice,\n payer: mapPayer(order.invoice.payer ?? PayerV2.Self),\n };\n\n return {\n ...progressState,\n version: 'v4',\n order: {\n ...order,\n orderedSubjectItems:\n progressState.order.orderedSubjectItems?.map(item => ({\n ...item,\n subject: {\n ...item.subject,\n educationCategories: [],\n },\n })) ?? [],\n personalInfo,\n invoice,\n },\n };\n};\n","import type { ApplicationFormModelProgress } from '../useApplicationFormProgress';\nimport { TelemetryLogger } from '~/Utils/Logging/TelemetryLogger';\nimport type {\n ApplicationFormProgressState as ApplicationFormProgressStateV1,\n PersonalInfo as PersonalInfoV1,\n} from './v1/ApplicationFormProgressState';\nimport type {\n ApplicationFormProgressState as ApplicationFormProgressStateV2,\n PersonalInfo as PersonalInfoV2,\n} from './v2/ApplicationFormProgressState';\nimport type {\n ApplicationFormProgressState as ApplicationFormProgressStateV3,\n PersonalInfo as PersonalInfoV3,\n} from './v3/ApplicationFormProgressState';\nimport type {\n ApplicationFormProgressState as ApplicationFormProgressStateV4,\n PersonalInfo as PersonalInfoV4,\n} from './v4/ApplicationFormProgressState';\nimport { map as mapV1toV4 } from './v4/MapperV1';\nimport { map as mapV2toV4 } from './v4/MapperV2';\nimport { map as mapV3toV4 } from './v4/MapperV3';\n\nconst activeApplicationFormVersion = 'v4';\ntype ActiveApplicationFormProgressState = ApplicationFormProgressStateV4;\n\ntype ApplicationFormModelState =\n | ApplicationFormProgressStateV1\n | ApplicationFormProgressStateV2\n | ApplicationFormProgressStateV3\n | ApplicationFormProgressStateV4;\n\ntype PersonalInfo = PersonalInfoV1 | PersonalInfoV2 | PersonalInfoV3 | PersonalInfoV4;\n\nconst isVersionOne = (model: ApplicationFormModelState): model is ApplicationFormProgressStateV1 =>\n model.version === undefined;\n\nconst isVersionTwo = (model: ApplicationFormModelState): model is ApplicationFormProgressStateV2 =>\n model.version === 'v2';\n\nconst isVersionThree = (model: ApplicationFormModelState): model is ApplicationFormProgressStateV3 =>\n model.version === 'v3';\n\nconst isVersionFour = (model: ApplicationFormModelState): model is ApplicationFormProgressStateV4 =>\n model.version === 'v4';\n\nconst map = (model: ApplicationFormModelState, personalInfo: PersonalInfo | undefined) => {\n if (isVersionOne(model)) {\n return mapV1toV4(model, personalInfo);\n }\n\n if (isVersionTwo(model)) {\n return mapV2toV4(model, personalInfo);\n }\n\n if (isVersionThree(model)) {\n return mapV3toV4(model, personalInfo);\n }\n\n if (isVersionFour(model)) {\n model.order.personalInfo = personalInfo;\n\n return model;\n }\n\n TelemetryLogger.errorMessage(\n `Unrecognized application form progress state version '${(model as ApplicationFormModelState).version}'. Clearing state.`\n );\n\n setApplicationFormProgressState(undefined);\n\n return undefined;\n};\n\nexport const applicationFormProgressKey = 'applicationFormProgress';\n\nexport const getRawApplicationFormState = (): ApplicationFormModelState | undefined => {\n const modelJson = localStorage.getItem(applicationFormProgressKey);\n\n if (!modelJson) {\n return undefined;\n }\n\n return JSON.parse(modelJson) as ApplicationFormModelState;\n};\n\nexport const getApplicationFormProgressState = (): ApplicationFormModelProgress | undefined => {\n const model = getRawApplicationFormState();\n\n if (!model) {\n return undefined;\n }\n\n const personalInfoJson = sessionStorage.getItem(applicationFormProgressKey);\n const personalInfo = personalInfoJson ? (JSON.parse(personalInfoJson) as PersonalInfo) : undefined;\n\n return map(model, personalInfo);\n};\n\nexport const setApplicationFormProgressState = (progressState: ApplicationFormModelProgress | undefined) => {\n if (!progressState) {\n localStorage.removeItem(applicationFormProgressKey);\n sessionStorage.removeItem(applicationFormProgressKey);\n\n return;\n }\n\n if (progressState.order) {\n const personalInfo: ActiveApplicationFormProgressState['order']['personalInfo'] =\n progressState.order.personalInfo;\n\n personalInfo && sessionStorage.setItem(applicationFormProgressKey, JSON.stringify(personalInfo));\n }\n\n const state: ActiveApplicationFormProgressState = {\n ...progressState,\n order: {\n ...progressState.order,\n personalInfo: undefined,\n },\n version: activeApplicationFormVersion,\n };\n\n localStorage.setItem(applicationFormProgressKey, JSON.stringify(state));\n};\n","import type {\n ApplicationFormProgressState as ApplicationFormProgressStateV3,\n PersonalInfo as PersonalInfoV3,\n} from '../v3/ApplicationFormProgressState';\nimport type { ApplicationFormProgressState as ApplicationFormProgressStateV4 } from './ApplicationFormProgressState';\n\nexport const map = (\n progressState: ApplicationFormProgressStateV3,\n personalInfo: PersonalInfoV3 | undefined\n): ApplicationFormProgressStateV4 => {\n const { order } = progressState;\n\n return {\n ...progressState,\n version: 'v4',\n order: {\n ...order,\n orderedSubjectItems:\n progressState.order.orderedSubjectItems?.map(item => ({\n ...item,\n subject: {\n ...item.subject,\n educationCategories: [],\n },\n })) ?? [],\n personalInfo,\n },\n };\n};\n","import { Event } from '~/Features/Messaging/types';\n\nexport class ApplicationEvent extends Event {\n constructor(\n public readonly currentChoicesNumber: number,\n id: string\n ) {\n super(id);\n }\n}\n\nexport class AddingDifferentApplicationTypeAttempt extends Event {\n public static readonly id = 'AddingDifferentApplicationTypeAttempt';\n\n constructor() {\n super(AddingDifferentApplicationTypeAttempt.id);\n }\n}\n","import ExecutionContext from '../ExecutionContext';\nimport type { ApplicationChoiceDto } from '../Search/ApplicationChoice/Controller/ApplicationChoiceDto.csharp';\nimport { AddingDifferentApplicationTypeAttempt } from '~/Features/ApplicationEvents/ApplicationEvents';\nimport {\n AddingAnotherOptionAttempt,\n AddingExistingItemAttempt,\n CampusApplicationItemAdded,\n CampusApplicationItemRemoved,\n MaxNumberOfChoicesExceeded,\n} from '~/Features/CampusApplication/Events/CampusApplicationEvents';\nimport { MessageBroker } from '~/Features/Messaging/MessageBroker';\nimport { getStoredOnlineApplicationChoices } from '~/Features/OnlineApplication/OnlineApplicationProcessUtils';\nimport { CampusAnalytics } from '~/Partials/GoogleTagManager/Analytics/CampusAnalytics';\nimport {\n CampusApplicationStateStorageKey,\n getStoredCampusApplicationChoices,\n MaxChoicesNumber,\n} from './CampusApplicationProcessUtils';\n\nexport interface ICampusApplicationProcessState {\n append(item: ApplicationChoiceDto): boolean;\n\n getAll(): ApplicationChoiceDto[];\n\n clear(): void;\n\n remove(id: string): void;\n\n setAll(choices: ApplicationChoiceDto[]): boolean;\n\n isItemsLimitReached(): boolean;\n\n isOnlineApplicationInProgress(): boolean;\n}\n\nexport const CampusApplicationProcessState: () => ICampusApplicationProcessState = () => {\n const isOnlineApplicationInProgress = () => getStoredOnlineApplicationChoices().length > 0;\n\n const append = (newChoice: ApplicationChoiceDto): boolean => {\n ExecutionContext.ThrowIfServerSide();\n\n if (isOnlineApplicationInProgress()) {\n MessageBroker.publish(new AddingDifferentApplicationTypeAttempt());\n\n return false;\n }\n\n const currentChoices = getAll();\n\n for (const choice of currentChoices) {\n if (choice.id === newChoice.id) {\n MessageBroker.publish(new AddingExistingItemAttempt(currentChoices.length));\n\n return false;\n }\n\n if (choice.studyCode === newChoice.studyCode && choice.variantCode === newChoice.variantCode) {\n MessageBroker.publish(new AddingAnotherOptionAttempt(currentChoices.length));\n\n return false;\n }\n }\n\n if (currentChoices.length === MaxChoicesNumber) {\n MessageBroker.publish(new MaxNumberOfChoicesExceeded(MaxChoicesNumber));\n\n return false;\n }\n\n currentChoices.push(newChoice);\n localStorage.setItem(CampusApplicationStateStorageKey, JSON.stringify(currentChoices));\n\n MessageBroker.publish(new CampusApplicationItemAdded(currentChoices.length));\n\n // TODO: verify with handleSelectedChoiceChange implementation, considering setAll\n CampusAnalytics.addProducts([newChoice]);\n\n return true;\n };\n\n const getAll = getStoredCampusApplicationChoices;\n\n const clear = () => {\n ExecutionContext.ThrowIfServerSide();\n localStorage.removeItem(CampusApplicationStateStorageKey);\n MessageBroker.publish(new CampusApplicationItemRemoved(0));\n };\n\n const remove = (id: string) => {\n ExecutionContext.ThrowIfServerSide();\n let currentChoices: ApplicationChoiceDto[] = getAll();\n\n currentChoices = currentChoices.filter(item => item.id !== id);\n\n localStorage.setItem(CampusApplicationStateStorageKey, JSON.stringify(currentChoices));\n MessageBroker.publish(new CampusApplicationItemRemoved(currentChoices.length));\n };\n\n const setAll = (newChoices: ApplicationChoiceDto[]): boolean => {\n ExecutionContext.ThrowIfServerSide();\n\n const currentChoices = getAll();\n\n if (newChoices.length >= currentChoices.length && isOnlineApplicationInProgress()) {\n MessageBroker.publish(new AddingDifferentApplicationTypeAttempt());\n\n return false;\n }\n\n localStorage.setItem(CampusApplicationStateStorageKey, JSON.stringify(newChoices));\n MessageBroker.publish(new CampusApplicationItemAdded(newChoices.length));\n\n return true;\n };\n\n const isItemsLimitReached = () => {\n if (ExecutionContext.IsServerSide()) {\n return false;\n }\n\n return getAll().length >= MaxChoicesNumber;\n };\n\n return {\n append,\n getAll,\n clear,\n remove,\n setAll,\n isItemsLimitReached,\n isOnlineApplicationInProgress,\n };\n};\n","import ExecutionContext from '~/Features/ExecutionContext';\nimport type { ApplicationChoiceDto } from '~/Features/Search/ApplicationChoice/Controller/ApplicationChoiceDto.csharp';\n\nexport const CampusApplicationStateStorageKey = 'campusApplicationState';\nexport const MaxChoicesNumber = 3;\n\nexport const getStoredCampusApplicationChoices = (): ApplicationChoiceDto[] => {\n if (ExecutionContext.IsServerSide()) {\n return [];\n }\n\n const currentStateJson = localStorage.getItem(CampusApplicationStateStorageKey);\n\n if (currentStateJson) {\n return JSON.parse(currentStateJson);\n }\n\n return [];\n};\n","import classNames from 'classnames';\nimport { FocusTrap } from 'focus-trap-react';\nimport * as React from 'react';\nimport { AddingDifferentApplicationTypeAttempt } from '~/Features/ApplicationEvents/ApplicationEvents';\nimport {\n AddingAnotherOptionAttempt,\n MaxNumberOfChoicesExceeded,\n} from '~/Features/CampusApplication/Events/CampusApplicationEvents';\nimport { MessageBroker } from '~/Features/Messaging/MessageBroker';\nimport type { Event, EventHandler } from '~/Features/Messaging/types';\nimport { Button } from '~/Partials/Button/Button';\nimport { ButtonSize } from '~/Partials/Button/ButtonSize.csharp';\nimport { ButtonTier } from '~/Partials/Button/ButtonTier.csharp';\nimport { ButtonType } from '~/Partials/Button/ButtonType.csharp';\nimport { Link } from '~/Partials/Link/Link';\nimport { LinkType } from '~/Partials/Link/LinkType.csharp';\nimport { ApplicationProgressState, getApplicationProgressState } from '~/Partials/Nav/ApplicationProgressState';\nimport { SvgIcon } from '~/Partials/SvgIcon/SvgIcon';\nimport styles from './NotificationPopup.module.css';\nimport type { NotificationPopupViewModel } from './NotificationPopupViewModel.csharp';\n\ninterface NotificationPopupState {\n isOpen: boolean;\n eventId: string;\n applicationUrl: string;\n}\n\nexport class NotificationPopup\n extends React.Component\n implements EventHandler\n{\n constructor(props: NotificationPopupViewModel) {\n super(props);\n this.state = {\n isOpen: false,\n eventId: '',\n applicationUrl: '',\n };\n\n this.closePopup = this.closePopup.bind(this);\n }\n\n private static getViewModel(props: NotificationPopupViewModel) {\n const applicationProgressState = getApplicationProgressState();\n switch (applicationProgressState) {\n case ApplicationProgressState.CampusApplicationInProgress:\n return {\n heading: props.campusApplicationAlreadyInProgressViewModel.heading,\n text: props.campusApplicationAlreadyInProgressViewModel.text,\n };\n case ApplicationProgressState.OnlineApplicationInProgress:\n return {\n heading: props.onlineApplicationAlreadyInProgressViewModel.heading,\n text: props.onlineApplicationAlreadyInProgressViewModel.text,\n };\n default:\n return { heading: '', text: '' };\n }\n }\n\n componentDidMount(): void {\n MessageBroker.subscribe(this, MaxNumberOfChoicesExceeded.id);\n MessageBroker.subscribe(this, AddingAnotherOptionAttempt.id);\n MessageBroker.subscribe(this, AddingDifferentApplicationTypeAttempt.id);\n this.setCurrentApplicationUrl();\n }\n\n componentWillUnmount(): void {\n MessageBroker.unsubscribe(this, MaxNumberOfChoicesExceeded.id);\n MessageBroker.unsubscribe(this, AddingAnotherOptionAttempt.id);\n MessageBroker.unsubscribe(this, AddingDifferentApplicationTypeAttempt.id);\n }\n\n public handle(event: Event): void {\n this.setState({\n isOpen: true,\n eventId: event.id,\n applicationUrl: this.getCurrentApplicationUrl(),\n });\n }\n\n public render() {\n const { cancelButtonText, goToApplicationButtonText } = this.props;\n const { heading, text } = this.getMessage(this.props);\n const { isOpen, applicationUrl } = this.state;\n\n return (\n \n \n
\n
\n \n

{heading}

\n

{text}

\n
\n \n \n {cancelButtonText}\n \n
\n
\n
\n \n
\n );\n }\n\n private getCurrentApplicationUrl() {\n const applicationProgressState = getApplicationProgressState();\n const { campusApplicationUrl, onlineApplicationUrl } = this.props;\n switch (applicationProgressState) {\n case ApplicationProgressState.CampusApplicationInProgress:\n return campusApplicationUrl;\n case ApplicationProgressState.OnlineApplicationInProgress:\n return onlineApplicationUrl;\n default:\n return '';\n }\n }\n\n private setCurrentApplicationUrl(): void {\n const currentUrl = this.getCurrentApplicationUrl();\n this.setState({ applicationUrl: currentUrl });\n }\n\n private getMessage(props: NotificationPopupViewModel): { heading: string; text: string } {\n const { eventId } = this.state;\n switch (eventId) {\n case MaxNumberOfChoicesExceeded.id:\n return {\n heading: props.maxNumberOfChoicesNotificationViewModel.heading,\n text: props.maxNumberOfChoicesNotificationViewModel.text,\n };\n case AddingAnotherOptionAttempt.id:\n return {\n heading: props.anotherOptionAlreadyAddedViewModel.heading,\n text: props.anotherOptionAlreadyAddedViewModel.text,\n };\n case AddingDifferentApplicationTypeAttempt.id:\n return NotificationPopup.getViewModel(props);\n\n default:\n return { heading: '', text: '' };\n }\n }\n\n private closePopup() {\n this.setState({ isOpen: false });\n }\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"NotificationPopup\":\"d40B1DsJe73dj4y56QyB\",\"Variant--closed\":\"FzPbjgXuTSFpqLzgcrYe\",\"Inner\":\"ypSOK0cjKCw8noq2Naok\",\"Variant--open\":\"m89LpT2U3tSjmNF1rPxF\",\"Content\":\"f_KtAGE_gd3Q2EnPw0oZ\",\"Heading\":\"Z1b4rCOJX3CNcIav80Vt\",\"Text\":\"oU6p6eQulJk6128cfPB9\",\"Buttons\":\"Ir4dgHSPfrHiNOvRHlMA\",\"GoToApplicationButton\":\"z5LReFLS8NQ34JcBAJj6\",\"CancelButton\":\"lm2QWk20_qWvMEhuMn7p\",\"ClosePopupIcon\":\"cyTfKNWmZjNZT_gdueNm\"};","import { Event } from '~/Features/Messaging/types';\n\nexport class OnlineApplicationEvent extends Event {}\n\nexport class OnlineApplicationItemRemoved extends OnlineApplicationEvent {\n public static readonly id = 'OnlineApplicationItemRemoved';\n\n constructor() {\n super(OnlineApplicationItemRemoved.id);\n }\n}\n\nexport class OnlineApplicationItemAdded extends OnlineApplicationEvent {\n public static readonly id = 'OnlineApplicationItemAdded';\n\n constructor() {\n super(OnlineApplicationItemAdded.id);\n }\n}\n","import isArray from 'lodash/isArray';\nimport { applicationFormProgressKey } from '../ApplicationApplets/Online/OnlineApplicationForm/FormProgressState/ApplicationFormProgressStateManager';\nimport ExecutionContext from '../ExecutionContext';\nimport { AddingDifferentApplicationTypeAttempt } from '~/Features/ApplicationEvents/ApplicationEvents';\nimport { getStoredCampusApplicationChoices } from '~/Features/CampusApplication/CampusApplicationProcessUtils';\nimport { MessageBroker } from '~/Features/Messaging/MessageBroker';\nimport { OnlineApplicationItemAdded, OnlineApplicationItemRemoved } from './Events/OnlineApplicationEvents';\nimport type { OnlineApplicationChoice } from './Model';\nimport { getStoredOnlineApplicationChoices, OnlineApplicationStateStorageKey } from './OnlineApplicationProcessUtils';\n\nexport interface IOnlineApplicationProcessState {\n append(items: OnlineApplicationChoice | OnlineApplicationChoice[]): boolean;\n\n getAll(): OnlineApplicationChoice[];\n\n clear(): void;\n\n remove(subjectCode: string): void;\n\n setAll(items: OnlineApplicationChoice[]): boolean;\n}\n\nexport const OnlineApplicationProcessState: () => IOnlineApplicationProcessState = () => {\n const isCampusApplicationInProgress = () => getStoredCampusApplicationChoices().length > 0;\n\n const append = (choices: OnlineApplicationChoice | OnlineApplicationChoice[]): boolean => {\n ExecutionContext.ThrowIfServerSide();\n\n if (isCampusApplicationInProgress()) {\n MessageBroker.publish(new AddingDifferentApplicationTypeAttempt());\n\n return false;\n }\n\n const currentChoices = getAll();\n const choicesFromBasket = isArray(choices) ? choices : [choices];\n\n let choiceShouldBeAdded = true;\n for (const choiceFromBasket of choicesFromBasket) {\n let currentChoiceIndex = -1;\n for (const currentChoice of currentChoices) {\n currentChoiceIndex++;\n\n if (currentChoice.subject.code !== choiceFromBasket.subject.code) {\n continue;\n }\n\n if (currentChoice.parentStudy.timeType !== choiceFromBasket.parentStudy.timeType) {\n currentChoices.splice(currentChoiceIndex, 1);\n break;\n }\n\n choiceShouldBeAdded = false;\n break;\n }\n\n if (choiceShouldBeAdded) {\n currentChoices.push(choiceFromBasket);\n }\n }\n\n localStorage.setItem(OnlineApplicationStateStorageKey, JSON.stringify(currentChoices));\n MessageBroker.publish(new OnlineApplicationItemAdded());\n localStorage.removeItem(applicationFormProgressKey);\n\n return true;\n };\n\n const getAll = getStoredOnlineApplicationChoices;\n\n const clear = (): void => {\n ExecutionContext.ThrowIfServerSide();\n localStorage.removeItem(OnlineApplicationStateStorageKey);\n MessageBroker.publish(new OnlineApplicationItemRemoved());\n localStorage.removeItem(applicationFormProgressKey);\n };\n\n const remove = (subjectCode: string): void => {\n ExecutionContext.ThrowIfServerSide();\n let currentChoices = getAll();\n\n currentChoices = currentChoices.filter(choice => choice.subject.code !== subjectCode);\n\n localStorage.setItem(OnlineApplicationStateStorageKey, JSON.stringify(currentChoices));\n MessageBroker.publish(new OnlineApplicationItemRemoved());\n localStorage.removeItem(applicationFormProgressKey);\n };\n\n const setAll = (newChoices: OnlineApplicationChoice[]): boolean => {\n ExecutionContext.ThrowIfServerSide();\n\n const currentChoices = getAll();\n\n if (newChoices.length >= currentChoices.length && isCampusApplicationInProgress()) {\n MessageBroker.publish(new AddingDifferentApplicationTypeAttempt());\n\n return false;\n }\n\n localStorage.setItem(OnlineApplicationStateStorageKey, JSON.stringify(newChoices));\n MessageBroker.publish(new OnlineApplicationItemAdded());\n\n return true;\n };\n\n return { append, getAll, clear, remove, setAll };\n};\n","import ExecutionContext from '~/Features/ExecutionContext';\nimport type { OnlineApplicationChoice } from './Model';\n\nexport const OnlineApplicationStateStorageKey = 'onlineApplicationState';\n\nexport const getStoredOnlineApplicationChoices = (): OnlineApplicationChoice[] => {\n if (ExecutionContext.IsServerSide()) {\n return [];\n }\n\n const currentStateJson = localStorage.getItem(OnlineApplicationStateStorageKey);\n\n if (currentStateJson) {\n return JSON.parse(currentStateJson) as OnlineApplicationChoice[];\n }\n\n return [];\n};\n","import sumBy from 'lodash/sumBy';\nimport type { CampusApplicationFormSubmissionResult } from '../../../Api/CampusApplicationForm/CampusApplicationFormSubmissionResult.csharp';\nimport type { ApplicationChoiceDto } from '../../../Search/ApplicationChoice/Controller/ApplicationChoiceDto.csharp';\nimport type { GoogleTagManagerEcommerceProduct } from '../GoogleTagManagerModels';\nimport { GtmCommerceEventsHandler } from '../GtmCommerceEventsHandler';\nimport { CampusBrand, VocationalSchoolBrand } from '~/Partials/GoogleTagManager/AnalyticsConstants';\n\nexport class CampusAnalytics {\n public static addProducts = (items: ApplicationChoiceDto[]) => {\n const products = items.map(CampusAnalytics.createProductFromApplicationChoice);\n const actionField = CampusAnalytics.createBaseActionFieldFromApplicationChoice(items);\n\n if (products.length > 0) {\n GtmCommerceEventsHandler.pushAddProducts(products, actionField);\n }\n };\n\n public static removeProducts = (items: ApplicationChoiceDto[]) => {\n const products = items.map(CampusAnalytics.createProductFromApplicationChoice);\n const actionField = CampusAnalytics.createBaseActionFieldFromApplicationChoice(items);\n\n if (products.length > 0) {\n GtmCommerceEventsHandler.pushRemoveProducts(products, actionField);\n }\n };\n\n public static checkout = (stepNumber: number, items: ApplicationChoiceDto[]) => {\n const products = items.map(CampusAnalytics.createProductFromApplicationChoice);\n const baseActionField = CampusAnalytics.createBaseActionFieldFromApplicationChoice(items);\n\n if (products.length > 0) {\n if (stepNumber === 1) {\n GtmCommerceEventsHandler.pushBeginCheckout(products, baseActionField);\n } else {\n const checkoutActionField = {\n ...baseActionField,\n checkout_step: stepNumber,\n };\n GtmCommerceEventsHandler.pushCheckout(products, checkoutActionField);\n }\n }\n };\n\n public static applicationResult = (data: CampusApplicationFormSubmissionResult) => {\n const products = data.choices.map(CampusAnalytics.createProductFromApplicationChoice);\n const actionField = CampusAnalytics.createPurchaseActionFieldFromCampusApplication(data);\n\n GtmCommerceEventsHandler.pushPurchase(products, actionField);\n };\n\n private static createBaseActionFieldFromApplicationChoice = (items: ApplicationChoiceDto[]) => ({\n currency: '',\n value: sumBy(items, item => item.price ?? 0),\n });\n\n private static createProductFromApplicationChoice = (choice: ApplicationChoiceDto) => {\n const studyType = choice.level === VocationalSchoolBrand ? VocationalSchoolBrand : CampusBrand;\n\n return {\n item_id: choice.id,\n item_name: choice.name,\n affiliation: studyType,\n // `?.` added to prevent errors in case of form progress stored in local storage.\n // We can probably wait 1-2 semesters to be completely safe and remove that.\n item_brand: choice.educationCategories?.join(', ') ?? '',\n item_category: choice.studyFormType,\n item_category2: choice.points,\n item_category3: choice.label,\n item_variant: choice.level,\n // default values set on a base of consultations with client\n price: 100,\n quantity: 1,\n } satisfies GoogleTagManagerEcommerceProduct;\n };\n\n private static createPurchaseActionFieldFromCampusApplication = (\n result: CampusApplicationFormSubmissionResult\n ) => ({\n currency: '',\n value: sumBy(result.choices, item => item.price ?? 0),\n transaction_id: result.requestId,\n coupon: '',\n shipping: 0,\n tax: 0,\n });\n}\n","import { CampusApplicationProcessState } from '../../CampusApplication/CampusApplicationProcessState';\nimport { OnlineApplicationProcessState } from '../../OnlineApplication/OnlineApplicationProcessState';\n\nexport enum ApplicationProgressState {\n NoApplicationInProgress,\n CampusApplicationInProgress,\n OnlineApplicationInProgress,\n}\n\nexport const getApplicationProgressState: () => ApplicationProgressState = () => {\n const campusApplicationProcessState = CampusApplicationProcessState();\n const onlineApplicationProcessState = OnlineApplicationProcessState();\n\n const campusChoices = campusApplicationProcessState.getAll();\n\n if (campusChoices && campusChoices.length > 0) {\n return ApplicationProgressState.CampusApplicationInProgress;\n }\n\n const onlineChoices = onlineApplicationProcessState.getAll();\n\n if (onlineChoices && onlineChoices.length > 0) {\n return ApplicationProgressState.OnlineApplicationInProgress;\n }\n\n return ApplicationProgressState.NoApplicationInProgress;\n};\n"],"names":["Payer","mapPayer","payer","PayerV1","Self","PayerV4","Other","assertNever","PayerV2","applicationFormProgressKey","getRawApplicationFormState","modelJson","localStorage","getItem","JSON","parse","getApplicationFormProgressState","model","personalInfoJson","sessionStorage","map","personalInfo","undefined","version","isVersionOne","progressState","_order$invoice$payer","_progressState$order$","_progressState$order$2","_progressState$order$3","_progressState$order$4","order","invoice","_objectSpread","parentStudyCode","orderLineItems","orderedSubjectItems","item","subject","choice","educationCategories","subjectCode","subjectName","subjectCredits","subjectCreditsLabel","subjectOriginalPrice","startDate","mapV1toV4","isVersionTwo","mapV2toV4","isVersionThree","mapV3toV4","isVersionFour","TelemetryLogger","errorMessage","concat","setApplicationFormProgressState","removeItem","setItem","stringify","state","Event","AddingDifferentApplicationTypeAttempt","constructor","super","id","CampusApplicationProcessState","isOnlineApplicationInProgress","getStoredOnlineApplicationChoices","length","getAll","getStoredCampusApplicationChoices","append","newChoice","ExecutionContext","ThrowIfServerSide","MessageBroker","publish","currentChoices","AddingExistingItemAttempt","studyCode","variantCode","AddingAnotherOptionAttempt","MaxChoicesNumber","MaxNumberOfChoicesExceeded","push","CampusApplicationStateStorageKey","CampusApplicationItemAdded","CampusAnalytics","addProducts","clear","CampusApplicationItemRemoved","remove","filter","setAll","newChoices","isItemsLimitReached","IsServerSide","currentStateJson","NotificationPopup","React","props","this","isOpen","eventId","applicationUrl","closePopup","bind","getViewModel","getApplicationProgressState","ApplicationProgressState","CampusApplicationInProgress","heading","campusApplicationAlreadyInProgressViewModel","text","OnlineApplicationInProgress","onlineApplicationAlreadyInProgressViewModel","componentDidMount","subscribe","setCurrentApplicationUrl","componentWillUnmount","unsubscribe","handle","event","setState","getCurrentApplicationUrl","render","cancelButtonText","goToApplicationButtonText","getMessage","FocusTrap","active","className","classNames","Button","onClick","SvgIcon","iconName","Link","label","href","type","LinkType","size","ButtonSize","Large","tier","ButtonTier","LegacyPrimary","ButtonType","Outline","applicationProgressState","campusApplicationUrl","onlineApplicationUrl","currentUrl","maxNumberOfChoicesNotificationViewModel","anotherOptionAlreadyAddedViewModel","OnlineApplicationEvent","OnlineApplicationItemRemoved","OnlineApplicationItemAdded","OnlineApplicationProcessState","isCampusApplicationInProgress","choices","choicesFromBasket","isArray","choiceShouldBeAdded","choiceFromBasket","currentChoiceIndex","currentChoice","code","parentStudy","timeType","splice","OnlineApplicationStateStorageKey","_CampusAnalytics","items","products","createProductFromApplicationChoice","actionField","createBaseActionFieldFromApplicationChoice","GtmCommerceEventsHandler","pushAddProducts","removeProducts","pushRemoveProducts","checkout","stepNumber","baseActionField","pushBeginCheckout","checkoutActionField","checkout_step","pushCheckout","applicationResult","data","createPurchaseActionFieldFromCampusApplication","pushPurchase","currency","value","sumBy","_item$price","price","_choice$educationCate","_choice$educationCate2","studyType","level","VocationalSchoolBrand","CampusBrand","item_id","item_name","name","affiliation","item_brand","join","item_category","studyFormType","item_category2","points","item_category3","item_variant","quantity","result","_item$price2","transaction_id","requestId","coupon","shipping","tax","campusApplicationProcessState","onlineApplicationProcessState","campusChoices","onlineChoices","NoApplicationInProgress"],"sourceRoot":""}