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AAe,EAElC,IAGF,IAAME,EAAqB9C,SAAS0C,cAClC,kCAEyB,OAAvBI,GACFA,EAAmBN,iBAAiB,UAAU,WACxCM,EAAmBC,UACrBH,EAAAA,EAAAA,gBAAe,cAAc,EAEjC,KAGmB,KAAjBI,EAAAA,EAAAA,gBACFC,EAAAA,EAAAA,8BAEJ,CAoBIC,EAPyC,CAS7C,C","sources":["webpack://webstaurantstore/./__alias__/react/index.tsx","webpack://webstaurantstore/./analytics/Analytics.tsx","webpack://webstaurantstore/./analytics/Conductrics/index.ts","webpack://webstaurantstore/./analytics/PageView/handlePageView.ts"],"sourcesContent":["import { logException } from \"@wss/error-tracking\";\nimport {\n ComponentType,\n lazy,\n LazyExoticComponent,\n PropsWithChildren,\n ReactNode,\n useEffect,\n useLayoutEffect,\n useState,\n Context,\n createContext as createReactContext,\n useContext as useReactContext,\n} from \"react\";\nimport React, {\n createRoot as createReactRoot,\n hydrateRoot,\n Root,\n} from \"react-dom/client\";\n\nconst roots = new Map();\n\nexport function createRoot(\n elem: unknown,\n opts?: Parameters[1]\n): Root {\n if (!(elem instanceof Element)) {\n const error = new Error(\n `\"elem\" argument is not an instance of an Element. Is it in the DOM?`\n );\n logException(error);\n throw error;\n }\n const cache = roots.get(elem) ?? createReactRoot(elem, opts);\n if (!roots.get(elem)) roots.set(elem, cache);\n return {\n ...cache,\n render(component: ReactNode): void {\n cache.render(component);\n if (module.hot) {\n /** Runs when a module has been updated */\n module.hot.dispose(() => {\n cache.render(component);\n });\n }\n },\n };\n}\n\ntype RenderAtRootProps = {\n container: Element;\n children: ReactNode;\n};\n\nexport function RenderAtRoot({ container, children }: RenderAtRootProps) {\n useLayoutEffect(\n function initRenderAtRootEffect() {\n const cache = roots.get(container);\n if (!cache) {\n const root = createRoot(container);\n if (!roots.has(container)) roots.set(container, root);\n root.render(children);\n } else {\n cache.render(children);\n }\n },\n [container, children]\n );\n\n return <>;\n}\n\ntype HydrateAtRootProps = {\n container: Element;\n children: ReactNode;\n};\n\nexport function HydrateAtRoot({ container, children }: HydrateAtRootProps) {\n useLayoutEffect(\n function initHydrateAtRootEffect() {\n const cache = roots.get(container);\n if (!cache) {\n roots.set(container, hydrateRoot(container, children));\n } else {\n cache.render(children);\n }\n },\n [container, children]\n );\n\n return <>;\n}\n\nexport function hydrateIntoContainer(container: Element, children: ReactNode) {\n const cache = roots.get(container);\n if (!cache) {\n roots.set(container, hydrateRoot(container, children));\n } else {\n cache.render(children);\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst contexts = new Map>();\n\nexport function createHypernovaContext(\n name: string,\n value?: T\n): Context {\n let cache = contexts.get(name);\n if (!cache) {\n cache = createReactContext(value);\n contexts.set(name, cache);\n }\n return cache;\n}\n\nexport type PageDataSelectorFn = (data: T) => U;\n\n/** Used for child components of a page to consumer the data provided from the server.\n *\n * **Basic Usage**\n * @example\n * ```ts\n * const data = usePageData(\"[HypernovaName]\");\n * ```\n *\n * **Preferred Usage**\n *\n * We can create a wrapper utility so other components no longer need to pass the Hypernova Component name.\n * @example\n * ```ts\n * export function useMyPageData(): MyPageDataType {\n * return usePageData(\"[HypernovaName]\");\n * }\n * // In your components\n * const data = useMyPageData();\n * ```\n *\n * **With a Selector**\n *\n * You can select a value from the data so you are only consuming what you need. This works best with the preferred example above\n * @example\n * ```ts\n * import { PageDataSelectorFn } from \"@wss/react\"; // ➕ Add Import\n *\n * export function useMyPageData( // ➕ Add Generic\n * selector: PageDataSelectorFn // ➕ Add Argument\n * ): U { // ➕ Update Return Value\n * return usePageData(\"[HypernovaName]\", selector); // ➕ Add Generic & Selector\n * }\n * // In your components\n * const data = useMyPageData((data) => data.myKey); // ➕ Add selector function\n * ```\n *\n * **Reduce Function ReDeclarations**\n *\n * When using a selector in the previous example the function will be redefined each time the component rerenders. This can lead to increased memory usage in components that rerender often. We can fix that one of two ways.\n *\n * 1. Define the selector outside of the component. The function can not have any dependencies.\n * @example\n * ```ts\n * function selector(data: MyPageDataType) { return data.myKey }\n *\n * function MyComponent() {\n * const data = useMyPageData(selector);\n * }\n * ```\n *\n * 2. Memoize the callback with it's dependencies.\n * @example\n * ```ts\n * function MyComponent({ index }: {index: number}) {\n * const data = useMyPageData(useCallback((data) => data[index], [index]));\n * }\n * ```\n *\n * **Testing Components**\n *\n * To mock the hypernova data import the utility from \"@wss/react\" in your test file.\n * @example\n * ```ts\n * import { usePageData } from \"@wss/react\";\n * ```\n *\n * Then mock the import,\n * @example\n * ```ts\n * jest.mock(\"@wss/react\");\n * ```\n *\n * Then create a variable that has the correct typing.\n * @example\n * ```ts\n * const mockedUsePageData = usePageData as jest.MockedFunctionDeep<\n * typeof usePageData\n * >;\n * ```\n *\n * Finally, set the data either in a test or beforeAll the test with `.mockReturnValue`.\n * @example\n * ```ts\n * mockedUsePageData.mockReturnValue({some: \"data\"})\n * ```\n */\nexport function usePageData(name: string): T;\nexport function usePageData(\n name: string,\n selector: PageDataSelectorFn\n): U;\nexport function usePageData(\n name: string,\n selector?: PageDataSelectorFn\n): U {\n if (window.location !== undefined) {\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n const Context = contexts.get(name) as Context;\n /** We can safely run this inside of a condition because this will always be true on the client. */\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const context = useReactContext(Context);\n if (!context) {\n throw new Error(\n \"Context has no value. Are you sure the server provided some data?\"\n );\n }\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n return selector ? selector(context) : (context as U);\n }\n\n return selector ? selector(globalThis.hypernova) : globalThis.hypernova;\n}\n\ntype LazyLoadedComponent = LazyExoticComponent> & {\n preload: Parameters[0];\n};\n\nexport function lazyWithPreload(factory: Parameters[0]) {\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n const Component = lazy(factory) as LazyLoadedComponent<\n [Awaited>[\"default\"]]\n >;\n Component.preload = factory;\n return Component;\n}\n\ntype LoadingTrackingProps = {\n onLoad: () => void;\n onComplete: () => void;\n};\n\nexport function SuspenseLoadTracking({\n children,\n onComplete,\n onLoad,\n}: PropsWithChildren) {\n useEffect(\n function initLoadingTracking() {\n onLoad();\n return onComplete;\n },\n [onLoad, onComplete]\n );\n\n return <>{children};\n}\n\n/** This is a work around for the limited support renderToString has for suspense.\n * @important This should only be used for code that can not be lazy loaded via a user interaction. It will cause extra re-renders.\n * @see {@link https://react.dev/reference/react-dom/server/renderToString#caveats React Docs}\n * @see {@link https://stackoverflow.com/questions/75316236/how-can-i-suspend-component-on-the-server-side-but-render-it-on-the-client-side Stackoverflow Issue About Error}\n */\nexport function ClientOnly({\n children,\n}: PropsWithChildren): JSX.Element | null {\n const [isClient, setIsClient] = useState(false);\n\n useEffect(function initIsClient() {\n setIsClient(true);\n }, []);\n\n if (!isClient) return null;\n\n return <>{children};\n}\n\nexport function createContext() {\n const Context = createReactContext(null);\n\n function useContext() {\n const context = useReactContext(Context);\n if (!context) throw new Error(\"Missing Context.Provider in Component Tree\");\n return context;\n }\n\n return [Context, useContext] as const;\n}\n","import React, { useEffect, useRef } from \"react\";\nimport { createRoot } from \"@wss/react\";\nimport { getDynamicData } from \"~/common/Store/actions/updateUserAndChatFromOrigin\";\nimport { handlePageView } from \"./PageView/handlePageView\";\nimport { dispatchConductricsEvent } from \"./Conductrics\";\n\n// Rendered in main.js as well as in App.tsx to ensure it is loaded on every page\nconst Analytics = () => {\n const hasRan = useRef(false);\n\n async function handleWaitUser(): Promise {\n await getDynamicData;\n }\n\n // Run in useEffect to ensure all tracking is only loaded once and only on the client\n useEffect(() => {\n if (!hasRan.current) {\n hasRan.current = true;\n handleWaitUser().then(() => {\n dispatchConductricsEvent();\n handlePageView();\n });\n }\n }, []);\n return <>;\n};\n\nconst root = createRoot(document.createElement(\"div\"));\nroot.render();\n\nexport default Analytics;\n","// eslint-disable-next-line import/prefer-default-export\nexport const dispatchConductricsEvent = () => {\n window.dispatchEvent(\n new CustomEvent(\"ConductricsStateChange\", { detail: \"vs-VeqsqJUkLm\" })\n );\n};\n","/* eslint-disable import/prefer-default-export */\n/* eslint-disable camelcase */\nimport {\n getCheckoutFunnelType,\n initiateLegacyFacebookCheckout,\n sendCheckoutEventPageView,\n} from \"./pageViewHelper\";\nimport { addPaymentInfo } from \"../Payment/paymentHelpers\";\nimport { isLoggedIn } from \"../apiHelpers\";\nimport { getCartAndSendShippingEvent } from \"~/Gtm/getCartAndSendEvent\";\nimport Store from \"~/common/Store\";\nimport { updateUser } from \"~/common/Store/actions/user\";\nimport { sendBingViewCartEvent } from \"~/bingAnalytics\";\nimport { createProducts } from \"../productHelpers\";\nimport { Item } from \"~/userAnalytics\";\nimport { formatEcommerceData } from \"../AddToCart/addToCartHelpers\";\nimport { sendGtmEvent } from \"../definitions\";\n\ntype PageInfo = {\n environment: string;\n page_type: string;\n page_value: string;\n clean_url: string;\n page_category: string;\n search_value: string;\n page_extra_info: string;\n};\n\n/**\n * Handles the on load checkout event. Only called once on the page\n * @param items array of item numbers\n */\nexport const handleViewCartPage = async (items: Item[]) => {\n const products = await createProducts(items);\n const funnelType = getCheckoutFunnelType();\n sendCheckoutEventPageView(\"Cart\", funnelType, products);\n};\n\n/**\n * Calls the begin_checkout_and_view_cart event on load and updates any time the cart is updated (such as incrementing quantity on cart page)\n * @param items array of item numbers\n * @param totalValue total value of the cart\n * @param coupon all coupon codes concatenated into a single string\n */\nexport const handleViewCartPageAndUpdates = async (\n items: Item[],\n totalValue: number,\n coupons: string\n) => {\n const products = await createProducts(items);\n const productsFeedIds = [];\n for (const product of products) {\n product.position = products.indexOf(product);\n productsFeedIds.push(product.id);\n }\n const { user } = Store.getState();\n user.analyticsData.cart_total = totalValue;\n updateUser(user);\n\n sendBingViewCartEvent(productsFeedIds);\n const formattedEcommerceData = formatEcommerceData(products, {\n coupons,\n total: totalValue,\n });\n sendGtmEvent({\n event: \"begin_checkout_and_view_cart\",\n ecommerce: formattedEcommerceData,\n });\n};\n\nconst handleViewInfoPageView = () => {\n sendCheckoutEventPageView(\"ReviewPayment\", getCheckoutFunnelType());\n initiateLegacyFacebookCheckout();\n\n // TODO - These event listeners will be rewritten in follow up tickets to be on the actual elements instead of here\n const ccField = document.getElementById(\"card_number\");\n if (ccField !== null) {\n ccField.addEventListener(\"focusout\", () => {\n let ccType: Element | string | null = document.querySelector(\n \"ul.payment > li.active\"\n );\n if (ccType === null) {\n ccType = \"credit_card\";\n } else {\n ccType = ccType.innerHTML;\n }\n addPaymentInfo(ccType, false);\n });\n }\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n const savedccField = document.querySelector(\n \"select[name=storedCCPayment]\"\n ) as HTMLInputElement;\n if (savedccField !== null) {\n savedccField.addEventListener(\"change\", () => {\n if (savedccField.value !== \"\") {\n addPaymentInfo(\"credit_card\", false);\n }\n });\n }\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n const altPaymentCheckbox = document.querySelector(\n \"input[name=altpayment_confirm]\"\n ) as HTMLInputElement;\n if (altPaymentCheckbox !== null) {\n altPaymentCheckbox.addEventListener(\"change\", () => {\n if (altPaymentCheckbox.checked) {\n addPaymentInfo(\"altpayment\", false);\n }\n });\n }\n\n if (isLoggedIn() === true) {\n getCartAndSendShippingEvent();\n }\n};\n\nconst handleShippingBillingInfoPageView = () => {\n sendCheckoutEventPageView(\"BillingPage\", getCheckoutFunnelType());\n initiateLegacyFacebookCheckout();\n};\n\nexport const handlePageView = () => {\n // Most pages have the defined GoogleTagManagerMeta property defined in their cshtml file, but not all.\n // PageInfo will be the first event defined in the data layer (if defined) as it is pushed in on _LayoutCore.cshtml, which is loaded for all pages.\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore-next-line\n if (!window.dataLayer[0]?.page_type) return;\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n const pageInfo = window.dataLayer[0] as PageInfo;\n if (pageInfo.page_type === \"/shipping-billinginfo.cfm\") {\n handleShippingBillingInfoPageView();\n }\n if (pageInfo.page_type === \"viewinfo.cfm\") {\n handleViewInfoPageView();\n }\n};\n"],"names":["createRoot","RenderAtRoot","HydrateAtRoot","hydrateIntoContainer","createHypernovaContext","usePageData","lazyWithPreload","SuspenseLoadTracking","ClientOnly","createContext","roots","Map","elem","opts","Element","error","Error","logException","cache","get","createReactRoot","set","render","component","container","children","useLayoutEffect","root","has","hydrateRoot","contexts","name","value","createReactContext","selector","undefined","window","location","Context","context","useReactContext","globalThis","hypernova","factory","Component","lazy","preload","onComplete","onLoad","useEffect","useState","isClient","setIsClient","Analytics","hasRan","useRef","handleWaitUser","getDynamicData","current","then","dispatchConductricsEvent","handlePageView","document","createElement","dispatchEvent","CustomEvent","detail","handleViewCartPage","handleViewCartPageAndUpdates","items","products","funnelType","createProducts","getCheckoutFunnelType","sendCheckoutEventPageView","totalValue","coupons","productsFeedIds","product","user","formattedEcommerceData","position","indexOf","push","id","Store","getState","analyticsData","cart_total","updateUser","sendBingViewCartEvent","formatEcommerceData","total","sendGtmEvent","event","ecommerce","dataLayer","page_type","pageInfo","initiateLegacyFacebookCheckout","ccField","getElementById","addEventListener","ccType","querySelector","innerHTML","addPaymentInfo","savedccField","altPaymentCheckbox","checked","isLoggedIn","getCartAndSendShippingEvent","handleViewInfoPageView"],"sourceRoot":""}