"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3866],{77215:function(e,t,l){l.d(t,{J:function(){return k}});var i,n,r,o=l(95235),a=l(7328);l(2784);var u=l(95152),d=l(58406),c=l(41857),s=l(28885),v=l(11006),f=l(87330),p=l(48840),g=l(81292),b=l(351),m=l(91849),y=l(52322);function w(e,t){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),l.push.apply(l,i)}return l}function S(e){for(var t=1;t0?M.personalisedBuyText:M.buyText:M.soldOutText},_=e.productBlocks.filter(function(e){return e.sku}).map(function(t,l){var i,n,r,o,a,d,c,v,f,p,g,b,m,w;return(0,y.jsx)(u.v,S(S({externalIdentifier:t.externalIdentifier,eligibleForFulfilmentMethods:t.eligibleForFulfilmentMethods},t),{},{marketedSpecialOffer:t.marketedSpecialOffer?S(S({},t.marketedSpecialOffer),{},{title:(null===(i=t.marketedSpecialOffer)||void 0===i?void 0:i.title)||"",description:null===(n=t.marketedSpecialOffer)||void 0===n?void 0:n.description,loading:!1,onlyDisplayOfferBadge:!0,showIcon:C,i18nText:{closeI18nText:M.productI18nText.closeI18nText,freeGiftMessage:M.productI18nText.freeGiftMessage}}):void 0,image:t.image&&S(S({},t.image),{},{lazy:e.widgetIndex>1||(null===(r=t.image)||void 0===r?void 0:r.lazy)}),hoverImage:!D&&t.hoverImage?S(S({},t.hoverImage),{},{lazy:e.widgetIndex>1||t.hoverImage.lazy}):void 0,picture:null!==(o=t.picture)&&void 0!==o&&o.sources?S(S({},t.picture),{},{lazy:e.widgetIndex>1||(null===(a=t.image)||void 0===a?void 0:a.lazy)}):void 0,review:t.review?S(S({},t.review),{},{screenReaderOnlyText:z({score:null===(d=t.review)||void 0===d?void 0:d.starRating,total:null===(c=t.review)||void 0===c?void 0:c.numberOfReviews})}):void 0,button:{title:R(t),ariaLabel:M.buyAriaLabel,quickBuyTitle:M.quickBuyText,productInStock:t.inStock,disabled:!t.inStock},fulfilmentMethodIconsProps:{enableClickAndCollect:A,isCheckStock:t.isCheckStock,isOrderInStore:t.isOrderInStore,inStockLocations:t.inStockLocations,leadTime:t.leadTime,isBookable:t.isBookable,weightGroups:t.weightGroups,inStock:t.inStock,iconsAvailability:t.icons,i18nText:S(S({},M.fulfilmentMethodsText),{},{homeDelivery:S(S({},M.fulfilmentMethodsText.homeDelivery),{},{datedDelivery:(0,s.ag)("basket.item.fulfilment.leadtime",null===(f=t.leadTime)||void 0===f?void 0:f.toString()),dynamicDelivery:(w=null===(p=t.weightGroups)||void 0===p||null===(p=p[0])||void 0===p?void 0:p.toLowerCase(),(0,s.ag)("product.item.fulfilment.".concat(w)))})})},displayQuickBuyButton:I,content:null==t?void 0:t.content,brand:{name:(null===(g=t.brand)||void 0===g?void 0:g.name)||"",imageUrl:null===(b=t.brand)||void 0===b?void 0:b.imageUrl},papBadgeStyle:P.widget.productList.productItemOverlay,enableSavePrice:null==B||null===(m=B.productBlock)||void 0===m||null===(m=m.price)||void 0===m?void 0:m.showSavePrice}),l)}),G={2:[2,2,2,2],3:[1,2,3,3],default:P.widget.bestSellers.carousel.itemsPerSlide};return(null===(t=e.productBlocks)||void 0===t?void 0:t.length)===0?null:(0,y.jsxs)("div",{className:e.className,children:[e.shouldDisplayTitle&&null!==(l=e.title)&&void 0!==l&&l.text&&e.title.text.length>2?(0,y.jsx)(h,{horizontalAlignment:(null===(i=e.title)||void 0===i?void 0:i.horizontalAlignment)||(null==B?void 0:B.titleAlignment),children:e.title.text}):null,e.subtitle&&(0,y.jsx)(x,{horizontalAlignment:e.subtitle.horizontalAlignment,children:e.subtitle.text}),(0,y.jsx)(O,{children:(0,y.jsx)(b.l,{items:_,i18n:M.carouselText,itemsPerSlide:G[null==_?void 0:_.length]||(null==B||null===(n=B.carousel)||void 0===n?void 0:n.itemsPerSlide)||G.default,autoPlay:L,hideControlsOnSingleSlide:!0,inactiveSlideFullOpacity:!0,buttonPlacement:m.J.Split,indicatorStyle:(null==B||null===(r=B.carousel)||void 0===r?void 0:r.indicatorStyle)||P.widget.bestSellers.carousel.indicatorStyle,enableSlidePreview:null!==(o=null==B||null===(a=B.carousel)||void 0===a?void 0:a.enableSlidePreview)&&void 0!==o?o:P.widget.bestSellers.carousel.enableSlidePreview,swipeable:!0,controls:{placement:null===(v=P.widget.bestSellers.carousel.controls)||void 0===v?void 0:v.placement},itemGapSpacing:(null==B||null===(f=B.carousel)||void 0===f?void 0:f.itemGapSpacing)||(null===(p=P.widget.bestSellers.carousel)||void 0===p?void 0:p.itemGapSpacing),overflow:null===(g=P.widget.bestSellers.carousel)||void 0===g?void 0:g.overflow,indicatorWrapperMargin:null===(w=P.widget.bestSellers.carousel)||void 0===w?void 0:w.indicatorWrapperMargin,ignoreGapOffset:null==B||null===(k=B.carousel)||void 0===k?void 0:k.gapOffset})})]})}},15754:function(e,t,l){t.ZP=void 0;var i=n(l(57727));function n(e){return e&&e.__esModule?e:{default:e}}i.default,n(l(69675)).default;var r=i.default;t.ZP=r},6622:function(e,t){t.__esModule=!0,t.noop=t.defaultProps=t.defaultOptions=t.defaultConfig=void 0,t.defaultOptions={},t.defaultConfig={disconnectOnLeave:!1};var l=()=>{};t.noop=l,t.defaultProps={onEnterViewport:l,onLeaveViewport:l}},57727:function(e,t,l){t.__esModule=!0,t.default=void 0;var i=l(2784),n=d(l(73463)),r=d(l(69675)),o=l(6622),a=l(52322),u=["onEnterViewport","onLeaveViewport"];function d(e){return e&&e.__esModule?e:{default:e}}function c(){return(c=Object.assign||function(e){for(var t=1;t"function"==typeof e&&!(e.prototype&&e.prototype.render),v=e=>e.prototype&&e.prototype.isReactComponent;t.default=function(e,t,l){void 0===t&&(t=o.defaultOptions),void 0===l&&(l=o.defaultConfig);var d=(0,i.forwardRef)((t,l)=>{var i=c({forwardedRef:l},v(e)&&!s(e)?{ref:l}:{});return(0,a.jsx)(e,c({},t,i))});function f(e){var{onEnterViewport:n=o.noop,onLeaveViewport:s=o.noop}=e,v=function(e,t){if(null==e)return{};var l,i,n={},r=Object.keys(e);for(i=0;i=0||(n[l]=e[l]);return n}(e,u),f=(0,i.useRef)(),{inViewport:p,enterCount:g,leaveCount:b}=(0,r.default)(f,t,l,{onEnterViewport:n,onLeaveViewport:s});return(0,a.jsx)(d,c({},v,{inViewport:p,enterCount:g,leaveCount:b},{ref:f}))}var p=e.displayName||e.name||"Component";return f.displayName="handleViewport("+p+")",(0,n.default)(f,d)}},69675:function(e,t,l){t.__esModule=!0,t.default=void 0;var i=l(2784),n=l(28316),r=l(6622);t.default=function(e,t,l,o){void 0===t&&(t=r.defaultOptions),void 0===l&&(l=r.defaultConfig),void 0===o&&(o=r.defaultProps);var{onEnterViewport:a,onLeaveViewport:u}=o,[,d]=(0,i.useState)(),c=(0,i.useRef)(),s=(0,i.useRef)(!1),v=(0,i.useRef)(!1),f=(0,i.useRef)(0),p=(0,i.useRef)(0);function g(e){var{isIntersecting:t,intersectionRatio:i}=e[0]||{},n=void 0!==t?t:i>0;if(!v.current&&n){v.current=!0,null==a||a(),f.current+=1,s.current=n,d(n);return}v.current&&!n&&(v.current=!1,null==u||u(),l.disconnectOnLeave&&c.current&&c.current.disconnect(),p.current+=1,s.current=n,d(n))}return(0,i.useEffect)(()=>{var l=c.current;return function(t){var{observerRef:l}=t,i=e.current;if(i){var r=(0,n.findDOMNode)(i);r&&(null==l||l.observe(r))}}({observerRef:l=function(e){var{observerRef:l}=e;return l||(c.current=new IntersectionObserver(g,t),c.current)}({observerRef:l})}),()=>{!function(t){var{observerRef:l}=t,i=e.current;if(i){var r=(0,n.findDOMNode)(i);r&&(null==l||l.unobserve(r))}null==l||l.disconnect(),c.current=null}({observerRef:l})}},[e.current,t,l,a,u]),{inViewport:s.current,enterCount:f.current,leaveCount:p.current}}}}]); //# sourceMappingURL=3866.46ec9710f8c6a7f4.js.map