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AAG,CAAC,MAAQ,SAASC,GAAyD,OAAjDA,EAAOC,iBAAiBD,EAAOE,kBAAyBd,EAAI9D,kBAAkB,IAAI,CAAC8D,EAAIM,GAAG,iBAAiBN,EAAI2B,GAAG3B,EAAI6B,GAAG,oBAAoB,kBAAkB7B,EAAIM,GAAG,KAAKL,EAAG,aAAa,CAACI,MAAM,CAAC,KAAO,SAAS,CAACJ,EAAG,MAAM,CAACc,WAAW,CAAC,CAAClB,KAAK,OAAOmB,QAAQ,SAAS3E,MAAO2D,EAAe,YAAEiB,WAAW,gBAAgBb,YAAY,4BAA4B,CAACJ,EAAIM,GAAG,mBAAmBN,EAAI2B,GAAG3B,EAAI6B,GAAG,oDAAoD,uBAAuB,SAAS7B,EAAIM,GAAG,KAAKL,EAAG,SAAS,CAAC+B,IAAI,iBAAiB3B,MAAM,CAAC,cAAc,yBAAyBL,EAAIM,GAAG,KAAKL,EAAG,uCAAuC,CAACI,MAAM,CAAC,qBAAqBL,EAAIxH,uBAAuB,EAC1nI,EACIyJ,EAAkB,E","sources":["webpack:///./resources/area/web/default/js/components/catalog/product/team-wear/Index.vue?200c","webpack:///./resources/area/web/default/js/components/catalog/product/team-wear/Index.vue?d310","webpack:///./resources/area/web/default/js/components/catalog/product/team-wear/Index.vue?22bb","webpack:///./resources/area/web/default/js/components/catalog/product/team-wear/Index.vue?616e"],"sourcesContent":["\nimport {Component, Vue, Prop} from 'vue-property-decorator';\nimport Environment from \"@flashpointbv/solar-ui-environment\";\nimport {CartEvents, SolarDataLayer} from '@flashpointbv/solar-datalayer/dist';\n\n@Component({\n name: 'catalog-product-team-wear-index',\n components: {\n 'catalog-product-team-wear-product': () => import(/* webpackChunkName: \"catalog-product-team-wear-product\" */ './Product.vue'),\n 'catalog-product-team-wear-player': () => import(/* webpackChunkName: \"catalog-product-team-wear-player\" */ './Player.vue'),\n 'catalog-product-price': () => import(/* webpackChunkName: \"catalog-product-price\" */ '../ProductPrice.vue'),\n 'catalog-product-team-wear-off-canvas': () => import(/* webpackChunkName: \"catalog-product-team-wear-off-canvas\" */ './OffCanvas.vue'),\n }\n})\n\nexport default class extends Vue {\n $refs!: {\n addToCartPopup: HTMLElement;\n }\n\n @Prop({required: true}) productData: object;\n @Prop({required: true}) bundleProducts: Array;\n @Prop({default: null}) private readonly bundleSizeCharts: null | object;\n @Prop({default: null}) private readonly sizeChartInformation: null | object;\n\n private headerSlider = null;\n private _throttle: number;\n private showTooltip: boolean = false;\n\n private playerQty: number = 1;\n\n private get maxPlayers(): number {\n return this.$store.getters['CatalogProductTeamWearView/getMaxPlayers'];\n }\n\n private get playerCount(): number {\n return this.$store.getters['CatalogProductTeamWearView/getPlayerCount'];\n }\n\n private get canAddPlayers(): boolean {\n return this.teamWearPlayersPayloadCount < this.maxPlayers && this.playerQty <= this.maxPlayers - this.teamWearPlayersPayloadCount && this.playerQty > 0;\n }\n\n private get teamWearPlayers(): object {\n return this.$store.getters['CatalogProductTeamWearView/getTeamWearPlayers'];\n }\n\n private get price(): object {\n const totalPrices = this.$store.getters['CatalogBundleProduct/totalPrices'] || {};\n const customOptionPrices = this.$store.getters['CatalogProductPersonalisation/getTotalPersonalisationPrice'] || 0;\n\n return Object.fromEntries(Object.entries(totalPrices || {}).map(([k, v]) => {\n return [k, v + customOptionPrices];\n }));\n }\n\n private get productType(): string {\n return this.productData['product_type'];\n }\n\n private get teamWearProductIds(): Array {\n return this.productType === 'bundle' ? this.productData['bundle_product_ids'] : [this.productData['entity_id']];\n }\n\n private get teamWearProducts(): Array {\n return this.productType === 'bundle' ? this.bundleProducts : [this.productData];\n }\n\n private get isSaleable(): boolean {\n return this.$store.getters['CatalogBundleProduct/isSaleable'];\n }\n\n private get isInStock(): boolean {\n return Boolean(this.productData['status_in_stock']) && Boolean(this.productData['is_in_stock']);\n }\n\n private get addToCartIsLoading(): boolean {\n return this.$store.getters['CatalogProductTeamWearView/getAddToCartLoading'] || false;\n }\n\n private get hasAddToCartError(): boolean {\n return this.$store.state.CheckoutCart['addToCartError'];\n }\n\n private get addToCartErrorMessage(): string {\n return 'Something went wrong, contact us for help.'\n }\n\n private addToCartTooltip(e): void {\n if ( ! this.isSaleable && this.isInStock) {\n if (e.type === 'mouseenter') {\n this.showTooltip = true;\n return;\n }\n\n clearTimeout(this._throttle);\n\n this._throttle = window.setTimeout(() => {\n this.showTooltip = false;\n }, 1000);\n }\n }\n\n private async addTeamWearPlayer(): Promise {\n const highestKey = Object.keys(this.teamWearPlayers).length ?\n Math.max(...Object.keys(this.teamWearPlayers).map(Number)) :\n 0;\n\n if ( ! this.canAddPlayers) {\n return;\n }\n\n for (let i = 0; i < this.playerQty; i++) {\n if ( ! this.productData['dynamic_pricing'] && this.productType !== 'configurable') {\n this.$store.commit('CatalogBundleProduct/SET_BUNDLE_PRICE', {\n bundleId: highestKey + (i + 1),\n prices: {\n priceInclTax: this.productData['price_incl_tax'],\n priceExclTax: this.productData['price_excl_tax'],\n totalPriceInclTax: this.productData['final_price_incl_tax'],\n totalPriceExclTax: this.productData['final_price_excl_tax'],\n }\n });\n } else {\n this.$store.commit('CatalogBundleProduct/SET_BUNDLE_PRICE', {\n bundleId: highestKey + (i + 1),\n prices: null\n });\n }\n\n const bundleOptions = JSON.parse(this.productData['bundle_options_info'] || '[]');\n\n bundleOptions.map((bundleOption: object) => {\n return bundleOption['selections'].map((option: object) => {\n if (option.hasOwnProperty('configurable_options') && option['configurable_options'].length > 0) {\n option['selected_options'] = null;\n }\n return option;\n })\n });\n\n await this.$store.dispatch('CatalogBundleProduct/setBundleData', {\n bundleId: highestKey + (i + 1),\n bundleOptionsInfo: bundleOptions,\n bundleProductIds: this.teamWearProductIds,\n bundleProducts: this.teamWearProducts,\n bundleDiscountAmount: this.productData['bundle_discount_percentage'],\n bundleDiscountPercentage: this.productData['bundle_discount_percentage'],\n });\n\n await this.$store.dispatch('CatalogProductTeamWearView/addTeamWearPlayer', {\n playerId: highestKey + (i + 1),\n bundleProducts: this.teamWearProducts,\n });\n }\n\n this.playerQty = 1;\n this.$eventBus.$emit('slideElements', 0);\n }\n\n private get defaultImage(): null | string {\n return this.productData.hasOwnProperty('default_image') ?\n `${Environment().get('solar_cdn_base_url')}/resize-fit/130/130/media/catalog/product${this.productData['default_image']?.url}` :\n null;\n }\n\n private get bundlePayloads(): object {\n return this.$store.getters['CatalogBundleProduct/getAddToQuotePayload'];\n }\n\n private get customOptionsQuotePayloads(): object {\n return this.$store.getters['CatalogProductPersonalisation/getPersonalisationPayload'];\n }\n\n private get teamWearPlayersPayload(): object {\n return this.$store.getters['CatalogProductTeamWearView/getTeamWearPlayersPayload'];\n }\n\n private get teamWearPlayersPayloadCount(): number {\n return Object.values(this.teamWearPlayersPayload).filter(Boolean).length;\n }\n\n private get showAddToCartBasedOnPayload(): boolean {\n return Object.values(this.teamWearPlayersPayload).some(Boolean);\n }\n\n private get cartTotals(): number {\n return this.$store.getters['CheckoutCart/cartTotals'] ?\n this.$store.getters['CheckoutCart/cartTotals']['grand_total'] :\n 0;\n }\n\n private async productAddToCart(): Promise {\n await this.$store.dispatch('CatalogProductTeamWearView/setAddToCartLoading', true);\n\n const fullAddToCartPayload = [];\n\n for (const [key, value] of Object.entries(this.teamWearPlayersPayload)) {\n if (value) {\n const productPayload = {\n sku: this.productData['sku'],\n qty: 1,\n product_option: {\n extension_attributes: {}\n }\n };\n\n if (this.productData['product_type'] === 'bundle') {\n productPayload.product_option.extension_attributes['bundle_options'] = this.bundlePayloads[key];\n }\n\n if (this.productData['product_type'] === 'configurable') {\n productPayload.product_option.extension_attributes['configurable_item_options'] = this.bundlePayloads[key][0];\n }\n\n if (Object.keys(this.customOptionsQuotePayloads).length) {\n const customOption = this.customOptionsQuotePayloads[key] || {};\n if (this.productData['product_type'] === 'configurable' && customOption.hasOwnProperty(this.productData['product_id'])) {\n productPayload.product_option.extension_attributes['custom_options'] = customOption[this.productData['product_id']];\n }\n\n if (this.productData['product_type'] === 'bundle') {\n productPayload.product_option.extension_attributes['bundle_custom_options'] = Object.entries(customOption).map(([productId, options]) => {\n return {\n product_id: parseInt(productId),\n custom_options: options\n };\n });\n }\n }\n\n fullAddToCartPayload.push(productPayload);\n }\n }\n\n await this.$store.dispatch('CheckoutCart/addBulkProductsToQuote', fullAddToCartPayload);\n\n if (this.hasAddToCartError) {\n await this.$store.dispatch('CatalogProductTeamWearView/setAddToCartLoading', false);\n return;\n }\n\n for (const [key, value] of Object.entries(this.teamWearPlayersPayload)) {\n if (value) {\n await this.$store.dispatch('CatalogProductTeamWearView/setTeamWearPlayersIsOpen', {\n playerId: key,\n isOpen: false\n });\n }\n }\n\n SolarDataLayer.init().addAddToCart({\n ...this.productData,\n 'item_id': this.productData['product_id'],\n 'item_group_id': this.productData['product_id'],\n 'color': this.productData['color'] ? this.productData['color'] + ' - bundel' : 'bundel',\n }, CartEvents.ADD, this.playerCount, this.cartTotals);\n\n this.$refs.addToCartPopup.click();\n await this.updatePlayers();\n await this.$store.dispatch('CatalogProductTeamWearView/setAddToCartLoading', false);\n }\n\n private async updatePlayers(): Promise {\n for (const [key, value] of Object.entries(this.teamWearPlayersPayload)) {\n if (value) {\n await this.$store.dispatch('CatalogProductTeamWearView/removePlayerFromPayload', key);\n }\n }\n }\n\n private async created(): Promise {\n await this.addTeamWearPlayer();\n\n await this.$store.dispatch('CatalogProduct/getProductData', this.productData);\n\n for (const product of this.teamWearProducts) {\n const index: number = this.teamWearProducts.indexOf(product);\n await this.$store.dispatch('CatalogBundleProduct/setBundleSizeCharts', {\n bundleId: index + 1,\n bundleSizeCharts: this.bundleSizeCharts\n });\n }\n\n this.$eventBus.$on('slideElements', (newIndex: number) => {\n this.headerSlider?.slideTo(newIndex);\n });\n }\n\n private mounted(): void {\n const swipeInformationElement = document.querySelector('.swipe__information');\n if ((this.$mobileDetect.mobile() && this.teamWearProducts.length > 1) || this.teamWearProducts.length > 4) {\n swipeInformationElement?.classList.remove('--invisible');\n }\n\n this.$nextTick(() => {\n const el = document.querySelector('.product-header-slider');\n this.headerSlider = new window.BlazeSlider(el, {\n all: {\n slidesToShow: this.teamWearProducts.length > 4 ? 4 : 3,\n loop: false,\n slideGap: '0px',\n },\n '(max-width: 1270px)': {\n slidesToShow: 2,\n },\n '(max-width: 650px)': {\n slidesToShow: 1.1,\n },\n });\n\n const defaultSlidesToShow = this.$mobileDetect.mobile() ?\n this.teamWearProducts.length > 1 ? '1.1' : '1' :\n this.teamWearProducts.length > 4 ? '4' : '3';\n\n (el as HTMLElement).style.setProperty('--slides-to-show', defaultSlidesToShow);\n\n this.headerSlider?.onSlide((newIndex: number) => {\n swipeInformationElement?.classList.add('--invisible');\n this.$store.dispatch('CatalogProductTeamWearView/setActiveIndex', newIndex);\n this.$eventBus.$emit('slideElements', newIndex);\n });\n });\n }\n}\n","import { render, staticRenderFns } from \"./Index.vue?vue&type=template&id=3c05868d&scoped=true&\"\nimport script from \"./Index.vue?vue&type=script&lang=ts&\"\nexport * from \"./Index.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./Index.vue?vue&type=style&index=0&id=3c05868d&prod&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 \"3c05868d\",\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!./Index.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!./Index.vue?vue&type=script&lang=ts&\"","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('section',[_c('div',{staticClass:\"team__wear-product__header\"},[_c('div',[_c('div',{staticClass:\"blaze-slider product-header-slider\"},[_c('div',{staticClass:\"blaze-container\"},[_c('button',{staticClass:\"blaze-prev\",attrs:{\"aria-label\":\"Go to previous slide\"}}),_vm._v(\" \"),_c('div',{staticClass:\"--player__spacer hide-for-small-only\"},[_c('span',[(_vm.defaultImage && _vm.productType === 'bundle')?_c('img',{attrs:{\"src\":_vm.defaultImage,\"alt\":_vm.productData['name'],\"width\":\"130\",\"height\":\"130\"}}):_vm._e()])]),_vm._v(\" \"),_c('div',{staticClass:\"blaze-track-container\"},[_c('div',{staticClass:\"blaze-track\"},_vm._l((_vm.teamWearProductIds),function(productId,index){return _c('div',{key:index},[_c('catalog-product-team-wear-product',{attrs:{\"product\":_vm.teamWearProducts.find(product => product['entity_id'] === productId)}})],1)}),0)]),_vm._v(\" \"),_c('button',{staticClass:\"blaze-next\",attrs:{\"aria-label\":\"Go to next slide\"}})])])])]),_vm._v(\" \"),_c('div',{staticClass:\"team__wear-players\"},_vm._l((_vm.teamWearPlayers),function(products,index){return _c('div',{key:index},[_c('catalog-product-team-wear-player',{attrs:{\"products\":products,\"index\":index,\"product-data\":_vm.productData,\"player-qty\":_vm.playerQty}})],1)}),0),_vm._v(\" \"),_c('div',{staticClass:\"--actions\"},[_c('form',{on:{\"submit\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.addTeamWearPlayer()}}},[_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.playerQty),expression:\"playerQty\"}],on:{\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.playerQty=$event.target.multiple ? $$selectedVal : $$selectedVal[0]}}},_vm._l((_vm.maxPlayers - _vm.teamWearPlayersPayloadCount),function(i){return _c('option',{key:i,domProps:{\"value\":i}},[_vm._v(_vm._s(i))])}),0),_vm._v(\" \"),_c('button',{staticClass:\"--button --icon\",attrs:{\"disabled\":! _vm.canAddPlayers}},[_vm._v(_vm._s(_vm.$tc('Add player | Add players', _vm.playerQty)))])])]),_vm._v(\" \"),_c('div',{staticClass:\"total__holder\"},[_c('div',{staticClass:\"--totals\"},[_c('div',{staticClass:\"totals__holder\"},[_c('span',{staticClass:\"--label\"},[_vm._v(_vm._s(_vm.$t('Grand Total')))]),_vm._v(\" \"),(_vm.price)?_c('span',{staticClass:\"--price\"},[(_vm.price['priceInclTax'] !== _vm.price['totalPriceInclTax'])?_c('span',[_c('span',{staticClass:\"price__old-label\",domProps:{\"innerHTML\":_vm._s(`${_vm.$t('Suggested price')}: `)}}),_vm._v(\" \"),_c('span',{staticClass:\"--old\"},[_vm._v(_vm._s(_vm.price['priceInclTax'].priceFormat()))])]):_vm._e(),_vm._v(\" \"),_c('span',[_vm._v(\"\\n \"+_vm._s(_vm.price['totalPriceInclTax'].priceFormat())+\"\\n \")])]):_vm._e()]),_vm._v(\" \"),_c('div',{staticClass:\"add-to-cart__holder\"},[(_vm.hasAddToCartError)?_c('span',{staticClass:\"global__message--bg --error\",domProps:{\"textContent\":_vm._s(_vm.$t(_vm.addToCartErrorMessage))}}):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"button__holder\",on:{\"mouseenter\":function($event){return _vm.addToCartTooltip($event)},\"mouseleave\":function($event){return _vm.addToCartTooltip($event)}}},[_c('button',{staticClass:\"--button --gold\",class:{ '--loading': _vm.addToCartIsLoading },attrs:{\"disabled\":(( ! _vm.isSaleable || _vm.addToCartIsLoading) || ! _vm.isInStock) || ! _vm.showAddToCartBasedOnPayload},on:{\"click\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.productAddToCart()}}},[_vm._v(\"\\n \"+_vm._s(_vm.$t('Add set to cart'))+\"\\n \")]),_vm._v(\" \"),_c('transition',{attrs:{\"name\":\"fade\"}},[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showTooltip),expression:\"showTooltip\"}],staticClass:\"product-options__tooltip\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('Check if all players meet the required options.'))+\"\\n \")])])],1)])])]),_vm._v(\" \"),_c('button',{ref:\"addToCartPopup\",attrs:{\"data-toggle\":\"offCanvas-addToCart\"}}),_vm._v(\" \"),_c('catalog-product-team-wear-off-canvas',{attrs:{\"bundle-product-ids\":_vm.teamWearProductIds}})],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }"],"names":["Vue","headerSlider","showTooltip","playerQty","maxPlayers","this","$store","getters","playerCount","canAddPlayers","teamWearPlayersPayloadCount","teamWearPlayers","price","totalPrices","customOptionPrices","Object","fromEntries","entries","map","k","v","productType","productData","teamWearProductIds","teamWearProducts","bundleProducts","isSaleable","isInStock","Boolean","addToCartIsLoading","hasAddToCartError","state","CheckoutCart","addToCartErrorMessage","addToCartTooltip","e","type","clearTimeout","_throttle","window","setTimeout","addTeamWearPlayer","highestKey","keys","length","Math","max","Number","i","commit","bundleId","prices","priceInclTax","priceExclTax","totalPriceInclTax","totalPriceExclTax","bundleOptions","JSON","parse","bundleOption","option","hasOwnProperty","dispatch","bundleOptionsInfo","bundleProductIds","bundleDiscountAmount","bundleDiscountPercentage","playerId","$eventBus","$emit","defaultImage","get","url","bundlePayloads","customOptionsQuotePayloads","teamWearPlayersPayload","values","filter","showAddToCartBasedOnPayload","some","cartTotals","productAddToCart","fullAddToCartPayload","key","value","productPayload","sku","qty","product_option","extension_attributes","customOption","productId","options","product_id","parseInt","custom_options","push","isOpen","SolarDataLayer","init","addAddToCart","CartEvents","ADD","$refs","addToCartPopup","click","updatePlayers","created","product","index","indexOf","bundleSizeCharts","$on","newIndex","slideTo","mounted","swipeInformationElement","document","querySelector","$mobileDetect","mobile","classList","remove","$nextTick","el","BlazeSlider","all","slidesToShow","loop","slideGap","defaultSlidesToShow","style","setProperty","onSlide","add","Prop","required","Array","default","Component","name","components","render","_vm","_c","_self","_setupProxy","staticClass","attrs","_v","_e","_l","find","products","on","$event","preventDefault","stopPropagation","directives","rawName","expression","$$selectedVal","prototype","call","target","o","selected","_value","multiple","domProps","_s","$tc","$t","priceFormat","class","ref","staticRenderFns"],"sourceRoot":""}