PageSourceSearch

https://pwgo.co.nz/static/js/3870.3a6cc368.chunk.js

js pwgo.co.nz collected 2026-10-04 01:29:48 UTC 6,334 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkplumbingworld_react=self.webpackChunkplumbingworld_react||[]).push([[3870],{79767:function(e,r,t){var o=t(89379),n=t(80045),a=t(81096),c=t(26277),s=t(24569),i=t(24071),d=t(70579),l=["breadcrumbs"];r.A=function(e){var r=e.breadcrumbs,t=(0,n.A)(e,l);return(0,d.jsx)(a.A,(0,o.A)((0,o.A)({},t),{},{separator:(0,d.jsx)(c.A,{component:i.A.chevron_arrow_right.svg,viewBox:i.A.chevron_arrow_right.viewbox,style:{width:"20px",height:"20px"}}),children:null===r||void 0===r?void 0:r.map(function(e,t){var o=t===r.length-1;return(0,d.jsx)(s.A,{underline:"none",className:"pw-crumb-link"+"".concat(e.onClick&&!o?" pw-crumb-link--clickable":"")+"".concat(o?" pw-crumb-link--current":""),onClick:e.onClick,children:e.title},t)})}))}},73870:function(e,r,t){t.r(r),t.d(r,{default:function(){return w}});var o=t(83003),n=t(4963),a=t(28052),c=t(56184),s=t(92254),i=t(63152),d=t(31789),l=t(46962),u=t(21729),p=t(23029),g=t(92901),y=t(53895),f=t(85501),h=t(65043),v=t(47938),m=t(63638),b=t(70579),A=function(e){function r(){var e;(0,p.A)(this,r);for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return(e=(0,y.A)(this,r,[].concat(o)))._renderMessage=function(){var r=e.props,t=r.loadingMessage,o=r.error,n=r.products;return t?(0,b.jsx)(v.A,{}):o?(0,b.jsx)("span",{className:"message error",children:o.message||"Product search failed"}):void 0===n||n&&0===n.length?(0,b.jsx)("span",{className:"message info",children:"No products available"}):null},e}return(0,f.A)(r,e),(0,g.A)(r,[{key:"render",value:function(){var e=this.props,r=e.products,t=e.filters,o=e.savedFilter,n=e.productCategory,a=e.categoryTitle,c=e.totalProductPagesCount;if(!n)return(0,b.jsx)("div",{className:"products",children:(0,b.jsx)("span",{className:"message info",children:"Unable to find category"})});var s=a?decodeURIComponent(a).toUpperCase():"";return(0,b.jsx)(m.A,{products:r,heading:s,message:this._renderMessage(),filters:t,savedFilter:o,categoryId:n,categoryTitle:a,totalPages:c})}}])}(h.PureComponent);var C=(0,o.Ng)(function(e,r){var t,o={categoryId:(t=r).categoryId,categoryTitle:t.categoryTitle},n=o.categoryId,a=o.categoryTitle,c=e.products,s=c.products,i=c.productCategory,d=c.loadingMessage,l=c.error;return{products:n===i?s:void 0,productsViewState:e.config.productsViewState,filters:e.products.filters,savedFilter:e.products.savedFilter,productCategory:n,categoryTitle:a,loadingMessage:d,error:l,totalProductPagesCount:e.products.totalProductPagesCount||0,hasAppliedFilters:e.supplierFilter.appliedSupplierIdFilterIds.length>0||e.supplierFilter.appliedExclusiveBrands.length>0}},function(e){return{onClearFilters:function(){e(l.hi())},onClearSelectedCategory:function(){e(i.pn())},loadProducts:function(r,t,o){e(i.HB.started({categoryId:r,page:t,pageSize:o}))},onToggleProductsViewState:function(r){e(i.$N(r))}}})(A),I=t(60436),F=t(79767),P=t(48237),T=function(){var e=(0,o.wA)(),r=(0,n.g)(),t=r.id,a=r.
1name,s=r.sid,i=r.sname,d=r.ssid,l=r.ssname,u=function(e){return e?decodeURIComponent(e):""},p=[{title:"Home",onClick:function(){return e((0,P.s2)({tab:"home"}))}},{title:"Products"}].concat((0,I.A)(t&&a?[{title:u(a),onClick:function(){return e((0,c.T)({categoryId:t,categoryTitle:u(a),type:"category"}))}}]:[]),(0,I.A)(t&&s&&i?[{title:u(i),onClick:function(){return e((0,c.T)({categoryId:"".concat(s),categoryTitle:u(i),type:"subcategory"}))}}]:[]),(0,I.A)(t&&s&&d&&l?[{title:u(l),onClick:function(){return e((0,c.T)({categoryId:"".concat(d),categoryTitle:u(l),type:"subsubcategory"}))}}]:[]));return(0,b.jsx)("div",{className:"products-breadcrumbs",children:(0,b.jsx)(F.A,{breadcrumbs:p})})},x=function(e){function r(){var e;(0,p.A)(this,r);for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return(e=(0,y.A)(this,r,[].concat(o)))._loadContent=function(r,t){var o,n=e.props,c=n.categoryId,i=n.branchId,d=n.branchFilterPreferenceEnabled,l=n.savedFilterHasBranch,p=n.goldProductsFilterEnabled,g=(0,s.X)(c),y=r&&(d||l)&&i?{filters:[{id:i,filterType:a.SearchFilterFilterTypeEnum.BRANCH}]}:void 0,f=y?parseInt(i,10):void 0;p&&(y?null===(o=y.filters)||void 0===o||o.push({filterType:a.SearchFilterFilterTypeEnum.GOLD}):y={filters:[{filterType:a.SearchFilterFilterTypeEnum.GOLD}]});if("subsubcategory"===g){if(e.props.shouldLoadCategories||t){var h=(0,u.e)(c,"_");e.props.loadCategories(h,g,f)}e.props.loadProducts(c,y)}else{var v="category"===g?"subcategory":"subsubcategory";e.props.loadCategories(c,v,f),e.props.loadProducts(c,y)}},e}return(0,f.A)(r,e),(0,g.A)(r,[{key:"componentDidMount",value:function(){this.props.shouldLoadProducts&&this._loadContent(!0)}},{key:"componentDidUpdate",value:function(e){var r=this.props,t=r.categoryId,o=r.selectedAccount,n=e.categoryId!==t,a=void 0===e.selectedAccount&&void 0!==o||void 0!==e.selectedAccount&&void 0===o,c=!(!e.selectedAccount||!o||e.selectedAccount.id===o.id);if(n||a||c){var i="subcategory"===(0,s.X)(e.categoryId)&&"subsubcategory"===(0,s.X)(this.props.categoryId);this._loadContent(n,i)}}},{key:"render",value:function(){var e=this.props,r=e.categoryId,t=e.categoryTitle;return(0,b.jsxs)(h.Fragment,{children:[(0,b.jsx)(T,{}),(0,b.jsx)(C,{categoryId:r,categoryTitle:t})]})}}])}(h.PureComponent),k=(0,o.Ng)(function(e,r){var t,o,n,c,i=r.id,l=r.name,p=r.sid,g=r.sname,y=r.ssid,f=r.ssname;y&&f?(n=y,c=f):p&&g?(n=p,c=g):(n=i,c=l);var h=!1;if("subsubcategory"===(0,s.X)(n)){var v=(0,u.e)(n,"_");e.categories.subsubcategoryId!==v&&(h=!0)}return{categoryId:n,categoryTitle:c,selectedAccount:e.order.selectedAccount,shouldLoadProducts:n!==e.products.productCategory,shouldLoadCategories:h,branchFilterPreferenceEnabled:e.auth.branchFilterPreferenceEnabled,savedFilterHasBranch:!(null===(t=(0,d.ZX)(e))||void 0===t||null===(o=t.filters)||void 0===o||!o.some(function(e){return e.filterType===a.SearchFilterFilterTypeEnum.BRANCH})),branchId:e.order.branchId,goldProductsFilterEnabled:e.platform.goldProductsFilterEnabled}},function(e){return{loadCategories:function(r,t,o){e(c.B.started({categoryId:r,type:t,branchId:o}))},loadProducts:function(r,t){e(i.HB.started({categoryId:r,searchRequest:t}))},clearFilters:function(){e((0,l.hi)())}}})(x),w=function(){var e=(0,n.g)(),r=e.id,t=e.name,o=e.sid,a=e.sname,c=e.ssid,s=e.ssname;return(0,b.jsx)(k,{id:r,name:t,sid:o,sname:a,ssid:c,ssname:s})}}}]);
2//# sourceMappingURL=3870.3a6cc368.chunk.js.map

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.