{"version":3,"file":"index.es.min.js","sources":["../../../packages/helpers/src/props.helpers.js","../../../packages/helpers/src/assets/js/eventBus.js","../../../packages/helpers/src/assets/js/eventDispatch.js","../../../packages/components/src/constants.mjs","../../../packages/helpers/src/getCurrency.js","../../../packages/helpers/src/catalog.js","../../../packages/helpers/src/events.helpers.ts","../../../packages/helpers/src/utils.ts","../../../packages/helpers/src/gtmEvents.js","../../../packages/helpers/src/dataLayer.js","../../../packages/components/src/cta/cta.js","../../../packages/components/src/img/js/constants.js","../../../packages/components/src/img/img.js","../../../packages/components/src/link/link.js","../../../packages/helpers/src/assets/js/viewportTracking.js","../../../packages/helpers/src/assets/js/zoneTracking.js","../../../packages/helpers/src/viewport.helpers.ts","../../../packages/components/src/container/container.js","../../../packages/components/src/chip/chip.js","../../../packages/helpers/src/assets/js/scopedKeyboardNav.js","../../../packages/components/src/dropdown/dropdown.js","../../../packages/helpers/src/assets/js/productTracking.js","../../../packages/components/src/add-to-cart/addToCart.js","../../../packages/components/src/plp-sticky-bar/plp-sticky-bar.js","../../../packages/helpers/src/swipeEvents.ts","../../../packages/components/src/popin/components/overlay.js","../../../packages/components/src/popin/popin.js","../../../packages/helpers/src/cremaDataHelper.js","../../../packages/components/src/card-logos/cardLogos.js","../../../packages/components/src/card-labels/cardLabels.js","../../../packages/components/src/slider-menu/js/constants.js","../../../packages/components/src/slider-menu/js/SliderMenuLib.js","../../../packages/components/src/slider-menu/slider-menu.js","../../../packages/components/src/slider-natural/slider-natural.js","../../../packages/helpers/src/contrast.helpers.js","../../../packages/helpers/src/useragent.helpers.ts","../../../packages/helpers/src/refs.helpers.js","../../../packages/helpers/src/impolicy.js","../../../packages/components/src/navigation-bubbles/components/bubble/js/constants.js","../../../packages/components/src/navigation-bubbles/components/bubble/bubble.js","../../../packages/helpers/src/intersection-observer.service.js","../../../packages/helpers/src/deferred.js","../../../packages/helpers/src/scrollTo.ts","../../../packages/components/src/navigation-bubbles/data/constants.js","../../../packages/components/src/navigation-bubbles/navigation-bubbles.js","../../../packages/components/src/navigation-bubbles/services/events.manager.js","../../../packages/components/src/nespressoElement/nespressoElement.js","../../../services/plp-data/src/prod/index.js","../../../packages/apps/src/plp-core/config/experiments.ts","../../../packages/apps/src/plp-core/config/constants.js","../../../packages/apps/src/plp-core/store/plp.data.js","../../../packages/apps/src/plp-core/store/plp.actions.js","../../../services/crema-service/src/Store.ts","../../../services/crema-service/src/CremaService.ts","../../../packages/apps/src/plp-core/store/plp.events.js","../../../packages/apps/src/plp-core/helpers/tracking.js","../../../packages/apps/src/plp-core/store/index.js","../../../packages/apps/src/plp-core/components/filter/popin/plp.filter-popin.mobileDropDown.js","../../../packages/apps/src/plp-core/components/filter/popin/plp.filter-popin.content.js","../../../packages/apps/src/plp-core/components/filter/popin/plp.filter-popin.footer.js","../../../packages/apps/src/plp-core/components/filter/plp.filter-popin.js","../../../packages/apps/src/plp-core/components/filter/plp.filter-cta.js","../../../packages/apps/src/plp-core/components/filter/plp.filter-links.js","../../../packages/apps/src/plp-core/components/filter/plp.filter-sort.js","../../../packages/apps/src/plp-core/components/filter/_plp.filter.main.js","../../../packages/components/src/sticky/sticky.service.js","../../../packages/apps/src/plp-core/components/navigation/plp.bar.js","../../../node_modules/preact-custom-element/dist/preact-custom-element.esm.js","../../../packages/apps/src/hooks/useAppData.ts","../../../packages/apps/src/plp-core/components/navigation/_plp.navigation.main.js","../../../node_modules/classnames/index.js","../../../node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js","../../../packages/apps/src/components/ProductGrid.tsx","../../../packages/apps/src/components/cards/base/ProductCard.tsx","../../../packages/apps/src/components/cards/base/ProductCardSection.tsx","../../../packages/apps/src/components/cards/sections/RowDividerSection.tsx","../../../packages/apps/src/components/cards/sections/BackgroundSection.tsx","../../../packages/helpers/src/cupSizeIcons.js","../../../packages/apps/src/components/cards/sections/ProductFeaturesSection/ProductFeaturesSection.utils.ts","../../../packages/apps/src/components/cards/parts/IntensityMeter/svgPathArc.ts","../../../packages/apps/src/components/cards/parts/IntensityMeter/IntensityMeter.tsx","../../../packages/apps/src/components/cards/parts/FeatureIcon/FeatureIcon.tsx","../../../packages/apps/src/components/cards/sections/ProductFeaturesSection/Columns.tsx","../../../packages/apps/src/components/cards/sections/ProductFeaturesSection/ProductFeaturesSection.tsx","../../../packages/apps/src/components/typography/FormattedText/FormattedText.tsx","../../../packages/apps/src/components/cards/parts/ProductTag/ProductTag.tsx","../../../packages/apps/src/components/cards/sections/ProductTagsSection/ProductTagsSection.tsx","../../../packages/helpers/src/createImPolicyQuery.ts","../../../packages/apps/src/components/cards/parts/ProductImage/ProductImage.tsx","../../../packages/apps/src/components/cards/sections/ProductImageSection.tsx","../../../packages/apps/src/components/cards/parts/AddToCartButton/UnmanagedDom.tsx","../../../packages/apps/src/components/cards/parts/AddToCartButton/AddToCartButton.tsx","../../../packages/apps/src/utils/priceUtils.ts","../../../packages/apps/src/components/cards/parts/OutOfStock/OutOfStock.tsx","../../../packages/apps/src/components/cards/parts/Price/PriceDisplay.tsx","../../../packages/apps/src/components/cards/parts/Price/Price.tsx","../../../packages/apps/src/utils/getCremaUITranslation.ts","../../../packages/apps/src/utils/screenUtils.ts","../../../packages/apps/src/components/cards/sections/PurchaseSection/PurchaseSection.tsx","../../../packages/apps/src/hooks/useIntersection.tsx","../../../packages/apps/src/components/cards/parts/NameHeadline/NameHeadline.tsx","../../../packages/apps/src/components/cards/sections/ProductNameSection/ProductNameSection.tsx","../../../packages/components/src/compatibility/CompatibilityButton/CompatibilityButton.tsx","../../../packages/helpers/src/productCompatibility.ts","../../../packages/apps/src/components/cards/sections/ProductCompatibilitySection/ProductCompatibilitySection.tsx","../../../packages/apps/src/components/cards/CoffeeProductCard/CoffeeProductCard.tsx","../../../packages/apps/src/components/cards/AssortmentProductCard/AssortmentProductCard.tsx","../../../packages/apps/src/components/ProductCardsList.tsx","../../../packages/apps/src/components/cards/CollectionCard/getBackgroundImage.ts","../../../packages/apps/src/components/cards/CollectionCard/CollectionCard.tsx","../../../packages/apps/src/components/banner/CollectionBanner.tsx","../../../packages/components/src/compatibility/CompatibilityModal/modalUtils.ts","../../../packages/apps/src/components/ModalDrawer/ModalDrawer.tsx","../../../packages/apps/src/utils/isOldSafari.ts","../../../packages/components/src/compatibility/CompatibilityModal/CompatibilityModal.tsx","../../../packages/components/src/loader/loader.js","../../../packages/apps/src/components/Loader.tsx","../../../packages/helpers/src/asWebComponent.ts","../../../packages/apps/src/plp-coffee-cards/components/results/plp-cards-grid.tsx","../../../packages/apps/src/plp-core/components/results/plp.results-chip.js","../../../packages/apps/src/plp-coffee-cards/components/results-header/plp-results-header.js","../../../packages/apps/src/plp-core/plp.app.js","../../../packages/apps/src/plp-core/models/Category.js","../../../packages/apps/src/plp/models/coffee.category.js","../../../packages/apps/src/plp-core/models/Product.js","../../../packages/apps/src/plp/models/coffee.product.js","../../../packages/apps/src/plp-core/models/NavigationLinks.js","../../../packages/apps/src/plp-core/models/NavigationBubbles.js","../../../packages/apps/src/plp-core/models/MainDTO.js","../../../packages/apps/src/plp-core/helpers/getMinMaxIntensity.js","../../../packages/apps/src/plp-core/helpers/getCupSizesDetails.js","../../../packages/apps/src/plp/dataTransform/plp-coffee.dto.js","../../../services/plp/services.js","../../../packages/helpers/src/notesIcons.js","../../../packages/apps/src/plp-core/filter/filter.js","../../../packages/apps/src/plp-core/filter/types/DefaultFilterChipType.js","../../../packages/apps/src/plp-core/filter/createFilter.js","../../../packages/apps/src/plp-core/filter/createCategoriesFilter.js","../../../packages/apps/src/plp/dataTransform/plp-coffee.filterIntensity.dto.js","../../../packages/apps/src/plp/dataTransform/plp-coffee.filters.dto.js","../../../packages/apps/src/plp/dataTransform/plp-coffee.sort.dto.js","../../../packages/apps/src/plp-core/store/plp.states.js","../../../packages/apps/src/plp-coffee-cards/store/appStates.ts","../../../packages/apps/src/plp-coffee-cards/plp-coffee-cards.component.js"],"sourcesContent":["const getData = attributes => attributes.find(attribute => attribute.nodeName === 'data')\n\nconst createProps = attributes => {\n const data = getData([...attributes])\n const props = [...attributes]\n .filter(attribute => attribute.nodeName !== 'data')\n .reduce((all, attr) => {\n return { ...all, [attr.nodeName]: attr.nodeValue }\n }, {})\n\n if (isNil(data)) {\n return props\n }\n\n try {\n return { ...props, ...JSON.parse(data.nodeValue) }\n } catch (error) {\n console.log('ERROR: No data', error, data?.nodeValue)\n }\n}\n\nconst isNil = obj => obj === undefined || obj === null\n\nexport const parseBool = value => (!value || value === 'false' ? false : true)\n\nexport default createProps\n","class EventBus {\n constructor() {\n this._bus = document.createElement('div')\n }\n\n register(event, callback) {\n this._bus.addEventListener(event, callback)\n }\n\n remove(event, callback) {\n this._bus.removeEventListener(event, callback)\n }\n\n fire(event, detail = {}) {\n this._bus.dispatchEvent(new CustomEvent(event, { detail }))\n }\n}\n\nif (!bus) {\n var bus = new EventBus()\n}\n\nexport default bus\n","export const dispatchEvent = ({ eventName, args, element }) => {\n // Use the provided element or fallback to window if available\n if (!element) {\n if (typeof window !== 'undefined') {\n element = window\n } else {\n throw new Error(\n '`element` is not provided and `window` is unavailable. Provide a valid element to dispatch the event.'\n )\n }\n }\n\n let event\n if (args) {\n event = new CustomEvent(eventName, { detail: args, bubbles: true })\n } else {\n if (typeof Event === 'function') {\n event = new Event(eventName)\n } else {\n event = document.createEvent('Event')\n event.initEvent(eventName, true, true)\n }\n }\n element.dispatchEvent(event)\n}\n\nexport const readEvent = e => {\n if (!e.detail) {\n return\n }\n return e.detail\n}\n","export const MAX_WIDTH_CONTAINER = 1160\n\nexport const BREAKPOINT_XL = 1920\nexport const BREAKPOINT_TABLET = 1024\nexport const BREAKPOINT_L = 996\nexport const BREAKPOINT_M = 768\nexport const BREAKPOINT_S = 750\nexport const BREAKPOINT_XS = 375\n\nexport const CTA_PRIMARY = 'primary'\nexport const CTA_PRIMARY_TRANSPARENT = 'primary_transparent'\nexport const CTA_SUBTLE = 'subtle'\nexport const CTA_LINK = 'link'\nexport const CTA_LINK_UNDERLINE = 'link-underline'\nexport const CTA_LINK_GOLD = 'link-gold'\nexport const CTA_LINK_ADD_TO_CART_SMALL = 'AddToCart_small'\nexport const CTA_LINK_ADD_TO_CART_LARGE = 'AddToCart_large'\n\nexport const EVENT_TAB_CHANGE = 'EVENT_TAB_CHANGE'\n\nexport const EVENT_VIDEO = 'WEB_COMPONENT_VIDEO'\nexport const EVENT_POPIN_OPEN = 'WEB_COMPONENT_POPIN_OPEN'\nexport const EVENT_POPIN_OPENED = 'WEB_COMPONENT_POPIN_OPENED'\nexport const EVENT_POPIN_CLOSE = 'WEB_COMPONENT_POPIN_CLOSE'\nexport const EVENT_POPIN_CLOSED = 'WEB_COMPONENT_POPIN_CLOSED'\nexport const EVENT_POPIN_CLOSE_CLICK = 'WEB_COMPONENT_POPIN_CLOSE_CLICK'\nexport const EVENT_POPIN_KEY_DOWN = 'keydown'\nexport const EVENT_POPIN_FORM_TOGGLE_TITLE = 'WEB_COMPONENT_POPIN_FORM_TOGGLE_TITLE'\nexport const EVENT_CTA_CLICK = 'WEB_COMPONENT_CTA_CLICK'\nexport const EVENT_HERO_REORDER_OPEN = 'WEB_COMPONENT_HERO_REORDER_OPEN'\nexport const EVENT_HERO_REORDER_CLOSE = 'WEB_COMPONENT_HERO_REORDER_CLOSE'\nexport const EVENT_QUICKVIEW_OPEN = 'WEB_COMPONENT_QUICKVIEW_OPEN'\nexport const EVENT_QS_OPEN = 'WEB_COMPONENT_QS_OPEN'\nexport const EVENT_QS_OPENED = 'WEB_COMPONENT_QS_OPENED'\nexport const EVENT_QS_CLOSE = 'WEB_COMPONENT_QS_CLOSE'\nexport const EVENT_QS_CLOSED = 'WEB_COMPONENT_QS_CLOSED'\nexport const EVENT_QS_CLOSE_CLICK = 'WEB_COMPONENT_QS_CLOSE_CLICK'\nexport const EVENT_QS_KEY_DOWN = 'keydown'\nexport const EVENT_ADD_TO_CART = 'WEB_COMPONENT_ADD_TO_CART'\nexport const EVENT_CART_UPDATED = 'WEB_COMPONENT_CART_UPDATED'\nexport const EVENT_VIDEO_TOGGLE = 'WEB_COMPONENT_VIDEO_TOGGLE'\nexport const VIDEO_ON_HOVER = 'VIDEO_ON_HOVER'\nexport const VIDEO_ON_OUT = 'VIDEO_ON_OUT'\nexport const EVENT_DETAIL_OPEN = 'WEB_COMPONENT_DETAIL_OPEN'\nexport const EVENT_SLIDER_READY = 'WEB_COMPONENT_SLIDER_READY'\nexport const EVENT_SLIDE_CHANGE = 'WEB_COMPONENT_SLIDE_CHANGE'\nexport const EVENT_OVERLAY_OPEN = 'WEB_COMPONENT_OVERLAY_OPEN'\nexport const EVENT_OVERLAY_CLOSE = 'WEB_COMPONENT_OVERLAY_CLOSE'\nexport const EVENT_OVERLAY_CLICKED = 'WEB_COMPONENT_OVERLAY_CLICKED'\nexport const EVENT_OPEN_PRODUCT_AR_CLICKED = 'OPEN_PRODUCT_AR_CLICKED'\nexport const EVENT_SORT_BY_CHANGE = 'WEB_COMPONENT_SORT_BY_CHANGE'\n\nexport const EVENT_BUBBLE_SELECTED = 'EVENT_BUBBLE_SELECTED'\nexport const EVENT_RECO_TOOL_OPTION_CLICKED = 'EVENT_RECO_TOOL_OPTION_CLICKED'\nexport const WEB_COMPONENT_PROJECTS_LOADED = 'WEB_COMPONENT_PROJECTS_LOADED'\nexport const WEB_COMPONENT_ANCHOR_LOADED = 'WEB_COMPONENT_ANCHOR_LOADED'\n\nexport const EVENT_SWIPED_UP = 'swiped-up'\nexport const EVENT_SWIPED_DOWN = 'swiped-down'\nexport const EVENT_SWIPED_LEFT = 'swiped-left'\nexport const EVENT_SWIPED_RIGHT = 'swiped-right'\n\nexport const EVENT_HEADER_POSITION_CHANGED = 'EVENT_HEADER_POSITION_CHANGED'\n\nexport const keys = { ESC: 'Escape' }\n\nexport const ADD_TO_CART_MODIFIER_MINI = 'mini'\nexport const ADD_TO_CART_MODIFIER_DEFAULT = ADD_TO_CART_MODIFIER_MINI\n\nexport const COFFEE_ORIGINAL = 'original'\nexport const COFFEE_VERTUO = 'vertuo'\nexport const COFFEE_PRO = 'pro'\nexport const COFFEE_OL = 'OL'\nexport const COFFEE_VL = 'VL'\nexport const INTENSITY_MAX_OL = 14\nexport const INTENSITY_MAX_VL = 12\nexport const DEFAULT_BUBBLE_ICON = ''\n\nexport const NUMBER_PRODUCTS_SLIDER = 8\nexport const NUMBER_FEATURES_PDP = 8\n\nexport const ALIGNMENT = ['center', 'left', 'right']\nexport const POSITION = ['top', 'right', 'bottom', 'left']\nexport const TRANSLATION_ADD_TO_CART = 'Add to cart'\nexport const TRANSLATION_UPDATE_BASKET = 'Update basket'\n\nexport const TIME_INSTANT = 1\nexport const TIME_FAST = 300\nexport const TIME_MEDIUM = 600\nexport const TIME_SLOW = 1200\n\nexport const APP_APPLE_LINK = {\n default: 'https://apps.apple.com/us/app/nespresso/id342879434',\n us: 'https://apps.apple.com/us/app/nespresso-new/id1609639566',\n uk: 'https://apps.apple.com/gb/app/nespresso-new/id1609639566',\n kr: 'https://apps.apple.com/kr/app/%EB%84%A4%EC%8A%A4%ED%94%84%EB%A0%88%EC%86%8C-%EB%B6%80%ED%8B%B0%ED%81%AC/id1609639566'\n}\nexport const APP_ANDROID_LINK =\n 'https://play.google.com/store/apps/details?id=com.nespresso.activities'\nexport const APP_HUAWEI_LINK = 'https://appgallery.huawei.com/app/C102571517'\n\nexport const SRC_PAGE_PLP = 'plp'\nexport const SRC_PAGE_PDP = 'pdp'\n\nexport const PLP_TYPE_COFFEE = 'coffee'\nexport const PLP_TYPE_MACHINE = 'machine'\nexport const PLP_TYPE_ACCESSORY = 'accessory'\nexport const CALLEO_API_DOMAIN = 'https://www.contact.nespresso.com/'\n\n// SCSS RELATED\n// Todo : should be shared by JS and SCSS\nexport const BROWSER_CONTEXT = 16 // 1rem = 16px\nexport const COLOR_WHITE_1000 = '#FFFFFF' // Do not change for #FFF shortcut, it will break slider-natural gradients !\n\nexport const CONTRAST_DARK = 'dark'\nexport const CONTRAST_LIGHT = 'light'\n\nexport const B2B_CONTACT_FORM_POPIN_ID = 'b2b-contact-form-popin-id'\nexport const B2B_CONTACT_FORM_POPIN_SRC_SEARCH = 'coveo-search'\n\nexport const B2B_CONTACT_FORM_POPIN_SRC_SKU_MAIN_INFO = 'sku-main-info'\n\nexport const B2B_CONTACT_FORM_POPIN_SRC_SKU_MAIN_INFO_AUTO = 'sku-main-info-auto'\n\nexport const ASPECT_RATIO_16_9 = '16/9'\nexport const ASPECT_RATIO_1_1 = '1/1'\n\nexport const NESPRESSO_PRODUCTION_DOMAIN = 'https://www.nespresso.com'\nexport const NESPRESSO_ROLLOUT_DOMAIN = 'https://nc2-env-rollout.nespresso.com'\n\nexport const EVENT_QUIZ_ON_GO_BACK = 'WEB_COMPONENT_EVENT_QUIZ_ON_GO_BACK'\nexport const EVENT_QUIZ_SUBMIT = 'WEB_COMPONENT_EVENT_QUIZ_SUBMIT'\n","export const getCurrency = () => window[window.config.padl.namespace].dataLayer.app.app.currency\n","import { COFFEE_VERTUO } from '@kissui/components/src/constants.mjs'\nimport { getCurrency } from './getCurrency'\nexport { getCurrency } from './getCurrency'\n\nexport const ECAPI_TYPE_CAPSULE = 'capsule'\nexport const ECAPI_TYPE_MACHINE = 'machine'\nexport const ECAPI_TYPE_ACCESSORY = 'accessory'\nexport const ECAPI_TYPE_GIFT_CARD = 'giftcard'\n\nconst TECHNOLOGY_CATEGORY_IDENTIFIER = '/machineTechno/'\nconst SLEEVE_OF_10 = 10\nconst SLEEVE_OF_7 = 7\n\nconst trimSku = sku => sku.replace(/[^a-z0-9- +./]/gi, '')\n\nexport const getLegacySKU = productId => productId.split('prod/').pop()\n\nexport const getPriceFormatter = async () => await window.napi.priceFormat()\n\nexport const getProduct = sku => window.napi.catalog().getProduct(trimSku(sku))\n\nexport function getTechnologyName(productData) {\n const techno = productData.technologies[0]\n return techno.substring(\n techno.indexOf(TECHNOLOGY_CATEGORY_IDENTIFIER) + TECHNOLOGY_CATEGORY_IDENTIFIER.length\n )\n}\n\nfunction isMultipleOf(quantity, multiple) {\n return quantity % multiple === 0\n}\n\nexport function getSleeveNumber(product, getTechnologyNameFn = getTechnologyName) {\n if (product.sales_multiple !== 1 && isMultipleOf(product.sales_multiple, SLEEVE_OF_10)) {\n // Sleeve of original or vertuo\n return product.sales_multiple / SLEEVE_OF_10\n }\n\n if (\n product.sales_multiple !== 1 &&\n getTechnologyNameFn(product) === COFFEE_VERTUO &&\n isMultipleOf(product.sales_multiple, SLEEVE_OF_7)\n ) {\n // Sleeve of vertuo\n return product.sales_multiple / SLEEVE_OF_7\n }\n\n if (product.sales_multiple === 1 && isMultipleOf(product.unitQuantity, SLEEVE_OF_10)) {\n // Bundle of original or vertuo\n return product.unitQuantity / SLEEVE_OF_10\n }\n\n if (\n product.sales_multiple === 1 &&\n getTechnologyNameFn(product) === COFFEE_VERTUO &&\n isMultipleOf(product.unitQuantity, SLEEVE_OF_7)\n ) {\n // Bundle of vertuo\n return product.unitQuantity / SLEEVE_OF_7\n }\n\n return NaN\n}\n\n/**\n * Guess if the product is part of a bundle.\n * This is determined by checking the 'sales_multiple' and 'unitQuantity' properties.\n */\nexport function isBundled(productData) {\n // TODO: this function should not change the productData, but some components still need it\n productData.sales_multiple = productData.sales_multiple || productData.salesMultiple\n\n const isSalesMultipleGreaterThanOne = productData.sales_multiple > 1\n const isUnitQuantityEqualToOne = productData.unitQuantity === 1\n const isSalesMultipleEqualToOne = productData.sales_multiple === 1\n const isUnitQuantityGreaterThanOne = productData.unitQuantity > 1\n\n // The product is not bundled if sales_multiple > 1 and unitQuantity = 1\n if (isSalesMultipleGreaterThanOne && isUnitQuantityEqualToOne) {\n return false\n }\n\n // The product is bundled if sales_multiple = 1 and unitQuantity > 1\n return isSalesMultipleEqualToOne && isUnitQuantityGreaterThanOne\n}\n\n/**\n * Replace an array of SKU with product data\n * Remove the element inside the list if sku fail. It prevents to get an empty item.\n * @param {Array.<String>} skus\n * @param getProductFn\n * @returns {Promise<Awaited<unknown>[]>}\n */\nexport function getProductAndClean(skus, getProductFn = getProduct, napi = window.napi) {\n const promises = []\n\n if (!napi) {\n return Promise.reject()\n }\n\n if (!Array.isArray(skus)) {\n skus = [skus]\n }\n\n // Load manually the product to delete SKU fail\n for (const sku of skus) {\n promises.push(\n getProductFn(sku)\n .then(data => skus.splice(skus.indexOf(sku), 1, data))\n .catch(() => {\n skus.splice(skus.indexOf(sku), 1)\n console.error(`getProduct fail on sku ${sku}`)\n })\n )\n }\n\n return Promise.all(promises)\n}\n\nexport const getFormattedPrice = async price => {\n const priceFormatter = await getPriceFormatter()\n const currency = getCurrency()\n\n return priceFormatter.html\n ? priceFormatter.html(currency, price)\n : priceFormatter.short(currency, price) || ''\n}\n\nexport const getProductCategories = async sku => {\n const productDetails = await getProduct(sku)\n const productCategories = productDetails ? productDetails.supercategories : []\n const productCategoriesNew = await Promise.all(\n productCategories.map(async categoryEncoded => {\n const productCategoryData = await window.napi.catalog().getCategory(categoryEncoded)\n return productCategoryData\n })\n )\n return productCategoriesNew\n}\n","export type EventListener = {\n element: HTMLElement\n type: string\n listener: (e: Event) => void\n options?: boolean | AddEventListenerOptions\n}\n\nconst add = (eventListeners: EventListener[] = []) => {\n eventListeners.forEach(eventListener => {\n if (!eventListener || !eventListener.element) {\n return\n }\n return eventListener.element.addEventListener(\n eventListener.type,\n eventListener.listener,\n eventListener.options\n )\n })\n}\n\nconst remove = (eventListeners: EventListener[] = []) => {\n eventListeners.forEach(eventListener => {\n if (!eventListener || !eventListener.element) {\n return\n }\n eventListener.element.removeEventListener(eventListener.type, eventListener.listener)\n })\n}\n\nconst busNamespace = 'pageBuilder'\n\nexport const emitCustomEvent = (eventName: string, data: unknown) => {\n const customEvent = new CustomEvent(`${busNamespace}.${eventName}`, {\n detail: data,\n bubbles: true,\n cancelable: true,\n composed: false\n })\n\n window.dispatchEvent(customEvent)\n}\n\nexport default { add, emitCustomEvent, remove }\n","export { waitForSelector } from './waitForSelector'\n\nexport const constants = {\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n ESC: 27,\n SPACE: 32,\n ENTER: 13,\n TAB: 9\n}\n\nexport function capitalize(s = '') {\n return s[0].toUpperCase() + s.slice(1)\n}\n\nexport const convertToCamelCase = (str: string): string => {\n const arr = str.match(/[a-z]+|\\d+/gi)\n if (!arr) { return str }\n return arr.map((m, i) => {\n let low = m.toLowerCase()\n if (i !== 0) {\n low = low.split('').map((s, k) => (k === 0 ? s.toUpperCase() : s)).join(\"\")\n }\n return low\n }).join(\"\")\n}\n\nexport function slug(s = '') {\n return s\n .toLowerCase()\n .trim()\n .replace(/\\s+/g, '-') // Replace spaces with -\n .replace(/[^\\w-]+/g, '') // Remove all non-word chars\n .replace(/--+/g, '-') // Replace multiple - with single -\n}\n\nexport function pxToEm(target: number, stripedInnerFontSize = 1) {\n return target / 14 / stripedInnerFontSize + 'em'\n}\n\nexport function percent(target: number) {\n return target + '%'\n}\n\nexport function parseHTML(str: string) {\n const tmp = document.implementation.createHTMLDocument('')\n tmp.body.innerHTML = str\n return tmp.body.childNodes\n}\n\nexport function stripHTML(str: string) {\n const tmp = document.implementation.createHTMLDocument('')\n tmp.body.innerHTML = str\n return (tmp.body.textContent ?? \"\").replace(RegExp('[\\\\s|\\'|\"]', 'g'), '')\n}\n\nexport function makeId(length: number) {\n var result = ''\n var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'\n var charactersLength = characters.length\n for (var i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength))\n }\n return result\n}\n\nexport function removeEmptyValues(obj: { [key: string]: any }): { [key: string]: any } {\n const findText = [\n 'Default campaign ID (tracking missing in Page Builder export)',\n 'Default campaign name (tracking missing in Page Builder export)',\n 'promoname', \n 'promoid', \n 'promocreative', \n 'undefined'\n ];\n \n for (let key in obj) {\n const value = obj[key];\n \n if (value === null || value === undefined || value === '') {\n delete obj[key];\n continue;\n }\n \n if (typeof value === 'string') {\n for (const text of findText) {\n if (value.includes(text)) {\n delete obj[key];\n break;\n }\n }\n }\n }\n \n return obj;\n}\n\nexport function makeHash(str: string) {\n var hash = 0,\n i,\n chr\n if (!str) {\n return hash\n }\n for (i = 0; i < str.length; i++) {\n chr = str.charCodeAt(i)\n hash = (hash << 5) - hash + chr\n hash |= 0 // Convert to 32bit integer\n }\n return 'id-' + hash\n}\n\nexport function getHashLink(link: string) {\n let linkHash = link\n let linkNoHash = link\n if (link.indexOf('#') !== -1) {\n linkNoHash = link.replace('#', '')\n } else {\n linkHash = '#' + link\n }\n\n return { linkNoHash, linkHash }\n}\n\nexport function lazyLoad(node: Element, attribute: string, value: any, url: string) {\n const CLASSNAME_OUT_OF_SCREEN = 'lazy-load'\n const CLASSNAME_IN_SCREEN = 'lazy-loaded'\n const CLASSNAME_ON_ERROR = 'lazy-loaded-error'\n\n const isOldIOS = () => {\n var agent = window.navigator.userAgent,\n start = agent.indexOf('OS ')\n if ((agent.indexOf('iPhone') > -1 || agent.indexOf('iPad') > -1) && start > -1) {\n return window.Number(agent.substr(start + 3, 3).replace('_', '.')) < 14\n }\n return false\n }\n\n const inViewPort = (attribute: string, value: any) => {\n node.setAttribute(attribute, value)\n\n const cb = () => node.classList.add(CLASSNAME_IN_SCREEN)\n\n if (url) {\n const img = new Image()\n img.src = url\n img.onload = cb\n img.onerror = () => {\n cb()\n node.classList.add(CLASSNAME_ON_ERROR)\n throw new Error(`Image ${url} cannot be loaded`)\n }\n\n return\n }\n\n cb()\n }\n\n if (/Trident\\/|MSIE/.test(window.navigator.userAgent) || isOldIOS()) {\n inViewPort(attribute, value)\n } else {\n if ('IntersectionObserver' in window) {\n node.classList.add(CLASSNAME_OUT_OF_SCREEN)\n let lazyBackgroundObserver = new IntersectionObserver(function (entries) {\n entries.forEach(function (entry) {\n if (entry.isIntersecting) {\n inViewPort(attribute, value)\n lazyBackgroundObserver.unobserve(entry.target)\n }\n })\n })\n lazyBackgroundObserver.observe(node)\n } else {\n inViewPort(attribute, value)\n }\n }\n}\n\nexport function lazyLoadCallback(node: Element, cb: () => void) {\n const isOldIOS = () => {\n var agent = window.navigator.userAgent,\n start = agent.indexOf('OS ')\n if ((agent.indexOf('iPhone') > -1 || agent.indexOf('iPad') > -1) && start > -1) {\n return window.Number(agent.substr(start + 3, 3).replace('_', '.')) < 14\n }\n return false\n }\n\n if (/Trident\\/|MSIE/.test(window.navigator.userAgent) || isOldIOS()) {\n cb()\n } else {\n if ('IntersectionObserver' in window) {\n let lazyBackgroundObserver = new IntersectionObserver(\n function (entries) {\n entries.forEach(function (entry) {\n if (entry.isIntersecting) {\n cb()\n lazyBackgroundObserver.unobserve(entry.target)\n }\n })\n },\n { rootMargin: '150% 0px' }\n )\n lazyBackgroundObserver.observe(node)\n }\n }\n}\n\n// Debounce\nexport function debounce<T>(func: (v: T) => void, time = 100) {\n let timer: number\n return function (event: T) {\n if (timer) {\n window.clearTimeout(timer)\n }\n timer = window.setTimeout(func, time, event)\n }\n}\n\n// isIE - to check for internet explorer\nexport function isIE() {\n let ua = window.navigator.userAgent,\n isIE = /MSIE|Trident/.test(ua)\n\n return isIE\n}\n\n// Load external script\nexport const loadExternalScript = ({\n src,\n callback = null,\n async = false,\n defer = false,\n module = false,\n id = ''\n}: {\n src: string;\n callback: null | GlobalEventHandlers[\"onload\"]\n module: boolean,\n defer: boolean,\n async: boolean,\n id: string\n}) => {\n const script = document.createElement('script')\n script.type = module ? 'module' : 'text/javascript'\n script.src = src\n id ? (script.id = id) : false // add id attribute only if passed\n if (typeof callback === 'function') {\n script.onload = callback\n }\n script.async = async\n script.defer = defer\n document.body.appendChild(script)\n}\n\n// Load external css\nexport const loadExternalCss = ({ src }: { src: string }) => {\n const script = document.createElement('link')\n script.rel = 'stylesheet'\n script.href = src\n document.body.appendChild(script)\n}\n// Lazy load vendor script\nexport const lazyLoadVendorScript = (handler, el) => {\n const observer = new IntersectionObserver(handler)\n observer.observe(el)\n}\n\n/**\n * Replaces variable inside a given string\n * Each variable have to be enclosed between stChr and enChr\n * The values have to be contained in the vars object, they key must match\n * example :\n * txt : 'See {resultsLength} Results'\n * vars : {resultsLength:'30'}\n * stChr : '{'\n * enChr : '}'\n *\n * will return : 'See 30 Results'\n *\n * @param {string} txt\n * @param {object} vars\n * @param {string} stChr\n * @param {string} enChr\n */\nexport function interpolate(txt: string, vars: Record<string, null | undefined | string>, stChr: string, enChr: string) {\n let curIdx = 0\n\n while (txt) {\n const stIdx = txt.indexOf(stChr, curIdx)\n if (stIdx === -1) {\n break\n }\n const enIdx = txt.indexOf(enChr, stIdx + 1)\n if (enIdx === -1) {\n break\n }\n const hashId = txt.substring(stIdx + stChr.length, enIdx)\n if (vars[hashId] != null) {\n txt = txt.substr(0, stIdx) + vars[hashId] + txt.substr(enIdx + enChr.length)\n curIdx = stIdx\n } else {\n curIdx = enIdx\n }\n }\n return txt\n}\n\n/**\n * Find in container element, add height to equal size of element\n * @param container css path where my element is contain e.g. `.c-container`\n * @param el css path of elements to equalized\n */\nexport const equalHeight = (containerSelector: string, el: string, elementScope: HTMLElement) => {\n const container = elementScope.querySelector<HTMLElement>(containerSelector)\n if (!container) {\n return\n }\n\n const items = container.querySelectorAll<HTMLElement>(el)\n let max = -1\n\n for (let i = 0; i < [...items].length; i++) {\n const item = [...items][i]\n let h = item.offsetHeight\n max = h > max ? h : max\n }\n\n if (max <= 0) {\n return\n }\n\n for (let i = 0; i < [...items].length; i++) {\n const item = [...items][i]\n item.style.height = `${max}px`\n }\n}\n\nexport const stringifyCurlyQuote = (data: {}) => JSON.stringify(data).replace(\"'\", '’')\n\nexport const stringifyForAttribute = (data = {}) => {\n return escapeHtml(JSON.stringify(data))\n}\n\n/**\n * This function is included instead of sanitizeString because for\n * inserting HTML into innerHTML we need to make sure all HTML\n * entities are escaped.\n */\nexport const escapeHtml = (text: string) => {\n const map = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n } as { [s: string]: string }\n\n return text.replace(/[&<>\"']/g, (m) => map[m])\n}\n\n/**\n * Because setting attributes escapes more than the characters above and then preact also\n * escapes text we need a more complete way of unescaping all html entities (not just the ones\n * above)\n */\nconst domParser = new DOMParser()\nexport const unescapeHtml = (text: string) => {\n return domParser.parseFromString(text, \"text/html\").body.textContent\n}\n\nexport const sanitizeString = (data: {}) => {\n if (!data) {\n return ''\n }\n\n return data.toString().replace(/\"/g, '"').replace(/'/g, ''')\n}\n\nexport const stripTags = (s: string) => {\n return (s || '').replace(/(<([^>]+)>)/gi, '')\n}\n\nexport const setAttributes = (element: Element, attrs: Record<string, any>) => {\n for (let key in attrs) {\n element.setAttribute(key, attrs[key])\n }\n return element\n}\n\nexport const getMetaContent = (metaName: string) => {\n const metaTag = document.querySelector(`meta[name=${metaName}]`)\n if (!metaTag) {\n return ''\n }\n return metaTag.getAttribute('content')\n}\n\nexport const isObjectEmpty = (obj: {}) => {\n return Object.keys(obj).length === 0\n}\n","import { getProduct } from '@kissui/helpers/src/catalog'\nimport { emitCustomEvent } from './events.helpers'\nimport { removeEmptyValues } from '@kissui/helpers/src/utils'\n\nconst raisedByPB = 'page builder'\nconst raisedByWC = 'Web component'\n\n/**\n * helper method for 'itemDisplay' GTM event\n * @param {*} event : 'itemDisplay' - Mandatory as is\n * @param {*} eventRaisedBy : 'Web component' - Mandatory as is\n * @param {*} eventAction : 'Click' - Action that led to the item display. For example, click\n * @param {*} itemTypes : ['products'] - Mandatory as is\n * @param {*} rootElement : ['nb-slider'] - Root DOM element for item detection. Closest common ancestor element of the inserted/displayed promotions and products. It will help the detection to reduce its performance consumption. Set to 0 (zero) in order to request detection through the entire document.\n */\nexport const itemDisplay = args => {\n window.gtmDataObject = window.gtmDataObject || []\n const eventData = {\n event: 'itemDisplay',\n eventRaisedBy: raisedByWC,\n eventAction: 'Click',\n itemTypes: ['products'],\n ...args\n }\n window.gtmDataObject.push(eventData)\n emitCustomEvent('itemDisplay', eventData)\n}\n\n/**\n *\n * helper method for 'customEvent' GTM event\n * @param {*} args (event, eventRaisedBy, eventCategory, eventAction, eventLabel, nonInteraction)\n */\n\nexport const customEvent = args => {\n window.gtmDataObject = window.gtmDataObject || []\n var eventData\n if (args.event_GA4 === undefined || args.event_GA4 === false) {\n eventData = {\n event: 'customEvent',\n eventRaisedBy: raisedByWC,\n ...args\n }\n } else {\n eventData = {\n event_raised_by: raisedByPB,\n ...args\n }\n }\n window.gtmDataObject.push(eventData)\n emitCustomEvent('customEvent', eventData)\n}\n\n/**\n * Helper method for tracking component interactions, compatible with GA4.\n *\n * @param {String} creative : component raising the event, e.g. 'before_coffees_list', 'before_machines_list', 'before_accessories_list'\n * @param {String} actionType : description of the interaction, e.g 'pdp quick view'\n * @param {String} internationalId : long SKU, e.g. 'erp.pt.b2c/prod/7243.30'\n * @param {String} internationalName : international name of the product, e.g. 'Vertuo Carafe Pour-Over Style Mild'\n * @param {String} productType : type of product, i.e. 'capsule', 'machine', 'accessory'\n * @param {String} range : product range, e.g. 'ispirazione italiana'\n * @param {String} technology : technology, i.e. 'original', 'vertuo'\n * @param {Number} price : price, e.g. .51\n * @param {String} eventAction : description of the action, e.g. 'PDP Quick View'\n *\n * Initally created for PDP Quick View tracking:\n * https://dsu-confluence.nestle.biz/display/DIANA/BEFORE+-+PDP+Quick+View\n * Will probably be rolled out across all components, update this comment accordingly.\n */\nexport const trackComponentInteraction = ({\n creative = '',\n actionType = '',\n internationalId = '',\n internationalName = '',\n productType = '',\n technology = '',\n category = '',\n rawPrice = '',\n eventAction = ''\n}) => {\n window.gtmDataObject = window.gtmDataObject || []\n const eventData = {\n event: 'page_builder_component_interaction',\n event_raised_by: raisedByPB,\n component_name: creative,\n action_type: actionType,\n item_id_event: internationalId,\n item_name_event: internationalName,\n item_category_event: productType,\n item_technology_event: technology,\n item_range_event: category,\n item_price_event: rawPrice,\n eventCategory: 'User Engagement',\n eventAction: eventAction,\n eventLabel: `${productType} - ${technology} - ${internationalName}`\n }\n window.gtmDataObject.push(eventData)\n emitCustomEvent('page_builder_component_interaction', eventData)\n}\n\n/**\n *\n * Push 'view_promotion' event for GA 4\n * @param {*} args (event, event_raised_by, ecommerce: {promotion_id, promotion_name, creative_slot, creative_name})\n */\nexport const viewPromotion = args => {\n const event = 'view_promotion'\n const eventData = {\n event,\n event_raised_by: raisedByPB,\n ecommerce: {}\n }\n if (Object.keys(args).length) {\n const { id = '', creative = '', name = '', position = '' } = args\n let ecommerceData = {\n promotion_id: id,\n promotion_name: name,\n creative_slot: position,\n creative_name: creative\n }\n ecommerceData = removeEmptyValues(ecommerceData)\n eventData.ecommerce = ecommerceData\n }\n window.gtmDataObject ??= []\n window.gtmDataObject.push(eventData)\n emitCustomEvent(event, eventData)\n}\n\nexport const handlePromoClick = args => {\n const { campaign, cta_name } = args\n\n const cleanedData = removeEmptyValues(campaign)\n selectPromotion({ cta_name, ...cleanedData })\n}\n\n/**\n *\n * Push 'select_promotion' event for GA 4\n * @param {*} args (event, event_raised_by, cta_name, ecommerce: {promotion_id, promotion_name, creative_slot, creative_name})\n */\nexport const selectPromotion = args => {\n const event = 'select_promotion'\n const eventData = {\n event: 'select_promotion',\n cta_name: args?.cta_name ?? '(not set)',\n event_raised_by: raisedByPB,\n ecommerce: {}\n }\n if (Object.keys(args).length) {\n const { id = '', creative = '', name = '', position = '' } = args\n let ecommerceData = {\n promotion_id: id,\n promotion_name: name,\n creative_slot: position,\n creative_name: creative\n }\n ecommerceData = removeEmptyValues(ecommerceData)\n eventData.ecommerce = ecommerceData\n }\n\n window.gtmDataObject ??= []\n window.gtmDataObject.push(eventData)\n emitCustomEvent(event, eventData)\n}\n\nexport const interactionClick = (nameComponent, ctaName) => {\n window.gtmDataObject = window.gtmDataObject || []\n const eventData = {\n event: 'page_builder_component_interaction',\n event_raised_by: raisedByPB,\n eventCategory: 'User Engagement',\n eventAction: 'Click CTA',\n eventLabel: `Page Builder - ${nameComponent} - ${ctaName}`,\n component_name: nameComponent,\n action_type: 'web component click',\n cta_name: ctaName\n }\n window.gtmDataObject.push(eventData)\n emitCustomEvent('page_builder_component_interaction', eventData)\n}\n\nexport const getProductInfo = async (sku, data) => {\n let product = data\n if (!product) {\n product = await getProduct(sku)\n }\n return product\n}\n\nexport const getProductPayload = (data, actionField = {}) => {\n const {\n internationalName,\n internationalId,\n category,\n unitPrice,\n legacyId,\n name,\n technologies,\n bundled,\n inStock,\n type\n } = data\n\n const technology = technologies.map(item => item.split('/').pop()).join('|')\n const isDiscovery = category.toLowerCase().includes('discovery')\n\n return [\n // Array consists of one product details for PDP Product Detail View\n {\n ...actionField,\n name: internationalName, // '[[International Product Name]]' NIE, Contract\n id: internationalId, // '[[International Product ID]]'\n price: unitPrice, // '[[Product Price]'\n // dimension43: '[[true/false]]', // '[[true/false]]' // Signifies if this product is part of a standing order or not\n dimension44: isDiscovery.toString(), // '[[true/false]]', // Signifies if this product is part of a discovery offer\n dimension53: legacyId, // '[[Product Local market ID]]', // Local market id for product\n dimension54: name, // '[[Product Local market Name]]', // Local market name for product\n dimension55: category, // '[[Product Range]]', // Range of the product, eg: Barista Creations for Ice (Nessoft Category)\n dimension56: technology, // '[[Product Technology]]', //Product technology according to Nespresso categorization (original, vertuo, pro)\n dimension57: bundled ? 'bundle' : 'single', // '[[Product Type]]', //If the product is single or bundle\n dimension192: inStock ? 'in stock' : 'out of stock', // '[in stock]', // \"in stock\" or \"out of stock\"\n category: type, // '[[Product Category]]', //Product category according to Nespresso categorization (Nessoft type): capsule, accessory, machine\n brand: 'Nespresso' // Static value set to Nespresso\n }\n ]\n}\n\nexport const trackDetailView = async (sku, data) => {\n // https://dsu-confluence.nestle.biz/display/DIANA/HQ+PB+Tracking+-+Product+Detail+View\n if (window.pbTrackDetailViewPDP || !sku || !window.napi) {\n return\n }\n\n const productInfo = await getProductInfo(sku, data)\n const productPayload = getProductPayload(productInfo)\n const currency = productInfo.currency\n\n window.gtmDataObject = window.gtmDataObject || []\n const eventData = {\n event: 'detailView',\n currencyCode: currency,\n eventRaisedBy: raisedByPB,\n ecommerce: {\n detail: {\n actionField: {},\n products: productPayload\n }\n }\n }\n window.gtmDataObject.push(eventData)\n // Track only once per page\n window.pbTrackDetailViewPDP = true\n emitCustomEvent('detailView', eventData)\n}\n\nexport const trackAddToCartImpression = (product, isStickyBar) => {\n // https://dsu-confluence.nestle.biz/pages/viewpage.action?spaceKey=DIANA&title=PDP+-+Sticky+Add+To+Cart+Custom+Event\n\n window.gtmDataObject = window.gtmDataObject || []\n const eventData = {\n event: 'page_builder_component_interaction',\n event_raised_by: raisedByPB,\n component_name: 'before_sku_main_info',\n action_type: isStickyBar\n ? 'sticky add to cart impression'\n : 'standard add to cart impression',\n //product info\n item_id_event: product.internationalId,\n item_name_event: product.internationalName,\n item_category_event: product.type,\n item_price_event: product.price_per_capsule?.split(' ')[0],\n item_market_id_event: product.legacyId,\n item_market_name_event: product.name,\n item_range_event: product.category_name,\n item_technology_event: product.technology?.[0]?.split('/').slice(-1) ?? '',\n item_type_event: product.bundled ? 'bundle' : 'single'\n }\n window.gtmDataObject.push(eventData)\n emitCustomEvent('page_builder_component_interaction', eventData)\n}\n\nexport const productImpression = async (position, list, sku, data) => {\n // https://dsu-confluence.nestle.biz/pages/viewpage.action?pageId=225612781\n // don't track already tracked products\n window.gtmDataObject = window.gtmDataObject || []\n const hasDetailView = window.gtmDataObject.find(item => item.event === 'detailView')\n const alreadyTracked = !!hasDetailView?.ecommerce?.detail?.products.find(p =>\n sku.includes(p.id)\n )\n if (alreadyTracked) {\n return\n }\n\n const productInfo = await getProductInfo(sku, data)\n const productPayload = getProductPayload(productInfo, { list: list, position: position })\n const currency = productInfo.currency\n const eventData = {\n event: 'impression',\n eventAction: 'Product Impression',\n currencyCode: currency,\n eventRaisedBy: raisedByPB,\n ecommerce: {\n impressions: productPayload\n }\n }\n window.gtmDataObject.push(eventData)\n emitCustomEvent('impression', eventData)\n}\n\nexport const productClick = async (position, list, sku, data) => {\n // https://dsu-confluence.nestle.biz/pages/viewpage.action?pageId=225612781\n\n if (typeof list !== 'string') return\n\n const productInfo = await getProductInfo(sku, data)\n const productPayload = getProductPayload(productInfo, { position: position })\n const currency = productInfo.currency\n\n window.gtmDataObject = window.gtmDataObject || []\n const eventData = {\n event: 'productClick',\n eventAction: 'Product Click',\n currencyCode: currency,\n eventRaisedBy: raisedByPB,\n ecommerce: {\n click: {\n actionField: {\n list: list\n },\n products: productPayload\n }\n }\n }\n window.gtmDataObject.push(eventData)\n emitCustomEvent('productClick', eventData)\n}\n\nexport function filterTrackingFromPlpFilters(filtersSelected) {\n const grouped = groupSelectedFilters(filtersSelected)\n const groupKeys = Object.keys(grouped)\n const typesFiltersSelected = groupKeys.join('|').substring(0, 99)\n const valuesFiltersSelected = groupKeys\n .map(key => grouped[key].values.map(value => value.split('/').at(-1)).join(','))\n .join('|')\n .substring(0, 99)\n\n return [typesFiltersSelected, valuesFiltersSelected]\n}\n\nexport const filterActionEvent = (\n actionType,\n filterType,\n filterValues,\n clickLocation,\n dataType\n) => {\n // https://dsu-confluence.nestle.biz/display/DIANA/PLP+-+Filter+Revamp\n window.gtmDataObject = window.gtmDataObject || []\n const eventData = getExplicitFilterEventData(\n actionType,\n filterType,\n filterValues,\n clickLocation\n )\n\n window.gtmDataObject.push(eventData)\n if (window.NEXT_V1_PLP_EXPLICIT_FILTER_TRACKING && dataType) {\n window.gtmDataObject.push({\n ...window.NEXT_V1_PLP_EXPLICIT_FILTER_TRACKING,\n experiment_action: `${actionType} - ${dataType}`,\n cta_name: 'All filters'\n })\n }\n\n emitCustomEvent('plp_filter', eventData)\n}\n\nconst getExplicitFilterEventData = (actionType, filterType, filterValues, clickLocation) => {\n return {\n event: 'plp_filter',\n event_raised_by: raisedByPB,\n action_type: actionType,\n filter_type: filterType,\n ...(filterValues ? { filter_values: filterValues } : {}),\n ...(clickLocation ? { click_location: clickLocation } : {})\n }\n}\n\nfunction groupSelectedFilters(filtersSelected = []) {\n return filtersSelected.reduce((grouped, { key, value }) => {\n if (!grouped[key]) grouped[key] = { key, values: [] }\n grouped[key].values.push(value.replaceAll(',', '-'))\n return grouped\n }, {})\n}\n\nfunction arrTolastURLElementMapper(arr) {\n if (typeof arr === 'undefined' || arr.length === 0) return undefined\n\n return arr.map(item => item.split('/').pop()?.trim() || '')\n}\n\nfunction arrToJoinedString(arr, joiner = '|') {\n if (typeof arr === 'undefined' || arr.length === 0) return undefined\n\n return arr.map(item => item.trim()).join(joiner)\n}\n\nfunction findTechnogiesText(arr) {\n if (typeof arr === 'undefined' || arr.length === 0) return undefined\n\n if (arr.length === 1) return cleanText(arrTolastURLElementMapper(arr)?.[0])\n else return 'multiple'\n}\n\nfunction cleanText(str) {\n if (typeof str === 'undefined') return undefined\n\n return str.toString().trim()\n}\n\nconst generateEcommerceObject = async (productIds, options) => {\n const productRequests = productIds.map(SKU => getProduct(SKU))\n const productData = await Promise.all(productRequests)\n\n return {\n ecommerce: {\n currency: window[window.config.padl.namespace].dataLayer.app.app.currency,\n value: productData.reduce((ac, product) => {\n return ac + product.price\n }, 0),\n items: productData.map((product, index) => {\n if (product.type === 'bundle' || product.type === 'giftcard') {\n return {\n item_id: cleanText(product.internationalId),\n item_name: cleanText(product.internationalName),\n item_brand: 'nespresso',\n item_category: cleanText(product.type),\n index: index + 1\n }\n }\n\n let output = {\n item_id: cleanText(product.internationalId),\n item_name: cleanText(product.internationalName),\n item_brand: 'nespresso',\n item_category: cleanText(product.type),\n item_category2: arrToJoinedString(\n arrTolastURLElementMapper(product.technologies)\n ),\n item_category3: cleanText(product.category),\n price: product.price,\n quantity: product.salesMultiple,\n affiliation: 'nespresso online store',\n coupon: undefined,\n discount: undefined,\n location_id: undefined,\n item_list_name: cleanText(options?.listName),\n item_list_id: cleanText(options?.listId),\n index: index + 1,\n item_market_id: cleanText(product.legacyId),\n item_market_name: cleanText(product.name),\n item_technology: findTechnogiesText(product.technologies),\n item_range: cleanText(product.category),\n item_discovery_offer: product.category.includes('discovery').toString(),\n item_added_by_user: undefined,\n item_ecotax_applicable: product?.displayEcoTax\n ? cleanText(product?.displayEcoTax.toString())\n : undefined,\n item_selection_list: cleanText(arrToJoinedString(product.productSelections)),\n item_in_stock: product?.inStock\n ? cleanText(product?.inStock.toString())\n : undefined,\n item_subscription_name: undefined,\n item_subscription_category: undefined,\n item_subscription_price: undefined,\n item_subscription_duration: undefined,\n item_subscription_fee: undefined\n }\n\n switch (product.type) {\n case 'capsule': {\n const capsuleProduct = product\n\n output.item_category4 = capsuleProduct.bundled ? 'bundle' : 'single'\n\n output.item_type = capsuleProduct.bundled ? 'bundle' : 'single'\n\n output.item_coffee_aromatic_profile = cleanText(\n arrToJoinedString(capsuleProduct.capsuleProductAromatics)?.toLowerCase()\n )\n\n output.item_coffee_intensity =\n cleanText(capsuleProduct.capsuleProperties.intensity) ?? undefined\n\n output.item_coffee_cup_size = cleanText(\n arrToJoinedString(capsuleProduct.capsuleCupSizes)\n )?.toLowerCase()\n\n break\n }\n case 'machine': {\n const machineProduct = product\n\n output.item_machine_shade = cleanText(machineProduct.colorShade?.name)\n\n break\n }\n }\n\n if (product.type === 'machine' || product.type === 'accessory') {\n output.item_avg_rating = product.ratingCode\n output.item_number_of_reviews = product.ratingCode\n }\n\n return output\n })\n }\n }\n}\n\nexport const selectItems = async (productIds, options) => {\n const ecommerceObject = await generateEcommerceObject(productIds, options)\n\n const output = {\n event: 'select_item',\n event_raised_by: options?.eventRaisedBy ?? 'before_cross_sell_v3',\n click_location: options?.clickLocation ?? 'page builder cross sell quick view',\n item_list_id: options?.listId ?? 'before_cross_sell_v3',\n subscription_product_included: 'false',\n discovery_offer_included: 'false',\n ...ecommerceObject\n }\n\n window.gtmDataObject.push({ ecommerce: null })\n window.gtmDataObject.push(output)\n}\n\nexport const viewItemList = async (productIds, options) => {\n const ecommerceObject = await generateEcommerceObject(productIds, options)\n\n const output = {\n event: 'view_item_list',\n event_raised_by: options?.eventRaisedBy,\n subscription_product_included: 'false',\n discovery_offer_included: 'false',\n ...ecommerceObject\n }\n\n if (options?.eventRaisedBy === undefined) delete output.event_raised_by\n\n window.gtmDataObject.push({ ecommerce: null })\n window.gtmDataObject.push(output)\n}\n\nexport const isGtmTrackingExists = trackingData => {\n window.gtmDataObject = window.gtmDataObject || []\n\n return window.gtmDataObject.some(\n event =>\n event.event === trackingData.event &&\n event.ecommerce?.creative_slot === trackingData.campaign.position &&\n event.ecommerce?.promotion_id === trackingData.campaign.id &&\n event.ecommerce?.promotion_name === trackingData.campaign.name &&\n event.ecommerce?.creative_name === trackingData.campaign.creative\n )\n}\n","export const getDataLayer = () => {\n return window[window?.padlNamespace]?.dataLayer\n}\n\nexport const getMarketCode = () => {\n const dataLayer = getDataLayer()\n if (!dataLayer) {\n return 'ch'\n }\n\n return dataLayer.app.app.market.toLocaleLowerCase()\n}\n\nexport const getLangCode = () => {\n const dataLayer = getDataLayer()\n if (!dataLayer) {\n return 'en'\n }\n\n return getDataLayer().page.page.pageInfo.language.toLocaleLowerCase()\n}\n\nexport const getSegmentCode = () => {\n const dataLayer = getDataLayer()\n if (!dataLayer) {\n return 'B2C'\n }\n\n return getDataLayer().page.page.pageInfo.segmentBusiness\n}\n\nexport const isLoggedIn = () => {\n const dataLayer = getDataLayer()\n if (!dataLayer || !dataLayer.user) {\n return false\n }\n\n return dataLayer.user.isLoggedIn\n}\n\nexport const interpolateMarketLang = (string, market, lang) => {\n return string.replace('{market}', market).replace('{lang}', lang)\n}\n","import createProps from '@kissui/helpers/src/props.helpers'\nimport EventBus from '@kissui/helpers/src/assets/js/eventBus'\nimport { dispatchEvent } from '@kissui/helpers/src/assets/js/eventDispatch'\nimport {\n handlePromoClick,\n productImpression,\n trackComponentInteraction\n} from '@kissui/helpers/src/gtmEvents'\nimport { EVENT_POPIN_OPEN, EVENT_QS_OPEN, TIME_SLOW } from '@kissui/components'\nimport { getLangCode, getMarketCode } from '@kissui/helpers/src/dataLayer'\n\nclass Cta extends HTMLElement {\n constructor() {\n super()\n this.props = {}\n this.market = getMarketCode()\n this.language = getLangCode()\n }\n\n static get observedAttributes() {\n return ['slot', 'quantity']\n }\n\n connectedCallback() {\n this.props = {\n ...createProps(this.attributes),\n disableTracking: this.hasAttribute('data-disabletracking')\n }\n\n this.boundHandleClick = this.handleClick.bind(this)\n this.slot = this.innerHTML.replace(/\\n*$/, '').trim()\n this.render()\n }\n\n render() {\n const {\n add_to_cart = '',\n aria_label,\n aria_label_after,\n aria_label_before,\n contrast,\n icon_left = '',\n icon_right = '',\n label_update,\n label,\n link_new_tab = false,\n long_sku = '',\n seo_label = '',\n size = '48',\n tracking_list = '',\n tracking_position = '',\n transparent = 'false',\n variation\n } = this.props\n let { link } = this.props\n\n const slot = this.slot ? this.slot : label\n\n const element = document.createElement(link ? 'a' : 'button')\n\n if (tracking_position && tracking_list && long_sku) {\n productImpression(tracking_position, tracking_list, long_sku)\n }\n\n if (link) {\n link = link.replace('{market}', this.market)\n link = link.replace('{lang}', this.language)\n\n element.setAttribute('href', link)\n }\n\n if (link && link_new_tab) {\n element.setAttribute('target', '_blank')\n }\n // Todo : can we get rid of this title attr ? at least when it's a button, not a link ?\n if (seo_label && link) {\n element.setAttribute('title', seo_label)\n }\n\n if (aria_label) {\n element.setAttribute('aria-label', aria_label)\n } else if (aria_label_before || aria_label_after) {\n const ariaLabel = [aria_label_before, slot, aria_label_after]\n .filter(value => !!value)\n .join(' ')\n ariaLabel && element.setAttribute('aria-label', ariaLabel)\n }\n\n if (variation !== 'navigation') {\n element.classList.add(`button--cta`)\n }\n element.classList.add(`button--${variation}`)\n if (contrast) {\n if (transparent === 'true') {\n element.classList.add(`button--${contrast}--transparent`)\n } else {\n element.classList.add(`button--${contrast}`)\n }\n }\n if (size) {\n let textClass = 't-md-400-sl'\n switch (size) {\n case '32':\n textClass = 't-xs-500-sl'\n break\n case '40':\n textClass = 't-sm-400-sl'\n break\n }\n element.classList.add(`size--${size}`, textClass)\n }\n\n if ((variation === 'primary' || variation === 'tertiary') && add_to_cart !== '') {\n this.setAttribute('add_to_cart', add_to_cart)\n this.setAttribute('quantity', '0')\n add_to_cart === 'small'\n ? element.classList.add('addToCart--small')\n : element.classList.add('addToCart--large')\n }\n\n icon_left && this.setAttribute('icon_left', icon_left)\n icon_right && this.setAttribute('icon_right', icon_right)\n\n element.innerHTML = `\n ${icon_left && `<nb-icon icon='${icon_left}'></nb-icon>`}\n <span>${slot}</span>\n ${\n variation === 'primary' && add_to_cart !== '' && label_update !== ''\n ? `<span class=\"update\">${label_update}</span>`\n : ''\n }\n ${icon_right && `<nb-icon icon='${icon_right}'></nb-icon>`}\n `\n this.innerHTML = element.outerHTML\n\n this.removeListeners()\n this.addListeners()\n }\n\n handleClick() {\n if (this.props.disableTracking === false) {\n this.track()\n }\n\n const { event_id = '', popin_id = '', qs_id = '' } = this.props\n\n if (event_id) {\n EventBus.fire(event_id, {})\n }\n if (popin_id) {\n this.popin(popin_id)\n }\n if (qs_id) {\n this.openQuantitySelector(qs_id)\n }\n }\n\n popin(popin_id) {\n dispatchEvent({ eventName: EVENT_POPIN_OPEN, args: { id: popin_id } })\n }\n\n openQuantitySelector(qs_id) {\n dispatchEvent({ eventName: EVENT_QS_OPEN, args: { id: qs_id } })\n }\n\n track() {\n const {\n campaign_id = '',\n campaign_name = '',\n campaign_position = '',\n campaign_creative = '',\n campaign_instance_index = '',\n tracking_list,\n label,\n popin_id = '',\n tracking_slot_prefix = '',\n sku_data = ''\n } = this.props\n\n const campaign = {\n id: campaign_id,\n name: campaign_name,\n position: campaign_position,\n creative: campaign_creative\n }\n\n const ctaOrPopin = popin_id ? 'POPIN' : 'CTA'\n const slot = this.slot ? this.slot : label\n const slotContent = `${tracking_slot_prefix}${slot}`\n const instanceIndex = campaign_instance_index ? ` - ${campaign_instance_index}` : ''\n const tabbedComponentStatus = JSON.parse(this.props?.tabbed_component ?? 'false')\n\n let cta_name_value = tabbedComponentStatus\n ? `${ctaOrPopin + instanceIndex} - ${\n this.props.long_sku.split('/')[2]\n } - ${slotContent}`\n : `${ctaOrPopin + instanceIndex} - ${slotContent}`\n\n handlePromoClick({\n campaign,\n cta_name: cta_name_value\n })\n\n if (popin_id && sku_data) {\n const product = JSON.parse(sku_data)\n const componentName =\n tracking_list.indexOf(' - ') > -1 ? tracking_list.split(' - ')[0] : tracking_list\n trackComponentInteraction({\n creative: this.props.campaign_creative ?? '',\n actionType: componentName.toLowerCase() + ' quick view',\n internationalId: product.internationalId,\n internationalName: product.internationalName,\n productType: product.type,\n technology: product.technology,\n category: product.category,\n rawPrice: product.rawPrice,\n eventAction: componentName + ' Quick View'\n })\n }\n }\n\n attributeChangedCallback(name) {\n if (name === 'slot') {\n this.render()\n }\n if (name === 'quantity') {\n this.classList.add('updated')\n setTimeout(() => {\n this.classList.remove('updated')\n }, TIME_SLOW)\n }\n }\n\n addListeners() {\n this.addEventListener('click', this.boundHandleClick)\n }\n\n removeListeners() {\n this.removeEventListener('click', this.boundHandleClick)\n }\n\n disconnectedCallback() {\n this.removeListeners()\n }\n}\n\ncustomElements.get('nb-cta') || customElements.define('nb-cta', Cta)\n\nexport default Cta\n","/**\n * We removed duplicated values to improve the performances\n * Here are original values :\n * small: 16, 24, 32, 36, 48, 64, 72, 96, 108, 120, 128, 144, 150, 180, 192, 216, 225, 240, 288, 300, 360, 384, 450, 480, 600\n * medium: 180, 240, 270, 360, 450, 480, 512, 540, 600, 675, 720, 768, 800, 900, 960, 1000, 1024, 1080, 1200, 1350, 1440, 1500, 1536, 1600, 1800, 2000, 2048, 2400, 3000, 3200, 4000\n * large: 640, 720, 800, 960, 1024, 1080, 1200, 1280, 1440, 1536, 1600, 1920, 2048, 2160, 2400, 2560, 2880, 3072, 3200, 3840, 4096\n * product: 45, 50, 58, 60, 65, 90, 100, 120, 130, 135, 150, 174, 180, 195, 200, 230, 232, 240, 260, 300, 360, 400, 450, 460, 480, 600, 690, 720, 800, 900, 960, 1200\n *\n * Useful documentation:\n * IT documentation on IM Policy (Image Manager Policy) profiles and resolutions: https://dsu-confluence.nestle.biz/x/XAYoC\n * Our IM Policy documentation: https://dsu-confluence.nestle.biz/x/zQjrCg\n * Our IM Policy study on page builder sections: https://dsu-confluence.nestle.biz/x/1tb3Cg\n */\n\nexport const LAZYLOAD_CUSTOM = 'custom'\nexport const LAZYLOAD_NATIVE = 'native'\n\nexport const PROFILES = [\n {\n name: 'small',\n sizes: [\n 16, 24, 32, 36, 48, 64, 72, 96, 108, 120, 128, 144, 150, 180, 192, 216, 225, 240, 288,\n 300, 360, 384, 450, 480, 600\n ]\n },\n {\n name: 'medium',\n sizes: [\n 270, 512, 540, 675, 720, 768, 800, 900, 960, 1000, 1024, 1080, 1200, 1350, 1440, 1500,\n 1536, 1600, 1800, 2000, 2048, 2400, 3000, 3200, 4000\n ]\n },\n {\n name: 'large',\n sizes: [640, 1280, 1920, 2160, 2560, 2880, 3072, 3840, 4096]\n },\n {\n name: 'product',\n sizes: [\n 45, 50, 58, 60, 65, 90, 100, 130, 135, 174, 195, 200, 230, 232, 260, 300, 400, 460, 690\n ]\n }\n]\n","import createProps from '@kissui/helpers/src/props.helpers'\nimport { lazyLoad } from '@kissui/helpers/src/utils'\nimport { PROFILES, LAZYLOAD_CUSTOM, LAZYLOAD_NATIVE } from './js/constants'\n\n/** IMAGE COMPONENT\n * Important prerequisite!\n * For the ImPolicy and CLS we need to assume that the width of the component is set by the parent component\n *\n * IM Policy annoying behaviour:\n * Also IM Policy is returning in some cases more than 2x images (based in device pixel density auto detection e.g. Iphone 11 pro returns x3)\n * We don't want this behaviour so we need to force x1 by adding an extra param &imdensity=1\n *\n * @Params\n * - file: path of your image\n * - description: img alt description. If empty, set alt='image' to avoid A11y errors + aria-hidden=\"true\" because we assume it's a decorative image\n * (we don't use alt='' because if void it does not allow the error message to be displayed, not creating :before and :after pseudo element on img)\n * - aspect_ratio: (default 1:1) is managing the CLS including a blinking animation\n * - force_width: use this if for any reason you need to force the image width to ask to akamai (e.g. image cropped on both sides like in card-lifestyle tablet)\n * - force_height: use this if in the layout you cannot rely on width but in height\n * - lazyload: (default custom / native / no) is managing fadein animation + error message\n * - impolicy: (default true) is checking automatically the right profile and 'real' end resolution\n * - placeholder_color_light: (default black_100) is the lighter color for CLS animation\n * - placeholder_color_dark: (default black_250) is the darker color for CLS animation\n * - object-fit: (default: cover) use 'contain' instead (applys object-fit: contain on img) if you want to image to be displayed always fully\n * like in sku component, where the product image have different original aspect_ratio, we want to display always the full product\n */\n\nclass Img extends HTMLElement {\n constructor() {\n super()\n }\n\n connectedCallback() {\n this.props = createProps(this.attributes)\n this.render()\n this.#initLazyLoad()\n }\n\n #initLazyLoad() {\n if (this.lazyload !== LAZYLOAD_CUSTOM) {\n return\n }\n const callbackSuccess = () => {\n this.classList.remove('loading')\n }\n\n lazyLoad(this.firstElementChild, 'src', `${this.file}`, this.file, { callbackSuccess })\n }\n\n render() {\n const {\n file = '',\n description = '',\n lazyload = LAZYLOAD_CUSTOM,\n fetchpriority = ''\n } = this.props\n\n if (file === '') {\n return\n }\n\n // Set properties used elsewhere in component\n this.lazyload = lazyload\n this.file = file + this.#setImPolicyQuery()\n\n this.#setCssProperties()\n this.classList.add('nb-img')\n this.innerHTML = `\n <img\n ${this.lazyload === LAZYLOAD_CUSTOM ? 'src=\"\"' : `src=\"${this.file}\"`}\n ${description !== '' ? `alt=\"${description}\"` : 'alt=\"image\" aria-hidden=\"true\"'}\n ${this.lazyload === LAZYLOAD_NATIVE ? 'loading=\"lazy\"' : ''}\n ${fetchpriority !== '' ? `fetchpriority=${fetchpriority}` : ''}\n class=\"loading\"\n />`\n // Get this element's first class\n this.parentClass = this.getAttribute('class').split(' ')[0]\n\n // Add that previous class + a suffix to its first child\n if (this.parentClass !== '') {\n this.firstElementChild.classList.add(this.parentClass + '-content')\n }\n }\n\n #setImPolicyQuery() {\n const { aspect_ratio, force_width, force_height, impolicy = true } = this.props\n\n if (impolicy === 'false') {\n return ''\n }\n\n let width = this.offsetWidth\n\n if (force_width && force_width !== '') {\n width = Number(force_width)\n }\n\n if (force_height && force_height !== '') {\n const [w, h] = aspect_ratio.split('/')\n width = Math.round((Number(force_height) * w) / h)\n }\n\n let finalWidth = this.#getRetinaWidth(width)\n\n const impolicy_profil = this.#getImpolicyProfile(finalWidth)\n\n return `?impolicy=${impolicy_profil}&imwidth=${finalWidth}&imdensity=1`\n }\n\n #getRetinaWidth(width) {\n const { devicePixelRatio } = window\n return devicePixelRatio > 1 ? width * 2 : width\n }\n\n #getImpolicyProfile(width) {\n const { exactFound, closests } = this.#getClosests(width)\n\n if (exactFound) {\n return exactFound.name\n } else {\n let tempDiff = closests[0].diff\n let closest = null\n closests.forEach(item => {\n if (item.diff <= tempDiff) {\n tempDiff = item.diff\n closest = item\n }\n })\n return closest.name\n }\n }\n\n #getClosests(width) {\n let exactFound = null\n let closests = []\n PROFILES.every(profile => {\n const found = profile.sizes.find(el => el >= width)\n\n if (found) {\n if (found === width) {\n exactFound = profile\n return false\n }\n\n closests.push({ name: profile.name, diff: found - width })\n }\n\n return true\n })\n return { exactFound, closests }\n }\n\n #setCssProperties() {\n const {\n aspect_ratio,\n object_fit,\n placeholder_color_light,\n placeholder_color_dark,\n error_message\n } = this.props\n\n this.#setCssProperty('--image-aspect-ratio', aspect_ratio)\n this.#setCssProperty('--image-object-fit', object_fit)\n this.#setCssProperty('--image-placeholder-color-light', placeholder_color_light)\n this.#setCssProperty('--image-placeholder-color-dark', placeholder_color_dark)\n this.#setCssProperty('--image-placeholder-error-text', '\"' + error_message + '\"')\n }\n\n #setCssProperty(name, value) {\n if (!value || value === '\"undefined\"') {\n return\n }\n\n this.style.setProperty(name, value)\n }\n}\n\ncustomElements.get('nb-img') || customElements.define('nb-img', Img)\n\nexport default Img\n","import createProps from '@kissui/helpers/src/props.helpers'\nimport {\n handlePromoClick,\n productClick,\n trackComponentInteraction\n} from '@kissui/helpers/src/gtmEvents'\nimport { dispatchEvent } from '@kissui/helpers/src/assets/js/eventDispatch'\nimport { EVENT_POPIN_OPEN, EVENT_QUICKVIEW_OPEN } from '../constants.mjs'\nimport { getLangCode, getMarketCode } from '@kissui/helpers/src/dataLayer'\n\nclass Link extends HTMLElement {\n constructor() {\n super()\n this.slot = this.innerHTML\n this.boundHandleClick = this.handleClick.bind(this)\n this.market = getMarketCode()\n this.language = getLangCode()\n }\n\n connectedCallback() {\n this.props = {\n ...createProps(this.attributes),\n disableTracking: this.hasAttribute('data-disabletracking')\n }\n this.render()\n this.setClassHelper()\n this.bindEvents()\n }\n\n render() {\n const {\n size = 'large',\n color = 'gold',\n link = '',\n icon_right = '',\n icon_left = '',\n image = '',\n image_alt = ''\n } = this.props\n\n // Todo : can we get rid of this setAttributes, it's only needed because stories are using data\n size && this.setAttribute('size', size)\n color && this.setAttribute('color', color)\n image && this.setAttribute('image', image)\n image_alt && this.setAttribute('image_alt', image_alt)\n icon_left && this.setAttribute('icon_left', icon_left)\n icon_right && this.setAttribute('icon_right', icon_right)\n\n if (link === '') {\n this.renderButton()\n } else {\n this.renderLink()\n }\n\n this.link = this.firstElementChild\n }\n\n renderLink() {\n const {\n label,\n seo_label = '',\n tracking_label = '',\n link_new_tab = 'false',\n a11y_label_new_tab = '',\n icon_right = '',\n image = '',\n image_alt = '',\n icon_left = '',\n selected = '',\n phantom = ''\n } = this.props\n let { link } = this.props\n\n const slot = this.slot ? this.slot : label\n\n if (link) {\n link = link.replace('{market}', this.market)\n link = link.replace('{lang}', this.language)\n }\n\n this.innerHTML = `\n <a\n href=\"${link}\"\n ${link_new_tab === 'true' ? 'target=\"_blank\"' : ''}\n ${\n link_new_tab === 'true' && a11y_label_new_tab !== ''\n ? `aria-description='${a11y_label_new_tab}'`\n : ''\n }\n ${tracking_label && `tracking_label='${tracking_label}'`}\n ${seo_label ? `title=\"${seo_label}\"` : ''}\n ${slot ? `aria-label=\"${slot}\"` : ''}\n ${selected === 'true' ? 'aria-current=\"true\"' : ''}\n ${phantom === 'true' ? `phantom=\"${slot}\"` : ''}\n >\n ${icon_left && `<nb-icon icon='${icon_left}'></nb-icon>`}\n ${image && `<img src='${image}' alt='${image_alt}'/>`}\n <span>${slot}</span>\n ${icon_right && `<nb-icon icon='${icon_right}'></nb-icon>`}\n </a>`\n }\n\n renderButton() {\n const {\n label,\n tracking_label = '',\n icon_right = '',\n icon_left = '',\n selected = '',\n image = '',\n image_alt = '',\n phantom = ''\n } = this.props\n\n const slot = this.slot ? this.slot : label\n\n this.innerHTML = `\n <button\n ${tracking_label && `tracking_label='${tracking_label}'`}\n ${selected === 'true' ? 'aria-selected=\"true\"' : ''}\n ${phantom === 'true' ? `phantom=\"${slot}\"` : ''}\n >\n ${image && `<img src='${image}' alt='${image_alt}'/>`}\n ${icon_left && `<nb-icon icon='${icon_left}'></nb-icon>`}\n <span>${slot}</span>\n ${icon_right && `<nb-icon icon='${icon_right}'></nb-icon>`}\n </button>`\n }\n\n setClassHelper() {\n const { size = 'large', cta_link_type = 'false' } = this.props\n let sizeClass = ''\n\n switch (size) {\n case 'xsmall':\n sizeClass = 't-2xs-500-sl'\n break\n case 'small':\n sizeClass = 't-xs-500-sl'\n break\n case 'medium':\n sizeClass = 't-sm-400-sl'\n break\n case 'large':\n sizeClass = 't-sm-700-sl'\n break\n default:\n sizeClass = 't-sm-700-sl'\n break\n }\n\n if (cta_link_type === 'true') {\n sizeClass = 't-sm-700-sl'\n this.setAttribute('underline', 'false')\n }\n\n this.querySelector('a, button').classList.add(sizeClass)\n }\n\n handleClick() {\n if (this.props.disableTracking === false) {\n this.track()\n }\n\n const {\n popin_id = '',\n sku = '',\n tracking_position = '',\n tracking_list = '',\n sku_colors\n } = this.props\n\n if (popin_id && sku) {\n this.quickView(popin_id, sku, tracking_position, tracking_list, sku_colors)\n return\n }\n\n if (popin_id) {\n this.popin(popin_id)\n }\n }\n\n popin(popin_id) {\n dispatchEvent({ eventName: EVENT_POPIN_OPEN, args: { id: popin_id } })\n }\n\n quickView(popin_id, sku, tracking_position, tracking_list, colors) {\n const { sku_data } = this.props\n\n dispatchEvent({\n eventName: EVENT_QUICKVIEW_OPEN,\n args: {\n sku_colors: colors,\n id: popin_id,\n sku: sku,\n tracking_position: tracking_position,\n tracking_list: tracking_list\n }\n })\n\n if (sku_data) {\n const product = JSON.parse(sku_data)\n const componentName =\n tracking_list.indexOf(' - ') > -1 ? tracking_list.split(' - ')[0] : tracking_list\n trackComponentInteraction({\n creative: this.props.campaign_creative ?? '',\n actionType: componentName.toLowerCase() + ' quick view',\n internationalId: product.internationalId,\n internationalName: product.internationalName,\n productType: product.type,\n technology: product.technology,\n category: product.category,\n rawPrice: product.rawPrice,\n eventAction: componentName + ' Quick View'\n })\n }\n }\n\n track() {\n const {\n campaign_id = '',\n campaign_name = '',\n campaign_position = '',\n campaign_creative = '',\n campaign_instance_index = '',\n label,\n popin_id = '',\n long_sku = '',\n tracking_list = '',\n tracking_position = ''\n } = this.props\n\n const campaign = {\n id: campaign_id,\n name: campaign_name,\n position: campaign_position,\n creative: campaign_creative\n }\n\n const linkOrPopin = popin_id ? 'POPIN' : 'LINK'\n const slot = this.slot ? this.slot : label\n // value 0 is accepted as we need to pass the index\n const instanceIndex =\n campaign_instance_index || campaign_instance_index === 0\n ? ` - ${campaign_instance_index}`\n : ''\n\n if (tracking_list && tracking_position) {\n productClick(tracking_position, tracking_list, long_sku)\n } else {\n handlePromoClick({\n campaign,\n cta_name: `${linkOrPopin + instanceIndex} - ${slot.trim()}`\n })\n }\n }\n\n bindEvents() {\n this.unbindEvents()\n this.link.addEventListener('click', this.boundHandleClick)\n }\n\n unbindEvents() {\n this.link.removeEventListener('click', this.boundHandleClick)\n }\n\n disconnectedCallback() {\n this.unbindEvents()\n }\n}\n\ncustomElements.get('nb-link') || customElements.define('nb-link', Link)\n\nexport default Link\n","import { viewPromotion } from '@kissui/helpers/src/gtmEvents'\n\nexport default class {\n constructor(node, data) {\n this.observer = new IntersectionObserver(\n IntersectionObserverEntry => this.onChange(IntersectionObserverEntry),\n { threshold: [0], rootMargin: '0% 0%' }\n )\n\n this.el = node\n this.data = data\n\n if (!(this.el instanceof Element)) {\n return\n }\n\n this.observer.observe(this.el)\n }\n\n /**\n * Check if element are in the viewport\n * @param {Array} observables\n * @param {HTMLElement} observables.target\n * @param {Boolean} observables.isIntersecting\n */\n onChange(observables) {\n observables.forEach(observable => {\n if (!observable.isIntersecting) {\n return\n }\n\n this.track(observable)\n this.observer.unobserve(observable.target)\n })\n }\n\n track() {\n // This line is needed to make the code compatible with Safari <=13\n if ('requestIdleCallback' in window) {\n window.requestIdleCallback(() => this.runTrack())\n } else {\n window.setTimeout(() => this.runTrack(), 1)\n }\n }\n\n runTrack() {\n if (!this.data['id'] || this.data['id'] === null || this.data['id'] === '') {\n return\n }\n viewPromotion({ ...this.data })\n }\n}\n","import Viewport from './viewportTracking'\nimport { viewPromotion } from '@kissui/helpers/src/gtmEvents'\nimport { isObjectEmpty, removeEmptyValues } from '@kissui/helpers/src/utils'\n\nexport default function (node, campaign) {\n const tracking = new ZoneTracking(node, campaign)\n\n return {\n destroy: () => {\n if (!tracking.getIom().hasIntersectionObserver()) {\n tracking.destroy()\n }\n }\n }\n}\n\nclass ZoneTracking extends Viewport {\n constructor(node, data) {\n super(node)\n this.data = data\n }\n\n runTrack() {\n const cleanedData = removeEmptyValues(this.data)\n if (cleanedData && !isObjectEmpty(cleanedData)) {\n viewPromotion({ ...cleanedData })\n }\n }\n}\n","import { BREAKPOINT_M, BREAKPOINT_TABLET } from '@kissui/components'\n\nconst viewport = () => {\n const lt = (ref: number) => {\n return window.innerWidth < ref\n }\n\n return {\n get is() {\n const { innerWidth: vw, devicePixelRatio } = window\n return {\n mobile: vw < BREAKPOINT_M,\n mobile_tablet: vw < BREAKPOINT_TABLET,\n tablet: vw >= BREAKPOINT_M && vw < BREAKPOINT_TABLET,\n desktop: vw >= BREAKPOINT_TABLET && devicePixelRatio <= 1,\n retina: vw >= BREAKPOINT_TABLET && devicePixelRatio > 1\n }\n },\n lt\n }\n}\n\nconst helper = viewport()\n\nexport default helper\n","import zoneTracking from '@kissui/helpers/src/assets/js/zoneTracking'\nimport { lazyLoad } from '@kissui/helpers/src/utils'\nimport viewportHelper from '@kissui/helpers/src/viewport.helpers'\n\nclass Container extends HTMLElement {\n constructor() {\n super()\n this.slot = this.innerHTML\n }\n\n connectedCallback() {\n this.props = [...this.attributes].reduce((all, attr) => {\n return { ...all, [attr.nodeName]: attr.nodeValue }\n }, {})\n this.render()\n this.initTracking()\n this.initLazyLoad()\n }\n\n initTracking() {\n const {\n campaign_id = null,\n campaign_name = null,\n campaign_position = null,\n campaign_creative = null\n } = this.props\n zoneTracking(this, {\n id: campaign_id,\n name: campaign_name,\n position: campaign_position,\n creative: campaign_creative\n })\n }\n\n initLazyLoad() {\n const el = this.querySelector('.cb-bg-img')\n if (!el) {\n return\n }\n\n const url = this.getBgImgUrl()\n if (!url) {\n return\n }\n\n const { lazy_load } = this.props\n if (lazy_load === 'false') {\n el.setAttribute('style', `background-image: url(${url})`)\n return\n }\n\n lazyLoad(\n el,\n 'style',\n `background-image: url(${url}); ${el.getAttribute('style') || ''}`,\n url\n )\n }\n\n getBgImgUrl() {\n const {\n background_mobile = '',\n background_tablet = '',\n background_desktop = '',\n background_retina = ''\n } = this.props\n\n let url = ''\n if (viewportHelper.is.mobile && background_mobile) {\n url = background_mobile\n } else if (viewportHelper.is.tablet && background_tablet) {\n url = background_tablet\n } else if ((viewportHelper.is.retina || viewportHelper.is.tablet) && background_retina) {\n url = background_retina\n } else if (\n (viewportHelper.is.desktop || viewportHelper.is.retina || viewportHelper.is.tablet) &&\n background_desktop\n ) {\n url = background_desktop\n }\n\n return url\n }\n\n render() {\n const {\n styles = '',\n contrast,\n background_color = '',\n classname = '',\n element_class = '',\n slot\n } = this.props\n\n // Fix for undefined contrast (contrast is needed for background-color to work)\n let contrastDefault = 'light'\n if (contrast === 'undefined') {\n this.setAttribute('contrast', contrastDefault)\n } else {\n contrastDefault = contrast\n }\n\n this.innerHTML = `\n <section\n class=\"${classname}\"\n contrast=\"${contrastDefault}\"\n style=\"${styles}\"\n >\n ${background_color || this.hasBgImage() ? this.renderBg() : ''}\n <div class=\"cb-inner ${element_class}\">\n ${slot}\n </div>\n </section>`\n }\n\n hasBgImage() {\n const { background_mobile: m, background_desktop: d, background_retina: r } = this.props\n return !!m || !!d || !!r\n }\n\n renderBg() {\n const { background_color = '' } = this.props\n\n return `<div class=\"cb-bg-color ${background_color ? background_color : ''}\">\n </div>${this.hasBgImage() ? '<div class=\"cb-bg-img\"></div>' : ''}`\n }\n}\n\ncustomElements.get('nb-container') || customElements.define('nb-container', Container)\n\nexport default Container\n","import createProps from '@kissui/helpers/src/props.helpers'\nimport { makeHash } from '@kissui/helpers/src/utils'\nimport { selectPromotion } from '@kissui/helpers/src/gtmEvents'\n\nclass Chip extends HTMLElement {\n constructor() {\n super()\n this.slot = this.innerHTML\n this.checkbox = null\n }\n\n static get observedAttributes() {\n return ['disabled', 'checked']\n }\n\n connectedCallback() {\n this.props = createProps(this.attributes)\n this.computedSlot = this.computeSlot()\n this.render()\n this.initTracking()\n }\n\n initTracking() {\n const { campaign_id, campaign_name, campaign_creative, campaign_position } = this.props\n\n const link = this.querySelector('label')\n\n if (link) {\n link.onclick = () => {\n selectPromotion({\n cta_name: this.computedSlot,\n id: campaign_id,\n name: campaign_name,\n creative: campaign_creative,\n position: campaign_position\n })\n }\n }\n }\n\n computeSlot() {\n const { content } = this.props\n return (this.slot ? this.slot : content).trim()\n }\n\n render() {\n const {\n icon = '',\n color = '',\n background_image = '',\n filter_label_AA = 'filter',\n rounded = 'true',\n checked = 'false',\n disabled = 'false',\n id,\n type = 'checkbox'\n } = this.props\n\n const slot = this.computedSlot\n let style = ''\n\n const checkedAttr = checked === 'true' ? 'checked' : ''\n const disabledAttr = disabled === 'true' ? 'disabled' : ''\n const inputId = 'chip-checkbox-' + (id || makeHash(slot))\n\n this.innerHTML = `\n <input type='${type}' name='options' id='${inputId}' aria-label='${slot} ${filter_label_AA}' ${checkedAttr} ${disabledAttr}>\n <label style='${style}' for='${inputId}'>\n ${\n icon &&\n `<nb-icon icon='${icon}'></nb-icon>\n `\n }\n ${\n color &&\n `<div class='chip-color' style='background:${color}'></div>\n `\n }\n ${\n background_image &&\n `<div class='chip-image ${\n rounded === 'true' ? 'rounded' : ''\n }' style='background-image:url(\"${background_image}\")'></div>\n `\n }\n <span class=\"t-2xs-700-sl\" aria-hidden=\"true\" phantom=\"${slot}\">${slot}</span>\n </label>\n `\n\n this.checkbox = this.getElementsByTagName('input')[0]\n }\n\n attributeChangedCallback(name, _, newValue) {\n if (!this.checkbox) {\n return\n }\n\n if (name === 'disabled') {\n this.checkbox.disabled = newValue === 'true'\n } else if (name === 'checked') {\n this.checkbox.checked = newValue === 'true'\n }\n }\n}\n\ncustomElements.get('nb-chip') || customElements.define('nb-chip', Chip)\n\nexport default Chip\n","export function recursiveSwitchAriaHidden(elem, componentOpenState) {\n const parent = elem.parentNode\n const body = document.getElementsByTagName('body')[0]\n\n if (parent === body) {\n return\n }\n\n const brothers = parent.children\n for (const brother of brothers) {\n if (brother !== elem) {\n componentOpenState\n ? brother.setAttribute('aria-hidden', componentOpenState)\n : brother.removeAttribute('aria-hidden')\n }\n }\n recursiveSwitchAriaHidden(parent, componentOpenState)\n}\n\nexport function focusin(e, el, loop) {\n if (!el.contains(e.target)) {\n if (el.lastFocused === el.firstFocusable) {\n loop ? el.lastFocusable.focus() : el.firstFocusable.focus()\n } else {\n loop ? el.firstFocusable.focus() : el.lastFocusable.focus()\n }\n } else {\n el.lastFocused = e.target\n }\n}\n\nexport function setFirstAndLastFocusable(el) {\n const focusable = el.querySelectorAll('button, [href], input, select, textarea, [tabindex=\"0\"]')\n el.firstFocusable = focusable[0]\n el.lastFocusable = focusable[focusable.length - 1]\n el.lastFocused = el.firstFocusable\n}\n","import createProps from '@kissui/helpers/src/props.helpers'\nimport { dispatchEvent } from '@kissui/helpers/src/assets/js/eventDispatch'\nimport viewportHelper from '@kissui/helpers/src/viewport.helpers'\nimport {\n recursiveSwitchAriaHidden,\n setFirstAndLastFocusable,\n focusin\n} from '@kissui/helpers/src/assets/js/scopedKeyboardNav'\nimport { EVENT_SORT_BY_CHANGE, EVENT_POPIN_KEY_DOWN } from '@kissui/components'\n\nclass Dropdown extends HTMLElement {\n constructor() {\n super()\n this.isOpen = false\n this.selected = null\n this.buttonElement = null\n this.onClickOutside = this.onClickOutside.bind(this)\n }\n\n connectedCallback() {\n this.props = createProps(this.attributes)\n this.classList.add('nb-dropdown')\n this.render()\n }\n\n render() {\n this.buttonElement = null\n const { label = '', aa_description } = this.props\n let { options = [], element_id, element_name } = this.props\n\n // Accept Selected and Checked as option setter\n options = options.map(option => {\n const payload = { ...option }\n payload.checked = payload.checked || payload.selected\n\n return payload\n })\n\n this.unbindEvent()\n\n this.innerHTML = `\n <button\n class='nb-dropdown__button'\n aria-haspopup=\"listbox\"\n aria-expanded=\"${this.isOpen}\"\n aria-label=\"${label} ${options && this.renderSelected()}\"\n ${aa_description !== '' ? `aria-description=\"${aa_description}\"` : ''}>\n <span class=\"nb-dropdown__button__label t-sm-700-sl\">${label}</span>\n <span class=\"nb-dropdown__button__value t-xs-500-sl\"\n ${element_id ? `name=\"${element_id}\"` : ''}\n value=\"${options && this.renderSelected()}\">\n </span>\n </button>\n <div class=\"nb-dropdown__menu\" ${element_name ? `id=\"${element_name}\"` : ''}>\n <div role=\"listbox\">\n <ul>\n ${options && options.length > 0 && this.renderOptions()}\n </ul>\n </div>\n </div>\n `\n this.buttonElement = this.querySelector('.nb-dropdown__button')\n this.buttonElementValue = this.querySelector('.nb-dropdown__button__value')\n this.dropdownMenu = this.querySelector('.nb-dropdown__menu > div')\n this.selectedOption = this.querySelector('button[aria-selected=true]')\n if (!this.selected) {\n this.selected = options[0]\n }\n setFirstAndLastFocusable(this.dropdownMenu)\n this.bindEvent()\n }\n\n // Render <BUTTON> tags for the custom select, <BUTTON> is better than <RADIOBUTTONS> for keyboard navigation users in this case\n renderOptions() {\n const {\n label,\n aa_listbox_description,\n aa_select_description,\n icon_option,\n options = []\n } = this.props\n return options\n .map(option => {\n return `<li>\n <button\n data-id=\"${option.id}\"\n data-selectedlabel=\"${option.label}\"\n class=\"${viewportHelper.is.mobile ? 't-sm-400-sl' : 't-xs-500-sl'}\"\n role=\"option\"\n aria-label='${label + ' ' + option.label}'\n value='${option.id ?? option.label}'\n aria-selected='${option.checked}'\n ${option.link ? `data-link='${option.link}'` : ''}\n ${\n option.checked\n ? aa_listbox_description !== undefined &&\n `aria-description=\"${aa_listbox_description}\"`\n : aa_select_description !== undefined &&\n `aria-description=\"${aa_select_description}\"`\n }>\n ${icon_option && `<nb-icon icon='${icon_option}'></nb-icon>`} ${option.label}\n </button>\n </li>`\n })\n .join('')\n }\n\n // Render the selected option to display in the main button of the PLP Filter Bar\n renderSelected() {\n const { options = [] } = this.props\n const currentOption = options.find(\n option => option.checked === true || option.selected === true\n )\n return `${currentOption?.label || options[0]?.label}`\n }\n\n bindEvent() {\n this.boundHandleClick = this.handleClick.bind(this)\n this.boundHandleLabelClick = this.handleLabelClick.bind(this)\n this.boundHandleMobileClose = this.handleMobileClose.bind(this)\n this.boundFocus = this.focus.bind(this)\n this.boundFocusin = this.focusin.bind(this)\n this.boundKeyNav = this.keyNav.bind(this)\n\n this.buttonElement.addEventListener('click', this.boundHandleClick)\n this.querySelectorAll('.nb-dropdown__menu button').forEach(item => {\n item.addEventListener('click', this.boundHandleLabelClick)\n })\n this.dropdownMenu.addEventListener('click', this.boundHandleMobileClose)\n window.addEventListener('click', this.onClickOutside)\n }\n\n unbindEvent() {\n if (!this.buttonElement) {\n return\n }\n this.buttonElement.removeEventListener('click', this.boundHandleClick)\n this.querySelectorAll('.nb-dropdown__menu button').forEach(item => {\n item.removeEventListener('click', this.boundHandleLabelClick)\n })\n this.dropdownMenu.removeEventListener('click', this.boundHandleMobileClose)\n window.removeEventListener('click', this.onClickOutside)\n document.removeEventListener(EVENT_POPIN_KEY_DOWN, this.boundKeyNav)\n }\n\n handleClick() {\n this.toogleDropdown(!this.isOpen)\n }\n\n handleMobileClose() {\n this.toogleDropdown(false)\n }\n\n onClickOutside(e) {\n if (this.isOpen && !this.contains(e.target)) {\n this.toogleDropdown(false)\n }\n }\n\n handleLabelClick(e) {\n this.isOpen = false\n\n // Unpress active button\n if (this.selectedOption) {\n this.selectedOption.setAttribute('aria-selected', 'false')\n }\n\n /*\n * TODO CHECK WITH THOMAS\n const activeButton = this.querySelector('button[aria-pressed=true]')\n const activeLink = activeButton.getAttribute('data-link')\n if (activeLink) {\n window.location.href = activeLink\n return null\n }\n activeButton.setAttribute('aria-pressed', 'false')\n * */\n\n // Activate pressed option\n this.selectedOption = e.target\n this.selectedOption.setAttribute('aria-selected', 'true')\n\n // Reset all checked attributes to false / Destroy the object and build it again\n this.props.options = this.props.options.map(option => ({ ...option, checked: false }))\n\n // Get the id from the clicked button's data-id attribute\n const selectedOptionId = this.selectedOption.dataset.id\n\n // Find the option using the selected button's data-id\n this.selected = this.props.options.find(option => option.id === selectedOptionId)\n\n if (!this.selected) {\n // Handle the error as needed maybe set the first item as checked.\n this.selected = this.props.options[0]\n }\n\n this.selected.checked = true\n e.target.closest('.nb-dropdown').classList.add('nb-dropdown--is-filled')\n\n this.reRender()\n\n this.toogleDropdown(false)\n\n dispatchEvent({\n eventName: EVENT_SORT_BY_CHANGE,\n args: { options: this.props.options, selected: this.selected },\n element: this\n })\n }\n\n reRender() {\n const { label, aa_listbox_description, aa_select_description } = this.props\n this.buttonElementValue.setAttribute('value', this.selectedOption.dataset.selectedlabel)\n this.buttonElement.setAttribute('aria-label', label + ' ' + this.renderSelected())\n this.dropdownMenu.querySelectorAll('button').forEach(item => {\n item.setAttribute('aria-description', aa_select_description)\n })\n this.selectedOption.setAttribute('aria-description', aa_listbox_description)\n }\n\n setSelected(value, dispatchChange = false) {\n const { options = [] } = this.props\n const tmpSelected = options.find(option => option.value === value)\n if (tmpSelected) {\n this.selected.checked = false\n this.selected = tmpSelected\n this.selected.checked = true\n }\n\n if (this.selectedOption) {\n this.selectedOption.setAttribute('aria-selected', 'false')\n }\n\n this.dropdownMenu.querySelectorAll('button').forEach(item => {\n if (item.value === this.selected.label) {\n this.selectedOption = item\n this.selectedOption.setAttribute('aria-selected', 'true')\n }\n })\n\n this.classList.add('nb-dropdown--is-filled')\n\n if (this.selectedOption) {\n this.reRender()\n }\n\n if (dispatchChange) {\n dispatchEvent({\n eventName: EVENT_SORT_BY_CHANGE,\n args: { options, selected: this.selected },\n element: this\n })\n }\n }\n\n toogleDropdown(value) {\n value ? this.open() : this.close()\n this.isOpen = !this.isOpen\n\n // Open and Close shared actions\n this.switchAriaModal()\n this.buttonElement.setAttribute('aria-expanded', this.isOpen)\n }\n\n switchAriaModal() {\n // This is the future way to scope the SR focus to a modal, but it's not supported yet by all SR\n this.dropdownMenu.setAttribute('aria-modal', this.isOpen)\n // So we need to set aria-hidden=false to all brothers and brothers of parent until body\n recursiveSwitchAriaHidden(this.dropdownMenu, this.isOpen)\n }\n\n open() {\n // Transitionend listener is fired multiple times (fore each css property)\n // so we need to instanciate it only when we open or close and then we remove it on focusin\n this.dropdownMenu.addEventListener('transitionend', this.boundFocus)\n document.addEventListener('focusin', this.boundFocusin)\n document.addEventListener(EVENT_POPIN_KEY_DOWN, this.boundKeyNav)\n this.buttonElement.classList.add('isOpen')\n this.openingSource = document.activeElement\n }\n\n close() {\n // Transitionend listener is fired multiple times (fore each css property)\n // so we need to instantiate it only when we open or close and then we remove it on focusin\n this.dropdownMenu.addEventListener('transitionend', this.boundFocus)\n document.removeEventListener('focusin', this.boundFocusin)\n document.removeEventListener(EVENT_POPIN_KEY_DOWN, this.boundKeyNav)\n this.buttonElement.classList.remove('isOpen')\n this.buttonElement.setAttribute('aria-expanded', false)\n }\n\n focus() {\n this.dropdownMenu.removeEventListener('transitionend', this.boundFocus)\n if (this.isOpen && this.selectedOption) {\n this.selectedOption.focus()\n this.dropdownMenu.lastFocused = this.selectedOption\n } else {\n this.buttonElement.focus()\n }\n }\n\n focusin(e) {\n const loop = false\n focusin(e, this.dropdownMenu, loop)\n }\n\n keyNav(e) {\n switch (e.key) {\n case 'Escape':\n this.toogleDropdown(false)\n break\n case 'ArrowUp':\n e.preventDefault()\n this.prevOption()\n break\n case 'ArrowDown':\n e.preventDefault()\n this.nextOption()\n break\n case 'Home':\n case 'PageUp':\n e.preventDefault()\n this.firstOption()\n break\n case 'End':\n case 'PageDown':\n e.preventDefault()\n this.lastOption()\n break\n default:\n break\n }\n }\n\n prevOption() {\n if (this.dropdownMenu.lastFocused !== this.dropdownMenu.firstFocusable) {\n const prevSibling = this.dropdownMenu.lastFocused.previousElementSibling\n prevSibling.focus()\n this.dropdownMenu.lastFocused = prevSibling\n }\n }\n\n nextOption() {\n if (this.dropdownMenu.lastFocused !== this.dropdownMenu.lastFocusable) {\n const nextSibling = this.dropdownMenu.lastFocused.nextElementSibling\n nextSibling.focus()\n this.dropdownMenu.lastFocused = nextSibling\n }\n }\n\n firstOption() {\n if (this.dropdownMenu.lastFocused !== this.dropdownMenu.firstFocusable) {\n this.dropdownMenu.firstFocusable.focus()\n this.dropdownMenu.lastFocused = this.dropdownMenu.firstFocusable\n }\n }\n\n lastOption() {\n if (this.dropdownMenu.lastFocused !== this.dropdownMenu.lastFocusable) {\n this.dropdownMenu.lastFocusable.focus()\n this.dropdownMenu.lastFocused = this.dropdownMenu.lastFocusable\n }\n }\n\n disconnectedCallback() {\n this.unbindEvent()\n }\n}\n\ncustomElements.get('nb-dropdown') || customElements.define('nb-dropdown', Dropdown)\n\nexport default Dropdown\n","import Viewport from './viewportTracking'\nimport { parseHTML, capitalize } from '../../utils'\nimport { productImpression } from '@kissui/helpers/src/gtmEvents'\n\nexport default function (node, productData, currency, range, position) {\n const tracking = new ProductTracking(node, productData, currency, range, position)\n\n return {\n destroy: () => {\n if (!tracking.getIom().hasIntersectionObserver()) {\n tracking.destroy()\n }\n }\n }\n}\n\nclass ProductTracking extends Viewport {\n constructor(node, data, currency, range, position) {\n super(node)\n this.node = node\n this.data = data\n this.currency = currency\n this.range = range\n this.position = position\n }\n\n async runTrack() {\n // Remove impressionOnScoll event - from Analytics team (Luigi, Yahor)\n const noImpression =\n this.node.closest('[tracking_no_impression]')?.getAttribute('tracking_no_impression') ||\n false\n const productIndex =\n this.node.closest('[tracking_position]')?.getAttribute('tracking_position') || 0\n const list = this.node.closest('[tracking_list]')?.getAttribute('tracking_list') || ''\n\n if (noImpression !== 'true') {\n await productImpression(productIndex, list, this.data.id)\n }\n }\n\n async getPLPCategory(categoryId) {\n return (await window.getPLPData()).data.configuration.eCommerceData.categories.find(\n category => category.id === categoryId\n )\n }\n\n async getCategoriesWithPlpData(productData) {\n const TECHNOLOGY_CATEGORY_IDENTIFIER = '/machineTechno/'\n const isTechnologyCategory = categoryId =>\n categoryId.indexOf(TECHNOLOGY_CATEGORY_IDENTIFIER) !== -1\n\n const getTechnologyName = categoryId =>\n categoryId.substr(\n categoryId.indexOf(TECHNOLOGY_CATEGORY_IDENTIFIER) +\n TECHNOLOGY_CATEGORY_IDENTIFIER.length\n )\n\n const categories = [\n ...(productData.cupSizes || []),\n ...(productData.flavors || []),\n ...(productData.ranges || []),\n ...(productData.technologies || [])\n ]\n\n const categoryNames = await Promise.all(\n categories.map(async categoryId => {\n const categoryData = await this.getPLPCategory(categoryId)\n\n if (!categoryData && isTechnologyCategory(categoryId)) {\n return getTechnologyName(categoryId)\n }\n\n return categoryData.name\n })\n )\n\n return categoryNames.join('|')\n }\n\n async getCategories(productData) {\n if (!productData) {\n return ''\n }\n\n if (window.getPLPData) {\n return this.getCategoriesWithPlpData(productData)\n }\n\n return Promise.all(\n productData.supercategories.map(superCategory =>\n window.napi.catalog().getCategory(superCategory)\n )\n ).then(categories => {\n const dimension55 = []\n for (const category of categories) {\n const code = category.code\n if (!code) {\n return\n }\n if (\n ~code.indexOf('-cupSize-') ||\n ~code.indexOf('-range-') ||\n ~code.indexOf('capsule-aromatic-') ||\n ~code.indexOf('machine-keyFeature-') ||\n ~code.indexOf('machine-color-') ||\n ~code.indexOf('accessory-collection-') ||\n ~code.indexOf('accessory-hero-month')\n ) {\n dimension55.push(category.name.toLowerCase())\n }\n }\n return dimension55.join('|')\n })\n }\n\n buildGTMProductObject(productData, dimension55) {\n let category\n if (productData.type === 'capsule') {\n category = 'capsules'\n } else if (productData.type === 'accessory') {\n category = 'accessories'\n } else if (productData.type === 'machine') {\n category = 'machines'\n }\n\n let dimension56 = null\n if (productData.technologies) {\n dimension56 = productData.technologies\n .map(technology => capitalize(technology.split('/')[2]))\n .join('|||')\n }\n\n let dimension130 = ''\n if (productData.productSelections != null) {\n dimension130 = productData.productSelections.join('|')\n }\n\n const impressionsOnScrollData = {\n brand: 'Nespresso',\n category,\n dimension43: 'false',\n dimension44: 'false',\n dimension53: productData.legacyId,\n dimension54: parseHTML(productData.name)[0].textContent,\n dimension55,\n dimension56,\n dimension57: this.isBundled(productData) ? 'bundled' : 'single',\n dimension130,\n id: productData.internationalId,\n name: parseHTML(productData.internationalName)[0].textContent,\n price: productData.price\n }\n if (this.range) {\n impressionsOnScrollData.list = this.range\n }\n if (this.position) {\n impressionsOnScrollData.position = parseInt(this.position)\n }\n return impressionsOnScrollData\n }\n\n /**\n * Guess if it's bundled even if the 'bundled' property is missing (ecapi VS PLP Data)\n */\n isBundled(productData) {\n let result = productData.salesMultiple === 1 && productData.unitQuantity > 1\n\n if (productData.bundled) {\n result = productData.bundled\n } else if (productData.salesMultiple > 1 && productData.unitQuantity === 1) {\n result = false\n }\n\n return result\n }\n}\n","import productTracking from '@kissui/helpers/src/assets/js/productTracking'\nimport { getProduct } from '@kissui/helpers/src/catalog'\n\nclass AddToCart extends HTMLElement {\n static addToCartCounter = 0\n\n connectedCallback() {\n this.sku = (this.getAttribute('sku') || '').trim()\n this.range = this.getAttribute('range')\n this.position = this.getAttribute('position')\n this.longSku = (this.getAttribute('longSku') || '').trim()\n this.buttonSize = this.getAttribute('buttonSize') || 'small' // large or small\n this.rendererName = this.getAttribute('rendererName') || 'default'\n this.elementID = `addToCart${AddToCart.addToCartCounter++}`\n this.disableTracking = this.getAttribute('disableTracking') || false\n\n this.render()\n\n if (!this.isWindowNapiActive()) {\n return\n }\n\n window.napi\n .getConfig()\n .then(() => {\n this.pushButton()\n })\n .catch(e => console.error(e))\n\n if (!this.disableTracking) {\n this.tracking()\n .then(() => {})\n .catch(e => console.error(e))\n }\n }\n\n render() {\n this.innerHTML = `<div class=\"cb-AddToCart\" id=\"${this.elementID}\">\n <button class='AddToBagButtonLarge'>\n <span class='AddToBagButtonLarge__label'>+</span>\n </button>\n </div>`\n }\n\n isWindowNapiActive() {\n return !!window.napi\n }\n\n pushButton() {\n if (!document.getElementById(this.elementID)) {\n return\n }\n\n const buttonSize = this.buttonSize\n\n window.ui = window.ui || []\n window.ui.push({\n id: this.elementID,\n module: 'AddToBagButton',\n configuration: { props: { productId: this.longSku, buttonSize } },\n ecommerceData: { activated: true }\n })\n }\n\n async tracking() {\n if (!this.isWindowNapiActive()) {\n return Promise.resolve()\n }\n\n const data = await this.getProductData()\n const currency = window[window.config.padl.namespace].dataLayer.app.app.currency\n productTracking(this, data, currency, this.range, this.position)\n }\n\n getSkuKey(sku) {\n return sku.indexOf('prod/') !== -1 ? 'id' : 'legacyId'\n }\n\n async getProductData() {\n let plpData = null\n if (window.getPLPData != null) {\n plpData = await window.getPLPData()\n }\n if (plpData) {\n const skuKey = this.getSkuKey(this.sku)\n const allKeys = [skuKey, 'internationalId', 'id', 'legacyId']\n let currentKeyIndex = 0\n let data = null\n\n while (!data && currentKeyIndex < allKeys.length - 1) {\n const key = allKeys[currentKeyIndex]\n\n data = plpData.data.configuration.eCommerceData.products.find(\n product => product[key] === this.sku\n )\n\n currentKeyIndex++\n }\n\n return data\n } else if (this.isWindowNapiActive()) {\n return await getProduct(this.longSku)\n }\n\n console.error('Error: napi is not found.')\n }\n}\n\ncustomElements.get('nb-add-to-cart') || customElements.define('nb-add-to-cart', AddToCart)\n\nexport default AddToCart\n","import createProps from '@kissui/helpers/src/props.helpers'\nimport viewportHelper from '@kissui/helpers/src/viewport.helpers'\nimport { EVENT_SLIDER_READY } from '@kissui/components'\nimport { readEvent } from '@kissui/helpers/src/assets/js/eventDispatch'\nimport { stringifyForAttribute, escapeHtml } from '@kissui/helpers/src/utils'\nimport { BROWSER_CONTEXT } from '../constants.mjs'\nimport { customEvent } from '@kissui/helpers/src/gtmEvents'\n\nconst SLIDER_CHIPS_ID = 'slider_natural_chips'\n\nclass PlpStickyBar extends HTMLElement {\n constructor() {\n super()\n this.boundReinitSlider = this.reinitSlider.bind(this)\n this.boundLinkClick = this.linkClick.bind(this)\n }\n\n connectedCallback() {\n this.props = createProps(this.attributes)\n\n this.addEventListener(EVENT_SLIDER_READY, this.boundReinitSlider)\n this.render()\n\n this.dropdownButtons = this.querySelectorAll(`.nb-dropdown__menu button`)\n if (this.dropdownButtons) {\n this.dropdownButtons.forEach(item => {\n item.addEventListener('click', this.boundLinkClick)\n })\n }\n }\n\n render() {\n const { navigation = [], navigation_bubbles = '' } = this.props\n this.classList.add('nb-plp-sticky-bar')\n\n this.innerHTML = `<div class='cb-restrict'>\n ${this.renderLinksSelect(navigation)}\n ${this.renderChipsSlider(navigation_bubbles)}\n </div>`\n\n this.dropdown = this.querySelector('nb-dropdown')\n this.navigationBubble = this.querySelector('nb-navigation-bubbles')\n\n // We set aria-hidden on this whole component because it has no sense to manage twice the features for SR and keyboard navigations\n // Those features (bubble anchor + dropdown page switch) are already managed by the non sticky components\n this.setAttribute('aria-hidden', 'true')\n }\n\n renderLinksSelect(links) {\n if (viewportHelper.is.mobile || !links || links.length <= 1) {\n return ''\n }\n\n const data = links.map(e => {\n e.checked = e.selected\n return e\n })\n\n return `\n <nb-dropdown\n data='${stringifyForAttribute({ icon_option: '16/symbol/check', options: data })}'\n ></nb-dropdown>\n `\n }\n\n renderChipsSlider(bubbles) {\n const { a11y_slider_previous_button = '', a11y_slider_next_button = '' } = this.props\n\n return `<nb-navigation-bubbles\n slider_id='${SLIDER_CHIPS_ID}'\n a11y_slider_previous_button=\"${a11y_slider_previous_button}\"\n a11y_slider_next_button=\"${a11y_slider_next_button}\"\n sticky='true' data='${escapeHtml(bubbles)}'\n selected_nav_link_label=\"${\n this.props.selected_nav_link_label || ''\n }\"></nb-navigation-bubbles>`\n }\n\n forceSliderWidth() {\n // This is needed for Chip Slider, I don't understand why the width is too much\n // So we set it hardly in JS (only when dropdown is in the layout)\n if (this.dropdown) {\n const dropdownWidth = this.dropdown.offsetWidth\n const stickyBarWidth = this.querySelector('.cb-restrict').offsetWidth\n const navigationBubbleWidth = stickyBarWidth - dropdownWidth\n\n this.navigationBubble.style.setProperty(\n 'width',\n `${navigationBubbleWidth / BROWSER_CONTEXT}rem`\n )\n }\n }\n\n reinitSlider(e) {\n const { id } = readEvent(e)\n if (id !== SLIDER_CHIPS_ID) {\n return\n }\n this.forceSliderWidth()\n e.target.initSlider()\n }\n\n linkClick(event) {\n event.preventDefault()\n // We need to redefine click on dropdown links because these are buttons\n const link = event.currentTarget.getAttribute('data-link')\n if (link) {\n window.location.href = link\n }\n\n const textContent = event.currentTarget.getAttribute('value')\n customEvent({\n eventAction: 'PLP Content Tab',\n eventLabel: textContent\n })\n }\n\n disconnectedCallback() {\n this.removeEventListener(EVENT_SLIDER_READY, this.boundReinitSlider)\n\n if (this.dropdownButtons) {\n this.dropdownButtons.forEach(item => {\n item.removeEventListener('click', this.boundLinkClick)\n })\n }\n }\n}\n\ncustomElements.get('nb-plp-sticky-bar') || customElements.define('nb-plp-sticky-bar', PlpStickyBar)\n\nexport default PlpStickyBar\n","/*!\n * swiped-events.js - v@version@\n * Pure JavaScript swipe events\n * https://github.com/john-doherty/swiped-events\n * @inspiration https://stackoverflow.com/questions/16348031/disable-scrolling-when-touch-moving-certain-element\n * @author John Doherty <www.johndoherty.info>\n * @license MIT\n */\n\n// scrollElement has been added as an optional parameter in order to avoid scrolling to fire a swipe\nconst swipeEvents = (window: Window & typeof globalThis, document: Document, stopEl?: HTMLElement) => {\n if (window.nwcSwipeEvents) {\n return\n }\n window.nwcSwipeEvents = true\n\n // patch CustomEvent to allow constructor creation (IE/Chrome)\n // if (typeof window.CustomEvent !== 'function') {\n // window.CustomEvent = function(event, params) {\n // params = params || {bubbles: false, cancelable: false, detail: undefined}\n //\n // let evt = document.createEvent('CustomEvent')\n // evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail)\n // return evt\n // }\n //\n // window.CustomEvent.prototype = window.Event.prototype\n // }\n\n document.addEventListener('touchstart', handleTouchStart, false)\n document.addEventListener('touchmove', handleTouchMove, false)\n document.addEventListener('touchend', handleTouchEnd, false)\n\n let xDown: null | number = null\n let yDown: null | number = null\n let xDiff: null | number = null\n let yDiff: null | number = null\n let timeDown: null | number = null\n let startEl: HTMLElement | null = null\n\n // Variables added for checkScrollConditions\n let scrollTopArray: number[] = []\n let scrollLeftArray: number[] = []\n\n /**\n * Avoid swipe up or down events to fire by checking the scrollTop position of the optional param scrollEl (scrollable zone)\n * @param {string} direction - 'up' ,'down', 'left', 'right'\n * @returns {boolean}\n */\n function checkScrollCondition(direction: \"up\" |\"down\" | \"left\" | \"right\", e: TouchEvent) {\n if (stopEl === undefined) {\n return true\n }\n\n let el = e.target as HTMLElement\n let result = true\n let i = 0\n while (el !== stopEl && result) {\n if (isScrollable(el)) {\n switch (direction) {\n case 'up':\n result = scrollTopArray[i] === el.scrollHeight - el.clientHeight\n break\n case 'down':\n result = scrollTopArray[i] === 0\n break\n case 'left':\n result = scrollLeftArray[i] === el.scrollWidth - el.clientWidth\n break\n case 'right':\n result = scrollLeftArray[i] === 0\n break\n default:\n result = true\n }\n }\n el = el.parentNode as HTMLElement\n i++\n }\n return result\n }\n\n function memorizeStartElScrollPositions(el: HTMLElement) {\n if (stopEl === undefined || !stopEl.contains(el)) {\n return\n }\n scrollTopArray = []\n scrollLeftArray = []\n while (el !== stopEl) {\n scrollTopArray.push(el.scrollTop)\n scrollLeftArray.push(el.scrollLeft)\n el = el.parentNode as HTMLElement\n }\n }\n\n function isScrollable(el: HTMLElement) {\n return el.scrollHeight > el.clientHeight || el.scrollWidth > el.clientWidth\n }\n\n /**\n * Fires swiped event if swipe detected on touchend\n * @param {object} e - browser event object\n * @returns {void}\n */\n function handleTouchEnd(e: TouchEvent) {\n // if the user released on a different target, cancel!\n if (startEl !== e.target) {\n return\n }\n\n // Calculate the data-swipe-threshold to be a percentage of the viewport\n const defaultVertical = window.innerHeight * 0.25 // 25% of the viewport\n const defaultHorizontal = window.innerWidth * 0.5 // 50% of the viewport\n\n let swipeThresholdVertical =\n getNearestAttribute(startEl!, 'data-swipe-threshold', defaultVertical)\n\n let swipeThresholdHorizontal =\n getNearestAttribute(startEl!, 'data-swipe-threshold', defaultHorizontal)\n\n let swipeTimeout = getNearestAttribute(startEl!, 'data-swipe-timeout', 500) // default 500ms\n let timeDiff = Date.now() - timeDown!\n let eventType = ''\n let changedTouches = e.changedTouches || e.touches || []\n\n if (Math.abs(xDiff!) > Math.abs(yDiff!)) {\n // most significant\n if (Math.abs(xDiff!) > swipeThresholdHorizontal && timeDiff < swipeTimeout) {\n if (xDiff! > 0) {\n if (checkScrollCondition('left', e)) {\n eventType = 'swiped-left'\n }\n } else {\n if (checkScrollCondition('right', e)) {\n eventType = 'swiped-right'\n }\n }\n }\n } else if (Math.abs(yDiff!) > swipeThresholdVertical && timeDiff < swipeTimeout) {\n if (yDiff! > 0) {\n if (checkScrollCondition('up', e)) {\n eventType = 'swiped-up'\n }\n } else {\n if (checkScrollCondition('down', e)) {\n eventType = 'swiped-down'\n }\n }\n }\n\n if (eventType !== '') {\n let eventData = {\n dir: eventType.replace(/swiped-/, ''),\n touchType: (changedTouches[0] as Touch & { touchType: string })?.touchType ?? 'direct', // This is a non standard feature used only by safari\n xStart: xDown!,\n xEnd: (changedTouches[0] || {}).clientX || -1,\n yStart: yDown!,\n yEnd: (changedTouches[0] || {}).clientY || -1\n }\n\n // fire `swiped` event event on the element that started the swipe\n startEl!.dispatchEvent(\n new CustomEvent('swiped', { bubbles: true, cancelable: true, detail: eventData })\n )\n\n // fire `swiped-dir` event on the element that started the swipe\n startEl!.dispatchEvent(\n new CustomEvent(eventType, { bubbles: true, cancelable: true, detail: eventData })\n )\n }\n\n // reset values\n xDown = null\n yDown = null\n timeDown = null\n }\n\n /**\n * Records current location on touchstart event\n * @param {object} e - browser event object\n * @returns {void}\n */\n function handleTouchStart(e: TouchEvent) {\n const target = e.target as HTMLElement\n // if the element has data-swipe-ignore=\"true\" we stop listening for swipe events\n if (target.getAttribute('data-swipe-ignore') === 'true') {\n return\n }\n\n startEl = target\n memorizeStartElScrollPositions(startEl)\n\n timeDown = Date.now()\n xDown = e.touches[0].clientX\n yDown = e.touches[0].clientY\n xDiff = 0\n yDiff = 0\n }\n\n /**\n * Records location diff in px on touchmove event\n * @param {object} e - browser event object\n * @returns {void}\n */\n function handleTouchMove(e: TouchEvent) {\n if (!xDown || !yDown) {\n return\n }\n\n let xUp = e.touches[0].clientX\n let yUp = e.touches[0].clientY\n\n xDiff = xDown - xUp\n yDiff = yDown - yUp\n }\n\n /**\n * Gets attribute off HTML element or nearest parent\n * @param {object} el - HTML element to retrieve attribute from\n * @param {string} attributeName - name of the attribute\n * @param {any} defaultValue - default value to return if no match found\n * @returns {any} attribute value or defaultValue\n */\n function getNearestAttribute(el: HTMLElement, attributeName: string | number, defaultValue: number) {\n // walk up the dom tree looking for attributeName\n while (el && el !== document.documentElement) {\n let attributeValue = el.getAttribute(String(attributeName))\n\n if (attributeValue) {\n return parseInt(attributeValue, 10)\n }\n\n el = el.parentNode as HTMLElement\n }\n\n return defaultValue\n }\n}\n\nexport default swipeEvents\n","import './overlay.scss'\nimport { dispatchEvent } from '@kissui/helpers/src/assets/js/eventDispatch'\nimport { EVENT_POPIN_CLOSE, TIME_INSTANT, TIME_SLOW } from '@kissui/components'\n\nconst open = popin_id => {\n const overlay = document.createElement('DIV')\n overlay.classList.add('nb-overlay')\n overlay.addEventListener('click', () => {\n dispatchEvent({ eventName: EVENT_POPIN_CLOSE, args: { id: popin_id } })\n })\n document.body.appendChild(overlay)\n setTimeout(() => {\n overlay.classList.add('fadein')\n }, TIME_INSTANT)\n}\n\nconst close = () => {\n if (!document.getElementsByClassName('nb-overlay').length) {\n return\n }\n const overlay = document.getElementsByClassName('nb-overlay')[0]\n overlay.classList.remove('fadein')\n setTimeout(() => {\n overlay.remove()\n }, TIME_SLOW)\n}\n\nexport default { open, close }\n","import swipeEvents from '@kissui/helpers/src/swipeEvents'\nimport createProps, { parseBool } from '@kissui/helpers/src/props.helpers'\nimport {\n recursiveSwitchAriaHidden,\n setFirstAndLastFocusable,\n focusin\n} from '@kissui/helpers/src/assets/js/scopedKeyboardNav'\nimport {\n TIME_FAST,\n EVENT_POPIN_OPENED,\n EVENT_POPIN_CLOSED,\n EVENT_VIDEO_TOGGLE,\n EVENT_POPIN_OPEN,\n EVENT_POPIN_CLOSE,\n EVENT_POPIN_KEY_DOWN,\n EVENT_SWIPED_DOWN\n} from '@kissui/components'\nimport Overlay from './components/overlay'\nimport viewportHelper from '@kissui/helpers/src/viewport.helpers'\nimport { dispatchEvent, readEvent } from '@kissui/helpers/src/assets/js/eventDispatch'\n\nconst STATE_OPEN = 'isOpen'\nconst SCROLL_LOCK = 'scroll-lock'\n\nclass Popin extends HTMLElement {\n constructor() {\n super()\n this.props = {}\n this.ariaModal = null\n this.isVideo = null\n\n this.boundOpen = this.open.bind(this)\n this.boundClose = this.close.bind(this)\n this.boundEscapeClose = this.escapeClose.bind(this)\n this.boundFocus = this.focus.bind(this)\n this.boundFocusin = this.focusin.bind(this)\n }\n\n connectedCallback() {\n this.style.display = 'none'\n this.props = createProps(this.attributes)\n\n if (!this.id) {\n this.id = this.props.id\n }\n\n if (!this.content && !this.slot) {\n this.slot = this.innerHTML\n }\n\n this.ariaModal = false\n this.isVideo = false\n this.render()\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n this.props = createProps(this.attributes)\n\n if (name === 'content') {\n this.props.content = newValue\n }\n }\n\n static get observedAttributes() {\n return ['content']\n }\n\n disconnectedCallback() {\n if (!this.hasEvent) {\n return\n }\n this.unbindEvent()\n }\n\n render() {\n if (this.hasEvent) {\n this.unbindEvent()\n }\n const {\n heading = '',\n subheading = '',\n bgcolor = 'highlight',\n size = 'M',\n label_close = 'Close',\n image = '',\n image_alt = '',\n variation = 'before',\n content = '',\n heading_class = viewportHelper.is.mobile ? 't-sm-700-sl' : 'h-lg-700',\n heading_id = 'popin-heading'\n } = this.props\n const slot = content || this.slot\n\n if (slot === '') {\n this.bindEvent()\n this.classList.remove(STATE_OPEN)\n this.isOpen = false\n return false\n }\n this.checkIsVideo(slot)\n this.setAttribute('size', this.isVideo ? 'L' : size)\n\n // FYI : The role is dialog, not alertdialog (only used for alerts / warnings ...)\n this.setAttribute('role', 'dialog')\n this.setAttribute('aria-hidden', 'true')\n this.setAttribute('bgcolor', bgcolor)\n this.setAttribute('variation', variation)\n\n // Be careful to not remove the title div, even if empty, because it holds on purpose the top gradient for scroll effect\n this.innerHTML = `\n <nb-cta\n variation=\"navigation\"\n ${bgcolor === 'white' ? `contrast=\"highlight\"` : `contrast=\"light\"`}\n icon_right=\"24/symbol/close\"\n label=\"${label_close}\"></nb-cta>\n <div class=\"wrapper\">\n ${\n heading &&\n `<div class=\"title\" >\n ${\n heading &&\n `<h2 id=\"${heading_id}\" class=\"${heading_class}\">${heading}</h2>`\n }\n </div>`\n }\n ${\n subheading &&\n `<div class=\"subtitle\">\n ${subheading && `<p class=\"t-sm-500\">${subheading}</p>`}\n </div>`\n }\n\n <div class=\"content t-sm-400\" tabindex=\"-1\">\n ${\n image &&\n `<div class=\"popin-header-img\"><img loading=\"lazy\" src=\"${image}\" alt=\"${image_alt}\" title=\"${image_alt}\" width=\"300\" height=\"225\" /></div>`\n }\n ${slot}\n </div>\n ${this.renderFooter()}\n </div>\n ${this.isVideo && viewportHelper.is.mobile ? '<div class=\"swipeOverlay\"></div>' : ''}\n `\n\n // Expected css to be downloaded\n setTimeout(() => {\n this.style.display = 'inherit'\n }, 100)\n\n // Set the first and last focusable elements\n setFirstAndLastFocusable(this)\n\n this.buttonElement = this.querySelector('button')\n this.bindEvent()\n }\n\n renderFooter() {\n const { footer } = this.props\n return parseBool(footer) ? '<footer></footer>' : ''\n }\n\n checkIsVideo(slot) {\n const tempEl = document.createElement('div')\n tempEl.innerHTML = slot\n if (tempEl.children.length === 1 && tempEl.children[0].tagName === 'NB-VIDEO') {\n this.isVideo = true\n this.setAttribute('video', 'true')\n }\n }\n\n addLock() {\n document.getElementsByTagName('html')[0].classList.add(SCROLL_LOCK)\n Overlay.open(this.id)\n }\n\n removeLock() {\n // In case we have popin inside a popin we shouldn't remove the scroll_lock\n const parentPopin = this.parentNode.closest('nb-popin')\n if (!parentPopin) {\n document.getElementsByTagName('html')[0].classList.remove(SCROLL_LOCK)\n }\n Overlay.close()\n }\n\n switchAriaModal() {\n this.ariaModal = !this.ariaModal\n // This is the future way to scope the SR focus to a modal, but it's not supported yet by all SR\n this.setAttribute('aria-modal', this.ariaModal)\n // So we need to set aria-hidden=false to all ancestors of parent until body\n recursiveSwitchAriaHidden(this, this.ariaModal)\n }\n\n async open(e) {\n const event = readEvent(e)\n if (event.id !== this.id) {\n return\n }\n // Transitionend listener is fired multiple times (fore each css property)\n // so we need to instantiate it only when we open or close and then we remove it on focusin\n this.addEventListener('transitionend', this.boundFocus)\n document.addEventListener('focusin', this.boundFocusin)\n this.openingSource = document.activeElement\n\n this.addLock()\n this.switchAriaModal()\n this.setAttribute('aria-hidden', 'false')\n this.isOpen = !this.isOpen\n\n // event variable already contains ID and other args sent along with dispatch event\n dispatchEvent({\n eventName: EVENT_POPIN_OPENED,\n args: event\n })\n\n await new Promise(resolve => {\n setTimeout(() => {\n this.classList.add(STATE_OPEN)\n resolve()\n }, TIME_FAST)\n })\n }\n\n close(event) {\n event.cancelBubble = true\n if (event.stopPropagation) {\n event.stopPropagation()\n }\n // Transitionend listener is fired multiple times (fore each css property)\n // so we need to instantiate it only when we open or close, and then we remove it on focusin\n this.addEventListener('transitionend', this.boundFocus)\n document.removeEventListener('focusin', this.boundFocusin)\n this.removeLock()\n if (this.isVideo) {\n const openVideoPopin = this.closest('.has-open-video')\n if (openVideoPopin) {\n openVideoPopin.classList.remove('has-open-video')\n }\n }\n this.switchAriaModal()\n this.setAttribute('aria-hidden', 'true')\n this.isOpen = !this.isOpen\n this.classList.remove(STATE_OPEN)\n\n dispatchEvent({\n eventName: EVENT_POPIN_CLOSED,\n args: { id: this.id }\n })\n }\n\n focus() {\n this.removeEventListener('transitionend', this.boundFocus)\n if (this.isOpen) {\n this.buttonElement.focus()\n } else {\n this.openingSource.focus()\n }\n }\n\n focusin(e) {\n focusin(e, this, true)\n }\n\n escapeClose(e) {\n if (e.key === 'Escape' && this.isOpen) {\n this.close(e)\n }\n }\n\n swipeDown(e) {\n if (this.isOpen) {\n this.close(e)\n }\n }\n\n swipeOverlayTogglePlayPause() {\n dispatchEvent({\n eventName: EVENT_VIDEO_TOGGLE,\n args: { id: this.id }\n })\n }\n\n bindEvent() {\n this.hasEvent = true\n this.buttonElement != null && this.buttonElement.addEventListener('click', this.boundClose)\n window.addEventListener(EVENT_POPIN_OPEN, this.boundOpen)\n window.addEventListener(EVENT_POPIN_CLOSE, this.boundClose)\n document.addEventListener(EVENT_POPIN_KEY_DOWN, this.boundEscapeClose)\n\n if (viewportHelper.is.mobile) {\n swipeEvents(window, document, this)\n this.boundSwipeDown = this.swipeDown.bind(this)\n document.addEventListener(EVENT_SWIPED_DOWN, this.boundSwipeDown)\n if (this.isVideo) {\n this.swipeOverlay = this.querySelector('.swipeOverlay')\n this.boundSwipeOverlayTogglePlayPause = this.swipeOverlayTogglePlayPause.bind(this)\n this.swipeOverlay.addEventListener('click', this.boundSwipeOverlayTogglePlayPause)\n }\n }\n }\n\n unbindEvent() {\n this.hasEvent = false\n this.buttonElement != null &&\n this.buttonElement.removeEventListener('click', this.boundClose)\n window.removeEventListener(EVENT_POPIN_OPEN, this.boundOpen)\n window.removeEventListener(EVENT_POPIN_CLOSE, this.boundClose)\n document.removeEventListener(EVENT_POPIN_KEY_DOWN, this.boundEscapeClose)\n if (this.boundSwipeDown) {\n document.removeEventListener(EVENT_SWIPED_DOWN, this.boundSwipeDown)\n this.boundSwipeDown = null\n }\n if (this.boundSwipeOverlayTogglePlayPause) {\n this.swipeOverlay.removeEventListener('click', this.boundSwipeOverlayTogglePlayPause)\n this.boundSwipeOverlayTogglePlayPause = null\n }\n }\n}\n\ncustomElements.get('nb-popin') || customElements.define('nb-popin', Popin)\n\nexport default Popin\n","import { getMarketCode } from './dataLayer'\n\nconst LABEL_CATEGORY_NAME = 'cat/capsule-range-label'\nconst LABEL_CATEGORY_NAME_MACHINE = 'cat/machine-range-label'\nexport const RANGE_CATEGORY_NAME = 'cat/capsule-range'\nconst FAIR_TRADE_CATEGORY_NAME = 'cat/capsule-range-fair-trade'\nconst VERTUO_NEXT_CATEGORY_NAME = 'cat/capsule-attribute-only-vertuo-next'\nconst ORGANIC_EU_CATEGORY_NAME = 'capsule-attribute-organic-eu'\nconst RAINFOREST_CATEGORY_NAME = 'capsule-attribute-rainforest'\nconst SUSTAINABILITY_CATEGORY_NAME = 'capsule-attribute-sustainability'\nconst ARABICA_CATEGORY_NAME = 'capsule-attribute-arabica'\nconst PRODUCT_HIGHLIGHT_CATEGORY_NAME = 'cat/capsule-attribute-highlight'\nconst TECHNOLOGY_CATEGORY_IDENTIFIER = '/machineTechno/'\n\nconst COMMON_URL = 'https://www.nespresso.com/shared_res/agility/commons/img/icons/'\n\nexport const FAIR_TRADE_IMG = COMMON_URL + 'fairTrade.svg'\nexport const ORGANIC_LOGO_IMG_EU = COMMON_URL + 'logo-organic-eu.svg'\nexport const ORGANIC_LOGO_IMG_US = COMMON_URL + 'logo-organic-us.svg'\nexport const ORGANIC_LOGO_IMG_CA = COMMON_URL + 'logo-organic-ca.svg'\nexport const ORGANIC_LOGO_IMG_BR = COMMON_URL + 'logo-organic-br.svg'\nexport const ORGANIC_LOGO_IMG_JP = COMMON_URL + 'logo-organic-jp.svg'\nexport const ORGANIC_LOGO_IMG_BE = COMMON_URL + 'logo-organic-be.png'\n\nexport const VERTUONEXT_LOGO_IMG = COMMON_URL + 'logo-only-vertuo-next.svg'\nexport const RAINFOREST_LOGO_IMG = COMMON_URL + 'logo-rainforest.svg'\nexport const SUSTAINABILITY_LOGO_IMG = COMMON_URL + 'logo-sustainability.svg'\nexport const Q_CERTIFICATION_ARABICA_LOGO_IMG = COMMON_URL + 'q_grade_certification_arabica.svg'\nexport const DESIGN_AWARD_2021_IMG = COMMON_URL + 'design_award_2021.svg'\n\nexport const LOGO_IMG_MAP = {\n fair_trade: FAIR_TRADE_IMG,\n is_organic: getOrganicLogo(),\n only_vertuo_next: VERTUONEXT_LOGO_IMG,\n is_q_certified_arabica: Q_CERTIFICATION_ARABICA_LOGO_IMG,\n is_rainforest: RAINFOREST_LOGO_IMG,\n is_sustainable: SUSTAINABILITY_LOGO_IMG,\n is_design_award_2021: DESIGN_AWARD_2021_IMG\n}\n\nexport function getOrganicLogo() {\n let organicLogoImg = ORGANIC_LOGO_IMG_EU\n\n switch (getMarketCode()) {\n case 'us':\n organicLogoImg = ORGANIC_LOGO_IMG_US\n break\n case 'ca':\n organicLogoImg = ORGANIC_LOGO_IMG_CA\n break\n case 'br':\n organicLogoImg = ORGANIC_LOGO_IMG_BR\n break\n case 'jp':\n organicLogoImg = ORGANIC_LOGO_IMG_JP\n break\n case 'be':\n organicLogoImg = ORGANIC_LOGO_IMG_BE\n break\n }\n\n return organicLogoImg\n}\n\n/**\n * retrieves the list of categories of type Vertuo Next\n * @param {category[]} categories\n */\nexport function getVertuoNext(categories) {\n return categories.find(category => isVertuoNext(category))\n}\n\n/**\n * returns true when the category is product vertuo next\n * @param {category} category\n */\nfunction isVertuoNext(category) {\n return getCategoryRegEx(VERTUO_NEXT_CATEGORY_NAME).test(category.id)\n}\n\n/**\n * retrieves the list of categories of type organic EU\n * @param {category[]} categories\n */\nexport function getOrganicEu(categories) {\n return categories.find(category => isOrganicEu(category))\n}\n\n/**\n * returns true when the category is product organic EU\n * @param {category} category\n */\nfunction isOrganicEu(category) {\n return getCategoryRegEx(ORGANIC_EU_CATEGORY_NAME).test(category.id)\n}\n\n/**\n * retrieves the list of categories of type rainforest\n * @param {category[]} categories\n */\nexport function getRainforest(categories) {\n return categories.find(category => isRainforest(category))\n}\n\n/**\n * returns true when the category is rainforest\n * @param {category} category\n */\nfunction isRainforest(category) {\n return getCategoryRegEx(RAINFOREST_CATEGORY_NAME).test(category.id)\n}\n\n/**\n * retrieves the list of categories of type sustainability\n * @param {category[]} categories\n */\nexport function getSustainability(categories) {\n return categories.find(category => isSustainability(category))\n}\n\n/**\n * retrieves the list of categories of type arabica\n * @param {category[]} categories\n */\nexport function getArabica(categories) {\n return categories.find(category => isArabica(category))\n}\n\n/**\n * returns true when the category is arabica\n * @param {category} category\n */\nfunction isArabica(category) {\n return getCategoryRegEx(ARABICA_CATEGORY_NAME).test(category.id)\n}\n\n/**\n * returns true when the category is sustainability\n * @param {category} category\n */\nfunction isSustainability(category) {\n return getCategoryRegEx(SUSTAINABILITY_CATEGORY_NAME).test(category.id)\n}\n\n/**\n * retrieves the list of categories of type label\n * @param {category[]} categories\n */\nexport function getLabels(categories) {\n return categories.filter(category => isLabel(category))\n}\n\n/**\n * retrieves the list of categories of type label\n * @param {category[]} categories\n */\nexport function getProductHighlight(categories) {\n return categories.find(category => isProductHighlight(category))\n}\n/**\n * retrieves the list of categories of type label\n * @param {category[]} categories\n */\nexport function getFairTrade(categories) {\n return categories.find(category => isFairTrade(category))\n}\n\n/**\n * returns a regex to match the tail (global) of a given local category ID\n * @param {string} categoryIdTail : should contain the end of the category ID\n */\nexport function getCategoryRegEx(categoryIdTail) {\n return new RegExp(categoryIdTail.replace(/\\//g, '\\\\/'))\n}\n\n/**\n * returns true when the category is child of the label category (is type label)\n * @param {category} category\n */\nfunction isLabel(category) {\n return (\n getCategoryRegEx(LABEL_CATEGORY_NAME).test(category.id) ||\n getCategoryRegEx(LABEL_CATEGORY_NAME_MACHINE).test(category.id)\n )\n}\n\n/**\n * returns true when the category is product highlight\n * @param {category} category\n */\nfunction isProductHighlight(category) {\n return getCategoryRegEx(PRODUCT_HIGHLIGHT_CATEGORY_NAME).test(category.id)\n}\n/**\n * returns true when the category is fair trade\n * @param {category} category\n */\nfunction isFairTrade(category) {\n return getCategoryRegEx(FAIR_TRADE_CATEGORY_NAME).test(category.id)\n}\n\n/**\n * returns true when the category is child of the range category (is type range)\n * @param {category} category\n */\nexport function isRange(category) {\n return category.superCategories.some(superCategory =>\n getCategoryRegEx(RANGE_CATEGORY_NAME).test(superCategory)\n )\n}\n\nexport function getTechnologyName(productData, categories) {\n if (!productData || !productData.technologies || !productData.technologies.length) {\n return null\n }\n\n const techno = productData.technologies[0]\n const categoryNameAsSubstring = techno.substring(\n techno.indexOf(TECHNOLOGY_CATEGORY_IDENTIFIER) + TECHNOLOGY_CATEGORY_IDENTIFIER.length\n )\n const category = categories?.find(cat => cat.id === techno)\n\n // Backward compatibility, return name as substring if the list of categories are not available\n return category?.name || categoryNameAsSubstring\n}\n\nexport function isCategoryHidden(categoryId) {\n let hideCategory = false\n // To enable AB testing: exclude categories which are to be hidden\n if (\n window.PLP_HIDE_CATEGORIES?.length &&\n window.PLP_HIDE_CATEGORIES.findIndex(c => categoryId.indexOf(c) >= 0) >= 0\n ) {\n hideCategory = true\n }\n\n // To enable AB testing: exclude categories except those which are to be shown\n if (window.PLP_ONLY_SHOW_CATEGORIES?.length) {\n // Default to hide\n hideCategory = true\n if (window.PLP_ONLY_SHOW_CATEGORIES.findIndex(c => categoryId.indexOf(c) >= 0) >= 0) {\n hideCategory = false\n }\n }\n return hideCategory\n}\n","import { LOGO_IMG_MAP } from '@kissui/helpers/src/cremaDataHelper'\nimport createProps from '@kissui/helpers/src/props.helpers'\n\nclass CardLogos extends HTMLElement {\n constructor() {\n super()\n this.props = {}\n }\n\n connectedCallback() {\n this.props = createProps(this.attributes)\n this.render()\n }\n\n render() {\n // individual props for each logo is there for retro compatibility\n // logos is the prop that we should use going forward to add any logo\n let { direction = 'row', logos } = this.props\n let fair_trade\n let alt_fair_trade\n let is_organic\n let alt_organic\n let only_vertuo_next\n let alt_vertuo_next\n let is_rainforest\n let alt_rainforest\n let is_sustainable\n let alt_sustainable\n let is_q_certified_arabica\n let alt_q_certification_arabica\n\n this.classList.add(\n `${direction === 'column' ? 'direction-column' : 'direction-' + direction}`\n )\n\n let logos_list = []\n if (logos == null) {\n fair_trade = this.props?.fair_trade\n alt_fair_trade = this.props?.alt_fair_trade\n is_organic = this.props?.is_organic\n alt_organic = this.props?.alt_organic\n only_vertuo_next = this.props?.only_vertuo_next\n alt_vertuo_next = this.props?.alt_vertuo_next\n is_rainforest = this.props?.is_rainforest\n alt_rainforest = this.props?.alt_rainforest\n is_sustainable = this.props?.is_sustainable\n alt_sustainable = this.props?.alt_sustainable\n is_q_certified_arabica = this.props?.is_q_certified_arabica\n alt_q_certification_arabica = this.props?.alt_q_certification_arabica\n } else if (logos.length === undefined) {\n // Logos exists but is not an array, this is the old format\n fair_trade = logos?.fair_trade\n alt_fair_trade = logos?.alt_fair_trade\n is_organic = logos?.is_organic\n alt_organic = logos?.alt_organic\n only_vertuo_next = logos?.only_vertuo_next\n alt_vertuo_next = logos?.alt_vertuo_next\n is_rainforest = logos?.is_rainforest\n alt_rainforest = logos?.alt_rainforest\n is_sustainable = logos?.is_sustainable\n alt_sustainable = logos?.alt_sustainable\n is_q_certified_arabica = logos?.is_q_certified_arabica\n alt_q_certification_arabica = logos?.alt_q_certification_arabica\n } else if (logos.length) {\n logos_list = [...logos]\n }\n\n // here we fill logos with logos taken from individual props\n ;[\n [fair_trade, 'fair_trade', alt_fair_trade, logos_list],\n [is_organic, 'is_organic', alt_organic, logos_list],\n [only_vertuo_next, 'only_vertuo_next', alt_vertuo_next, logos_list],\n [is_rainforest, 'is_rainforest', alt_rainforest, logos_list],\n [is_sustainable, 'is_sustainable', alt_sustainable, logos_list],\n [\n is_q_certified_arabica,\n 'is_q_certified_arabica',\n alt_q_certification_arabica,\n logos_list\n ]\n ].forEach(param => this.appendLogo.apply(this, param))\n\n this.innerHTML = logos_list\n .map(logo => `<img src=\"${LOGO_IMG_MAP[logo.name]}\" alt=\"${logo.alt}\" loading=\"lazy\">`)\n .join('')\n }\n\n appendLogo(param, name, alt, list) {\n if (!!param && !this.hasLogo(list, name)) {\n list.push({ name, alt })\n }\n }\n\n hasLogo(logosList, logoName) {\n return logosList.some(logo => logo.name === logoName)\n }\n}\n\ncustomElements.get('nb-card-logos') || customElements.define('nb-card-logos', CardLogos)\n\nexport default CardLogos\n","import createProps from '@kissui/helpers/src/props.helpers'\n\nclass CardLabels extends HTMLElement {\n constructor() {\n super()\n this.props = {}\n this.labels = []\n }\n\n connectedCallback() {\n this.props = createProps(this.attributes)\n this.render()\n }\n\n render() {\n const { labels = [], direction = 'column' } = this.props\n this.classList.add(`${direction === 'row' ? 'direction-row' : 'direction-' + direction}`)\n\n if (labels.length === 0) {\n return ''\n }\n this.labels = labels\n\n this.innerHTML = `${this.renderLabels()}`\n }\n\n renderLabels() {\n return this.labels\n .map(label => {\n const { name = '', bgColor = '', color = '' } = label\n return `<mark class=\"t-3xs-500-caps-sl\"\n ${\n bgColor &&\n color &&\n `style=\"background: ${bgColor}; color: ${color}\"`\n }>\n <span>${name}</span>\n </mark>`\n })\n .join('')\n }\n}\n\ncustomElements.get('nb-card-labels') || customElements.define('nb-card-labels', CardLabels)\n\nexport default CardLabels\n","export const root = 'pn-ProductNav'\nexport const container = 'pn-ProductNavContents'\nexport const slidesContainer = 'pn-ProductContainer'\nexport const item = 'pn-ProductNavLinkWrapper'\nexport const next = 'pnAdvancerRight'\nexport const prev = 'pnAdvancerLeft'\nexport const pnIndicator = 'pn-ProductNavIndicator'\nexport const link_plp_category_padding_x = 10\nexport const TRANSITION_FAST = 300\n\nexport const colours = {\n 0: '#000000',\n 1: '#000000',\n 2: '#99813D',\n 3: '#40FEFF',\n 4: '#14CC99',\n 5: '#00BAFF',\n 6: '#0082B2',\n 7: '#B25D7A',\n 8: '#00FF17',\n 9: '#006B49',\n 10: '#00B27A',\n 11: '#996B3D',\n 12: '#CC7014',\n 13: '#40FF8C',\n 14: '#FF3400',\n 15: '#ECBB5E',\n 16: '#ECBB0C',\n 17: '#B9D912',\n 18: '#253A93',\n 19: '#125FB9'\n}\n","import * as constants from './constants'\nimport { colours, link_plp_category_padding_x, TRANSITION_FAST } from './constants'\nimport { makeId } from '@kissui/helpers/src/utils'\n\nclass SliderMenu {\n /**\n * @param {HTMLElement} element\n * @param {Object} options\n * @param {Number} [options.slidesToScroll=1] options.slidesToScroll of element do slide\n * @param {Number} [options.slidesVisible=1] options.slidesVisible of element to display\n * @param {Boolean} [options.navigationButton=true] options.navigationButton show navigation button\n */\n\n constructor(element, options = {}) {\n this.boundNextClick = this.onNextClick.bind(this)\n this.boundPrevClick = this.onPrevClick.bind(this)\n this.boundLinkClick = this.onLinkClick.bind(this)\n this.boundTouchEnd = this.onTouchEnd.bind(this)\n this.disableAutoScroll = options.disableAutoScroll === 'true' || false\n this._entriesBounds = null\n\n return new Promise(resolve => {\n this._element = element\n this._slides = [].slice.call(element.children)\n this._options = Object.assign(\n {},\n {\n id: 'uuid',\n last_known_scroll_position: 0,\n ticking: false,\n navBarTravelDirection: '',\n navBarTravelling: false,\n navBarTravelDistance: 150,\n scrollAmount: 220\n },\n options\n )\n\n this.buildIHM()\n resolve(this)\n\n // Wait for CSS animation before setting the indicator\n setTimeout(() => {\n this.setOverflowAttribute()\n this.initializeIndicatorPosition()\n }, 0)\n })\n }\n\n /**\n * @returns {HTMLElement}\n */\n get element() {\n return this._element\n }\n\n // MAIN BUILDER\n buildIHM() {\n this._root = this.createElement('nav', constants.root)\n this._container = this.createElement('ul', constants.container)\n this._pnIndicator = null\n this._containerSlidesContent = null\n\n if (this.hasContainer()) {\n this._containerSlidesContent = this.createElement('div', constants.slidesContainer)\n }\n\n this.wrapItems()\n this._root.appendChild(this._container)\n\n if (this._containerSlidesContent) {\n this._element.appendChild(this._containerSlidesContent)\n }\n\n // Insert the slider between Arrows for accessibility keyboard navigation\n this._element.insertBefore(this._root, this._element.childNodes[2])\n\n this.createIndicator()\n }\n\n hasContainer() {\n if (document.querySelector('.slider-container')) return true\n\n return false\n }\n\n wrapItems() {\n const keys = []\n this._slides.map(child => {\n const randId = makeId(5)\n\n if (this.hasContainer()) {\n if (child.classList.contains('slider-container')) {\n if (child.children) {\n if (child.children.length) {\n ;[...child.children].forEach((el, i) => {\n if (i !== 0) {\n el.style.display = 'none'\n }\n\n el.id = keys[i]\n\n this._containerSlidesContent.appendChild(el)\n })\n }\n }\n child.remove()\n }\n }\n\n if (!child.classList.contains('pn-Advancer')) {\n const item = this.createElement('div', constants.item)\n item.appendChild(child)\n item.setAttribute('data-inner-content-id', randId)\n keys.push(randId)\n\n this._container.appendChild(item)\n }\n })\n }\n\n createElement(tag, className) {\n let div = document.createElement(tag)\n div.setAttribute('class', className)\n return div\n }\n\n // COMPONENT ROOT \"ELEMENT\" COMPOSER\n createIndicator() {\n this.elements = []\n this._pnIndicator = this.createElement('div', constants.pnIndicator)\n this._container.appendChild(this._pnIndicator)\n\n this.elements = Array.from(this._container.querySelectorAll('nb-link a'))\n // Handle setting the currently active link\n this.elements.forEach(element => {\n element.addEventListener('click', this.boundLinkClick)\n })\n\n const pnAdvancerLeft = document.getElementById(`${constants.prev}-${this._options.id}`)\n if (pnAdvancerLeft) {\n pnAdvancerLeft.addEventListener('click', this.boundPrevClick)\n }\n\n const pnAdvancerRight = document.getElementById(`${constants.next}-${this._options.id}`)\n if (pnAdvancerRight) {\n pnAdvancerRight.addEventListener('click', this.boundNextClick)\n }\n\n if (this._root) {\n this._container.addEventListener('touchend', this.boundTouchEnd)\n }\n }\n\n onLinkClick(e) {\n this.goToElement(e.currentTarget)\n }\n\n goToSlide(index) {\n this.goToElement(this._slides[index])\n }\n\n showContent(id) {\n const slidesContainer = document.querySelector(`.${constants.slidesContainer}`)\n\n if (slidesContainer.children) {\n ;[...slidesContainer.children].forEach(el => (el.style.display = 'none'))\n }\n\n document.getElementById(id).style.display = 'block'\n }\n\n goToElement(element) {\n if (this.hasContainer()) {\n const contentId = element\n .closest('[data-inner-content-id]')\n .getAttribute('data-inner-content-id')\n\n this.showContent(contentId)\n }\n\n this.deselectAllLinkBut(element)\n element.setAttribute('aria-current', 'true')\n\n if (!element || !this._entriesBounds) {\n return\n }\n\n let distance = 0\n\n for (const entry of this._entriesBounds) {\n if (entry.target.getAttribute('data-href') === element.getAttribute('data-href')) {\n break\n } else {\n distance = distance + entry.boundingClientRect.width + link_plp_category_padding_x\n }\n }\n\n if (!this.disableAutoScroll) {\n this._root.scroll({ left: distance, behavior: 'smooth' })\n }\n }\n\n deselectAllLinkBut(element) {\n this.elements.forEach(el => {\n if (el !== element) {\n el.setAttribute('aria-current', 'false')\n }\n })\n }\n\n sideScroll(element, direction, speed, distance, step) {\n this.setOverflowAttribute()\n\n let scrollAmount = 0\n let slideTimer = setInterval(function () {\n if (direction === 'left') {\n element.scrollLeft -= step\n } else {\n element.scrollLeft += step\n }\n scrollAmount += step\n if (scrollAmount >= distance) {\n window.clearInterval(slideTimer)\n }\n }, speed)\n return { slideTimer }\n }\n\n onPrevClick() {\n this.sideScroll(this._root, 'left', 25, this._options.scrollAmount, 10)\n setTimeout(() => {\n this.setOverflowAttribute()\n }, TRANSITION_FAST)\n }\n\n onNextClick() {\n this.sideScroll(this._root, 'right', 25, this._options.scrollAmount, 10)\n setTimeout(() => {\n this.setOverflowAttribute()\n }, TRANSITION_FAST)\n }\n\n onTouchEnd() {\n this.setOverflowAttribute()\n }\n\n initializeIndicatorPosition() {\n const selected = this._root.querySelector('[aria-current=\"true\"]')\n\n // Set the indicator\n if (selected) {\n this.moveIndicator(selected, colours[0])\n }\n }\n\n determineOverflow(content, container) {\n let containerMetrics = container.getBoundingClientRect()\n let containerMetricsRight = Math.floor(containerMetrics.right)\n let containerMetricsLeft = Math.floor(containerMetrics.left)\n\n let contentMetrics = content.getBoundingClientRect()\n let contentMetricsRight = Math.floor(contentMetrics.right)\n let contentMetricsLeft = Math.floor(contentMetrics.left)\n\n if (\n containerMetricsLeft > contentMetricsLeft &&\n containerMetricsRight < contentMetricsRight\n ) {\n return 'both'\n } else if (contentMetricsLeft < containerMetricsLeft) {\n return 'left'\n } else if (contentMetricsRight > containerMetricsRight) {\n return 'right'\n } else {\n return 'none'\n }\n }\n\n moveIndicator(item, color) {\n if (!this._pnIndicator) {\n return\n }\n\n let textPosition = item.getBoundingClientRect()\n let container = this._container.getBoundingClientRect().left\n let distance = textPosition.left - container\n\n this._pnIndicator.style.transform =\n 'translateX(' +\n (distance + this._container.scrollLeft + link_plp_category_padding_x) +\n 'px) scaleX(' +\n (textPosition.width - link_plp_category_padding_x * 2) * 0.01 +\n ')'\n\n this._root.scrollLeft = Math.floor(\n distance + this._container.getBoundingClientRect().left / 2\n )\n\n if (color) {\n this._pnIndicator.style.backgroundColor = color\n }\n }\n\n onResize() {\n this.setOverflowAttribute()\n this.initializeIndicatorPosition()\n }\n\n clearListeners() {\n this.elements.forEach(element => {\n element.removeEventListener('click', this.boundLinkClick)\n })\n\n if (typeof document !== 'undefined') {\n const pnAdvancerLeft = document.getElementById(`${constants.prev}-${this._options.id}`)\n if (pnAdvancerLeft) {\n pnAdvancerLeft.removeEventListener('click', this.boundPrevClick)\n }\n\n const pnAdvancerRight = document.getElementById(`${constants.next}-${this._options.id}`)\n if (pnAdvancerRight) {\n pnAdvancerRight.removeEventListener('click', this.boundNextClick)\n }\n }\n }\n\n kill() {\n this.clearListeners()\n }\n\n setOverflowAttribute() {\n this._element.setAttribute(\n 'data-overflowing',\n this.determineOverflow(this._container, this._root)\n )\n\n this.observe()\n }\n\n observe() {\n if (!('IntersectionObserver' in window)) {\n return false\n }\n\n this._entriesBounds = []\n\n // Using IntersectionObserver to prevent reflow while getting boundingClientRect\n const observer = new IntersectionObserver(\n entries => {\n for (const entry of entries) {\n this._entriesBounds.push({\n target: entry.target,\n intersection:\n entry.boundingClientRect.right <=\n window.innerWidth - link_plp_category_padding_x &&\n entry.boundingClientRect.left >= link_plp_category_padding_x,\n boundingClientRect: entry.boundingClientRect\n })\n }\n\n observer.disconnect()\n },\n { root: this._container }\n )\n\n this._slides.map(element => observer.observe(element))\n }\n\n isInViewport(element) {\n if (!this._entriesBounds) {\n return false\n }\n\n const entry = this._entriesBounds.find(entryBound => element === entryBound.target)\n\n return entry.intersection\n }\n}\n\nexport default SliderMenu\n","import SliderMenuLib from './js/SliderMenuLib'\nimport { debounce, makeId } from '@kissui/helpers/src/utils'\nimport { dispatchEvent } from '@kissui/helpers/src/assets/js/eventDispatch'\nimport { customEvent, itemDisplay } from '@kissui/helpers/src/gtmEvents'\nimport { EVENT_SLIDE_CHANGE, EVENT_SLIDER_READY } from '@kissui/components'\n\nclass SliderMenu extends HTMLElement {\n constructor() {\n super()\n this.slot = this.innerHTML\n this.navBarTravelling = true\n this.disableAutoScroll = false\n this.navBarTravelDirection = ''\n this.navBarTravelDistance = 200\n this.randomId = null\n this.sliderMenu = null\n this.boundOnResize = this.onResize.bind(this)\n this.onLoad = this.onLoad.bind(this)\n this.debouncedOnResize = debounce(this.boundOnResize, 250)\n }\n\n static get observedAttributes() {\n return ['navBarTravelling', 'navBarTravelDirection', 'navBarTravelDistance']\n }\n\n render() {\n const navigation = this.getAttribute('navigation') === 'true' ? true : ''\n const a11y_slider_previous_button = this.getAttribute('a11y_slider_previous_button') || ''\n const a11y_slider_next_button = this.getAttribute('a11y_slider_next_button') || ''\n\n this.innerHTML = `\n <div id=\"pnProductNav-${this.randomId}\" class=\"pn-ProductNavWrapper ${this.randomId}\">\n ${\n navigation &&\n `<nb-cta id=\"pnAdvancerLeft-${this.randomId}\"\n class=\"pn-Advancer pn-AdvancerLeft\"\n variation=\"navigation\"\n contrast=\"highlight\"\n size=\"32\"\n icon_right=\"24/symbol/chevron-left\"\n label=\"${a11y_slider_previous_button}\"></nb-cta>`\n }\n ${this.slot}\n ${\n navigation &&\n `<nb-cta id=\"pnAdvancerRight-${this.randomId}\"\n class=\"pn-Advancer pn-AdvancerRight\"\n variation=\"navigation\"\n contrast=\"highlight\"\n size=\"32\"\n icon_right=\"24/symbol/chevron-right\"\n label=\"${a11y_slider_next_button}\"></nb-cta>`\n }\n <span id=\"pnIndicator-${this.randomId}\"\n class=\"pn-ProductNavIndicator\">\n </span>\n </div>\n\n `\n this.loadSwiper()\n }\n\n connectedCallback() {\n this.randomId = this.getAttribute('testId')\n ? this.getAttribute('testId')\n : `swiperMenu_${makeId(5)}`\n this.navBarTravelling = this.getAttribute('navBarTravelling') || this.navBarTravelling\n this.navBarTravelDirection =\n this.getAttribute('navBarTravelDirection') || this.navBarTravelDirection\n this.navBarTravelDistance =\n this.getAttribute('navBarTravelDistance') || this.navBarTravelDistance\n this.disableAutoScroll = this.getAttribute('disable_auto_scroll') || ''\n\n this.render()\n window.addEventListener('resize', this.debouncedOnResize)\n }\n\n loadSwiper() {\n let navBarTravelDirection = this.navBarTravelDirection\n let navBarTravelDistance = this.navBarTravelDistance\n\n this.sliderMenu = new SliderMenuLib(this.querySelector('.' + this.randomId), {\n id: this.randomId,\n index: this.index,\n navBarTravelDirection: navBarTravelDirection,\n navBarTravelDistance: navBarTravelDistance,\n disableAutoScroll: this.disableAutoScroll\n })\n\n this.sliderMenu.then(() => {\n this.classList.add('is-show')\n\n dispatchEvent({\n eventName: EVENT_SLIDER_READY,\n args: { className: this.randomId },\n element: this\n })\n })\n\n // Updates slider menu to follow semantics, accessibility\n const productNavLinkWrappers = document.querySelectorAll('.pn-ProductNavLinkWrapper')\n productNavLinkWrappers.forEach(div => {\n const li = document.createElement('li')\n li.classList.add('pn-ProductNavLinkWrapper')\n while (div.firstChild) {\n li.appendChild(div.firstChild)\n }\n div.parentNode.replaceChild(li, div)\n })\n }\n\n handleClick() {\n dispatchEvent({ eventName: EVENT_SLIDE_CHANGE })\n\n // GTM 'itemDisplay' event\n itemDisplay({ rootElement: ['nb-slider-menu'] })\n }\n\n onLoad() {\n this.sliderMenu.then(slider => slider.onLoad())\n }\n\n onResize() {\n this.sliderMenu.then(slider => slider.onResize())\n }\n\n onNavigationClick(e) {\n let name = ''\n\n if (\n e.target &&\n e.target.closest('.link') &&\n e.target.closest('.link').getAttribute('tracking_label')\n ) {\n name = e.target.closest('.link').getAttribute('tracking_label')\n }\n\n customEvent({ eventAction: 'PLP Content Tab', eventLabel: name })\n }\n\n disconnectedCallback() {\n window.removeEventListener('resize', this.debouncedOnResize)\n this.sliderMenu.then(slider => slider.kill())\n }\n}\n\ncustomElements.get('nb-slider-menu') || customElements.define('nb-slider-menu', SliderMenu)\n\nexport default SliderMenu\n","import createProps from '@kissui/helpers/src/props.helpers'\nimport viewportHelper from '@kissui/helpers/src/viewport.helpers'\nimport { makeId, setAttributes, convertToCamelCase } from '@kissui/helpers/src/utils'\nimport { isSafari } from '@kissui/helpers/src/useragent.helpers'\nimport { CONTRAST_LIGHT } from '@kissui/components'\nimport { getOppositeContrast } from '@kissui/helpers/src/contrast.helpers'\nimport { dispatchEvent } from '@kissui/helpers/src/assets/js/eventDispatch'\nimport { BROWSER_CONTEXT, EVENT_SLIDER_READY } from '../constants.mjs'\n\nconst MAX_LOOP_TO_INIT = 50 // max 5 seconds\n\nclass SliderNatural extends HTMLElement {\n constructor() {\n super()\n // Default options\n this.contrast = CONTRAST_LIGHT\n this.defaultPosition = 0\n this.displayButtons = true\n this.displayNav = true\n this.displayCounter = false\n this.displayGradients = false\n this.itemsPerSlide = 1\n this.overflow = true\n this.overflowOpacity = 0.25\n this.flexAuto = false\n // Events\n this.boundPrevClick = this.#onPrevClick.bind(this)\n this.boundNextClick = this.#onNextClick.bind(this)\n this.boundNavClick = this.#onNavClick.bind(this)\n this.boundScroll = this.#onScroll.bind(this)\n }\n\n connectedCallback() {\n this.slot = this.innerHTML\n this.props = createProps(this.attributes)\n this.#render()\n\n // We need an id for event dispatcher\n if (!this.id || this.id === 'undefined') {\n this.id = this.props.testId ? this.props.testId : `slider_natural_${makeId(5)}`\n }\n\n this.#setProperties()\n\n this.loops = 0\n this.#waitForSliderToBeSized()\n .then(() => {\n this.initSlider()\n this.#dispatchReady()\n })\n .catch(e => {\n console.error(e)\n })\n .finally(() => {\n if (this.wait) {\n clearInterval(this.wait)\n this.wait = null\n }\n })\n }\n\n #waitForSliderToBeSized() {\n return new Promise((resolve, reject) => {\n this.wait = setInterval(() => {\n if (this.carousel.offsetWidth > 0) {\n return resolve()\n }\n\n this.loops += 1\n if (this.loops === MAX_LOOP_TO_INIT) {\n return reject(\n 'Error: slider width is ZERO even after 5s, cannot finish slider init'\n )\n }\n }, 100)\n })\n }\n\n #set(key, value) {\n const normalisedValue = this.#getOption(value)\n if (normalisedValue !== undefined) {\n this[convertToCamelCase(key)] = normalisedValue\n }\n }\n\n #getOption(value) {\n if (!isNaN(value)) {\n return parseFloat(value)\n } else if (value === 'true') {\n return true\n } else if (value === 'false') {\n return false\n } else {\n return value\n }\n }\n\n #setProperties() {\n const { options, a11y_labels } = this.props\n\n // Create refs to html elements\n this.container = this.querySelector('.container')\n this.wrapper = this.querySelector('.wrapper')\n this.carousel = this.querySelector('ul')\n\n // Set slider properties\n this.currentIndex = 0\n this.a11y_labels = a11y_labels\n if (viewportHelper.is.mobile) {\n this.options = options.mobile\n } else if (viewportHelper.is.tablet) {\n this.options = options.tablet\n } else {\n this.options = options.desktop\n }\n\n // Set options\n for (const property in this.options) {\n this.#set(property, this.options[property])\n }\n\n // If counter is displayed we force buttons and pagination to false\n if (this.displayCounter) {\n this.displayNav = this.displayButtons = false\n }\n\n // Overflow needs a class\n if (this.overflow) {\n this.container.classList.add('overflow')\n }\n\n // Contrast needs an attribute\n this.buttonsContrast = getOppositeContrast(this.contrast)\n this.setAttribute('contrast', this.contrast)\n\n // Set CSS properties for non dynamic options\n this.#setCssSlideMinHeight()\n this.#setCssSliderGap()\n this.#setCssPlaceholder()\n }\n\n /** Public Method **/\n initSlider() {\n // Get an updated number of items (if async we run again)\n this.slidesElements = this.querySelectorAll('.nn-carousel > li:not(.safari-fix)')\n this.itemNumber = this.slidesElements.length\n\n // For asynchronous initSlider() we need to reset first itemWidth and itemPerSlide to get the original values before other calculations\n this.#set('item_width', this.options['item_width'])\n this.#set('items_per_slide', this.options['items_per_slide'])\n\n // If itemsPerSlide is 'auto' we need to calculate it's real value based on itemWidth or scrollWidth / itemNumber\n // We also need to set the CSS --item-width variable to handle the calculation correctly\n if (this.itemsPerSlide === 'auto') {\n this.#calculateItemsPerSlide()\n }\n this.#setCssSlideWidth()\n this.#setCssItemsPerSlide()\n this.#setCssFlexAuto()\n\n // Other properties that can be set only after the rest\n this.maxSlides = this.itemNumber - this.itemsPerSlide\n\n // Finish rendering\n this.#renderButtons()\n this.#renderNav()\n this.#renderCounter()\n this.#renderGradients()\n\n // Init methods in this order !\n this.#applyCenteredLayout()\n this.#getSliderPositions()\n this.#getOpacityParams()\n this.#setOpacity()\n this.#updateStates()\n this.#bindEvent()\n this.#gotoDefaultPosition()\n\n // Render this safariFix at the end because we don't want the extra li to be considered in sliderElements\n this.#renderSafariFix()\n }\n\n #render() {\n this.innerHTML = `<div class=\"container\"><div class=\"wrapper\"><ul class=\"nn-carousel\">${this.slot}</ul></div></div>`\n }\n\n #renderButtons() {\n // Important: if maxSlides <= 0 it means we don't have scroll, so we don't need buttons\n const hasNoButton = !this.displayButtons || this.maxSlides <= 0\n if (hasNoButton) {\n // Needed if we reinit\n if (this.prevButton && this.nextButton) {\n this.prevButton.remove()\n this.nextButton.remove()\n }\n return\n }\n\n // Check if button exists already (for async content in order to avoid creating two occurrences)\n if (!this.prevButton) {\n this.prevButton = this.#renderButton('prev')\n }\n if (!this.nextButton) {\n this.nextButton = this.#renderButton('next')\n }\n }\n\n #renderButton(pos, renderInCounter = false) {\n const { creative = '', id = '', name = '', position = '' } = this.props.campaign ?? {}\n const buttonContrast = renderInCounter ? this.contrast : this.buttonsContrast\n const isPrev = pos === 'prev'\n\n const buttonEl = document.createElement('nb-cta')\n buttonEl.classList.add(pos)\n setAttributes(buttonEl, {\n variation: 'navigation',\n contrast: buttonContrast,\n size: '48',\n icon_right: isPrev ? '24/symbol/chevron-left' : '24/symbol/chevron-right',\n label: this.a11y_labels[pos],\n campaign_creative: creative,\n campaign_id: id,\n campaign_name: name,\n campaign_position: position\n })\n if (!renderInCounter) {\n isPrev ? this.container.prepend(buttonEl) : this.container.append(buttonEl)\n } else {\n isPrev ? this.counter.prepend(buttonEl) : this.counter.append(buttonEl)\n }\n return buttonEl\n }\n\n #renderNav() {\n if (!this.displayNav || this.maxSlides === 0) {\n // Needed if we reinit\n if (this.nav) {\n this.nav.remove()\n }\n return\n }\n\n // Check if nav exists already (for async content in order to avoid creating two occurrences)\n if (this.nav) {\n this.nav.remove()\n }\n\n const nav = document.createElement('nav')\n\n let bullets = ''\n for (let i = 0; i <= this.maxSlides; i++) {\n bullets += this.#renderBullet(i)\n }\n\n nav.innerHTML = `${bullets}`\n\n this.appendChild(nav)\n this.nav = this.querySelector('nav')\n this.navElements = this.querySelectorAll('nav button')\n }\n\n #renderBullet(index) {\n return `<button data-item='${index}' aria-label='${this.a11y_labels.nav} ${index}'><span></span></button>`\n }\n\n #renderCounter() {\n if (!this.displayCounter || this.maxSlides === 0) {\n // Needed if we reinit\n if (this.counter) {\n this.counter.remove()\n }\n return\n }\n\n // Check if counter exists already (for async content in order to avoid creating two occurrences)\n if (this.counter) {\n this.counter.remove()\n }\n\n this.counter = document.createElement('div')\n this.counter.classList.add('counter')\n this.counter.classList.add('t-sm-500')\n this.counter.setAttribute('aria-hidden', 'true')\n\n this.counter.innerHTML = `<span class='current'>${this.currentIndex + 1}</span>\n <span>/</span>\n <span>${this.maxSlides + 1}</span>`\n\n this.prevButton = this.#renderButton('prev', true)\n this.nextButton = this.#renderButton('next', true)\n\n this.appendChild(this.counter)\n }\n\n #renderGradients() {\n if (!this.displayGradients || this.overflow) {\n return\n }\n\n if (this.gradientsWidth) {\n this.#setCss('--gradients-width', this.gradientsWidth, true)\n }\n\n if (this.gradientsColor) {\n this.#setCss('--gradients-color', this.gradientsColor)\n this.#setCss('--gradients-color-transparent', this.gradientsColor + '00')\n }\n\n this.container.classList.add('hasGradients')\n }\n\n #renderSafariFix() {\n // In safari, both Desktop and iOS, the scroll doesn't reach the end, because the scroll-padding on the right side seems to not been taken into account\n // Same bug is happening in Chrome on iOS (seems to use Safari webkit rendering)\n // The fix is to render an extra <li> with the size equal to the scroll-padding\n if (!this.overflow || !isSafari()) {\n return\n }\n\n // Check if safariFix exists already (for async content in order to avoid creating two occurences)\n if (!this.safariFix) {\n this.safariFix = document.createElement('li')\n this.safariFix.classList.add('safari-fix')\n this.safariFix.setAttribute('aria-hidden', true)\n this.carousel.appendChild(this.safariFix)\n }\n\n const safariFixWidth = (this.paddingCorrection - this.sliderGap) / BROWSER_CONTEXT\n this.safariFix.style.setProperty('width', safariFixWidth + 'rem')\n }\n\n #calculateItemsPerSlide() {\n // For asynchronous slider content, if initSlider() is called twice, we need to remove first this class\n this.carousel.classList.remove('no-slides')\n\n let itemWidth = this.itemWidth\n\n // If itemWidth is not provided or 'auto', we need to calculate an average width for items that doesn't have fixed width\n if (this.itemWidth === undefined || this.itemWidth === 'auto') {\n itemWidth =\n (this.carousel.scrollWidth - this.sliderGap * (this.itemNumber - 1)) /\n this.itemNumber\n }\n\n this.itemsPerSlide = Math.floor(this.carousel.offsetWidth / itemWidth)\n // TODO: the fix below doesn't work, needs to be resolved.\n // const isLastElementSingle =\n // this.slidesElements[this.slidesElements.length - 2].offsetWidth +\n // this.slidesElements[this.slidesElements.length - 1].offsetWidth >\n // this.carousel.offsetWidth\n\n // this.itemsPerSlide = isLastElementSingle\n // ? 0\n // : Math.floor(this.carousel.offsetWidth / itemWidth)\n }\n\n #getSliderPositions() {\n this.sliderPositions = []\n this.maxScroll = this.carousel.scrollWidth - this.carousel.offsetWidth\n\n if (this.slidesElements.length === 0) {\n return\n }\n\n // We need to manage the first item initial position in case the slides are\n // visible on each side (equivalent to scroll-padding CSS of ul.nn-carousel)\n const firstItemOffsetLeft = this.slidesElements[0].offsetLeft\n\n this.querySelectorAll('.nn-carousel > li:not(.safari-fix)').forEach(element => {\n this.sliderPositions.push(element.offsetLeft - firstItemOffsetLeft)\n })\n }\n\n #setCss(name, value, isRem = false) {\n this.style.setProperty(name, isRem ? value / BROWSER_CONTEXT + 'rem' : value)\n }\n\n #setCssSlideWidth() {\n if (this.itemWidth === 'auto') {\n const itemWidthAuto =\n (this.container.clientWidth - (this.itemsPerSlide - 1) * this.sliderGap) /\n (this.itemsPerSlide || 1)\n this.#setCss('--item-width', itemWidthAuto, true)\n } else if (this.itemWidth) {\n this.#setCss('--item-width', this.itemWidth, true)\n }\n }\n\n #setCssSlideMinHeight() {\n if (this.slideMinHeight === 'auto') {\n this.#setCss('--slide-min-height', 'auto')\n } else if (this.slideMinHeight !== undefined) {\n this.#setCss('--slide-min-height', this.slideMinHeight, true)\n }\n }\n\n #setCssSliderGap() {\n if (this.sliderGap || this.sliderGap === 0) {\n this.#setCss('--slider-gap', this.sliderGap, true)\n }\n }\n\n #setCssFlexAuto() {\n if (this.flexAuto) {\n this.carousel.classList.add('flex-auto')\n }\n }\n\n #setCssPlaceholder() {\n if (this.placeholderBackground) {\n this.#setCss('--placeholder-background', this.placeholderBackground)\n }\n }\n\n #setCssItemsPerSlide() {\n this.#setCss('--items-per-slide', this.itemsPerSlide)\n }\n\n #applyCenteredLayout() {\n if (this.maxSlides > 0) {\n return\n }\n // If maxSlides is 0 or negative, it means that we have less items than needed to fulfill the carousel width\n // So to center the items (for example the bubbles when only 3) we need to apply a justify-content: center fix\n this.carousel.classList.add('no-slides')\n }\n\n /** Public Method **/\n updateSlider(index, instantly = false) {\n this.#getSliderPositions()\n this.goToSlide(parseInt(index), instantly)\n }\n\n #updateStates() {\n this.#setActiveButtons()\n this.#setActiveBullet()\n this.#setCounter()\n this.#setActiveSlides()\n }\n\n #updateStatesScroll(index) {\n this.#setActiveButtons(index)\n this.#setCounter()\n }\n\n #setActiveButtons(currentIndex) {\n if ((!this.displayButtons || this.maxSlides <= 0) && !this.displayCounter) {\n return\n }\n\n // First we remove all hide classes (because with pagination we can move from more than 2 slides)\n this.prevButton.classList.remove('hide')\n this.nextButton.classList.remove('hide')\n\n // Then we reset hide class on the right button\n if (this.currentIndex === 0) {\n this.prevButton.classList.add('hide')\n } else if (this.currentIndex === this.maxSlides || currentIndex === this.maxSlides) {\n this.nextButton.classList.add('hide')\n }\n }\n\n #setActiveBullet() {\n if (!this.displayNav || this.maxSlides <= 0) {\n return\n }\n\n this.navElements.forEach(item => {\n item.classList.remove('active')\n })\n\n this.navElements[this.currentIndex].classList.add('active')\n }\n\n #setCounter() {\n if (!this.displayCounter || this.maxSlides === 0) {\n return\n }\n\n if (!this.displayCounter) {\n return\n }\n\n this.counter.querySelector('.current').textContent = parseInt(this.currentIndex + 1)\n }\n\n #setActiveSlides() {\n // If we have no items overflowing on each side, we don't need to manage disabled slides\n if (!this.overflow) {\n return\n }\n\n this.slidesElements.forEach(element => {\n element.setAttribute('aria-disabled', 'true')\n })\n\n let tempIndex = parseInt(this.currentIndex)\n for (let i = 0; i < this.itemsPerSlide; i++) {\n if (this.slidesElements[tempIndex + i]) {\n this.slidesElements[tempIndex + i].removeAttribute('aria-disabled')\n }\n }\n }\n\n /** Public Method **/\n goToSlide(index, instantly = false) {\n if (index !== undefined) {\n this.currentIndex = index\n }\n\n // If index is over maxSlides, it means we reached out the end of scroll, so we don't need to update states anymore\n if (index < this.maxSlides) {\n this.#updateStates()\n }\n\n // We scroll to the right position (scrollTo duration is approx 750ms)\n this.carousel.scrollTo({\n left: this.sliderPositions[parseInt(this.currentIndex, 10)],\n behavior: instantly ? 'auto' : 'smooth'\n })\n }\n\n #gotoDefaultPosition() {\n if (this.defaultPosition === 0 || this.defaultPosition > this.maxSlides + 1) {\n return\n }\n this.goToSlide(this.defaultPosition, true)\n }\n\n #onScroll() {\n // Clear our timeout throughout the scroll\n if (this.isScrolling) {\n clearTimeout(this.isScrolling)\n }\n\n this.#setOpacity()\n\n // Set a timeout to run after scrolling ends\n this.isScrolling = setTimeout(() => {\n // Update the expected scroll positions again as sometimes they are initially incorrect\n this.#getSliderPositions()\n\n const carouselScrollLeft = Math.round(this.carousel.scrollLeft)\n\n // Ideal use case (exact pixel value)\n let index = this.sliderPositions.indexOf(carouselScrollLeft)\n\n // Sometimes the scrollLeft value can be +1 or -1 pixels. If the position is not found\n // then the index will be -1. In this case, try searching the list of positions to see\n // if the scroll position is one pixel left or right of the expected position (hence\n // using -1 and +1 in the indexOf() call below)\n if (index === -1) {\n index = this.sliderPositions.indexOf(carouselScrollLeft - 1)\n }\n if (index === -1) {\n index = this.sliderPositions.indexOf(carouselScrollLeft + 1)\n }\n\n // For items with flexible width (flex_auto) the last position of the scroll can not match an exact SliderPositions\n if (carouselScrollLeft === this.maxScroll) {\n index = this.maxSlides\n }\n\n if (index >= 0) {\n this.#switchBullets(index, true)\n }\n\n this.#updateStatesScroll(index)\n }, 100)\n }\n\n #getOpacityParams() {\n if (!this.overflow || !this.slidesElements.length) {\n return\n }\n // Set properties used for slide opacity calculation in #setOpacity()\n this.paddingCorrection = parseInt(\n getComputedStyle(this.carousel).getPropertyValue('padding-left')\n )\n\n this.itemWidthAdjusted = this.slidesElements[0].offsetWidth + this.sliderGap\n }\n\n #setOpacity() {\n if (!this.overflow) {\n return\n }\n const scrollX = this.carousel.scrollLeft\n\n this.slidesElements.forEach((item, index) => {\n // Adjust item offsetLeft because of slider padding on each side\n const itemOffsetLeft = item.offsetLeft - this.paddingCorrection\n // Adjust item offsetLeft to add itemWidth + sliderGap\n let itemX = itemOffsetLeft + this.itemWidthAdjusted\n\n // Determine if we need to calculate left or right items\n let percentage = 100\n\n if (scrollX > itemX) {\n // Avoid calculation if item is outside on left\n percentage = 0\n } else if (scrollX >= this.itemWidthAdjusted * index) {\n // Do left calculations\n percentage = Math.round(((itemX - scrollX) / this.itemWidthAdjusted) * 100)\n } else if (scrollX < itemX - (1 + this.itemsPerSlide) * this.itemWidthAdjusted) {\n // Avoid calculation if item is outside on right\n percentage = 0\n } else if (scrollX <= itemX - this.itemsPerSlide * this.itemWidthAdjusted) {\n // Do right calculations\n percentage = Math.round(\n (this.itemsPerSlide + 1) * 100 -\n ((itemX - scrollX) / this.itemWidthAdjusted) * 100\n )\n }\n\n const opacityPercentage = percentage / 100\n let finalOpacity =\n Math.round(\n (opacityPercentage * (1 - this.overflowOpacity) + this.overflowOpacity) * 100\n ) / 100\n\n item.firstElementChild.style.setProperty('opacity', finalOpacity)\n })\n }\n\n #switchBullets(index, alreadyScrolled = false) {\n if (!this.slidesElements[index]) {\n return\n }\n\n this.currentIndex = index\n\n // only fires goToSlide if user clicks on pagination buttons\n if (!alreadyScrolled) {\n this.goToSlide()\n } else {\n this.#updateStates()\n }\n }\n\n #onPrevClick() {\n if (this.currentIndex > 0) {\n this.currentIndex = this.currentIndex - 1\n this.#updateStates()\n }\n this.goToSlide()\n }\n\n #onNextClick() {\n if (this.currentIndex < this.maxSlides) {\n this.currentIndex = this.currentIndex + 1\n this.#updateStates()\n }\n this.goToSlide()\n }\n\n #onNavClick(e) {\n this.currentIndex = parseInt(e.target.dataset.item)\n this.#setActiveBullet()\n this.#switchBullets(this.currentIndex)\n }\n\n #dispatchReady() {\n dispatchEvent({\n eventName: EVENT_SLIDER_READY,\n args: { id: this.id },\n element: this\n })\n }\n\n #bindEvent() {\n this.#unbindEvent()\n\n this.carousel.addEventListener('scroll', this.boundScroll)\n if (this.prevButton) {\n this.prevButton.addEventListener('click', this.boundPrevClick)\n }\n if (this.nextButton) {\n this.nextButton.addEventListener('click', this.boundNextClick)\n }\n if (this.navElements) {\n this.navElements.forEach(element => {\n element.addEventListener('click', this.boundNavClick)\n })\n }\n }\n\n #unbindEvent() {\n this.carousel.removeEventListener('scroll', this.boundScroll)\n if (this.prevButton) {\n this.prevButton.removeEventListener('click', this.boundPrevClick)\n }\n if (this.nextButton) {\n this.nextButton.removeEventListener('click', this.boundNextClick)\n }\n if (this.navElements) {\n this.navElements.forEach(element => {\n element.removeEventListener('click', this.boundNavClick)\n })\n }\n }\n\n disconnectedCallback() {\n this.#unbindEvent()\n }\n}\n\ncustomElements.get('nb-slider-natural') || customElements.define('nb-slider-natural', SliderNatural)\n\nexport default SliderNatural\n","import { CONTRAST_DARK, CONTRAST_LIGHT } from '@kissui/components'\n\nexport const getOppositeContrast = contrast => {\n return contrast === CONTRAST_LIGHT ? CONTRAST_DARK : CONTRAST_LIGHT\n}\n","export const isIOS = () => {\n const agent = window.navigator.userAgent,\n start = agent.indexOf('OS ')\n return (agent.indexOf('iPhone') > -1 || agent.indexOf('iPad') > -1) && start > -1\n}\n\nexport const isMacOS = () => {\n const agent = window.navigator.userAgent,\n start = agent.indexOf('OS ')\n return agent.indexOf('Mac') > -1 && start > -1\n}\n\nexport const isApple = () => {\n const agent = window.navigator.userAgent,\n start = agent.indexOf('OS ')\n return (\n (agent.indexOf('iPhone') > -1 || agent.indexOf('iPad') > -1 || agent.indexOf('Mac') > -1) &&\n start > -1\n )\n}\n\nexport const isAndroid = () => {\n const agent = window.navigator.userAgent,\n start = agent.indexOf('Android ')\n return start > -1\n}\n\nexport const isHuawei = () => {\n const agent = window.navigator.userAgent,\n start = agent.indexOf('HUAWEI'),\n devices = navigator.userAgent.match(\n /ALP-|AMN-|ANA-|ANE-|ANG-|AQM-|ARS-|ART-|ATU-|BAC-|BLA-|BRQ-|CAG-|CAM-|CAN-|CAZ-|CDL-|CDY-|CLT-|CRO-|CUN-|DIG-|DRA-|DUA-|DUB-|DVC-|ELE-|ELS-|EML-|EVA-|EVR-|FIG-|FLA-|FRL-|GLK-|HMA-|HW-|HWI-|INE-|JAT-|JEF-|JER-|JKM-|JNY-|JSC-|LDN-|LIO-|LON-|LUA-|LYA-|LYO-|MAR-|MED-|MHA-|MLA-|MRD-|MYA-|NCE-|NEO-|NOH-|NOP-|OCE-|PAR-|PIC-|POT-|PPA-|PRA-|RNE-|SEA-|SLA-|SNE-|SPN-|STK-|TAH-|TAS-|TET-|TRT-|VCE-|VIE-|VKY-|VNS-|VOG-|VTR-|WAS-|WKG-|WLZ-|YAL/i\n )\n return start > -1 || devices !== null\n}\n\nexport const isSafari = () => {\n // https://stackoverflow.com/questions/7944460/detect-safari-browser\n // This includes Chrome on IOS which seems to be Safari, So it's fully OK !\n const agent = window.navigator.userAgent\n return /^((?!chrome|android).)*safari/i.test(agent)\n}\n\nexport const isWebInspector = () => {\n // https://stackoverflow.com/questions/19877924/what-is-the-list-of-possible-values-for-navigator-platform-as-of-today\n // If we are in a web inspector, in our Nespresso context platform can be MacIntel or eventually Win32 for windows users\n const platform = window.navigator.platform\n return platform.indexOf('MacIntel') > -1 || platform.indexOf('Win32') > -1\n}\n","const createRefs = component => [...component.querySelectorAll('[data-ref]')].reduce(extract, {})\n\nconst extract = (refs, $ref) => {\n const { ref } = $ref.dataset\n\n // Check if ref is of type array\n const refArray = ref.match(/(\\w+)\\[(.+)\\]/)\n\n if (refArray !== null) {\n return getRefArray(refs, $ref, refArray)\n } else {\n return { ...refs, [$ref.dataset.ref]: $ref }\n }\n}\n\nconst getRefArray = (refs, $ref, [, name, index]) => {\n if (refs[name] === undefined) {\n refs[name] = []\n }\n refs[name][index] = $ref\n return refs\n}\n\nexport default createRefs\n","import viewportHelper from './viewport.helpers'\n\n/**\n * Resize image on the fly by Akamai\n * https://dsu-confluence.nestle.biz/x/06kaCQ\n * https://dsu-confluence.nestle.biz/display/EUXUI/Performance?preview=/152742355/152761429/IMPoliciesExtract-31072020.docx\n * @param {''|'carouselBannerNarrowMedium'|'carouselBannerWide'|'horizontalBannerNarrow'|'landscapeRecipeDetails'|'large'|'medium'|'portraitRecipeDetails'|'productPdpMainDefault'|'productPdpMain'|'productPdpSafeZone'|'product'|'recipeCard'|'registrationTechChoiceMediumLarge'|'resize_crop'|'small'} policy - IM Policy coming from Akamaï\n * @param {24|150|320|640|1024|2048|5000} width - IM Width size of the image\n * @returns {string} - Rules apply in a query string parameter\n */\nexport const getImpolicy = (policy = 'product', width = 160) => {\n const rules = []\n\n if (policy) {\n rules.push(`impolicy=${policy}`)\n }\n\n if (width) {\n rules.push(`imwidth=${width}`)\n }\n\n return `?${rules.join('&')}`\n}\n\n/**\n * Ask the right resolution depending on breakpoint, returns the closest one\n * No need to give a retina resolution, Akamai will return Retina automatically (you need to give the normal resolution)\n * @param {''|'medium'} policy - IM Policy coming from Akamaï, default is medium because it have the largest batch of resolutions\n * @param {''|'375'} mobileWidth - Mobile image width to be served | 375 default is full mobile screen width\n * @param {''|'1024'} tabletWidth - Tablet image width to be served | 1024 default is full tablet landscape screen width\n * @param {''|'1920'} desktopWidth - Desktop image width to be served | 1024 default is full tablet landscape screen width\n * @returns {string} - Rules to concatenate to your image url\n */\nexport const getResponsiveImpolicy = (\n policy = 'medium',\n mobileWidth = '375',\n tabletWidth = '1024',\n desktopWidth = '1920',\n retinaWidth = '3840'\n) => {\n if (viewportHelper.is.mobile) {\n return getImpolicy(policy, mobileWidth)\n } else if (viewportHelper.is.tablet) {\n return getImpolicy(policy, tabletWidth)\n } else if (viewportHelper.is.desktop) {\n return getImpolicy(policy, desktopWidth)\n } else {\n return getImpolicy(policy, retinaWidth)\n }\n}\n","export const STATE_DEFAULT = 'default'\nexport const STATE_SELECTED = 'selected'\nexport const STATE_DISABLED = 'disabled'\n","import createProps from '@kissui/helpers/src/props.helpers'\nimport createRefs from '@kissui/helpers/src/refs.helpers'\nimport { lazyLoad, getHashLink } from '@kissui/helpers/src/utils'\nimport { getResponsiveImpolicy } from '@kissui/helpers/src/impolicy'\nimport { selectPromotion } from '@kissui/helpers/src/gtmEvents'\n\nimport { STATE_SELECTED, STATE_DISABLED } from './js/constants'\n\nclass Bubble extends HTMLElement {\n constructor() {\n super()\n this.classList.add('nb-bubble')\n }\n\n static get observedAttributes() {\n return ['state']\n }\n\n attributeChangedCallback(name) {\n if (name === 'state') {\n this.setState()\n }\n }\n\n connectedCallback() {\n this.props = createProps(this.attributes)\n this.render()\n this.refs = createRefs(this)\n this.initLazyLoad()\n this.initTracking()\n }\n\n initTracking() {\n const { label, campaign } = this.props\n\n const link = this.querySelector('a')\n\n if (link) {\n link.onclick = () => {\n selectPromotion({\n cta_name: label,\n ...campaign\n })\n }\n }\n }\n\n initLazyLoad() {\n let { src = '', src_retina = '' } = this.props.visual\n const { visual } = this.refs\n\n // If src_retina is not provided by markets, then takes the src as default\n if (src_retina === '') {\n src_retina = src\n }\n\n src_retina += getResponsiveImpolicy('small', '144', '160', '80', '160')\n src_retina += '&imdensity=1'\n\n if (visual && src_retina) {\n lazyLoad(visual, 'src', `${src_retina}`, src_retina)\n }\n }\n\n render() {\n const { label, link, state, a11y_scrollto = 'Scroll to' } = this.props\n const { linkNoHash, linkHash } = getHashLink(link)\n\n this.innerHTML = `\n ${\n state === STATE_DISABLED\n ? this.renderVisual()\n : `<a href=\"${linkHash}\" data-href=\"${linkNoHash}\" aria-label='${a11y_scrollto} ${label}'>\n ${this.renderVisual()}\n </a>`\n }\n\n ${this.renderLabel()}\n `\n\n this.link = this.querySelector('a')\n this.label = this.querySelector('span')\n state && this.setAttribute('state', state)\n this.setTheme()\n }\n\n setState() {\n const state = this.getAttribute('state')\n\n if (state === STATE_SELECTED) {\n this.link.setAttribute('aria-current', 'true')\n this.label.classList.add('t-xs-700-sl')\n this.label.classList.remove('t-xs-500-sl')\n } else {\n if (state !== STATE_DISABLED) {\n this.link.removeAttribute('aria-current')\n }\n\n this.label.classList.remove('t-xs-700-sl')\n this.label.classList.add('t-xs-500-sl')\n }\n }\n\n setTheme() {\n const { theme } = this.props\n\n if (theme && theme !== '') {\n this.style.setProperty('--placeholder-background', theme)\n }\n }\n\n renderVisual() {\n let { src = '', src_retina = '' } = this.props.visual\n const { state } = this.props\n\n if (src === '' && src_retina === '') {\n return ''\n }\n\n // Image is decorative, we can have alt=\"\" and aria-hidden should be true\n return `<img src=\"\" alt=\"\" aria-hidden=\"true\" data-ref=\"visual\" ${\n state === STATE_DISABLED ? 'class=\"is-disabled\"' : ''\n }/>`\n }\n\n renderLabel() {\n const { label, state } = this.props\n\n if (!label) {\n return\n }\n\n return `<span class=\"t-xs-500-sl ${\n state === STATE_DISABLED ? 'is-disabled' : ''\n }\">${label}</span>`\n }\n}\n\ncustomElements.get('nb-bubble') || customElements.define('nb-bubble', Bubble)\n\nexport default Bubble\n","/**\n * @typedef {Object} ObserverItem\n * @property {String} selector - target element selector\n * @property {Object} options - IntersectionObserver options\n * @property {Function} callback - function to call on threshold crossed\n */\n\nclass IntersectionObserverService {\n constructor() {\n this.observers = new Map()\n }\n\n /**\n * Creates a Map of ObserverItem objects, unique for each selector provided.\n * Each selector has its own configurable observer, target elements and callback.\n * Observers can be individually unobserved / destroyed.\n * @param {ObserverItem[]} observables\n */\n create(observables) {\n observables.forEach(({ selector, callback, options }) => {\n if (this.observers.has(selector)) {\n console.warn(`Observer for selector \"${selector}\" already exists`)\n return\n }\n\n const targets = document.querySelectorAll(selector)\n\n if (targets.length === 0) {\n console.warn(`No elements found for selector \"${selector}\"`)\n return\n }\n\n const observer = new IntersectionObserver(callback, options)\n targets.forEach(element => observer.observe(element))\n this.observers.set(selector, { observer, targets })\n })\n }\n\n /**\n * Unobserve for specified selector\n * @param {String} selector\n */\n unobserve(selector) {\n const entry = this.observers.get(selector)\n\n if (entry) {\n const { observer, targets } = entry\n targets.forEach(element => observer.unobserve(element))\n } else {\n console.warn(`No observer found for selector \"${selector}\"`)\n }\n }\n\n /**\n * Disconnect observer for specified selector\n * @param {String} selector\n */\n destroy(selector) {\n const entry = this.observers.get(selector)\n\n if (entry) {\n const { observer } = entry\n observer.disconnect()\n this.observers.delete(selector)\n } else {\n console.warn(`No observer found for selector \"${selector}\"`)\n }\n }\n\n /**\n * Disconnect all observers\n */\n destroyAll() {\n this.observers.forEach(entry => {\n entry.observer.disconnect()\n })\n\n this.observers.clear()\n }\n}\n\nexport default IntersectionObserverService\n","export default class Deferred {\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.reject = reject\n this.resolve = resolve\n })\n }\n}\n","import Deferred from './deferred'\n\nconst resolveScrollPosition = (scrollTo: HTMLElement | string | number, scrollPaddingTop = 140) => {\n if (typeof scrollTo === \"number\") {\n return scrollTo\n }\n\n const scrollToElement = typeof scrollTo === \"object\" ? scrollTo : document.querySelector(scrollTo)\n\n if (scrollToElement === null && typeof scrollTo === \"string\") {\n throw new Error(`error: No element found with the selector \"${scrollTo}\"`)\n }\n\n return window.scrollY + scrollToElement!.getBoundingClientRect().top - scrollPaddingTop\n}\n\nconst resolveScrollDuration = (scrollDuration: number, deltaScroll: number) => {\n const viewportHeight = window.innerHeight\n const bodyHeight = document.body.clientHeight\n\n if (deltaScroll > viewportHeight && bodyHeight - viewportHeight > 0) {\n return Math.abs(\n scrollDuration +\n scrollDuration * (Math.abs(deltaScroll) / (bodyHeight - viewportHeight))\n )\n }\n return scrollDuration\n}\n/**\n * Smooth scroll-to inspired by:\n * http://stackoverflow.com/a/24559613/728480\n */\nconst scrollTo = (scrollTo: HTMLElement | string | number = 0, options: { scrollPaddingTop?: number, scrollDuration?: number } = {}) => {\n const { scrollDuration: baseScrollDuration = 300 } = options\n const deferred = new Deferred()\n\n let scrollPosition: number = 0;\n\n try {\n scrollPosition = resolveScrollPosition(scrollTo, options.scrollPaddingTop)\n }\n catch (error) {\n console.error(error)\n return\n }\n\n let currentTime = 0\n const initialTimestamp = window.performance.now()\n const initialScroll = window.scrollY\n const deltaScroll = initialScroll - scrollPosition\n\n const scrollDuration = resolveScrollDuration(baseScrollDuration, deltaScroll)\n\n const finalTimestamp = initialTimestamp + scrollDuration\n\n function step() {\n const currentTimestamp = window.performance.now()\n if (currentTimestamp < finalTimestamp) {\n currentTime = (currentTimestamp - initialTimestamp) / scrollDuration\n currentTime = --currentTime * currentTime * currentTime + 1\n const moveStep = deltaScroll * currentTime\n window.scrollTo(0, scrollPosition + (deltaScroll - moveStep))\n window.requestAnimationFrame(step)\n } else {\n window.scrollTo(0, scrollPosition)\n setTimeout(() => deferred.resolve(undefined), 125)\n }\n return deferred.promise\n }\n\n window.requestAnimationFrame(step)\n return deferred.promise\n}\n\nexport default scrollTo\n","export const EVENT_NAVIGATION_SECTION_CHANGE = 'EVENT_NAVIGATION_SECTION_CHANGE'\n\n// In mobile / tablet / sticky we need a dynamic number of slides as it's a variable width\n// This 'auto' value is valid with new slider-natural, it calculates the available space and set automatically the good itemsPerSlide\nexport const NB_SLIDES_MOBILE = 'auto'\nexport const NB_SLIDES_TABLET = 'auto'\nexport const NB_SLIDES_DESKTOP = 9\nexport const NB_SLIDES_STICKY = 'auto'\n\nexport const INTERSECTION_RATIOS_SECTION = [0.2, 0.8]\n\nexport const BUBBLE_MOBILE_WIDTH = '104'\nexport const BUBBLE_TABLET_DESKTOP_WIDTH = '112'\nexport const GRADIENT_WIDTH = '8'\n\nexport const SLIDER_CONFIG_DEFAULT = {\n display_gradients: 'true',\n display_nav: 'false',\n overflow: 'false',\n placeholder_background: 'transparent',\n slide_min_height: 'auto',\n slider_gap: '0'\n}\n","import { dispatchEvent } from '@kissui/helpers/src/assets/js/eventDispatch'\nimport eventsHelper from '@kissui/helpers/src/events.helpers'\nimport IntersectionObserverService from '@kissui/helpers/src/intersection-observer.service'\nimport createProps from '@kissui/helpers/src/props.helpers.js'\nimport createRefs from '@kissui/helpers/src/refs.helpers'\nimport scrollTo from '@kissui/helpers/src/scrollTo'\nimport { getHashLink, stringifyForAttribute } from '@kissui/helpers/src/utils'\nimport { COLOR_WHITE_1000 } from '../constants.mjs'\nimport eventsManager from './services/events.manager'\n\nimport { BREAKPOINT_M } from '@kissui/components'\nimport {\n BUBBLE_MOBILE_WIDTH,\n BUBBLE_TABLET_DESKTOP_WIDTH,\n EVENT_NAVIGATION_SECTION_CHANGE,\n GRADIENT_WIDTH,\n INTERSECTION_RATIOS_SECTION,\n NB_SLIDES_DESKTOP,\n NB_SLIDES_MOBILE,\n NB_SLIDES_STICKY,\n NB_SLIDES_TABLET,\n SLIDER_CONFIG_DEFAULT\n} from './data/constants'\n\nclass NavigationBubbles extends HTMLElement {\n constructor() {\n super()\n this.isMobile = window.innerWidth < BREAKPOINT_M\n // Used to prevent observer to fire a section change event\n // if navigation click already did it\n this.isScrolling = false\n this.scrollObserver = new IntersectionObserverService()\n }\n\n connectedCallback() {\n this.props = createProps(this.attributes)\n this.classList.add('nb-navigation-bubbles')\n this.sticky = this.isSticky()\n this.type = this.sticky ? 'Chip' : 'Bubble'\n this.isCenteredItems = this.props.is_centered_items ? 'true' : 'false'\n this.setAttribute('type', this.type.toLowerCase())\n this.setAttribute('is-centered-items', this.isCenteredItems)\n this.init()\n }\n\n isSticky() {\n if (!this.props) {\n return false\n }\n const { sticky = 'false' } = this.props\n return sticky === 'true'\n }\n\n init() {\n this.render()\n this.refs = createRefs(this)\n this.slider = this.querySelector('nb-slider-natural')\n this.eventsListeners = eventsManager(this).createListeners(this.slider)\n this.scrollObserver.create([\n {\n selector: '[data-id]',\n callback: this.onSectionChange,\n options: {\n threshold: INTERSECTION_RATIOS_SECTION,\n rootMargin: '-160px 0px 0px 0px'\n }\n }\n ])\n }\n\n render() {\n this.innerHTML = `${this.renderNavigation()}`\n }\n\n getSliderOptions() {\n return {\n flex_auto: this.sticky ? 'true' : 'false',\n gradients_color: this.sticky ? COLOR_WHITE_1000 : undefined,\n gradients_width: this.sticky ? GRADIENT_WIDTH : undefined,\n ...SLIDER_CONFIG_DEFAULT\n }\n }\n\n renderNavigation() {\n const {\n slider_id,\n a11y_slider_previous_button,\n a11y_slider_next_button,\n a11y_goto_slide = 'Goto slide',\n campaign\n } = this.props\n\n // Pass render function name by element type (Chip/Bubble)\n const list = this.renderList(`render${this.type}`)\n\n const sliderOptions = this.getSliderOptions()\n const sliderData = {\n options: {\n mobile: {\n items_per_slide: this.sticky ? NB_SLIDES_STICKY : NB_SLIDES_MOBILE,\n item_width: this.sticky ? 'auto' : BUBBLE_MOBILE_WIDTH,\n display_buttons: 'false',\n ...sliderOptions\n },\n tablet: {\n items_per_slide: this.sticky ? NB_SLIDES_STICKY : NB_SLIDES_TABLET,\n item_width: this.sticky ? 'auto' : BUBBLE_TABLET_DESKTOP_WIDTH,\n display_buttons: 'true',\n ...sliderOptions\n },\n desktop: {\n items_per_slide: this.sticky ? NB_SLIDES_STICKY : NB_SLIDES_DESKTOP,\n item_width: this.sticky ? 'auto' : BUBBLE_TABLET_DESKTOP_WIDTH,\n ...sliderOptions\n }\n },\n a11y_labels: {\n prev: a11y_slider_previous_button,\n next: a11y_slider_next_button,\n nav: a11y_goto_slide\n },\n campaign\n }\n\n const slider = `<nb-slider-natural\n id='${slider_id}'\n data=\"${stringifyForAttribute(sliderData)}\"\n data-ref=\"slider${this.type}\">\n ${list}\n </nb-slider-natural>`\n\n if (this.sticky) {\n return slider\n }\n\n return `<nb-container contrast=\"light\">${slider}</nb-container>`\n }\n\n renderList(renderFunction) {\n const { bubbles = [] } = this.props\n\n const output = bubbles\n .map(bubble => ({ ...bubble, campaign: this.props.campaign || undefined }))\n .map(bubble => this[renderFunction](bubble))\n .join('')\n\n return output\n }\n\n renderBubble(bubble) {\n let { link, campaign } = bubble\n if (!link) {\n return null\n }\n const { linkNoHash } = getHashLink(link)\n\n const bubbleWithCampaign = { ...bubble, campaign }\n\n return `\n <li>\n <nb-bubble data=\"${stringifyForAttribute(\n bubbleWithCampaign\n )}\" data-ref=\"bubbles[${linkNoHash}]\"></nb-bubble>\n </li>\n `\n }\n\n renderChip(chip) {\n const { link } = chip\n if (!link) {\n return null\n }\n const { linkNoHash, linkHash } = getHashLink(link)\n\n return `\n <li>\n <a href=\"${linkHash}\" data-href='${linkNoHash}' class=\"is-link\" tabindex=\"-1\" >\n <nb-chip\n background_image=\"${chip.visual.src}\"\n data-ref=\"chips[${linkNoHash}]\"\n rounded=\"false\"\n campaign_id=\"${chip.campaign?.id}\"\n campaign_name=\"${chip.campaign?.name}\"\n campaign_creative=\"${chip.campaign?.creative}\"\n campaign_position=\"${chip.campaign?.position}\"\n >\n ${chip.label}\n </nb-chip>\n </a>\n </li>\n `\n }\n\n // Called from events-manager.js, coupled code\n updateLayout() {\n this.geometry = this.getGeometry()\n }\n\n updateBubbles(sectionId) {\n const { bubbles = {} } = this.refs\n for (const bubbleId in bubbles) {\n const bubble = bubbles[bubbleId]\n const state = bubbleId === sectionId ? 'selected' : 'default'\n if (typeof bubble.setAttribute === 'function') {\n bubble.setAttribute('state', state)\n }\n }\n }\n\n updateChips(sectionId) {\n const { chips = {} } = this.refs\n for (const chipId in chips) {\n const chip = chips[chipId]\n const isChecked = chipId === sectionId ? 'true' : 'false'\n chip.setAttribute && chip.setAttribute('checked', isChecked)\n }\n }\n\n async updateSlider(sectionId, _index) {\n let index = _index\n const slider = await this.refs.sliderChip\n if (slider) {\n if (typeof _index === 'undefined') {\n const links = slider.querySelectorAll('a[data-href]')\n links.forEach((link, i) => {\n if (link.getAttribute('data-href') === sectionId) {\n index = i\n }\n })\n }\n if (index && slider && slider.goToSlide) {\n slider.goToSlide(index)\n }\n }\n }\n\n emit(event) {\n dispatchEvent({ element: this, ...event })\n }\n\n async scroll(link, index) {\n this.isScrolling = true\n const linkHref = link.getAttribute('data-href')\n const target = linkHref\n const { header, chips } = this.geometry\n\n // When clicking on first anchor we force height to 0 because sticky bar is usually not displayed yet\n const stickyBarHeight = index === 0 ? 0 : chips.height\n\n const scrollPaddingTop = header.top + header.height + stickyBarHeight\n const scrollOptions = { scrollPaddingTop }\n\n await scrollTo(`[data-id=\"${target}\"]`, scrollOptions)\n this.isScrolling = false\n\n // After scrolling visually, we need to give focus to the section for keyboard navigation\n const targetEl = document.querySelector(`[data-id=\"${target}\"]`)\n targetEl.focus({ preventScroll: true })\n }\n\n track() {\n //no-op as per https://nestle.atlassian.net/browse/DIGEX-12371?focusedCommentId=2903998\n }\n\n getGeometry() {\n const $header = document.querySelector('.Header__top')\n const $stickyBar = document.querySelector('nb-plp-sticky-bar')\n\n const headerRect = $header?.getBoundingClientRect() || { height: 0, y: 0 }\n const stickyBarRect = $stickyBar?.getBoundingClientRect() || { height: 0, y: 0 }\n\n return {\n header: { height: headerRect.height, top: headerRect.y },\n chips: { height: stickyBarRect.height, top: stickyBarRect.y }\n }\n }\n\n onSectionChange(entries) {\n const entry = entries[0]\n\n if (entry.isIntersecting && !this.isScrolling) {\n const { id = '' } = entry.target.dataset\n\n dispatchEvent({\n eventName: EVENT_NAVIGATION_SECTION_CHANGE,\n args: { sectionId: id || entry.target.getAttribute('data-id') }\n })\n }\n }\n\n disconnectedCallback() {\n eventsHelper.remove(this.eventsListeners)\n this.scrollObserver.destroy('[data-id]')\n }\n}\n\ncustomElements.get('nb-navigation-bubbles') ||\n customElements.define('nb-navigation-bubbles', NavigationBubbles)\n\nexport default NavigationBubbles\n","// TODO move the responsabiliy of the links to the correct component\nimport eventsHelper from '@kissui/helpers/src/events.helpers'\nimport { readEvent, dispatchEvent } from '@kissui/helpers/src/assets/js/eventDispatch'\n\nimport { EVENT_HEADER_POSITION_CHANGED, EVENT_SLIDER_READY } from '@kissui/components'\n\nimport { EVENT_NAVIGATION_SECTION_CHANGE } from '../data/constants'\n\nconst eventsManager = rootElement => {\n const bindSliderLinksEvents = slider => {\n // We need to wait for EVENT_SLIDER_READY before getting geometry for chips slider to have height\n rootElement.geometry = rootElement.getGeometry()\n\n const links = slider.querySelectorAll('a')\n\n for (const [index, link] of links.entries()) {\n link.addEventListener('click', onSliderLinkClick.bind(this, index))\n }\n }\n\n const onSliderLinkClick = (index, $event) => {\n $event.preventDefault()\n\n const link = $event.target.closest('a')\n\n if (link) {\n dispatchEvent({\n eventName: EVENT_NAVIGATION_SECTION_CHANGE,\n args: { sectionId: link.getAttribute('data-href'), index }\n })\n\n rootElement.scroll && rootElement.scroll(link, index)\n window.location.hash = link.getAttribute('data-href')\n\n let finalLabel = '',\n plpListLabel = '',\n bubbleLabel = ''\n if (rootElement.closest('nb-plp-sticky-bar')) {\n bubbleLabel = link.querySelector('nb-chip label span').textContent\n plpListLabel = rootElement.props.selected_nav_link_label || ''\n } else {\n plpListLabel = rootElement.props.selected_nav_link_label || ''\n if (link.nextElementSibling.textContent) {\n bubbleLabel = link.nextElementSibling.textContent\n } else {\n bubbleLabel = link.getAttribute('aria-label')\n }\n }\n finalLabel = plpListLabel ? `${plpListLabel} : ${bubbleLabel}` : `${bubbleLabel}`\n rootElement.track(finalLabel)\n }\n }\n\n const onSectionChange = $event => {\n const { sectionId, index } = readEvent($event)\n\n rootElement.updateBubbles && rootElement.updateBubbles(sectionId)\n rootElement.updateChips && rootElement.updateChips(sectionId)\n rootElement.updateSlider && rootElement.updateSlider(sectionId, index)\n }\n\n const createListeners = slider => {\n const eventListeners = []\n\n if (slider) {\n eventListeners.push({\n element: rootElement,\n type: EVENT_SLIDER_READY,\n listener: bindSliderLinksEvents.bind(this, slider),\n options: { once: true }\n })\n }\n eventListeners.push({\n element: window,\n type: EVENT_NAVIGATION_SECTION_CHANGE,\n listener: onSectionChange\n })\n eventListeners.push({\n element: window,\n type: EVENT_HEADER_POSITION_CHANGED,\n listener: rootElement.updateLayout.bind(rootElement)\n })\n\n eventsHelper.add(eventListeners)\n\n return eventListeners\n }\n\n return { createListeners }\n}\n\nexport default eventsManager\n","export class NespressoElement extends HTMLElement {\n constructor() {\n super()\n this.template = ''\n }\n\n connectedCallback() {\n this.props = this._createProps()\n this.onStart?.()\n this.loadTemplate()\n this.onReady?.()\n }\n\n /**\n * Load the attributes and create the props object\n * @returns {any}\n * @private\n */\n _createProps(forceAttributes = null) {\n const attributes = forceAttributes || this.attributes\n\n const getData = attr => attr.find(attribute => attribute.nodeName === 'data')\n\n let props\n try {\n props = [...attributes].reduce((all, attr) => {\n return { ...all, [attr.nodeName]: attr.nodeValue }\n }, {})\n\n const data = getData([...attributes])\n\n if (data === undefined || data === null) {\n return props\n }\n\n return { ...props, ...JSON.parse(data.nodeValue) }\n } catch (error) {\n console.log(this.nodeName, 'ERROR: No data', error)\n }\n }\n\n /**\n * Render by DOM diff\n */\n render(force = false) {\n if (force) {\n // todo review the performance of this\n this.innerHTML = ''\n }\n /**\n * Convert a template string into HTML DOM nodes\n * @param {String} str The template string\n * @return {Node} The template HTML\n */\n const _stringToHTML = str => {\n const parser = new DOMParser()\n const doc = parser.parseFromString(str, 'text/html')\n return doc.body\n }\n\n /**\n * Compare the template to the UI and make updates\n * @param {Node} template The template HTML\n * @param {Node} elem The UI HTML\n */\n const _diff = (template, elem) => {\n /**\n * Get the type for a node\n * @param {Node} node The node\n * @return {String} The type\n */\n const _getNodeType = node => {\n if (node.nodeType === 3) {\n return 'text'\n }\n if (node.nodeType === 8) {\n return 'comment'\n }\n return node.tagName.toLowerCase()\n }\n\n /**\n * Get the content from a node\n * @param {Node} node The node\n * @return {String} The type\n */\n const _getNodeContent = node => {\n if (node.childNodes && node.childNodes.length > 0) {\n return null\n }\n return node.textContent\n }\n\n // Get arrays of child nodes\n const domNodes = Array.prototype.slice.call(elem.childNodes)\n const templateNodes = Array.prototype.slice.call(template.childNodes)\n\n // If extra elements in DOM, remove them\n var count = domNodes.length - templateNodes.length\n if (count > 0) {\n for (; count > 0; count--) {\n domNodes[domNodes.length - count].parentNode.removeChild(\n domNodes[domNodes.length - count]\n )\n }\n }\n\n // Diff each item in the templateNodes\n templateNodes.forEach(function (node, index) {\n // If element doesn't exist, create it\n if (!domNodes[index]) {\n elem.appendChild(node.cloneNode(true))\n return\n }\n\n // If element is not the same type, replace it with new element\n if (_getNodeType(node) !== _getNodeType(domNodes[index])) {\n domNodes[index].parentNode.replaceChild(node.cloneNode(true), domNodes[index])\n return\n }\n\n // If content is different, update it\n const templateContent = _getNodeContent(node)\n if (templateContent && templateContent !== _getNodeContent(domNodes[index])) {\n domNodes[index].textContent = templateContent\n }\n\n // If target element should be empty, wipe it\n if (domNodes[index].childNodes.length > 0 && node.childNodes.length < 1) {\n domNodes[index].innerHTML = ''\n return\n }\n\n // If element is empty and shouldn't be, build it up\n // This uses a document fragment to minimize reflows\n if (domNodes[index].childNodes.length < 1 && node.childNodes.length > 0) {\n const fragment = document.createDocumentFragment()\n _diff(node, fragment)\n domNodes[index].appendChild(fragment)\n return\n }\n\n // If there are existing child elements that need to be modified, diff them\n if (node.childNodes.length > 0) {\n _diff(node, domNodes[index])\n }\n })\n }\n\n // todo - add support to reactivity\n // this.template(this.state)\n const templateHTML = _stringToHTML(this.template)\n _diff(templateHTML, this)\n }\n\n /**\n * Set the HTML to be used in the template\n * @param {String} html The HTML to use\n *\n * This function is overwritten by the extended class to set the HTML\n *\n */\n loadTemplate(template = '', force = false) {\n this.template = template === '' ? this.template : `${template}`\n this.render(force)\n }\n\n disconnectedCallback() {\n this.onDestroy?.()\n }\n}\n\ncustomElements.get('nb-nespresso-element') ||\n customElements.define('nb-nespresso-element', NespressoElement)\n","import { getDataLayer } from '@kissui/helpers/src/dataLayer'\n\nexport async function setPLPDataProvider() {\n window.getPLPData = window.getPLPData || getPLPData\n}\n\nexport async function getPLPData() {\n return await window.plpData\n}\n\nexport async function market() {\n return napi.market().read() // eslint-disable-line\n}\n\nexport function getCurrency() {\n return getDataLayer().currency\n}\n\nexport async function getPriceFormatter() {\n return napi.priceFormat() // eslint-disable-line\n}\n","const runningExperiments = new Set<string>()\n\nexport function runningExperiment(experiment: string): Boolean {\n return runningExperiments.has(experiment)\n}\n\nexport function enableExperiment(experiment: string): void {\n runningExperiments.add(experiment)\n console.info('Running experiments:', ...runningExperiments.values())\n}\n\nexport function disableExperiment(experiment: string): void {\n runningExperiments.delete(experiment)\n console.info('Running experiments:', ...runningExperiments.values())\n}\n\n// List Current experiments\nexport const EXPLICIT_FILTERS = 'EXPLICIT_FILTERS'\n","// MAIN ID BLOCKS\nexport const FILTER_MAIN_BLOCK_ID = 'filtersPLP'\nexport const SORT_MENU_ID = 'plp-sort-menu'\nexport const SORT_MENU_MOBILE_ID = 'plp-sort-menu-mobile'\nexport const POPIN_ID = 'plp-filter-popin'\nexport const NAVIGATION_MAIN_BLOCK_ID = 'navigationPLP'\nexport const PRODUCTS_LIST_MAIN_BLOCK_ID = 'productsListPLP'\nexport const PRODUCTS_RESULTS_MAIN_BLOCK_ID = 'productsResultsPLP'\nexport const PRODUCTS_RESULTS_HEADER_ID = 'productsResultsHeaderPLP'\nexport const FILTER_BUTTON = 'plp-filter-cta'\nexport const CB_RESULTS_TOTAL_ID = 'cb-results-total-id'\nexport const MY_RECOMMENDATIONS_ID = 'my-recommendations'\n\n// URL variable\nexport const QUERY_URL_PARAMETER_FILTERS = 'filters'\nexport const QUERY_URL_PARAMETER_SORT = 'sort'\n","/**\n filtersPLP:\n navigationPLP\n productsListPLP\n productsResultsPLP\n\n data-request: not mutable // not to be changed\n data-response: mutable // changed by the component\n\n\n Don't:\n const dict = {\n 'foo': 1,\n 'bar': 2\n}\n\n Better:\n const dict = new Map([\n ['foo', 1],\n ['bar', 2]\n ])\n\n dict.get('foo');\n dict.set('foo', 2);\n dict.has('baz');\n dict.keys()\n\n */\nimport { stringifyForAttribute } from '@kissui/helpers/src/utils'\nimport { getPLPData, getPriceFormatter, market } from '@kissui/plp-data'\nimport { EXPLICIT_FILTERS, runningExperiment } from '../config/experiments'\nimport { MY_RECOMMENDATIONS_ID } from '../config/constants'\n\n// todo cache data if not changes\nconst appData = {\n _productsFlat: undefined,\n sessionId: '',\n\n init: async function (plpType) {\n window.plpDataType = plpType\n window.getPLPData = window.getPLPData || getPLPData\n this.set('sessionId', (Math.random() + 1).toString(36).substring(7))\n this.set('filtersSelected', [])\n this.set('sortCurrent', {})\n this.set('sortOptions', [])\n this.set('options', {})\n\n return window.getPLPData()\n },\n\n async reload() {\n this.set('sessionId', (Math.random() + 1).toString(36).substring(7))\n this.set('products', [])\n this.set('filters', [])\n this.set('filtersSelected', [])\n this.set('options', {})\n\n this._productsFlat = undefined\n\n return window.getPLPData()\n },\n\n // review if this pattern about set & get it's ok (I don't think so, because should be unmutable)\n set: function (key, value) {\n this[key] = value\n },\n get: function (key) {\n return this[key] || null\n },\n initPriceFormatter: function () {\n return getPriceFormatter()\n },\n initCurrency: function () {\n return market()\n },\n filters: [],\n products: [],\n productsList: function () {\n return this.products\n },\n\n getProducts() {\n if (this._productsFlat && this._productsFlat.length) {\n return this._productsFlat\n }\n\n this._productsFlat = this.products.reduce((acc, product) => {\n return acc.concat(product.products)\n }, [])\n\n return this._productsFlat\n },\n\n productsListFiltered: function ({ withSort = true } = {}) {\n const selectedFilters = this.get('filtersSelected')\n const filterPredicate = runningExperiment(EXPLICIT_FILTERS)\n ? filterProductsByFilterType(selectedFilters)\n : filterProductsByAllFilters(selectedFilters)\n const filteredList = this.getProducts().filter(filterPredicate)\n const sortCurrent = this.get('sortCurrent') ?? {}\n\n return withSort ? sortProducts(filteredList, sortCurrent) : filteredList\n },\n productsFilteredCount: function () {\n return this.productsListFiltered({ withSort: false }).length\n },\n /*\n * todo: refactor this function\n * fireAll should be true always, it's only true to performance improvement\n * the solution should be in the subscription site, right now we are subscribe to all changes,\n * but this is wrong should be subscribed only to some changes of the store using a seed/key\n * */\n filtersUpdate: function (filterSelection, fireAll = true) {\n const filter = this.get('filters').find(f => f.key === filterSelection.key)\n\n if (!filter) {\n return\n }\n\n setFilterValue(\n this.get('filtersSelected'),\n filter,\n filterSelection.value,\n filterSelection.selected\n )\n\n if (runningExperiment(EXPLICIT_FILTERS)) {\n this.filterChipsUpdate()\n }\n\n fireAll && this.fire()\n },\n filtersUpdateMultiple(key, valueSelections = Map()) {\n const filter = this.get('filters').find(f => f.key === key)\n const filtersSelected = this.get('filtersSelected')\n\n valueSelections.forEach((selected, value) => {\n const selectedCurrently = filtersSelected.find(\n f => f.key === filter.key && filterValueIsEqual(f, value)\n )\n\n if (selectedCurrently && selected) return\n setFilterValue(filtersSelected, filter, value, selected)\n })\n\n this.filterChipsUpdate()\n this.fire()\n },\n filtersSelectedWithLabel: function () {\n return this.get('filtersSelected').map(filter => {\n const { key: filterKey, value: filterValue } = filter\n const foundFilter = this.get('filters').find(f => f.key === filterKey)\n const filterLabel = foundFilter?.values.find(v => v.value === filterValue)?.label\n return {\n categoryTitle: foundFilter?.title,\n label: filterLabel,\n key: filterKey,\n value: filterValue\n }\n })\n },\n filtersSelectedCount: function () {\n return this.get('filtersSelected')?.length ?? 0\n },\n // todo modify this flow because the serilized attributes shouldn't be necessary\n filtersSelectedSerialized: function () {\n const filters = [this.get('sortCurrent'), ...this.get('filtersSelected')]\n return stringifyForAttribute(filters)\n },\n filtersReset: function () {\n this.set('filtersSelected', [])\n this.get('filters').forEach(filter => {\n filter.values.forEach(value => {\n value.selected = false\n value.disabled = false\n })\n })\n const sortCurrent = this.get('sortOptions')\n sortCurrent?.length && this.set('sortCurrent', sortCurrent[0])\n\n if (runningExperiment(EXPLICIT_FILTERS)) {\n this.filterChipsUpdate()\n }\n\n this.fire()\n },\n filterChipsUpdate() {\n const selectedFilters = this.get('filtersSelected')\n const productsList = this.getProducts()\n this.get('filters').forEach(filter => {\n filter.values.forEach(filterChip => {\n // hide product counts\n filterChip.productCount = null\n\n // maintain filter's presence when other filters in same group are selected\n const withoutGroup = selectedFilters.filter(\n selected => selected.key !== filterChip.filterKey\n )\n const onlyFilterInGroup = [...withoutGroup, filterChip]\n const predicate = filterProductsByFilterType(onlyFilterInGroup)\n filterChip.disabled = !productsList.find(predicate)\n })\n })\n },\n\n observers: [],\n subscribe: function (fn) {\n this.observers.push(fn)\n },\n unsubscribe: function (fnToRemove) {\n this.observers = this.observers.filter(fn => {\n if (fn !== fnToRemove) {\n return fn\n }\n })\n },\n fire: function () {\n this.observers.forEach(fn => {\n fn.call()\n })\n }\n}\n\nexport default appData\n\nfunction doesProductMatchFilter(product, filter) {\n const filterValue = filter.value\n const productPropValue = product[filter.filterKey || filter.key]\n switch (typeof productPropValue) {\n case 'string':\n return productPropValue === filterValue\n case 'number':\n return JSON.parse(`[${filterValue}]`).includes(productPropValue)\n default: {\n if (filterValue === MY_RECOMMENDATIONS_ID) {\n const recommendationProducts = appData.get('recommendation')?.products ?? []\n return recommendationProducts.some(p => p.id === product.id)\n }\n\n // check array values or\n // default to false for nullish values\n return productPropValue?.includes(filterValue) || false\n }\n }\n}\n\nfunction groupFiltersByType(filters = []) {\n /*\n group selected filters by key, e.g.\n {\n intensity: [1, 2, 3],\n collection: [a, b, c],\n }\n */\n return filters.reduce((all, filter) => {\n const filterKey = filter.key\n const current = all[filterKey] || []\n return {\n ...all,\n [filterKey]: [...current, filter]\n }\n }, {})\n}\n\nfunction filterProductsByFilterType(filters) {\n const groups = groupFiltersByType(filters)\n const types = Object.keys(groups)\n return (product, index, products) => {\n /*\n does product match at least one filter in each group, e.g.\n {\n intensity: [1, 2, 3],\n collection: [a, b, c],\n }\n matches\n {\n product: { intensity: 1 },\n product: { collection: a },\n }\n */\n return types.every(type => {\n return !!groups[type].find(filter => {\n return (\n doesProductMatchFilter(product, filter) &&\n products.findIndex(p => p.id === product.id) === index // Deduplicates\n )\n })\n })\n }\n}\n\nfunction filterProductsByAllFilters(filters = []) {\n return (product, index, products) => {\n return (\n // check that the product matches every filter selected\n filters.every(filter => {\n return doesProductMatchFilter(product, filter)\n }) && products.findIndex(p => p.id === product.id) === index // Deduplicates\n )\n }\n}\n\nfunction filterValueIsEqual(filterValue, value) {\n return Array.isArray(filterValue.value)\n ? filterValue.value.join(',') === value\n : filterValue.value === value\n}\n\nfunction setFilterValue(filtersSelected, filter, value, selected) {\n filter.values.forEach(filterValue => {\n // todo refactor this function\n let valueIsEqual = filterValueIsEqual(filterValue, value)\n if (!valueIsEqual) {\n return\n }\n\n filterValue.selected = selected\n if (selected) {\n filtersSelected.push({\n key: filter.key,\n value: value,\n color: filterValue.color || null\n })\n } else {\n filtersSelected.splice(\n 0,\n filtersSelected.length,\n ...filtersSelected.filter(\n fSelected => !(fSelected.key === filter.key && fSelected.value === value)\n )\n )\n }\n })\n}\n\nfunction createSorter({ key, order }) {\n const isAscending = order === 'asc'\n\n return (a, b) => {\n if (a[key] < b[key]) {\n return isAscending ? -1 : 1\n }\n if (a[key] > b[key]) {\n return isAscending ? 1 : -1\n }\n return 0\n }\n}\n\nfunction sortProducts(products, { key, order }) {\n const sorter = createSorter({ key, order })\n return [\n ...products.filter(p => p.inStock).sort(sorter),\n ...products.filter(p => !p.inStock).sort(sorter)\n ]\n}\n","import { customEvent } from '@kissui/helpers/src/gtmEvents'\nimport zoneTracking from '@kissui/helpers/src/assets/js/zoneTracking'\nimport { FILTER_MAIN_BLOCK_ID } from '../config/constants'\nimport appData from './plp.data'\n\nconst updateQueryStringParameter = (uri, key, value) => {\n const re = new RegExp('([?&])' + key + '=.*?(&|$)', 'i')\n const separator = uri.indexOf('?') !== -1 ? '&' : '?'\n return uri.match(re)\n ? uri.replace(re, '$1' + key + '=' + value + '$2')\n : uri + separator + key + '=' + value\n}\n\nexport const updateUrlVariable = (variable, queryArray) => {\n // we are removing the hash from the url\n const [path] = window.location.href.split('#')\n const value = encodeURIComponent(JSON.stringify(queryArray))\n const url = updateQueryStringParameter(path, variable, value)\n history.pushState(null, null, url)\n}\n\nexport const getUrlVariable = key => {\n const queryString = window.location.search\n const param = new URLSearchParams(queryString).get(key)\n\n if (!param) {\n return null\n }\n\n try {\n return JSON.parse(decodeURIComponent(param))\n } catch (err) {\n console.error('plp.actions-getUrlVariable: url parsing failed')\n return null\n }\n}\n\nconst defaultTracking = 'none selected'\n\nconst getSortTracking = data => {\n const { isSorted, sortKey, sortOrder } = data\n return `sort:${isSorted ? `${sortOrder}|${sortKey}` : defaultTracking}`\n}\n\nconst getFilterTracking = data => {\n const { isFiltered, filtersSelected } = data\n return `characteristics:${\n isFiltered\n ? // unique array of filter keys\n [...new Set(filtersSelected.map(filter => filter.key))].join(',')\n : defaultTracking\n }`\n}\n\nexport const trackInteraction = (data = {}) => {\n const { isSorted, isFiltered } = data\n const eventAction = 'PLP Filter click'\n\n if (!isSorted && !isFiltered) {\n customEvent({\n eventAction,\n eventLabel: defaultTracking\n })\n return\n }\n\n customEvent({\n eventAction,\n eventLabel: [getSortTracking(data), getFilterTracking(data)].join('|')\n })\n}\n\nexport const trackLoad = () => {\n const campaign = appData.get('campaign')\n const node = window.document.getElementById(FILTER_MAIN_BLOCK_ID)\n if (campaign) {\n zoneTracking(node, campaign)\n }\n}\n\nexport const cleanFilterDataXSS = (source, data) => {\n const cleanData = []\n data.forEach(item => {\n source.forEach(sourceItem => {\n if (sourceItem.key === item.key) {\n sourceItem.values.forEach(value => {\n if (item.value === value.value) {\n cleanData.push({\n key: sourceItem.key,\n value: value.value,\n selected: true\n })\n }\n })\n }\n })\n })\n\n return cleanData\n}\nexport const cleanSortDataXSS = (source, data) => {\n return [...source].filter(item => item.key === data.key && item.order === data.order)\n}\n","import { signal } from '@preact/signals'\nimport type { ModuleData } from './CremaService'\n\ntype ModuleName = 'ProductsList' | 'ProductDetails' | 'HeaderNavigation'\n\ntype PageStore = {\n [key: string]: string | undefined\n pageHtml?: string\n}\n\ntype SignalStore = {\n ProductsList: ModuleData\n ProductDetails: ModuleData\n HeaderNavigation: ModuleData\n}\n\ntype WindowCreamService = {\n pageStores: Map<string, PageStore>\n signalStore: SignalStore\n}\n\ndeclare global {\n interface Window {\n __crema_service__: WindowCreamService\n }\n}\n\n// Stored on window to allow sharing between page builder sections\n// Ideally this would be replaced by loading this service as a shared bundle in future\nwindow.__crema_service__ = window.__crema_service__ || {\n pageStores: new Map<string, PageStore>(),\n signalStore: {\n ProductsList: signal(undefined),\n ProductDetails: signal(undefined),\n HeaderNavigation: signal(undefined)\n }\n}\n\nconst pageStores = window.__crema_service__.pageStores\nconst signalStore = window.__crema_service__.signalStore\n\nexport function clear() {\n pageStores.clear()\n signalStore.ProductsList.value = undefined\n signalStore.ProductDetails.value = undefined\n signalStore.HeaderNavigation.value = undefined\n}\n\nexport function getPageHtml(url: string): string | undefined {\n const store = getStore(url)\n return store.pageHtml\n}\n\nexport function setPageHtml(url: string, html: string): void {\n const store = getStore(url)\n store.pageHtml = html\n}\n\nexport function getModuleData(moduleName: ModuleName): ModuleData {\n return signalStore[moduleName]\n}\n\nexport function setModuleData(moduleName: ModuleName, data: object | undefined): void {\n signalStore[moduleName].value = data\n}\n\nfunction getStore(url: string): PageStore {\n if (!pageStores.has(url)) {\n pageStores.set(url, {})\n }\n\n return pageStores.get(url) as PageStore\n}\n","import { Signal, batch } from '@preact/signals'\n\nimport * as store from './Store'\n\nconst parser = new DOMParser()\n\nexport type ModuleData<T = any> = Signal<Record<PropertyKey, T> | undefined>\n\nexport type HeaderNavigationMenuItem = {\n title: string,\n link: {\n url: string\n }\n}\n\nexport async function loadFromUrl(url: string, cacheOnly: boolean = false): Promise<void> {\n return batch(async () => {\n let html = store.getPageHtml(url)\n\n if (!html) {\n try {\n html = await fetchHtml(url)\n store.setPageHtml(url, html)\n } catch (error) {\n console.debug('Failed to load HTML', error)\n return\n }\n }\n\n if (!cacheOnly) {\n store.setModuleData('HeaderNavigation', parseModuleData(html, 'HeaderNavigationBar'))\n store.setModuleData('ProductsList', parseModuleData(html, 'ProductList'))\n store.setModuleData('ProductDetails', parseModuleData(html, 'ProductDetails'))\n }\n })\n}\n\nexport function loadFromPage(window: Window): void {\n batch(() => {\n const html = window.document.documentElement.innerHTML\n\n store.setModuleData('HeaderNavigation', parseModuleData(html, 'HeaderNavigationBar'))\n store.setModuleData('ProductsList', parseModuleData(html, 'ProductList'))\n store.setModuleData('ProductDetails', parseModuleData(html, 'ProductDetails'))\n\n // Only cache if we found either the PLP data or the PDP data\n if (\n store.getModuleData('HeaderNavigation').value &&\n (store.getModuleData('ProductsList').value ||\n store.getModuleData('ProductDetails').value)\n ) {\n store.setPageHtml(window.location.href, html)\n }\n })\n}\n\nexport function getProductsList(): ModuleData {\n return store.getModuleData('ProductsList')\n}\n\nexport function getProductDetails(): ModuleData {\n return store.getModuleData('ProductDetails')\n}\n\nexport function getHeaderNavigation(): ModuleData {\n return store.getModuleData('HeaderNavigation')\n}\n\nfunction parseModuleData(html: string, moduleName: string): ModuleData | undefined {\n try {\n const moduleScript = parseHtml(html, moduleName)\n return parseProductScript(moduleScript) as ModuleData\n } catch (error) {\n // Failed to parse module, but this could be expected if the module is not present\n return undefined\n }\n}\n\nasync function fetchHtml(url: string): Promise<string> {\n console.debug('Fetching HTML from', url)\n const response = await fetch(url)\n\n if (!response.ok) {\n throw new Error(`Failed to fetch from \"${url}\" - ${response.status}:${response.statusText}`)\n }\n\n const html = await response.text()\n\n return html\n}\n\nfunction parseHtml(html: string, moduleName: string): string {\n const document = parser.parseFromString(html, 'text/html')\n\n const scripts = document.querySelectorAll('script')\n for (const script of scripts) {\n const content = script.textContent ?? ''\n if (content.includes(`\"module\":\"${moduleName}\"`)) return content\n }\n\n throw new Error(`Failed to find module \"${moduleName}\"`)\n}\n\nfunction parseProductScript(script: string): object {\n const lines = script.split('\\n')\n for (const line of lines) {\n const trimmed = line.trim()\n if (trimmed.startsWith('window.ui.push(')) {\n const jsonString = trimmed.replace('window.ui.push(', '').slice(0, -2)\n return JSON.parse(jsonString)\n }\n }\n\n throw new Error('Failed to find UI data in script')\n}\n","import appData from './plp.data'\nimport {\n updateUrlVariable,\n getUrlVariable,\n trackInteraction,\n cleanFilterDataXSS,\n cleanSortDataXSS,\n trackLoad\n} from './plp.actions'\nimport { QUERY_URL_PARAMETER_FILTERS, QUERY_URL_PARAMETER_SORT } from '../config/constants'\nimport { getTrackingData } from '../helpers/tracking'\nimport { EXPLICIT_FILTERS, runningExperiment } from '../config/experiments'\nimport { loadFromUrl, getProductsList, loadFromPage } from '@kissui/crema-service'\nimport { filterActionEvent, filterTrackingFromPlpFilters } from '@kissui/helpers/src/gtmEvents'\n\n// todo find a better way to do this\nlet plpData = {}\nlet appStates = {}\n// one solution is make promise inside of promise\nconst isSorted = data => {\n return (\n data.get('sortCurrent').key !== data.get('sortOptions')[0].key ||\n data.get('sortCurrent').order !== data.get('sortOptions')[0].order\n )\n}\n\nconst isFiltered = data => data.filtersSelectedCount() !== 0\n\nexport default {\n onload: {\n process: function (e, handlePostEvent) {\n const { plpType, appStatesHandler } = e.detail.value\n\n appStates = appStatesHandler\n\n // initialize the store\n const init = appData.init(plpType)\n appData.set('plpType', plpType || null)\n appData.set('innerWidth', window.innerWidth)\n appData.set('innerHeight', window.innerHeight)\n\n // get market data\n const currency = appData.initCurrency()\n const priceFormatter = appData.initPriceFormatter()\n\n Promise.all([init, currency, priceFormatter])\n .then(values => {\n plpData = values[0]\n appData.set('currency', values[1].currency)\n appData.set('priceFormatter', values[2])\n handlePostEvent(new CustomEvent('onloadSuccess'))\n })\n .catch(err => {\n console.error(err)\n handlePostEvent(new CustomEvent('onloadError', { detail: { err } }))\n })\n\n if (runningExperiment(EXPLICIT_FILTERS)) {\n loadFromPage(window)\n }\n }\n },\n onReload: {\n async process(e, handlePostEvent) {\n const { plpType, url } = e.detail.value\n\n let data\n try {\n await loadFromUrl(url)\n data = getProductsList().value\n } catch (err) {\n console.error(err)\n return handlePostEvent(new CustomEvent('onloadError', { detail: { err } }))\n }\n\n window.plpData = Promise.resolve({\n techno: 'unknown', // Only used by mocks?\n data\n })\n\n simulatePageChange(url)\n\n try {\n // Reinitialize the store\n const [_data, currency, priceFormatter] = await Promise.all([\n appData.reload(plpType),\n appData.initCurrency(),\n appData.initPriceFormatter()\n ])\n plpData = _data // NOTE: Getting this from the appData is rather redundant\n appData.set('plpType', plpType || null)\n appData.set('innerWidth', window.innerWidth)\n appData.set('innerHeight', window.innerHeight)\n appData.set('currency', currency.currency)\n appData.set('priceFormatter', priceFormatter)\n handlePostEvent(new CustomEvent('onloadSuccess'))\n appData.fire()\n } catch (error) {\n console.error(error)\n handlePostEvent(new CustomEvent('onloadError', { detail: { error } }))\n }\n }\n },\n onloadSuccess: {\n nextState: function (e) {\n return appStates.onloadSuccess(e)\n }\n },\n onloadError: {\n nextState: function (e) {\n return appStates.showError(e)\n }\n },\n onMergeData: {\n // triggered from plp.app.js\n async process(e, handlePostEvent) {\n const {\n filtersService,\n productService,\n dataSortService,\n pageBuilderProps,\n recommendationService\n } = e.detail.value\n\n const recommendationInstance = recommendationService(pageBuilderProps)\n const dataToMerge = productService(\n plpData,\n pageBuilderProps,\n recommendationInstance?.recommendation\n )\n\n mergeData(dataToMerge)\n\n // Here we merge the data in a lazy way, the first interation is the\n // half-recommended data, missing the loading of products, which, since\n // it comes from Martech, may take longer than the rest. Then, in order\n // not to block the rest, while the spinner is displayed, the mergeData\n // is loaded and processed again.\n if (recommendationInstance?.readyToLoadProducts?.()) {\n await recommendationInstance.loadProducts()\n const newData = productService(\n plpData,\n pageBuilderProps,\n recommendationInstance?.recommendation\n )\n appData.set('recommendation', recommendationInstance.recommendation)\n mergeData(newData)\n appData.fire()\n }\n\n function mergeData(data = {}) {\n mergeProductData(data, pageBuilderProps)\n mergeFilters(data, { pageBuilderProps, dataSortService, filtersService })\n setUrlOverrides()\n handleExperiments()\n trackLoad(pageBuilderProps)\n handlePostEvent(new CustomEvent('switchProductsPage'))\n }\n }\n },\n switchProductsPage: {\n nextState: function (e) {\n if (isSorted(appData) || isFiltered(appData)) {\n return appStates.readyForShowResults(e)\n } else {\n return appStates.readyForPlay(e)\n }\n }\n },\n onMergeDataError: {\n nextState: function (e) {\n return appStates.showError(e)\n }\n },\n onFilter: {\n process: (e, handlePostEvent) => {\n const filtersSelected = appData.get('filtersSelected')\n\n updateUrlVariable(QUERY_URL_PARAMETER_FILTERS, appData.get('filtersSelected'))\n updateUrlVariable(QUERY_URL_PARAMETER_SORT, {\n key: appData.get('sortCurrent').key,\n order: appData.get('sortCurrent').order\n })\n\n handlePostEvent(new CustomEvent('switchProductsPage'))\n\n // condition check to not send empty filter list, clear event is handled in different place\n if (runningExperiment(EXPLICIT_FILTERS) && filtersSelected.length) {\n filterActionEvent(\n 'filter apply',\n ...filterTrackingFromPlpFilters(filtersSelected),\n null,\n e.detail.value\n )\n }\n }\n },\n onSort: {\n process: (e, handlePostEvent) => {\n updateUrlVariable(QUERY_URL_PARAMETER_FILTERS, appData.get('filtersSelected'))\n updateUrlVariable(QUERY_URL_PARAMETER_SORT, {\n key: appData.get('sortCurrent').key,\n order: appData.get('sortCurrent').order\n })\n\n handlePostEvent(new CustomEvent('switchProductsPage'))\n\n trackInteraction({\n isSorted: isSorted(appData),\n isFiltered: isFiltered(appData),\n sortKey: appData.get('sortCurrent').key,\n sortOrder: appData.get('sortCurrent').order,\n filtersSelected: appData.get('filtersSelected')\n })\n }\n },\n onloadFilter: {\n process: function (e, handlePostEvent) {\n handlePostEvent(new CustomEvent('onloadFilterSuccess', { detail: { e } }))\n // handlePostEvent(new CustomEvent('onloadFilterError'))\n }\n },\n onloadFilterSuccess: {\n nextState: function (e) {\n return appStates.readyForFilter(e)\n }\n },\n onloadFilterError: {\n nextState: function (e) {\n return appStates.showError(e)\n }\n }\n}\n\nfunction simulatePageChange(url) {\n try {\n const urlObj = new URL(window.location)\n urlObj.pathname = url\n window.history.pushState({}, '', urlObj)\n // TODO: Most likely need to trigger the matching tracking call for a page load\n } catch (error) {\n console.error('Failed to simulate page change', error)\n }\n}\n\nfunction mergeProductData(data, pageBuilderProps) {\n appData.set('enabledTechnologies', data.enabledTechnologies)\n appData.set(\n 'currentTechnology',\n data.enabledTechnologies\n ?.filter(tech => tech.isSelected)[0]\n ?.id?.split('/')\n .at(-1) ?? null\n )\n\n appData.set('products', data.categories)\n appData.set('translations', data.translations)\n appData.set('nav_links', data.nav_links)\n appData.set('bubbles', data.bubbles)\n appData.set('hide_sort_and_filter', pageBuilderProps.options?.hide_sort_and_filter)\n appData.set('options', pageBuilderProps.options)\n appData.set('maxIntensity', data.maxIntensity)\n appData.set('campaign', getTrackingData(pageBuilderProps))\n}\n\nfunction mergeFilters(data, { pageBuilderProps, dataSortService, filtersService }) {\n const sort = dataSortService(pageBuilderProps)\n const filters = filtersService(\n appData.get('products'),\n pageBuilderProps,\n data.categoriesExtraData,\n data.translations,\n {\n priceFormatter: appData.get('priceFormatter'),\n currency: appData.get('currency')\n }\n )\n\n appData.set('filters', filters)\n appData.set('sortOptions', sort)\n appData.set('sortCurrent', sort[0])\n}\n\nfunction setUrlOverrides() {\n const urlFilters = getUrlVariable(QUERY_URL_PARAMETER_FILTERS)\n if (urlFilters && urlFilters.length > 0) {\n const filterData = cleanFilterDataXSS(appData.get('filters'), urlFilters)\n if (filterData.length > 0) {\n filterData.forEach((filter, index) => {\n const isLast = index === filterData.length - 1\n appData.filtersUpdate(filter, isLast)\n })\n }\n }\n\n const urlSort = getUrlVariable(QUERY_URL_PARAMETER_SORT)\n if (urlSort) {\n const sortData = cleanSortDataXSS(appData.get('sortOptions'), urlSort)\n if (sortData.length > 0) {\n appData.set('sortCurrent', sortData[0])\n }\n }\n}\n\nfunction handleExperiments() {\n if (runningExperiment(EXPLICIT_FILTERS)) {\n appData.filterChipsUpdate()\n\n const notCurrentTech = appData\n .get('enabledTechnologies')\n .find(tech => tech.url !== window.location.pathname)\n if (notCurrentTech) {\n loadFromUrl(notCurrentTech.url, true)\n }\n }\n}\n","export function getTrackingData(pageBuilderProps) {\n // Backward compatibility for when data was at root of object\n const {\n campaign_id,\n campaign_name,\n campaign_creative = null,\n campaign_position\n } = pageBuilderProps\n\n if (!campaign_creative) {\n const { campaign = null } = pageBuilderProps\n return campaign\n }\n\n return {\n id: campaign_id,\n name: campaign_name,\n position: campaign_position,\n creative: campaign_creative\n }\n}\n","import appEvents from './plp.events'\n\nexport default (customEventName, eventData, eventFn = null) => {\n stateTransitionsManager(\n new CustomEvent(customEventName, {\n detail: {\n value: eventData,\n fn: eventFn\n }\n })\n )\n}\n\nconst stateTransitionsManager = event => {\n appEvents[event.type]?.process(event, handlePostEvent)\n}\n\nconst handlePostEvent = e => {\n appEvents[e.type]?.nextState(e)\n}\n","import { EVENT_SORT_BY_CHANGE } from '@kissui/components'\nimport { NespressoElement } from '@kissui/components/src/nespressoElement'\nimport './plp.filter-popin.mobileDropDown.scss'\nimport appData from '../../../store/plp.data'\nimport { SORT_MENU_MOBILE_ID, SORT_MENU_ID } from '../../../config/constants'\nimport { escapeHtml } from '@kissui/helpers/src/utils'\n\nclass PlpFilterPopinMobileDropdown extends NespressoElement {\n #SORT_MENU_ID = SORT_MENU_MOBILE_ID\n\n constructor() {\n super()\n this.formatSortSeparator = '::'\n appData.subscribe(this.componentUpdated.bind(this))\n this.boundOnSortChange = this.onSortChange.bind(this)\n }\n\n onStart() {\n const data = document.getElementById(SORT_MENU_ID)?.getAttribute('data')\n if (data) {\n this.template = `\n <nb-dropdown\n id=\"${this.#SORT_MENU_ID}\"\n data-testId=\"plp-sort-menu-mobile\"\n data=\"${escapeHtml(data)}\"></nb-dropdown>`\n }\n }\n\n onReady() {\n this.sortButton = document.getElementById(this.#SORT_MENU_ID)\n this.sortButton?.addEventListener(EVENT_SORT_BY_CHANGE, this.boundOnSortChange)\n }\n\n componentUpdated() {\n const { key, order } = appData.get('sortCurrent')\n this.sortButton?.setSelected(`${key}${this.formatSortSeparator}${order}`)\n }\n\n onSortChange(e) {\n const [key, order] = e.detail.selected.value.split(this.formatSortSeparator)\n appData.set('sortCurrent', { key, order })\n }\n\n onDestroy() {\n this.sortButton?.removeEventListener(EVENT_SORT_BY_CHANGE, this.boundOnSortChange)\n appData.unsubscribe(this.componentUpdated)\n }\n}\n\ncustomElements.get('plp-filter-sort-mobile') ||\n customElements.define('plp-filter-sort-mobile', PlpFilterPopinMobileDropdown)\n\nexport default PlpFilterPopinMobileDropdown\n","import { NespressoElement } from '@kissui/components/src/nespressoElement'\nimport './plp.filter-popin.content.scss'\nimport '../plp.filterImports'\nimport appData from '../../../store/plp.data'\nimport { EXPLICIT_FILTERS, runningExperiment } from '../../../config/experiments'\n\nclass PlpFilterPopinContent extends NespressoElement {\n #filters = []\n\n constructor() {\n super()\n appData.subscribe(this.onStoreChanges.bind(this))\n }\n\n onStoreChanges() {\n if (runningExperiment(EXPLICIT_FILTERS)) {\n // Force re-init if the filters have changed\n if (this.#filters !== appData.get('filters')) {\n this.onStart()\n this.render(true)\n this.onReady()\n }\n }\n\n this.querySelectorAll('nb-chip').forEach(chip => {\n chip.setAttribute(\n 'disabled',\n '' + this.isDisabled(chip.dataset.filterKey, chip.dataset.filterValue)\n )\n chip.setAttribute(\n 'checked',\n '' + this.isChecked(chip.dataset.filterKey, chip.dataset.filterValue)\n )\n\n if (runningExperiment(EXPLICIT_FILTERS)) {\n const labelEl = chip.querySelector('label span')\n const label = this.getLabel(chip.dataset.filterKey, chip.dataset.filterValue)\n labelEl.textContent = label\n labelEl.setAttribute('phantom', label)\n }\n })\n }\n\n onStart() {\n this.#filters = appData.get('filters')\n\n this.template =\n this.#filters\n ?.map(filter => {\n return `${filter.renderBefore()}\n ${filter.values\n .map(value => {\n value.disabled = this.isDisabled(filter.key, value.value)\n return value.render()\n })\n .join('')}\n ${filter.renderAfter()}`\n })\n .join('') ?? ''\n }\n\n onReady() {\n this.querySelectorAll('nb-chip').forEach(chip => {\n chip.addEventListener('change', this.handleChipEvent)\n })\n }\n\n isDisabled = (type, value) =>\n appData.productsListFiltered({ withSort: false }).filter(product => {\n if (!product[type]) {\n return false\n }\n if (typeof product[type] === 'string') {\n return product[type] === value\n } else if (typeof product[type] === 'number' && typeof value === 'number') {\n return value === product[type]\n } else if (typeof product[type] === 'number') {\n return JSON.parse('[' + value + ']').includes(product[type])\n } else {\n return !!product[type].includes(value)\n }\n }).length === 0\n\n isChecked = (key, value) =>\n appData\n .get('filtersSelected')\n .filter(fSelected => fSelected.key === key && fSelected.value === value).length > 0\n\n getLabel(key, value) {\n let filterValue\n appData.get('filters').some(item => {\n if (item.key !== key) {\n return false\n }\n filterValue = item.values.find(itemValue => {\n if (typeof itemValue.value === 'string') {\n return itemValue.value === value\n } else if (typeof itemValue.value === 'number' && typeof value === 'number') {\n return value === itemValue.value\n } else if (typeof itemValue.value === 'number') {\n return JSON.parse('[' + value + ']').includes(itemValue.value)\n } else {\n return !!itemValue.value.includes(value)\n }\n })\n if (filterValue) {\n return true\n }\n })\n\n const count = filterValue?.productCount ? ` (${filterValue.productCount})` : ''\n return `${filterValue.label}${count}`\n }\n\n onDestroy() {\n appData.unsubscribe(this.onStoreChanges)\n\n this.querySelectorAll('nb-chip').forEach(chip => {\n chip.removeEventListener('change', this.handleChipEvent)\n })\n }\n\n handleChipEvent(e) {\n e.stopPropagation()\n\n const filter = {\n key: e.target.parentNode.dataset.filterKey,\n value: e.target.parentNode.dataset.filterValue,\n selected: e.target.checked, // todo only works for checkbox\n label: e.target.parentNode.dataset.filterLabel\n }\n\n appData.filtersUpdate(filter)\n }\n}\n\ncustomElements.get('plp-filter-popin-content') ||\n customElements.define('plp-filter-popin-content', PlpFilterPopinContent)\n\nexport default PlpFilterPopinContent\n","import { EVENT_POPIN_CLOSE } from '@kissui/components'\nimport { NespressoElement } from '@kissui/components/src/nespressoElement'\nimport './plp.filter-popin.footer.scss'\nimport appData from '../../../store/plp.data'\nimport { customEvent } from '@kissui/helpers/src/gtmEvents'\n\nconst CATEGORY_IDENTIFIER = '/cat/'\n\nclass PlpFilterPopinFooter extends NespressoElement {\n constructor() {\n super()\n appData.subscribe(this.componentUpdated.bind(this))\n }\n\n onStart() {\n const translations = appData.translations\n const { a11y_see_result_number_label } = this.props\n this.template = `\n <nb-link\n class=\"nb-filter-popin-reset-all\"\n size=\"large\"\n color=\"black\"\n style=\"visibility: hidden\"\n >\n ${translations['productlistrespblock.resetfilters.label']}\n </nb-link>\n <nb-cta\n class=\"nb-filter-popin-see-results\"\n variation=\"secondary\"\n style=\"visibility: hidden\"\n aria_label_after=\"${a11y_see_result_number_label}\"\n >\n </nb-cta>\n `\n }\n\n getA11ySeeResultsText() {\n const { see_result_number_label, see_result_number_label_one } = this.props\n const productsFilteredCount = appData.productsFilteredCount()\n const label =\n productsFilteredCount === 1 ? see_result_number_label_one : see_result_number_label\n return label?.replace('{resultsLength}', '' + productsFilteredCount)\n }\n\n onReady() {\n this.componentUpdated()\n this.querySelector('.nb-filter-popin-reset-all')?.addEventListener('click', () => {\n const filtersTracking = this.filtersTracking()\n customEvent({\n event_GA4: true,\n event: 'plp_filter',\n action_type: 'filter clear',\n filter_type: filtersTracking.types,\n filter_values: filtersTracking.values\n })\n appData.filtersReset()\n this.setAttribute('data-refresh', 'true')\n })\n this.querySelector('.nb-filter-popin-see-results')?.addEventListener('click', () => {\n window.dispatchEvent(new CustomEvent(EVENT_POPIN_CLOSE))\n const filtersTracking = this.filtersTracking()\n customEvent({\n event_GA4: true,\n event: 'plp_filter',\n action_type: 'filter apply',\n filter_type: filtersTracking.types,\n filter_values: filtersTracking.values\n })\n })\n }\n\n filtersTracking() {\n let types = []\n let values = []\n const filtersSelected = appData.get('filtersSelected')\n if (filtersSelected && filtersSelected.length) {\n for (let i = 0; i < filtersSelected.length; i++) {\n const filter = filtersSelected[i]\n const value =\n filter.value.indexOf(CATEGORY_IDENTIFIER) > -1\n ? filter.value.substring(\n filter.value.indexOf(CATEGORY_IDENTIFIER) + CATEGORY_IDENTIFIER.length\n )\n : filter.value\n if (types.indexOf(filter.key) > -1) {\n values[types.indexOf(filter.key)] += ',' + value\n } else {\n types.push(filter.key)\n values.push(value)\n }\n }\n }\n\n return {\n types: types.join('|'),\n values: values.join('|')\n }\n }\n\n componentUpdated() {\n const productsFilteredCount = appData.productsFilteredCount()\n const filtersSelectedCount = appData.filtersSelectedCount()\n\n const btnReset = this.querySelector('.nb-filter-popin-reset-all')\n const btnResult = this.querySelector('.nb-filter-popin-see-results')\n\n btnReset.style.visibility =\n filtersSelectedCount && filtersSelectedCount > 0 ? 'visible' : 'hidden'\n btnResult.style.visibility =\n productsFilteredCount && productsFilteredCount > 0 ? 'visible' : 'hidden'\n\n btnResult.querySelector('span').textContent = this.getA11ySeeResultsText()\n btnResult.querySelector('button').setAttribute('aria-label', this.getA11ySeeResultsText())\n }\n\n onDestroy() {\n appData.unsubscribe(this.onStoreChanges)\n }\n}\n\ncustomElements.get('plp-filter-popin-footer') ||\n customElements.define('plp-filter-popin-footer', PlpFilterPopinFooter)\n\nexport default PlpFilterPopinFooter\n","import { BREAKPOINT_M, EVENT_POPIN_CLOSED } from '@kissui/components'\nimport { NespressoElement } from '@kissui/components/src/nespressoElement'\nimport handleAppEvent from '../../store'\nimport { FILTER_MAIN_BLOCK_ID, POPIN_ID } from '../../config/constants'\nimport appData from '../../store/plp.data'\nimport './plp.filter-popin.scss'\nimport './popin/plp.filter-popin.mobileDropDown'\nimport './popin/plp.filter-popin.content'\nimport './popin/plp.filter-popin.footer'\n\nclass PlpFilterPopin extends NespressoElement {\n onStart() {\n this.props = this._createProps(\n document.getElementById(FILTER_MAIN_BLOCK_ID).parentElement.attributes\n )\n\n const {\n see_result_number_label = 'See {resultsLength} Results',\n see_result_number_label_zero = 'No Result',\n see_result_number_label_one = 'See One Result',\n a11y_see_result_number_label = 'Close and validate filters'\n } = this.props.copywriting || this.props\n // todo: line above is backward compatibility fallback for coffee PLP projects without \"copywriting\"\n // Consider moving the backward compatibility into Coffee PLP DTO to avoid this in the code\n\n const isMobile =\n appData.innerWidth < BREAKPOINT_M\n ? '<plp-filter-sort-mobile></plp-filter-sort-mobile>'\n : ''\n\n this.template = `\n ${isMobile}\n <div class=\"mobileShadow\">\n <header>\n <h2 class=\"t-sm-700-sl\">${appData.translations['productlistrespblock.filter.label']}</h2>\n </header>\n <section>\n <plp-filter-popin-content\n ></plp-filter-popin-content>\n </section>\n <footer>\n <plp-filter-popin-footer\n see_result_number_label=\"${see_result_number_label}\"\n see_result_number_label_zero=\"${see_result_number_label_zero}\"\n see_result_number_label_one=\"${see_result_number_label_one}\"\n a11y_see_result_number_label=\"${a11y_see_result_number_label}\"\n ></plp-filter-popin-footer>\n </footer>\n </div>`\n }\n\n onReady() {\n window.addEventListener(EVENT_POPIN_CLOSED, this.eventPopinClsed)\n }\n\n onDestroy() {\n window.removeEventListener(EVENT_POPIN_CLOSED, this.eventPopinClsed)\n }\n\n eventPopinClsed(e) {\n e.stopPropagation()\n if (e.detail.id === POPIN_ID) {\n handleAppEvent('onFilter')\n }\n }\n}\n\ncustomElements.get('plp-filter-popin') || customElements.define('plp-filter-popin', PlpFilterPopin)\n\nexport default PlpFilterPopin\n","import { NespressoElement } from '@kissui/components/src/nespressoElement'\nimport handleAppEvent from '../../store'\nimport './plp.filter-cta.scss'\nimport { customEvent } from '@kissui/helpers/src/gtmEvents'\n\nclass PlpFilterCta extends NespressoElement {\n bubbleElement = null\n\n static get observedAttributes() {\n return ['data-filter-counter']\n }\n\n attributeChangedCallback(name, oldVal, newVal) {\n if (newVal != null && newVal.length > 0 && newVal !== oldVal) {\n if (name === 'data-filter-counter') {\n this.updateBubbleCounter(newVal)\n }\n }\n }\n\n onStart() {\n this.template = `<nb-cta id='plp-filter' size='40' variation='plpFilter' icon_right='24/symbol/filter'>${this.props.cta_filter_label}</nb-cta>`\n }\n\n onReady() {\n document.getElementById('plp-filter').addEventListener('click', () => {\n handleAppEvent('onloadFilter', {})\n customEvent({\n event_GA4: true,\n event: 'plp_filter',\n action_type: 'filter open'\n })\n })\n\n this.buttonElement = this.querySelector('nb-cta button')\n this.bubbleElement = document.createElement('div')\n this.bubbleElement.classList.add('t-2xs-700-sl')\n this.bubbleElement.classList.add('bubbleCounter')\n this.bubbleElement.innerHTML = '0'\n this.firstChild.firstChild.appendChild(this.bubbleElement)\n }\n\n updateBubbleCounter(counter) {\n if (!this.bubbleElement) {\n return null\n }\n\n this.bubbleElement.innerHTML = counter\n counter === '0'\n ? this.buttonElement.classList.remove('bubbleActive')\n : this.buttonElement.classList.add('bubbleActive')\n }\n}\n\ncustomElements.get('plp-filter-cta') || customElements.define('plp-filter-cta', PlpFilterCta)\n\nexport default PlpFilterCta\n","import { NespressoElement } from '@kissui/components/src/nespressoElement'\nimport { stringifyForAttribute } from '@kissui/helpers/src/utils'\nimport './plp.filter-links.scss'\nimport './plp.filter-links-slider.scss'\nimport { readEvent } from '@kissui/helpers/src/assets/js/eventDispatch'\nimport { EVENT_SLIDER_READY } from '@kissui/components'\n\nconst SLIDER_NAV_LINKS_ID = 'slider_natural_nav_links'\n\nclass PlpFilterLinks extends NespressoElement {\n constructor() {\n super()\n this.boundReinitSlider = this.reinitSlider.bind(this)\n }\n\n onStart() {\n this.addEventListener(EVENT_SLIDER_READY, this.boundReinitSlider)\n\n const sliderData = {\n options: {\n mobile: {\n items_per_slide: 'auto',\n item_width: 'auto',\n slide_min_height: '40',\n slider_gap: '0',\n display_buttons: 'false',\n display_nav: 'false',\n overflow: 'false',\n flex_auto: 'true',\n display_gradients: 'true',\n gradients_color: '#FFFFFF',\n gradients_width: '8',\n placeholder_background: 'transparent'\n },\n tablet: {\n items_per_slide: 'auto',\n item_width: 'auto',\n slide_min_height: '80',\n slider_gap: '0',\n display_buttons: 'true',\n display_nav: 'false',\n overflow: 'false',\n flex_auto: 'true',\n display_gradients: 'true',\n gradients_color: '#FFFFFF',\n placeholder_background: 'transparent'\n },\n desktop: {\n items_per_slide: 'auto',\n item_width: 'auto',\n slide_min_height: '80',\n slider_gap: '0',\n display_buttons: 'true',\n display_nav: 'false',\n overflow: 'false',\n flex_auto: 'true',\n display_gradients: 'true',\n gradients_color: '#FFFFFF',\n placeholder_background: 'transparent'\n }\n },\n a11y_labels: {\n prev: this.props.a11y_slider_previous_button,\n next: this.props.a11y_slider_next_button,\n nav: 'Go to slide'\n }\n }\n\n this.template = `<nb-slider-natural\n id='${SLIDER_NAV_LINKS_ID}'\n data=\"${stringifyForAttribute(sliderData)}\">\n ${this.renderLinksList()}\n </nb-slider-menu>`\n }\n\n renderLinksList() {\n const { navigation = [] } = this.props\n\n return navigation\n .map(\n ({\n link = '',\n icon_left = '',\n seo_label = '',\n tracking_label = '',\n label = '',\n selected = false\n }) =>\n `<li><nb-link\n link='${link}'\n size='large'\n phantom='true'\n color='black'\n selected=${selected}\n ${seo_label && `seo_label='${seo_label}'`}\n ${tracking_label && `tracking_label='${tracking_label}'`}\n ${icon_left && `icon_left='${icon_left}'`}\n >${label}</nb-link></li>`\n )\n .join('')\n }\n\n reinitSlider(e) {\n const { id } = readEvent(e)\n if (id !== SLIDER_NAV_LINKS_ID) {\n return\n }\n e.target.initSlider()\n }\n\n /*bindEvents() {\n this.unbindEvents()\n this.link.addEventListener('click', this.boundHandleClick)\n }\n\n unbindEvents() {\n this.link.removeEventListener('click', this.boundHandleClick)\n }*/\n\n disconnectedCallback() {\n this.removeEventListener(EVENT_SLIDER_READY, this.boundReinitSlider)\n }\n}\n\ncustomElements.get('plp-filter-links') || customElements.define('plp-filter-links', PlpFilterLinks)\n\nexport default PlpFilterLinks\n","import { EVENT_SORT_BY_CHANGE } from '@kissui/components'\nimport { NespressoElement } from '@kissui/components/src/nespressoElement'\n\nimport handleAppEvent from '../../store'\nimport appData from '../../store/plp.data'\nimport { stringifyForAttribute } from '@kissui/helpers/src/utils'\nimport { SORT_MENU_ID } from '../../config/constants'\nimport { FILTER_MAIN_BLOCK_ID } from '../../config/constants'\n\nclass PlpFilterSort extends NespressoElement {\n #SORT_MENU_ID = SORT_MENU_ID\n\n constructor() {\n super()\n this.formatSortSeparator = '::'\n appData.subscribe(this.componentUpdated.bind(this))\n this.boundOnSortChange = this.onSortChange.bind(this)\n }\n\n onStart() {\n this.props = this._createProps(\n document.getElementById(FILTER_MAIN_BLOCK_ID).parentElement.attributes\n )\n\n const {\n label_sort_by = 'Sort by',\n aa_description_sort_by = 'You can select different sorting values from this listbox. To interact with this listbox press SPACE or ENTER key.',\n aa_listbox_description_sort_by = 'You can navigate through the options using UP or DOWN arrows keys. To exit this listbox press ESCAPE key.',\n aa_select_description_sort_by = 'To select this option press SPACE or ENTER key.',\n label_close_sort_by = 'Close'\n } = this.props\n\n const options = appData.get('sortOptions').map(option => ({\n label: option.label,\n value: this._formatSortValue(option.key, option.order),\n checked: option.checked\n }))\n\n if (appData.get('sortCurrent').key !== appData.get('sortOptions')[0].key) {\n options.forEach(option => {\n option.checked =\n option.value ===\n this._formatSortValue(\n appData.get('sortCurrent').key,\n appData.get('sortCurrent').order\n )\n })\n }\n\n const data = {\n label: label_sort_by,\n aa_description: aa_description_sort_by,\n aa_listbox_description: aa_listbox_description_sort_by,\n aa_select_description: aa_select_description_sort_by,\n icon_option: '16/symbol/check',\n label_close: label_close_sort_by,\n options: options\n }\n\n this.template = `<nb-dropdown id=\"${this.#SORT_MENU_ID}\" data='${stringifyForAttribute(\n data\n )}'/>`\n }\n\n onReady() {\n this.sortButton = document.getElementById(this.#SORT_MENU_ID)\n this.sortButton?.addEventListener(EVENT_SORT_BY_CHANGE, this.boundOnSortChange)\n }\n\n componentUpdated() {\n const { key, order } = appData.get('sortCurrent')\n this.sortButton?.setSelected(this._formatSortValue(key, order))\n }\n\n onSortChange(e) {\n const [key, order] = e.detail.selected.value.split(this.formatSortSeparator)\n appData.set('sortCurrent', { key, order })\n handleAppEvent('onSort')\n }\n\n onDestroy() {\n this.sortButton?.removeEventListener(EVENT_SORT_BY_CHANGE, this.boundOnSortChange)\n appData.unsubscribe(this.componentUpdated)\n }\n\n _formatSortValue(key, order) {\n return `${key}${this.formatSortSeparator}${order}`\n }\n}\n\ncustomElements.get('plp-filter-sort') || customElements.define('plp-filter-sort', PlpFilterSort)\n\nexport default PlpFilterSort\n","import { NespressoElement } from '@kissui/components/src/nespressoElement'\nimport { stringifyForAttribute } from '@kissui/helpers/src/utils'\n\nimport './_plp.filter.main.scss'\nimport './plp.filter-cta'\nimport './plp.filter-links'\nimport './plp.filter-sort'\nimport appData from '../../store/plp.data'\nimport { customEvent } from '@kissui/helpers/src/gtmEvents'\n\nclass PlpFilter extends NespressoElement {\n static get observedAttributes() {\n return ['data-request', 'data-filter-counter']\n }\n\n attributeChangedCallback(name, oldVal, newVal) {\n if (newVal != null && newVal !== oldVal && newVal.length > 0) {\n if (name === 'data-request') {\n this.updateComponent()\n } else if (name === 'data-filter-counter') {\n document\n .getElementById('plp-filter-cta')\n .setAttribute('data-filter-counter', newVal)\n }\n }\n }\n\n onStart() {\n this.props = this._createProps(this.parentElement.attributes)\n this.classList.add('plp-filter')\n }\n\n updateComponent() {\n const nav_links = appData.get('nav_links')\n /* Some markets still using PB old PB export which has 4 campaign param instead of one campaign object.\n This change adds a fallback to work with both the cases. */\n const campaign = {\n id: this.props.campaign_id,\n creative: this.props.campaign_creative,\n name: this.props.campaign_name,\n position: this.props.campaign_position\n }\n\n const HTML = `\n <div class='plp-filter-restrict'>\n <plp-filter-cta\n id=\"plp-filter-cta\"\n cta_filter_label=\"${\n this.props.copywriting?.cta_filter_label || this.props.cta_filter_label\n }\"\n data-filter-counter=\"0\"\n ></plp-filter-cta>\n <plp-filter-links\n data = '${stringifyForAttribute({\n navigation: nav_links,\n a11y_slider_previous_button: this.props.a11y_slider_previous_button,\n a11y_slider_next_button: this.props.a11y_slider_next_button,\n campaign: this.props.campaign || campaign\n })}'\n ></plp-filter-links>\n <plp-filter-sort></plp-filter-sort>\n </div>`\n this.loadTemplate(HTML)\n this.filterLinks = this.querySelectorAll('nb-slider-natural nb-link a')\n this.bindEvents()\n }\n\n linkClick({ textContent }) {\n customEvent({\n eventAction: 'PLP Content Tab',\n eventLabel: textContent\n })\n }\n\n bindEvents() {\n this.unbindEvents()\n if (this.filterLinks?.length) {\n this.filterLinks.forEach(element => {\n const textContent = element.querySelector('span').textContent\n element.boundLinkClick = this.linkClick.bind(this, { textContent })\n element.addEventListener('click', element.boundLinkClick)\n })\n }\n }\n\n unbindEvents() {\n if (this.filterLinks?.length) {\n this.filterLinks.forEach(element => {\n element.removeEventListener('click', element.boundLinkClick)\n })\n }\n }\n}\n\ncustomElements.get('plp-filter') || customElements.define('plp-filter', PlpFilter)\n\nexport default PlpFilter\n","/* eslint-disable */\n\nconst stickyService = () => {\n let element = null\n let elementHeight = 0\n let stickyElementSelector = ''\n let magicIndex = 2 // FFS\n\n const initialize = (\n $element,\n $elementHeight = elementHeight,\n $stickyElementSelector = stickyElementSelector,\n $magicIndex = magicIndex\n ) => {\n element = $element\n elementHeight = $elementHeight\n stickyElementSelector = $stickyElementSelector\n magicIndex = $magicIndex\n element.setAttribute('sticky', 'false')\n element.classList.add('nb-sticky-container')\n updateSticky()\n bindEvent()\n }\n\n const updateSticky = () => {\n const sticky = element.getAttribute('sticky') || 'false'\n let offsetElement = 0\n let isReady = false\n let parent = {}\n for (var i = 0; i < element.parentElement.childNodes.length; i++) {\n if (\n element.parentElement.childNodes[i].tagName &&\n element.parentElement.childNodes[i].tagName === element.tagName\n ) {\n parent = element.parentElement.childNodes[i + magicIndex]\n if (parent) {\n // todo : why 80px here ? if it's header height it should take other banners in consideration ?\n offsetElement = parent.offsetTop - 80\n isReady = true\n }\n }\n if (isReady) {\n break\n }\n }\n // todo review this flow, it's when the sticky element is the first of the list of childrens\n if (isReady && offsetElement === 0) {\n offsetElement = element.parentElement.offsetTop + element.parentElement.offsetHeight\n }\n const boundary = window.scrollY - offsetElement\n const isSticky = boundary > 0\n\n if ((sticky === 'true') !== isSticky) {\n element.setAttribute('sticky', isSticky)\n if (elementHeight > 0) {\n document.body.style.paddingTop = isSticky ? elementHeight + 'px' : '0px'\n }\n }\n }\n\n const destroy = () => {\n unbindEvent()\n }\n\n const bindEvent = () => {\n window.addEventListener('scroll', updateSticky)\n }\n\n const unbindEvent = () => {\n window.removeEventListener('scroll', updateSticky)\n }\n\n const updatePosition = (offset = 0) => {\n let el = element\n if (stickyElementSelector !== '') {\n el = element.querySelector(stickyElementSelector)\n }\n if (!el) {\n return\n }\n\n const $header = document.querySelector('.Header__top')\n const headerRect = $header?.getBoundingClientRect() || { height: 0, y: 0 }\n const header = { height: headerRect.height, top: headerRect.y }\n\n const top = `${header.top + header.height + offset}px`\n el.style.top = top\n\n return 0\n }\n\n return { initialize, destroy, updatePosition }\n}\n\nconst service = stickyService()\n\nexport default service\n","import { stringifyForAttribute } from '@kissui/helpers/src/utils'\nimport appData from '../../store/plp.data'\n\nconst dataTransformNavLinks = navLinks => {\n return navLinks ? stringifyForAttribute({ navigation: navLinks }) : ''\n}\n\nconst dataTransformNavigationBubbles = ({\n bubbles,\n // todo remove ity\n // navigation_bubbles,\n a11y_slider_previous_button,\n a11y_slider_next_button,\n campaign,\n selected_nav_link_label\n}) => {\n return bubbles\n ? stringifyForAttribute({\n a11y_slider_previous_button,\n a11y_slider_next_button,\n bubbles: bubbles,\n customEventAction: 'PLP Content Tab',\n campaign,\n selected_nav_link_label\n })\n : ''\n}\n\nexport const render = (props, campaign) => {\n const { a11y_slider_previous_button, a11y_slider_next_button } = props\n const nav_links = appData.get('nav_links') || []\n const bubbles = appData.get('bubbles') || []\n const selected_nav_link = nav_links.find(nav_link => nav_link.selected)\n const selected_nav_link_label = selected_nav_link?.label\n\n const data_navigation_bubbles = dataTransformNavigationBubbles({\n bubbles,\n ...props,\n campaign,\n selected_nav_link_label\n })\n\n return `\n <nb-navigation-bubbles data='${data_navigation_bubbles}'></nb-navigation-bubbles>\n <nb-plp-sticky-bar\n data=\"${dataTransformNavLinks(nav_links)}\"\n a11y_slider_previous_button=\"${a11y_slider_previous_button}\"\n a11y_slider_next_button=\"${a11y_slider_next_button}\"\n navigation_bubbles=\"${data_navigation_bubbles}\"\n selected_nav_link_label=\"${selected_nav_link_label}\"\n ></nb-plp-sticky-bar>\n `\n}\n","import{h as t,hydrate as e,render as n,cloneElement as o}from\"preact\";function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function i(t){this.getChildContext=function(){return t.context};var e=t.children,n=function(t,e){if(null==t)return{};var n,o,r={},i=Object.keys(t);for(o=0;o<i.length;o++)e.indexOf(n=i[o])>=0||(r[n]=t[n]);return r}(t,[\"context\",\"children\"]);return o(e,n)}function a(){var o=new CustomEvent(\"_preact\",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(o),this._vdom=t(i,r({},this._props,{context:o.detail.context}),function e(n,o){if(3===n.nodeType)return n.data;if(1!==n.nodeType)return null;var r=[],i={},a=0,c=n.attributes,l=n.childNodes;for(a=c.length;a--;)\"slot\"!==c[a].name&&(i[c[a].name]=c[a].value,i[s(c[a].name)]=c[a].value);for(a=l.length;a--;){var p=e(l[a],null),d=l[a].slot;d?i[d]=t(u,{name:d},p):r[a]=p}var h=o?t(u,null,r):r;return t(o||n.nodeName.toLowerCase(),i,h)}(this,this._vdomComponent)),(this.hasAttribute(\"hydrate\")?e:n)(this._vdom,this._root)}function s(t){return t.replace(/-(\\w)/g,function(t,e){return e?e.toUpperCase():\"\"})}function c(t,e,r){if(this._vdom){var i={};i[t]=r=null==r?void 0:r,i[s(t)]=r,this._vdom=o(this._vdom,i),n(this._vdom,this._root)}}function l(){n(this._vdom=null,this._root)}function u(e,n){var o=this;return t(\"slot\",r({},e,{ref:function(t){t?(o.ref=t,o._listener||(o._listener=function(t){t.stopPropagation(),t.detail.context=n},t.addEventListener(\"_preact\",o._listener))):o.ref.removeEventListener(\"_preact\",o._listener)}}))}export default function(t,e,n,o){function r(){var e=Reflect.construct(HTMLElement,[],r);return e._vdomComponent=t,e._root=o&&o.shadow?e.attachShadow({mode:\"open\"}):e,e}return(r.prototype=Object.create(HTMLElement.prototype)).constructor=r,r.prototype.connectedCallback=a,r.prototype.attributeChangedCallback=c,r.prototype.disconnectedCallback=l,n=n||t.observedAttributes||Object.keys(t.propTypes||{}),r.observedAttributes=n,n.forEach(function(t){Object.defineProperty(r.prototype,t,{get:function(){return this._vdom.props[t]},set:function(e){this._vdom?this.attributeChangedCallback(t,null,e):(this._props||(this._props={}),this._props[t]=e,this.connectedCallback());var n=typeof e;null!=e&&\"string\"!==n&&\"boolean\"!==n&&\"number\"!==n||this.setAttribute(t,e)}})}),customElements.define(e||t.tagName||t.displayName||t.name,r)}\n//# sourceMappingURL=preact-custom-element.esm.js.map\n","import { useState, useEffect } from 'preact/hooks'\n\ninterface PubSub {\n subscribe: (func: () => void) => void\n unsubscribe: (func: () => void) => void\n}\n\nexport default function useAppData<T extends PubSub>(appData: T): T {\n const [data, setData] = useState<T>(appData)\n\n useEffect(() => {\n const onEmit = () => {\n setData(appData)\n }\n\n appData.subscribe(onEmit)\n\n return () => {\n appData.unsubscribe(onEmit)\n }\n }, [appData])\n\n return data\n}\n","import { NespressoElement } from '@kissui/components/src/nespressoElement'\nimport stickyService from '@kissui/components/src/sticky/sticky.service'\nimport * as navigationBar from './plp.bar'\nimport './_plp.navigation.main.scss'\n\n/*\nSpecs:\n- [✓] Add sticky bar height 180\n- [✓] Add sticky bar on mobile, height 132px\n- [✓] If there is products filtered, remove the sticky bar\n */\n\nclass PlpNavigation extends NespressoElement {\n #isSticky = true\n\n onStart() {\n this.props = this._createProps(this.parentElement.attributes)\n\n // attribute magic-index is used in the sticky service to override the element picked as the \"below the fold\" point :-(\n const magicIndex = this.attributes.getNamedItem('magic-index')\n ? Number(this.attributes.getNamedItem('magic-index').value)\n : undefined\n\n this.#isSticky && stickyService.initialize(this, 0, 'nb-plp-sticky-bar', magicIndex)\n }\n\n static get observedAttributes() {\n return ['sticky', 'data-request']\n }\n\n attributeChangedCallback(name, oldVal, newVal) {\n if (newVal !== null && newVal !== oldVal && newVal.length) {\n if (name === 'sticky') {\n this.#isSticky && stickyService.updatePosition()\n }\n if (name === 'data-request') {\n this.updateComponent()\n }\n }\n }\n\n updateComponent() {\n /* Some markets still using PB old PB export which has 4 campaign param instead of one campaign object.\n This change adds a fallback to work with both the cases. */\n const campaign = {\n id: this.props.campaign_id,\n creative: this.props.campaign_creative,\n name: this.props.campaign_name,\n position: this.props.campaign_position\n }\n const HTML = navigationBar.render(\n this.props.copywriting ? this.props.copywriting : this.props,\n this.props.campaign || campaign,\n true\n )\n this.loadTemplate(HTML)\n }\n\n onDestroy() {\n this.#isSticky && stickyService.destroy()\n }\n}\n\ncustomElements.get('plp-navigation') || customElements.define('plp-navigation', PlpNavigation)\n\nexport default PlpNavigation\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import{options as r}from\"preact\";export{Fragment}from\"preact\";var _=0;function o(o,e,n,t,f,l){var s,u,a={};for(u in e)\"ref\"==u?s=e[u]:a[u]=e[u];var i={type:o,props:a,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--_,__source:f,__self:l};if(\"function\"==typeof o&&(s=o.defaultProps))for(u in s)void 0===a[u]&&(a[u]=s[u]);return r.vnode&&r.vnode(i),i}export{o as jsx,o as jsxDEV,o as jsxs};\n//# sourceMappingURL=jsxRuntime.module.js.map\n","import type { ComponentChildren } from 'preact'\nimport cn from 'classnames'\n\nimport styles from './ProductGrid.module.scss'\n\nexport type ProductGridProps = {\n children: ComponentChildren\n class?: string\n anchorId?: string\n}\n\nexport default function ProductGrid({ children, class: className, anchorId }: ProductGridProps) {\n return (\n <section data-id={anchorId} class={cn(styles.grid, className)}>\n {children}\n </section>\n )\n}\n","import type { ComponentChildren } from 'preact'\nimport cn from 'classnames'\n\nimport styles from './ProductCard.module.scss'\n\nexport type ProductCardProps = {\n onClick?: (event: MouseEvent) => void\n children?: ComponentChildren\n class?: string,\n shortSku: string\n}\n\n/**\n * Product cards use a custom 'subgrid' implementation, which require them to have a specific number\n * of rows as DOM child nodes to the main card element.\n *\n * This allows the cards' grid rows to line up with each other on the y-axis and each row of cards will\n * grow, pushing down all the others, depending on what content is inside all cards on the same row.\n *\n * Adding a custom data attribute \"data-product-short-sku\" to the \"ProductCard\" component to store the product code.\n * This will allow us to easily search for product cards in the DOM using this attribute.\n * Additionally, this approach ensures compatibility with The Toolbox.\n *\n * See: `packages/apps/src/mixins/_fauxGrid.scss` for the css implementation\n *\n */\nexport default function ProductCard({\n children,\n onClick = () => { },\n class: classname,\n shortSku,\n ...rest\n}: ProductCardProps) {\n return (\n <article class={cn(\n styles.card,\n classname\n )} onClick={onClick} {...rest} data-product-short-sku={shortSku}>\n {children}\n </article>\n )\n}\n","import type { ComponentChildren, JSX } from 'preact'\n\nexport type ProductCardSectionProps = {\n children?: ComponentChildren\n as?: JSX.ElementType\n class?: string\n style?: string\n}\n\nexport default function ProductCardSection({\n children,\n as = 'div',\n ...rest\n}: ProductCardSectionProps) {\n const El = as\n return <El {...rest}>{children}</El>\n}\n","import ProductCardSection from '../base/ProductCardSection'\n\nimport styles from './RowDividerSection.module.scss'\n\nexport default function RowDividerSection() {\n return <ProductCardSection class={styles.row}></ProductCardSection>\n}\n","import { ComponentChildren, JSX } from 'preact'\n\nimport ProductCardSection from '../base/ProductCardSection'\nimport cn from 'classnames'\n\nimport styles from './BackgroundSection.module.scss'\n\nexport type BackgroundSectionProps = {\n class?: string\n style?: string\n children?: ComponentChildren\n as?: JSX.ElementType\n enableHover?: boolean\n}\n\nexport default function BackgroundSection({\n class: className,\n style,\n children,\n as: asTag,\n enableHover = true\n}: BackgroundSectionProps) {\n return (\n <ProductCardSection\n as={asTag}\n style={style}\n class={cn(\n styles.background,\n {\n [styles.hoverEnabled]: enableHover\n },\n className\n )}>\n {children}\n </ProductCardSection>\n )\n}\n","export const CUPSIZE_ICON_DEFAULT = '24/cupsize/cupsize-espresso-ol'\n\nconst cupSizeLookup = {\n ristretto: '24/cupsize/cupsize-ristretto-ol',\n espresso: '24/cupsize/cupsize-espresso-ol',\n lungo: '24/cupsize/cupsize-lungo-ol',\n 'lungo-plus': '24/cupsize/cupsize-lungo-plus-ol',\n 'ristretto-vertuo': '24/cupsize/cupsize-ristretto-vl',\n 'espresso-vertuo': '24/cupsize/cupsize-espresso-vl',\n 'double-espresso-vertuo': '24/cupsize/cupsize-lungo-vl',\n 'lungo-vertuo': '24/cupsize/cupsize-lungo-vl',\n 'gran-lungo': '24/cupsize/cupsize-gran-lungo-vl',\n coffee: '24/cupsize/cupsize-mug-small-vl',\n 'mug-medium': '24/cupsize/cupsize-mug-medium-vl',\n 'mug-large': '24/cupsize/cupsize-mug-large-vl',\n 'paper-cup-extra-small-alt': '24/cupsize/paper-cup-extra-small-alt',\n 'paper-cup-extra-small': '24/cupsize/paper-cup-extra-small',\n 'paper-cup-large-alt': '24/cupsize/paper-cup-large-alt',\n 'paper-cup-large': '24/cupsize/paper-cup-large',\n 'paper-cup-medium-alt': '24/cupsize/paper-cup-medium-alt',\n 'paper-cup-medium': '24/cupsize/paper-cup-medium',\n 'paper-cup-small-alt': '24/cupsize/paper-cup-small-alt',\n 'paper-cup-small': '24/cupsize/paper-cup-small',\n xl: '24/accessory/travel-mug-vl',\n 'cold-brew': '24/coffee/cold-brew',\n 'carafe-vertuo': '24/cupsize/cupsize-carafe-vl',\n alto: '24/cupsize/cupsize-alto-vl',\n americano: '24/cupsize/cupsize-americano-ol',\n icedrecipe: '24/recipe/iced-coffee',\n 'icedrecipe-vertuo': '24/recipe/iced-vl',\n milk: '24/coffeenote/milky',\n 'cappuccino-and-latte-macchiato': '24/recipe/cappuccino-ol',\n 'double-cappuccino': '24/recipe/double-cappuccino-vl',\n reverso: '24/recipe/reverso-vl',\n 'cortado-cappuccino': '24/recipe/cortado-ol',\n 'ristretto-b2b': '',\n 'espresso-b2b': '',\n 'lungo-b2b': '',\n 'icedRecipe-b2b': ''\n}\n\n/**\n * @function\n * @description Returns the icon for a given cup size, or a default icon.\n * @param {string} cupSize\n * @param {boolean} returnDefaultIcon If true, an icon will always be returned, else `''`\n * @returns {string}\n */\nexport const getCupSizeIcon = (cupSize, returnDefaultIcon = true) => {\n const cupSizeStr = cupSize ? cupSize.split('/')?.pop() : ''\n\n const cupSizeKey = cupSizeStr\n .toLowerCase()\n .replace('capsule-cupsize-', '')\n .replace('machine-cupsize.', '') // This seems incorrect, but is the information we currenrtly have about this cup size\n\n return cupSizeLookup[cupSizeKey] || (returnDefaultIcon ? CUPSIZE_ICON_DEFAULT : '')\n}\n\n/**\n * @function\n * @description Returns the type of icon for a given cupsize, so to distinguish between\n * coffees for recipes or normal coffees\n * @param {string} cupSize\n * @returns {'recipe' | 'coffee'}\n */\nexport const getCupType = cupSize => {\n const cupSizeIcon = getCupSizeIcon(cupSize)\n if (cupSizeIcon.includes('recipe')) return 'recipe'\n if (cupSizeIcon.includes('cupsize')) return 'coffee'\n}\n","import { CupSizesDetail, Product } from '@kissui/apps/src/product.type'\nimport { getCupType } from '@kissui/helpers/src/cupSizeIcons'\n\n/**\n * Get coffees (not recipe icons) from cup sizes list\n */\nexport function getCoffeeIcons(cupSizes: Product['cupSizesDetails']): Product['cupSizesDetails'] {\n return cupSizes\n .filter(c => getCupType(c.category?.id ?? '') === 'coffee')\n}\n\n/**\n * Get recipes from cup sizes list\n */\nexport function getRecipeIcons(cupSizes: Product['cupSizesDetails']): Product['cupSizesDetails'] {\n return cupSizes\n .filter(c => getCupType(c.category?.id ?? '') === 'recipe')\n}\n\n/** Show recipe or cupsize icons? */\nexport function showIcons(icons: CupSizesDetail[]): boolean {\n return icons && icons.length > 0\n}\n\n/** Return true if should show intensity meter */\nexport function showIntensity(intensity: Product['intensity']): boolean {\n return intensity !== null && intensity > 0\n}\n","type Vector = [number, number]\ntype Matrix2x2 = [Vector, Vector]\n\nfunction matrixTimes([[a, b], [c, d]]: Matrix2x2, [x, y]: Vector): Vector {\n return [roundTo(a * x + b * y, 3), roundTo(c * x + d * y, 3)]\n}\n\nfunction rotateMatrix(x: number): Matrix2x2 {\n return [\n [Math.cos(x), -Math.sin(x)],\n [Math.sin(x), Math.cos(x)]\n ]\n}\nfunction vecAdd([a1, a2]: Vector, [b1, b2]: Vector): Vector {\n return [a1 + b1, a2 + b2]\n}\nfunction roundTo(num: number, places: number) {\n const factor = 10 ** places\n return Math.round(num * factor) / factor\n}\n\nfunction svgPathArc(radius: number, [startAngle, sweepAngle]: Vector, rotationRadians: number) {\n const sweepAngleRadians = sweepAngle % (2 * Math.PI)\n const rotMatrix = rotateMatrix(rotationRadians)\n const rotStartAngle: Vector = [radius * Math.cos(startAngle), radius * Math.sin(startAngle)]\n const rotSweepAngle: Vector = [\n radius * Math.cos(startAngle + sweepAngleRadians),\n radius * Math.sin(startAngle + sweepAngleRadians)\n ]\n\n // translate and rotate the path to find start and end of arc\n const [startX, startY] = vecAdd(matrixTimes(rotMatrix, rotStartAngle), [radius, radius])\n const [endX, endY] = vecAdd(matrixTimes(rotMatrix, rotSweepAngle), [radius, radius])\n\n // every two points can have four arcs, this decides which arc is chosen\n const largeArcFlag = sweepAngleRadians > Math.PI ? 1 : 0\n const sweepFlag = sweepAngleRadians > 0 ? 1 : 0\n\n // SVG Path Arc doesn't use radians for some reason\n const rotationDegrees = (rotationRadians / (2 * Math.PI)) * 360\n\n return (\n `M ${startX} ${startY} ` +\n `A ${radius} ${radius} ${rotationDegrees} ${largeArcFlag} ${sweepFlag} ${endX} ${endY}`\n )\n}\n\nexport default svgPathArc\n","import svgPathArc from './svgPathArc'\nimport styles from './IntensityMeter.module.scss'\n\nexport type IntensityMeterProps = {\n /** The maximum intensity for the scale */\n maximum: number\n /** The intensity of the coffee */\n intensity: number\n /** The text label under the scale */\n label: string\n}\n\nconst CIRCLE_RADIUS = 16\nconst STROKE_DASH_FRACTION = 0.80\nconst STROKE_WIDTH = 1.4\n\nexport default function IntensityMeter({ maximum = 11, intensity = 9, label = 'Intensity' }: IntensityMeterProps) {\n const segmentFraction = (intensity / maximum) / intensity\n const dashFraction = STROKE_DASH_FRACTION * segmentFraction\n\n let arcPaths = \"\"\n // eslint-disable-next-line no-plusplus\n for (let i = 0; i < intensity; i++) {\n const startAngle = segmentFraction * 2 * Math.PI * i\n arcPaths += svgPathArc(CIRCLE_RADIUS, [startAngle, dashFraction * 2 * Math.PI], -Math.PI / 2)\n }\n\n return (\n <div className={styles.intensityMeterWrapper}>\n <div className={styles.circleWrapper}>\n <svg\n width=\"32\"\n height=\"32\"\n viewBox=\"-2 -2 36 36\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx={CIRCLE_RADIUS} cy={CIRCLE_RADIUS} r={CIRCLE_RADIUS + STROKE_WIDTH} className={styles.circle} />\n <path d={arcPaths} strokeWidth={`${STROKE_WIDTH}px`} className={styles.arc} />\n </svg>\n <span className={styles.intensityWrapper}>\n <span className={styles.intensity}>{intensity}</span>\n </span>\n </div>\n <div className={styles.label}>{label}</div>\n </div>\n )\n};\n","import { HTMLAttributes } from 'preact/compat'\nimport cn from 'classnames'\nimport styles from './FeatureIcon.module.scss'\n\nexport type FeatureIconType = {\n /**\n * Icon SVG ident\n * @example '24/cupsize/cupsize-espresso-ol'\n */\n icon: string\n /**\n * Optional label, below icon/s: @example 'Espresso'\n */\n label?: string\n}\n\nexport type FeatureIconProps = HTMLAttributes<HTMLDivElement> & {\n icons: FeatureIconType[]\n /** Additional classes */\n className?: string\n}\nexport default function FeatureIcon({ icons, className, ...props }: FeatureIconProps) {\n\n const isMultipleIcons = (icons || []).length > 1\n const showLabel = (icons || []).some(i => i.label)\n // create a string for the label/s\n const labels = (icons || [])\n .map(i => i.label ?? '')\n .filter(i => i)\n .join(', ')\n\n return (\n <div {...props} className={cn(\n styles.container, className\n )}>\n <div className={cn(\n styles.icons,\n showLabel ? styles.withLabel : ''\n )}>\n {(icons || []).map((icon) => (\n <div\n className={cn(\n styles.icon,\n isMultipleIcons ? styles.multiple : ''\n )}\n style={{\n /** @ts-ignore */\n '--url': `url(/shared_res/agility/next-components/assets/icons/${icon.icon}.svg)`\n }}\n key={icon.icon}\n title={icon.label} />\n ))}\n </div>\n {showLabel && (\n <div className={styles.label} title={labels}>\n {labels}\n </div>\n )}\n </div>\n )\n}\n","import { ComponentChildren, FunctionComponent } from 'preact'\nimport styles from './ProductFeaturesSection.module.scss'\nimport { Product } from '@kissui/apps/src/product.type'\nimport cn from 'classnames'\nimport { showIcons, showIntensity } from './ProductFeaturesSection.utils'\nimport IntensityMeter from '../../parts/IntensityMeter/IntensityMeter'\nimport FeatureIcon from '../../parts/FeatureIcon/FeatureIcon'\n\n/** Share styles across features divs */\nconst Feature: FunctionComponent<{\n children?: ComponentChildren\n additionalStyles?: string\n}> = ({ children, additionalStyles = '' }) => {\n return (\n <div class={cn(styles.feature, additionalStyles)}>\n {children ?? null}\n </div>\n )\n}\n\ntype LeftColumnProps = {\n intensity: {\n intensity: Product['intensity']\n intensityLabel: string\n intensityMax: number\n }\n recipe: {\n recipeIcons: Product['cupSizesDetails']\n }\n}\n/**\n * Show recipe icons, or show intensity.\n * If neither, return nothing\n */\nconst LeftColumn: FunctionComponent<LeftColumnProps> = ({\n intensity: { intensityLabel, intensityMax, intensity },\n recipe: { recipeIcons }\n}) => {\n // do not show intensity scale for coffee without intensity (such as iced coffees)\n // const showIntensity = Number.isInteger(intensity) && Number(intensity) > 0\n const shouldShowIntensity = showIntensity(intensity)\n const shouldShowRecipeIcons = showIcons(recipeIcons)\n\n const renderIntensityMeter = ({\n intensityLabel,\n intensityMax,\n intensity\n }: {\n intensityLabel: string\n intensityMax: number\n intensity: number\n }) => {\n return <IntensityMeter label={intensityLabel} maximum={intensityMax} intensity={intensity} />\n }\n\n if (shouldShowRecipeIcons) {\n return (\n <Feature>\n <FeatureIcon icons={recipeIcons} className={styles.featureIcons}></FeatureIcon>\n </Feature>\n )\n }\n\n // show intensity meter\n if (shouldShowIntensity) {\n return (\n <Feature>\n {/* Intensity can sometimes be null or zero (for iced coffees) */}\n {intensity &&\n renderIntensityMeter({\n intensityLabel,\n intensityMax,\n intensity\n })}\n </Feature>\n )\n }\n\n return null\n}\n\ntype RightColumnProps = {\n cupSizeIcons: Product['cupSizesDetails']\n}\n/**\n * Show cup size icons.\n * If no icons, return nothing\n */\nconst RightColumn: FunctionComponent<RightColumnProps> = ({ cupSizeIcons }) => {\n if (showIcons(cupSizeIcons)) {\n return (\n <Feature>\n <FeatureIcon icons={cupSizeIcons} className={styles.featureIcons}></FeatureIcon>\n </Feature>\n )\n }\n return null\n}\n\ntype ColumnSeparatorProps = {\n showSeparator: boolean\n}\nconst ColumnSeparator: FunctionComponent<ColumnSeparatorProps> = ({\n showSeparator\n}) => {\n if (!showSeparator) return <></>\n return <Feature additionalStyles={styles.featureSeparator}></Feature>\n}\n\ntype CardFeaturesProps = {\n children: ComponentChildren\n}\n/**\n * The product cards will show the following features:\n * 1. The cupsize icons only\n * 2. The intensity and the cupsize icons\n * 3. The recipe icons and cupsize icons (this applies when the intensity=0, for coffees from the Barista Creations collection)\n */\nexport const CardFeatures = ({ children }: CardFeaturesProps) => {\n return <>{children}</>\n}\n\nCardFeatures.Left = LeftColumn\nCardFeatures.Right = RightColumn\nCardFeatures.Separator = ColumnSeparator\n","import { FunctionComponent } from 'preact'\nimport styles from './ProductFeaturesSection.module.scss'\nimport ProductCardSection from '../../base/ProductCardSection'\nimport useAppData from '@kissui/apps/src/hooks/useAppData'\nimport plpAppData from '@kissui/apps/src/plp-core/store/plp.data'\nimport { Product } from '@kissui/apps/src/product.type'\nimport { CardFeatures } from './Columns'\nimport {\n getCoffeeIcons,\n getRecipeIcons,\n showIcons,\n showIntensity\n} from './ProductFeaturesSection.utils'\n\nexport type ProductFeaturesSectionProps = {\n product: Pick<Product, 'intensity' | 'intensity_label' | 'cupSizes' | 'cupSizesDetails'>\n}\n\nconst DEFAULT_MAX_INTENSITY = 13\n\ntype MaxIntensity = {\n original: number\n vertuo: number\n [key: string]: number\n}\n\nconst ProductFeaturesSection: FunctionComponent<ProductFeaturesSectionProps> = ({\n product: { intensity, cupSizesDetails }\n}) => {\n const appData = useAppData(plpAppData)\n const maxIntensity: MaxIntensity = appData.get('maxIntensity')\n const currentTechnology: string = appData.get('currentTechnology')\n const cupSizeIcons = getCoffeeIcons(cupSizesDetails)\n const recipeIcons = getRecipeIcons(cupSizesDetails)\n\n // only show separator when both columns are shown\n const showSeparator =\n (showIntensity(intensity) || showIcons(recipeIcons)) && showIcons(cupSizeIcons)\n // calculate the max intensity - consider app data or default\n const intensityMax =\n maxIntensity && currentTechnology ? maxIntensity[currentTechnology] : DEFAULT_MAX_INTENSITY\n\n const intensityLabel =\n appData.get('options').intensity_label ||\n appData.get('translations')['productlistrespblock.capsule.a11y.intensity']\n\n return (\n <ProductCardSection class={styles.features}>\n <CardFeatures>\n <CardFeatures.Left\n intensity={{\n intensity,\n intensityMax,\n intensityLabel\n }}\n recipe={{\n recipeIcons\n }}></CardFeatures.Left>\n <CardFeatures.Separator showSeparator={showSeparator}></CardFeatures.Separator>\n <CardFeatures.Right cupSizeIcons={cupSizeIcons}></CardFeatures.Right>\n </CardFeatures>\n </ProductCardSection>\n )\n}\n\nexport default ProductFeaturesSection\n","import type { JSX } from 'preact'\n\nexport type FormattedTextProps = {\n children?: string | null\n as?: JSX.ElementType\n class?: string\n style?: object\n}\n\n/**\n * Currently just writes HTML content out to the DOM, in order to support current data\n * In future, should detect if the content is Markdown and render that, so that once all data\n * is migrated to Markdown - the dangerouslySetInnerHTML can be removed\n */\nexport default function FormattedText({\n children: content = '',\n as = 'span',\n ...rest\n}: FormattedTextProps) {\n const El = as\n return <El {...rest} dangerouslySetInnerHTML={{ __html: content }}></El>\n}\n","import { FunctionComponent } from 'preact'\nimport { Label } from '@kissui/apps/src/product.type'\nimport styles from './ProductTag.module.scss'\nimport FormattedText from '@kissui/apps/src/components/typography/FormattedText/FormattedText'\n\nexport type ProductTagProps = {\n label: Label\n}\nconst ProductTag: FunctionComponent<ProductTagProps> = ({ label: { bgColor, color, name } }) => {\n return (\n <div className={styles.tagBox} style={{ backgroundColor: bgColor, color: color }}>\n <FormattedText class={styles.label}>{name}</FormattedText>\n </div>\n )\n}\n\nexport default ProductTag\n","import { FunctionComponent } from 'preact'\nimport { Label } from '@kissui/apps/src/product.type'\nimport ProductTag from '../../parts/ProductTag/ProductTag'\nimport styles from './ProductTagsSection.module.scss'\nimport ProductCardSection from '../../base/ProductCardSection'\n\ntype ProductInfo = {\n labels: Label[]\n}\n\ntype ProductTagsSectionProps = {\n product: ProductInfo\n}\n\nconst ProductTagsSection: FunctionComponent<ProductTagsSectionProps> = ({ product }) => {\n const labels = product?.labels ?? []\n return (\n <ProductCardSection as=\"header\" class={styles.tags}>\n {labels.length !== 0 ? (\n labels.map((label, key) => {\n return <ProductTag label={label} key={key}></ProductTag>\n })\n ) : (\n <> </>\n )}\n </ProductCardSection>\n )\n}\n\nexport default ProductTagsSection\n","/**\n * https://dsu-confluence.nestle.biz/display/EUXUI/06.+IM+Policy\n *\n * Code taken from nb-img web component\n *\n * IM Policy annoying behaviour:\n * IM Policy is returning in some cases more than 2x images (based in device pixel density auto detection e.g. Iphone 11 pro returns x3)\n * We don't want this behaviour so we need to force x1 by adding an extra param &imdensity=1\n */\n\ntype Profile = {\n name: string\n sizes: number[]\n diff?: number\n}\n\nconst PROFILES: Profile[] = [\n {\n name: 'small',\n sizes: [\n 16, 24, 32, 36, 48, 64, 72, 96, 108, 120, 128, 144, 150, 180, 192, 216, 225, 240, 288,\n 300, 360, 384, 450, 480, 600\n ]\n },\n {\n name: 'medium',\n sizes: [\n 270, 512, 540, 675, 720, 768, 800, 900, 960, 1000, 1024, 1080, 1200, 1350, 1440, 1500,\n 1536, 1600, 1800, 2000, 2048, 2400, 3000, 3200, 4000\n ]\n },\n {\n name: 'large',\n sizes: [640, 1280, 1920, 2160, 2560, 2880, 3072, 3840, 4096]\n },\n {\n name: 'product',\n sizes: [\n 45, 50, 58, 60, 65, 90, 100, 130, 135, 174, 195, 200, 230, 232, 260, 300, 400, 460, 690\n ]\n }\n]\n\nexport default function createImPolicyQuery(width: number): string {\n const finalWidth = getRetinaWidth(width)\n\n const impolicyProfile = getImpolicyProfile(finalWidth)\n\n return `?impolicy=${impolicyProfile}&imwidth=${finalWidth}&imdensity=1`\n}\n\nfunction getRetinaWidth(width: number): number {\n const { devicePixelRatio } = window\n return devicePixelRatio > 1 ? width * 2 : width\n}\n\nfunction getImpolicyProfile(width: number): string {\n const { exactFound, closest } = getClosest(width)\n\n if (exactFound) {\n return exactFound.name\n } else {\n let tempDiff = closest[0].diff\n let match = closest[0]\n closest.forEach(item => {\n // @ts-ignore\n if (item.diff <= tempDiff) {\n tempDiff = item.diff\n match = item\n }\n })\n return match.name\n }\n}\n\nfunction getClosest(width: number): {\n exactFound?: Profile\n closest: Profile[]\n} {\n let exactFound = undefined\n let closest: Profile[] = []\n PROFILES.every(profile => {\n const found = profile.sizes.find(el => el >= width)\n\n if (found) {\n if (found === width) {\n exactFound = profile\n return false\n }\n\n closest.push({ name: profile.name, sizes: profile.sizes, diff: found - width })\n }\n\n return true\n })\n return { exactFound, closest }\n}\n","import { JSX } from 'preact'\nimport { useMemo, useLayoutEffect, useEffect, useRef, useState } from 'preact/hooks'\nimport createImPolicyQuery from '@kissui/helpers/src/createImPolicyQuery'\nimport viewportHelper from '@kissui/helpers/src/viewport.helpers'\nimport { ImageAssetType, Product } from '@kissui/apps/src/product.type'\nimport styles from './ProductImage.module.scss'\n\nexport type ProductImageProps = {\n product: Product\n /** If false, image lazy loading will be skipped */\n loading?: JSX.HTMLAttributes<HTMLImageElement>['loading']\n\n width: number\n}\n\nexport default function ProductImage({ product, loading = 'lazy', width }: ProductImageProps) {\n const { url, altText } = getProductImage(product)\n const { name } = product\n\n const imageUrl = useMemo(() => {\n const imPolicyQuery = createImPolicyQuery(Math.ceil(width))\n return `${url}${imPolicyQuery}`\n }, [width])\n\n return (\n <div class={styles.imageWrapper}>\n <img\n src={imageUrl}\n alt={altText || name || ''}\n loading={loading}\n class={styles.image}\n width={width}\n />\n </div>\n )\n}\n\n/**\n * The DTO's are mutating product image information so even though we expect a structured object,\n * we are seeing the image as a string here. This function accounts for both scenarios!\n */\nconst getProductImage = (product: Product): ImageAssetType => {\n let asset: ImageAssetType = {\n url: '',\n altText: ''\n }\n if (!product) {\n return asset\n }\n if (typeof product.image === 'string') {\n asset.url = product.image\n asset.altText = product.image_alt_text ?? ''\n }\n if (typeof product.image === 'object') {\n asset = { ...product.image }\n }\n return asset\n}\n","import ProductCardSection from '../base/ProductCardSection'\nimport cn from 'classnames'\nimport { ImageAssetType, Product } from '@kissui/apps/src/product.type'\nimport styles from './ProductImageSection.module.scss'\nimport ProductImage from '../parts/ProductImage/ProductImage'\n\nexport type ProductImageSectionProps = {\n product: Product\n width: number\n class?: string\n}\n\nexport default function ProductImageSection({\n class: className,\n product,\n width\n}: ProductImageSectionProps) {\n return (\n <ProductCardSection class={cn(styles.background, className)}>\n <ProductImage product={product} width={width} />\n </ProductCardSection>\n )\n}\n","import { Component, ComponentChildren } from 'preact'\n\ntype UnmanagedDomProps = {\n children: ComponentChildren\n}\n\n/**\n * Prevents Re-rendering, allowing external DOM manipulation\n */\nexport default class UnmanagedDom extends Component<UnmanagedDomProps> {\n shouldComponentUpdate = () => false\n\n render({ children }: UnmanagedDomProps) {\n return children\n }\n}\n","import { useEffect, useState } from 'preact/hooks'\nimport cn from 'classnames'\nimport styles from './AddToCartButton.module.scss'\nimport UnmanagedDom from './UnmanagedDom'\n\nexport type Size = 'small' | 'large'\n\ntype ProductInfo = {\n longSku: string\n}\n\nexport type AddToCartButtonProps = {\n product: ProductInfo\n size?: Size\n class?: string\n}\n\nlet instanceCount = 0 // Used to create a unique id for the button\n\nexport default function AddToCartButton({\n class: className,\n product,\n size = 'large'\n}: AddToCartButtonProps) {\n const [elementId, setElementId] = useState<string | null>(null)\n\n // default to large buttons\n const buttonSize = size === 'small' ? 'small' : 'large'\n\n useEffect(() => {\n if (elementId) {\n initNAPIButton(elementId, product.longSku, buttonSize)\n } else {\n setElementId(\n ['a2c', product.longSku.replace(/(\\s|\\W)/g, ''), instanceCount++].join('-')\n )\n }\n }, [elementId])\n\n const initialButtonClassName =\n buttonSize === 'large' ? 'AddToBagButtonLarge' : 'AddToBagButtonSmall'\n\n return (\n <span\n class={cn(\n styles.addToCart,\n className,\n buttonSize === 'large' ? styles.large : undefined\n )}\n id={elementId as string}\n onClick={decorateEvent}>\n {elementId ? null : (\n <UnmanagedDom>\n <button\n class={cn('AddToBagButton', initialButtonClassName)}\n type=\"button\"\n disabled>\n <span class=\"VisuallyHidden\">Loading</span>\n \n </button>\n </UnmanagedDom>\n )}\n </span>\n )\n}\n\n/**\n * Due to the way the NAPI Button works, we cannot use normal event propagation\n * control, e.g. event.stopPropagation etc.\n * Instead, the event needs to be excluded when handling within a parent e.g. a ProductCard\n */\nexport function isAddToCartEvent(event: Event): boolean {\n // @ts-ignore\n return event.__isAddToCard__ ?? false\n}\n\nfunction decorateEvent(event: Event) {\n // @ts-ignore\n event.__isAddToCard__ = true\n}\n\n/**\n * Init the button through the NAPI, which actually renders the DOM\n */\nasync function initNAPIButton(elementId: string, id: string, buttonSize: Size): Promise<void> {\n if (!window.napi) return\n\n try {\n await window.napi.getConfig()\n } catch (error) {\n console.error('NAPI getConfig error', error)\n return\n }\n\n window.ui = window.ui || []\n window.ui.push({\n id: elementId,\n module: 'AddToBagButton',\n configuration: { props: { productId: id, buttonSize } },\n ecommerceData: { activated: true }\n })\n}\n","import { Product } from '@kissui/apps/src/product.type'\n\nexport type TECHNOLOGY = 'vertuo' | 'original'\nexport const COFFEE_ORIGINAL: TECHNOLOGY = 'original' as const\nexport const COFFEE_VERTUO: TECHNOLOGY = 'vertuo' as const\nexport const SLEEVE_OF_10 = 10 as const\nexport const SLEEVE_OF_7 = 7 as const\n\n// @todo - for tracking - we will need the price the person pays (ignoring showing sleeve or capsule price on the card)\n\n/**\n * @returns True if the product is part of a bundle.\n */\nexport function isBundledCoffee({\n salesMultiple,\n unitQuantity\n}: Pick<Product, 'salesMultiple' | 'unitQuantity'>): boolean {\n if (salesMultiple > 1 && unitQuantity === 1) {\n return false\n }\n return salesMultiple === 1 && unitQuantity > 1\n}\n\n/**\n * @returns True if the price is marked as hidden\n */\nexport function priceIsHidden({ hidePrice }: Pick<Product, 'hidePrice'>): boolean {\n return !!hidePrice\n}\n\n/** Return true if the product is marked as out of stock */\nexport function isOutOfStock({ inStock }: Pick<Product, 'inStock'>): boolean {\n return false === inStock\n}\n\n/** Return true if the product is a box of capsules */\nexport function productIsCapsules({ type, bundled }: Pick<Product, 'type' | 'bundled'>): boolean {\n if (bundled) {\n return false\n }\n // some types are showing as empty strings!\n return type === 'capsule' || type === ''\n}\n\n/**\n * Return the numeric price value of the physical item, based on the unit qty and sales multiplier\n * @param product\n */\nexport function getSkuPrice({\n type,\n price,\n salesMultiple,\n unitQuantity,\n show_sleeve_price = false,\n bundled = false,\n price_per_capsule\n}: Pick<\n Product,\n | 'type'\n | 'price'\n | 'salesMultiple'\n | 'unitQuantity'\n | 'show_sleeve_price'\n | 'bundled'\n | 'price_per_capsule'\n>): number {\n if (typeof price !== 'number') {\n // backwards compatibility for old price value\n return NaN\n }\n\n if (price === 0) {\n return 0\n }\n if (type === 'accessory') {\n return price * salesMultiple\n }\n\n // some types are showing as empty string!\n const productIsCapsule = productIsCapsules({ type, bundled })\n\n const isBundled = isBundledCoffee({\n salesMultiple,\n unitQuantity\n })\n\n if (!isBundled && !productIsCapsule) {\n // unknown product!\n return NaN\n }\n\n if (isBundled) {\n if (salesMultiple === 1) {\n // handle special bundles\n return price\n }\n if (show_sleeve_price) {\n // assortments where we want to show the overall price\n return price * salesMultiple * unitQuantity\n } else {\n // assortments where we want to show the capsule price\n return price * salesMultiple\n }\n }\n\n if (!show_sleeve_price && price_per_capsule) {\n return Number(price_per_capsule)\n } else {\n return price\n }\n}\n\n/**\n * Return labels for capsules and sleeves based on the provided product information.\n * @param product Product information including type, price, sales multiple, unit quantity,\n * sleeve and capsule display options, price per capsule, and label text.\n * @returns Object containing capsule label, sleeve label, and default capsule label.\n */\n\nexport async function getSleeveAndCapsuleLabel(\n {\n unitQuantity,\n salesMultiple,\n price_per_capsule,\n sleevePrice,\n price\n }: Pick<\n Product,\n 'unitQuantity' | 'salesMultiple' | 'price_per_capsule' | 'sleevePrice' | 'price'\n >,\n capsulesSyntax: string,\n showSecondaryPrice: boolean,\n showSecondaryPriceSyntax: string,\n currencySymbol: string,\n showPrimaryPrice: boolean\n): Promise<{ capsuleSleeveLabel: string; defaultCapsuleLabel: string }> {\n let defaultCapsuleLabel = capsulesSyntax\n let capsuleSleeveLabel = ''\n const isBundled = isBundledCoffee({\n salesMultiple,\n unitQuantity\n })\n\n // for showing capsule count e.g. 10 Capsule\n if (capsulesSyntax.includes('{quantity}')) {\n defaultCapsuleLabel = defaultCapsuleLabel.replace(\n '{quantity}',\n `${unitQuantity * salesMultiple}`\n )\n }\n\n // for showing price per capsule e.g. 0.45 $/Capsule\n if (showSecondaryPrice && showSecondaryPriceSyntax.includes('{price_per_capsule}')) {\n const pricePerCapsule =\n !price_per_capsule && isBundled ? Number(price) / unitQuantity : price_per_capsule\n const formattedPrice = await getPriceLabel(Number(pricePerCapsule), currencySymbol)\n capsuleSleeveLabel = showSecondaryPriceSyntax.replace('{price_per_capsule}', formattedPrice)\n }\n\n // for showing price per sleeve e.g. 45 $/sleeve\n if (showSecondaryPrice && showSecondaryPriceSyntax.includes('{price_per_sleeve}')) {\n const sleevePriceToUse = Number(sleevePrice) || price * salesMultiple\n\n const finalSleevePrice = !showPrimaryPrice && !isBundled \n ? sleevePriceToUse / (unitQuantity * salesMultiple)\n : sleevePriceToUse\n\n const formattedPrice = await getPriceLabel(finalSleevePrice, currencySymbol)\n capsuleSleeveLabel = showSecondaryPriceSyntax.replace('{price_per_sleeve}', formattedPrice)\n }\n\n return { defaultCapsuleLabel, capsuleSleeveLabel }\n}\n\n/**\n * Returns a formatted version of the price for the product card\n * @returns\n */\nexport async function getPriceLabel(\n priceVal: number,\n currency: string,\n _product?: Product\n): Promise<string> {\n if (Number.isNaN(priceVal)) {\n return ''\n }\n // Example in console: (await window.napi.priceFormat()).short(\"€\", 40)\n const formatter = await window.napi.priceFormat()\n return formatter.short(currency, priceVal)\n}\n\n/**\n * @todo Works out if the pack is a sleeve of 7 or 10\n * @param product Product\n * @param technology\n */\nexport function getNumberItemsInSleeve(\n { salesMultiple, unitQuantity }: Product,\n technology: TECHNOLOGY\n): number {\n if (salesMultiple !== 1 && isMultipleOf(salesMultiple, SLEEVE_OF_10)) {\n // Sleeve of original or vertuo\n return salesMultiple / SLEEVE_OF_10\n }\n\n if (\n salesMultiple !== 1 &&\n technology === COFFEE_VERTUO &&\n isMultipleOf(salesMultiple, SLEEVE_OF_7)\n ) {\n // Sleeve of vertuo\n return salesMultiple / SLEEVE_OF_7\n }\n\n if (salesMultiple === 1 && isMultipleOf(unitQuantity, SLEEVE_OF_10)) {\n // Bundle of original or vertuo\n return unitQuantity / SLEEVE_OF_10\n }\n\n if (\n salesMultiple === 1 &&\n technology === COFFEE_VERTUO &&\n isMultipleOf(unitQuantity, SLEEVE_OF_7)\n ) {\n // Bundle of vertuo\n return unitQuantity / SLEEVE_OF_7\n }\n\n return NaN\n}\n\n/**\n * The text below the price should be as follows:\n * a) If the product is a capsule, then \"Sleeve of 10\"\n * b) If the product is an assortment, then \"X Sleeves of 10\"\n *\n * The sleeve syntaxes we should support for now need to be these:\n *\n * **Single sleeves**: `'Sleeve of {x}'` (x is replaced with number of capsules in the sleeve)\n *\n * **Assortments** `'{x} capsules'` (x = number of capsules)\n *\n * @param product The product\n */\nexport function getSleeveText({\n salesMultiple,\n unitQuantity,\n sleeve_syntax\n}: Pick<Product, 'salesMultiple' | 'unitQuantity' | 'sleeve_syntax'>): string {\n const isAssortment = isBundledCoffee({\n salesMultiple,\n unitQuantity\n })\n let label = `${sleeve_syntax}`\n\n const sleeveSyntaxTokens = extractTokensFromString(sleeve_syntax)\n if (sleeveSyntaxTokens.length === 0) {\n return '' // requires tokenized string\n }\n\n if (sleeveSyntaxTokens.length !== 1) {\n // bad sleeve syntax, unable to detokenize string\n console.debug('Bad sleeve syntax, expecting string like: \"Sleeve of {x}\"')\n return ''\n }\n\n if (isAssortment) {\n // handle assortments & bundles\n const replacements: string[] = [unitQuantity.toString(), salesMultiple.toString()]\n sleeveSyntaxTokens.forEach((token, index) => {\n label = label.replace(token, replacements[index] ?? '')\n })\n return label\n } else {\n // handle sleeves of capsules - note: calendars look like capsules so we need to check for assortments here also\n // Expecitng a string like this with only 1 token: \"Sleeve of {x}\"\n label = label.replace(sleeveSyntaxTokens[0], salesMultiple.toString())\n return label\n }\n return ''\n}\n\nexport function getStrikethruPrice({ strikethrough_price = '' }: Product): string {\n return strikethrough_price\n}\n\nfunction isMultipleOf(quantity: number, multiple: number): boolean {\n return quantity % multiple === 0\n}\n\n/**\n * Returns an array of tokens `['{token}', '{string}']` from a string like `\"my {token} in {string}\"`\n * @param str Tokenized string\n * @returns An array of tokens found in the string\n */\nexport function extractTokensFromString(str: string): string[] {\n const regex = /{(.*?)}/g\n const tokens = (str || '').match(regex)\n // filter out tokens which contain a space\n const realTokens = (tokens ?? []).filter(t => t.indexOf(' ') === -1)\n return realTokens\n}\n\n/**\n * Convert a tokenized string into a normal string, replacing found tokens with their replacement value\n * @param tokenizedString A tokenized string, like \"my {token} in {string}\"\n * @param tokensMap An object with key -> value\n * @returns A de-tokenized string. Note: missing tokens will not be replaced.\n */\nexport function replaceTokensWithValues(\n tokenizedString: string,\n tokensMap: Record<string, string | number>\n): string {\n let output = tokenizedString\n try {\n Object.keys(tokensMap).forEach(key => {\n const regex = new RegExp(`{${key}}`, 'g')\n output = output.replace(regex, tokensMap[key].toString())\n })\n } catch (error) {\n // ignore errors\n }\n return output\n}\n","import styles from './OutOfStock.module.scss'\n\nexport type OutOfStockProps = {\n /** Label to show for \"Out of stock\" */\n label: string\n}\n\nexport default function OutOfStock({ label }: OutOfStockProps) {\n return <div className={styles.outOfStock}>{label}</div>\n}\n","import cn from 'classnames'\nimport styles from './PriceDisplay.module.scss'\nimport OutOfStock from './../OutOfStock/OutOfStock'\n\nexport type PriceDisplayProps = {\n /**\n * The final price string, formatted and with a currency symbol\n */\n price?: string\n /**\n * The sleeve text which appear below the price\n * @example 'Sleeve of 10'\n */\n sleeveText?: string\n /**\n * If provided, this price will show and the main price will have a strikethru.\n * **Note**: This is a bit illogical since this price is NOT the price which has a strikethru!\n */\n strikethruPrice?: string\n /**\n * If true, the out of stock label will be shown\n */\n outOfStock?: boolean\n /**\n * The translation for the out-of-stock label\n */\n outOfStockLabel?: string\n\n capsuleAndSleeveInfo?: {\n capsuleSleeveLabel?: string\n defaultCapsuleLabel?: string\n }\n showSecondaryPrice?: boolean\n showSecondaryPriceSyntax?: string\n capsulesSyntax?: string\n}\n\nexport default function PriceDisplay({\n price = '',\n strikethruPrice = '',\n outOfStock = false,\n outOfStockLabel = '',\n capsuleAndSleeveInfo\n}: PriceDisplayProps) {\n return (\n <div className={styles.priceBox}>\n {outOfStock && <OutOfStock label={outOfStockLabel} />}\n <PriceLabel price={price} strikethruPrice={strikethruPrice}></PriceLabel>\n\n {capsuleAndSleeveInfo && (\n <CapsuleAndSleeveLabel\n capsuleAndSleeveInfo={capsuleAndSleeveInfo}\n outOfStock={outOfStock}></CapsuleAndSleeveLabel>\n )}\n </div>\n )\n}\n\nconst LONG_PRICE_LENGTH = 9\n\nfunction PriceLabel({\n price,\n strikethruPrice\n}: Pick<PriceDisplayProps, 'price' | 'strikethruPrice'>) {\n /** Handle cases where the price string is long, such as in Thailand */\n const isLongPriceString = (price ?? '').toString().length > LONG_PRICE_LENGTH\n\n return (\n <div class={styles.priceLabelWrapper}>\n {strikethruPrice && (\n <span className={cn(styles.strikethruPrice, isLongPriceString && styles.longPrice)}>\n {strikethruPrice}\n </span>\n )}\n {price && (\n <span className={cn(styles.formattedPrice, isLongPriceString && styles.longPrice)}>\n {price}\n </span>\n )}\n </div>\n )\n}\n\ntype CapsuleAndSleeveInfoType = {\n defaultCapsuleLabel?: string\n capsuleSleeveLabel?: string\n}\n\nfunction CapsuleAndSleeveLabel({\n capsuleAndSleeveInfo,\n outOfStock\n}: {\n capsuleAndSleeveInfo: CapsuleAndSleeveInfoType\n outOfStock: boolean\n}) {\n const { defaultCapsuleLabel = '', capsuleSleeveLabel = '' } = capsuleAndSleeveInfo\n\n return (\n <>\n <div className={styles.capsuleAndSleeveLabelWrapper}>\n {/* always displayed capsule per sleeve */}\n {defaultCapsuleLabel && !outOfStock && (\n <div className={styles.defaultCapsuleLabel}>{defaultCapsuleLabel}</div>\n )}\n {/* conditional for Price for capsile or sleeve */}\n {capsuleSleeveLabel && (\n <div className={styles.capsuleSleeveLabel}>{capsuleSleeveLabel}</div>\n )}\n </div>\n </>\n )\n}\n","import { useState, useEffect } from 'preact/hooks'\nimport {\n getPriceLabel,\n getSleeveAndCapsuleLabel,\n getSkuPrice,\n getSleeveText,\n getStrikethruPrice,\n isOutOfStock,\n priceIsHidden,\n isBundledCoffee\n} from '../../../../utils/priceUtils'\nimport { Product, ProductCrema } from '@kissui/apps/src/product.type'\nimport PriceDisplay, { PriceDisplayProps } from './PriceDisplay'\nimport { getCurrency } from '@kissui/helpers/src/getCurrency'\nimport getCremaUITranslation from '@kissui/apps/src/utils/getCremaUITranslation'\n\nexport type PriceProps = {\n product: Product\n capsulesSyntax: string\n showSecondaryPrice: boolean\n showPrimaryPrice: boolean\n showSecondaryPriceSyntax: string\n primaryPriceSyntax?: string\n}\n\nexport default function Price({\n product,\n capsulesSyntax,\n showSecondaryPrice,\n showSecondaryPriceSyntax,\n showPrimaryPrice,\n primaryPriceSyntax\n}: PriceProps) {\n /** Lazy loaded price relies on currency formatting function in the client */\n const [priceProps, setPriceProps] = useState<PriceDisplayProps | null>(null)\n const outOfStock = isOutOfStock(product)\n const priceNumeric = getSkuPrice(product)\n const priceCurrency = getCurrency() // string 'EUR'\n const hiddenPrice = priceIsHidden(product)\n const sleeveText = product.show_sleeve ? getSleeveText(product) : ''\n const strikethruPrice = getStrikethruPrice(product)\n const outOfStockLabel = getCremaUITranslation(\n 'global.addtobag.button.outofstock',\n 'Out of Stock'\n )\n\n useEffect(() => {\n // the price formatting is only available as a promise in the client\n ;(async () => {\n try {\n const priceFormatter = await window.napi.priceFormat() // returns list of methods\n const currencySymbol = priceFormatter.currency(priceCurrency) // returns the currency symbol e.g '$'\n const price = await getPriceLabel(priceNumeric, priceCurrency)\n const isBundled = isBundledCoffee({\n salesMultiple: product?.salesMultiple,\n unitQuantity: product?.unitQuantity\n })\n\n const priceWithSyntax =\n !isBundled && primaryPriceSyntax && primaryPriceSyntax.includes('{price}')\n ? primaryPriceSyntax.replace('{price}', price)\n : price\n const { capsuleSleeveLabel, defaultCapsuleLabel } = await getSleeveAndCapsuleLabel(\n product,\n capsulesSyntax,\n showSecondaryPrice,\n showSecondaryPriceSyntax,\n currencySymbol,\n showPrimaryPrice\n )\n const props: PriceDisplayProps = {\n price: priceWithSyntax,\n outOfStock,\n outOfStockLabel,\n sleeveText,\n strikethruPrice,\n capsuleAndSleeveInfo: {\n defaultCapsuleLabel,\n capsuleSleeveLabel\n }\n }\n setPriceProps(props)\n } catch (error) {\n console.debug('Could not get the price formatting data')\n }\n })()\n }, [product, priceNumeric, priceCurrency])\n\n if (!priceProps || hiddenPrice) {\n return <></>\n }\n\n return <PriceDisplay {...priceProps}></PriceDisplay>\n}\n","export default function getCremaUITranslation(key: string, defaultValue: string) {\n const { __INITIAL_CONFIG__: { translations = { [key]: defaultValue } } = {} } = window as any\n return translations[key] as string\n}\n","export const isSmallScreen = () =>\n typeof window !== 'undefined' && typeof window.matchMedia === 'function'\n ? window.matchMedia('(max-width: 600px)').matches\n : false\n\nexport default { isSmallScreen }\n","import ProductCardSection from '../../base/ProductCardSection'\nimport AddToCartButton from '../../parts/AddToCartButton/AddToCartButton'\nimport { Product } from '@kissui/apps/src/product.type'\nimport styles from './PurchaseSection.module.scss'\nimport Price from '../../parts/Price/Price'\nimport useAppData from '@kissui/apps/src/hooks/useAppData'\nimport plpAppData from '@kissui/apps/src/plp-core/store/plp.data'\nimport { isSmallScreen } from '@kissui/apps/src/utils/screenUtils'\n\nexport type PurchaseSectionProps = {\n class?: string\n product: Product\n}\n\nexport default function PurchaseSection({ class: className, product }: PurchaseSectionProps) {\n const appData = useAppData(plpAppData)\n\n const addToCartSize = isSmallScreen()\n ? 'small'\n : appData.get('options')?.cards_add_to_cart_size || 'large'\n\n const showPrimaryPrice = appData.get('options')?.show_sleeve_price ?? false\n const primaryPriceSyntax = appData.get('options')?.primary_price_syntax ?? ''\n\n const showSecondaryPrice = !showPrimaryPrice\n ? true\n : appData.get('options')?.show_secondary_price ?? true\n const showSecondaryPriceSyntax = appData.get('options')?.show_secondary_price_syntax ?? ''\n const capsulesSyntax = appData.get('options')?.capsules_syntax ?? ''\n\n return (\n <ProductCardSection as=\"footer\" class={className}>\n <div class={styles.purchaseSection}>\n <div className={styles.container}>\n <div class={styles.price}>\n <Price\n product={product}\n showPrimaryPrice={showPrimaryPrice}\n primaryPriceSyntax={primaryPriceSyntax}\n capsulesSyntax={capsulesSyntax}\n showSecondaryPrice={showSecondaryPrice}\n showSecondaryPriceSyntax={showSecondaryPriceSyntax}></Price>\n </div>\n\n <AddToCartButton class={styles.button} product={product} size={addToCartSize} />\n </div>\n </div>\n </ProductCardSection>\n )\n}\n","import { RefObject } from \"preact\";\nimport { useEffect, useState } from \"preact/hooks\";\n\nexport const useIntersection = (element: RefObject<HTMLElement>, rootMargin?: string) => {\n const [isVisible, setState] = useState(false);\n\n useEffect(() => {\n const current = element?.current;\n const observer = new IntersectionObserver(\n ([entry]) => {\n setState(entry.isIntersecting);\n },\n { rootMargin }\n );\n if (current) {\n observer?.observe(current);\n }\n return () => current && observer.unobserve(current);\n }, []);\n\n return isVisible;\n};\n","import { FunctionComponent } from 'preact'\nimport { useEffect, useRef, useState } from 'preact/hooks'\nimport { useIntersection } from '@kissui/apps/src/hooks/useIntersection'\nimport type { Product } from '@kissui/apps/src/product.type'\nimport { productImpression } from '@kissui/helpers/src/gtmEvents'\nimport FormattedText from '@kissui/apps/src/components/typography/FormattedText/FormattedText'\nimport styles from './NameHeadline.module.scss'\n\nexport type NameHeadlineProps = {\n product: Pick<Product, 'name' | 'url' | 'headline' | 'longSku' | 'is_headline_hidden'>\n trackingPosition: number\n trackingList?: string\n}\nfunction NameHeadline({ product: { name, url, headline, longSku, is_headline_hidden: isHeadlineHidden }, trackingPosition, trackingList }: NameHeadlineProps) {\n const cardRef = useRef<HTMLDivElement>(null)\n const isVisible = useIntersection(cardRef)\n const [hasTrackingFired, setHasTrackingFired] = useState(false)\n\n useEffect(() => {\n if (isVisible && !hasTrackingFired) {\n productImpression(trackingPosition, trackingList, longSku)\n setHasTrackingFired(true)\n }\n }, [isVisible, hasTrackingFired])\n\n return (\n <div ref={cardRef} className={styles.wrapper}>\n <a href={url} className={styles.name}>\n <FormattedText class={styles.name}>{name}</FormattedText>\n </a>\n\n <FormattedText\n class={`${styles.headline} ${isHeadlineHidden ? styles.mobileOnly : ''}`}>\n {headline}\n </FormattedText>\n </div>\n )\n}\n\nexport default NameHeadline\n","import type { Product } from '@kissui/apps/src/product.type'\nimport ProductCardSection from '../../base/ProductCardSection'\nimport NameHeadline from '../../parts/NameHeadline/NameHeadline'\n\nexport type ProductImageSectionProps = {\n product: Pick<Product, 'name'| 'url' | 'headline' | 'longSku' | 'is_headline_hidden'>\n trackingPosition: number\n trackingList?: string\n class?: string\n}\n\nexport default function ProductNameSection({\n class: className,\n product,\n trackingPosition,\n trackingList\n}: ProductImageSectionProps) {\n return (\n <ProductCardSection class={className}>\n <NameHeadline\n product={product}\n trackingPosition={trackingPosition}\n trackingList={trackingList}\n />\n </ProductCardSection>\n )\n}\n","import cn from 'classnames'\nimport styles from './CompatibilityButton.module.scss'\n\nexport type CompatibilityButtonProps = {\n /** The button text */\n text: string\n /** If set, the text will be text aligned center */\n textCentered?: boolean\n /** Button click handler */\n onClick: (event: MouseEvent) => void\n /** If true, the focus styles will be persistently applied after clicking */\n maintainElementFocus?: boolean\n /** Additional class */\n class?: string\n}\n\nexport default function CompatibilityButton({\n class: className,\n onClick,\n text,\n textCentered,\n maintainElementFocus\n}: CompatibilityButtonProps) {\n const classes = cn(\n styles.button,\n maintainElementFocus ? styles.buttonFocus : null,\n className\n )\n return (\n <button class={classes} type=\"button\" onClick={onClick}>\n <span class={styles.inner}>\n <span class={styles.contents}>\n <span class={styles.icon} />\n <span class={cn(\n styles.text,\n textCentered ? styles.textCentered : null\n )}>{text}</span>\n <span class={styles.chevron} />\n </span>\n </span>\n </button>\n )\n}\n","import { Product } from '@kissui/apps/src/product.type'\n\nconst COMPATIBILITY_RANGE_IDENTIFIER = 'capsule-range-label-compatibility-vertuo' as const\n\n/** Capsules tagged to certain range categories will show the machine compatibility button/modal */\nexport function capsuleHasMachineCompatibilityIssue(ranges: Product['ranges']) {\n const rangesSimple = simplifyRangeIds(ranges)\n return rangesSimple.some(id => id === COMPATIBILITY_RANGE_IDENTIFIER)\n}\n\n/**\n * Full range strings are like: 'nesclub2.es.b2c/cat/capsule-range-label-compatibility-vertuo'\n * @returns The range string without the website/market info\n */\nfunction simplifyRangeIds(ranges: string[]) {\n return ranges.map(range => range.split('/').pop())\n}\n","import type { Product } from '@kissui/apps/src/product.type'\nimport cn from 'classnames'\nimport ProductCardSection from '../../base/ProductCardSection'\nimport CompatibilityButton from '@kissui/components/src/compatibility/CompatibilityButton/CompatibilityButton'\nimport styles from './ProductCompatibilitySection.module.scss'\nimport { capsuleHasMachineCompatibilityIssue } from '@kissui/helpers/src/productCompatibility'\n\nexport type ProductCompatibilitySectionProps = {\n product: Pick<Product, 'name' | 'url' | 'description' | 'longSku' | 'ranges'>\n class?: string\n buttonText: string\n onClick(event: MouseEvent): void\n}\n\nexport default function ProductCompatibilitySection({\n class: className,\n buttonText,\n product,\n onClick\n}: ProductCompatibilitySectionProps) {\n const showCompatibilityButton = buttonText && capsuleHasMachineCompatibilityIssue(product.ranges)\n\n return (\n <ProductCardSection class={cn(styles.container, className)}>\n {showCompatibilityButton && <CompatibilityButton\n onClick={onClick}\n text={buttonText}\n class={styles.button}\n maintainElementFocus\n />}\n </ProductCardSection>\n )\n}\n","import { Product } from '@kissui/apps/src/product.type'\nimport ProductCard from './../base/ProductCard'\nimport RowDividerSection from './../sections/RowDividerSection'\nimport BackgroundSection from './../sections/BackgroundSection'\nimport ProductFeaturesSection from '../sections/ProductFeaturesSection/ProductFeaturesSection'\nimport ProductTagsSection from '../sections/ProductTagsSection/ProductTagsSection'\nimport ProductImageSection from '../sections/ProductImageSection'\nimport PurchaseSection from '../sections/PurchaseSection/PurchaseSection'\nimport ProductNameSection from '../sections/ProductNameSection/ProductNameSection'\nimport ProductCompatibilitySection from '../sections/ProductCompatibilitySection/ProductCompatibilitySection'\nimport styles from './CoffeeProductCard.module.scss'\n\nexport type CoffeeProductCardProps = {\n product: Product\n trackingPosition: number\n trackingList?: string\n onClick: (event: MouseEvent) => void\n onCompatibilityClick: (customEvent: Product) => void\n compatibilityButtonText: string\n}\n\nexport default function CoffeeProductCard({\n product,\n trackingPosition,\n trackingList,\n onClick,\n onCompatibilityClick,\n compatibilityButtonText\n}: CoffeeProductCardProps) {\n\n function handleCompatibilityClick(event: MouseEvent, product: Product) {\n event.stopPropagation()\n event.preventDefault()\n onCompatibilityClick(product)\n }\n\n return (\n <ProductCard onClick={onClick} aria-label={product.name} class={styles.card} shortSku={product.internationalId}>\n <BackgroundSection />\n\n <ProductTagsSection product={product}></ProductTagsSection>\n\n <ProductImageSection product={product} width={112} />\n\n <ProductFeaturesSection product={product}></ProductFeaturesSection>\n\n <ProductNameSection\n product={product}\n trackingPosition={trackingPosition}\n trackingList={trackingList}\n />\n\n <ProductCompatibilitySection\n product={product}\n buttonText={compatibilityButtonText}\n onClick={(e) => handleCompatibilityClick(e, product)}\n />\n\n <PurchaseSection product={product} />\n\n <RowDividerSection />\n </ProductCard>\n )\n}\n","import ProductCard from '../base/ProductCard'\nimport ProductCardSection from '../base/ProductCardSection'\nimport RowDividerSection from '../sections/RowDividerSection'\nimport BackgroundSection from '../sections/BackgroundSection'\nimport { Product } from '@kissui/apps/src/product.type'\nimport ProductTagsSection from '../sections/ProductTagsSection/ProductTagsSection'\nimport ProductImageSection from '../sections/ProductImageSection'\nimport PurchaseSection from '../sections/PurchaseSection/PurchaseSection'\nimport ProductNameSection from '../sections/ProductNameSection/ProductNameSection'\nimport styles from './AssortmentProductCard.module.scss'\n\nexport type AssortmentProductCardProps = {\n product: Product\n trackingPosition: number\n trackingList?: string\n onClick: (event: MouseEvent) => void\n}\n\nexport default function AssortmentProductCard({\n product,\n trackingPosition,\n trackingList,\n onClick\n}: AssortmentProductCardProps) {\n return (\n <ProductCard\n onClick={onClick}\n aria-label={product.name}\n shortSku={product.internationalId}\n class={styles.card}>\n <BackgroundSection />\n\n <ProductTagsSection product={product}></ProductTagsSection>\n\n <ProductImageSection class={styles.imageSection} product={product} width={112} />\n <ProductCardSection />\n\n <ProductNameSection\n class={styles.imageSection}\n product={product}\n trackingPosition={trackingPosition}\n trackingList={trackingList}\n />\n\n <ProductCardSection />\n\n <PurchaseSection product={product} />\n\n <RowDividerSection />\n </ProductCard>\n )\n}\n","import type { Product } from '@kissui/apps/src/product.type'\nimport CoffeeProductCard from './cards/CoffeeProductCard/CoffeeProductCard'\nimport AssortmentProductCard from './cards/AssortmentProductCard/AssortmentProductCard'\nimport { isAddToCartEvent } from './cards/parts/AddToCartButton/AddToCartButton'\nimport { productClick } from '@kissui/helpers/src/gtmEvents'\n\nexport type ProductCardProps = {\n products: Product[]\n trackingList?: string\n toggleCompatibilityModal: (clickedProduct: Product) => void\n compatibilityButtonText: string\n}\n\nexport default function ProductCardsList({ products, trackingList, compatibilityButtonText, toggleCompatibilityModal }: ProductCardProps) {\n\n return (\n <>\n {products.map((product, index) => {\n const trackingPosition = index + 1\n return product.bundled ? (\n <AssortmentProductCard\n key={product.longSku + product.category_name}\n product={product}\n onClick={event => gotoProduct(event, product, trackingPosition, trackingList)}\n trackingPosition={trackingPosition}\n trackingList={trackingList}\n />\n ) : (\n <CoffeeProductCard\n key={product.longSku + product.category_name}\n product={product}\n onClick={event => gotoProduct(event, product, trackingPosition, trackingList)}\n onCompatibilityClick={clickedProduct => toggleCompatibilityModal(clickedProduct)}\n compatibilityButtonText={compatibilityButtonText}\n trackingPosition={trackingPosition}\n trackingList={trackingList}\n />\n )\n })}\n </>\n )\n}\n\nfunction gotoProduct(event: Event, product: Product, trackingPosition: number, trackingList?: string): void {\n if (!isAddToCartEvent(event)) {\n productClick(trackingPosition, trackingList, product.longSku)\n window.location.assign(product.url)\n }\n}\n","import viewportHelperGlobal from '@kissui/helpers/src/viewport.helpers'\nimport { CollectionBannerProps } from '../../banner/CollectionBanner'\n\nexport default function getBackgroundImage(\n backgroundUrls: CollectionBannerProps['backgroundUrls'],\n viewportHelper = viewportHelperGlobal\n) {\n const { mobile = '', tablet = '', desktop = '', retina = '' } = backgroundUrls\n\n if (viewportHelper.is.mobile && mobile) {\n return mobile\n } else if ((viewportHelper.is.tablet || viewportHelper.is.mobile_tablet) && tablet) {\n return tablet\n } else if ((viewportHelper.is.retina || viewportHelper.is.tablet) && retina) {\n return retina\n } else if (\n (viewportHelper.is.desktop || viewportHelper.is.retina || viewportHelper.is.tablet) &&\n desktop\n ) {\n return desktop\n }\n return ''\n}\n","import ProductCard from '../base/ProductCard'\nimport ProductCardSection from '../base/ProductCardSection'\nimport { FeatureIconsProps } from '../parts/FeatureIcons/FeatureIcons'\nimport BackgroundSection from '../sections/BackgroundSection'\nimport FormattedText from '@kissui/apps/src/components/typography/FormattedText/FormattedText'\n\nimport styles from './CollectionCard.module.scss'\nimport getBackgroundImage from './getBackgroundImage'\n\ntype FeatureIcons = FeatureIconsProps['icons'][number] & { selected?: boolean }\n\nexport type CollectionCardProps = {\n title: string\n description?: string\n cupSizeIcons?: FeatureIcons[]\n backgroundUrls: {\n retina: string\n desktop: string\n tablet: string\n mobile: string\n }\n mode: 'light' | 'dark'\n}\n\nexport default function CollectionCard({\n title,\n description,\n cupSizeIcons = [],\n backgroundUrls,\n mode\n}: CollectionCardProps) {\n const backgroundUrl = getBackgroundImage(backgroundUrls)\n const backgroundStyle = backgroundUrl ? `background-image: url(${backgroundUrl})` : undefined\n\n return (\n <ProductCard shortSku=\"\" class={mode === 'dark' ? styles.dark : styles.light}>\n <BackgroundSection\n as=\"section\"\n style={backgroundStyle}\n class={styles.card}\n enableHover={false}>\n <div class={styles.collectionDetails}>\n <FormattedText as=\"h3\" class={styles.title}>\n {title}\n </FormattedText>\n {description ? (\n <FormattedText as=\"p\" class={styles.description}>\n {description}\n </FormattedText>\n ) : (\n ''\n )}\n {cupSizeIcons.map(cupSizeIcon => (\n <img\n alt={cupSizeIcon.label}\n title={cupSizeIcon.label}\n class={\n cupSizeIcon.selected\n ? styles.cupSizeIconSelected\n : styles.cupSizeIcon\n }\n src={`/shared_res/agility/next-components/assets/icons/${cupSizeIcon.icon}.svg`}\n />\n ))}\n </div>\n </BackgroundSection>\n <ProductCardSection></ProductCardSection>\n <ProductCardSection></ProductCardSection>\n <ProductCardSection></ProductCardSection>\n <ProductCardSection></ProductCardSection>\n <ProductCardSection></ProductCardSection>\n <ProductCardSection></ProductCardSection>\n <ProductCardSection></ProductCardSection>\n </ProductCard>\n )\n}\n","import { ComponentChildren } from 'preact'\nimport { unescapeHtml } from '@kissui/helpers/src/utils'\n\nimport styles from './CollectionBanner.module.scss'\nimport getBackgroundImage from '../cards/CollectionCard/getBackgroundImage'\n\nexport type CollectionBannerProps = {\n children?: ComponentChildren\n backgroundUrls: {\n retina: string\n desktop: string\n tablet: string\n mobile: string\n }\n title: string\n description: string\n mode: 'light' | 'dark'\n anchorId?: string\n}\n\nexport default function CollectionBanner({\n children,\n title,\n description,\n backgroundUrls,\n mode,\n anchorId\n}: CollectionBannerProps) {\n const backgroundUrl = getBackgroundImage(backgroundUrls)\n const backgroundImageStyle = backgroundUrl\n ? `background-image: url(${backgroundUrl});`\n : undefined\n\n return (\n <section data-id={anchorId} class={mode === 'dark' ? styles.dark : styles.light}>\n <header class={styles.collectionBanner} style={backgroundImageStyle}>\n <h1>{title}</h1>\n <p>{unescapeHtml(description)}</p>\n </header>\n\n {children}\n </section>\n )\n}\n","async function fetchHtml(url: string): Promise<string | null> {\n try {\n const response = await fetch(url)\n if (response.ok) {\n const html = await response.text()\n return html\n }\n return null\n } catch (error) {\n return null\n }\n}\n\nfunction parseHtml(html: string): Document | null {\n const parser = new DOMParser()\n try {\n const result = parser.parseFromString(html, 'text/html')\n return result\n } catch (error) {\n return null\n }\n}\n\nexport async function fetchAndParse(url: string): Promise<string> {\n const document = await fetchHtml(url)\n if (!document) return ''\n const parser = parseHtml(document)\n if (!parser) return '' // error parsing\n const { body } = parser\n const mainTag = Array.from<HTMLElement>(body.querySelectorAll('main#main')) // there's 2 <main>s on the page!\n if (mainTag.length === 0) return '' // no main tag!\n\n // filter out span.visually-hidden!\n if (mainTag[0].children.length > 0) {\n Array.from(mainTag[0].children).forEach(child => {\n if (child.classList.contains('visually-hidden')) {\n child.remove()\n }\n })\n }\n return mainTag[0].innerHTML\n}\n","import { createContext, type ComponentChildren } from 'preact'\nimport {\n useRef,\n useEffect,\n useState,\n useMemo,\n useContext,\n type StateUpdater\n} from 'preact/hooks'\nimport cn from 'classnames'\nimport styles from './ModalDrawer.module.scss'\nimport isOldSafari from '@kissui/apps/src/utils/isOldSafari'\n\nexport type ModalDrawerParentContext = {\n setFooter: StateUpdater<ComponentChildren>\n}\n\nconst Context = createContext<ModalDrawerParentContext>({ setFooter: () => { } })\n\nexport type ModalDrawerProps = {\n children: ComponentChildren\n title: ComponentChildren\n closeIconAltText: string\n isOpen?: boolean\n maxHeightMobile?: 25 | 33 | 50 | 66 | 75 | 87 | 100\n onClose?: () => void\n}\n\nexport default function ModalDrawer({\n children,\n title,\n closeIconAltText,\n isOpen = false,\n maxHeightMobile = 75,\n onClose = () => { }\n}: ModalDrawerProps) {\n const dialogRef = useRef<HTMLDialogElement>(null)\n const [isClosing, setIsClosing] = useState<boolean>(false)\n const [footer, setFooter] = useState<ComponentChildren>(null)\n\n function hideModal() {\n setIsClosing(true)\n // have to manually close after animation due to Safari\n const close = () => {\n setIsClosing(false)\n dialogRef.current?.close()\n dialogRef.current?.removeEventListener('animationend', close)\n }\n dialogRef.current?.addEventListener('animationend', close)\n }\n\n useEffect(() => {\n if (!dialogRef || !dialogRef.current) return undefined\n\n // handles old safari + <dialog> support with dynamic import polyfill\n if (isOldSafari(navigator?.userAgent)) {\n (async () => {\n if (dialogRef.current) {\n try {\n const { default: dialogPolyfill } = await import('dialog-polyfill')\n dialogPolyfill.registerDialog(dialogRef.current)\n } catch (error) {\n\n }\n }\n })()\n }\n\n function onDialogClick(event: MouseEvent) {\n if (event.target === dialogRef.current) {\n onClose()\n }\n }\n\n dialogRef.current?.addEventListener('click', onDialogClick)\n\n return () => {\n dialogRef.current?.removeEventListener('click', onDialogClick)\n }\n }, [dialogRef.current])\n\n useEffect(() => {\n if (!dialogRef || !dialogRef.current) return\n\n if (isOpen) {\n dialogRef.current.showModal()\n } else if (dialogRef.current.open) {\n hideModal()\n }\n }, [dialogRef?.current, isOpen])\n\n const parentContext = useMemo<ModalDrawerParentContext>(\n () => ({\n setFooter\n }),\n [setFooter]\n )\n\n return (\n <dialog\n ref={dialogRef}\n onClose={onClose}\n class={cn(\n styles.container,\n { [styles.isClosing]: isClosing },\n styles[`h${maxHeightMobile}`]\n )}\n >\n {(isOpen || isClosing) && (\n <article class={styles.article}>\n <Context.Provider value={parentContext}>\n <header class={styles.header}>\n <h2 class={styles.title}>{title}</h2>\n <button\n class={styles.closeButton}\n type=\"button\"\n onClick={onClose}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus\n aria-label={closeIconAltText}\n />\n </header>\n <div class={styles.content}>{children}</div>\n {footer && <footer class={styles.footer}>{footer}</footer>}\n </Context.Provider>\n </article>\n )}\n </dialog>\n )\n}\n\nexport type ModalDrawerFooterProps = {\n children: ComponentChildren\n}\n\nModalDrawer.Footer = function Footer({ children }: ModalDrawerFooterProps) {\n const { setFooter } = useContext(Context)\n setFooter(children)\n return null\n}\n","/** Returns true if user agent is Safari/iPhone and version is lower than 15.3 */\nexport default function isOldSafari(userAgent?: string) {\n const agent = userAgent ?? navigator.userAgent;\n const versionMatch = agent.match(/Version\\/(\\d+\\.\\d+)/);\n const safariVersion = versionMatch ? parseFloat(versionMatch[1]) : 0;\n const isOlderThan153 = safariVersion < 15.3;\n const isSafari = agent.includes('Safari') && agent.includes('iPhone');\n\n return isSafari && isOlderThan153;\n}\n","import {\n useEffect,\n useState\n} from 'preact/hooks'\nimport { Product } from '@kissui/apps/src/product.type'\nimport { fetchAndParse } from './modalUtils'\nimport useAppData from '@kissui/apps/src/hooks/useAppData'\nimport plpAppData from '@kissui/apps/src/plp-core/store/plp.data'\nimport ModalDrawer from '@kissui/apps/src/components/ModalDrawer/ModalDrawer'\nimport styles from './CompatibilityModal.module.scss'\n\nexport type CompatibilityModalProps = {\n isOpen: boolean\n product: Product | null\n onClose: () => void\n modalSettings: {\n url: string\n title: string\n loadingLabel: string\n loadingLabelError: string\n closeButtonLabel: string\n }\n}\nexport default function CompatibilityModal({\n isOpen,\n product,\n onClose,\n modalSettings: {\n url: compatibilityUrl,\n title: modalTitle,\n loadingLabel,\n loadingLabelError: errorLoadingLabel,\n closeButtonLabel\n }\n}: CompatibilityModalProps) {\n const [data, setData] = useState<CompatibilityState>({\n status: 'INITIAL',\n html: ''\n })\n\n async function fetchData() {\n if (!compatibilityUrl) {\n return\n }\n if (data.status === 'LOADED' || data.status === 'PENDING') {\n return\n }\n setData({ status: 'PENDING', html: '' })\n\n const html = await fetchAndParse(compatibilityUrl)\n if (!html) {\n setData({ status: 'ERROR', html: '' })\n return\n }\n setData({ status: 'LOADED', html })\n }\n\n useEffect(() => {\n if (!isOpen) {\n return\n }\n (async () => {\n try {\n await fetchData()\n } catch (error: any) {\n console.error(error)\n }\n })()\n }, [isOpen])\n\n if (!compatibilityUrl) {\n return null\n }\n\n return (\n <ModalDrawer\n title={modalTitle}\n isOpen={isOpen}\n closeIconAltText={closeButtonLabel}\n onClose={onClose}\n maxHeightMobile={87}>\n {data.status === 'LOADED' && <Loaded html={data.html} />}\n {data.status === 'PENDING' && <Pending label={loadingLabel}></Pending>}\n {data.status === 'ERROR' && <Error label={errorLoadingLabel}></Error>}\n </ModalDrawer>\n )\n}\n\nfunction Loaded({ html }: { html: string }) {\n return (\n <div class={styles.stateLoaded} dangerouslySetInnerHTML={{ __html: html }} />\n )\n}\n\nfunction Pending({ label }: { label: string }) {\n return (\n <div class={styles.statePending}>{label}</div>\n )\n}\n\nfunction Error({ label }: { label: string }) {\n return (\n <div class={styles.stateError}>{label}</div>\n )\n}\n\ntype CompatibilityState = {\n status: 'INITIAL' | 'PENDING' | 'LOADED' | 'ERROR'\n html: string\n}\n","import createProps from '@kissui/helpers/src/props.helpers'\n\nclass Loader extends HTMLElement {\n constructor() {\n super()\n this.props = {}\n }\n\n connectedCallback() {\n this.props = createProps(this.attributes)\n this.render()\n }\n\n render() {\n const { icon = '24/symbol/status-loading', state = 'is-loading' } = this.props\n this.innerHTML = `<nb-icon icon=\"${icon}\" class=\"${state}\"></nb-icon>`\n }\n}\n\ncustomElements.get('nb-loader') || customElements.define('nb-loader', Loader)\n\nexport default Loader\n","import { createElement } from 'preact'\n\n// Note: We need this import for customElements.define to work\nimport '@kissui/components/src/loader/loader'\n\nexport function NbLoader(props: JSX.IntrinsicAttributes) {\n return createElement('nb-loader', props)\n}\n","import register from 'preact-custom-element'\nimport { useRef, useEffect, useState } from 'preact/hooks'\nimport type { Ref } from 'preact/hooks'\nimport type { FunctionComponent } from 'preact'\n\n/**\n * Turns a Preact component into a Web Component,\n * allowing the component to be used in either context\n * @param func A (P)React function component\n * @param tagName The Web Component tag name, like 'my-component'\n * @param observedAttributes Array of element attributes to observe for changes\n * @param options Additional web component options\n * @returns The custom element\n */\nexport default function asWebComponent(\n func: FunctionComponent<any>,\n tagName: string,\n observedAttributes?: string[],\n options?: { shadow: boolean }\n): CustomElementConstructor {\n if (customElements.get(tagName)) {\n return customElements.get(tagName) as CustomElementConstructor\n }\n register(func, tagName, observedAttributes, options)\n return customElements.get(tagName) as CustomElementConstructor\n}\n\ninterface useCustomElementReturn {\n immediateChildRef: Ref<any>\n customElement: HTMLElement | null | undefined\n}\n\n/**\n * Allows access to the Web Component wrapper, from within the Preact Component\n */\nexport function useCustomElement(): useCustomElementReturn {\n const ref = useRef<any>(null)\n const [customElement, setCustomElement] = useState(undefined)\n useEffect(() => {\n setCustomElement(ref.current?.parentElement)\n }, [ref])\n\n return { immediateChildRef: ref, customElement }\n}\n","import asWebComponent from '@kissui/helpers/src/asWebComponent'\nimport useAppData from '@kissui/apps/src/hooks/useAppData'\nimport plpAppData from '@kissui/apps/src/plp-core/store/plp.data'\nimport { useState } from 'preact/hooks'\nimport ProductGrid from '@kissui/apps/src/components/ProductGrid'\nimport ProductCardsList from '@kissui/apps/src/components/ProductCardsList'\nimport CollectionCard from '@kissui/apps/src/components/cards/CollectionCard/CollectionCard'\nimport CollectionBanner from '@kissui/apps/src/components/banner/CollectionBanner'\nimport { Product, ProductCollection } from '@kissui/apps/src/product.type'\nimport CompatibilityModal, {\n CompatibilityModalProps\n} from '@kissui/components/src/compatibility/CompatibilityModal/CompatibilityModal'\nimport { NbLoader } from '@kissui/apps/src/components/Loader'\n\nimport './plp-cards-grid.scss'\n\ntype PLPCardsGridProps = {\n 'show-collections': 'true' | 'false'\n}\n\nfunction PLPCardsGrid({ 'show-collections': showCollections }: PLPCardsGridProps) {\n const [modalState, setModalState] = useState<Product | null>(null)\n const appData = useAppData<typeof plpAppData>(plpAppData)\n const filteredProducts = appData.productsListFiltered() as any[]\n const collectionHeaderType = appData.get('options').collection_header_type\n const toggleCompatibilityModal = (product: Product) => {\n setModalState(product)\n }\n const hideModal = () => setModalState(null)\n\n const {\n compatibility_card_button_text: compatibilityButtonText,\n compatibility_modal_url: compatibilityUrl,\n compatibility_modal_title: modalTitle,\n compatibility_modal_loading_text: loadingLabel,\n compatibility_modal_loading_text_error: loadingLabelError,\n compatibility_modal_close_button_ally: closeButtonLabel\n } = appData.get('options')\n\n const modalProps: CompatibilityModalProps = {\n isOpen: !!modalState,\n product: modalState,\n onClose: hideModal,\n modalSettings: {\n url: compatibilityUrl,\n title: modalTitle,\n loadingLabel,\n loadingLabelError,\n closeButtonLabel\n }\n }\n\n if (showCollections === 'true') {\n const productCollections = appData.get('products') as ProductCollection[]\n const bubbles = appData.get('bubbles') as ProductCollection[]\n\n if (collectionHeaderType === 'Card') {\n return (\n <>\n {productCollections.map((productCollection, index) => {\n const collection = bubbles[index]\n const {\n background_retina,\n background_desktop,\n background_mobile,\n background_tablet,\n description,\n contrast = 'dark',\n products,\n isLoadingProducts\n } = productCollection\n\n return (\n <ProductGrid\n class=\"collection-grid\"\n key={collection.link}\n anchorId={collection.link}>\n <CollectionCard\n title={collection.label}\n description={description}\n backgroundUrls={{\n retina: background_retina,\n desktop: background_desktop,\n mobile: background_mobile,\n tablet: background_tablet\n }}\n mode={contrast}\n />\n {isLoadingProducts ? (\n <div class=\"spinner-box\">\n <NbLoader />\n </div>\n ) : (\n <ProductCardsList\n products={products}\n trackingList={collection.label}\n toggleCompatibilityModal={toggleCompatibilityModal}\n compatibilityButtonText={compatibilityButtonText}\n />\n )}\n </ProductGrid>\n )\n })}\n <CompatibilityModal {...modalProps} />\n </>\n )\n } else {\n return (\n <>\n {productCollections.map((product, index) => {\n const collection = bubbles[index]\n const {\n background_retina,\n background_desktop,\n background_mobile,\n background_tablet,\n description,\n contrast = 'dark',\n products\n } = product\n\n return (\n <CollectionBanner\n anchorId={collection.link}\n key={collection.link}\n title={collection.label}\n description={description}\n backgroundUrls={{\n retina: background_retina,\n desktop: background_desktop,\n mobile: background_mobile,\n tablet: background_tablet\n }}\n mode={contrast}>\n <ProductGrid>\n <ProductCardsList\n products={products}\n trackingList={collection.label}\n toggleCompatibilityModal={toggleCompatibilityModal}\n compatibilityButtonText={compatibilityButtonText}\n />\n </ProductGrid>\n </CollectionBanner>\n )\n })}\n <CompatibilityModal {...modalProps} />\n </>\n )\n }\n }\n\n return (\n <>\n <ProductGrid>\n <ProductCardsList\n products={filteredProducts}\n toggleCompatibilityModal={toggleCompatibilityModal}\n compatibilityButtonText={compatibilityButtonText}\n />\n </ProductGrid>\n <CompatibilityModal {...modalProps} />\n </>\n )\n}\n\nexport default asWebComponent(PLPCardsGrid, 'plp-cards-grid', ['data-request', 'show-collections'])\n","import { NespressoElement } from '@kissui/components/src/nespressoElement'\nimport appData from '../../store/plp.data'\nimport handleAppEvent from '../../store'\n\nclass PlpResultsChip extends NespressoElement {\n onStart() {\n const { a11y_label, color, icon_right, label, variation } = this.props\n\n const colorHtml = color ? `<div class=\"chip-color\" style=\"background:${color}\"></div>` : ''\n\n this.template = `\n <nb-cta\n icon_right=\"${icon_right}\"\n variation=\"${variation}\"\n size=\"32\"\n aria_label=\"${a11y_label} ${label}\"\n >\n ${colorHtml}${label}\n </nb-cta>\n `\n }\n onReady() {\n const { value, type, label } = this.props\n this.addEventListener('click', () => {\n appData.filtersUpdate({\n key: type,\n label: label,\n selected: false,\n value: value\n })\n this.remove()\n handleAppEvent('onFilter')\n })\n }\n}\n\ncustomElements.get('plp-results-chip') || customElements.define('plp-results-chip', PlpResultsChip)\n\nexport default PlpResultsChip\n","import { filterActionEvent } from '@kissui/helpers/src/gtmEvents'\nimport { NespressoElement } from '@kissui/components/src/nespressoElement'\nimport handleAppEvent from '../../store'\nimport appData from '../../../plp-core/store/plp.data'\nimport '../../../plp-core/components/results/plp.results-chip'\nimport './plp-results-header.scss'\nimport { CB_RESULTS_TOTAL_ID } from '@kissui/apps/src/plp-core/config/constants'\n\nexport default class PlpCardsResultsHeader extends NespressoElement {\n #resetSelector = '#nb-plp-filter-results-reset-all'\n\n constructor() {\n super()\n\n this.updateComponent = this.updateComponent.bind(this)\n }\n\n onStart() {\n this.props = this._createProps(this.parentElement.attributes)\n appData.subscribe(this.updateComponent)\n }\n\n onReady() {\n this.updateComponent()\n }\n\n updateComponent() {\n const {\n a11y_header_result_label_button = 'Delete filter',\n a11y_header_result_label_reset = 'Filters',\n a11y_header_result_label_results = 'With your filters activated, we are',\n header_result_label_reset = 'Delete All',\n header_result_label_results = 'results',\n header_result_label_results_one = 'result',\n header_result_label_results_zero = 'results',\n header_result_label = 'Currently shopping by'\n } = this.props\n\n const total = appData.productsFilteredCount()\n const filterLabels = appData.filtersSelectedCount()\n ? appData.filtersSelectedWithLabel()\n : []\n const getResultLabel = () => {\n switch (total) {\n case 0:\n return header_result_label_results_zero\n case 1:\n return header_result_label_results_one\n default:\n return header_result_label_results\n }\n }\n\n this.loadTemplate(\n `\n <nb-container\n element_class=\"plp-results-header\"\n contrast=\"light\">\n ${\n filterLabels\n ? `<p class=\"t-sm-400-sl cb-title\">${header_result_label}\n <span class='sr-only'> ${filterLabels\n .map(filter => `${filter.categoryTitle}, ${filter.label}, `)\n .join(' / ')}</span>\n </p>${filterLabels\n .map(\n filter =>\n `<plp-results-chip\n icon_right=\"24/symbol/close\"\n variation=\"secondary\"\n value=\"${filter.value}\"\n type=\"${filter.key}\"\n label=\"${filter.label}\"\n color=\"${filter.color || ''}\"\n a11y_label=\"${a11y_header_result_label_button}\"\n >${filter.label}</plp-results-chip>`\n )\n .join('')}`\n : ''\n }\n <nb-link\n id=\"nb-plp-filter-results-reset-all\"\n size=\"small\"\n color=\"black\"\n aria-label=\"${a11y_header_result_label_reset}\"\n >\n ${header_result_label_reset}\n </nb-link>\n <p class=\"t-xs-700-caps-sl cb-results\">\n <span class=\"sr-only\">${a11y_header_result_label_results}</span> \n <span id=\"${CB_RESULTS_TOTAL_ID}\">${total}</span> ${getResultLabel()}:\n </p>\n </nb-container>\n `,\n true\n )\n this.bindEvents()\n }\n\n bindEvents() {\n document.querySelector(this.#resetSelector)?.addEventListener('click', this.resetClick)\n }\n\n onDestroy() {\n appData.unsubscribe(this.updateComponent)\n document.querySelector(this.#resetSelector)?.removeEventListener('click', this.resetClick)\n }\n\n resetClick() {\n filterActionEvent('filter clear', '', '', 'clear all ext')\n appData.filtersReset()\n handleAppEvent('onFilter')\n }\n}\n\ncustomElements.get('plp-cards-results-header') ||\n customElements.define('plp-cards-results-header', PlpCardsResultsHeader)\n","// import * as Turbo from \"@hotwired/turbo\"\nimport { NespressoElement } from '@kissui/components/src/nespressoElement'\nimport handleAppEvent from './store'\n\nimport {\n FILTER_MAIN_BLOCK_ID,\n NAVIGATION_MAIN_BLOCK_ID,\n PRODUCTS_LIST_MAIN_BLOCK_ID,\n PRODUCTS_RESULTS_MAIN_BLOCK_ID\n} from './config/constants'\nimport { enableExperiment } from './config/experiments'\n\nimport './styles/plp.app.scss'\n\nclass PLPApp extends NespressoElement {\n constructor() {\n super()\n this.dataTransformService = () => []\n this.dataFiltersService = () => []\n this.dataSortService = () => []\n this.recommendationService = () => {}\n this.appStates = {}\n this.plpType = 'app'\n }\n\n static get observedAttributes() {\n return ['data-loaded', 'data']\n }\n\n attributeChangedCallback(name, oldVal, newVal) {\n if (\n name === 'data' &&\n oldVal !== null && // avoid during the first render\n newVal !== null &&\n newVal !== oldVal &&\n !!newVal.length\n ) {\n this.connectedCallback()\n return\n }\n const propChanged = name === 'data-loaded'\n const valueChanged = newVal !== null && newVal !== oldVal && !!newVal.length\n\n if (propChanged && valueChanged) {\n handleAppEvent('onMergeData', {\n dataSortService: this.dataSortService,\n filtersService: this.dataFiltersService,\n productService: this.dataTransformService,\n recommendationService: this.recommendationService,\n pageBuilderProps: this.props\n })\n }\n }\n\n defineTemplate() {\n this.template = `\n <plp-filter id=\"${FILTER_MAIN_BLOCK_ID}\" style=\"display: none;\"></plp-filter>\n <plp-navigation id=\"${NAVIGATION_MAIN_BLOCK_ID}\" style=\"display: none;\"></plp-navigation>\n <plp-products id=\"${PRODUCTS_LIST_MAIN_BLOCK_ID}\" style=\"display: none;\"></plp-products>\n <plp-results id=\"${PRODUCTS_RESULTS_MAIN_BLOCK_ID}\" style=\"display: none;\"></plp-results>\n `\n }\n\n onStart() {\n const enabledExperiments = this.props.options?.enabledExperiments ?? []\n enabledExperiments.forEach(experiment => enableExperiment(experiment))\n\n handleAppEvent('onload', {\n plpType: this.plpType,\n appStatesHandler: this.appStates\n })\n\n this.classList.add('plp-app', `plp-app-${this.plpType}`)\n const itemsPerRow = this.props.options?.items_per_row\n if (itemsPerRow > '3') {\n this.classList.add(`plp-row-${itemsPerRow}`)\n }\n\n this.defineTemplate()\n }\n}\n\nexport default PLPApp\n","/* eslint-disable */\nexport default class Category {\n _id = ''\n _name = ''\n _description = ''\n _products = []\n _capacityLabel = null\n _detailsIcon = null\n _icon = null\n _isLoadingProducts = false\n _rangeLink = null\n _subCategories = []\n _superCategories = []\n _url = ''\n _background_retina =\n '/shared_res/agility/next-components/assets/backgrounds/barista_creation_range_XL.jpg'\n _background_desktop =\n '/shared_res/agility/next-components/assets/backgrounds/barista_creation_range_L.jpg'\n _background_mobile =\n '/shared_res/agility/next-components/assets/backgrounds/barista_creation_range_S.jpg'\n _background_tablet = ''\n _contrast = 'dark'\n _isSegment = false\n\n constructor(category, PageBuilderData) {\n this._id = category.id || this._id\n this._name = category.name || this._name\n this._capacityLabel = category.capacityLabel || this._capacityLabel\n this._description = category.description || this._description\n this._detailsIcon = category.detailsIcon || this._detailsIcon\n this._icon = category.icon || this._icon\n this._rangeLink = category.rangeLink || this._rangeLink\n this._subCategories = category.subCategories || this._subCategories\n this._superCategories = category.superCategories || this._superCategories\n this._url = category.url || this._url\n this._background_desktop = PageBuilderData?.background_desktop || this._background_desktop\n this._background_mobile = PageBuilderData?.background_mobile || this._background_mobile\n this._background_retina = PageBuilderData?.background_retina || this._background_retina\n this._background_tablet = PageBuilderData?.background_tablet || this._background_tablet\n this._contrast = PageBuilderData?.contrast || this._contrast\n }\n\n get id() {\n return this._id\n }\n get products() {\n return this._products\n }\n set products(products) {\n this._products = products\n }\n get isLoadingProducts() {\n return this._isLoadingProducts\n }\n set isLoadingProducts(isLoadingProducts) {\n this._isLoadingProducts = isLoadingProducts\n }\n get name() {\n return this._name\n }\n get description() {\n return this._description\n }\n get contrast() {\n return this._contrast\n }\n get background_desktop() {\n return this._background_desktop\n }\n get background_mobile() {\n return this._background_mobile\n }\n get background_retina() {\n return this._background_retina\n }\n get background_tablet() {\n return this._background_tablet\n }\n\n isProductCategory() {\n return !this._isSegment && this._products && this._products.length > 0\n }\n}\n","import Category from '../../plp-core/models/Category.js'\n\nexport default class CoffeeCategory extends Category {\n constructor(category, PageBuilderData) {\n super(category, PageBuilderData)\n }\n}\n","import { isLoggedIn } from '@kissui/helpers/src/dataLayer'\n\nexport default class Product {\n id = ''\n sku = ''\n longSku = ''\n name = ''\n name_custom = ''\n available = true\n description = null\n hidePrice = false\n image_alt_text = ''\n image = ''\n inStock = true\n internationalId = ''\n internationalName = ''\n legacyId = ''\n maxOrderQuantity = null\n packagingType = null\n price = null\n pushRatingEnabled = false\n ranges = []\n salesMultiple = null\n technologies = []\n type = ''\n unitQuantity = 50\n url = ''\n labels = []\n category_name = ''\n category = null\n highlighted = false\n strikethrough_price = ''\n additional_message = ''\n additional_message_icon = ''\n additional_message_link = {}\n api_override = null\n view_details_label = ''\n headline = ''\n\n constructor(product) {\n /* SKU */\n this.sku = product.internationalId || this.sku\n this.longSku = product.id || this.longSku\n this.id = product.id || this.id\n this.name = product.name || this.name\n this.name_custom = product.name_custom || this.name_custom\n this.available = product.available || this.available\n this.description = product.description || this.description\n this.hidePrice = isLoggedIn() ? false : product.hidePrice || this.hidePrice\n this.image_alt_text = product?.image?.altText || this.image_alt_text\n this.image = product?.image?.url || this.image\n this.inStock = product.inStock\n this.internationalId = product.internationalId || this.internationalId\n this.internationalName = product.internationalName || this.internationalName\n this.legacyId = product.legacyId || this.legacyId\n this.maxOrderQuantity = product.maxOrderQuantity || this.maxOrderQuantity\n this.packagingType = product.packagingType || this.packagingType\n this.price = product.price ?? this.price\n this.pushRatingEnabled = product.pushRatingEnabled || this.pushRatingEnabled\n this.ranges = product.ranges || this.ranges\n this.salesMultiple = product.salesMultiple || this.salesMultiple\n this.technologies = product.technologies || this.technologies\n this.type = product.type || this.type\n this.unitQuantity = product.unitQuantity || this.unitQuantity\n this.url = product.url || this.url\n this.highlighted = product.highlighted || this.highlighted\n this.strikethrough_price = product.strikethrough_price || this.strikethrough_price\n this.additional_message = product.additional_message || this.additional_message\n this.additional_message_icon =\n product.additional_message_icon || this.additional_message_icon\n this.additional_message_link =\n product.additional_message_link || this.additional_message_link\n this.api_override = product.api_override || this.api_override\n this.view_details_label = product.view_details_label || this.view_details_label\n this.headline = product.headline || this.headline\n this.labels = product.labels || this.labels\n\n // category_name\n const categoryId = product.categoryId ? product.categoryId.split('/') : ['']\n this.category_name = categoryId[categoryId.length - 1]\n this.category = product.category || this.category\n }\n}\n","import Product from '../../plp-core/models/Product.js'\nimport { getSleeveNumber } from '@kissui/helpers/src/catalog'\n\nexport default class CoffeeProduct extends Product {\n cupSizes = []\n cupSizesDetails = []\n flavors = []\n in_stock = true\n sales_multiple = 0\n bundled = false\n logos = []\n is_headline_hidden = ''\n a11y_price = ''\n a11y_product_card = ''\n shop_similar = ''\n label_sleeve = ''\n label_sleeves = ''\n label_capsules = ''\n intensity = null\n a11y_intensity_max = ''\n label_decaffeinato = ''\n show_sleeve_price = false\n show_sleeve = false\n price_per_capsule = null\n final_price = null\n capsule_price_label = ''\n capsule_price_syntax = '{capsule_price_label}: {price_per_capsule}'\n sleeve_syntax = '{numberOfSleeves} {sleeveLabel} ({quantity} {label_capsules})'\n perSleeveLabel = ''\n number_of_sleeves = ''\n number_of_capsules = ''\n show_capsule_price = false\n sort_price = null\n bundle_details = {}\n\n constructor(product, PageBuilderData) {\n super(product)\n this.initializeCopywritingData(PageBuilderData)\n this.initializeOptionsData(PageBuilderData)\n this.initializeProductData(product)\n this.finalizeInitialization(product)\n }\n\n initializeCopywritingData(PageBuilderData) {\n const {\n a11y_price = '',\n a11y_product_card = '',\n shop_similar,\n quick_view_plp = {},\n alt_fair_trade = '',\n alt_vertuo_next = '',\n alt_organic = '',\n alt_rainforest = '',\n alt_sustainability = '',\n alt_q_certification_arabica = ''\n } = PageBuilderData.copywriting || PageBuilderData\n\n this.a11y_price = a11y_price\n this.a11y_product_card = a11y_product_card\n this.shop_similar = shop_similar\n this.quick_view_plp = quick_view_plp\n\n this.altTexts = {\n fair_trade: alt_fair_trade,\n vertuo_next: alt_vertuo_next,\n organic: alt_organic,\n rainforest: alt_rainforest,\n sustainability: alt_sustainability,\n q_certification_arabica: alt_q_certification_arabica\n }\n }\n\n initializeOptionsData(PageBuilderData) {\n const {\n show_sleeve = false,\n label_sleeve = '',\n label_sleeves = '',\n label_capsules = '',\n show_sleeve_price = false,\n capsule_price_label,\n capsule_price_syntax,\n is_headline_hidden = false,\n sleeve_syntax = '{numberOfSleeves} {sleeveLabel} ({quantity} {label_capsules})',\n label_decaffeinato = '',\n a11y_intensity_max = '',\n perSleeveLabel = ''\n } = PageBuilderData.options || PageBuilderData\n\n this.show_sleeve = show_sleeve\n this.label_sleeve = label_sleeve\n this.label_sleeves = label_sleeves\n this.label_capsules = label_capsules\n this.show_sleeve_price = show_sleeve_price\n this.capsule_price_label = capsule_price_label || this.capsule_price_label\n this.capsule_price_syntax = capsule_price_syntax || this.capsule_price_syntax\n this.is_headline_hidden = is_headline_hidden\n this.sleeve_syntax = sleeve_syntax\n this.label_decaffeinato = label_decaffeinato\n this.a11y_intensity_max = a11y_intensity_max\n this.perSleeveLabel = perSleeveLabel || this.perSleeveLabel\n }\n\n initializeProductData(product) {\n this.cupSizes = product.cupSizes || this.cupSizes\n this.cupSizesDetails = product.cupSizesDetails || this.cupSizesDetails\n this.flavors = product.flavors || this.flavors\n this.in_stock = product.inStock !== undefined ? product.inStock : this.in_stock\n this.intensity = product.intensity || this.intensity\n this.min_intensity = product.min_intensity\n this.max_intensity = product.max_intensity\n this.sales_multiple = product.salesMultiple\n this.price_per_capsule = product.price_per_capsule || this.price_per_capsule\n this.price = this.getPrice(product)\n this.number_of_sleeves = product.number_of_sleeves || this.number_of_sleeves\n this.number_of_capsules = product.number_of_capsules || this.number_of_capsules\n this.show_capsule_price = product.show_capsule_price || this.show_capsule_price\n this.sort_price = this.getSortPrice(product)\n this.bundle_details = product.bundle_details || this.bundle_details\n this.images = product.images || {}\n this.initializeLogos(product)\n }\n\n initializeLogos(product) {\n const logosConfig = [\n { condition: product.onlyVertuoNext, name: 'only_vertuo_next', altKey: 'vertuo_next' },\n { condition: product.fairTrade, name: 'fair_trade', altKey: 'fair_trade' },\n { condition: product.organicEu, name: 'is_organic', altKey: 'organic' },\n { condition: product.rainforest, name: 'is_rainforest', altKey: 'rainforest' },\n { condition: product.sustainability, name: 'is_sustainable', altKey: 'sustainability' },\n {\n condition: product.arabica,\n name: 'is_q_certified_arabica',\n altKey: 'q_certification_arabica'\n }\n ]\n this.logos = logosConfig\n .filter(logo => logo.condition != null)\n .map(({ name, altKey }) => ({\n name,\n alt: this.altTexts[altKey]\n }))\n }\n\n finalizeInitialization(product) {\n const sleeveNumber = this.number_of_sleeves || getSleeveNumber(product)\n const { hasPricePerSleeve, sleevePrice } = this.getSleevePrice({\n show_sleeve_price: this.show_sleeve_price,\n number_of_sleeves: sleeveNumber,\n salesMultiple: this.sales_multiple,\n price: this.price,\n bundled: this.bundled\n })\n this.hasPricePerSleeve = hasPricePerSleeve\n this.sleevePrice = sleevePrice\n this.bundled = this.isBundled()\n }\n\n getPrice(product) {\n return product.final_price ?? product.price ?? this.final_price\n }\n\n getSortPrice(product) {\n return this.show_sleeve_price || product.price_per_capsule == null\n ? this.getPrice(product)\n : product.price_per_capsule\n }\n\n getSleevePrice({ show_sleeve_price, number_of_sleeves, salesMultiple, price, bundled }) {\n let hasPricePerSleeve = true\n let sleevePrice = null\n if (!bundled && number_of_sleeves === 1) {\n sleevePrice = price * (show_sleeve_price ? 1 : salesMultiple)\n } else {\n hasPricePerSleeve = false\n }\n return { hasPricePerSleeve, sleevePrice }\n }\n\n isBundled() {\n return this.sales_multiple > 1 && this.unitQuantity === 1\n ? false\n : this.sales_multiple === 1 && this.unitQuantity > 1\n }\n}\n","import { COFFEE_ORIGINAL, COFFEE_VERTUO, COFFEE_PRO } from '@kissui/components/src/constants.mjs'\n\nexport default (nav_links, enabledCremaTechnologies, PageBuilderData) => {\n // Do not change icon name. This is NC2 merger of menus from PB export and crema data\n const ORIGINAL_ICON = 'coffee'\n const VERTUO_ICON = 'gran-lungo-vertuo-capsule'\n const PRO_ICON = 'brand_coffee_capsule_pro'\n\n const { copywriting = {}, options = {} } = PageBuilderData\n\n const transformCremaTechnologiesToLink = technologies => {\n return technologies.map(({ id, url, name, isSelected }) => ({\n link: url,\n label: name,\n seo_label: name,\n icon_left: id ? getIconByTechnology(id.split('/').pop()) : '',\n selected: isSelected\n }))\n }\n const getIconByTechnology = technology => {\n switch (technology) {\n case COFFEE_VERTUO:\n return VERTUO_ICON\n case COFFEE_PRO:\n return PRO_ICON\n default:\n return COFFEE_ORIGINAL\n }\n }\n const filterDefaultTechnology = link => {\n if (\n link.icon_left !== ORIGINAL_ICON &&\n link.icon_left !== VERTUO_ICON &&\n link.icon_left !== PRO_ICON\n ) {\n return link\n }\n }\n\n const replaceCremaTechnologies = () => {\n if (!copywriting.all_products_navigation_label) {\n return []\n }\n const selectedTechnology = enabledCremaTechnologies.find(t => t.isSelected)\n if (!selectedTechnology) {\n return []\n }\n return [\n {\n url: selectedTechnology.url,\n name: copywriting.all_products_navigation_label,\n isSelected: true\n }\n ]\n }\n\n let enabledTechnologies\n if (options.hide_technologies_in_navigation) {\n enabledTechnologies = replaceCremaTechnologies()\n } else {\n enabledTechnologies = enabledCremaTechnologies\n }\n\n if (!nav_links.length && enabledTechnologies.length) {\n return transformCremaTechnologiesToLink(enabledTechnologies)\n }\n\n if (!enabledTechnologies.length) {\n return nav_links\n }\n\n // Remove Page Builder data about technology links to use the one activated in Crema UI data\n const navLinksWithoutTechnology = [...nav_links].filter(filterDefaultTechnology)\n\n return [...transformCremaTechnologiesToLink(enabledTechnologies), ...navLinksWithoutTechnology]\n}\n","import { DEFAULT_BUBBLE_ICON } from '@kissui/components/src/constants.mjs'\nimport { isCategoryHidden } from '@kissui/helpers/src/cremaDataHelper'\n\nexport default (bubbles, productGroups, categories, recommendation) => {\n const productsGroup = productGroups\n .filter(el => !isCategoryHidden(el.categoryId)) // For AB testing\n .map(el => el.categoryId)\n const bubblesFilteredAndSorted = []\n\n const bubblesMathProductsGroup = bubbles\n .map(bubble => {\n const normalizedBubble = {\n ...bubble,\n link: bubble.link.replace('#', '')\n }\n\n if (productsGroup.includes(normalizedBubble.link)) {\n return normalizedBubble\n }\n })\n .filter(ele => typeof ele !== 'undefined')\n\n productsGroup.forEach(categoryId => {\n const bubble = bubblesMathProductsGroup.find(({ link }) => link === categoryId)\n if (bubble) {\n bubblesFilteredAndSorted.push(bubble)\n } else {\n const cremaCategory = categories.find(category => category.id === categoryId)\n if (cremaCategory) {\n const { name, id, icon } = cremaCategory\n const cremaBubble = {\n link: id,\n tracking_label: name,\n label: name,\n visual: {\n src: icon?.url || DEFAULT_BUBBLE_ICON,\n alt: icon?.altText || name\n }\n }\n bubblesFilteredAndSorted.push(cremaBubble)\n }\n }\n })\n\n if (recommendation) {\n bubblesFilteredAndSorted.unshift({\n link: recommendation.id,\n tracking_label: recommendation.name,\n label: recommendation.name,\n visual: {\n src: recommendation.background_desktop,\n alt: recommendation.name\n }\n })\n }\n\n return bubblesFilteredAndSorted\n}\n","/**\n * Modifies the structure to make it easier to use in components\n * Applies all the data customization mixing Page builder with HMC data\n * @param {object} plpData : original PLP data\n */\nimport navigationLinks from './NavigationLinks'\nimport navigationBubbles from './NavigationBubbles'\nimport { getLabels, isCategoryHidden } from '@kissui/helpers/src/cremaDataHelper'\nimport { isLoggedIn } from '@kissui/helpers/src/dataLayer'\n\nconst MAX_INTENSITY_FALLBACK = 15\n\n/**\n * Prior to HMC supporting labels natively the hack was to use a category with the data\n * about the label held as JSON data in the description. This function will parse the\n * descriptions for each label once and store them as an object.\n */\nconst parseLabels = labels => {\n labels.forEach(label => {\n try {\n label.parsedData = JSON.parse(label.description)\n } catch (e) {\n console.error(\n 'Wrong JSON format in HMC label categories',\n label.id,\n label.description,\n e\n )\n return\n }\n })\n}\n\n/**\n * Labels data is now available natively in the HMC data. If any labels are specified in the\n * HMC data then this should overwrite the existing functionality. To allow support for both\n * the \"labels from categories\" should continue to be used if HMC data is not specified.\n *\n * Adds labels property to products containing each label's category data (JSON\n * parsed description property) assigned to it.\n * Labels are categories that have the label base category as parent.\n * To apply a label on a given product, the label has to contain the product.\n * This function has to clean the productGroups as well by removing the label ones\n *\n * @param eCommerceData\n */\nconst addLabels = ({ categories, productGroups, products }) => {\n // Labels are already present in the products, skip.\n // This can happen after merging lazy data like recommendations\n if (products.some(product => product.labels?.length)) {\n return\n }\n\n // Use HMC data, if available, create labels with data from highlightLabels\n products.forEach(product => {\n if (product.highlightLabels?.length) {\n product.labels = product.highlightLabels.map(label => ({\n name: label.text,\n color: label.textColor,\n bgColor: label.backgroundColor\n }))\n }\n })\n\n // Backward compatibility, fall back to using HMC categories if no native HMC labels are specified\n const labels = getLabels(categories)\n parseLabels(labels)\n\n const labelGroups = productGroups.filter(group =>\n labels.some(label => label.id === group.categoryId)\n )\n\n labelGroups.forEach(group => {\n const label = labels.find(__label => __label.id === group.categoryId)\n if (!label.parsedData) {\n // Data could not be parsed so skip this label\n return\n }\n group.productIds.forEach(productId => {\n const prod = products.find(product => product.id === productId)\n if (!prod || prod.highlightLabels?.length > 0) {\n // Product not found or has native HMC labels\n return\n }\n prod.labels = prod.labels || []\n prod.labels.push(label.parsedData)\n })\n })\n\n //remove label categories from productGroups\n labelGroups.forEach(labelGroup => {\n const indexToRemove = productGroups.findIndex(\n productGroup => productGroup.categoryId === labelGroup.categoryId\n )\n productGroups.splice(indexToRemove, 1)\n })\n}\n\nexport default (\n plpData,\n PageBuilderData,\n Category,\n Product,\n colorFilterFunction,\n recommendation\n) => {\n if (!plpData.data) {\n return\n }\n\n let { categories, productGroups, enabledTechnologies, products } =\n plpData.data.configuration.eCommerceData\n\n productGroups = getOverridenProductGroups(recommendation, productGroups)\n applyRecommendationOverrides(recommendation, { Product, PageBuilderData })\n applyProductsOverrides(products, PageBuilderData)\n addLabels({ categories, productGroups, products })\n\n // Don't filter the products until after the labels have been applied\n if (colorFilterFunction) {\n products = colorFilterFunction(products)\n }\n\n const overriddenCategories = applyCategoryOverrides(categories, productGroups, products, {\n PageBuilderData,\n Category,\n Product\n })\n\n return {\n categories: recommendation\n ? [recommendation, ...overriddenCategories]\n : overriddenCategories,\n translations: plpData.data.configuration.translations,\n enabledTechnologies,\n nav_links: navigationLinks(\n getPBProperty(PageBuilderData, 'nav_links'),\n enabledTechnologies,\n PageBuilderData\n ),\n bubbles: navigationBubbles(\n getPBProperty(PageBuilderData, 'navigation_bubbles.bubbles'),\n productGroups,\n categories,\n recommendation\n ),\n maxIntensity: {\n original: MAX_INTENSITY_FALLBACK,\n vertuo: MAX_INTENSITY_FALLBACK,\n ...(plpData.data.configuration?.props?.maxIntensity ?? {})\n },\n categoriesExtraData: recommendation ? [recommendation, ...categories] : categories\n }\n}\n\n/**\n * Get a property from the Page Builder data taking into\n * account the old/new schema\n */\nfunction getPBProperty(PageBuilderData, key) {\n return key.split('.').reduce(\n (acc, current) => acc?.[current],\n // Backward compatibility to old schema\n PageBuilderData?.copywriting ? PageBuilderData.copywriting : PageBuilderData\n )\n}\n\nfunction applyProductsOverrides(products, PageBuilderData) {\n products.forEach(product => {\n product.view_details_label = getPBProperty(PageBuilderData, 'view_details_label')\n\n if (isLoggedIn()) {\n // The hide price attribute from Crema UI actually means \"hide price for anonymous users\"\n product.hidePrice = false\n }\n\n const pbProduct = PageBuilderData?.products?.find?.(\n pbProductData => pbProductData.sku && pbProductData.sku === product.legacyId\n )\n\n if (!pbProduct) {\n return\n }\n\n const apiOverride = pbProduct.api_override || product.api_override\n\n // Apply page builder overrides\n Object.assign(product, {\n highlighted: pbProduct.highlighted,\n strikethrough_price: pbProduct.strikethrough_price,\n additional_message: pbProduct.additional_message,\n additional_message_icon: pbProduct.additional_message_icon,\n additional_message_link: pbProduct.additional_message_link || {},\n display_machine_range_name: pbProduct.display_machine_range_name || false,\n name_custom: pbProduct.name_custom || '',\n ...(apiOverride\n ? {\n image: {\n url: apiOverride?.image || product.image?.url\n },\n name: apiOverride?.name || product.name,\n headline: apiOverride?.headline || product.headline,\n description: apiOverride?.description || product.description,\n api_override: apiOverride\n }\n : {})\n })\n })\n}\n\nfunction applyCategoryOverrides(\n categories,\n productGroups,\n products,\n { PageBuilderData, Category, Product }\n) {\n return categories\n .map(category => {\n const extraData = getPBProperty(PageBuilderData, 'categories').find(\n catData => catData.category_id === category.id\n )\n\n const categoryObj = new Category(category, extraData)\n\n productGroups.forEach(productGroup => {\n if (\n isCategoryHidden(productGroup.categoryId) ||\n productGroup.categoryId !== category.id\n )\n return\n\n productGroup.productIds.forEach(productID => {\n const product = products.find(p => p.id === productID)\n if (product) {\n product.categoryId = category.id\n product.category =\n categories.find(c => c.id === product.ranges?.[0]) || null\n const productObj = new Product(product, PageBuilderData)\n categoryObj.products.push(productObj)\n }\n })\n })\n\n return categoryObj.isProductCategory() ? categoryObj : null\n })\n .filter(Boolean)\n}\n\nfunction getOverridenProductGroups(recommendation, productGroups) {\n return recommendation\n ? [\n {\n categoryId: recommendation.id,\n productIds: recommendation.products.map(product => product.legacyId)\n },\n ...productGroups\n ]\n : productGroups\n}\n\nfunction applyRecommendationOverrides(recommendation, { Product, PageBuilderData }) {\n if (!recommendation) {\n return\n }\n\n recommendation.products = recommendation.products.map(p => new Product(p, PageBuilderData))\n}\n","export default (categories = []) => {\n const intensities = categories\n .flatMap(category => category.products)\n .map(p => p?.intensity)\n .filter(p => p !== undefined)\n return !intensities.length\n ? { min: 100, max: null }\n : {\n min: Math.min(...intensities),\n max: Math.max(...intensities)\n }\n}\n","import { getCupSizeIcon } from '@kissui/helpers/src/cupSizeIcons'\n\nconst format = category => ({\n icon: getCupSizeIcon(category.id),\n label: category.name,\n size: category.name.toLowerCase(),\n capacityLabel: category.capacityLabel,\n category\n})\n\nexport default (cupSizes, categories) => {\n return cupSizes.reduce((all, current) => {\n const category = categories.find(c => c.id === current)\n return category ? [...all, format(category)] : all\n }, [])\n}\n","import { getFinalPrice } from '@kissui/plp/services'\nimport { isBundled } from '@kissui/helpers/src/catalog'\nimport CoffeeCategory from '../models/coffee.category'\nimport CoffeeProduct from '../models/coffee.product'\nimport MainDTO from '../../plp-core/models/MainDTO'\nimport {\n getArabica,\n getFairTrade,\n getOrganicEu,\n getProductHighlight,\n getRainforest,\n getSustainability,\n getVertuoNext\n} from '@kissui/helpers/src/cremaDataHelper'\nimport getMinMaxIntensity from '../../plp-core/helpers/getMinMaxIntensity'\nimport getCupSizesDetails from '../../plp-core/helpers/getCupSizesDetails'\n\nconst getPageBuilderData = (PageBuilderData, field) =>\n PageBuilderData.options ? PageBuilderData.options[field] : PageBuilderData[field]\n\n// AKA productService\nexport default (plpData, PageBuilderData, recommendation) => {\n /**\n * WIP Improve this loops\n * adds a property to products containing the given category assigned to it\n * The category is recognized by ID\n * to apply a category on a given product, the category's productGroup has to contain the product\n * this function has to clean the productGroups as well by removing the given's one to not let it display as a range in the PLP\n */\n const addProductAttribute = (\n { categories, productGroups, products },\n categoryFetcher,\n assignHandler\n ) => {\n const category = categoryFetcher(categories)\n if (!category) {\n return\n }\n const categoryGroup = productGroups.find(group => category.id === group.categoryId)\n if (!categoryGroup) {\n return\n }\n categoryGroup.productIds.forEach(productId => {\n const prod = products.find(product => product.id === productId)\n assignHandler(prod, category)\n })\n const indexToRemove = productGroups.findIndex(\n productGroup => productGroup.categoryId === categoryGroup.categoryId\n )\n productGroups.splice(indexToRemove, 1)\n }\n\n addProductAttribute(\n plpData.data.configuration.eCommerceData,\n getFairTrade,\n (prod, category) => (prod.fairTrade = category.name)\n )\n addProductAttribute(\n plpData.data.configuration.eCommerceData,\n getProductHighlight,\n prod => (prod.highlighted = true)\n )\n addProductAttribute(\n plpData.data.configuration.eCommerceData,\n getVertuoNext,\n prod => (prod.onlyVertuoNext = true)\n )\n addProductAttribute(\n plpData.data.configuration.eCommerceData,\n getOrganicEu,\n prod => (prod.organicEu = true)\n )\n addProductAttribute(\n plpData.data.configuration.eCommerceData,\n getRainforest,\n prod => (prod.rainforest = true)\n )\n addProductAttribute(\n plpData.data.configuration.eCommerceData,\n getSustainability,\n prod => (prod.sustainability = true)\n )\n addProductAttribute(\n plpData.data.configuration.eCommerceData,\n getArabica,\n prod => (prod.arabica = true)\n )\n\n const { min, max } = getMinMaxIntensity(plpData.data.configuration.eCommerceData.categories)\n\n PageBuilderData.min_intensity = min\n PageBuilderData.max_intensity = max\n\n plpData.data.configuration.eCommerceData.products.forEach(plpProduct => {\n const show_sleeve_price = PageBuilderData.options\n ? PageBuilderData.options.show_sleeve_price\n : PageBuilderData.show_sleeve_price\n\n const { showCapsulePrice, price_per_capsule, final_price } = getFinalPrice(\n show_sleeve_price,\n plpProduct,\n isBundled\n )\n\n plpProduct.sort_price = show_sleeve_price ? plpProduct.price : plpProduct.price_per_capsule\n plpProduct.show_sleeve_price = show_sleeve_price\n plpProduct.label_sleeve = getPageBuilderData(PageBuilderData, 'label_sleeve')\n plpProduct.label_sleeves = getPageBuilderData(PageBuilderData, 'label_sleeves')\n plpProduct.label_capsules = getPageBuilderData(PageBuilderData, 'label_capsules')\n plpProduct.show_sleeve = getPageBuilderData(PageBuilderData, 'show_sleeve')\n plpProduct.capsule_price_label = getPageBuilderData(PageBuilderData, 'capsule_price_label')\n plpProduct.capsule_price_syntax = getPageBuilderData(\n PageBuilderData,\n 'capsule_price_syntax'\n )\n plpProduct.price_per_capsule = price_per_capsule\n plpProduct.final_price = final_price\n\n plpProduct.show_capsule_price = showCapsulePrice\n\n if (plpProduct.cupSizes) {\n plpProduct.cupSizesDetails = getCupSizesDetails(\n plpProduct.cupSizes,\n plpData.data.configuration.eCommerceData.categories\n )\n }\n\n if (PageBuilderData.products && PageBuilderData.products.length) {\n PageBuilderData.products.forEach(pbProduct => {\n if (pbProduct.sku && pbProduct.sku === plpProduct.legacyId) {\n plpProduct.number_of_sleeves = pbProduct.number_of_sleeves\n plpProduct.number_of_capsules = pbProduct.number_of_capsules\n\n if (pbProduct.bundle_details) {\n plpProduct.bundle_details = pbProduct.bundle_details || {}\n }\n }\n })\n }\n })\n\n return MainDTO(\n plpData,\n PageBuilderData,\n CoffeeCategory,\n CoffeeProduct,\n undefined,\n recommendation\n )\n}\n","import {\n getVertuoNext,\n getOrganicEu,\n getRainforest,\n getLabels,\n getProductHighlight,\n getFairTrade,\n getSustainability,\n isRange,\n getCategoryRegEx,\n RANGE_CATEGORY_NAME,\n getArabica\n} from '@kissui/helpers/src/cremaDataHelper'\n\n/**\n * Modifies the structure to make it easier to use in components\n * Applies all the data customization mixing Page builder with HMC data\n * @param {object} plpData : original PLP data\n */\nexport async function getMergedPLPData(plpData) {\n const { data } = plpData\n if (!data) {\n return []\n }\n\n const eCommerceData = data.configuration.eCommerceData\n\n addLabels(eCommerceData)\n\n addProductAttribute(\n eCommerceData,\n getFairTrade,\n (prod, category) => (prod.fairTrade = category.name)\n )\n addProductAttribute(eCommerceData, getProductHighlight, prod => (prod.highlighted = true))\n addProductAttribute(eCommerceData, getVertuoNext, prod => (prod.onlyVertuoNext = true))\n addProductAttribute(eCommerceData, getOrganicEu, prod => (prod.organicEu = true))\n addProductAttribute(eCommerceData, getRainforest, prod => (prod.rainforest = true))\n addProductAttribute(eCommerceData, getSustainability, prod => (prod.sustainability = true))\n addProductAttribute(eCommerceData, getArabica, prod => (prod.arabica = true))\n\n addSubSegments(eCommerceData)\n\n return eCommerceData.categories\n}\n\nfunction addSubSegments(eCommerceData) {\n const { categories, productGroups, products } = eCommerceData\n // should be forEach if nothing returned/assigned\n categories.forEach(category => {\n const hasSegment = category.subCategories.length > 0 && isRange(category)\n if (hasSegment) {\n category.segments = category.subCategories.map(categoryId => {\n const segment = categories.find(subCategory => subCategory.id === categoryId)\n if (segment && isSubsegment(categories, segment)) {\n segment.products = getProductsData(productGroups, segment.id, products)\n segment.isSegment = true\n }\n return segment\n })\n }\n\n category.products = getProductsData(productGroups, category.id, products)\n })\n}\n\nexport function getProductsData(productGroups, categoryId, products) {\n let result = []\n try {\n const currentCategory = productGroups.find(category => category.categoryId === categoryId)\n\n if (!currentCategory) {\n return result\n }\n\n const { productIds } = currentCategory\n return productIds.map(productId => {\n const product = products.find(product => product.id === productId)\n return product\n })\n } catch (e) {\n //generally an anti pattern to only log the error, with no try catch the result would be the same\n console.log(e)\n }\n\n return result\n}\n\n/**\n * adds labels property to products containing each label's category data (JSON parsed description property) assigned to it\n * labels are categories that have the label base category as parent\n * to apply a label on a given product, the label has to contain the product\n * this function has to clean the productGroups as well by removing the label ones\n * @param {category[]} categories\n * @param {productGroup[]} productGroups\n * @param {product[]} products\n */\nfunction addLabels(eCommerceData) {\n const { categories, productGroups, products } = eCommerceData\n const labels = getLabels(categories)\n const labelGroups = getLabelGroups(productGroups, labels)\n labelGroups.forEach(group => {\n const label = labels.find(label => label.id === group.categoryId)\n group.productIds.forEach(productId => {\n const prod = products.find(product => product.id === productId)\n prod.labels = prod.labels || []\n prod.labels.push(label.description)\n })\n })\n //removing label categories from productGroups\n labelGroups.forEach(labelGroup => {\n const indexToRemove = productGroups.findIndex(\n productGroup => productGroup.categoryId === labelGroup.categoryId\n )\n productGroups.splice(indexToRemove, 1)\n })\n}\n\n/**\n * adds a property to products containing the given category assigned to it\n * The category is recognized by ID\n * to apply a the category on a given product, the category's productGroup has to contain the product\n * this function has to clean the productGroups as well by removing the given's one to not let it display as a range in the PLP\n * @param {category[]} categories\n * @param {productGroup[]} productGroups\n * @param {product[]} products\n */\nfunction addProductAttribute(eCommerceData, categoryFetcher, assignHandler) {\n const { categories, productGroups, products } = eCommerceData\n const category = categoryFetcher(categories)\n if (!category) {\n return\n }\n const categoryGroup = getCategoryGroup(productGroups, category)\n if (!categoryGroup) {\n return\n }\n categoryGroup.productIds.forEach(productId => {\n const prod = products.find(product => product.id === productId)\n if (categoryFetcher === getArabica) {\n console.log('addProductAttribute', prod)\n }\n assignHandler(prod, category)\n })\n const indexToRemove = productGroups.findIndex(\n productGroup => productGroup.categoryId === categoryGroup.categoryId\n )\n productGroups.splice(indexToRemove, 1)\n}\n\n/**\n * retrieve all the productGroup that are labels\n * @param {productGroup[]} productGroups\n * @param {category[]} labels\n */\nfunction getLabelGroups(productGroups, labels) {\n return productGroups.filter(group => labels.some(label => label.id === group.categoryId))\n}\n\n/**\n * retrieve the productGroup which correspond to a category\n * @param {productGroup[]} productGroups\n * @param {category} fairTrade\n */\nfunction getCategoryGroup(productGroups, category) {\n return productGroups.find(group => category.id === group.categoryId)\n}\n\n/**\n * returns true when the category is child of the range category (is type range)\n * @param {category} category\n */\nexport function isSubsegment(categories, category) {\n /*category.superCategories.some(superCategoryId => {\n const superCategoryData = categories.find(categoryToFind => categoryToFind.id === superCategoryId)\n })*/\n const result = category.superCategories.some(superCategory =>\n getCategoryRegEx(RANGE_CATEGORY_NAME).test(superCategory)\n )\n return result\n}\nexport function getFinalPrice(show_sleeve_price, product, isBundled) {\n let showCapsulePrice = show_sleeve_price\n let final_price\n let price_per_capsule\n\n const bundled = isBundled(product)\n\n if (product.type === 'capsule' && !bundled) {\n final_price = product.price * product.salesMultiple\n // this isn't necessary in prod but the mock price formatter needs it\n final_price = Math.round(final_price * 100) / 100\n price_per_capsule = product.price\n } else {\n showCapsulePrice = false\n final_price = product.price\n }\n\n return { showCapsulePrice, final_price, price_per_capsule }\n}\n","export const NOTES_ICON_DEFAULT = '24/coffee/coffee-aroma'\n\n/**\n * Normalize aromatic note\n * E.g. veryRoasted become roasted\n * For notes with hyphen, it's not necessary\n * E.g. nutty-and-balanced will be considered has nutty\n * @param {string} note\n * @returns {string}\n */\nconst harmonizeNoteName = _note => {\n const sanityNote = _note.split('/')\n let note = sanityNote.pop()\n note = note.replace('capsule-aromatic-', '').replace('recipe-', '')\n\n if (['peppery', 'spicy', 'peppery-note'].includes(note)) {\n return '24/coffeenote/spicy'\n } else if (['woody', 'wood', 'oak-wood', 'smoky-wood'].includes(note)) {\n return '24/coffeenote/oak-wood'\n } else if (\n [\n 'sugar',\n 'brown-sugar-and-roasted-notes',\n 'candy-sweet',\n 'delicate-toasted-biscuit-notes'\n ].includes(note)\n ) {\n return '24/coffeenote/sugar'\n } else if (['sweet'].includes(note)) {\n return '24/coffeenote/sweet'\n } else if (['berry'].includes(note)) {\n return '24/coffeenote/berry'\n } else if (['baked-apple', 'apple', 'baked-apple-flavors'].includes(note)) {\n return '24/coffeenote/baked-apple'\n } else if (['bergamot'].includes(note)) {\n return '24/coffeenote/bergamot'\n } else if (['bitterness', 'bitter'].includes(note)) {\n return '24/coffeenote/bitterness'\n } else if (['blueberry'].includes(note)) {\n return '24/coffeenote/blueberry'\n } else if (['bread-aroma', 'bread'].includes(note)) {\n return '24/coffeenote/bread-aroma'\n } else if (['candied-fruit'].includes(note)) {\n return '24/coffeenote/candied-fruit'\n } else if (['caramel'].includes(note)) {\n return '24/coffeenote/caramel'\n } else if (['cereal', 'cerealFruity', 'mild-cereal', 'sweetCereal'].includes(note)) {\n return '24/coffeenote/cereal'\n } else if (\n [\n 'maltedCereal',\n 'malted',\n 'toasted-cereal',\n 'malty-faintly-green-notes',\n 'maltyToasted'\n ].includes(note)\n ) {\n return '24/coffeenote/malted'\n } else if (\n ['roastedCereal', 'veryRoasted', 'roasted', 'longRoasted', 'roastedCocoa'].includes(note)\n ) {\n return '24/coffeenote/roasted'\n } else if (\n [\n 'hintOfFruity',\n 'fruityWiney',\n 'fruity',\n 'fruity-exotic',\n 'juicy-fruity',\n 'ripe-fruits'\n ].includes(note)\n ) {\n return '24/coffeenote/fruity'\n } else if (['citric', 'lemon', 'citrus'].includes(note)) {\n return '24/coffeenote/citrus'\n } else if (['cocoa', 'hintsOfBitterCocoaPowderAndCereals'].includes(note)) {\n return '24/coffeenote/cocoa'\n } else if (['chocolate', 'dark-chocolate', 'white-chocolate'].includes(note)) {\n return '24/coffeenote/chocolate'\n } else if (['cardamom'].includes(note)) {\n return '24/coffeenote/cardamom'\n } else if (['ginger', 'cocoaGinger'].includes(note)) {\n return '24/coffeenote/ginger'\n } else if (['ginseng'].includes(note)) {\n return '24/coffeenote/ginseng'\n } else if (['nutty', 'nut', 'hazelnut', 'hazelnut-aromas'].includes(note)) {\n return '24/coffeenote/hazelnut'\n } else if (['refreshing-mint', 'peppermint'].includes(note)) {\n return '24/coffeenote/peppermint'\n } else if (['almond', 'almonds'].includes(note)) {\n return '24/coffeenote/almonds'\n } else if (['balance', 'balanced', 'smooth'].includes(note)) {\n return '24/coffeenote/balance'\n } else if (['tropical', 'exotic'].includes(note)) {\n return '24/coffeenote/tropical'\n } else if (['coconut'].includes(note)) {\n return '24/coffeenote/coconut'\n } else if (['cocktail'].includes(note)) {\n return '24/coffeenote/cocktail'\n } else if (['biscuity', 'biscuit', 'reminiscent-shortbread-cookies'].includes(note)) {\n return '24/coffeenote/biscuit'\n } else if (\n ['whiskey', 'Whisky', 'whisky', 'alcohol', 'whiskey-flavor', 'whisky-flavour'].includes(\n note\n )\n ) {\n return '24/coffeenote/alcohol'\n } else if (['watermelon'].includes(note)) {\n return '24/coffeenote/watermelon'\n } else if (['RedFruit', 'redfruit', 'red-fruit', 'strawberry'].includes(note)) {\n return '24/coffeenote/red-fruit'\n } else if (\n [\n 'flowery',\n 'flower',\n 'Floral',\n 'floral',\n 'floralJasmine',\n 'floralandWild',\n 'orange-blossom'\n ].includes(note)\n ) {\n return '24/coffeenote/flowery'\n } else if (['herbal', 'dry-vegetal'].includes(note)) {\n return '24/coffeenote/herbal'\n } else if (['honey'].includes(note)) {\n return '24/coffeenote/honey'\n } else if (['smooth-b2b'].includes(note)) {\n return '24/coffeenote/roasted'\n } else if (\n ['sweetnotes-b2b', 'toffeenotes-b2b', 'caramellynotes-b2b', 'caramelized'].includes(note)\n ) {\n return '24/coffeenote/caramel'\n } else if (\n [\n 'rich-b2b',\n 'veryRoasted',\n 'intense',\n 'intense-selection',\n 'rich',\n 'intense-roasted',\n 'bold-roasted-notes'\n ].includes(note)\n ) {\n return '24/coffeenote/intense-roasted'\n } else if (['leather'].includes(note)) {\n return '24/coffeenote/leather'\n } else if (['powerful-intense', 'powerful'].includes(note)) {\n return '24/coffeenote/powerful-intense'\n } else if (['milky', 'milk', 'milk-selection'].includes(note)) {\n return '24/coffeenote/milky'\n } else if (['pumpkin', 'sweet-pumpkin'].includes(note)) {\n return '24/coffeenote/pumpkin'\n } else if (['vanilla', 'vanillaAlmonds', 'vanillaCardamom'].includes(note)) {\n return '24/coffeenote/vanilla'\n } else if (['chicory', 'vegetal'].includes(note)) {\n return '24/coffeenote/vegetal'\n } else if (['winey', 'wine'].includes(note)) {\n return '24/coffeenote/winey'\n } else if (['pecan-nut', 'pecan', 'praline-notes'].includes(note)) {\n return '24/coffeenote/nut'\n } else if (['maple-syrup', 'syrup'].includes(note)) {\n return '24/coffeenote/syrup'\n } else if (['amaretti'].includes(note)) {\n return '24/coffeenote/amaretti'\n } else if (['dry-fruits'].includes(note)) {\n return '24/coffeenote/dry-fruits'\n } else if (['peanut'].includes(note)) {\n return '24/coffeenote/peanut'\n } else if (['popcorn'].includes(note)) {\n return '24/coffeenote/popcorn'\n } else if (['sesame'].includes(note)) {\n return '24/coffeenote/toasted-sesame'\n }\n return NOTES_ICON_DEFAULT\n}\n\nexport const getNoteIcon = note => {\n return harmonizeNoteName(note)\n}\n","import viewportHelper from '@kissui/helpers/src/viewport.helpers'\n\n/**\n * @param {{}} [_filter]\n */\nexport default class Filter {\n #type = ''\n #key = ''\n #iconFn = {}\n #filterFn = {}\n #title = ''\n #values = []\n #after = '</fieldset>'\n #before = `<fieldset aria-labelledby=\"{key}\"><legend id=\"{key}\" aria-hidden=\"true\" class='${\n viewportHelper.is.mobile ? 't-sm-700-sl' : 't-md-700-sl'\n }'>{title}</legend>`\n showalllabel = ''\n\n constructor(_filter = {}) {\n this.#type = _filter.type\n this.#key = _filter.key\n this.#iconFn = _filter.iconFn ? _filter.iconFn : null\n this.#filterFn = _filter.filterFn ? _filter.filterFn : null\n const title = _filter.title ? _filter.title.toLowerCase() : 'Filter'\n this.#title = title.charAt(0).toUpperCase() + title.slice(1)\n this.#before = _filter.before ? _filter.before : this.#before\n this.#after = _filter.after ? _filter.after : this.#after\n this.showalllabel = _filter.showalllabel ?? ''\n }\n\n set values(values) {\n this.#values = values\n }\n\n set after(after) {\n this.#after = after\n }\n\n get after() {\n return this.#after\n }\n\n get values() {\n return this.#values\n }\n\n get type() {\n return this.#type\n }\n\n get filterFn() {\n return this.#filterFn\n }\n\n get iconFn() {\n return this.#iconFn\n }\n\n get key() {\n return this.#key\n }\n\n get title() {\n return this.#title\n }\n\n renderBefore() {\n return this.#before.replace('{title}', this.#title).replaceAll('{key}', this.#key)\n }\n\n renderAfter() {\n return this.#after\n }\n\n pushValues(value) {\n this.#values.findIndex(x => x.value === value.value) === -1 && this.#values.push(value)\n }\n}\n","/**\n * Filter chip type\n */\nexport default class DefaultFilterChipType {\n #value = null\n #label = null\n #filterType = null\n #filterKey = null\n #icon = ''\n #color = ''\n #selected = false\n #disabled = false\n\n constructor({\n value,\n label,\n filterType,\n filterKey,\n icon = '',\n color = '',\n selected = false,\n disabled = false\n }) {\n if (!value) {\n console.error('DefaultFilterChipType: value is required')\n return\n }\n if (!label) {\n console.error('DefaultFilterChipType: label is required')\n return\n }\n if (!filterType) {\n console.error('DefaultFilterChipType: filterType is required')\n return\n }\n if (!filterKey) {\n console.error('DefaultFilterChipType: filterKey is required')\n return\n }\n\n this.#value = value\n this.#label = label\n this.#filterType = filterType\n this.#filterKey = filterKey\n this.#icon = icon\n this.#color = color\n this.#selected = selected\n this.#disabled = disabled\n\n this.productCount = null\n }\n\n set disabled(value) {\n this.#disabled = !!value\n }\n\n get disabled() {\n return this.productCount !== null ? this.productCount === 0 : this.#disabled\n }\n\n set selected(value) {\n this.#selected = !!value\n }\n\n get selected() {\n return this.#selected\n }\n\n get filterKey() {\n return this.#filterKey\n }\n\n get filterType() {\n return this.#filterType\n }\n\n get value() {\n return Array.isArray(this.#value) ? this.#value.join(',') : this.#value\n }\n\n get label() {\n return this.#label\n }\n\n get color() {\n return this.#color\n }\n\n get icon() {\n return this.#icon\n }\n\n // disabled=\"${isDisabled(e.type, v)}\"\n render() {\n const productCountLabel = this.productCount !== null ? ` (${this.productCount})` : ''\n\n return `<nb-chip\n id=\"${this.#filterKey}-${this.#value}\"\n data-filter-value=\"${this.#value}\"\n data-filter-key=\"${this.#filterKey}\"\n data-filter-label=\"${this.#label}\"\n checked=\"${this.#selected}\"\n disabled=\"${this.#disabled}\"\n ${this.#icon ? `icon=\"${this.#icon}\"` : ''}\n ${this.#color ? `color=\"${this.#color}\"` : ''}\n >${this.#label}${productCountLabel}</nb-chip>`\n }\n}\n","import Filter from './filter'\nimport DefaultFilterChipType from './types/DefaultFilterChipType'\n\nconst getCategoryData = (categories, id) => {\n // Restrict filter to NOT use categories containing the word \"label\"\n const findCategory = categories?.find(\n category => category.id === id && !category.id.includes('label')\n )\n return findCategory\n ? {\n // todo this icon should be fixed into the DTO product for all attributes\n icon: findCategory.icon?.icon,\n color: findCategory.cssColorCode ? findCategory.cssColorCode : null,\n label: findCategory.name\n }\n : null\n}\n\nexport default (filterDefinition, categories, categoriesData) => {\n if (!filterDefinition || !categories) {\n console.error('CREATE_FILTER_DEFINITION_CATEGORY_NOT_FOUND')\n return []\n }\n\n const filters = filterDefinition.map(filter => new Filter(filter))\n categories\n .reduce((acc, category) => acc.concat(category.products), [])\n .forEach(product => {\n filters.forEach(filter => {\n const filterKey = filter.key\n const filterType = filter.type\n const fieldValue = product[filterKey]\n typeof fieldValue === 'object'\n ? fieldValue.map(attribute => {\n const data = getCategoryData(categoriesData, attribute)\n if (data) {\n filter.pushValues(\n new DefaultFilterChipType({\n filterKey,\n filterType,\n value: attribute,\n icon: filter.iconFn?.(attribute),\n label: data.label,\n color: data.color ?? null\n })\n )\n }\n })\n : filter.pushValues(\n new DefaultFilterChipType({\n filterKey,\n filterType,\n value: fieldValue,\n icon: filter.iconFn?.(filterKey),\n label:\n typeof filter.filterFn === 'function'\n ? filter.filterFn(fieldValue)\n : fieldValue\n })\n )\n })\n })\n\n return filters\n}\n","import Filter from './filter'\nimport DefaultFilterChipType from './types/DefaultFilterChipType'\nimport navigationBubbles from '../models/NavigationBubbles'\n\n// AKA Bubbles, AKA Collections\nexport default function createCategoriesFilter(\n categories,\n PBprops,\n categoriesExtraData,\n translations\n) {\n const PBBubbles = PBprops.copywriting\n ? PBprops.copywriting.navigation_bubbles.bubbles\n : PBprops.navigation_bubbles.bubbles\n\n const productGroups = categories.map(category => ({\n categoryId: category.id\n }))\n const bubbles = navigationBubbles(PBBubbles, productGroups, categoriesExtraData)\n\n const categoriesFilter = new Filter({\n type: 'default',\n key: 'ranges',\n title: translations['productlistrespblock.filterlabels.collection'],\n showalllabel: PBprops.copywriting?.filter_label_showall_collections ?? ''\n })\n\n bubbles.forEach(bubble => {\n categoriesFilter.pushValues(\n new DefaultFilterChipType({\n value: bubble.link,\n label: bubble.label,\n filterType: categoriesFilter.type,\n filterKey: categoriesFilter.key\n })\n )\n })\n\n return categoriesFilter\n}\n","/**\n * WIP - Intensity filter\n */\nimport Filter from '../../plp-core/filter/filter'\nimport DefaultFilterChipType from '../../plp-core/filter/types/DefaultFilterChipType'\nimport getMinMaxIntensity from '../../plp-core/helpers/getMinMaxIntensity'\n\n// eslint-disable-next-line no-unused-vars\nexport const getIntenistyFilter = (categories, PBprops, translations) => {\n if (!categories) {\n console.error('plp-coffe.filterIntensity.dto.js categories is not defined')\n return null\n }\n /**\n * @description\n * define the filter object data\n */\n const intensityFilter = new Filter({\n type: 'default',\n key: 'intensity',\n title: translations['productlistrespblock.filterlabels.intensity'],\n showalllabel: PBprops.copywriting?.filter_label_showall_intensity ?? ''\n })\n\n const { min: intensityMin, max: intensityMax } = getMinMaxIntensity(categories)\n\n const INTENSITY_RANGES = [\n {\n min: intensityMin,\n max: 5,\n label: PBprops.copywriting\n ? PBprops.copywriting.filter_group_intensity_light\n : PBprops.filter_group_intensity_light,\n value: [1, 2, 3, 4, 5]\n },\n {\n min: 6,\n max: 8,\n label: PBprops.copywriting\n ? PBprops.copywriting.filter_group_intensity_medium\n : PBprops.filter_group_intensity_medium,\n value: [6, 7, 8]\n },\n {\n min: 9,\n max: intensityMax,\n label: PBprops.copywriting\n ? PBprops.copywriting.filter_group_intensity_intense\n : PBprops.filter_group_intensity_intense,\n value: [9, 10, 11, 12, 13, 14, 15]\n }\n ]\n\n INTENSITY_RANGES.forEach(intensity => {\n intensityFilter.pushValues(\n new DefaultFilterChipType({\n value: intensity.value,\n label: intensity.label.replace('{range}', ` ${intensity.min} - ${intensity.max}`),\n filterType: intensityFilter.type,\n filterKey: intensityFilter.key\n })\n )\n })\n\n return intensityFilter\n}\n","import { getNoteIcon } from '@kissui/helpers/src/notesIcons'\nimport { getCupSizeIcon } from '@kissui/helpers/src/cupSizeIcons'\n\nimport createFilter from '../../plp-core/filter/createFilter'\nimport createCategoriesFilter from '../../plp-core/filter/createCategoriesFilter'\nimport { getIntenistyFilter } from './plp-coffee.filterIntensity.dto'\nimport { runningExperiment, EXPLICIT_FILTERS } from '../../plp-core/config/experiments'\n\n// AKA filtersService\nexport const getMergedFilterData = (categories, PBprops, categoriesExtraData, translations) => {\n if (runningExperiment(EXPLICIT_FILTERS)) {\n return [\n ...(runningExperiment(EXPLICIT_FILTERS)\n ? [createCategoriesFilter(categories, PBprops, categoriesExtraData, translations)]\n : []),\n ...createFilter(\n [\n {\n type: 'default',\n key: 'cupSizes',\n title: translations['productlistrespblock.filterlabels.cupsize'],\n showalllabel: PBprops.copywriting?.filter_label_showall_cupsize ?? '',\n /*iconFn: value => value.match(/([^/]*)\\/*$/)[0]*/\n iconFn: getCupSizeIcon\n }\n ],\n categories,\n categoriesExtraData,\n PBprops\n ),\n getIntenistyFilter(categories, PBprops, translations),\n ...createFilter(\n [\n {\n type: 'default',\n key: 'flavors',\n title: translations['productlistrespblock.filterlabels.aromatic'],\n showalllabel: PBprops.copywriting?.filter_label_showall_aromatic ?? '',\n iconFn: getNoteIcon\n }\n ],\n categories,\n categoriesExtraData,\n PBprops\n )\n ]\n }\n\n return [\n getIntenistyFilter(categories, PBprops, translations),\n ...createFilter(\n [\n {\n type: 'default',\n key: 'cupSizes',\n title: translations['productlistrespblock.filterlabels.cupsize'],\n /*iconFn: value => value.match(/([^/]*)\\/*$/)[0]*/\n iconFn: getCupSizeIcon\n },\n {\n type: 'default',\n key: 'flavors',\n title: translations['productlistrespblock.filterlabels.aromatic'],\n iconFn: getNoteIcon\n }\n ],\n categories,\n categoriesExtraData,\n PBprops\n )\n ]\n}\n","/**\n *\n * @param PBprops\n * @returns {[\n * {\n * id: string,\n * checked: boolean,\n * label: (string|*),\n * key: string,\n * order: asc|desc\n * }\n * ]}\n * Note: The first element is the default sort order\n * Note: The order of the sort array is important\n *\n */\nexport const getMergedSortData = PBprops => [\n {\n id: 'default',\n label:\n PBprops.copywriting?.dropdown_recommended_option_label ||\n PBprops.dropdown_recommended_option_label,\n key: 'recommended',\n order: 'asc',\n checked: true\n },\n {\n id: 'sortPriceAscending',\n label:\n PBprops.copywriting?.dropdown_price_ascending_option_label ||\n PBprops.dropdown_price_ascending_option_label,\n key: 'sort_price',\n order: 'asc',\n checked: false\n },\n {\n id: 'sortPriceDescending',\n label:\n PBprops.copywriting?.dropdown_price_descending_option_label ||\n PBprops.dropdown_price_descending_option_label,\n key: 'sort_price',\n order: 'desc',\n checked: false\n },\n {\n id: 'sortIntensityAscending',\n label:\n PBprops.copywriting?.dropdown_intensity_ascending_option_label ||\n PBprops.dropdown_intensity_ascending_option_label,\n key: 'intensity',\n order: 'asc',\n checked: false\n },\n {\n id: 'sortIntensityDescending',\n label:\n PBprops.copywriting?.dropdown_intensity_descending_option_label ||\n PBprops.dropdown_intensity_descending_option_label,\n key: 'intensity',\n order: 'desc',\n checked: false\n }\n]\n","import appData from './plp.data'\nimport {\n POPIN_ID,\n FILTER_MAIN_BLOCK_ID,\n NAVIGATION_MAIN_BLOCK_ID,\n PRODUCTS_LIST_MAIN_BLOCK_ID,\n PRODUCTS_RESULTS_MAIN_BLOCK_ID,\n CB_RESULTS_TOTAL_ID\n} from '../config/constants'\nimport { dispatchEvent } from '@kissui/helpers/src/assets/js/eventDispatch'\nimport { EVENT_POPIN_OPEN } from '@kissui/components'\nimport { setAttributes } from '@kissui/helpers/src/utils'\n\nexport default {\n onloadSuccess: function () {\n const plpApp = document.getElementById(PRODUCTS_LIST_MAIN_BLOCK_ID).parentElement\n plpApp.setAttribute('data-loaded', appData.sessionId)\n },\n /**\n * State: list of products\n */\n readyForPlay: function () {\n const filter = document.getElementById(FILTER_MAIN_BLOCK_ID)\n const navigation = document.getElementById(NAVIGATION_MAIN_BLOCK_ID)\n const productList = document.getElementById(PRODUCTS_LIST_MAIN_BLOCK_ID)\n const productsResults = document.getElementById(PRODUCTS_RESULTS_MAIN_BLOCK_ID)\n\n filter.setAttribute('data-request', appData.sessionId)\n filter.setAttribute('data-filter-counter', appData.filtersSelectedCount())\n navigation.setAttribute('data-request', appData.sessionId)\n productList.setAttribute('data-request', appData.sessionId)\n\n filter.style.display = 'block'\n\n navigation.style.display = 'block'\n\n productList.style.display = 'block'\n\n productsResults.style.display = 'none'\n\n if (appData.get('hide_sort_and_filter')) {\n filter.classList.add('hide-sort-and-filter')\n }\n\n document.getElementById(PRODUCTS_RESULTS_MAIN_BLOCK_ID).style.display = 'none'\n },\n /**\n * State: list of products filtered\n */\n readyForShowResults: function () {\n const filter = document.getElementById(FILTER_MAIN_BLOCK_ID)\n const navigation = document.getElementById(NAVIGATION_MAIN_BLOCK_ID)\n const productList = document.getElementById(PRODUCTS_LIST_MAIN_BLOCK_ID)\n const productsResults = document.getElementById(PRODUCTS_RESULTS_MAIN_BLOCK_ID)\n const cbResultsTotalText = document.getElementById(CB_RESULTS_TOTAL_ID)\n\n filter.style.display = 'block'\n filter.setAttribute('data-request', appData.sessionId)\n filter.setAttribute('data-filter-counter', appData.filtersSelectedCount())\n\n if (navigation) navigation.style.display = 'none'\n\n if (productList) productList.style.display = 'none'\n\n if (productsResults) {\n productsResults.setAttribute('data-request', appData.filtersSelectedSerialized())\n productsResults.style.display = 'block'\n }\n if (cbResultsTotalText) {\n cbResultsTotalText.textContent = appData.productsFilteredCount()\n }\n },\n /**\n * State: filter popin opened\n */\n readyForFilter: function () {\n // check if the popin is in the page\n let plpFilterPopin = document\n .getElementsByClassName('plp-app')[0]\n ?.querySelector(`#${POPIN_ID}`)\n\n if (!plpFilterPopin) {\n // todo test performance of this & new Popin()\n plpFilterPopin = setAttributes(\n document.createElement('nb-popin', {\n is: customElements.get('Popin')\n }),\n {\n 'data-request': appData.sessionId,\n id: POPIN_ID,\n popin_id: POPIN_ID,\n variation: 'before',\n bgcolor: 'white',\n heading: appData.translations['productlistrespblock.filter.label'],\n label_close: 'close',\n content:\n '<plp-filter-popin class=\"plp-filter-popin-content\"></plp-filter-popin>'\n }\n )\n document.getElementsByClassName('plp-app')[0]?.appendChild(plpFilterPopin)\n // todo wrong way to open the popin\n dispatchEvent({ eventName: EVENT_POPIN_OPEN, args: { id: POPIN_ID } })\n } else {\n // todo wrong way to open the popin\n plpFilterPopin.querySelector('plp-filter-popin').setAttribute('data-refresh', 'true')\n dispatchEvent({ eventName: EVENT_POPIN_OPEN, args: { id: POPIN_ID } })\n }\n },\n /**\n * State: shows the error\n */\n showError: function (e) {\n const errorMessage = e.detail.err || 'Error'\n console.error(errorMessage)\n }\n}\n","// @ts-ignore\nimport coreAppStates from '../../plp-core/store/plp.states'\nimport appData from './plp.data'\n\nimport {\n FILTER_MAIN_BLOCK_ID,\n NAVIGATION_MAIN_BLOCK_ID,\n PRODUCTS_RESULTS_MAIN_BLOCK_ID,\n PRODUCTS_RESULTS_HEADER_ID,\n CB_RESULTS_TOTAL_ID\n // @ts-ignore\n} from '../../plp-core/config/constants'\n\nexport default {\n ...coreAppStates,\n\n onloadSuccess: function () {\n const plpApp = document.getElementById(FILTER_MAIN_BLOCK_ID)?.parentElement\n plpApp?.setAttribute('data-loaded', appData.sessionId)\n },\n\n readyForPlay: function () {\n const filter = document.getElementById(FILTER_MAIN_BLOCK_ID)\n const navigation = document.getElementById(NAVIGATION_MAIN_BLOCK_ID)\n const productsResultsHeader = document.getElementById(PRODUCTS_RESULTS_HEADER_ID)\n const productsResults = document.getElementById(PRODUCTS_RESULTS_MAIN_BLOCK_ID)\n\n if (filter) {\n filter.setAttribute('data-request', appData.sessionId)\n filter.setAttribute('data-filter-counter', appData.filtersSelectedCount())\n filter.style.display = 'block'\n\n if (appData.get('hide_sort_and_filter')) {\n filter.classList.add('hide-sort-and-filter')\n }\n }\n\n if (navigation) {\n navigation.setAttribute('data-request', appData.sessionId)\n navigation.style.display = 'block'\n }\n\n if (productsResultsHeader) {\n productsResultsHeader.style.display = 'none'\n }\n\n if (productsResults) {\n productsResults.setAttribute('show-collections', 'true')\n productsResults.setAttribute('data-request', appData.sessionId)\n }\n },\n\n readyForShowResults: function () {\n const filter = document.getElementById(FILTER_MAIN_BLOCK_ID)\n const navigation = document.getElementById(NAVIGATION_MAIN_BLOCK_ID)\n const productsResultsHeader = document.getElementById(PRODUCTS_RESULTS_HEADER_ID)\n const productsResults = document.getElementById(PRODUCTS_RESULTS_MAIN_BLOCK_ID)\n const cbResultsTotalText = document.getElementById(CB_RESULTS_TOTAL_ID)\n\n if (filter) {\n filter.style.display = 'block'\n filter.setAttribute('data-request', appData.sessionId)\n filter.setAttribute('data-filter-counter', appData.filtersSelectedCount())\n }\n\n if (navigation) navigation.style.display = 'none'\n\n if (productsResultsHeader) {\n productsResultsHeader.style.display = 'block'\n }\n\n if (productsResults) {\n productsResults.setAttribute('show-collections', 'false')\n productsResults.setAttribute('data-request', '[]') // TODO: If technology becomes a filter, remove\n productsResults.setAttribute('data-request', appData.filtersSelectedSerialized())\n productsResults.style.display = 'block'\n }\n\n if (cbResultsTotalText) {\n cbResultsTotalText.textContent = appData.productsFilteredCount()\n }\n }\n}\n","import PLPApp from '../plp-core/plp.app'\nimport { getMergedPLPData, getMergedFilterData, getMergedSortData } from '../plp/dataTransform'\nimport appStates from './store/appStates'\nimport {\n FILTER_MAIN_BLOCK_ID,\n NAVIGATION_MAIN_BLOCK_ID,\n PRODUCTS_RESULTS_MAIN_BLOCK_ID,\n PRODUCTS_RESULTS_HEADER_ID\n} from '../plp-core/config/constants'\n\nclass PLPCoffeeCards extends PLPApp {\n constructor() {\n super()\n // change for coffee-B2B to see b2b plp\n this.plpType = 'coffee'\n\n this.dataTransformService = getMergedPLPData\n this.dataFiltersService = getMergedFilterData\n this.dataSortService = getMergedSortData\n this.appStates = appStates\n }\n\n defineTemplate() {\n this.template = `\n <plp-filter id=\"${FILTER_MAIN_BLOCK_ID}\" style=\"display: none;\"></plp-filter>\n <plp-navigation id=\"${NAVIGATION_MAIN_BLOCK_ID}\" style=\"display: none;\" magic-index=\"4\"></plp-navigation>\n <plp-cards-results-header id=\"${PRODUCTS_RESULTS_HEADER_ID}\" style=\"display: none;\"></plp-cards-results-header>\n <plp-cards-grid id=\"${PRODUCTS_RESULTS_MAIN_BLOCK_ID}\"></plp-cards-grid>\n `\n }\n}\n\ncustomElements.get('nb-plp-coffee-cards') ||\n customElements.define('nb-plp-coffee-cards', PLPCoffeeCards)\n\nexport default PLPCoffeeCards\n"],"names":["createProps","attributes","data","find","attribute","nodeName","getData","props","filter","reduce","all","attr","nodeValue","isNil","JSON","parse","error","console","log","obj","bus","constructor","_bus","document","createElement","register","event","callback","addEventListener","remove","removeEventListener","fire","detail","this","dispatchEvent","CustomEvent","EventBus$1","eventName","args","element","window","Error","bubbles","Event","createEvent","initEvent","readEvent","e","BREAKPOINT_TABLET","BREAKPOINT_M","EVENT_POPIN_OPEN","EVENT_POPIN_CLOSE","EVENT_POPIN_CLOSED","EVENT_POPIN_KEY_DOWN","EVENT_SLIDER_READY","EVENT_SORT_BY_CHANGE","EVENT_SWIPED_DOWN","COFFEE_VERTUO","CONTRAST_LIGHT","getCurrency","config","padl","namespace","dataLayer","app","currency","TECHNOLOGY_CATEGORY_IDENTIFIER","getProduct","sku","napi","catalog","replace","trimSku","getTechnologyName","productData","techno","technologies","substring","indexOf","length","isMultipleOf","quantity","multiple","getSleeveNumber","product","getTechnologyNameFn","sales_multiple","unitQuantity","NaN","isBundled","salesMultiple","isSalesMultipleGreaterThanOne","isUnitQuantityEqualToOne","isSalesMultipleEqualToOne","isUnitQuantityGreaterThanOne","emitCustomEvent","customEvent","cancelable","composed","eventsHelper","add","eventListeners","forEach","eventListener","type","listener","options","parseHTML","str","tmp","implementation","createHTMLDocument","body","innerHTML","childNodes","makeId","result","characters","i","charAt","Math","floor","random","removeEmptyValues","findText","key","value","text","includes","getHashLink","link","linkHash","linkNoHash","lazyLoad","node","url","inViewPort","setAttribute","cb","classList","img","Image","src","onload","onerror","test","navigator","userAgent","agent","start","Number","substr","lazyBackgroundObserver","IntersectionObserver","entries","entry","isIntersecting","unobserve","target","observe","isOldIOS","stringifyForAttribute","escapeHtml","stringify","map","m","domParser","DOMParser","unescapeHtml","parseFromString","textContent","setAttributes","attrs","raisedByPB","raisedByWC","eventData","gtmDataObject","undefined","event_GA4","eventRaisedBy","event_raised_by","push","trackComponentInteraction","creative","actionType","internationalId","internationalName","productType","technology","category","rawPrice","eventAction","component_name","action_type","item_id_event","item_name_event","item_category_event","item_technology_event","item_range_event","item_price_event","eventCategory","eventLabel","viewPromotion","ecommerce","Object","keys","id","name","position","ecommerceData","promotion_id","promotion_name","creative_slot","creative_name","handlePromoClick","campaign","cta_name","cleanedData","selectPromotion","getProductInfo","async","getProductPayload","actionField","unitPrice","legacyId","bundled","inStock","item","split","pop","join","price","dimension44","toLowerCase","toString","dimension53","dimension54","dimension55","dimension56","dimension57","dimension192","brand","productImpression","list","products","p","productInfo","productPayload","currencyCode","impressions","productClick","click","filterActionEvent","filterType","filterValues","clickLocation","dataType","getExplicitFilterEventData","NEXT_V1_PLP_EXPLICIT_FILTER_TRACKING","experiment_action","filter_type","filter_values","click_location","getDataLayer","padlNamespace","getMarketCode","market","toLocaleLowerCase","getLangCode","page","pageInfo","language","isLoggedIn","user","Cta","HTMLElement","observedAttributes","connectedCallback","disableTracking","hasAttribute","boundHandleClick","handleClick","bind","slot","trim","render","add_to_cart","aria_label","aria_label_after","aria_label_before","contrast","icon_left","icon_right","label_update","label","link_new_tab","long_sku","seo_label","size","tracking_list","tracking_position","transparent","variation","ariaLabel","textClass","outerHTML","removeListeners","addListeners","track","event_id","popin_id","qs_id","EventBus","popin","openQuantitySelector","campaign_id","campaign_name","campaign_position","campaign_creative","campaign_instance_index","tracking_slot_prefix","sku_data","ctaOrPopin","slotContent","instanceIndex","cta_name_value","tabbed_component","componentName","attributeChangedCallback","setTimeout","disconnectedCallback","customElements","get","define","LAZYLOAD_CUSTOM","PROFILES","sizes","Img","__privateAdd","_initLazyLoad","_setImPolicyQuery","_getRetinaWidth","_getImpolicyProfile","_getClosests","_setCssProperties","_setCssProperty","__privateMethod","initLazyLoad_fn","call","file","description","lazyload","fetchpriority","setImPolicyQuery_fn","setCssProperties_fn","parentClass","getAttribute","firstElementChild","WeakSet","#initLazyLoad","#setImPolicyQuery","aspect_ratio","force_width","force_height","impolicy","width","offsetWidth","w","h","round","finalWidth","getRetinaWidth_fn","getImpolicyProfile_fn","#getRetinaWidth","devicePixelRatio","#getImpolicyProfile","exactFound","closests","getClosests_fn","tempDiff","diff","closest","#getClosests","every","profile","found","el","#setCssProperties","object_fit","placeholder_color_light","placeholder_color_dark","error_message","setCssProperty_fn","#setCssProperty","style","setProperty","Link","super","setClassHelper","bindEvents","color","image","image_alt","renderButton","renderLink","tracking_label","a11y_label_new_tab","selected","phantom","cta_link_type","sizeClass","querySelector","sku_colors","quickView","colors","linkOrPopin","unbindEvents","Viewport","observer","IntersectionObserverEntry","onChange","threshold","rootMargin","Element","observables","observable","requestIdleCallback","runTrack","zoneTracking","tracking","ZoneTracking","destroy","getIom","hasIntersectionObserver","isObjectEmpty","helper","is","innerWidth","vw","mobile","mobile_tablet","tablet","desktop","retina","lt","ref","Container","initTracking","initLazyLoad","getBgImgUrl","lazy_load","background_mobile","background_tablet","background_desktop","background_retina","viewportHelper","styles","background_color","classname","element_class","contrastDefault","hasBgImage","renderBg","d","r","Chip","checkbox","computedSlot","computeSlot","onclick","content","icon","background_image","filter_label_AA","rounded","checked","disabled","checkedAttr","disabledAttr","inputId","hash","charCodeAt","makeHash","getElementsByTagName","_","newValue","recursiveSwitchAriaHidden","elem","componentOpenState","parent","parentNode","brothers","children","brother","removeAttribute","focusin","loop","contains","lastFocused","firstFocusable","lastFocusable","focus","setFirstAndLastFocusable","focusable","querySelectorAll","Dropdown","isOpen","buttonElement","onClickOutside","aa_description","element_id","element_name","option","payload","unbindEvent","renderSelected","renderOptions","buttonElementValue","dropdownMenu","selectedOption","bindEvent","aa_listbox_description","aa_select_description","icon_option","boundHandleLabelClick","handleLabelClick","boundHandleMobileClose","handleMobileClose","boundFocus","boundFocusin","boundKeyNav","keyNav","toogleDropdown","selectedOptionId","dataset","reRender","selectedlabel","setSelected","dispatchChange","tmpSelected","open","close","switchAriaModal","openingSource","activeElement","preventDefault","prevOption","nextOption","firstOption","lastOption","prevSibling","previousElementSibling","nextSibling","nextElementSibling","ProductTracking","range","noImpression","productIndex","getPLPCategory","categoryId","getPLPData","configuration","eCommerceData","categories","getCategoriesWithPlpData","cupSizes","flavors","ranges","Promise","categoryData","isTechnologyCategory","getCategories","supercategories","superCategory","getCategory","then","code","buildGTMProductObject","capitalize","s","toUpperCase","slice","dimension130","productSelections","impressionsOnScrollData","dimension43","parseInt","AddToCart","longSku","buttonSize","rendererName","elementID","addToCartCounter","isWindowNapiActive","getConfig","pushButton","catch","getElementById","ui","module","productId","activated","resolve","productTracking","getProductData","getSkuKey","plpData","allKeys","currentKeyIndex","__publicField","_AddToCart","SLIDER_CHIPS_ID","PlpStickyBar","boundReinitSlider","reinitSlider","boundLinkClick","linkClick","dropdownButtons","navigation","navigation_bubbles","renderLinksSelect","renderChipsSlider","dropdown","navigationBubble","links","a11y_slider_previous_button","a11y_slider_next_button","selected_nav_link_label","forceSliderWidth","dropdownWidth","navigationBubbleWidth","initSlider","currentTarget","location","href","swipeEvents","stopEl","nwcSwipeEvents","scrollTopArray","scrollLeftArray","scrollTop","scrollLeft","memorizeStartElScrollPositions","startEl","timeDown","Date","now","touches","clientX","clientY","xDiff","yDiff","xDown","yDown","xUp","yUp","defaultVertical","innerHeight","defaultHorizontal","swipeThresholdVertical","getNearestAttribute","swipeThresholdHorizontal","swipeTimeout","timeDiff","eventType","changedTouches","abs","checkScrollCondition","dir","touchType","xStart","xEnd","yStart","yEnd","direction","isScrollable","scrollHeight","clientHeight","scrollWidth","clientWidth","attributeName","defaultValue","documentElement","attributeValue","String","Overlay","overlay","appendChild","getElementsByClassName","STATE_OPEN","SCROLL_LOCK","Popin","ariaModal","isVideo","boundOpen","boundClose","boundEscapeClose","escapeClose","display","oldValue","hasEvent","heading","subheading","bgcolor","label_close","heading_class","heading_id","checkIsVideo","renderFooter","footer","parseBool","tempEl","tagName","addLock","removeLock","cancelBubble","stopPropagation","openVideoPopin","swipeDown","swipeOverlayTogglePlayPause","boundSwipeDown","swipeOverlay","boundSwipeOverlayTogglePlayPause","LABEL_CATEGORY_NAME","LABEL_CATEGORY_NAME_MACHINE","FAIR_TRADE_CATEGORY_NAME","VERTUO_NEXT_CATEGORY_NAME","ORGANIC_EU_CATEGORY_NAME","RAINFOREST_CATEGORY_NAME","SUSTAINABILITY_CATEGORY_NAME","ARABICA_CATEGORY_NAME","PRODUCT_HIGHLIGHT_CATEGORY_NAME","COMMON_URL","ORGANIC_LOGO_IMG_EU","ORGANIC_LOGO_IMG_US","ORGANIC_LOGO_IMG_CA","ORGANIC_LOGO_IMG_BR","ORGANIC_LOGO_IMG_JP","ORGANIC_LOGO_IMG_BE","VERTUONEXT_LOGO_IMG","RAINFOREST_LOGO_IMG","SUSTAINABILITY_LOGO_IMG","Q_CERTIFICATION_ARABICA_LOGO_IMG","DESIGN_AWARD_2021_IMG","LOGO_IMG_MAP","fair_trade","is_organic","organicLogoImg","getOrganicLogo","only_vertuo_next","is_q_certified_arabica","is_rainforest","is_sustainable","is_design_award_2021","getVertuoNext","getCategoryRegEx","isVertuoNext","getOrganicEu","isOrganicEu","getRainforest","isRainforest","getSustainability","isSustainability","getArabica","isArabica","getLabels","isLabel","getProductHighlight","isProductHighlight","getFairTrade","isFairTrade","categoryIdTail","RegExp","isCategoryHidden","hideCategory","PLP_HIDE_CATEGORIES","findIndex","c","PLP_ONLY_SHOW_CATEGORIES","CardLogos","alt_fair_trade","alt_organic","alt_vertuo_next","alt_rainforest","alt_sustainable","alt_q_certification_arabica","logos","logos_list","param","appendLogo","apply","logo","alt","hasLogo","logosList","logoName","some","CardLabels","labels","renderLabels","bgColor","slidesContainer","next","prev","colours","SliderMenu$1","boundNextClick","onNextClick","boundPrevClick","onPrevClick","onLinkClick","boundTouchEnd","onTouchEnd","disableAutoScroll","_entriesBounds","_element","_slides","_options","assign","last_known_scroll_position","ticking","navBarTravelDirection","navBarTravelling","navBarTravelDistance","scrollAmount","buildIHM","setOverflowAttribute","initializeIndicatorPosition","_root","_container","_pnIndicator","_containerSlidesContent","hasContainer","constants","wrapItems","insertBefore","createIndicator","child","randId","tag","className","div","elements","Array","from","pnAdvancerLeft","pnAdvancerRight","goToElement","goToSlide","index","showContent","contentId","deselectAllLinkBut","distance","boundingClientRect","scroll","left","behavior","sideScroll","speed","step","slideTimer","setInterval","clearInterval","moveIndicator","determineOverflow","container","containerMetrics","getBoundingClientRect","containerMetricsRight","right","containerMetricsLeft","contentMetrics","contentMetricsRight","contentMetricsLeft","textPosition","transform","link_plp_category_padding_x","backgroundColor","onResize","clearListeners","kill","intersection","disconnect","root","isInViewport","entryBound","SliderMenu","randomId","sliderMenu","boundOnResize","onLoad","debouncedOnResize","debounce","func","time","timer","clearTimeout","loadSwiper","SliderMenuLib","li","firstChild","replaceChild","itemTypes","itemDisplay","rootElement","slider","onNavigationClick","SliderNatural","_waitForSliderToBeSized","_set","_getOption","_setProperties","_render","_renderButtons","_renderButton","_renderNav","_renderBullet","_renderCounter","_renderGradients","_renderSafariFix","_calculateItemsPerSlide","_getSliderPositions","_setCss","_setCssSlideWidth","_setCssSlideMinHeight","_setCssSliderGap","_setCssFlexAuto","_setCssPlaceholder","_setCssItemsPerSlide","_applyCenteredLayout","_updateStates","_updateStatesScroll","_setActiveButtons","_setActiveBullet","_setCounter","_setActiveSlides","_gotoDefaultPosition","_onScroll","_getOpacityParams","_setOpacity","_switchBullets","_onPrevClick","_onNextClick","_onNavClick","_dispatchReady","_bindEvent","_unbindEvent","defaultPosition","displayButtons","displayNav","displayCounter","displayGradients","itemsPerSlide","overflow","overflowOpacity","flexAuto","onPrevClick_fn","onNextClick_fn","boundNavClick","onNavClick_fn","boundScroll","onScroll_fn","render_fn","testId","setProperties_fn","loops","waitForSliderToBeSized_fn","dispatchReady_fn","finally","wait","slidesElements","itemNumber","set_fn","item_width","items_per_slide","calculateItemsPerSlide_fn","setCssSlideWidth_fn","setCssItemsPerSlide_fn","setCssFlexAuto_fn","maxSlides","renderButtons_fn","renderNav_fn","renderCounter_fn","renderGradients_fn","applyCenteredLayout_fn","getSliderPositions_fn","getOpacityParams_fn","setOpacity_fn","updateStates_fn","bindEvent_fn","gotoDefaultPosition_fn","renderSafariFix_fn","updateSlider","instantly","currentIndex","carousel","scrollTo","sliderPositions","unbindEvent_fn","#waitForSliderToBeSized","reject","#set","normalisedValue","getOption_fn","convertToCamelCase","arr","match","low","k","#getOption","isNaN","parseFloat","#setProperties","a11y_labels","wrapper","property","buttonsContrast","setCssSlideMinHeight_fn","setCssSliderGap_fn","setCssPlaceholder_fn","#render","#renderButtons","prevButton","nextButton","renderButton_fn","#renderButton","pos","renderInCounter","buttonContrast","isPrev","buttonEl","counter","prepend","append","#renderNav","nav","bullets","renderBullet_fn","navElements","#renderBullet","#renderCounter","#renderGradients","gradientsWidth","setCss_fn","gradientsColor","#renderSafariFix","isSafari","safariFix","safariFixWidth","paddingCorrection","sliderGap","#calculateItemsPerSlide","itemWidth","#getSliderPositions","maxScroll","firstItemOffsetLeft","offsetLeft","#setCss","isRem","#setCssSlideWidth","itemWidthAuto","#setCssSlideMinHeight","slideMinHeight","#setCssSliderGap","#setCssFlexAuto","#setCssPlaceholder","placeholderBackground","#setCssItemsPerSlide","#applyCenteredLayout","#updateStates","setActiveButtons_fn","setActiveBullet_fn","setCounter_fn","setActiveSlides_fn","updateStatesScroll_fn","#updateStatesScroll","#setActiveButtons","#setActiveBullet","#setCounter","#setActiveSlides","tempIndex","#gotoDefaultPosition","#onScroll","isScrolling","carouselScrollLeft","switchBullets_fn","#getOpacityParams","getComputedStyle","getPropertyValue","itemWidthAdjusted","#setOpacity","scrollX","itemX","percentage","opacityPercentage","finalOpacity","#switchBullets","alreadyScrolled","#onPrevClick","#onNextClick","#onNavClick","#dispatchReady","#bindEvent","#unbindEvent","createRefs","component","extract","refs","$ref","refArray","getRefArray","getImpolicy","policy","rules","STATE_DISABLED","Bubble","setState","src_retina","visual","getResponsiveImpolicy","mobileWidth","tabletWidth","desktopWidth","retinaWidth","state","a11y_scrollto","renderVisual","renderLabel","setTheme","theme","IntersectionObserverService","observers","Map","create","selector","has","warn","targets","set","delete","destroyAll","clear","Deferred","promise","scrollDuration","baseScrollDuration","deferred","scrollPosition","resolveScrollPosition","scrollPaddingTop","scrollToElement","scrollY","top","currentTime","initialTimestamp","performance","deltaScroll","resolveScrollDuration","viewportHeight","bodyHeight","finalTimestamp","requestAnimationFrame","currentTimestamp","moveStep","EVENT_NAVIGATION_SECTION_CHANGE","NB_SLIDES_STICKY","INTERSECTION_RATIOS_SECTION","SLIDER_CONFIG_DEFAULT","display_gradients","display_nav","placeholder_background","slide_min_height","slider_gap","NavigationBubbles","isMobile","scrollObserver","sticky","isSticky","isCenteredItems","is_centered_items","init","eventsListeners","bindSliderLinksEvents","geometry","getGeometry","onSliderLinkClick","$event","sectionId","finalLabel","plpListLabel","bubbleLabel","onSectionChange","updateBubbles","updateChips","createListeners","once","updateLayout","eventsManager","renderNavigation","getSliderOptions","flex_auto","gradients_color","gradients_width","slider_id","a11y_goto_slide","renderList","sliderOptions","sliderData","display_buttons","renderFunction","bubble","renderBubble","bubbleWithCampaign","renderChip","chip","bubbleId","chips","chipId","isChecked","_index","sliderChip","emit","header","stickyBarHeight","height","scrollOptions","preventScroll","$header","$stickyBar","headerRect","y","stickyBarRect","NespressoElement","template","_createProps","onStart","loadTemplate","onReady","forceAttributes","force","_diff","_getNodeType","nodeType","_getNodeContent","domNodes","prototype","templateNodes","count","removeChild","cloneNode","templateContent","fragment","createDocumentFragment","templateHTML","onDestroy","runningExperiments","Set","runningExperiment","experiment","EXPLICIT_FILTERS","FILTER_MAIN_BLOCK_ID","SORT_MENU_ID","POPIN_ID","NAVIGATION_MAIN_BLOCK_ID","PRODUCTS_LIST_MAIN_BLOCK_ID","PRODUCTS_RESULTS_MAIN_BLOCK_ID","PRODUCTS_RESULTS_HEADER_ID","CB_RESULTS_TOTAL_ID","MY_RECOMMENDATIONS_ID","QUERY_URL_PARAMETER_FILTERS","QUERY_URL_PARAMETER_SORT","appData","_productsFlat","sessionId","plpType","plpDataType","reload","initPriceFormatter","priceFormat","getPriceFormatter","initCurrency","read","filters","productsList","getProducts","acc","concat","productsListFiltered","withSort","selectedFilters","filterPredicate","filterProductsByFilterType","doesProductMatchFilter","filterProductsByAllFilters","filteredList","sortCurrent","order","sorter","isAscending","a","b","createSorter","sort","sortProducts","productsFilteredCount","filtersUpdate","filterSelection","fireAll","f","setFilterValue","filterChipsUpdate","filtersUpdateMultiple","valueSelections","filtersSelected","filterValueIsEqual","filtersSelectedWithLabel","filterKey","filterValue","foundFilter","filterLabel","values","v","categoryTitle","title","filtersSelectedCount","filtersSelectedSerialized","filtersReset","filterChip","productCount","predicate","subscribe","fn","unsubscribe","fnToRemove","productPropValue","groups","current","groupFiltersByType","types","isArray","splice","fSelected","updateUrlVariable","variable","queryArray","path","updateQueryStringParameter","uri","re","separator","encodeURIComponent","pushState","getUrlVariable","queryString","search","URLSearchParams","decodeURIComponent","defaultTracking","getSortTracking","isSorted","sortKey","sortOrder","getFilterTracking","isFiltered","__crema_service__","pageStores","signalStore","ProductsList","signal","ProductDetails","HeaderNavigation","setPageHtml","html","getStore","pageHtml","getModuleData","moduleName","setModuleData","parser","loadFromUrl","cacheOnly","batch","store","debug","response","fetch","ok","status","statusText","fetchHtml","parseModuleData","moduleScript","scripts","script","parseHtml","lines","line","trimmed","startsWith","jsonString","parseProductScript","appStates","appEvents","process","handlePostEvent","appStatesHandler","priceFormatter","err","loadFromPage","onReload","urlObj","URL","pathname","history","simulatePageChange","_data","onloadSuccess","nextState","onloadError","showError","onMergeData","filtersService","productService","dataSortService","pageBuilderProps","recommendationService","recommendationInstance","mergeData","recommendation","readyToLoadProducts","loadProducts","newData","enabledTechnologies","tech","isSelected","at","translations","nav_links","hide_sort_and_filter","maxIntensity","getTrackingData","mergeProductData","categoriesExtraData","mergeFilters","urlFilters","filterData","cleanFilterDataXSS","source","cleanData","sourceItem","isLast","urlSort","sortData","cleanSortDataXSS","setUrlOverrides","notCurrentTech","handleExperiments","trackLoad","switchProductsPage","readyForShowResults","readyForPlay","onMergeDataError","onFilter","grouped","replaceAll","groupSelectedFilters","groupKeys","filterTrackingFromPlpFilters","onSort","trackInteraction","onloadFilter","onloadFilterSuccess","readyForFilter","onloadFilterError","handleAppEvent","customEventName","eventFn","stateTransitionsManager","_SORT_MENU_ID","WeakMap","formatSortSeparator","componentUpdated","boundOnSortChange","onSortChange","__privateGet","sortButton","_filters","isDisabled","onStoreChanges","labelEl","getLabel","__privateSet","renderBefore","renderAfter","handleChipEvent","itemValue","CATEGORY_IDENTIFIER","a11y_see_result_number_label","getA11ySeeResultsText","see_result_number_label","see_result_number_label_one","filtersTracking","btnReset","btnResult","visibility","parentElement","see_result_number_label_zero","copywriting","eventPopinClsed","arguments","bubbleElement","oldVal","newVal","updateBubbleCounter","cta_filter_label","SLIDER_NAV_LINKS_ID","renderLinksList","label_sort_by","aa_description_sort_by","aa_listbox_description_sort_by","aa_select_description_sort_by","label_close_sort_by","_formatSortValue","updateComponent","HTML","filterLinks","service","stickyService","elementHeight","stickyElementSelector","magicIndex","initialize","updateSticky","offsetElement","isReady","offsetTop","offsetHeight","paddingTop","$element","$elementHeight","$stickyElementSelector","$magicIndex","updatePosition","offset","nav_link","data_navigation_bubbles","dataTransformNavigationBubbles","customEventAction","navLinks","dataTransformNavLinks","t","n","o","hasOwnProperty","getChildContext","context","_vdom","_props","l","u","_vdomComponent","_listener","useAppData","setData","useState","useEffect","onEmit","_isSticky","getNamedItem","navigationBar","hasOwn","classNames","classes","arg","appendClass","parseValue","newClass","exports","default","__k","__","__b","__e","__d","__c","__h","__v","__source","__self","defaultProps","vnode","ProductGrid","class","anchorId","_jsx","cn","grid","ProductCard","onClick","shortSku","rest","card","ProductCardSection","as","RowDividerSection","row","BackgroundSection","asTag","enableHover","background","hoverEnabled","cupSizeLookup","ristretto","espresso","lungo","coffee","xl","alto","americano","icedrecipe","milk","reverso","getCupSizeIcon","cupSize","returnDefaultIcon","cupSizeKey","getCupType","cupSizeIcon","showIcons","icons","showIntensity","intensity","matrixTimes","x","roundTo","vecAdd","a1","a2","b1","b2","num","places","factor","svgPathArc","radius","startAngle","sweepAngle","rotationRadians","sweepAngleRadians","PI","rotMatrix","cos","sin","rotateMatrix","rotStartAngle","rotSweepAngle","startX","startY","endX","endY","largeArcFlag","sweepFlag","IntensityMeter","maximum","segmentFraction","dashFraction","arcPaths","_jsxs","viewBox","version","xmlns","cx","cy","CIRCLE_RADIUS","strokeWidth","FeatureIcon","isMultipleIcons","showLabel","Feature","additionalStyles","CardFeatures","_Fragment","Left","LeftColumn","intensityLabel","intensityMax","recipe","recipeIcons","shouldShowIntensity","shouldShowRecipeIcons","renderIntensityMeter","Right","RightColumn","cupSizeIcons","Separator","ColumnSeparator","showSeparator","ProductFeaturesSection","cupSizesDetails","plpAppData","currentTechnology","getCoffeeIcons","getRecipeIcons","intensity_label","FormattedText","dangerouslySetInnerHTML","__html","ProductTag","ProductTagsSection","createImPolicyQuery","getRetinaWidth","getClosest","getImpolicyProfile","ProductImage","loading","altText","getProductImage","imageUrl","useMemo","imPolicyQuery","ceil","imageWrapper","asset","image_alt_text","ProductImageSection","UnmanagedDom","Component","shouldComponentUpdate","instanceCount","AddToCartButton","elementId","setElementId","initialButtonClassName","addToCart","large","decorateEvent","__isAddToCard__","isBundledCoffee","getPriceLabel","priceVal","_product","short","OutOfStock","outOfStock","PriceDisplay","strikethruPrice","outOfStockLabel","capsuleAndSleeveInfo","priceBox","PriceLabel","CapsuleAndSleeveLabel","LONG_PRICE_LENGTH","isLongPriceString","priceLabelWrapper","longPrice","formattedPrice","defaultCapsuleLabel","capsuleSleeveLabel","capsuleAndSleeveLabelWrapper","Price","capsulesSyntax","showSecondaryPrice","showSecondaryPriceSyntax","showPrimaryPrice","primaryPriceSyntax","priceProps","setPriceProps","isOutOfStock","priceNumeric","show_sleeve_price","price_per_capsule","productIsCapsule","productIsCapsules","getSkuPrice","priceCurrency","hiddenPrice","hidePrice","priceIsHidden","sleeveText","show_sleeve","sleeve_syntax","isAssortment","sleeveSyntaxTokens","regex","realTokens","extractTokensFromString","replacements","token","getSleeveText","strikethrough_price","getStrikethruPrice","getCremaUITranslation","__INITIAL_CONFIG__","currencySymbol","priceWithSyntax","sleevePrice","pricePerCapsule","sleevePriceToUse","finalSleevePrice","getSleeveAndCapsuleLabel","isSmallScreen","matchMedia","matches","PurchaseSection","addToCartSize","cards_add_to_cart_size","primary_price_syntax","show_secondary_price","show_secondary_price_syntax","capsules_syntax","purchaseSection","button","useIntersection","isVisible","NameHeadline","headline","is_headline_hidden","isHeadlineHidden","trackingPosition","trackingList","cardRef","useRef","hasTrackingFired","setHasTrackingFired","mobileOnly","ProductNameSection","CompatibilityButton","textCentered","maintainElementFocus","buttonFocus","inner","contents","chevron","COMPATIBILITY_RANGE_IDENTIFIER","ProductCompatibilitySection","buttonText","showCompatibilityButton","simplifyRangeIds","capsuleHasMachineCompatibilityIssue","CoffeeProductCard","onCompatibilityClick","compatibilityButtonText","handleCompatibilityClick","AssortmentProductCard","imageSection","ProductCardsList","toggleCompatibilityModal","gotoProduct","category_name","clickedProduct","isAddToCartEvent","getBackgroundImage","backgroundUrls","viewportHelperGlobal","CollectionCard","mode","backgroundUrl","backgroundStyle","dark","light","collectionDetails","cupSizeIconSelected","CollectionBanner","backgroundImageStyle","collectionBanner","fetchAndParse","mainTag","Context","createContext","setFooter","ModalDrawer","closeIconAltText","maxHeightMobile","onClose","dialogRef","isClosing","setIsClosing","versionMatch","isOlderThan153","isOldSafari","dialogPolyfill","import","registerDialog","onDialogClick","showModal","hideModal","parentContext","article","Provider","closeButton","autoFocus","Footer","useContext","CompatibilityModal","modalSettings","compatibilityUrl","modalTitle","loadingLabel","loadingLabelError","errorLoadingLabel","closeButtonLabel","fetchData","Loaded","Pending","stateLoaded","statePending","stateError","Loader","NbLoader","Reflect","construct","shadow","attachShadow","propTypes","defineProperty","displayName","asWebComponent","showCollections","modalState","setModalState","filteredProducts","collectionHeaderType","collection_header_type","compatibility_card_button_text","compatibility_modal_url","compatibility_modal_title","compatibility_modal_loading_text","compatibility_modal_loading_text_error","compatibility_modal_close_button_ally","modalProps","productCollections","productCollection","collection","isLoadingProducts","a11y_label","colorHtml","_resetSelector","a11y_header_result_label_button","a11y_header_result_label_reset","a11y_header_result_label_results","header_result_label_reset","header_result_label_results","header_result_label_results_one","header_result_label_results_zero","header_result_label","total","filterLabels","getResultLabel","resetClick","PLPApp","dataTransformService","dataFiltersService","propChanged","valueChanged","defineTemplate","enabledExperiments","info","enableExperiment","itemsPerRow","items_per_row","Category","PageBuilderData","_id","_name","_description","_products","_capacityLabel","_detailsIcon","_icon","_isLoadingProducts","_rangeLink","_subCategories","_superCategories","_url","_background_retina","_background_desktop","_background_mobile","_background_tablet","_contrast","_isSegment","capacityLabel","detailsIcon","rangeLink","subCategories","superCategories","isProductCategory","CoffeeCategory","Product","name_custom","available","maxOrderQuantity","packagingType","pushRatingEnabled","highlighted","additional_message","additional_message_icon","additional_message_link","api_override","view_details_label","CoffeeProduct","in_stock","a11y_price","a11y_product_card","shop_similar","label_sleeve","label_sleeves","label_capsules","a11y_intensity_max","label_decaffeinato","final_price","capsule_price_label","capsule_price_syntax","perSleeveLabel","number_of_sleeves","number_of_capsules","show_capsule_price","sort_price","bundle_details","initializeCopywritingData","initializeOptionsData","initializeProductData","finalizeInitialization","quick_view_plp","alt_sustainability","altTexts","vertuo_next","organic","rainforest","sustainability","q_certification_arabica","min_intensity","max_intensity","getPrice","getSortPrice","images","initializeLogos","logosConfig","condition","onlyVertuoNext","altKey","fairTrade","organicEu","arabica","sleeveNumber","hasPricePerSleeve","getSleevePrice","navigationLinks","enabledCremaTechnologies","VERTUO_ICON","PRO_ICON","transformCremaTechnologiesToLink","getIconByTechnology","COFFEE_ORIGINAL","hide_technologies_in_navigation","replaceCremaTechnologies","all_products_navigation_label","selectedTechnology","navLinksWithoutTechnology","navigationBubbles","productGroups","productsGroup","bubblesFilteredAndSorted","bubblesMathProductsGroup","normalizedBubble","ele","cremaCategory","cremaBubble","unshift","addLabels","highlightLabels","textColor","parsedData","parseLabels","labelGroups","group","__label","productIds","prod","labelGroup","indexToRemove","productGroup","MainDTO","colorFilterFunction","getOverridenProductGroups","applyRecommendationOverrides","getPBProperty","pbProduct","pbProductData","apiOverride","display_machine_range_name","applyProductsOverrides","overriddenCategories","extraData","catData","category_id","categoryObj","productID","productObj","Boolean","applyCategoryOverrides","original","vertuo","getMinMaxIntensity","intensities","flatMap","min","max","format","getPageBuilderData","field","getMergedPLPData","addProductAttribute","categoryFetcher","assignHandler","categoryGroup","plpProduct","showCapsulePrice","getFinalPrice","getCupSizesDetails","getNoteIcon","note","_note","NOTES_ICON_DEFAULT","harmonizeNoteName","Filter","_filter","_type","_key","_iconFn","_filterFn","_title","_values","_after","_before","showalllabel","iconFn","filterFn","before","after","pushValues","DefaultFilterChipType","_value","_label","_filterType","_filterKey","_color","_selected","_disabled","productCountLabel","createFilter","filterDefinition","categoriesData","fieldValue","getCategoryData","findCategory","cssColorCode","createCategoriesFilter","PBprops","PBBubbles","categoriesFilter","filter_label_showall_collections","getIntenistyFilter","intensityFilter","filter_label_showall_intensity","intensityMin","INTENSITY_RANGES","filter_group_intensity_light","filter_group_intensity_medium","filter_group_intensity_intense","getMergedFilterData","filter_label_showall_cupsize","filter_label_showall_aromatic","getMergedSortData","dropdown_recommended_option_label","dropdown_price_ascending_option_label","dropdown_price_descending_option_label","dropdown_intensity_ascending_option_label","dropdown_intensity_descending_option_label","coreAppStates","productList","productsResults","cbResultsTotalText","plpFilterPopin","errorMessage","productsResultsHeader","PLPCoffeeCards"],"mappings":"o+BAAA,MAEMA,EAAcC,IACVC,MAAAA,EAHMD,CAAAA,GAAcA,EAAWE,MAAKC,GAAoC,SAAvBA,EAAUC,WAGpDC,CAAQ,IAAIL,IACnBM,EAAQ,IAAIN,GACbO,QAAOJ,GAAoC,SAAvBA,EAAUC,WAC9BI,QAAO,CAACC,EAAKC,KACH,IAAKD,EAAK,CAACC,EAAKN,UAAWM,EAAKC,aACxC,CAAE,GAET,GAAIC,EAAMX,GACCK,OAAAA,EAGP,IACO,MAAA,IAAKA,KAAUO,KAAKC,MAAMb,EAAKU,WACzC,OAAQI,GACLC,QAAQC,IAAI,iBAAkBF,EAAOd,GAAMU,UAC/C,GAGEC,EAAQM,GAAoC,MAARA,ECH1C,IA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