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SACxB5iC,eAAgBA,EAChBghC,aAAcA,EACdyB,cAAeA,EACfF,aAAcA,GAAcM,cAK9BljC,IAAAA,cAACO,EAAAA,EAAM,CACL0iC,SAAUL,GAAcK,SACxB5iC,eAAgBA,EAChByiC,cAAeA,EACfF,aAAcE,EAAgBF,GAAcM,iBAAcvgC,IAlBpC,IAsB9B,C,wEGzCO,SAASrC,IACd,MAAM,OAAEgO,IAAWC,EAAAA,EAAAA,0BACb7D,GAAQwI,EAAAA,EAAAA,GAAwC,sBAAuB,CAC3EzV,KAAM,kBACNyiC,SAAU5xB,IAGZ,OAAO5D,EAAMtL,MAAM0P,OAAO/K,KAAKuS,IACtB,CACLrW,QACEqW,EAAEmsB,SAAWnsB,EAAErW,SAAUoiC,EAAAA,EAAAA,IAAqB/rB,EAAErW,cAAW0C,EAC7Do7B,gBAAiBznB,EAAEynB,gBACnBzoB,OACwB,IAAtBgB,EAAEynB,iBAA6BznB,EAAE5B,IAAIU,WAAW,aAC5CkB,EAAE5B,KAAKqa,QAAQ,YAAa,UAC5BpsB,EACN0B,MAAOiS,EAAEjS,MACT87B,YAAa7pB,EAAE6pB,YACfzrB,IAAK4B,EAAE5B,OAGb,C,wECpBO,SAASxB,EACdoC,EACAukB,EACAsJ,EACAC,GAEA,MAAMC,GAAcnlB,EAAAA,EAAAA,kBACd1e,EAAkBsN,QAAQu2B,GAAarlB,WAAWxe,iBAClD8jC,GAAU7I,EAAAA,EAAAA,oBAGhB,OAFAnlB,EAAQ9V,EAAkB8V,EAAQA,EAAMyZ,QAAQ,UAAW,mBAEpDjsB,EAAAA,EAAAA,aACLwS,EACA,IAAKukB,EAAQ0J,aAAc/jC,GAC3B2jC,EACAC,EACA,CACEpwB,aAAcxT,KAAqB8jC,GAASlkC,MAAMs7B,iBAGxD,C","sources":["webpack:///./src/app/data-dog-rum.ts","webpack:///./src/common/IngramBecomeReseller/IngramBecomeReseller.tsx","webpack:///./src/common/IngramFooter/IngramFooterLite.tsx","webpack:///./src/hooks/use-feature-flag-base.ts","webpack:///./src/app/injectors/useFirebase.ts","webpack:///./src/common/IngramHeader/FCMEnabler.tsx","webpack:///./src/hooks/use-setfcmtoken.ts","webpack:///./src/hooks/use-getNotificationHistory.ts","webpack:///./src/hooks/use-getSubcriberId.ts","webpack:///./src/common/IngramHeader/IngramHeader.tsx","webpack:///./src/hooks/use-markAsReadForNotifications.ts","webpack:///./src/hooks/use-cart-items-count.ts","webpack:///./src/hooks/use-helpmenu.ts","webpack:///./src/app/nav/useHelpNavItems.ts","webpack:///./src/common/IngramHelpMenu/IngramHelpMenu.tsx","webpack:///./src/common/IngramMobile/IngramMobile.tsx","webpack:///./src/hooks/use-mybusinessmenu.ts","webpack:///./src/hooks/use-vouchercount.ts","webpack:///./src/hooks/use-product.ts","webpack:///./src/hooks/use-servicesmenu.ts","webpack:///./src/hooks/use-solutionsmenu.ts","webpack:///./src/hooks/use-vendorsmenu.ts","webpack:///./src/app/nav/side-nav-items.tsx","webpack:///./src/app/nav/useMyBusinessNavItems.ts","webpack:///./src/app/nav/useProductsNavItems.ts","webpack:///./src/app/nav/useVendorsNavItems.ts","webpack:///./src/app/nav/useSolutionsNavItems.ts","webpack:///./src/app/nav/useServicesNavItems.ts","webpack:///./src/common/IngramSideNav/IngramSideNav.tsx","webpack:///./src/hooks/use-paymentCards.ts","webpack:///./src/hooks/useCMPCardCheck.ts","webpack:///./src/hooks/useCMPCardRedirect.ts","webpack:///./src/hooks/useCMPPaymentTerm.ts","webpack:///./src/hooks/useImpersonationHeaderProps.ts","webpack:///./src/app/AutoLoginImOnlineFrame.tsx","webpack:///./src/app/DebugAccessToken.tsx","webpack:///./src/app/DebugToolbar.tsx","webpack:///./src/app/FramedPageTitle.ts","webpack:///./src/app/InvalidAccessToken.tsx","webpack:///./src/app/PerformanceErrorAlert.tsx","webpack:///./src/app/injectors/utils.ts","webpack:///./src/app/injectors/useOneTrust.ts","webpack:///./src/app/injectors/useAdobeDtm.ts","webpack:///./src/app/injectors/useDatadog.ts","webpack:///./src/hooks/useUjetAuth.ts","webpack:///./src/hooks/useIsUjetChatbotEnabled.ts","webpack:///./src/app/injectors/useUjetChatBot.ts","webpack:///./src/app/injectors/useUjetUniteChatBot.ts","webpack:///./src/app/injectors/useChatBotHelpMenu.ts","webpack:///./src/app/injectors/useWalkMe.ts","webpack:///./src/hooks/useUserActivity.ts","webpack:///./src/app/injectors/useForstaFeedback.ts","webpack:///./src/app/injectors/useFeedbackFormRouter.ts","webpack:///./src/app/injectors/injectors.ts","webpack:///./src/app/injectors/useAddMetaTag.ts","webpack:///./src/app/injectors/useCookieDisclaimer.ts","webpack:///./src/hooks/use-cookie-disclaimer.ts","webpack:///./src/app/injectors/useHtmlLang.ts","webpack:///./src/app/injectors/useWhatfix.ts","webpack:///./src/app/prospectResellerPaths.tsx","webpack:///./src/app/routes/WhiteList.tsx","webpack:///./src/app/routes/BlackList.tsx","webpack:///./src/app/routes/buildAppRoutes.tsx","webpack:///./src/app/App.tsx","webpack:///./src/hooks/useAreWidgetsConfigured.ts","webpack:///./src/app/routes/useAppRoutes.tsx","webpack:///./src/app/routes/useMfsRoutes.ts","webpack:///./src/app/useProcessPostMsgs.ts","webpack:///./src/hooks/useTnCRedirect.ts","webpack:///./src/hooks/useIsCepWhitelisted.ts","webpack:///./src/hooks/useProfileData.ts","webpack:///./src/hooks/use-preferred-language.tsx","webpack:///./src/hooks/usePreferredLanguage.ts","webpack:///./src/hooks/useGetSearchSuggestions.ts","webpack:///./src/app/useAvatarProps.ts","webpack:///./src/hooks/use-configuratormenu.ts","webpack:///./src/hooks/useDisableImpersonationMode.ts","webpack:///./src/hooks/use-x-scroll.ts","webpack:///./src/common/IngramBecomeReseller/usePartnerWithUs.ts","webpack:///./src/app/ScrollToTop.tsx","webpack:///./src/app/app-mount.tsx","webpack:///./src/app/nav/utils.ts","webpack:///./src/common/IngramFooter/IngramFooter.tsx","webpack:///./src/common/IngramFooter/useFooterColumns.ts","webpack:///./src/common/IngramFooter/useSocialMedias.ts","webpack:///./src/common/IngramFooter/useCopyrightLinks.ts","webpack:///./src/hooks/useCMSApiQuery.ts"],"sourcesContent":["import { datadogRum } from '@datadog/browser-rum';\n\ndeclare global {\n interface Window {\n __DATADOG_INITIALIZED__: boolean;\n }\n}\n\nconst isLocalDev = window.location.origin.indexOf('://local') > -1;\nconst fullStoryUrlRegex = /https:\\/\\/.*\\.fullstory\\.com/;\n\nif (!isLocalDev) {\n if (!window.__DATADOG_INITIALIZED__) {\n datadogRum.init({\n allowedTracingUrls: [\n 'https://apix-qa.ingrammicro.com',\n /https:\\/\\/.*\\.ingrammicro\\.com/,\n ],\n applicationId: '12444269-de97-4ca2-865e-ad1167bb4dd5',\n beforeSend: (event: any, context: any) => {\n if (event.type === 'resource' && event.resource.type === 'fetch') {\n if (context?.response?.headers) {\n event.context.responseHeaders = Object.fromEntries(\n context.response.headers\n );\n }\n }\n if (shouldDiscard(event, context)) {\n return false;\n }\n\n return true;\n },\n clientToken: 'pub92d4bf1905a9bc788affd0f5cb63e8cc',\n defaultPrivacyLevel: 'mask-user-input',\n excludedActivityUrls: [\n /^https:\\/\\/.*\\.fullstory\\.com/,\n /^https:\\/\\/.*\\.adobedc\\.net/,\n /^https:\\/\\/.*\\.walkme\\.com/,\n /^https:\\/\\/whatfix\\.com/,\n ],\n service: 'cep',\n sessionReplaySampleRate: 100,\n sessionSampleRate: 100,\n site: 'us5.datadoghq.com',\n env:'production',\n trackLongTasks: true,\n trackResources: true,\n trackSessionAcrossSubdomains: true,\n trackUserInteractions: true,\n usePartitionedCrossSiteSessionCookie: true,\n // Specify a version number to identify the deployed version of your application in Datadog\n version: '25.4.1',\n });\n window.__DATADOG_INITIALIZED__ = true;\n }\n}\n\nfunction shouldDiscard(event: any, context: any) {\n return (\n event.type === 'resource' &&\n context.xhr &&\n fullStoryUrlRegex.test(context.xhr.responseURL)\n );\n}\n","import { useIsAuthenticated } from 'mf_core/auth';\nimport React, { useEffect, useState } from 'react';\nimport { StickyButton } from '@im/ui-lib/StickyButton';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport { CopyRightTO } from '@im/ui-lib/types';\n\ntype Props = {\n data?: CopyRightTO;\n};\n\nexport function IngramBecomeReseller(props: Props) {\n const { data } = props;\n const [ready, setReady] = useState(false);\n const isAuthenticated = useIsAuthenticated();\n\n useEffect(() => {\n //Adding artificial delay to wait for useIsAuthenticated() state change\n const timer = setTimeout(() => setReady(true), 3000);\n return () => {\n clearTimeout(timer);\n };\n }, []);\n const isMobile = useMediaQuery('(min-width: 769px)');\n\n return isAuthenticated ? (\n <></>\n ) : (\n <>\n {ready && isMobile && data?.onClick && (\n <StickyButton link={data} onClick={data.onClick} />\n )}\n </>\n );\n}\n","import React from 'react';\nimport { Footer } from '@im/ui-lib/Footer';\nimport { useCopyrightLinks } from './useCopyrightLinks';\n\nexport function IngramFooterLite() {\n const copyRightLinks = useCopyrightLinks();\n\n if (!copyRightLinks) return null;\n\n return <Footer copyRightLinks={copyRightLinks} />;\n}\n","import { useFeatureFlag } from 'mf_core/feature-flag';\n\nexport function useFeatureFlagBase() {\n const {\n isReady,\n refetch,\n value: boValues,\n } = useFeatureFlag([\n 'ACC_MGMT_EPP_WhitelistedResellers',\n 'ACC_MGMT_EnableX4CReactUI',\n 'ACC_MGMT_EnableX4CReactUI',\n 'ACC_MGMT_Enable_BrandingPreferences',\n 'CCAI_Chatbot_WhitelistedResellers',\n 'CCAI_Paths_Whitelist',\n 'CCAI_Translation_Keys',\n 'CCAI_UNITE_Disabled',\n 'CCAI_UNITE_Translation_Keys',\n 'CMP_CreditCardPopup_Enable',\n 'CMP_CreditCardTermCode',\n 'CMP_Products_ExcludedResellers',\n 'DisableCartIconOnAddToCart',\n 'Docdata_DD_CMP_TermCode',\n 'EnableInsightsMessagingQueue',\n 'EnableInsightsFrameWork',\n 'EnableUserManagement',\n 'Enable_AISuggestions',\n 'Enable_Order_Status_Report',\n 'FORSTA_Feedback_Form_WhitelistedResellers',\n 'FORSTA_Feedback_Form_WhitelistedResellers',\n 'Is_Cybersource_Force_Popup_Enabled',\n 'Is_DocData_DD_enabled',\n 'Is_Docdata_MP_PopUp_Enabled',\n 'Is_Worldpay_MP_PopUp_Enabled',\n 'Is_Worldpay_enabled',\n 'QM_EnableSearch_BO',\n 'Reseller_Whitelist_For_Order_Status_Tracking',\n 'Worldpay_CMP_TermCode',\n 'X4C_Enable_Performance_Banner',\n 'X4C_Performance_Banner_End_Time',\n 'X4C_Performance_Banner_Start_Time',\n 'X4C_PushNotifications_Enabled',\n 'X4C_Url_Encoding_Feature',\n 'X4EUEnabled',\n 'EnableQuickInsightsRollDown',\n 'im-customerintegrations-appstore-home-showintegrationshub',\n ]);\n return {\n boValues,\n isReady,\n refetch,\n };\n}\n","import { useEffect, useState } from 'react';\n\nconst useFirebaseLoader = () => {\n const [firebaseReady, setFirebaseReady] = useState(false);\n\n useEffect(() => {\n const checkIfReady = () => {\n const firebase = (window as any).firebase;\n\n if (firebase) {\n if (!firebase.apps.length && firebase.initializeApp) {\n firebase.initializeApp({\n apiKey: 'AIzaSyD2gPW474Ymmfw45eraB9OvWi2w9DqpiyU',\n appId: '1:259420669198:web:90432edeb5e2e5cf7dc35f',\n authDomain: 'imgcp-369230c31642aca9.firebaseapp.com',\n messagingSenderId: '259420669198',\n projectId: 'imgcp-369230c31642aca9',\n storageBucket: 'imgcp-369230c31642aca9.appspot.com',\n // apiKey: 'AIzaSyCpwPRVcJQ4HoVc6XWkJiYf2fHQjZ6zk-k',\n // appId: '1:54314004418:web:770f717b670c2222ab305b',\n // authDomain: 'imgcp-0901539eb61e81e2.firebaseapp.com',\n // messagingSenderId: '54314004418',\n // projectId: 'imgcp-0901539eb61e81e2',\n // storageBucket: 'imgcp-0901539eb61e81e2.appspot.com',\n });\n }\n\n if (firebase.messaging && typeof firebase.messaging === 'function') {\n const messaging = firebase.messaging();\n (window as any).firebaseMessaging = messaging;\n setFirebaseReady(true);\n } else {\n setTimeout(checkIfReady, 200);\n }\n } else {\n // console.warn('â³ window.firebase not ready');\n setTimeout(checkIfReady, 200);\n }\n };\n\n checkIfReady();\n }, []);\n\n return firebaseReady;\n};\n\n// ✅ Named export\nexport { useFirebaseLoader };\n","import { useEffect, useMemo, useCallback, useState } from 'react';\nimport { useSetFcmToken } from '../../hooks/use-setfcmtoken';\nimport { useGetNotificationHistory } from '../../hooks/use-getNotificationHistory';\nimport { useSubscriberId } from '../../hooks/use-getSubcriberId';\n\nimport { useBuildVars } from 'mf_core/config';\n\nexport const FCMEnabler = ({\n chat,\n fcmToken,\n firebaseReady,\n latestChat,\n setChat,\n setFcmtoken,\n setHistoryChat,\n}: any) => {\n const setFcmTokentoDb = useSetFcmToken();\n const { data: NotificationHistoryInfo } = useGetNotificationHistory();\n const { data: subscriberIdData } = useSubscriberId();\n\n const { buildEnvironment } = useBuildVars();\n\n type FirebaseConfig = {\n apiKey: string;\n appId: string;\n authDomain: string;\n messagingSenderId: string;\n projectId: string;\n storageBucket: string;\n };\n const [subscriberId, setSubscriberId] = useState(() => {\n return localStorage.getItem('subscriberid') || null;\n });\n useEffect(() => {\n if (subscriberIdData) {\n const newSubscriberId = subscriberIdData;\n if (newSubscriberId && newSubscriberId !== subscriberId) {\n localStorage.setItem('subscriberid', newSubscriberId);\n setSubscriberId(newSubscriberId);\n }\n }\n }, [subscriberIdData, subscriberId]);\n const firebaseConfig: FirebaseConfig = useMemo(() => {\n return buildEnvironment === 'development' ||\n buildEnvironment === 'staging' ||\n buildEnvironment === 'productionbeta'\n ? {\n apiKey: 'AIzaSyD2gPW474Ymmfw45eraB9OvWi2w9DqpiyU',\n appId: '1:259420669198:web:90432edeb5e2e5cf7dc35f',\n authDomain: 'imgcp-369230c31642aca9.firebaseapp.com',\n messagingSenderId: '259420669198',\n projectId: 'imgcp-369230c31642aca9',\n storageBucket: 'imgcp-369230c31642aca9.appspot.com',\n }\n : {\n apiKey: 'AIzaSyBe9EYHwIudbX3tbu6ZxdDg4MrDOagZ_tQ',\n appId: '1:754257395430:web:563d1fa861596ea1aac527',\n authDomain: 'imgcp-8d41e6bed7a49a8e.firebaseapp.com',\n messagingSenderId: '754257395430',\n projectId: 'imgcp-8d41e6bed7a49a8e',\n storageBucket: 'imgcp-8d41e6bed7a49a8e.appspot.com',\n };\n }, [buildEnvironment]);\n\n const handleSetFcmtoken = useCallback(\n (token: string) => {\n localStorage.setItem('fcmtoken', token);\n setFcmtoken(token);\n },\n [setFcmtoken]\n );\n type ChatMessage = {\n content?: string;\n createdDate?: string;\n data?: {\n content?: string;\n title?: string;\n };\n fcmMessageId?: string;\n messageId?: string;\n title?: string;\n };\n const handleSetChat = useCallback(\n (updatedChats: ChatMessage[]) => {\n setChat(\n updatedChats.map((item: any) => ({\n ...item,\n content: item?.data?.content,\n createdDate: item?.createdDate || new Date().toISOString(),\n title: item?.data?.title,\n }))\n );\n },\n [setChat]\n );\n const handleSetChatFromHistoryApi = useCallback(\n (updatedChats: ChatMessage[]) => {\n setHistoryChat(\n updatedChats.map((item: any) => ({\n ...item,\n content: item?.content,\n createdDate: item?.createdDate || new Date().toISOString(),\n\n notificationId: item?.notificationId,\n title: item?.title,\n }))\n );\n },\n [setHistoryChat]\n );\n const processIncomingMessage = (events: any[]) => {\n if (events && Array.isArray(events)) {\n const updatedChats = [...latestChat.current];\n\n events.forEach((event) => {\n if (event) {\n // Check if the message is a duplicate\n const isDuplicate = updatedChats.some(\n (item) => item.messageId === event.messageId\n );\n\n if (!isDuplicate) {\n updatedChats.push({\n content: `PO# ${event?.payload?.orderNumber} has a new estimated ship date.`,\n // messageId: event.messageId,\n createdDate: event.createdDate || new Date().toISOString(),\n notificationId: event?.notificationId,\n title: event.title || 'ESD Update',\n });\n }\n }\n });\n\n // Update the chat with new messages\n handleSetChatFromHistoryApi(updatedChats);\n }\n };\n useEffect(() => {\n processIncomingMessage(NotificationHistoryInfo);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [NotificationHistoryInfo]);\n useEffect(() => {\n if (!firebaseReady) return;\n\n const firebase = (window as any).firebase;\n if (!firebase) return;\n\n if (!firebase.apps.length) {\n firebase.initializeApp(firebaseConfig);\n }\n\n const messaging = firebase.messaging();\n (window as any).firebaseMessaging = messaging;\n\n const setupFCM = () => {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker\n .register('./app/firebase-messaging-sw.js')\n .then(async (registration) => {\n const permission = await Notification.requestPermission();\n if (permission === 'granted') {\n const VAPID_KEY =\n 'BNdCrafNXKsqW_ABEgEOJJeAqt12ARqCNKi_RwbRmu0jBJIN5HuZNCyxBkfU-4s6wmuNs-NrwpRYgLYoNqO1MMc';\n\n const token = await messaging.getToken({\n serviceWorkerRegistration: registration,\n vapidKey: VAPID_KEY,\n });\n\n if (token) {\n handleSetFcmtoken(token);\n }\n }\n\n messaging.onMessage((payload: any) => {\n const { body, title } = payload.notification;\n new Notification(title, { body });\n\n const updatedChats = [...latestChat.current];\n const isDuplicate = updatedChats.some((item) => {\n return (\n (item.messageId && item.messageId === payload.messageId) ||\n (item.fcmMessageId &&\n item.fcmMessageId === payload.messageId) ||\n (item.title && item.title === payload.data.title) ||\n (item.content && item.content === payload.data.content) ||\n (item.noti && item.content === payload.data.content)\n );\n });\n\n if (!isDuplicate) {\n updatedChats.push(payload);\n handleSetChat(updatedChats);\n }\n });\n })\n .catch((error) => {\n console.error('Service Worker registration failed:', error);\n });\n }\n };\n\n setupFCM();\n\n return () => {\n messaging.onMessage(() => {});\n };\n }, [\n firebaseReady,\n firebaseConfig,\n handleSetFcmtoken,\n handleSetChat,\n latestChat,\n ]);\n\n const registerFCMToken = async () => {\n try {\n const result = localStorage.getItem('okta-token-storage');\n let tokenData;\n if (result !== null) {\n tokenData = JSON.parse(result);\n }\n\n const token = tokenData?.accessToken?.accessToken;\n if (!token) {\n throw new Error('Failed to acquire access token.');\n }\n\n const TokenAvailable = localStorage.getItem('fcmtoken');\n const requestBody = {\n fcmToken: TokenAvailable,\n subscriberId: subscriberId,\n };\n\n if (TokenAvailable && subscriberId) {\n setFcmTokentoDb.mutate(requestBody, {\n onError: () => {\n // Handle error case\n },\n onSuccess: () => {\n // Handle success case\n },\n });\n }\n } catch (error) {\n console.error('Error registering FCM Token:', error);\n }\n };\n\n useEffect(() => {\n const registerToken = async () => {\n if (fcmToken) {\n await registerFCMToken();\n }\n };\n registerToken();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [fcmToken]);\n\n return null;\n};\n","// import { useMutation } from 'react-query';\nimport { useMutation } from '@tanstack/react-query';\nimport { useApiPost } from 'mf_core/query';\n// export type Iscreated = {};\nexport function useSetFcmToken() {\n const apiPost = useApiPost();\n return useMutation({\n mutationFn: (body: any) => {\n return apiPost(\n `/account-management/v1/notifications/set-fcm-token`,\n body,\n undefined\n );\n },\n });\n}\n","import { useApiQuery } from 'mf_core/query';\n\nexport function useGetNotificationHistory() {\n return useApiQuery<any>(\n `/account-management/v1/notifications/history?Page=1&Size=10&NotificationType=inapp&onlySummary=true`\n );\n}\n","import { useApiQuery } from 'mf_core/query';\n\nexport function useSubscriberId() {\n return useApiQuery<any>(\n `/account-management/v1/notifications/subscribers/me`\n );\n}\n","/* eslint-disable max-lines */\nimport React, { useCallback, useEffect, useState, useRef } from 'react';\nimport { Header, ImpersonationHeaderProps } from '@im/ui-lib/HeaderX4C';\nimport { AvatarProps } from '@im/ui-lib/HeaderX4C/internal/Avatar';\nimport { SearchResponse } from '@im/ui-lib/HeaderX4C/internal/ProductSearchAutocomplete';\nimport { useCartItemsCount } from '../../hooks/use-cart-items-count';\n// import { NotificationDropProps } from '@im/ui-lib/HeaderX4C/internal/NotificationDrop/NotificationDrop';\nimport { InsightsMessagingQueue } from 'mf_shared/InsightsMessagingQueue';\nimport { QuickInsights } from 'mf_shared/QuickInsights';\nimport { HeaderX4CMobile } from '@im/ui-lib/HeaderX4CMobile';\nimport { useFeatureFlagBase } from '../../hooks/use-feature-flag-base';\nimport { useLocation, useNavigate } from 'react-router';\nimport { setDigitalData } from 'mf_core/adobe';\nimport { useDecodedToken, useHasPermission } from 'mf_core/auth';\nimport { useIsMutating } from '@tanstack/react-query';\nimport { useFirebaseLoader } from '../../app/injectors/useFirebase';\nimport { useMarkAsReadNotifications } from '../../hooks/use-markAsReadForNotifications';\nimport { FCMEnabler } from './FCMEnabler';\nimport { useFeatureFlag } from 'mf_core/feature-flag';\n\ntype Props = {\n AvatarProps: AvatarProps;\n enableAISuggestions: boolean;\n getSearchSuggestions: (term: string) => Promise<SearchResponse[]>;\n impersonationHeaderProps?: ImpersonationHeaderProps;\n isAuthenticated: boolean;\n isCmpWhitelisted: boolean;\n isLogoClickable?: boolean;\n isMobile: boolean;\n // isNotificationEnabled?: boolean;\n // notificationDropProps: NotificationDropProps;\n onMenuButtonClick: () => void;\n onUserActionClick: (action: UserActionType) => void;\n showAvatar?: boolean;\n showCartIcon?: boolean;\n showCulturePicker?: boolean;\n showFavoritesIcon?: boolean;\n showImpersonationHeader?: boolean;\n showSeachBar?: boolean;\n};\n\ntype UserActionType = 'favorite' | 'notification' | 'cart';\n\nexport function IngramHeader(props: Props) {\n const {\n AvatarProps,\n enableAISuggestions,\n getSearchSuggestions,\n impersonationHeaderProps,\n isAuthenticated,\n isCmpWhitelisted,\n isLogoClickable,\n isMobile,\n // isNotificationEnabled,\n // notificationDropProps,\n onMenuButtonClick,\n onUserActionClick,\n showAvatar,\n showCartIcon,\n showCulturePicker,\n showFavoritesIcon,\n showImpersonationHeader,\n showSeachBar,\n } = props;\n const decodedToken = useDecodedToken();\n const userType: string = decodedToken?.imoProfile?.userType || '';\n const { boValues, isReady: isFlagLoaded } = useFeatureFlagBase();\n const isInsightsMessagingQueue = isFeatureEnabled(\n isFlagLoaded,\n boValues,\n 'EnableInsightsMessagingQueue'\n );\n const isQuickInsightsRollDownEnabled = isFeatureEnabled(\n isFlagLoaded,\n boValues,\n 'EnableQuickInsightsRollDown'\n );\n const isEndUserFeatureEnabled =\n isFeatureEnabled(isFlagLoaded, boValues, 'X4EUEnabled') &&\n userType === 'EndUser';\n\n const [isInsightsDropOpen, setIsInsightsDropOpen] = useState(false);\n const [isInsightsButtonClicked, setIsInsightsButtonClicked] = useState(false);\n const [insightEnabledPage, setInsightEnabledPage] = useState('');\n const [hasInsigtData, setHasInsightData] = useState<null | boolean>(null);\n const { isReady, value: boData } = useFeatureFlag([\n 'im-customer-usermanagement-notificationsettingzenithview-isenabled',\n ]);\n\n const showNotificationBellIcon = isReady\n ? boData[\n 'im-customer-usermanagement-notificationsettingzenithview-isenabled'\n ] === 'true'\n : false;\n const updateInsightDataStatus = useCallback((hasData: boolean | null) => {\n setHasInsightData(hasData);\n }, []);\n const firebaseReady = useFirebaseLoader();\n const useMarkAsReadNotification = useMarkAsReadNotifications();\n\n const [chat, setChat] = useState<any>([]);\n const [historyChat, setHistoryChat] = useState<any>([]);\n const latestChat = useRef<any>(null);\n latestChat.current = chat;\n const [fcmToken, setFcmtoken] = useState('');\n\n const hasPermission = useHasPermission();\n const location = useLocation();\n const enableInsightsPaths = [\n '/insight/insights-v2',\n '/my/cart',\n '/my/dashboard',\n '/product/productsearch',\n '/product/productdetails',\n '/product/subscriptioncategories',\n '/my/ordertracking/v3/ordersearch',\n '/my/ordertracking/v3/orderdetails',\n '/frame',\n '/invoice/invoicessearch',\n '/invoice/invoicessearch',\n '/my/subscriptions/list',\n ];\n const enableRollDownForInsightsPaths = [\n '/my/ordertracking/v3/ordersearch',\n '/my/ordertracking/v3/orderdetails',\n '/frame',\n '/invoice/invoicessearch',\n '/invoice/invoicessearch',\n '/my/subscriptions/list',\n ];\n const navigate = useNavigate();\n const cartItemsCount = useCartItemsCount();\n const [closeInsightsDrop, setCloseInsightsDrop] = useState(false);\n const enableUserManagement = isFeatureEnabled(\n isFlagLoaded,\n boValues,\n 'EnableUserManagement'\n );\n const enableInsightsFrameWork = isFeatureEnabled(\n isFlagLoaded,\n boValues,\n 'EnableInsightsFrameWork'\n );\n const disableCartIconOnAddToCart = isFeatureEnabled(\n isFlagLoaded,\n boValues,\n 'DisableCartIconOnAddToCart'\n );\n const isAddToCartPending =\n useIsMutating({\n mutationKey: ['add-product-to-cart'],\n }) > 0;\n const dismissAllHandler = useCallback(() => {\n setCloseInsightsDrop((prevCloseInsightsDrop) => !prevCloseInsightsDrop);\n }, []);\n\n const getVisitedPageInfo = useCallback((currentPagePath: string) => {\n const visitedPages = JSON.parse(\n localStorage.getItem('visitedQuickInsightPages') ?? '[]'\n );\n\n if (visitedPages.includes(currentPagePath ?? ''))\n setCloseInsightsDrop((prevCloseInsightsDrop) => !prevCloseInsightsDrop);\n else setInsightEnabledPage(currentPagePath);\n }, []);\n\n const onQuickInsightsRollDown = useCallback(() => {\n if (isQuickInsightsRollDownEnabled) {\n setHasInsightData(null);\n if (\n location?.pathname === '/my/ordertracking/v3/ordersearch' ||\n location?.pathname === '/my/ordertracking/v3/orderdetails' ||\n (location?.pathname === '/frame' &&\n location.search.includes('ordersearch'))\n ) {\n getVisitedPageInfo('/my/ordertracking/');\n } else if (\n enableRollDownForInsightsPaths.includes(location?.pathname ?? '')\n ) {\n getVisitedPageInfo(location?.pathname);\n } else if (\n location?.pathname === '/product/productsearch' &&\n location?.search?.includes('vendor') &&\n !location?.search?.includes('vendorname')\n ) {\n getVisitedPageInfo(location?.pathname);\n } else\n setCloseInsightsDrop((prevCloseInsightsDrop) => !prevCloseInsightsDrop);\n } else\n setCloseInsightsDrop((prevCloseInsightsDrop) => !prevCloseInsightsDrop);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [getVisitedPageInfo, isQuickInsightsRollDownEnabled, location]);\n\n const onClickInsightsCenter = useCallback(\n (navigateLink = '/insight/insights-v2') => {\n navigate(navigateLink);\n onQuickInsightsRollDown();\n },\n [navigate, onQuickInsightsRollDown]\n );\n\n const flag = JSON.parse(localStorage.getItem('setValueFlag') || 'false');\n setTimeout(() => {\n if (flag) {\n const valueGet = JSON.parse(localStorage.getItem('isEnabledOrNot') || '');\n const QuoteCheckoutBtnStatus = valueGet ? 'Enabled' : 'Disabled';\n setDigitalData({ QuoteCheckoutBtnStatus });\n }\n }, 1000);\n\n useEffect(() => {\n onQuickInsightsRollDown();\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [location?.pathname]);\n\n const listener = useCallback((event: MessageEvent) => {\n const updatedChat = [...latestChat.current];\n const isduplicate = updatedChat.some((item) => {\n return (\n (item.messageId !== undefined &&\n item.messageId === event.data.messageId) ||\n (item.messageId !== undefined &&\n item.messageId === event.data.fcmMessageId) ||\n (item.title !== undefined && item.title === event.data.data.title) ||\n (item.content !== undefined && item.content === event.data.data.content)\n );\n });\n if (event?.data && !isduplicate) {\n updatedChat.push(event.data);\n\n const Chat = updatedChat\n .filter((item) => item?.data?.title || item?.data?.content)\n .map((item) => ({\n ...item,\n content: item?.data?.content,\n createdDate: item?.createdDate || new Date().toISOString(),\n title: item?.data?.title,\n }));\n\n if (Chat.length > 0) {\n setChat(Chat);\n }\n }\n\n return () => {\n navigator?.serviceWorker?.removeEventListener('message', listener);\n };\n }, []);\n navigator?.serviceWorker?.addEventListener('message', listener);\n\n useEffect(() => {\n if (isInsightsButtonClicked) {\n let dataStatus: boolean | null = true;\n\n if (hasInsigtData === null) dataStatus = false;\n else dataStatus = hasInsigtData;\n\n setHasInsightData(dataStatus);\n }\n }, [hasInsigtData, isInsightsButtonClicked]);\n const markAllAsRead = async () => {\n const notificationIds = [...chat, ...historyChat]\n .map((item) => item?.data?.notificationId || item?.notificationId) // ✅ Handle both structures\n .filter(Boolean); // ✅ Remove undefined values\n\n useMarkAsReadNotification.mutate({\n notificationIds,\n });\n };\n return (\n <>\n {isReady && showNotificationBellIcon && (\n <FCMEnabler\n chat={chat}\n fcmToken={fcmToken}\n firebaseReady={firebaseReady}\n historyChat={historyChat}\n latestChat={latestChat}\n setChat={setChat}\n setFcmtoken={setFcmtoken}\n setHistoryChat={setHistoryChat}\n />\n )}\n {!isAuthenticated && isMobile ? (\n <HeaderX4CMobile\n enableAISuggestions={false}\n getSearchSuggestions={getSearchSuggestions}\n isLogoClickable={isLogoClickable}\n onMenuButtonClick={onMenuButtonClick}\n />\n ) : (\n <Header\n AvatarProps={AvatarProps}\n NotificationProps={{\n markAllAsRead: () => {\n markAllAsRead();\n },\n notifications: [...chat, ...historyChat],\n openNotifications: function noRefCheck() {},\n unReadCount: chat?.length + historyChat?.length,\n }}\n cartItemsCount={cartItemsCount}\n closeInsightsDrop={closeInsightsDrop}\n data-testid=\"header\"\n disableCartIcon={disableCartIconOnAddToCart && isAddToCartPending}\n enableAISuggestions={enableAISuggestions}\n endUserIcon={isEndUserFeatureEnabled ? EndUserIcon : undefined}\n endUserTitle={isEndUserFeatureEnabled ? 'DEMO RESELLER' : undefined}\n getSearchSuggestions={getSearchSuggestions}\n hasInsightData={hasInsigtData}\n impersonationHeaderProps={impersonationHeaderProps}\n insightsContent={\n enableInsightsFrameWork ? (\n <QuickInsights\n hasInsightsData={hasInsigtData}\n isInsightsButtonClicked={isInsightsButtonClicked}\n isInsightsDropOpen={isInsightsDropOpen}\n onClickInsightsCenter={onClickInsightsCenter}\n updateInsightDataStatus={updateInsightDataStatus}\n />\n ) : (\n <InsightsMessagingQueue\n dismissAllHandler={dismissAllHandler}\n maxDropHeight={260}\n onClickInsightsCenter={onClickInsightsCenter}\n />\n )\n }\n isAuthenticated={isAuthenticated}\n isCmpWhitelisted={enableAISuggestions || isCmpWhitelisted}\n isEndUserLogin={isEndUserFeatureEnabled}\n isLogoClickable={isLogoClickable}\n onMenuButtonClick={onMenuButtonClick}\n onUserActionClick={onUserActionClick}\n page={insightEnabledPage}\n setIsInsightsButtonClicked={setIsInsightsButtonClicked}\n setIsInsightsDropOpen={setIsInsightsDropOpen}\n showAvatar={showAvatar}\n showCartIcon={showCartIcon}\n showCulturePicker={showCulturePicker}\n showFavoritesIcon={showFavoritesIcon}\n showImpersonationHeader={showImpersonationHeader}\n showInsightsIcon={\n isInsightsMessagingQueue &&\n enableInsightsPaths.includes(location?.pathname ?? '') &&\n hasPermission(\n enableUserManagement ? ['ViewInsight'] : ['ResellerAdmin']\n )\n }\n // showNotificationIcon={isNotificationEnabled}\n showNotificationIcon={showNotificationBellIcon}\n showSeachBar={showSeachBar}\n />\n )}\n </>\n );\n}\n\nconst EndUserIcon: JSX.Element = (\n <img\n alt=\"DEMO RESELLER\"\n src=\"/cep/assets/img/enduser-poc/demo-header-icon.svg\"\n width={70}\n />\n);\nfunction isFeatureEnabled(\n isFlagLoaded: boolean,\n boValues: any,\n featureName: string\n) {\n return isFlagLoaded && boValues[featureName] === 'true';\n}\n","import { useApiPatch } from 'mf_core/query';\nimport { useMutation, useQueryClient } from '@tanstack/react-query';\n\nexport function useMarkAsReadNotifications() {\n const queryClient = useQueryClient();\n const apiPatch = useApiPatch();\n type MarkAsReadNotificationRequestTo = {\n notificationIds: string[];\n notificationStatus: string;\n };\n return useMutation({\n mutationFn: (body: { notificationIds: string[] }) => {\n const requestObject: MarkAsReadNotificationRequestTo = {\n notificationIds: body?.notificationIds,\n notificationStatus: 'read',\n };\n const data = apiPatch(\n '/account-management/v1/notifications/status',\n requestObject\n );\n return data;\n },\n onError: () => {\n return;\n },\n onSuccess: () => {\n queryClient.invalidateQueries({\n queryKey: [\n '/account-management/v1/notifications/history?Page=1&Size=10&NotificationType=inapp&onlySummary=true',\n ],\n });\n },\n });\n}\n","import { useApiQuery } from 'mf_core/query';\n\ntype CartHeaderDataTO = {\n id: string;\n lineCount: number;\n name: string;\n};\n\nexport function useCartItemsCount() {\n const query = useApiQuery<CartHeaderDataTO>(\n '/cart/v1/cart-list/default/header-data'\n );\n return (query.data && query.data.lineCount) ?? 0;\n}\n","import { useApiQueryForCms } from 'mf_core/logout';\n/** 1800000 ms (30 mins) */\nconst MAX_CACHE_TIME = 1800000;\n\nexport function useHelpMenuQuery(locale: string) {\n return useApiQueryForCms<HelpMenu>(\n `/cms/v1/help-menu-items?locale=${locale}`,\n undefined,\n { gcTime: MAX_CACHE_TIME, staleTime: MAX_CACHE_TIME }\n );\n}\nexport type HelpMenu = {\n items?: Help[];\n total?: number;\n};\nexport type Help = {\n isModel: boolean;\n onclick: string;\n openUrlInNewTab: boolean;\n title: string;\n trackingTag: string;\n url: string;\n};\n","import { useHelpMenuQuery } from '../../hooks/use-helpmenu';\nimport { useMemo } from 'react';\nimport { NavItem } from '@im/ui-lib/nav';\nimport { useLocalizationContext } from '@im/react-localization';\nimport { buildHelpMenuItem } from './utils';\n\nexport function useHelpNavItems() {\n const { locale } = useLocalizationContext();\n const { data: help } = useHelpMenuQuery(locale);\n return useMemo<NavItem[]>(() => {\n return buildHelpMenuItem(help?.items);\n }, [help?.items]);\n}\n","import React from 'react';\nimport { HelpMenu } from '@im/ui-lib/HelpMenu';\nimport { useHelpNavItems } from '../../app/nav/useHelpNavItems';\n\n// eslint-disable-next-line import/no-default-export\nexport default function IngramHelpMenu() {\n const helpNavItems = useHelpNavItems();\n return (\n <>\n {helpNavItems && helpNavItems.length > 0 && (\n <HelpMenu\n data-testid=\"help-menu-fab\"\n height={48}\n key=\"help-menu-items\"\n left={8}\n marginTop={80}\n navItems={helpNavItems}\n width={48}\n />\n )}\n </>\n );\n}\n","import React from 'react';\nimport { useLocalization } from '@im/react-localization';\nimport { IngramLogo } from '@im/ui-lib/icons/IngramLogo';\nimport Box from '@mui/material/Box';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\nimport { useSiteConfig, useBuildVars } from 'mf_core/config';\n\nexport const IngramMobile = () => {\n const { siteCode } = useSiteConfig();\n const { buildEnvironment } = useBuildVars();\n\n const whitelistedCountries = ['us', 'ca'];\n const whitelistedEnv = ['staging', 'staging2', 'development'];\n\n const isNewHeader =\n whitelistedCountries.includes(siteCode) &&\n whitelistedEnv.includes(buildEnvironment);\n const iosLink =\n buildEnvironment === 'production'\n ? 'https://testflight.apple.com/join/jte4bnsP'\n : 'https://testflight.apple.com/join/aYWXKdbk';\n const anroidLink =\n buildEnvironment === 'production'\n ? 'https://play.google.com/apps/internaltest/4701580167084484765'\n : 'https://play.google.com/apps/internaltest/4700957448059632394';\n\n const { translate } = useLocalization();\n\n return (\n <>\n <Box padding={{ sm: 4, xs: '10px 15px' }}>\n <IngramLogo width=\"242\" />\n </Box>\n <Box\n sx={{\n alignItems: 'center',\n bgcolor: '#f8f8f8',\n justifyContent: 'center',\n padding: '10px 20px',\n verticalAlign: 'middle',\n }}\n >\n {isNewHeader ? (\n <Box sx={{ textAlign: 'center' }}>\n <Typography sx={{ fontSize: '18px', fontWeight: 600 }}>\n {translate('MobileWeb.LoginPageDescriptionLine1')}\n </Typography>\n <Typography sx={{ fontSize: '14px', fontWeight: 400 }}>\n {translate('MobileWeb.LoginPageDescriptionLine2')}\n </Typography>\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ justifyContent: 'center', mt: '10px' }}\n >\n <a href={anroidLink}>\n <img\n alt=\"google play\"\n src=\"/cep/assets/img/login/mobile-anroid-download.png\"\n />\n </a>\n <a href={iosLink}>\n <img\n alt=\"app store\"\n src=\"/cep/assets/img/login/mobile-ios-download.png\"\n />\n </a>\n </Stack>\n </Box>\n ) : (\n <>\n <Typography\n align=\"center\"\n color={(theme) => theme.palette.text.secondary}\n sx={{ fontSize: '24px', fontWeight: 400 }}\n >\n Please visit on a larger device\n </Typography>\n <Typography\n align=\"center\"\n color={(theme) => theme.palette.text.secondary}\n sx={{ fontSize: '14px', fontWeight: 400 }}\n >\n Ingram Micro Xvantage isn't currently available for mobile devices\n </Typography>\n </>\n )}\n </Box>\n <Stack\n direction={{ sm: 'row', xs: 'column' }}\n justifyContent={{ sm: 'space-between', xs: 'start' }}\n sx={{\n backgroundImage: `url('/cep/assets/img/login/login-header.png')`,\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat',\n height: 325,\n }}\n ></Stack>\n <Box>\n <Typography\n align=\"center\"\n color={(theme) => theme.palette.text.secondary}\n padding={1}\n variant=\"body2\"\n >\n {translate('OktaWidget.Copyright', {\n year: new Date().getFullYear().toString(),\n })}\n </Typography>\n </Box>\n </>\n );\n};\n","import { useApiQuery } from 'mf_core/query';\n\nexport function useMyBusinessMenu() {\n return useApiQuery<MyBusinessMenuItem[]>(`/shared/v1/menus/my-business`);\n}\n\nexport type MyBusinessMenuItem = {\n name: string;\n openInNewTab: boolean;\n sequence: number;\n subMenu: null | MyBusinessMenuItem[];\n translationKey: string;\n url: string;\n};\n","import { useApiQuery } from 'mf_core/query';\nimport { useSiteConfig } from 'mf_core/config';\n\nexport function useVoucherCountAPI() {\n const { siteCode } = useSiteConfig();\n return useApiQuery<VoucherCount>('/checkout/v1/vouchers/count', undefined, {\n enabled: voucherEnabledCountries[siteCode] || false,\n refetchOnWindowFocus: false,\n });\n}\n\nexport type VoucherCount = {\n count: number;\n};\n\nconst voucherEnabledCountries: { [country: string]: boolean } = {\n at: true,\n ch: true,\n de: true,\n dk: true,\n es: true,\n fi: true,\n fr: true,\n gb: true,\n hu: true,\n it: true,\n pt: true,\n se: true,\n};\n","import { useIsAuthenticated } from 'mf_core/auth';\nimport { useApiQuery } from 'mf_core/query';\n\nexport function useProductMenuQuery(locale: string, enabled: boolean) {\n const isAuthenticated = useIsAuthenticated();\n return useApiQuery<ProductNav[]>(\n `/shared/v1/product-categories`,\n { culture: locale },\n { enabled },\n undefined,\n { isLogoutApi: !isAuthenticated }\n );\n}\nexport type ProductNav = {\n link: string | null;\n name: string;\n openInNewTab: boolean;\n sub: ProductNav[] | null;\n};\n","import { useCMSApiQuery } from './useCMSApiQuery';\n\nexport function useServicesMenuQuery(locale: string, enabled: boolean) {\n return useCMSApiQuery<ServicesMenu>(\n `/cms/v1/menu-items?PageType=Services&locale=${locale}`,\n undefined,\n { enabled }\n );\n}\nexport type ServicesMenu = {\n menuitems: Service[];\n total: number;\n};\nexport type Service = {\n nodeAliasPath: string;\n nodeGUID: string;\n pageName: string;\n pageSubType: null;\n pageType: string;\n pageUrl: string;\n partialPageUrl: string;\n subMenu: Service[];\n vendorName: string;\n};\n","import { useCMSApiQuery } from './useCMSApiQuery';\n\nexport function useSolutionsMenuQuery(locale: string, enabled: boolean) {\n return useCMSApiQuery<SolutionsMenu>(\n `/cms/v1/menu-items?PageType=Solutions&locale=${locale}`,\n undefined,\n { enabled }\n );\n}\nexport type SolutionsMenu = {\n menuitems: Solution[];\n total: number;\n};\nexport type Solution = {\n nodeAliasPath: string;\n nodeGUID: string;\n pageName: string;\n pageSubType: null;\n pageType: string;\n pageUrl: string;\n partialPageUrl: string;\n subMenu: Solution[];\n vendorName: string;\n};\n","import { useCMSApiQuery } from './useCMSApiQuery';\n\nexport function useVendorsMenuQuery(locale: string, enabled: boolean) {\n const result = useCMSApiQuery<VendorsMenu>(\n `/cms/v1/menu-items?PageType=vendors&locale=${locale}`,\n undefined,\n { enabled }\n );\n return result;\n}\nexport type VendorsMenu = {\n menuitems: Vendor[];\n total: number;\n};\nexport type Vendor = {\n isLeftNav: boolean;\n partialPageUrl: string;\n vendorName: string;\n vendorPageName: string;\n};\n","import { useLocalizationContext, useTranslate } from '@im/react-localization';\nimport { NavItem } from '@im/ui-lib/nav';\nimport { useIsAuthenticated } from 'mf_core/auth';\nimport { useBuildVars, useSiteConfig } from 'mf_core/config';\nimport { useMemo } from 'react';\nimport { useMyBusinessNavItems } from './useMyBusinessNavItems';\nimport { useProductsNavItems } from './useProductsNavItems';\nimport { useServicesNavItems } from './useServicesNavItems';\nimport { useSolutionsNavItems } from './useSolutionsNavItems';\nimport { useVendorsNavItems } from './useVendorsNavItems';\nimport { applicationCenterAvailability } from './utils';\n\nconst HIDE_SEARCHBAR_PRODUCT_VENDORS_COUNTRIES: Array<string> = ['br'];\nexport function useSideNavItems(enabled = true): NavItem[] {\n const { locale } = useLocalizationContext();\n const { siteCode } = useSiteConfig();\n const availableInCountry = applicationCenterAvailability({ siteCode });\n const translate = useTranslate();\n const isAuthenticated = useIsAuthenticated();\n const myBusinessNavItems = useMyBusinessNavItems();\n const productsNavItems = useProductsNavItems(locale, enabled);\n const vendorsNavItems = useVendorsNavItems(locale, enabled);\n const solutionsNavItems = useSolutionsNavItems(enabled);\n const servicesNavItems = useServicesNavItems(enabled);\n const { buildEnvironment } = useBuildVars();\n\n return useMemo<NavItem[]>(() => {\n const navItems: NavItem[] = [];\n\n const hideSearchBarProductVendorNav =\n HIDE_SEARCHBAR_PRODUCT_VENDORS_COUNTRIES.includes(siteCode) &&\n !isAuthenticated;\n\n if (isAuthenticated) {\n navItems.push({\n key: 'home',\n label: translate('Navigation.Home'),\n route: '/my/dashboard',\n });\n navItems.push({\n key: 'myBusiness',\n label: translate('Navigation.MyBusiness'),\n navItems: myBusinessNavItems,\n });\n } else {\n navItems.push({\n key: 'home',\n label: translate('Navigation.Home'),\n route: '/home',\n });\n }\n\n if (!hideSearchBarProductVendorNav) {\n navItems.push({\n key: 'products',\n label: translate('Navigation.Products'),\n navItems: productsNavItems,\n });\n\n navItems.push({\n key: 'vendors',\n label: translate('Navigation.Vendors'),\n navItems: vendorsNavItems,\n });\n }\n navItems.push({\n key: 'solutions',\n label: translate('Navigation.Solutions'),\n navItems: solutionsNavItems,\n });\n\n navItems.push({\n key: 'services',\n label: translate('Navigation.Services'),\n navItems: servicesNavItems,\n });\n\n navItems.push({\n key: 'resources',\n label: translate('Navigation.Resources'),\n route: '/cms/resources',\n });\n\n if (isAuthenticated) {\n navItems.push({\n key: 'events',\n label: translate('Navigation.Events'),\n route: '/cms/events/landing',\n });\n }\n if (availableInCountry) {\n navItems.push({\n key: 'integrationshub',\n label: translate('AppStore.AppStoreName') || 'Integrations Hub',\n route: isAuthenticated\n ? '/my/integrationshub/appstodownload'\n : '/integrationshub/appstodownload',\n });\n }\n\n if (isAuthenticated && buildEnvironment === 'stagingx')\n navItems.push({\n key: 'feedback',\n label: translate('Navigation.Feedback'),\n onClick: () => (window as any).openFeedbackForm?.(),\n });\n return navItems;\n }, [\n siteCode,\n isAuthenticated,\n translate,\n solutionsNavItems,\n servicesNavItems,\n availableInCountry,\n buildEnvironment,\n myBusinessNavItems,\n productsNavItems,\n vendorsNavItems,\n ]);\n}\n","import { useCallback, useMemo } from 'react';\nimport { NavItem } from '@im/ui-lib/nav';\nimport { useTranslate } from '@im/react-localization';\nimport {\n useMyBusinessMenu,\n MyBusinessMenuItem,\n} from '../../hooks/use-mybusinessmenu';\nimport { useVoucherCountAPI } from '../../hooks/use-vouchercount';\n\nexport function useMyBusinessNavItems() {\n const translate = useTranslate();\n const { data: vouchers, isLoading: isVoucherLoading } = useVoucherCountAPI();\n const { data: backofficeMenuItems } = useMyBusinessMenu();\n\n // You may write custom logic to render a dynamic url by\n // setting the value to a function that returns the desired url or route.\n const srcUrlMap: { [itemName: string]: string } = useMemo(() => {\n return {\n EXAMPLE_SOURCE_URL: 'https://www.ingrammicro.com',\n };\n }, []);\n\n const menuItems = useMemo(() => {\n if (\n backofficeMenuItems &&\n !isVoucherLoading &&\n !(vouchers && vouchers.count > 0)\n ) {\n const voucherMenuIndex = backofficeMenuItems.findIndex(\n (m: MyBusinessMenuItem) => m.name === 'Vouchers'\n );\n if (voucherMenuIndex > -1)\n backofficeMenuItems.splice(voucherMenuIndex, 1);\n }\n backofficeMenuItems\n ?.filter((m: MyBusinessMenuItem) => m.url === 'FROM_SOURCE')\n .forEach((m: MyBusinessMenuItem) => {\n m.url = srcUrlMap[m.name];\n if (!m.url) {\n console.warn(\n `No SOURCE URL supplied for dynamic My Business menu item \"${m.name}\". Update source code or provide URL in Business Menu BO configuration.`\n );\n }\n });\n return backofficeMenuItems;\n }, [backofficeMenuItems, isVoucherLoading, srcUrlMap, vouchers]);\n\n // If language is changed, translate method returns empty string first and then actual value\n // because it loads the translation through xhr call which consumes few ms.\n // This constant is used to trigger 'buildMyBusinessMenu' callback fn when the translation is loaded.\n const menuTranslateCheck = translate('Navigation.MyBusiness');\n\n const buildMyBusinessMenu = useCallback(\n (items: MyBusinessMenuItem[] | undefined) => {\n if (!items) return [];\n return items\n .filter((item) => item.url !== undefined)\n .map((item) => {\n const { name, openInNewTab, subMenu, translationKey } = item;\n const navItem: NavItem = {\n key: name,\n label: translate(translationKey),\n };\n\n if (name === 'Vouchers' && vouchers && vouchers.count > 0) {\n navItem.label = `${translate(translationKey)}(${vouchers.count})`;\n }\n\n const isRelPath = !item?.url?.startsWith('http');\n\n if (!openInNewTab) {\n if (isRelPath) navItem.route = item.url;\n //urls open in new tab by default, override with onClick\n else navItem.onClick = () => (window.location.href = item.url);\n } else if (isRelPath)\n //rel paths in new tabs need base path\n navItem.onClick = () =>\n window.open(`/cep/app${item.url}`, '_blank');\n else navItem.url = item.url;\n\n if (subMenu) navItem.navItems = buildMyBusinessMenu(subMenu);\n\n return navItem;\n });\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [menuTranslateCheck, vouchers]\n );\n return useMemo(() => {\n return buildMyBusinessMenu(menuItems);\n }, [menuItems, buildMyBusinessMenu]);\n}\n","import { useMemo } from 'react';\nimport { NavItem } from '@im/ui-lib/nav';\nimport { ProductNav, useProductMenuQuery } from '../../hooks/use-product';\n\nexport function useProductsNavItems(locale: string, enabled: boolean) {\n const { data: categories } = useProductMenuQuery(locale, enabled);\n return useMemo<NavItem[]>(() => {\n const navItems: NavItem[] = [];\n if (categories && categories.length > 0) {\n for (const cat of categories) {\n const navItem: NavItem = {\n key: cat.name,\n label: cat.name,\n navItems: cat.sub?.map((subcat: ProductNav) => {\n return {\n key: subcat.name,\n label: subcat.name,\n navItems: subcat.sub?.map((subcat1: ProductNav) => {\n return {\n key: subcat1.name,\n label: subcat1.name,\n route: !subcat1.openInNewTab ? subcat1.link : undefined,\n url: subcat1.openInNewTab ? subcat1.link : undefined,\n } as NavItem;\n }),\n route: !subcat.openInNewTab ? subcat.link : undefined,\n url: subcat.openInNewTab ? subcat.link : undefined,\n } as NavItem;\n }),\n };\n if (cat.link) {\n if (cat.openInNewTab) navItem.url = cat.link;\n else navItem.route = cat.link;\n }\n navItems.push(navItem);\n }\n }\n return navItems;\n }, [categories]);\n}\n","import { NavItem } from '@im/ui-lib/nav';\nimport { useMemo } from 'react';\nimport { useVendorsMenuQuery, Vendor } from '../../hooks/use-vendorsmenu';\nimport { validateProperty } from './utils';\n\nexport function useVendorsNavItems(locale: string, enabled: boolean) {\n const result = useVendorsMenuQuery(locale, enabled);\n\n const vendors = useMemo(() => {\n if (result.data?.menuitems?.length) {\n localStorage.setItem(\n 'localLeftNavVendorList',\n JSON.stringify(result.data?.menuitems?.map((a: Vendor) => a.vendorName))\n );\n }\n const filterLeftNavList = result.data?.menuitems?.filter(\n (x: Vendor) => x.isLeftNav === true\n );\n\n return {\n menuitems: filterLeftNavList,\n total: filterLeftNavList?.length ?? 0,\n };\n }, [result.data]);\n\n return useMemo<NavItem[]>(() => {\n const navItems: NavItem[] = [];\n const count =\n vendors && vendors.total && vendors.total > 0 ? vendors.total : 0;\n\n if (count > 0) {\n for (let i = 0; i <= count; i++) {\n const key = validateProperty(vendors, 'vendorName', i);\n const pageName = validateProperty(vendors, 'pageName', i);\n const partialPageUrl = validateProperty(vendors, 'partialPageUrl', i);\n const searchUrl = validateProperty(vendors, 'searchUrl', i);\n const pagePath = partialPageUrl\n ? partialPageUrl.split('/').pop() ?? ''\n : '';\n if (key !== '') {\n navItems.push({\n key,\n label: pageName,\n route: searchUrl\n ? `/product/productsearch?title=${encodeURIComponent(\n key\n )}&pageName=${encodeURIComponent(pagePath)}&${searchUrl}`\n : `/product/productsearch?title=${encodeURIComponent(\n key\n )}&vendor=${encodeURIComponent(\n key\n )}&pageName=${encodeURIComponent(pagePath)}`,\n });\n }\n }\n }\n\n return navItems;\n }, [vendors]);\n}\n","import { useLocalizationContext } from '@im/react-localization';\nimport { NavItem } from '@im/ui-lib/nav';\nimport { useMemo } from 'react';\nimport { useSolutionsMenuQuery } from '../../hooks/use-solutionsmenu';\nimport { buildNavMenuItem } from './utils';\n\nexport function useSolutionsNavItems(enabled: boolean) {\n const { locale } = useLocalizationContext();\n const { data: solution } = useSolutionsMenuQuery(locale, enabled);\n\n return useMemo<NavItem[]>(() => {\n return buildNavMenuItem(solution, locale);\n }, [locale, solution]);\n}\n","import { useMemo } from 'react';\nimport { useLocalizationContext } from '@im/react-localization';\nimport { NavItem } from '@im/ui-lib/nav';\nimport { useServicesMenuQuery } from '../../hooks/use-servicesmenu';\nimport { buildNavMenuItem } from './utils';\n\nexport function useServicesNavItems(enabled: boolean) {\n const { locale } = useLocalizationContext();\n const { data: services } = useServicesMenuQuery(locale, enabled);\n\n return useMemo<NavItem[]>(() => {\n const navMenuItems = buildNavMenuItem(services, locale);\n\n return navMenuItems;\n }, [locale, services]);\n}\n","import React, { useEffect, useState } from 'react';\nimport ClickAwayListener from '@mui/material/ClickAwayListener';\nimport Drawer from '@mui/material/Drawer';\nimport { LeftSideNav } from '@im/ui-lib/LeftSideNav';\nimport { LeftSideNavMobile } from '@im/ui-lib/LeftSideNavMobile';\nimport { NavItem, useNavTo } from '@im/ui-lib/nav';\nimport { useSideNavItems } from '../../app/nav/side-nav-items';\nimport { useLocation } from 'react-router-dom';\nimport { useHelpNavItems } from '../../app/nav/useHelpNavItems';\n\ntype Props = {\n drawerOpen: boolean;\n headerHeight: number;\n hoverRequired: boolean;\n isAuthenticated: boolean;\n isCheckout: boolean;\n isMobile: boolean;\n isTempDrawer: boolean;\n setDrawerOpen: (action: boolean) => void;\n};\n\nexport function IngramSideNav(props: Props) {\n const {\n drawerOpen,\n headerHeight,\n isAuthenticated,\n isCheckout,\n isMobile,\n isTempDrawer,\n setDrawerOpen,\n } = props;\n const { pathname, search } = useLocation();\n const [activeSideNavItem, setActiveSideNavItem] = useState<\n NavItem | undefined\n >();\n const [enableApi, setEnableApi] = useState(false);\n const enableMenuApi = enableApi || isAuthenticated || isMobile;\n const sideNavItems = useSideNavItems(enableMenuApi);\n const navTo = useNavTo();\n const onNavItemClick = (navItem: NavItem) => {\n setDrawerOpen(false);\n navTo(navItem);\n };\n const helpNavItems = useHelpNavItems();\n\n useEffect(() => {\n if (pathname === '/home' || pathname === '/my/dashboard') {\n setActiveSideNavItem(sideNavItems[0]);\n }\n\n if (isAuthenticated) {\n if (\n pathname === '/frame' ||\n pathname === '/product/favoriteproducts' ||\n pathname === '/my/bid/bidlist' ||\n pathname === '/my/quotemgmt/quotelist'\n ) {\n setActiveSideNavItem(sideNavItems[1]);\n } else if (\n pathname === '/product/productsearch' &&\n !search.includes('vendor')\n ) {\n setActiveSideNavItem(sideNavItems[2]);\n } else if (\n pathname === '/product/productsearch' &&\n search.includes('vendor')\n ) {\n setActiveSideNavItem(sideNavItems[3]);\n } else if (pathname.includes('cms')) {\n if (pathname.includes('solutions')) {\n setActiveSideNavItem(sideNavItems[4]);\n } else if (pathname.includes('services')) {\n setActiveSideNavItem(sideNavItems[5]);\n } else if (pathname.includes('resources')) {\n setActiveSideNavItem(sideNavItems[6]);\n } else if (pathname.includes('Events')) {\n setActiveSideNavItem(sideNavItems[7]);\n }\n }\n } else if (\n pathname === '/product/productsearch' &&\n search.includes('vendor')\n ) {\n setActiveSideNavItem(sideNavItems[1]);\n } else if (pathname.includes('cms')) {\n if (pathname.includes('solutions')) {\n setActiveSideNavItem(sideNavItems[2]);\n } else if (pathname.includes('services')) {\n setActiveSideNavItem(sideNavItems[3]);\n } else if (pathname.includes('resources')) {\n setActiveSideNavItem(sideNavItems[4]);\n } else if (pathname.includes('Events')) {\n setActiveSideNavItem(sideNavItems[5]);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [pathname, search, isAuthenticated]);\n\n return (\n <ClickAwayListener\n mouseEvent=\"onMouseDown\"\n onClickAway={() => drawerOpen && setDrawerOpen(false)}\n touchEvent=\"onTouchStart\"\n >\n {isMobile && !isAuthenticated ? (\n <Drawer\n aria-label=\"app navigation\"\n onClose={() => setDrawerOpen(false)}\n open={drawerOpen}\n sx={{\n '& .MuiBackdrop-root': {\n position: 'unset',\n },\n '& .MuiDrawer-paper': {\n borderRight: `1px solid #D1D1D1`,\n boxShadow: 'none',\n height: '100%',\n },\n position: 'relative',\n }}\n variant={'temporary'}\n >\n <LeftSideNavMobile\n activeSideNavItem={activeSideNavItem}\n helpNavItems={helpNavItems}\n hoverRequired={true}\n isHelpNavItemVisible={true}\n navItems={sideNavItems}\n onClose={() => setDrawerOpen(false)}\n onNavItemClick={onNavItemClick}\n setActiveSideNavItem={setActiveSideNavItem}\n />\n </Drawer>\n ) : (\n <Drawer\n aria-label=\"app navigation\"\n onClose={() => setDrawerOpen(false)}\n onFocus={\n !enableMenuApi\n ? () => {\n setEnableApi(true);\n }\n : undefined\n }\n onMouseEnter={\n !enableMenuApi\n ? () => {\n setEnableApi(true);\n }\n : undefined\n }\n open={isTempDrawer ? drawerOpen : true}\n sx={{\n '& .MuiBackdrop-root': {\n position: 'unset',\n },\n '& .MuiDrawer-paper': {\n borderRight: `1px solid #D1D1D1`,\n boxShadow: 'none',\n height: '100%',\n top: headerHeight,\n },\n position: 'relative',\n }}\n variant={isTempDrawer ? 'temporary' : 'persistent'}\n >\n {!isCheckout ? (\n <LeftSideNav\n activeSideNavItem={activeSideNavItem}\n headerHeight={headerHeight}\n hoverRequired={true}\n isAuthenticated={isAuthenticated}\n isHelpNavItemVisible={false}\n navItems={sideNavItems}\n onNavItemClick={onNavItemClick}\n setActiveSideNavItem={setActiveSideNavItem}\n />\n ) : (\n <LeftSideNav\n activeSideNavItem={undefined}\n headerHeight={headerHeight}\n hoverRequired={false}\n isAuthenticated={isAuthenticated}\n isHelpNavItemVisible={false}\n navItems={[]}\n onNavItemClick={() => {\n return 0;\n }}\n setActiveSideNavItem={setActiveSideNavItem}\n />\n )}\n </Drawer>\n )}\n </ClickAwayListener>\n );\n}\n","import { useApiQuery } from 'mf_core/query';\nimport { Gateway } from './useCMPCardCheck';\n\nexport const tokensUrlMap = {\n CYBERSOURCE: '/payment/v1/gateways/cybersource/tokens',\n DOCDATA: '/payment/v1/gateways/DocDataDirectDebit/tokens',\n WORLDPAY: '/payment/v1/gateways/worldpay/tokens?getAllTokens=true',\n};\n\nexport function usePaymentCards(enabled: boolean, gateway?: Gateway) {\n const tokensUrl = gateway ? tokensUrlMap[gateway] : '';\n return useApiQuery<any>(tokensUrl, undefined, {\n enabled,\n refetchOnWindowFocus: false,\n });\n}\n","import { useHasPermission, useIsFeatureWhitelisted } from 'mf_core/auth';\nimport { useFeatureFlagBase } from './use-feature-flag-base';\nimport { useMemo } from 'react';\nimport { useCMPPaymentTerm } from './useCMPPaymentTerm';\n\nconst boKeys = {\n CMP_CC_Enabled: 'CMP_CreditCardPopup_Enable',\n CMP_CC_TermCode: 'CMP_CreditCardTermCode',\n CMP_DocData_ForcePopup_Enabled: 'Is_Docdata_MP_PopUp_Enabled',\n CMP_WorldPay_ForcePopup_Enabled: 'Is_Worldpay_MP_PopUp_Enabled',\n Docdata_CMP_TermCode: 'Docdata_DD_CMP_TermCode',\n Is_Cybersource_Force_Popup_Enabled: 'Is_Cybersource_Force_Popup_Enabled',\n Is_DocData_enabled: 'Is_DocData_DD_enabled',\n Is_Worldpay_enabled: 'Is_Worldpay_enabled',\n Worldpay_CMP_TermCode: 'Worldpay_CMP_TermCode',\n};\n\nexport type Gateway = 'CYBERSOURCE' | 'DOCDATA' | 'WORLDPAY';\n\nexport const useCMPCardCheck = () => {\n const { boValues, isReady: isFlagLoaded } = useFeatureFlagBase();\n const isFeatureWhitelisted = useIsFeatureWhitelisted();\n const isCmpWhitelisted = isFeatureWhitelisted('CMP');\n const hasPermission = useHasPermission();\n const canPlaceOrder = hasPermission(['PlaceOrders']);\n\n const cmpEnabledInBO = useMemo(\n () => isFlagLoaded && isCmpWhitelisted,\n [isCmpWhitelisted, isFlagLoaded]\n );\n const cmpTermCodes = useMemo(\n () =>\n boValues[boKeys.CMP_CC_TermCode]\n ?.split(';')\n .map((code: any) => code.trim()?.toLowerCase())\n .filter(Boolean),\n [boValues]\n );\n const allCmpTermCodes = cmpTermCodes?.includes('*');\n\n const worldPayTermCodes = useMemo(\n () =>\n boValues[boKeys.Worldpay_CMP_TermCode]\n ?.split(';')\n .map((code: any) => code.trim()?.toLowerCase())\n .filter(Boolean),\n [boValues]\n );\n const allWorldPayTermCodes = worldPayTermCodes?.includes('*');\n\n const docDataTermCodes = useMemo(\n () =>\n boValues[boKeys.Docdata_CMP_TermCode]\n ?.split(';')\n .map((code: any) => code.trim()?.toLowerCase())\n .filter(Boolean),\n [boValues]\n );\n const allDocDataTermCodes = docDataTermCodes?.includes('*');\n\n const { data: cmpPaymentTerm } = useCMPPaymentTerm(\n cmpEnabledInBO &&\n canPlaceOrder &&\n (boValues[boKeys.CMP_CC_Enabled]?.toLowerCase() === 'true' ||\n boValues[boKeys.Is_Worldpay_enabled]?.toLowerCase() === 'true' ||\n boValues[boKeys.Is_DocData_enabled]?.toLowerCase() === 'true')\n );\n\n const enableCybersource = useMemo(\n () =>\n cmpEnabledInBO &&\n boValues[boKeys.CMP_CC_Enabled]?.toLowerCase() === 'true' &&\n (allCmpTermCodes ||\n cmpTermCodes?.includes(cmpPaymentTerm?.name?.toLowerCase())),\n [\n allCmpTermCodes,\n boValues,\n cmpEnabledInBO,\n cmpTermCodes,\n cmpPaymentTerm?.name,\n ]\n );\n\n const enableWorldPay = useMemo(\n () =>\n cmpEnabledInBO &&\n boValues[boKeys.Is_Worldpay_enabled]?.toLowerCase() === 'true' &&\n (allWorldPayTermCodes ||\n worldPayTermCodes?.includes(cmpPaymentTerm?.name?.toLowerCase())),\n [\n allWorldPayTermCodes,\n boValues,\n cmpEnabledInBO,\n cmpPaymentTerm?.name,\n worldPayTermCodes,\n ]\n );\n\n const enableDocData = useMemo(\n () =>\n cmpEnabledInBO &&\n boValues[boKeys.Is_DocData_enabled]?.toLowerCase() === 'true' &&\n (allDocDataTermCodes ||\n docDataTermCodes?.includes(cmpPaymentTerm?.name?.toLowerCase())),\n [\n allDocDataTermCodes,\n boValues,\n cmpEnabledInBO,\n cmpPaymentTerm?.name,\n docDataTermCodes,\n ]\n );\n const enableForcePopupDocdata =\n boValues[boKeys.CMP_DocData_ForcePopup_Enabled]?.toLowerCase() === 'true';\n\n const enableForcePopupWorldPay =\n boValues[boKeys.CMP_WorldPay_ForcePopup_Enabled]?.toLowerCase() === 'true';\n const enableForcePopupCybersource =\n boValues[boKeys.Is_Cybersource_Force_Popup_Enabled]?.toLowerCase() ===\n 'true';\n const gateway = useMemo((): Gateway | undefined => {\n if (enableWorldPay) return 'WORLDPAY';\n else if (enableDocData) return 'DOCDATA';\n else if (enableCybersource) return 'CYBERSOURCE';\n }, [enableCybersource, enableDocData, enableWorldPay]);\n\n return {\n enableCybersource,\n enableDocData,\n enableForcePopupCybersource,\n enableForcePopupDocdata,\n enableForcePopupWorldPay,\n enableWorldPay,\n gateway,\n isFlagLoaded,\n };\n};\n","import { useEffect } from 'react';\nimport { useNavigate } from 'react-router-dom';\n\nimport { useIsAuthenticated, useIsImpersonationMode } from 'mf_core/auth';\nimport { usePaymentCards } from './use-paymentCards';\nimport { useCMPCardCheck } from './useCMPCardCheck';\n\nexport function useCMPCardRedirect() {\n const navigate = useNavigate();\n const ignoreCCRedirect = sessionStorage.getItem('ignoreCCRedirect');\n\n const isAuthenticated = useIsAuthenticated();\n const isImpersonationMode = useIsImpersonationMode();\n\n const {\n enableCybersource,\n enableDocData,\n enableForcePopupCybersource,\n enableForcePopupDocdata,\n enableForcePopupWorldPay,\n enableWorldPay,\n gateway,\n isFlagLoaded,\n } = useCMPCardCheck();\n const cmpEnabled =\n (enableCybersource && enableForcePopupCybersource) ||\n (enableDocData && enableForcePopupDocdata) ||\n (enableWorldPay && enableForcePopupWorldPay);\n\n const { data: paymentCards, isFetched: fetchedCards } = usePaymentCards(\n cmpEnabled,\n gateway\n );\n\n useEffect(() => {\n //Impersonation mode: Card redirect could be skipped\n if (isImpersonationMode) return;\n\n if (!cmpEnabled) return;\n\n if (ignoreCCRedirect) return;\n\n if (isAuthenticated && cmpEnabled && fetchedCards) {\n if (!paymentCards || paymentCards?.length <= 0) {\n localStorage.setItem('forceCCEntry', 'true');\n navigate('/my/account/accountsettings');\n } else if (\n !paymentCards.some((card: any) => card.defaultCard || card.is_default)\n ) {\n localStorage.setItem('forceCCDefault', 'true');\n navigate('/my/account/accountsettings');\n }\n } else {\n localStorage.removeItem('forceCCEntry');\n localStorage.removeItem('forceCCDefault');\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n cmpEnabled,\n fetchedCards,\n ignoreCCRedirect,\n isAuthenticated,\n isFlagLoaded,\n isImpersonationMode,\n navigate,\n paymentCards?.length,\n ]);\n}\n","import { useApiQuery } from 'mf_core/query';\n\nexport function useCMPPaymentTerm(enabled: boolean) {\n return useApiQuery(\n '/payment/v1/gateways/cmp/reseller-payment-term',\n undefined,\n { enabled, refetchOnWindowFocus: false }\n );\n}\n","import { useState, useEffect, useMemo } from 'react';\nimport { ImpersonationHeaderProps } from '@im/ui-lib/HeaderX4C';\nimport { useLocalization } from '@im/react-localization';\nimport { useDecodedToken } from 'mf_core/auth';\nimport { useDisableImpersonationMode } from './useDisableImpersonationMode';\n\ntype AlertColor = 'success' | 'info' | 'warning' | 'error';\n\nconst DEFAULT_MESSAGE_KEY = 'Impersonation.HeaderInfoAlert';\n\nexport function useImpersonationHeaderProps() {\n const { translate } = useLocalization();\n const decodedToken = useDecodedToken();\n\n const { isError, isPending, mutate } = useDisableImpersonationMode();\n\n const [alertMessageKey, setAlertMessageKey] = useState(DEFAULT_MESSAGE_KEY);\n const [alertSeverity, setAlertSeverity] = useState('info' as AlertColor);\n\n const resellerId = decodedToken?.imoProfile?.resellerId || '';\n\n const alertMessage = useMemo(() => {\n return translate(\n alertMessageKey,\n { resellerId: ` <b>${resellerId}</b>` },\n true\n );\n }, [alertMessageKey, resellerId, translate]);\n\n const exitButtonDisabled = false;\n\n const exitButtonLoading = isPending;\n\n const exitButtonText = useMemo(() => {\n return translate('Common.Exit');\n }, [translate]);\n\n const onImpersonationButtonClick = () => {\n mutate();\n };\n\n useEffect(() => {\n if (isError) {\n setAlertMessageKey('Impersonation.HeaderErrorAlert');\n setAlertSeverity('error');\n }\n const clearAlert = setTimeout(() => {\n setAlertMessageKey(DEFAULT_MESSAGE_KEY);\n setAlertSeverity('info');\n }, 3000);\n return () => {\n clearTimeout(clearAlert);\n };\n }, [isError]);\n\n return {\n alertMessage,\n alertSeverity,\n exitButtonDisabled,\n exitButtonLoading,\n exitButtonText,\n onImpersonationButtonClick,\n } as ImpersonationHeaderProps;\n}\n","import React, { useEffect, useRef, useState } from 'react';\nimport { useLocation } from 'react-router';\nimport { useIsAuthenticated } from 'mf_core/auth';\nimport { useSiteConfig } from 'mf_core/config';\n\nconst IM_LOGIN_START_PATH = '/Site/Login/IdpLogin?ReturnUrl=/Site/Login/ForCep';\nconst IM_LOGIN_SUCCESS_PATH = '/Site/Login/ForCep';\nconst ORIGIN = globalThis.location.origin;\n\nconst LOG_PREFIX = '[Auto-Login-IM-Online]';\n\nexport function AutoLoginImOnlineFrame() {\n const [imLoggedIn, setImLoggedIn] = useState(false);\n const isAuthenticated = useIsAuthenticated();\n const { pathname } = useLocation();\n const isHomeView = pathname === '/my/dashboard';\n const { siteCode } = useSiteConfig();\n const frameRef = useRef<any>(null);\n const [frameSrc, setFrameSrc] = useState('');\n\n /**\n * When route is `\\login` clear the imLoggedIn state\n */\n useEffect(() => {\n if (pathname === '/login') {\n setImLoggedIn(false);\n }\n }, [pathname]);\n /**\n * When isHomeView && isAuthenticated && !imLoggedIn\n * wait 4 second and then start the IM Online Login process in the hidden iframe.\n */\n useEffect(() => {\n let active = true;\n let timeoutId: any = undefined;\n setFrameSrc(''); // start with no hidden frame\n\n const cleanFn = () => {\n active = false;\n if (timeoutId) {\n clearTimeout(timeoutId);\n timeoutId = undefined;\n }\n };\n\n if (\n isHomeView &&\n isAuthenticated &&\n !imLoggedIn &&\n siteCode !== 'hk' &&\n siteCode !== 'id' &&\n siteCode !== 'th'\n ) {\n timeoutId = setTimeout(() => {\n if (active) {\n // eslint-disable-next-line no-console\n console.log(`${LOG_PREFIX} start`);\n setFrameSrc(IM_LOGIN_START_PATH);\n }\n }, 4000);\n }\n return cleanFn;\n }, [isHomeView, isAuthenticated, imLoggedIn, siteCode]);\n\n /**\n * When frameSrc is set, wait for frame contentWindow.location\n * to complete the IM Online login process.\n */\n useEffect(() => {\n let active = true;\n let intervalId: any = undefined;\n\n const cleanFn = () => {\n active = false;\n if (intervalId) {\n clearInterval(intervalId);\n intervalId = undefined;\n }\n };\n\n if (frameSrc) {\n intervalId = setInterval(() => {\n if (active) {\n const href = getFrameHref(frameRef);\n if (href && href.startsWith(ORIGIN)) {\n const path = href.substring(ORIGIN.length);\n if (path.startsWith(IM_LOGIN_SUCCESS_PATH)) {\n setImLoggedIn(true);\n setFrameSrc('');\n cleanFn();\n // eslint-disable-next-line no-console\n console.log(`${LOG_PREFIX} success`);\n }\n }\n }\n }, 1000);\n }\n\n return cleanFn;\n }, [frameSrc]);\n\n /**\n * Render Hidden iframe only when `frameSrc` is set\n */\n return frameSrc ? (\n <iframe\n ref={frameRef}\n src={frameSrc}\n style={{\n border: 'none',\n height: 0,\n position: 'absolute',\n width: 0,\n }}\n title=\"autoLoginFrame\"\n />\n ) : null;\n}\n\n/** Returns the href of the iframe contentWindow when */\nfunction getFrameHref(ref: React.MutableRefObject<any>) {\n let href: string | undefined;\n try {\n href = String(ref.current?.contentWindow.location.href || '');\n } catch (e) {\n // Ignoring \"DOMException: Blocked a frame with origin\"\n // This occurs during the login process when redirected to okta server.\n }\n return href;\n}\n","/* istanbul ignore file */\nimport Box from '@mui/material/Box';\nimport {\n handleOAuthResponse,\n useOktaContext,\n useRefreshAccessToken,\n} from 'mf_core/auth';\nimport { useApiPost } from 'mf_core/query';\nimport React, { ChangeEvent, useState } from 'react';\n\nexport function DebugAccessToken() {\n const { authState, oktaAuth } = useOktaContext();\n\n // debugging token refresh upon 401 and impersonation mode\n const refreshAccessTokenWithDebuggingData = useRefreshAccessToken(true);\n const refreshAccessTokenHandler = () => {\n refreshAccessTokenWithDebuggingData().then((success) => {\n // eslint-disable-next-line no-console\n console.log(`access token refresh ${success ? 'succeeded' : 'faield'}`);\n });\n };\n\n const invalidateAccessTokenHandler = () => {\n const tokens = oktaAuth.tokenManager.getTokensSync();\n if (tokens.accessToken) {\n tokens.accessToken.accessToken =\n tokens.accessToken.accessToken.concat('invalidated');\n oktaAuth.tokenManager.setTokens(tokens);\n // eslint-disable-next-line no-console\n console.log('tokens: ', tokens);\n }\n };\n\n const invalidateRefreshTokenHandler = () => {\n const tokens = oktaAuth.tokenManager.getTokensSync();\n if (tokens.refreshToken && authState?.refreshToken) {\n const inv = 'invalidated';\n tokens.refreshToken.refreshToken = inv;\n authState.refreshToken.refreshToken = inv;\n oktaAuth.tokenManager.setTokens(tokens);\n // eslint-disable-next-line no-console\n console.log('tokens: ', tokens);\n }\n };\n\n const [resellerIdInputValue, setResellerIdInputValue] = useState('');\n const handleResellerIdChange = (e: ChangeEvent<HTMLInputElement>) => {\n setResellerIdInputValue(e.target.value);\n };\n const apiPost = useApiPost();\n const enableImpersonationHandler = () => {\n apiPost(\n //`https://apixgcp-qa.ingrammicro.com/impersonation/v2/x4c/enable/${resellerIdInputValue}`,\n `/impersonation/v2/x4c/enable/${resellerIdInputValue}`,\n {\n tokenRefreshRequest: {\n authority: authState?.refreshToken?.issuer,\n clientId: authState?.idToken?.clientId,\n refreshToken: authState?.refreshToken?.refreshToken,\n scope: authState.refreshToken?.scopes.join(' '),\n },\n }\n ).then((data) => {\n const tokenResponse = data?.tokenRefreshResponse;\n if (tokenResponse) {\n const tokenParams = { clientId: authState?.idToken?.clientId };\n handleOAuthResponse(oktaAuth, tokenParams, tokenResponse, null).then(\n (convertedResponse: any) => {\n const { tokens } = convertedResponse;\n // eslint-disable-next-line no-console\n console.log(\n 'new tokens built from impersonation API response: ',\n tokens\n );\n oktaAuth?.tokenManager.setTokens(tokens);\n }\n );\n }\n });\n };\n const showDebug = localStorage.getItem('showDebug');\n // end debugging\n\n return (\n <>\n {showDebug && (\n <Box>\n <button onClick={invalidateAccessTokenHandler}>\n invalidate access token\n </button>\n \n <button onClick={invalidateRefreshTokenHandler}>\n invalidate refresh token\n </button>\n \n <button onClick={refreshAccessTokenHandler}>\n refresh access token\n </button>\n <br />\n <input\n onChange={handleResellerIdChange}\n placeholder=\"reseller id\"\n type=\"text\"\n value={resellerIdInputValue}\n ></input>\n <button onClick={enableImpersonationHandler}>\n enable impersonation\n </button>\n </Box>\n )}\n </>\n );\n}\n","/* istanbul ignore file */\nimport React from 'react';\nimport Cookies from 'js-cookie';\nimport { styled } from '@mui/material/styles';\n\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport Switch from '@mui/material/Switch';\nimport { useImTheme } from '@im/im-theme';\nimport { CulturePicker } from '@im/ui-lib/CulturePicker';\n\nimport { LoginButton, useUserInfo } from 'mf_core/auth';\n\nexport function DebugToolbar() {\n const { setThemeName, theme } = useImTheme();\n const isDark = theme.palette.mode === 'dark';\n\n const userInfo = useUserInfo();\n\n return (\n <Root>\n <div>(Ignore Testing Toolbar)</div>\n <FormControlLabel\n control={\n <Switch\n checked={isDark}\n onChange={() => setThemeName(isDark ? 'im-light' : 'im-dark')}\n />\n }\n label=\"Dark Mode\"\n labelPlacement=\"start\"\n />\n\n <CulturePicker />\n\n <div>\n <LoginButton />\n </div>\n <div>{userInfo ? userInfo.name : ' '}</div>\n\n <FlexGap />\n\n <FormControlLabel\n control={<Switch checked={true} onChange={() => switchToClassic()} />}\n label=\"New Look\"\n labelPlacement=\"start\"\n />\n </Root>\n );\n}\n\nconst Root = styled('div')(({ theme }) => {\n return {\n alignItems: 'center',\n background: 'lightgrey',\n display: 'flex',\n flexDirection: 'row',\n gap: 8,\n minHeight: theme.spacing(5),\n minWidth: 800,\n paddingLeft: 8,\n paddingRight: 16,\n };\n});\n\nconst FlexGap = styled('div')(() => {\n return {\n flex: 1,\n };\n});\n\nfunction switchToClassic() {\n Cookies.remove('IMOnline_CEP');\n Cookies.set('IMOnline_Legacy', 'true');\n const { location } = globalThis;\n location.href = origin;\n}\n","/* eslint-disable sort-keys */\nimport { useTranslate } from '@im/react-localization';\nimport { usePageTitle } from 'mf_core/config';\nimport { useEffect } from 'react';\n\n// To add a page title on a framed route, map translation keys to frame urls here:\nconst frameTitleMap: { [search: string]: string } = {\n '?url=%2FSite%2FMyProfile': 'Title.MyAccount',\n '?url=%2FSite%2FMyProfile%2FBrandingPreferences': 'Title.MyAccount',\n '?url=%2FSite%2FMyProfile%2FMyProfileAddress': 'Title.MyAccount',\n '?url=%2FSite%2FMyProfile%2FNotificationPreferences': 'Title.MyAccount',\n '?url=%2FSite%2FMyProfile%2FReportPreferences': 'Title.MyAccount',\n '?url=%2FSite%2FUserAdministration': 'Title.MyAccount',\n '?url=%2FSite%2FMfa%2FTwoFactorAuthentication': 'Title.MyAccount',\n\n '?url=%2Fspa%2Fostordersearchcep%2F%23%2Forders': 'Title.Orders',\n\n '?url=%2Fspa%2Fdommsoftware%2F%23%2Fsearch-result': 'Title.Renewals',\n\n '?url=%2Fspa%2Fpcbidpricingcep%2F%23%2Fcisco%2Fdealdetails':\n 'Title.DealDetails',\n '?url=%2Fspa%2Fpcquoteoptionscep%2F%23%2Fdell%2Frequestquote':\n 'RequestQuote.RequestQuote',\n '?url=%2Fspa%2Fpcbidpricingcep%2Findex.html': 'Title.DealDetails',\n '?url=%2Fspa%2Fdomqdetailscep%2F%23%2Fquotedetails':\n 'QuoteDetails.QuoteDetails',\n\n '?url=%2FSite%2FReturns': 'Title.ReturnsAndClaims',\n '?url=%2FSite%2FReturns%2FClaims': 'Title.ReturnsAndClaims',\n '?url=%2FSite%2FReturns%2FStartReturn': 'Title.ReturnsAndClaims',\n '?url=%2FSite%2FReturns%2FReturnClaims': 'Title.ReturnsAndClaims',\n '?url=%2FSite%2FLogin%2FIdpWidget%3FReturnUrl%3D%252FSite%252FReturns':\n 'Title.ReturnsAndClaims',\n};\n\nconst DEFAULT_PAGE_TITLE = 'Xvantage';\n\ntype FrameTitleProps = {\n url: string;\n};\n\nexport function FramedPageTitle(props: FrameTitleProps) {\n const { url } = props;\n const translate = useTranslate();\n const { updatePageTitle } = usePageTitle();\n\n const pageTitle = frameTitleMap[url]\n ? translate(frameTitleMap[url])\n : DEFAULT_PAGE_TITLE;\n\n useEffect(() => {\n if (frameTitleMap[url]) {\n updatePageTitle(pageTitle);\n }\n }, [pageTitle, updatePageTitle, url]);\n\n return null;\n}\n","/* istanbul ignore file */\nimport { useDecodedToken, useRefreshAccessToken } from 'mf_core/auth';\nimport React, { useEffect, useState } from 'react';\nimport { useMyBusinessMenu } from '../hooks/use-mybusinessmenu';\nimport { useProductMenuQuery } from '../hooks/use-product';\nimport { useLocalizationContext } from '@im/react-localization';\nimport { useVendorsMenuQuery } from '../hooks/use-vendorsmenu';\nimport { useSolutionsMenuQuery } from '../hooks/use-solutionsmenu';\nimport { useServicesMenuQuery } from '../hooks/use-servicesmenu';\nimport { useFeatureFlagBase } from '../hooks/use-feature-flag-base';\n\nexport function InvalidAccessToken() {\n const decodedToken = useDecodedToken();\n const refreshAccessToken = useRefreshAccessToken();\n const [count, setCount] = useState(0);\n const [badToken, setBadToken] = useState(false);\n const { locale } = useLocalizationContext();\n const { refetch: refetchBaseBackofficeKeys } = useFeatureFlagBase();\n const { refetch: refetchMyBusinessMenuItems } = useMyBusinessMenu();\n const { refetch: refetchProductsMenuItems } = useProductMenuQuery(\n locale,\n true\n );\n const { refetch: refetchVendorsMenuItems } = useVendorsMenuQuery(\n locale,\n true\n );\n const { refetch: refetchSolutionsMenuItems } = useSolutionsMenuQuery(\n locale,\n true\n );\n\n const { refetch: refetchServicesMenuItems } = useServicesMenuQuery(\n locale,\n true\n );\n\n useEffect(() => {\n if (decodedToken) {\n if (!decodedToken.imoProfile) {\n setBadToken(true);\n if (count === 5) {\n throw new Error('[Okta inline hook error] Access token is invalid!');\n }\n setTimeout(async () => {\n await refreshAccessToken();\n setCount(count + 1);\n }, 5000);\n } else {\n setCount(0);\n if (badToken) {\n setBadToken(false);\n refetchBaseBackofficeKeys();\n refetchMyBusinessMenuItems();\n refetchProductsMenuItems();\n refetchVendorsMenuItems();\n refetchSolutionsMenuItems();\n refetchServicesMenuItems();\n }\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [decodedToken]);\n\n return <></>;\n}\n","import { useLocalization } from '@im/react-localization';\nimport Alert from '@mui/material/Alert';\nimport Button from '@mui/material/Button';\nimport { styled } from '@mui/material/styles';\nimport { useIsAuthenticated } from 'mf_core/auth';\nimport { useFeatureFlagBase } from '../hooks/use-feature-flag-base';\nimport React, { useEffect, useState } from 'react';\nimport { useLocation } from 'react-router-dom';\n\nconst LOCAL_STORAGE_KEY = 'isPerformanceAlertDismissed';\n\nexport function PerformanceErrorAlert() {\n const { translate } = useLocalization();\n const { pathname } = useLocation();\n const isAuthenticated = useIsAuthenticated();\n const [isDismissed, setIsDismissed] = useState(\n localStorage.getItem(LOCAL_STORAGE_KEY) === 'true'\n );\n\n const dismissAlert = () => {\n localStorage.setItem(LOCAL_STORAGE_KEY, 'true');\n setIsDismissed(true);\n };\n\n useEffect(() => {\n if (!isAuthenticated) {\n localStorage.removeItem(LOCAL_STORAGE_KEY);\n }\n }, [isAuthenticated]);\n\n const hideOnRoutes = [\n '/my/checkout',\n '/my/quotemgmt/quotelist',\n '/frame',\n '/my/invoice/invoicessearch',\n ];\n\n const boKeys = {\n EnablePerformanceBanner: 'X4C_Enable_Performance_Banner',\n EndTime: 'X4C_Performance_Banner_End_Time',\n StartTime: 'X4C_Performance_Banner_Start_Time',\n };\n\n const { boValues: boValue, isReady } = useFeatureFlagBase();\n\n let showAlert =\n !isDismissed &&\n isAuthenticated &&\n hideOnRoutes.find((route) => pathname.startsWith(route)) === undefined &&\n isReady &&\n boValue[boKeys.EnablePerformanceBanner] === 'true';\n\n if (showAlert && boValue[boKeys.StartTime] && boValue[boKeys.EndTime]) {\n try {\n const currentUtcDateTime = new Date().toISOString();\n const currentDate = currentUtcDateTime.substring(0, 10);\n const currentTime = new Date(\n `${currentDate} ${currentUtcDateTime.substring(11, 19)}`\n );\n const startTime = new Date(`${currentDate} ${boValue[boKeys.StartTime]}`);\n const endTime = new Date(`${currentDate} ${boValue[boKeys.EndTime]}`);\n if (startTime > currentTime || endTime < currentTime) showAlert = false;\n } catch {\n console.error('Performance Alert: Error calculating start/end time');\n }\n }\n\n useEffect(() => {\n if (showAlert)\n setTimeout(() => {\n document\n .querySelector('#main-view')\n ?.scrollTo({ behavior: 'smooth', top: 0 });\n }, 200);\n }, [pathname, showAlert]);\n\n return (\n <>\n {showAlert && (\n <StyledAlert\n action={\n <StyledButton onClick={dismissAlert} variant=\"text\">\n {translate('Common.Dismiss')}\n </StyledButton>\n }\n icon={false}\n severity=\"warning\"\n >\n {translate('Common.PerformanceError')}\n </StyledAlert>\n )}\n </>\n );\n}\n\nconst StyledAlert = styled(Alert)(({ theme }) => ({\n '& .MuiAlert-action': {\n alignItems: 'center',\n padding: 0,\n },\n '& .MuiAlert-message': {\n color: `${theme.palette.warning[900]} !important`,\n fontSize: '18px',\n fontWeight: 400,\n lineHeight: '26px',\n },\n background: `${theme.palette.warning[100]} !important`,\n margin: '16px 32px 0 32px',\n position: 'relative',\n zIndex: 100,\n}));\n\nconst StyledButton = styled(Button)(({ theme }) => ({\n '&:focus': {\n outline: 'none',\n },\n '&:hover': {\n background: 'unset',\n },\n color: `${theme.palette.warning[900]}`,\n fontSize: '18px',\n fontWeight: 400,\n lineHeight: '26px',\n marginLeft: '100px',\n textTransform: 'none',\n}));\n","export function injectScriptInHead(\n url: string,\n onLoad?: (this: GlobalEventHandlers, ev: Event) => any\n) {\n try {\n const scriptEl = document.createElement('script');\n scriptEl.src = url;\n scriptEl.type = 'text/javascript';\n scriptEl.async = true;\n if (onLoad) scriptEl.onload = onLoad;\n document.head.appendChild(scriptEl);\n } catch (e) {\n console.error('Error injecting script:', e);\n }\n}\n\nexport function getLanguageFromLocale(locale: string) {\n return locale.split('-')[0];\n}\n\n/** OneTrust Helper Util - Injects script in head tag\n * @param `url` optionally sets the script src value.\n * @param `innerHtml` optionally sets the innerHTML content of the script.\n * @param `datadomainscript` optionally sets the attribute `data-domain-script` with this value.\n */\nexport function injectScriptInHeadWith(\n url?: string,\n innerHtml?: string,\n datadomainscript?: string\n) {\n try {\n const scriptEl = document.createElement('script');\n if (url) {\n scriptEl.src = url;\n }\n if (innerHtml) {\n scriptEl.innerHTML = innerHtml;\n }\n if (datadomainscript) {\n scriptEl.setAttribute('data-domain-script', datadomainscript);\n scriptEl.setAttribute('data-document-language', 'true');\n }\n scriptEl.type = 'text/javascript';\n document.head.appendChild(scriptEl);\n } catch (e) {\n console.error(e);\n }\n}\n\n/** OneTrust Helper Util - Loads text/javascript type script with cookie category class to be auto blocked by OneTrust */\nexport function injectCategorizedScriptInHead(url: string, category = '') {\n try {\n const scriptEl = document.createElement('script');\n scriptEl.src = url;\n scriptEl.type = 'text/javascript';\n scriptEl.className = category;\n scriptEl.async = true;\n document.head.appendChild(scriptEl);\n } catch (e) {\n console.error(e);\n }\n}\n\nexport function injectScriptInBody(script_text: string, scriptid?: string) {\n try {\n const isElementAlreadyInDocument = document.getElementById(scriptid ?? '');\n if (!isElementAlreadyInDocument) {\n const scriptEl = document.createElement('script');\n const scripttext = document.createTextNode(script_text);\n scriptEl.appendChild(scripttext);\n scriptEl.type = 'text/javascript';\n scriptEl.async = true;\n scriptEl.id = scriptid ? scriptid : '';\n document.body.appendChild(scriptEl);\n }\n } catch (e) {\n console.error(e);\n }\n}\n\nexport function checkListForPath(list: string[], pathname: string) {\n if (!list) return false;\n return list.some((path) => {\n const lastChar = path[path.length - 1];\n if (lastChar && lastChar === '*') {\n const subPath = path.slice(0, -1);\n return pathname.includes(subPath);\n }\n return pathname === path;\n });\n}\n","/* eslint-disable sort-keys */\nimport { useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport { useLocalizationContext } from '@im/react-localization';\nimport { useBuildVars, useInX4AFrame, useSiteConfig } from 'mf_core/config';\nimport { injectScriptInHeadWith } from './utils';\n\nexport function useOneTrust() {\n const { buildEnvironment } = useBuildVars();\n const { siteCode } = useSiteConfig();\n const { locale } = useLocalizationContext();\n const { isInIM360Frame, isInX4AFrame } = useInX4AFrame();\n const isScriptInjected = useRef(false);\n const win = window as any;\n\n //Updates Script in Head and needs to be synchronous\n useLayoutEffect(() => {\n //When Opening X4C/X4A inside an iFrame in CRM/IM360 OneTrust SDK is unable to read the cookies stored in\n //the localstorage since CRM domain and X4C domain are different and browser is not allowing access.\n //Added This Effect to prevent injecting OneTrust Scripts in CRM/IM360 iFrame screen againt BUG ADT-15210\n if (!isScriptInjected.current && !isInIM360Frame && !isInX4AFrame) {\n let scriptId = '';\n if (buildEnvironment && siteCode) {\n const envMap = scriptsMap[buildEnvironment];\n if (envMap) {\n scriptId = envMap[siteCode];\n }\n }\n if (!isScriptInjected.current && scriptId) {\n loadOneClickCSS();\n injectScriptInHeadWith(\n `https://cdn.cookielaw.org/consent/${scriptId}/OtAutoBlock.js`\n );\n injectScriptInHeadWith(\n 'https://cdn.cookielaw.org/scripttemplates/otSDKStub.js',\n undefined,\n scriptId\n );\n injectScriptInHeadWith(\n undefined,\n `function OptanonWrapper() { window.dispatchEvent(new Event('bannerLoaded')); }`\n );\n isScriptInjected.current = true;\n if (window as any) (window as any).isOneTrustEnabled = true;\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [buildEnvironment, siteCode]);\n\n useEffect(() => {\n if (isScriptInjected.current && win?.OneTrust?.changeLanguage) {\n win.OneTrust?.changeLanguage(locale.slice(0, 2));\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [locale]);\n}\n\n/** Return `loading` at first and then sends script id string or `empty` string once ready*/\nexport function useIsOneTrustEnabled() {\n const { buildEnvironment } = useBuildVars();\n const { siteCode } = useSiteConfig();\n const [hasId, setHasId] = useState<string | undefined>('loading');\n\n useEffect(() => {\n let scriptId = '';\n if (buildEnvironment && siteCode) {\n const envMap = scriptsMap[buildEnvironment];\n if (envMap) {\n scriptId = envMap[siteCode];\n }\n }\n if (scriptId) {\n setHasId(scriptId);\n } else {\n setHasId('');\n }\n }, [buildEnvironment, siteCode]);\n\n return hasId;\n}\n\nconst scriptsMap: any = {\n development: {\n de: '697b043e-f485-43da-a6a6-2734a4ec8b88-test',\n us: '79356f9e-23dd-4222-b2de-b0c37f4d5a5b-test',\n },\n production: {\n at: '44dd8255-aa4b-4557-b80b-2a24ea659e53',\n au: 'bf88a6d4-2148-404e-8c96-e5dd58f4805d',\n be: '0b0037df-0851-4896-aa89-9d19ed8890dd',\n br: '0565517d-8776-4bde-bb6e-d575cebdb4d2',\n ca: '44ec1e95-68da-44a7-863e-82f4106d645e',\n ch: 'fd420875-1423-4cee-b31c-029a1e120ca5',\n cl: '4729ebea-73db-4cfe-b7e3-088a5c758694',\n co: 'd7f6df39-f565-4244-8afa-55852a43265d',\n de: 'fa481d81-76c4-45d3-9136-c5482c0363ae',\n es: 'aca353d8-ce1d-42b9-a0d8-013115fab766',\n fr: 'e355c5ab-f65e-43ae-b5c9-63ef3090fa1e',\n gb: '6b727968-81a4-44e2-bcf4-c223368323ae',\n hk: '5ba4d092-59de-4ff9-bd08-9a4b85ad9925',\n id: '88d87685-64de-4492-93d7-d4c0e5a41ec5',\n in: '0537784a-5bde-4b36-a534-68183186040c',\n it: '057e1217-f062-4d5c-a4c7-13a14dabaaac',\n mx: 'b4449d97-8e60-4e5d-8955-4cceec4ad8df',\n my: '82984dfd-1131-4286-9d56-b1ff935c20e7',\n nl: '946f4467-f8b2-497d-aeba-55bf5e5484be',\n nz: '4bc45039-3f8f-48e5-8e27-b67f08a7456e',\n pe: '550a2f66-7655-4c11-b251-338050840121',\n sg: 'b412ece9-d419-4990-a25c-e052c6fe5c70',\n us: '99ef7803-f71a-4a5a-ab1e-21f585d4b3de',\n usme: '164deb5f-2b4a-4d8e-83f6-609e2ed95978',\n },\n productionbeta: {\n at: 'a0b222df-4519-4a6d-8719-bb2f8822e74b',\n au: '15eac479-bc68-4963-8ac6-ee98bb301024',\n be: 'bba8f146-e67f-4903-8b80-717590ab150b',\n br: '4a93a70b-697f-4f0a-8610-cf65263820a4',\n ca: 'f7e521f6-1665-4f7d-9447-7bc6bf7c16af',\n ch: '300e9251-18a8-4b83-9ba5-7b84ca09b879',\n cl: '9a22cd8b-f862-4f8b-b7d1-24cfa6e6f6f1',\n cn: '0f1d96db-5406-4f27-9f4d-9069f62fe734',\n co: '5fabb3de-ea9b-4052-b476-3b4665473525',\n de: '05e95e92-9c0a-4ae3-b52d-aef50bc0b84b',\n dk: 'bb774640-b08b-4c41-a796-a30b0bcc0cb4',\n es: 'd1ccb41c-3ac8-4746-bdac-0f0b090b0b51',\n fi: '650d3abf-8138-45de-86bf-6efb2a8e9a45',\n fr: '1e116878-c4fb-4cbf-b992-777419629dc8',\n gb: 'ea831300-7839-414d-82df-8f96a0e2db91',\n hk: 'd504548e-4204-4c39-8e31-289a3590dfc0',\n hu: '2d1cb494-1ecf-4a46-a0ac-f9130fc0a1d8',\n id: '084e9439-8500-43e1-aa93-a8ecfa9f5e34',\n in: 'cc6cd377-80f0-4877-859c-924c2f5c5011',\n it: 'b2556e1c-ff2d-4fbb-bcea-887fdca1c4b6',\n mx: 'b0144b6a-7506-4cb7-8b7f-f6b3551b06a7',\n my: 'a235d6d9-b775-4e3f-94a1-f21877b1359c',\n nl: '3ae234b2-a8bc-4b40-88b6-308c7762b6e3',\n nz: 'a1c46dd5-17c7-4c18-8657-6e065eba6f31',\n pe: 'f364691f-43a1-4d3a-8cce-9b02e76b48e6',\n pt: '5f349b16-a1a4-430a-be83-54d90897448f',\n se: '10793762-afe5-4b3b-8455-7ed5cae4c349',\n sg: '85cd5b2c-f678-41ce-8ca0-8f000c19bc00',\n th: '33bed5fb-a581-4706-96c1-b58d93648747',\n us: 'a13a040c-af96-4a32-a274-68a0216bbfdf',\n usme: '4506acef-75b5-47d3-9e73-8f2f6182a70a',\n },\n productionbetax: {\n at: 'a78265a4-663b-4fab-ba8f-cd41c1684eb1',\n au: 'badc1fa5-f48c-4d3b-98c4-5e82a60b58ee',\n be: '26e6bc4a-2a72-4f9e-926d-0aa227845b06',\n br: '9127f432-ae12-4f5e-801e-b112cdd57902',\n ca: 'a549e1ab-0ccf-4cd1-912b-440ecbc5e526',\n ch: '56484009-0918-4c6f-b468-d6a64bc90068',\n cl: '65807e11-d93b-4894-aed7-05d7f96c9022',\n cn: '8b6d47bc-d433-4312-8c1e-9b37f1ab4e6f',\n co: '95184fb7-2e26-4c25-a5d2-dc2a401e5098',\n de: '12f119ce-6a0e-4f93-95a1-6c11020fa7c2',\n dk: '82d09da8-5e06-41a4-9b14-09ea96e89b2e',\n es: 'f5897400-db93-478e-99d1-76ddd6186a71',\n fi: 'cf42f52d-8824-483e-ad73-d77a04222893',\n fr: '8bbd3040-f8ea-4646-8791-d12a00e9b2d3',\n gb: 'e675edc0-1f77-48ef-87f7-f77d09713c34',\n hk: '6b6dcb44-aae4-4cc7-9fdc-8331f160313b',\n hu: '5257492b-01be-46e6-9910-18e8b62c57e8',\n id: '78832b87-c9e7-4525-a08c-0f44fa5ac3df',\n in: 'fe177e0e-c058-41fc-89e4-abc77d4cf4eb',\n it: 'da82b083-11fd-44f6-a2e8-029a12eb2f11',\n mx: '84b53949-1003-4d42-a019-62e8b7a20e07',\n my: '36d9c188-b94b-45bc-99f4-9594abb480cb',\n nl: 'aca58b6d-4af4-4773-8ac1-2c69e9a57d18',\n nz: '3572b260-ab31-4330-af92-f461660c6855',\n pe: '9e47e965-2f35-49f8-b3c6-620b17498d31',\n pt: 'fbb5a01a-2bc1-4941-a019-2d188ccd3063',\n se: '529a171e-f19b-4529-becc-b4dbdf3d246d',\n sg: 'ea9c8552-42e0-4a47-96ae-6e920e58bda0',\n th: 'f696c8c0-f434-4434-8a53-9da1d0898809',\n us: '82bc1bf6-cadb-4710-aa0f-1ab7a86527ae',\n usme: '63e9ac78-9fcc-4fc9-b0e0-3d6db513ff68',\n },\n staging: {\n sg: '0190e350-3e9e-76ef-9473-2f647ba9adac',\n hk: '0190e352-9455-7378-ad82-f58e6f44c1b6',\n id: '0190e35e-96d4-7ca2-b254-e56f662ac84c',\n nz: '0190e366-fbec-776f-8cb2-08a4fc55e311',\n br: '0190e36a-7658-7ffa-89b5-8fd8d2a5958e',\n mi: '0190e376-b8d2-79ce-86ad-b5c0d5d25bdf',\n pe: '0190e378-9c5c-7d78-8ae7-38240c480bbb',\n cl: '0190e37a-760c-79d5-aa1a-269932e73b42',\n co: '0190e37d-1ff3-7172-8592-7b79c4ff929b',\n at: '63148719-cda6-491f-9737-d7a53edc5d42',\n nl: '1a5c451e-b7a2-4439-84cd-acaf579c9149',\n be: '8c070da0-9422-440c-94b3-6bb589844324',\n ch: '0190e39c-705a-7fb8-a00f-69ae5ba3ccac',\n au: 'f31ce79d-fdd9-491f-bdf5-2539c34a1fc5',\n ca: 'f0fa73fd-2424-40b3-8b9d-b6d0795a71ea',\n cn: '68c9a61c-5582-495f-b447-9518c6a0c5bf',\n de: '697b043e-f485-43da-a6a6-2734a4ec8b88',\n dk: '1dc736f6-747e-489a-b63d-99c3d579ae0d',\n es: 'da79cfbb-7673-4761-b5eb-c9fcb6a8f1fd',\n fi: '58c78875-00a1-468d-b690-2d7feea0df81',\n fr: '826d79e4-068f-4dbf-a5d0-25a2ca7a8316',\n gb: '009a5a44-7658-4e58-b93c-3920cfe31961',\n hu: '3cdd9702-b7c9-4078-8564-a975dab79ac3',\n in: '337ba5fc-3a4c-4d14-94b5-23235ce52259',\n it: '959211c2-d26d-4248-9be6-3653b636c5d9',\n mx: '62854f5a-0804-4a50-9b06-e57c424d5d04',\n my: '5fe7808e-9d34-4b79-a522-cf404f882753',\n pt: '0258463a-9827-4ae3-b982-d5c5108c1fbd',\n se: 'ccd5f5d6-dd0a-47da-98f0-06a2800f5199',\n th: '8d30ab41-5f11-426e-9382-d5bd1a5729af',\n us: '79356f9e-23dd-4222-b2de-b0c37f4d5a5b',\n usme: '0190e376-b8d2-79ce-86ad-b5c0d5d25bdf',\n },\n stagingx: {\n sg: '0190e350-3e9e-76ef-9473-2f647ba9adac',\n hk: '0190e352-9455-7378-ad82-f58e6f44c1b6',\n id: '0190e35e-96d4-7ca2-b254-e56f662ac84c',\n nz: '0190e366-fbec-776f-8cb2-08a4fc55e311',\n br: '0190e36a-7658-7ffa-89b5-8fd8d2a5958e',\n mi: '0190e376-b8d2-79ce-86ad-b5c0d5d25bdf',\n pe: '0190e378-9c5c-7d78-8ae7-38240c480bbb',\n cl: '0190e37a-760c-79d5-aa1a-269932e73b42',\n co: '0190e37d-1ff3-7172-8592-7b79c4ff929b',\n at: '63148719-cda6-491f-9737-d7a53edc5d42',\n nl: '1a5c451e-b7a2-4439-84cd-acaf579c9149',\n be: '8c070da0-9422-440c-94b3-6bb589844324',\n ch: '0190e39c-705a-7fb8-a00f-69ae5ba3ccac',\n au: 'f31ce79d-fdd9-491f-bdf5-2539c34a1fc5',\n ca: 'f0fa73fd-2424-40b3-8b9d-b6d0795a71ea',\n cn: '68c9a61c-5582-495f-b447-9518c6a0c5bf',\n de: '697b043e-f485-43da-a6a6-2734a4ec8b88',\n dk: '1dc736f6-747e-489a-b63d-99c3d579ae0d',\n es: 'da79cfbb-7673-4761-b5eb-c9fcb6a8f1fd',\n fi: '58c78875-00a1-468d-b690-2d7feea0df81',\n fr: '826d79e4-068f-4dbf-a5d0-25a2ca7a8316',\n gb: '009a5a44-7658-4e58-b93c-3920cfe31961',\n hu: '3cdd9702-b7c9-4078-8564-a975dab79ac3',\n in: '337ba5fc-3a4c-4d14-94b5-23235ce52259',\n it: '959211c2-d26d-4248-9be6-3653b636c5d9',\n mx: '62854f5a-0804-4a50-9b06-e57c424d5d04',\n my: '5fe7808e-9d34-4b79-a522-cf404f882753',\n pt: '0258463a-9827-4ae3-b982-d5c5108c1fbd',\n se: 'ccd5f5d6-dd0a-47da-98f0-06a2800f5199',\n th: '8d30ab41-5f11-426e-9382-d5bd1a5729af',\n us: '79356f9e-23dd-4222-b2de-b0c37f4d5a5b',\n usme: '0190e376-b8d2-79ce-86ad-b5c0d5d25bdf',\n },\n};\n\n/** loads onetrust css */\nexport function loadOneClickCSS() {\n return new Promise<boolean>(function (resolve, reject) {\n try {\n const styleEl = document.createElement('style');\n styleEl.innerHTML =\n '#onetrust-consent-sdk *:focus,#onetrust-consent-sdk *:active,#onetrust-pc-sdk .ot-tgl input:focus+.ot-switch .ot-switch-nob {outline: none !important;}';\n\n styleEl.onload = () => resolve(true);\n styleEl.onerror = () => resolve(false);\n document.head.appendChild(styleEl);\n } catch (e) {\n resolve(false);\n }\n });\n}\n","/* eslint-disable sort-keys */\nimport { useEffect, useRef, useState } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport { useBuildVars, useInX4AFrame, useSiteConfig } from 'mf_core/config';\nimport { useIsAuthenticated, useDecodedToken } from 'mf_core/auth';\nimport { injectCategorizedScriptInHead, injectScriptInHead } from './utils';\nimport { setDigitalData } from 'mf_core/adobe';\nimport { useIsOneTrustEnabled } from './useOneTrust';\n\nconst scriptsMap: any = {\n development: {\n au: 'https://assets.adobedtm.com/a8f91053d00e/7dee3b1c3a2e/launch-57cb68d55aa5-development.min.js',\n hu: 'https://assets.adobedtm.com/a8f91053d00e/fcdbd931f888/launch-e6b48686272c-development.min.js',\n no: 'https://assets.adobedtm.com/a8f91053d00e/8a89b29c8be2/launch-faa9e163c865-development.min.js',\n pt: 'https://assets.adobedtm.com/a8f91053d00e/4dbad6f05dd3/launch-1b8354a0a2b1-development.min.js',\n se: 'https://assets.adobedtm.com/a8f91053d00e/20a4caef2031/launch-4bb9deb3ab5a-development.min.js',\n ch: 'https://assets.adobedtm.com/a8f91053d00e/85f63646e5c0/launch-ec090a5f6fae-development.min.js',\n pe: 'https://assets.adobedtm.com/a8f91053d00e/6f82277d6ca9/launch-df92986366a4-development.min.js',\n cl: 'https://assets.adobedtm.com/a8f91053d00e/f2d3be813f06/launch-0d00f4fa20c2-development.min.js',\n br: 'https://assets.adobedtm.com/a8f91053d00e/632dfaefbac3/launch-e022eee9741a-development.min.js',\n nz: 'https://assets.adobedtm.com/a8f91053d00e/fcb6adc7fc1e/launch-fb39cdd6fc0a-development.min.js',\n hk: 'https://assets.adobedtm.com/a8f91053d00e/ffca6e56a5e2/launch-1a40686158a8-development.min.js',\n id: 'https://assets.adobedtm.com/a8f91053d00e/a1f93e96c7a6/launch-6c8910d34bb3-development.min.js',\n sg: 'https://assets.adobedtm.com/a8f91053d00e/7e87379c86eb/launch-972c1fce5d0c-development.min.js',\n mi: 'https://assets.adobedtm.com/a8f91053d00e/3c6362756e02/launch-d82f52176b88-development.min.js',\n },\n\n production: {\n ch: 'https://assets.adobedtm.com/a8f91053d00e/85f63646e5c0/launch-30f9632e57e0.min.js',\n at: 'https://assets.adobedtm.com/a8f91053d00e/06a6cb51c3d4/launch-0219d972a72c.min.js',\n au: 'https://assets.adobedtm.com/a8f91053d00e/7dee3b1c3a2e/launch-ef5fbd3b12de.min.js',\n be: 'https://assets.adobedtm.com/a8f91053d00e/285753d4b8f2/launch-cdc63027d33f.min.js',\n ca: 'https://assets.adobedtm.com/a8f91053d00e/a72ffeec43fd/launch-897c6aa7c43b.min.js',\n co: 'https://assets.adobedtm.com/a8f91053d00e/8344def90c44/launch-70af85e98de9.min.js',\n de: 'https://assets.adobedtm.com/a8f91053d00e/61cdfd8ddaaf/launch-69e6d4db4b67.min.js',\n es: 'https://assets.adobedtm.com/a8f91053d00e/9b05ee515724/launch-0e26513cdfe2.min.js',\n fr: 'https://assets.adobedtm.com/a8f91053d00e/fa0362fa89e0/launch-a1c65e61b822.min.js',\n gb: 'https://assets.adobedtm.com/a8f91053d00e/9b034aa49568/launch-b3b2cf368281.min.js',\n hu: 'https://assets.adobedtm.com/a8f91053d00e/fcdbd931f888/launch-c34e0a20479b.min.js',\n in: 'https://assets.adobedtm.com/a8f91053d00e/efa4493a351d/launch-25dd3caf5fef.min.js',\n it: 'https://assets.adobedtm.com/a8f91053d00e/746db32a8133/launch-938443167cde.min.js',\n mi: 'https://assets.adobedtm.com/a8f91053d00e/3c6362756e02/launch-70908e6bc0b0.min.js',\n mx: 'https://assets.adobedtm.com/a8f91053d00e/69cf864b3e52/launch-2c9f828b62c9.min.js',\n nl: 'https://assets.adobedtm.com/a8f91053d00e/d92081ab8a7c/launch-a0600400854c.min.js',\n no: 'https://assets.adobedtm.com/a8f91053d00e/8a89b29c8be2/launch-1f82bc770ac2.min.js',\n nz: 'https://assets.adobedtm.com/a8f91053d00e/fcb6adc7fc1e/launch-baed6ad97089.min.js',\n pt: 'https://assets.adobedtm.com/a8f91053d00e/4dbad6f05dd3/launch-26468851ca97.min.js',\n se: 'https://assets.adobedtm.com/a8f91053d00e/20a4caef2031/launch-c554d38f9660.min.js',\n us: 'https://assets.adobedtm.com/a8f91053d00e/363a875b9ddd/launch-b0e54efb61f7.min.js',\n id: 'https://assets.adobedtm.com/a8f91053d00e/a1f93e96c7a6/launch-328bf85d754f.min.js',\n sg: 'https://assets.adobedtm.com/a8f91053d00e/7e87379c86eb/launch-0cb14f9319aa.min.js',\n },\n productionbeta: {\n ch: 'https://assets.adobedtm.com/a8f91053d00e/85f63646e5c0/launch-30f9632e57e0.min.js',\n pe: 'https://assets.adobedtm.com/a8f91053d00e/6f82277d6ca9/launch-f1b4b30d2b84.min.js',\n cl: 'https://assets.adobedtm.com/a8f91053d00e/f2d3be813f06/launch-1d8a24986064.min.js',\n br: 'https://assets.adobedtm.com/a8f91053d00e/632dfaefbac3/launch-e13f863702cc.min.js',\n nz: 'https://assets.adobedtm.com/a8f91053d00e/fcb6adc7fc1e/launch-baed6ad97089.min.js',\n hk: 'https://assets.adobedtm.com/a8f91053d00e/ffca6e56a5e2/launch-6335b0c7b461.min.js',\n id: 'https://assets.adobedtm.com/a8f91053d00e/a1f93e96c7a6/launch-328bf85d754f.min.js',\n sg: 'https://assets.adobedtm.com/a8f91053d00e/7e87379c86eb/launch-0cb14f9319aa.min.js',\n at: 'https://assets.adobedtm.com/a8f91053d00e/06a6cb51c3d4/launch-0219d972a72c.min.js',\n au: 'https://assets.adobedtm.com/a8f91053d00e/7dee3b1c3a2e/launch-ef5fbd3b12de.min.js',\n be: 'https://assets.adobedtm.com/a8f91053d00e/285753d4b8f2/launch-cdc63027d33f.min.js',\n ca: 'https://assets.adobedtm.com/a8f91053d00e/a72ffeec43fd/launch-897c6aa7c43b.min.js',\n co: 'https://assets.adobedtm.com/a8f91053d00e/8344def90c44/launch-70af85e98de9.min.js',\n de: 'https://assets.adobedtm.com/a8f91053d00e/61cdfd8ddaaf/launch-69e6d4db4b67.min.js',\n es: 'https://assets.adobedtm.com/a8f91053d00e/9b05ee515724/launch-0e26513cdfe2.min.js',\n fr: 'https://assets.adobedtm.com/a8f91053d00e/fa0362fa89e0/launch-a1c65e61b822.min.js',\n gb: 'https://assets.adobedtm.com/a8f91053d00e/9b034aa49568/launch-b3b2cf368281.min.js',\n hu: 'https://assets.adobedtm.com/a8f91053d00e/fcdbd931f888/launch-c34e0a20479b.min.js',\n in: 'https://assets.adobedtm.com/a8f91053d00e/efa4493a351d/launch-25dd3caf5fef.min.js',\n it: 'https://assets.adobedtm.com/a8f91053d00e/746db32a8133/launch-938443167cde.min.js',\n mi: 'https://assets.adobedtm.com/a8f91053d00e/3c6362756e02/launch-70908e6bc0b0.min.js',\n mx: 'https://assets.adobedtm.com/a8f91053d00e/69cf864b3e52/launch-2c9f828b62c9.min.js',\n nl: 'https://assets.adobedtm.com/a8f91053d00e/d92081ab8a7c/launch-a0600400854c.min.js',\n no: 'https://assets.adobedtm.com/a8f91053d00e/8a89b29c8be2/launch-1f82bc770ac2.min.js',\n pt: 'https://assets.adobedtm.com/a8f91053d00e/4dbad6f05dd3/launch-26468851ca97.min.js',\n se: 'https://assets.adobedtm.com/a8f91053d00e/20a4caef2031/launch-c554d38f9660.min.js',\n us: 'https://assets.adobedtm.com/a8f91053d00e/363a875b9ddd/launch-b0e54efb61f7.min.js',\n },\n productionbetax: {\n at: 'https://assets.adobedtm.com/a8f91053d00e/06a6cb51c3d4/launch-0219d972a72c.min.js',\n au: 'https://assets.adobedtm.com/a8f91053d00e/7dee3b1c3a2e/launch-ef5fbd3b12de.min.js',\n be: 'https://assets.adobedtm.com/a8f91053d00e/285753d4b8f2/launch-cdc63027d33f.min.js',\n ca: 'https://assets.adobedtm.com/a8f91053d00e/a72ffeec43fd/launch-897c6aa7c43b.min.js',\n co: 'https://assets.adobedtm.com/a8f91053d00e/8344def90c44/launch-70af85e98de9.min.js',\n de: 'https://assets.adobedtm.com/a8f91053d00e/61cdfd8ddaaf/launch-69e6d4db4b67.min.js',\n es: 'https://assets.adobedtm.com/a8f91053d00e/9b05ee515724/launch-0e26513cdfe2.min.js',\n fr: 'https://assets.adobedtm.com/a8f91053d00e/fa0362fa89e0/launch-a1c65e61b822.min.js',\n gb: 'https://assets.adobedtm.com/a8f91053d00e/9b034aa49568/launch-b3b2cf368281.min.js',\n hu: 'https://assets.adobedtm.com/a8f91053d00e/fcdbd931f888/launch-c34e0a20479b.min.js',\n in: 'https://assets.adobedtm.com/a8f91053d00e/efa4493a351d/launch-25dd3caf5fef.min.js',\n it: 'https://assets.adobedtm.com/a8f91053d00e/746db32a8133/launch-938443167cde.min.js',\n mi: 'https://assets.adobedtm.com/a8f91053d00e/3c6362756e02/launch-70908e6bc0b0.min.js',\n mx: 'https://assets.adobedtm.com/a8f91053d00e/69cf864b3e52/launch-2c9f828b62c9.min.js',\n nl: 'https://assets.adobedtm.com/a8f91053d00e/d92081ab8a7c/launch-a0600400854c.min.js',\n no: 'https://assets.adobedtm.com/a8f91053d00e/8a89b29c8be2/launch-1f82bc770ac2.min.js',\n nz: 'https://assets.adobedtm.com/a8f91053d00e/fcb6adc7fc1e/launch-baed6ad97089.min.js',\n pt: 'https://assets.adobedtm.com/a8f91053d00e/4dbad6f05dd3/launch-26468851ca97.min.js',\n se: 'https://assets.adobedtm.com/a8f91053d00e/20a4caef2031/launch-c554d38f9660.min.js',\n us: 'https://assets.adobedtm.com/a8f91053d00e/363a875b9ddd/launch-b0e54efb61f7.min.js',\n id: 'https://assets.adobedtm.com/a8f91053d00e/a1f93e96c7a6/launch-328bf85d754f.min.js',\n sg: 'https://assets.adobedtm.com/a8f91053d00e/7e87379c86eb/launch-0cb14f9319aa.min.js',\n },\n staging: {\n ch: 'https://assets.adobedtm.com/a8f91053d00e/85f63646e5c0/launch-eed9d036a6b7-staging.min.js',\n pe: 'https://assets.adobedtm.com/a8f91053d00e/6f82277d6ca9/launch-036d60a59bcc-staging.min.js',\n cl: 'https://assets.adobedtm.com/a8f91053d00e/f2d3be813f06/launch-fbd57df79f1f-staging.min.js',\n br: 'https://assets.adobedtm.com/a8f91053d00e/632dfaefbac3/launch-7034435b45d3-staging.min.js',\n nz: 'https://assets.adobedtm.com/a8f91053d00e/fcb6adc7fc1e/launch-c0742238f6b0-staging.min.js',\n hk: 'https://assets.adobedtm.com/a8f91053d00e/ffca6e56a5e2/launch-e10f25252717-staging.min.js',\n id: 'https://assets.adobedtm.com/a8f91053d00e/a1f93e96c7a6/launch-5268930e33fd-staging.min.js',\n sg: 'https://assets.adobedtm.com/a8f91053d00e/7e87379c86eb/launch-bd74afe49d07-staging.min.js',\n at: 'https://assets.adobedtm.com/a8f91053d00e/06a6cb51c3d4/launch-e02a0574edbd-staging.min.js',\n au: 'https://assets.adobedtm.com/a8f91053d00e/7dee3b1c3a2e/launch-0b1541386cdc-staging.min.js',\n be: 'https://assets.adobedtm.com/a8f91053d00e/285753d4b8f2/launch-55ce3f721d2c-staging.min.js',\n ca: 'https://assets.adobedtm.com/a8f91053d00e/a72ffeec43fd/launch-025552be0893-staging.min.js',\n co: 'https://assets.adobedtm.com/a8f91053d00e/8344def90c44/launch-1a4e88f064db-staging.min.js',\n de: 'https://assets.adobedtm.com/a8f91053d00e/61cdfd8ddaaf/launch-cfaf45f56c15-staging.min.js',\n es: 'https://assets.adobedtm.com/a8f91053d00e/9b05ee515724/launch-6a5f443a9ff6-staging.min.js',\n fr: 'https://assets.adobedtm.com/a8f91053d00e/fa0362fa89e0/launch-44eccbbc6751-staging.min.js',\n gb: 'https://assets.adobedtm.com/a8f91053d00e/9b034aa49568/launch-34ab3000fc47-staging.min.js',\n hu: 'https://assets.adobedtm.com/a8f91053d00e/fcdbd931f888/launch-6d69215657c5-staging.min.js',\n in: 'https://assets.adobedtm.com/a8f91053d00e/efa4493a351d/launch-ae9304c9a51e-staging.min.js',\n it: 'https://assets.adobedtm.com/a8f91053d00e/746db32a8133/launch-a9117f7aadca-staging.min.js',\n mi: 'https://assets.adobedtm.com/a8f91053d00e/3c6362756e02/launch-5a61f2cf9342-staging.min.js',\n mx: 'https://assets.adobedtm.com/a8f91053d00e/69cf864b3e52/launch-2320722bddfb-staging.min.js',\n nl: 'https://assets.adobedtm.com/a8f91053d00e/d92081ab8a7c/launch-76fcba9023bb-staging.min.js',\n no: 'https://assets.adobedtm.com/a8f91053d00e/8a89b29c8be2/launch-39844f683b39-staging.min.js',\n pt: 'https://assets.adobedtm.com/a8f91053d00e/4dbad6f05dd3/launch-973c3e41d23a-staging.min.js',\n se: 'https://assets.adobedtm.com/a8f91053d00e/20a4caef2031/launch-e1b61513841a-staging.min.js',\n us: 'https://assets.adobedtm.com/a8f91053d00e/363a875b9ddd/launch-8fea7e8865ba-staging.min.js',\n },\n staging2: {\n us: 'https://assets.adobedtm.com/a8f91053d00e/363a875b9ddd/launch-8fea7e8865ba-staging.min.js',\n },\n stagingx: {\n ch: 'https://assets.adobedtm.com/a8f91053d00e/85f63646e5c0/launch-eed9d036a6b7-staging.min.js',\n pe: 'https://assets.adobedtm.com/a8f91053d00e/6f82277d6ca9/launch-036d60a59bcc-staging.min.js',\n cl: 'https://assets.adobedtm.com/a8f91053d00e/f2d3be813f06/launch-fbd57df79f1f-staging.min.js',\n br: 'https://assets.adobedtm.com/a8f91053d00e/632dfaefbac3/launch-7034435b45d3-staging.min.js',\n nz: 'https://assets.adobedtm.com/a8f91053d00e/fcb6adc7fc1e/launch-c0742238f6b0-staging.min.js',\n hk: 'https://assets.adobedtm.com/a8f91053d00e/ffca6e56a5e2/launch-e10f25252717-staging.min.js',\n id: 'https://assets.adobedtm.com/a8f91053d00e/a1f93e96c7a6/launch-5268930e33fd-staging.min.js',\n sg: 'https://assets.adobedtm.com/a8f91053d00e/7e87379c86eb/launch-bd74afe49d07-staging.min.js',\n at: 'https://assets.adobedtm.com/a8f91053d00e/06a6cb51c3d4/launch-e02a0574edbd-staging.min.js',\n au: 'https://assets.adobedtm.com/a8f91053d00e/7dee3b1c3a2e/launch-0b1541386cdc-staging.min.js',\n be: 'https://assets.adobedtm.com/a8f91053d00e/285753d4b8f2/launch-55ce3f721d2c-staging.min.js',\n ca: 'https://assets.adobedtm.com/a8f91053d00e/a72ffeec43fd/launch-025552be0893-staging.min.js',\n co: 'https://assets.adobedtm.com/a8f91053d00e/8344def90c44/launch-1a4e88f064db-staging.min.js',\n de: 'https://assets.adobedtm.com/a8f91053d00e/61cdfd8ddaaf/launch-cfaf45f56c15-staging.min.js',\n es: 'https://assets.adobedtm.com/a8f91053d00e/9b05ee515724/launch-6a5f443a9ff6-staging.min.js',\n fr: 'https://assets.adobedtm.com/a8f91053d00e/fa0362fa89e0/launch-44eccbbc6751-staging.min.js',\n gb: 'https://assets.adobedtm.com/a8f91053d00e/9b034aa49568/launch-34ab3000fc47-staging.min.js',\n hu: 'https://assets.adobedtm.com/a8f91053d00e/fcdbd931f888/launch-6d69215657c5-staging.min.js',\n in: 'https://assets.adobedtm.com/a8f91053d00e/efa4493a351d/launch-ae9304c9a51e-staging.min.js',\n it: 'https://assets.adobedtm.com/a8f91053d00e/746db32a8133/launch-a9117f7aadca-staging.min.js',\n mi: 'https://assets.adobedtm.com/a8f91053d00e/3c6362756e02/launch-5a61f2cf9342-staging.min.js',\n mx: 'https://assets.adobedtm.com/a8f91053d00e/69cf864b3e52/launch-2320722bddfb-staging.min.js',\n nl: 'https://assets.adobedtm.com/a8f91053d00e/d92081ab8a7c/launch-76fcba9023bb-staging.min.js',\n no: 'https://assets.adobedtm.com/a8f91053d00e/8a89b29c8be2/launch-39844f683b39-staging.min.js',\n pt: 'https://assets.adobedtm.com/a8f91053d00e/4dbad6f05dd3/launch-973c3e41d23a-staging.min.js',\n se: 'https://assets.adobedtm.com/a8f91053d00e/20a4caef2031/launch-e1b61513841a-staging.min.js',\n us: 'https://assets.adobedtm.com/a8f91053d00e/363a875b9ddd/launch-8fea7e8865ba-staging.min.js',\n },\n};\n\nconst x4aFrameScriptsMap: any = {\n development:\n 'https://assets.adobedtm.com/a8f91053d00e/a8292f299318/launch-1bae6d7705ff-development.min.js',\n production:\n 'https://assets.adobedtm.com/a8f91053d00e/a8292f299318/launch-5afb62f26f1d.min.js',\n productionbeta:\n 'https://assets.adobedtm.com/a8f91053d00e/a8292f299318/launch-5afb62f26f1d.min.js',\n staging:\n 'https://assets.adobedtm.com/a8f91053d00e/a8292f299318/launch-4c69cd1fe550-staging.min.js',\n staging2:\n 'https://assets.adobedtm.com/a8f91053d00e/a8292f299318/launch-4c69cd1fe550-staging.min.js',\n stagingx:\n 'https://assets.adobedtm.com/a8f91053d00e/a8292f299318/launch-4c69cd1fe550-staging.min.js',\n};\n\nexport const ujetFrameScriptsMap: any = {\n development: {\n ca: 'https://assets.adobedtm.com/a8f91053d00e/a72ffeec43fd/launch-4da0af444102-development.min.js',\n de: 'https://assets.adobedtm.com/a8f91053d00e/61cdfd8ddaaf/launch-b42d717b996c-development.min.js',\n es: 'https://assets.adobedtm.com/a8f91053d00e/9b05ee515724/launch-536e8b1f7afe-development.min.js',\n fr: 'https://assets.adobedtm.com/a8f91053d00e/fa0362fa89e0/launch-0e0dfd719497-development.min.js',\n mx: 'https://assets.adobedtm.com/a8f91053d00e/69cf864b3e52/launch-d6eae0223c07-development.min.js',\n uk: 'https://assets.adobedtm.com/a8f91053d00e/9b034aa49568/launch-fbb6435b71be-development.min.js',\n us: 'https://assets.adobedtm.com/a8f91053d00e/363a875b9ddd/launch-4eebef447fdb-development.min.js',\n },\n production: {\n ca: 'https://assets.adobedtm.com/a8f91053d00e/a72ffeec43fd/launch-897c6aa7c43b.min.js',\n de: 'https://assets.adobedtm.com/a8f91053d00e/61cdfd8ddaaf/launch-69e6d4db4b67.min.js',\n es: 'https://assets.adobedtm.com/a8f91053d00e/9b05ee515724/launch-0e26513cdfe2.min.js',\n fr: 'https://assets.adobedtm.com/a8f91053d00e/fa0362fa89e0/launch-a1c65e61b822.min.js',\n mx: 'https://assets.adobedtm.com/a8f91053d00e/69cf864b3e52/launch-2c9f828b62c9.min.js',\n uk: 'https://assets.adobedtm.com/a8f91053d00e/9b034aa49568/launch-b3b2cf368281.min.js',\n us: 'https://assets.adobedtm.com/a8f91053d00e/363a875b9ddd/launch-b0e54efb61f7.min.js',\n },\n productionbeta: {\n ca: 'https://assets.adobedtm.com/a8f91053d00e/a72ffeec43fd/launch-897c6aa7c43b.min.js',\n de: 'https://assets.adobedtm.com/a8f91053d00e/61cdfd8ddaaf/launch-69e6d4db4b67.min.js',\n es: 'https://assets.adobedtm.com/a8f91053d00e/9b05ee515724/launch-0e26513cdfe2.min.js',\n fr: 'https://assets.adobedtm.com/a8f91053d00e/fa0362fa89e0/launch-a1c65e61b822.min.js',\n mx: 'https://assets.adobedtm.com/a8f91053d00e/69cf864b3e52/launch-2c9f828b62c9.min.js',\n uk: 'https://assets.adobedtm.com/a8f91053d00e/9b034aa49568/launch-b3b2cf368281.min.js',\n us: 'https://assets.adobedtm.com/a8f91053d00e/363a875b9ddd/launch-b0e54efb61f7.min.js',\n },\n staging: {\n ca: 'https://assets.adobedtm.com/a8f91053d00e/a72ffeec43fd/launch-025552be0893-staging.min.js',\n de: 'https://assets.adobedtm.com/a8f91053d00e/61cdfd8ddaaf/launch-cfaf45f56c15-staging.min.js',\n es: 'https://assets.adobedtm.com/a8f91053d00e/9b05ee515724/launch-6a5f443a9ff6-staging.min.js',\n fr: 'https://assets.adobedtm.com/a8f91053d00e/fa0362fa89e0/launch-44eccbbc6751-staging.min.js',\n mx: 'https://assets.adobedtm.com/a8f91053d00e/69cf864b3e52/launch-2320722bddfb-staging.min.js',\n uk: 'https://assets.adobedtm.com/a8f91053d00e/9b034aa49568/launch-34ab3000fc47-staging.min.js',\n us: 'https://assets.adobedtm.com/a8f91053d00e/363a875b9ddd/launch-8fea7e8865ba-staging.min.js',\n },\n staging2: {\n ca: 'https://assets.adobedtm.com/a8f91053d00e/a72ffeec43fd/launch-025552be0893-staging.min.js',\n de: 'https://assets.adobedtm.com/a8f91053d00e/61cdfd8ddaaf/launch-cfaf45f56c15-staging.min.js',\n es: 'https://assets.adobedtm.com/a8f91053d00e/9b05ee515724/launch-6a5f443a9ff6-staging.min.js',\n fr: 'https://assets.adobedtm.com/a8f91053d00e/fa0362fa89e0/launch-44eccbbc6751-staging.min.js',\n mx: 'https://assets.adobedtm.com/a8f91053d00e/69cf864b3e52/launch-2320722bddfb-staging.min.js',\n uk: 'https://assets.adobedtm.com/a8f91053d00e/9b034aa49568/launch-34ab3000fc47-staging.min.js',\n us: 'https://assets.adobedtm.com/a8f91053d00e/363a875b9ddd/launch-8fea7e8865ba-staging.min.js',\n },\n stagingx: {\n ca: 'https://assets.adobedtm.com/a8f91053d00e/a72ffeec43fd/launch-025552be0893-staging.min.js',\n de: 'https://assets.adobedtm.com/a8f91053d00e/61cdfd8ddaaf/launch-cfaf45f56c15-staging.min.js',\n es: 'https://assets.adobedtm.com/a8f91053d00e/9b05ee515724/launch-6a5f443a9ff6-staging.min.js',\n fr: 'https://assets.adobedtm.com/a8f91053d00e/fa0362fa89e0/launch-44eccbbc6751-staging.min.js',\n mx: 'https://assets.adobedtm.com/a8f91053d00e/69cf864b3e52/launch-2320722bddfb-staging.min.js',\n uk: 'https://assets.adobedtm.com/a8f91053d00e/9b034aa49568/launch-34ab3000fc47-staging.min.js',\n us: 'https://assets.adobedtm.com/a8f91053d00e/363a875b9ddd/launch-8fea7e8865ba-staging.min.js',\n },\n};\n\nconst UNAUTH_USER_GUID = '00000000-0000-0000-0000-000000000000';\n\nexport function useAdobeDtm() {\n const [scriptUrl, setScriptUrl] = useState('');\n const isScriptInjected = useRef(false);\n const oneTrustScript = useIsOneTrustEnabled();\n const { isInX4AFrame } = useInX4AFrame();\n\n const buildVars = useBuildVars();\n const siteConfig = useSiteConfig();\n const isAuthenticated = useIsAuthenticated();\n const token = useDecodedToken();\n const { pathname, search } = useLocation();\n\n const { buildEnvironment } = buildVars;\n const { siteCode } = siteConfig;\n\n useEffect(() => {\n if (buildEnvironment && siteCode) {\n const envMap = scriptsMap[buildEnvironment];\n const x4aFrameScript = x4aFrameScriptsMap[buildEnvironment];\n if (isInX4AFrame) {\n setScriptUrl(x4aFrameScript);\n } else if (envMap) {\n setScriptUrl(envMap[siteCode]);\n }\n }\n }, [buildEnvironment, isInX4AFrame, siteCode]);\n\n useEffect(() => {\n if (\n oneTrustScript !== 'loading' &&\n scriptUrl &&\n !isScriptInjected.current\n ) {\n if (oneTrustScript) {\n injectCategorizedScriptInHead(scriptUrl, 'optanon-category-C0001');\n } else {\n injectScriptInHead(scriptUrl);\n }\n isScriptInjected.current = true;\n }\n if (!isAuthenticated) {\n setDigitalData({ userGUID: UNAUTH_USER_GUID });\n }\n }, [scriptUrl, isAuthenticated, oneTrustScript]);\n\n useEffect(() => {\n const userId = token?.imoProfile?.userId;\n if (isAuthenticated && userId && typeof userId === 'string') {\n const userGUID = userId.replace(/[^0-9a-z-]/g, '');\n setDigitalData({ userGUID });\n }\n }, [token?.imoProfile?.userId, isAuthenticated]);\n\n // Clear digitalData object when location pathname (route) and search change\n useEffect(() => {\n setDigitalData({});\n }, [pathname, search]);\n}\n","import { useEffect } from 'react';\nimport { useIsAuthenticated, useDecodedToken } from 'mf_core/auth';\nimport { datadogRum } from '@datadog/browser-rum';\n\nconst isLocalDev = window.location.origin.indexOf('://local') > -1;\n\n// Note: Datadog RUM initialization is handled in data-dog-rum.ts\nexport function useDatadog() {\n const isAuthenticated = useIsAuthenticated();\n const decodedToken = useDecodedToken();\n\n useEffect(() => {\n if (isAuthenticated && decodedToken && !isLocalDev) {\n datadogRum.setUser({\n email: decodedToken.email,\n id: decodedToken.userId,\n name: `${decodedToken.firstName} ${decodedToken.lastName}`,\n });\n }\n }, [isAuthenticated, decodedToken]);\n}\n","import { useApiPostQuery } from 'mf_core/query';\n\nexport function useUjetAuth(enabled: boolean, isUniteChatbot: boolean) {\n return useApiPostQuery<UjetTO>(\n '/ccaip-auth-x4c/v1/access-token',\n { isUnite: isUniteChatbot },\n undefined,\n {\n enabled: enabled,\n queryKey: ['/ccaip-auth-x4c/v1/access-token'],\n }\n );\n}\n\nexport type UjetTO = {\n configurations: {\n companyId: string;\n companyName: string;\n defaultMenuKey: string | null;\n host: string;\n };\n token: string;\n};\n","import { useMemo } from 'react';\nimport { useLocation } from 'react-router';\nimport { useIsAuthenticated, useIsFeatureWhitelisted } from 'mf_core/auth';\nimport { useFeatureFlagBase } from './use-feature-flag-base';\nimport { checkListForPath } from '../app/injectors/utils';\n\n//Config documentation:\n// https://imonline.atlassian.net/wiki/spaces/GLAD/pages/3285942926/CCAI+Chatbot+Live+Chat\nexport function useIsUjetChatbotEnabled(isCloudChat: boolean) {\n const isAuthenticated = useIsAuthenticated();\n const location = useLocation();\n const pathname = location.pathname.toLowerCase();\n\n const isFeatureWhitelisted = useIsFeatureWhitelisted();\n\n const { boValues: value, isReady } = useFeatureFlagBase();\n\n const isWhitelistedReseller =\n value['CCAI_Chatbot_WhitelistedResellers'] === 'true';\n\n const isUniteChatbot =\n isFeatureWhitelisted('CMP') &&\n pathname.includes('/general/contact-us') &&\n isReady &&\n Boolean(value['CCAI_UNITE_Disabled']) === false;\n\n const pathWhitelist: string[] = useMemo(() => {\n return (\n (value['CCAI_Paths_Whitelist'] &&\n value['CCAI_Paths_Whitelist']?.toLowerCase().split(',')) ||\n []\n );\n }, [value]);\n\n const isValidPath = useMemo(() => {\n if (!isReady || !isWhitelistedReseller) return false;\n\n if (pathWhitelist[0] === '*' || pathWhitelist.length === 0) return true;\n\n const currentPathWhitelisted = checkListForPath(pathWhitelist, pathname);\n return currentPathWhitelisted;\n }, [isReady, isWhitelistedReseller, pathWhitelist, pathname]);\n\n const translationKeys: string[] = getTranslationKeys();\n\n return {\n isEnabled: isChatbotEnabled(),\n isUniteChatbot,\n isValidPath,\n translationKeys,\n };\n\n function getTranslationKeys(): string[] {\n return isUniteChatbot\n ? (isReady && value['CCAI_UNITE_Translation_Keys']?.split(',')) || []\n : (isReady && value['CCAI_Translation_Keys']?.split(',')) || [];\n }\n\n function isChatbotEnabled() {\n return isCloudChat\n ? isUniteChatbot\n : isAuthenticated && isReady && isWhitelistedReseller;\n }\n}\n","import { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useLocalizationContext } from '@im/react-localization';\nimport { useLocation } from 'react-router';\nimport { UjetTO, useUjetAuth } from '../../hooks/useUjetAuth';\nimport { useIsUjetChatbotEnabled } from '../../hooks/useIsUjetChatbotEnabled';\nimport { injectScriptInHead } from './utils';\nimport { useDecodedToken } from 'mf_core/auth';\nimport { useBuildVars, useSiteConfig } from 'mf_core/config';\nimport { getLsObject } from '@im/ui-lib/utils/local-storage.utils';\nimport { ujetFrameScriptsMap } from './useAdobeDtm';\n\nconst baseUrl = globalThis.location.origin;\n\ninterface AccountResultTO {\n accountID?: string;\n companycode?: string;\n countryID?: string;\n currencyID?: string;\n ownerID?: string;\n priceList?: string;\n}\n\n/** CCAI Ujet Chatbot/Live chat */\nexport function useUjetChatBot() {\n const { locale, localizationService } = useLocalizationContext();\n const { buildEnvironment } = useBuildVars();\n const { environment, siteCode } = useSiteConfig();\n const langRef = useRef('');\n const { pathname } = useLocation();\n const [ujetTranslations, setUjetTranslations] = useState<{\n [key: string]: { [key: string]: string };\n }>({});\n\n const ujetTranslationsRef = useRef(ujetTranslations);\n\n const decodedToken = useDecodedToken();\n const firstName: string = decodedToken?.imoProfile?.firstName || '';\n const lastName: string = decodedToken?.imoProfile?.lastName || '';\n const bcn: string = decodedToken?.resellerId || '';\n const email: string = decodedToken?.email || '';\n const userId: string = decodedToken?.userId || '';\n const accountId = useMemo(() => {\n const accountResponse = getLsObject('getAccount', { data: {} });\n const accountData: AccountResultTO =\n accountResponse?.data || accountResponse;\n return accountData?.accountID || '';\n }, []);\n\n const {\n isEnabled,\n isValidPath,\n translationKeys: ujetKeys,\n } = useIsUjetChatbotEnabled(false);\n const { data: ujetConfig } = useUjetAuth(isEnabled, false);\n\n const UJET = window.UJET;\n const ujetInstanceRef = useRef(null as UJETInstance);\n\n const [isScriptInjected, setIsScriptInjected] = useState(false);\n const isAdobeScriptInjected = useRef(false);\n\n function hideUjet() {\n const ujet = ujetInstanceRef.current;\n if (ujet?.$el?.style) {\n ujet.$el.style.display = 'none';\n }\n }\n\n function showUjet() {\n const ujet = ujetInstanceRef.current;\n if (ujet?.$el?.style) {\n ujet.$el.style.display = 'block';\n }\n }\n\n useEffect(() => {\n langRef.current = locale.split('-')[0];\n }, [locale]);\n\n useEffect(() => {\n if (isEnabled) {\n if (!isScriptInjected && isValidPath) {\n injectScriptInHead('https://websdk.ujet.co/v2/loader.js', () => {\n setIsScriptInjected(true);\n });\n }\n //Close chatbot widget and hide chatbot launcher button when leaving Returns routes\n else if (isScriptInjected && !isValidPath) {\n hideUjet();\n }\n //Once injected, display chatbot launcher button when returning to a Returns route\n else if (isScriptInjected && isValidPath) {\n showUjet();\n }\n }\n }, [isEnabled, isScriptInjected, isValidPath, pathname]);\n\n const keys = useMemo(() => {\n return ujetKeys.map((key) => {\n return `Ujet.${key}`;\n });\n }, [ujetKeys]);\n\n const loadTranslations = useCallback(() => {\n if (localizationService && keys.length > 0) {\n localizationService\n .translate(keys, { returnKeyIfNotFound: false })\n .then((res: any) => {\n const langTranslations: { [key: string]: string } = {};\n ujetKeys.forEach((key) => {\n langTranslations[key] = res[`Ujet.${key}`] || '';\n });\n ujetTranslationsRef.current = {\n ...ujetTranslations,\n [langRef.current]: langTranslations,\n };\n setUjetTranslations(ujetTranslationsRef.current);\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [keys, localizationService, ujetKeys]);\n\n function destroyUjet() {\n if (ujetInstanceRef.current) {\n ujetInstanceRef.current.destroy();\n if (ujetInstanceRef.current.$el) {\n ujetInstanceRef.current.$el.remove();\n }\n }\n }\n\n function loadAdobeAnalytics() {\n if (!isAdobeScriptInjected.current) {\n const container = document.getElementById('ujet-launcher');\n const ujetIframe = container ? container.querySelector('iframe') : null;\n if (ujetIframe) {\n const iframeDocument =\n ujetIframe.contentDocument || ujetIframe.contentWindow?.document;\n if (iframeDocument) {\n const scriptId = getAdbodeScript();\n // Create a script element\n const script = iframeDocument.createElement('script');\n script.src = scriptId; // Set the source of your script\n script.async = true;\n\n const digitalDataScript = document.createElement('script');\n digitalDataScript.innerHTML = 'var digitalData = {};';\n // Append the script to the iframe document\n iframeDocument.head.appendChild(script);\n iframeDocument.head.appendChild(digitalDataScript);\n isAdobeScriptInjected.current = true;\n }\n }\n }\n }\n\n function getAdbodeScript() {\n let scriptId = '';\n if (buildEnvironment && siteCode) {\n const envMap = ujetFrameScriptsMap[buildEnvironment];\n if (envMap) {\n scriptId = envMap[siteCode];\n }\n }\n return scriptId;\n }\n\n function setupUjet(config: UjetTO) {\n // Initialize UJET web-sdk. For more info:\n // https://cloud.google.com/contact-center/ccai-platform/docs/API/publication--en\n\n const options: { [option: string]: any } = {\n authenticate: config.token,\n bottom: '140px',\n companyId: config.configurations.companyId,\n companyName: config.configurations.companyName,\n customData: {\n bcn: {\n label: 'bcn',\n value: bcn,\n },\n country: {\n label: 'country',\n value: siteCode,\n },\n email: {\n label: 'Email',\n value: email,\n },\n name: {\n label: 'name',\n value: `${firstName} ${lastName}`,\n },\n values: {\n label: 'values',\n value: {\n accountId,\n email,\n environment,\n language: locale,\n userId,\n },\n },\n },\n host: config.configurations.host,\n lang: langRef.current,\n launcher: true,\n logo: `${baseUrl}/cep/assets/img/chatbot/logo.png`,\n };\n\n if (Object.keys(ujetTranslationsRef.current).length > 0) {\n options.translation = ujetTranslationsRef.current;\n }\n\n if (config.configurations.defaultMenuKey) {\n options.menuKey = config.configurations.defaultMenuKey;\n\n setTimeout(() => {\n ujetInstanceRef.current = new UJET(options);\n\n if (ujetInstanceRef.current) {\n loadAdobeAnalytics();\n /** Ujet currently doesn't work second time if menuKey is used.\n * This is a hack to destroy and reconfigure ujet.]\n * This patch should be removed once menuKey issue is resolved.\n */\n ujetInstanceRef.current.on('close', () => {\n destroyUjet();\n setupUjet(config);\n });\n }\n }, 100);\n } else {\n ujetInstanceRef.current = new UJET(options);\n }\n }\n\n useEffect(() => {\n if (UJET && ujetConfig && isScriptInjected && !ujetInstanceRef.current) {\n if (ujetKeys.length > 0 && Object.keys(ujetTranslations).length === 0) {\n // load translations before initializing Ujet.\n loadTranslations();\n return;\n }\n setupUjet(ujetConfig);\n } // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isScriptInjected, ujetTranslations, ujetConfig, UJET]);\n\n useEffect(() => {\n if (isEnabled && ujetInstanceRef.current && ujetKeys.length > 0) {\n // load translations on language change.\n if (!Object.keys(ujetTranslations).includes(langRef.current)) {\n hideUjet();\n loadTranslations();\n } else {\n ujetInstanceRef.current.options.lang = langRef.current;\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isEnabled, locale, ujetKeys]);\n\n useEffect(() => {\n if (isEnabled && ujetInstanceRef.current) {\n // update language and translations on language change.\n ujetInstanceRef.current.options.lang = langRef.current;\n ujetInstanceRef.current.options.translation = ujetTranslations;\n showUjet();\n }\n }, [isEnabled, ujetTranslations, ujetInstanceRef]);\n}\n\ndeclare global {\n interface Window {\n UJET: any;\n }\n}\n\ntype UJETInstance = null | {\n $el: HTMLElement;\n close: () => void;\n destroy: () => void;\n on: (event: string, cb: () => void) => void;\n open: () => void;\n options: ConfigureOptions;\n start: (options?: StartOptions) => void;\n status: string;\n};\n\ntype StartOptions = { [menuKey: string]: string };\ntype ConfigureOptions = { [key: string]: any };\n","import { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useLocalizationContext } from '@im/react-localization';\nimport { useLocation } from 'react-router';\nimport { UjetTO, useUjetAuth } from '../../hooks/useUjetAuth';\nimport { useIsUjetChatbotEnabled } from '../../hooks/useIsUjetChatbotEnabled';\nimport { injectScriptInHead } from './utils';\nimport { useDecodedToken } from 'mf_core/auth';\nimport { useSiteConfig } from 'mf_core/config';\nimport { useSearchParams } from 'react-router-dom';\n\nconst baseUrl = globalThis.location.origin;\n\n/** CCAI Ujet Chatbot/Live chat */\nexport function useUjetUniteChatBot() {\n const { locale, localizationService } = useLocalizationContext();\n const { environment, siteCode } = useSiteConfig();\n const langRef = useRef('');\n const { pathname } = useLocation();\n const [searchParams] = useSearchParams();\n const openCloudChat =\n typeof searchParams.get('openCloudChat') === 'string'\n ? Boolean(searchParams.get('openCloudChat'))\n : false;\n const [ujetTranslations, setUjetTranslations] = useState<{\n [key: string]: { [key: string]: string };\n }>({});\n\n const ujetTranslationsRef = useRef(ujetTranslations);\n\n const decodedToken = useDecodedToken();\n const firstName: string = decodedToken?.imoProfile?.firstName || '';\n const lastName: string = decodedToken?.imoProfile?.lastName || '';\n const bcn: string = decodedToken?.resellerId || '';\n const email: string = decodedToken?.email || '';\n const userId: string = decodedToken?.userId || '';\n\n const {\n isEnabled,\n isUniteChatbot,\n isValidPath,\n translationKeys: ujetKeys,\n } = useIsUjetChatbotEnabled(true);\n const { data: ujetConfig } = useUjetAuth(isUniteChatbot, true);\n\n const UJET = window.UJET;\n const ujetUniteInstanceRef = useRef(null as UJETInstance);\n\n const [isScriptInjected, setIsScriptInjected] = useState(false);\n\n function hideUjet() {\n const ujet = ujetUniteInstanceRef.current;\n if (ujet) {\n ujet.$el.style.display = 'none';\n }\n }\n\n function showUjet() {\n const ujet = ujetUniteInstanceRef.current;\n if (ujet) {\n ujet.$el.style.display = 'block';\n }\n }\n\n useEffect(() => {\n langRef.current = locale.split('-')[0];\n }, [locale]);\n\n useEffect(() => {\n if (isEnabled) {\n if (!isScriptInjected && isUniteChatbot) {\n injectScriptInHead('https://websdk.ujet.co/v2/loader.js', () => {\n setIsScriptInjected(true);\n });\n }\n //Close chatbot widget and hide chatbot launcher button when leaving Returns routes\n else if (isScriptInjected && !isUniteChatbot) {\n hideUjet();\n }\n //Once injected, display chatbot launcher button when returning to a Returns route\n else if (isScriptInjected && isUniteChatbot) {\n showUjet();\n }\n }\n }, [\n isEnabled,\n isScriptInjected,\n isValidPath,\n pathname,\n isUniteChatbot,\n openCloudChat,\n ]);\n\n const keys = useMemo(() => {\n return ujetKeys.map((key) => {\n return `UjetUnite.${key}`;\n });\n }, [ujetKeys]);\n\n const loadTranslations = useCallback(() => {\n if (localizationService && keys.length > 0) {\n localizationService\n .translate(keys, { returnKeyIfNotFound: false })\n .then((res: any) => {\n const langTranslations: { [key: string]: string } = {};\n ujetKeys.forEach((key) => {\n langTranslations[key] = res[`UjetUnite.${key}`] || '';\n });\n ujetTranslationsRef.current = {\n ...ujetTranslations,\n [langRef.current]: langTranslations,\n };\n setUjetTranslations(ujetTranslationsRef.current);\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [keys, localizationService, ujetKeys]);\n\n function setupUjet(config: UjetTO) {\n // Initialize UJET web-sdk. For more info:\n // https://cloud.google.com/contact-center/ccai-platform/docs/API/publication--en\n\n const options: { [option: string]: any } = {\n authenticate: config.token,\n bottom: '20px',\n companyId: config.configurations.companyId,\n companyName: config.configurations.companyName,\n customData: {\n bcn: {\n label: 'bcn',\n value: bcn,\n },\n country: {\n label: 'country',\n value: siteCode,\n },\n email: {\n label: 'Email',\n value: email,\n },\n name: {\n label: 'name',\n value: `${firstName} ${lastName}`,\n },\n resellerid: {\n label: 'resellerid',\n value: bcn,\n },\n values: {\n label: 'values',\n value: {\n environment,\n language: locale,\n userId,\n },\n },\n },\n host: config.configurations.host,\n lang: langRef.current,\n launcher: false,\n logo: `${baseUrl}/cep/assets/img/chatbot/logo.png`,\n };\n if (Object.keys(ujetTranslationsRef.current).length > 0) {\n options.translation = ujetTranslationsRef.current;\n }\n if (config.configurations.defaultMenuKey) {\n options.menuKey = config.configurations.defaultMenuKey;\n setTimeout(() => {\n ujetUniteInstanceRef.current = new UJET(options);\n if (ujetUniteInstanceRef.current) {\n ujetUniteInstanceRef.current.on('close', () => {\n destroyUniteUjet();\n setupUjet(config);\n });\n }\n }, 100);\n } else {\n ujetUniteInstanceRef.current = new UJET(options);\n }\n }\n\n function destroyUniteUjet() {\n if (ujetUniteInstanceRef.current) {\n ujetUniteInstanceRef.current.destroy();\n ujetUniteInstanceRef.current.$el.remove();\n }\n }\n window.openUjet = () => {\n if (isUniteChatbot) {\n ujetUniteInstanceRef.current?.open();\n }\n };\n useEffect(() => {\n if (\n UJET &&\n ujetConfig &&\n isScriptInjected &&\n !ujetUniteInstanceRef.current\n ) {\n if (ujetKeys.length > 0 && Object.keys(ujetTranslations).length === 0) {\n // load translations before initializing Ujet.\n loadTranslations();\n return;\n }\n setupUjet(ujetConfig);\n } // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isScriptInjected, ujetTranslations, ujetConfig, UJET]);\n\n useEffect(() => {\n if (isEnabled && ujetUniteInstanceRef.current && ujetKeys.length > 0) {\n // load translations on language change.\n if (!Object.keys(ujetTranslations).includes(langRef.current)) {\n loadTranslations();\n } else {\n ujetUniteInstanceRef.current.options.lang = langRef.current;\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isEnabled, locale, ujetKeys]);\n\n useEffect(() => {\n if (isEnabled && ujetUniteInstanceRef.current) {\n // update language and translations on language change.\n ujetUniteInstanceRef.current.options.lang = langRef.current;\n ujetUniteInstanceRef.current.options.translation = ujetTranslations;\n }\n }, [isEnabled, ujetTranslations, ujetUniteInstanceRef, openCloudChat]);\n\n useEffect(() => {\n if (openCloudChat) {\n setTimeout(() => {\n ujetUniteInstanceRef.current?.open();\n }, 500);\n }\n });\n}\n\ndeclare global {\n interface Window {\n UJET: any;\n openUjet: () => void;\n }\n}\n\ntype UJETInstance = null | {\n $el: HTMLElement;\n close: () => void;\n destroy: () => void;\n on: (event: string, cb: () => void) => void;\n open: () => void;\n options: ConfigureOptions;\n start: (options?: StartOptions) => void;\n status: string;\n};\n\ntype StartOptions = { [menuKey: string]: string };\ntype ConfigureOptions = { [key: string]: any };\n","import { useEffect, useMemo, useState } from 'react';\nimport { useSiteConfig } from 'mf_core/config';\nimport { injectScriptInBody } from './utils';\nimport { useIsAuthenticated, useDecodedToken } from 'mf_core/auth';\nimport { useLocation } from 'react-router';\nimport { getLsObject } from '@im/ui-lib/utils/local-storage.utils';\nimport { useLocalizationContext } from '@im/react-localization';\n\ninterface AccountResultTO {\n accountID?: string;\n companycode?: string;\n countryID?: string;\n currencyID?: string;\n ownerID?: string;\n priceList?: string;\n}\n\nexport function useChatBotHelpMenu() {\n const { environment, siteCode } = useSiteConfig();\n const { pathname } = useLocation();\n const isAuthenticated = useIsAuthenticated();\n const decodedToken = useDecodedToken();\n const defaultVisibility = siteCode === 'mx';\n const [showChatbot, setShowChatbot] = useState(defaultVisibility);\n\n const firstName: string = decodedToken?.imoProfile?.firstName || '';\n const lastName: string = decodedToken?.imoProfile?.lastName || '';\n const email: string = decodedToken?.email || '';\n const userId: string = decodedToken?.userId || '';\n const { locale } = useLocalizationContext();\n const language = locale;\n const accountId = useMemo(() => {\n const accountResponse = getLsObject('getAccount', { data: {} });\n const accountData: AccountResultTO =\n accountResponse?.data || accountResponse;\n return accountData?.accountID || '';\n }, []);\n\n const name = `${firstName} ${lastName}`;\n const resellerId = decodedToken?.resellerId;\n const resellerInfoHTML = `<span id=\"reseller-id\" style=\"display:none\">${resellerId}</span><span id=\"reseller-name\" style=\"display:none\">${name}</span><span id=\"account-id\" style=\"display:none\">${accountId}</span><span id=\"email-id\" style=\"display:none\">${email}</span><span id=\"environment-name\" style=\"display:none\">${environment}</span><span id=\"language-name\" style=\"display:none\">${language}</span><span id=\"user-id\" style=\"display:none\">${userId}</span>`;\n const resellerInfoContainer = document.createElement('div');\n resellerInfoContainer.id = 'reseller-info';\n resellerInfoContainer.innerHTML = resellerInfoHTML;\n if (resellerId && !document.getElementById('reseller-info') && name)\n document.body.appendChild(resellerInfoContainer);\n\n const win = window as any;\n win.chatBotOnHelpMenu = {\n toggleChatBot: () => {\n setShowChatbot(!showChatbot);\n },\n };\n useEffect(() => {\n if (pathname.includes('/general/contact-us')) {\n setShowChatbot(false);\n } else if (siteCode === 'mx' && !pathname.includes('/general/contact-us')) {\n setShowChatbot(true);\n }\n }, [siteCode, pathname]);\n\n useEffect(() => {\n if (isAuthenticated) {\n if (showChatbot) {\n loadScriptInBody(siteCode);\n }\n const chatBotContainerCO = document.getElementById(\n 'chat-widget-container'\n );\n const chatBotContainerMx = document.getElementById('chatbot-chat');\n if (chatBotContainerCO) {\n chatBotContainerCO.style.display =\n !showChatbot || pathname.includes('/my/checkout') ? 'none' : 'block';\n }\n if (chatBotContainerMx) {\n chatBotContainerMx.style.display =\n !showChatbot || pathname.includes('/my/checkout') ? 'none' : 'block';\n }\n }\n }, [siteCode, showChatbot, isAuthenticated, pathname]);\n}\n\nconst loadScriptInBody = function (siteCode: string) {\n switch (siteCode) {\n case 'co': {\n if (!document.getElementById('co_chatbot_script')) {\n const script_text_chatbot_co = `window.__lc=window.__lc||{};window.__lc.license=11382707;(function(){var a=document.createElement(\"script\");a.type=\"text/javascript\";a.async=!0;a.src=(\"https:\"==document.location.protocol?\"https://\":\"http://\")+\"cdn.livechatinc.com/tracking.js\";var b=document.getElementsByTagName(\"script\")[0];b.parentNode.insertBefore(a,b)})();`;\n injectScriptInBody(script_text_chatbot_co, 'co_chatbot_script');\n }\n break;\n }\n case 'mx': {\n if (!document.getElementById('mx_chatbot_script')) {\n const script_text_chatbot_mx = `window.__lc=window.__lc||{};var reseller_bot=\"\",uname_bot=\"\",accountId_bot=\"\",email_bot=\"\",environment_bot=\"\",language_bot=\"\",userId_bot=\"\";if(document.getElementById(\"reseller-id\")){reseller_bot=document.getElementById(\"reseller-id\").innerHTML}if(document.getElementById(\"reseller-name\")){uname_bot=document.getElementById(\"reseller-name\").innerHTML}if(document.getElementById(\"account-id\")){accountId_bot=document.getElementById(\"account-id\").innerHTML}if(document.getElementById(\"email-id\")){email_bot=document.getElementById(\"email-id\").innerHTML}if(document.getElementById(\"environment-name\")){environment_bot=document.getElementById(\"environment-name\").innerHTML}if(document.getElementById(\"language-name\")){language_bot=document.getElementById(\"language-name\").innerHTML}if(document.getElementById(\"user-id\")){userId_bot=document.getElementById(\"user-id\").innerHTML}window.__lc.params=[{name:\"name\",value:uname_bot},{name:\"resellerid\",value:reseller_bot},{name:\"accountId\",value:accountId_bot},{name:\"email\",value:email_bot},{name:\"environment\",value:environment_bot},{name:\"language\",value:language_bot},{name:\"userId\",value:userId_bot}];window.__lc.license=8829336;window.__lc.group=19;console.log(window.__lc.group);(function(){var a=document.createElement(\"script\");a.type=\"text/javascript\";a.async=!0;a.src=(\"https:\"==document.location.protocol?\"https://\":\"http://\")+\"cdn.livechatinc.com/tracking.js\";var b=document.getElementsByTagName(\"script\")[0];b.parentNode.insertBefore(a,b)})();var LC_API=LC_API||{};LC_API.on_after_load=function(){LC_API.minimize_chat_window()};`;\n injectScriptInBody(script_text_chatbot_mx, 'mx_chatbot_script');\n }\n break;\n }\n }\n};\n","import { useEffect, useState, useMemo } from 'react';\n\nimport { useBuildVars, useSiteConfig, useInX4AFrame } from 'mf_core/config';\nimport {\n useIsAuthenticated,\n useIsImpersonationMode,\n useDecodedToken,\n} from 'mf_core/auth';\nimport { useLocalizationContext } from '@im/react-localization';\n\nconst scriptSrcModifierMap = {\n development: 'test/',\n production: '',\n productionbeta: '',\n productionbetax: 'betax/',\n staging: 'test/',\n staging2: 'test/',\n stagingx: 'test/',\n test: 'test/',\n};\n\nexport function useWalkMe(isFirstLogin: boolean) {\n const isAuthenticated = useIsAuthenticated();\n const { buildEnvironment } = useBuildVars();\n const { defaultLocale } = useSiteConfig();\n const { locale } = useLocalizationContext();\n const isImpersonationMode = useIsImpersonationMode();\n const { isInX4AFrame } = useInX4AFrame();\n\n const [isWalkMeUserActive, setIsWalkMeUserActive] = useState(false);\n const [walkMeInitialization, setWalkMeInitialization] = useState(false);\n const isWalkMeLoaded = window._walkmeInternals;\n const walkMeAPI = window.WalkMeAPI;\n\n const decodedToken = useDecodedToken();\n\n const tokenData = useMemo(() => {\n const firstName: string = decodedToken?.imoProfile?.firstName || '';\n const lastName: string = decodedToken?.imoProfile?.lastName || '';\n return {\n email: decodedToken?.imoProfile?.emailAddress || '',\n language: defaultLocale,\n name: `${firstName}${\n firstName && lastName ? ` ${lastName}` : `${lastName}`\n }`,\n resellerId: decodedToken?.resellerId || '',\n userRoles: decodedToken?.role,\n uuid: decodedToken?.imoProfile?.userId,\n };\n }, [decodedToken, defaultLocale]);\n\n const srcModifier = scriptSrcModifierMap[buildEnvironment] || '';\n\n useEffect(() => {\n if (isAuthenticated && tokenData && !isImpersonationMode && !isInX4AFrame) {\n if (!window.user) {\n //Initialize WalkMe globals\n window.user = {\n ...tokenData,\n uuid: window.btoa(tokenData.uuid),\n };\n\n setIsWalkMeUserActive(true);\n }\n }\n }, [\n defaultLocale,\n isAuthenticated,\n isImpersonationMode,\n isInX4AFrame,\n tokenData,\n ]);\n\n useEffect(() => {\n // Inject WalkMe Script in HTML Head\n if (\n !isFirstLogin &&\n !isImpersonationMode &&\n !isInX4AFrame &&\n buildEnvironment &&\n isAuthenticated &&\n isWalkMeUserActive\n ) {\n const walkMe = document.createElement('script');\n walkMe.type = 'text/javascript';\n walkMe.async = true;\n walkMe.src = `https://cdn.walkme.com/users/de4fe94aae764ca490170912028ce58b/${srcModifier}walkme_de4fe94aae764ca490170912028ce58b_https.js`;\n const s = document.getElementsByTagName('script')[0];\n if (s && s.parentNode) {\n s.parentNode.insertBefore(walkMe, s);\n window._walkmeConfig = { smartLoad: true };\n }\n }\n }, [\n buildEnvironment,\n isAuthenticated,\n isFirstLogin,\n isImpersonationMode,\n isInX4AFrame,\n isWalkMeUserActive,\n srcModifier,\n ]);\n\n useEffect(() => {\n if (\n isWalkMeLoaded &&\n walkMeAPI &&\n !walkMeInitialization &&\n walkMeAPI.getCurrentLanguage() !== locale\n ) {\n //Correct WalkMe language after player loads\n const delayInit = setTimeout(() => {\n walkMeAPI.changeLanguage(locale);\n }, 1000);\n return () => {\n clearTimeout(delayInit);\n setWalkMeInitialization(true);\n };\n }\n }, [walkMeInitialization, isWalkMeLoaded, locale, walkMeAPI]);\n\n useEffect(() => {\n if (isWalkMeUserActive && locale && walkMeAPI) {\n //Update global language variable when locale changes\n if (window.user.language !== locale) window.user.language = locale;\n\n // Use WalkMe JS API to push correct language content on locale change.\n // The default language is English, represented by an empty string.\n // All other languages use a lang-country locale shortname, e.g. 'de-DE'.\n // For available languages use WalkMeAPI.getAllLanguages().\n // More info: https://developer.walkme.com/reference/multilanguage-support\n if (locale.split('-')[0] === 'en') {\n walkMeAPI.changeLanguage('');\n } else {\n walkMeAPI.changeLanguage(locale);\n }\n }\n }, [isWalkMeUserActive, locale, walkMeAPI]);\n\n useEffect(() => {\n // Hide the WalkMe player on welcome video page\n const walkMe = document.getElementById('walkme-player');\n if (walkMe) {\n if (isFirstLogin && walkMe) {\n walkMe.style.display = 'none';\n } else {\n walkMe.style.display = 'block';\n }\n }\n }, [isFirstLogin]);\n}\n","import { useMemo } from 'react';\nimport { useApiQuery } from 'mf_core/query';\n\nexport function useUserActivity(enabled = false) {\n const query = useApiQuery<UserActivityResponseTO>(\n '/cms.webapi.digitalmarketing/cms/v1/user-info/getuseractivity',\n undefined,\n {\n enabled,\n refetchOnWindowFocus: false,\n }\n );\n return useMemo(() => {\n if (query.data) {\n const userActivityObject = {} as UserActivityCompatibleTO;\n Object.keys(DEFAULT_TEMPLATE).forEach((propertyName) => {\n const key = propertyName as keyof UserActivityTO;\n userActivityObject[key] = query.data[key] ?? DEFAULT_TEMPLATE[key];\n });\n return userActivityObject as UserActivityTO;\n }\n return DEFAULT_TEMPLATE;\n }, [query.data]);\n}\n\nexport type UserActivityTO = {\n hasPlacedOrderCount: number;\n orderTrackingPageVisits: number;\n quotesCreatedCount: number;\n returnsPlacedUserCount: number;\n subscriptionPageVisits: number;\n};\n\ntype UserActivityResponseTO = UserActivityTO & {\n loginCount: number;\n resellerId: string;\n};\ntype UserActivityCompatibleTO = Record<keyof UserActivityTO, number>;\n\n/** To ensure that UserActivity object does not pass unexpected properties */\nconst DEFAULT_TEMPLATE: UserActivityTO = {\n hasPlacedOrderCount: 0,\n orderTrackingPageVisits: 0,\n quotesCreatedCount: 0,\n returnsPlacedUserCount: 0,\n subscriptionPageVisits: 0,\n};\n","import { useEffect, useMemo, useState } from 'react';\n\nimport { useBuildVars, useInX4AFrame, useSiteConfig } from 'mf_core/config';\nimport {\n useIsAuthenticated,\n useIsImpersonationMode,\n useDecodedToken,\n} from 'mf_core/auth';\nimport { useLocalizationContext } from '@im/react-localization';\nimport { useFeatureFlagBase } from '../../hooks/use-feature-flag-base';\nimport { UserActivityTO, useUserActivity } from '../../hooks/useUserActivity';\n\nconst programKeyMap = {\n //dev: 'Jg4m6T',\n dev: 'QDWhcm',\n prod: 'LOpVXz',\n};\n\nexport function useForstaFeedback() {\n const decodedToken = useDecodedToken();\n const isAuthenticated = useIsAuthenticated();\n const isImpersonationMode = useIsImpersonationMode();\n const { buildEnvironment } = useBuildVars();\n const { defaultLocale, siteCode } = useSiteConfig();\n const { isInX4AFrame } = useInX4AFrame();\n const { locale } = useLocalizationContext();\n\n const env = buildEnvironment === 'production' ? 'prod' : 'dev';\n\n const programKey = programKeyMap[env];\n const id = `cf-program-${programKey}`;\n const src = `https://digitalfeedback.us.confirmit.com/api/digitalfeedback/loader?programKey=${programKey}`;\n\n const { boValues: value, isReady } = useFeatureFlagBase();\n const isWhitelistedReseller =\n isReady && value['FORSTA_Feedback_Form_WhitelistedResellers'] === 'true';\n\n const forstaEnabled =\n isAuthenticated &&\n !isImpersonationMode &&\n !isInX4AFrame &&\n isWhitelistedReseller;\n\n const [isScriptInjected, setIsScriptInjected] = useState(false);\n\n const userActivityData = useUserActivity(forstaEnabled);\n\n useEffect(() => {\n // Inject Forsta Feedback Program Script in HTML Head\n if (forstaEnabled && !isScriptInjected) {\n const forstaScriptEl = document.createElement('script');\n forstaScriptEl.id = id;\n forstaScriptEl.type = 'text/javascript';\n forstaScriptEl.async = true;\n forstaScriptEl.src = src;\n document.head.appendChild(forstaScriptEl);\n setIsScriptInjected(true);\n }\n }, [forstaEnabled, id, isScriptInjected, src]);\n\n const [forstaUserCreated, setForstaUserCreated] = useState(false);\n const tokenData = useMemo(() => {\n return {\n country: siteCode,\n email: decodedToken?.imoProfile?.emailAddress || '',\n language: defaultLocale,\n resellerId: decodedToken?.resellerId || '',\n };\n }, [\n decodedToken?.imoProfile?.emailAddress,\n decodedToken?.resellerId,\n defaultLocale,\n siteCode,\n ]);\n\n useEffect(() => {\n if (forstaEnabled) {\n if (!window.forsta_user) {\n //Initialize Forsta globals\n window.forsta_user = {\n ...tokenData,\n ...userActivityData,\n };\n setForstaUserCreated(true);\n } else if (userActivityData) {\n //Update Forsta globals\n Object.assign(window.forsta_user, userActivityData);\n }\n }\n }, [forstaEnabled, tokenData, userActivityData]);\n\n useEffect(() => {\n //Update global language variable when locale changes\n if (forstaUserCreated && window.forsta_user.language !== locale)\n window.forsta_user.language = locale;\n }, [forstaUserCreated, locale]);\n}\n\ndeclare global {\n interface Window {\n forsta_user: {\n country: string;\n email: string;\n language: string;\n resellerId: string;\n } & UserActivityTO;\n }\n}\n","import { useEffect } from 'react';\n\nimport { useFeatureFlagBase } from '../../hooks/use-feature-flag-base';\n\nconst win = window as any;\n\nconst WALKME_SURVEY_ID = 91918;\nconst OPEN_WALKME_FORM = () => {\n win.WalkMeAPI?.startSurveyById(WALKME_SURVEY_ID);\n};\nconst OPEN_FORSTA_FORM = () => {\n win?.doConfirmitFeedbackSurvey();\n};\n\ndeclare global {\n interface Window {\n openFeedbackForm: () => void;\n }\n}\n\n/**\n * This hook is used to determine which feedback form to render when user clicks \"Give Feedback\"\n * in the sidebar help menu. If the user is a whitelisted for Forsta, the Forsta feedback form\n * will be displayed. Otherwise, the WalkMe form will be displayed.\n */\nexport function useFeedbackFormRouter() {\n const { boValues: value, isReady } = useFeatureFlagBase();\n const shouldShowForstaInsteadOfWalkmeFeedback =\n isReady && value['FORSTA_Feedback_Form_WhitelistedResellers'] === 'true';\n\n useEffect(() => {\n window.openFeedbackForm = shouldShowForstaInsteadOfWalkmeFeedback\n ? OPEN_FORSTA_FORM\n : OPEN_WALKME_FORM;\n }, [shouldShowForstaInsteadOfWalkmeFeedback]);\n}\n","/* eslint-disable import/max-dependencies */\nimport { useAdobeDtm } from './useAdobeDtm';\nimport { useDatadog } from './useDatadog';\nimport { useFullStory } from 'mf_core/config';\nimport { useHtmlLang } from './useHtmlLang';\nimport { useUjetChatBot } from './useUjetChatBot';\nimport { useUjetUniteChatBot } from './useUjetUniteChatBot';\nimport { useChatBotHelpMenu } from './useChatBotHelpMenu';\nimport { useWalkMe } from './useWalkMe';\nimport { useWhatfix } from './useWhatfix';\nimport { useCookieDisclaimer } from './useCookieDisclaimer';\nimport { useAddMetaTag } from './useAddMetaTag';\nimport { useForstaFeedback } from './useForstaFeedback';\nimport { useFeedbackFormRouter } from './useFeedbackFormRouter';\nimport { useFirebaseLoader } from './useFirebase';\n\ntype UseScriptInjectorsProps = {\n isFirstLogin: boolean;\n resellerProspect: boolean;\n};\n\nexport function useScriptInjectors({\n isFirstLogin,\n resellerProspect,\n}: UseScriptInjectorsProps) {\n useAddMetaTag();\n useAdobeDtm();\n useChatBotHelpMenu();\n useCookieDisclaimer({ resellerProspect });\n useDatadog();\n useFeedbackFormRouter();\n useForstaFeedback();\n useFullStory();\n useHtmlLang();\n useUjetChatBot();\n useUjetUniteChatBot();\n useWalkMe(isFirstLogin);\n useWhatfix(isFirstLogin);\n useFirebaseLoader();\n}\n","import { useSiteConfig } from 'mf_core/config';\nimport { useEffect, useRef } from 'react';\n\nexport function useAddMetaTag() {\n const { siteCode } = useSiteConfig();\n const isTagInjected = useRef(false);\n useEffect(() => {\n try {\n if (siteCode === 'us' && !isTagInjected.current) {\n const scriptEl = document.createElement('meta');\n scriptEl.name = 'google-site-verification';\n scriptEl.content = 'JQpoPwtLvuITXOrPPLlAyOLFC1TRoT8fLrLFCa0MIYQ';\n document.head.appendChild(scriptEl);\n isTagInjected.current = true;\n }\n } catch (e) {\n console.error(e);\n }\n }, [siteCode]);\n}\n","import { useEffect, useRef } from 'react';\nimport { injectScriptInHead } from './utils';\nimport { useLocalizationContext } from '@im/react-localization';\nimport { useReusableCookieDisclaimer } from '../../hooks/use-cookie-disclaimer';\nimport Cookies from 'js-cookie';\nimport { useIsOneTrustEnabled } from './useOneTrust';\n\ntype UseCookieDisclaimerTO = {\n resellerProspect: boolean;\n};\n\nexport function useCookieDisclaimer({\n resellerProspect,\n}: UseCookieDisclaimerTO) {\n const { locale } = useLocalizationContext();\n const oneTrustId = useIsOneTrustEnabled();\n const consentRequired =\n !resellerProspect &&\n !oneTrustId &&\n Cookies?.get('cookieconsent_dismissed') !== 'yes';\n const { data: disclaimerContent } = useReusableCookieDisclaimer(\n locale,\n consentRequired\n );\n const isScriptInjected = useRef(false);\n const scriptRef = useRef<HTMLScriptElement | undefined>();\n const win = window as any;\n\n useEffect(() => {\n if (\n disclaimerContent &&\n (disclaimerContent.reusableContents?.length ?? 0) > 0\n ) {\n if (!isScriptInjected.current) {\n injectScriptInHead(\n '/cep/app/static/scripts/CookieDisclaimer/cookie-bar.js'\n );\n }\n isScriptInjected.current = true;\n if (scriptRef.current) {\n try {\n document.head.removeChild(scriptRef.current);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n scriptRef.current = injectDisclaimerElement(\n disclaimerContent.reusableContents[0].content\n );\n }\n }, [disclaimerContent]);\n\n useEffect(() => {\n if (\n consentRequired &&\n win &&\n win.cookieconsent_options &&\n win.update_cookieconsent_options\n ) {\n win.update_cookieconsent_options(win.cookieconsent_options);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [scriptRef.current]);\n}\n\nexport function injectDisclaimerElement(html: string) {\n try {\n const content = html.replaceAll('[', \"'\").replaceAll(']', \"'\");\n const customEL = document.createElement('script');\n customEL.innerHTML = content;\n document.head.appendChild(customEL);\n return customEL;\n } catch (e) {\n return undefined;\n }\n}\n","import { useIsAuthenticated } from 'mf_core/auth';\nimport { useApiGet, useApiQuery } from 'mf_core/query';\nimport { useQuery } from '@tanstack/react-query';\n\nexport function useReusableCookieDisclaimerV2(locale: string) {\n return useApiQuery<ReusableContent>(\n `/cms/v1/reusable-contents?title=Cookie Disclaimer&locale=${locale}`\n );\n}\n\n//workaround for loggedout mode\nexport function useReusableCookieDisclaimer(\n locale: string,\n isEnabled: boolean\n) {\n const isAuthenticated = useIsAuthenticated();\n const apiGet = useApiGet<ReusableContent>();\n const route = `/${\n isAuthenticated ? 'cms' : 'cms-noauth'\n }/v1/reusable-contents?title=Cookie Disclaimer&locale=${locale}`;\n const enabled = isEnabled;\n\n return useQuery({\n enabled: enabled,\n queryFn: () => apiGet(route),\n queryKey: [route],\n });\n}\n\nexport function useReusableContents({\n resellerProspect,\n strTitle,\n}: ReusableContentTO) {\n const params: ReusableContentRequest = {\n title: strTitle,\n };\n return useApiQuery<ReusableContent>('/cms/v1/reusable-contents', params, {\n enabled: !resellerProspect,\n });\n}\n\nexport type ReusableContent = {\n reusableContents: Content[];\n total: number;\n};\nexport type Content = {\n content: string;\n documentModifiedWhen?: string;\n title: string;\n};\ntype ReusableContentRequest = {\n title: string;\n};\n\nexport type ReusableContentTO = {\n resellerProspect: boolean;\n strTitle: string;\n};\n","import { useEffect } from 'react';\nimport { useLocalizationContext } from '@im/react-localization';\n\nexport function useHtmlLang() {\n const { locale } = useLocalizationContext();\n\n useEffect(() => {\n document.documentElement.lang = getLanguageFromLocale(locale);\n }, [locale]);\n}\n\nfunction getLanguageFromLocale(locale: string) {\n return locale.split('-')[0];\n}\n","import { useEffect, useState, useMemo } from 'react';\n\nimport { useBuildVars, useSiteConfig, useInX4AFrame } from 'mf_core/config';\nimport {\n useIsAuthenticated,\n useIsImpersonationMode,\n useDecodedToken,\n} from 'mf_core/auth';\nimport { useFeatureFlag } from 'mf_core/feature-flag';\n\nexport function useWhatfix(isFirstLogin: boolean) {\n const isAuthenticated = useIsAuthenticated();\n const { buildEnvironment } = useBuildVars();\n const { defaultLocale, siteCode } = useSiteConfig();\n const isImpersonationMode = useIsImpersonationMode();\n const { isInX4AFrame } = useInX4AFrame();\n\n const [isWhatfixUserActive, setIsWhatfixUserActive] = useState(false);\n const decodedToken = useDecodedToken();\n const { value: isWhatfixEnabled } = useFeatureFlag(\n 'im-platformcore-whatfix-isenabled'\n );\n\n const tokenData = useMemo(() => {\n const firstName: string = decodedToken?.imoProfile?.firstName || '';\n const lastName: string = decodedToken?.imoProfile?.lastName || '';\n return {\n email: decodedToken?.imoProfile?.emailAddress || '',\n language: defaultLocale,\n name: `${firstName}${\n firstName && lastName ? ` ${lastName}` : `${lastName}`\n }`,\n resellerId: decodedToken?.resellerId || '',\n userRoles: decodedToken?.role,\n uuid: decodedToken?.imoProfile?.userId,\n };\n }, [decodedToken, defaultLocale]);\n\n useEffect(() => {\n if (isAuthenticated && tokenData && !isImpersonationMode && !isInX4AFrame) {\n if (!window.whatfixUser) {\n //Initialize whatfix globals\n window.whatfixUser = {\n ...tokenData,\n uuid: window.btoa(tokenData.uuid),\n };\n setIsWhatfixUserActive(true);\n }\n }\n }, [\n defaultLocale,\n isAuthenticated,\n isImpersonationMode,\n isInX4AFrame,\n tokenData,\n ]);\n\n useEffect(() => {\n // Inject whatfix Script in HTML Head\n\n if (!isFirstLogin && isWhatfixUserActive && isWhatfixEnabled === 'true') {\n const whatfix = document.createElement('script');\n whatfix.type = 'text/javascript';\n whatfix.async = true;\n whatfix.src = `https://cdn.whatfix.com/prod/00f72a09-c312-47b3-b2be-d0afe4a9c9a3/initiator/initiator.nocache.js`;\n const s = document.getElementsByTagName('script')[0];\n if (s?.parentNode) {\n s.parentNode.insertBefore(whatfix, s);\n }\n }\n }, [\n buildEnvironment,\n isAuthenticated,\n isFirstLogin,\n isImpersonationMode,\n isInX4AFrame,\n isWhatfixUserActive,\n siteCode,\n isWhatfixEnabled,\n ]);\n}\n\ndeclare global {\n interface Window {\n whatfixUser?: {\n email: string;\n language: string;\n name: string;\n resellerId: string;\n userRoles: string[];\n uuid: string;\n };\n }\n}\n","export const PROSPECT_RESELLER_ROUTES = [\n '/resellermanagement/public',\n '/resellermanagement',\n '/reselleronboarding/resellerdetails',\n '/reselleronboarding/resellerdetails-v2',\n '/reselleronboarding/dashboard',\n '/reselleronboarding/successpage',\n '/reselleronboarding/docusign-redirect',\n];\n\nexport const PROSPECT_RESELLER_PUBLIC_ROUTES = [\n '/reselleronboarding/landing',\n '/reselleronboarding/registration',\n];\n","import React from 'react';\nimport { Navigate, useSearchParams } from 'react-router-dom';\n\ntype Props = {\n children: JSX.Element;\n urlList: string[];\n};\n\nexport function WhiteList(props: Props) {\n const { children, urlList } = props;\n\n const [searchParams] = useSearchParams();\n\n const url = (searchParams.get('url') || '').toLocaleLowerCase();\n\n if (!url || !urlList.includes(url)) {\n return <Navigate to=\"/\" />;\n }\n\n return children;\n}\n","import React from 'react';\nimport { Navigate, useSearchParams } from 'react-router-dom';\n\ntype Props = {\n children: JSX.Element;\n urlList: string[];\n};\n\nexport function BlackList(props: Props) {\n const { children, urlList } = props;\n\n const [searchParams] = useSearchParams();\n\n const url = (searchParams.get('url') || '').toLocaleLowerCase();\n\n if (!url || urlList.includes(url)) {\n return <Navigate to=\"/terms-and-conditions\" />;\n }\n\n return children;\n}\n","/* eslint-disable sort-keys */\nimport React, { lazy } from 'react';\nimport { Navigate, Outlet, RouteObject } from 'react-router-dom';\n\nimport {\n LoginCallbackView,\n Login,\n LogoutView,\n ProfileView,\n RequireAuth,\n TermsAndConditions,\n WelcomeVideo,\n} from 'mf_core/auth';\n\nimport { WhiteList } from './WhiteList';\nimport { BlackList } from './BlackList';\n\nconst FrameView = lazy(\n () =>\n import(/* webpackChunkName: \"FrameView\" */ '../../views/frame/FrameView')\n);\n\nconst AppCounterView = lazy(\n () =>\n import(\n /* webpackChunkName: \"AppCounterView\" */ '../../views/test/AppCounterView'\n )\n);\nconst DebugInfoView = lazy(\n () =>\n import(\n /* webpackChunkName: \"DebugInfoView\" */ '../../views/test/DebugInfoView'\n )\n);\nconst IframeTestView = lazy(\n () =>\n import(\n /* webpackChunkName: \"IframeTestView\" */ '../../views/test/IframeTestView'\n )\n);\nconst NoHeaderView = lazy(\n () =>\n import(\n /* webpackChunkName: \"NoHeaderView\" */ '../../views/test/NoHeaderView'\n )\n);\nconst RemoteDialogTestView = lazy(\n () =>\n import(\n /* webpackChunkName: \"RemoteDialogTestView\" */ '../../views/test/RemoteDialogTestView'\n )\n);\nconst PostMsgTestView = lazy(\n () =>\n import(\n /* webpackChunkName: \"PostMsgTestView\" */ '../../views/test/PostMsgTestView'\n )\n);\nconst NoMatchView = lazy(\n () => import(/* webpackChunkName: \"NoMatchView\" */ '../../views/NoMatchView')\n);\nconst DevToolView = lazy(\n () =>\n import(\n /* webpackChunkName: \"DeveloperTools\" */ '../../views/DeveloperTools'\n )\n);\n\n/**\n * url search params whitelist for `/frame-public` route\n * Note: whitelist uses lowercase url param\n * the param is converted to lowercase before comparing\n * */\nconst publicUrlWhiteList = ['/site/password/forgot'];\nconst imonlineTermsAndConditionsUrl = ['/site/login/termsandconditions'];\n\nexport function buildAppRoutes(\n authRoutes: RouteObject[],\n publicRoutes: RouteObject[]\n): RouteObject[] {\n return [\n ...publicRoutes,\n {\n path: 'my',\n element: <RequireAuth children={<Outlet />} />,\n children: [\n ...authRoutes,\n {\n path: 'profile',\n element: <ProfileView />,\n },\n ],\n },\n {\n path: 'login',\n element: <Login />,\n },\n {\n path: 'login/callback',\n element: <LoginCallbackView />,\n },\n {\n path: 'logout',\n element: <LogoutView />,\n },\n {\n path: 'welcome-video',\n element: <RequireAuth children={<WelcomeVideo />} />,\n },\n {\n path: 'terms-and-conditions',\n element: <RequireAuth children={<TermsAndConditions />} />,\n },\n // Test Views\n {\n path: 'debug-info',\n element: <DebugInfoView />,\n },\n {\n path: 'iframe-test',\n element: <IframeTestView />,\n },\n {\n path: 'test-hh',\n element: <NoHeaderView />,\n },\n {\n path: 'state-test',\n element: <AppCounterView />,\n },\n {\n path: 'post-msg-test',\n element: <PostMsgTestView />,\n },\n {\n path: 'remote-dialog-test',\n element: <RemoteDialogTestView />,\n },\n // Other Views\n {\n path: 'frame',\n element: (\n <BlackList\n children={<RequireAuth children={<FrameView />} />}\n urlList={imonlineTermsAndConditionsUrl}\n />\n ),\n },\n {\n path: 'frame-public',\n element: (\n <WhiteList children={<FrameView />} urlList={publicUrlWhiteList} />\n ),\n },\n {\n path: 'index',\n element: <Navigate replace to=\"/home\" />,\n },\n {\n path: 'index.html',\n element: <Navigate replace to=\"/home\" />,\n },\n {\n path: '/home',\n element: <Navigate replace to=\"/home\" />,\n },\n {\n path: '/',\n element: <Navigate replace to=\"/home\" />,\n },\n {\n path: '*',\n element: <NoMatchView />,\n },\n {\n path: '/developer-tools',\n element: <DevToolView />,\n },\n ];\n}\n","import {\n useAutoSignIn,\n useDecodedToken,\n useHasPermission,\n useIsAuthenticated,\n useIsFeatureWhitelisted,\n useIsImpersonationMode,\n useOktaContext,\n useRefreshAccessToken,\n} from 'mf_core/auth';\nimport { useInX4AFrame, useSiteConfig } from 'mf_core/config';\nimport { RenderRemoteDialog } from 'mf_core/dialog';\nimport { useLogoutContext } from 'mf_core/logout';\nimport { ScopeProvider } from 'mf_core/provider';\n/* eslint-disable max-lines */\n/* eslint-disable import/max-dependencies */\nimport React, { Suspense, useEffect, useMemo, useState } from 'react';\nimport {\n RouteObject,\n useLocation,\n useNavigate,\n useRoutes,\n} from 'react-router-dom';\nimport { CenterLoader } from '@im/ui-lib/CenterLoader';\nimport { useIsDown, useIsResolution } from '@im/ui-lib/responsive';\nimport Box from '@mui/material/Box';\nimport { styled } from '@mui/material/styles';\nimport { IngramBecomeReseller } from '../common/IngramBecomeReseller';\nimport { usePartnerWithUs } from '../common/IngramBecomeReseller/usePartnerWithUs';\nimport { IngramFooter } from '../common/IngramFooter';\nimport { IngramFooterLite } from '../common/IngramFooter/IngramFooterLite';\nimport { IngramHeader } from '../common/IngramHeader/IngramHeader';\nimport IngramHelpMenu from '../common/IngramHelpMenu/IngramHelpMenu';\nimport { IngramMobile } from '../common/IngramMobile';\nimport { IngramSideNav } from '../common/IngramSideNav';\nimport { useFeatureFlagBase } from '../hooks/use-feature-flag-base';\n// import { useNotifications } from '../hooks/use-notifications';\nimport { usePreferredLanguageChange } from '../hooks/use-preferred-language';\nimport { useXScroll } from '../hooks/use-x-scroll';\nimport { useAreWidgetsConfigured } from '../hooks/useAreWidgetsConfigured';\nimport { useCMPCardRedirect } from '../hooks/useCMPCardRedirect';\nimport { useGetSearchSuggestions } from '../hooks/useGetSearchSuggestions';\nimport { useImpersonationHeaderProps } from '../hooks/useImpersonationHeaderProps';\nimport { useTnCRedirect } from '../hooks/useTnCRedirect';\nimport { AutoLoginImOnlineFrame } from './AutoLoginImOnlineFrame';\nimport { DebugAccessToken } from './DebugAccessToken';\nimport { DebugToolbar } from './DebugToolbar';\nimport { FramedPageTitle } from './FramedPageTitle';\nimport { InvalidAccessToken } from './InvalidAccessToken';\nimport { PerformanceErrorAlert } from './PerformanceErrorAlert';\nimport { useScriptInjectors } from './injectors/injectors';\nimport { useOneTrust } from './injectors/useOneTrust';\nimport {\n PROSPECT_RESELLER_PUBLIC_ROUTES,\n PROSPECT_RESELLER_ROUTES,\n} from './prospectResellerPaths';\nimport { useAppRoutes } from './routes/useAppRoutes';\nimport { useAvatarProps } from './useAvatarProps';\nimport { useProcessPostMsgs } from './useProcessPostMsgs';\n\nconst win = window as any;\nconst HEADER_HEIGHT = 52;\nconst LEFT_NAV_WIDTH = 64;\nconst HIDE_SEARCHBAR_PRODUCT_VENDORS_COUNTRIES: Array<string> = ['br'];\nwin.LAYOUT_SPECS = {\n HEADER_HEIGHT: HEADER_HEIGHT,\n LEFT_NAV_WIDTH: LEFT_NAV_WIDTH,\n};\n\nlet flagTest = false;\n\nexport function App() {\n const checkURL = localStorage.getItem('conurl') || '';\n if (!flagTest && checkURL === '') {\n localStorage.setItem('conurl', window.location.search);\n flagTest = true;\n }\n useOneTrust();\n const isAuthenticated = useIsAuthenticated();\n const areWidgetsConfigured = useAreWidgetsConfigured();\n\n const decodedToken = useDecodedToken();\n const isImpersonationMode = useIsImpersonationMode();\n const showDebugToolBar = false;\n const resellerProspect = decodedToken?.resellerProspect || false;\n const appRoutes = useAppRoutes();\n const { idpLogin, siteCode } = useSiteConfig();\n\n useProcessPostMsgs();\n useCMPCardRedirect();\n useTnCRedirect({ isAuthenticated, isImpersonationMode, resellerProspect });\n usePreferredLanguageChange(isAuthenticated);\n\n const hasPermission = useHasPermission();\n const logoutContext = useLogoutContext();\n const [isLogoutEnabled, setIsLogoutEnabled] = useState(false);\n const [isTokenRefreshed, setTokenRefreshed] = useState(false);\n const [loaderText, setLoadingText] = useState('Common.LoaderText');\n\n useEffect(() => {\n if (logoutContext) {\n setIsLogoutEnabled(\n !logoutContext.isLoading && !!logoutContext.data?.isLogoutEnabled\n );\n }\n }, [logoutContext]);\n const [drawerOpen, setDrawerOpen] = useState(false);\n const isTempDrawer = useIsDown('lg', true);\n useEffect(() => {\n setDrawerOpen(false);\n }, [isTempDrawer]);\n const navigate = useNavigate();\n const { pathname, search } = useLocation();\n const isLogin = pathname === '/login' || pathname === '/campaign/login';\n const isForgotPassword = pathname === '/account/forgotpassword';\n const isResellerRegistration =\n pathname.toLocaleLowerCase() === '/reselleronboarding/registration';\n const isResellerDetailsV2 =\n pathname.toLocaleLowerCase() === '/reselleronboarding/resellerdetails-v2';\n const isDocusignRedirectIframe =\n pathname.toLocaleLowerCase() === '/reselleronboarding/docusign-redirect';\n const isNotAppstorePath = !pathname.includes('integrationshub');\n const isFrame = pathname === '/frame';\n const isPublicFrame = pathname === '/frame-public';\n const isCart = pathname === '/my/cart';\n const isCheckout =\n pathname.startsWith('/my/checkout') ||\n pathname === '/my/vendorRequestedInformation';\n const isQuoteItems = pathname === '/my/quotemgmt/quoteitems';\n const isDashboard = pathname === '/my/dashboard';\n const isInsightsV2 = pathname === '/insight/insights-v2';\n const isOrderConfirmation = pathname === '/my/orderConfirmation';\n const isCustomizationView = pathname === '/my/dashboardcustomization';\n const isPayment = /my\\/payment\\/.*-hh/.test(pathname);\n const isPaymentVerification = pathname.includes(\n '/my/checkout/verification-hh'\n );\n const isResellerProspectPublicRoute =\n PROSPECT_RESELLER_PUBLIC_ROUTES.includes(pathname?.toLowerCase());\n const showCartIconOnHeader =\n isAuthenticated && hasPermission(['CreateBaskets']);\n const { boValues, isReady } = useFeatureFlagBase();\n const enableAISuggestions = isReady\n ? boValues['Enable_AISuggestions'] === 'true'\n : false;\n const isCMPProductExcludedReseller = isReady\n ? boValues['CMP_Products_ExcludedResellers'] === 'true'\n : false;\n const useUrlEncoding = isReady\n ? boValues['X4C_Url_Encoding_Feature'] === 'true'\n : false;\n\n useEffect(() => {\n if (\n resellerProspect &&\n !PROSPECT_RESELLER_ROUTES.includes(pathname?.toLowerCase()) &&\n pathname !== '/logout'\n ) {\n navigate('/reselleronboarding/resellerdetails');\n }\n }, [pathname, resellerProspect, navigate]);\n\n useEffect(() => {\n localStorage.setItem('useUrlEncoding', useUrlEncoding ? 'true' : 'false');\n }, [useUrlEncoding]);\n\n const isMobile = useIsResolution({ max: 768 });\n const [isFirstLogin, setIsFirstLogin] = useState(true);\n const [isCreateDefaultBasket, setIsCreateDefaultBasket] = useState(false);\n\n useEffect(() => {\n setIsFirstLogin(\n pathname === '/welcome-video' || pathname === '/terms-and-conditions'\n );\n }, [pathname]);\n\n useEffect(() => {\n if (isAuthenticated && !isCreateDefaultBasket && !resellerProspect) {\n setIsCreateDefaultBasket(true);\n }\n }, [isAuthenticated, isCreateDefaultBasket, resellerProspect]);\n\n useScriptInjectors({ isFirstLogin, resellerProspect });\n\n const { isInX4AFrame, xvFrameConfig } = useInX4AFrame();\n\n const hideSideNav =\n (!isAuthenticated && !isLogoutEnabled) ||\n isLogin ||\n isForgotPassword ||\n isFirstLogin ||\n isOrderConfirmation ||\n isPaymentVerification ||\n isPayment ||\n (isCustomizationView && !areWidgetsConfigured) ||\n (isImpersonationMode && !isInX4AFrame) || //CTO app\n (isInX4AFrame && xvFrameConfig.hideSideNav) || //framed into X4A\n Boolean(resellerProspect) ||\n isResellerProspectPublicRoute ||\n isDocusignRedirectIframe;\n\n const hideHeader = Boolean(\n pathname\n .split('/')\n .find(\n (segment) =>\n segment.endsWith('-hh') ||\n segment.toLowerCase() === 'login' ||\n segment.toLowerCase() === 'forgotpassword'\n ) ||\n isFirstLogin ||\n xvFrameConfig.hideHeader ||\n isResellerRegistration ||\n isDocusignRedirectIframe\n );\n\n const hideFooter =\n isLogin ||\n isCheckout ||\n isFirstLogin ||\n isPayment ||\n isPaymentVerification ||\n isPublicFrame ||\n isResellerDetailsV2 ||\n isDocusignRedirectIframe ||\n (isImpersonationMode && xvFrameConfig.hideSideNav);\n\n const isFeatureWhitelisted = useIsFeatureWhitelisted();\n const isCmpWhitelisted = isFeatureWhitelisted('CMP');\n\n const getSearchSuggestions = useGetSearchSuggestions(\n isCmpWhitelisted,\n enableAISuggestions,\n isMobile,\n isCMPProductExcludedReseller\n );\n\n const avatarProps = useAvatarProps();\n const headerHeight = useMemo(() => {\n let headerHeight = HEADER_HEIGHT;\n if (hideHeader) headerHeight = 0;\n else if (showDebugToolBar) headerHeight = HEADER_HEIGHT + 40;\n win.LAYOUT_SPECS.HEADER_HEIGHT = headerHeight;\n return headerHeight;\n }, [hideHeader, showDebugToolBar]);\n\n const leftNavWidth = useMemo(() => {\n let leftNavWidth = LEFT_NAV_WIDTH;\n if (hideSideNav || isTempDrawer) leftNavWidth = 0;\n win.LAYOUT_SPECS.LEFT_NAV_WIDTH = leftNavWidth;\n return leftNavWidth;\n }, [hideSideNav, isTempDrawer]);\n\n type UserActionType = 'favorite' | 'notification' | 'cart';\n\n const onUserActionClick = (action: UserActionType) => {\n switch (action) {\n case 'favorite':\n navigate('product/favoriteproducts');\n break;\n case 'cart':\n navigate('my/cart');\n }\n };\n\n useEffect(() => {\n if (!isDashboard || !isCmpWhitelisted) return;\n setLoadingText('Common.LoaderText');\n const loaderTextTimeout = setTimeout(function () {\n setLoadingText('HomePage.LoaderText');\n }, 5000);\n return () => {\n clearTimeout(loaderTextTimeout);\n };\n }, [isCmpWhitelisted, isDashboard]);\n\n const centerLoaderText =\n isAuthenticated && isDashboard ? loaderText : undefined;\n\n const disableHeader = isCustomizationView && !areWidgetsConfigured;\n\n // Refresh access token if a user is already logged in (needed for impersonation mode)\n // Try to auto-login if a user is not logged in\n const { authState } = useOktaContext();\n const refreshAccessToken = useRefreshAccessToken();\n const autoSignIn = useAutoSignIn();\n\n useEffect(() => {\n if (authState && !isTokenRefreshed) {\n setTokenRefreshed(true);\n if (authState.isAuthenticated && !pathname.includes('/login/callback')) {\n refreshAccessToken();\n } else if (\n !idpLogin &&\n !pathname.includes('/login') &&\n !pathname.includes('/login/callback') &&\n !pathname.includes('/productsearch') &&\n !pathname.includes('/productdetails')\n ) {\n autoSignIn();\n }\n }\n }, [\n authState,\n idpLogin,\n isTokenRefreshed,\n refreshAccessToken,\n autoSignIn,\n pathname,\n ]);\n\n const impersonationHeaderProps = useImpersonationHeaderProps();\n\n const hideSearchBarProductVendorNav =\n HIDE_SEARCHBAR_PRODUCT_VENDORS_COUNTRIES.includes(siteCode) &&\n !isAuthenticated;\n\n const enableSearchOnQuote = isReady\n ? boValues['QM_EnableSearch_BO'] === 'true'\n : false;\n const hideSearchBar =\n hideSearchBarProductVendorNav ||\n isCheckout ||\n isFirstLogin ||\n isImpersonationMode ||\n (isQuoteItems && isReady && enableSearchOnQuote);\n\n const enableXScroll = useXScroll();\n\n // const { isNotificationEnabled, notificationDropProps } = useNotifications(\n // !isCheckout && !isImpersonationMode\n // );\n const partnerWithUsData = usePartnerWithUs(!isAuthenticated);\n\n const trimAvatorPropsForResellerProspect = (avatarData: any) => {\n const { navItems, ...rest } = avatarData;\n return { ...rest, resellerProspect: true };\n };\n\n if (!appRoutes) {\n return <CenterLoader loaderText={centerLoaderText} />;\n }\n\n if (\n isMobile &&\n (isAuthenticated ||\n pathname === '/login' ||\n pathname === '/product/productdetails')\n ) {\n return <IngramMobile />;\n }\n\n return (\n <>\n <DebugAccessToken />\n <Box height=\"100vh\" position=\"relative\" role=\"main\" width=\"100vw\">\n {!hideHeader && (\n <div\n data-testid=\"HeaderSection\"\n style={\n disableHeader\n ? { opacity: '.6', pointerEvents: 'none' }\n : undefined\n }\n >\n {showDebugToolBar && <DebugToolbar />}\n <IngramHeader\n AvatarProps={\n resellerProspect\n ? trimAvatorPropsForResellerProspect(avatarProps)\n : avatarProps\n }\n enableAISuggestions={enableAISuggestions}\n getSearchSuggestions={getSearchSuggestions}\n impersonationHeaderProps={impersonationHeaderProps}\n isAuthenticated={Boolean(\n (authState !== null\n ? authState.isAuthenticated\n : isAuthenticated) && !isFirstLogin\n )}\n isCmpWhitelisted={isCmpWhitelisted}\n isLogoClickable={!isImpersonationMode}\n isMobile={isMobile}\n // isNotificationEnabled={isNotificationEnabled}\n // notificationDropProps={notificationDropProps}\n onMenuButtonClick={() => setDrawerOpen(!drawerOpen)}\n onUserActionClick={onUserActionClick}\n showAvatar={!isCheckout && !isImpersonationMode}\n showCartIcon={\n showCartIconOnHeader &&\n !isFirstLogin &&\n !isCheckout &&\n !isImpersonationMode\n }\n showCulturePicker={!isCheckout}\n showFavoritesIcon={\n !isCheckout && !isImpersonationMode && !resellerProspect\n }\n showImpersonationHeader={isImpersonationMode}\n showSeachBar={\n !hideSearchBar &&\n !resellerProspect &&\n !isResellerProspectPublicRoute &&\n isNotAppstorePath\n }\n />\n </div>\n )}\n <Box\n sx={{\n bottom: 0,\n left: isTempDrawer || hideSideNav ? 0 : leftNavWidth,\n position: 'absolute',\n right: 0,\n top: headerHeight,\n }}\n >\n <ScopeProvider scope={pathname}>\n {isFrame ? (\n <Suspense fallback={<CenterLoader />}>\n <FramedPageTitle url={search} />\n <RenderContent appRoutes={appRoutes} />\n </Suspense>\n ) : (\n <Box\n id=\"main-view\"\n sx={{\n backgroundColor:\n (isCmpWhitelisted && isDashboard) || isInsightsV2\n ? '#F6F7FB'\n : 'transparent',\n height: '100%',\n overflowX: enableXScroll ? 'auto' : 'hidden',\n overflowY: 'auto',\n width: '100%',\n }}\n >\n <PerformanceErrorAlert />\n <Box\n sx={{\n minWidth: enableXScroll ? '1024px' : 'unset',\n }}\n >\n <Root>\n <ScopeProvider scope={pathname}>\n <Suspense\n fallback={\n <CenterLoader loaderText={centerLoaderText} />\n }\n >\n <RenderContent appRoutes={appRoutes} />\n </Suspense>\n </ScopeProvider>\n </Root>\n {(!hideFooter &&\n (isCart ? (\n <IngramFooterLite />\n ) : (\n <IngramFooter\n footerAction={partnerWithUsData}\n isAuthenticated={isAuthenticated}\n isMobile={isMobile}\n />\n ))) ||\n null}\n </Box>\n </Box>\n )}\n <InvalidAccessToken />\n </ScopeProvider>\n </Box>\n {isReady && boValues['ACC_MGMT_EnableX4CReactUI'] ? (\n <></>\n ) : (\n <AutoLoginImOnlineFrame />\n )}\n {/* <AutoLoginImOnlineFrame /> */}\n <RenderRemoteDialog />\n\n {/* Drawer at the end so its menus are above the View */}\n {!hideSideNav && (\n <IngramSideNav\n drawerOpen={drawerOpen}\n headerHeight={headerHeight}\n hoverRequired={true}\n isAuthenticated={isAuthenticated}\n isCheckout={isCheckout}\n isMobile={isMobile}\n isTempDrawer={isTempDrawer}\n setDrawerOpen={setDrawerOpen}\n />\n )}\n {isMobile && !isAuthenticated\n ? null\n : !hideSideNav && !resellerProspect && <IngramHelpMenu />}\n {isLogoutEnabled && <IngramBecomeReseller data={partnerWithUsData} />}\n </Box>\n </>\n );\n}\n\nfunction RenderContent({ appRoutes }: { appRoutes: RouteObject[] }) {\n const content = useRoutes(appRoutes);\n return content;\n}\n\nconst Root = styled('div')(() => ({\n margin: 'auto',\n maxWidth: '1920px',\n minHeight: `calc(100vh - ${win.LAYOUT_SPECS.HEADER_HEIGHT}px)`,\n}));\n\ndeclare global {\n interface Window {\n OOo: any;\n }\n}\n","import { useEffect, useState } from 'react';\nimport { useGetWidgetConfig } from 'mf_shared/widget';\n\nexport function useAreWidgetsConfigured() {\n const [areWidgetsConfigured, setAreWidgetsConfigured] = useState(false);\n\n const { data } = useGetWidgetConfig();\n\n useEffect(() => {\n const selectedWidgets = data?.widgets.filter(\n (item: any) => item.isSelected\n );\n const hasWidgets = selectedWidgets ? selectedWidgets.length > 0 : false;\n\n setAreWidgetsConfigured(hasWidgets);\n }, [data?.widgets]);\n\n return areWidgetsConfigured;\n}\n","import { useMemo } from 'react';\nimport { RouteObject } from 'react-router-dom';\n\nimport { useMfsRoutes } from './useMfsRoutes';\nimport { buildAppRoutes } from './buildAppRoutes';\n\nexport function useAppRoutes() {\n const mfsRoutes = useMfsRoutes();\n\n return useMemo(() => {\n if (!mfsRoutes) {\n return;\n }\n\n const authRoutes = [] as RouteObject[];\n const publicRoutes = [] as RouteObject[];\n\n mfsRoutes.forEach(\n (route) => {\n if (route.path && route.path.startsWith('my/')) {\n const clonedRoute: RouteObject = {\n ...route,\n path: route.path.substring('my/'.length),\n };\n authRoutes.push(clonedRoute);\n } else {\n publicRoutes.push(route);\n }\n },\n [mfsRoutes]\n );\n\n return buildAppRoutes(authRoutes, publicRoutes);\n }, [mfsRoutes]);\n}\n","import { useEffect, useState } from 'react';\nimport { RouteObject } from 'react-router-dom';\nimport { getMfsRoutes } from 'mf_core/routing';\n\nimport { mfNames } from '../mfNames';\n\nexport function useMfsRoutes() {\n const [routes, setRoutes] = useState<RouteObject[] | undefined>();\n\n useEffect(() => {\n let active = true;\n (async () => {\n const result = await getMfsRoutes(mfNames);\n if (active) {\n setRoutes(result);\n }\n })();\n return () => {\n active = false;\n };\n }, []);\n\n return routes;\n}\n","/* istanbul ignore file */\nimport { useCallback, useEffect } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { useOpenDialog } from 'mf_core/dialog';\nimport {\n PostMsg,\n startListening,\n stopListening,\n respondToMsgWith,\n} from '@im/post-msg';\n\nexport function useProcessPostMsgs() {\n const openDialog = useOpenDialog();\n const navigate = useNavigate();\n\n const onMsgReceived = useCallback(\n (msg: PostMsg) => {\n switch (msg.action) {\n case 'navigate':\n navigate(msg.details as string);\n break;\n case 'navigateWithProps': {\n const details = msg.details as any;\n navigate(details.route as string, {\n state: { sentProps: details.props },\n });\n break;\n }\n // Naviagtion implemented for Renewals (SPLA) to Checkout\n case 'navigateFromSPLAtoCheckout': {\n const details = msg.details as any;\n navigate(details.route as string, {\n state: { ...details.props },\n });\n break;\n }\n case 'openDialog':\n {\n const { dialogId, dialogParams } = msg.details as any;\n\n let onClose = undefined;\n // If request and known source\n if (msg.msgType === 'ask' && msg.msgFrom) {\n onClose = (answer?: unknown) => {\n // console.log('respondTo', msg.msgId, answer);\n respondToMsgWith(msg, answer);\n };\n }\n\n openDialog(dialogId, dialogParams, onClose);\n }\n break;\n\n default:\n console.warn('[useProcessPostMsgs] unknown message:', msg);\n }\n },\n [navigate, openDialog]\n );\n\n useEffect(() => {\n startListening(onMsgReceived);\n return () => {\n stopListening();\n };\n }, [onMsgReceived]);\n}\n","import { useEffect } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport Cookies from 'js-cookie';\n\nimport { useProfileData } from './useProfileData';\nimport { useReusableContents } from './use-cookie-disclaimer';\nimport { useIsCepWhitelisted } from './useIsCepWhitelisted';\n\nexport function useTnCRedirect({\n isAuthenticated,\n isImpersonationMode,\n resellerProspect = false,\n}: {\n isAuthenticated: boolean;\n isImpersonationMode: boolean;\n resellerProspect: boolean;\n}) {\n const navigate = useNavigate();\n\n const isCepWhitelisted = useIsCepWhitelisted(resellerProspect);\n const profileData = useProfileData(resellerProspect);\n const termsData = useReusableContents({\n resellerProspect,\n strTitle: 'Terms and Conditions',\n });\n\n useEffect(() => {\n //Impersonation mode: TnC should be skipped\n if (isImpersonationMode) return;\n if (isAuthenticated) {\n if (!isCepWhitelisted) {\n Cookies.remove('IMOnline_CEP');\n window.location.href = `${window.location.origin}/site/login/idplogin`;\n } else if (\n !profileData.isFetching &&\n profileData.status === 'success' &&\n termsData.status === 'success' &&\n profileData.data\n ) {\n if (profileData.data.dateLastTermsConditionsAcceptance) {\n if (\n termsData.data.reusableContents.length > 0 &&\n termsData.data.reusableContents[0].documentModifiedWhen\n ) {\n const acceptanceDate = new Date(\n profileData.data.dateLastTermsConditionsAcceptance\n );\n const modifiedDate = new Date(\n termsData.data.reusableContents[0].documentModifiedWhen\n );\n if (acceptanceDate < modifiedDate) {\n navigate('/terms-and-conditions', {\n state: { isCepWhitelisted },\n });\n return;\n }\n }\n } else {\n navigate('/terms-and-conditions', {\n state: { isCepWhitelisted },\n });\n return;\n }\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n isAuthenticated,\n isCepWhitelisted,\n isImpersonationMode,\n profileData.status,\n termsData.status,\n navigate,\n ]);\n}\n","import { useApiQuery } from 'mf_core/query';\nimport { useIsAuthenticated } from 'mf_core/auth';\n\nexport function useIsCepWhitelisted(isProspectUser = false) {\n const isAuthenticated = useIsAuthenticated();\n const { data } = useApiQuery<boolean>(\n '/account-management/v1/widget-configurations/iscepwhitelisted',\n undefined,\n { enabled: isAuthenticated && !isProspectUser }\n );\n return data ?? true;\n}\n","import { useApiQuery } from 'mf_core/query';\n\nexport function useProfileData(resellerProspect = false) {\n return useApiQuery(`/account-management/v1/users/me`, undefined, {\n enabled: !resellerProspect,\n });\n}\n","import { useEffect, useRef } from 'react';\nimport { useLocalizationContext } from '@im/react-localization';\n\nimport { usePreferredLanguageMutation } from './usePreferredLanguage';\n\nexport const usePreferredLanguageChange = (isAuthenticated: boolean) => {\n const { locale } = useLocalizationContext();\n const initialLocaleLanguage = useRef(locale);\n const preferredLanguageMutation = usePreferredLanguageMutation(locale);\n\n useEffect(() => {\n if (locale !== initialLocaleLanguage.current && isAuthenticated) {\n preferredLanguageMutation.mutate();\n initialLocaleLanguage.current = locale;\n }\n }, [locale, preferredLanguageMutation, isAuthenticated]);\n};\n","import { useApiPatch } from 'mf_core/query';\nimport { useMutation } from '@tanstack/react-query';\n\nexport function usePreferredLanguageMutation(language: string) {\n const apiPatch = useApiPatch();\n const body = { language };\n\n return useMutation({\n mutationFn: () => {\n const data = apiPatch(\n `/account-management/v1/users/preferred-language`,\n body\n );\n\n return data;\n },\n });\n}\n","import { useApiGet } from 'mf_core/query';\nimport { useSiteConfig } from 'mf_core/config';\nimport { useTranslate } from '@im/react-localization';\n\nexport function useGetSearchSuggestions(\n isCmpWhitelisted: boolean,\n enableAISuggestions: boolean,\n isMobile: boolean,\n isCMPProductExcludedReseller: boolean\n) {\n const apiGet = useApiGet<SearchResponse[]>({ isLogoutApi: true });\n\n // eslint-disable-next-line no-nested-ternary\n let url = enableAISuggestions\n ? '/product/v1/aisuggestedcategoryoptions'\n : isCmpWhitelisted\n ? '/product/v1/suggestedcategoryoptions'\n : '/product/v1/suggestedcategories';\n\n if (isMobile) url = '/product/v1/suggestedcategories';\n\n const { siteCode } = useSiteConfig();\n const translate = useTranslate();\n return async (term: string) => {\n const result = await apiGet(url, {\n isCMPWhitelisted: isCmpWhitelisted,\n isCloudProductEnabled: !isCMPProductExcludedReseller,\n term,\n });\n const newResult = result\n ? result.map((element) => {\n if (\n element?.category &&\n siteCode &&\n siteCode.toLowerCase() === 'it'\n ) {\n const categoryTrans = translate(`CommonSearch.${element.category}`);\n return { ...element, category: categoryTrans };\n }\n return element;\n })\n : [];\n return newResult || [];\n };\n}\n\ntype Option = {\n isCloudSuggestion: boolean;\n source: string;\n suggestion: string;\n};\n\ntype SearchResponse = {\n category: string;\n suggestions: string[] | Option[];\n};\n","import { useEffect, useMemo, useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { NavItem } from '@im/ui-lib/nav';\nimport {\n useDecodedToken,\n useHasPermission,\n useIsFeatureWhitelisted,\n} from 'mf_core/auth';\nimport { framedRoute } from './nav/utils';\nimport { useBuildVars, useSiteConfig } from 'mf_core/config';\nimport {\n Configurator,\n useConfiguratorMenuQuery,\n} from '../hooks/use-configuratormenu';\nimport { useFeatureFlagBase } from '../hooks/use-feature-flag-base';\n\nexport function useAvatarProps() {\n const navigate = useNavigate();\n const { siteCode } = useSiteConfig();\n const decodedToken = useDecodedToken();\n const { buildEnvironment } = useBuildVars();\n const isFeatureWhitelisted = useIsFeatureWhitelisted();\n const isCmpWhitelisted = isFeatureWhitelisted('CMP');\n const { data: configuratorResponse } = useConfiguratorMenuQuery();\n const [configuratorMenus, setConfiguratorMenus] = useState<\n NavItem[] | undefined\n >(undefined);\n const [isNavigationRequired, setIsNavigationRequired] = useState();\n const hasPermission = useHasPermission();\n const { boValues, isReady } = useFeatureFlagBase();\n\n // used to enable legacy IMO Report Preferences\n const isReportPreferencesEnabled = useMemo(() => {\n const whitelist = boValues['Reseller_Whitelist_For_Order_Status_Tracking'];\n const resellerId = decodedToken?.resellerId;\n return (\n hasPermission(['ResellerAdmin']) &&\n isNavigationRequired === 'true' &&\n Boolean(isReady) &&\n boValues['ACC_MGMT_EPP_WhitelistedResellers'] !== 'true' &&\n boValues['Enable_Order_Status_Report'] === 'true' &&\n Boolean(\n whitelist?.trim() === '*' || whitelist?.split(',')?.includes(resellerId)\n )\n );\n }, [\n boValues,\n decodedToken?.resellerId,\n hasPermission,\n isNavigationRequired,\n isReady,\n ]);\n\n useEffect(() => {\n if (configuratorResponse && configuratorResponse.externalHost) {\n const menuItems: NavItem[] = [];\n configuratorResponse.externalHost.forEach((item: Configurator) => {\n if (item.openUrlInNewTab) {\n menuItems.push({\n key: item.name,\n label: item.name,\n url: item.url,\n });\n } else {\n menuItems.push({\n key: item.name,\n label: item.name,\n route: `/my/productconfigurator/cms?page=${item.nodeAliasPath}`,\n });\n }\n });\n setConfiguratorMenus(menuItems);\n }\n }, [configuratorResponse]);\n useEffect(() => {\n setIsNavigationRequired(boValues['ACC_MGMT_EnableX4CReactUI']);\n }, [boValues]);\n return useMemo(() => {\n return {\n firstName: decodedToken?.firstName || '',\n lastName: decodedToken?.lastName || '',\n navItems: [\n {\n key: 'myprofile.AccountSettings',\n route:\n isNavigationRequired === 'false' ||\n isNavigationRequired === undefined\n ? framedRoute('/Site/MyProfile')\n : '/my/account/accountsettings',\n },\n isReportPreferencesEnabled\n ? {\n key: 'myprofile.ReportPreferences',\n route: framedRoute('/Site/MyProfile/ReportPreferences'),\n }\n : null,\n isNavigationRequired === 'true' &&\n isReady &&\n boValues['ACC_MGMT_Enable_BrandingPreferences'] === 'true' &&\n hasPermission(['CreateQuotes'])\n ? {\n key: 'myprofile.BrandingPreferences',\n route: framedRoute('/Site/MyProfile/BrandingPreferences'),\n }\n : null,\n !isCmpWhitelisted\n ? {\n key: 'myprofile.CustomizeHomepage',\n route: '/my/dashboardcustomization',\n }\n : null,\n {\n key: 'myprofile.SavedCarts',\n route: '/my/savedcarts',\n },\n siteCode === 'fr'\n ? {\n key: 'myprofile.CarteBlue',\n route: '/my/payment/payline',\n }\n : null,\n configuratorMenus && configuratorMenus.length > 0\n ? {\n key: 'myprofile.Configurators',\n navItems: configuratorMenus,\n }\n : null,\n buildEnvironment.startsWith('staging') && {\n key: 'Developer tools',\n route: '/developer-tools',\n },\n // remove null entries from array\n ].filter(Boolean) as unknown as NavItem[],\n onLogoutClick: () => navigate('/logout'),\n resellerID: decodedToken?.resellerId,\n username: decodedToken?.imoProfile?.displayUserName,\n };\n }, [\n buildEnvironment,\n configuratorMenus,\n hasPermission,\n navigate,\n decodedToken,\n siteCode,\n isCmpWhitelisted,\n isNavigationRequired,\n boValues,\n isReady,\n isReportPreferencesEnabled,\n ]);\n}\n","import { useLocalizationContext } from '@im/react-localization';\nimport { useApiQuery } from 'mf_core/query';\n\nexport function useConfiguratorMenuQuery() {\n const { locale } = useLocalizationContext();\n return useApiQuery<ConfiguratorMenu>(\n `/cms/v1/external-host?HostType=Configurator&locale=${locale}`\n );\n}\nexport type ConfiguratorMenu = {\n externalHost: Configurator[];\n};\nexport type Configurator = {\n loggedInOnly: boolean;\n name: string;\n nodeAliasPath: string;\n openUrlInNewTab: boolean;\n sendLoginInformation: boolean;\n url: string;\n};\n","import { useApiPost } from 'mf_core/query';\nimport { useMutation } from '@tanstack/react-query';\n\nexport function useDisableImpersonationMode() {\n const apiPost = useApiPost<any>();\n\n return useMutation({\n mutationFn: () => {\n return apiPost('/impersonation/v2/x4c/disable', {});\n },\n onSuccess: () => {\n window.location.reload();\n },\n });\n}\n","import { useLocation } from 'react-router';\nimport { useIsResolution } from '@im/ui-lib/responsive';\nimport { useInX4AFrame } from 'mf_core/config';\n\nexport function useXScroll() {\n const isLowResolution = useIsResolution({ max: 1024 });\n const { isInIM360Frame } = useInX4AFrame();\n const { pathname } = useLocation();\n\n document.getElementById('loaderDiv')?.remove();\n\n const scrollablePages = [\n '/my/cart',\n '/my/checkout',\n '/my/checkout/new',\n '/my/ordertracking/v3/ordersearch',\n ];\n\n const enableXScroll =\n (isLowResolution || isInIM360Frame) && scrollablePages.includes(pathname);\n\n return enableXScroll;\n}\n","import { useLocalizationContext } from '@im/react-localization';\nimport { CopyRightTO } from '@im/ui-lib/types';\nimport { useApiQuery } from 'mf_core/query';\nimport { useCallback, useMemo } from 'react';\nimport { useNavigate } from 'react-router';\n\nexport function usePartnerWithUs(enabled: boolean) {\n const { locale } = useLocalizationContext();\n const navigate = useNavigate();\n const query = useApiQuery<GetCopyRightsResponseTO>(\n `/cms-noauth/v1/quick-links`,\n {\n type: 'PartnerWithUs',\n typelang: locale,\n },\n { enabled },\n undefined,\n { isLogoutApi: true }\n );\n const data = query.data?.items?.length ? query.data.items[0] : undefined;\n const onClick = useCallback(() => {\n if (data) {\n if (data.openUrlInNewTab) {\n window.open(data.url, '_blank');\n } else if (data.url?.startsWith('/cep/app/')) {\n navigate(data.url?.replace('/cep/app/', '/') ?? '/');\n } else {\n window.open(data.url, '_self');\n }\n }\n }, [data, navigate]);\n\n return useMemo(() => {\n return data\n ? ({\n onClick,\n openUrlInNewTab: data.openUrlInNewTab,\n title: data.title,\n trackingTag: data.trackingTag,\n url: data.url,\n } as CopyRightTO)\n : undefined;\n }, [data, onClick]);\n}\n\ntype GetCopyRightsResponseTO = {\n items: QuickLinkDataTO[];\n};\n\ntype QuickLinkDataTO = {\n isModel: boolean;\n onClick: string;\n openUrlInNewTab: boolean;\n title: string;\n trackingTag: string;\n url: string;\n};\n","import React, { useEffect } from 'react';\nimport { useLocation } from 'react-router';\n\nexport const ScrollToTop = (props: any) => {\n const location = useLocation();\n useEffect(() => {\n const excludedRoute = location.pathname.includes('/product/productsearch');\n if (!excludedRoute) {\n setTimeout(() => {\n document\n .querySelector('#main-view')\n ?.scrollTo({ behavior: 'smooth', top: 0 });\n }, 500);\n }\n }, [location.pathname]);\n\n return <>{props.children}</>;\n};\n","/* istanbul ignore file */\n// eslint-disable-next-line import/no-unassigned-import\nimport './data-dog-rum';\n\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport Cookies from 'js-cookie';\n\nimport { App } from './App';\nimport { AppProviders } from 'mf_core/provider';\n\n// eslint-disable-next-line import/no-unassigned-import\nimport type {} from '@im/im-theme/themeAugmentation';\n\nimport { ScrollToTop } from './ScrollToTop';\n\nCookies.set('IMOnline_CEP', 'true');\n\nconst container = document.getElementById('root') as HTMLElement;\nconst root = createRoot(container);\nroot.render(\n <AppProviders basename=\"/cep/app\" envVars={process.env}>\n <ScrollToTop />\n <App />\n </AppProviders>\n);\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\n// reportWebVitals();\n","/* eslint-disable no-nested-ternary */\nimport { NavItem } from '@im/ui-lib/mf-utils';\n\nexport function framedRoute(path: string) {\n return `/frame?url=${encodeURIComponent(path)}`;\n}\n\nexport function validateProperty(\n menuData: any,\n property: string,\n index: number\n): string {\n return menuData &&\n menuData.menuitems &&\n menuData.menuitems.length > 0 &&\n menuData.menuitems[index] &&\n menuData.menuitems[index][property]\n ? menuData.menuitems[index][property]\n : '';\n}\n\nexport function buildNavMenuItem(menuData: any, locale: string): NavItem[] {\n const navItems: NavItem[] = [];\n locale = locale?.toLowerCase();\n\n const count =\n menuData && menuData.total && menuData.total > 0 ? menuData.total : 0;\n\n if (menuData && count > 0) {\n for (let i = 0; i < count; i++) {\n const pageName = validateProperty(menuData, 'pageName', i);\n const pagePath = validateProperty(menuData, 'partialPageUrl', i);\n const subMenu = menuData.menuitems[i].subMenu;\n const route = `cms/${locale}/${pagePath}`;\n if (subMenu.length > 0) {\n const subItems = subMenu.map((menu: any) => {\n return {\n key: menu.pageName,\n label: menu.pageName,\n route: `cms/${locale}/${menu.partialPageUrl}`,\n };\n });\n navItems.push({\n key: pageName,\n label: pageName,\n navItems: subItems,\n route: pagePath && route,\n });\n } else if (pageName !== '') {\n navItems.push({\n key: pageName,\n label: pageName,\n route,\n });\n }\n }\n }\n return navItems;\n}\n\nexport function handleKenticoOnClick(fn: string) {\n return () => {\n try {\n // eslint-disable-next-line no-new-func\n new Function(fn)();\n } catch (e) {\n console.error(e);\n }\n };\n}\n\nexport function buildHelpMenuItem(menuData: any): NavItem[] {\n const navItems: NavItem[] = [];\n\n const hasData = menuData && menuData.length > 0;\n\n if (hasData) {\n for (const item of menuData) {\n const menuItem = {\n key: item.title,\n label: item.title,\n onClick: item.isModel ? handleKenticoOnClick(item.onClick) : undefined,\n route: item.openUrlInNewTab ? undefined : item.url,\n url: item.openUrlInNewTab ? item.url : undefined,\n } as NavItem;\n navItems.push(menuItem);\n }\n }\n return navItems;\n}\n\nexport const getCloudServicesLink = (env: string, country: string) => {\n if (country === 'gb') country = 'uk';\n return `https://cp.${country}${\n env === 'production'\n ? '.na'\n : env === 'productionbeta'\n ? '.prodbeta.na'\n : '.stg'\n }.cloud.im/?external_idp=IMOnline`;\n};\n\nexport enum CountryCode {\n CA = 'ca',\n DE = 'de',\n ES = 'es',\n FR = 'fr',\n GB = 'gb',\n IN = 'in',\n IT = 'it',\n MX = 'mx',\n UK = 'uk',\n US = 'us',\n}\n\nexport const applicationCenterAvailability = ({\n siteCode,\n}: {\n siteCode: string;\n}) => {\n const countryCodes = Object.values(CountryCode) as string[];\n return countryCodes.includes(siteCode);\n};\n","import React from 'react';\nimport { Footer } from '@im/ui-lib/Footer';\nimport { useLocalizationContext } from '@im/react-localization';\nimport { useFooterColumns } from './useFooterColumns';\nimport { useSocialMedias } from './useSocialMedias';\nimport { useCopyrightLinks } from './useCopyrightLinks';\nimport { FooterMobile } from '@im/ui-lib/Footer/FooterMobile';\nimport { CopyRightTO } from '@im/ui-lib/types';\n\ntype Props = {\n footerAction?: CopyRightTO;\n isAuthenticated: boolean;\n isMobile: boolean;\n};\n\nexport function IngramFooter(props: Props) {\n const { locale } = useLocalizationContext();\n const { footerAction, isAuthenticated, isMobile } = props;\n const { data } = useFooterColumns(locale);\n const socialMedias = useSocialMedias(locale);\n const copyRightLinks = useCopyrightLinks();\n\n const footerColumns: any = data?.footers;\n\n if (!copyRightLinks) return null;\n\n if (isMobile && !isAuthenticated) {\n return (\n <FooterMobile\n appStore={socialMedias?.appStore}\n copyRightLinks={copyRightLinks}\n footerAction={footerAction}\n footerColumns={footerColumns}\n socialMedias={socialMedias?.socialMedia}\n />\n );\n } else {\n return (\n <Footer\n appStore={socialMedias?.appStore}\n copyRightLinks={copyRightLinks}\n footerColumns={footerColumns}\n socialMedias={footerColumns ? socialMedias?.socialMedia : undefined}\n />\n );\n }\n}\n","import { useCMSApiQuery } from '../../hooks/useCMSApiQuery';\n\nexport function useFooterColumns(locale: string) {\n return useCMSApiQuery<GetFootersResponseTO>('/cms/v1/footers', {\n culture: locale,\n });\n}\n\ntype GetFootersResponseTO = {\n footers: FooterColumnTO;\n};\n\ntype FooterColumnTO = {\n footerColumn: {\n linkText: string | null;\n linkUrl: string | null;\n links: LinkTO[];\n name: string;\n openInNewWindow: boolean;\n };\n};\n\ntype LinkTO = {\n email: string;\n iconImage: string;\n iconValueType: string;\n linkText: string;\n linkType: string;\n linkUrl: string;\n mobile: string;\n name: string;\n openInNewWindow: boolean;\n};\n","import { useCMSApiQuery } from '../../hooks/useCMSApiQuery';\n\nexport function useSocialMedias(locale: string) {\n const query = useCMSApiQuery<GetSocialMediaResponseTO>(\n '/cms/v1/social-medias',\n {\n culture: locale,\n }\n );\n return query.data;\n}\n\ntype GetSocialMediaResponseTO = {\n appStore: SocialMediaTO[];\n socialMedia: SocialMediaTO[];\n};\n\ntype SocialMediaTO = {\n iconImage: string;\n name: string;\n url: string;\n};\n","import { useLocalizationContext } from '@im/react-localization';\nimport { CopyRightTO } from '@im/ui-lib/types';\nimport { handleKenticoOnClick } from '../../app/nav/utils';\nimport { useCMSApiQuery } from '../../hooks/useCMSApiQuery';\n\nexport function useCopyrightLinks() {\n const { locale } = useLocalizationContext();\n const query = useCMSApiQuery<GetCopyRightsResponseTO>(`/cms/v1/quick-links`, {\n type: 'FooterCopyright',\n typelang: locale, //param added to create dependency on locale\n });\n //Mapper for Copyright Data\n return query.data?.items?.map((x: CopyRightDataTO) => {\n return {\n onClick:\n x.isModel && x.onClick ? handleKenticoOnClick(x.onClick) : undefined,\n openUrlInNewTab: x.openUrlInNewTab,\n route:\n x.openUrlInNewTab === false && x.url.startsWith('/cep/app/')\n ? x.url?.replace('/cep/app/', '/')\n : undefined,\n title: x.title,\n trackingTag: x.trackingTag,\n url: x.url,\n } as CopyRightTO;\n });\n}\n\ntype GetCopyRightsResponseTO = {\n items: CopyRightDataTO[];\n};\n\ntype CopyRightDataTO = {\n isModel: boolean;\n onClick: string;\n openUrlInNewTab: boolean;\n title: string;\n trackingTag: string;\n url: string;\n};\n","import { useOktaContext } from 'mf_core/auth';\nimport { useLogoutContext } from 'mf_core/logout';\nimport { ExtraHeaders, ObjectMap, useApiQuery } from 'mf_core/query';\nimport { UseQueryOptions } from '@tanstack/react-query';\n\n/** Wrapper for CMS API queries to handle logout mode operations + UserLoggedIn data mandatory */\nexport function useCMSApiQuery<TO = ObjectMap>(\n route: string,\n params?: ObjectMap,\n useQueryOptions?: Partial<UseQueryOptions<TO>>,\n extraHeaders?: ExtraHeaders\n) {\n const oktaContext = useOktaContext();\n const isAuthenticated = Boolean(oktaContext?.authState?.isAuthenticated);\n const cmsData = useLogoutContext();\n route = isAuthenticated ? route : route.replace('/cms/v1', '/cms-noauth/v1');\n\n return useApiQuery<TO>(\n route,\n { ...params, UserLoggedIn: isAuthenticated },\n useQueryOptions,\n extraHeaders,\n {\n isLogoutApi: !isAuthenticated && !!cmsData?.data?.isLogoutEnabled,\n }\n );\n}\n"],"names":["isLocalDev","window","location","origin","indexOf","fullStoryUrlRegex","__DATADOG_INITIALIZED__","datadogRum","allowedTracingUrls","applicationId","beforeSend","event","context","type","resource","response","headers","responseHeaders","Object","fromEntries","xhr","test","responseURL","shouldDiscard","clientToken","defaultPrivacyLevel","excludedActivityUrls","service","sessionReplaySampleRate","sessionSampleRate","site","env","trackLongTasks","trackResources","trackSessionAcrossSubdomains","trackUserInteractions","usePartitionedCrossSiteSessionCookie","version","IngramBecomeReseller","props","data","ready","setReady","useState","isAuthenticated","useIsAuthenticated","useEffect","timer","setTimeout","clearTimeout","isMobile","useMediaQuery","React","onClick","StickyButton","link","IngramFooterLite","copyRightLinks","useCopyrightLinks","Footer","useFeatureFlagBase","isReady","refetch","value","boValues","useFeatureFlag","useFirebaseLoader","firebaseReady","setFirebaseReady","checkIfReady","firebase","apps","length","initializeApp","apiKey","appId","authDomain","messagingSenderId","projectId","storageBucket","messaging","firebaseMessaging","FCMEnabler","chat","fcmToken","latestChat","setChat","setFcmtoken","setHistoryChat","setFcmTokentoDb","apiPost","useApiPost","useMutation","mutationFn","body","undefined","useSetFcmToken","NotificationHistoryInfo","useApiQuery","subscriberIdData","buildEnvironment","useBuildVars","subscriberId","setSubscriberId","localStorage","getItem","newSubscriberId","setItem","firebaseConfig","useMemo","handleSetFcmtoken","useCallback","token","handleSetChat","updatedChats","map","item","content","createdDate","Date","toISOString","title","handleSetChatFromHistoryApi","notificationId","events","Array","isArray","current","forEach","some","messageId","push","payload","orderNumber","processIncomingMessage","navigator","serviceWorker","register","then","async","Notification","requestPermission","VAPID_KEY","getToken","serviceWorkerRegistration","registration","vapidKey","onMessage","notification","fcmMessageId","noti","catch","error","console","result","tokenData","JSON","parse","accessToken","Error","TokenAvailable","requestBody","mutate","onError","onSuccess","registerFCMToken","registerToken","IngramHeader","AvatarProps","enableAISuggestions","getSearchSuggestions","impersonationHeaderProps","isCmpWhitelisted","isLogoClickable","onMenuButtonClick","onUserActionClick","showAvatar","showCartIcon","showCulturePicker","showFavoritesIcon","showImpersonationHeader","showSeachBar","decodedToken","useDecodedToken","userType","imoProfile","isFlagLoaded","isInsightsMessagingQueue","isFeatureEnabled","isQuickInsightsRollDownEnabled","isEndUserFeatureEnabled","isInsightsDropOpen","setIsInsightsDropOpen","isInsightsButtonClicked","setIsInsightsButtonClicked","insightEnabledPage","setInsightEnabledPage","hasInsigtData","setHasInsightData","boData","showNotificationBellIcon","updateInsightDataStatus","hasData","useMarkAsReadNotification","queryClient","useQueryClient","apiPatch","useApiPatch","notificationIds","notificationStatus","invalidateQueries","queryKey","useMarkAsReadNotifications","historyChat","useRef","hasPermission","useHasPermission","useLocation","enableRollDownForInsightsPaths","navigate","useNavigate","cartItemsCount","query","lineCount","useCartItemsCount","closeInsightsDrop","setCloseInsightsDrop","enableUserManagement","enableInsightsFrameWork","disableCartIconOnAddToCart","isAddToCartPending","useIsMutating","mutationKey","dismissAllHandler","prevCloseInsightsDrop","getVisitedPageInfo","currentPagePath","includes","onQuickInsightsRollDown","pathname","search","onClickInsightsCenter","navigateLink","flag","QuoteCheckoutBtnStatus","setDigitalData","listener","updatedChat","isduplicate","Chat","filter","removeEventListener","addEventListener","dataStatus","HeaderX4CMobile","Header","NotificationProps","markAllAsRead","Boolean","notifications","openNotifications","unReadCount","disableCartIcon","endUserIcon","EndUserIcon","endUserTitle","hasInsightData","insightsContent","QuickInsights","hasInsightsData","InsightsMessagingQueue","maxDropHeight","isEndUserLogin","page","showInsightsIcon","showNotificationIcon","alt","src","width","featureName","MAX_CACHE_TIME","useHelpNavItems","locale","useLocalizationContext","help","useApiQueryForCms","gcTime","staleTime","useHelpMenuQuery","buildHelpMenuItem","items","IngramHelpMenu","helpNavItems","HelpMenu","height","key","left","marginTop","navItems","IngramMobile","siteCode","useSiteConfig","isNewHeader","iosLink","anroidLink","translate","useLocalization","Box","padding","sm","xs","IngramLogo","sx","alignItems","bgcolor","justifyContent","verticalAlign","textAlign","Typography","fontSize","fontWeight","Stack","direction","spacing","mt","href","align","color","theme","palette","text","secondary","backgroundImage","backgroundPosition","backgroundRepeat","variant","year","getFullYear","toString","useMyBusinessMenu","voucherEnabledCountries","at","ch","de","dk","es","fi","fr","gb","hu","it","pt","se","useProductMenuQuery","enabled","culture","isLogoutApi","useServicesMenuQuery","useCMSApiQuery","useSolutionsMenuQuery","useVendorsMenuQuery","HIDE_SEARCHBAR_PRODUCT_VENDORS_COUNTRIES","useSideNavItems","availableInCountry","applicationCenterAvailability","useTranslate","myBusinessNavItems","vouchers","isLoading","isVoucherLoading","refetchOnWindowFocus","useVoucherCountAPI","backofficeMenuItems","srcUrlMap","EXAMPLE_SOURCE_URL","menuItems","count","voucherMenuIndex","findIndex","m","name","splice","url","warn","menuTranslateCheck","buildMyBusinessMenu","openInNewTab","subMenu","translationKey","navItem","label","isRelPath","startsWith","open","route","useMyBusinessNavItems","productsNavItems","categories","cat","sub","subcat","subcat1","useProductsNavItems","vendorsNavItems","vendors","menuitems","stringify","a","vendorName","filterLeftNavList","x","isLeftNav","total","i","validateProperty","pageName","partialPageUrl","searchUrl","pagePath","split","pop","encodeURIComponent","useVendorsNavItems","solutionsNavItems","solution","buildNavMenuItem","useSolutionsNavItems","servicesNavItems","services","useServicesNavItems","hideSearchBarProductVendorNav","openFeedbackForm","IngramSideNav","drawerOpen","headerHeight","isCheckout","isTempDrawer","setDrawerOpen","activeSideNavItem","setActiveSideNavItem","enableApi","setEnableApi","enableMenuApi","sideNavItems","navTo","useNavTo","onNavItemClick","ClickAwayListener","mouseEvent","onClickAway","touchEvent","Drawer","onClose","position","borderRight","boxShadow","LeftSideNavMobile","hoverRequired","isHelpNavItemVisible","onFocus","onMouseEnter","top","LeftSideNav","tokensUrlMap","CYBERSOURCE","DOCDATA","WORLDPAY","boKeys","useCMPCardRedirect","ignoreCCRedirect","sessionStorage","isImpersonationMode","useIsImpersonationMode","enableCybersource","enableDocData","enableForcePopupCybersource","enableForcePopupDocdata","enableForcePopupWorldPay","enableWorldPay","gateway","useCMPCardCheck","useIsFeatureWhitelisted","isFeatureWhitelisted","canPlaceOrder","cmpEnabledInBO","cmpTermCodes","code","trim","toLowerCase","allCmpTermCodes","worldPayTermCodes","allWorldPayTermCodes","docDataTermCodes","allDocDataTermCodes","cmpPaymentTerm","cmpEnabled","paymentCards","isFetched","fetchedCards","tokensUrl","usePaymentCards","card","defaultCard","is_default","removeItem","DEFAULT_MESSAGE_KEY","ORIGIN","globalThis","LOG_PREFIX","AutoLoginImOnlineFrame","imLoggedIn","setImLoggedIn","isHomeView","frameRef","frameSrc","setFrameSrc","timeoutId","active","log","cleanFn","intervalId","clearInterval","setInterval","ref","String","contentWindow","e","getFrameHref","substring","style","border","DebugAccessToken","authState","oktaAuth","useOktaContext","refreshAccessTokenWithDebuggingData","useRefreshAccessToken","resellerIdInputValue","setResellerIdInputValue","showDebug","invalidateAccessTokenHandler","tokens","tokenManager","getTokensSync","concat","setTokens","invalidateRefreshTokenHandler","refreshToken","inv","refreshAccessTokenHandler","success","onChange","target","placeholder","enableImpersonationHandler","tokenRefreshRequest","authority","issuer","clientId","idToken","scope","scopes","join","tokenResponse","tokenRefreshResponse","tokenParams","handleOAuthResponse","convertedResponse","styled","background","display","flexDirection","gap","minHeight","minWidth","paddingLeft","paddingRight","flex","frameTitleMap","FramedPageTitle","updatePageTitle","usePageTitle","pageTitle","InvalidAccessToken","refreshAccessToken","setCount","badToken","setBadToken","refetchBaseBackofficeKeys","refetchMyBusinessMenuItems","refetchProductsMenuItems","refetchVendorsMenuItems","refetchSolutionsMenuItems","refetchServicesMenuItems","LOCAL_STORAGE_KEY","PerformanceErrorAlert","isDismissed","setIsDismissed","boValue","showAlert","find","currentUtcDateTime","currentDate","currentTime","startTime","endTime","document","querySelector","scrollTo","behavior","StyledAlert","action","StyledButton","dismissAlert","icon","severity","Alert","warning","lineHeight","margin","zIndex","Button","outline","marginLeft","textTransform","injectScriptInHead","onLoad","scriptEl","createElement","onload","head","appendChild","injectScriptInHeadWith","innerHtml","datadomainscript","innerHTML","setAttribute","injectScriptInBody","script_text","scriptid","getElementById","scripttext","createTextNode","id","useIsOneTrustEnabled","hasId","setHasId","scriptId","envMap","scriptsMap","development","us","production","au","be","br","ca","cl","co","hk","in","mx","my","nl","nz","pe","sg","usme","productionbeta","cn","th","productionbetax","staging","mi","stagingx","no","staging2","x4aFrameScriptsMap","ujetFrameScriptsMap","uk","useUjetAuth","isUniteChatbot","useApiPostQuery","isUnite","useIsUjetChatbotEnabled","isCloudChat","isWhitelistedReseller","pathWhitelist","isValidPath","currentPathWhitelisted","list","path","lastChar","subPath","slice","checkListForPath","translationKeys","isEnabled","baseUrl","useUjetChatBot","localizationService","environment","langRef","ujetTranslations","setUjetTranslations","ujetTranslationsRef","firstName","lastName","bcn","resellerId","email","userId","accountId","accountResponse","getLsObject","accountData","accountID","ujetKeys","ujetConfig","UJET","ujetInstanceRef","isScriptInjected","setIsScriptInjected","isAdobeScriptInjected","hideUjet","ujet","$el","showUjet","keys","loadTranslations","returnKeyIfNotFound","res","langTranslations","setupUjet","config","options","authenticate","bottom","companyId","configurations","companyName","customData","country","values","language","host","lang","launcher","logo","translation","defaultMenuKey","menuKey","container","ujetIframe","iframeDocument","contentDocument","getAdbodeScript","script","digitalDataScript","loadAdobeAnalytics","on","destroy","remove","useUjetUniteChatBot","searchParams","useSearchParams","openCloudChat","get","ujetUniteInstanceRef","resellerid","openUjet","scriptSrcModifierMap","DEFAULT_TEMPLATE","hasPlacedOrderCount","orderTrackingPageVisits","quotesCreatedCount","returnsPlacedUserCount","subscriptionPageVisits","programKeyMap","dev","prod","win","OPEN_WALKME_FORM","WalkMeAPI","startSurveyById","OPEN_FORSTA_FORM","doConfirmitFeedbackSurvey","useScriptInjectors","isFirstLogin","resellerProspect","isTagInjected","useAddMetaTag","scriptUrl","setScriptUrl","oneTrustScript","isInX4AFrame","useInX4AFrame","buildVars","siteConfig","category","className","injectCategorizedScriptInHead","userGUID","replace","useAdobeDtm","defaultVisibility","showChatbot","setShowChatbot","resellerInfoHTML","resellerInfoContainer","chatBotOnHelpMenu","toggleChatBot","loadScriptInBody","chatBotContainerCO","chatBotContainerMx","useChatBotHelpMenu","oneTrustId","consentRequired","Cookies","disclaimerContent","apiGet","useApiGet","useQuery","queryFn","useReusableCookieDisclaimer","scriptRef","reusableContents","removeChild","html","replaceAll","customEL","injectDisclaimerElement","cookieconsent_options","update_cookieconsent_options","useCookieDisclaimer","useDatadog","shouldShowForstaInsteadOfWalkmeFeedback","useFeedbackFormRouter","defaultLocale","programKey","forstaEnabled","userActivityData","userActivityObject","propertyName","useUserActivity","forstaScriptEl","forstaUserCreated","setForstaUserCreated","emailAddress","forsta_user","assign","useForstaFeedback","useFullStory","documentElement","getLanguageFromLocale","useHtmlLang","isWalkMeUserActive","setIsWalkMeUserActive","walkMeInitialization","setWalkMeInitialization","isWalkMeLoaded","_walkmeInternals","walkMeAPI","userRoles","role","uuid","srcModifier","user","btoa","walkMe","s","getElementsByTagName","parentNode","insertBefore","_walkmeConfig","smartLoad","getCurrentLanguage","delayInit","changeLanguage","useWalkMe","isWhatfixUserActive","setIsWhatfixUserActive","isWhatfixEnabled","whatfixUser","whatfix","useWhatfix","PROSPECT_RESELLER_ROUTES","PROSPECT_RESELLER_PUBLIC_ROUTES","WhiteList","children","urlList","toLocaleLowerCase","Navigate","to","BlackList","FrameView","lazy","AppCounterView","DebugInfoView","IframeTestView","NoHeaderView","RemoteDialogTestView","PostMsgTestView","NoMatchView","DevToolView","publicUrlWhiteList","imonlineTermsAndConditionsUrl","LAYOUT_SPECS","HEADER_HEIGHT","LEFT_NAV_WIDTH","flagTest","App","checkURL","isInIM360Frame","useLayoutEffect","Promise","resolve","reject","styleEl","onerror","isOneTrustEnabled","OneTrust","useOneTrust","areWidgetsConfigured","setAreWidgetsConfigured","useGetWidgetConfig","selectedWidgets","widgets","isSelected","hasWidgets","useAreWidgetsConfigured","showDebugToolBar","appRoutes","mfsRoutes","routes","setRoutes","getMfsRoutes","mfNames","useMfsRoutes","authRoutes","publicRoutes","clonedRoute","element","RequireAuth","Outlet","ProfileView","Login","LoginCallbackView","LogoutView","WelcomeVideo","TermsAndConditions","buildAppRoutes","useAppRoutes","idpLogin","openDialog","useOpenDialog","onMsgReceived","msg","details","state","sentProps","dialogId","dialogParams","msgType","msgFrom","answer","respondToMsgWith","startListening","stopListening","useProcessPostMsgs","isCepWhitelisted","isProspectUser","useIsCepWhitelisted","profileData","useProfileData","termsData","strTitle","params","useReusableContents","isFetching","status","dateLastTermsConditionsAcceptance","documentModifiedWhen","useTnCRedirect","initialLocaleLanguage","preferredLanguageMutation","usePreferredLanguageMutation","usePreferredLanguageChange","logoutContext","useLogoutContext","isLogoutEnabled","setIsLogoutEnabled","isTokenRefreshed","setTokenRefreshed","loaderText","setLoadingText","useIsDown","isLogin","isForgotPassword","isResellerRegistration","isResellerDetailsV2","isDocusignRedirectIframe","isNotAppstorePath","isFrame","isPublicFrame","isCart","isQuoteItems","isDashboard","isInsightsV2","isOrderConfirmation","isCustomizationView","isPayment","isPaymentVerification","isResellerProspectPublicRoute","showCartIconOnHeader","isCMPProductExcludedReseller","useUrlEncoding","useIsResolution","max","setIsFirstLogin","isCreateDefaultBasket","setIsCreateDefaultBasket","xvFrameConfig","hideSideNav","hideHeader","segment","endsWith","hideFooter","isCMPWhitelisted","isCloudProductEnabled","term","categoryTrans","useGetSearchSuggestions","avatarProps","configuratorResponse","useConfiguratorMenuQuery","configuratorMenus","setConfiguratorMenus","isNavigationRequired","setIsNavigationRequired","isReportPreferencesEnabled","whitelist","externalHost","openUrlInNewTab","nodeAliasPath","framedRoute","onLogoutClick","resellerID","username","displayUserName","useAvatarProps","leftNavWidth","loaderTextTimeout","centerLoaderText","disableHeader","autoSignIn","useAutoSignIn","isError","isPending","reload","useDisableImpersonationMode","alertMessageKey","setAlertMessageKey","alertSeverity","setAlertSeverity","alertMessage","exitButtonLoading","exitButtonText","clearAlert","exitButtonDisabled","onImpersonationButtonClick","useImpersonationHeaderProps","enableSearchOnQuote","hideSearchBar","enableXScroll","isLowResolution","useXScroll","partnerWithUsData","typelang","trackingTag","usePartnerWithUs","opacity","pointerEvents","avatarData","rest","trimAvatorPropsForResellerProspect","right","ScopeProvider","Suspense","fallback","CenterLoader","RenderContent","backgroundColor","overflowX","overflowY","Root","IngramFooter","footerAction","RenderRemoteDialog","useRoutes","maxWidth","ScrollToTop","createRoot","render","AppProviders","basename","envVars","process","menuData","property","index","subItems","menu","handleKenticoOnClick","fn","Function","menuItem","isModel","CountryCode","useFooterColumns","socialMedias","useSocialMedias","footerColumns","footers","FooterMobile","appStore","socialMedia","useQueryOptions","extraHeaders","oktaContext","cmsData","UserLoggedIn"],"sourceRoot":""}