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,CAAE/H,KAAM,SACnB,MALE+H,EAAS,CAAE/H,KAAM,cAAe2H,UAAAA,EAAWD,YAAAA,EAAaE,OAAAA,IAQ1DM,SAASC,KAAKC,UAAUC,OAAO,mBAC/BH,SAASC,KAAKG,gBAAgB,cAChC,EAQF,C,osBC/DaO,cAAa,W,OAAbA,C,EA0BAC,MAAK,W,OAALA,C,IA1BN,IAAMD,EAAgB,SAACE,GAC5B,IAAMC,EAAIC,OAAOC,IAiBjB,OAhB4B,IAAIC,OAE9BH,EAAAA,KAEEA,EAAAA,KAEAA,EAAAA,KAGAA,EAAAA,KAEAA,EAAAA,KAEAA,EAAAA,MAGuBI,KAAKL,EAClC,EAOaD,EAAQ,Y,IACnBO,EAAAA,EAAAA,aAAAA,EAAAA,EACAC,iB,YAAAA,IAAmB,EAAAT,EAAAA,GACUQ,E,yICvB/B,C,QAAA,EAAe,Y,IACbE,EAAAA,EAAAA,sBACAC,EAAAA,EAAAA,iBACAC,EAAAA,EAAAA,eAEA,SAAUF,IAA0BC,IAAoBC,EAC1D,C,wICNA,C,IANA,IAMA,EAN8B,SAACC,GACzBA,GAAOA,EAAI7L,SACb8L,OAAOC,SAASC,KAAOH,EAE3B,C,wICDA,C,QAAA,EAAe,SAACI,EAA0CC,G,IAKNA,EAJlD,QAAKD,KAGFA,EAAoBE,6BACpBF,EAAoBG,0BAA2BF,SAAc,QAAdA,EAAAA,EAAMG,gBAANH,IAAAA,OAAAA,EAAAA,EAAgBI,UAC/DL,EAAoBM,iCAAkCL,aAAAA,EAAAA,EAAMM,YAGjE,C","sources":["webpack://webstaurantstore/./ProductDetails/Pricing/AddToCart/AccessoryPopover.tsx","webpack://webstaurantstore/./common/AddToCartModal/AccessoriesModal.tsx","webpack://webstaurantstore/./common/Buttons/index.tsx","webpack://webstaurantstore/./common/ModalReact/index.tsx","webpack://webstaurantstore/./common/SaleBadgeAndPricing/index.tsx","webpack://webstaurantstore/./productListing/ProductBox/SuccessMessage.tsx","webpack://webstaurantstore/./ProductDetails/Carousel/fetchAccessories.ts","webpack://webstaurantstore/./ProductDetails/Pricing/AddToCart/getMinBuyForQuantityDropdown.ts","webpack://webstaurantstore/./__alias__/utilities/formatAsCurrency.ts","webpack://webstaurantstore/./analytics/AddToCart/carouselAddToCartAnalytics.ts","webpack://webstaurantstore/./common/AddToCartModal/index.ts","webpack://webstaurantstore/./common/AddToCartModal/useAddToCartModals.ts","webpack://webstaurantstore/./common/Email/EmailValidator.ts","webpack://webstaurantstore/./common/Product/shouldDisplayRequiredCustomization.ts","webpack://webstaurantstore/./common/navigation/setWindowLocationHref.ts","webpack://webstaurantstore/./productListing/ProductBox/isNonExclusivePlatinumPlusProduct.ts"],"sourcesContent":["import { Icon, Popover, PopoverBody, PopoverContent, PopoverHeader, PopoverTrigger } from \"@clarkinc/zest-design-system/ui\";\nimport React, { FocusEventHandler, MouseEventHandler, MutableRefObject, useCallback, useRef, useState } from \"react\";\ninterface Props {\n accessoryName: string;\n extendedInfo: string;\n placement?: string;\n}\nconst AccessoryPopover = ({\n accessoryName,\n extendedInfo\n}: Props) => {\n const [open, setOpen] = useState(false);\n const [wasAutoFocusedOnClose, setWasAutoFocusedOnClose] = useState(false);\n const mouseOverRef: MutableRefObject = useRef(null);\n const contentRef = useRef(null);\n const triggerRef = useRef(null);\n const handleMouseEnter: MouseEventHandler = useCallback((e): void => {\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n mouseOverRef.current = e.target as HTMLElement;\n setOpen(true);\n }, []);\n const handleMouseTriggerLeave = useCallback((): void => {\n if (contentRef.current?.contains(mouseOverRef.current)) {\n return;\n }\n setOpen(false);\n }, [contentRef]);\n const handleMouseContentLeave = useCallback((): void => {\n if (triggerRef.current?.contains(mouseOverRef.current)) {\n return;\n }\n setOpen(false);\n }, [triggerRef]);\n const handleFocus: FocusEventHandler = useCallback(() => {\n if (wasAutoFocusedOnClose) {\n setWasAutoFocusedOnClose(false);\n setOpen(false);\n return;\n }\n setOpen(true);\n }, [wasAutoFocusedOnClose]);\n const handleCloseAutoFocus = (event: Event) => {\n event.preventDefault();\n setOpen(false);\n setWasAutoFocusedOnClose(true);\n setTimeout(() => {\n triggerRef.current?.focus();\n }, 0);\n };\n return \n \n \n \n {\n handleCloseAutoFocus(e);\n }} ref={contentRef} data-sentry-element=\"PopoverContent\" data-sentry-source-file=\"AccessoryPopover.tsx\">\n {accessoryName}\n \n {/* eslint-disable-next-line react/no-danger */}\n \n \n \n ;\n};\nexport default AccessoryPopover;","import React, { useState } from \"react\";\nimport formatAsCurrency from \"@wss/utilities/formatAsCurrency\";\nimport Modal, { Header, Footer, Body } from \"~/common/ModalReact\";\nimport Button from \"~/common/Buttons\";\nimport { AddToCartModal } from \".\";\nimport { Accessory } from \"../Store/models/ProductListing\";\nimport AccessoryPopover from \"~/ProductDetails/Pricing/AddToCart/AccessoryPopover\";\ninterface Props extends AddToCartModal<\"accessories\"> {\n accessories: Readonly;\n itemNumber: string;\n previouslyPurchased?: boolean;\n}\nexport default ({\n isOpen,\n accessories,\n itemNumber,\n closeModal,\n submitModal,\n previouslyPurchased = false\n}: Props) => {\n interface Values {\n [index: string]: string;\n }\n const [values, setValues] = useState({});\n const [errors, setErrors] = useState([]);\n const valid = () => {\n const newErrors: string[] = [];\n accessories.forEach(accessory => {\n if (!accessory.isRequired || values[accessory.name]) return;\n newErrors.push(accessory.name);\n });\n setErrors(newErrors);\n return !newErrors.length;\n };\n const handleAddToCart = async (event: React.SyntheticEvent) => {\n event.preventDefault();\n if (valid()) {\n submitModal({\n accessories: Object.values(values)\n });\n setValues({});\n }\n };\n const validateSingle = (accessoryName: string) => {\n setErrors([...errors].filter(error => error !== accessoryName));\n };\n return <>\n \n
\n

