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EAAAA,WAEA,OACGU,MACCC,SAAgC,QAAhCA,EAAAA,EAAoBE,oBAApBF,IAAAA,OAAAA,EAAAA,EAAkC8R,MAClC,SAAC1Q,GAAMA,OAAAA,EAAE/B,WAAWyK,iBAAkBzK,aAAAA,EAAAA,EAAYyK,c,IAGxD,C,yICFA,C,YAfoC,O,48BAEpC,IAaA,EAb0B,WACxB,IAA0BpM,EAAAA,GAAAA,EAAAA,EAAAA,UAAS0Q,OAAO2D,YAAU,GAA7CtL,EAAmB/I,EAAAA,GAAZsU,EAAYtU,EAAAA,GAU1B,OATAa,EAAAA,EAAAA,YAAU,WACR,IAAM0T,EAAW,IAAIC,gBAAe,WAClCF,EAAS5D,OAAO2D,WAClB,IAEA,OADAE,EAASE,QAAQtF,SAASjM,MACnB,WACLqR,EAASG,YACX,CACF,GAAG,IACI,CAAE3L,MAAAA,EACX,C,wICXA,C,QAAA,EAAe,SAACqB,EAA2C5C,G,IAGNA,EAFnD,WACG4C,aAAAA,EAAAA,EAAqBuK,+BACrBvK,aAAAA,EAAAA,EAAqBkB,2BAA2B9D,SAAc,QAAdA,EAAAA,EAAMoN,gBAANpN,IAAAA,OAAAA,EAAAA,EAAgBqN,WAChEzK,aAAAA,EAAAA,EAAqBmB,kCAAkC/D,aAAAA,EAAAA,EAAMsN,YAElE,C,qJCRaC,UAAS,W,OAATA,C,EAKAC,SAAQ,W,OAARA,C,IALN,IAAMD,EAAY,CACvBE,KAAM,QAIKD,EAAW,G","sources":["webpack://webstaurantstore/./ProductDetails/Carousel/CarouselAddToCart.tsx","webpack://webstaurantstore/./ProductDetails/Carousel/CarouselMember.tsx","webpack://webstaurantstore/./ProductDetails/Carousel/CarouselPlatinumPlusExclusive.tsx","webpack://webstaurantstore/./ProductDetails/Carousel/CarouselQuantityDropdown.tsx","webpack://webstaurantstore/./ProductDetails/Carousel/CustomizeButton.tsx","webpack://webstaurantstore/./ProductDetails/Carousel/NotifyMeButton.tsx","webpack://webstaurantstore/./ProductDetails/Carousel/ViewDetailsButton.tsx","webpack://webstaurantstore/./ProductDetails/Carousel/ViewReplacementButton.tsx","webpack://webstaurantstore/./common/NoScriptLazyImage/index.tsx","webpack://webstaurantstore/./Gtm/useIsGtmLoaded.ts","webpack://webstaurantstore/./ProductDetails/Pricing/AddToCart/ValidationError.ts","webpack://webstaurantstore/./ProductDetails/Pricing/AddToCart/request.ts","webpack://webstaurantstore/./ProductDetails/Pricing/AddToCart/validations.ts","webpack://webstaurantstore/./ProductDetails/Pricing/isGroupMemberSelected.ts","webpack://webstaurantstore/./ProductDetails/VirtualGrouping/Hooks/useResizeObserver.ts","webpack://webstaurantstore/./ProductDetails/canCustomerPurchase.ts","webpack://webstaurantstore/./common/Constants/Constants.ts"],"sourcesContent":["import React, { useEffect, useState, useRef } from \"react\";\nimport ReactDOMServer from \"react-dom/server\";\nimport addToCartRequest, { AddToCartProduct } from \"~/ProductDetails/Pricing/AddToCart/request\";\nimport { Accessory } from \"~/common/Store/models/ProductListing\";\nimport Notification from \"~/common/Notification\";\nimport SuccessMessage from \"~/productListing/ProductBox/SuccessMessage\";\nimport CustomizeButton from \"./CustomizeButton\";\nimport shouldDisplayRequiredCustomization from \"~/common/Product/shouldDisplayRequiredCustomization\";\nimport QuantityDropdown from \"./CarouselQuantityDropdown\";\nimport { getValidationError } from \"../Pricing/AddToCart/validations\";\nimport getMinBuyForQuantityDropdown from \"../Pricing/AddToCart/getMinBuyForQuantityDropdown\";\nimport NotifyMeButton from \"./NotifyMeButton\";\nimport { ProductReplacement } from \"../ProductDetailPageResult\";\nimport { AddToCartModalNames } from \"~/common/AddToCartModal\";\nimport ViewReplacementButton from \"./ViewReplacementButton\";\nimport ViewDetailsButton from \"./ViewDetailsButton\";\nimport useAddToCartModals from \"~/common/AddToCartModal/useAddToCartModals\";\nimport AccessoriesModal from \"~/common/AddToCartModal/AccessoriesModal\";\nimport fetchAccessories from \"./fetchAccessories\";\nimport { getCarouselProps } from \"~/analytics/AddToCart/carouselAddToCartAnalytics\";\nexport interface CarouselAddToCartProduct {\n customizationRequired: boolean;\n customizationUrl: string;\n description: string;\n feedIdentifier: string;\n grouping: boolean;\n hasAccessories: boolean;\n imagePath: string;\n isCustomizable: boolean;\n itemNumber: string;\n link: string;\n minimumBuy: number;\n mustBuy: number;\n outOfStock: boolean;\n price: number;\n productReplacement: ProductReplacement;\n isReplacementEligible: boolean;\n}\ninterface Props {\n useSingleItemStyle: boolean;\n formId: string;\n product: CarouselAddToCartProduct;\n userEmail?: string;\n addCarouselItemToCart?: (itemNumber: string, quantity: string, accessories?: string) => void;\n extraQuantityContainerClassName?: string;\n containsQuantityDropdown?: boolean;\n setIsQuantityShown?: (value: boolean) => void;\n}\nconst CarouselAddToCart = ({\n useSingleItemStyle,\n formId,\n product,\n userEmail,\n addCarouselItemToCart,\n containsQuantityDropdown,\n setIsQuantityShown,\n extraQuantityContainerClassName = \"\"\n}: Props) => {\n const {\n minimumBuy,\n mustBuy,\n hasAccessories\n } = product;\n const isHandlingAddToCartCall = addCarouselItemToCart === undefined || addCarouselItemToCart === null;\n const inputRef = useRef(null);\n const formClassName = useSingleItemStyle ? \"product_form\" : \"form product_form\";\n const updatedStartBuy = getMinBuyForQuantityDropdown({\n minBuy: minimumBuy,\n mustBuy\n });\n const [loadingAccessories, setLoadingAccessories] = useState(false);\n const [accessories, setAccessories] = useState([]);\n const [forceShowingCustomQuantity, setShowQuantityInput] = useState(false);\n const [errorMessage, setErrorMessage] = useState(\"\");\n const showQuantityDropdown = (minimumBuy > 1 || mustBuy > 1) && !forceShowingCustomQuantity;\n const [quantity, setQuantity] = useState(updatedStartBuy.toString());\n useEffect(() => {\n if (errorMessage && isHandlingAddToCartCall) Notification.closeAll();\n }, [errorMessage, isHandlingAddToCartCall]);\n const qtyValue = (value: string) => Number(value) || 0;\n const handleQuantityChange = (event: React.ChangeEvent) => {\n const inputValue = event.target.value;\n let quantityValue = inputValue;\n if (inputValue === \"other\") {\n if (!forceShowingCustomQuantity) {\n setShowQuantityInput(true);\n quantityValue = updatedStartBuy.toString();\n }\n }\n if (quantityValue !== \"\" && Number.isNaN(quantityValue)) {\n quantityValue = updatedStartBuy.toString();\n }\n setErrorMessage(\"\");\n setQuantity(quantityValue);\n };\n interface AddToCartArgs {\n openModals?: (modals: AddToCartModalNames[]) => void;\n accessoriesList?: string[];\n }\n const loadAccessories = async () => {\n if (loadingAccessories || !hasAccessories) {\n return;\n }\n setLoadingAccessories(true);\n const data = await fetchAccessories(product.itemNumber);\n setAccessories(data);\n };\n const AddToCart = async ({\n openModals,\n accessoriesList\n }: AddToCartArgs) => {\n const addToCartProduct: AddToCartProduct = {\n ...product\n };\n if (openModals) {\n const modalsToOpen: AddToCartModalNames[] = [];\n if (hasAccessories && !accessoriesList) {\n loadAccessories();\n modalsToOpen.push(\"accessories\");\n }\n if (modalsToOpen.length > 0) {\n openModals(modalsToOpen);\n return;\n }\n }\n const validationError = getValidationError({\n product: {\n ...product,\n grouping: false,\n groupingAttributes: {\n isVirtual: false,\n groupMembers: []\n },\n startBuy: updatedStartBuy,\n accessories: [] // NOTE: Not validating accessories here as they have been validated in the modal and we can't change them here\n },\n quantity: Number(quantity)\n });\n setErrorMessage(validationError?.message ?? \"\");\n if (validationError && validationError.message?.length > 0) {\n return;\n }\n if (isHandlingAddToCartCall) {\n new Notification({\n imageUrl: product.imagePath || \"/images/products/new/imagecomingsoon_tn.jpg\",\n heading: ReactDOMServer.renderToString(),\n href: \"/viewcart.cfm\",\n body: product.description,\n buttonText: \"View Cart\",\n secondButtonText: \"Checkout\",\n secondHref: \"/viewinfo.cfm\"\n });\n if (!(await addToCartRequest({\n product: addToCartProduct,\n accessoryIds: accessoriesList?.map(x => Number(x)),\n quantity: Number(quantity),\n gtmAtcProps: {\n source: \"carousel\",\n carouselProps: getCarouselProps(inputRef.current)\n }\n }))) {\n setErrorMessage(\"There was an error adding this item to your cart.\");\n }\n } else if (addCarouselItemToCart) {\n addCarouselItemToCart(product.itemNumber, quantity, accessoriesList?.join(\",\"));\n }\n };\n const {\n openModals,\n activeModal,\n closeModal,\n submitModal\n } = useAddToCartModals({\n onComplete: (results, openModals) => {\n AddToCart({\n openModals,\n accessoriesList: results.accessories\n });\n }\n });\n const handleAddToCart = async (event: React.SyntheticEvent) => {\n event.preventDefault();\n return AddToCart({\n openModals\n });\n };\n const isAccessoriesModalOpen = activeModal === \"accessories\";\n const ProductModals = () => <>\n {isAccessoriesModalOpen && }\n ;\n const showViewDetails = product.grouping;\n const showViewReplacement = !!(product.isReplacementEligible && !showViewDetails);\n const showOutOfStock = product.outOfStock && !showViewReplacement && !showViewDetails;\n const displayRequiredCustomization = shouldDisplayRequiredCustomization(product) && !showOutOfStock && !showViewReplacement && !showViewDetails;\n const showAddToCart = !displayRequiredCustomization && !showOutOfStock && !showViewReplacement && !showViewDetails;\n if (showQuantityDropdown !== undefined && showQuantityDropdown) {\n setIsQuantityShown?.(true);\n }\n return <>\n \n {showViewDetails && }\n {displayRequiredCustomization && }\n {showOutOfStock && }\n {showViewReplacement && }\n {showAddToCart &&
\n
\n
\n
\n {errorMessage.length > 0 &&

\n {errorMessage}\n

}\n
\n {showQuantityDropdown && }\n {!showQuantityDropdown && }\n \n \n
\n
\n
}\n ;\n};\nexport default CarouselAddToCart;","/* eslint-disable react/no-array-index-key */\nimport React from \"react\";\nimport { cls } from \"@wss/cls\";\nimport { connect } from \"react-redux\";\nimport { PlusLink } from \"@clarkinc/zest-design-system/ui\";\nimport formatAsCurrency from \"@wss/utilities/formatAsCurrency\";\nimport { RootState, UserState } from \"~/common/Store/models/RootReadonly\";\nimport isNonExclusiveForPlatinumPlusProduct from \"~/productListing/ProductBox/isNonExclusivePlatinumPlusProduct\";\nimport Stars from \"~/common/Stars\";\nimport AddToCart from \"./CarouselAddToCart\";\nimport { CarouselItem } from \"./CarouselItem\";\nimport NoScriptLazyImage from \"~/common/NoScriptLazyImage\";\nimport CarouselPlatinumPlusExclusive from \"./CarouselPlatinumPlusExclusive\";\nimport SaleBadgeAndPricing from \"~/common/SaleBadgeAndPricing\";\ninterface Props {\n item: CarouselItem;\n user: UserState;\n showAddToCart: boolean;\n addToCartFormId?: string;\n activeSalePricingClassNames?: string;\n containsQuantityDropdown?: boolean;\n setContainsQuantityDropdown?: (value: boolean) => void;\n addCarouselItemToCart?: (itemNumber: string, quantity: string, accessories?: string) => void;\n isCartCarousel?: boolean;\n}\nconst CarouselMember = ({\n item,\n user,\n showAddToCart,\n addToCartFormId = \"\",\n containsQuantityDropdown,\n setContainsQuantityDropdown,\n addCarouselItemToCart,\n activeSalePricingClassNames = \"\",\n isCartCarousel = false\n}: Props) => {\n let styleObj = {};\n if (showAddToCart && containsQuantityDropdown) {\n styleObj = {\n bottom: \"104px\",\n left: \"36px\"\n };\n }\n const plusRibbon = ;\n const image =
\n \n \n \n
;\n const relatedItemsImage = ;\n const itemPrice =
\n {item.displaySalePrice ? : null}\n

