{"version":3,"sources":["webpack:///./src/views/Cart.vue?1d1e","webpack:///./src/views/Cart.vue?c100","webpack:///./src/views/Cart.vue?ce14","webpack:///./src/views/Cart.vue?5d9c","webpack:///./src/components/CheckoutItem.vue?58f4","webpack:///./src/components/CheckoutItem.vue","webpack:///./src/components/CheckoutItem.vue?132e","webpack:///./src/components/CheckoutItem.vue?2bf3","webpack:///./src/views/Cart.vue?a58c"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","_v","cartContents","orderItems","length","windowRef","shopId","_l","item","index","orderInfo","lines","key","attrs","isCartFullComputed","_e","staticStyle","_m","stock","_s","materialText","beforeOrder","afterOrder","undefined","inOrder","formatCurrency","totalDisplayPrice","on","$event","location","href","origin","name","staticRenderFns","components","CheckoutItem","setup","window","newval","items","forEach","orderLine","push","item_id","presetId","item_name","title","quantity","price","itemDisplayPrice","affiliation","dataLayer","event","ecommerce","currency","dispatch","shippingMethodId","value","getters","component","imageData","data","staticImageUri","preventDefault","editConfiguration","locked","class","updateQuantityOfCartItem","isCartFull","removeItemFromCart","ringConfiguration","width","thickness","size","ringDetails","valuePairs","valuePair","lineDisplayPrice","props","type","Object","required","Boolean","default","String","enums","updateDataLayer","Math","abs","id","newQuantity","url","originalPathName","getEnums"],"mappings":"gJAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACA,EAAG,KAAK,CAACE,YAAY,2BAA2B,CAACN,EAAIO,GAAG,oBAC5JP,EAAIQ,cACJR,EAAIQ,aAAaC,YACjBT,EAAIQ,aAAaC,WAAWC,QAC5BV,EAAIW,WACJX,EAAIW,UAAUC,OACd,CAACZ,EAAIa,GAAIb,EAAIQ,aAAuB,YAAE,SAASM,EAAKC,GAAO,MAAO,CAC9Df,EAAIQ,aAAaQ,UAAUC,OAC3BjB,EAAIQ,aAAaQ,UAAUC,MAAMF,IACjCf,EAAIW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,OAAOc,WAAa,GACnCJ,GAAY,EACdV,OAAOc,UAAUT,KAAK,CACpBU,MAAO,cACPC,UAAW,CACTC,SAAU,MACVf,MAAO,CACL,CACEI,QAASnC,EAAKoC,SACdC,UAAWC,EACXC,WACAC,QACAE,YAAa,eAAe4B,EAAMxE,QAAU,SAMpD+B,OAAOc,UAAUT,KAAK,CACpBU,MAAO,mBACPC,UAAW,CACTC,SAAU,MACVf,MAAO,CACL,CACEI,QAASnC,EAAKoC,SACdC,UAAWC,EACXC,SAAUwC,KAAKC,IAAIzC,GACnBC,QACAE,YAAa,eAAe4B,EAAMxE,QAAU,SAQxD,SAAS+D,EAAmB7D,EAAyBsC,EAAeE,GAClEsC,EAAgB9E,GAAOA,EAAKuC,SAAUD,EAAOE,GAC7C,OAAMO,SAAS,sBAAuB/C,EAAKiF,IAG7C,SAAStB,EACP3D,EACAuC,EACAD,EACAE,GAEA,IAAM0C,EAAclF,EAAKuC,SAAWA,EAChC2C,EAAc,EAChBrB,EAAmB7D,EAAMsC,EAAOE,IAGlC,OAAMO,SAAS,0BAA2B,CACxCkC,GAAIjF,EAAKiF,GACT1C,SAAU2C,IAGZJ,EAAgB9E,EAAMuC,EAAUD,EAAOE,IAGzC,SAASgB,EAAkBxD,GACzB,IAAMmF,EAAM,GAAH,OAAMnF,EAAKoF,iBAAX,mBAAsCpF,EAAKiF,IACpDpD,OAAOR,SAASC,KAAO6D,EAGzB,OA3EA,gBAAU,WACRN,EAAM5B,MAAQ,OAAMC,QAAQmC,YA0EvB,CACLR,QACA5D,eAAA,OACA4C,qBACAF,2BACAH,wBC/WiY,I,YCOnYL,EAAY,eACd,EACAlE,EACAwC,GACA,EACA,KACA,KACA,MAIa,OAAA0B,E,2CClBf","file":"js/chunk-3f0532d0.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('h1',{staticClass:\"title--preset-4 spacing\"},[_vm._v(\"1. Winkelwagen\")]),(\n _vm.cartContents &&\n _vm.cartContents.orderItems &&\n _vm.cartContents.orderItems.length &&\n _vm.windowRef &&\n _vm.windowRef.shopId\n )?[_vm._l((_vm.cartContents.orderItems),function(item,index){return [(\n _vm.cartContents.orderInfo.lines &&\n _vm.cartContents.orderInfo.lines[index] &&\n _vm.windowRef &&\n _vm.windowRef.shopId\n )?_c('CheckoutItem',{key:(\"checkout_item_\" + index),attrs:{\"item\":item,\"data\":_vm.cartContents.orderInfo.lines[index],\"shop-id\":_vm.windowRef.shopId,\"is-cart-full\":_vm.isCartFullComputed}}):_vm._e()]}),(_vm.cartContents.orderInfo.paysWithStock)?_c('div',{staticClass:\"flex py-2 justify-end text-xs pr-5 border border-solid border-grey-200 bg-grey-100 rounded-sm\"},[_c('table',{staticStyle:{\"min-width\":\"500px\"}},[_vm._m(0),_vm._l((_vm.cartContents.orderInfo.stock),function(stock,index){return _c('tr',{key:(\"stock_\" + index)},[_c('td',{staticClass:\"text-right\"},[_vm._v(\" \"+_vm._s(stock.materialText)+\" \")]),_c('td',{staticClass:\"text-right\"},[_vm._v(\" \"+_vm._s(stock.beforeOrder)+\" \")]),_c('td',{staticClass:\"text-right\"},[_vm._v(\" \"+_vm._s(stock.afterOrder)+\" \")]),_c('td',{staticClass:\"text-right\"},[_vm._v(\" \"+_vm._s(stock.inOrder != undefined && stock.inOrder > 0 ? (\"-\" + (stock.inOrder)) : \"\")+\" \")])])})],2)]):_vm._e(),_c('div',{staticClass:\"flex py-2 justify-end text-lg pr-5 border border-solid border-grey-200 bg-grey-100 rounded-sm\"},[_c('table',[_c('tr',[_c('td',{staticClass:\"text-brand-1 pr-5 text-right\"},[_vm._v(\"Totaal\")]),_c('td',{staticClass:\"text-right\"},[_vm._v(\" \"+_vm._s(_vm.formatCurrency(_vm.cartContents.orderInfo.totalDisplayPrice || 0))+\" \")])])])]),_c('div',{staticClass:\"flex justify-between items-center py-5\"},[(!_vm.isCartFullComputed)?_c('a',{staticClass:\"text-grey-500 hover:underline\",on:{\"click\":function($event){_vm.windowRef.location.href = _vm.windowRef.location.origin}}},[_vm._v(\"Nog een ring toevoegen\")]):_c('span'),_c('router-link',{staticClass:\"inline-block rounded-sm border-0 bg-brand-1 text-white text-center px-5 py-2\",attrs:{\"to\":{ name: 'delivery' }}},[_vm._v(\" Volgende stap \")])],1)]:_c('div',{staticClass:\"mb-5 p-5 border border border-solid border-grey-200 bg-grey-100\"},[_c('p',[_vm._v(\" Je winkelwagen is leeg, ga naar het \"),_c('a',{staticClass:\"text-brand-1 underline\",on:{\"click\":function($event){_vm.windowRef.location.href = _vm.windowRef.location.origin}}},[_vm._v(\"overzicht\")]),_vm._v(\" kies een ring en begin met configureren. \")])])],2)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('tr',[_c('td',{staticClass:\"text-brand-1 text-right\"},[_vm._v(\"Materiaal\")]),_c('td',{staticClass:\"text-brand-1 text-right\"},[_vm._v(\"Voor (g)\")]),_c('td',{staticClass:\"text-brand-1 text-right\"},[_vm._v(\"Na (g)\")]),_c('td',{staticClass:\"text-brand-1 text-right\"},[_vm._v(\"Verandering (g)\")])])}]\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport { computed, defineComponent, onMounted, ref, watch } from \"@vue/composition-api\";\r\nimport { formatCurrency } from \"@/util/currency\";\r\nimport Store from \"@/store\";\r\nimport CheckoutItem from \"@/components/CheckoutItem.vue\";\r\nimport { CheckoutState } from \"@/store/modules/cart/types\";\r\nimport getAffiliation from \"@/util/affiliation\";\r\nimport IDataLayerItem from \"@/util/dataLayer\";\r\nimport Shops from \"@/enums/Shops\";\r\nimport isCartFull from \"@/util/cart\";\r\n\r\n// eslint-disable-next-line no-undef\r\ninterface ExtendedWindow extends Window {\r\n shopId?: string;\r\n}\r\n\r\nexport default defineComponent({\r\n components: {\r\n CheckoutItem,\r\n },\r\n setup() {\r\n const cartContents = ref<CheckoutState | null>(null);\r\n // eslint-disable-next-line no-undef\r\n const windowRef: ExtendedWindow = window || {};\r\n\r\n watch(cartContents, (newval) => {\r\n const items: IDataLayerItem[] = [];\r\n if (newval && newval.orderItems)\r\n newval.orderItems.forEach((item, index: number) => {\r\n if (newval.orderInfo.lines) {\r\n const orderLine = newval.orderInfo.lines[index];\r\n if (orderLine) {\r\n items.push({\r\n item_id: item.presetId,\r\n item_name: orderLine.title ?? \"\",\r\n quantity: item.quantity,\r\n price: orderLine.itemDisplayPrice,\r\n affiliation: getAffiliation(windowRef.shopId || \"\"),\r\n });\r\n }\r\n }\r\n });\r\n window.dataLayer = window.dataLayer || [];\r\n window.dataLayer.push({\r\n event: \"view_cart\",\r\n ecommerce: {\r\n currency: \"EUR\",\r\n items,\r\n },\r\n });\r\n });\r\n\r\n const isCartFullComputed = computed(isCartFull);\r\n\r\n onMounted(() => {\r\n // Update order information, reset shippingMethod\r\n Store.dispatch(\"Checkout/updateOrderInformation\", {\r\n shippingMethodId: null,\r\n });\r\n\r\n // Get the cart contents from the store\r\n cartContents.value = Store.getters[\"Checkout/getCheckout\"];\r\n });\r\n\r\n return {\r\n cartContents,\r\n formatCurrency,\r\n windowRef,\r\n isCartFullComputed,\r\n };\r\n },\r\n});\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--15-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Cart.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--15-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Cart.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./Cart.vue?vue&type=template&id=58128070&scoped=true&\"\nimport script from \"./Cart.vue?vue&type=script&lang=ts&\"\nexport * from \"./Cart.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./Cart.vue?vue&type=style&index=0&id=58128070&scoped=true&lang=css&\"\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 \"58128070\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"flex border border-solid border-grey mb-5\"},[_c('div',{staticClass:\"flex-initial pl-4 pt-4 pr-2\"},[(_vm.item.imageData)?_c('img',{attrs:{\"width\":\"75\",\"src\":_vm.item.imageData}}):_c('img',{attrs:{\"width\":\"75\",\"src\":_vm.data.staticImageUri}})]),_c('div',{staticClass:\"flex-auto py-2 pl-2 pr-4\"},[_c('div',{staticClass:\"flex justify-between mb-3 border-b border-solid border-grey-500\"},[_c('span',{staticClass:\"text-lg\"},[_vm._v(_vm._s(_vm.data.title))]),(_vm.item.originalPathName)?_c('a',{staticClass:\"button button--preset-2 mb-2\",attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();return _vm.editConfiguration(_vm.item)}}},[_c('span',{staticClass:\"icon icon--pen\"},[_c('svg',{attrs:{\"viewBox\":\"0 0 26 26\",\"fill\":\"none\",\"xmlns\":\"http://www.w3.org/2000/svg\"}},[_c('path',{attrs:{\"d\":\"M19.5156 2.875L16.9844 5.45312L20.5469 9.01562L23.125 6.48438C23.5469 6.01562 23.5469 5.3125 23.125 4.89062L21.1094 2.875C20.6875 2.45312 19.9844 2.45312 19.5156 2.875ZM15.9062 6.48438L5.64062 16.75H6.25C6.625 16.75 7 17.125 7 17.5V19H8.5C8.875 19 9.25 19.375 9.25 19.75V20.3594L19.5156 10.0938L15.9062 6.48438ZM4.09375 18.8125L2.82812 23.1719L7.1875 21.9062C7.375 21.8125 7.5625 21.7656 7.75 21.6719V20.5H6.25C5.82812 20.5 5.5 20.1719 5.5 19.75V18.25H4.32812C4.23438 18.4375 4.1875 18.625 4.09375 18.8125ZM22.1875 1.79688L24.2031 3.8125C25.1875 4.84375 25.1875 6.48438 24.2031 7.51562L9.53125 22.1875C8.96875 22.7031 8.3125 23.125 7.60938 23.3125L1.9375 25C1.65625 25.0469 1.375 25 1.1875 24.8125C1 24.625 0.953125 24.3438 1 24.0625L2.6875 18.3906C2.875 17.6875 3.29688 17.0312 3.8125 16.4688L18.4844 1.79688C19.5156 0.8125 21.1562 0.8125 22.1875 1.79688ZM16.5156 10.5156L10.5156 16.5156C10.2344 16.7969 9.71875 16.7969 9.4375 16.5156C9.15625 16.2344 9.15625 15.7656 9.4375 15.4844L15.4375 9.48438C15.7188 9.15625 16.2344 9.15625 16.5156 9.48438C16.7969 9.76562 16.7969 10.2344 16.5156 10.5156Z\",\"fill\":\"currentColor\"}})])]),_c('span',[_vm._v(\"Ring aanpassen\")])]):_vm._e()]),_c('div',{staticClass:\"flex flex-wrap md:flex-no-wrap\"},[_c('div',{staticClass:\"w-full md:w-auto md:flex-auto\"},[_c('table',[_c('tr',[_c('td',{staticClass:\"text-brand-1 pr-5 w-1/2 md:w-auto\"},[_vm._v(\"Aantal\")]),_c('td',[(!_vm.locked)?_c('div',{staticClass:\"inline-block p-1 border border-solid border-grey-300 rounded-sm whitespace-no-wrap\"},[_c('span',{staticClass:\"inline-block w-8 mr-1 text-center\"},[_vm._v(\" \"+_vm._s(_vm.item.quantity)+\" \")]),_c('a',{staticClass:\"inline-block border-0 bg-grey-700 hover:bg-grey-600 rounded-sm w-6 h-6 text-white text-center mr-1\",class:{ 'opacity-50 cursor-not-allowed': _vm.item.quantity <= 1 },attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();_vm.item.quantity <= 1 ? null :\n _vm.updateQuantityOfCartItem(_vm.item, -1, _vm.data.title, _vm.data.itemDisplayPrice)}}},[_c('span',{staticClass:\"relative\",staticStyle:{\"top\":\"-1px\"}},[_vm._v(\"–\")])]),_c('a',{staticClass:\"inline-block border-0 bg-grey-700 hover:bg-grey-600 rounded-sm w-6 h-6 text-white text-center\",class:{ 'opacity-50 cursor-not-allowed': _vm.isCartFull },attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();_vm.isCartFull ? null :\n _vm.updateQuantityOfCartItem(_vm.item, 1, _vm.data.title, _vm.data.itemDisplayPrice)}}},[_c('span',{staticClass:\"relative\",staticStyle:{\"top\":\"-1px\"}},[_vm._v(\"+\")])]),_c('a',{attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();return _vm.removeItemFromCart(_vm.item, _vm.data.title, _vm.data.itemDisplayPrice)}}},[_vm._v(\" Verwijderen \")])]):_c('span',[_vm._v(_vm._s(_vm.item.quantity))])])]),_c('tr',[_c('td',{staticClass:\"text-brand-1 pr-5\"},[_vm._v(\"Breedte\")]),_c('td',[_vm._v(_vm._s(_vm.data.ringConfiguration.width)+\" mm\")])]),_c('tr',[_c('td',{staticClass:\"text-brand-1 pr-5\"},[_vm._v(\"Dikte\")]),_c('td',[_vm._v(_vm._s(_vm.data.ringConfiguration.thickness)+\" mm\")])]),_c('tr',[_c('td',{staticClass:\"text-brand-1 pr-5\"},[_vm._v(\"Ringmaat\")]),_c('td',[_vm._v(_vm._s(_vm.data.ringConfiguration.size))])]),_c('div',{staticClass:\"mb-2\"}),_vm._l((_vm.data.ringDetails),function(ringDetails,index){return _c('tr',{key:index},[(ringDetails.valuePairs.length)?[_c('td',{staticClass:\"text-brand-1 pr-5\",attrs:{\"valign\":\"top\"}},[(index !== 0)?_c('span',[_vm._v(\" \"+_vm._s(ringDetails.title)+\" \")]):_vm._e()]),_c('td',[_vm._l((ringDetails.valuePairs),function(valuePair,index){return _c('div',{key:index},[_vm._v(\" \"+_vm._s(valuePair.name)+\" \"),(valuePair.value)?_c('span',[_vm._v(\" \"+_vm._s(valuePair.value)+\" \")]):_c('span',[_vm._v(\"-\")])])}),_c('div',{staticClass:\"mb-2\"})],2)]:_vm._e()],2)})],2)]),_c('div',{staticClass:\"w-full md:w-auto md:flex-initial\"},[_c('table',{staticClass:\"w-full\"},[_c('tr',[_c('td',{staticClass:\"text-brand-1 pr-5 w-1/2 md:w-auto\"},[_vm._v(\"Prijs p/s\")]),_c('td',{staticClass:\"md:text-right\"},[_vm._v(\" \"+_vm._s(_vm.formatCurrency(_vm.data.itemDisplayPrice))+\" \")])]),_c('tr',[_c('td',{staticClass:\"text-brand-1 pr-5\"},[_vm._v(\"Totaal\")]),_c('td',{staticClass:\"md:text-right\"},[_vm._v(\" \"+_vm._s(_vm.formatCurrency(_vm.data.lineDisplayPrice))+\" \")])])])])])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport { PropType, defineComponent, onMounted, ref } from \"@vue/composition-api\";\r\n\r\nimport { CheckoutOrderItem } from \"@/store/modules/cart/types\";\r\n\r\nimport Store from \"@/store\";\r\n\r\nimport { formatCurrency } from \"@/util/currency\";\r\nimport getAffiliation from \"@/util/affiliation\";\r\n\r\nexport default defineComponent({\r\n props: {\r\n item: {\r\n type: Object as PropType<CheckoutOrderItem>,\r\n required: true,\r\n },\r\n data: {\r\n type: Object,\r\n required: true,\r\n },\r\n locked: {\r\n type: Boolean,\r\n required: false,\r\n default: false,\r\n },\r\n isCartFull: {\r\n type: Boolean,\r\n required: false,\r\n default: false,\r\n },\r\n shopId: String,\r\n },\r\n name: \"CheckoutItem\",\r\n setup(props) {\r\n const enums = ref({});\r\n\r\n onMounted(() => {\r\n enums.value = Store.getters.getEnums;\r\n });\r\n\r\n function updateDataLayer(\r\n item: CheckoutOrderItem,\r\n quantity: number,\r\n title: string,\r\n price: number\r\n ) {\r\n window.dataLayer = window.dataLayer || [];\r\n if (quantity >= 1) {\r\n window.dataLayer.push({\r\n event: \"add_to_cart\",\r\n ecommerce: {\r\n currency: \"EUR\",\r\n items: [\r\n {\r\n item_id: item.presetId,\r\n item_name: title,\r\n quantity,\r\n price,\r\n affiliation: getAffiliation(props.shopId || \"\"),\r\n },\r\n ],\r\n },\r\n });\r\n } else {\r\n window.dataLayer.push({\r\n event: \"remove_from_cart\",\r\n ecommerce: {\r\n currency: \"EUR\",\r\n items: [\r\n {\r\n item_id: item.presetId,\r\n item_name: title,\r\n quantity: Math.abs(quantity),\r\n price,\r\n affiliation: getAffiliation(props.shopId || \"\"),\r\n },\r\n ],\r\n },\r\n });\r\n }\r\n }\r\n\r\n function removeItemFromCart(item: CheckoutOrderItem, title: string, price: number) {\r\n updateDataLayer(item, -item.quantity, title, price);\r\n Store.dispatch(\"Checkout/deleteItem\", item.id);\r\n }\r\n\r\n function updateQuantityOfCartItem(\r\n item: CheckoutOrderItem,\r\n quantity: number,\r\n title: string,\r\n price: number\r\n ) {\r\n const newQuantity = item.quantity + quantity;\r\n if (newQuantity < 1) {\r\n removeItemFromCart(item, title, price);\r\n return;\r\n }\r\n Store.dispatch(\"Checkout/updateQuantity\", {\r\n id: item.id,\r\n quantity: newQuantity,\r\n });\r\n\r\n updateDataLayer(item, quantity, title, price);\r\n }\r\n\r\n function editConfiguration(item: CheckoutOrderItem) {\r\n const url = `${item.originalPathName}?cartId=${item.id}`;\r\n window.location.href = url;\r\n }\r\n\r\n return {\r\n enums,\r\n formatCurrency,\r\n removeItemFromCart,\r\n updateQuantityOfCartItem,\r\n editConfiguration,\r\n };\r\n },\r\n});\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--15-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CheckoutItem.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--15-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CheckoutItem.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./CheckoutItem.vue?vue&type=template&id=7ca04adc&\"\nimport script from \"./CheckoutItem.vue?vue&type=script&lang=ts&\"\nexport * from \"./CheckoutItem.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","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Cart.vue?vue&type=style&index=0&id=58128070&scoped=true&lang=css&\""],"sourceRoot":""}