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X,SACOnZ,EAAAA,EAAAA,KAACyY,GAAG,CAACpC,cAAeA,IAAmB+C,EAE1D,C","sources":["webpack://orinotificationmenu/./src/models/TimeFormats.ts","webpack://orinotificationmenu/./src/utils/isDev.ts","webpack://orinotificationmenu/./src/utils/getToken.ts","webpack://orinotificationmenu/./src/utils/getUrl.ts","webpack://orinotificationmenu/./src/utils/localOperations.ts","webpack://orinotificationmenu/./src/utils/useIsDesktop.ts","webpack://orinotificationmenu/./src/components/DevelopmentEnvironmentProvider/DevelopmentEnvironmentProvider.tsx","webpack://orinotificationmenu/./src/components/Loading/Loading.tsx","webpack://orinotificationmenu/./src/components/NotificationsList/NotificationIcon.tsx","webpack://orinotificationmenu/./src/helpers/userActionEvents.ts","webpack://orinotificationmenu/./src/components/NotificationsList/NotificationListItem.tsx","webpack://orinotificationmenu/./src/utils/dateUtils.ts","webpack://orinotificationmenu/./src/components/NotificationsList/NotificationList.tsx","webpack://orinotificationmenu/./src/utils/stringUtil.ts","webpack://orinotificationmenu/./src/containers/ApiProvider/ApiProvider.tsx","webpack://orinotificationmenu/./src/containers/ErrorBoundary/ErrorBoundary.tsx","webpack://orinotificationmenu/./src/contexts/configurationContext.ts","webpack://orinotificationmenu/./src/queries/useLocalizationQuery.ts","webpack://orinotificationmenu/./src/containers/I18nContainer/I18nContainer.tsx","webpack://orinotificationmenu/./src/components/DeleteNotificationSnackback/DeleteNotificationSnackback.tsx","webpack://orinotificationmenu/./src/components/ScrollableBox/ScrollableBox.tsx","webpack://orinotificationmenu/./src/utils/isOnBehalf.ts","webpack://orinotificationmenu/./src/queries/useNotificationDeleteQuery.ts","webpack://orinotificationmenu/./src/helpers/removeUtmParams.ts","webpack://orinotificationmenu/./src/queries/useNotificationsQuery.ts","webpack://orinotificationmenu/./src/containers/NotificationsMenu/NotificationsMenu.tsx","webpack://orinotificationmenu/./src/queries/useMarkAsViewedQuery.ts","webpack://orinotificationmenu/./src/queries/useUndeleteNotificationQuery.ts","webpack://orinotificationmenu/./src/App.tsx","webpack://orinotificationmenu/./src/AppRender.tsx"],"sourcesContent":["export enum TimeFormats {\n Now = 'Now',\n Minute = 'Minute',\n Hour = 'Hour',\n Day = 'Day',\n Week = 'Week',\n}\n","export const isDev = process.env.NODE_ENV !== 'production';\n","import { OidcAccessToken, OidcClient, OidcTokenStorage } from '@ori/auth';\n\nimport { isDev } from './isDev';\n\nexport interface TokenConfiguration {\n tenant: string;\n identityUrl?: string;\n forceReload?: boolean;\n}\n\nexport const getToken = async ({ tenant, identityUrl, forceReload }: TokenConfiguration) => {\n if (window.ori?.tokenService) {\n const oriToken = await window.ori.tokenService.getToken();\n\n if (oriToken) {\n return new OidcAccessToken(oriToken.Token);\n }\n }\n\n // only on dev machine, not needed elsewhere\n if (isDev) {\n const oidcTokenStorage = new OidcTokenStorage();\n let token;\n\n try {\n token = oidcTokenStorage.getAccessToken();\n } catch {\n return undefined;\n }\n\n if (token && !forceReload) {\n return token;\n }\n if (identityUrl) {\n const clientId = 'ImplicitTest-V2';\n\n const oidcClient = new OidcClient(\n {\n callbackUrl: '#',\n redirectUrl: window.location.href,\n },\n {\n clientId,\n identityUrl,\n\n acrValues: `tenant:${tenant}`,\n scope: 'openid profile user_identification',\n },\n );\n\n oidcClient.doLogin();\n }\n }\n\n throw new Error('Unsupported token configuration');\n};\n","import type { AxiosRequestConfig, AxiosRequestHeaders } from 'axios';\nimport axios from 'axios';\n\nimport { getToken } from './getToken';\nimport { isDev } from './isDev';\n\nexport interface GetUrlOptions {\n identityUrl: string;\n tenant: string;\n}\n\nasync function getRequestConfig(\n options: AxiosRequestConfig & GetUrlOptions,\n): Promise {\n const { identityUrl, tenant, ...config } = options;\n const token = await getToken({\n identityUrl,\n tenant,\n });\n\n const headers: AxiosRequestHeaders = {\n ...config.headers,\n ...(token && { Authorization: token.toString() }),\n 'x-tenant-context': tenant,\n 'X-Client-Application': 'Web',\n };\n\n return {\n ...config,\n headers,\n };\n}\n\nconst isSuccess = (status: number): boolean => status.toString().startsWith('2');\n\nexport async function getUrl(\n url: string,\n options: AxiosRequestConfig & GetUrlOptions,\n): Promise {\n const config = await getRequestConfig(options);\n const { data } = await axios.get(url, config);\n\n return data;\n}\n\nexport async function postUrl(\n url: string,\n data: unknown,\n options: AxiosRequestConfig & GetUrlOptions,\n): Promise {\n const config = await getRequestConfig(options);\n\n try {\n const result = isDev ? await axios.get(url, options) : await axios.post(url, data, config);\n\n return isSuccess(result.status);\n } catch {\n return false;\n }\n}\n\nexport async function deleteUrl(\n url: string,\n options: AxiosRequestConfig & GetUrlOptions,\n): Promise {\n const config = await getRequestConfig(options);\n\n try {\n const result = isDev ? await axios.get(url, options) : await axios.delete(url, config);\n\n return isSuccess(result.status);\n } catch {\n return false;\n }\n}\n","import type { InAppNotificationDto, NotificationsData } from '~/models';\n\nfunction getNotificationsOrDefault(\n notifications: NotificationsData | undefined,\n): NotificationsData {\n return (\n notifications ?? {\n newNotificationsCount: 0,\n notifications: {\n new: [],\n earlier: [],\n },\n }\n );\n}\n\nexport function deleteNotificationLocally(\n localNotifications: NotificationsData | undefined,\n notificationId: string,\n): NotificationsData {\n const notifications = getNotificationsOrDefault(localNotifications);\n\n return {\n newNotificationsCount: notifications.newNotificationsCount - 1,\n notifications: {\n new: (notifications.notifications.new as InAppNotificationDto[]).filter(\n (n) => n.NotificationId !== notificationId,\n ),\n earlier: (notifications.notifications.earlier as InAppNotificationDto[]).filter(\n (n) => n.NotificationId !== notificationId,\n ),\n },\n };\n}\n\nexport function markAsViewedLocally(\n localNotifications: NotificationsData | undefined,\n notificationId: string,\n): NotificationsData {\n const notifications = getNotificationsOrDefault(localNotifications);\n\n return {\n newNotificationsCount: notifications.newNotificationsCount,\n notifications: {\n new: (notifications.notifications.new as InAppNotificationDto[]).map((n) => ({\n ...n,\n IsViewed: n.NotificationId === notificationId ? true : n.IsViewed,\n })),\n earlier: (notifications.notifications.earlier as InAppNotificationDto[]).map((n) => ({\n ...n,\n IsViewed: n.NotificationId === notificationId ? true : n.IsViewed,\n })),\n },\n };\n}\n\nfunction insertToArray(array: T[], index: number, newItem: T): T[] {\n return [...array.slice(0, index), newItem, ...array.slice(index)];\n}\n\nexport function undoDeleteLocally({\n localNotifications,\n notification,\n index,\n section,\n}: {\n localNotifications: NotificationsData | undefined;\n notification: InAppNotificationDto;\n index: number;\n section: string;\n}): NotificationsData {\n const notifications = getNotificationsOrDefault(localNotifications);\n\n return {\n newNotificationsCount: notifications.newNotificationsCount + 1,\n notifications: {\n new:\n section === 'new'\n ? insertToArray(\n notifications.notifications.new as InAppNotificationDto[],\n index,\n notification,\n )\n : (notifications.notifications.new as InAppNotificationDto[]),\n earlier:\n section === 'earlier'\n ? insertToArray(\n notifications.notifications.earlier as InAppNotificationDto[],\n index,\n notification,\n )\n : (notifications.notifications.earlier as InAppNotificationDto[]),\n },\n };\n}\n","import { useMediaQuery, useTheme } from '@ori-ui/mui';\n\nexport const useIsDesktop = () => {\n const theme = useTheme();\n\n return useMediaQuery(theme.breakpoints.up(600));\n};\n","import * as ToggleMenuFlyout from '@ori-events/toggle-menu-flyout';\nimport { Button } from '@ori-ui/mui';\nimport React, { useEffect } from 'react';\n\nimport { isDev } from '~/utils';\nimport { useIsDesktop } from '~/utils/useIsDesktop';\n\ninterface DevelopmentEnvironmentProviderProps {\n children: JSX.Element;\n}\n\nconst THROTTLE_DELAY = 100;\n\nconst toggleNotifications = () => {\n const event = new CustomEvent(ToggleMenuFlyout.Name, {\n detail: {\n menuType: ToggleMenuFlyout.MenuTypes.Notifications,\n },\n });\n window.dispatchEvent(event);\n};\n\nexport const DevelopmentEnvironmentProvider: React.FC = ({\n children,\n}) => {\n if (!isDev) {\n return children;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-unsafe-assignment, import/no-extraneous-dependencies -- its only for local development purpose\n const throttle = require('lodash.throttle');\n\n enum TopNavHeight {\n DEFAULT_DESKTOP = 'top-nav-desktop',\n DESKTOP_SHRUNK = 'top-nav-shrunk',\n MOBILE = 'top-nav-mobile',\n }\n\n // eslint-disable-next-line react-hooks/rules-of-hooks -- its only for local development purpose\n const isDesktop = useIsDesktop();\n\n // eslint-disable-next-line react-hooks/rules-of-hooks -- its only for local development purpose\n useEffect(() => {\n const bodyEl = document.body;\n const setTopNavHeight = (className: TopNavHeight) => {\n const { DEFAULT_DESKTOP, DESKTOP_SHRUNK, MOBILE } = TopNavHeight;\n const remove = (cName: TopNavHeight): void => bodyEl.classList.remove(cName);\n const add = (cName: TopNavHeight): void => bodyEl.classList.add(cName);\n switch (className) {\n case DEFAULT_DESKTOP:\n remove(DESKTOP_SHRUNK);\n remove(MOBILE);\n break;\n case DESKTOP_SHRUNK:\n remove(MOBILE);\n add(DESKTOP_SHRUNK);\n break;\n case MOBILE:\n remove(DESKTOP_SHRUNK);\n add(MOBILE);\n break;\n default:\n break;\n }\n };\n\n if (!bodyEl.classList.contains(TopNavHeight.DEFAULT_DESKTOP)) {\n bodyEl.classList.add(TopNavHeight.DEFAULT_DESKTOP);\n }\n\n setTopNavHeight(isDesktop ? TopNavHeight.DEFAULT_DESKTOP : TopNavHeight.MOBILE);\n\n const handleScroll = (): void => {\n const isPageScrolled = window.scrollY > 0;\n let newHeight = TopNavHeight.MOBILE;\n if (isDesktop) {\n newHeight = isPageScrolled ? TopNavHeight.DESKTOP_SHRUNK : TopNavHeight.DEFAULT_DESKTOP;\n }\n setTopNavHeight(newHeight);\n };\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call -- its only for local development purpose\n const throttledHandleScroll = throttle(handleScroll, THROTTLE_DELAY);\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- its only for local development purpose\n window.addEventListener('scroll', throttledHandleScroll);\n\n return () => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- its only for local development purpose\n window.removeEventListener('scroll', throttledHandleScroll);\n };\n }, [isDesktop, TopNavHeight, throttle]);\n\n return (\n <>\n
\n TOP NAVIGATION\n \n Toggle notifications\n \n
\n
\n Some link\n {children}\n
\n \n );\n};\n","import { styled, CircularProgress } from '@ori-ui/mui';\nimport { memo } from 'react';\n\nconst LoadingContainer = styled('div')(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n padding: theme.spacing(8, 0),\n}));\nexport const Loading = memo(() => (\n \n \n \n));\n","import {\n Heart,\n Truck,\n Settings,\n Network,\n Education,\n Editorial,\n Products,\n DiscountTag,\n Conference,\n Wallet,\n Sales,\n Gift,\n InfoCircle,\n WelcomeKit,\n Academy,\n RewardsHearts,\n} from '@ori-ui/icons';\nimport type { SvgIcon } from '@ori-ui/mui';\nimport { styled } from '@ori-ui/mui';\nimport type { FC } from 'react';\n\nexport interface NotificationIconProps {\n iconId: keyof typeof iconMap | null | undefined;\n className?: string;\n}\n\nconst iconMap: { [key: string]: typeof SvgIcon } = {\n heart: Heart,\n truck: Truck,\n settings: Settings,\n network: Network,\n education: Education,\n editorial: Editorial,\n products: Products,\n discount: DiscountTag,\n conference: Conference,\n wallet: Wallet,\n sales: Sales,\n gift: Gift,\n info: InfoCircle,\n welcome: WelcomeKit,\n academy: Academy,\n rewardsHearts: RewardsHearts,\n};\n\nconst Icon = styled('svg')(({ theme }) => ({\n color: theme.palette.text.primary,\n fontSize: theme.spacing(5),\n}));\n\nexport const NotificationIcon: FC = ({ iconId, ...props }) => {\n const iconType = iconId === null || iconId === undefined ? null : iconMap[iconId];\n\n return (\n \n );\n};\n","import * as UserAction from '@ori-events/user-action';\n\nimport type { InAppNotificationDto } from '~/models';\n\nconst app = 'notifications';\n\nexport const removeNotificationEvent = (notification: InAppNotificationDto) => {\n const eventType = 'remove_notification';\n\n const metaHierarchy = [app, eventType, `${notification.Source}`, `${notification.Description}`];\n UserAction.dispatch(metaHierarchy);\n};\n\nexport const selectNotificationEvent = (notification: InAppNotificationDto) => {\n const eventType = 'select_notification';\n\n const metaHierarchy = [app, eventType, `${notification.Source}`, `${notification.Description}`];\n UserAction.dispatch(metaHierarchy);\n};\n","import isPropValid from '@emotion/is-prop-valid';\nimport { LazyImage } from '@ori-ui/components';\nimport { Clear } from '@ori-ui/icons';\nimport {\n styled,\n IconButton,\n ListItem,\n ListItemText,\n ListItemSecondaryAction,\n Typography,\n Collapse,\n} from '@ori-ui/mui';\nimport type { FC, MouseEvent } from 'react';\nimport React, { useEffect, useState } from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport { NotificationIcon } from './NotificationIcon';\nimport { removeNotificationEvent, selectNotificationEvent } from '~/helpers/userActionEvents';\nimport type { InAppNotificationDto } from '~/models';\nimport {\n getDateTimeOffsetSeconds,\n convertOffset,\n currentDateTime,\n getBestFitTimeUnit,\n} from '~/utils';\n\nconst ANIMATION_TIMEOUT = 500;\nconst ANIMATION_TIMEOUT_WITH_IMAGE = 800;\n\nconst NotificationItem = styled(ListItem)(({ theme }) => ({\n padding: 0,\n paddingLeft: theme.spacing(3),\n backgroundColor: '#95E0C926',\n marginTop: 0,\n marginLeft: 1,\n marginRight: 1,\n marginBottom: theme.spacing(2),\n minHeight: theme.spacing(20),\n flexWrap: 'wrap',\n [theme.breakpoints.up(600)]: {\n width: `calc(${theme.spacing(80)} - 0.125rem)`,\n },\n '&:hover': {\n boxShadow: `0px 3px 8px ${theme.palette.grey[200]}`,\n },\n}));\n\nconst BodyPadding = styled('div')(({ theme }) => ({\n padding: theme.spacing(1, 4, 4, 6),\n}));\n\nconst TitleTypography = styled(Typography)(({ theme }) => ({\n padding: theme.spacing(4, 4, 0, 0),\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n fontWeight: 'bold',\n}));\n\nconst TitlePadding = styled('div')(({ theme }) => ({\n padding: theme.spacing(0, 0, 0, 6),\n position: 'relative',\n}));\n\nconst BodyTypography = styled(Typography)(({ theme }) => ({\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n display: '-webkit-box',\n WebkitLineClamp: 5,\n WebkitBoxOrient: 'vertical',\n maxHeight: theme.spacing(22), // Making sure it doesn't overflow in edge-case on iOS\n paddingRight: theme.spacing(5),\n}));\n\nconst ListText = styled(ListItemText)<{ ownerState: { hasImage: boolean } }>(\n ({ theme, ownerState: { hasImage } }) => ({\n margin: ' 0 2.8125rem 3 0',\n ...(hasImage && { maxHeight: theme.spacing(33) }),\n }),\n);\n\nconst TimeStamp = styled(Typography)(() => ({\n fontSize: 12,\n textAlign: 'right',\n paddingRight: 15,\n paddingBottom: 15,\n}));\nconst SecondaryActionListItem = styled(ListItemSecondaryAction, {\n shouldForwardProp: isPropValid,\n})<{ hasImage: boolean }>(({ theme, hasImage }) => ({\n display: 'flex',\n flexDirection: 'column',\n right: 0,\n top: 0,\n transform: 'none',\n bottom: theme.spacing(hasImage ? 37 : 0),\n [theme.breakpoints.up('sm')]: {\n bottom: theme.spacing(hasImage ? 41 : 0),\n },\n}));\nconst CustomSpan = styled('span')(() => ({\n flex: 1,\n}));\nconst DeleteButton = styled(IconButton)(({ theme }) => ({\n alignSelf: 'flex-end',\n padding: theme.spacing(3),\n}));\nconst CustomCross = styled(Clear)(() => ({\n fontSize: '18px !important',\n}));\nconst Icon = styled(NotificationIcon)(({ theme }) => ({\n position: 'absolute',\n top: '17px',\n left: theme.spacing(-1),\n}));\nconst StyledLazyImage = styled(LazyImage)(({ theme }) => ({\n '& .MuiOriLazyImage-image': {\n borderRadius: theme.spacing(2),\n objectFit: 'cover',\n },\n width: '100%',\n height: theme.spacing(35),\n margin: theme.spacing(0, 3, 3, 0),\n [theme.breakpoints.up('sm')]: {\n height: theme.spacing(39),\n },\n}));\n\nexport interface NotificationListItemProps {\n notification: InAppNotificationDto;\n handleDelete: (\n deletedNotification: InAppNotificationDto,\n index: number,\n section: string,\n ) => Promise;\n handleMarkAsViewed: (notificationId: string) => Promise;\n index: number;\n section: string;\n}\n\nexport const NotificationsListItem: FC = ({\n notification,\n handleDelete,\n handleMarkAsViewed,\n index,\n section,\n}) => {\n const [isShowing, setIsShowing] = useState(true);\n const [isDeleting, setIsDeleting] = useState(false);\n\n const { Timestamp, Title, Body, IsViewed, NotificationId, Link, IconId, Image } = notification;\n\n const timeOffsetSeconds = getDateTimeOffsetSeconds(new Date(Timestamp), currentDateTime());\n const bestTimeUnit = getBestFitTimeUnit(timeOffsetSeconds);\n const timeOffset = convertOffset(timeOffsetSeconds, bestTimeUnit);\n\n const handleDeleteOnClick = React.useCallback(\n (event: MouseEvent) => {\n event.stopPropagation();\n removeNotificationEvent(notification);\n setIsDeleting(true);\n },\n [notification],\n );\n\n const handleDeleteOnExited = React.useCallback(() => {\n handleDelete(notification, index, section);\n }, [handleDelete, notification, index, section]);\n\n const itemOnClick = React.useCallback(async () => {\n if (!IsViewed) {\n await handleMarkAsViewed(NotificationId);\n }\n if (Link) {\n document.location.href = Link;\n }\n }, [NotificationId, IsViewed, Link, handleMarkAsViewed]);\n\n const handleItemOnClick = React.useCallback(() => {\n selectNotificationEvent(notification);\n itemOnClick();\n }, [itemOnClick, notification]);\n\n useEffect(() => {\n if (isShowing) {\n setIsShowing(false);\n }\n }, [isShowing]);\n\n const animationTimeout = Image ? ANIMATION_TIMEOUT_WITH_IMAGE : ANIMATION_TIMEOUT;\n\n return (\n \n \n \n \n \n \n {Title}\n \n \n }\n secondary={\n \n \n {Body}\n \n \n }\n ownerState={{ hasImage: !!Image }}\n />\n {Image ? (\n \n ) : null}\n \n \n \n \n \n \n {timeOffset < 1 ? '' : timeOffset}\n \n \n \n \n \n \n );\n};\n","import { TimeFormats } from '~/models/TimeFormats';\n\nexport const currentDateTime = (): Date => new Date();\n\nexport function getBestFitTimeUnit(timeOffset: number): TimeFormats {\n if (timeOffset <= 60) {\n // zero minutes -> now\n return TimeFormats.Now;\n }\n if (timeOffset < 3600) {\n // less then hour -> minutes\n return TimeFormats.Minute;\n }\n if (timeOffset < 86400) {\n // less then day -> hours\n return TimeFormats.Hour;\n }\n if (timeOffset < 604800) {\n // less then week -> days\n return TimeFormats.Day;\n } // more then week -> weeks\n\n return TimeFormats.Week;\n}\n\nexport function convertOffset(offset: number, timeFormat: TimeFormats): number {\n let multiplier = 0 as number;\n switch (timeFormat) {\n case TimeFormats.Now:\n case TimeFormats.Minute:\n multiplier = 60;\n break;\n case TimeFormats.Hour:\n multiplier = 3600;\n break;\n case TimeFormats.Day:\n multiplier = 86400;\n break;\n case TimeFormats.Week:\n multiplier = 604800;\n break;\n default:\n break;\n }\n\n return Math.floor(offset / multiplier);\n}\n\nexport function getDateTimeOffsetSeconds(startDate: Date, endDate: Date): number {\n return (endDate.getTime() - startDate.getTime()) / 1000;\n}\n","import { List, ListItem, ListSubheader, Typography, styled } from '@ori-ui/mui';\nimport useTestId from '@ori/testid-generator';\nimport type { FC } from 'react';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport { NotificationsListItem } from './NotificationListItem';\nimport type { InAppNotificationDto, NotificationsData } from '~/models';\nimport { upperCaseFirst } from '~/utils';\nimport { useIsDesktop } from '~/utils/useIsDesktop';\n\ninterface NotificationListProps {\n notificationsData: NotificationsData;\n handleDelete: (\n deletedNotification: InAppNotificationDto,\n index: number,\n section: string,\n ) => Promise;\n handleMarkAsViewed: (notificationId: string) => Promise;\n}\nconst NotificationListContainer = styled(List)(() => ({\n padding: 0,\n}));\nconst ContainerTitle = styled(ListSubheader)(({ theme }) => ({\n backgroundColor: theme.palette.common.white,\n paddingTop: '1.2rem',\n textAlign: 'center',\n [theme.breakpoints.up(600)]: {\n textAlign: 'inherit',\n },\n}));\nconst EmptyNotificationsList = styled(ListItem)(({ theme }) => ({\n color: theme.palette.grey.A400,\n backgroundColor: theme.palette.common.white,\n justifyContent: 'center',\n zIndex: -1,\n width: '100vw',\n height: 'calc(100vh - var(--top-nav-height) - 3.125rem)',\n [theme.breakpoints.up(600)]: {\n paddingTop: theme.spacing(9),\n paddingBottom: theme.spacing(18),\n width: theme.spacing(80),\n height: 'auto',\n },\n}));\n\nconst NotificationListItem = styled(ListItem)(() => ({\n padding: 0,\n}));\n\nconst NotificationListLayout = styled(List)(() => ({\n width: '100%',\n padding: 0,\n}));\nconst NotificationTitle = styled(ListSubheader)(({ theme }) => ({\n backgroundColor: theme.palette.common.white,\n top: -1,\n marginBottom: 10,\n}));\n\nexport const NotificationList: FC = ({\n notificationsData,\n handleDelete,\n handleMarkAsViewed,\n}) => {\n const isDesktop = useIsDesktop();\n const { getTestIdProps } = useTestId();\n const nonEmptySections = Object.entries(notificationsData.notifications).filter(\n ([_, sectionNotifications]) => sectionNotifications.length > 0,\n );\n\n return (\n \n \n \n \n \n \n {!nonEmptySections.length && (\n \n \n \n \n \n )}\n {nonEmptySections.map(([sectionKey, sectionNotifications]) => (\n \n \n \n \n \n {sectionNotifications.map((notificationItem: InAppNotificationDto, index: number) => (\n \n ))}\n \n \n ))}\n \n );\n};\n","export function upperCaseFirst(text: string) {\n return text[0] ? text[0].toUpperCase() + text.slice(1) : text;\n}\n","import type { AxiosError } from 'axios';\nimport type { FC, PropsWithChildren } from 'react';\nimport type { SWRConfiguration, Revalidator, RevalidatorOptions } from 'swr';\nimport { SWRConfig } from 'swr';\n\nconst swrConfig = {\n errorRetryCount: 3,\n errorRetryInterval: 10000,\n focusThrottleInterval: 300000,\n revalidateOnFocus: false,\n shouldRetryOnError: true,\n suspense: false,\n /* eslint-disable max-params -- library requires too many parameters */\n onErrorRetry: (\n error: AxiosError,\n key: string,\n config: SWRConfiguration,\n revalidate: Revalidator,\n { retryCount }: RevalidatorOptions,\n ) => {\n const statusCode = error.response?.status ?? 200;\n if (statusCode >= 400 && statusCode < 500) {\n return;\n }\n const rCount = retryCount ?? 1;\n if (rCount >= (config.errorRetryCount ?? 0)) {\n return;\n }\n\n setTimeout(() => {\n revalidate({ retryCount: rCount });\n }, config.errorRetryInterval);\n },\n /* eslint-enable max-params */\n};\n\nexport const ApiProvider: FC = ({ children }) => (\n {children}\n);\n","import { Component } from 'react';\n\ninterface ErrorBoundaryProps {\n children: JSX.Element;\n}\n\ninterface ErrorBoundaryState {\n error?: Error;\n}\n\nexport class ErrorBoundary extends Component {\n override readonly state: ErrorBoundaryState = {};\n\n static getDerivedStateFromError(error: Error) {\n return { error };\n }\n\n override render() {\n const { error } = this.state;\n\n if (error) {\n return (\n
\n

Ooops... error found :(

\n
{error.message}
\n
\n );\n }\n\n const { children } = this.props;\n\n return children;\n }\n}\n","import { useContext, createContext } from 'react';\n\nimport type { AppConfiguration } from '~/models';\n\nexport const configurationContext = createContext({\n identityUrl: '',\n apiUrl: '',\n staticApiUrl: '',\n tenant: '',\n lang: '',\n customerId: 0,\n});\n\nexport const ConfigurationProvider = configurationContext.Provider;\n\nexport const useConfiguration = () => useContext(configurationContext);\n","import useSWR from 'swr';\n\nimport { useConfiguration } from '~/contexts';\nimport type { Localization } from '~/models';\nimport type { GetUrlOptions } from '~/utils';\nimport { getUrl, isDev } from '~/utils';\n\nasync function fetchLocalization(url: string, lang: string, options: GetUrlOptions) {\n const response = await getUrl(url, {\n headers: { 'Accept-Language': lang },\n ...options,\n });\n const { Translations: translations } = response;\n\n return {\n locale: lang,\n translations: translations[lang],\n };\n}\n\nexport function useLocalizationQuery() {\n const { identityUrl, staticApiUrl, tenant, lang } = useConfiguration();\n\n const localeUrl = isDev\n ? '/mockups/localization.json'\n : `${staticApiUrl}/notifications/tenants/${tenant}/localization?lang=${lang}`;\n\n return useSWR(localeUrl, async (url: string) =>\n fetchLocalization(url, lang, { identityUrl, tenant }),\n );\n}\n","import type { FC, PropsWithChildren } from 'react';\nimport { IntlProvider } from 'react-intl';\n\nimport { Loading } from '~/components';\nimport { useLocalizationQuery } from '~/queries/useLocalizationQuery';\n\nexport const I18nContainer: FC = ({ children }) => {\n const { data: localizationData } = useLocalizationQuery();\n\n if (!localizationData) {\n return ;\n }\n\n const { locale, translations } = localizationData;\n\n return (\n \n {children}\n \n );\n};\n","import { CheckCircle, InfoCircle } from '@ori-ui/icons';\nimport { styled, Snackbar, SnackbarContent, Button } from '@ori-ui/mui';\nimport type { SnackbarCloseReason, Theme } from '@ori-ui/mui';\nimport type { FC } from 'react';\nimport React from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport type { DeletedNotification } from '~/models/DeletedNotification';\n\nexport interface DeleteNotificationSnackbackProps {\n deletedNotification: DeletedNotification;\n handleUndoDelete: () => Promise;\n handleClose: () => void;\n}\n\nconst SnackbarContentSuccess = styled(SnackbarContent)(({ theme }) => ({\n padding: 0,\n minHeight: theme.spacing(10),\n flexWrap: 'nowrap',\n [theme.breakpoints.up(600)]: {\n width: theme.spacing(66),\n },\n backgroundColor: theme.palette.grey[700],\n}));\n\nconst Message = styled('div')(({ theme }) => ({\n display: 'flex',\n alignItems: 'center',\n fontWeight: 'bold',\n padding: theme.spacing(1, 2),\n}));\n\nconst SnackbarContentError = styled(SnackbarContentSuccess)(({ theme }) => ({\n backgroundColor: theme.palette.error.light,\n}));\n\nconst createIconStyled = (theme: Theme) => ({\n width: theme.spacing(4),\n height: theme.spacing(4),\n padding: theme.spacing(0, 2, 0, 0),\n alignSelf: 'baseline',\n});\n\nconst InfoOutlinedIcon = styled(InfoCircle)(({ theme }) => createIconStyled(theme));\nconst CheckRoundIcon = styled(CheckCircle)(({ theme }) => createIconStyled(theme));\nconst CustomButton = styled(Button)(({ theme }) => ({\n display: 'block',\n height: '100%',\n minHeight: theme.spacing(10),\n minWidth: theme.spacing(20),\n margin: '0 8px 0 0',\n padding: theme.spacing(2, 4, 2, 4),\n textTransform: 'none',\n color: theme.palette.common.white,\n '&:hover': {\n color: theme.palette.grey[300],\n },\n}));\n\nexport const DeleteNotificationSnackback: FC = ({\n deletedNotification,\n handleUndoDelete: undoDelete,\n handleClose,\n}) => {\n const {\n isApiSuccess,\n notification: { NotificationId },\n } = deletedNotification;\n\n const onCloseHandler = React.useCallback(\n (_: unknown, reason: SnackbarCloseReason) => {\n if (reason === 'timeout') {\n handleClose();\n }\n },\n [handleClose],\n );\n const handleUndoDelete = React.useCallback(() => {\n undoDelete();\n }, [undoDelete]);\n\n return (\n \n {isApiSuccess ? (\n \n \n \n \n }\n action={\n \n \n \n }\n />\n ) : (\n \n \n \n \n }\n />\n )}\n \n );\n};\n","// @ts-check\nimport { Box, SHADOW_LEVEL2, styled } from '@ori-ui/mui';\nimport type { PropsWithChildren } from 'react';\n\ninterface HeightProps {\n dynamicHeight?: boolean;\n}\n\nconst CustomBoxDynamicHeights = styled(Box)(({ theme, dynamicHeight }) => ({\n position: 'fixed',\n top: 'var(--top-nav-height)',\n right: 0,\n padding: 0,\n height: '100%',\n maxHeight: 'calc(100% - var(--top-nav-height))',\n maxWidth: '100%',\n zIndex: theme.zIndex.appBar,\n overflowX: 'hidden',\n overflowY: 'auto',\n backgroundColor: theme.palette.grey[50],\n border: '1px solid',\n borderColor: theme.palette.grey[100],\n boxShadow: SHADOW_LEVEL2,\n boxSizing: 'border-box',\n overscrollBehavior: 'contain',\n MsOverflowStyle: '-ms-autohiding-scrollbar',\n WebkitOverflowScrolling: 'touch',\n [theme.breakpoints.up(600)]: {\n boxShadow: `0 3px 8px 0 ${theme.palette.grey[200]}`,\n scrollbarWidth: 'thin',\n scrollbarColor: `${theme.palette.grey[300]} transparent`,\n '&::-webkit-scrollbar': {\n width: 6,\n height: 6,\n },\n '&::-webkit-scrollbar-track': {\n backgroundColor: 'transparent',\n },\n '&::-webkit-scrollbar-thumb': {\n borderRadius: 3,\n backgroundColor: theme.palette.grey[300],\n },\n '&::-webkit-scrollbar-thumb:hover': {\n backgroundColor: theme.palette.grey[400],\n },\n '&::-webkit-scrollbar-thumb:active': {\n backgroundColor: theme.palette.grey.A400,\n },\n '&::-webkit-scrollbar-thumb:vertical': {\n minHeight: 10,\n },\n '&::-webkit-scrollbar-thumb:horizontal': {\n minWidth: 10,\n },\n },\n ...(dynamicHeight && {\n [theme.breakpoints.up(600)]: { height: 'auto' },\n }),\n}));\n\nexport const ScrollableBox: React.FC> = ({\n children,\n dynamicHeight,\n}) => {children};\n","import { getToken } from '~/utils/getToken';\nimport type { GetUrlOptions } from '~/utils/getUrl';\n\nexport async function isOnBehalf(options: GetUrlOptions): Promise {\n const { identityUrl, tenant } = options;\n const token = await getToken({\n identityUrl,\n tenant,\n });\n\n return !!token?.getClaim('act');\n}\n","import { useContext } from 'react';\n\nimport { configurationContext } from '~/contexts';\nimport { deleteUrl, isDev } from '~/utils';\nimport { isOnBehalf } from '~/utils/isOnBehalf';\n\nexport function useNotificationDeleteQuery(): (notificationId: string) => Promise {\n const { identityUrl, apiUrl, tenant, customerId } = useContext(configurationContext);\n\n return async (notificationId: string) => {\n const onBehalf = await isOnBehalf({ tenant, identityUrl });\n if (!isDev && onBehalf) {\n return true;\n }\n\n const url = isDev\n ? 'mockups/delete.json'\n : `${apiUrl}/customers/${customerId}/inAppNotifications/${notificationId}`;\n\n return deleteUrl(url, { tenant, identityUrl });\n };\n}\n","export function removeUtmParams(link: string) {\n try {\n const url = new URL(link);\n const keysToDelete = [];\n\n for (const key of url.searchParams.keys()) {\n if (key.startsWith('utm_')) {\n keysToDelete.push(key);\n }\n }\n\n for (const key of keysToDelete) {\n url.searchParams.delete(key);\n }\n\n return url.toString();\n } catch (error) {\n return link;\n }\n}\n","import { useContext } from 'react';\nimport useSWR from 'swr';\n\nimport { configurationContext } from '~/contexts';\nimport { removeUtmParams } from '~/helpers/removeUtmParams';\nimport type {\n AppConfiguration,\n InAppNotificationDto,\n InAppNotificationsDto,\n NotificationsData,\n} from '~/models';\nimport type { GetUrlOptions } from '~/utils';\nimport { getUrl, isDev, postUrl } from '~/utils';\nimport { isOnBehalf } from '~/utils/isOnBehalf';\n\nasync function fetchNotifications(url: string, options: GetUrlOptions): Promise {\n const data = await getUrl(url, options);\n\n const notifications = data.Notifications.filter((n: InAppNotificationDto) => !n.IsDeleted).map(\n (n: InAppNotificationDto) => ({\n ...n,\n Link: removeUtmParams(n.Link),\n }),\n );\n const newNotifications = notifications.filter((n: InAppNotificationDto) => !n.IsSeen);\n const earlierNotifications = notifications.filter((n: InAppNotificationDto) => n.IsSeen);\n\n return {\n newNotificationsCount: newNotifications.length + earlierNotifications.length,\n notifications: {\n new: newNotifications,\n earlier: earlierNotifications,\n },\n };\n}\n\nasync function markAsSeen(configuration: AppConfiguration): Promise {\n const { identityUrl, apiUrl, tenant, customerId } = configuration;\n\n const onBehalf = await isOnBehalf({ tenant, identityUrl });\n if (!isDev && onBehalf) {\n return true;\n }\n\n const url = isDev\n ? 'mockups/seen.json'\n : `${apiUrl}/customers/${customerId}/inAppNotifications/seen`;\n\n return postUrl(url, null, { tenant, identityUrl });\n}\n\nexport function useNotificationsQuery(shouldLoad: boolean) {\n const configuration = useContext(configurationContext);\n const { identityUrl, apiUrl, customerId, tenant } = configuration;\n\n const notificationsUrl = isDev\n ? 'mockups/manyNotifications.json'\n : `${apiUrl}/customers/${customerId}/inAppNotifications?take=99&sortType=Descending`;\n\n return useSWR(shouldLoad ? notificationsUrl : null, async (url: string) => {\n const notifications = await fetchNotifications(url, { tenant, identityUrl });\n\n if ((notifications.notifications.new?.length ?? 0) > 0) {\n await markAsSeen(configuration);\n }\n\n return notifications;\n });\n}\n","import * as ToggleMenuFlyout from '@ori-events/toggle-menu-flyout';\nimport { Box, Fade, styled } from '@ori-ui/mui';\nimport type { FC } from 'react';\nimport React from 'react';\n\nimport { Loading, NotificationList } from '~/components';\nimport { DeleteNotificationSnackback } from '~/components/DeleteNotificationSnackback';\nimport { ScrollableBox } from '~/components/ScrollableBox';\nimport type { InAppNotificationDto, NotificationsData } from '~/models';\nimport type { DeletedNotification } from '~/models/DeletedNotification';\nimport { useMarkAsViewedQuery } from '~/queries/useMarkAsViewedQuery';\nimport { useNotificationDeleteQuery } from '~/queries/useNotificationDeleteQuery';\nimport { useNotificationsQuery } from '~/queries/useNotificationsQuery';\nimport { useUndeleteNotificationQuery } from '~/queries/useUndeleteNotificationQuery';\nimport { deleteNotificationLocally, markAsViewedLocally, undoDeleteLocally } from '~/utils';\n\nconst OverlayBox = styled(Box)(() => ({\n position: 'absolute',\n left: '0',\n right: '0',\n top: '0',\n bottom: '0',\n zIndex: 800,\n}));\n\nexport const NotificationsMenu: FC = () => {\n const [isVisible, setIsVisible] = React.useState(false);\n const [deletedNotification, setDeletedNotification] = React.useState(\n null,\n );\n const deleteNotification = useNotificationDeleteQuery();\n const markNotificationAsViewed = useMarkAsViewedQuery();\n const undeleteNotification = useUndeleteNotificationQuery();\n const { data: notifications, mutate: refreshNotifications } = useNotificationsQuery(isVisible);\n const hasNotifications =\n notifications !== undefined &&\n (Boolean(notifications.notifications.new?.length) ||\n Boolean(notifications.notifications.earlier?.length));\n\n const toggleMenuFlyoutHandler = React.useCallback((event: ToggleMenuFlyout.Event) => {\n if (event.detail.menuType === ToggleMenuFlyout.MenuTypes.Notifications) {\n setIsVisible((prev) => !prev);\n } else {\n setIsVisible(false);\n }\n }, []) as EventListener;\n\n const handleOverlayClick = React.useCallback(() => {\n setIsVisible(false);\n }, []);\n\n React.useEffect(() => {\n window.addEventListener(ToggleMenuFlyout.Name, toggleMenuFlyoutHandler);\n\n return () => {\n window.removeEventListener(ToggleMenuFlyout.Name, toggleMenuFlyoutHandler);\n };\n });\n\n const handleDelete = React.useCallback(\n async (notification: InAppNotificationDto, index: number, section: string) => {\n refreshNotifications(\n (localNotifications: NotificationsData | undefined) =>\n deleteNotificationLocally(localNotifications, notification.NotificationId),\n false,\n );\n\n const isApiSuccess = await deleteNotification(notification.NotificationId);\n\n setDeletedNotification({\n notification,\n index,\n section,\n isApiSuccess,\n });\n\n if (!isApiSuccess) {\n refreshNotifications(\n (localNotifications: NotificationsData | undefined) =>\n undoDeleteLocally({ localNotifications, notification, index, section }),\n false,\n );\n }\n },\n [refreshNotifications, deleteNotification],\n );\n\n const handleMarkAsViewed = React.useCallback(\n async (notificationId: string) => {\n refreshNotifications(\n (localNotifications: NotificationsData | undefined) =>\n markAsViewedLocally(localNotifications, notificationId),\n false,\n );\n\n await markNotificationAsViewed(notificationId);\n },\n [refreshNotifications, markNotificationAsViewed],\n );\n\n const handleUndoDelete = React.useCallback(async () => {\n if (!deletedNotification) {\n return;\n }\n\n const { notification, index, section } = deletedNotification;\n\n refreshNotifications(\n (localNotifications: NotificationsData | undefined) =>\n undoDeleteLocally({ localNotifications, notification, index, section }),\n false,\n );\n\n setDeletedNotification(null);\n\n await undeleteNotification(notification.NotificationId);\n }, [refreshNotifications, undeleteNotification, deletedNotification]);\n\n const handleClosePopup = React.useCallback(() => setDeletedNotification(null), []);\n\n return (\n <>\n {isVisible ? : null}\n \n \n \n {notifications ? (\n \n ) : (\n \n )}\n {deletedNotification ? (\n \n ) : null}\n \n \n \n \n );\n};\n","import { useContext } from 'react';\n\nimport { configurationContext } from '~/contexts';\nimport { isDev, postUrl } from '~/utils';\nimport { isOnBehalf } from '~/utils/isOnBehalf';\n\nexport function useMarkAsViewedQuery(): (notificationId: string) => Promise {\n const { identityUrl, apiUrl, tenant, customerId } = useContext(configurationContext);\n\n return async (notificationId: string) => {\n const onBehalf = await isOnBehalf({ tenant, identityUrl });\n if (!isDev && onBehalf) {\n return true;\n }\n\n const url = isDev\n ? '/mockups/viewed.json'\n : `${apiUrl}/customers/${customerId}/inAppNotifications/${notificationId}/viewed`;\n\n return postUrl(url, null, { tenant, identityUrl });\n };\n}\n","import { useContext } from 'react';\n\nimport { configurationContext } from '~/contexts';\nimport { isDev, postUrl } from '~/utils';\nimport { isOnBehalf } from '~/utils/isOnBehalf';\n\nexport function useUndeleteNotificationQuery(): (notificationId: string) => Promise {\n const { identityUrl, apiUrl, tenant, customerId } = useContext(configurationContext);\n\n return async (notificationId: string) => {\n const onBehalf = await isOnBehalf({ tenant, identityUrl });\n if (!isDev && onBehalf) {\n return true;\n }\n\n const url = isDev\n ? '/mockups/undelete.json'\n : `${apiUrl}/customers/${customerId}/inAppNotifications/${notificationId}/undelete`;\n\n return postUrl(url, null, { tenant, identityUrl });\n };\n}\n","import { ThemeProvider } from '@ori-ui/mui';\nimport { StandaloneTokenProvider } from '@ori/auth';\nimport { TestIdProvider } from '@ori/testid-generator';\nimport type { FC } from 'react';\nimport { Suspense } from 'react';\n\nimport { Loading, DevelopmentEnvironmentProvider } from '~/components';\nimport { ApiProvider, ErrorBoundary, I18nContainer, NotificationsMenu } from '~/containers';\nimport { ConfigurationProvider } from '~/contexts';\nimport type { AppConfiguration } from '~/models';\n\ninterface AppProps {\n configuration: AppConfiguration;\n}\n\nconst team = 'Growth';\nconst project = 'notification-menu';\n\nexport const App: FC = ({ configuration }) => (\n \n \n \n \n \n \n }>\n \n \n \n \n \n \n \n \n \n \n \n \n);\n","import { doDevelopmentLogin } from '@ori/auth';\nimport { version as ReactVersion } from 'react';\n\nimport { App } from './App';\nimport type { AppConfiguration } from '~/models';\n\nexport const render = async (rootElement: HTMLElement) => {\n const configuration: AppConfiguration = {\n apiUrl: rootElement.dataset.apiUrl ?? '',\n identityUrl: rootElement.dataset.identityUrl ?? '',\n staticApiUrl: rootElement.dataset.staticApiUrl ?? '',\n tenant: rootElement.dataset.tenant ?? '',\n lang: document.documentElement.lang,\n customerId: Number(rootElement.dataset.customerId),\n };\n\n // Get token for local development\n if (__DEV__) {\n await doDevelopmentLogin(configuration);\n }\n\n if (ReactVersion.startsWith('18')) {\n const { createRoot } = await import('react-dom/client');\n createRoot(rootElement).render();\n } else {\n if (__DEV__) {\n console.error('react-dom/client cannot be imported using legacy render');\n }\n const { render: reactDomRender } = await import('react-dom');\n reactDomRender(, rootElement);\n }\n};\n"],"names":["TimeFormats","isDev","process","getToken","async","_ref","_window$ori","tenant","identityUrl","forceReload","window","ori","tokenService","oriToken","OidcAccessToken","Token","token","oidcTokenStorage","OidcTokenStorage","getAccessToken","_unused","OidcClient","callbackUrl","redirectUrl","location","href","clientId","acrValues","concat","scope","doLogin","Error","getRequestConfig","options","config","_objectWithoutProperties","_excluded","headers","_objectSpread","Authorization","toString","isSuccess","status","startsWith","getUrl","url","axios","data","postUrl","result","getNotificationsOrDefault","notifications","newNotificationsCount","new","earlier","insertToArray","array","index","newItem","_toConsumableArray","slice","undoDeleteLocally","localNotifications","notification","section","useIsDesktop","theme","useTheme","useMediaQuery","breakpoints","up","toggleNotifications","event","CustomEvent","ToggleMenuFlyout","detail","menuType","Notifications","dispatchEvent","DevelopmentEnvironmentProvider","children","throttle","require","TopNavHeight","isDesktop","useEffect","bodyEl","document","body","setTopNavHeight","className","DEFAULT_DESKTOP","DESKTOP_SHRUNK","MOBILE","remove","cName","classList","add","contains","throttledHandleScroll","isPageScrolled","scrollY","newHeight","addEventListener","removeEventListener","_jsxs","_Fragment","_jsx","Button","type","onClick","LoadingContainer","styled","display","flexDirection","alignItems","justifyContent","textAlign","padding","spacing","Loading","memo","CircularProgress","color","iconMap","heart","Heart","truck","Truck","settings","Settings","network","Network","education","Education","editorial","Editorial","products","Products","discount","DiscountTag","conference","Conference","wallet","Wallet","sales","Sales","gift","Gift","info","InfoCircle","welcome","WelcomeKit","academy","Academy","rewardsHearts","RewardsHearts","Icon","palette","text","primary","fontSize","app","NotificationItem","ListItem","_defineProperty","paddingLeft","backgroundColor","marginTop","marginLeft","marginRight","marginBottom","minHeight","flexWrap","width","boxShadow","grey","BodyPadding","_ref3","TitleTypography","Typography","_ref4","textOverflow","whiteSpace","overflow","fontWeight","TitlePadding","_ref5","position","BodyTypography","_ref6","WebkitLineClamp","WebkitBoxOrient","maxHeight","paddingRight","ListText","ListItemText","_ref7","margin","ownerState","hasImage","TimeStamp","paddingBottom","SecondaryActionListItem","ListItemSecondaryAction","shouldForwardProp","isPropValid","_ref8","right","top","transform","bottom","CustomSpan","flex","DeleteButton","IconButton","_ref10","alignSelf","CustomCross","Clear","_ref2","iconId","props","iconType","as","_ref11","left","StyledLazyImage","LazyImage","_ref12","borderRadius","objectFit","height","NotificationsListItem","_ref14","startDate","handleDelete","handleMarkAsViewed","_useState","useState","_useState2","_slicedToArray","isShowing","setIsShowing","_useState3","_useState4","isDeleting","setIsDeleting","Timestamp","Title","Body","IsViewed","NotificationId","Link","IconId","Image","timeOffsetSeconds","Date","getTime","bestTimeUnit","timeOffset","Now","Minute","Hour","Day","Week","getBestFitTimeUnit","offset","timeFormat","multiplier","Math","floor","convertOffset","handleDeleteOnClick","React","stopPropagation","metaHierarchy","Source","Description","UserAction","removeNotificationEvent","handleDeleteOnExited","itemOnClick","handleItemOnClick","selectNotificationEvent","animationTimeout","Collapse","in","timeout","onExited","sx","cursor","disableTypography","variant","secondary","src","alt","FormattedMessage","id","NotificationListContainer","List","ContainerTitle","ListSubheader","common","white","paddingTop","EmptyNotificationsList","A400","zIndex","NotificationListItem","NotificationListLayout","NotificationTitle","NotificationList","notificationsData","getTestIdProps","useTestId","nonEmptySections","Object","entries","filter","length","disableSticky","inset","map","_ref9","sectionKey","sectionNotifications","toUpperCase","notificationItem","swrConfig","errorRetryCount","errorRetryInterval","focusThrottleInterval","revalidateOnFocus","shouldRetryOnError","suspense","onErrorRetry","error","key","revalidate","_error$response$statu","_error$response","_config$errorRetryCou","retryCount","statusCode","response","rCount","setTimeout","ApiProvider","SWRConfig","value","ErrorBoundary","_Component","_this","_classCallCheck","_len","arguments","args","Array","_key","_callSuper","_assertThisInitialized","_inherits","_createClass","this","state","message","Component","configurationContext","createContext","apiUrl","staticApiUrl","lang","customerId","ConfigurationProvider","Provider","fetchLocalization","locale","translations","Translations","useLocalizationQuery","_useConfiguration","useContext","localeUrl","useSWR","I18nContainer","localizationData","IntlProvider","messages","SnackbarContentSuccess","SnackbarContent","Message","SnackbarContentError","light","createIconStyled","InfoOutlinedIcon","CheckRoundIcon","CheckCircle","CustomButton","minWidth","textTransform","DeleteNotificationSnackback","deletedNotification","undoDelete","handleUndoDelete","handleClose","isApiSuccess","onCloseHandler","_","reason","Snackbar","open","autoHideDuration","anchorOrigin","vertical","horizontal","onClose","action","CustomBoxDynamicHeights","Box","dynamicHeight","maxWidth","appBar","overflowX","overflowY","border","borderColor","SHADOW_LEVEL2","boxSizing","overscrollBehavior","MsOverflowStyle","WebkitOverflowScrolling","scrollbarWidth","scrollbarColor","ScrollableBox","isOnBehalf","getClaim","useNotificationDeleteQuery","_useContext","notificationId","onBehalf","_unused2","deleteUrl","removeUtmParams","link","_step","URL","keysToDelete","_iterator","_createForOfIteratorHelper","searchParams","keys","s","n","done","push","err","e","f","_i","_keysToDelete","delete","useNotificationsQuery","shouldLoad","configuration","notificationsUrl","_notifications$notifi","_notifications$notifi2","IsDeleted","newNotifications","IsSeen","earlierNotifications","fetchNotifications","markAsSeen","OverlayBox","NotificationsMenu","_React$useState","_React$useState2","isVisible","setIsVisible","_React$useState3","_React$useState4","setDeletedNotification","deleteNotification","markNotificationAsViewed","undeleteNotification","useUndeleteNotificationQuery","_useNotificationsQuer","refreshNotifications","mutate","hasNotifications","undefined","Boolean","toggleMenuFlyoutHandler","prev","handleOverlayClick","deleteNotificationLocally","markAsViewedLocally","handleClosePopup","Fade","App","TestIdProvider","team","project","StandaloneTokenProvider","ThemeProvider","enableCacheProvider","cacheKey","Suspense","fallback","render","rootElement","_rootElement$dataset$","_rootElement$dataset$2","_rootElement$dataset$3","_rootElement$dataset$4","dataset","documentElement","Number","ReactVersion","createRoot","reactDomRender"],"sourceRoot":""}