"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[885],{20466:function(n,e,t){t.d(e,{_:function(){return g}});var r,i,o=t(7328);t(2784);var a=t(50556),s=t(93781),l=t(87330),u=t(48840),c=t(15792),d=t(52322),h=(0,c.zo)(a.T)(r||(r=(0,o.Z)(["\n ",";\n color: ",";\n text-transform: ",";\n text-decoration: ",";\n * {\n ",";\n color: ",";\n text-transform: ",";\n text-decoration: ",";\n }\n"])),function(n){return(0,l.xv)(n.theme.widgets.stripBanner.font.entry,n.theme.widgets.stripBanner.font.style)},function(n){return n.theme.widgets.stripBanner.font.textColor},function(n){return n.theme.widgets.stripBanner.font.transform},function(n){return n.theme.widgets.stripBanner.font.textDecoration},function(n){return(0,l.xv)(n.theme.widgets.stripBanner.font.entry,n.theme.widgets.stripBanner.font.style)},function(n){return n.theme.widgets.stripBanner.font.textColor},function(n){return n.theme.widgets.stripBanner.font.transform},function(n){return n.theme.widgets.stripBanner.font.textDecoration}),f=c.zo.a(i||(i=(0,o.Z)(["\n display: block;\n margin-top: ",";\n margin-bottom: ",";\n background-color: ",";\n box-shadow: ",";\n width: 100%;\n height: 100%;\n align-items: center;\n text-align: center;\n padding: ",";\n text-decoration: none;\n border: 3px solid transparent;\n outline: none;\n color: ",";\n ","\n\n &:hover {\n background-color: ",";\n color: ",";\n text-decoration: ",";\n\n ",", "," * {\n color: ",";\n }\n }\n\n &:focus-visible {\n text-decoration: underline;\n border: ",";\n background-color: ",";\n\n ",", "," * {\n color: ",";\n }\n }\n"])),function(n){return n.theme.widgets.stripBanner.margin.top},function(n){return n.theme.widgets.stripBanner.margin.bottom},function(n){return n.theme.widgets.stripBanner.backgroundColor},function(n){return n.theme.widgets.stripBanner.boxShadow},(0,u.W0)(1),function(n){return n.theme.widgets.stripBanner.font.textColor},function(n){return"#ffffff"===n.theme.widgets.stripBanner.backgroundColor?"border-bottom: 1px solid #d2d2d2;":""},function(n){return n.theme.widgets.stripBanner.hoverBackgroundColor},function(n){return n.theme.widgets.stripBanner.hoverTextColor},function(n){return n.theme.widgets.stripBanner.hoverTextDecoration},h,h,function(n){return n.theme.widgets.stripBanner.hoverTextColor},function(n){return"".concat(n.theme.widgets.stripBanner.border.focusWidth," \n solid \n ").concat(n.theme.widgets.stripBanner.border.focusColor||n.theme.colors.palette.brand.base)},function(n){return n.theme.widgets.stripBanner.focusBackgroundColor},h,h,function(n){return n.theme.widgets.stripBanner.focusTextColor}),p=(0,s.Rq)("href",f),g=function(n){return!n.stripBannerText||n.hideDefaultBanner?null:(0,d.jsx)(p,{"data-testid":"strip-banner",href:n.stripBannerURL,children:(0,d.jsx)(h,{content:n.stripBannerText})})}},55065:function(n,e,t){t.d(e,{G:function(){return i}});var r,i=((r={}).HOME_PAGE="HOMEPAGE",r.LANDING="LANDING",r.SEARCH="SEARCH",r.PRODUCT="PRODUCT",r.ACCOUNT="ACCOUNT",r.BASKET="BASKET",r.PRODUCT_LIST="PRODUCT_LIST",r.STORE_LOCATOR="STORE_LOCATOR",r.PERSONALISE="PERSONALISE_YOUR_BOX",r)},80885:function(n,e,t){t.r(e),t.d(e,{WidgetBanner:function(){return nb}});var r,i,o,a,s,l,u,c,d,h,f,p,g,x,v,m,w=t(2784),b=t(55065),k=t(15792),B=t(25237),y=t.n(B),C=t(93781),T=t(7328),j=t(8322),P=t(50556),D=t(87330),A=t(48840),S=t(81292),U=(0,k.iv)(r||(r=(0,T.Z)(["\n ",";\n text-transform: ",";\n text-decoration: ",";\n color: ",";\n\n &:hover {\n ",";\n text-transform: ",";\n text-decoration: ",";\n color: ",";\n }\n"])),function(n){return(0,D.xv)(n.theme.widgets.uspBar.font.entry,n.theme.widgets.uspBar.font.style)},function(n){return n.theme.widgets.uspBar.font.transform},function(n){return n.theme.widgets.uspBar.font.textDecoration},function(n){return n.theme.widgets.uspBar.font.textColor},function(n){return(0,D.xv)(n.theme.widgets.uspBar.hoverFont.entry,n.theme.widgets.uspBar.hoverFont.style)},function(n){return n.theme.widgets.uspBar.hoverFont.transform},function(n){return n.theme.widgets.uspBar.hoverFont.textDecoration},function(n){return n.theme.widgets.uspBar.hoverFont.textColor}),G=k.zo.div(o||(o=(0,T.Z)(["\n width: 100%;\n justify-content: center;\n visibility: hidden;\n position: absolute;\n top: 0;\n left: 0;\n animation: ","s\n "," infinite;\n animation-delay: ","s;\n\n &:first-child {\n position: static;\n }\n\n "," {\n display: flex;\n padding: 0 ",";\n width: auto;\n animation: none;\n visibility: visible;\n position: static;\n }\n"])),function(n){return 2*n.panelCount},function(n){var e;return e=n.panelCount,(0,A.F4)(i||(i=(0,T.Z)(["\n 0% { visibility: visible }\n ","% { visibility: hidden }\n"])),100/e)},function(n){return 2*n.index},function(n){return(0,S.mq)(n.theme.breakpointUtils.map,"lg")},(0,A.W0)(2)),R=k.zo.div(s||(s=(0,T.Z)(["\n display: flex;\n margin: -6px 0 1px 0;\n\n "," {\n display: none;\n }\n"])),function(n){return(0,S.mq)(n.theme.breakpointUtils.map,"lg")}),F=k.zo.span(l||(l=(0,T.Z)(["\n width: 5px;\n height: 5px;\n margin: 0 2px;\n border-radius: 3px;\n background: ",";\n animation: ","s\n "," infinite;\n animation-delay: ","s;\n"])),function(n){return n.theme.colors.palette.greys.light},function(n){return 2*n.panelCount},function(n){var e,t;return e=n.theme,t=n.panelCount,(0,A.F4)(a||(a=(0,T.Z)(["\n 0% { background: "," }\n ","% { background: "," }\n ","% { background: "," }\n 100% { background: "," }\n"])),e.colors.palette.greys.darker,100/t-.01,e.colors.palette.greys.darker,100/t,e.colors.palette.greys.light,e.colors.palette.greys.light)},function(n){return 2*n.index}),L=k.zo.div(u||(u=(0,T.Z)(["\n height: ",";\n"])),(0,A.W0)(7)),O=k.zo.a(c||(c=(0,T.Z)(["\n ","\n display: flex;\n justify-content: center;\n align-items: center;\n text-decoration: none;\n padding-right: 2px;\n ",";\n text-align: center;\n color: ",";\n\n &::after {\n ","\n display: block;\n content: 'P';\n height: 0;\n visibility: hidden;\n }\n\n &:hover {\n ",";\n text-transform: ",";\n text-decoration: ",";\n color: ",";\n }\n\n &:focus-visible {\n border-color: ",";\n }\n"])),U,(0,j.wL)(),function(n){return n.theme.widgets.uspBar.font.textColor},U,function(n){return(0,D.xv)(n.theme.widgets.uspBar.hoverFont.entry,n.theme.widgets.uspBar.hoverFont.style)},function(n){return n.theme.widgets.uspBar.hoverFont.transform},function(n){return n.theme.widgets.uspBar.hoverFont.textDecoration},function(n){return n.theme.widgets.uspBar.hoverFont.textColor},function(n){return n.theme.widgets.uspBar.focusBorderColor||n.theme.colors.palette.brand.base}),E=k.zo.div(d||(d=(0,T.Z)(["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 40px;\n height: 40px;\n\n ","\n"])),function(n){return n.isClipBoard?"svg {\n fill: ".concat(n.theme.widgets.uspBar.iconFill,";\n path {\n stroke: ").concat(n.theme.widgets.uspBar.iconFill,";\n }\n }"):"svg {\n \n path {\n ".concat(n.useStrokeFill?"stroke: ".concat(n.theme.widgets.uspBar.iconFill,";"):"fill: ".concat(n.theme.widgets.uspBar.iconFill,";"),"\n \n }\n ")}),I=k.zo.div(h||(h=(0,T.Z)(["\n display: flex;\n justify-content: center;\n align-items: center;\n text-decoration: none;\n ",";\n text-align: center;\n\n &::after {\n ","\n display: block;\n content: 'P';\n height: 0;\n visibility: hidden;\n }\n"])),U,U),Z=k.zo.div(f||(f=(0,T.Z)(["\n display: flex;\n justify-content: center;\n width: 100%;\n align-items: center;\n flex-direction: column;\n "," {\n padding: ",";\n }\n "," {\n padding: ",";\n }\n"])),function(n){return(0,S.mq)(n.theme.breakpointUtils.map,"xs")},(0,A.W0)(1),function(n){return(0,S.mq)(n.theme.breakpointUtils.map,"md")},function(n){return(0,A.W0)(n.theme.widgets.uspBar.padding)}),N=k.zo.div(p||(p=(0,T.Z)(["\n background-color: ",";\n display: flex;\n justify-content: center;\n align-items: center;\n flex-wrap: nowrap;\n max-width: 100%;\n\n "," {\n ","\n }\n\n "," {\n height: auto;\n }\n"])),function(n){var e;return null!==(e=n.backgroundColour)&&void 0!==e?e:n.theme.widgets.uspBar.backgroundColor},function(n){return(0,S.mq)(n.theme.breakpointUtils.map,"xs")},function(n){return n.theme.widgets.uspBar.height&&"height: ".concat(n.theme.widgets.uspBar.height)},function(n){return(0,S.mq)(n.theme.breakpointUtils.map,"md")}),_=(0,k.iv)(g||(g=(0,T.Z)(["\n ",";\n vertical-align: middle;\n\n &::after {\n ","\n display: block;\n content: '00:00:00';\n font-weight: 700;\n height: 0;\n visibility: hidden;\n }\n"])),(0,D.xv)("medium1","alternate"),(0,D.xv)("medium1","alternate")),z=k.zo.div(x||(x=(0,T.Z)(["\n ",";\n padding-left: ",";\n\n ","\n"])),(0,D.xv)("small","alternate"),(0,A.W0)(1),function(n){return n.isDesktop&&_}),q=k.zo.div(v||(v=(0,T.Z)(["\n display: flex;\n justify-content: center;\n flex-wrap: wrap;\n align-items: center;\n"]))),H=(0,k.zo)(P.T)(m||(m=(0,T.Z)(["\n ","\n\n * {\n ","\n }\n"])),U,U),M=t(52322),W=y()(function(){return Promise.resolve().then(t.bind(t,51424))},{ssr:!0,fallback:(0,M.jsx)("div",{style:{width:24,height:24}}),loadableGenerated:{webpack:function(){return[51424]}}}),K=y()(function(){return Promise.resolve().then(t.bind(t,55555))},{ssr:!0,fallback:(0,M.jsx)("div",{style:{width:24,height:24}}),loadableGenerated:{webpack:function(){return[55555]}}}),X=y()(function(){return Promise.resolve().then(t.bind(t,33086))},{ssr:!0,fallback:(0,M.jsx)("div",{style:{width:24,height:24}}),loadableGenerated:{webpack:function(){return[33086]}}}),Y=y()(function(){return Promise.resolve().then(t.bind(t,82504))},{ssr:!0,fallback:(0,M.jsx)("div",{style:{width:24,height:24}}),loadableGenerated:{webpack:function(){return[82504]}}}),$=y()(function(){return Promise.resolve().then(t.bind(t,36017))},{ssr:!0,fallback:(0,M.jsx)("div",{style:{width:24,height:24}}),loadableGenerated:{webpack:function(){return[36017]}}}),J=y()(function(){return Promise.resolve().then(t.bind(t,38894))},{ssr:!0,fallback:(0,M.jsx)("div",{style:{width:24,height:24}}),loadableGenerated:{webpack:function(){return[38894]}}}),Q=y()(function(){return Promise.resolve().then(t.bind(t,62954))},{ssr:!0,fallback:(0,M.jsx)("div",{style:{width:24,height:24}}),loadableGenerated:{webpack:function(){return[62954]}}}),V=y()(function(){return Promise.resolve().then(t.bind(t,14589))},{ssr:!0,fallback:(0,M.jsx)("div",{style:{width:24,height:24}}),loadableGenerated:{webpack:function(){return[14589]}}}),nn=y()(function(){return Promise.resolve().then(t.bind(t,4147))},{ssr:!0,fallback:(0,M.jsx)("div",{style:{width:24,height:24}}),loadableGenerated:{webpack:function(){return[4147]}}}),ne=y()(function(){return Promise.resolve().then(t.bind(t,68511))},{ssr:!0,fallback:(0,M.jsx)("div",{style:{width:24,height:24}}),loadableGenerated:{webpack:function(){return[68511]}}}),nt=y()(function(){return Promise.resolve().then(t.bind(t,9769))},{ssr:!0,fallback:(0,M.jsx)("div",{style:{width:24,height:24}}),loadableGenerated:{webpack:function(){return[9769]}}}),nr=y()(function(){return Promise.resolve().then(t.bind(t,91179))},{ssr:!0,fallback:(0,M.jsx)("div",{style:{width:24,height:24}}),loadableGenerated:{webpack:function(){return[91179]}}}),ni=y()(function(){return Promise.resolve().then(t.bind(t,21051))},{ssr:!0,fallback:(0,M.jsx)("div",{style:{width:24,height:24}}),loadableGenerated:{webpack:function(){return[21051]}}}),no=y()(function(){return Promise.resolve().then(t.bind(t,23653))},{ssr:!0,fallback:(0,M.jsx)("div",{style:{width:24,height:24}}),loadableGenerated:{webpack:function(){return[23653]}}}),na=y()(function(){return Promise.resolve().then(t.bind(t,97457))},{ssr:!0,fallback:(0,M.jsx)("div",{style:{width:24,height:24}}),loadableGenerated:{webpack:function(){return[97457]}}}),ns=y()(function(){return Promise.resolve().then(t.bind(t,71887))},{loadableGenerated:{webpack:function(){return[71887]}}}),nl=(0,C.Rq)("href",O),nu=function(n){return"0".concat(n).slice(-2)},nc=function(n){switch(n){case 0:return"sunday";case 1:return"monday";case 2:return"tuesday";case 3:return"wednesday";case 4:default:return"thursday";case 5:return"friday";case 6:return"saturday"}},nd=function(n){var e=n.rawPanelInformation,t=n.isDesktop,r=e.timezoneOffset,i=(0,w.useState)(new Date().getDay()),o=i[0],a=i[1],s=(0,w.useState)(e["".concat(nc(o),"Cutoff")]),l=s[0],u=s[1],c=(0,w.useState)(1e3*Date.now()%60),d=c[0],h=c[1];(0,w.useEffect)(function(){var n=setInterval(f,40);return function(){clearInterval(n)}});var f=(0,w.useCallback)(function(){var n=new Date().getDay();n!==o&&(a(n),u(e["".concat(nc(o),"Cutoff")]));var t=1e3*Date.now()%60;d!==t&&h(t)},[d,e,o]),p=(0,w.useMemo)(function(){return(0,M.jsx)(q,{"data-testid":"countdown-finished",children:e.countDownText},"countdown-text-empty")},[e]),g=/^(\d|\d\d):(\d\d)$/.exec(l);if(!g)return p;var x=parseInt(g[1],10)-parseInt(r,10),v=parseInt(g[2],10);if(isNaN(x)||isNaN(v)||x<0||x>23||v<0||v>59)return p;var m=new Date,b=new Date().setHours(x,v,0)-m.getTime();if(b<0)return p;var k=nu(Math.floor(b/3600/1e3%24)),B=nu(Math.floor(b/60/1e3%60)),y=nu(Math.floor(b/1e3%60));return(0,M.jsxs)(q,{"data-testid":"countdown-".concat(k,":").concat(B,":").concat(y),children:[e.countDownText,":",(0,M.jsxs)(z,{isDesktop:t,children:[k,":",B,":",y]},"wrapper")]},"countdown-text")},nh=function(n,e){var t,r,i;return(0,M.jsx)(na,{xmlns:"http://www.w3.org/2000/svg",viewBox:(null===(t=e.widgets)||void 0===t||null===(t=t.uspBar)||void 0===t||null===(t=t.icon)||void 0===t?void 0:t.viewBox)||"0 0 24 24",width:(null===(r=e.widgets)||void 0===r||null===(r=r.uspBar)||void 0===r||null===(r=r.icon)||void 0===r?void 0:r.width)||24,height:(null===(i=e.widgets)||void 0===i||null===(i=i.uspBar)||void 0===i||null===(i=i.icon)||void 0===i?void 0:i.height)||24,children:(0,M.jsx)("path",{d:n,fillRule:"evenodd"})})},nf=function(n,e){var t=e.useAlternateIcon||{};return"call"===n?"mobile"===e.callIcon?nn:ne:"quality"===n?t.qualityText?no:nt:"store"===n?t.storeText?ni:nt:({trustpilot:$,rewards:K,countDown:W,internationalDelivery:X,checkmark:Y,calender:J,email:Q,delivery:V,clickAndCollect:nr,returns:ns})[n]||nt},np=function(n,e,t){var r,i,o,a=(null===(r=e.widgets)||void 0===r||null===(r=r.uspBar)||void 0===r||null===(r=r.icon)||void 0===r?void 0:r[n])||{},s=(null===(i=e.widgets)||void 0===i||null===(i=i.uspBar)||void 0===i?void 0:i.iconFill)||(null===(o=e.colors)||void 0===o||null===(o=o.palette)||void 0===o||null===(o=o.greys)||void 0===o?void 0:o.dark)||"#000";if(a.svgPath)return nh(a.svgPath,e);var l=nf(n,t);return(0,M.jsx)(l,{fill:s,"aria-hidden":"true",focusable:"false"})},ng=function(n,e,t,r){var i=[];if(!n)return[];var o={rewardPointsText:"rewards",countDownText:"countDown",internationalDeliveryText:"internationalDelivery",checkmarkText:"checkmark",trustPilotText:"trustpilot",calendarText:"calender",emailText:"email",deliveryText:"delivery",callText:"call",qualityText:"quality",clickAndCollectText:"clickAndCollect",storeText:"store",returnsText:"returns"};return Object.keys(n).forEach(function(r){if(/.*Text/.exec(r)&&""!==n[r]){var a,s=o[r];s&&((a={child:"countDown"===s?(0,M.jsx)(nd,{rawPanelInformation:n,isDesktop:e}):(0,M.jsx)(H,{"data-testid":"".concat(s,"-text"),content:n[r],removeTagsAndContent:!1,tagsToRemove:[]}),link:n[({trustpilot:"trustPilotLink",rewards:"rewardPointsLink"})[s]||"".concat(s,"Link")],svg:np(s,t,n),key:r,order:t.widgets.uspBar.icon[s].order,useStrokeFill:["trustpilot","checkmark","countDown"].includes(s)}).svg||(a.svg=(0,M.jsx)(nt,{fill:t.widgets.uspBar.iconFill||t.colors.palette.greys.dark}),a.isClipBoard=!0),""!==a.link||delete a.link,i.push(a))}}),i.sort(function(n,e){return n.order-e.order}),i},nx=function(n){var e=n.panels;return(0,M.jsxs)(Z,{children:[(0,M.jsx)("div",{style:{position:"relative",width:"100%",display:"flex",justifyContent:"center"},children:e.map(function(n,t){return(0,M.jsx)(G,{"data-testid":"usp-desktop-panel",panelCount:e.length,index:t,children:n.link?(0,M.jsxs)(nl,{href:n.link,children:[(0,M.jsx)(E,{isClipBoard:n.isClipBoard,useStrokeFill:n.useStrokeFill,"data-testid":n.testId,children:n.svg}),n.child]}):(0,M.jsxs)(I,{children:[(0,M.jsx)(E,{isClipBoard:n.isClipBoard,useStrokeFill:n.useStrokeFill,children:n.svg}),n.child]})},n.key)})}),(0,M.jsx)(R,{children:Array(e.length).fill(null).map(function(n,t){return(0,M.jsx)(F,{index:t,panelCount:e.length},"indicator-".concat(t))})})]})},nv=function(n){var e=n.isDesktop,t=n.uspBarData,r=n.useAlternateIcon,i=(0,k.Fg)(),o=w.useMemo(function(){return ng(t,e,i,r)},[t,e,i,r]);return 0===o.length?(0,M.jsx)(N,{children:(0,M.jsx)(L,{"data-testid":"empty-panel"})}):(0,M.jsx)(N,{backgroundColour:null==t?void 0:t.backgroundColor,role:"complementary","data-testid":"usp-banner",children:(0,M.jsx)(nx,{panels:o})})},nm=t(20466),nw=t(41857),nb=w.memo(function(n){var e,t=n.showStripBanner,r=(0,nw.ND)(),i=r.hasZipPayUsp,o=r.hasStoreUsp,a=r.hasClickAndCollectUsp,s=null===(e=n.widgetData)||void 0===e||null===(e=e.header)||void 0===e?void 0:e.widgets.reduce(function(e,r){switch(r.__typename){case"ResponsiveUSPBar":e.push((0,M.jsx)(nv,{isDesktop:!0,uspBarData:r,userAgent:n.userAgent,useAlternateIcon:{qualityText:i,clickAndCollectText:a,storeText:o}},"USPBar"));break;case"ResponsiveUSPBarCustomisable":e.push((0,M.jsx)(nv,{isDesktop:!0,uspBarData:r,userAgent:n.userAgent,useAlternateIcon:{qualityText:i,clickAndCollectText:a,storeText:o}},"USPBarCustomisable"));break;case"GlobalStripBanner":if(t){var s=function(n){switch(n){case b.G.HOME_PAGE:return{text:r.stripBannerTextHomepage,href:r.stripBannerURLHomepage};case b.G.LANDING:case b.G.SEARCH:return{text:r.stripBannerTextPLP,href:r.stripBannerURLPLP};case b.G.ACCOUNT:return{text:r.stripBannerTextAccount,href:r.stripBannerURLAccount};case b.G.BASKET:return{text:r.stripBannerTextBasket,href:r.stripBannerURLBasket};case b.G.PRODUCT:return{text:r.stripBannerTextPDP,href:r.stripBannerURLPDP};default:return{text:r.stripBannerText,href:r.stripBannerURL}}}(n.pageType),l=s.text,u=s.href,c="true"===r.hideDefaultBanner&&""===l;e.push((0,M.jsx)(nm._,{stripBannerText:c?void 0:l||r.stripBannerText,stripBannerURL:u||r.stripBannerURL,hideDefaultBanner:c},"Stripbanner"))}}return e},[]).sort(function(n){return"USPBar"===n.key?-1:1});return(0,M.jsx)("aside",{"data-testid":"widget-banner",children:s})})}}]); //# sourceMappingURL=885.0af7802662e901e4.js.map