\n {`Product Accessories for ${itemNumber.toUpperCase()}`}\n

\n
\n\n \n
\n
\n

\n This item has further options/accessories available.\n

\n {accessories.map(accessory =>
\n
\n {accessory.extendedInfo && \n \n }\n \n \n \n
\n
)}\n {errors[0] &&

\n \n {`Please select a ${errors[0]} for this product.`}\n \n

}\n
\n
\n \n
\n \n \n
\n
\n ;\n};","import React, { HTMLAttributes } from \"react\";\nimport { cls } from \"cls\";\nexport const colors = {\n base: cls(\"bg-gray-50\", \"hover:bg-gray-100\", \"active:bg-gray-100\", \"disabled:bg-gray-100\", \"text-gray-800\", \"border-black-20\", \"shadow-inset-white-25\"),\n light: cls(\"bg-white\", \"border-gray-600\", \"text-gray-800\", \"hover:bg-gray-primary\", \"focus-visible:outline-gray-800\", \"btn\"),\n green: cls(\"hover:bg-green-800\", \"text-white\", \"bg-green-500\", \"border-black-10\", \"focus-visible:outline-green-800\", \"btn\"),\n blue: cls(\"text-white\", \"border-black-10\", \"btn\", \"btn-info\"),\n purple: cls(\"text-white\", \"border-black-10\", \"btn\", \"btn-custom\"),\n glass: cls(\"bg-white\", \"hover:bg-white\", \"px-2\", \"text-gray-800\", \"capitalize\", \"border-gray-glass\"),\n inverse: cls(\"text-white\", \"bg-gray-inverse\", \"border-black-10\", \"hover:bg-gray-inverse-dark\"),\n custom: \"\",\n red: cls(\"text-white\", \"border-black-10\", \"btn\", \"btn-cart\"),\n \"red-outline\": cls(\"bg-transparent\", \"hover:bg-red-800\", \"border-red-800\", \"text-red-700\", \"hover:text-white\"),\n \"green-solid\": cls(\"text-white\", \"hover:text-white\", \"btn\", \"btn-primary\"),\n \"green-outline\": cls(\"bg-transparent\", \"hover:bg-green-500\", \"border-green-500\", \"text-green-500\", \"hover:text-white\"),\n \"glass-outline\": cls(\"bg-transparent\", \"hover:bg-gray-50\", \"border-gray-600\", \"text-gray-800\", \"btn-glass-shadow\"),\n ui: cls(\"text-shadow-white-75\", \"hover:bg-gray-50\", \"border-gray-400\", \"text-gray-800\", \"focus-visible:outline-gray-800\", \"active:shadow-inset-black-15\"),\n orange: cls(\"text-white\", \"border-black-20\", \"btn\", \"btn-checkout\")\n};\nexport const sizes = {\n small: cls(\"rounded-sm-1/2\", \"text-sm-1/2\", \"leading-3\", \"px-3\", \"pb-1-1/2\", \"pt-1-3/4\"),\n standard: cls(\"rounded-normal\", \"text-base\", \"leading-normal\", \"px-7\", \"py-2-1/2\"),\n mini: cls(\"rounded\", \"text-xs\", \"leading-3\", \"py-1\", \"px-2\"),\n large: cls(\"rounded\", \"text-xl\", \"py-4\", \"px-10\"),\n toolbar: cls(\"rounded\", \"text-xs\", \"leading-3\", \"px-3\", \"py-1-1/2\"),\n custom: \"\"\n};\ntype BaseProps = {\n className?: string;\n children: React.ReactNode;\n color: keyof typeof colors;\n size?: keyof typeof sizes;\n alignment?: string;\n weight?: string;\n focusClasses?: string;\n};\ntype AnchorProps = BaseProps & Omit, \"type\"> & {\n href: Exclude[\"href\"], undefined>;\n};\ntype ButtonProps = BaseProps & React.DetailedHTMLProps, HTMLButtonElement> & {\n type: Exclude[\"type\"], undefined>;\n};\ntype ElementProps = BaseProps & {\n element: React.ElementType;\n} & HTMLAttributes;\nfunction Buttons(props: ButtonProps, ref?: React.RefObject): JSX.Element;\nfunction Buttons(props: AnchorProps): JSX.Element;\nfunction Buttons(props: ElementProps): JSX.Element;\nfunction Buttons(props: ButtonProps | AnchorProps | ElementProps, ref?: React.RefObject) {\n const {\n children,\n className = \"\",\n size = \"standard\",\n color,\n alignment = \"align-middle\",\n weight = \"font-semibold\",\n focusClasses = cls(\"focus-visible:outline\", \"focus-visible:outline-offset-2\", \"focus-visible:outline-2\"),\n ...rest\n } = props;\n const baseClasses = cls(\"border-solid\", \"border\", \"box-border\", \"cursor-pointer\", \"inline-block\", \"text-center\", \"no-underline\", \"antialiased\", focusClasses);\n const colorClass = colors[color];\n const sizeClass = sizes[size];\n const classes = `${baseClasses} ${className} ${sizeClass} ${colorClass} ${alignment} ${weight}`;\n if (\"element\" in rest) {\n const {\n element,\n ...forwardedProps\n } = rest;\n // eslint-disable-next-line react/destructuring-assignment\n return React.createElement(element, {\n ...forwardedProps,\n className: classes\n }, children);\n }\n if (\"href\" in rest) {\n return \n {children}\n ;\n }\n if (\"type\" in rest) {\n return (\n // eslint-disable-next-line react/button-has-type\n \n );\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\nexport default React.forwardRef(Buttons) as unknown as typeof Buttons;","import React, { useEffect } from \"react\";\nimport ReactModal from \"react-modal\";\nimport { cls } from \"@wss/cls\";\ntype HeaderProps = {\n children: React.ReactNode;\n closeModal: () => void;\n className?: string;\n style?: React.CSSProperties;\n};\ntype FooterProps = {\n children: React.ReactNode;\n className?: string;\n};\ntype BodyProps = {\n children: React.ReactNode;\n className?: string;\n};\nexport const Header = ({\n children,\n closeModal,\n className = \"\",\n style = {}\n}: HeaderProps) =>
\n {children}\n \n
;\nexport const Body = ({\n children,\n className = \"\"\n}: BodyProps) =>
\n {children}\n
;\nexport const Footer = ({\n children,\n className = \"\"\n}: FooterProps) =>
\n {children}\n
;\ntype ModalProps = {\n isOpen: boolean;\n onRequestClose?: (event: React.MouseEvent | React.KeyboardEvent) => void;\n onAfterOpen?: ReactModal.OnAfterOpenCallback;\n children: React.ReactNode;\n className: string;\n role?: string;\n contentStyle?: React.CSSProperties;\n overlayStyle?: React.CSSProperties;\n preventScroll?: boolean;\n closeTimeoutMS?: number;\n overFlowY?: string;\n};\nexport default ({\n isOpen,\n onRequestClose,\n onAfterOpen,\n children,\n className,\n role,\n contentStyle,\n overlayStyle,\n preventScroll,\n closeTimeoutMS,\n overFlowY\n}: ModalProps) => {\n useEffect(() => {\n ReactModal.setAppElement(\"body\");\n }, []);\n return \n {children}\n ;\n};","import React from \"react\";\nimport { cls } from \"@wss/cls\";\nimport formatAsCurrency from \"@wss/utilities/formatAsCurrency\";\ninterface SaleBadgeAndPricingProps {\n price: number;\n displayPriceLabel?: boolean;\n priceLabel?: string;\n dataTestId?: string;\n salePricingClassNames?: string;\n saleBadgeExtraClassNames?: string;\n salePrice?: number;\n unitOfMeasure?: string;\n enableSalePriceScreenReaderText?: boolean;\n hideRegularPrice?: boolean;\n hideRegularLabel?: boolean;\n labelClassnames?: string;\n}\nconst SaleBadgeAndPricing = ({\n price,\n displayPriceLabel = false,\n priceLabel = \"\",\n dataTestId = \"\",\n salePricingClassNames = \"\",\n saleBadgeExtraClassNames = \"\",\n salePrice = 0,\n unitOfMeasure = \"\",\n enableSalePriceScreenReaderText = false,\n hideRegularPrice = false,\n hideRegularLabel = false,\n labelClassnames = \"\"\n}: SaleBadgeAndPricingProps) => {\n return

\n \n Sale\n \n {hideRegularPrice ? null : \n {hideRegularLabel ? null : <>\n regular price\n reg \n }\n {displayPriceLabel ? priceLabel : formatAsCurrency.formatIfUndefined(price)}\n {enableSalePriceScreenReaderText ? \n now {formatAsCurrency.formatIfUndefined(salePrice)} /{\" \"}\n {unitOfMeasure}\n : null}\n }\n

;\n};\nexport default SaleBadgeAndPricing;","import React from \"react\";\ninterface Props {\n quantity: number;\n}\nexport default ({\n quantity\n}: Props) => <>\n \n {`${quantity} item${quantity > 1 ? \"s\" : \"\"} `}\n \n added to your cart\n ;","import { logException } from \"@wss/error-tracking\";\nimport { toError } from \"@wss/error-tracking/utils\";\nimport { Accessory } from \"~/common/Store/models/ProductListing\";\n\nconst fetchAccessories = async (itemNumber: string): Promise => {\n const endpointUrl = \"/api/productlisting/productaccessories\";\n try {\n const result = await fetch(\n `${endpointUrl}?itemNumber=${encodeURIComponent(itemNumber)}`\n );\n\n return result.json();\n } catch (e) {\n const error = new Error(\"Error in fetchAccessories\", {\n cause: toError(e),\n });\n\n await logException(error);\n\n return [];\n }\n};\nexport default fetchAccessories;\n","interface Props {\n minBuy: number;\n mustBuy: number;\n}\n\nexport default ({ minBuy, mustBuy }: Props): number => {\n let startQuantity = Math.max(minBuy, mustBuy);\n\n // handle the case when the start quantity is not divisible by must buy\n if (mustBuy > 1 && minBuy > mustBuy && startQuantity % mustBuy !== 0) {\n let counter = 1;\n while (mustBuy * counter < minBuy) {\n counter += 1;\n startQuantity = mustBuy * counter;\n }\n }\n\n return startQuantity;\n};\n","/**\n * Used for a function to convert numbers into currency.\n * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat NumberFormat Documentation}\n *\n * @example\n * const numberToFormat = 12345.67\n * new Intl.NumberFormat(\"en-US\", {style: \"currency\"}).format(numberToFormat);\n */\n\n/**\n * This should be the one we mainly use. It handle all cases when using the currency formatter.\n *\n * @example\n * import formatAsCurrency from \"@wss/utilities/formatAsCurrency\"\n *\n * const priceToFormat = 12345.67\n * const formatWithAllTheChecks = formatAsCurrency.formatIfUndefined(priceToFormat)\n *\n * return formatWithAllTheChecks;\n */\nconst formatAsCurrencyWrapper = (\n value: number | string | undefined,\n showCentsIfUndefined = true,\n showEmptyStringIfUndefined = false,\n numberFormatOptions: Intl.NumberFormatOptions = {}\n) => {\n const formattedCents = showCentsIfUndefined ? \"$0.00\" : \"$0\";\n const undefinedFormatted = showEmptyStringIfUndefined ? \"\" : formattedCents;\n const parsedValue = Number(value);\n\n return parsedValue\n ? formatAsCurrencyPure(parsedValue, numberFormatOptions)\n : undefinedFormatted;\n};\n\n/**\n * If you want to just use a pure version of the currency formatter and handle the checks in the consumer then you can use this version.\n *\n * @example\n * import formatAsCurrency from \"@wss/utilities/formatAsCurrency\"\n *\n * const priceToFormat = 12345.67\n * const formatCurrencyNoChecks = formatAsCurrency.formatAsCurrencyPure(priceToFormat)\n *\n * return formatCurrencyNoChecks;\n */\nconst formatAsCurrencyPure = (\n value: number,\n numberFormatOptions: Intl.NumberFormatOptions = {}\n) => {\n return new Intl.NumberFormat(\"en-US\", {\n style: \"currency\",\n currency: \"USD\",\n ...numberFormatOptions,\n }).format(value);\n};\n\nconst formatAsCurrency = {\n formatIfUndefined: formatAsCurrencyWrapper,\n format: formatAsCurrencyPure,\n};\n\nexport default formatAsCurrency;\n","/* eslint-disable import/prefer-default-export */\nimport { checkIfCarouselIsRecAi } from \"~/userAnalytics\";\n\nexport const getCarouselProps = (\n addToCartButtonOnCarousel: HTMLElement | null\n) => {\n // type checking since we are using refs to pass the element\n if (!addToCartButtonOnCarousel) {\n return { carouselName: \"\", carouselModel: \"\", position: 0 };\n }\n const carouselElement = addToCartButtonOnCarousel?.closest(\n \"[gtm-carousel-name]\"\n );\n const carouselName = carouselElement?.getAttribute(\"gtm-carousel-name\");\n const addToCartButtons = carouselElement?.querySelectorAll(\n \"[name=addToCartButton]\"\n );\n if (!carouselName || !addToCartButtons) {\n return { carouselName: \"\", carouselModel: \"\", position: 0 };\n }\n const position =\n Array.from(addToCartButtons).indexOf(addToCartButtonOnCarousel) + 1;\n\n return {\n carouselName,\n carouselModel: checkIfCarouselIsRecAi(carouselName),\n position,\n };\n};\n","type AddToCartModalWithUserInput = {\n name: ModalName;\n result: ResultType;\n};\n\ntype AddToCartModalWithoutUserInput = {\n name: ModalName;\n};\n\n/*\n * Add To Cart Modal Types.\n * Add To Cart Modals with user input will map there result type to\n * their submit modal callbacks.\n */\ntype Accessories = AddToCartModalWithUserInput<\"accessories\", string[]>;\ntype VirtualGrouping = AddToCartModalWithUserInput<\n \"virtualGrouping\",\n VirtualGroupingInput\n>;\ntype Outlet = AddToCartModalWithoutUserInput<\"outlet\">;\ntype Warning = AddToCartModalWithoutUserInput<\"warning\">;\ntype CommercialUse = AddToCartModalWithUserInput<\"commercialUse\", boolean>;\ntype Warranty = AddToCartModalWithUserInput<\"warranty\", WarrantyOption>;\n\nexport type VirtualGroupingInput = {\n groupMemberItemNumber: string;\n hasAccessories: boolean;\n};\n\nexport type WarrantyOption = {\n warrantyId: number;\n skipCommercialModal?: boolean;\n noThanksSelected?: boolean;\n};\n\n/*\n * Add all of the Modals from above to one of these unions.\n */\ntype AddToCartModalsWithUserInput =\n | Accessories\n | VirtualGrouping\n | Warranty\n | CommercialUse;\ntype AddToCartModalsWithoutUserInput = Warning | Outlet;\n\ntype AddToCartModals =\n | AddToCartModalsWithUserInput\n | AddToCartModalsWithoutUserInput;\n\nexport type AddToCartModalNames = AddToCartModals[\"name\"];\ntype AddToCartModalWithUserInputName = AddToCartModalsWithUserInput[\"name\"];\n\ntype UnboxProductModalUserInput<\n ModalName extends AddToCartModalWithUserInputName,\n BoxedProductResult extends AddToCartModalsWithUserInput\n> = BoxedProductResult extends AddToCartModalWithUserInput<\n ModalName,\n infer ModalResult\n>\n ? ModalResult\n : never;\n\n/*\n * Takes the name of the modal and determines its result type\n */\ntype AddToCartModalUserInput<\n ModalName extends AddToCartModalWithUserInputName\n> = UnboxProductModalUserInput;\n\nexport type AddToCartModal = {\n isOpen: boolean;\n closeModal: () => void;\n submitModal: ModalName extends AddToCartModalWithUserInputName\n ? (result: { [K in ModalName]: AddToCartModalUserInput }) => void\n : () => void;\n};\n\n/*\n * Maps the modal name to a key with the correct type\n * EX:\n * ProductModalWithResult<\"isTrue\", boolean> -> isTrue?: boolean | undefined;\n * ProductModalWithResult<\"testArray\", string[]> -> testArray?: string[] | undefined;\n */\nexport type AddToCartModalUserInputs = {\n [Key in AddToCartModalWithUserInputName]?: AddToCartModalUserInput;\n};\n\nexport type State = {\n modalsToOpen: AddToCartModalNames[];\n modalResults: AddToCartModalUserInputs;\n activeModal: AddToCartModalNames | \"\";\n};\n\nexport type Action =\n | {\n type: \"openModal\";\n firstModal: AddToCartModalNames;\n otherModals: AddToCartModalNames[];\n }\n | {\n type: \"submitModal\";\n result?: AddToCartModalUserInputs;\n nextModal: AddToCartModalNames;\n otherModals: AddToCartModalNames[];\n }\n | {\n type: \"reset\";\n };\n\nexport const initialState: State = {\n modalsToOpen: [],\n modalResults: {},\n activeModal: \"\",\n};\n\nexport const reducer = (state: State, action: Action): State => {\n switch (action.type) {\n case \"openModal\":\n return {\n modalResults: {},\n activeModal: action.firstModal,\n modalsToOpen: action.otherModals,\n };\n case \"submitModal\":\n return {\n activeModal: action.nextModal,\n modalsToOpen: action.otherModals,\n modalResults: {\n ...state.modalResults,\n ...action.result,\n },\n };\n case \"reset\":\n return initialState;\n default:\n return state;\n }\n};\n","import { useCallback, useReducer } from \"react\";\nimport {\n AddToCartModalNames,\n AddToCartModalUserInputs,\n initialState,\n reducer,\n} from \".\";\n\ninterface Props {\n onComplete: (\n results: AddToCartModalUserInputs,\n openModals: (modals: AddToCartModalNames[]) => void\n ) => void;\n}\n\nconst useAddToCartModals = ({ onComplete }: Props) => {\n const [state, dispatch] = useReducer(reducer, initialState);\n const { modalsToOpen, modalResults, activeModal } = state;\n\n const openModals = (modals: AddToCartModalNames[]) => {\n if (modals[0]) {\n const [firstModal, ...otherModals] = modals;\n dispatch({ type: \"openModal\", firstModal, otherModals });\n }\n };\n\n const closeModal = useCallback(() => {\n // Workaround for react-modal issue: https://github.com/reactjs/react-modal/issues/888\n document.body.classList.remove(\"overflow-hidden\");\n document.body.removeAttribute(\"aria-hidden\");\n\n dispatch({ type: \"reset\" });\n }, []);\n\n const submitModal = (result?: AddToCartModalUserInputs) => {\n const [nextModal, ...otherModals] = modalsToOpen;\n\n if (\n nextModal &&\n (nextModal !== \"commercialUse\" ||\n !result?.warranty?.skipCommercialModal) &&\n (nextModal !== \"accessories\" ||\n !result?.virtualGrouping?.groupMemberItemNumber ||\n result?.virtualGrouping?.hasAccessories)\n ) {\n dispatch({ type: \"submitModal\", nextModal, otherModals, result });\n } else {\n const allResults = { ...modalResults, ...result };\n onComplete(allResults, openModals);\n dispatch({ type: \"reset\" });\n }\n\n // Workaround for react-modal issue: https://github.com/reactjs/react-modal/issues/888\n document.body.classList.remove(\"overflow-hidden\");\n document.body.removeAttribute(\"aria-hidden\");\n };\n\n return {\n openModals,\n activeModal,\n closeModal,\n submitModal,\n };\n};\n\nexport default useAddToCartModals;\n","export const validateEmail = (emailaddress: string) => {\n const r = String.raw;\n const emailAddressPattern = new RegExp(\n // beginning of string\n r`^` +\n // username portion: one or more characters that are not whitespace or @\n r`[^@\\s]+` +\n // an @ symbol\n r`@` +\n // domain components: one or more groups of one or more characters\n // other than @, \\, ., or whitespace, each followed by a . separator\n r`(?:[^@\\s\\\\.]+\\.)+` +\n // TLD: one additional domain component but without a . after it\n r`[^@\\s\\\\.]+` +\n // end of string\n r`$`\n );\n\n return emailAddressPattern.test(emailaddress);\n};\n\ninterface Params {\n emailAddress: string;\n validationsToRun?: typeof validateEmail;\n}\n\nexport const valid = ({\n emailAddress,\n validationsToRun = validateEmail,\n}: Params) => validationsToRun(emailAddress);\n","interface Product {\n customizationRequired: boolean;\n customizationUrl: string;\n isCustomizable: boolean;\n}\n\nexport default ({\n customizationRequired,\n customizationUrl,\n isCustomizable,\n}: Product): boolean => {\n return !!(customizationRequired && (customizationUrl || isCustomizable));\n};\n","const setWindowLocationHref = (url?: string) => {\n if (url && url.length) {\n window.location.href = url;\n }\n};\n\nexport default setWindowLocationHref;\n","import { CustomerExclusivity } from \"~/common/Store/models/ProductListing\";\nimport { User } from \"~/common/Store/models/User\";\n\nexport default (customerExclusivity: CustomerExclusivity, user: User) => {\n if (!customerExclusivity) return false;\n\n const isNonExclusiveProduct =\n !customerExclusivity.disallowNonMemberToPurchase ||\n (customerExclusivity.allowPlatinumToPurchase && user?.platinum?.enabled) ||\n (customerExclusivity.allowWebstaurantPlusToPurchase && user?.hasWebPlus);\n\n return isNonExclusiveProduct;\n};\n"],"names":["accessoryName","extendedInfo","useState","open","setOpen","wasAutoFocusedOnClose","setWasAutoFocusedOnClose","mouseOverRef","useRef","contentRef","triggerRef","handleMouseEnter","useCallback","e","current","target","handleMouseTriggerLeave","contains","handleMouseContentLeave","handleFocus","Popover","onOpenChange","data-sentry-element","data-sentry-component","data-sentry-source-file","PopoverTrigger","aria-label","className","onMouseEnter","onMouseLeave","onFocus","ref","Icon","theme","data-testid","name","size","PopoverContent","onCloseAutoFocus","preventDefault","setTimeout","focus","PopoverHeader","PopoverBody","span","dangerouslySetInnerHTML","__html","isOpen","accessories","itemNumber","closeModal","submitModal","previouslyPurchased","values","setValues","errors","setErrors","handleAddToCart","event","newErrors","forEach","accessory","isRequired","push","length","Object","Modal","onRequestClose","Header","h4","toUpperCase","Body","div","id","p","map","includes","AccessoryPopover","placement","select","value","onChange","filter","error","title","option","disabled","options","available","formatAsCurrency","description","formatIfUndefined","Number","price","label","i","Footer","Button","color","type","onClick","gtm-id","colors","sizes","base","cls","light","green","blue","purple","glass","inverse","custom","red","ui","orange","small","standard","mini","large","toolbar","Buttons","props","children","alignment","weight","focusClasses","rest","baseClasses","colorClass","sizeClass","classes","element","forwardedProps","React","createElement","a","button","forwardRef","style","header","textShadow","main","footer","onAfterOpen","role","contentStyle","overlayStyle","preventScroll","closeTimeoutMS","overFlowY","useEffect","ReactModal","setAppElement","overlayClassName","overlay","backgroundColor","zIndex","overflowY","content","bodyOpenClassName","displayPriceLabel","priceLabel","dataTestId","salePricingClassNames","saleBadgeExtraClassNames","salePrice","unitOfMeasure","enableSalePriceScreenReaderText","hideRegularPrice","hideRegularLabel","labelClassnames","aria-hidden","quantity","endpointUrl","fetch","encodeURIComponent","json","Error","cause","toError","logException","minBuy","mustBuy","startQuantity","Math","max","counter","formatAsCurrencyPure","numberFormatOptions","Intl","NumberFormat","currency","format","showCentsIfUndefined","showEmptyStringIfUndefined","formattedCents","undefinedFormatted","parsedValue","getCarouselProps","addToCartButtonOnCarousel","carouselName","carouselModel","position","carouselElement","closest","getAttribute","addToCartButtons","querySelectorAll","Array","from","indexOf","checkIfCarouselIsRecAi","initialState","reducer","modalsToOpen","modalResults","activeModal","state","action","firstModal","otherModals","nextModal","result","onComplete","useReducer","dispatch","openModals","modals","document","body","classList","remove","removeAttribute","warranty","skipCommercialModal","virtualGrouping","groupMemberItemNumber","hasAccessories","allResults","validateEmail","valid","emailaddress","r","String","raw","RegExp","test","emailAddress","validationsToRun","customizationRequired","customizationUrl","isCustomizable","url","window","location","href","customerExclusivity","user","disallowNonMemberToPurchase","allowPlatinumToPurchase","platinum","enabled","allowWebstaurantPlusToPurchase","hasWebPlus"],"sourceRoot":""}