1"use strict";(self.webpackChunkwf_core_setup=self.webpackChunkwf_core_setup||[]).push([[1425],{8728:(t,e,r)=>{r.r(e),r.d(e,{default:()=>d});var i=function(){var t=this;return(0,t._self._c)("section",[t._t("default",null,{counter:t.counter,sort:t.changeSortOption,products:t.products,showInitialProducts:t.showInitialProducts,pageChange:t.onPageChange})],2)};i._withStripped=!0;var n=r(5353),o=r(8366),a=r(7720);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach(function(e){c(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function c(t,e,r){return(e=function(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const p={name:"product-filter-wrapper",provide:function(){return{page:this.page,datalayerBrandName:this.datalayerBrandName,bvEnabled:this.bvEnabled,buyVisible:this.buynowVisible,starRatingActiveColor:this.starRatingActiveColor,starRatingInactiveColor:this.starRatingInactiveColor,buyNowTitle:this.buyNowTitle,starVisibility:this.starVisible}},watch:{currentPageUpdated:function(){this[a.qS](this[o.Fm])},totalPagesUpdated:function(){this[a.OF](this[o.NG])},products:function(){window.eventBus.$emit("product-page-update")}},methods:l(l(l({},(0,n.i0)("filterStore",[o.Jx,o.QT,o.No,o.XJ,o._n,o.HX,o.WU,o.GQ])),(0,n.i0)("paginationStore",[a.qS,a.OF])),{},{changeSortOption:function(t){this[o.HX](t.target.value),window.dataLayer.push({event:"uaevent",event_name:"use_filters",ecommerce:"undefined",eventCategory:"product selector page",eventAction:"sort",eventLabel:t.target.value?t.target.value.toLowerCase():"",filter_type:"sort",filter_value:t.target.value?t.target.value.toLowerCase():""})},updateSelectedFiltersFromUrl:function(){var t=new URLSearchParams(window.location.search);if(0!==t.size){var e=[];this.filters.forEach(function(r){var i=t.get(r.title.toLowerCase().replace(" ","_"));if(i){var n=i.split(",").map(function(t){return r.items.filter(function(e){return e.Value.toLowerCase().replaceAll(" ","-").replaceAll(",","")===t})});e.push({Name:r.title,Options:n.flat()})}}),this[o.GQ]({filters:e,fetch:!0,currentPage:this.currentPage,updateProductList:!0})}},onPageChange:function(t){this[o.QT]({loadMore:!1,isSorting:!1,updateResults:!0,pageNumber:t})}}),props:{filters:{type:Array,required:!0},apiUrl:{type:String,required:!0},paginationObject:{type:Object,required:!0},pageId:{type:String,required:!0},initialSort:{type:String,required:!1,default:""},productsLoaded:{type:Number,required:!0},currentPage:{type:Number},totalPages:{type:Number},productPerPage:{type:Number},buynowVisible:{type:Boolean,default:!1},bvEnabled:{type:Boolean,default:!1},starVisible:{type:Boolean,default:!1},datalayerBrandName:{type:String,default:"RED"},starRatingActiveColor:{type:String,required:!1,default:"#000"},starRatingInactiveColor:{type:String,required:!1,default:"#666"},buyNowTitle:{type:String,required:!1,default:"BUY NOW"}},computed:l(l({},(0,n.L8)("filterStore",[o.pH,o.oH,o.jq,o.Fm,o.NG])),{},{counter:function(){return this[o.pH]},currentPageUpdated:function(){return this[o.Fm]},totalPagesUpdated:function(){return this[o.NG]},products:function(){return this[o.oH]},showInitialProducts:function(){return this[o.jq]}}),mounted:function(){this.totalPages&&void 0!==this.currentPage&&(this[o.Jx](this.productPerPage),this[o.No](this.totalPages),this[o.XJ](this.currentPage),this[a.qS](this.currentPage),this[a.OF](this.totalPages)),this[o._n]({productsCount:this.productsLoaded,filters:this.filters,apiURL:this.apiUrl,fetchPerPage:this.fetchPerPage,pageId:this.pageId,paginationObject:this.paginationObject}),this[o.WU](this.initialSort),this.updateSelectedFiltersFromUrl()}},d=(0,r(4486).A)(p,i,[],!1,null,null,null).exports}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.