\n {item.displaySalePrice ? formatAsCurrency.formatIfUndefined(item.salePrice) : formatAsCurrency.formatIfUndefined(item.price)}\n {item.unitOfMeasure && {`/${item.unitOfMeasure}`}}\n

\n
;\n const productDescription = \n {item.description}\n ;\n const addToCartProduct = {\n ...item\n };\n const {\n minimumBuy,\n mustBuy\n } = item;\n if (minimumBuy > 1 || mustBuy > 1) {\n setContainsQuantityDropdown?.(true);\n }\n const addToCartItem =
  • \n {image}\n
    \n
    {plusRibbon}
    \n {productDescription}\n
    \n {item.price > 0 && itemPrice}\n \n {isNonExclusiveForPlatinumPlusProduct(item.customerExclusivity, user) && }\n
  • ;\n const starsItem =
  • \n {image}\n
    \n
    \n {item.isWebstaurantPlusEligible ? :
     
    }\n \n
    \n {productDescription}\n {itemPrice}\n
    \n
  • ;\n const categoryItem =
  • \n
    \n \n {relatedItemsImage}\n

    \n {item.description}\n

    \n
    \n
    \n

    \n {item.categoryItemCount} {item.categoryItemDescription}\n

    \n
    \n
    \n
  • ;\n if (item.isCategory) {\n return categoryItem;\n }\n if (showAddToCart) {\n return addToCartItem;\n }\n return starsItem;\n};\nexport const mapStateToProps = (state: RootState) => ({\n user: state.user\n});\nexport default connect(mapStateToProps)(CarouselMember);","import React from \"react\";\nimport { User } from \"~/common/Store/models/User\";\nimport { CustomerExclusivity } from \"~/common/Store/models/ProductListing\";\nimport useIsMounted from \"~/common/useIsMounted\";\nimport canCustomerPurchase from \"../canCustomerPurchase\";\ninterface Props {\n user: User;\n customerExclusivity: CustomerExclusivity;\n}\nconst CarouselPlatinumPlusExclusive = ({\n user,\n customerExclusivity\n}: Props) => {\n const mounted = useIsMounted();\n if (!customerExclusivity) {\n return null;\n }\n const displayExclusiveTag = (customerExclusivity.allowPlatinumToPurchase || customerExclusivity.allowWebstaurantPlusToPurchase) && !canCustomerPurchase(customerExclusivity, user);\n return <>\n {mounted && displayExclusiveTag &&
    \n Temporarily Unavailable\n
    }\n ;\n};\nexport default CarouselPlatinumPlusExclusive;","import React, { useState } from \"react\";\nimport { cls } from \"@wss/cls\";\nimport { range } from \"range\";\nimport getMinBuyForQuantityDropdown from \"../Pricing/AddToCart/getMinBuyForQuantityDropdown\";\ninterface Props {\n minBuy: number;\n mustBuy: number;\n useSingleItemStyle: boolean;\n extraQuantityContainerClassName?: string;\n handleQuantityChange: (event: React.ChangeEvent) => void;\n}\nconst CarouselQuantityDropdown = ({\n minBuy,\n mustBuy,\n useSingleItemStyle,\n handleQuantityChange,\n extraQuantityContainerClassName = \"\"\n}: Props) => {\n const [quantityChanged, setQuantityChanged] = useState(false);\n const numberOfOptions = 15;\n const startQuantity = getMinBuyForQuantityDropdown({\n minBuy,\n mustBuy\n });\n const handleOnChange = (event: React.ChangeEvent) => {\n setQuantityChanged(true);\n handleQuantityChange(event);\n };\n return
    \n
    \n \n {!useSingleItemStyle && }\n
    \n
    ;\n};\nexport default CarouselQuantityDropdown;","import React from \"react\";\ninterface Props {\n customizationUrl: string;\n itemNumber: string;\n}\nconst CustomizeButton = ({\n customizationUrl,\n itemNumber\n}: Props) => {\n return ;\n};\nexport default CustomizeButton;","/* eslint-disable jsx-a11y/anchor-is-valid */\nimport React, { Suspense, useEffect, useState } from \"react\";\nimport ct from \"class-types.macro\";\nimport ReactDOM from \"react-dom\";\nimport CheckHttpStatus from \"fetch-check-http-status\";\nimport { logErrorMessage } from \"@wss/error-tracking\";\nimport Modal, { Body, Header } from \"~/common/ModalReact\";\nimport useIsMounted from \"~/common/useIsMounted\";\nimport { valid } from \"~/common/Email/EmailValidator\";\ninterface Props {\n emailAddress: string;\n itemNumber: string;\n}\nconst NotifyMeButton = ({\n emailAddress,\n itemNumber\n}: Props) => {\n const isMounted = useIsMounted();\n const [email, setEmail] = useState(\"\");\n const [openModal, setOpenModal] = useState(false);\n const [notifyRequested, setNotifyRequested] = useState(false);\n const [showError, setShowError] = useState(false);\n const [noEmailError, setNoEmailError] = useState(false);\n useEffect(() => {\n setEmail(String(emailAddress));\n }, [emailAddress]);\n const handleEmailChange = (event: React.ChangeEvent) => {\n const newEmail = String(event.target.value);\n setShowError(false);\n setNoEmailError(false);\n setEmail(newEmail);\n };\n const clearForm = () => {\n setShowError(false);\n setNoEmailError(false);\n setNotifyRequested(false);\n setEmail(\"\");\n };\n const handleRequestNotification = async (event: React.SyntheticEvent) => {\n event.preventDefault();\n if (!email) {\n return setNoEmailError(true);\n }\n if (!valid({\n emailAddress: email\n })) {\n return setShowError(true);\n }\n const apiUrl = \"/api/customers/notifications/productavailability/add\";\n const request = {\n itemnumber: itemNumber,\n email\n };\n await fetch(apiUrl, {\n method: \"POST\",\n headers: {\n \"Content-type\": \"application/json\"\n },\n body: JSON.stringify(request)\n }).then(CheckHttpStatus).catch(error => {\n logErrorMessage(error, \"info\");\n return setShowError(true);\n });\n if (!showError) {\n const {\n emailSignupEvent\n } = await import(\"~/gtm\");\n emailSignupEvent(email);\n return setNotifyRequested(true);\n }\n return setNotifyRequested(false);\n };\n return <>\n {isMounted && ReactDOM.createPortal(\n {\n clearForm();\n setOpenModal(false);\n }} className={`${ct(\"md:max-w-sm\")}`}>\n
    {\n clearForm();\n setOpenModal(false);\n }}>\n

    \n Notify Me\n

    \n
    \n \n {notifyRequested ?

    \n We will notify you when this product is available. To make\n sure you receive our email, please add \n \n help@webstaurantstore.com\n \n  to your address book.\n

    :
    \n Notify me when this product is back in stock.\n
    \n
    \n
    \n \n \n
    \n
    \n \n
    \n
    \n\n {(noEmailError || showError) &&
    \n {showError && <>\n Error sending email address.\n
    \n Please try again or email{\" \"}\n \n help@webstaurantstore.com\n \n }\n {noEmailError && \"Please enter an email address\"}\n
    }\n
    \n
    }\n \n
    \n
    ,\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n document.querySelector(\"body\") as Element)}\n
    \n
    \n \n Out Of Stock\n \n \n
    \n
    \n ;\n};\nexport default NotifyMeButton;","import React from \"react\";\nimport setWindowLocationHref from \"~/common/navigation/setWindowLocationHref\";\ninterface Props {\n productLink: string;\n containsQuantityDropdown?: boolean;\n showQuantityDropdown?: boolean;\n}\nconst ViewDetailsButton = ({\n productLink,\n containsQuantityDropdown,\n showQuantityDropdown\n}: Props) => {\n const handleViewDetailsClick = (event: React.SyntheticEvent) => {\n event?.preventDefault();\n setWindowLocationHref(productLink);\n };\n return
    \n
    \n \n
    \n
    ;\n};\nexport default ViewDetailsButton;","import React from \"react\";\nimport setWindowLocationHref from \"~/common/navigation/setWindowLocationHref\";\nimport { ProductReplacement } from \"../ProductDetailPageResult\";\ninterface Props {\n productReplacement: ProductReplacement;\n containsQuantityDropdown?: boolean;\n showQuantityDropdown?: boolean;\n}\nconst ViewReplacementButton = ({\n productReplacement,\n containsQuantityDropdown,\n showQuantityDropdown\n}: Props) => {\n const {\n replacementLink\n } = productReplacement;\n const handleViewReplacementClick = (event: React.SyntheticEvent) => {\n event?.preventDefault();\n setWindowLocationHref(replacementLink);\n };\n return
    \n
    \n \n
    \n
    ;\n};\nexport default ViewReplacementButton;","/* eslint-disable jsx-a11y/alt-text */\nimport React from \"react\";\nimport placeholder from \"./placeholder-img.png\";\ninterface Props extends React.ImgHTMLAttributes {\n dataTestId?: string;\n disable?: boolean;\n}\nexport default (props: Props) => {\n const {\n dataTestId,\n disable,\n ...forwardProps\n } = props;\n return disable ? : {\n e.currentTarget.src = placeholder;\n }} />;\n};","import { useState, useEffect } from \"react\";\n\nfunction useIsGtmLoaded(timeout = 5000) {\n const [status, setStatus] = useState(false);\n const [error, setError] = useState();\n\n useEffect(() => {\n let rafId: number;\n\n // Set a timeout to stop things when duration time elapses\n const timerStop = setTimeout(() => {\n cancelAnimationFrame(rafId);\n setError(new Error(\"Timeout. Google analytics not injected!\"));\n }, timeout);\n // Function to be executed on each animation frame\n function check() {\n const ga =\n window.google_tag_manager !== undefined ||\n typeof window.ga !== \"undefined\";\n if (ga) {\n setStatus(true);\n clearTimeout(timerStop);\n } else {\n rafId = requestAnimationFrame(check);\n }\n }\n\n // Start the loop\n check();\n\n return () => {\n cancelAnimationFrame(rafId);\n clearTimeout(timerStop);\n };\n }, [timeout]);\n\n return [status, error];\n}\n\nexport default useIsGtmLoaded;\n","import { Validations } from \"./validations\";\n\nexport default class ValidationError {\n public message: string;\n\n public source: Validations;\n\n public sourceName?: string;\n\n public constructor(\n message: string,\n source: Validations,\n sourceName?: string\n ) {\n this.message = message;\n this.source = source;\n this.sourceName = sourceName;\n }\n}\n","// Add to Cart request logic for Product Detail Page.\n// See \"productListing/ProductBox/AddToCart/request.ts\" for Product Listing Page.\nimport { ThrowableStatus } from \"@wss/error-tracking/throwable\";\nimport {\n addToCartAnalytics,\n AtcAnalyticsProps,\n} from \"~/analytics/AddToCart/addToCartAnalytics\";\nimport Store from \"~/common/Store\";\nimport { incrementItemsInCart } from \"~/common/Store/actions/user\";\n\nexport interface AddToCartProduct {\n itemNumber: string;\n price: number;\n minimumBuy: number;\n mustBuy: number;\n feedIdentifier: string;\n outletId?: number;\n originalId?: string;\n isVirtualPart?: boolean;\n description?: string;\n link?: string;\n}\n\nconst tryParseError = async (\n response: Response\n): Promise => {\n try {\n return await response.json();\n } catch (e) {\n return null;\n }\n};\n\nconst isCartLimitError = (errorMessage: string) => {\n return (\n errorMessage ===\n \"You have reached the maximum amount of items for a single order. Please place your order, so you can continue to purchase items on a second separate order.\"\n );\n};\n\ntype ViewCartSuccessResponse = Record;\ntype ViewCartErrorResponse = { errorMessage: string };\ntype ViewCartResponse = ViewCartSuccessResponse | ViewCartErrorResponse;\n\nconst getResponse = async (\n body: FormData\n): Promise> => {\n try {\n const response = await fetch(\"/viewcart.cfm\", {\n body,\n method: \"POST\",\n credentials: \"include\",\n });\n\n if (!response.ok) {\n const errorJson = await tryParseError(response);\n return {\n isError: true,\n status: response.status,\n error: new Error(errorJson?.errorMessage ?? response.statusText),\n };\n }\n\n const data: ViewCartSuccessResponse = await response.json();\n return { isError: false, value: data };\n } catch (error) {\n return {\n isError: true,\n status: null,\n error: new Error(\"There was an error with the 'viewcart.cfm' endpoint\", {\n cause: error,\n }),\n };\n }\n};\n\nconst buildBaseRequestBody = (\n requestItemNumber: string,\n product: AddToCartProduct,\n quantity: number\n) => {\n const {\n itemNumber,\n isVirtualPart,\n outletId,\n price,\n minimumBuy,\n mustBuy,\n feedIdentifier,\n description,\n link,\n } = product;\n\n const body = new FormData();\n\n body.set(\"from\", \"add\");\n body.set(\"price\", price.toString());\n body.set(\"mnbuy\", minimumBuy.toString());\n body.set(\"mxbuy\", mustBuy.toString());\n body.set(\"feed_identifier\", feedIdentifier);\n body.set(\"item_number\", requestItemNumber);\n body.set(\"qty\", quantity.toString());\n if (outletId) {\n body.set(\n \"description\",\n `Outlet Item #${outletId} (${itemNumber.toUpperCase()})`\n );\n }\n\n if (isVirtualPart) {\n if (description) {\n body.set(\"description\", description);\n }\n\n if (link) {\n body.set(\"link\", link);\n }\n }\n\n return body;\n};\n\ninterface Params {\n product: AddToCartProduct;\n quantity: number;\n autoReorderInterval?: string;\n serviceTierPricingIds?: number[];\n accessoryIds?: number[];\n warrantyPlanId?: number;\n isSample?: boolean;\n openCartLimitModal?: (cartLimitMessage: string) => void;\n gtmAtcProps: AtcAnalyticsProps;\n}\n\nconst request = async ({\n product,\n quantity,\n autoReorderInterval = \"0\",\n serviceTierPricingIds = [],\n accessoryIds = [],\n warrantyPlanId = 0,\n isSample = false,\n openCartLimitModal,\n gtmAtcProps,\n}: Params): Promise => {\n const { itemNumber, originalId, isVirtualPart, outletId } = product;\n\n let requestItemNumber = itemNumber;\n if (outletId) {\n requestItemNumber = \"OUTLET\";\n } else if (isVirtualPart && originalId) {\n requestItemNumber = originalId;\n }\n\n try {\n const body = buildBaseRequestBody(requestItemNumber, product, quantity);\n if (accessoryIds.length > 0) {\n body.set(\"accessories\", accessoryIds.join());\n }\n\n if (serviceTierPricingIds.length > 0) {\n body.set(\"serviceTierPricingIds\", serviceTierPricingIds.join());\n }\n\n if (warrantyPlanId > 0) {\n body.set(\"productWarrantyId\", warrantyPlanId.toString());\n }\n\n body.set(\"auto_reorder_interval_id\", autoReorderInterval);\n body.set(\"dynamicadd\", \"1\");\n body.set(\"isSample\", isSample.toString());\n\n const response = await getResponse(body);\n if (response.isError) {\n const errorMessage = response.error.message;\n const isLimitError = isCartLimitError(errorMessage);\n\n if (isLimitError) {\n openCartLimitModal?.(errorMessage);\n }\n return false;\n }\n\n Store.dispatch(incrementItemsInCart(quantity));\n } catch (error) {\n return false;\n }\n\n addToCartAnalytics(gtmAtcProps, { itemNumber: requestItemNumber, quantity });\n return true;\n};\n\nexport default request;\n","import React from \"react\";\nimport { AutoReorder } from \"~/ProductDetails/ProductDetailPageResult\";\nimport isGroupMemberSelected from \"../isGroupMemberSelected\";\nimport { AccessorySelections } from \"./Accessories\";\nimport getMinBuyForQuantityDropdown from \"./getMinBuyForQuantityDropdown\";\nimport ValidationError from \"./ValidationError\";\n\nexport const createVgSelectionError = () => {\n const validationMessage = \"Please select required product options.\";\n\n return new ValidationError(\n validationMessage,\n groupingSelected,\n \"vgSelection\"\n );\n};\n\nexport const minimumQuantity = ({\n product,\n quantity,\n}: {\n product: ValidationProduct;\n quantity: number;\n}) => {\n const updatedStartBuy = getMinBuyForQuantityDropdown({\n minBuy: product.startBuy,\n mustBuy: product.mustBuy,\n });\n\n if (quantity < updatedStartBuy) {\n throw new ValidationError(\n `Please enter a quantity of ${updatedStartBuy} or more.`,\n minimumQuantity\n );\n }\n};\n\nexport const mustBuy = ({\n product,\n quantity,\n}: {\n product: ValidationProduct;\n quantity: number;\n}) => {\n if (quantity % product.mustBuy) {\n throw new ValidationError(\n `Please enter a quantity as a multiple of ${product.mustBuy}.`,\n mustBuy\n );\n }\n};\n\nexport const groupingSelected = ({\n product,\n}: {\n product: ValidationProduct;\n}) => {\n const hasSelectedGroupMember = isGroupMemberSelected(product);\n\n if (!hasSelectedGroupMember) {\n const validationError = createVgSelectionError();\n\n throw validationError;\n }\n};\n\nexport const autoReorder = ({\n autoReorderSelections = {\n isToggleEnabled: false,\n isAddToExistingAutoReorder: false,\n newAutoReorderInterval: \"0\",\n selectedExistingAutoReorder: {\n isActive: false,\n name: \"\",\n creditCardId: 0,\n desiredOrderDate: \"\",\n id: 0,\n },\n },\n}: {\n autoReorderSelections?: AutoReorder;\n}) => {\n if (autoReorderSelections?.isToggleEnabled) {\n if (autoReorderSelections.isAddToExistingAutoReorder) {\n if (autoReorderSelections.selectedExistingAutoReorder.id === 0) {\n throw new ValidationError(\n \"Please select an existing Auto Reorder\",\n autoReorder\n );\n }\n } else if (autoReorderSelections.newAutoReorderInterval === \"0\") {\n throw new ValidationError(\n \"Please Select Auto Reorder interval\",\n autoReorder\n );\n }\n }\n};\n\nexport const accessories = ({\n product,\n accessorySelections = {},\n setInvalidAccessories,\n}: {\n product: ValidationProduct;\n accessorySelections?: AccessorySelections;\n setInvalidAccessories?: React.Dispatch<\n React.SetStateAction\n >;\n}) => {\n if (!product.accessories) {\n return;\n }\n\n const invalidAccessories: string[] = [];\n product.accessories.forEach((accessory) => {\n if (!accessory.required || accessorySelections[accessory.name]) return;\n\n invalidAccessories.push(accessory.name);\n });\n\n setInvalidAccessories?.(invalidAccessories);\n\n if (invalidAccessories.length > 0) {\n throw new ValidationError(\n \"Please select required accessories and options.\",\n accessories\n );\n }\n};\n\nexport type Validations =\n | typeof groupingSelected\n | typeof mustBuy\n | typeof minimumQuantity\n | typeof autoReorder\n | typeof accessories;\n\nexport interface ValidationProduct {\n grouping: boolean;\n groupingAttributes: {\n isVirtual: boolean;\n groupMembers: {\n configurationOptions: { name: string; value: string }[];\n itemNumber: string;\n }[];\n };\n itemNumber: string;\n mustBuy: number;\n startBuy: number;\n accessories?: {\n name: string;\n required: boolean;\n options: {\n id: number;\n description: string;\n }[];\n }[];\n}\ninterface Params {\n product: ValidationProduct;\n quantity: number;\n autoReorderSelections?: AutoReorder;\n accessorySelections?: AccessorySelections;\n setInvalidAccessories?: React.Dispatch<\n React.SetStateAction\n >;\n validationsToRun?: (({\n product,\n quantity,\n autoReorderSelections,\n accessorySelections,\n setInvalidAccessories,\n }: {\n product: ValidationProduct;\n quantity: number;\n autoReorderSelections?: AutoReorder;\n accessorySelections?: AccessorySelections;\n setInvalidAccessories?: React.Dispatch<\n React.SetStateAction\n >;\n }) => void)[];\n}\n\nexport const getValidationError = ({\n product,\n quantity,\n autoReorderSelections,\n accessorySelections,\n setInvalidAccessories,\n validationsToRun = [\n groupingSelected,\n minimumQuantity,\n mustBuy,\n accessories,\n autoReorder,\n ],\n}: Params): ValidationError | undefined => {\n try {\n for (const validation of validationsToRun) {\n validation({\n product,\n quantity,\n autoReorderSelections,\n setInvalidAccessories,\n accessorySelections,\n });\n }\n\n return undefined;\n } catch (error) {\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n return error as ValidationError;\n }\n};\n","interface Product {\n grouping: boolean;\n groupingAttributes: { groupMembers: { itemNumber: string }[] };\n itemNumber: string;\n}\n\nexport default ({\n grouping,\n groupingAttributes,\n itemNumber,\n}: Product): boolean => {\n return (\n !grouping ||\n !!groupingAttributes?.groupMembers?.some(\n (x) => x.itemNumber.toLowerCase() === itemNumber?.toLowerCase()\n )\n );\n};\n","import { useState, useEffect } from \"react\";\n\nconst useResizeObserver = () => {\n const [width, setWidth] = useState(window.innerWidth);\n useEffect(() => {\n const observer = new ResizeObserver(() => {\n setWidth(window.innerWidth);\n });\n observer.observe(document.body);\n return function widthObserverCleanup() {\n observer.disconnect();\n };\n }, []);\n return { width };\n};\nexport default useResizeObserver;\n","import { CustomerExclusivity } from \"./ProductDetailPageResult\";\nimport { User } from \"~/common/Store/models/User\";\n\nexport default (customerExclusivity?: CustomerExclusivity, user?: User) => {\n return !!(\n !customerExclusivity?.disallowNonMemberToPurchase ||\n (customerExclusivity?.allowPlatinumToPurchase && user?.platinum?.enabled) ||\n (customerExclusivity?.allowWebstaurantPlusToPurchase && user?.hasWebPlus)\n );\n};\n","// eslint-disable-next-line import/prefer-default-export\nexport const pageTypes = {\n Home: \"Home\",\n};\n\n// Populates the href attribute of an anchor tag to send the user to the homepage\nexport const homepage = \"/\";\n"],"names":["useSingleItemStyle","formId","product","userEmail","addCarouselItemToCart","containsQuantityDropdown","setIsQuantityShown","extraQuantityContainerClassName","minimumBuy","mustBuy","hasAccessories","isHandlingAddToCartCall","inputRef","useRef","formClassName","updatedStartBuy","getMinBuyForQuantityDropdown","minBuy","useState","loadingAccessories","setLoadingAccessories","accessories","setAccessories","forceShowingCustomQuantity","setShowQuantityInput","errorMessage","setErrorMessage","showQuantityDropdown","toString","quantity","setQuantity","useEffect","Notification","closeAll","handleQuantityChange","event","inputValue","target","value","quantityValue","Number","isNaN","loadAccessories","data","fetchAccessories","itemNumber","AddToCart","openModals","accessoriesList","validationError","addToCartProduct","modalsToOpen","push","length","getValidationError","grouping","groupingAttributes","isVirtual","groupMembers","startBuy","message","imageUrl","imagePath","heading","ReactDOMServer","renderToString","SuccessMessage","href","body","description","buttonText","secondButtonText","secondHref","addToCartRequest","accessoryIds","map","x","gtmAtcProps","source","carouselProps","getCarouselProps","current","join","useAddToCartModals","onComplete","results","activeModal","closeModal","submitModal","handleAddToCart","preventDefault","isAccessoriesModalOpen","ProductModals","AccessoriesModal","isOpen","showViewDetails","showViewReplacement","isReplacementEligible","showOutOfStock","outOfStock","displayRequiredCustomization","shouldDisplayRequiredCustomization","showAddToCart","undefined","data-sentry-element","data-sentry-source-file","ViewDetailsButton","productLink","link","CustomizeButton","customizationUrl","String","NotifyMeButton","emailAddress","ViewReplacementButton","productReplacement","div","className","form","action","id","method","aria-live","p","QuantityDropdown","input","autoComplete","type","name","aria-label","onChange","data-testid","aria-describedby","ref","onClick","data-action","mapStateToProps","state","user","connect","item","addToCartFormId","setContainsQuantityDropdown","activeSalePricingClassNames","isCartCarousel","styleObj","bottom","left","plusRibbon","a","style","visibility","isWebstaurantPlusEligible","span","image","title","data-label","feedIdentifier","NoScriptLazyImage","alt","src","width","height","relatedItemsImage","itemPrice","cls","data-component","displaySalePrice","SaleBadgeAndPricing","price","salePricingClassNames","saleBadgeExtraClassNames","formatAsCurrency","formatIfUndefined","salePrice","unitOfMeasure","productDescription","addToCartItem","li","data-item-number","gtm-tracking-number","CarouselPlatinumPlusExclusive","customerExclusivity","isNonExclusiveForPlatinumPlusProduct","starsItem","PlusLink","iconProps","Stars","rating","overallRating","categoryItem","data-target","lineHeight","fontSize","categoryItemCount","categoryItemDescription","isCategory","mounted","useIsMounted","displayExclusiveTag","allowPlatinumToPurchase","allowWebstaurantPlusToPurchase","canCustomerPurchase","quantityChanged","setQuantityChanged","startQuantity","data-sentry-component","select","defaultValue","padding","range","index","option","i","toLowerCase","button","isMounted","email","setEmail","openModal","setOpenModal","notifyRequested","setNotifyRequested","showError","setShowError","noEmailError","setNoEmailError","clearForm","handleRequestNotification","request","valid","itemnumber","fetch","headers","JSON","stringify","then","CheckHttpStatus","catch","error","logErrorMessage","emailSignupEvent","ReactDOM","createPortal","Suspense","fallback","Modal","onRequestClose","ct","Header","h3","Body","textAlign","strong","onSubmit","marginTop","placeholder","maxLength","newEmail","label","br","document","querySelector","setWindowLocationHref","replacementLink","props","dataTestId","disable","forwardProps","img","loading","onError","e","currentTarget","timeout","status","setStatus","setError","rafId","timerStop","setTimeout","cancelAnimationFrame","Error","check","window","google_tag_manager","ga","clearTimeout","requestAnimationFrame","ValidationError","sourceName","this","tryParseError","response","json","getResponse","errorJson","credentials","ok","isError","statusText","cause","autoReorderInterval","serviceTierPricingIds","warrantyPlanId","isSample","openCartLimitModal","originalId","isVirtualPart","outletId","requestItemNumber","isLimitError","FormData","set","toUpperCase","buildBaseRequestBody","isCartLimitError","Store","dispatch","incrementItemsInCart","addToCartAnalytics","createVgSelectionError","minimumQuantity","groupingSelected","autoReorder","isGroupMemberSelected","autoReorderSelections","isToggleEnabled","isAddToExistingAutoReorder","newAutoReorderInterval","selectedExistingAutoReorder","isActive","creditCardId","desiredOrderDate","accessorySelections","setInvalidAccessories","invalidAccessories","forEach","accessory","required","validationsToRun","validation","some","innerWidth","setWidth","observer","ResizeObserver","observe","disconnect","disallowNonMemberToPurchase","platinum","enabled","hasWebPlus","pageTypes","homepage","Home"],"sourceRoot":""}