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JClB2L,QAAe,G,uDCA1O,IAAIC,EAAS,SAASA,SAAS,IAAIC,EAAI5H,KAAK6H,EAAGD,EAAIE,MAAMD,GAAUD,EAAIE,MAAMC,YAAY,OAAOF,EAAG,MAAM,CAACG,YAAY,0BAA0B,CAAEJ,EAAa,UAAEC,EAAG,MAAM,CAACG,YAAY,cAAcJ,EAAIK,KAAKL,EAAIM,GAAG,KAAMN,EAAI1F,SAASiB,QAAU,IAAOyE,EAAInB,UAAWoB,EAAG,MAAM,CAACG,YAAY,uDAAuD,CAACJ,EAAIM,GAAG,SAASN,EAAIO,GAAGP,EAAIQ,GAAG,6CAA6C,UAAUR,EAAIK,KAAKL,EAAIM,GAAG,KAAKN,EAAIS,GAAIT,EAAiB,eAAE,SAASU,GAAO,OAAOT,EAAG,KAAK,CAACG,YAAY,yBAAyBJ,EAAIS,GAAG,GAAQ,SAASnH,GAAS,OAAO2G,EAAG,4BAA4B,CAACU,IAAIrH,EAAY,GAAEsH,MAAM,CAAC,cAAcZ,EAAIhB,WAAW,QAAU1F,EAAQ,iBAAiB0G,EAAIa,gBAAgB,IAAG,EAAE,KAAI,EAC9tB,EACIC,EAAkB,E","sources":["webpack:///./node_modules/@flashpointbv/solar-datalayer/dist/index.js","webpack:///./resources/area/web/default/js/components/catalog/ProductList.vue?55bd","webpack:///./resources/area/web/default/js/components/catalog/ProductList.vue","webpack:///./resources/area/web/default/js/components/catalog/ProductList.vue?a6f1","webpack:///./resources/area/web/default/js/components/catalog/ProductList.vue?6aad"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SolarDataLayer = exports.WishlistEvents = exports.CartEvents = void 0;\nvar CartEvents;\n(function (CartEvents) {\n CartEvents[\"ADD\"] = \"add_to_cart\";\n CartEvents[\"REMOVE\"] = \"remove_from_cart\";\n})(CartEvents = exports.CartEvents || (exports.CartEvents = {}));\nvar WishlistEvents;\n(function (WishlistEvents) {\n WishlistEvents[\"ADD\"] = \"add_to_wishlist\";\n WishlistEvents[\"REMOVE\"] = \"remove_from_wishlist\";\n})(WishlistEvents = exports.WishlistEvents || (exports.WishlistEvents = {}));\nclass SolarDataLayer {\n /**\n * Create new dataLayer element when there is none\n */\n constructor() {\n this.dataLayer = window.dataLayer || [];\n }\n /**\n *\n * @param config\n * @param currency\n */\n static init(config, currency) {\n if (SolarDataLayer.instance) {\n return SolarDataLayer.instance;\n }\n if (config) {\n SolarDataLayer.config = Object.assign(Object.assign({}, SolarDataLayer.config), config);\n }\n if (currency) {\n SolarDataLayer.currency = currency;\n }\n SolarDataLayer.instance = new SolarDataLayer();\n return SolarDataLayer.instance;\n }\n /**\n *\n * @param value\n */\n static dataLayerValue(value) {\n return value || '';\n }\n /**\n * Reset dataLayer\n */\n static resetDataLayer() {\n window.dataLayer.push({ 'ecommerce': null });\n }\n /**\n *\n * @param value\n */\n static formatPrice(value) {\n const price = typeof value === 'string' ? parseFloat(value) : value;\n const multiplier = Math.pow(10, 2);\n return (Math.round(price * multiplier) / multiplier);\n }\n /**\n *\n * @param categories\n * @param position\n */\n static resolveCategory(categories, position) {\n return categories[position] || '';\n }\n /**\n *\n * @param oldPrice\n * @param price\n */\n static getSalePrice(oldPrice, price) {\n return oldPrice !== price ? oldPrice - price : '';\n }\n /**\n *\n * @param product\n */\n static defaultProductInformation(product) {\n const config = SolarDataLayer.config;\n const productData = {\n 'item_name': SolarDataLayer.dataLayerValue(product[config['item_name']]),\n 'item_id': SolarDataLayer.dataLayerValue(product[config['item_id']]),\n 'item_group_id': SolarDataLayer.dataLayerValue(product[config['item_group_id']]),\n 'item_brand': SolarDataLayer.dataLayerValue(product[config['item_brand']]),\n 'item_variant': SolarDataLayer.dataLayerValue(product[config['item_variant']]),\n 'currency': SolarDataLayer.currency,\n 'price': SolarDataLayer.dataLayerValue(SolarDataLayer.formatPrice(product[config['price']])),\n 'discount': SolarDataLayer.getSalePrice(SolarDataLayer.formatPrice(product[config['old_price']]), SolarDataLayer.formatPrice(product[config['price']]))\n };\n let categoryData = {};\n for (let i = 0; i < 5; i++) {\n categoryData[`item_category${i > 0 ? i + 1 : ''}`] = SolarDataLayer.resolveCategory(Object.prototype.hasOwnProperty.call(product, config['item_categories']) ? product[config['item_categories']] : [], i);\n }\n return Object.assign(Object.assign({}, productData), categoryData);\n }\n /**\n *\n * @param product\n */\n static quoteProductInformation(product) {\n const config = SolarDataLayer.config;\n const productData = {\n 'item_name': SolarDataLayer.dataLayerValue(product[config['item_name']]),\n 'item_id': SolarDataLayer.dataLayerValue(Object.prototype.hasOwnProperty.call(product['extension_attributes'], 'product_id') ? product['extension_attributes']['product_id'] : product['item_id']),\n 'item_group_id': SolarDataLayer.dataLayerValue(product[config['item_group_id']]),\n 'item_brand': SolarDataLayer.dataLayerValue(product['extension_attributes'][config['item_brand']]),\n 'item_variant': SolarDataLayer.dataLayerValue(product['extension_attributes'][config['item_variant']]),\n 'currency': SolarDataLayer.currency,\n 'price': SolarDataLayer.dataLayerValue(SolarDataLayer.formatPrice(product['price_incl_tax'])),\n 'discount': SolarDataLayer.getSalePrice(SolarDataLayer.formatPrice(product['extension_attributes']['from_price']), SolarDataLayer.formatPrice(product['price_incl_tax'])),\n 'quantity': SolarDataLayer.dataLayerValue(product['qty'])\n };\n let categoryData = {};\n //Check if category data is present on the quote item\n const categoryItemsRaw = product['extension_attributes'][config['item_categories']];\n if (categoryItemsRaw) {\n const categoryItems = typeof categoryItemsRaw === 'object' ? categoryItemsRaw : JSON.parse(categoryItemsRaw);\n for (let i = 0; i < 5; i++) {\n categoryData[`item_category${i > 0 ? i + 1 : ''}`] = SolarDataLayer.resolveCategory(categoryItems, i);\n }\n }\n return Object.assign(Object.assign({}, productData), categoryData);\n }\n /**\n *\n * @param products\n * @param listType\n * @param config\n */\n addObservableViewItemsList(products, listType, config = null) {\n if (config) {\n SolarDataLayer.observableConfig = Object.assign(Object.assign({}, SolarDataLayer.observableConfig), config);\n }\n SolarDataLayer.productList = products;\n SolarDataLayer.listType = listType;\n const observerOptions = {\n root: null,\n rootMargin: '0px',\n threshold: 0\n };\n const observer = new IntersectionObserver(SolarDataLayer.addViewItemsListEntries, observerOptions);\n const rootElement = document.getElementById(SolarDataLayer.observableConfig['listSelector'] || 'impressions-observable');\n const itemsPerRow = SolarDataLayer.isMobile ? SolarDataLayer.observableConfig['itemsPerRowMobile'] : SolarDataLayer.observableConfig['itemsPerRowDesktop'];\n if (rootElement) {\n const observeTargets = rootElement.querySelectorAll('[data-index]');\n for (let i = 0; i < observeTargets.length; i++) {\n if (i % itemsPerRow === 0) {\n observer.observe(observeTargets[i]);\n }\n }\n }\n }\n /**\n *\n * @param entries\n * @param observer\n */\n static addViewItemsListEntries(entries, observer) {\n const productsClone = SolarDataLayer.productList;\n const itemsPerRow = SolarDataLayer.isMobile ? SolarDataLayer.observableConfig['itemsPerRowMobile'] : SolarDataLayer.observableConfig['itemsPerRowDesktop'];\n entries.map(entry => {\n if (entry.isIntersecting && entry.target.hasAttribute('data-index')) {\n const itemIndex = parseInt(entry.target.getAttribute('data-index'));\n SolarDataLayer.init().addViewItemsList(productsClone.slice(itemIndex, itemIndex + itemsPerRow), SolarDataLayer.listType, itemIndex);\n observer.unobserve(entry.target);\n }\n });\n }\n /**\n *\n * @param products\n * @param listType\n * @param index\n */\n addViewItemsList(products, listType, index = 0) {\n if (!window.dataLayer.filter(e => e['event'] === 'view_item_list').length) {\n SolarDataLayer.resetDataLayer();\n }\n let items = [];\n products.forEach((product) => {\n index++;\n const productData = {\n 'item_list_id': listType.replace(/ /g, '_').toLowerCase(),\n 'item_list_name': listType,\n 'index': index,\n };\n items.push(Object.assign({}, productData, SolarDataLayer.defaultProductInformation(product)));\n });\n window.dataLayer.push({\n 'event': 'view_item_list',\n 'ecommerce': {\n 'items': items\n }\n });\n }\n /**\n *\n * @param product\n * @param index\n * @param listType\n */\n addSelectItem(product, index, listType) {\n SolarDataLayer.resetDataLayer();\n let items = [];\n const productData = {\n 'item_list_id': listType.replace(/ /g, '_').toLowerCase(),\n 'item_list_name': listType,\n 'index': index,\n };\n items.push(Object.assign({}, productData, SolarDataLayer.defaultProductInformation(product)));\n window.dataLayer.push({\n 'event': 'select_item',\n 'ecommerce': {\n 'currency': SolarDataLayer.currency,\n 'items': items\n }\n });\n }\n /**\n *\n * @param product\n */\n addViewItem(product) {\n SolarDataLayer.resetDataLayer();\n let extraOptions = {};\n if (product['product_type'] === 'bundle' && Object.prototype.hasOwnProperty.call(product, 'bundle_options')) {\n let items = [];\n product['bundle_options'].forEach((bundleProduct) => {\n items.push(SolarDataLayer.defaultProductInformation(bundleProduct));\n });\n extraOptions = {\n productType: 'bundle',\n bundleItems: items\n };\n }\n window.dataLayer.push({\n 'event': 'view_item',\n 'ecommerce': {\n 'currency': SolarDataLayer.currency,\n 'items': [Object.assign(Object.assign({}, SolarDataLayer.defaultProductInformation(product)), extraOptions)]\n }\n });\n }\n /**\n * Add or remove items from cart\n *\n * @param product\n * @param event\n * @param qty\n * @param cartValue\n */\n addAddToCart(product, event = CartEvents.ADD, qty = 1, cartValue = 0) {\n SolarDataLayer.resetDataLayer();\n let items = [];\n const productData = {\n 'quantity': qty,\n };\n if (event === CartEvents.ADD) {\n items.push(Object.assign({}, productData, SolarDataLayer.defaultProductInformation(product)));\n }\n else {\n items.push(Object.assign({}, productData, SolarDataLayer.quoteProductInformation(product)));\n }\n window.dataLayer.push({\n 'event': event,\n 'ecommerce': {\n 'currency': SolarDataLayer.currency,\n 'value': cartValue > 0 ? SolarDataLayer.formatPrice(cartValue) : null,\n 'items': items\n }\n });\n }\n /**\n *\n * Add or remove items from wishlist\n *\n * @param product\n * @param event\n */\n addAddToWishlist(product, event = WishlistEvents.ADD) {\n SolarDataLayer.resetDataLayer();\n window.dataLayer.push({\n 'event': event,\n 'ecommerce': {\n 'items': SolarDataLayer.defaultProductInformation(product)\n }\n });\n }\n /**\n *\n * @param products\n * @param cartValue\n * @param couponCode\n */\n addViewCart(products, cartValue, couponCode = '') {\n SolarDataLayer.resetDataLayer();\n let items = [];\n products.forEach((product, index) => {\n const productData = {\n 'index': index,\n 'coupon': couponCode\n };\n items.push(Object.assign({}, productData, SolarDataLayer.quoteProductInformation(product)));\n });\n window.dataLayer.push({\n 'event': 'view_cart',\n 'ecommerce': {\n 'currency': SolarDataLayer.currency,\n 'value': SolarDataLayer.formatPrice(cartValue),\n 'items': items\n }\n });\n }\n /**\n *\n * @param products\n * @param cartValue\n * @param couponCode\n */\n addBeginCheckout(products, cartValue, couponCode = '') {\n SolarDataLayer.resetDataLayer();\n let items = [];\n products.forEach((product, index) => {\n const productData = {\n 'index': index,\n 'coupon': couponCode\n };\n items.push(Object.assign({}, productData, SolarDataLayer.quoteProductInformation(product)));\n });\n window.dataLayer.push({\n 'event': 'begin_checkout',\n 'ecommerce': {\n 'currency': SolarDataLayer.currency,\n 'value': SolarDataLayer.formatPrice(cartValue),\n 'items': items\n }\n });\n }\n /**\n *\n * @param products\n * @param cartValue\n * @param shippingTier\n * @param couponCode\n */\n addAddShippingInfo(products, cartValue, shippingTier = '', couponCode = '') {\n SolarDataLayer.resetDataLayer();\n let items = [];\n products.forEach((product, index) => {\n const productData = {\n 'index': index,\n 'coupon': couponCode\n };\n items.push(Object.assign({}, productData, SolarDataLayer.quoteProductInformation(product)));\n });\n window.dataLayer.push({\n 'event': 'add_shipping_info',\n 'ecommerce': {\n 'currency': SolarDataLayer.currency,\n 'value': SolarDataLayer.formatPrice(cartValue),\n 'coupon': couponCode,\n 'shipping_tier': shippingTier,\n 'items': items\n }\n });\n }\n /**\n *\n * @param products\n * @param cartValue\n * @param paymentType\n * @param couponCode\n */\n addAddPaymentInfo(products, cartValue, paymentType = '', couponCode = '') {\n SolarDataLayer.resetDataLayer();\n let items = [];\n products.forEach((product, index) => {\n const productData = {\n 'index': index,\n 'coupon': couponCode\n };\n items.push(Object.assign({}, productData, SolarDataLayer.quoteProductInformation(product)));\n });\n window.dataLayer.push({\n 'event': 'add_payment_info',\n 'ecommerce': {\n 'currency': SolarDataLayer.currency,\n 'value': SolarDataLayer.formatPrice(cartValue),\n 'coupon': couponCode,\n 'payment_type': paymentType,\n 'items': items\n }\n });\n }\n /**\n *\n * @param products\n * @param transactionId\n * @param affiliation\n * @param cartValue\n * @param tax\n * @param shipping\n * @param couponCode\n */\n addPurchase(products, transactionId, affiliation = '', cartValue, tax, shipping, couponCode = '') {\n SolarDataLayer.resetDataLayer();\n let items = [];\n products.forEach((product, index) => {\n const productData = {\n 'index': index,\n 'coupon': couponCode,\n 'affiliation': affiliation\n };\n items.push(Object.assign({}, productData, SolarDataLayer.quoteProductInformation(product)));\n });\n window.dataLayer.push({\n 'event': 'purchase',\n 'ecommerce': {\n 'transaction_id': transactionId,\n 'affiliation': affiliation,\n 'value': SolarDataLayer.formatPrice(cartValue),\n 'tax': SolarDataLayer.formatPrice(tax),\n 'shipping': SolarDataLayer.formatPrice(shipping),\n 'currency': SolarDataLayer.currency,\n 'coupon': couponCode,\n 'items': items\n }\n });\n }\n}\nexports.SolarDataLayer = SolarDataLayer;\nSolarDataLayer.currency = 'EUR';\nSolarDataLayer.config = {\n 'item_id': 'product_id',\n 'item_group_id': 'item_group_id',\n 'item_name': 'name',\n 'item_variant_id': '',\n 'item_brand': 'manufacturer',\n 'item_categories': 'category_names',\n 'item_variant': '',\n 'price': 'final_price_incl_tax',\n 'old_price': 'price_incl_tax',\n};\n/**\n * Product list used to store list items for observable implementation\n *\n * @protected\n */\nSolarDataLayer.productList = [];\n/**\n * listType used to store the list type for observable implementation\n *\n * @protected\n */\nSolarDataLayer.listType = '';\n/**\n * Default config for observable item list\n *\n * @protected\n */\nSolarDataLayer.observableConfig = {\n 'listSelector': 'impressions-observable',\n 'itemsPerRowDesktop': 4,\n 'itemsPerRowMobile': 2\n};\n/**\n *\n * @protected\n */\nSolarDataLayer.isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n","\nimport {Component, Vue, Prop} from 'vue-property-decorator';\nimport ServiceContainer from '@flashpointbv/solar-service-container';\nimport {SolarDataLayer} from '@flashpointbv/solar-datalayer/dist';\n\n@Component({\n name: 'catalog-product-list',\n components: ServiceContainer().getComponents(),\n})\n\nexport default class extends Vue {\n @Prop({required: true}) readonly dataSource: string;\n @Prop({default: 6}) readonly chunkSize: number;\n @Prop({default: () => []}) readonly wishlistItems: Array;\n\n private get isLoading(): boolean {\n return this.$store.getters[`${this.dataSource}/isLoading`];\n }\n\n private get products(): Array {\n return this.$store.getters[`${this.dataSource}/productList`];\n }\n\n private get productChunks(): Array {\n return Array.from({length: Math.ceil(this.products.length / this.chunkSize)}, (v, i) => this.products.slice(i * this.chunkSize, i * this.chunkSize + this.chunkSize));\n }\n\n private created(): void {\n SolarDataLayer.init().addViewItemsList(this.products, 'Product list');\n }\n}\n","import { render, staticRenderFns } from \"./ProductList.vue?vue&type=template&id=97eade56&\"\nimport script from \"./ProductList.vue?vue&type=script&lang=ts&\"\nexport * from \"./ProductList.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../../../../../node_modules/ts-loader/index.js??clonedRuleSet-6.use[0]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ProductList.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../../../../node_modules/ts-loader/index.js??clonedRuleSet-6.use[0]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ProductList.vue?vue&type=script&lang=ts&\"","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{staticClass:\"catalog__category-list\"},[(_vm.isLoading)?_c('div',{staticClass:\"--loading\"}):_vm._e(),_vm._v(\" \"),(_vm.products.length <= 0 && ! _vm.isLoading)?_c('div',{staticClass:\"global__message--bg --warning --full-width --margin\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('No products were found in this category.'))+\"\\n \")]):_vm._e(),_vm._v(\" \"),_vm._l((_vm.productChunks),function(chunk){return _c('ul',{staticClass:\"grid-x grid-padding-x\"},_vm._l((chunk),function(product){return _c('catalog-product-list-item',{key:product['id'],attrs:{\"data-source\":_vm.dataSource,\"product\":product,\"wishlist-items\":_vm.wishlistItems}})}),1)})],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }"],"names":["CartEvents","WishlistEvents","Object","defineProperty","exports","value","SolarDataLayer","constructor","this","dataLayer","window","static","config","currency","instance","assign","push","price","parseFloat","multiplier","Math","pow","round","categories","position","oldPrice","product","productData","dataLayerValue","formatPrice","getSalePrice","categoryData","i","resolveCategory","prototype","hasOwnProperty","call","categoryItemsRaw","categoryItems","JSON","parse","addObservableViewItemsList","products","listType","observableConfig","productList","observer","IntersectionObserver","addViewItemsListEntries","root","rootMargin","threshold","rootElement","document","getElementById","itemsPerRow","isMobile","observeTargets","querySelectorAll","length","observe","entries","productsClone","map","entry","isIntersecting","target","hasAttribute","itemIndex","parseInt","getAttribute","init","addViewItemsList","slice","unobserve","index","filter","e","resetDataLayer","items","forEach","replace","toLowerCase","defaultProductInformation","addSelectItem","addViewItem","extraOptions","bundleProduct","productType","bundleItems","addAddToCart","event","ADD","qty","cartValue","quoteProductInformation","addAddToWishlist","addViewCart","couponCode","addBeginCheckout","addAddShippingInfo","shippingTier","addAddPaymentInfo","paymentType","addPurchase","transactionId","affiliation","tax","shipping","test","navigator","userAgent","Vue","isLoading","$store","getters","dataSource","productChunks","Array","from","ceil","chunkSize","v","created","Prop","required","default","Component","name","components","getComponents","render","_vm","_c","_self","_setupProxy","staticClass","_e","_v","_s","$t","_l","chunk","key","attrs","wishlistItems","staticRenderFns"],"sourceRoot":""}