1(self.webpackChunksdm_app=self.webpackChunksdm_app||[]).push([[7920],{37920:function(e,t,n){"use strict";n.d(t,{A:function(){return k}});var r,o,a=n(1995),i=n(95656),l=n(13732),s=n(48535),u=n(53750),c=n(26932),d=n.n(c),p=n(11235),m=n(49592);(r=o||(o={})).CATEGORY="category",r.COLLECTION="collection",r.BRAND="brand";let h={"@context":"https://schema.org/","@type":"WebPage"},g={"@context":"https://schema.org/","@type":"Product"},v={"@type":"Offer",priceCurrency:"CAD",itemCondition:"https://schema.org/NewCondition"},f={"@context":"https://schema.org/","@type":"ProductCollection"},y={"@type":"Offer"},x=(e,t,n)=>{switch(e){case"category":case"brand":case"collection":{var r,o,a,i,l;let e=null==t?void 0:null===(l=t.viewDefinition)||void 0===l?void 0:null===(i=l.layout)||void 0===i?void 0:null===(a=i.sections)||void 0===a?void 0:null===(o=a.mainContentCollection)||void 0===o?void 0:null===(r=o.components)||void 0===r?void 0:r.filter(e=>{let{componentId:t}=e;return"productGridComponent"===t});if(!e||!e.length)break;let s=e.reduce((e,t)=>[...e,...t.data.productTiles],[]);if(!s.length)break;let u=s.map(e=>{var t,n,r;let{brand:o,title:a,productImage:i,articleNumber:l,pricing:s,link:u}=e;return{...g,name:"".concat(o," ").concat(a),url:u,image:null==i?void 0:null===(t=i[0])||void 0===t?void 0:t.imageUrl,sku:"BB_".concat(l),description:a,brand:o,offers:{...v,price:(null==s?void 0:s.price)?null==s?void 0:s.price:parseInt(null==s?void 0:null===(r=s.displayPrice)||void 0===r?void 0:r.substring(1,(null==s?void 0:null===(n=s.displayPrice)||void 0===n?void 0:n.indexOf("-"))-1)),url:u}}});return JSON.stringify({...h,name:null==n?void 0:n.headline,description:null==n?void 0:n.description,url:null==n?void 0:n.canonicalUrlSlug,mainEntity:{...f,offers:{...y,itemOffered:u}}})}}return"{}"};var C=n(54040),S=n(93321),b=n.n(S);let w=e=>{let{isVisible:t=!0,spinnerProps:n={}}=e;return t?(0,a.jsx)("div",{className:b().overlay,children:(0,a.jsx)(C.y,{...n})}):null};var A=n(19972),E=n(1264);let T=d()(()=>Promise.resolve().then(n.bind(n,1264)).then(e=>e.default),{loadableGenerated:{webpack:()=>[1264]},ssr:!1,loading:()=>(0,a.jsx)(u.y,{})});var k=e=>{var t,n,r;let{viewDefinitionResults:o,themeTokens:u,pageType:c,ssrFetchData:d,heroImageUrl:h,...g}=e,{isScrolling:v}=(0,A.By)(),{name:f,duration:y,status:C}=null!=d?d:{},S=(0,l.useMemo)(()=>{if(f&&y)return{name:f,duration:(0,m.wQ)(y),...C?{status:"".concat(C)}:{}}},[f,y,C]);if((0,l.useEffect)(()=>{S&&(0,m.Fo)(S)},[S]),null==o?void 0:o.isError)return console.error("BFF api failed - b3-ID: "+(null==o?void 0:null===(n=o.error)||void 0===n?void 0:n.b3)),i.captureMessage("BFF api failed - b3-ID: "+(null==o?void 0:null===(r=o.error)||void 0===r?void 0:r.b3)),(0,a.jsx)(p.default,{error:null==o?void 0:o.error});console.log("bff data ====>",null==o?void 0:o.bffData);let b=null==o?void 0:null===(t=o.viewDefinition)||void 0===t?void 0:t.viewMetaData,k=null==o?void 0:o.pageID,_=x(c,o,b),P={pageId:k,viewDefinition:null==o?void 0:o.viewDefinition,headerSection:null==o?void 0:o.headerSection,themeTokens:null!=u?u:void 0,...g};return(0,a.jsxs)(s.A,{seoMetaData:b,currentUrlBase:null==o?void 0:o.currentUrlBase,jsonLdScript:_,heroImageUrl:h,children:[(null==g?void 0:g.enableSSR)?(0,a.jsx)(E.default,{...P}):(0,a.jsx)(T,{...P}),(0,a.jsx)(w,{isVisible:v})]})}},1264:function(e,t,n){"use strict";n.d(t,{default:function(){return eK}});var r=n(1995),o=n(10865),a=n(13732),i=n(19972),l=n(71911),s=n(38489),u=n(32632),c=n(56559),d=n(53750),p=n(57919),m=n(76152),h=n(80859),g=e=>{let{typeId:t}=e,{API_VERSION_V2:o,MAIN_CONTENT_COLLECTION:i,PAGE_LAYOUT_SINGLE_COLUMN:l}=h.f2j,[s,u]=(0,a.useState)(null),[c,d]=(0,a.useState)(null);return(0,a.useEffect)(()=>{u((0,a.lazy)(()=>n.e(5482).then(n.t.bind(n,95482,23)))),d((0,a.lazy)(()=>n.e(9839).then(n.t.bind(n,99839,23))))},[]),(0,r.jsx)(r.Fragment,{children:t===l&&s?(0,r.jsx)(s,{apiVersion:o,layoutSection:i}):c&&(0,r.jsx)(c,{})})};let v=e=>{var t;let{initialData:l,themeTokens:s,headerSection:u,...v}=e,{renderDatePicker:f,isContentfulPreview:y,selectedDateTime:x}=(0,i.qO)(),{commonContextProps:C,locale:S,isClient:b}=(0,i.ut)(),w=(0,o.useRouter)(),[A,E]=(0,a.useState)(null);(0,a.useEffect)(()=>{var e,t;!b||(null==w?void 0:w.pathname)!=="/search"||(null==w?void 0:null===(e=w.query)||void 0===e?void 0:e.text)||(null==w?void 0:null===(t=w.query)||void 0===t?void 0:t.promotionCodes)||w.push("/")},[b,w]),(0,a.useEffect)(()=>{E((0,a.lazy)(()=>n.e(1999).then(n.t.bind(n,61999,23))))},[]);let T={sdmCartProviderProps:{...(0,c.useSDMCartContext)()},sdmCustomerProviderProps:{...(0,c.useSDMCustomerContext)()},sdmRouterProps:b&&w?{router:w}:{router:null},sdmViewportProviderProps:{...(0,c.useSDMViewportContext)()},provinceProviderProps:{children:null}},{cartCount:k,isInitialCartCountUpdated:_,setPageId:P}=(0,c.useSDMCartContext)(),{pcOptimumAccount:I}=(0,c.useSDMCustomerContext)(),{pageId:M}=v;return(0,a.useEffect)(()=>{P(M)},[M,P]),(0,i.b7)(k,M,I,_),(0,r.jsxs)(r.Fragment,{children:[A?(0,r.jsxs)(A,{...v,hadExistingSentry:!0,isPreview:y,previewDatetime:x,commonContexts:C,sdmContexts:T,queryConfig:{initialData:l,staleTime:1/0},themeTokens:s,PageLoadingFallback:()=>(0,r.jsx)(d.y,{}),locale:S,env:"production",children:[(0,r.jsx)(m.A,{headerSection:u||{region:h.dUo.ON}}),(0,r.jsx)(g,{typeId:l?null==l?void 0:null===(t=l.layout)||void 0===t?void 0:t.typeId:h.f2j.PAGE_LAYOUT_SINGLE_COLUMN}),(0,r.jsx)(p.A,{})]}):(0,r.jsx)(d.y,{}),y?f():null]})};var f=n(51551);let y=e=>{let{layoutSection:t,apiVersion:n="v1",hasFooter:o=!1}=e;return"v2"===n?(0,r.jsx)(f.SectionRenderersV2,{layoutSection:t,is
1FooterSection:o}):(0,r.jsx)(f.SectionRenderers,{layoutSection:t})};n(25292),n(25656),n(42219),n(98039),n(39078);var x=n(24740),C=n(21715),S=n(3423);let b=e=>{let{pageId:t,locale:n="en",initialData:o,children:i,PageErrorFallback:l=()=>null,PageLoadingFallback:s,...u}=e,{captureException:c}=(0,C.useSentryProvider)(),d=(0,S.lP)(),p=(0,S.vf)(),m=(0,S.W5)(),h=(0,a.useRef)(new Map);(0,a.useEffect)(()=>{h.current.clear()},[t,n]);let g=(0,a.useCallback)((e,n)=>{c(e,{tags:{section:"ViewResolverContainer",pageId:null!=t?t:"unknown",source:"sdm-view-resolver-ssr"},extra:{componentStack:n.componentStack}})},[c,t]),v={pageId:t,locale:n,viewDefinition:o,...u,skeletonMap:d,rendererMap:p,rendererCbMap:m,fetchOptions:{},renderersLoadedRef:h};return(0,r.jsx)(x.ErrorBoundary,{FallbackComponent:()=>(0,r.jsx)(l,{pageId:t}),onError:g,children:(0,r.jsx)(f.ViewResolverProvider,{...v,children:i})})},w=e=>{let{children:t,baseFont:n=12,designTokenPlatform:o="web",...a}=e,i=(0,S.lP)(),l=(0,S.Zz)(),s=(0,S.W5)();return(0,r.jsx)(f.ViewResolverLite,{skeletonMap:i,rendererMap:l,rendererCbMap:s,isFederated:!1,baseFont:n,designTokenPlatform:o,...a,children:t})};n(24782),n(4599);var A=n(98105),E=n(79747),T=n(80484),k=n(42391),_=n(81611),P=n(46006),I=n(12997),M=n(80385),L=n(82590),j=n(11200),D=n(95654);let R=e=>{let{data:t,isLoading:n}=e,o=(0,k.useSettingsContext)(),a=o.env,i=(0,S.UK)(a),l=o.locale;return t&&i?(0,r.jsx)(r.Fragment,{children:n?(0,r.jsxs)("div",{children:[(0,r.jsx)(D.MenuTileCarouselSkeleton,{}),(0,r.jsx)(D.MenuTileCarouselSkeleton,{}),(0,r.jsx)(D.MenuTileCarouselSkeleton,{})]}):(0,r.jsx)(w,{apiKey:null==i?void 0:i.apiKey,sduiBaseUrl:null==i?void 0:i.sduiBaseUrl,locale:l,pageId:"search-coldstart",PageLoadingFallback:()=>(0,r.jsxs)("div",{children:[(0,r.jsx)(D.MenuTileCarouselSkeleton,{}),(0,r.jsx)(D.MenuTileCarouselSkeleton,{}),(0,r.jsx)(D.MenuTileCarouselSkeleton,{})]}),queryConfig:{initialData:t,staleTime:1/0},children:(0,r.jsx)(y,{apiVersion:"v2",layoutSection:"mainContentCollection"})})}):null};var F=n(86567),O=n(80656),N=n(34650),B=n(88486);let U="dispatchEvent:",V={NO_ERROR:0,DISABLED:1},G={ZERO_RESULTS:"ZERO_RESULTS",INVALID_REQUEST:"INVALID_REQUEST"},W=()=>{let{hostname:e}=window.location;return e.includes("pharmaprix")||e.includes("phx")},z=e=>{let t=W(),n=e.toLowerCase();return!t&&/qc|québec/.test(n)},H=async(e,t)=>{try{var n,r,o;let a=await (0,N.fx)({location:{lat:e,lng:t}}),i=null===(o=a[0])||void 0===o?void 0:null===(r=o.address_components)||void 0===r?void 0:null===(n=r.find(e=>e.types.includes("postal_code")))||void 0===n?void 0:n.long_name;return null!=i?i:""}catch(e){return""}},q=e=>{let{locationFinder:t,locationSubmit:n,onAddressSelected:o,onMyLocationSelected:i,modalHeadline:l,displayQuebecAlert:s=!1,isOpen:u,onClose:c,locationSheet:d,displayAddressWarning:p=!1,onAlertCtaClick:m,shipping:h}=e,g=(0,T.useSimpleTranslation)(),{value:v,suggestions:{status:f,data:y,loading:x},clearSuggestions:C,setValue:S}=(0,N.Ay)({requestOptions:{types:["postal_code","street_address"],componentRestrictions:{country:["ca"]}}}),[b,w]=(0,a.useState)(V.NO_ERROR),A=(0,B.Ub)("(max-width: ".concat(649,"px)"));(0,a.useEffect)(()=>{u||(S(""),C())},[u,S,C]),(0,a.useEffect)(()=>{navigator.permissions&&navigator.permissions.query({name:"geolocation"}).then(e=>{"denied"===e.state?w(V.DISABLED):w(V.NO_ERROR)}).catch(()=>{})},[]);let E=!x&&f===G.ZERO_RESULTS&&v.length>0?g("noResults"):void 0,k={enableHighAccuracy:!0,timeout:5e3},_=async e=>{let t=y.find(t=>t.description===e);if(t)try{var n,r;let a=await (0,N.fx)({address:t.description}),i=null;if(null===(n=a[0])||void 0===n?void 0:n.address_components){let e=a[0].address_components.find(e=>e.types.includes("postal_code"));e&&(i=e.long_name)}let l=!1;o&&(l=null!==(r=await o(i,e))&&void 0!==r&&r),l||c()}catch(e){return G.INVALID_REQUEST}C()},P=e=>{e.code===V.DISABLED&&w(e.code)},I=()=>{b===V.DISABLED&&w(V.NO_ERROR),navigator.geolocation.getCurrentPosition(async e=>{var t,n;let{latitude:r,longitude:a}=e.coords,l=!0;if(i)l=!(null!==(t=await i(r,a))&&void 0!==t&&t);else if(o){let e=await H(r,a);l=!(null!==(n=await o(e))&&void 0!==n&&n)}l&&c()},e=>P(e),k)},M=y.map(e=>({...e,id:e.place_id,label:e.description})),L=g("locationAlertTitle"),j=g("locationAlertContent"),D=g("quebecAlertTitle"),R=g("quebecAlertContent"),U={text:g("quebecAlertCta"),url:"https://www1.pharmaprix.ca/fr/home"},W=g("autoCompleteSearchError"),z=g("locationFinderPostalCodeWarning"),q=(0,r.jsxs)(O.Flex,{flexDirection:"column",gap:"1.336rem",children:[b===V.DISABLED&&(0,r.jsx)(F.Alert,{variant:"warning",title:L,content:j,layout:"inline"}),p&&(0,r.jsx)(F.Alert,{variant:"warning",title:z,layout:"inline"}),s&&(0,r.jsx)(F.Alert,{variant:"error",title:D,content:R,layout:"inline",cta:U,preventDefaultCta:!!m,ctaClickHandler:m}),f===G.INVALID_REQUEST&&(0,r.jsx)(F.Alert,{variant:"error",title:W,layout:"inline"})]}),Q=(0,r.jsx)(F.LocationFinder,{label:t.label,value:v,onSelect:_,minimumCharacter:2,items:M,placeholder:t.placeholder,ariaLabelClear:g("a11yClearSearchLabel"),noResultsFound:E,isLoading:x,onValueChange:e=>{S(e)},clickHandler:()=>{S("")}}),K=h?{shipping:h}:{};return u?(0,r.jsxs)("div",{children:[t&&n&&!A&&(0,r.jsxs)(F.Modal,{onSubmit:I,open:u,onOpenChange:c,onClose:c,headerGroup:l,buttonAlignment:"left",submit:n,hasScroll:!0,...K,children:[q,Q]}),t&&n&&d&&A&&(0,r.jsxs)(F.Sheet,{open:u,onOpenChange:c,title:d.title,side:"bottom",isFullWidthButton:x,callToActions:[{text:g("useMyLocation"),action:"submit"}],callToActionHandler:I,hasIcon:!0,testId:"sheet",...K,children:[q,Q]})]}):null},Q="google-maps-places-script",K=null,Y=e=>{var t,n;return!!(null===(n=e.google)||void 0===n?void 0:null===(t=n.maps)||void 0===t?void 0:t.places)},X=async e=>{var t,n;let r=window;if(!Y(r)){if(null===(n=r.google)||void 0===n?void 0:null===(t=n.maps)||void 0===t?void 0:t.importLibrary)try{if
1(await r.google.maps.importLibrary("places"),Y(r))return}catch(e){}return K||(K=new Promise((t,n)=>{let r=document.getElementById(Q);if(r){r.addEventListener("load",()=>t(),{once:!0}),r.addEventListener("error",()=>n(Error("Failed to load Google Maps script")),{once:!0});return}let o=document.createElement("script");o.id=Q,o.src="https://maps.googleapis.com/maps/api/js?key=".concat(e,"&libraries=places®ion=CA"),o.async=!0,o.defer=!0,o.onload=()=>t(),o.onerror=()=>n(Error("Failed to load Google Maps script")),document.head.appendChild(o)}))}},Z={current:()=>{}},J=e=>{Z.current=e},$=e=>{Z.current()},ee=()=>{let{saveSddLocation:e}=(0,c.useSDMCartContext)(),[t,n]=(0,a.useState)(!1),[r,o]=(0,a.useState)(!1),[i,l]=(0,a.useState)(!1),s=(0,a.useCallback)(()=>{n(!1),l(!1),o(!1)},[]),u=(0,a.useCallback)(()=>{n(!0)},[]),d=(0,a.useCallback)(async(t,r)=>{let a=!1,i=!1;if(r&&z(r))o(!0),a=!0;else if(o(!1),!t||t.length<=3)l(!0),i=!0;else{try{await (null==e?void 0:e(t))}catch(e){}i=!1,n(!1),l(!1)}return i||a},[e]),p=(0,a.useCallback)(async(e,t)=>d(await H(e,t)),[d]);return{isModalVisible:t,showQuebecAlert:r,showAddressAlert:i,handleOpenModal:u,handleCloseModal:s,handlePostalCodeUpdate:d,handleMyLocationSelected:p}},et=()=>{let{getFeatureFlags:e}=(0,k.useFeatureFlags)(),{[L.C0]:t}=e(),{googleMapsApiKey:n}=(0,k.useSettingsContext)(),o=(0,c.useSDMRouterContext)(),i=(0,E.mu)(o),l=(0,T.useSimpleTranslation)(),[s,u]=(0,a.useState)(!1),{isModalVisible:d,showQuebecAlert:p,showAddressAlert:m,handleOpenModal:h,handleCloseModal:g,handlePostalCodeUpdate:v,handleMyLocationSelected:f}=ee(),y={headline:{text:l("shippingAndDeliveryAvailabilityModal"),headerType:"H3",alignment:"LEFT",level:3}};(0,a.useEffect)(()=>{if(!t){J(()=>{});return}return J(h),()=>{J(()=>{})}},[t,h]),(0,a.useEffect)(()=>{if(!d||!n)return;let e=!0;return X(n).then(()=>{e&&u(!0)}).catch(()=>{e&&u(!1)}),()=>{e=!1}},[n,d]),(0,a.useEffect)(()=>{d||u(!1)},[d]);let x=(0,a.useCallback)(e=>{i(e)},[i]);return t?(0,r.jsx)(r.Fragment,{children:d&&s&&(0,r.jsx)(q,{locationFinder:{label:l("shippingAndDeliveryAvailabilityDescription"),placeholder:l("locationFinderPlaceholder")},locationSubmit:l("useMyLocation"),onAddressSelected:v,onMyLocationSelected:f,modalHeadline:y,onClose:g,isOpen:d,displayQuebecAlert:p,displayAddressWarning:m,onAlertCtaClick:x,locationSheet:{title:l("shippingAndDeliveryAvailabilityModal")}})}):null};var en=n(43744);n(95937),n(94077),n(60629),n(57689),n(18667),n(88087),n(70621),n(2072),n(3329),n(26137);var er=n(79890),eo=n(9e4),ea=n(25505),ei=n(78800),el=n(47005),es=n(76055),eu=n(88526);let ec=e=>{let{filterGroups:t,clearAllLabel:n,removeFilterLabel:o}=e,a=t.map(e=>{let t=e.code;return e.values.filter(e=>e.selected).map(e=>({...e,parentCode:t}))}).flat(),i=a.length>0,l=(0,c.useSDMRouterContext)(),s=(0,P.mu)(l),u=(0,S.Ts)(),d=(0,S.ri)(),p=(0,eu.useFilterTracking)();return(0,r.jsx)(r.Fragment,{children:i&&(0,r.jsx)(en.Box,{m:0,p:0,children:(0,r.jsx)(es.ClearAllContainer,{clearAllLabel:n,filters:a,handleClearAll:()=>{s(u())},handleRemoveFilter:e=>{(0,P.Tl)(e,t,d,p,s)},removeFilterLabel:o})})})};function ed(){let e=(0,er._)(["\n & > div.chakra-container {\n padding: 0;\n margin-left: 0;\n margin: 2rem 0 1.3rem;\n }\n"]);return ed=function(){return e},e}function ep(){let e=(0,er._)(["\n grid-template-columns: 100% !important;\n"]);return ep=function(){return e},e}let em={MAIN_CONTENT_COLLECTION:"mainContentCollection",BANNER_SECTION:"bannerSection",FILTER_SECTION:"filtersSection",HEADLINE_SECTION:"headlineSection",QUICK_FILTER_SECTION:"quickFiltersSection",SORTS_SECTION:"sortsSection"},eh=(0,ea.default)("div")(ed()),eg=(0,ea.default)(el.ListingPageLayout)(ep());var ev=()=>{var e,t,n,o,i,l;let{isDesktopView:s}=(0,S.rq)(),{MAIN_CONTENT_COLLECTION:u,BANNER_SECTION:c,FILTER_SECTION:d,HEADLINE_SECTION:p,QUICK_FILTER_SECTION:m,SORTS_SECTION:h}=em,g=ei.API_VERSION.v2,v=(0,T.useSimpleTranslation)(),{viewDefinition:{searchRequestId:x,searchTerm:C,searchTermSubmitted:b,typedSearchTerms:w,modelVersion:A,searchVariation:E}}=(0,f.useViewResolverContext)(),{trackEvent:_}=(0,k.useAnalyticsContext)(),I=(null===(t=(0,f.useLayoutSectionV2)(d).find(e=>"filtersComponent"===e.componentId))||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.filterGroups)||[],M=(0,f.useLayoutSectionV2)(u),L=(null===(o=(0,f.useLayoutSectionV2)(h).find(e=>"sortsComponent"===e.componentId))||void 0===o?void 0:null===(n=o.data)||void 0===n?void 0:n.sorts)||[],j=(0,a.useMemo)(()=>(0,P.pi)(I,L),[I,L]),D=null==M?void 0:M.filter(e=>"productGridComponent"===e.componentId),R=null==D?void 0:null===(l=D[D.length-1])||void 0===l?void 0:null===(i=l.data)||void 0===i?void 0:i.pagination,F=(0,a.useMemo)(()=>(null==D?void 0:D.flatMap(e=>e.data.productTiles))||[],[D]),N=(0,a.useCallback)(e=>{let t=(0,eu.getSnowplowSearchPageContext)(e);_(t.eventType,t)},[_]),B=()=>{let e=(null==R?void 0:R.pageSize)||48,t=(null==R?void 0:R.totalResults)||0;N({pagination:{currentPage:(null==R?void 0:R.pageNumber)||0,pageSize:e,totalResults:t},products:F,search:{searchRequestId:x||"",searchTerms:C||"",searchTermSubmitted:b||"",typedSearchTerms:w||"",totalSearchResults:t||0},dsModel:[{type:"modelVersion",value:A||""},{type:"searchVariation",value:E||""}],filters:j.filters||[],sortEventValue:j.sort||""})};(0,a.useEffect)(()=>{var e,t;(null===(t=window)||void 0===t?void 0:null===(e=t.location)||void 0===e?void 0:e.pathname)==="/search"&&B()},[]);let U=!I.length&&F.length>0&&L.length>0,V=M.length&&I.length>0?el.ListingPageLayout:eg;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(y,{apiVersion:g,layoutSection:c}),(0,r.jsxs)(V,{children:[s?(0,r.jsx)(eo.E,{children:(0,r.jsx)(y,{apiVersion:g,layoutSection:d})}):null,(0,r.jsxs)(eo.E,{children:[(0,r.jsx)(eh,{children:(0,r.jsx)(y,{apiVersion:g,layoutSection:p})}),s?null:(0,r.jsx)(en.Box,{display:{base:"flex",lg:"none"},style:{marginBottom:"8px"},children:(0,r.jsx)(y,{apiVersion:g,layoutSection:d})}),(0,r.jsxs)(O.Flex,{children:[(0,r.jsx)(en.Box,{children:(0,r.jsx)(y,{apiVersion:g,layoutSection:m})}),(0,r.jsx)(O.Spacer,{}),s||U?(0,r.jsx)(en.Box,{children:(0,r.jsx)(y,{apiVersion:g,layoutSection:h})}):null]}),(0,r.jsx)(ec,{filterGroups:I,removeFilterLabel:v("removeFilters"),clearAllLabel:v("clearAll")}),(0,r.jsx)(y,{apiVersion:g,layoutSection:u})]})]})]})},ef=n(64614);function ey(){let e=(0,er._)(["\n & > div.chakra-container {\n margin: 0;\n padding: 0 0 1rem 0;\n }\n"]);return ey=function(){return e},e}let ex={MAIN_CONTENT_COLLECTION:"mainContentCollection",HEADLINE_SECTION:"headlineSection",QUICK_FILTER_SECTION:"quickFiltersSection"},eC=(0,ea.default)("div")(ey());var eS=e=>{let{id:t}=e,{isDesktopView:n}=(0,S.rq)(),{MAIN_CONTENT_COLLECTION:o,HEADLINE_SECTION:a,QUICK_FILTER_SECTION:i}=ex;return(0,r.jsxs)(ef.WrapperSection,{id:t,style:{maxWidth:"120rem",paddingInline:n?"22rem":"1.33rem"},children:[(0,r.jsx)(eC,{"data-testid":"favouritelp-headline-section",children:(0,r.jsx)(y,{apiVersion:ei.API_VERSION.v2,layoutSection:a})},"headline-section"),(0,r.jsx)(y,{apiVersion:ei.API_VERSION.v2,layoutSection:i}),(0,r.jsx)(y,{apiVersion:ei.API_VERSION.v2,layoutSection:o})]})};let eb=()=>{let{viewDefinition:e}=(0,f.useViewResolverContext)();return"favourite"===(null==e?void 0:e.categoryId)?(0,r.jsx)(eS,{}):(0,r.jsx)(ev,{})};n(78597),n(69768),n(63041),n(17568);let ew={en:{skip:"skip",a11ySection:"this section",loadMore:"Load More",search:"Search",sort:"Sort",sortBy:"Sort By:",categories:"Categories",filters:"Filters",clearAll:"Clear All",moreFilters:"More filters",lessFilters:"Less filters",cancelGoBack:"Cancel, go back",removeFilters:"Remove Filter",showAllResults:"Show All Results",showResults:"Show {numberOfFilterResults} Results",a11ySkipToFilterSection:"Skip to Filter section",a11yAddToCart:"Add {productName} to cart",a11yDecreaseQuantity:"Decrease quantity for {productName}",a11yIncreaseQuantity:"Increase quantity for {productName}",a11yEditQuantity:"{productName} in Cart, edit quantity",a11yViewProductDetails:"View Product Details",a11yQuantityInCart:"{quantity} {productName} in cart",a11yQuantityInCartLabel:"Quantity in cart",a11yQuantityLimitReached:"Quantity increased to {quantity}. Item limit reached. You cannot add any more {productName}",a11yStarRatingLabel:"Rated {rating} out of 5 stars",a11yBreadcrumbs:"Breadcrumbs",a11yClearSearchTerm:"Clear search term",a11yQuickFilters:"Quick filters",a11ySelectedFilters:"(filters selected)",a11yFilterLegend:"filter by {filterGroupName}. Choosing a filter will reload the page with the new results",a11yMenuButtonR1:"menu-button-:r1:",a11yPageNumber:"Page",a11yNextPage:"Next Page",a11yPreviousPage:"Previous Page",a11ySubmitSearch:"Submit search",a11yBanner:"Banners",a11yNextSlide:"Next slide",a11yPreviousSlide:"Previous slide",a11yNextArrow:"Next arrow",a11yPreviousArrow:"Previous arrow",a11yPagination:"Pagination",sponsoredLabel:"Sponsored",a11ySliderPrevLabel:"Previous slide",a11ySliderNextLabel:"Next slide",a11ySliderFirstLabel:"Go to first slide",a11ySliderLastLabel:"Go to last slide",a11ySlideXLabel:"Go to slide %s",a11ySlideLabel:"slide %s",a11ySliderSelectLabel:"Select a slide to show",close:"Close",a11yClearSearchLabel:"clear Search",a11yMegaMenuExploreMessage:"Press Right Arrow key to explore links.",a11yMegaMenuAriaLabel:"Main navigation",megaMenuCloseLabel:"Close",ariaLabelOpenMenu:"Open Menu",requiredInputFieldError:"Error: This field is required.",nameFieldValidationError:"Error: You have entered numbers or special characters.",emailFieldValidationError:"Error: Please enter a valid email address.",inputFieldValidationError:"Error: Invalid characters.",nameMaxLengthError:"Error: You can only enter up to 60 characters.",zeroResultsFound:"results are found.",formSuccessAlertHeader:"Your inquiry has been submitted!",formSuccessAlertBody:"Thank y
1ou for reaching out to us. Our customer service team will get in touch with you as soon as possible.",formErrorAlertHeader:"Something went wrong.",formErrorAlertBody:"Your submission wasn't successful. Please try again!",pcoAlertHeader:"Need help with PC Optimum offers & points?",pcoAlertBody:"Please visit us at [PCOptimum.ca](https://www.pcoptimum.ca/) to submit your inquiry.",pcoDropdownValue:"PC Optimumâ¢",signUpSuccessAlertHeader:"Signed up successfully",signUpSuccessAlertBody:"Thanks for joining! Look out for your first offer of 10,000 PC Optimum⢠points.",signUpSubmitErrorHeader:"Sorry, something went wrong on our end.",signUpSubmitErrorBody:"Your sign up wasnât successful. Please try again!",emailValidationError:"Invalid email format. Try again!",emailSignUpRequiredInputError:"Please enter an email address to sign up.",phoneValidationError:"Please enter a valid phone number.",phoneSignUpRequiredInputError:"Please enter a phone number to sign up.",shippingAndDeliveryAvailabilityModal:"Shipping and same day delivery availability",shippingAndDeliveryAvailabilityDescription:"Enter your address or postal code to check if shipping and same day delivery is available in your area.",locationFinderPlaceholder:"Enter Address or Postal Code",useMyLocation:"Use my location",noResults:"No results match your search",quebecAlertTitle:"Shipping to Quebec",quebecAlertContent:"Orders cannot be shipped to Quebec. To ship items to Quebec, please shop on Pharmaprix.",quebecAlertCta:"Shop Pharmaprix",locationAlertTitle:"Location sharing disabled",locationAlertContent:"To enable location sharing, update your browser settings.",autoCompleteSearchError:"Search is unavailable at this time. Please try again later.",locationFinderPostalCodeWarning:"Please try another address or postal code"},fr:{skip:"sauter",a11ySection:"cette section",loadMore:"Charger plus d'articles",search:"Recherche",sort:"Trier",sortBy:"Trier par:",categories:"Cat\xe9gories",filters:"Filtres",clearAll:"Effacer tout",moreFilters:"Plus de filtres",lessFilters:"Moins de filtres",cancelGoBack:"Annuler",removeFilters:"Retirer les filtre",showAllResults:"Voir tous les r\xe9sultats",showResults:"Afficher {numberOfFilterResults} r\xe9sultats",a11ySkipToFilterSection:"Passer au filtrage du contenu",a11yAddToCart:"Ajouter {productName} au panier",a11yDecreaseQuantity:"Diminuer la quantit\xe9 pour {productName}",a11yIncreaseQuantity:"Augmenter la quantit\xe9 pour {productName}",a11yEditQuantity:"{productName} dans le panier, modifier la quantit\xe9",a11yViewProductDetails:"Voir les d\xe9tails du produit",a11yQuantityInCart:"{quantity} {productName} dans le panier",a11yQuantityInCartLabel:"Quantit\xe9 dans le panier",a11yQuantityLimitReached:"Quantit\xe9 augment\xe9e \xe0 {quantity}. Limite d'articles atteinte. Vous ne pouvez pas ajouter plus de {productName}",a11yStarRatingLabel:"Score de {rating} sur 5 \xe9toiles",a11yBreadcrumbs:"Piste de navigation",a11yClearSearchTerm:"Effacer le terme de recherche",a11yQuickFilters:"Filtres rapides",a11ySelectedFilters:"(filtres s\xe9lectionn\xe9s)",a11yFilterLegend:"filtrer par {filterGroupName}. Le choix d'un filtre rechargera la page avec les nouveaux r\xe9sultats",a11yMenuButtonR1:"bouton-de-menu-:r1:",a11yPageNumber:"Page",a11yNextPage:"Page suivante",a11yPreviousPage:"Page pr\xe9c\xe9dente",a11ySubmitSearch:"Soumettre la recherche",a11yNextSlide:"Prochaine diapositive",a11yPreviousSlide:"Diapositive pr\xe9c\xe9dente",a11yBanner:"Banni\xe8res",a11yNextArrow:"Fl\xe8che suivante",a11yPreviousArrow:"Fl\xe8che pr\xe9c\xe9dente",a11yPagination:"Pagination",sponsoredLabel:"Sponsoris\xe9",a11ySliderPrevLabel:"diapositive pr\xe9c\xe9dente",a11ySliderNextLabel:"diapositive suivante",a11ySliderFirstLabel:"aller \xe0 la premi\xe8re diapositive",a11ySliderLastLabel:"aller \xe0 la derni\xe8re diapositive",a11ySlideXLabel:"aller \xe0 la diapositive %s",a11ySlideLabel:"diapositive",a11ySliderSelectLabel:"s\xe9lectionner une diapositive \xe0 montrer",close:"Fermer",a11yClearSearchLabel:"Effacer la recherche",a11yMegaMenuExploreMessage:"Appuyez sur la touche Fl\xe8che droite pour explorer les liens.",megaMenuCloseLabel:"Fermer",a11yMegaMenuAriaLabel:"Navigation principale",ariaLabelOpenMenu:"Ouvrir le menu",requiredInputFieldError:"Erreur : Ce champ est obligatoire.",nameFieldValidationError:"Erreur : Vous avez saisi des chiffres ou des caract\xe8res sp\xe9ciaux.",emailFieldValidationError:"Erreur : Veuillez fournir une adresse courriel val
1ide.",inputFieldValidationError:"Erreur : Caract\xe8res non valides.",nameMaxLengthError:"Erreur : Vous ne pouvez pas saisir plus de 60 caract\xe8res.",zeroResultsFound:"les r\xe9sultats sont trouv\xe9s.",formSuccessAlertHeader:"Votre question a \xe9t\xe9 soumise!",formSuccessAlertBody:"Merci de nous avoir contact\xe9s. Notre \xe9quipe de service \xe0 la client\xe8le communiquera avec vous d\xe8s que possible.",formErrorAlertHeader:"Un probl\xe8me est survenu.",formErrorAlertBody:"Votre demande a \xe9chou\xe9. Veuillez r\xe9essayer!",pcoAlertHeader:"Besoin d'aide avec les offres et les points PC Optimum ?",pcoAlertBody:"Visitez notre site \xe0 [PCOptimum.ca](https://www.pcoptimum.ca/) pour soumettre votre demande.",pcoDropdownValue:"PC Optimum\uD83C\uDD6A",signUpSuccessAlertHeader:"Inscription r\xe9ussie",signUpSuccessAlertBody:"Merci de vous \xeatre inscrit au bulletin! Restez \xe0 lâaff\xfbt de votre premi\xe8re offre de 10 000 points PC Optimum\uD83C\uDD6A.",signUpSubmitErrorHeader:"D\xe9sol\xe9, une erreur sâest produite de notre c\xf4t\xe9.",signUpSubmitErrorBody:"Votre inscription nâa pas r\xe9ussi. Veuillez r\xe9essayer!",emailValidationError:"Format dâadresse courriel non valide. Veuillez r\xe9essayer!",emailSignUpRequiredInputError:"Veuillez entrer une adresse courriel pour vous inscrire.",phoneValidationError:"Veuillez entrer un num\xe9ro de t\xe9l\xe9phone valide.",phoneSignUpRequiredInputError:"Veuillez entrer un num\xe9ro de t\xe9l\xe9phone pour vous inscrire.",shippingAndDeliveryAvailabilityModal:"Disponibilit\xe9 de la livraison standard et le jour m\xeame",shippingAndDeliveryAvailabilityDescription:"Entrez votre adresse ou votre code postal pour v\xe9rifier si la livraison standard et la livraison le jour m\xeame sont offertes dans votre secteur.",locationFinderPlaceholder:"Entrez votre adresse ou votre code postal.",useMyLocation:"Utiliser mon emplacement",noResults:"Aucun r\xe9sultat ne correspond \xe0 votre recherche.",quebecAlertTitle:"Exp\xe9dition au Qu\xe9bec",quebecAlertContent:"Les commandes ne peuvent pas \xeatre exp\xe9di\xe9es au Qu\xe9bec. Pour exp\xe9dier des articles au Qu\xe9bec, veuillez magasiner sur le site de Pharmaprix.",quebecAlertCta:"Magasiner sur Pharmaprix.ca",locationAlertTitle:"Partage d'emplacement d\xe9sactiv\xe9",locationAlertContent:"Pour activer le partage d'emplacement, mettez \xe0 jour les param\xe8tres de votre navigateur.",autoCompleteSearchError:"La recherche n'est pas disponible pour le moment. Veuillez r\xe9essayer plus tard.",locationFinderPostalCodeWarning:"Veuillez essayer une autre adresse ou un autre code postal"}};var eA=n(17437),eE=n(46114);let eT=["30%","25%","60%","50%","30%","60%","60%","50%"],ek=()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eA.Global,{styles:{".skeleton-container":{padding:"2.672rem 2.672rem 0 2.672rem",position:"absolute",top:"0",zIndex:"0",width:"100%"},".stack":{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"1.336rem"},".skeleton":{height:"20px","--skeleton-start-color":"#f7fafc","--skeleton-end-color":"#a0aec0",opacity:.7,boxShadow:"none",backgroundClip:"padding-box",cursor:"default",color:"transparent",pointerEvents:"none",userSelect:"none",borderColor:"#a0aec0",borderRadius:"0.125rem",animation:"0.8s linear 0s infinite alternate none running animation-14pkoxc",marginBottom:"2.04rem"}}}),(0,r.jsx)("div",{className:"skeleton-container","data-testid":"skeleton-container",children:(0,r.jsx)("div",{className:"stack",children:eT.map((e,t)=>(0,r.jsx)("div",{className:"skeleton",style:{width:e}},"skeleton-".concat(t)))})})]});function e_(){let e=(0,er._)(["\n .rc-drawer-mask {\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n position: absolute;\n width: 100%;\n z-index: 1050;\n background: rgba(0, 0, 0, 0.5);\n pointer-events: auto;\n }\n\n .rc-drawer-content-wrapper {\n position: absolute;\n z-index: 1050;\n }\n\n .rc-drawer-left .rc-drawer-content-wrapper {\n top: 0;\n bottom: 0;\n left: 0;\n }\n\n .rc-drawer-right .rc-drawer-content-wrapper {\n top: 0;\n right: 0;\n bottom: 0;\n }\n\n @media (max-width: 25.875em) {\n .rc-drawer-content-wrapper {\n width: 100% !important;\n }\n }\n\n .rc-drawer-content {\n background: #ffffff;\n width: 100%;\n height: 100%;\n }\n "]);return e_=function(){return e},e}n(45125);let eP=e=>{let{children:t}=e,[n,o]=(0,a.useState)(!1),i=(0,a.useRef)(null),[l,s]=(0,a.useState)(!1);(0,a.useEffect)(()=>{s(!0)},[]);let u=(0,a.useCallback)(()=>{o(!1)},[o]);return(0,r.jsxs)(c.PlpContextProvider,{shouldShowDrawer:n,setShouldShowDrawer:o,drawerRef:i,children:[t,l?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eA.Global,{styles:(0,eA.css)(e_())}),(0,r.jsx)(eE.PortalDrawer,{open:n,onClose:u,ref:i,forceRender:!0,placement:"right",children:n&&(0,r.jsx)(ek,{})})]}):null]})};eP.displayName="PlpContextWrapper";var eI=e=>{let{locale:t,pageId:n,seo:o,commonContexts:a,sdmContexts:i,env:l=S.NU.DEVELOPMENT,PageErrorFallback:s=()=>(0,r.jsx)("div",{"data-testid":"default-page-error"}),PageLoadingFallback:u=()=>(0,r.jsx)("div",{"data-testid":"default-page-loading"}),hadExistingSentry:d=!1,isDrawer:p,children:m,...h}=e,g=(0,S.UK)(l),v=null==a?void 0:a.settings,f=null==v?void 0:v.baseFont,y=null==v?void 0:v.designTokenPlatform;return g?(0,r.jsx)(C.SentryProvider,{useExistingSentry:d,children:(0,r.jsx)(T.SimpleI18nContextProvider,{lang:t,translations:ew,children:(0,r.jsx)(k.CommonContexts,{...a,settings:{...a.settings,isDrawer:p,env:l},children:p?(0,r.jsx)(b,{apiKey:g.apiKey,sduiBaseUrl:g.sduiBaseUrl,locale:t,pageId:n,baseFont:f,designTokenPlatform:y,PageErrorFallback:s,PageLoadingFallback:u,...h,children:(0,r.jsx)(c.SDMContexts,{...i,children:m})}):(0,r.jsx)(eP,{children:(0,r.jsx)(b,{apiKey:g.apiKey,sduiBaseUrl:g.sduiBaseUrl,locale:t,pageId:n,baseFont:f,designTokenPlatform:y,PageErrorFallback:s,PageLoadingFallback:u,...h,children:(0,r.jsx)(c.SDMContexts,{...i,children:m})})})})})}):(0,r.jsx)(u,{})},eM=e=>{let{typeId:t}=e,{API_VERSION_V2:n,MAIN_CONTENT_COLLECTION:o,PAGE_LAYOUT_SINGLE_COLUMN:a}=h.f2j;return(0,r.jsx)(r.Fragment,{children:t===a?(0,r.jsx)(y,{apiVersion:n,layoutSection:o}):(0,r.jsx)(eb,{})})},eL=n(37789);let ej=["Enter postal code","Entrez un code postal"],eD=["Select a store","S\xe9lectionnez un magasin"],eR=()=>"".concat(U).concat("openShippingFulfillmentModal"),eF=e=>{var t,n,r,o,a;return!!e&&((null!==(r=null===(t=e.callToAction)||void 0===t?void 0:t.url)&&void 0!==r?r:"")===eR()||"".concat(null!==(o=e.label)&&void 0!==o?o:""," ").concat(null!==(a=null===(n=e.callToAction)||void 0===n?void 0:n.text)&&void 0!==a?a:"").toLowerCase().includes("postal"))},eO=(e,t,n)=>{var r,o;let a=null!==(r=null==n?void 0:n.enableSameDayDelivery)&&void 0!==r&&r,i=null!==(o=null==e?void 0:e.filter(e=>"navigationItemComponent"===e.componentId))&&void 0!==o?o:[],l=e=>{let t=e.replace(U,"");window.dispatchEvent(new CustomEvent(t))},s=eR();return i.map((e,r)=>{var o,i,u,c,d,p,m;let h=null!==(i=e.data)&&void 0!==i?i:{},g=h.dropdownItems,v=(null==g?void 0:g.length)?"STANDARD":"SIGN_IN",f=null!==(u=null===(o=h.callToAction)||void 0===o?void 0:o.text)&&void 0!==u?u:"",y=f||h.label||"";ej.includes(f)&&(null==n?void 0:n.sddPostalCode)&&(y=n.sddPostalCode),eD.includes(f)&&(null==n?void 0:n.pickupStoreName)&&(y=n.pickupStoreName);let x=a&&0===r&&eF(h),C=x?s:(null===(p=h.callToAction)||void 0===p?void 0:null===(d=p.url)||void 0===d?void 0:d.startsWith(U))?h.callToAction.url:(null===(m=h.callToAction)||void 0===m?void 0:m.url)||"",S=x?$
1:C.startsWith(U)?l:t;return{...h,variantId:null!==(c=e.variantId)&&void 0!==c?c:"",navItemVariant:v,callToActionHandler:S,callToAction:{...h.callToAction,text:y,url:C},...x?{testId:"top-bar-postal-code"}:{},...1===r&&a?{testId:"top-bar-store"}:{}}})};var eN=n(16410),eB=n(80004),eU=n(28146),eV=n(59818);let eG=(e,t)=>{if(null===e&&null===t)return"";let n=e?e.charAt(0).toUpperCase():"",r=t?t.charAt(0).toUpperCase():"";return"".concat(n," ").concat(r)},eW=e=>{let{firstName:t,lastName:n}=e;return(0,a.useMemo)(()=>eG(t,n),[t,n])};var ez=function(){var e,t,n,o,i,l;let s,u,d,p,m,h,g,v,y,x,b,w,D,F,O,N,U,V,G,{headerData:W}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[z,H]=(0,a.useState)(!1);(0,a.useEffect)(()=>{H(!0)},[]);try{if(W)s=W;else{let{viewDefinition:e}=(0,f.useViewResolverContext)();s=e.header}}catch(e){console.warn("ViewResolverContext not available, using headerData prop:",e),s=W}let{setProvinceId:q,provinceId:Q}=(0,c.useProvinceContext)(),{commonContextProps:K}=(0,eV.u)(),Y=(0,k.useSettingsContext)(),{EnableHeliosSnowplow:X,isSearchColdStartEnabled:Z}=(null==K?void 0:K.featureFlags)||{},J=Y.env,$=(0,S.UK)(J),ee=Y.locale,{router:er}=(0,c.useSDMRouterContext)(),{cartCount:eo,entries:ea,id:ei,sddPostalCode:el,pickupStoreName:es}=(0,c.useSDMCartContext)(),{firstName:eu,lastName:ec,customerId:ed}=(0,c.useSDMCustomerContext)(),{trackEvent:ep}=(0,k.useAnalyticsContext)(),{getFeatureFlags:em}=(0,k.useFeatureFlags)(),{[L.C0]:eh}=em(),eg=(0,E.mu)(er),ev=(0,T.useSimpleTranslation)(),[ef,ey]=(0,a.useState)(!1),[ex,eC]=(0,a.useState)([]),[eS,eb]=(0,a.useState)(""),[ew,eA]=(0,a.useState)(0),[eE,eT]=(0,a.useState)(!1),[ek,e_]=(0,a.useState)(!1),[eP,eI]=(0,a.useState)(!1),eM=(0,a.useRef)(null),[eL,ej]=(0,a.useState)(),eD=(0,a.useRef)($);(0,a.useEffect)(()=>{eD.current=$},[$]);let[eR,eF]=(0,a.useState)(!1),eG=(0,a.useRef)(),[ez,eH]=(0,B.Mj)(L.eC,[]),eq=z?ez:[],eQ=z?eH:()=>{},eK=(0,a.useCallback)(()=>{ey(e=>!e)},[]),eY=(0,S.cn)(),{sp07:eX,sp05:eZ}=(0,eU.D)(),eJ=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:j.uM.MANUAL_SEARCH,n=[j.uM.PREVIOUS_SEARCH_TERM,j.uM.TRENDING_SEARCH_TERM].includes(t);if(sessionStorage.setItem(j.qJ,JSON.stringify({searchTermsType:t,typedSearchTerms:n?"":eS.toString()})),L.CP[ee]&&e.toString()===L.CP[ee].EMPTY_MESSAGE)return;let r={text:(0,P.T0)(e.toString()||eS.toString()),lang:ee},o=eY(r);eQ(tb(r.text)),eg(o),eF(!1)},e$=(0,a.useCallback)(e=>{let t=j.uM.TYPEAHEAD;if("string"==typeof e)switch(!0){case e.includes(L.Re.YOUR_SUGGESTIONS):t=j.uM.PREVIOUS_SEARCH_TERM;break;case e.includes(L.Re.TRENDING_SUGGESTIONS):t=j.uM.TRENDING_SEARCH_TERM;break;default:t=j.uM.TYPEAHEAD}eJ(e,t)},[eJ]),e0=(0,a.useCallback)((e,t)=>{ep("heliosNavClick",{event:e,component:null==t?void 0:t.component,heliosSnowplow:X,heliosAnalytics:!0})},[]),e1=(0,a.useCallback)((e,t)=>{eM.current={type:e,context:t}},[]),e5=e=>{var t,n,r;eb(e);let o=e.length;Z&&o>=3?(null===(n=eG.current)||void 0===n||null===(t=n.setClose)||void 0===t||t.call(n),eF(!1)):eF(!0);let a=eD.current;if(o>=3){e_(!0),eI(!1);let{domainUserId:t}=null!==(r=null===I.getSnowplowUserIdentifications||void 0===I.getSnowplowUserIdentifications?void 0:(0,I.getSnowplowUserIdentifications)())&&void 0!==r?r:{},n=(0,I.getCiamAccessToken)();(0,P.WQ)({value:e,config:a,locale:ee,cartId:ei,snowplowSpecifications:{domainUserId:t},ciamAccessToken:n,customerId:ed,setQueryList:eC,onComplete:()=>{e_(!1),eI(!0),eA(e=>e+1)}})}else eA(e=>e+1)},e2=e=>eb(e),e9=(0,a.useCallback)(e=>{eT(!0),eg(e)},[eg]);(0,a.useEffect)(()=>{if(eE&&eM.current){let e=eM.current;ep("heliosNavClick",{event:e.type,component:e.context.component})}},[eE,eu,ec]);let e3=e=>{e.forEach((t,n)=>{t.noOuterWrapper=!0,t.noOuterWrapperCSS={marginBottom:n!==e.length-1?eZ:"0"}})},e4=async()=>{var e,t,n;e_(!0);let r=await (0,P.NP)({config:$,locale:ee});e_(!1);let o=null===(n=r.layout)||void 0===n?void 0:null===(t=n.sections)||void 0===t?void 0:null===(e=t.mainContentCollection)||void 0===e?void 0:e.components;o&&e3(o),ej(r)};(0,a.useEffect)(()=>{$&&Z&&e4()},[$,Z]);let e6=eW({firstName:eu,lastName:ec}),e7=null==s?void 0:null===(e=s.topRightSection)||void 0===e?void 0:e.components,e8=e7&&null!==(l=e7.find(e=>"provinceListComponent"===e.componentId))&&void 0!==l?l:null,te=null==e8?void 0:e8.data,tt=null==e8?void 0:null===(t=e8.data)||void 0===t?void 0:t.provinceList,tn=(0,a.useMemo)(()=>tt?tt.map(e=>({...e,selected:e.code===Q})):[],[tt,Q]),tr=e=>{q(e),eg(er.asPath)},to=null==s?void 0:s.accountSection,ta=null==to?void 0:null===(o=to.components)||void 0===o?void 0:null===(n=o[0])||void 0===n?void 0:n.data,ti=null==ta?void 0:ta.dropdownItems,tl=(0,a.useMemo)(()=>null==ti?void 0:ti.map(e=>"dropdownItem"===e.componentId?{variantId:null!==e.variantId?e.variantId:void 0,callToAction:e.callToAction,leftIcon:e.leftIconImage||null}:"headerGroupComponent"===e.componentId?{sectionHeading:{text:e.data.headline.text}}:{}),[ti]);try{(()=>{var e,t,n,r,o,a,i,l,c,f,C,S,A,E,T,k,_,P,I;if(!s||"object"!=typeof s)throw Error("Masthead header data is missing");d=null==(u=s.categoryNavigationSection)?void 0:u.components,p=s.bottomSection,h=null==(m=null===(e=s.logoSection)||void 0===e?void 0:e.components)?void 0:null===(t=m[0])||void 0===t?void 0:t.data,v=null==(g=null===(n=s.storeSection)||void 0===n?void 0:n.components)?void 0:null===(r=g[0])||void 0===r?void 0:r.data,y=null===(i=s.searchSection)||void 0===i?void 0:null===(a=i.components)||void 0===a?void 0:null===(o=a[0])||void 0===o?void 0:o.data,(x=null===(f=s.cartSection)||void 0===f?void 0:null===(c=f.components)||void 0===c?void 0:null===(l=c[0])||void 0===l?void 0:l.data)&&void 0!==ea&&(x={...x,count:eo,showCount:!!eo&&eo>0}),b=null===(C=s.featuredServicesSection)||void 0===C?void 0:C.components,w=null==g?void 0:g.concat(b),D=ta?null==w?void 0:w.concat(null==to?void 0:to.components):null==w?void 0:w.concat(e7),O=null==(F=s.topLeftSection)?void 0:null===(A=F.components)||void 0===A?void 0:null===(S=A[0])||void 0===S?void 0:S.data;let M=eO(e7,eg,{enableSameDayDelivery:eh,sddPostalCode:el,pickupStoreName:es});N={logo:h,store:null!=v?v:null,search:y?{placeholderText:null==y?void 0:y.displayText1,ariaLabelClear:ev("a11yClearSearchLabel"),ariaLabelInput:null==y?void 0:y.displayText1,ariaLabelSearchButton:ev("a11ySubmitSearch")}:null,cart:null!=x?x:null,featuredServices:b,handleOnSearch:eJ,handleOnHamburgerClick:()=>ey(!0),handleOnBagClick:eg,handleOnStoreAndServicesClick:eg,ariaLabelOpenMenu:ev("ariaLabelOpenMenu"),showTypeahead:!0,handleValueChange:e5,handleOnSelection:e2,searchQueryList:ex,navigationItem:ta?{dropdownItems:tl,callToActionHandler:eg,count:eo,displayNewSignInButton:!ti.length,navItemVariant:ti.length?"STANDARD":"SIGN_IN",variantId:null==to?void 0:null===(E=to.components)||void 0===E?void 0:E[0].variantId,customerInitials:ti.length?e6:null,avatarVariant:ti.length?"Signed-in":null,callToAction:ta.callToAction,showCount:ta.showCount,dropdownOpenIcon:ta.dropdownOpenIcon,dropdownCloseIcon:ta.dropdownCloseIcon,initialIcon:ta.initialIcon}:null},U={megaMenuV2Data:d,a11yData:{l3ExploreMessage:ev("a11yMegaMenuExploreMessage"),megaMenuAriaLabel:ev("a11yMegaMenuAriaLabel")},closeButtonLabel:ev("megaMenuCloseLabel"),trackingFn:e0,callToActionHandler:eg},V={trackingFn:e0,isDrawerOpen:ef,onClose:eK,headerSectionData:m,topSectionData:d,bottomSectionData:D},G={label:null==O?void 0:O.displayText1,callToActionLink:null==O?void 0:O.callToAction,variant:null==O?void 0:O.variantId,navigationItems:M.length?M:void 0,navigationItem:null,provinceSelectorItem:e8?{displayText1:null!==(_=te.displayText1)&&void 0!==_?_:"",options:tn,menuName:"provinceSelector",labelId:"provinceSelector",onSelected:tr,startIcon:{altText:null!==(P=null===(T=te.leftIconImage)||void 0===T?void 0:T.altText)&&void 0!==P?P:"",url:null!==(I=null===(k=te.leftIconImage)||void 0===k?void 0:k.url)&&void 0!==I?I:""},labelPosition:"vertical",variant:"province"}:null,backgroundColour:(null==F?void 0:F.backgroundColour)||"#CB333B"}})()}catch(e){console.log("error initializing masthead data",e)}let ts=!!(N&&U&&h),tu=(()=>{var e;let t=null==u?void 0:null===(e=u.components)||void 0===e?void 0:e.map(e=>{var t,n,r;let o=[],a=null==e?void 0:e.data;return(null==a?void 0:a.callToAction)&&(null==a?void 0:null===(t=a.callToAction)||void 0===t?void 0:t.url)!=="/"&&o.push(null==a?void 0:a.callToAction),(null==a?void 0:a.l2Data)&&(null==a?void 0:null===(n=a.l2Data)||void 0===n?void 0:n.length)&&(null==a||null===(r=a.l2Data)||void 0===r||r.map(e=>{var t;(null==e?void 0:e.callToAction)&&(null==e?void 0:null===(t=e.callToAction)||void 0===t?void 0:t.url)!=="/"&&o.push(null==e?void 0:e.callToAction)})),o});return Array.prototype.concat.apply([],t)})(),tc=(null==N?void 0:null===(i=N.search)||void 0===i?void 0:i.placeholderText)||L.CP[ee].SEARCH,{componentError:td,setComponentError:tp}=Y,tm=(0,a.useCallback)(e=>{console.log("message",(null==e?void 0:e.message)||"Broken Masthead"),console.log("error",e),tp&&tp({mastheadError:"Broken Masthead"})},[td,tp]),th=eS.toString(),tg=(0,a.useMemo)(()=>eq.filter(e=>{let{suggestion:t}=e;return t.toLowerCase().includes(th.toLowerCase())&&""!==t&&th.length<L._$}).slice(0,L.j3).map(e=>{let{suggestion:t}=e;return{suggestion:t,isLoading:!1,isEmptyMessage:!1}}),[eq,th]),tv=(0,a.useMemo)(()=>{let e=L.Lh;if(th.length>=L._$)return[];let t=0===th.length?e:e.filter(e=>e.suggestion.toLowerCase().split(" ").some(e=>e.startsWith(th.toLowerCase())));return(t.length>0?t:e).slice(0,L.l$).map(e=>{let{suggestion:t}=e;return{suggestion:t,isLoading:!1,isEmptyMessage:!1}})},[th]),tf=(0,a.useMemo)(()=>(0,P.ZU)(th,ek,eP,ex,L._$,ee),[ex,th,ek,eP,tv]),ty=(0,a.useMemo)(()=>[{key:L.Re.BEAUTY_SEARCHES,title:"",items:tf},{key:L.Re.YOUR_SUGGESTIONS,title:L.CP[ee].RECENT,items:tg},{key:L.Re.TRENDING_SUGGESTIONS,title:L.CP[ee].TRENDING,items:tv}].filter(e=>{let{items:t}=e;return t.length&&!t.some(e=>e.isEmptyMessage)}),[tf,tg,tv]),tx=(0,a.useMemo)(()=>tf.some(e=>e.isEmptyMessage),[tf]);(0,a.useEffect)(()=>
1{if(eR){var e;null===(e=eG.current)||void 0===e||e.setOpen()}},[ty,eR]);let tC=(0,a.useCallback)(()=>{eF(!1)},[]),tS=(0,a.useCallback)(()=>{eF(!0)},[]),tb=e=>t=>[{suggestion:e.toString(),id:Date.now(),isRemovable:!0},...t.filter(t=>{let{suggestion:n}=t;return n!==e.toString()})].slice(0,L.j3);return(0,r.jsxs)("div",{"data-testid":"masthead-section",children:[(0,r.jsx)(et,{}),(0,r.jsxs)(C.ErrorBoundary,{onError:tm,FallbackComponent:()=>(0,r.jsx)(_.BreadcrumbsSkeleton,{}),children:[null==tu?void 0:tu.map((e,t)=>(0,r.jsx)("a",{style:{visibility:"hidden",display:"none"},href:null==e?void 0:e.url,"aria-hidden":"true","data-testid":"crawlable-menu-link-".concat(t),children:null==e?void 0:e.text},"crawlable-menu-link-".concat(t))),ts?(0,r.jsx)(A.Masthead,{mainSection:N,mobileMenuData:V,ctaHandler:e9,trackingFn:e1,slimMenuData:p,megaMenuData:U,topSection:G,children:(0,r.jsx)(M.CustomAutoCompleteSlot,{children:(0,r.jsxs)(eN.Autocomplete,{isClient:z,buttonClassName:"focus-visible:[box-shadow:0_0_0_3px_rgba(66,_153,_225,_0.6)] w-[15px] h-[15px] mr-[8px]",buttonContainerClassName:"pr-[8px] pt-[8px] mt-[4px] h-[24px]",className:"mt-0",overlayClassName:"z-20 bg-white [&_[data-testid='autocomplete-empty-message']]:font-light text-[14px] font-['GT_Eesti_Text']",inputClassName:"h-[40px] rounded-[20px] pt-[8px] pb-[8px] pl-[16px] pr-[30px] font-['GT_Eesti_Text'] text-[16px] text-[#1A1F3C]",allowsCustomValue:!0,shouldRenderSearchContent:!0,clearBtnProps:{title:L.CP[ee].CLEAR,"aria-label":L.CP[ee].CLEAR},optionClassName:"font-['GT_Eesti_Text'] text-[14px] mt-[4px]",sectionClassName:"mt-[4px]",items:ty,label:L.CP[ee].SEARCH,onBlur:tC,onClearInput:()=>{var e;eb(""),eA(0),null==eG||null===(e=eG.current)||void 0===e||e.setFocus()},onFocus:tS,onSelectionChange:e$,onValueChange:e5,onInputChange:e=>{e.length<L._$&&(eC([]),e_(!1),eI(!1),eA(e=>e+1)),eb(e)},onValueSubmit:eJ,placeholder:tc,ref:eG,submitBtnProps:{title:L.CP[ee].SUBMIT,"aria-label":L.CP[ee].SUBMIT},emptyMessage:tx?L.CP[ee].EMPTY_MESSAGE:void 0,children:[(!Z||th.length>=L._$||!ek&&!eL)&&ty.map(e=>{let{key:t,title:n,items:o}=e;return(0,r.jsx)(eN.Section,{title:n,children:o.map(e=>{let{suggestion:n,isLoading:o}=e;return(0,r.jsx)(eN.Item,{textValue:n,"aria-disabled":o,children:o?(0,r.jsx)(eN.Skeleton,{className:"w-full h-8 rounded-none bg-iceberg-lighter-grey","data-testid":"autocomplete-loading"}):(0,r.jsx)(r.Fragment,{children:t===L.Re.YOUR_SUGGESTIONS?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"font-bold",children:n}),z&&(0,r.jsx)(eB.A,{className:"w-[18px] h-[18px] text-iceberg-muted-grey"})]}):(0,r.jsx)(eN.AutoCompleteHighlightItem,{suggestion:n,queryParam:th,className:"font-default font-light"})})},"".concat(t,"::").concat(n))})},"".concat(t,"_").concat(ew))}),Z&&!ek&&eL&&(0,r.jsx)(eN.AutocompleteSearchContentSlot,{children:(0,r.jsx)(en.Box,{py:eX,px:eZ,children:(0,r.jsx)(R,{isLoading:ek,data:eL})})})]})})}):(0,r.jsx)(_.BreadcrumbsSkeleton,{})]})]})};let eH=!1;var eq=e=>{let{headerSection:t}=e,{region:n}=t,{provinceId:o,setProvinceId:i}=(0,c.useSDMCustomerContext)();return((0,a.useEffect)(()=>{!(0,l.Zw)()&&n&&Object.values(h.dUo).includes(n)&&i(n)},[]),(0,a.useEffect)(()=>{eH=!0,setTimeout(()=>{eH=!1},500)},[]),(0,a.useEffect)(()=>{if((0,l.Ev)(o),!(0,l.Zw)()&&!eH){let e=new URL(window.location.href);e.searchParams.delete("province"),window.history.replaceState(null,"",e.toString())}},[o]),t)?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"relative z-[101] w-full",children:(0,r.jsx)(ez,{headerData:t})}),(0,r.jsx)(eL.O,{})]}):null},eQ=e=>{var t;let{initialData:n,themeTokens:l,headerSection:s,...u}=e,{renderDatePicker:p,isContentfulPreview:m,selectedDateTime:g}=(0,i.qO)(),{commonContextProps:v,locale:f,isClient:x}=(0,i.ut)(),C=(0,o.useRouter)();(0,a.useEffect)(()=>{try{var e,t;!x||(null==C?void 0:C.pathname)!=="/search"||(null==C?void 0:null===(e=C.query)||void 0===e?void 0:e.text)||(null==C?void 0:null===(t=C.query)||void 0===t?void 0:t.promotionCodes)||C.push("/")}catch(e){console.warn("Router not available during SSR:",e)}},[x,C]);let S={sdmCartProviderProps:{...(0,c.useSDMCartContext)()},sdmCustomerProviderProps:{...(0,c.useSDMCustomerContext)()},sdmRouterProps:x&&C?{router:C}:{router:null},sdmViewportProviderProps:{...(0,c.useSDMViewportContext)()},provinceProviderProps:{children:null}},{cartCount:b,isInitialCartCountUpdated:w,setPageId:A}=(0,c.useSDMCartContext)(),{pcOptimumAccount:E}=(0,c.useSDMCustomerContext)(),{pageId:T}=u;return(0,a.useEffect)(()=>{A(T)}
1,[T,A]),(0,i.b7)(b,T,E,w),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(eI,{...u,hadExistingSentry:!0,isPreview:m,previewDatetime:g,commonContexts:v,sdmContexts:S,initialData:n,themeTokens:l,PageLoadingFallback:()=>(0,r.jsx)(d.y,{}),locale:f,env:"production",children:[(0,r.jsx)(eq,{headerSection:s||{region:h.dUo.ON}}),(0,r.jsx)(eM,{typeId:n?null==n?void 0:null===(t=n.layout)||void 0===t?void 0:t.typeId:h.f2j.PAGE_LAYOUT_SINGLE_COLUMN}),(0,r.jsx)(y,{apiVersion:h.f2j.API_VERSION_V2,layoutSection:h.f2j.MAIN_CONTENT_COLLECTION,hasFooter:!0})]}),m?p():null]})};function eK(e){let{viewDefinition:t,themeTokens:n,pageId:c,headerSection:d,enableSSR:p=!1}=e,{commonContextProps:{settings:{banner:m}},cartCount:h,locale:g,currentDevice:f,pcOptimumAccount:y}=(0,i.ut)(),x=(0,o.useRouter)(),C=(0,s.G1)(t),[S,b]=(0,a.useState)(!1),w=(null==t?void 0:t.searchRedirectData)||{},A=(0,i.QP)({cartCount:h,locale:g,currentDevice:f,pageId:c,pcOptimumAccount:y});return((0,a.useEffect)(()=>{let e;if(!(null==w?void 0:w.isRedirectEnabled)||S)return;let n=(0,l.ag)(),{phxRedirectUrl:r,sdmRedirectUrl:o}=w,a=(0,l.Zw)()?r:o,i=null==w?void 0:w.searchTerm,s=(0,u.bv)(w,t);if((0,u.dT)(s,A.current),a.startsWith("http://")||a.startsWith("https://"))e=new URL(a),i&&e.searchParams.append("originalTarget",i);else{let t=a.substring(0,a.indexOf("/c/")).toLowerCase()+a.substring(a.indexOf("/c/"));e=new URL("".concat(n).concat(t)),i&&e.searchParams.append("originalTarget",i)}b(!0),x&&x.push(e)},[w,t,x,S]),w.isRedirectEnabled&&S)?null:(0,r.jsx)("div",{"data-testid":"main-page",children:p?(0,r.jsx)(eQ,{headerSection:d,pageId:c,initialData:C,themeTokens:n,enableSSR:p,seo:{banner:m,appTitle:"Loblaw Digital",currentUrlBase:(0,l.xr)()}}):(0,r.jsx)(v,{headerSection:d,pageId:c,initialData:C,themeTokens:n,enableSSR:p,seo:{banner:m,appTitle:"Loblaw Digital",currentUrlBase:(0,l.xr)()}})})}},57919:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(1995),o=n(13732),a=n(80859),i=()=>{let{API_VERSION_V2:e,MAIN_CONTENT_COLLECTION:t}=a.f2j,[i,l]=(0,o.useState)(null);return(0,o.useEffect)(()=>
1{l((0,o.lazy)(()=>n.e(5482).then(n.t.bind(n,95482,23))))},[]),(0,r.jsx)(r.Fragment,{children:i?(0,r.jsx)(i,{apiVersion:e,layoutSection:t,hasFooter:!0}):null})}},76152:function(e,t,n){"use strict";n.d(t,{A:function(){return c}});var r=n(1995),o=n(56559),a=n(13732),i=n(80859),l=n(71911),s=n(37789);let u=!1;var c=e=>{let{headerSection:t}=e,{region:c}=t,{provinceId:d,setProvinceId:p}=(0,o.useSDMCustomerContext)(),[m,h]=(0,a.useState)(null);return(0,a.useEffect)(()=>{h((0,a.lazy)(()=>n.e(6325).then(n.t.bind(n,66325,23))))},[]),(0,a.useEffect)(()=>{!(0,l.Zw)()&&c&&Object.values(i.dUo).includes(c)&&p(c)},[]),(0,a.useEffect)(()=>{u=!0,setTimeout(()=>{u=!1},500)},[]),(0,a.useEffect)(()=>{if((0,l.Ev)(d),!(0,l.Zw)()&&!u){let e=new URL(window.location.href);e.searchParams.delete("province"),window.history.replaceState(null,"",e.toString())}},[d]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"relative z-[101] w-full",children:t&&m?(0,r.jsx)(m,{}):null}),(0,r.jsx)(s.O,{})]})}},13578:function(e,t,n){"use strict";n.d(t,{M:function(){return c}});var r=n(1995),o=n(71094),a=n.n(o),i=n(13732),l=n(80859);let s=()=>!0,{API_VERSION_V2:u}=l.f2j,c=e=>{let{currentUrlBase:t,seoMetaData:n,apiVersion:o=u,jsonLdScript:c,heroImageUrl:d,children:p}=e,{title:m,headline:h,description:g,addMetaNoRobots:v,canonicalUrlSlug:f}=n||{},y=(0,i.useMemo)(()=>[m,h].filter(Boolean).join(" | "),[m,h,o]),x=(0,i.useMemo)(()=>{if(f&&(f.startsWith("https://")||f.startsWith("http://")))return f;if(t&&f){let e=f.startsWith("/")?"":"/";return[t,f].filter(Boolean).join(e)}return s()?window.location.href:t},[t,f]);return n?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(a(),{children:[y?(0,r.jsx)("title",{children:y},"page-title"):null,g?(0,r.jsx)("meta",{name:"description",content:g},"page-desc"):null,x?(0,r.jsx)("link",{rel:"canonical",href:x},"canonical"):null,(0,r.jsx)("meta",{name:"robots",content:v?"noindex, nofollow":"index, follow"},"robots"),(0,r.jsx)("link",{rel:"shortcut icon",href:l.Dm}),d?(0,r.jsx)("link",{rel:"preload",as:"image",href:d,fetchPriority:"high"},"hero-preload"):null,c?(0,r.jsx)("script",{type:"application/ld+json",children:c},"jsonLd"):null]}),p]}):null}},48535:function(e,t,n){"use strict";var r=n(1995),o=n(13578);t.A=e=>{let{seoMetaData:t,currentUrlBase:n,jsonLdScript:a,heroImageUrl:i,children:l}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.M,{currentUrlBase:n,seoMetaData:t,jsonLdScript:a,heroImageUrl:i||void 0}),l]})}},53750:function(e,t,n){"use strict";n.d(t,{y:function(){return r.y}});var r=n(25432)},37789:function(e,t,n){"use strict";n.d(t,{O:function(){return l}});var r=n(1995),o=n(13732),a=n(13630),i=n(16410);let l=()=>{var e,t;let{toasts:n}=(0,a.Fs)(),l=(null!==(t=null===(e=n[a.yL])||void 0===e?void 0:e.length)&&void 0!==t?t:0)>0,s=(0,o.useRef)(null),[u,c]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{let e=s.current;if(!e||!l){c(!1);return}let t=new IntersectionObserver(e=>{let[t]=e;c(t.boundingClientRect.top<0)});return t.observe(e),()=>t.disconnect()},[l]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{ref:s,"aria-hidden":!0,className:"pointer-events-none h-0 w-full"}),(0,r.jsx)("div",{className:(0,i.cn)("z-[100] w-full",u&&l?"fixed inset-x-0 top-0":"relative"),children:(0,r.jsx)(a.th,{rootClassName:"[&>div]:items-center [&_.font-default]:items-center [&_.font-default]:text-lg"})})]})}},40471:function(e,t,n){"use strict";n.d(t,{BannerCarouselComponent:function(){return p}});var r=n(1995),o=n(62051),a=n(84688),i=n(13732),l=n(80484),s=n(56559),u=n(46006),c=n(88526),d=n(42391);n(85426);let p=e=>{let{banners:t,_allBanners:n,contentId:p,componentId:m,analytics:h}=e,[g,v]=(0,i.useState)(t);(0,i.useEffect)(()=>{n&&n.length>t.length&&v(n)},[n,t]);let f=(0,l.useSimpleTranslation)(),y=(0,s.useSDMRouterContext)(),x=(0,u.mu)(y),{trackEvent:C}=(0,d.useAnalyticsContext)(),{getFeatureFlags:S}=(0,d.useFeatureFlags)(),{EnableHeliosSnowplow:b}=S(),w=g.length>1,A={first:f("a11ySliderFirstLabel"),last:f("a11ySliderLastLabel"),prev:f("a11ySliderPrevLabel"),next:f("a11ySliderNextLabel"),slideX:f("a11ySlideXLabel"),select:f("a11ySliderSelectLabel"),slideLabel:f("a11ySlideLabel")},E=(0,i.useCallback)((e,t)=>{let n,r;
1let o=[m||""],a=null==h?void 0:h.dsModel,i={type:m||c.TSDMCarouselAnalyticTypes.BANNER_TYPE,engine:null==a?void 0:a.engine,parent_id:p};if(t){if("view"===t.actionType){let e=(null==t?void 0:t.slideNewIndex)||0;r=g[e],n=[{...i,type:(null==r?void 0:r.componentId)||c.TSDMCarouselAnalyticTypes.BANNER_TYPE,id:(null==r?void 0:r.contentId)||"",name:null==r?void 0:r.headline,position:e+1,hierarchy:o.concat(null==r?void 0:r.headline)}]}else{let e=g.filter(e=>e.headline===t.name)[0],r="cta-click",a=[null==e?void 0:e.callToAction1,null==e?void 0:e.callToAction2,null==e?void 0:e.callToAction3].map((e,n)=>(null==e?void 0:e.text)===(null==t?void 0:t.clickAction)?"".concat(r).concat(n+1):null).filter(e=>null!=e)[0],l=null==a?void 0:a.charAt((null==a?void 0:a.length)-1);n={...{...i,type:(null==e?void 0:e.componentId)||c.TSDMCarouselAnalyticTypes.BANNER_TYPE,id:(null==e?void 0:e.contentId)||"",name:t.name,position:l?parseInt(l):0,hierarchy:o.concat(null==e?void 0:e.headline),click_element:t.clickAction,click_action:r,click_url:t.clickUrl}}}C("heliosBannerCarousel",{event:e,heliosSnowplow:b,heliosAnalytics:!0,component:n,customEngagement:{action:t.actionType},dsModel:{type:(null==a?void 0:a.profileName)||"",value:(null==a?void 0:a.profileVersion)||""}})}},[h,g,m,p,b,C]);if((null==g?void 0:g.length)===1){let e,t;let{backgroundColour:n,buttonBackgroundColour:o,buttonTextColour:i,headline:l,superHeadline:s,logo1:u,logo2:c,badge:d,textColour:m,ctaLinkColour:h,desktopImage:v,tabletImage:f,mobileImage:y,displayText1:C,callToAction1:S,callToAction2:b,callToAction3:w,callToActionLink:A,stamp:T,stampPlacement:k}=g[0];return A&&Object.prototype.hasOwnProperty.call(A,"modalTitle")?t=A:e=A,(0,r.jsx)(a.BannerSliderWrapper,{children:(0,r.jsx)(a.Banner,{variant:"full",title:l,bodyText:C,desktopImage:v,tabletImage:f,mobileImage:y,primaryLogo:u,secondaryLogo:c,promoCTA1:S,promoCTA2:b,promoCTA3:w,link:e,linkModal:t,badge:d,superHeadline:s,buttonClickHandler:x,titleColor:m,bodyTextColor:m,superHeadlineColor:m,backgroundColor:n,innerContentBackgroundColor:n,buttonBackgroundColor:o,buttonTextColor:i,ctaLinkColor:h,trackingFn:E,stamp:T,stampPlacement:k},"banner-".concat(p,"-",0))})}return(0,r.jsx)(a.BannerSliderWrapper,{children:(0,r.jsx)(o.Slider,{sliderContainerAriaLabel:f("a11yBanner"),a11yI18nMessages:A,"data-testid":"banner-carousel",showArrows:w,showPagination:w,trackingFn:E,isBannerSlider:!1,children:(0,r.jsx)(o.SliderList,{children:null==g?void 0:g.map((e,t)=>{let n,i;let{backgroundColour:l,buttonBackgroundColour:s,buttonTextColour:u,headline:c,superHeadline:d,logo1:m,logo2:h,badge:g,textColour:v,ctaLinkColour:f,desktopImage:y,tabletImage:C,mobileImage:S,displayText1:b,callToAction1:w,callToAction2:A,callToAction3:T,callToActionLink:k,stamp:_,stampPlacement:P}=e;return k&&Object.prototype.hasOwnProperty.call(k,"modalTitle")?i=k:n=k,(0,r.jsx)(o.Slide,{children:(0,r.jsx)(a.Banner,{variant:"full",title:c,bodyText:b,desktopImage:y,tabletImage:C,mobileImage:S,primaryLogo:m,secondaryLogo:h,promoCTA1:w,promoCTA2:A,promoCTA3:T,link:n,linkModal:i,badge:g,superHeadline:d,buttonClickHandler:x,titleColor:v,bodyTextColor:v,superHeadlineColor:v,backgroundColor:l,innerContentBackgroundColor:l,buttonBackgroundColor:s,buttonTextColor:u,ctaLinkColor:f,trackingFn:E,stamp:_,stampPlacement:P,isBannerSlider:!1},"banner-".concat(p,"-").concat(t))},"slide-".concat(p,"-").concat(t))})})})})}},98039:function(e,t,n){"use strict";n.d(t,{Y:function(){return r.BannerCarouselComponent}});var r=n(40471)},8111:function(e,t,n){"use strict";n.d(t,{BentoCardsContainerComponent:function(){return m}});var r=n(1995),o=n(13732),a=n(92534),i=n(32367),l=n(12124),s=n(88526),u=n(42391),c=n(94077),d=n(46006),p=n(56559);let m=e=>{let{styling:t,bentoCards:n,contentId:m,position:h,id:g}=e,v=(0,p.useSDMRouterContext)(),{trackEvent:f}=(0,u.useAnalyticsContext)(),{getFeatureFlags:y}=(0,u.useFeatureFlags)(),{isMobile:x,isTablet:C}=(0,l.useBreakpoint)(),S=(0,d.mu)(v),{EnableHeliosSnowplow:b}=y(),w=(0,o.useMemo)(()=>x||C?2*i.MAX_GRID_ROWS:3*i.MAX_GRID_ROWS,[x,C]);return(0,r.jsx)(c.j,{styling:t,id:g,children:(0,r.jsx)(a.BentoCardsContainer,{bentoCards:n.map(e=>({...e,cta:e.callToAction})),trackingFnWrapper:e=>t=>{var r,o,a,i;let{event:l}=t,{headline:u,analytics:c,contentId:d}=n[e],p=(null==c?void 0:null===(r=c.dsModel)||void 0===r?void 0:r.engine)||"helios",g=null==c?void 0:c.genericAnalytics,v=null!==(o=null==g?void 0:g.ds_model)&&void 0!==o?o:null==c?void 0:c.dsModel,y=(0,s.getCommonComponentContext)(b,!0,v,g);
1if(l===s.SDMSnowplowProductEvents.TILE_CLICK){let{productContext:r}=t;f("heliosBentoCardProductClick",{event:l,component:[{engine:p,id:m,name:m,type:"bentoCardContainerComponent",number_of_children:n.length,position:h},{engine:p,id:d,name:u,type:"bentoCard",position:e+1,parent_id:m,number_of_children:w}],productContext:{...r,name:(null==r?void 0:r.title)||"",prices:{price:{value:(0,s.convertPriceToNumber)(null==r?void 0:null===(i=r.prices)||void 0===i?void 0:null===(a=i.price)||void 0===a?void 0:a.value)||null},wasPrice:{value:(0,s.convertPriceToNumber)(null==r?void 0:r.prices.wasPrice.value)||null}}},productPosition:null==r?void 0:r.productPosition,...y})}else if(l===s.SDMAnalyticEvents.UI_ENGAGEMENT){let{component:r}=t,{click_action:o,click_element:a,click_url:i}=r;f("heliosBentoCardContainerCTA",{event:l,component:[{engine:p,id:m,name:m,type:"bentoCardContainerComponent",number_of_children:n.length,position:h},{engine:p,id:d,name:u,type:"bentoCard",position:e+1,number_of_children:w,parent_id:m,click_action:o,click_element:a,cta_url:i}],...y})}},clickHandler:S})})}},18667:function(e,t,n){"use strict";n.d(t,{G:function(){return r.BentoCardsContainerComponent}});var r=n(8111)},31359:function(e,t,n){"use strict";n.d(t,{BrandSpotlightComponent:function(){return h}});var r=n(1995),o=n(13732),a=n(42082),i=n(56559),l=n(42391),s=n(88526),u=n(46006),c=n(30096),d=n(3423),p=n(80484),m=n(94077);let h=e=>{let{headline:t,isSponsored:n,productTiles:h,callToAction:g,callToAction2:v,analytics:f,badge:y,styling:x,contentId:C,position:S,id:b,...w}=e,A=(0,l.useSettingsContext)(),E=(0,p.useSimpleTranslation)(),{getFeatureFlags:T}=(0,l.useFeatureFlags)(),{EnableHeliosSnowplow:k}=T(),{addToCart:_,entries:P,isLoading:I}=(0,i.useSDMCartContext)(),M=(0,c.useTrackMediaAnalyticsAdClick)(!0),{router:L}=(0,i.useSDMRouterContext)(),j=(0,u.mu)(L),D=(0,s.useAddToCartTrackEvent)(k),R=(0,d.a7)(),F=null==f?void 0:f.genericAnalytics,O=F?{genericAnalytics:F}:{},N=(0,o.useCallback)((r,o)=>{var a,i,l,u,d,p;let{callToActionElement:m}=o,v={id:e.contentId||null,type:e.componentId||null,name:t,position:S},y={engine:"helios",number_of_children:h.length,...v};if(r===s.SDMAnalyticEvents.UI_ENGAGEMENT){D(r,{...o,...O}),D("heliosBrandSpotlightCTA",{component:{click_element:null==m?void 0:m.text,click_action:"cta-click",cta_url:null==m?void 0:m.url,...y},dsModel:null!==(i=null!==(a=null==F?void 0:F.ds_model)&&void 0!==a?a:null==f?void 0:f.dsModel)&&void 0!==i?i:[]});return}let x=(0,s.getSDMSnowplowAddToCartContext)(o,h,v);if(x){if(n){if(D(r,{...(0,s.getSnowplowAdTrackingProductClickContext)(s.SDMSnowplowAdEvents.CLICK,k,{ad:{...null==f?void 0:f.mediaAnalytics},product:{...x.productData,productPosition:x.productPosition,isSponsored:n}}),...x,...O,dsModel:null!==(u=null!==(l=null==F?void 0:F.ds_model)&&void 0!==l?l:null==f?void 0:f.dsModel)&&void 0!==u?u:[]}),"ad_click"===r&&M(e,{product:x.productData,productPosition:x.productPosition},{creative_id:(0,c.paramCase)(x.productData.title)}),r===s.SDMSnowplowProductEvents.TILE_CLICK){let{data:{productId:e}}=o,t=h.findIndex(t=>t.productId===e),n=h[t],a=(0,s.getSnowplowProductContext)(n,(0,s.isValidProductPosition)(null==n?void 0:n.index)?(null==n?void 0:n.index)-1:t+1);D("heliosBrandSpotlightProductClick",{event:r,component:y,heliosAnalytics:!0,heliosSnowplow:k,productContext:{...a},productPosition:null==a?void 0:a.productPosition,...O,dsModel:null!==(p=null!==(d=null==F?void 0:F.ds_model)&&void 0!==d?d:null==f?void 0:f.dsModel)&&void 0!==p?p:[]})}}else D(r,{...x,...(null==F?void 0:F.dsModel)?{dsModel:null==F?void 0:F.dsModel}:{}})}else M(e,void 0,{creative_id:(0,c.paramCase)((null==g?void 0:g.text)||"")})},[h,D,k,null==f?void 0:f.mediaAnalytics,null==g?void 0:g.text,t,n,e.componentId,e.contentId,M]);return(0,r.jsx)(m.j,{isExtraLargeSpacing:!0,styling:x,id:b,children:(0,r.jsx)(a.Spotlight,{...w,productTileData:h,language:A.locale,entries:P,badge:y,addToCartCB:_,isCartLoading:I,i18nskipText:E("skip"),headline:t,tileAction:j,isSponsored:n,trackingFn:N,cta:g,callToAction:v,lob:"sdm",isMedia:!0,a11yMessages:R,"data-testid":C,sponsoredInfoBadge:E("sponsoredLabel")})})}},25656:function(e,t,n){"use strict";n.d(t,{p:function(){return r.BrandSpotlightComponent}});var r=n(31359)},69768:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var r=n(1995),o=n(13732),a=n(43744),i=n(544),l=n(79745),s=n(25475),u=n(88526),c=n(56559),d=n(46006),p=n(3423),m=n(51551),h=n(80484);let g=e=>{var t,n;let{filterGroups:g,filtersLabel:v,applyButtonText:f,trackingFn:y,totalResults:x,defaultAccordionIndex:C}=e,{drawerRef:S,shouldShowDrawer:b,setShouldShowDrawer:w,drawerDefaultAccordionIndex:A,setDrawerDefaultAccordionIndex:E}=(0,c.usePlpContext)(),T=(0,h.useSimpleTranslation)(),k=(0,m.useLayoutSectionV2)("sortsSection"),_={options:(null==k?void 0:null===(t=k[0].data)||void 0===t?void 0:t.sorts)||[],heading:T("sort"),labelPrefix:T("sortBy")},{viewport:P}=(0,c.useSDMViewportContext)(),I="desktop"===P,M=(null==x?void 0:x.toString())||"",L=(0,c.useSDMRouterContext)(),j=(0,d.mu)(L),D=(0,p.ri)(),R=(0,p.Ts)(),F=(0,u.useFilterTracking)(),O=(0,u.useSortTracking)(),N={crossIconLabel:T("a11yClearSearchTerm"),searchPlaceholderText:T("search"),filterLegend:T("a11yFilterLegend"),selectedFilterIndicator:T("a11ySelectedFilters")},B=(0,o.useMemo)(()=>null==g?void 0:g.map(e=>({...e,values:e.values.filter(e=>{let{code:t}=e;return t})})),[g]),U=(0,o.useCallback)(e=>{E(e)},[E]),V=e=>{(0,d.Tl)(e,g,D,F,j)},G={title:v,handleOnChange:V,trackEvent:y,filterGroups:B,onAccordionChange:U,defaultAccordionIndex:A,a11yLabels:N},W=(0,o.useCallback)(()=>{w(!b)},[b,w]),z=(0,o.useCallback)(()=>{w(!1)},[w]),H={showAllResults:null!=f?f:T("showAllResults"),showResults:null!=f?f:T("showResults"),handleOnClick:z},q={onSelected:e=>{let t=(0,d.pB)(e,_.options);O({sortEventValue:e}),j(D(t,!0))},..._};return g?(0,r.jsxs)(r.Fragment,{children:[!I&&(null==G?void 0:G.filterGroups)&&(null==G?void 0:null===(n=G.filterGroups)||void 0===n?void 0:n.length)>0&&(0,r.jsxs)(a.Box,{display:{base:"inline-flex",lg:"none"},style:{justifyContent:"flex-start",width:"100%"},children:[(0,r.jsx)(a.Box,{style:{width:"100%"},children:(0,r.jsx)(l.CategoryButton,{onClick:W,width:"100%",children:v})}),(0,r.jsx)(s.Filter,{title:v,onClose:z,select:_&&q,filters:G,submitCTA:H,handleClearAll:()=>{R()},clearAllLabel:T("clearAll"),ref:S,numberOfFilterResults:M,isOpen:b})]}),I&&g&&(null==g?void 0:g.length)>0&&(0,r.jsx)(a.Box,{display:{base:"none",lg:"block"},id:"site-filter-content",children:(0,r.jsx)(i.Filters,{filterGroups:B,title:v,handleOnChange:V,trackEvent:y,a11yLabels:N,defaultAccordionIndex:C})})]}):null}},97155:function(e,t,n){"use strict";n.d(t,{FireworkComponent:function(){return c}});var r=n(1995),o=n(13732),a=n(94077),i=n(21715),l=n(26262),s=n(43042),u=n(80484);let c=(0,o.memo)(e=>{let[t,n]=(0,o.useState)(!1),{fireworkHTML:c,styling:d,isFullWidth:p,id:m}=e,h=(0,o.useId)(),g=(0,u.useSimpleTranslation)();(0,o.useEffect)(()=>{n(!0)},[]);let v=c.split("</script>")[1],f=v.split("channel")[0].split("<")[1].trim(),y={};v.split(f)[1].split(">")[0].split("\n").map(e=>e.trim()).filter(e=>e.length>1).map(e=>({[e.split("=")[0]]:e.split("=")[1]}
1)).forEach(e=>{let t=Object.keys(e)[0],n=e[t];y[t]=n.replace(/"/g,"")});let x=e=>{var t;(null==e?void 0:null===(t=e.detail)||void 0===t?void 0:t.url)&&window.location.assign(e.detail.url)};return((0,o.useEffect)(()=>(window._fwn&&c&&(document.addEventListener("fw:player:navigate",x),document.addEventListener("fw:navigate",x)),()=>{window._fwn&&c&&(document.removeEventListener("fw:player:navigate",x),document.removeEventListener("fw:navigate",x))}),[c]),t&&window._fwn&&c)?(0,r.jsxs)(i.ErrorBoundary,{FallbackComponent:()=>(0,r.jsx)(l.NavTilesSkeleton,{}),children:[(0,r.jsx)(s.InvisibleLink,{linkId:"#".concat(h),children:"".concat(g("skip")," ").concat(g("a11ySection"))}),(0,r.jsx)(a.j,{"data-testid":"firework-component",styling:d,isNoPadding:p,id:m,children:(0,o.createElement)(f,{...y})}),(0,r.jsx)("span",{id:h,children:" "})]}):null})},70621:function(e,t,n){"use strict";n.d(t,{v:function(){return r.FireworkComponent}});var r=n(97155)},19268:function(e,t,n){"use strict";n.d(t,{e:function(){return i}});var r=n(1995),o=n(13732),a=n(74490);function i(){let[e,t]=(0,o.useState)(!1);return((0,o.useEffect)(()=>{t(!0)},[]),e)?(0,r.jsx)(a.FooterSkeleton,{}):(0,r.jsx)("div",{"data-testid":"footer-skeleton-placeholder",style:{minHeight:240},"aria-hidden":"true"})}},32736:function(e,t,n){"use strict";n.d(t,{FooterComponent:function(){return u}});var r=n(1995);n(13732);var o=n(56559),a=n(46006),i=n(20645);let l={shoppersdrugmart:{en:{signUp:{info:{title:"Sign up and get 10,000 PC Optimum⢠points",details:"Sign up for emails and text offers and get points to use on your next purchase of $40+!"},cta:{displayName:"Sign up",url:"https://www.shoppersdrugmart.ca/page/sign-up"}},downloadApp:{title:"Shoppers Drug Mart App",appStore:{url:"https://apps.apple.com/ca/app/shoppers-drug-mart/id1460588916",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/apple-app-store.svg",alt:"Download on the App Store"},googlePlay:{url:"https://play.google.com/store/apps/details?id=com.loblaw.shoppersdrugmart",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/google-play.svg",alt:"Get it on Google Play"}},socialMediaIcons:[{name:"facebook",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/social-media/facebook.svg",alt:"facebook icon",url:"https://www.facebook.com/shoppersdrugmart"},{name:"instagram",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/social-media/instagram.svg",alt:"instagram icon",url:"https://www.instagram.com/shoppersdrugmart/"},{name:"pinterest",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/social-media/pinterest.svg",alt:"pinterest icon",url:"https://www.pinterest.ca/shoppersdrugmart/"},{name:"tiktok",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/social-media/tiktok.svg",alt:"tiktok icon",url:"https://www.tiktok.com/@shoppersdrugmart"},{name:"twitter",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/social-media/twitter.svg",alt:"twitter icon",url:"https://twitter.com/ShopprsDrugMart"},{name:"youtube",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/social-media/youtube.svg",alt:"youtube icon",url:"https://www.youtube.com/user/ShoppersDrugMartTV"}],siteMapLinks:[{title:"FAQ",categories:[{text:"Online Shopping",url:"https://lclcallcenters.my.site.com/shoppersdrugmart/s/topic/0TO2M000001FlqEWAS/online-shopping-services?language=en_US"},{text:"PC Optimumâ¢",url:"https://lclcallcenters.my.site.com/PCoptimumsupport/s/?language=en_US"},{text:"My Health Dashboard",url:"https://www.shoppersdrugmart.ca/health/my-health-dashboard?lang=en"},{text:"Other FAQ",url:"https://lclcallcenters.my.site.com/shoppersdrugmart/s/?language=en_US"}]},{title:"Customer Service",categories:[{text:"Contact Us",url:"https://www.shoppersdrugmart.ca/page/contact-us"},{text:"Find a Store",url:"https://www.shoppersdrugmart.ca/en/store-locator"},{text:"Returns & Exchanges",url:"https://www.shoppersdrugmart.ca/page/returns-and-exchanges"},{text:"Shipping & Handling",url:"https://www.shoppersdrugmart.ca/page/shipping-and-handling"},{text:"Same-day Delivery ",url:"https://www.shoppersdrugmart.ca/page/same-day-delivery"},{text:"Online Pick-Up",url:"https://www.shoppersdrugmart.ca/page/OnlinePickUp"}]},{title:"Corporate",categories:[{text:"Shoppers Foundation for Womenâs Healthâ¢",url:"https://shoppersfoundation.ca/"},{text:"Corporate",url:"https://corporate.shoppersdrugmart.ca/en/home"},{text:"Corporate News",url:"https://corporate.shoppersdrugmart.ca/en/our-stories"},{text:"Franchise Opportunities",url:"https://corporate.shoppersdrugmart.ca/en/careers-franchise"},{text:"Pharmacy Acquisitions",url:"https://corporate.shoppersdrugmart.ca/en/careers-sell-to-us"},{text:"Careers",url:"https://corporate.shoppersdrugmart.ca/en/careers-life-at-shoppers"}]},{title:"More by Shoppers",categories:[{text:"Check Gift Card Balance",url:"https://wbiprod.storedvalue.com/wbir/clients/shoppersdrugmart?lng=en"},{text:"PC Healthâ¢",url:"https://www.pchealth.ca/en/"},{text:"Shoppers Photo",url:"https://www.shoppersphoto.ca/"},{text:"Passport Photos",url:"https://www.shoppersdrugmart.ca/en/more-by-shoppers/passport"},{text:"Fresh Food",url:"https://www.shoppersdrugmart.ca/en/more-by-shoppers/fresh-food"},{text:"PRESTO",url:"https://www.shoppersdrugmart.ca/en/presto"}]}],utilityLinks:[{text:"Fran\xe7ais",url:"https://www.shoppersdrugmart.ca/fr/home"},{text:"Accessibility",url:"https://www.shoppersdrugmart.ca/en/contact-us/accessibility-standard"},{text:"Terms and Conditions",url:"https://corporate.shoppersdrugmart.ca/en/legal"},{text:"Privacy policy",url:"https://www.loblaw.ca/en/privacy-policy/"}],disclaimer:{line1:"Prices shown online may be different in store. Product availability may vary by store. Please contact your nearest store for availability and quantity limitations. ",line2:"\xae/⢠Trademarks of 911979 Alberta Ltd., used under license. \xa9 ".concat(new Date().getFullYear()," Shoppers Drug Mart Inc.")}},fr:{signUp:{info:{title:"Inscrivez-vous et obtenez 10 000 points PC Optimum",details:"Inscrivez-vous pour recevoir des courriels et des offres par texto et obtenez des points \xe0 utiliser lors de votre prochain achat de 40 $ ou plus!"},cta:{displayName:"Sâinscrire",url:"https://www.shoppersdrugmart.ca/page/sign-up"}}
1,downloadApp:{title:"Appli Shoppers Drug Mart",appStore:{url:"https://apps.apple.com/ca/app/shoppers-drug-mart/id1460588916",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/apple-app-store-fr.svg",alt:"T\xe9l\xe9charger dans l'App Store"},googlePlay:{url:"https://play.google.com/store/apps/details?id=com.loblaw.shoppersdrugmart",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/google-play-fr.svg",alt:"Disponible sur Google Play"}},socialMediaIcons:[{name:"facebook",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/social-media/facebook.svg",alt:"facebook icon",url:"https://www.facebook.com/shoppersdrugmart"},{name:"instagram",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/social-media/instagram.svg",alt:"instagram icon",url:"https://www.instagram.com/shoppersdrugmart/"},{name:"pinterest",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/social-media/pinterest.svg",alt:"pinterest icon",url:"https://www.pinterest.ca/shoppersdrugmart/"},{name:"tiktok",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/social-media/tiktok.svg",alt:"tiktok icon",url:"https://www.tiktok.com/@shoppersdrugmart"},{name:"twitter",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/social-media/twitter.svg",alt:"twitter icon",url:"https://twitter.com/ShopprsDrugMart"},{name:"youtube",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/social-media/youtube.svg",alt:"youtube icon",url:"https://www.youtube.com/user/ShoppersDrugMartTV"}],siteMapLinks:[{title:"FAQ",categories:[{text:"Magasinage en ligne",url:"https://lclcallcenters.my.site.com/shoppersdrugmart/s/topic/0TO2M000001FlqEWAS/online-shopping-services?language=fr"},{text:"PC Optimum",url:"https://lclcallcenters.my.site.com/PCoptimumsupport/s/?language=fr"},{text:"Mon tableau de bord Sant\xe9",url:"https://www.shoppersdrugmart.ca/health/my-health-dashboard?lang=fr"},{text:"Autre FAQ",url:"https://lclcallcenters.my.site.com/shoppersdrugmart/s/?language=fr"}]},{title:"Service \xe0 la client\xe8le",categories:[{text:" Nous joindre",url:"https://www.shoppersdrugmart.ca/page/contact-us"},{text:"Trouver le magasin",url:"https://www.shoppersdrugmart.ca/fr/store-locator"},{text:"Retours et \xe9changes",url:"https://www.shoppersdrugmart.ca/page/returns-and-exchanges"},{text:"Livraison et manutention",url:"https://www.shoppersdrugmart.ca/page/shipping-and-handling"},{text:"Livraison le jour m\xeame",url:"https://www.shoppersdrugmart.ca/page/same-day-delivery"},{text:"Ramassage en magasin",url:"https://www.shoppersdrugmart.ca/page/OnlinePickUp"}]},{title:"Notre entreprise",categories:[{text:"Fondation Pharmaprix pour la sant\xe9 des femmes",url:"https://shoppersfoundation.ca/fr/"},{text:"Notre entreprise",url:"https://corporate.shoppersdrugmart.ca/fr/home"},{text:"Nouvelles de l'entreprise",url:"https://corporate.shoppersdrugmart.ca/fr/our-stories"},{text:"Possibilit\xe9s de franchise",url:"https://corporate.shoppersdrugmart.ca/en/careers-franchise"},{text:"Acquisition de pharmacies",url:"https://corporate.shoppersdrugmart.ca/en/careers-sell-to-us"},{text:"Carri\xe8res",url:"https://corporate.shoppersdrugmart.ca/fr/careers-life-at-shoppers"}]},{title:"Autres services de Shoppers",categories:[{text:"V\xe9rifier le solde de la carte-cadeau",url:"https://wbiprod.storedvalue.com/wbir/clients/shoppersdrugmart?lng=fr"},{text:"PC Sant\xe9",url:"https://www.pchealth.ca/fr/"},{text:"Shoppers Photo",url:"https://www.shoppersphoto.ca/"},{text:"Photos de Passeport",url:"https://www.shoppersdrugmart.ca/fr/more-by-shoppers/passport"},{text:"Zone March\xe9",url:"https://www.shoppersdrugmart.ca/fr/more-by-shoppers/fresh-food"},{text:"PRESTO",url:"https://www.shoppersdrugmart.ca/fr/more-by-shoppers/presto"}]}],utilityLinks:[{text:"English",url:"https://www.shoppersdrugmart.ca/?lang=en"},{text:"Accessibilit\xe9",url:"https://www.shoppersdrugmart.ca/fr/contact-us/accessibility-standard"},{text:"Terms et conditions",url:"https://corporate.shoppersdrugmart.ca/en/legal"},{text:"Politique de confidentialit\xe9",url:"https://www.loblaw.ca/fr/privacy-policy/"}],disclaimer:{line1:"Les prix indiqu\xe9s en ligne peuvent \xeatre diff\xe9rents en magasin. La disponibilit\xe9 des produits peut varier selon les magasins. Veuillez contacter votre magasin le plus proche pour conna\xeetre les limites de disponibilit\xe9 et de quantit\xe9.",line2:"\uD83C\uDD6A/\uD83C\uDD6A Marques de commerce de 911979 Alberta Ltd., utilis\xe9es sous licence. \xa9 ".concat(new Date().getFullYear()," Pharmaprix Inc.")}}},pharmaprix:{en:{signUp:{info:{title:"Sign up and get 10,000 PC Optimum⢠points",details:"Sign up for emails and text offers and get points to use on your next purchase of $40+!"},cta:{displayName:"Sign up",url:"https://www.pharmaprix.ca/page/sign-up"}},downloadApp:{title:"Pharmaprix App",appStore:{url:"https://apps.apple.com/ca/app/pharmaprix
1/id6448917330",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/apple-app-store.svg",alt:"Download on the App Store"},googlePlay:{url:"https://play.google.com/store/apps/details?id=com.loblaw.pharmaprix",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/google-play.svg",alt:"Get it on Google Play"}},socialMediaIcons:[{name:"facebook",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/social-media/facebook.svg",alt:"facebook icon",url:"https://www.facebook.com/Pharmaprix"},{name:"instagram",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/social-media/instagram.svg",alt:"instagram icon",url:"https://www.instagram.com/pharmaprix/"},{name:"twitter",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/social-media/twitter.svg",alt:"twitter icon",url:"https://twitter.com/PharmaprixQC"}],siteMapLinks:[{title:"FAQ",categories:[{text:"Online Shopping",url:"https://lclcallcenters.my.site.com/pharmaprix/s/topic/0TO2M000001Fm2PWAS/achats-et-services-en-ligne?language=en_US"},{text:"PC Optimumâ¢",url:"https://lclcallcenters.my.site.com/PCoptimumsupport/s/?language=en_US"},{text:"Online Pharmacy Account",url:"https://mondossierpharma.ca/en/Content/Faq"},{text:"Other FAQ",url:"https://lclcallcenters.my.site.com/pharmaprix/s/?language=en_US"}]},{title:"Customer Service",categories:[{text:"Contact Us",url:"https://www.pharmaprix.ca/page/contact-us"},{text:"Find a Store",url:"https://www.pharmaprix.ca/en/store-locator"},{text:"Returns & Exchanges",url:"https://www.pharmaprix.ca/page/returns-and-exchanges"},{text:"Shipping & Handling",url:"https://www.pharmaprix.ca/page/shipping-and-handling"},{text:"Same-day Delivery",url:"https://www.pharmaprix.ca/page/same-day-delivery"}]},{title:"Corporate",categories:[{text:"Shoppers Foundation for Womenâs Healthâ¢",url:"https://fondationpharmaprix.ca/en/"},{text:"Corporate",url:"https://corporate.shoppersdrugmart.ca/en/home"},{text:"Corporate News",url:"https://corporate.shoppersdrugmart.ca/en/our-stories"},{text:"Franchise Opportunities",url:"https://corporate.shoppersdrugmart.ca/fr/careers-franchise"},{text:"Pharmacy Acquisitions",url:"https://corporate.shoppersdrugmart.ca/fr/careers-sell-to-us"},{text:"Careers",url:"https://corporate.shoppersdrugmart.ca/fr/careers-life-at-shoppers"}]},{title:"More by Pharmaprix",categories:[{text:"Check Gift Card Balance",url:"https://wbiprod.storedvalue.com/wbir/clients/pharmaprix?lng=en"},{text:"PC Healthâ¢",url:"https://www.pchealth.ca/en/"},{text:"Pharmaprix Photo",url:"https://www.pharmaprixphoto.ca/"},{text:"Passport Photos",url:"https://www.pharmaprix.ca/en/more-by-pharmaprix/passport"},{text:"Fresh Food",url:"https://www.pharmaprix.ca/en/more-by-pharmaprix/fresh-food"}]}],utilityLinks:[{text:"Fran\xe7ais",url:"https://www.pharmaprix.ca/?lang=fr"},{text:"Accessibility",url:"https://www.pharmaprix.ca/en/contact-us/accessibility-standard"},{text:"Terms and Conditions",url:"https://corporate.shoppersdrugmart.ca/fr/legal"},{text:"Privacy policy",url:"https://www.loblaw.ca/en/privacy-policy/"}],disclaimer:{line1:"Prices shown online may be different in store. Product availability may vary by store. Please contact your nearest store for availability and quantity limitations. ",line2:"\xae/⢠Trademarks of 911979 Alberta Ltd., used under license. \xa9 ".concat(new Date().getFullYear()," Pharmaprix Inc.")}},fr:{signUp:{info:{title:"Inscrivez-vous et obtenez 10 000 points PC Optimum",details:"Inscrivez-vous pour recevoir des courriels et des offres par texto et obtenez des points \xe0 utiliser lors de votre prochain achat de 40 $ ou plus!"},cta:{displayName:"Sâinscrire",url:"https://www.pharmaprix.ca/page/sign-up"}},downloadApp:{title:"Appli Pharmaprix ",appStore:{url:"https://apps.apple.com/ca/app/pharmaprix/id6448917330",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/apple-app-store-fr.svg",alt:"T\xe9l\xe9charger dans l'App Store"},googlePlay:{url:"https://play.google.com/store/apps/details?id=com.loblaw.pharmaprix",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/google-play-fr.svg",alt:"Disponible sur Google Play"}},socialMediaIcons:[{name:"facebook",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/social-media/facebook.svg",alt:"facebook icon",url:"https://www.facebook.com/Pharmaprix"},{name:"instagram",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/social-media/instagram.svg",alt:"instagram icon",url:"https://www.instagram.com/pharmaprix
1/"},{name:"twitter",src:"https://assets.beauty.shoppersdrugmart.ca/bb-prod-marketing-image/site-icons/sdui-icons/social-media/twitter.svg",alt:"twitter icon",url:"https://twitter.com/PharmaprixQC"}],siteMapLinks:[{title:"FAQ",categories:[{text:"Magasinage en ligne",url:"https://lclcallcenters.my.site.com/pharmaprix/s/topic/0TO2M000001Fm2PWAS/achats-et-services-en-ligne?language=fr"},{text:"PC Optimum",url:"https://lclcallcenters.my.site.com/PCoptimumsupport/s/?language=fr"},{text:"Compte de pharmacie en ligne",url:"https://mondossierpharma.ca/fr/Content/Faq"},{text:"Autre FAQ",url:"https://lclcallcenters.my.site.com/pharmaprix/s/?language=fr"}]},{title:"Service \xe0 la client\xe8le",categories:[{text:"Nous joindre",url:"https://www.pharmaprix.ca/page/contact-us"},{text:"Trouver le magasin",url:"https://www.pharmaprix.ca/fr/store-locator"},{text:"Retours et \xe9changes",url:"https://www.pharmaprix.ca/page/returns-and-exchanges"},{text:"Livraison et manutention",url:"https://www.pharmaprix.ca/page/shipping-and-handling"},{text:"Livraison le jour m\xeame",url:"https://www.pharmaprix.ca/page/same-day-delivery"}]},{title:"Notre entreprise",categories:[{text:"Fondation Pharmaprix pour la sant\xe9 des femmes",url:"https://fondationpharmaprix.ca/"},{text:"Notre entreprise",url:"https://corporate.shoppersdrugmart.ca/fr/home"},{text:"Nouvelles de l'entreprise",url:"https://corporate.shoppersdrugmart.ca/fr/our-stories"},{text:"Possibilit\xe9s de franchise",url:"https://corporate.shoppersdrugmart.ca/fr/careers-franchise"},{text:"Acquisition de pharmacies",url:"https://corporate.shoppersdrugmart.ca/fr/careers-sell-to-us"},{text:"Carri\xe8res",url:"https://corporate.shoppersdrugmart.ca/fr/careers-life-at-shoppers"}]},{title:"Autres services de Pharmaprix ",categories:[{text:"V\xe9rifier le solde de la carte-cadeau",url:"https://wbiprod.storedvalue.com/wbir/clients/pharmaprix?lng=fr"},{text:"PC Sant\xe9",url:"https://www.pchealth.ca/fr/"},{text:"Pharmaprix Photo",url:"https://www.pharmaprixphoto.ca/"},{text:"Photos de Passeport",url:"https://www.pharmaprix.ca/fr/more-by-pharmaprix/passport"},{text:"Zone March\xe9",url:"https://www.pharmaprix.ca/fr/more-by-pharmaprix/fresh-food"}]}],utilityLinks:[{text:"English",url:"https://www.pharmaprix.ca/?lang=en"},{text:"Accessibilit\xe9",url:"https://www.pharmaprix.ca/fr/contact-us/accessibility-standard"},{text:"Terms et conditions",url:"https://corporate.shoppersdrugmart.ca/fr/legal"},{text:"Politique de confidentialit\xe9",url:"https://www.loblaw.ca/fr/privacy-policy/"}],disclaimer:{line1:"Les prix indiqu\xe9s en ligne peuvent \xeatre diff\xe9rents en magasin. La disponibilit\xe9 des produits peut varier selon les magasins. Veuillez contacter votre magasin le plus proche pour conna\xeetre les limites de disponibilit\xe9 et de quantit\xe9.",line2:"\uD83C\uDD6A/\uD83C\uDD6A Marques de commerce de 911979 Alberta Ltd., utilis\xe9es sous licence. \xa9 ".concat(new Date().getFullYear()," Pharmaprix Inc.")}}}};var s=n(42391);let u=()=>{let e=(0,s.useSettingsContext)(),t=(0,o.useSDMRouterContext)(),n=(0,a.mu)(t),{hostname:u}=window.location,c=(null==u?void 0:u.includes("pharmaprix"))||(null==u?void 0:u.includes("phx"))?"pharmaprix":"shoppersdrugmart",d=e.locale,p=e.isQuebec,m=l[c][d];return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(i.Footer,{footerData:m,clickHandler:n,locale:d,isQuebec:p})})}},88087:function(e,t,n){"use strict";n.d(t,{n:function(){return r.FooterComponent}});var r=n(32736);n(19268)},23012:function(e,t,n){"use strict";n.d(t,{GalleryCardScrollerComponent:function(){return h}});var r=n(1995),o=n(13732),a=n(64614),i=n(95371),l=n(56559),s=n(42391),u=n(88526),c=n(46006),d=n(80484),p=n(99255);let m=(e,t)=>{let n=0;return e.filter(e=>e.groupContent.length>0).map(e=>({...e,contentType:"1X1"===e.layout&&1===e.groupContent.length&&"verticalFeatureCard"===e.groupContent[0].contentType?"verticalFeatureCard":"horizontalFeatureCard",groupContent:e.groupContent.map(e=>{var r,o,a,i,l;if(n+=1,"headline"in e&&"displayText1"in e)return{...e,position:n};let s="",u=e.image;"object"==typeof u&&"url"in u?s=null!==(a=u.url)&&void 0!==a?a:"":"string"==typeof u&&(s=u);let c=null===(r=e.callToAction)||void 0===r?void 0:r.url,d=null!==(i=null===(o=e.callToAction)||void 0===o?void 0:o.text)&&void 0!==i?i:"";return{...e,position:n,image:s,callToActionHandler:()=>{t(c)},label:d,callToAction:void 0,styling:null!==(l=e.styling)&&void 0!==l?l:null,linkUrl:c}})}))},h=e=>{let{scrollerContent:t,scrollOverflow:n,headerGroup:h,analytics:g,contentId:v,componentId:f,position:y}=e,x=(0,d.useSimpleTranslation)(),{router:C}=(0,l.useSDMRouterContext)(),S=(0,c.mu)(C),{headline:b,callToAction:w}=h||{},{trackEvent:A}=(0,s.useAnalyticsContext)(),{getFeatureFlags:E}=(0,s.useFeatureFlags)(),{EnableHeliosSnowplow:T}=E(),k=null==g?void 0:g.dsModel,_=(0,u.getCommonComponentContext)(T,!0,k,null==g?void 0:g.genericAnalytics),P=null!=h?h:{headline:{text:(null==b?void 0:b.text)||"",variantId:"MEDIUM_03",callToAction:w,clickHandler:S}},I=(0,o.useMemo)(()=>m(t,S),[t,S]),M=I[I.length-1],L=M.groupContent[M.groupContent.length-1].position,j={id:v,type:f,name:P.headline.text||v,number_of_children:L,subtype:null,position:y+1,is_sponsored:!!(null==g?void 0:g.mediaAnalytics)},D=!!P.headline.text;return(0,r.jsxs)(a.WrapperSection,{children:[D?(0,r.jsx)(p.HeaderGroupComponent,{...P,noWrapper:!0}):null,(0,r.jsx)(i.GalleryCardScroller,{callToActionHandler:S,i18nskip:x("skip"),scrollOverflow:n,scrollerContent:m(t,S),skipLinkLabel:P.headline.text||x("a11ySection"),trackingFn:(e,t)=>{let{component:n}=t;A("heliosGalleryCardScroller",{event:e,component:[j,{...n,number_of_children:null,hierarchy:[j.name,n.name],parent_id:v,is_sponsored:!!(null==g?void 0:g.mediaAnalytics)}],...e===u.SDMAnalyticEvents.UI_ENGAGEMENT?{customEngagement:{action:"click"}}:{},..._})}})]})}},2072:function(e,t,n){"use strict";n.d(t,{i:function(){return r.GalleryCardScrollerComponent}});var r=n(23012)},99255:function(e,t,n){"use strict";n.d(t,{HeaderGroupComponent:function(){return u}});var r=n(1995);n(13732);var o=n(73842),a=n(46006),i=n(56559),l=n(94077),s=n(78800);let u=e=>{var t;let{headline:n,paragraph:u,callToAction:c,logoUrl:d,logoAltText:p,logoUrl2:m,logo2AltText:h,noWrapper:g,styling:v,id:f,desktopImage:y,tabletImage:x,mobileImage:C,componentId:S,contentId:b,isSSR:w,ssr:A,theme:E,position:T,analytics:k,..._}=e,{router:P}=(0,i.useSDMRouterContext)(),I=(0,a.mu)(P),M=s.headlineVariants[(null==n?void 0:n.variantId)||"LARGE_01"],L=u?s.paragraphVariants[null==u?void 0:u.variantId]:null,j={logoUrl:d,logoAltText:p,logoUrl2:m,logo2AltText:h,title:null==n?void 0:n.text,subTitle:null==u?void 0:u.text,paragraphStyle:null==L?void 0:L.style,headingTag:null==n?void 0:null===(t=n.headerType)||void 0===t?void 0:t.toLowerCase(),headlineSize:M.headlineSize,paragraphLeftIcon:null==u?void 0:u.subTitleLeftIcon,paragraphSize:null==L?void 0:L.size,link:null==n?void 0:n.callToAction,linkBottom:c,alignment:null==n?void 0:n.alignment,clickHandler:I,desktopImage:y,tabletImage:x,mobileImage:C,..._};return g?(0,r.jsx)(o.Headline,{...j}):(0,r.jsx)(l.j,{styling:v,id:f,children:(0,r.jsx)(o.Headline,{...j})})}},4599:function(e,t,n){"use strict";n.d(t,{S:function(){return r.HeaderGroupComponent}});var r=n(99255)},3329:function(e,t,n){"use strict";n.d(t,{K:function(){return r.InfoBannerComponent}});var r=n(81403)},81403:function(e,t,n){"use strict";n.d(t,{InfoBannerComponent:function(){return d}});var r=n(1995);n(13732);var o=n(87099),a=n(42391),i=n(88526),l=n(46006),s=n(56559),u=n(11200),c=n(94077);let d=e=>{let{headline:t,body:n,image:d,imagePlacement:p="LEFT",button:m,variant:h="INLINE",size:g="DEFAULT",styling:v,componentId:f,contentId:y}=e,{router:x}
1=(0,s.useSDMRouterContext)(),C=(0,l.mu)(x),{trackEvent:S}=(0,a.useAnalyticsContext)(),{getFeatureFlags:b}=(0,a.useFeatureFlags)(),{EnableHeliosSnowplow:w}=b(),A=d?{...d,src:d.url,alt:d.altText||""}:void 0,E=(null==m?void 0:m.callToAction)?{...m,children:m.callToAction.text,onClick:()=>{let e=null==m?void 0:m.callToAction;e&&(S(u._W,{event:i.SDMAnalyticEvents.UI_ENGAGEMENT,heliosSnowplow:w,heliosAnalytics:!0,component:{id:y||"",type:f||"infoBannerComponent",name:t,click_element:e.text,click_action:"callToAction",cta_url:e.url},customEngagement:{action:"click"}}),C(e.url))}}:void 0;return(0,r.jsx)(c.j,{componentId:f,contentId:y,styling:v,children:(0,r.jsx)(o.InfoBanner,{headline:t,body:n,image:A,imagePlacement:p,button:E,variant:h,size:g,styling:v,"data-component-id":f,"data-content-id":y})})}},57689:function(e,t,n){"use strict";n.d(t,{I:function(){return g}});var r=n(1995),o=n(13732),a=n(46006),i=n(56559),l=n(31668),s=n(30096),u=n(98199),c=n(25121),d=n(64614),p=n(51551);let m="undefined"==typeof document,h=(0,u.V)(e=>{let{router:t}=(0,i.useSDMRouterContext)(),n=(0,a.mu)(t),u=(0,s.useTrackMediaAnalyticsAdClick)(!0),c=(0,o.useCallback)(()=>{u(e,void 0,{creative_id:(0,s.paramCase)((null==p?void 0:p.text)||"")})},[]),{adSize:d,callToAction:p,desktopImage:m,isSponsored:h,mobileImage:g,sponsoredText:v,tabletImage:f,contentId:y,componentId:x}=e;return(0,r.jsx)(l.IabAd,{adSize:d,mobileImage:g,tabletImage:f,desktopImage:m,sponsoredText:v,callToAction:p,contentId:y,isSponsored:h,trackingFn:c,redirectAction:n,componentId:x})}),g=e=>{let[t,n]=(0,o.useState)(!1),{fetchOptions:a}=(0,p.useViewResolverContext)();return((0,o.useEffect)(()=>{m||n(!0)},[]),!m&&t&&a)?(0,r.jsx)(h,{...e}):(0,r.jsx)(d.WrapperSection,{children:(0,r.jsx)(c.IabAdSkeleton,{})})}},60629:function(e,t,n){"use strict";n.d(t,{E:function(){return C}});var r=n(1995),o=n(13732),a=n(12997),i=n(42391),l=n(56559),s=n(46006),u=n(26393),c=n(88526),d=n(30096),p=n(80484),m=n(3423),h=n(98199),g=n(64614),v=n(85404),f=n(51551);let y="undefined"==typeof document,x=(0,h.V)(e=>{let{locale:t}=(0,i.useSettingsContext)(),{addToCart:n,entries:h,isLoading:g}=(0,l.useSDMCartContext)(),{router:v}=(0,l.useSDMRouterContext)(),f=(0,s.mu)(v),y=(0,m.a7)(),{getFeatureFlags:x}=(0,i.useFeatureFlags)(),{EnableHeliosSnowplow:C}=x(),S=(0,c.useAddToCartTrackEvent)(C),b=(0,d.useTrackMediaAnalyticsAdClick)(),w=(0,p.useSimpleTranslation)(),{isSponsored:A,sponsoredText:E,headline:T,logoImage:k,mobileImage:_,tabletImage:P,desktopImage:I,callToAction:M,displayText1:L,displayText2:j,productTiles:D,componentId:R,contentId:F}=e,O=(0,o.useCallback)(function(t){var n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;b(e,void 0,{creative_id:(null==r?void 0:null===(n=r.data)||void 0===n?void 0:n.creativeOverride)||(0,d.paramCase)((null==M?void 0:M.text)||"")})},[]),N={id:F,type:R,name:T||""},B=null==D?void 0:D.map(e=>{let{isComplementarySponsored:t,isSponsored:n,link:r}=e,o=(0,a.appendSourceQueryToProductLink)(t,n||A||!!E,r);return{...e,link:o}}),U=(0,o.useCallback)((e,t)=>{(0,c.trackMediaAnalyticsEvent)(e,t,B,N,C,S,b,void 0)},[B,N,C]),V={language:t,isSponsored:A,sponsoredText:E,headline:T,logoImage:k,mobileImage:_,tabletImage:P,desktopImage:I,displayText1:L,displayText2:j,productTiles:B,addToCartCB:n,isCartLoading:g,entries:h,isMedia:!0,callToAction:M,a11yMessages:y,i18nskipText:w("skip"),trackFnWrapper:U,trackingFn:O,tileAction:f};return(0,r.jsx)(u.ShoppableDisplay,{contentId:F,...V})}),C=e=>{let[t,n]=(0,o.useState)(!1),{fetchOptions:a}=(0,f.useViewResolverContext)();return((0,o.useEffect)(()=>{y||n(!0)},[]),!y&&t&&a)?(0,r.jsx)(x,{...e}):(0,r.jsx)(g.WrapperSection,{children:(0,r.jsx)(v.ShoppableDisplaySkeleton,{})})}},98199:function(e,t,n){"use strict";n.d(t,{V:function(){return v}});var r=n(1995),o=n(13732),a=n(42302),i=n(56559),l=n(51551),s=n(12997),u=n(86912),c=n(21715),d=n(64614),p=n(11765),m=n(65859),h=n(92370),g=n(58665);let v=e=>function(t){var n,v,f,y,x;let C=(0,o.useRef)(null),{fetchOptions:S,viewDefinition:b}=(0,l.useViewResolverContext)(),{pcOptimumAccount:w,customerId:A}=(0,i.useSDMCustomerContext)(),E=null==w?void 0:w.memberId,{viewport:T}=(0,i.useSDMViewportContext)(),k=(0,g.A)(),{componentId:_,mediaConfiguration:P,contentId:I,cacheBuster:M=null}=t,L=null!==(x=null===(n=k[_])||void 0===n?void 0:n.call(k))&&void 0!==x?x:null,j=(0,o.useRef)((0,a.A)()),{originalTargetParam:D,mediaUATParam:R,sourceParam:F}=(0,s.getSDMUrlParams)(),{adUnitType:O,adSizesMobile:N,adSizesTablet:B,adSizesDesktop:U,lazyLoad:V,lazyLoadingTriggerThreshold:G,position:W,searchTerm:z,customData:H,pageType:q}=P,Q="/search"===window.location.pathname&&z?z:D,{inViewport:K}=(0,s.useLazyLoad)(V,C,G),Y=(0,s.getAdSizesByViewport)(T,N,B,U),X=(0,s.generateMediaDisplayInfo)({adUnitType:O,adSizesByViewport:Y,searchTerm:Q}),Z="".concat(O,"_").concat(W),J=q||(null==b?void 0:null===(f=b.viewAnalytics)||void 0===f?void 0:null===(v=f.mediaAnalytics)||void 0===v?void 0:v.target_page_type),$=(0,s.generateMediaMeta)({targetPageType:J,adPlacementId:Z,customData:H,Lob:s.LOBs.SDM}),ee=(0,s.getCiamAccessToken)(),et=(null===(y=window.location)||void 0===y?void 0:y.hostname.includes("pharmaprix"))?"pharmaprix":"shoppersdrugmart",en=(0,s.getIsSourceFiltered)(F,t),{reservedId:er,...eo}=(0,s.createMediaRequestBody)({fetchOptions:S,searchTerm:Q,meta:$,mediaDisplayInfo:X,customerId:A,walletId:E,targetPageType:J,adUnitType:O,position:W,componentId:_,Lob:s.LOBs.SDM,customData:H}),{data:ea,isFetching:ei,error:el}=(0,u.w)({fetchOptions:{...S,body:JSON.stringify(eo)},endpoint:"".concat(et,"/media/ads"),...!!(ee&&A)&&{ciamAccessToken:ee},..."dev"==R&&{envConfig:h},..."qa"==R&&{envConfig:m},...("uat"==R||"true"==R)&&{envConfig:p},cacheBuster:M,enabled:!en,reservedId:er,traceId:j.current});if(ei)return L;if(el||!ea)return null;let{components:es}=ea||{},eu="homepage"===J?d.WrapperSection:o.Fragment;return(0,r.jsx)(c.ErrorBoundary,{FallbackComponent:()=>null,children:null==es?void 0:es.map(t=>{var n;let{data:o}=t;return(null==o?void 0:null===(n=o.callToAction)||void 0===n?void 0:n.url)&&(o.callToAction.url=(0,s.getAbsoluteLink)(o.callToAction.url)),(0,r.jsx)("div",{"data-testid":"with-media-component-".concat(W),ref:C,children:(0,r.jsxs)(eu,{marginBottom:0,children:[(0,r.jsx)(l.WithRendererCallbacks,{...o,componentId:_,id:W,checkViewed:K,contentId:I}),(0,r.jsx)(e,{...o,componentId:_,contentId:I})]})},"".concat(o.componentId,"-").concat(W))})})}},42219:function(e,t,n){"use strict";n.d(t,{l:function(){return r.MenuTileCarouselComponent}});var r=n(45719)},45719:function(e,t,n){"use strict";n.d(t,{MenuTileCarouselComponent:function(){return h}});var r=n(1995),o=n(13732),a=n(59146),i=n(61841),l=n(3423),s=n(80484),u=n(56559),c=n(46006),d=n(4599),p=n(94077);let m=["TWO_ROW_LARGE_IMAGE","TWO_ROWS_WIDE_IMAGE","TWO_ROWS_STROKE_WIDE_IMAGE","TWO_ROWS_STROKE_IMAGE"],h=e=>{let{headline:t,menuTiles:n,headerGroup:h,callToAction:g,variantId:v="DEFAULT",styling:f,contentId:y,id:x,noOuterWrapper:C=!1,noOuterWrapperCSS:S={}}=e,{size:b,isBorder:w}
1=(0,l.CH)(v),A=m.includes(v),E=(0,s.useSimpleTranslation)()("skip"),{router:T}=(0,u.useSDMRouterContext)(),k=(0,c.mu)(T),_=(0,o.useMemo)(()=>n.map((e,t)=>{var n;return{...e,id:e.id||(null===(n=e.callToAction)||void 0===n?void 0:n.url)||"menu-tile-".concat(y||x||"default","-").concat(t)}}),[n,y,x]),P=null!=h?h:{headline:{text:t,variantId:"MEDIUM_03",callToAction:g,clickHandler:k}},I=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.S,{...P,noWrapper:!0}),A?(0,r.jsx)(i.MenuTileGridTwoRowsCarousel,{menuTileList:_,size:b,isBorder:w,skipLinkLabel:E,callToActionHandler:k}):(0,r.jsx)(i.MenuTileCarousel,{menuTileList:_,size:b,isBorder:w,skipLinkLabel:E,callToActionHandler:k})]});return C?(0,r.jsx)(a.a,{style:S,children:I}):(0,r.jsx)(p.j,{isExtraLargeSpacing:!0,id:x,styling:f,children:I})}},95937:function(e,t,n){"use strict";n.d(t,{Q:function(){return r.MiniInfoCardContainerComponent}});var r=n(8455)},8455:function(e,t,n){"use strict";n.d(t,{MiniInfoCardContainerComponent:function(){return s}});var r=n(1995);n(13732);var o=n(43382),a=n(4599),i=n(44349),l=n(94077);let s=e=>{let{headerGroup:t,containerType:n,upNumber:s,miniInfoCards:u,styling:c,id:d}=e;return(0,r.jsxs)(l.j,{styling:c,id:d,children:[t&&(0,r.jsx)(a.S,{noWrapper:!0,...t}),(0,r.jsx)(o.CardContainer,{columnLayout:{GRID:{"1UP":{mobile:1,tablet:1,tabletLarge:1,desktop:1},"3UP":{mobile:2,tablet:3,tabletLarge:3,desktop:3},"4UP":{mobile:1,tablet:2,tabletLarge:4,desktop:4}},SCROLLER:{"1UP":{mobile:1,tablet:1,tabletLarge:1,desktop:1},"3UP":{mobile:2,tablet:3,tabletLarge:3,desktop:3},"4UP":{mobile:1,tablet:3,tabletLarge:4,desktop:4}},GRID_WITH_SCROLLER_ON_SMALL_SCREENS:{"1UP":{mobile:1,tablet:1,tabletLarge:1,desktop:1},"3UP":{mobile:2,tablet:3,tabletLarge:3,desktop:3},"4UP":{mobile:1,tablet:3,tabletLarge:4,desktop:4}}}[n][s],variant:n,cards:u.map(e=>{var t,n;return(0,r.jsx)(i.MiniInfoCard,{headline:e.headline,displayText:e.displayText1,imageAltText:null===(t=e.image)||void 0===t?void 0:t.altText,imageUrl:null===(n=e.image)||void 0===n?void 0:n.url,minW:"initial"},e.headline)})})]})}},25292:function(e,t,n){"use strict";n.d(t,{H:function(){return r.ProductCarouselComponent}});var r=n(56741)},56741:function(e,t,n){"use strict";n.d(t,{ProductCarouselComponent:function(){return g}});var r=n(1995),o=n(13732),a=n(94082),i=n(42391),l=n(56559),s=n(88526),u=n(80484),c=n(3423),d=n(30096),p=n(99255),m=n(94077),h=n(46006);let g=e=>{let{headline:t,productTiles:n,callToAction:g,headerGroup:v,styling:f,analytics:y,contentId:x,id:C,position:S,_allProductTiles:b}=e,{addToCart:w,entries:A,isLoading:E}=(0,l.useSDMCartContext)(),[T,k]=(0,o.useState)(n);(0,o.useEffect)(()=>{b&&b.length>n.length&&k(b)},[b,n]);let{getFeatureFlags:_}=(0,i.useFeatureFlags)(),{EnableHeliosSnowplow:P}=_(),I=(0,i.useSettingsContext)(),M=(0,d.useTrackMediaAnalyticsAdClick)(),L=(0,s.useAddToCartTrackEvent)(P),j=(0,l.useSDMRouterContext)(),D=(0,h.mu)(j),R=(0,o.useMemo)(()=>{var n;return{id:x||null,type:e.componentId||null,name:t||(null==v?void 0:null===(n=v.headline)||void 0===n?void 0:n.text)||"",position:null!=S?S:null}},[x,e.componentId,t,S]),F=null==y?void 0:y.genericAnalytics,O=(0,o.useMemo)(()=>{var e,t;return null!==(t=null!==(e=null==F?void 0:F.ds_model)&&void 0!==e?e:null==y?void 0:y.dsModel)&&void 0!==t?t:[]},[null==F?void 0:F.ds_model,null==y?void 0:y.dsModel]),N=null==y?void 0:y.position,B=(0,u.useSimpleTranslation)(),U=(0,c.a7)(),V=(0,h.Uv)(T,A),G=(0,o.useCallback)((e,t)=>{(0,s.trackMediaAnalyticsEvent)(e,t,V,R,P,L,M,void 0,O,F,N)},[V,R,P]),W=null!=v?v:{headline:{text:t,variantId:"MEDIUM_03",callToAction:g,clickHandler:D}};return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(m.j,{isExtraLargeSpacing:!0,styling:f,id:C,children:[(0,r.jsx)(p.HeaderGroupComponent,{noWrapper:!0,...W}),(0,r.jsx)(a.ProductCarousel,{skipLinkLabel:t,product_tiles:V,entries:A,addToCartCB:w,isCartLoading:E,trackingFn:G,productTileAction:D,i18nskip:B("skip"),a11yMessages:U,language:I.locale,lob:"sdm"})]})})}},24782:function(e,t,n){"use strict";n.d(t,{p:function(){return r.ProvinceSelectorComponent}});var r=n(24211)},24211:function(e,t,n){"use strict";n.d(t,{ProvinceSelectorComponent:function(){return u}});var r=n(1995),o=n(13732),a=n(42391),i=n(56559),l=n(82906),s=n(82590);let u=e=>{let{displayText1:t,provinceList:n}=e,{getFeatureFlags:u}=(0,a.useFeatureFlags)(),{[s.C0]:c}=u(),{provinceId:d,setProvinceId:p}=(0,i.useSDMCustomerContext)(),m=(0,o.useMemo)(()=>n.map(e=>({...e,selected:e.code===d})),[n,d]);return c?null:(0,r.jsx)(l.ProvinceSelectorWrapper,{children:(0,r.jsx)(l.SelectBox,{label:t,labelId:"location",menuName:"menu-button-:r1:",options:m,onSelected:e=>{var t;let r=null===(t=n.find(t=>t.name===e))||void 0===t?void 0:t.code;r&&p(r)}},d)})}},17568:function(e,t,n){"use strict";n.d(t,{Y:function(){return p}});var r=n(1995),o=n(13732),a=n(32327),i=n(80484),l=n(3423),s=n(42391),u=n(78800),c=n(46006),d=n(56559);let p=e=>{let{quickFilters:t}=e,n=(0,i.useSimpleTranslation)(),p=(0,d.useSDMRouterContext)(),m=(0,c.mu)(p),h=(0,l.ri)(),{trackEvent:g}=(0,s.useAnalyticsContext)(),v=e=>{let n=Object.keys(e)[0],r=e[n],o=null==t?void 0:t.map(e=>(n===e.filterGroup.code&&e.filterGroup.values.map(e=>{e.selected=r}).flat(),e));g("heliosFilterTracking",{eventType:"heliosFilterTracking",heliosAnalytics:!0,heliosSnowplow:!0,trackFilterData:null==o?void 0:o.map(e=>e.filterGroup.values.filter(e=>e.selected).map(t=>({category:e.filterGroup.code,value:t.name}))).flat()})},f=(0,o.useCallback)(e=>{let n,r;let o={};v(e),null==t||t.map(t=>{n=Object.keys(e)[0],r=e[n],t.filterGroup.values.map(e=>{let{code:r}=e;t.filterGroup.code===n&&(o[n]=o.hasOwnProperty(n)?[...o[n],r]:[r])}),o[u.ListingURLParamType.PAGE]="1",m(h(o,r))})},[t,h]);
1return(0,r.jsx)(a.QuickFilters,{moreFiltersLabel:n("moreFilters"),lessFiltersLabel:n("lessFilters"),buttons:t,ariaLabelGroup:n("a11yQuickFilters"),numberOfFilters:{mobile:2,desktop:4},handleOnChange:f,"data-testid":"quick-filters",hideFilterLabel:!0})}},78597:function(e,t,n){"use strict";n.d(t,{$:function(){return C}});var r=n(1995),o=n(13732),a=n(9e4),i=n(80996),l=n(62704),s=n(54084),u=n(94077),c=n(42391),d=n(78800),p=n(88526),m=n(56559),h=n(30096),g=n(3423),v=n(80484),f=n(46006),y=n(4599);let x=e=>{let{enableHeliosSnowplow:t,onReady:n}=e,r=(0,p.useAddToCartTrackEvent)(t);return(0,o.useEffect)(()=>{n(r)},[r,n]),null},C=e=>{let{pagination:t,productTiles:n,contentId:C,componentId:S,headerGroup:b,id:w}=e,A=(0,c.useSettingsContext)(),{trackEventTileAdClick:E}=(0,c.useAnalyticsContext)(),T=(0,v.useSimpleTranslation)(),k=(0,p.usePaginationTracking)(),{getFeatureFlags:_}=(0,c.useFeatureFlags)(),{EnableHeliosSnowplow:P}=_(),I=(0,h.useTrackMediaAnalyticsAdClick)(),{addToCart:M,isLoading:L,entries:j}=(0,m.useSDMCartContext)(),D=(0,o.useRef)(()=>{}),[R,F]=(0,o.useState)(!1);(0,o.useEffect)(()=>{F(!0)},[]);let O=(0,o.useCallback)(e=>{D.current=e},[]),N=(0,o.useMemo)(()=>({id:C||null,type:S||null,name:null}),[C,S]),B=(0,o.useMemo)(()=>(0,f.Uv)(n,j),[n,j]),U=()=>{var e;if("productGridComponent"===S&&(null===(e=window)||void 0===e?void 0:e.location.pathname)!=="/search"){let e=(null==t?void 0:t.pageSize)||36,n=(null==t?void 0:t.totalResults)||0;if(null==B?void 0:B.length){let r=null==B?void 0:B.map(e=>{var t;return{...e,quantity:(null===(t=j[e.productId])||void 0===t?void 0:t.quantity)||0}});k({pagination:{currentPage:(null==t?void 0:t.pageNumber)||0,pageSize:e,totalResults:n},products:r})}}};(0,o.useEffect)(()=>{U()},[t,B]);let V=(0,g.a7)(),G=(0,o.useCallback)((e,n)=>{(0,p.trackMediaAnalyticsEvent)(e,n,B,N,P,D.current,I,t)},[B,N,t,P,I]),{router:W}=(0,m.useSDMRouterContext)(),z=(0,f.mu)(W),H=(e,t,n)=>{E&&E(S||"",{isSponsored:t,productId:n}),z(e)};return 0===n.length?(0,r.jsx)(s.LongText,{variantId:"LARGE",textColour:"BLACK",markdownContentBody:"**0** "+T("zeroResultsFound"),textAlignment:"left"}):(0,r.jsxs)(r.Fragment,{children:[R?(0,r.jsx)(x,{enableHeliosSnowplow:P,onReady:O}):null,b&&(0,r.jsx)(u.j,{styling:b.styling,isNoPadding:!0,children:(0,r.jsx)(y.S,{...b,noWrapper:!0})}),(0,r.jsx)(i.ProductGrid,{columnGap:24,p:0,id:w,children:null==B?void 0:B.map((e,t)=>{var n,o,i;let{brand:s,title:u,packageSizing:c,deal:p,mopDeal:m,inventoryIndicator:h,productId:g,ratings:v,productImage:f}=e,y={...e,brandImageUrl:null==f?void 0:null===(o=f[0])||void 0===o?void 0:null===(n=o.mediumRetinaUrl)||void 0===n?void 0:n.replace("a01_@2","a01"),quantity:null===(i=j[g])||void 0===i?void 0:i.quantity,isDisabled:(null==h?void 0:h.indicatorId)===d.SDMIndicatorIdType.OUT,dealText:null==p?void 0:p.text,inventoryIndicatorText:null==h?void 0:h.text,deal:p,rating:null==v?void 0:v.average_rating,mopDeal:m};return(0,r.jsx)(a.E,{children:(0,r.jsx)(l.ProductTileSdm,{language:A.locale,...y,updateCart:M,a11yMessages:V,trackingFn:G,isCartLoading:L,brandImageAltText:"".concat(s," ").concat(u," ").concat(c),productTileAction:t=>H(t,!!(null==e?void 0:e.isSponsored),g)})},g||t)})})]})}},63041:function(e,t,n){"use strict";n.d(t,{K:function(){return c}});var r=n(1995);n(13732);var o=n(82906),a=n(80484),i=n(88526),l=n(3423),s=n(46006),u=n(56559);let c=e=>{let t=(0,a.useSimpleTranslation)(),n=(0,i.useSortTracking)(),c=(0,u.useSDMRouterContext)(),d=(0,s.mu)(c),p=(0,l.ri)();return 0===e.sorts.length?null:(0,r.jsx)(o.SelectBox,{label:t("sortBy"),labelId:"sort-by",menuName:"menu-button-:r1:",labelPosition:"horizontal",options:e.sorts,onSelected:t=>{let r=(0,s.pB)(t,e.sorts);n({sortEventValue:t}),d(p(r,!0))},"data-testid":"selectbox"})}},26137:function(e,t,n){"use strict";n.d(t,{u:function(){return r.SpotlightScrollerComponent}});var r=n(78078)},78078:function(e,t,n){"use strict";n.d(t,{SpotlightScrollerComponent:function(){return h}});var r=n(1995),o=n(13732),a=n(42391),i=n(56559),l=n(78800),s=n(26393),u=n(80484),c=n(88526),d=n(46006),p=n(3423),m=n(94077);let h=e=>{var t,n,h,g,v,f,y,x,C,S,b;let{locale:w}=(0,a.useSettingsContext)(),{addToCart:A,entries:E,isLoading:T}=(0,i.useSDMCartContext)(),{trackEvent:k}=(0,a.useAnalyticsContext)(),{getFeatureFlags:_}=(0,a.useFeatureFlags)(),{EnableHeliosSnowplow:P}=_(),{router:I}=(0,i.useSDMRouterContext)(),M=(0,d.mu)(I),L=(0,p.a7)(),j=(0,u.useSimpleTranslation)(),{headerGroup:D,isSponsored:R,sponsoredText:F,logoImage:O,mobileImage:N,tabletImage:B,desktopImage:U,productTiles:V,contentId:G,componentId:W,position:z,analytics:H,imagePlacement:q,styling:Q}=e,K=null!==(f=null===(t=D.headline)||void 0===t?void 0:t.text)&&void 0!==f?f:"",Y=null!==(x=null!==(y=D.callToAction)&&void 0!==y?y:null===(n=D.headline)||void 0===n?void 0:n.callToAction)&&void 0!==x?x:void 0,X=null!==(C=null===(h=D.paragraph)||void 0===h?void 0:h.text)&&void 0!==C?C:"",Z=null===(g=D.paragraph)||void 0===g?void 0:g.variantId,J=Z?l.paragraphVariants[Z]:void 0,$=(null==q?void 0:q.trim().toLowerCase())==="right"?"right":"left",ee=null==H?void 0:H.dsModel,et=(0,o.useMemo)(()=>V,[V]),en=(0,o.useCallback)((e,t)=>{var n,r;let{actionType:o,callToActionElement:a}=t||{},i=null!==(r=Array.isArray(ee)?null===(n=ee[0])||void 0===n?void 0:n.engine:(null==ee?void 0:ee.engine)||"")&&void 0!==r?r:"",l=(0,c.getCommonComponentContext)(P,!0,ee,null==H?void 0:H.genericAnalytics);k("heliosProductCarousel",{event:e,component:{id:G||"",type:W||"",name:K,click_element:(null==a?void 0:a.text)||"",click_action:(null==a?void 0:a.url)||"",engine:i,..."number"==typeof z?{position:z+1}:{}},customEngagement:{action:null!=o?o:e},...l})},[null==H?void 0:H.genericAnalytics,W,G,ee,K,z,P,k]),er={contentId:G,language:w,isSponsored:null!=R&&R,sponsoredText:null!=F?F:"",headline:K,logoImage:O,mobileImage:N,tabletImage:B,desktopImage:U,displayText1:X,displayText2:"",productTiles:et,addToCartCB:A,isCartLoading:T,entries:E,isMedia:!1,callToAction:Y,a11yMessages:L,i18nskipText:j("skip"),trackingFn:en,trackFnWrapper:en,engagementTrackingFn:en,engagementTrackFnWrapper:en,tileAction:M,imagePosition:$,paragraphStyle:null==J?void 0:J.style,paragraphSize:null==J?void 0:J.size,paragraphColor:null!==(S=null===(v=D.paragraph)||void 0===v?void 0:v.color)&&void 0!==S?S:void 0,showBorder:null===(b=null==Q?void 0:Q.showBorder)||void 0===b||b};return(0,r.jsx)(m.j,{"data-testid":"spotlight-scroller-component",styling:Q,children:(0,r.jsx)(s.ShoppableDisplay,{...er})})}},39078:function(e,t,n){"use strict";n.d(t,{W:function(){return r.VerticalFeatureCardComponent}});var r=n(67995)},67995:function(e,t,n){"use strict";n.d(t,{VerticalFeatureCardComponent:function(){return h}});var r=n(1995),o=n(47150),a=n(42391),i=n(88526),l=n(56559),s=n(80484),u=n(13732),c=n(46006),d=n(99255),p=n(94077);let m={DEFAULT:16/9,LARGE:3/4},h=e=>{var t;let{upNumber:n,scrollOverflow:h,verticalFeatureCards:g,headerGroup:v,_allVerticalFeatureCards:f,styling:y,componentId:x,contentId:C,analytics:S,id:b,imageSize:w="DEFAULT"}
1=e,A=(0,s.useSimpleTranslation)(),E=(0,l.useSDMRouterContext)(),T=(0,c.mu)(E),k=h.toLowerCase(),_=[null!==(t=m[w])&&void 0!==t?t:m.DEFAULT],[P,I]=(0,u.useState)(g);(0,u.useEffect)(()=>{f&&f.length>g.length&&I(f)},[f,g]);let M=(null!=P?P:g).map(e=>{if(null==e||!e.callToActionLink||!("modalTitle"in e.callToActionLink))return{...e};{let{callToActionLink:t,...n}=e;return{...n,callToActionModal:t}}}).filter(e=>e),{trackEvent:L}=(0,a.useAnalyticsContext)(),{getFeatureFlags:j}=(0,a.useFeatureFlags)(),{EnableHeliosSnowplow:D}=j(),R=window.location.pathname.includes("/c/")||window.location.pathname.includes("/plp");return(0,r.jsxs)(p.j,{id:b,"data-testid":"vertical-feature-cards",styling:y,isNoPadding:R,children:[v&&(0,r.jsx)(d.HeaderGroupComponent,{...v,noWrapper:!0}),(0,r.jsx)(o.FeatureCards,{upNumber:n,scrollType:k,cardsList:M,i18nskip:A("skip"),skipLinkLabel:A("a11ySection"),variant:"vertical",cardClickAction:T,trackingFn:(e,t)=>{var n;let{actionType:r,callToActionElement:o,position:a}=t,l=null==S?void 0:S.dsModel,s=(null==l?void 0:l.engine)||"",u=(0,i.getCommonComponentContext)(D,!0,l),c=(null==v?void 0:null===(n=v.headline)||void 0===n?void 0:n.text)||"",{contentId:d,headline:p}=M[a?a-1:0];L("heliosVerticalFeatureCardContainer",{event:e,parentComponent:{id:C||"",type:x||"",name:c,engine:s},component:{id:d||"",type:"verticalFeatureCards",name:p,click_element:"callToAction",click_action:null==o?void 0:o.text,click_url:null==o?void 0:o.url,engine:s,position:a,number_of_children:g.length,parent_id:C,hierarchy:[c,p]},customEngagement:{action:r},...u})},aspectRatio:_})]})}},94077:function(e,t,n){"use strict";n.d(t,{j:function(){return a}});var r=n(1995),o=n(64614);n(13732);let a=e=>{let{children:t,styling:n,isExtraLargeSpacing:a,isNoPadding:i,id:l,componentId:s,contentId:u,isSSR:c,...d}=e;return(0,r.jsx)(o.WrapperSection,{id:l,styling:n,...i&&{px:0},...d,shouldUseSpacingExtraLarge:a,children:t})}},11200:function(e,t,n){"use strict";var r,o;n.d(t,{_W:function(){return a},qJ:function(){return i},uM:function(){return r}});let a="heliosInfoBannerClick",i="SEARCH_TERMS_DATA";(o=r||(r={})).TYPEAHEAD="typeahead",o.MANUAL_SEARCH="manual-search",o.TRENDING_SEARCH_TERM="trending-search-term",o.PREVIOUS_SEARCH_TERM="previous-search-term"},3423:function(e,t,n){"use strict";n.d(t,{NU:function(){return o},UK:function(){return c},a7:function(){return V},Ts:function(){return B},W5:function(){return q},Zz:function(){return h},vf:function(){return R},rq:function(){return p},lP:function(){return m.l},ri:function(){return O},cn:function(){return K},CH:function(){return G}});var r,o,a=n(13732),i=n(92370),l=JSON.parse('{"$schema":"./schema.json","apiKey":"qOldp90fcC7sS7I8WaZDfeT4NLAn7GjE","sduiBaseUrl":"https://pt-sdm-bff.api.loblaw.digital/sdui/views","sduiBffUrl":"https://pt-sdm-bff.api.loblaw.digital/beauty/v2","cdnBaseUrl":"https://assets-platform.loblaws.ca/ldp-core-web-dev/lower/ldp/","heliosBaseUrl":"https://helios-gateway-sit.loblaw.ca/api/public"}'),s=JSON.parse('{"$schema":"./schema.json","apiKey":"r3kEMAxRsQQtyjXiIJOTFNN75vcsJFxH","sduiBaseUrl":"https://prod-sdm-bff.api.loblaw.digital/beauty/v2/sdui/views","sduiBffUrl":"https://prod-sdm-bff.api.loblaw.digital/beauty/v2","cdnBaseUrl":"https://assets-platform.loblaws.ca/ldp-core-web-prod/production/ldp/","heliosBaseUrl":"https://helios-gateway.loblaw.ca/api/public"}');let u={development:i,perf:l,qa:n(65859),staging:JSON.parse('{"$schema":"./schema.json","apiKey":"qOldp90fcC7sS7I8WaZDfeT4NLAn7GjE","sduiBaseUrl":"https://prod-blue-sdm-bff.api.loblaw.digital/beauty/v2/sdui/views","sduiBffUrl":"https://prod-blue-sdm.api.loblaw.digital/beauty/v2","cdnBaseUrl":"https://assets-platform.loblaws.ca/ldp-core-web-prod/production/ldp/","heliosBaseUrl":"https://helios-gateway-sit.loblaw.ca/api/public"}'),uat:n(11765),production:s,schema:JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","description":"The settings schema for view resolver.","type":"object","properties":{"apiKey":{"type":"string","description":"The API key for the BFF."},"sduiBaseUrl":{"type":"string","description":"The base URL for the BFF API."},"cdnBaseUrl":{"type":"string","description":"The base URL for the remotes entries of module federated components."}},"required":["apiKey","sduiBaseUrl","cdnBaseUrl"]}')};(r=o||(o={})).DEVELOPMENT="development",r.PERF="perf",r.PRODUCTION="production",r.QA="qa",r.STAGING="staging",r.UAT="uat";let c=e=>{let[t,n]=(0,a.useState)(null);return(0,a.useEffect)(()=>{u[e]?n(u[e]):console.error("Invalid environment: ".concat(e))},[e]),!t&&e&&n(u[e]),t};var d=n(56559);let p=()=>{let[e,t]=(0,a.useState)(!0),n=(0,d.useSDMViewportContext)();return(0,a.useEffect)(()=>{t((null==n?void 0:n.viewport)==="desktop")},[null==n?void 0:n.viewport]),{isDesktopView:e}};var m=n(58665);let h=()=>(0,a.useMemo)(()=>({galleryScrollerComponent:(0,a.lazy)(()=>Promise.resolve().then(n.bind(n,23012)).then(e=>{let{GalleryCardScrollerComponent:t}=e;return{default:t}})),bentoCardContainerComponent:(0,a.lazy)(()=>Promise.resolve().then(n.bind(n,8111)).then(e=>{let{BentoCardsContainerComponent:t}=e;return{default:t}})),productCarouselComponent:(0,a.lazy)(()=>Promise.resolve().then(n.bind(n,56741)).then(e=>{let{ProductCarouselComponent:t}=e;return{default:t}})),brandSpotlightComponent:(0,a.lazy)(()=>Promise.resolve().then(n.bind(n,31359)).then(e=>{let{BrandSpotlightComponent:t}=e;return{default:t}})),menuTileCarouselComponent:(0,a.lazy)(()=>Promise.resolve().then(n.bind(n,45719)).then(e=>{let{MenuTileCarouselComponent:t}=e;return{default:t}})),headerGroupComponent:(0,a.lazy)(()=>Promise.resolve().then(n.bind(n,99255)).then(e=>{let{HeaderGroupComponent:t}=e;return{default:t}})),bannerCarouselComponent:(0,a.lazy)(()=>Promise.resolve().then(n.bind(n,40471)).then(e=>{let{BannerCarouselComponent:t}=e;return{default:t}})),verticalFeatureCardContainerComponent:(0,a.lazy)(()=>Promise.resolve().then(n.bind(n,67995)).then(e=>{let{VerticalFeatureCardComponent:t}=e;return{default:t}})),provinceListComponent:(0,a.lazy)(()=>Promise.resolve().then(n.bind(n,24211)).then(e=>{let{ProvinceSelectorComponent:t}=e;return{default:t}})),miniInfoCardContainerComponent:(0,a.lazy)(()=>Promise.resolve().then(n.bind(n,8455)).then(e=>{let{MiniInfoCardContainerComponent:t}=e;return{default:t}})),footerContentComponent:(0,a.lazy)(()=>Promise.resolve().then(n.bind(n,32736)).then(e=>{let{FooterComponent:t}=e;return{default:t}})),fireworkComponent:(0,a.lazy)(()=>Promise.resolve().then(n.bind(n,97155)).then(e=>{let{FireworkComponent:t}=e;return{default:t}})),infoBannerComponent:(0,a.lazy)(()=>Promise.resolve().then(n.bind(n,81403)).then(e=>{let{InfoBannerComponent:t}=e;return{default:t}})),spotlightScrollerComponent:(0,a.lazy)(()=>Promise.resolve().then(n.bind(n,78078)).then(e=>{let{SpotlightScrollerComponent:t}=e;return{default:t}}))}),[]);var g=n(98039),v=n(18667),f=n(25656),y=n(69768),x=n(88087),C=n(70621),S=n(2072),b=n(4599),w=n(3329),A=n(57689),E=n(60629),T=n(42219),k=n(95937),_=n(25292),P=n(24782),I=n(17568),M=n(78597),L=n(63041),j=n(39078),D=n(26137);let R=()=>({provinceListComponent:P.p,bannerCarouselComponent:g.Y,bentoCardContainerComponent:v.G,verticalFeatureCardContainerComponent:j.W,productCarouselComponent:_.H,menuTileCarouselComponent:T.l,fireworkComponent:C.v,mediaIABComponent:A.I,mediaShoppableDisplayComponent:E.E,brandSpotlightComponent:f.p,miniInfoCardContainerComponent:k.Q,footerContentComponent:x.n,galleryScrollerComponent:S.i,headerGroupComponent:b.S,infoBannerComponent:w.K,spotlightScrollerComponent:D.u,productGridComponent:M.$,filtersComponent:y.Z,quickFiltersComponent:I.Y,sortsComponent:L.K});n(51551);var F=n(78800);let O=()=>(0,a.useCallback)((e,t)=>{let n;let r=new URL(window.location.href),o=r.origin,a=new URLSearchParams(r.
1search);for(let[r]of Object.entries(e))if(e[r]instanceof Array){let o=e[r];t||a.delete(r);let i=a.getAll(r);o.forEach(e=>{!i.includes(e)&&t&&a.append(r,e)}),n=new URLSearchParams([...Array.from(a.entries())]).toString()}else{let o=decodeURIComponent(e[r]);if(t){let e=a.has(r);(r===F.ListingURLParamType.SORT||r===F.ListingURLParamType.PAGE)&&e?a.set(r,o):a.append(r,o),n=new URLSearchParams([...Array.from(a.entries())]).toString()}else{let e=a.getAll(r);a.delete(r),e.filter(e=>decodeURIComponent(e)!==o).forEach(e=>{a.append(r,e)}),n=new URLSearchParams([...Array.from(a.entries())]).toString()}}if(e[F.ListingURLParamType.PAGE]){let t=new URLSearchParams(n);t.set(F.ListingURLParamType.PAGE,e[F.ListingURLParamType.PAGE]),n=t.toString()}return n=n?"?".concat(n):"","".concat(o).concat(r.pathname).concat(n)},[]);var N=n(46006);let B=()=>(0,a.useCallback)(()=>{let e=new URL(window.location.href),t=e.origin,n=new URLSearchParams(e.search),r=[N.lK.SORT,N.lK.TEXT],o=[];n.forEach((e,t)=>{r.includes(t)||o.push(t)}),o.forEach(e=>{n.delete(e)});let a=n?"?".concat(n.toString()):"";return"".concat(t).concat(e.pathname).concat(a)},[]);var U=n(80484);let V=()=>{let e=(0,U.useSimpleTranslation)();return(0,a.useMemo)(()=>({a11yATCMessage:e("a11yAddToCart"),a11yDecreaseQtyMessage:e("a11yDecreaseQuantity"),a11yIncreaseQtyMessage:e("a11yIncreaseQuantity"),a11yItemInCartMessage:e("a11yEditQuantity"),a11yVariantItemInCartMessage:e("a11yViewProductDetails"),a11yLiveQuantityMessage:e("a11yQuantityInCart"),a11yAriaLabelInput:e("a11yQuantityInCartLabel"),a11yLiveMaxQuantityMessage:e("a11yQuantityLimitReached"),a11yAriaLabelRating:e("a11yStarRatingLabel")}),[e])},G=e=>(0,a.useMemo)(()=>({DEFAULT:{size:"default",isBorder:!1},SINGLE_ROW_WIDE_IMAGE:{size:"wide",isBorder:!1},SINGLE_ROW_STROKE_IMAGE:{size:"default",isBorder:!0},SINGLE_ROW_STROKE_WIDE_IMAGE:{size:"wide",isBorder:!0},TWO_ROW_LARGE_IMAGE:{size:"default",isBorder:!1},TWO_ROWS_WIDE_IMAGE:{size:"largeWide",isBorder:!1},TWO_ROWS_STROKE_IMAGE:{size:"large",isBorder:!0},TWO_ROWS_STROKE_WIDE_IMAGE:{size:"largeWide",isBorder:!0}})[e],[e]);var W=n(42391),z=n(30096),H=n(88526);let q=()=>{let{trackEvent:e}=(0,W.useAnalyticsContext)(),{getFeatureFlags:t}=(0,W.useFeatureFlags)(),{EnableHeliosSnowplow:n}=t(),r=e=>{let{componentId:t,contentId:n,id:r,breakpoint:o,...a}=e;return{componentId:t,contentId:n,id:r,breakpoint:o,data:void 0!==a.data?a.data:a}},o=(0,a.useCallback)((t,o)=>{(0,z.trackRootAdRenderEvent)(t,!!n,r(o),new Map,e)},[e,n]),i=(0,a.useCallback)(t=>{setTimeout(()=>{(0,z.trackRootAdRenderEvent)(z.SnowplowAdEvents.AD_VIEW,!!n,r(t),new Map,e)},1e3)},[e,n]),l=(0,a.useCallback)((t,o,a)=>{(0,z.trackProductTilesRenderAdEvent)(t,!!n,r(o),a,new Map,e)},[e,n]),s=(0,a.useCallback)((t,r,o)=>{let a=(null==r?void 0:r.data)?{...r,...r.data}:r;(0,H.trackBentoCardEvents)(t,!!n,a,o,e)},[e,n]),u=(0,a.useCallback)((t,o,a)=>{(0,H.trackProductCarouselEvents)(t,!!n,r(o),a,e)},[e,n]),c=(0,a.useCallback)((t,o,a)=>{(0,H.trackBrandSpotlightComponentEvents)(t,!!n,r(o),a,e)},[e,n]),d=(0,a.useCallback)((t,o)=>{(0,H.trackAnalyticsRenderEvents)(t,!!n,r(o),e)},[e]);return(0,a.useMemo)(()=>({brandSpotlightComponent:{onLoad:(e,t)=>{o(z.SnowplowAdEvents.AD_LOAD,t),c(H.SDMAnalyticEvents.LOAD,t,{productTiles:"productTiles"})},onView:(e,t)=>{o(z.SnowplowAdEvents.AD_VIEW,t),d(H.SDMAnalyticEvents.COMPONENT_VIEW,t),c(H.SDMAnalyticEvents.VIEW,t,{productTiles:"productTiles"})}},productListingComponent:{onLoad:(e,t)=>{l(z.SnowplowAdEvents.AD_LOAD,t,{productTiles:"productGrid.productTiles",pagination:"productGrid.pagination"})},onView:(e,t)=>{l(z.SnowplowAdEvents.AD_VIEW,t,{productTiles:"productGrid.productTiles",pagination:"productGrid.pagination"})}},productCarouselComponent:{onLoad:(e,t)=>{l(z.SnowplowAdEvents.AD_LOAD,t,{productTiles:"productTiles"}),u(H.SDMAnalyticEvents.LOAD,t,{productTiles:"productTiles"})},onView:(e,t)=>{l(z.SnowplowAdEvents.AD_VIEW,t,{productTiles:"productTiles"}),u(H.SDMAnalyticEvents.VIEW,t,{productTiles:"productTiles"})}},bentoCardContainerComponent:{onLoad:(e,t)=>{s(H.SDMAnalyticEvents.LOAD,t,{productTiles:"productTiles"})},onView:(e,t)=>{s(H.SDMAnalyticEvents.VIEW,t,{productTiles:"productTiles"})}},productGridContainer:{onLoad:(e,t)=>{l(z.SnowplowAdEvents.AD_LOAD,t,{productTiles:"productGrid.productTiles",pagination:"productGrid.pagination"})},onView:(e,t)=>{l(z.SnowplowAdEvents.AD_VIEW,t,{productTiles:"productGrid.productTiles",pagination:"productGrid.pagination"})}},productGridComponent:{onLoad:(e,t)=>{l(z.SnowplowAdEvents.AD_LOAD,t,{productTiles:"productTiles",pagination:"pagination"})},onView:(e,t)=>{l(z.SnowplowAdEvents.AD_VIEW,t,{productTiles:"productTiles",pagination:"pagination"})}},verticalFeatureCardContainerComponent:{onView:(e,t)=>{d(H.SDMAnalyticEvents.COMPONENT_VIEW,t)}},horizontalFeatureCardContainerComponent:{onView:(e,t)=>{d(H.SDMAnalyticEvents.COMPONENT_VIEW,t)}},menuTileCarouselComponent:{onView:(e,t)=>{d(H.SDMAnalyticEvents.COMPONENT_VIEW,t)}},bannerWithHeadlineComponent:{onView:(e,t)=>{d(H.SDMAnalyticEvents.COMPONENT_VIEW,t)}},galleryScrollerComponent:{onView:(e,t)=>{d(H.SDMAnalyticEvents.COMPONENT_VIEW,t)}},mediaIABComponent:{onLoad:(e,t)=>{o(z.SnowplowAdEvents.AD_LOAD,t)},onView:(e,t)=>{i(t)}},mediaShoppableDisplayComponent:{onLoad:(e,t)=>{o(z.SnowplowAdEvents.AD_LOAD,t)},onView:(e,t)=>{i(t)}},spotlightScrollerComponent:{onLoad:(e,t)=>{u(H.SDMAnalyticEvents.LOAD,t,{productTiles:"productTiles"})},onView:(e,t)=>{u(H.SDMAnalyticEvents.VIEW,t,{productTiles:"productTiles"})}}}),[e])},Q=e=>e.endsWith(".shoppersdrugmart.ca")?e.replace(/mypharmacy\./,"www."):e,K=()=>(0,a.useCallback)(e=>{let t=Q(new URL(window.location.href).origin),n=new URLSearchParams;for(let[t,r]of Object.entries(e)){let e=decodeURIComponent(r);n.set(t,e)}return"".concat(t,"/search?").concat(n.toString())},[]);n(86912)},58665:function(e,t,n){"use strict";n.d(t,{l:function(){return w}});var r=n(1995),o=n(13732),a=n(25685),i=n(26262),l=n(21264),s=n(65007),u=n(46965),c=n(95654),d=n(79946),p=n(81611),m=n(71922),h=n(51501),g=n(91375),v=n(19268),f=n(65677),y=n(6122),x=n(78717),C=n(85404),S=n(25121),b=n(64614);let w=()=>(0,o.useMemo)(()=>({heroComponent:()=>(0,r.jsx)(y.HeroBannerSkeleton,{}),stackedProductCarouselComponent:()=>(0,r.jsx)(l.MiniProductTileCarouselSkeleton,{}),productGridContainer:()=>(0,r.jsx)(h.ProductGridSkeleton,{}),productGridComponent:()=>(0,r.jsx)(h.ProductGridSkeleton,{}),productCarouselComponent:()=>(0,r.jsx)(s.ProductCarouselSkeleton,{}),brandSpotlightComponent:()=>(0,r.jsx)(u.SpotlightSkeleton,{}),bannerWithHeadlineComponent:()=>(0,r.jsx)(y.HeroBannerSkeleton,{}),menuTileCarouselComponent:()=>(0,r.jsx)(c.MenuTileCarouselSkeleton,{}),accordionComponent:()=>(0,r.jsx)(g.AccordionSkeleton,{}),breadcrumbsComponent:()=>(0,r.jsx)(p.BreadcrumbsSkeleton,{}),sortsComponent:()=>(0,r.jsx)(d.SelectboxSkeleton,{}),quickFiltersComponent:()=>(0,r.jsx)(m.QuickFiltersSkeleton,{}),filtersComponent:()=>(0,r.jsx)(m.QuickFiltersSkeleton,{}),sliderBannerComponent:()=>(0,r.jsx)(y.HeroBannerSkeleton,{}),infoBannerComponent:()=>(0,r.jsx)(y.HeroBannerSkeleton,{}),verticalFeatureCardCarouselComponent:()=>(0,r.jsx)(i.NavTilesSkeleton,{}),horizontalFeatureCardCarouselComponent:()=>(0,r.jsx)(i.NavTilesSkeleton,{}),provinceListComponent:()=>(0,r.jsx)(d.SelectboxSkeleton,{}),longTextComponent:()=>(0,r.jsx)(d.SelectboxSkeleton,{}),navigationItemComponent:()=>(0,r.jsx)(g.AccordionSkeleton,{}),infoCardContainerComponent:()=>(0,r.jsx)(i.NavTilesSkeleton,{}),footerContentComponent:()=>(0,r.jsx)(v.e,{}),acquisitionFormComponent:()=>(0,r.jsx)(x.FormSkeleton,{}),tableComponent:()=>(0,r.jsx)(f.TableSkeleton,{}),fireworkComponent:()=>(0,r.jsx)(i.NavTilesSkeleton,{}),bentoCardContainerComponent:()=>(0,r.jsx)(a.BentoCardsContainerSkeleton,{}),mediaIABComponent:()=>(0,r.jsx)(b.WrapperSection,{children:(0,r.jsx)(S.IabAdSkeleton,{})}),mediaShoppableDisplayComponent:()=>(0,r.jsx)(b.WrapperSection,{children:(0,r.jsx)(C.ShoppableDisplaySkeleton,{})}),spotlightScrollerComponent:()=>(0,r.jsx)(b.WrapperSection,{children:(0,r.jsx)(C.ShoppableDisplaySkeleton,{})})}),[]);t.A=w},86912:function(e,t,n){"use strict";n.d(t,{w:function(){return u}});var r=n(13732),o=n(21715),a=n(42391),i=n(51551),l=n(30096),s=n(48720);function u(e){var t;let{fetchOptions:n,envConfig:u,ciamAccessToken:c,endpoint:d="media/ads",cacheBuster:p=null,enabled:m=!0,reservedId:h="",setExceptionContext:g,traceId:v}=e,{captureException:f}=(0,o.useSentryProvider)(),y=(0,i.useViewResolverContext)(),x=(0,a.useSettingsContext)(),C=u||y,S=(null==x?void 0:x.mediaBaseUrl)||(null==x?void 0:x.mediaConfigBaseUrl)||(null==C?void 0:C.sduiBffUrl)||(null==C?void 0:null===(t=C.sduiBaseUrl)||void 0===t?void 0:t.replace("/sdui/views","")),b=null==C?void 0:C.apiKey,w=null==y?void 0:y.locale,[A,E]=(0,r.useState)(null),[T,k]=(0,r.useState)(null),[_,P]=(0,r.useState)(!1),I=(0,r.useRef)(!0),M=(0,r.useRef)("");return(0,r.useEffect)(()=>()=>{I.current=!1},[]),(0,r.useEffect)(()=>{let e=JSON.stringify([null==n?void 0:n.body,p]);if(!m||e===M.current){!m&&_&&P(!1);return}M.current=e,(async()=>{P(!0),k(null);let e=Object.entries((null==n?void 0:n.headers)||{}).reduce((e,t)=>
1{let[n,r]=t;return{...e,[n.toLowerCase()]:r}},{}),t={...n,method:"POST",headers:{...e,"x-apikey":b,"x-application-type":"Web","content-type":"application/json","X-Correlation-ID":v,...w&&{"accept-language":w},...c&&{authorization:"Bearer ".concat(c)}}};try{var r;if(!S)throw Error("BFF base URL is not configured");let e="".concat(S,"/").concat(d),n=await (0,s.Dg)(e,t),o=await n.json();if(!I.current)return;if(!n.ok){null==g||g({type:l.AD_EXCEPTIONS.AD_FAILED,code:n.status+"",message:n.statusText,process:h}),P(!1);return}(null===(r=o.components)||void 0===r?void 0:r.length)===0&&(null==g||g({type:l.AD_EXCEPTIONS.AD_NULL,code:"200",message:"No ad available",process:h})),E({data:o}),P(!1)}catch(t){if(!I.current)return;let e=Error(t instanceof Error?t.message:String(t));k(e),P(!1),null==g||g({type:l.AD_EXCEPTIONS.AD_FAILED,message:(e+"").substring(0,28),process:h}),f(e,{tags:{section:"MediaComponents"}})}})()},[null==n?void 0:n.body,p,m,S,d,b,w,c,v,h,g,f]),{error:(null==A?void 0:A.errors)||T,data:null==A?void 0:A.data,isFetching:_}}},79747:function(e,t,n){"use strict";n.d(t,{H$:function(){return i},hi:function(){return a},hz:function(){return o},mu:function(){return s}});var r=n(13732);let o=e=>"search-content-".concat(e),a=e=>{try{let t=sessionStorage.getItem(e);if(!t)return null;let n=JSON.parse(t);if(Date.now()-n.timestamp<6e5)return n.data;return sessionStorage.removeItem(e),null}catch(e){return null}},i=(e,t)=>{try{let n={data:t,timestamp:Date.now()};sessionStorage.setItem(e,JSON.stringify(n))}catch(e){}},l=e=>/^(https?:\/\/)/.test(e),s=e=>{var t;let n=null!==(t=null==e?void 0:e.router)&&void 0!==t?t:e;return(0,r.useCallback)(e=>{if("string"!=typeof e)return;let t=l(e||"");e&&(t?window.location.href=e:n?n.push(e):window.location.assign(e))},[n])}},46006:function(e,t,n){"use strict";n.d(t,{lK:function(){return s},ZU:function(){return _},NP:function(){return S},WQ:function(){return C},pi:function(){return i},Tl:function(){return r},pB:function(){return a},T0:function(){return b},Uv:function(){return d},mu:function(){return f.mu}}),(l=s||(s={})).SORT="sort",l.PAGE="page",l.TEXT="text";let r=(e,t,n,r,a)=>{let i=Object.keys(e)[0],l=e[i].code,s={[i]:encodeURIComponent(l),page:"1"},u=e[i].selected;o(i,l,u,t,r),a(n(s,u))},o=(e,t,n,r,o)=>{let a=null==r?void 0:r.map(r=>(r.code===e&&r.values.forEach(e=>{e.code===t&&(e.selected=n)}),r));a&&o({filterGroups:a})},a=(e,t)=>({sort:(t?t.filter(t=>t.name===e).map(e=>e.code):[""])[0],page:"1"}),i=(e,t)=>{var n;let r=[],o=(null==t?void 0:null===(n=t.find(e=>e.selected))||void 0===n?void 0:n.name)||"";return null==e||e.forEach(e=>{var t;null===(t=e.values)||void 0===t||t.forEach(t=>t.selected&&r.push({category:e.code,value:t.name}))}),{filters:r,sort:o}};var l,s,u=n(12997);let c=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(!r){var o;r=null===(o=window)||void 0===o?void 0:o.location.pathname}let a=u.GAM_SOURCES.OTHER;return a=t?e?"sptc":"sptd":"nspt",p(r)?a=u.GAM_SOURCES.OTHER:v(r)?a=u.GAM_SOURCES.BRAND_HUB:m(r)?a=u.GAM_SOURCES.UNSET:g(r)&&(a=u.GAM_SOURCES.BRAND_PLP),(null==n?void 0:n.includes("?"))?"".concat(n,"&source=").concat(a):"".concat(n,"?source=").concat(a)},d=(e,t)=>null==e?void 0:e.map(e=>{var n;let{isComplementarySponsored:r,isSponsored:o,link:a}=e,i=c(r,o,a);return{...e,quantity:(null===(n=t[e.productId])||void 0===n?void 0:n.quantity)||0,link:i}}),p=e=>["featuredcollections","collections","thoughtful-choices"].some(t=>e.toLowerCase().includes(t)),m=e=>e.includes("/editorials/"),h=e=>e.includes("/categories/"),g=e=>!h(e)&&/\/shop\/[^/]+\/c\/[^/\n]+/.test(e),v=e=>e.includes("/brand/");var f=n(79747),y=n(82590),x=n(48720);let C=async e=>{let{value:t,config:n,locale:r,cartId:o,snowplowSpecifications:a,ciamAccessToken:i,customerId:l,setQueryList:s,onComplete:u}=e,{hostname:c}=window.location,d=c.includes("pharmaprix")||c.includes("phx"),p={headers:{"X-Loblaw-Banner-ID":d?"pharmaprix":"shoppers","X-Loblaw-Client-Key":"SDM_WEB","Accept-Language":r,"X-Loblaw-Tenant-ID":"SHOPPERS_DRUG_MART","Content-Type":"application/json",...!!(i&&l)&&{authorization:"Bearer ".concat(i)}},body:JSON.stringify({search:{term:t,store_id:d?"4099p":"4099s",size:7,display_category_filters:!0,cart_id:o,snowplow_specifications:{domain_user_id:null==a?void 0:a.domainUserId}}}),method:"POST",redirect:"follow"};try{var m;let e=await (0,x.Dg)("".concat(null==n?void 0:n.heliosBaseUrl,"/search/type-ahead"),p),t=await e.json();if(null==t?void 0:null===(m=t.search)||void 0===m?void 0:m.type_ahead_data){let e=t.search.type_ahead_data.map(e=>{let{suggestion:t}=e;return{displayText:t,plainText:t}});s(e)}else s([])}catch(e){s([])}finally{null==u||u()}},S=async e=>{let{config:t,locale:n}=e,r=(0,f.hz)(n),o=(0,f.hi)(r);if(o)return o;let a=null,{hostname:i}=window.location,l=i.includes("pharmaprix")||i.includes("phx"),s={headers:{"X-Loblaw-Banner-ID":l?"pharmaprix":"shoppers","X-Loblaw-Client-Key":"SDM_WEB","Accept-Language":n,"X-Loblaw-Tenant-ID":"SHOPPERS_DRUG_MART","Content-Type":"application/json","x-apikey":null==t?void 0:t.apiKey,"x-application-type":"Web",authorization:""},body:JSON.stringify({banner:l?"pharmaprix":"shoppersdrugmart"}),method:"POST",redirect:"follow"};try{let e=await (0,x.Dg)("".concat(null==t?void 0:t.sduiBaseUrl,"/search-coldstart"),s);a=await e.json()||[],(0,f.H$)(r,a)}catch(e){a=[]}return a},b=e=>e.replace(/^(?:\w*::)/g,"").trim(),w=()=>[{suggestion:"loading",isLoading:!0,isEmptyMessage:!1}],A=e=>[{suggestion:y.CP[e].EMPTY_MESSAGE,isLoading:!1,isEmptyMessage:!0}],E=e=>e.map(e=>{let{displayText:t}=e;return{suggestion:t,isLoading:!1,isEmptyMessage:!1}}),T=(e,t,n,r,o)=>e.length>=o&&(t||!n&&0===r),k=(e,t,n,r,o)=>!t&&n&&0===r&&e.length>=o,_=(e,t,n,r,o,a)=>T(e,t,n,r.length,o)?w():k(e,t,n,r.length,o)?A(a):E(r)},11235:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return C}});var r=n(1995),o=n(13732),a=n(10865),i=n(56559),l=n(88694),s=n.n(l),u=n(57919),c=n(76152),d=n(53750),p=n(80859),m=n(71911),h=n(19972),g=n(82269),v=n(44308),f=n.n(v),y=n(6442),x=e=>{let{error:t={}}=e,{b3:l,status:v}=t,x=(0,a.useRouter)(),{formatMessage:C}=(0,y.A)(),{TENANT_ID_SDM:S,APP_TYPE_WEB:b,API_VERSION_V2:w,PAGE_ID_HEADER_FOOTER:A}=p.f2j,{commonContextProps:E,locale:T}=(0,h.ut)(),[k,_]=(0,o.useState)(null),{titleId:P,subtitleId:I}=(0,m.u1)(v),M=(0,i.useSDMCartContext)(),L=(0,i.useSDMCustomerContext)(),j=(0,i.useSDMViewportContext)(),D=(0,m.kj)(),R=(0,g.UX)()===p.eRI.CURRENT?"":(0,g.xm)();return((0,o.useEffect)(()=>{_((0,o.lazy)(()=>n.e(1999).then(n.t.bind(n,61999,23))))},[]),k)?(0,r.jsxs)(k,{pageId:A,fetchOptions:{method:"POST",body:JSON.stringify({banner:(0,g.V2)(),cartId:R,...D?{province:D}:{}}),headers:{"x-loblaw-tenant-id":S,"x-application-type":b,"Accept-Language":T,Authorization:(0,g.XL)(),"Content-Type":"application/json"}},hadExistingSentry:!0,isPreview:!1,previewDatetime:"2023-06-16T15:50-04:00",commonContexts:E,sdmContexts:{sdmCartProviderProps:M,sdmCustomerProviderProps:L,sdmRouterProps:{router:x},sdmViewportProviderProps:j},PageLoadingFallback:()=>(0,r.jsx)(d.y,{}),locale:T,env:"production",apiVersion:w,children:[(0,r.jsx)(c.A,{headerSection:{}}),(0,r.jsxs)("div",{id:"page-not-found",className:s().pageNotFoundContainer,children:[(0,r.jsx)(f(),{src:p.T3w,alt:"alert",width:35,height:35}),(0,r.jsx)("h1",{children:C({id:P})}),(0,r.jsx)("h2",{children:C({id:I})}),(0,r.jsx)("button",{onClick:()=>
1x.push("/"),children:C({id:"goToHomePage"})})]}),(0,r.jsxs)("p",{className:s().traceId,children:["traceID: ",l]}),(0,r.jsx)(u.A,{})]}):(0,r.jsx)(d.y,{})},C=e=>{let{error:t={}}=e;return(0,r.jsx)(x,{error:t})}},88694:function(e){e.exports={text_black_100:"#2f2f2f",text_grey_100:"#757575",text_white_100:"#fff",text_red_100:"#cb333b",ui_black_100:"#2f2f2f",ui_grey_100:"#757575",ui_grey_75:"#c1c1c1",ui_grey_50:"#ddd",ui_grey_10:"#f1f1f1",ui_blue_100:"#1b3b4a",ui_blue_75:"#007faa",ui_orange_100:"#ffae58",ui_orange_10:"#fff0e0",ui_green_100:"#00853d",ui_green_10:"#e7f3ed",ui_red_100:"#cb333b",ui_red_10:"#ffebea",ui_white_100:"#fff",ui_blue_focus:"#054eba",size_mobile_max:"650px",size_mobile_min:"651px",size_tablet_max:"950px",size_newTablet_max:"1023px",size_desktop_max:"1376px",skeletonText:"error-display_skeletonText__LMZ8v",skeletonBox:"error-display_skeletonBox__0dJqo",shimmer:"error-display_shimmer__W_hhA",ReactModal__Overlay:"error-display_ReactModal__Overlay__MXWGb","ReactModal__Body--open":"error-display_ReactModal__Body--open__qZHsn",story:"error-display_story__vNwym",story__title:"error-display_story__title__7dyjR",story__description:"error-display_story__description__inU_W","flex-microform":"error-display_flex-microform__466LG","flex-microform-invalid":"error-display_flex-microform-invalid__8a1d4","flex-microform-focused":"error-display_flex-microform-focused__loJDF",hide:"error-display_hide__TrK4R",show:"error-display_show__eJoFN","visually-hidden":"error-display_visually-hidden__nWbGo","sr-only":"error-display_sr-only____ZMx","sr-only-focusable":"error-display_sr-only-focusable__Bn3rC",traceId:"error-display_traceId__3OAaL",pageNotFoundContainer:"error-display_pageNotFoundContainer__q2QPy"}},93321:function(e){e.exports={overlay:"spinner-overlay_overlay__eTMXd",hidden:"spinner-overlay_hidden__ER6tn"}},92370:function(e){"use strict";e.exports=JSON.parse('{"$schema":"./schema.json","apiKey":"qOldp90fcC7sS7I8WaZDfeT4NLAn7GjE","sduiBaseUrl":"https://dev-sdm.api.loblaw.digital/beauty/v2/sdui/views","sduiBffUrl":"https://dev-sdm.api.loblaw.digital/beauty/v2","cdnBaseUrl":"https://assets-platform.loblaws.ca/ldp-core-web-dev/lower/ldp","heliosBaseUrl":"https://helios-gateway-sit.loblaw.ca/api/public"}')},65859:function(e){"use strict";e.exports=JSON.parse('{"$schema":"./schema.json","apiKey":"qOldp90fcC7sS7I8WaZDfeT4NLAn7GjE","sduiBaseUrl":"https://qa-sdm.api.loblaw.digital/beauty/v2/sdui/views","sduiBffUrl":"https://qa-sdm.api.loblaw.digital/beauty/v2","cdnBaseUrl":"https://assets-platform.loblaws.ca/ldp-core-web-dev/lower/ldp/","heliosBaseUrl":"https://helios-gateway-sit.loblaw.ca/api/public"}')},11765:function(e){"use strict";e.exports=JSON.parse('{"$schema":"./schema.json","apiKey":"qOldp90fcC7sS7I8WaZDfeT4NLAn7GjE","sduiBaseUrl":"https://uat-sdm-bff.api.loblaw.digital/beauty/v2/sdui/views","sduiBffUrl":"https://uat-sdm-bff.api.loblaw.digital/beauty/v2","cdnBaseUrl":"https://assets-platform.loblaws.ca/ldp-core-web-prod/production/ldp/","heliosBaseUrl":"https://helios-gateway-sit.loblaw.ca/api/public"}')}}]);
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.