{"version":3,"file":"index.es.min.js","sources":["../../../packages/components/src/nespressoElement/nespressoElement.js","../../../packages/helpers/src/refs.helpers.js","../../../packages/components/src/constants.mjs","../../../packages/helpers/src/catalog.js","../../../packages/helpers/src/getCurrency.js","../../../packages/helpers/src/utils.ts","../../../packages/components/src/sku-coffee/fragments/sleeve.js","../../../packages/components/src/sku-coffee/fragments/priceCapsule.js","../../../packages/components/src/sku/fragments/strikethroughPrice.js","../../../packages/components/src/sku/fragments/price.js","../../../packages/components/src/add-to-cart-bar/add-to-cart-bar.js","../../../packages/components/src/add-to-cart-bar-coffee/add-to-cart-bar-coffee.js"],"sourcesContent":["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","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","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}\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","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 const getCurrency = () => window[window.config.padl.namespace].dataLayer.app.app.currency\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 { interpolate } from '@kissui/helpers/src/utils'\nimport { getSleeveNumber } from '@kissui/helpers/src/catalog'\n\nconst getSleeveLabel = props => {\n const { number_of_sleeves, label_sleeves, label_sleeve } = props\n const sleeveNumber = number_of_sleeves || getSleeveNumber(props)\n return sleeveNumber > 1 && label_sleeves ? label_sleeves : label_sleeve\n}\n\nconst getQuantity = ({ bundled, sales_multiple, unit_quantity, unitQuantity }) =>\n bundled === false ? sales_multiple : unit_quantity || unitQuantity || 0\n\nexport const renderShowSleeve = props => {\n const { show_sleeve = false } = props\n\n if (!show_sleeve) {\n return ''\n }\n\n const { label_capsules, sleeve_syntax } = props\n const label = getSleeveLabel(props)\n const quantity = props.number_of_capsules ? props.number_of_capsules : getQuantity(props)\n const sleeveNumber = props.number_of_sleeves ? props.number_of_sleeves : getSleeveNumber(props)\n\n if (!quantity || !sleeveNumber) {\n return ''\n }\n\n const showSleeve = interpolate(\n sleeve_syntax,\n {\n numberOfSleeves: sleeveNumber,\n sleeveLabel: label,\n quantity,\n label_capsules,\n sleevePrice: props.hasPricePerSleeve ? props.sleevePrice : '',\n perSleeveLabel: props.hasPricePerSleeve ? props.perSleeveLabel : ''\n },\n '{',\n '}'\n )\n\n if (!showSleeve) {\n return ''\n }\n\n return `<p class=\"cb-price-items cb-show-sleeve t-xs-500-sl\">${showSleeve}</p>`\n}\n","import { interpolate } from '@kissui/helpers/src/utils'\n\nexport const renderCapsulePrice = props => {\n const {\n show_capsule_price = false,\n capsule_price_label,\n capsule_price_syntax = '{capsule_price_label}: {price_per_capsule}',\n price_per_capsule,\n show_sleeve_price\n } = props\n if (!show_capsule_price || !capsule_price_label || !show_sleeve_price) {\n return ''\n }\n\n const pricePerCapsule = interpolate(\n capsule_price_syntax,\n {\n capsule_price_label,\n price_per_capsule\n },\n '{',\n '}'\n )\n\n if (!pricePerCapsule || !price_per_capsule) {\n return ''\n }\n\n return `<p class=\"cb-price-items cb-price-capsule t-xs-500-sl\">${pricePerCapsule}</p>`\n}\n","import { getFormattedPrice } from '@kissui/helpers/src/catalog'\n\nconst getStrikethroughPriceElement = component => {\n return component.querySelector('.cb-price-old')\n}\n\nconst fetchStrikethroughPrice = strikethroughPrice => {\n return getFormattedPrice(strikethroughPrice)\n}\n\nexport const renderStrikethroughPrice = ({ strikethrough_price }, component) => {\n if (!strikethrough_price) {\n return ''\n }\n\n fetchStrikethroughPrice(strikethrough_price)\n .then(payload => {\n const element = getStrikethroughPriceElement(component)\n if (!element) {\n return\n }\n\n element.innerHTML = payload\n })\n .catch(e => {\n console.error(`Error: Component SKU - Strike Through Price - ${e}`)\n\n const element = getStrikethroughPriceElement(component)\n if (!element) {\n return\n }\n\n element.style.display = 'none'\n })\n\n return `<p class=\"cb-price-old t-sm-400-sl\"></p>`\n}\n","import { ECAPI_TYPE_CAPSULE } from '@kissui/helpers/src/catalog'\nexport const renderPrice = ({\n price,\n hidePrice,\n giftcard_price,\n price_per_capsule,\n show_sleeve_price,\n type\n}) => {\n if ((!price && !giftcard_price) || hidePrice) {\n return ''\n }\n let finalPrice = null\n if (!show_sleeve_price && price_per_capsule) {\n finalPrice = price_per_capsule\n } else {\n finalPrice = price\n }\n if (type !== ECAPI_TYPE_CAPSULE) {\n finalPrice = price\n }\n\n return `<p class=\"cb-price-current\"><span>${finalPrice || giftcard_price}</span></p>`\n}\n","import { NespressoElement } from '@kissui/components/src/nespressoElement'\nimport createRefs from '@kissui/helpers/src/refs.helpers'\nimport { getLegacySKU } from '@kissui/helpers/src/catalog'\n\nimport { renderShowSleeve } from '@kissui/components/src/sku-coffee/fragments/sleeve'\nimport { renderCapsulePrice } from '@kissui/components/src/sku-coffee/fragments/priceCapsule'\nimport { renderStrikethroughPrice } from '@kissui/components/src/sku/fragments/strikethroughPrice'\nimport { renderPrice } from '@kissui/components/src/sku/fragments/price'\n\nclass AddToCartBar extends NespressoElement {\n onStart() {\n this.classList.add('c-add-to-cart-bar')\n this.template = `\n <nb-container>\n <div class=\"add-to-cart-bar__container\">\n <div class=\"add-to-cart-bar__details\" data-ref=\"details\"></div>\n <div class=\"add-to-cart-bar__button\" data-ref=\"button\"></div>\n </div>\n </nb-container>\n `\n }\n\n onReady() {\n this.refs = createRefs(this)\n\n this.longSku = this.props.id\n this.sku = getLegacySKU(this.longSku)\n\n const { details, button } = this.refs\n\n details.innerHTML = this.renderDetails()\n button.innerHTML = this.renderButton()\n }\n\n renderDetails() {\n return `\n <div class=\"add-to-cart-bar__price\">\n <span class=\"t-md-700-sl add-to-cart-bar__price--current\">${renderPrice(\n this.props\n )}</span>\n <span class=\"add-to-cart-bar__price--old\">${renderStrikethroughPrice(\n this.props,\n this\n )}</span>\n </div>\n <div class=\"add-to-cart-bar__count\">\n ${renderShowSleeve(this.props)}\n ${renderCapsulePrice(this.props)}\n </div>\n `\n }\n\n renderButton() {\n return `<nb-add-to-cart\n sku=\"${this.sku}\"\n longsku=\"${this.longSku}\"\n range=\"\"\n buttonSize=\"large\"\n >\n </nb-add-to-cart>`\n }\n}\n\ncustomElements.get('nb-add-to-cart-bar') ||\n customElements.define('nb-add-to-cart-bar', AddToCartBar)\n\nexport default AddToCartBar\n","import AddToCartBar from '@kissui/components/src/add-to-cart-bar'\n\nimport { renderShowSleeve } from '@kissui/components/src/sku-coffee/fragments/sleeve'\nimport { renderCapsulePrice } from '@kissui/components/src/sku-coffee/fragments/priceCapsule'\nimport { renderStrikethroughPrice } from '@kissui/components/src/sku/fragments/strikethroughPrice'\nimport { renderPrice } from '@kissui/components/src/sku/fragments/price'\n\nclass AddToCartBarCoffee extends AddToCartBar {\n renderDetails() {\n return `\n <div class=\"add-to-cart-bar__details\">\n <div class=\"add-to-cart-bar__price\">\n <div class=\"add-to-cart-bar__price--current t-md-700-sl\">\n ${renderPrice(this.props)}\n </div>\n <div class=\"add-to-cart-bar__price--old\">\n ${renderStrikethroughPrice(this.props, this)}\n </div>\n </div>\n <div class=\"add-to-cart-bar__count\">\n ${renderShowSleeve(this.props)}\n ${renderCapsulePrice(this.props)}\n </div>\n </div>`\n }\n}\n\ncustomElements.get('nb-add-to-cart-bar-coffee') ||\n customElements.define('nb-add-to-cart-bar-coffee', AddToCartBarCoffee)\n\nexport default AddToCartBarCoffee\n"],"names":["NespressoElement","HTMLElement","constructor","this","template","connectedCallback","props","_createProps","onStart","loadTemplate","onReady","forceAttributes","attributes","reduce","all","attr","nodeName","nodeValue","data","find","attribute","getData","JSON","parse","error","console","log","render","force","innerHTML","_diff","elem","_getNodeType","node","nodeType","tagName","toLowerCase","_getNodeContent","childNodes","length","textContent","domNodes","Array","prototype","slice","call","templateNodes","count","parentNode","removeChild","forEach","index","appendChild","cloneNode","replaceChild","templateContent","fragment","document","createDocumentFragment","templateHTML","str","DOMParser","parseFromString","body","disconnectedCallback","onDestroy","customElements","get","define","extract","refs","$ref","ref","dataset","refArray","match","getRefArray","name","undefined","COFFEE_VERTUO","TECHNOLOGY_CATEGORY_IDENTIFIER","getTechnologyName","productData","techno","technologies","substring","indexOf","isMultipleOf","quantity","multiple","getSleeveNumber","product","getTechnologyNameFn","sales_multiple","unitQuantity","NaN","getFormattedPrice","async","price","priceFormatter","window","napi","priceFormat","getPriceFormatter","currency","config","padl","namespace","dataLayer","app","html","short","interpolate","txt","vars","stChr","enChr","curIdx","stIdx","enIdx","hashId","substr","renderShowSleeve","show_sleeve","label_capsules","sleeve_syntax","label","number_of_sleeves","label_sleeves","label_sleeve","getSleeveLabel","number_of_capsules","getQuantity","bundled","unit_quantity","sleeveNumber","showSleeve","numberOfSleeves","sleeveLabel","sleevePrice","hasPricePerSleeve","perSleeveLabel","renderCapsulePrice","show_capsule_price","capsule_price_label","capsule_price_syntax","price_per_capsule","show_sleeve_price","pricePerCapsule","getStrikethroughPriceElement","component","querySelector","renderStrikethroughPrice","strikethrough_price","strikethroughPrice","fetchStrikethroughPrice","then","payload","element","catch","e","style","display","renderPrice","hidePrice","giftcard_price","type","finalPrice","AddToCartBar","classList","add","querySelectorAll","longSku","id","sku","productId","split","pop","getLegacySKU","details","button","renderDetails","renderButton","AddToCartBarCoffee"],"mappings":"AAAO,MAAMA,UAAyBC,YAClCC,WAAAA,WAEIC,KAAKC,SAAW,EACpB,CAEAC,iBAAAA,GACSC,KAAAA,MAAQH,KAAKI,eAClBJ,KAAKK,YACLL,KAAKM,eACLN,KAAKO,WACT,CAOAH,YAAAA,CAAaI,EAAkB,MAC3B,MAAMC,EAAaD,GAAmBR,KAAKS,WAIvCN,IAAAA,EACA,IACAA,EAAQ,IAAIM,GAAYC,QAAO,CAACC,EAAKC,KAC1B,IAAKD,EAAK,CAACC,EAAKC,UAAWD,EAAKE,aACxC,CAAE,GAEL,MAAMC,EARMH,CAAAA,GAAQA,EAAKI,MAAKC,GAAoC,SAAvBA,EAAUJ,WAQxCK,CAAQ,IAAIT,IAECM,OAAS,MAATA,EACfZ,EAGJ,IAAKA,KAAUgB,KAAKC,MAAML,EAAKD,WACzC,OAAQO,GACLC,QAAQC,IAAIvB,KAAKa,SAAU,iBAAkBQ,E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