"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[15],{96:function(e,t,r){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StoreLocatorBrands=void 0;const a=r(0),n=r(1),s=o(r(69));function i({brand:e}){const t=e.image?.url;if(!t)return null;const r=e.internal_name??e.ctatext??"",o=(0,a.jsx)("img",{className:`${s.default.brandLogo} storeLocatorBrandLogo`,src:t,alt:r,loading:"lazy",decoding:"async"});return e.ctaurl?(0,a.jsx)("a",{className:`${s.default.brandLink} storeLocatorBrandLink`,href:e.ctaurl,target:"_blank",rel:"noopener noreferrer","aria-label":r,title:r,children:o}):(0,a.jsx)("div",{className:`${s.default.brandLink} storeLocatorBrandLink`,children:o})}function l(e,t=""){return e.map((e=>e.image?.url?(0,a.jsx)(i,{brand:e},`${t}${e.handle}`):null))}t.StoreLocatorBrands=function({brands:e}){const t=(0,n.useRef)(null),r=(0,n.useRef)(null),[o,i]=(0,n.useState)(!1),[c,d]=(0,n.useState)(!1),u=e?.filter((e=>e.image?.url))??[];if((0,n.useEffect)((()=>{if("undefined"==typeof window)return;const e=window.matchMedia("(max-width: 1024px)"),t=()=>i(e.matches);return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)}),[]),(0,n.useLayoutEffect)((()=>{const e=t.current,a=r.current;if(!e||!a||!o)return void d(!1);let n=0;const s=()=>{cancelAnimationFrame(n),n=requestAnimationFrame((()=>{const t=a.scrollWidth>e.clientWidth;d((e=>e===t?e:t))}))};s();const i=new ResizeObserver(s);return i.observe(e),i.observe(a),()=>{cancelAnimationFrame(n),i.disconnect()}}),[o,u.length]),!u.length)return null;const h=Math.max(5*u.length,20);return(0,a.jsx)("section",{className:`${s.default.brandsBar} storeLocatorBrands`,children:(0,a.jsxs)("div",{ref:t,className:`${s.default.brandsViewport} storeLocatorBrandsViewport ${c?s.default.brandsViewportMarquee:""}`,children:[o?(0,a.jsx)("div",{ref:r,className:`${s.default.measureRow} storeLocatorBrandsMeasure`,"aria-hidden":"true",children:l(u,"measure-")}):null,(0,a.jsx)("div",{className:`${s.default.brandsInner} storeLocatorBrandsInner ${c?s.default.brandsInnerMarquee:""}`,style:c?{"--marquee-duration":`${h}s`}:void 0,children:c?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:s.default.marqueeGroup,"aria-hidden":"false",children:l(u,"a-")}),(0,a.jsx)("div",{className:s.default.marqueeGroup,"aria-hidden":"true",children:l(u,"b-")})]}):l(u)})]})})}},241:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StoreLocatorEmbed=void 0;const o=r(0),a=r(1),n="https://cdn.storelocators.com/locator/js/locator-stable.js";t.StoreLocatorEmbed=function({customerId:e,className:t="",retailerFilter:r=[]}){return(0,a.useEffect)((()=>{if(e&&"undefined"!=typeof document){if(!document.querySelector(`script[src="${n}"]`)){const e=document.createElement("script");e.src=n,e.defer=!0,document.body.appendChild(e)}window.storeLocatorsConfig={customerId:e,...r.length>0?{retailerFilter:r}:{},style:{stickyHeaderHeight:"80px"}}}}),[e,r.join(",")]),e?(0,o.jsx)("div",{id:"storelocators_root",className:t}):(0,o.jsx)("p",{className:t,children:"Store locator is not configured. Set the StoreLocators customer ID in Outsmartly assignments."})}},95:function(e,t,r){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StoreLocatorHero=void 0;const a=r(0),n=o(r(68)),s=r(242);t.StoreLocatorHero=function({hero_title:e,hero_title_color:t,hero_text:r,hero_text_color:o,hero_cta_text:i,hero_cta_text_color:l,hero_cta_background_color:c,hero_image_heading:d,hero_cta_image:u,hero_cta_height:h,hero_background_image:m,hero_background_image_tablet:_,hero_background_image_mobile:f,hero_side_background:g,hero_left_image:x,locatorAnchorId:L="storelocators_root",design:C="default"}){const{hero:p,heroInner:v,heroInnerContent:b,content:S,titleContainer:j,title:T,headingImage:w,subtitle:O,cta:$,ctaImage:E,media:R,image:y,heroSideBackground:B}=n.default,N=e??s.DEFAULT_STORE_LOCATOR_HERO.title,A=r??s.DEFAULT_STORE_LOCATOR_HERO.subtitle,k=(i??s.DEFAULT_STORE_LOCATOR_HERO.ctaText,x?.url??s.DEFAULT_STORE_LOCATOR_HERO_IMAGE),F=x?.altText??s.DEFAULT_STORE_LOCATOR_HERO.imageAlt,I=m?.url??null,H=f?.url??null,D=_?.url??H??I,M=g?.url??null,P="v2"===C&&Boolean(M),U=Boolean(x?.url)&&!P,G=Boolean(I||D||H),V={"--hero-title-color":t??s.DEFAULT_STORE_LOCATOR_HERO.titleColor,"--hero-text-color":o??s.DEFAULT_STORE_LOCATOR_HERO.textColor,"--hero-cta-text-color":l??s.DEFAULT_STORE_LOCATOR_HERO.ctaTextColor,"--hero-cta-background-color":c??s.DEFAULT_STORE_LOCATOR_HERO.ctaBackgroundColor,...u?.url&&h?{"--hero-cta-image-height":`${h}px`}:{}};return(0,a.jsxs)("section",{className:`${p} storeLocatorHero ${G?`${n.default.heroBackgroundImage} heroBackgroundImage`:""} ${"v2"===C?`${n.default.heroV2} storeLocatorHeroV2`:""}`,style:V,children:[P?(0,a.jsx)("img",{src:M??"",className:`${B} heroSideBackground`,alt:g?.altText??"",loading:"eager",decoding:"async",width:2e3,height:3030}):null,(0,a.jsx)("img",{src:H??"",className:`${n.default.heroBackgroundImageMobile} heroBackgroundImageMobile`,alt:f?.altText??"",width:1440,height:1075}),(0,a.jsx)("img",{src:D??"",className:`${n.default.heroBackgroundImageTablet} heroBackgroundImageTablet`,alt:_?.altText??f?.altText??"",width:2048,height:1075}),(0,a.jsx)("img",{src:I??"",className:`${n.default.heroBackgroundImageDesktop} heroBackgroundImageDesktop`,alt:m?.altText??"",width:3600,height:1075}),(0,a.jsx)("div",{className:`${v} storeLocatorHeroInner`,children:(0,a.jsxs)("div",{className:`${b} storeLocatorHeroInnerContent`,children:[(0,a.jsxs)("div",{className:`${S} storeLocatorHeroContent`,children:[(0,a.jsxs)("div",{className:`${j} storeLocatorHeroTitleContainer`,children:[N?(0,a.jsx)("div",{className:`${T} storeLocatorHeroTitle`,dangerouslySetInnerHTML:{__html:N}}):null,d?.url?(0,a.jsx)("img",{className:`${w} storeLocatorHeroHeadingImage`,src:d.url,alt:d.altText??"",loading:"eager",decoding:"async",width:305,height:46}):null]}),(0,a.jsx)("div",{className:`${O} storeLocatorHeroSubtitle`,dangerouslySetInnerHTML:{__html:A}})]}),U&&(0,a.jsx)("div",{className:`${R} storeLocatorHeroMedia`,children:(0,a.jsx)("img",{className:`${y} storeLocatorHeroImage`,src:k,alt:F,loading:"eager",decoding:"async"})})]})})]})}},46:function(e,t,r){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StoreLocatorMainBody=void 0;const a=r(0),n=r(2),s=o(r(67)),i=r(241),l=r(95),c=r(96),d=r(97),u=r(7);t.StoreLocatorMainBody=function({storeLocatorDesign:e,storeLocatorPage:t,storeLocatorsCustomerId:r,retailerFilter:o,footer:h,pageClassName:m}){const _="v2"===e,f=function(e,t){return{design:t,hero_title:e.hero_title,hero_title_color:e.hero_title_color,hero_text:e.hero_text,hero_text_color:e.hero_text_color,hero_cta_text:e.hero_cta_text,hero_cta_text_color:e.hero_cta_text_color,hero_cta_background_color:e.hero_cta_background_color,hero_image_heading:e.hero_image_heading,hero_cta_image:e.hero_cta_image,hero_cta_height:e.hero_cta_height,hero_background_image:e.hero_background_image,hero_background_image_tablet:e.hero_background_image_tablet,hero_background_image_mobile:e.hero_background_image_mobile,hero_side_background:e.hero_side_background,hero_left_image:e.hero_left_image}}(t,e);return(0,a.jsx)("div",{className:`${m} ${s.default.main} ${_?`${s.default.mainV2} storeLocatorMainV2`:""}`,children:_?(0,a.jsxs)(n.Fragment,{children:[(0,a.jsxs)("div",{className:`${s.default.desktopSplit} storeLocatorDesktopSplit`,children:[(0,a.jsx)("div",{className:`${s.default.bannerColumn} storeLocatorBannerColumn`,children:(0,a.jsx)(l.StoreLocatorHero,{...f})}),(0,a.jsx)("div",{className:`${s.default.brandsBetween} storeLocatorBrandsBetween`,children:(0,a.jsx)(c.StoreLocatorBrands,{brands:t.brands})}),(0,a.jsx)("div",{className:`${s.default.scrollColumn} storeLocatorScrollColumn`,children:(0,a.jsx)("main",{className:`${s.default.mainContainer} ${s.default.mapColumn} mainContainer storeLocatorMapColumn`,children:(0,a.jsx)(i.StoreLocatorEmbed,{customerId:r,retailerFilter:o,className:`${s.default.locatorRoot} locatorRoot`})})})]}),(0,a.jsx)("div",{className:`${s.default.brandsAfterSplit} storeLocatorBrandsAfterSplit`,children:(0,a.jsx)(c.StoreLocatorBrands,{brands:t.brands})}),(0,a.jsx)(d.StoreLocatorReviews,{reviews:t.reviews}),(0,a.jsx)(u.Footer,{footer:h})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.StoreLocatorHero,{...f}),(0,a.jsx)(c.StoreLocatorBrands,{brands:t.brands}),(0,a.jsx)("main",{className:`${s.default.mainContainer} mainContainer`,children:(0,a.jsx)(i.StoreLocatorEmbed,{customerId:r,retailerFilter:o,className:`${s.default.locatorRoot} locatorRoot`})}),(0,a.jsx)(d.StoreLocatorReviews,{reviews:t.reviews}),(0,a.jsx)(u.Footer,{footer:h})]})})}},66:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StoreLocatorPageChrome=void 0;const o=r(0),a=r(14),n=r(15),s=r(16),i=r(240),l=r(25);t.StoreLocatorPageChrome=function({storeLocatorDesign:e,shared:t,useSharedState:r,children:c,featureGoogleBadge:d,featureAutomaticDiscount:u,automaticSiteWideDiscount:h,featureCompareAtText:m,productsExpandYourPalate:_,featureFullPriceCompare:f,featureCartImageGreater:g}){const x=(0,i.useStoreLocatorSharedState)(r),L=Boolean(t.topBanner?.desktop_html&&t.topBanner.show),{width:C}=(0,l.useWindowDimensions)(),p=C>=1200;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.TopBanner,{topBanner:t.topBanner}),(0,o.jsx)(a.TopBar,{menu:t.menu,useSharedState:x,hasTopBanner:L,bgTransparency:!0,textColor:p&&"v2"===e?"#000":"#fff",logoColor:"#fff",enableBlured:!1}),c,(0,o.jsx)(s.CartMenu,{useSharedState:x,featureGoogleBadge:d,featureAutomaticDiscount:u,automaticSiteWideDiscount:h,featureCompareAtText:m,products:_,featureFullPriceCompare:f,featureCartImageGreater:g})]})}},97:function(e,t,r){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StoreLocatorReviews=void 0;const a=r(0),n=o(r(26)),s=r(58),i=o(r(71)),{carouselContainer:l,slideContainer:c,slideTitle:d,slideDescription:u,bottomSlideContainer:h,slideProduct:m,slideAuthor:_}=n.default,f={infinite:!0,dots:!0,speed:500,slidesToShow:1,slidesPerRow:1,slidesToScroll:1,centerMode:!1,centerPadding:"0",variableWidth:!0};t.StoreLocatorReviews=function({reviews:e,title:t="Reviews Are in"}){return e?.length?(0,a.jsx)("section",{className:`${i.default.section} storeLocatorReviews`,children:(0,a.jsxs)("div",{className:`${i.default.content} storeLocatorReviewsContent`,children:[(0,a.jsx)("h2",{className:`${i.default.title} ${n.default.title} title`,children:t}),(0,a.jsx)("div",{className:`${i.default.carouselContainer} ${l} carouselContainer`,children:(0,a.jsx)(s.SlidesCarousel,{carouselSettings:f,arrowStyles:n.default.arrowStyles,children:e.map((e=>{const t=Math.round(Number(e.rate)||0),r=e.suggested_pull_quote??e.full_review??"",o=(n=e.product,n?.title?n.title:n?.handle?n.handle.split("-").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" "):"");var n;return(0,a.jsx)("div",{className:`${c} slideContainer`,children:(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("a",{className:`${i.default.starsContainer} storeLocatorReviewsStarsContainer`,href:"/pages/reviews",children:Array.from({length:t}).map(((e,t)=>(0,a.jsx)("span",{children:"★"},t)))}),(0,a.jsx)("label",{className:`${i.default.slideTitle} slideTitle ${d}`,children:e.title}),(0,a.jsx)("p",{className:`${i.default.slideDescription} slideDescription ${u}`,children:r})]}),(0,a.jsxs)("div",{className:`bottomSlideContainer ${h}`,children:[o?(0,a.jsx)("p",{className:`${i.default.slideProduct} ${m}`,children:o}):null,(0,a.jsx)("p",{className:`${i.default.slideAuthor} slideAuthor ${_}`,children:e.reviewer})]})]})},e.review_id??e.handle)}))})})]})}):null}},242:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_STORE_LOCATOR_HERO=t.DEFAULT_STORE_LOCATOR_HERO_IMAGE=void 0,t.DEFAULT_STORE_LOCATOR_HERO_IMAGE="/fast-image/fl_progressive:steep/stars-honey/files/find-your-store-hero.webp",t.DEFAULT_STORE_LOCATOR_HERO={title:"",subtitle:"Upgrade your weekly shopping trip. Your favorite Collagen Bars are now at your daily store",ctaText:"FIND STORE",imageAlt:"Stars + Honey collagen protein bars",titleColor:"#111c19",textColor:"#111c19",ctaTextColor:"#ffffff",ctaBackgroundColor:"#111c19"}},240:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useStoreLocatorSharedState=void 0,t.useStoreLocatorSharedState=function(e){return e()((({cart:e,addToCart:t,setShowCart:r,showCart:o,changeToCart:a,removeFromCart:n,updateCart:s,loadingAddToCart:i,addFakeBundle:l,fakeBundle:c,isForeign:d,featureInternationalization:u,countryCode:h,currencyCode:m,country:_,contextCountry:f,changeCountryCode:g,syncCart:x,priceFromVariant:L,localizations:C,findSymbol:p})=>({cart:e,addToCart:t,setShowCart:r,showCart:o,changeToCart:a,removeFromCart:n,updateCart:s,loadingAddToCart:i,addFakeBundle:l,fakeBundle:c,isForeign:d,featureInternationalization:u,countryCode:h,currencyCode:m,country:_,contextCountry:f,changeCountryCode:g,syncCart:x,priceFromVariant:L,localizations:C,findSymbol:p})))}},25:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useWindowDimensions=void 0;const o=r(1);t.useWindowDimensions=()=>{const[e,t]=(0,o.useState)({width:0,height:0});return(0,o.useEffect)((()=>{if("undefined"!=typeof window){const e=()=>{t({width:window.innerWidth,height:window.innerHeight})};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}}),[]),e}}}]);