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EAAAA,EAAoBC,YAAWC,EAAAA,EAAAA,OAGjCC,EAAAA,EAAAA,GAAWN,GAAaD,QACtBzY,EAAAA,EAAAA,KAAC2X,EAAAA,EAAa,CACZC,QAAS/b,GAAAA,GACTgW,OAAQmF,GAAWzX,UAEnBS,EAAAA,EAAAA,KAACiZ,EAAAA,EAAsB,CACrB3a,WAAYA,EACZ4a,aAAa,GAAE3Z,UAEfS,EAAAA,EAAAA,KAACmZ,EAAAA,EAAa,CACZC,qBAAmB,EACnBC,SAAUC,GAAAA,GAAkB/Z,UAE5BS,EAAAA,EAAAA,KAACuY,GAAG,IAAKK,UAKnB,C","sources":["webpack://orisubscriptionwizard/../../../src/constants/index.ts","webpack://orisubscriptionwizard/../../../src/utils/getConfiguration.ts","webpack://orisubscriptionwizard/../../../src/constants/defaultTranslations.ts","webpack://orisubscriptionwizard/../../../src/contexts/configurationContext.ts","webpack://orisubscriptionwizard/../../../src/containers/ApiProvider.tsx","webpack://orisubscriptionwizard/../../../src/contexts/wizard-context.ts","webpack://orisubscriptionwizard/../../src/index.ts","webpack://orisubscriptionwizard/../../../src/types/EWizardCustomerType.ts","webpack://orisubscriptionwizard/../../../src/hooks/useSubscriptionLogic.ts","webpack://orisubscriptionwizard/../../../src/hooks/useOpenEvent.ts","webpack://orisubscriptionwizard/../../../src/hooks/useSaveEvent.ts","webpack://orisubscriptionwizard/../../../src/hooks/useErrorEvent.ts","webpack://orisubscriptionwizard/../../../src/containers/WizardContainer.tsx","webpack://orisubscriptionwizard/../../../src/components/WizardLoader.tsx","webpack://orisubscriptionwizard/../../../src/components/FormattedMessage.tsx","webpack://orisubscriptionwizard/../../../src/contexts/state-context.ts","webpack://orisubscriptionwizard/../../../src/hooks/useTranslations.ts","webpack://orisubscriptionwizard/../../../src/contexts/types-context.ts","webpack://orisubscriptionwizard/../../../src/components/ModalContent.tsx","webpack://orisubscriptionwizard/../../../src/components/PackagePicture.tsx","webpack://orisubscriptionwizard/../../../src/components/PackagesLoader.tsx","webpack://orisubscriptionwizard/../../../src/components/PackageSelection.tsx","webpack://orisubscriptionwizard/../../../src/types/ECustomerTypeSelection.ts","webpack://orisubscriptionwizard/../../../src/types/EWizardType.ts","webpack://orisubscriptionwizard/../../../../src/components/customer-selection/MyselfSection.tsx","webpack://orisubscriptionwizard/../../../src/api/useEndConsumers.ts","webpack://orisubscriptionwizard/../../../src/utils/consultant-summary-to-string.ts","webpack://orisubscriptionwizard/../../../src/components/SelectField.tsx","webpack://orisubscriptionwizard/../../../../src/components/customer-selection/FirstName.tsx","webpack://orisubscriptionwizard/../../../../src/components/customer-selection/Surname.tsx","webpack://orisubscriptionwizard/../../../../src/components/customer-selection/OtherCustomersSection.tsx","webpack://orisubscriptionwizard/../../src/styled.ts","webpack://orisubscriptionwizard/../../../../../src/SubscriptionWizard/pages/CustomerSelection/CustomerSelectionForm.tsx","webpack://orisubscriptionwizard/../../../../../src/SubscriptionWizard/pages/CustomerSelection/CustomerSelection.tsx","webpack://orisubscriptionwizard/../../../../src/SubscriptionWizard/pages/index.ts","webpack://orisubscriptionwizard/../../../src/hooks/usePackageSelectionLogic.ts","webpack://orisubscriptionwizard/../../../src/utils/getSafeUrl.ts","webpack://orisubscriptionwizard/../../../src/SubscriptionWizard/SubscriptionWizard.tsx","webpack://orisubscriptionwizard/../../../src/api/useSubscriptionTypes.ts","webpack://orisubscriptionwizard/../../../src/utils/wrap-action-with-dispatch.ts","webpack://orisubscriptionwizard/../../../../src/hooks/useReducerState/actions.ts","webpack://orisubscriptionwizard/../../../../../src/hooks/useReducerState/middleware/useBackStep.ts","webpack://orisubscriptionwizard/../../../../../src/hooks/useReducerState/middleware/useCustomerValidation.ts","webpack://orisubscriptionwizard/../../../../src/hooks/useReducerState/reducer.ts","webpack://orisubscriptionwizard/../../../../src/hooks/useReducerState/index.ts","webpack://orisubscriptionwizard/../../../src/utils/useMiddleware.ts","webpack://orisubscriptionwizard/../../../../src/hooks/useReducerState/buildSetters.ts","webpack://orisubscriptionwizard/../../../src/containers/StateContainer.tsx","webpack://orisubscriptionwizard/../../../src/containers/SubscriptionContainer.tsx","webpack://orisubscriptionwizard/../../../src/containers/SubscriptionTypesContainer.tsx","webpack://orisubscriptionwizard/../../src/logger.ts","webpack://orisubscriptionwizard/../../../src/utils/errorFallback.tsx","webpack://orisubscriptionwizard/../../src/SubscriptionWizardController.tsx","webpack://orisubscriptionwizard/../../../src/utils/getTranslationsProps.ts","webpack://orisubscriptionwizard/./src/App.tsx","webpack://orisubscriptionwizard/./src/logger.ts","webpack://orisubscriptionwizard/./src/appRender.tsx"],"sourcesContent":["export const APP_NAME = 'subscription-wizard';\nexport const PACKAGE_NAME = '@ori/subscription-wizard';\nexport const EMOTION_CACHE_KEY = `${APP_NAME}-emotion-cache-key`;\n\nexport * from './defaultTranslations';\n\nexport * from './profile-element-settings';\n","import { getInfoLogger } from '@ori/checkout-utils';\nimport { parseClientAppConfig } from '@ori/client-app-config';\n\nimport { APP_NAME } from '../constants';\nimport type { ClientAppConfig } from '../types/ClientAppConfig';\n\nconst logInfo = getInfoLogger(APP_NAME);\n\n/**\n * Parses the configuration for subscription wizard SPA component.\n * @param config Subscription wizard SPA root element.\n * @returns Subscription wizard component configuration.\n */\nexport const getConfiguration = (config: string) => {\n const result = parseClientAppConfig(config, [\n 'currentLanguage',\n 'customerId',\n 'globalApiUrl',\n 'identityUrl',\n 'staticApiUrl',\n 'tenant',\n ]);\n logInfo('getConfiguration', result);\n\n return result;\n};\n","/* istanbul ignore file */\n\n/**\n * DO NOT EDIT!\n * This file was autogenerated by npm script `localizations-codegen`.\n * Changes may cause incorrect behavior and will be lost when the file is regenerated.\n *\n * Run `npx localizations-codegen` to regenerate.\n */\nimport type { TranslationKey } from '../models/TranslationKey';\n\nexport type DefaultTranslations = Record;\n\nexport const defaultTranslations: DefaultTranslations = {\n all: 'All',\n customer: 'Customer',\n deliveryAddress: 'Delivery Address',\n deliveryInformationTooltip: 'Address can be changed in \"Delivery information\" after placing the order',\n deliveryMethod: 'Delivery Method',\n everyCatalogue: 'Every catalogue',\n everySecondCatalogue: 'Every second catalogue',\n everyThirdCatalogue: 'Every third catalogue',\n for: 'For',\n frequency: 'Frequency',\n homeDelivery: 'Home Delivery',\n myself: 'Myself',\n name: 'Name',\n newCustomer: 'New Customer',\n newSubscription: 'New subscription',\n nextStep: 'Next step',\n payNow: 'Pay Now',\n paymentMethod: 'Payment Method',\n pleaseWait: 'Please Wait',\n priceTooltip: 'The price for the future orders may differ based on the current catalogue price.',\n product: 'Product',\n save: 'Save',\n selectCustomer: 'Select Customer',\n selectFrequency: 'Select frequency',\n subscribed: 'Subscribed',\n subscriptionReview: 'Subscription Review',\n surname: 'Surname',\n termsAndConditions: 'By clicking on this checkbox you agree to ',\n totalCostForThisPeriod: 'Total cost for this period',\n};\n\nexport const translationsNamespace = 'subscription-wizard';\n","import { useContext, createContext } from 'react';\n\nimport type { ClientAppConfig } from '../types/ClientAppConfig';\n\nexport const configurationContext = createContext({\n currentLanguage: '',\n customerId: 0,\n globalApiUrl: '',\n staticApiUrl: '',\n identityUrl: '',\n onBehalfCustomerId: '',\n placement: '',\n tenant: '',\n uriTemplate: '',\n});\n\nexport const ConfigurationProvider = configurationContext.Provider;\n\nexport const useConfiguration = () => useContext(configurationContext);\n","import { useToken } from '@ori/auth';\nimport { basicSwrOptions } from '@ori/checkout-utils';\nimport { ApiClientProvider as GlobalApiClientProvider } from '@ori/global-api-client-react';\nimport { ApiClientProvider as StaticApiClientProvider } from '@ori/static-api-client-react';\nimport type { FC, PropsWithChildren } from 'react';\nimport { SWRConfig } from 'swr';\n\nimport { useConfiguration } from '../contexts/configurationContext';\n\nconst API_TIMEOUT = 10000;\nconst swrConfig = {\n focusThrottleInterval: 300000,\n suspense: false,\n ...basicSwrOptions,\n};\n\nexport const ApiProvider: FC = ({ children }) => {\n const { currentLanguage, globalApiUrl, staticApiUrl, tenant } = useConfiguration();\n const { formattedToken: token } = useToken();\n const globalClientProps = { baseUrl: globalApiUrl, language: currentLanguage, tenant, timeout: API_TIMEOUT, token };\n const staticClientProps = { baseUrl: staticApiUrl, language: currentLanguage, tenant, timeout: API_TIMEOUT };\n\n return (\n \n \n {children}\n \n \n );\n};\n","import { createContext } from 'react';\n\nimport type { WizardContext } from '../types';\n\nexport const wizardContext = createContext({} as WizardContext);\n\nexport const WizardProvider = wizardContext.Provider;\n","import type { SubscriptionType } from '@ori-events/subscription-types';\n\ntype EventName = 'subscription-error';\n\nexport const eventName: EventName = 'subscription-error';\n\nexport const subscriptionError: EventName = eventName;\n\nexport interface EventData {\n type: SubscriptionType;\n productCode?: string;\n error?: {\n code: number;\n message: string;\n };\n}\n\nexport interface Event extends CustomEvent {\n type: EventName;\n}\n\ndeclare global {\n interface WindowEventMap {\n 'subscription-error': CustomEvent;\n }\n}\n\n/**\n * Dispatch event when subscription is saved\n *\n * @param {CustomEventInit} data data which will be passed to event\n * @fires globalThis#subscription-error:subscription-error\n */\nexport function dispatch(data: CustomEventInit) {\n const event = new CustomEvent(eventName, data);\n globalThis.dispatchEvent(event);\n}\n\n/**\n * Listen callback for our event\n *\n * @callback listenCallback\n * @param {CustomEvent} event - Event data\n * @returns {void}\n */\n\n/**\n * Helper function which wraps event so we never miss.\n * @param {listenCallback} callback - That handles response\n * @param {(boolean | AddEventListenerOptions)} [options] - options of event\n */\nexport function listen(callback: (event: CustomEvent) => void, options?: AddEventListenerOptions | boolean) {\n globalThis.addEventListener(eventName, callback, options);\n}\n\n/**\n * Clean event when you don't need to listen anymore.\n * @param {listenCallback} callback - that should be cleaned.\n */\nexport function clean(callback: (event: CustomEvent) => void) {\n globalThis.removeEventListener(eventName, callback);\n}\n\nexport default {\n dispatch,\n listen,\n clean,\n eventName,\n subscriptionError,\n};\n","export enum EWizardCustomerType {\n All = 'All',\n OnlyForMe = 'OnlyForMe',\n OnlyForOtherCustomers = 'OnlyForOtherCustomers',\n}\n","import { useErrorEvent } from './useErrorEvent';\nimport { useOpenEvent } from './useOpenEvent';\nimport { useSaveEvent } from './useSaveEvent';\n\nexport function useSubscriptionLogic() {\n const openLogic = useOpenEvent();\n const saveLogic = useSaveEvent();\n const errorLogic = useErrorEvent();\n\n return { ...openLogic, ...saveLogic, ...errorLogic } as const;\n}\n","import type { EventData } from '@ori-events/open-subscription-wizard';\nimport { listen, clean } from '@ori-events/open-subscription-wizard';\nimport { useCallback, useEffect, useState } from 'react';\n\nimport { EWizardCustomerType } from '../types/EWizardCustomerType';\nimport type { WizardContext } from '../types/WizardContext';\n\nexport function useOpenEvent() {\n const [open, setOpen] = useState(false);\n const [isFeedbackOpen, setIsFeedbackOpen] = useState(false);\n const [key, setKey] = useState(0);\n const [customerType, setCustomerType] = useState(null);\n\n const [wizardType, setWizardType] = useState(null);\n const [productCode, setProductCode] = useState();\n\n const handleOpenEvent = useCallback(\n ({\n detail: {\n customerType: initialCustomerType = EWizardCustomerType.All,\n productCode: code,\n type: initialWizardType,\n },\n }: CustomEvent) => {\n setCustomerType(EWizardCustomerType[initialCustomerType]);\n setWizardType(initialWizardType);\n setProductCode(code);\n setOpen(true);\n setKey((current) => current + 1);\n },\n [],\n );\n\n const handleOpenFeedback = () => {\n setIsFeedbackOpen(true);\n };\n\n const handleCloseFeedback = () => {\n setIsFeedbackOpen(false);\n };\n\n useEffect(() => {\n listen(handleOpenEvent);\n\n return () => {\n clean(handleOpenEvent);\n };\n }, [handleOpenEvent, customerType]);\n\n const handleClose = useCallback(() => {\n setOpen(false);\n }, []);\n\n return {\n open,\n customerType,\n wizardType,\n productCode,\n key,\n handleClose,\n handleCloseFeedback,\n handleOpenFeedback,\n isFeedbackOpen,\n } as const;\n}\n","import type subscriptionSaved from '@ori-events/subscription-saved';\nimport { dispatch } from '@ori-events/subscription-saved';\nimport { useCallback } from 'react';\n\nexport function useSaveEvent() {\n const handleSave = useCallback((...data: Parameters) => {\n dispatch(...data);\n }, []);\n\n return { handleSave } as const;\n}\n","import type subscriptionError from '@ori-events/subscription-error';\nimport { dispatch } from '@ori-events/subscription-error';\nimport { useCallback } from 'react';\n\nexport function useErrorEvent() {\n const handleError = useCallback((...data: Parameters) => {\n dispatch(...data);\n }, []);\n\n return { handleError } as const;\n}\n","import { LogLevel, getLogger } from '@ori/checkout-utils';\nimport type { FC, PropsWithChildren } from 'react';\n\nimport { APP_NAME } from '../constants';\nimport { WizardProvider } from '../contexts';\nimport { useSubscriptionLogic } from '../hooks/useSubscriptionLogic';\n\nconst logDebug = getLogger(APP_NAME, LogLevel.Debug);\n\nexport const WizardContainer: FC = ({ children }) => {\n const {\n open,\n customerType,\n wizardType,\n productCode,\n handleClose,\n handleCloseFeedback,\n handleOpenFeedback,\n isFeedbackOpen,\n key,\n handleSave,\n handleError,\n } = useSubscriptionLogic();\n\n logDebug('WizardContainer ', wizardType, ' | Product code: ', productCode, ' | key: ', key);\n\n return (\n \n {children}\n \n );\n};\n","import { Dialog } from '@ori-ui/components';\nimport { CircularProgress } from '@ori-ui/mui';\nimport useTestId from '@ori/testid-generator';\nimport type { FC } from 'react';\n\nexport const WizardLoader: FC = () => {\n const { getTestIdProps } = useTestId();\n\n return (\n \n
\n \n
\n \n );\n};\n","/* istanbul ignore file */\n\n/**\n * DO NOT EDIT!\n * This file was autogenerated by npm script `localizations-codegen`.\n * Changes may cause incorrect behavior and will be lost when the file is regenerated.\n *\n * Run `npx localizations-codegen` to regenerate.\n */\nimport { FormattedMessage as NotTypedFormattedMessage, type FormattedMessageProps } from '@ori/i18n';\n\nimport type { DefaultTranslations } from '../constants/defaultTranslations';\n\n/**\n * Renders a formatted internationalized message using the provided translation data.\n *\n * @returns The FormattedMessage typed with keys within the specified namespace.\n */\nexport const FormattedMessage = (props: FormattedMessageProps) => (\n {...props} />\n);\n","import { createContext } from 'react';\n\nimport type { useReducerState } from '../hooks/useReducerState';\n\nexport const stateContext = createContext>({} as ReturnType);\n\nexport const StateProvider = stateContext.Provider;\n","/* istanbul ignore file */\n\n/**\n * DO NOT EDIT!\n * This file was autogenerated by npm script `localizations-codegen`.\n * Changes may cause incorrect behavior and will be lost when the file is regenerated.\n *\n * Run `npx localizations-codegen` to regenerate.\n */\nimport { useTranslationsFromNamespace, type UseTranslationsFromNamespaceResult } from '@ori/i18n';\n\nimport type { DefaultTranslations } from '../constants/defaultTranslations';\n\n/**\n * A hook for accessing translations within a specific namespace along with a formatting function.\n *\n * @returns The translations within the specified namespace and a formatting function.\n */\nexport const useTranslations: () => UseTranslationsFromNamespaceResult = () =>\n useTranslationsFromNamespace();\n","import type { GlobalCustomersSubscriptionTypeDto } from '@ori/global-api-client-react';\nimport { createContext } from 'react';\n\ninterface TypesContext {\n types: GlobalCustomersSubscriptionTypeDto[];\n isLoading: boolean;\n}\n\nexport const typesContext = createContext({} as TypesContext);\n\nexport const TypesProvider = typesContext.Provider;\n","import { styled } from '@ori-ui/mui';\nimport useTestId from '@ori/testid-generator';\nimport type { FC, PropsWithChildren } from 'react';\n\nconst ScrollableContent = styled('div')(({ theme }) => ({\n display: 'flex',\n [theme.breakpoints.up('sm')]: {\n maxHeight: '60vh',\n },\n}));\n\nconst StyledModalContent = styled('div')(({ theme }) => ({\n display: 'grid',\n rowGap: theme.spacing(3),\n marginTop: theme.spacing(3),\n width: '100%',\n [theme.breakpoints.up('sm')]: {\n maxHeight: '60vh',\n },\n [theme.breakpoints.down('xl')]: {\n paddingRight: theme.spacing(2),\n },\n}));\n\nexport interface ModalContentProps extends PropsWithChildren {\n dataId?: string;\n}\n\nexport const ModalContent: FC = ({ dataId, children }) => {\n const { getTestIdProps } = useTestId();\n\n return (\n \n {children}\n \n );\n};\n","import { styled, useTheme } from '@ori-ui/mui';\nimport { CheckoutImage } from '@ori/checkout-ui';\nimport useTestId from '@ori/testid-generator';\n\nimport type { PackagePictureProps } from '../types';\n\nconst ImageWrapper = styled('div')(({ theme }) => ({\n marginLeft: '4px',\n borderRadius: theme.shape.borderRadius,\n}));\n\nexport function PackagePicture({ url, alt }: PackagePictureProps) {\n const { getTestId } = useTestId();\n const theme = useTheme();\n\n const testId = getTestId('package-icon');\n\n return (\n \n );\n}\n","import { Skeleton, styled, useMediaQuery, useTheme } from '@ori-ui/mui';\nimport useTestId from '@ori/testid-generator';\nimport type { FC } from 'react';\n\nconst LoaderContainer = styled('div')(({ theme }) => ({\n display: 'grid',\n rowGap: '15px',\n [theme.breakpoints.up('md')]: {},\n}));\n\ninterface PackageLoaderProps {\n skeletonItemsPackage?: number;\n width?: string;\n height?: number;\n}\n\nconst ItemLoader = styled(Skeleton)({\n transform: 'scale(1)',\n});\n\nconst PackageLoader: FC = ({ skeletonItemsPackage = 1, height, width }) => (\n <>\n {Array.from({ length: skeletonItemsPackage })\n .fill(1)\n .map((_, index) => (\n \n ))}\n \n);\n\nexport const PackagesLoader = () => {\n const { getTestIdProps } = useTestId();\n const { breakpoints } = useTheme();\n const isMobile = useMediaQuery(breakpoints.down('md'));\n\n return (\n \n \n \n \n );\n};\n","import { styled, Button, Typography, Chip } from '@ori-ui/mui';\nimport { LogLevel, getLogger } from '@ori/checkout-utils';\nimport useTestId from '@ori/testid-generator';\nimport { useContext, useEffect, useState } from 'react';\n\nimport { APP_NAME } from '../constants';\nimport { stateContext } from '../contexts';\nimport { usePackageSelectionLogic } from '../hooks';\nimport { useTranslations } from '../hooks/useTranslations';\nimport type { Package } from '../types';\nimport { ModalContent } from './ModalContent';\nimport { PackagePicture } from './PackagePicture';\nimport { PackagesLoader } from './PackagesLoader';\n\nconst logDebug = getLogger(APP_NAME, LogLevel.Debug);\n\nconst Filters = styled('section')({\n width: '100%',\n});\n\nconst Packages = styled('div')(({ theme }) => ({\n display: 'grid',\n overflow: 'auto',\n rowGap: theme.spacing(3),\n paddingBottom: theme.spacing(1),\n color: theme.palette.grey[200], // needed because it is inherited by button\n}));\n\nconst PackageButton = styled(Button)(({ theme }) => ({\n borderRadius: theme.shape.borderRadius,\n justifyContent: 'stretch',\n padding: theme.spacing(2, 3),\n}));\n\nconst PackageLabel = styled(Typography)(({ theme }) => ({\n textAlign: 'left',\n textTransform: 'none',\n color: theme.palette.text.primary,\n}));\n\nexport function PackageSelection() {\n const { getTestIdProps } = useTestId();\n const { setPackage, selectedPackage } = useContext(stateContext);\n const [filter, setFilter] = useState(0);\n const { formatMessage } = useTranslations();\n\n const { packages, categories, isLoading } = usePackageSelectionLogic(filter);\n\n logDebug('PackageSelection selectedPackage: ', selectedPackage);\n\n useEffect(() => {\n if (categories.length === 1) {\n const categoryTypeId = categories[0]?.typeId ?? 0;\n setFilter(categoryTypeId);\n }\n }, [categories]);\n\n const onClickSetPackage = (autoshipPackage: Package) => () => setPackage(autoshipPackage);\n\n const onClickSetFilter = (categoryFilter: number) => () => setFilter(categoryFilter);\n\n return (\n \n {isLoading ? (\n \n ) : (\n <>\n \n {categories.length > 1 && (\n 0 ? 'outlined' : undefined}\n onClick={onClickSetFilter(0)}\n />\n )}\n {categories.map((category) => (\n \n ))}\n \n\n \n {packages.map((item: Package) => (\n \n }\n sx={item.packageId === selectedPackage?.packageId ? { borderColor: 'text.primary' } : undefined}\n {...getTestIdProps(`package-${item.packageId}-button`)}\n type=\"button\"\n variant=\"outlined\"\n onClick={onClickSetPackage(item)}\n >\n \n {item.description}\n \n \n ))}\n \n \n )}\n \n );\n}\n","export enum ECustomerTypeSelection {\n Myself = 'Myself',\n ExistingCustomer = 'ExistingCustomer',\n NewCustomer = 'NewCustomer',\n}\n","export enum EWizardType {\n Autoship = 'Autoship',\n Subscription = 'Subscription',\n}\n","import { ToggleCard } from '@ori-ui/components';\nimport { styled, Typography } from '@ori-ui/mui';\nimport { forwardRef, useContext } from 'react';\n\nimport { wizardContext } from '../../contexts';\nimport type { CustomerSelectionProps } from '../../types';\nimport { EWizardCustomerType } from '../../types';\nimport { FormattedMessage } from '../FormattedMessage';\n\ninterface StyleProps {\n selected: boolean;\n}\n\nconst SelectedBoldTypography = styled(Typography)<{ ownerState: StyleProps }>(({ ownerState }) => ({\n ...(ownerState.selected && { fontWeight: 'bold' }),\n}));\n\nexport const MyselfSection = forwardRef(\n ({ selected, value, onChange }, ref) => {\n const { customerType } = useContext(wizardContext);\n\n if (customerType === EWizardCustomerType.OnlyForOtherCustomers) {\n return null;\n }\n\n return (\n \n \n \n \n \n );\n },\n);\n","import { LogLevel, errorHandlingSwrOptions, getLogger } from '@ori/checkout-utils';\nimport { useGetCustomerEndConsumers } from '@ori/global-api-client-react';\n\nimport { APP_NAME } from '../constants';\nimport { useConfiguration } from '../contexts/configurationContext';\n\nconst logDebug = getLogger(APP_NAME, LogLevel.Debug);\n\nexport function useEndConsumers() {\n const { customerId, tenant } = useConfiguration();\n const headers = { 'x-tenant-context': tenant };\n const swrOptions = {\n ...errorHandlingSwrOptions,\n onSuccess: () => {\n logDebug('useEndConsumers() hook finished successfully');\n },\n };\n\n const { data, error, isValidating: isLoading } = useGetCustomerEndConsumers(customerId, headers, { swr: swrOptions });\n\n return {\n data,\n error,\n isLoading,\n };\n}\n","import type { GlobalCustomersEndConsumerDto } from '@ori/global-api-client-react';\n\nexport function consultantSummaryToString(item: GlobalCustomersEndConsumerDto | null): string {\n return item ? `${item.firstName} ${item.lastName}` : '';\n}\n","import type { SelectProps } from '@ori-ui/mui';\nimport { FormControl, InputLabel, Select, MenuItem, FormHelperText } from '@ori-ui/mui';\nimport useTestId from '@ori/testid-generator';\n\nimport type { SelectItem } from '../types';\n\ninterface SelectFieldProps {\n readonly id: string;\n readonly value: SelectProps['value'];\n readonly onChange: SelectProps['onChange'];\n readonly items: SelectItem[];\n readonly label?: string;\n readonly placeholder?: string;\n readonly hintText?: string;\n readonly displayEmpty?: SelectProps['displayEmpty'];\n readonly disabled?: SelectProps['disabled'];\n readonly enabledReset?: boolean;\n}\n\nexport const SelectField = ({\n id,\n value,\n onChange,\n items,\n label,\n placeholder,\n hintText,\n displayEmpty,\n disabled,\n enabledReset,\n}: SelectFieldProps) => {\n const { getTestIdProps } = useTestId();\n\n return (\n \n {label ? {label} : null}\n \n {placeholder ? (\n \n {placeholder}\n \n ) : null}\n {items.map(({ Id, Text }) => (\n \n {Text}\n \n ))}\n \n {hintText ? {hintText} : null}\n \n );\n};\n","import { TextField } from '@ori-ui/mui';\nimport { useContext } from 'react';\n\nimport { stateContext } from '../../contexts';\nimport { useTranslations } from '../../hooks/useTranslations';\n\nexport function FirstName() {\n const { formatMessage } = useTranslations();\n const { newCustomer, setCustomerName } = useContext(stateContext);\n\n return (\n \n );\n}\n","import { TextField } from '@ori-ui/mui';\nimport { useContext } from 'react';\n\nimport { stateContext } from '../../contexts';\nimport { useTranslations } from '../../hooks/useTranslations';\n\nexport function Surname() {\n const { formatMessage } = useTranslations();\n const { newCustomer, setCustomerSurname } = useContext(stateContext);\n\n return (\n \n );\n}\n","import { IconButton, ToggleCard } from '@ori-ui/components';\nimport { Add } from '@ori-ui/icons';\nimport type { SelectChangeEvent } from '@ori-ui/mui';\nimport { Typography, styled, Skeleton } from '@ori-ui/mui';\nimport { LogLevel, getLogger } from '@ori/checkout-utils';\nimport type { GlobalCustomersEndConsumersDto } from '@ori/global-api-client-react';\nimport { useCallback, useContext, useEffect, useState } from 'react';\n\nimport { useEndConsumers } from '../../api/useEndConsumers';\nimport { APP_NAME } from '../../constants';\nimport { stateContext, wizardContext } from '../../contexts';\nimport { useTranslations } from '../../hooks/useTranslations';\nimport type { CustomerSelectionProps } from '../../types';\nimport { EWizardCustomerType } from '../../types';\nimport { consultantSummaryToString } from '../../utils';\nimport { FormattedMessage } from '../FormattedMessage';\nimport { SelectField } from '../SelectField';\nimport { FirstName } from './FirstName';\nimport { Surname } from './Surname';\n\nconst logDebug = getLogger(APP_NAME, LogLevel.Debug);\ninterface StyleProps {\n selected: boolean;\n}\n\nconst NewCustomer = styled('div')(({ theme }) => ({\n paddingTop: theme.spacing(2),\n marginTop: theme.spacing(2),\n display: 'grid',\n rowGap: theme.spacing(3),\n}));\n\nconst SelectedBoldTypography = styled(Typography)<{ ownerState: StyleProps }>(({ theme, ownerState }) => ({\n ...(ownerState.selected && {\n fontWeight: 'bold',\n marginBottom: theme.spacing(2),\n }),\n}));\n\nconst SelectNewCustomer = styled('div')(({ theme }) => ({\n display: 'grid',\n gridTemplateColumns: `${theme.spacing(7)} auto`,\n gridTemplateAreas: `\"new-customer-icon new-customer-label\"`,\n paddingTop: theme.spacing(4),\n // fixing the weird gap in the green corner\n marginTop: -1,\n}));\n\nconst SelectNewCustomerLabel = styled(Typography)(({ theme }) => ({\n gridArea: 'new-customer-label',\n display: 'flex',\n alignItems: 'center',\n paddingLeft: theme.spacing(1),\n cursor: 'pointer',\n marginRight: 'auto',\n}));\n\nconst OtherCustomersSectionLoader = styled(Skeleton)({\n height: 53,\n});\n\nexport const OtherCustomersSection = ({ selected, value, onChange }: CustomerSelectionProps) => {\n const { formatMessage } = useTranslations();\n const { customerType } = useContext(wizardContext);\n const { existingCustomer, setExistingCustomer } = useContext(stateContext);\n const { data: endConsumersData, error, isLoading } = useEndConsumers();\n const [selectedNewCustomer, setSelectedNewCustomer] = useState(false);\n logDebug(\n 'OtherCustomersSection isLoading: ',\n isLoading,\n ' | endConsumersData: ',\n endConsumersData,\n ' | error: ',\n error,\n );\n\n useEffect(() => {\n setSelectedNewCustomer(false);\n }, [selected]);\n\n const handleChange = useCallback(\n (event: SelectChangeEvent) => {\n setSelectedNewCustomer(false);\n const customerToSave = endConsumersData?.collection.find(\n (consumer) => consultantSummaryToString(consumer) === event.target.value,\n );\n setExistingCustomer(customerToSave ?? null);\n },\n [endConsumersData?.collection, setExistingCustomer],\n );\n\n const selectNewCustomer = useCallback(() => {\n setExistingCustomer(null);\n setSelectedNewCustomer(true);\n }, [setExistingCustomer]);\n if (customerType === EWizardCustomerType.OnlyForMe) {\n return null;\n }\n\n if (isLoading) {\n return ;\n }\n\n const endConsumers: GlobalCustomersEndConsumersDto['collection'] = endConsumersData?.collection ?? [];\n\n const mapEndConsumers = endConsumers.map((consumer) => {\n const consumerName = consultantSummaryToString(consumer);\n\n return { Id: consumerName, Text: consumerName };\n });\n\n return (\n \n \n \n \n {selected && endConsumers.length > 0 ? (\n \n ) : null}{' '}\n {selected && !selectedNewCustomer ? (\n \n \n \n \n \n \n \n \n ) : null}\n {selected && selectedNewCustomer ? (\n \n \n \n \n ) : null}\n \n );\n};\n","import { styled } from '@ori-ui/mui';\n\nexport const FormGrid = styled('form')(({ theme }) => ({\n display: 'grid',\n rowGap: theme.spacing(3),\n}));\n","import useTestId from '@ori/testid-generator';\nimport type { DetailedHTMLProps, FormEvent, HTMLProps } from 'react';\nimport { forwardRef, useCallback, useContext } from 'react';\n\nimport { MyselfSection, OtherCustomersSection } from '../../../components';\nimport { stateContext } from '../../../contexts';\nimport { FormGrid } from '../../../styled';\nimport { ECustomerTypeSelection } from '../../../types';\n\nexport const CustomerSelectionForm = forwardRef<\n HTMLFormElement,\n DetailedHTMLProps, HTMLFormElement>\n>(({ onChange }, ref) => {\n const { getTestIdProps } = useTestId();\n const { selectedCustomerType, setCustomerType } = useContext(stateContext);\n const handleChange = useCallback(\n ({ currentTarget: { value } }: FormEvent) => {\n setCustomerType(value as ECustomerTypeSelection);\n },\n [setCustomerType],\n );\n\n return (\n \n \n \n \n );\n});\n","/* eslint-disable @typescript-eslint/naming-convention -- headers */\nimport { RestError } from '@azure/ms-rest-js';\nimport type { EventData as ErrorEventData } from '@ori-events/subscription-error';\nimport type { EventData } from '@ori-events/subscription-saved';\nimport { Button, styled, Typography } from '@ori-ui/mui';\nimport { useToken } from '@ori/auth';\nimport { axios } from '@ori/axios';\nimport type { GlobalCustomersSubscriptionInstructionDto } from '@ori/global-api-client-react';\nimport { useLogger } from '@ori/logger';\nimport useTestId from '@ori/testid-generator';\nimport applyCaseMiddleware from 'axios-case-converter';\nimport { useCallback, useContext, useState } from 'react';\n\nimport { FormattedMessage } from '../../../components/FormattedMessage';\nimport { stateContext, wizardContext } from '../../../contexts';\nimport { useConfiguration } from '../../../contexts/configurationContext';\nimport { ECustomerTypeSelection, EWizardType } from '../../../types';\nimport { getSafeUrl } from '../../../utils/getSafeUrl';\nimport { CustomerSelectionForm } from './CustomerSelectionForm';\n\nconst StyledCustomerSelection = styled('div')(({ theme }) => ({\n display: 'grid',\n rowGap: theme.spacing(1),\n maxHeight: '60vh',\n marginTop: theme.spacing(3),\n width: '100%',\n overflow: 'visible',\n}));\n\nconst client = applyCaseMiddleware(axios.create(), {\n // preserve keys in translations that represent locales, e.g. en-GB, ka-GE\n preservedKeys: (input) => /^[A-Za-z]{2}-[A-Za-z]{2}$/.test(input),\n caseFunctions: {\n // overrides built-in snake function to keep the keys of outcoming data in camelCase\n snake: (input) => input.replaceAll(/[^\\dA-Za-z]+(.)/g, (_, char: string) => char.toUpperCase()),\n },\n});\n\nexport function CustomerSelection() {\n const { getTestIdProps } = useTestId();\n const { isCustomerSelectionValid, selectedPackage, newCustomer, existingCustomer, selectedCustomerType } =\n useContext(stateContext);\n const { onClose, onSave, onError, handleOpenFeedback, productCode } = useContext(wizardContext);\n const { customerId, globalApiUrl, placement, tenant, uriTemplate } = useConfiguration();\n const [isDisabled, setIsDisabled] = useState(false);\n\n const { formattedToken } = useToken();\n\n const logger = useLogger('CustomerSelection');\n\n const customerIdToPost =\n selectedCustomerType === ECustomerTypeSelection.ExistingCustomer ? existingCustomer?.endConsumerId : null;\n\n const postSubscription = useCallback(async () => {\n setIsDisabled(true);\n\n const subscriptionInstructionsToPost: GlobalCustomersSubscriptionInstructionDto = {\n newConsumer: newCustomer\n ? {\n firstName: newCustomer.firstName,\n lastName: newCustomer.surname,\n }\n : undefined,\n existingConsumerId: customerIdToPost ?? undefined,\n packageId: selectedPackage ? selectedPackage.packageId : 0,\n status: 'Finished',\n };\n\n try {\n const subscriptionInstructionsUrl = getSafeUrl(`/customers/${customerId}/subscriptionInstructions`, globalApiUrl);\n const { data } = await client.post(\n subscriptionInstructionsUrl,\n { ...subscriptionInstructionsToPost },\n {\n headers: {\n 'Content-Type': 'application/json',\n 'x-placement': placement,\n 'x-referer': uriTemplate,\n 'x-tenant-context': tenant,\n authorization: formattedToken,\n },\n },\n );\n\n const detail: EventData = {\n type: EWizardType.Subscription,\n productCode,\n subscriptionId: Number(data.newSubscriptionId),\n };\n\n onSave({ detail });\n onClose();\n handleOpenFeedback();\n } catch (error: unknown) {\n logger.error(error as Error, { action: 'postSubscription' });\n if (error instanceof RestError) {\n const detail: ErrorEventData = {\n type: EWizardType.Subscription,\n error: {\n code: Number(error.response?.status),\n message: String(error.body),\n },\n };\n onError({ detail });\n onClose();\n }\n }\n }, [\n newCustomer,\n customerIdToPost,\n selectedPackage,\n customerId,\n globalApiUrl,\n placement,\n uriTemplate,\n tenant,\n formattedToken,\n productCode,\n onSave,\n onClose,\n handleOpenFeedback,\n logger,\n onError,\n ]);\n\n return (\n \n \n \n \n \n \n \n \n \n );\n}\n","import { PackageSelection } from '../../components/PackageSelection';\nimport { CustomerSelection } from './CustomerSelection';\n\nexport const Pages = [PackageSelection, CustomerSelection] as const;\n","import { useContext, useEffect, useState } from 'react';\n\nimport { typesContext } from '../contexts';\nimport type { Package } from '../types';\n\nexport const usePackageSelectionLogic = (filter: number) => {\n const { types, isLoading } = useContext(typesContext);\n const [packages, setPackages] = useState([]);\n\n const categories = types.filter((type) => type.isSubscriptionEnabled);\n\n // logic for sorting and merging the packages\n\n useEffect(() => {\n const filteredPackages = types.map((type) => {\n if ((type.typeId === filter || !filter) && type.isSubscriptionEnabled) {\n return type.packages;\n }\n\n return [];\n });\n const flatPackages = filteredPackages.flat();\n setPackages(flatPackages);\n }, [filter, types]);\n\n return { packages, categories, isLoading };\n};\n","/**\n * Utility function which wraps javascript URL object. It preserves entire url (including pathname) of origin¨\n */\nexport const getSafeUrl = (path: string, origin: string) => {\n if (!origin) {\n return path;\n }\n\n const originUrl = new URL(origin.endsWith('/') ? origin : `${origin}/`);\n\n // Get pathname from origin as prefix and get path without leading slash\n const newPathname = `${originUrl.pathname}${path.slice(1)}`;\n\n const { href } = new URL(newPathname, originUrl.origin);\n\n return href;\n};\n","import { Dialog, FeedbackNotification } from '@ori-ui/components';\nimport { Subscription } from '@ori-ui/icons';\nimport { styled } from '@ori-ui/mui';\nimport { LogLevel, getLogger } from '@ori/checkout-utils';\nimport useTestId from '@ori/testid-generator';\nimport { useContext, useMemo } from 'react';\n\nimport { FormattedMessage } from '../components/FormattedMessage';\nimport { APP_NAME } from '../constants';\nimport { stateContext, wizardContext } from '../contexts';\nimport { useTranslations } from '../hooks/useTranslations';\nimport { Pages } from './pages';\n\nconst logDebug = getLogger(APP_NAME, LogLevel.Debug);\n\nconst ContentWrap = styled('div')(({ theme }) => ({\n minWidth: 200,\n padding: '3px',\n [theme.breakpoints.up('md')]: {\n width: 400,\n },\n}));\n\nexport function SubscriptionWizard() {\n const { getTestIdProps } = useTestId();\n const { formatMessage } = useTranslations();\n const { handleCloseFeedback, isFeedbackOpen, open, onClose } = useContext(wizardContext);\n const { isBackEnabled, stepBack, currentStep } = useContext(stateContext);\n\n const CurrentPage = useMemo(() => Pages[currentStep], [currentStep]);\n\n const heading = useMemo(() => formatMessage('newSubscription'), [formatMessage]);\n\n logDebug('SubscriptionWizard currentStep: ', currentStep);\n\n return (\n <>\n \n {typeof CurrentPage === 'function' ? :
}\n \n }\n onClose={handleCloseFeedback}\n {...getTestIdProps('subscription-wizard-feedback')}\n >\n \n \n \n );\n}\n","import { LogLevel, getLogger, errorHandlingSwrOptions } from '@ori/checkout-utils';\nimport { useGetCustomerSubscriptionTypes } from '@ori/global-api-client-react';\n\nimport { APP_NAME } from '../constants';\nimport { useConfiguration } from '../contexts/configurationContext';\n\nconst logDebug = getLogger(APP_NAME, LogLevel.Debug);\n\nexport function useSubscriptionTypes(product?: string) {\n const { customerId, tenant } = useConfiguration();\n const params = {\n ...(product ? { product: product.toString() } : {}),\n };\n const headers = { 'x-tenant-context': tenant };\n const swrOptions = {\n ...errorHandlingSwrOptions,\n onSuccess: () => {\n logDebug('useSubscriptionTypes() hook finished successfully');\n },\n };\n\n const {\n data,\n error,\n isValidating: isLoading,\n } = useGetCustomerSubscriptionTypes(customerId, params, headers, { swr: swrOptions });\n\n return {\n data,\n error,\n isLoading,\n };\n}\n","import type { Dispatch } from 'react';\n\nexport function wrapActionWithDispatch(\n dispatch: Dispatch,\n action: (...args: Args) => R,\n) {\n return (...args: Args) => dispatch(action(...args));\n}\n","import type { GlobalCustomersEndConsumerDto } from '@ori/global-api-client-react';\nimport type { ChangeEvent } from 'react';\n\nimport type { ECustomerTypeSelection, Package } from '../../types';\nimport type { Frequency } from '../../types/Frequency';\n\nexport function setCurrentStep(step: number) {\n return { type: 'setCurrentStep', step } as const;\n}\n\nexport function setPackage(packageItem?: Package) {\n return { type: 'setPackage', packageItem } as const;\n}\n\nexport function setCustomerType(customerType: ECustomerTypeSelection) {\n return { type: 'setCustomerType', customerType } as const;\n}\n\nexport function setExistingCustomer(existingCustomer: GlobalCustomersEndConsumerDto | null) {\n return { type: 'setExistingCustomer', existingCustomer } as const;\n}\n\nexport function setFrequency(item?: Frequency | null) {\n return { type: 'setFrequency', item } as const;\n}\n\nexport function setCustomerName({\n currentTarget: { value: firstName },\n}: ChangeEvent) {\n return { type: 'setCustomerName', firstName } as const;\n}\n\nexport function setCustomerSurname({\n currentTarget: { value: surname },\n}: ChangeEvent) {\n return { type: 'setCustomerSurname', surname } as const;\n}\n\nexport function goToSummary() {\n return { type: 'goToSummary' } as const;\n}\n\nexport function stepBack() {\n return { type: 'stepBack' } as const;\n}\n\nexport function setTermsAndConditions({\n currentTarget: { checked: termsAndConditionsAccepted },\n}: ChangeEvent) {\n return { type: 'setTermsAndConditions', termsAndConditionsAccepted } as const;\n}\n","import type { Dispatch } from 'react';\n\nimport type { ContextState } from '../../../types';\n\nexport function useBackStep([prevState, dispatch]: [ContextState, Dispatch]): [ContextState, Dispatch] {\n return [\n {\n ...prevState,\n isBackEnabled: prevState.currentStep !== 0,\n },\n dispatch,\n ];\n}\n","import type { Dispatch } from 'react';\n\nimport type { ContextState } from '../../../types';\nimport { ECustomerTypeSelection } from '../../../types';\n\nexport function useCustomerValidation([prevState, dispatch]: [ContextState, Dispatch]): [\n ContextState,\n Dispatch,\n] {\n const { newCustomer, existingCustomer, selectedCustomerType } = prevState;\n let isCustomerSelectionValid = Boolean(selectedCustomerType);\n if (selectedCustomerType === ECustomerTypeSelection.ExistingCustomer) {\n isCustomerSelectionValid = Boolean(\n (Boolean(existingCustomer) || (newCustomer?.firstName && newCustomer.surname)) &&\n !(Boolean(existingCustomer) && (Boolean(newCustomer?.firstName) || Boolean(newCustomer?.surname))),\n );\n }\n\n return [\n {\n ...prevState,\n isCustomerSelectionValid,\n },\n dispatch,\n ];\n}\n","import type { ContextState } from '../../types';\nimport type { ActionType } from './types';\n\nexport function reducer(prevState: ContextState, action: ActionType): ContextState {\n const { currentStep } = prevState;\n switch (action.type) {\n case 'setTermsAndConditions': {\n const { termsAndConditionsAccepted } = action;\n\n return {\n ...prevState,\n termsAndConditionsAccepted,\n };\n }\n case 'stepBack': {\n return {\n ...prevState,\n currentStep: currentStep - 1,\n };\n }\n case 'goToSummary': {\n return {\n ...prevState,\n currentStep: currentStep + 1,\n };\n }\n case 'setCurrentStep': {\n return {\n ...prevState,\n currentStep: action.step,\n };\n }\n\n case 'setFrequency': {\n return {\n ...prevState,\n selectedFrequency: action.item,\n };\n }\n\n case 'setExistingCustomer': {\n return {\n ...prevState,\n newCustomer: undefined,\n existingCustomer: action.existingCustomer,\n };\n }\n case 'setPackage': {\n return {\n ...prevState,\n selectedPackage: action.packageItem,\n currentStep: currentStep + 1,\n };\n }\n case 'setCustomerType': {\n return {\n ...prevState,\n selectedCustomerType: action.customerType,\n existingCustomer: null,\n newCustomer: undefined,\n };\n }\n case 'setCustomerName': {\n const { newCustomer } = prevState;\n\n return {\n ...prevState,\n existingCustomer: null,\n newCustomer: {\n ...newCustomer,\n firstName: action.firstName,\n },\n };\n }\n case 'setCustomerSurname': {\n const { newCustomer } = prevState;\n\n return {\n ...prevState,\n existingCustomer: null,\n newCustomer: {\n ...newCustomer,\n surname: action.surname,\n },\n };\n }\n default:\n return prevState;\n }\n}\n","import { useContext, useEffect, useReducer, useRef } from 'react';\n\nimport { wizardContext } from '../../contexts/wizard-context';\nimport type { ContextState } from '../../types';\nimport { ECustomerTypeSelection, EWizardCustomerType } from '../../types';\nimport { useMiddleware } from '../../utils';\nimport { buildSetters } from './buildSetters';\nimport { useBackStep, useCustomerValidation } from './middleware';\nimport { reducer } from './reducer';\n\nexport function useReducerState({ currentStep = 1, isBackEnabled = false, ...rest }: Partial) {\n const [state, dispatch] = useMiddleware(\n useBackStep,\n useCustomerValidation,\n )(\n useReducer(reducer, {\n currentStep,\n isBackEnabled,\n termsAndConditionsAccepted: false,\n ...rest,\n }),\n );\n const { customerType } = useContext(wizardContext);\n const { current: actions } = useRef(buildSetters(dispatch));\n\n useEffect(() => {\n if (customerType === EWizardCustomerType.OnlyForOtherCustomers) {\n actions.setCustomerType(ECustomerTypeSelection.ExistingCustomer);\n } else {\n actions.setCustomerType(ECustomerTypeSelection.Myself);\n }\n }, [customerType, actions]);\n\n return { ...state, ...actions } as const;\n}\n","import type { MiddlewareType } from '../types';\n\nexport function useMiddleware(...middleware: Array>) {\n return middleware.reduce((current, acc) => (args: [State, Dispatch]) => current(acc(args)));\n}\n","import type { Dispatch } from 'react';\n\nimport { wrapActionWithDispatch } from '../../utils';\nimport {\n goToSummary,\n setCurrentStep,\n setCustomerName,\n setCustomerSurname,\n setCustomerType,\n setExistingCustomer,\n setFrequency,\n setPackage,\n setTermsAndConditions,\n stepBack,\n} from './actions';\nimport type { ActionType } from './types';\n\nexport function buildSetters(dispatch: Dispatch) {\n return {\n setCurrentStep: wrapActionWithDispatch(dispatch, setCurrentStep),\n setPackage: wrapActionWithDispatch(dispatch, setPackage),\n setCustomerType: wrapActionWithDispatch(dispatch, setCustomerType),\n setExistingCustomer: wrapActionWithDispatch(dispatch, setExistingCustomer),\n setCustomerName: wrapActionWithDispatch(dispatch, setCustomerName),\n setCustomerSurname: wrapActionWithDispatch(dispatch, setCustomerSurname),\n stepBack: wrapActionWithDispatch(dispatch, stepBack),\n setFrequency: wrapActionWithDispatch(dispatch, setFrequency),\n goToSummary: wrapActionWithDispatch(dispatch, goToSummary),\n setTermsAndConditions: wrapActionWithDispatch(dispatch, setTermsAndConditions),\n } as const;\n}\n","import type { FC, PropsWithChildren } from 'react';\n\nimport { StateProvider } from '../contexts';\nimport { useReducerState } from '../hooks';\n\nexport const StateContainer: FC = ({ children }) => {\n const state = useReducerState({ currentStep: 0 });\n\n return {children};\n};\n","import { LogLevel, getLogger } from '@ori/checkout-utils';\n\nimport { SubscriptionWizard } from '../SubscriptionWizard';\nimport { useSubscriptionTypes } from '../api/useSubscriptionTypes';\nimport { APP_NAME } from '../constants';\nimport { TypesProvider } from '../contexts';\nimport { StateContainer } from './StateContainer';\n\nconst logDebug = getLogger(APP_NAME, LogLevel.Debug);\n\nexport const SubscriptionContainer = ({ product }: { product?: string }) => {\n logDebug('SubscriptionContainer product:', product);\n const { data, error, isLoading } = useSubscriptionTypes(product);\n logDebug('SubscriptionContainer isLoading: ', isLoading, ' | data: ', data, ' | error: ', error);\n\n return (\n \n \n \n \n \n );\n};\n","import { LogLevel, getLogger } from '@ori/checkout-utils';\nimport { Suspense, useContext } from 'react';\n\nimport { WizardLoader } from '../components';\nimport { APP_NAME } from '../constants';\nimport { wizardContext } from '../contexts';\nimport { SubscriptionContainer } from './SubscriptionContainer';\n\nconst logDebug = getLogger(APP_NAME, LogLevel.Debug);\n\nexport const SubscriptionTypesContainer = () => {\n const { wizardType, productCode, id, open } = useContext(wizardContext);\n logDebug(\n 'SubscriptionTypesContainer type: ',\n wizardType,\n ' | open: ',\n open,\n ' | product: ',\n productCode,\n ' | id: ',\n id,\n );\n\n if (!wizardType) {\n logDebug('SubscriptionTypesContainer return null');\n\n return null;\n }\n\n return (\n }>\n \n \n );\n};\n","import { Logger } from '@ori/logger';\n\nimport { PACKAGE_NAME } from './constants';\n\nexport const mainLogger = new Logger(PACKAGE_NAME);\n","import type { ErrorBoundaryFallback } from '@ori/checkout-utils';\n\nexport const errorFallback: ErrorBoundaryFallback = (\n
\n

Ooops... something went wrong

\n
\n);\n","import { ErrorBoundary, LogLevel, getLogger } from '@ori/checkout-utils';\nimport { TranslationsNamespaceProvider, TranslationsProvider } from '@ori/i18n';\nimport { LoggerProvider } from '@ori/logger';\nimport { Team, TestIdProvider } from '@ori/testid-generator';\nimport { Suspense, type FC, StrictMode } from 'react';\n\nimport { APP_NAME, translationsNamespace } from './constants';\nimport { ApiProvider, SubscriptionTypesContainer, WizardContainer } from './containers';\nimport { ConfigurationProvider } from './contexts/configurationContext';\nimport { mainLogger } from './logger';\nimport type { ClientAppConfig } from './types/ClientAppConfig';\nimport { errorFallback, getTranslationsProps } from './utils';\n\nexport interface AppProps {\n readonly configuration: ClientAppConfig;\n}\n\nconst logDebug = getLogger(APP_NAME, LogLevel.Debug);\n\nexport const SubscriptionWizardController: FC = ({ configuration }) => {\n const translationProps = getTranslationsProps(configuration);\n logDebug(\n `Rendering SubscriptionWizardController ...`,\n '\\n\\tConfiguration: ',\n configuration,\n '\\n\\tTranslationProps: ',\n translationProps,\n );\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","import { type TranslationsContext } from '@ori/i18n';\n\nimport { defaultTranslations, translationsNamespace } from '../constants';\nimport { mainLogger } from '../logger';\nimport type { ClientAppConfig } from '../types';\n\nexport const getTranslationsProps = ({ currentLanguage, staticApiUrl, tenant, translations }: ClientAppConfig) => {\n const result: TranslationsContext = {\n clientFetchConfiguration: {\n baseUrl: staticApiUrl,\n onError: (error) => {\n mainLogger.error(error as Error, { action: 'Loading translations.' });\n },\n tenant,\n },\n currentLanguage,\n defaultTranslationsWithNamespaces: { [translationsNamespace]: defaultTranslations },\n translationsWithNamespaces: translations ? { [translationsNamespace]: translations } : undefined,\n };\n\n return result;\n};\n","import { type ClientAppConfig, SubscriptionWizardController } from '@ori/subscription-wizard-lib';\nimport { type FC } from 'react';\n\n// Cutting out optional translations still possibly serialized on the root element.\nexport const App: FC = ({ translations, ...configuration }) => (\n \n);\n","import { Logger } from '@ori/logger';\n\nimport { PACKAGE_NAME } from './constants';\n\nexport const mainLogger = new Logger(PACKAGE_NAME);\n","import { ThemeProvider } from '@ori-ui/mui';\nimport { UniversalTokenProvider } from '@ori/auth';\nimport { ErrorBoundary, getLogger, LogLevel } from '@ori/checkout-utils';\nimport { ApplicationInsights, getClientApplicationInsightsConfig } from '@ori/logger';\nimport { getConfiguration } from '@ori/subscription-wizard-lib';\nimport { createRoot } from 'react-dom/client';\n\nimport { App } from './App';\nimport { APP_NAME, EMOTION_CACHE_KEY } from './constants';\nimport { mainLogger } from './logger';\n\n/**\n * React app renderer that is used when app is used as a standalone app\n */\nexport async function render(rootElement: HTMLElement) {\n const { config = '' } = rootElement.dataset;\n const clientAppConfig = getConfiguration(config);\n const { customerId } = clientAppConfig;\n const logDebug = getLogger(APP_NAME, LogLevel.Debug);\n\n // Get token for local development\n if (process.env.NODE_ENV !== 'production') {\n // when using Requestly we do not want to load token\n if (process.env.REACT_APP_USE_REQUESTLY === '1') {\n logDebug('USING REQUESTLY :)');\n } else {\n // using msw for local dev\n const { worker } = await import('./mocks/browser');\n await worker.start();\n logDebug('USING MSW :)');\n }\n }\n\n // Initialize Application Insights in production\n if (process.env.NODE_ENV === 'production') {\n ApplicationInsights.initialize(getClientApplicationInsightsConfig());\n }\n\n createRoot(rootElement).render(\n \n \n \n \n \n \n ,\n );\n}\n"],"names":["APP_NAME","logInfo","getInfoLogger","getConfiguration","config","result","parseClientAppConfig","defaultTranslations","all","customer","deliveryAddress","deliveryInformationTooltip","deliveryMethod","everyCatalogue","everySecondCatalogue","everyThirdCatalogue","for","frequency","homeDelivery","myself","name","newCustomer","newSubscription","nextStep","payNow","paymentMethod","pleaseWait","priceTooltip","product","save","selectCustomer","selectFrequency","subscribed","subscriptionReview","surname","termsAndConditions","totalCostForThisPeriod","translationsNamespace","configurationContext","createContext","currentLanguage","customerId","globalApiUrl","staticApiUrl","identityUrl","onBehalfCustomerId","placement","tenant","uriTemplate","ConfigurationProvider","Provider","useConfiguration","useContext","swrConfig","focusThrottleInterval","suspense","basicSwrOptions","ApiProvider","children","formattedToken","token","useToken","globalClientProps","baseUrl","language","timeout","staticClientProps","_jsx","SWRConfig","value","GlobalApiClientProvider","StaticApiClientProvider","wizardContext","WizardProvider","eventName","dispatch","data","event","CustomEvent","globalThis","dispatchEvent","listen","callback","options","addEventListener","clean","removeEventListener","EWizardCustomerType","useSubscriptionLogic","openLogic","open","setOpen","useState","isFeedbackOpen","setIsFeedbackOpen","key","setKey","customerType","setCustomerType","wizardType","setWizardType","productCode","setProductCode","handleOpenEvent","useCallback","detail","initialCustomerType","All","code","type","initialWizardType","current","useEffect","handleClose","handleCloseFeedback","handleOpenFeedback","useOpenEvent","handleSave","handleError","logDebug","getLogger","LogLevel","Debug","WizardContainer","onClose","onError","onSave","id","WizardLoader","getTestIdProps","useTestId","Dialog","hideCloseButton","style","display","alignItems","justifyItems","height","CircularProgress","FormattedMessage","props","NotTypedFormattedMessage","stateContext","StateProvider","useTranslations","useTranslationsFromNamespace","typesContext","TypesProvider","ScrollableContent","styled","theme","breakpoints","up","maxHeight","StyledModalContent","rowGap","spacing","marginTop","width","down","paddingRight","ModalContent","dataId","ImageWrapper","marginLeft","borderRadius","shape","PackagePicture","url","alt","getTestId","useTheme","testId","CheckoutImage","component","src","size","background","palette","grey","LoaderContainer","ItemLoader","Skeleton","transform","PackageLoader","skeletonItemsPackage","_Fragment","Array","from","length","fill","map","_","index","PackagesLoader","isMobile","useMediaQuery","_jsxs","Filters","Packages","overflow","paddingBottom","color","PackageButton","Button","justifyContent","padding","PackageLabel","Typography","textAlign","textTransform","text","primary","ECustomerTypeSelection","EWizardType","SelectedBoldTypography","ownerState","selected","fontWeight","MyselfSection","forwardRef","onChange","ref","OnlyForOtherCustomers","ToggleCard","checked","consultantSummaryToString","item","firstName","lastName","SelectField","items","label","placeholder","hintText","displayEmpty","disabled","enabledReset","FormControl","fullWidth","InputLabel","htmlFor","Select","required","MenuItem","Id","Text","FormHelperText","FirstName","formatMessage","setCustomerName","TextField","variant","Surname","setCustomerSurname","NewCustomer","paddingTop","marginBottom","SelectNewCustomer","gridTemplateColumns","gridTemplateAreas","SelectNewCustomerLabel","gridArea","paddingLeft","cursor","marginRight","OtherCustomersSectionLoader","OtherCustomersSection","existingCustomer","setExistingCustomer","endConsumersData","error","isLoading","headers","swrOptions","errorHandlingSwrOptions","onSuccess","isValidating","useGetCustomerEndConsumers","swr","useEndConsumers","selectedNewCustomer","setSelectedNewCustomer","handleChange","customerToSave","collection","find","consumer","target","selectNewCustomer","OnlyForMe","animation","endConsumers","mapEndConsumers","consumerName","tabIndex","IconButton","onClick","onKeyDown","Add","fontSize","FormGrid","CustomerSelectionForm","selectedCustomerType","currentTarget","Myself","ExistingCustomer","StyledCustomerSelection","client","applyCaseMiddleware","axios","create","preservedKeys","input","test","caseFunctions","snake","replaceAll","char","toUpperCase","Pages","setPackage","selectedPackage","filter","setFilter","packages","categories","types","setPackages","isSubscriptionEnabled","flatPackages","typeId","flat","usePackageSelectionLogic","categoryTypeId","onClickSetFilter","categoryFilter","Chip","clickable","sx","undefined","category","description","disableRipple","startIcon","imageSrc","packageId","borderColor","autoshipPackage","isCustomerSelectionValid","isDisabled","setIsDisabled","logger","useLogger","customerIdToPost","endConsumerId","postSubscription","async","subscriptionInstructionsToPost","newConsumer","existingConsumerId","status","subscriptionInstructionsUrl","getSafeUrl","path","origin","originUrl","URL","endsWith","newPathname","pathname","slice","href","post","authorization","Subscription","subscriptionId","Number","newSubscriptionId","action","RestError","response","message","String","body","ContentWrap","minWidth","SubscriptionWizard","isBackEnabled","stepBack","currentStep","CurrentPage","useMemo","heading","disableEnforceFocus","header","showBackButton","onBack","FeedbackNotification","icon","wrapActionWithDispatch","args","setCurrentStep","step","packageItem","setFrequency","goToSummary","setTermsAndConditions","termsAndConditionsAccepted","useBackStep","prevState","useCustomerValidation","Boolean","reducer","selectedFrequency","useReducerState","rest","state","middleware","reduce","acc","useMiddleware","useReducer","actions","useRef","buildSetters","StateContainer","SubscriptionContainer","params","toString","useGetCustomerSubscriptionTypes","useSubscriptionTypes","SubscriptionTypesContainer","Suspense","fallback","mainLogger","Logger","errorFallback","SubscriptionWizardController","configuration","translationProps","getTranslationsProps","translations","clientFetchConfiguration","defaultTranslationsWithNamespaces","translationsWithNamespaces","ErrorBoundary","appName","StrictMode","LoggerProvider","TestIdProvider","team","Team","Checkout","project","TranslationsProvider","TranslationsNamespaceProvider","namespace","App","PACKAGE_NAME","render","rootElement","dataset","clientAppConfig","ApplicationInsights","initialize","getClientApplicationInsightsConfig","createRoot","UniversalTokenProvider","initialToken","ThemeProvider","enableCacheProvider","cacheKey","EMOTION_CACHE_KEY"],"sourceRoot":""}