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qS,OACA0B,aACArC,YAEAwB,kBAEAY,SACC1C,GACI,KACDuC,GACFA,GACF,CACD,GAGH,CAEAP,MAAMC,QAAQ3B,GAAaA,EAAUc,WAAad,EAAWhS,EAAK2S,EAAM0B,EAAYC,EAAaC,EAAMf,EAAiB9B,EAAgB0C,IACxI,MAAMU,EAA8C,OAA/BJ,EAAeE,EAAMvB,YAAiB,EAASqB,EAAaxU,OAC3E6U,EAAsB,WAEvB/U,IAAO8U,GAAgBR,GAAgBC,GAAQQ,EAAoBvR,UAAYsR,IAGlFC,EAAoBvR,QAAUsR,EAC9BD,EAAS,CACP5T,SAAUuT,EACVnB,WAAO/S,KAIX,MAAMmI,EAAS,CAACkM,EAAQC,EAAM3T,OAAQ2T,EAAMvB,OAK5C,OAHA5K,EAAOzI,IAAMyI,EAAO,GACpBA,EAAOxH,OAASwH,EAAO,GACvBA,EAAO4K,MAAQ5K,EAAO,GACfA,CACT,CAhOqB,W","sources":["webpack:///./src/microApps/common/components/ButtonEpiLink/ButtonEpiLink.tsx","webpack:///./src/microApps/common/components/DynamicYieldBlock/DynamicYieldBlock.tsx","webpack:///./src/microApps/common/components/DynamicYieldBlock/DynamicYieldBuyableProductTeaser.tsx","webpack:///./src/microApps/common/components/DynamicYieldBlock/DynamicYieldFavoriteRecipeTeaser.tsx","webpack:///./src/microApps/common/components/FoodboxTeaser/FoodboxTeaser.tsx","webpack:///./src/microApps/common/components/ListBlock/ListBlockHeader.tsx","webpack:///./src/microApps/common/components/RecipeTeaser/RecipeTeaser.tsx","webpack:///./src/microApps/common/components/RecipeTeaser/RecipeTeaser.module.less","webpack:///./src/microApps/common/components/organisms/RecommendationsBlock.tsx","webpack:///./src/microApps/common/hooks/useRecipeEventsTracking.ts","webpack:///./src/microApps/ecommerce/hooks/useDynamicYieldRecommendations.ts","webpack:///./src/microApps/common/flow/dynamicYield/dynamicYield.utils.ts","webpack:///./src/microApps/ecommerce/hooks/useDynamicYieldTracking.ts","webpack:///./src/microApps/ecommerce/hooks/useProductTeaserContainer.ts","webpack:///./src/microApps/ecommerce/utils/recommendationUtils.ts","webpack:///./src/microApps/episerver/components/blocks/EpiButtonLinkPropertyBlock/epiButtonLinkPropertyBlock.utils.ts","webpack:///./src/microApps/episerver/components/blocks/EpiButtonPropertyBlock/EpiButtonPropertyBlock.utils.ts","webpack:///./src/microApps/episerver/components/blocks/EpiDynamicYieldBlock/EpiDynamicYieldBlock.tsx","webpack:///./src/microApps/episerver/components/blocks/EpiHeadingPropertyBlock/EpiHeadingPropertyBlock.utils.ts","webpack:///./src/microApps/episerver/components/blocks/EpiImagePropertyBlock/epiImagePropertyBlock.utils.ts","webpack:///./src/microApps/episerver/components/blocks/EpiImageTextPropertyBlock/EpiImageTextPropertyBlock.utils.tsx","webpack:///./node_modules/axios/index.js","webpack:///../../node_modules/react-intersection-observer/react-intersection-observer.modern.mjs"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { Button } from '@coop/components';\nimport * as React from 'react';\n\n/**\n * A Button that navigates to an Epi page\n * Will eventually provide SPA navigation for CMS links\n */\nconst ButtonEpiLink = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentPropsWithoutRef<typeof Button> & {\n linkUrl: string | undefined;\n target?: '_self' | '_blank';\n }\n>((props, ref) => {\n const { linkUrl, target, ...buttonProps } = props;\n\n if (!linkUrl) {\n return null;\n }\n\n const anchorRel = target?.includes('blank') ? 'noopener noreferrer' : undefined;\n\n return (\n <Button {...buttonProps} asChild>\n <a ref={ref} href={linkUrl} target={props.target} rel={anchorRel}>\n {props.children}\n </a>\n </Button>\n );\n});\n\nexport default ButtonEpiLink;\n","import { useEffect, useId } from 'react';\n\nimport {\n isProductRecommendation,\n useDynamicYieldRecommendations,\n} from '../../../ecommerce/hooks/useDynamicYieldRecommendations';\nimport useDynamicYieldTracking from '../../../ecommerce/hooks/useDynamicYieldTracking';\nimport type Heading from '../Heading';\nimport { useListBlockLazyLoading } from '../ListBlock';\nimport type { ListBlockOptions, TeaserOptions } from '../ListBlock/ListBlock';\nimport ListBlockHeader, { BlockHeader } from '../ListBlock/ListBlockHeader';\nimport RecommendationsBlock from '../organisms/RecommendationsBlock';\nimport DynamicYieldBuyableProductTeaser from './DynamicYieldBuyableProductTeaser';\nimport DynamicYieldFavoriteRecipeTeaser from './DynamicYieldFavoriteRecipeTeaser';\n\nexport interface DynamicYieldBlockProps extends ListBlockOptions, TeaserOptions {\n recommendationId: string;\n onlyPromotions: boolean;\n linkText?: string;\n linkUrl?: string;\n headingProps?: React.ComponentPropsWithoutRef<typeof Heading>;\n as?: React.ComponentProps<typeof RecommendationsBlock>['as'];\n}\n\nconst DynamicYieldBlock = (props: DynamicYieldBlockProps) => {\n const { getRecommendations, isLoading, recommendation } = useDynamicYieldRecommendations(\n props.recommendationId,\n props.onlyPromotions,\n );\n\n const [inViewRef, inView] = useListBlockLazyLoading(props.lazyLoad);\n\n useEffect(() => {\n if (inView) {\n getRecommendations();\n }\n }, [inView, getRecommendations]);\n\n useDynamicYieldTracking(props.recommendationId, recommendation);\n\n const headerId = useId();\n\n if (!props.recommendationId) return null;\n\n if (!isLoading && !recommendation?.items?.length) {\n return null;\n }\n\n const isOnlyProductsRecommendation =\n recommendation &&\n !!recommendation.items?.length &&\n recommendation.items.every((item) => isProductRecommendation(item));\n\n const showNewHeader = !!props.backgroundColor || isOnlyProductsRecommendation;\n\n return (\n <RecommendationsBlock\n aria-labelledby={headerId}\n as={props.as}\n ref={inViewRef}\n backgroundColor={props.backgroundColor}\n headerSlot={\n showNewHeader ? (\n <BlockHeader id={headerId} headingProps={props.headingProps}>\n {props.headingProps?.children || recommendation?.title}\n </BlockHeader>\n ) : (\n <ListBlockHeader id={headerId}>{recommendation?.title}</ListBlockHeader>\n )\n }\n isLoading={isLoading}\n items={recommendation?.items}\n useSwiper={props.useSwiper}\n analyticsListName={props.analyticsListName}\n horizontalHidden={props.horizontalHidden}\n renderProduct={(item, index, listPosition) => (\n <DynamicYieldBuyableProductTeaser\n slotId={item.slotId}\n product={item}\n isALink={!props.disableLink}\n analyticsOptions={{\n list: props.analyticsListName,\n position: index,\n listPosition,\n }}\n isAsyncLink={!props.disableAsyncLink}\n recommendationId={props.recommendationId}\n />\n )}\n renderRecipe={(item) => <DynamicYieldFavoriteRecipeTeaser recipe={item} />}\n banner={props.banner}\n />\n );\n};\n\nexport default DynamicYieldBlock;\n","import { type FC, useCallback, useRef } from 'react';\n\nimport { buyableProductEventsTracking } from '../../hooks/useBuyableProductEventsTracking';\nimport type { BuyableProductTeaserProps } from '../molecules/BuyableProductTeaser';\nimport BuyableProductTeaser from '../molecules/BuyableProductTeaser';\n\ntype DynamicYieldBuyableProductTeaserProps = BuyableProductTeaserProps & {\n recommendationId: string;\n slotId: string;\n};\n\nconst DynamicYieldBuyableProductTeaser: FC<\n React.PropsWithChildren<DynamicYieldBuyableProductTeaserProps>\n> = (props) => {\n const slotClickSent = useRef<boolean>(false);\n const sendSlotClick = useCallback(() => {\n // only send if its dynamic yield\n if (!slotClickSent.current && props.slotId) {\n buyableProductEventsTracking.onSlotClickTrack(props.product.identifier, props.slotId);\n slotClickSent.current = true;\n }\n }, [props.product.identifier, props.slotId]);\n\n return (\n <BuyableProductTeaser\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...props}\n onTeaserClick={sendSlotClick}\n />\n );\n};\n\nexport default DynamicYieldBuyableProductTeaser;\n","import type { FC } from 'react';\n\nimport type { RecipeRecommendationSlot } from '../../models/product/productDomainModels';\nimport { personalizationTracking } from '../../tracking/contextAware/personalizationEvents';\nimport FoodboxTeaser from '../FoodboxTeaser';\nimport RecipeTeaser from '../RecipeTeaser';\nimport RecipeTypeComponentPicker from '../RecipeTypeComponentPicker';\n\ninterface DynamicYieldFavoriteRecipeTeaserProps {\n recipe: RecipeRecommendationSlot;\n onLinkClick?: () => void;\n}\n\nconst DynamicYieldFavoriteRecipeTeaser: FC<\n React.PropsWithChildren<DynamicYieldFavoriteRecipeTeaserProps>\n> = ({ recipe, onLinkClick }) => {\n return (\n <RecipeTypeComponentPicker\n isFoodbox={recipe.isFoodBox}\n recipeSlot={\n <RecipeTeaser\n id={recipe.id}\n name={recipe.name}\n rating={recipe.averageRating}\n co2ImpactKg={recipe.climateImpactKg}\n imageUrl={recipe.imageUrl}\n url={recipe.url}\n votes={recipe.numberOfVotes}\n onLinkClick={() => {\n personalizationTracking.trackSlotClick(recipe.id, recipe.slotId);\n onLinkClick?.();\n }}\n />\n }\n foodboxSlot={\n <FoodboxTeaser\n id={recipe.id}\n name={recipe.name}\n imageUrl={recipe.imageUrl}\n url={recipe.url}\n onLinkClick={() => {\n personalizationTracking.trackSlotClick(recipe.id, recipe.slotId);\n onLinkClick?.();\n }}\n />\n }\n />\n );\n};\n\nexport default DynamicYieldFavoriteRecipeTeaser;\n","import { Button, Chip } from '@coop/components';\nimport * as React from 'react';\n\nimport { useSingleFavorite } from '../../hooks/useFavouriteRecipes';\nimport { useRecipeEventsTracking } from '../../hooks/useRecipeEventsTracking';\nimport { ga4RecipesTracking } from '../../tracking/ga4/recipes';\nimport BaseRecipeTeaser from '../BaseRecipeTeaser';\nimport FavoriteRecipeToggle from '../molecules/FavoriteRecipeToggle';\n\ninterface FoodboxTeaserProps {\n id: string;\n name: string;\n url: string;\n imageUrl: string;\n onLinkClick?: (e: React.MouseEvent) => void;\n withBorder?: boolean;\n}\n\nconst FoodboxTeaser = React.forwardRef<HTMLDivElement, FoodboxTeaserProps>((props, ref) => {\n const recipeId = props.id;\n\n const { isFavourite, onFavouriteRecipeToggleClick, isLoading } = useSingleFavorite(\n recipeId,\n props.name,\n );\n\n const { trackRecipeClick } = useRecipeEventsTracking();\n\n const handleLinkClick = (e: React.MouseEvent) => {\n ga4RecipesTracking.click.foodbox(props.id, props.name);\n trackRecipeClick(props.id);\n props.onLinkClick?.(e);\n };\n\n return (\n <BaseRecipeTeaser.Wrapper\n ref={ref}\n name={props.name}\n imageUrl={props.imageUrl}\n withBorder={props.withBorder}\n topSlot={\n <FavoriteRecipeToggle\n isFavorite={isFavourite}\n onClick={onFavouriteRecipeToggleClick}\n disabled={isLoading}\n />\n }\n >\n <BaseRecipeTeaser.Badges>\n <Chip theme=\"whiteBlack\" size={32}>\n Färdigt paket\n </Chip>\n </BaseRecipeTeaser.Badges>\n <BaseRecipeTeaser.Content>\n <BaseRecipeTeaser.Info>\n <BaseRecipeTeaser.Heading>{props.name}</BaseRecipeTeaser.Heading>\n </BaseRecipeTeaser.Info>\n <BaseRecipeTeaser.Actions>\n <Button\n fullWidth\n asChild\n theme=\"primary\"\n aria-label={`Se paket - ${props.name}`}\n >\n <a href={props.url} onClick={handleLinkClick}>\n Se paket\n </a>\n </Button>\n </BaseRecipeTeaser.Actions>\n </BaseRecipeTeaser.Content>\n </BaseRecipeTeaser.Wrapper>\n );\n});\n\nexport default FoodboxTeaser;\n","import { Chip } from '@coop/components';\nimport classnames from 'classnames';\n\nimport Heading from '../Heading';\nimport styles from './ListBlock.module.less';\n\ninterface ListBlockHeaderProps {\n id?: string;\n headingProps?: React.ComponentPropsWithoutRef<typeof Heading>;\n linkText?: string;\n linkUrl?: string;\n}\n\n/**\n * Old header\n */\nconst ListBlockHeader = ({\n id,\n headingProps,\n linkText,\n linkUrl,\n children,\n}: React.PropsWithChildren<ListBlockHeaderProps>) => {\n const hasHeaderText = !!children;\n const hasLink = linkText && linkUrl;\n\n return (\n <div\n className={classnames(\n 'u-flex u-flexJustifySpaceBetween u-flexAlignCenter',\n (hasHeaderText || hasLink) && 'u-paddingBxsm',\n )}\n >\n <div style={{ width: '100%' }}>\n {hasHeaderText && (\n <Heading\n id={id}\n className=\"u-marginAz\"\n element={headingProps?.element || 'h2'}\n stylingElement={headingProps?.stylingElement || 'h4'}\n color={headingProps?.color || 'black'}\n alignment={headingProps?.alignment || 'start'}\n >\n {children}\n </Heading>\n )}\n </div>\n\n {hasLink && (\n <a className=\"Link Link--green u-flexShrinkNone\" href={linkUrl}>\n {linkText}\n </a>\n )}\n </div>\n );\n};\n\nexport const BlockHeader = ({\n linkText,\n linkUrl,\n headingProps,\n children,\n id,\n}: React.PropsWithChildren<ListBlockHeaderProps>) => {\n return (\n !!children && (\n <div className={styles.HeaderContainer}>\n {linkText && linkUrl && (\n <Chip size={24} theme=\"whiteGreen\" asChild className={styles.Link}>\n <a href={linkUrl}>{linkText}</a>\n </Chip>\n )}\n <Heading\n id={id}\n className={styles.Header}\n element={headingProps?.element || 'h2'}\n stylingElement={headingProps?.stylingElement || 'h2'} // we do not have exactly the same h2 secondary font, we override this for now with styles.Header\n color={headingProps?.color || 'darkGreen'}\n alignment={headingProps?.alignment || 'center'}\n fontFamilySecondary\n >\n {children}\n </Heading>\n </div>\n )\n );\n};\n\nexport default ListBlockHeader;\n","import { Button, Chip } from '@coop/components';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { useSingleFavorite } from '../../hooks/useFavouriteRecipes';\nimport { useRecipeEventsTracking } from '../../hooks/useRecipeEventsTracking';\nimport { ga4RecipesTracking } from '../../tracking/ga4/recipes';\nimport BaseRecipeTeaser from '../BaseRecipeTeaser';\nimport FavoriteRecipeToggle from '../molecules/FavoriteRecipeToggle';\nimport { RatingStars } from '../molecules/RatingStars';\nimport styles from './RecipeTeaser.module.less';\n\ninterface RecipeTeaserProps {\n id: string;\n name: string;\n rating: number;\n votes: number;\n url: string;\n imageUrl: string;\n co2ImpactKg: number | null;\n onLinkClick?: (e: React.MouseEvent) => void;\n withBorder?: boolean;\n topSlot?: React.ReactNode;\n}\n\nconst RecipeTeaser = React.forwardRef<HTMLDivElement, RecipeTeaserProps>((props, ref) => {\n const { isFavourite, onFavouriteRecipeToggleClick, isLoading } = useSingleFavorite(\n props.id,\n props.name,\n );\n\n const { trackRecipeClick } = useRecipeEventsTracking();\n\n const handleLinkClick = (e: React.MouseEvent) => {\n ga4RecipesTracking.click.recipe(props.id, props.name);\n trackRecipeClick(props.id);\n props.onLinkClick?.(e);\n };\n\n return (\n <BaseRecipeTeaser.Wrapper\n ref={ref}\n name={props.name}\n imageUrl={props.imageUrl}\n withBorder={props.withBorder}\n topSlot={\n <FavoriteRecipeToggle\n isFavorite={isFavourite}\n onClick={onFavouriteRecipeToggleClick}\n disabled={isLoading}\n />\n }\n >\n <BaseRecipeTeaser.Badges>\n <Chip theme=\"whiteBlack\" size={32}>\n Recept\n </Chip>\n </BaseRecipeTeaser.Badges>\n <BaseRecipeTeaser.Content>\n <BaseRecipeTeaser.Info>\n <BaseRecipeTeaser.Heading flexOrder={1}>{props.name}</BaseRecipeTeaser.Heading>\n <BaseRecipeTeaser.RatingContainer>\n <RatingStars rating={props.rating} votes={props.votes} />\n <BaseRecipeTeaser.ClimateImpact co2ImpactKg={props.co2ImpactKg} />\n </BaseRecipeTeaser.RatingContainer>\n </BaseRecipeTeaser.Info>\n <BaseRecipeTeaser.Actions>\n <Button\n className={classnames(styles.Teaser, styles.Button)}\n fullWidth\n asChild\n theme=\"primary\"\n aria-label={`Se recept - ${props.name}`}\n >\n <a href={props.url} onClick={handleLinkClick}>\n Se recept\n </a>\n </Button>\n </BaseRecipeTeaser.Actions>\n </BaseRecipeTeaser.Content>\n </BaseRecipeTeaser.Wrapper>\n );\n});\n\nexport default RecipeTeaser;\n","// extracted by mini-css-extract-plugin\nexport default {\"Teaser\":\"BZGASSBq\",\"Button\":\"I6qDwsWs\"};","import * as React from 'react';\n\nimport {\n getRecommendationUniqueIdentifier,\n isProductRecommendation,\n} from '../../../ecommerce/hooks/useDynamicYieldRecommendations';\nimport { useVerticalProductTeaserContainer } from '../../../ecommerce/hooks/useProductTeaserContainer';\nimport type {\n ProductRecommendationSlot,\n RecipeRecommendationSlot,\n RecommendationItem,\n} from '../../models/product/productDomainModels';\nimport type { ListBlockOptions } from '../ListBlock/ListBlock';\nimport ListBlock from '../ListBlock/ListBlock';\nimport { BuyableProductTeaserSkeleton } from '../molecules/BuyableProductTeaser';\nimport type { ImageTextPropertyBlockProps } from './ImageTextPropertyBlock/ImageTextPropertyBlock';\n\ntype RecommendationBlockProps = Omit<ListBlockOptions, 'lazyLoad'> & {\n headerSlot?: React.ReactNode;\n isLoading: boolean;\n items?: RecommendationItem[];\n renderProduct: (\n product: ProductRecommendationSlot,\n index: number,\n listPosition?: number,\n ) => React.ReactElement;\n\n renderRecipe: (\n recipe: RecipeRecommendationSlot,\n index: number,\n listPosition?: number,\n ) => React.ReactElement;\n banner?: ImageTextPropertyBlockProps;\n 'aria-labelledby'?: string;\n};\n\nconst RecommendationsBlock = React.forwardRef(\n (\n props: RecommendationBlockProps & { as?: React.ComponentProps<typeof ListBlock>['as'] },\n ref: React.ComponentProps<typeof ListBlock>['ref'],\n ) => {\n const { swiperOptions, gridAdditionalClasses, cellsInRow, swiperMainClass } =\n useVerticalProductTeaserContainer(props.useSwiper ? 'list' : 'grid', !!props.banner);\n\n return (\n <ListBlock\n aria-labelledby={props['aria-labelledby']}\n as={props.as}\n ref={ref}\n backgroundColor={props.backgroundColor}\n headerSlot={props.headerSlot}\n isLoading={props.isLoading}\n items={props.items}\n useSwiper={props.useSwiper}\n swiperMainClassName={swiperMainClass}\n swiperOptions={swiperOptions}\n cellsInRow={cellsInRow}\n gridClasses={gridAdditionalClasses}\n analyticsListName={props.analyticsListName}\n horizontalHidden={props.horizontalHidden}\n itemUniqueKey={getRecommendationUniqueIdentifier}\n renderItem={(item, index, listPosition) =>\n isProductRecommendation(item)\n ? props.renderProduct(item, index, listPosition)\n : props.renderRecipe(item, index, listPosition)\n }\n renderSkeleton={() => <BuyableProductTeaserSkeleton />}\n banner={props.banner}\n />\n );\n },\n);\n\nexport default RecommendationsBlock;\n","import { personalizationTracking } from '../tracking/contextAware/personalizationEvents';\n\nexport const useRecipeEventsTracking = () => {\n const trackRecipeClick = (identifier: string) => {\n personalizationTracking.trackRecipeClick(identifier);\n };\n\n return {\n trackRecipeClick,\n };\n};\n","import { useCallback } from 'react';\n\nimport { getStaticPageContext } from '../../common/flow/dynamicYield/dynamicYield.utils';\nimport { useAsyncDispatcher } from '../../common/hooks/useAsyncDispatcher';\nimport { useAppSelector } from '../../common/hooks/useThunkDispatch';\nimport type {\n ProductRecommendationSlot,\n RecommendationItem,\n} from '../../common/models/product/productDomainModels';\nimport { RecommendationType } from '../../common/models/product/productDomainModels';\nimport { storeSelectors } from '../../common/selectors/storeSelectors';\nimport { fetchProductRecommendations } from '../utils/recommendationUtils';\n\nexport const isProductRecommendation = (\n recommendationItem: RecommendationItem,\n): recommendationItem is ProductRecommendationSlot =>\n recommendationItem.type === RecommendationType.Product;\n\nexport const getRecommendationUniqueIdentifier = (recommendationItem: RecommendationItem) => {\n if (isProductRecommendation(recommendationItem)) {\n return `${recommendationItem.identifier}_product`;\n }\n return `${recommendationItem.id}_other`;\n};\n\nexport const useDynamicYieldRecommendations = (\n recommendationId: string,\n onlyPromotions: boolean,\n) => {\n const { execute, result, error, isLoading } = useAsyncDispatcher(fetchProductRecommendations, {\n initialLoadingState: true,\n });\n\n const currentProductionUnit = useAppSelector(storeSelectors.currentProductionUnit);\n\n const getRecommendations = useCallback(() => {\n if (recommendationId) {\n const context = getStaticPageContext();\n if (context) {\n execute(recommendationId, onlyPromotions, currentProductionUnit, {\n data: context.data,\n type: context.type,\n location: window.location.href,\n });\n }\n }\n }, [currentProductionUnit, execute, onlyPromotions, recommendationId]);\n\n return {\n getRecommendations,\n getRecommendationUniqueIdentifier,\n isProductRecommendation,\n recommendation: result,\n error,\n isLoading,\n };\n};\n","export const getStaticPageContext = () => {\n if (window.DY) {\n return DY.recommendationContext;\n }\n\n return null;\n};\n","import { useEffect } from 'react';\n\nimport type { DynamicYieldAnalyticsMetadata } from '../../common/models/product/productDomainModels';\nimport tracking from '../../common/tracking/tracking';\n\nconst useDynamicYieldTracking = (\n selector: string,\n result: DynamicYieldAnalyticsMetadata | null | undefined,\n) => {\n useEffect(() => {\n if (result?.analyticsMetadata) {\n tracking.ecommerce.dynamicYield.campaign(selector, result.analyticsMetadata);\n }\n }, [result, selector]);\n};\n\nexport default useDynamicYieldTracking;\n","import classnames from 'classnames';\nimport { useMemo } from 'react';\nimport type { SwiperOptions } from 'swiper/types';\n\nimport type { SwiperBreakpointsCollection } from '../../../utility/coopSwiperBreakpoints';\nimport { CoopSwiperBreakpoints } from '../../../utility/coopSwiperBreakpoints';\nimport { useSwiperOverflowClasses } from '../../common/hooks/useSwiperOverflowClasses';\nimport { useBreakpointsSidebar } from './useBreakpoints';\n\nconst getProductTeaserContainerBreakpointAreaName = (\n containerType: 'grid' | 'list',\n hasBanner: boolean = false,\n): keyof SwiperBreakpointsCollection => {\n if (containerType === 'grid') {\n return CoopSwiperBreakpoints.AREA_NEW_PRODUCT_GRID;\n }\n\n if (hasBanner) {\n return CoopSwiperBreakpoints.AREA_NEW_PRODUCT_LIST_WITH_BANNER;\n }\n\n return CoopSwiperBreakpoints.AREA_NEW_PRODUCT_LIST;\n};\n\nexport const useVerticalProductTeaserContainer = (\n containerType: 'list' | 'grid',\n hasBanner: boolean = false,\n) => {\n const gridAdditionalClasses = classnames('Grid--gutterAxsm');\n\n const breakpointAreaName = getProductTeaserContainerBreakpointAreaName(\n containerType,\n hasBanner,\n );\n\n const { cellsInRow, breakpoints } = useBreakpointsSidebar(breakpointAreaName);\n\n const { mainSwiperClasses, spaceBetween } = useSwiperOverflowClasses();\n\n const swiperOptions: SwiperOptions = useMemo(\n () => ({ breakpoints, spaceBetween }),\n [breakpoints, spaceBetween],\n );\n return {\n gridAdditionalClasses,\n swiperOptions,\n swiperMainClass: mainSwiperClasses,\n cellsInRow,\n };\n};\n","import type { ApiDYPageContext } from '../../common/api/products/apiProductRequests';\nimport dynamicYieldFlow, {\n getStaticPageContext,\n} from '../../common/flow/dynamicYield/dynamicYieldFlow';\n\nexport const fetchProductRecommendations = async (\n recommendationId: string,\n onlyPromotions: boolean,\n storeId: string,\n pageContext?: ApiDYPageContext, // if someone wants to override pageContext\n) => {\n const context = pageContext || getStaticPageContext();\n\n if (recommendationId && context) {\n const recommendation = await dynamicYieldFlow.getProductRecommendation(\n { recommendationId, onlyPromotions },\n storeId,\n {\n data: context.data,\n type: context.type,\n location: window.location.href,\n },\n );\n return recommendation;\n }\n\n return null;\n};\n","import type { EpiButtonLinkPropertyBlockType } from './epiButtonLinkPropertyBlock.types';\n\nexport const mapEpiButtonLinkPropertyBlock = (props: EpiButtonLinkPropertyBlockType) => {\n return {\n linkUrl: props.link,\n target: props.target,\n };\n};\n","import type { Button } from '@coop/components';\n\nimport type { EpiButtonPropertyBlockType, EpiButtonThemes } from './EpiButtonPropertyBlock.types';\n\nexport const mapEpiButtonPropertyBlock = (\n props: EpiButtonPropertyBlockType,\n): React.ComponentPropsWithoutRef<typeof Button> => {\n return {\n theme: mapEpiButtonTheme(props.theme),\n disabled: props.disabled,\n size: props.size || 40,\n fullWidth: props.fullWidth,\n 'aria-label': props.ariaLabel || undefined,\n style: {\n marginRight:\n props.alignment === 'start' || props.alignment === 'center' ? 'auto' : undefined,\n marginLeft:\n props.alignment === 'end' || props.alignment === 'center' ? 'auto' : undefined,\n },\n children: props.text,\n };\n};\n\nexport const mapEpiButtonTheme = (theme?: EpiButtonThemes) => {\n switch (theme) {\n case 'Button--white':\n case 'Button--invertedGreen':\n return 'whiteGreen';\n case 'Button--greenDark':\n case 'Button--green':\n return 'primary';\n case 'Button--transparentWhite':\n return 'whiteOutline';\n case 'Button--transparentGreenDark':\n case 'Button--transparentGreen':\n return 'primaryOutline';\n\n case 'Button--light':\n return 'light';\n case 'Button--whiteBlack':\n return 'whiteBlack';\n case undefined:\n return 'primary';\n default:\n return exhaustiveGuard(theme);\n }\n};\n\nconst exhaustiveGuard = (_value: never): never => {\n throw new Error(\n `ERROR! Reached forbidden guard function with unexpected value: ${JSON.stringify(_value)}`,\n );\n};\n","/* eslint-disable react/jsx-props-no-spreading */\nimport { type FC, useMemo } from 'react';\n\nimport ButtonEpiLink from '../../../../common/components/ButtonEpiLink';\nimport DynamicYieldBlock, {\n type DynamicYieldBlockProps,\n} from '../../../../common/components/DynamicYieldBlock/DynamicYieldBlock';\nimport Heading from '../../../../common/components/Heading';\nimport { mapEpiButtonLinkPropertyBlock } from '../EpiButtonLinkPropertyBlock/epiButtonLinkPropertyBlock.utils';\nimport {\n mapEpiHeadingPropertyBlock,\n mapEpiHeadingPropertyFallback,\n} from '../EpiHeadingPropertyBlock/EpiHeadingPropertyBlock.utils';\nimport {\n mapEpiImageTextPropertyToLinkFallback,\n mapImageTextPropertyToProps,\n} from '../EpiImageTextPropertyBlock/EpiImageTextPropertyBlock.utils';\nimport type { EpiDynamicYieldBlockType } from './epiDynamicYieldBlockType';\n\nexport const mapEpiDynamicYieldBlockToProps = (\n props: EpiDynamicYieldBlockType,\n): DynamicYieldBlockProps => ({\n recommendationId: props.recommendationId,\n analyticsListName: props.analyticsListName,\n useSwiper: props.useProductSlider,\n linkText: props.linkText,\n linkUrl: props.link?.url,\n lazyLoad: props.lazyLoad,\n disableAsyncLink: props.disableAsyncLink,\n disableLink: props.disableLink,\n horizontalHidden: props.horizontalHidden,\n onlyPromotions: props.showOnlyPromotions,\n backgroundColor: props.backgroundColor,\n headingProps: mapEpiHeadingPropertyBlock(\n mapEpiHeadingPropertyFallback(props.headline, props.heading),\n ),\n banner:\n props.showBanner && props.banner\n ? {\n ...mapImageTextPropertyToProps(props.banner),\n renderButton: (bProps) => (\n <ButtonEpiLink\n {...bProps}\n {...mapEpiImageTextPropertyToLinkFallback(\n props.banner!.buttonLink,\n props.banner!,\n )}\n />\n ),\n renderSecondaryButton: (bProps) =>\n props.banner!.secondaryButtonLink && (\n <ButtonEpiLink\n {...bProps}\n {...mapEpiButtonLinkPropertyBlock(props.banner!.secondaryButtonLink)}\n />\n ),\n renderHeading: (hProps) => <Heading {...hProps} fontFamilySecondary />,\n }\n : undefined,\n});\n\nconst EpiDynamicYieldBlock: FC<React.PropsWithChildren<EpiDynamicYieldBlockType>> = (props) => {\n const mappedProps = useMemo(() => mapEpiDynamicYieldBlockToProps(props), [props]);\n\n return (\n <DynamicYieldBlock\n recommendationId={mappedProps.recommendationId}\n analyticsListName={mappedProps.analyticsListName}\n useSwiper={mappedProps.useSwiper}\n linkText={mappedProps.linkText}\n linkUrl={mappedProps.linkUrl}\n lazyLoad={mappedProps.lazyLoad}\n disableAsyncLink={mappedProps.disableAsyncLink}\n disableLink={mappedProps.disableLink}\n horizontalHidden={mappedProps.horizontalHidden}\n onlyPromotions={mappedProps.onlyPromotions}\n backgroundColor={mappedProps.backgroundColor}\n headingProps={mappedProps.headingProps}\n banner={mappedProps.banner}\n />\n );\n};\n\nexport default EpiDynamicYieldBlock;\n","import type Heading from '../../../../common/components/Heading';\nimport type { EpiHeadingPropertyBlockType } from './epiHeadingPropertyBlockType';\n\nexport const mapEpiHeadingPropertyBlock = (\n props?: EpiHeadingPropertyBlockType,\n): React.ComponentPropsWithoutRef<typeof Heading> | undefined => {\n if (!props || !props.text) {\n return undefined;\n }\n\n return {\n element: `h${props.level || '2'}`,\n stylingElement: props.stylingLevel && `h${props.stylingLevel}`,\n color: props.color,\n alignment: props.alignment,\n children: props.text,\n };\n};\n\nexport const mapEpiHeadingPropertyFallback = (\n oldHeader?: string,\n heading?: EpiHeadingPropertyBlockType,\n): EpiHeadingPropertyBlockType => {\n if (heading && heading.text) {\n return heading;\n }\n\n return {\n text: oldHeader,\n };\n};\n","import type { EpiImagePropertyBlock } from './epiImagePropertyBlockType';\n\nexport const mapEpiImagePropertyBlock = (imageBlock: EpiImagePropertyBlock) => {\n return {\n srcSet:\n imageBlock.images\n ?.map((item) => {\n const url = item.cloudinaryImageUrl || item.imageUrl;\n if (!url) return null;\n\n return {\n srcSet: url,\n height: item.height,\n minWidth: item.breakpointFrom || (0 as const),\n };\n })\n .filter(Boolean) || [],\n defaultImageUrl: imageBlock.defaultCloudinaryImageUrl || imageBlock.defaultImage?.url,\n defaultImageHeight: imageBlock.defaultImageHeight,\n imageAltText: imageBlock.altText,\n };\n};\n","import type { ImageTextPropertyBlockProps } from '../../../../common/components/organisms/ImageTextPropertyBlock/ImageTextPropertyBlock';\nimport type { EpiTextColor } from '../../../models/common/epiPrimitives';\nimport type { EpiButtonLinkPropertyBlockType } from '../EpiButtonLinkPropertyBlock/epiButtonLinkPropertyBlock.types';\nimport { mapEpiButtonLinkPropertyBlock } from '../EpiButtonLinkPropertyBlock/epiButtonLinkPropertyBlock.utils';\nimport type { EpiButtonPropertyBlockType } from '../EpiButtonPropertyBlock/EpiButtonPropertyBlock.types';\nimport { mapEpiButtonPropertyBlock } from '../EpiButtonPropertyBlock/EpiButtonPropertyBlock.utils';\nimport { mapEpiHeadingPropertyBlock } from '../EpiHeadingPropertyBlock/EpiHeadingPropertyBlock.utils';\nimport type { EpiHeadingPropertyBlockType } from '../EpiHeadingPropertyBlock/epiHeadingPropertyBlockType';\nimport { mapEpiImagePropertyBlock } from '../EpiImagePropertyBlock/epiImagePropertyBlock.utils';\nimport type { EpiImageTextPropertyBlockType } from './epiImageTextPropertyBlockType';\n\ninterface ImageTextPropertyContext {\n lazyImage?: boolean;\n}\n\n// eslint-disable-next-line import/prefer-default-export\nexport const mapImageTextPropertyToProps = (\n props: EpiImageTextPropertyBlockType,\n options?: ImageTextPropertyContext,\n useFallbackedProperties = true,\n): Omit<\n ImageTextPropertyBlockProps,\n 'renderButton' | 'renderSecondaryButton' | 'renderHeading'\n> => {\n const mappedImageProperty = props.imageBlock && mapEpiImagePropertyBlock(props.imageBlock);\n\n let defaultImageUrl = mappedImageProperty?.defaultImageUrl;\n const defaultImageHeight = mappedImageProperty?.defaultImageHeight;\n\n const srcSet = mappedImageProperty?.srcSet || [];\n const fromMobileImage = srcSet.find((item) => item.minWidth === 600);\n const fromZero = srcSet.find((item) => item.minWidth === 0);\n\n if (useFallbackedProperties) {\n defaultImageUrl = defaultImageUrl || props.image?.url;\n\n if (!fromMobileImage && !fromZero && props.narrowImage && defaultImageUrl) {\n // move from old image and narrowImage properties into srcSet to have all breakpoint images in one place\n srcSet.push({\n srcSet: props.narrowImage?.url,\n height: undefined,\n minWidth: 0,\n });\n srcSet.push({\n srcSet: defaultImageUrl,\n height: defaultImageHeight,\n minWidth: 600,\n });\n }\n }\n\n return {\n imageUrl: defaultImageUrl,\n imageHeight: defaultImageHeight,\n srcSet,\n imageAltText: mappedImageProperty?.imageAltText,\n ariaLabel: props.ariaLabel,\n linkUrl: props.link,\n backgroundColor: props.backgroundColor,\n body: props.body,\n centerBlockHorizontally: props.centerBlockHorizontally,\n centerBlockVertically: props.centerBlockVertically,\n contentLessHorizontalPadding: props.contentLessHorizontalPadding,\n contentLessPadding: props.contentLessPadding,\n isClickable: props.isClickable,\n textColor: props.textColor,\n target: props.openLinkIn,\n lazy: options?.lazyImage,\n gaPromoId: props.gaPromoId,\n gaPromoName: props.gaPromoName,\n gaPromoCreative: props.gaPromoCreative,\n gaPromoPosition: props.gaPromoPosition,\n headingProps: mapEpiHeadingPropertyBlock(\n useFallbackedProperties\n ? mapImageTextToHeadingWithFallbacks(props)\n : mapImageTextToHeading(props),\n ),\n buttonProps: mapEpiButtonPropertyBlock(\n useFallbackedProperties\n ? mapImageTextToButtonWithFallbacks(props.buttonLink, props)\n : mapImageTextToButton(props.buttonLink),\n ),\n secondaryButtonProps:\n props.secondaryButtonLink && mapEpiButtonPropertyBlock(props.secondaryButtonLink),\n };\n};\n\n/**\n * For now, we have to support old button-related properties from Epi together with new property block.\n * This function maps so that old properties are a fallback to missing new property block\n */\nexport const mapEpiImageTextPropertyToLinkFallback = (\n input: EpiButtonLinkPropertyBlockType | undefined,\n props: EpiImageTextPropertyBlockType,\n) => {\n const mapped = input && mapEpiButtonLinkPropertyBlock(input);\n return {\n linkUrl: mapped?.linkUrl || props.link,\n target: mapped?.target || props.openLinkIn,\n };\n};\n\n// All elements should have the same fallback alignment\nconst ElementFallbackAlignment = 'start';\n\nconst mapImageTextToButton = (\n input: EpiButtonPropertyBlockType | undefined,\n): EpiButtonPropertyBlockType => {\n return {\n text: input?.text || '',\n ariaLabel: input?.ariaLabel,\n fullWidth: input?.fullWidth,\n theme: input?.theme,\n disabled: input?.disabled,\n size: input?.size || 40,\n alignment: input?.alignment || ElementFallbackAlignment,\n };\n};\n\n// Fallback for migrating old Epi fields to a new ButtonPropertyBlock\nconst mapImageTextToButtonWithFallbacks = (\n input: EpiButtonPropertyBlockType | undefined,\n allProps: EpiImageTextPropertyBlockType,\n): EpiButtonPropertyBlockType => {\n const mapped = mapImageTextToButton(input);\n\n return {\n ...mapped,\n text: mapped.text || allProps.buttonText,\n theme: mapped.theme || allProps.buttonColor,\n };\n};\n\nconst mapImageTextToHeading = (\n input: EpiImageTextPropertyBlockType,\n): EpiHeadingPropertyBlockType => {\n return {\n text: input.heading?.text || '',\n level: input.heading?.level || '2',\n stylingLevel: input.heading?.stylingLevel || '1',\n alignment: input.centerBlockHorizontally\n ? 'center'\n : input.heading?.alignment || ElementFallbackAlignment,\n color: input.heading?.color || 'black',\n };\n};\n\n// Fallback for migrating old Epi fields to a new HeadingPropertyBlock\nconst mapImageTextToHeadingWithFallbacks = (\n input: EpiImageTextPropertyBlockType,\n): EpiHeadingPropertyBlockType => {\n const mapped = mapImageTextToHeading(input);\n\n return {\n ...mapped,\n text: mapped.text || input.title || '',\n color: input.heading?.color || mapOldEpiImageTextColor(input.titleColor),\n };\n};\n\nconst mapOldEpiImageTextColor = (\n input: EpiImageTextPropertyBlockType['titleColor'],\n): EpiTextColor => {\n switch (input) {\n case 'u-colorWhite':\n return 'white';\n case 'u-colorGreen':\n return 'coopGreen';\n case 'u-colorGreenDark':\n return 'darkGreen';\n default:\n return 'black';\n }\n};\n","import axios from './lib/axios.js';\n\n// This module is intended to unwrap Axios default export as named.\n// Keep top-level export same with static properties\n// so that it can keep same with es module or cjs\nconst {\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n} = axios;\n\nexport {\n axios as default,\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n}\n","import * as React from 'react';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nconst observerMap = new Map();\nconst RootIds = new WeakMap();\nlet rootId = 0;\nlet unsupportedValue = undefined;\n/**\r\n * What should be the default behavior if the IntersectionObserver is unsupported?\r\n * Ideally the polyfill has been loaded, you can have the following happen:\r\n * - `undefined`: Throw an error\r\n * - `true` or `false`: Set the `inView` value to this regardless of intersection state\r\n * **/\n\nfunction defaultFallbackInView(inView) {\n unsupportedValue = inView;\n}\n/**\r\n * Generate a unique ID for the root element\r\n * @param root\r\n */\n\nfunction getRootId(root) {\n if (!root) return '0';\n if (RootIds.has(root)) return RootIds.get(root);\n rootId += 1;\n RootIds.set(root, rootId.toString());\n return RootIds.get(root);\n}\n/**\r\n * Convert the options to a string Id, based on the values.\r\n * Ensures we can reuse the same observer when observing elements with the same options.\r\n * @param options\r\n */\n\n\nfunction optionsToId(options) {\n return Object.keys(options).sort().filter(key => options[key] !== undefined).map(key => {\n return `${key}_${key === 'root' ? getRootId(options.root) : options[key]}`;\n }).toString();\n}\n\nfunction createObserver(options) {\n // Create a unique ID for this observer instance, based on the root, root margin and threshold.\n let id = optionsToId(options);\n let instance = observerMap.get(id);\n\n if (!instance) {\n // Create a map of elements this observer is going to observe. Each element has a list of callbacks that should be triggered, once it comes into view.\n const elements = new Map();\n let thresholds;\n const observer = new IntersectionObserver(entries => {\n entries.forEach(entry => {\n var _elements$get;\n\n // While it would be nice if you could just look at isIntersecting to determine if the component is inside the viewport, browsers can't agree on how to use it.\n // -Firefox ignores `threshold` when considering `isIntersecting`, so it will never be false again if `threshold` is > 0\n const inView = entry.isIntersecting && thresholds.some(threshold => entry.intersectionRatio >= threshold); // @ts-ignore support IntersectionObserver v2\n\n if (options.trackVisibility && typeof entry.isVisible === 'undefined') {\n // The browser doesn't support Intersection Observer v2, falling back to v1 behavior.\n // @ts-ignore\n entry.isVisible = inView;\n }\n\n (_elements$get = elements.get(entry.target)) == null ? void 0 : _elements$get.forEach(callback => {\n callback(inView, entry);\n });\n });\n }, options); // Ensure we have a valid thresholds array. If not, use the threshold from the options\n\n thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]);\n instance = {\n id,\n observer,\n elements\n };\n observerMap.set(id, instance);\n }\n\n return instance;\n}\n/**\r\n * @param element - DOM Element to observe\r\n * @param callback - Callback function to trigger when intersection status changes\r\n * @param options - Intersection Observer options\r\n * @param fallbackInView - Fallback inView value.\r\n * @return Function - Cleanup function that should be triggered to unregister the observer\r\n */\n\n\nfunction observe(element, callback, options = {}, fallbackInView = unsupportedValue) {\n if (typeof window.IntersectionObserver === 'undefined' && fallbackInView !== undefined) {\n const bounds = element.getBoundingClientRect();\n callback(fallbackInView, {\n isIntersecting: fallbackInView,\n target: element,\n intersectionRatio: typeof options.threshold === 'number' ? options.threshold : 0,\n time: 0,\n boundingClientRect: bounds,\n intersectionRect: bounds,\n rootBounds: bounds\n });\n return () => {// Nothing to cleanup\n };\n } // An observer with the same options can be reused, so lets use this fact\n\n\n const {\n id,\n observer,\n elements\n } = createObserver(options); // Register the callback listener for this element\n\n let callbacks = elements.get(element) || [];\n\n if (!elements.has(element)) {\n elements.set(element, callbacks);\n }\n\n callbacks.push(callback);\n observer.observe(element);\n return function unobserve() {\n // Remove the callback from the callback list\n callbacks.splice(callbacks.indexOf(callback), 1);\n\n if (callbacks.length === 0) {\n // No more callback exists for element, so destroy it\n elements.delete(element);\n observer.unobserve(element);\n }\n\n if (elements.size === 0) {\n // No more elements are being observer by this instance, so destroy it\n observer.disconnect();\n observerMap.delete(id);\n }\n };\n}\n\nconst _excluded = [\"children\", \"as\", \"triggerOnce\", \"threshold\", \"root\", \"rootMargin\", \"onChange\", \"skip\", \"trackVisibility\", \"delay\", \"initialInView\", \"fallbackInView\"];\n\nfunction isPlainChildren(props) {\n return typeof props.children !== 'function';\n}\n/**\r\n ## Render props\r\n\n To use the `<InView>` component, you pass it a function. It will be called\r\n whenever the state changes, with the new value of `inView`. In addition to the\r\n `inView` prop, children also receive a `ref` that should be set on the\r\n containing DOM element. This is the element that the IntersectionObserver will\r\n monitor.\r\n\n If you need it, you can also access the\r\n [`IntersectionObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry)\r\n on `entry`, giving you access to all the details about the current intersection\r\n state.\r\n\n ```jsx\r\n import { InView } from 'react-intersection-observer';\r\n\n const Component = () => (\r\n <InView>\r\n {({ inView, ref, entry }) => (\r\n <div ref={ref}>\r\n <h2>{`Header inside viewport ${inView}.`}</h2>\r\n </div>\r\n )}\r\n </InView>\r\n );\r\n\n export default Component;\r\n ```\r\n\n ## Plain children\r\n\n You can pass any element to the `<InView />`, and it will handle creating the\r\n wrapping DOM element. Add a handler to the `onChange` method, and control the\r\n state in your own component. Any extra props you add to `<InView>` will be\r\n passed to the HTML element, allowing you set the `className`, `style`, etc.\r\n\n ```jsx\r\n import { InView } from 'react-intersection-observer';\r\n\n const Component = () => (\r\n <InView as=\"div\" onChange={(inView, entry) => console.log('Inview:', inView)}>\r\n <h2>Plain children are always rendered. Use onChange to monitor state.</h2>\r\n </InView>\r\n );\r\n\n export default Component;\r\n ```\r\n */\n\n\nclass InView extends React.Component {\n constructor(props) {\n super(props);\n this.node = null;\n this._unobserveCb = null;\n\n this.handleNode = node => {\n if (this.node) {\n // Clear the old observer, before we start observing a new element\n this.unobserve();\n\n if (!node && !this.props.triggerOnce && !this.props.skip) {\n // Reset the state if we get a new node, and we aren't ignoring updates\n this.setState({\n inView: !!this.props.initialInView,\n entry: undefined\n });\n }\n }\n\n this.node = node ? node : null;\n this.observeNode();\n };\n\n this.handleChange = (inView, entry) => {\n if (inView && this.props.triggerOnce) {\n // If `triggerOnce` is true, we should stop observing the element.\n this.unobserve();\n }\n\n if (!isPlainChildren(this.props)) {\n // Store the current State, so we can pass it to the children in the next render update\n // There's no reason to update the state for plain children, since it's not used in the rendering.\n this.setState({\n inView,\n entry\n });\n }\n\n if (this.props.onChange) {\n // If the user is actively listening for onChange, always trigger it\n this.props.onChange(inView, entry);\n }\n };\n\n this.state = {\n inView: !!props.initialInView,\n entry: undefined\n };\n }\n\n componentDidUpdate(prevProps) {\n // If a IntersectionObserver option changed, reinit the observer\n if (prevProps.rootMargin !== this.props.rootMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) {\n this.unobserve();\n this.observeNode();\n }\n }\n\n componentWillUnmount() {\n this.unobserve();\n this.node = null;\n }\n\n observeNode() {\n if (!this.node || this.props.skip) return;\n const {\n threshold,\n root,\n rootMargin,\n trackVisibility,\n delay,\n fallbackInView\n } = this.props;\n this._unobserveCb = observe(this.node, this.handleChange, {\n threshold,\n root,\n rootMargin,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n }, fallbackInView);\n }\n\n unobserve() {\n if (this._unobserveCb) {\n this._unobserveCb();\n\n this._unobserveCb = null;\n }\n }\n\n render() {\n if (!isPlainChildren(this.props)) {\n const {\n inView,\n entry\n } = this.state;\n return this.props.children({\n inView,\n entry,\n ref: this.handleNode\n });\n }\n\n const _this$props = this.props,\n {\n children,\n as\n } = _this$props,\n props = _objectWithoutPropertiesLoose(_this$props, _excluded);\n\n return React.createElement(as || 'div', _extends({\n ref: this.handleNode\n }, props), children);\n }\n\n}\n\n/**\r\n * React Hooks make it easy to monitor the `inView` state of your components. Call\r\n * the `useInView` hook with the (optional) [options](#options) you need. It will\r\n * return an array containing a `ref`, the `inView` status and the current\r\n * [`entry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry).\r\n * Assign the `ref` to the DOM element you want to monitor, and the hook will\r\n * report the status.\r\n *\r\n * @example\r\n * ```jsx\r\n * import React from 'react';\r\n * import { useInView } from 'react-intersection-observer';\r\n *\r\n * const Component = () => {\r\n * const { ref, inView, entry } = useInView({\r\n * threshold: 0,\r\n * });\r\n *\r\n * return (\r\n * <div ref={ref}>\r\n * <h2>{`Header inside viewport ${inView}.`}</h2>\r\n * </div>\r\n * );\r\n * };\r\n * ```\r\n */\n\nfunction useInView({\n threshold,\n delay,\n trackVisibility,\n rootMargin,\n root,\n triggerOnce,\n skip,\n initialInView,\n fallbackInView,\n onChange\n} = {}) {\n var _state$entry;\n\n const [ref, setRef] = React.useState(null);\n const callback = React.useRef();\n const [state, setState] = React.useState({\n inView: !!initialInView,\n entry: undefined\n }); // Store the onChange callback in a `ref`, so we can access the latest instance\n // inside the `useEffect`, but without triggering a rerender.\n\n callback.current = onChange;\n React.useEffect(() => {\n // Ensure we have node ref, and that we shouldn't skip observing\n if (skip || !ref) return;\n let unobserve;\n unobserve = observe(ref, (inView, entry) => {\n setState({\n inView,\n entry\n });\n if (callback.current) callback.current(inView, entry);\n\n if (entry.isIntersecting && triggerOnce && unobserve) {\n // If it should only trigger once, unobserve the element after it's inView\n unobserve();\n unobserve = undefined;\n }\n }, {\n root,\n rootMargin,\n threshold,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n }, fallbackInView);\n return () => {\n if (unobserve) {\n unobserve();\n }\n };\n }, // We break the rule here, because we aren't including the actual `threshold` variable\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [// If the threshold is an array, convert it to a string, so it won't change between renders.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n Array.isArray(threshold) ? threshold.toString() : threshold, ref, root, rootMargin, triggerOnce, skip, trackVisibility, fallbackInView, delay]);\n const entryTarget = (_state$entry = state.entry) == null ? void 0 : _state$entry.target;\n const previousEntryTarget = React.useRef();\n\n if (!ref && entryTarget && !triggerOnce && !skip && previousEntryTarget.current !== entryTarget) {\n // If we don't have a node ref, then reset the state (unless the hook is set to only `triggerOnce` or `skip`)\n // This ensures we correctly reflect the current state - If you aren't observing anything, then nothing is inView\n previousEntryTarget.current = entryTarget;\n setState({\n inView: !!initialInView,\n entry: undefined\n });\n }\n\n const result = [setRef, state.inView, state.entry]; // Support object destructuring, by adding the specific values.\n\n result.ref = result[0];\n result.inView = result[1];\n result.entry = result[2];\n return result;\n}\n\nexport { InView, defaultFallbackInView, observe, useInView };\n//# sourceMappingURL=react-intersection-observer.modern.mjs.map\n"],"names":["ButtonEpiLink","props","ref","linkUrl","target","buttonProps","anchorRel","includes","undefined","asChild","href","rel","children","getRecommendations","isLoading","recommendation","recommendationId","onlyPromotions","inViewRef","inView","lazyLoad","useEffect","headerId","useId","items","length","isOnlyProductsRecommendation","every","item","showNewHeader","backgroundColor","as","headerSlot","id","headingProps","title","useSwiper","analyticsListName","horizontalHidden","renderProduct","index","listPosition","slotId","product","isALink","disableLink","analyticsOptions","list","position","isAsyncLink","disableAsyncLink","renderRecipe","recipe","banner","slotClickSent","useRef","sendSlotClick","useCallback","current","onSlotClickTrack","identifier","onTeaserClick","onLinkClick","isFoodbox","isFoodBox","recipeSlot","name","rating","averageRating","co2ImpactKg","climateImpactKg","imageUrl","url","votes","numberOfVotes","trackSlotClick","foodboxSlot","recipeId","isFavourite","onFavouriteRecipeToggleClick","trackRecipeClick","useRecipeEventsTracking","BaseRecipeTeaser","Wrapper","withBorder","topSlot","FavoriteRecipeToggle","isFavorite","onClick","disabled","Badges","Chip","theme","size","Content","Info","Heading","Actions","Button","fullWidth","e","click","foodbox","BlockHeader","linkText","className","HeaderContainer","Link","Header","element","stylingElement","color","alignment","fontFamilySecondary","hasHeaderText","hasLink","style","width","flexOrder","RatingContainer","RatingStars","ClimateImpact","RecommendationsBlock","swiperOptions","gridAdditionalClasses","cellsInRow","swiperMainClass","swiperMainClassName","gridClasses","itemUniqueKey","renderItem","renderSkeleton","isProductRecommendation","recommendationItem","type","Product","getRecommendationUniqueIdentifier","useDynamicYieldRecommendations","execute","result","error","useAsyncDispatcher","initialLoadingState","currentProductionUnit","storeSelectors","context","window","DY","recommendationContext","data","location","selector","analyticsMetadata","ecommerce","dynamicYield","campaign","useVerticalProductTeaserContainer","containerType","hasBanner","breakpointAreaName","AREA_NEW_PRODUCT_GRID","AREA_NEW_PRODUCT_LIST_WITH_BANNER","AREA_NEW_PRODUCT_LIST","getProductTeaserContainerBreakpointAreaName","breakpoints","mainSwiperClasses","spaceBetween","useMemo","fetchProductRecommendations","storeId","pageContext","getProductRecommendation","mapEpiButtonLinkPropertyBlock","link","mapEpiButtonPropertyBlock","mapEpiButtonTheme","ariaLabel","marginRight","marginLeft","text","exhaustiveGuard","_value","Error","JSON","stringify","mapEpiDynamicYieldBlockToProps","useProductSlider","showOnlyPromotions","mapEpiHeadingPropertyBlock","mapEpiHeadingPropertyFallback","headline","heading","showBanner","mapImageTextPropertyToProps","renderButton","bProps","mapEpiImageTextPropertyToLinkFallback","buttonLink","renderSecondaryButton","secondaryButtonLink","renderHeading","hProps","mappedProps","level","stylingLevel","oldHeader","mapEpiImagePropertyBlock","imageBlock","srcSet","images","map","cloudinaryImageUrl","height","minWidth","breakpointFrom","filter","Boolean","defaultImageUrl","defaultCloudinaryImageUrl","defaultImage","defaultImageHeight","imageAltText","altText","options","useFallbackedProperties","mappedImageProperty","fromMobileImage","find","fromZero","image","narrowImage","push","imageHeight","body","centerBlockHorizontally","centerBlockVertically","contentLessHorizontalPadding","contentLessPadding","isClickable","textColor","openLinkIn","lazy","lazyImage","gaPromoId","gaPromoName","gaPromoCreative","gaPromoPosition","mapImageTextToHeadingWithFallbacks","mapImageTextToHeading","mapImageTextToButtonWithFallbacks","mapImageTextToButton","secondaryButtonProps","input","mapped","ElementFallbackAlignment","allProps","buttonText","buttonColor","mapOldEpiImageTextColor","titleColor","Axios","AxiosError","CanceledError","isCancel","CancelToken","VERSION","all","Cancel","isAxiosError","spread","toFormData","AxiosHeaders","HttpStatusCode","formToJSON","getAdapter","mergeConfig","observerMap","Map","RootIds","WeakMap","unsupportedValue","rootId","observe","callback","fallbackInView","IntersectionObserver","bounds","getBoundingClientRect","isIntersecting","intersectionRatio","threshold","time","boundingClientRect","intersectionRect","rootBounds","observer","elements","Object","keys","sort","key","root","has","set","toString","get","optionsToId","instance","thresholds","entries","forEach","entry","_elements$get","some","trackVisibility","isVisible","Array","isArray","createObserver","callbacks","splice","indexOf","delete","unobserve","disconnect","useInView","delay","rootMargin","triggerOnce","skip","initialInView","onChange","_state$entry","setRef","state","setState","entryTarget","previousEntryTarget"],"sourceRoot":""}