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AII,EAAKf,EAAchB,EAAK2B,GACxBI,GACFT,EAAOV,YAAYoB,KAAKD,MAIrBT,EAKgCW,CAASjC,EAAK,oBAG3DA,EAAIkC,WAAa","sources":["webpack://nushopweb/./packages/client/src/components/ClientRedirect/index.tsx","webpack://nushopweb/./packages/client/src/containers/ProductDetailContainer/ProductDetail/ProductBaseInfo/Accessories/messages.ts","webpack://nushopweb/./packages/client/src/containers/ProductDetailContainer/ProductDetail/ProductBaseInfo/Accessories/styled.ts","webpack://nushopweb/./packages/client/src/containers/ProductDetailContainer/ProductDetail/ProductBaseInfo/Accessories/components/ShowOtherVariants.tsx","webpack://nushopweb/./packages/client/src/containers/ProductDetailContainer/ProductDetail/ProductBaseInfo/Accessories/components/Unavailable.tsx","webpack://nushopweb/./packages/client/src/containers/ProductDetailContainer/ProductDetail/ProductBaseInfo/Accessories/tracking.ts","webpack://nushopweb/./packages/client/src/containers/ProductDetailContainer/ProductDetail/ProductBaseInfo/Accessories/AccessoriesContent.tsx","webpack://nushopweb/./packages/client/src/containers/ProductDetailContainer/ProductDetail/ProductBaseInfo/Accessories/Accessories.tsx","webpack://nushopweb/./packages/client/src/helpers/googleTagManager/useGetTrackMasterAddToCartFail.ts","webpack://nushopweb/./packages/client/src/containers/WishList/components/WishlistPager/tracking.ts","webpack://nushopweb/./packages/client/src/containers/WishList/constants.ts","webpack://nushopweb/./packages/client/src/containers/ProductDetailContainer/ProductDetail/ProductBaseInfo/queries/getProductsImages.graphql"],"sourcesContent":["import * as React from 'react';\nimport { Link } from 'react-router-dom';\n\nimport { ReactFCC } from '@notino/react-styleguide';\nimport { masterUrl } from '@notino/shared/client-utils';\n\nimport { useModifyCacheAndChangePathname } from './useHandleClientRedirect';\n\nexport interface IClientRedirectProps {\n product: {\n url: string;\n id: string | number;\n masterId: string | number;\n catalogMasterId: string | number;\n };\n useMasterUrl: boolean;\n}\n\nexport const ClientRedirect: ReactFCC = ({\n children,\n useMasterUrl,\n product,\n}) => {\n const modifyCacheAndChangePathname = useModifyCacheAndChangePathname();\n\n const handleOnClick = () => {\n modifyCacheAndChangePathname(product);\n };\n\n return (\n \n {children}\n \n );\n};\n","import { defineMessages } from 'react-intl';\n\nexport const accessoriesMessages = defineMessages({\n accessoriesPopupBoxText: {\n id: 'pd.accessories.popupBox',\n defaultMessage:\n 'Tento produkt má příslušentví, které se vám bude hodit ({count})',\n },\n accessoriesContentTitle: {\n id: 'pd.accessories.content.title',\n defaultMessage: 'Příslušenství pro {productName} ({count})',\n },\n accessoriesShowOtherVariants: {\n id: 'pd.accessories.show.other.variants',\n defaultMessage: 'Zobrazit varianty',\n },\n});\n","import styled, { css } from 'styled-components';\n\nimport {\n breakpoints,\n ProductSliderPlaceholder,\n theme,\n} from '@notino/react-styleguide';\n\nexport const Title = styled.div`\n ${theme.typography.titleLarge}\n text-align: center;\n`;\n\nexport const StyledLoadingPlaceholder = styled(ProductSliderPlaceholder)<{\n center: boolean;\n}>`\n margin: 1.25rem 0 2.25rem;\n\n @media (min-width: ${breakpoints.md}) {\n margin: 2.25rem 0 2rem;\n }\n\n ${({ center }) =>\n center &&\n css`\n justify-content: center;\n `}\n`;\n\nexport const SliderWrapper = styled.div<{ centerSlider: boolean }>`\n margin: 1.25rem 0 0.25rem;\n\n [data-testid='phone-slider'] {\n padding: 0 1.25rem 2rem;\n\n ${({ centerSlider }) =>\n centerSlider &&\n css`\n justify-content: center;\n `}\n }\n\n @media (min-width: ${breakpoints.md}) {\n margin: 2.25rem 0 2rem;\n\n ${({ centerSlider }) =>\n centerSlider &&\n css`\n [data-testid='desktop-slider'] > div {\n justify-content: center;\n }\n `}\n }\n`;\n\nexport const UnavailableWrapper = styled.p`\n ${theme.typography.labelSmall};\n color: ${theme.color.text.highlight};\n margin-top: 1rem;\n`;\n\nexport const OtherVariantsWrapper = styled.div`\n display: block;\n color: ${theme.color.text.primary};\n ${theme.typography.labelRegular};\n margin-top: 1.5rem;\n`;\n","import * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport {\n ClientRedirect,\n IClientRedirectProps,\n} from '@components/ClientRedirect';\n\nimport { accessoriesMessages } from '../messages';\nimport { OtherVariantsWrapper } from '../styled';\n\ninterface ShowOtherVariantsLinkProps {\n product: IClientRedirectProps['product'];\n}\n\nexport const ShowOtherVariantsLink: React.FC = ({\n product,\n}) => {\n return (\n \n \n \n \n \n );\n};\n","import * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport { messages } from '../../Variants/VariantsTile/messages';\nimport { UnavailableWrapper } from '../styled';\n\nexport const Unavailable = () => {\n return (\n \n \n \n );\n};\n","import { GetProductsByIdBatchedQuery } from 'packages/shared/definitions/types';\n\nimport { dispatchTrackingEvent } from '@context/tracking/utils';\nimport { ProductEventWither } from '@helpers/googleTagManager';\n\nexport const GTM_LIST_LABEL = 'accessories';\n\ninterface TrackElementClickArgs {\n timing: number;\n name: string;\n type: string;\n action: string;\n interaction?: string;\n}\n\nexport const trackElementClick = ({\n action,\n name,\n timing,\n type,\n interaction = 'click',\n}: TrackElementClickArgs) => {\n dispatchTrackingEvent({\n event: 'element_click',\n _clear: true,\n element: {\n timing,\n interaction,\n name,\n type,\n action,\n },\n });\n};\n\nexport const trackAccessories = (\n products: GetProductsByIdBatchedQuery['vpProductByIds'],\n productIds: string[],\n interaction: 'scroll' | 'click'\n) => {\n const transformedProducts = products.map((product) =>\n ProductEventWither()\n .withVpProduct(product)\n .withDiscountPrices(product.attributes)\n .withAdditionalData({\n list_position:\n productIds.findIndex((id) => id === String(product.catalogId)) + 1,\n })\n .build()\n );\n\n dispatchTrackingEvent({\n event: 'view_item_list',\n _clear: true,\n product_lists: {\n list_name: GTM_LIST_LABEL,\n interaction,\n sorting_type: 'automatic',\n products: transformedProducts,\n },\n });\n};\n","import * as React from 'react';\n\nimport { useBreakpointValue } from '@notino/react-styleguide';\nimport {\n GetCatalogProductViewQuery,\n ProductIdType,\n StockAvailability,\n} from '@notino/shared/definitions/types';\n\nimport { ProductSlider } from '@components/ProductSlider';\nimport { useGetProductItemProps } from '@components/Universals/ProductItem/useGetProductItemProps';\nimport {\n useTrackToCartAsync,\n useTrackToCartFailedAsync,\n} from '@containers/WishList/components/WishlistPager/tracking';\nimport { useTrackingContext } from '@context/tracking/TrackingContext';\n\nimport { useProductsByIdsBatched } from '../../ProductsSection/useProductsByIdsBatched';\n\nimport { ShowOtherVariantsLink } from './components/ShowOtherVariants';\nimport { Unavailable } from './components/Unavailable';\nimport { SliderWrapper, StyledLoadingPlaceholder } from './styled';\nimport {\n GTM_LIST_LABEL,\n trackAccessories,\n trackElementClick,\n} from './tracking';\n\nconst ITEMS_PER_SLIDE = 3;\n\ntype AccessoriesContentProps = {\n accessories: GetCatalogProductViewQuery['productDetailByCatalogMasterId']['features']['accessories'];\n};\n\nexport const AccessoriesContent: React.FC = ({\n accessories,\n}) => {\n const isDesktop = useBreakpointValue({ md: true });\n const isAlreadyTracked = React.useRef(false);\n const mobileSliderRef = React.useRef();\n\n const catalogIds = accessories.products.map(\n (product) => `${product.catalogId}`\n );\n const { getTimeFromInit } = useTrackingContext();\n\n const { data, loading } = useProductsByIdsBatched(catalogIds, {\n idType: ProductIdType.Catalog,\n });\n\n const placeholderCount = Math.min(\n accessories.products.length,\n ITEMS_PER_SLIDE\n );\n const centerPlaceholder = placeholderCount < ITEMS_PER_SLIDE;\n\n const trackAddToCartFailedAsync = useTrackToCartFailedAsync(\n catalogIds,\n GTM_LIST_LABEL,\n true\n );\n const trackAddToCardAsync = useTrackToCartAsync(\n catalogIds,\n GTM_LIST_LABEL,\n true\n );\n\n const getProductItemProps = useGetProductItemProps({\n noPriceIfUnavailable: false,\n useMasterUrl: true,\n inSectionOfType: 'slider',\n wishlistActionLocation: 'list',\n showBuyButton: true,\n showAddToCartModal: false,\n onProductAddFailed: trackAddToCartFailedAsync,\n onProductAdded: trackAddToCardAsync,\n GTMEventLabel: GTM_LIST_LABEL,\n });\n\n React.useEffect(() => {\n if (!data || isAlreadyTracked.current) {\n return;\n }\n\n trackAccessories(\n data.vpProductByIds,\n catalogIds,\n isDesktop ? 'click' : 'scroll'\n );\n isAlreadyTracked.current = true;\n }, [data, isDesktop, isAlreadyTracked, catalogIds]);\n\n const products =\n data?.vpProductByIds\n .map((product, index) => {\n const isOutOfStock =\n product.stockAvailability.code.toLocaleLowerCase() ===\n StockAvailability.OutOfStock.toLocaleLowerCase();\n\n const hasOtherVariants = product.attributes?.HasOtherVariants;\n\n const unavailable = isOutOfStock && ;\n\n const otherVariants = hasOtherVariants && (\n \n );\n\n const appendComponent = unavailable || otherVariants;\n\n return getProductItemProps({\n product,\n position: index + 1,\n appendComponent,\n shouldHideItemBuyButton: hasOtherVariants,\n });\n })\n .filter(Boolean) ?? [];\n\n const onNewItemShow = React.useCallback(() => {\n if (isDesktop) {\n return;\n }\n\n if (mobileSliderRef?.current?.scrollLeft === 0) {\n return;\n }\n\n trackElementClick({\n timing: getTimeFromInit(),\n interaction: 'swipe',\n name: 'accessories_slide',\n type: 'accessories',\n action: 'accessories_slide',\n });\n }, [getTimeFromInit, isDesktop]);\n\n const onSlideChange = () => {\n trackElementClick({\n timing: getTimeFromInit(),\n interaction: 'click',\n name: 'accessories_slide',\n type: 'accessories',\n action: 'accessories_slide',\n });\n };\n\n return (\n
\n {!data || loading ? (\n \n ) : (\n \n \n }\n />\n \n )}\n
\n );\n};\n","import * as React from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport { useQuery } from '@apollo/client';\n\nimport { ModalContext, ModalModel } from '@notino/react-styleguide';\nimport {\n GetProductImagesQuery,\n GetProductImagesQueryVariables,\n ProductIdType,\n} from '@notino/shared/definitions/types';\n\nimport { useDrawer } from '@components/BottomSheet/DrawerProvider';\nimport { trackDrawerClose } from '@components/BottomSheet/tracking';\nimport { useTrackingContext } from '@context/tracking/TrackingContext';\nimport { isDesktop } from '@utils/helpers';\n\nimport { PopupBox } from '../../../../../components/PopupBox';\nimport { useProductDetailContext } from '../../../ProductDetailContext';\nimport getProductImagesQuery from '../queries/getProductsImages.graphql';\n\nimport { AccessoriesContent } from './AccessoriesContent';\nimport { accessoriesMessages } from './messages';\nimport { Title } from './styled';\nimport { trackElementClick } from './tracking';\n\nconst Accessories = () => {\n const {\n product: {\n collection,\n brand: { name },\n features: { accessories },\n },\n } = useProductDetailContext();\n\n const { getTimeFromInit } = useTrackingContext();\n\n const { data, loading } = useQuery<\n GetProductImagesQuery,\n GetProductImagesQueryVariables\n >(getProductImagesQuery, {\n variables: {\n catalogIds: [String(accessories.products[0].catalogId)],\n idType: ProductIdType.Catalog,\n },\n ssr: false,\n });\n\n const { toggleModal, hideModal } = ModalContext.useModalContext();\n const { toggleDrawer } = useDrawer();\n\n const accessoryCount = accessories.products.length;\n\n const openModalOrDrawer = () => {\n trackElementClick({\n timing: getTimeFromInit(),\n action: 'accessories_open',\n type: 'accessories',\n name: 'accessories_open',\n interaction: 'click',\n });\n const productName = `${name} ${collection}`;\n const header = (\n \n <FormattedMessage\n {...accessoriesMessages.accessoriesContentTitle}\n values={{ productName, count: accessoryCount }}\n />\n \n );\n\n if (isDesktop()) {\n toggleModal(, {\n header,\n size: ModalModel.Sizes.large,\n onClose: () => {\n trackElementClick({\n timing: getTimeFromInit(),\n name: 'accessories_close',\n type: 'accessories',\n action: 'accessories_close',\n });\n hideModal();\n },\n });\n return;\n }\n\n toggleDrawer(, {\n header,\n onDismiss: (closeType) =>\n trackDrawerClose({\n closeType,\n timing: getTimeFromInit(),\n name: 'accessories_close',\n type: 'accessories',\n action: 'accessories_close',\n }),\n ...(accessoryCount >= 3 && { ignoreBodySwipe: true }),\n });\n };\n\n const imageUrl = !loading && data?.vpProductByIds?.[0]?.imageUrl;\n\n return (\n \n \n \n );\n};\n\nexport default Accessories;\n","import * as React from 'react';\n\nimport { useApolloClient } from '@apollo/client';\nimport { snakeCase } from 'lodash';\n\nimport {\n GetMasterProductInfoQuery,\n GetMasterProductInfoQueryVariables,\n} from '@notino/shared/definitions/types';\nimport { CartType } from '@notino/web-tracking';\n\nimport { dispatchTrackingEvent } from '@context/tracking/utils';\nimport getMasterProductInfoQuery from '@queries/masterProductInfo.graphql';\n\nimport { ProductEventWither } from './prepareProductInfo';\nimport { IVariantAddToCart } from './prepareProductInfo/model';\n\nexport const useGetTrackMasterAddToCartFail = (listName?: string) => {\n const client = useApolloClient();\n\n return React.useCallback(\n async (\n product: IVariantAddToCart,\n catalogMasterId: string,\n position: number,\n errorMessage: string\n ) => {\n const { data } = await client.query<\n GetMasterProductInfoQuery,\n GetMasterProductInfoQueryVariables\n >({\n query: getMasterProductInfoQuery,\n variables: { catalogMasterId },\n });\n\n const masterProduct = data.productDetailByCatalogMasterId;\n\n if (data) {\n dispatchTrackingEvent({\n event: 'add_to_cart_failed',\n add: {\n products: [\n ProductEventWither()\n .withPartialProduct({\n ...masterProduct,\n brand: masterProduct.brand,\n __typename: 'CatalogProduct',\n })\n .withVpProduct(product)\n .withAdditionalData({\n cart_type: snakeCase(CartType.cart),\n quantity: 1,\n list_position: position,\n ...(listName && { list_name: listName }),\n })\n .build(),\n ],\n },\n error: { status: errorMessage || '' },\n _clear: true,\n });\n }\n },\n [client, listName]\n );\n};\n","import {\n GetProductsByIdBatchedQuery,\n GetItemDataByIdQuery,\n} from '@notino/shared/definitions/types';\nimport { Interaction } from '@notino/web-tracking/dist/types/package/ga4/events/constants';\n\nimport {\n GTM_WISHLIST_LIST_NAME,\n GTM_WISHLIST_PAGE_TYPE,\n} from '@containers/WishList/constants';\nimport { dispatchTrackingEvent } from '@context/tracking/utils';\nimport {\n useGetMasterAddToCart,\n ProductEventWither,\n} from '@helpers/googleTagManager';\nimport { useGetTrackMasterAddToCartFail } from '@helpers/googleTagManager/useGetTrackMasterAddToCartFail';\n\nexport const trackWishlistProductListImpression = (\n products: GetProductsByIdBatchedQuery['vpProductByIds'],\n productIds: (string | number)[],\n interaction: Interaction\n) => {\n const transformedProducts = products.map((product) =>\n ProductEventWither()\n .withVpProduct(product)\n .withDiscountPrices(product.attributes, {\n shouldSendOnlyDiscountPrice: true,\n })\n .withAdditionalData({\n list_position:\n productIds.findIndex((id) => String(id) === product.id) + 1,\n })\n .build()\n );\n\n dispatchTrackingEvent({\n event: 'view_item_list',\n _clear: true,\n product_lists: {\n list_name: GTM_WISHLIST_LIST_NAME,\n interaction,\n sorting_type: 'automatic',\n products: transformedProducts,\n },\n });\n};\n\nexport const trackWishlistPageView = () => {\n dispatchTrackingEvent({\n event: 'page_view',\n page: {\n title: 'Wishlist',\n path: window.location.pathname,\n unified_name: 'wishlist',\n type: GTM_WISHLIST_PAGE_TYPE,\n subpage: undefined,\n },\n _clear: true,\n });\n};\n\n// TODO: `useTrackToCartAsync` and `useTrackToCartFailedAsync` temporarily use the `shouldUseCatalogId` parameter\n// to handle product identifiers, as Wishlist does not yet support `catalogId`.\n\n// The `shouldUseCatalogId` flag indicates which identifier to use: if `true`, it uses `catalogId`;\n// otherwise, it defaults to the existing `id`. This flag will be removed once Wishlist fully supports `catalogId`\n\nexport const useTrackToCartAsync = (\n productIds: (string | number)[],\n listName: string,\n shouldUseCatalogId?: boolean\n) => {\n const trackAddToCart = useGetMasterAddToCart(listName);\n return async (product: GetItemDataByIdQuery['vpProductById']) => {\n await trackAddToCart(\n product,\n product.catalogMasterId.toString(),\n productIds.findIndex(\n (id) =>\n String(id) ===\n String(product[shouldUseCatalogId ? 'catalogId' : 'id'])\n ) + 1\n );\n };\n};\n\nexport const useTrackToCartFailedAsync = (\n productIds: (string | number)[],\n listName: string,\n shouldUseCatalogId?: boolean\n) => {\n const track = useGetTrackMasterAddToCartFail(listName);\n return async (\n errorMessage: string,\n product: GetItemDataByIdQuery['vpProductById']\n ) => {\n await track(\n product,\n product.catalogMasterId.toString(),\n productIds.findIndex(\n (id) =>\n String(id) ===\n String(product[shouldUseCatalogId ? 'catalogId' : 'id'])\n ) + 1,\n errorMessage\n );\n };\n};\n","export const GTM_WISHLIST_LIST_NAME = 'wishlist';\nexport const GTM_WISHLIST_PAGE_TYPE = 'wishlist';\nexport const WISHLIST_PAGE_SIZE = 8;\n","\n var doc = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"getProductImages\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"catalogIds\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"ListType\",\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}}},\"directives\":[]},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"idType\"}},\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"ProductIdType\"}},\"directives\":[]}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"vpProductByIds\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"ids\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"catalogIds\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"idType\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"idType\"}}}],\"directives\":[],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"},\"arguments\":[],\"directives\":[]},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"imageUrl\"},\"arguments\":[],\"directives\":[]}]}}]}}],\"loc\":{\"start\":0,\"end\":154}};\n doc.loc.source = {\"body\":\"query getProductImages($catalogIds: [String!]!, $idType: ProductIdType) {\\n vpProductByIds(ids: $catalogIds, idType: $idType) {\\n id\\n imageUrl\\n }\\n}\\n\",\"name\":\"GraphQL request\",\"locationOffset\":{\"line\":1,\"column\":1}};\n \n\n var names = {};\n function unique(defs) {\n return defs.filter(\n function(def) {\n if (def.kind !== 'FragmentDefinition') return true;\n var name = def.name.value\n if (names[name]) {\n return false;\n } else {\n names[name] = true;\n return true;\n }\n }\n )\n }\n \n\n // Collect any fragment/type references from a node, adding them to the refs Set\n function collectFragmentReferences(node, refs) {\n if (node.kind === \"FragmentSpread\") {\n refs.add(node.name.value);\n } else if (node.kind === \"VariableDefinition\") {\n var type = node.type;\n if (type.kind === \"NamedType\") {\n refs.add(type.name.value);\n }\n }\n\n if (node.selectionSet) {\n node.selectionSet.selections.forEach(function(selection) {\n collectFragmentReferences(selection, refs);\n });\n }\n\n if (node.variableDefinitions) {\n node.variableDefinitions.forEach(function(def) {\n collectFragmentReferences(def, refs);\n });\n }\n\n if (node.definitions) {\n node.definitions.forEach(function(def) {\n collectFragmentReferences(def, refs);\n });\n }\n }\n\n var definitionRefs = {};\n (function extractReferences() {\n doc.definitions.forEach(function(def) {\n if (def.name) {\n var refs = new Set();\n collectFragmentReferences(def, refs);\n definitionRefs[def.name.value] = refs;\n }\n });\n })();\n\n function findOperation(doc, name) {\n for (var i = 0; i < doc.definitions.length; i++) {\n var element = doc.definitions[i];\n if (element.name && element.name.value == name) {\n return element;\n }\n }\n }\n\n function oneQuery(doc, operationName) {\n // Copy the DocumentNode, but clear out the definitions\n var newDoc = {\n kind: doc.kind,\n definitions: [findOperation(doc, operationName)]\n };\n if (doc.hasOwnProperty(\"loc\")) {\n newDoc.loc = doc.loc;\n }\n\n // Now, for the operation we're running, find any fragments referenced by\n // it or the fragments it references\n var opRefs = definitionRefs[operationName] || new Set();\n var allRefs = new Set();\n var newRefs = new Set();\n\n // IE 11 doesn't support \"new Set(iterable)\", so we add the members of opRefs to newRefs one by one\n opRefs.forEach(function(refName) {\n newRefs.add(refName);\n });\n\n while (newRefs.size > 0) {\n var prevRefs = newRefs;\n newRefs = new Set();\n\n prevRefs.forEach(function(refName) {\n if (!allRefs.has(refName)) {\n allRefs.add(refName);\n var childRefs = definitionRefs[refName] || new Set();\n childRefs.forEach(function(childRef) {\n newRefs.add(childRef);\n });\n }\n });\n }\n\n allRefs.forEach(function(refName) {\n var op = findOperation(doc, refName);\n if (op) {\n newDoc.definitions.push(op);\n }\n });\n\n return newDoc;\n }\n \n module.exports = doc;\n \n module.exports[\"getProductImages\"] = oneQuery(doc, \"getProductImages\");\n \n\ndoc.documentId = \"f6146abab7bd37229806f1f9c7821175a1994689806a90b4925d80cf480ff54a\""],"names":["ClientRedirect","_ref","children","useMasterUrl","product","modifyCacheAndChangePathname","useModifyCacheAndChangePathname","React","Link","to","masterUrl","url","onClick","handleOnClick","accessoriesMessages","defineMessages","accessoriesPopupBoxText","id","accessoriesContentTitle","accessoriesShowOtherVariants","Title","styled","componentId","theme","StyledLoadingPlaceholder","ProductSliderPlaceholder","withConfig","breakpoints","center","css","SliderWrapper","_ref2","centerSlider","_ref3","UnavailableWrapper","OtherVariantsWrapper","ShowOtherVariantsLink","FormattedMessage","Unavailable","messages","GTM_LIST_LABEL","trackElementClick","action","name","timing","type","interaction","dispatchTrackingEvent","event","_clear","element","AccessoriesContent","accessories","isDesktop","useBreakpointValue","md","isAlreadyTracked","mobileSliderRef","catalogIds","products","map","catalogId","getTimeFromInit","useTrackingContext","data","loading","useProductsByIdsBatched","idType","ProductIdType","placeholderCount","Math","min","length","centerPlaceholder","trackAddToCartFailedAsync","useTrackToCartFailedAsync","trackAddToCardAsync","useTrackToCartAsync","getProductItemProps","useGetProductItemProps","noPriceIfUnavailable","inSectionOfType","wishlistActionLocation","showBuyButton","showAddToCartModal","onProductAddFailed","onProductAdded","GTMEventLabel","current","trackAccessories","productIds","transformedProducts","ProductEventWither","withVpProduct","withDiscountPrices","attributes","withAdditionalData","list_position","findIndex","String","build","product_lists","list_name","sorting_type","vpProductByIds","index","isOutOfStock","stockAvailability","code","toLocaleLowerCase","StockAvailability","hasOtherVariants","HasOtherVariants","position","appendComponent","shouldHideItemBuyButton","filter","Boolean","onNewItemShow","scrollLeft","rows","ProductSlider","itemsPerSlide","mobileScrollContainerRef","inViewThreshold","onSlideChange","onItemShow","fallback","Accessories","collection","brand","features","useProductDetailContext","useQuery","getProductImagesQuery","variables","ssr","toggleModal","hideModal","ModalContext","toggleDrawer","useDrawer","accessoryCount","imageUrl","PopupBox","dataTestId","cdnImageUrl","openModalOrDrawer","productName","header","_extends","values","count","size","ModalModel","onClose","onDismiss","closeType","trackDrawerClose","ignoreBodySwipe","trackWishlistProductListImpression","shouldSendOnlyDiscountPrice","GTM_WISHLIST_LIST_NAME","trackWishlistPageView","page","title","path","window","location","pathname","unified_name","GTM_WISHLIST_PAGE_TYPE","subpage","undefined","listName","shouldUseCatalogId","trackAddToCart","useGetMasterAddToCart","async","catalogMasterId","toString","track","client","useApolloClient","errorMessage","query","getMasterProductInfoQuery","masterProduct","productDetailByCatalogMasterId","add","withPartialProduct","__typename","cart_type","_snakeCase","CartType","quantity","error","status","useGetTrackMasterAddToCartFail","WISHLIST_PAGE_SIZE","doc","collectFragmentReferences","node","refs","kind","value","selectionSet","selections","forEach","selection","variableDefinitions","def","definitions","loc","source","definitionRefs","findOperation","i","Set","module","exports","operationName","newDoc","hasOwnProperty","opRefs","allRefs","newRefs","refName","prevRefs","has","childRef","op","push","oneQuery","documentId"],"sourceRoot":""}