(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6803],{93133:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/brands",function(){return r(3128)}])},68032:function(e,t,r){"use strict";r.d(t,{Z:function(){return x}});var n=r(85893),a=r(1822),i=r.n(a),l=r(67294),o=r(45697),d=r.n(o),s=r(35941),p={registrationForm:{wrapper:"w-full mb-6 md:mb-0 text-center",wrapperInner:"relative",textSmall:"text-xs xl:text-16 textSmall text-input-br font-light relative -top-5",textLarge:"registrationselectText text-base lg:text-md relative -top-5",wrapperField:"font-montserratSemiBold text-primary font-semibold z-30 gender appearance-none text-sign-head  py-2 py-4 px-0  mb-0 leading-tight text-left h-52 xl:h-60 text-lg  border-b-threefourth border-b font-montserratlight font-light border-input-br  w-full py-4  ",upArrow:"sigupArrow pointer-events-none uparrow absolute inset-y-0  right-0 flex items-center font-montserratSemiBold font-semibold font-hairline px-2 top:45 text-sign-head pr-5",downArrow:"sigupArrow pointer-events-none  absolute inset-y-0 right-0 flex items-center font-montserratSemiBold font-semibold font-hairline px-2 text-sign-head pr-10 md:pr-0 ",dateSelect:"z-10 border-t-white selectBox border-half genderDate border-t-0 active:border-b-white dateSelect font-montserratlight font-light text-base lg:text-lg text-sign-head block leading-wider md:leading-widest lg:leading-registergender appearance-none absolute w-full bg-white border border-input-br text-sign-head pb-2 text-center px-4 pr-4 h-108 overflow-y-auto cursor-pointer"},profileForm:{wrapper:"profileForm-wrapper",wrapperInner:"profileForm-wrapper-inner  relative",textSmall:"text-xs",textLarge:"text-base lg:text-lg",wrapperField:"font-montserratSemiBold profileForm-field font-semibold h-fiftyhalf lg:h-fiftytwohalf text-primaryCta appearance-none text-sign-head  pb-20 pt-10 mb-1px leading-tight focus:outline-none  text-left  text-lg border-b-half font-montserratlight font-light w-full py-4 border-input-br ",upArrow:"sigupArrow pointer-events-non uparrow absolute inset-y-0  right-0 flex items-center z-20 font-montserratSemiBold font-semibold font-hairline px-2 top:45 text-sign-head",downArrow:"sigupArrow pointer-events-none  absolute inset-y-0 right-0 flex items-center font-montserratSemiBold font-semibold font-hairline px-2 text-sign-head ",dateSelect:"z-10 border-t-white border-half genderDate border-t-0 active:border-b-white dateSelect font-montserratlight font-light text-base lg:text-lg text-sign-head block appearance-none absolute w-full bg-white border border-input-br text-sign-head py-2 text-center px-4 pr-4 h-108 overflow-y-auto cursor-pointer"},rewardsDetailsForm:{wrapper:"rewards w-full mb-6 md:mb-0 text-center flex flex-wrap",wrapperInner:"relative w-full",textSmall:"",textLarge:"pl-05",wrapperField:"font-montserratlight font-light flex flex-wrap z-30 gender appearance-none text-sign-head  py-2 px-4  mb-0 leading-tight text-left  lg:text-16  border-threefourth border font-montserratlight font-light border-input-br  w-full py-14 px-3  ",upArrow:"sigupArrow pointer-events-none uparrow absolute inset-y-0  right-0 flex items-center font-montserratSemiBold font-semibold font-hairline px-2 top:45 text-sign-head pr-4",downArrow:"sigupArrow pointer-events-none  absolute inset-y-0 right-0 flex items-center font-montserratSemiBold font-semibold font-hairline px-2 text-sign-head pr-10 md:pr-20 ",dateSelect:"reward-select z-10 border-t-white border text-left genderDate border-t-0 active:border-b-white dateSelect font-montserratlight font-light text-base lg:text-lg text-sign-head block leading-wider md:leading-widest lg:leading-registergender appearance-none absolute w-full bg-white border border-input-br text-sign-head pb-2 h-108 overflow-y-auto cursor-pointer"},rebatesSelectForm:{wrapper:"rewards w-full mb-6 md:mb-0 text-center bg-white flex flex-wrap",wrapperInner:"relative w-full",textSmall:"",textLarge:"pl-05",wrapperField:"font-montserratSemiBold font-semibold text-14 xl:text-16 leading-leading20 xl:leading-lightmedium focus:outline-none flex flex-wrap z-30 gender appearance-none text-sign-head  py-2 px-4  mb-0 leading-tight text-left  border-threefourth border border-input-br  w-full py-14 px-3  ",upArrow:"sigupArrow pointer-events-none uparrow absolute inset-y-0  right-0 flex items-center font-montserratSemiBold font-semibold font-hairline px-2 top:45 text-sign-head pr-4",downArrow:"sigupArrow pointer-events-none  absolute inset-y-0 right-0 flex items-center font-montserratSemiBold font-semibold font-hairline px-2 text-sign-head pr-10 md:pr-20 ",dateSelect:" z-10  border-half text-left border-b-0 genderDate active:border-b-white font-montserratlight font-light block max-h-294 xl:max-h-400 -top-1 text-14 xl:text-16 leading-leading20 lg:leading-lightmedium appearance-none absolute w-full bg-white shadow-dropdown border-input-br h-108 overflow-y-auto cursor-pointer",listItems:"pl-18 md:pl-24 xl:pl-28 py-08 xl:py-15 hover:bg-bgcolor border-b-half border-input-br text-14 lg:text-16 leading-leading20 lg:leading-lightmedium",listItemsboldText:"font-montserratSemiBold font-semibold",listItemsText:"font-montserratlight font-light"},searchSelectDropdown:{wrapper:"w-full mb-6 md:mb-0 text-center",wrapperInner:"relative",textSmall:"text-xs xl:text-16 text-input-br font-light relative",textLarge:"text-14 xl:text-16 relative pl-25 xl:pl-30",wrapperField:"font-montserratSemiBold text-primary font-semibold z-30 gender appearance-none text-sign-head  py-2 py-4 px-0  mb-0 leading-tight text-left h-52 xl:h-60 text-lg  border-b-threefourth border-1 font-montserratlight font-light border-input-br  w-full py-4  ",upArrow:"sigupArrow pointer-events-none uparrow absolute inset-y-0  right-0 flex items-center font-montserratSemiBold font-semibold font-hairline px-2 top:45 text-sign-head pr-5",downArrow:"sigupArrow pointer-events-none  absolute inset-y-0 right-0 flex items-center font-montserratSemiBold font-semibold font-hairline px-2 text-sign-head pr-10 md:pr-20 ",dateSelect:"z-10 border-t-white selectBox border-half genderDate border-t-0 active:border-b-white dateSelect font-montserratlight font-light text-base lg:text-lg text-sign-head block leading-wider md:leading-widest lg:leading-registergender appearance-none absolute w-full bg-white border border-input-br text-sign-head pb-2 text-center px-4 pr-4 h-108 overflow-y-auto cursor-pointer"},pgBrandSelect:{wrapper:"profileForm-wrapper",wrapperInner:"profileForm-wrapper-inner  relative",textSmall:"text-xs",textLarge:"text-base lg:text-16 textLarge leading-leading20",wrapperField:"profileForm-field font-light h-fiftyhalf lg:h-fiftytwohalf appearance-none text-sign-head pb-0 pt-10 mb-1px leading-tight text-left text-lg border-b-half w-full py-1 border-input-br ",upArrow:"brandupArrow branddownArrow pt-06 pointer-events-non uparrow absolute inset-y-0  right-0 flex items-center z-10 font-montserratSemiBold font-semibold font-hairline px-2 top:45 text-sign-head",downArrow:"brandupArrow pt-06 pointer-events-none absolute inset-y-0 right-0 flex items-center font-montserratSemiBold font-semibold font-hairline px-2 text-sign-head ",dateSelect:"z-10  absolute -top-3 font-montserratlight font-light text-14 leading-lightmedium text-sign-head block appearance-none absolute w-full bg-white text-sign-head py-2 text-left shadow-pgBrandSelect px-4 pr-4 h-108 xl:py-25 overflow-y-auto cursorpointer",listItems:"pb-18 flex checkboxLabel",checkbox:"checkbox-custom w-20 cursor-pointer top-12 rounded-4",listItemsboldText:"pl-12 checkbox-custom-label"}};let c=new String('.icon{height:20px;width:20px}.genderWrapper .gender{text-align:center;font-size:1rem}.genderWrapper li{width:85%;margin:auto}.editgenderWrapper li{width:85%;margin:auto}input[type="button"]:disabled,button[type="button"]:disabled{pointer-events:none}.genderWrapper .genderDate{margin-top:-45px}.MonthGrd .dateSelect{height:180px;margin-top:-2px;border-left:.75px solid#979797;border-right:.75px solid#979797;border-bottom:.75px solid#979797}.MonthGrd1 .dateSelect{height:110px;margin-top:0px;border-top:0px;border-left:.75px solid#979797;border-bottom:.75px solid#979797}.YearGrd1 .dateSelect{height:110px;margin-top:0px;border-top:0px;border-left:.75px solid#979797;border-bottom:.75px solid#979797}.YearGrd .dateSelect{height:180px;margin-top:-2px;border-left:.75px solid#979797;border-right:.75px solid#979797;border-bottom:.75px solid#979797}.genderWrapper .uparrow{z-index:20}.editgenderWrapper .uparrow{z-index:20}.editgenderWrapper .dateSelect{margin-top:-2px;border:.5px solid#979797}.editgenderWrapper .genderDate{margin-top:-45px}.sigupArrow svg,.brandupArrow svg{width:15px}.branddownArrow svg{-webkit-transform:rotate(180deg)!important;-moz-transform:rotate(180deg)!important;-ms-transform:rotate(180deg)!important;-o-transform:rotate(180deg)!important;transform:rotate(180deg)!important}@media screen and (min-width:768px){.MonthGrd .dateSelect{height:234px}.YearGrd .dateSelect{height:234px;border-left-width:.75px}}@media screen and (min-width:1024px){.sigupArrow span svg{width:17px}.genderWrapper .gender{font-size:1.125rem;height:60px;line-height:36px}}');c.__hash="fa0b88a9a3f09003";let m=e=>{let{list:t,type:r,name:a,pageSource:o,title:d,onSelectChange:m,disabled:x,isCheckBox:u}=e,g=(0,l.useRef)(),[h,f]=(0,l.useState)(!1),b=()=>{f(!h)},w=e=>{f(!1),m(e,t,a)},v=(e,r)=>{f(!0),m(e,t,a,r.target.checked)},y=e=>{g.current&&!g.current.contains(e.target)&&f(!1)};(0,l.useEffect)(()=>(document.addEventListener("mousedown",e=>y(e)),document.addEventListener("keyup",e=>y(e)),()=>{document.removeEventListener("mousedown",e=>y(e)),document.removeEventListener("keyup",e=>y(e))}));let j=p[o]||p.registrationForm;return(0,n.jsxs)("div",{ref:g,className:j.wrapper||"",children:[(0,n.jsx)("div",{className:j.wrapperInner||"",children:(0,n.jsxs)("button",{onClick:()=>b(),type:"button","aria-label":a,disabled:x,name:a,className:j.wrapperField||"",children:[(0,n.jsx)("div",{className:j.textSmall||"",children:r}),(0,n.jsx)("div",{id:"addressStateData",className:j.textLarge||"",children:u&&d.length>1?d.map(e=>e).join(", "):d}),h?(0,n.jsx)("div",{className:j.upArrow||"",children:(0,n.jsx)(s.default,{name:"pgBrandSelect"===o?"arrowUpTeal":"arrowUpGray"})}):(0,n.jsx)("div",{className:j.downArrow||"",children:(0,n.jsx)(s.default,{name:"pgBrandSelect"===o?"arrowDownTeal":"arrowDownGray",className:"icon text-blue"})})]})}),h&&(0,n.jsx)("div",{className:j.wrapperInner||"",children:(0,n.jsx)("ul",{className:j.dateSelect||"",children:t&&t.map(e=>(0,n.jsxs)("li",{tabIndex:"-1",onClick:()=>u?null:w(e.id),value:e.value,id:e.value,role:"presentation",className:j.listItems||"",children:[u?(0,n.jsx)("input",{type:"checkbox",checked:!!d.includes(e.name),onClick:t=>v(e.id,t),value:e.id,className:j.checkbox||""}):null,(0,n.jsx)("div",{className:j.listItemsboldText||"",children:e.innerText}),(0,n.jsx)("div",{className:j.listItemsText||"",children:e.rebatesDescription})]},e.id))})}),(0,n.jsx)(i(),{id:c.__hash,children:c})]})};m.propTypes={list:d().oneOfType([d().array]),pageSource:d().string,type:d().string,name:d().string,title:d().oneOfType([d().string,d().number,d().array]),onSelectChange:d().func.isRequired,disabled:d().bool,isCheckBox:d().bool},m.defaultProps={pageSource:null,type:null,name:null,title:"",list:null,disabled:!1,isCheckBox:!1};var x=m},3128:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSG:function(){return G},default:function(){return z}});var n=r(85893),a=r(67294),i=r(45697),l=r.n(i),o=r(87364),d=r(13466),s=r(1822),p=r.n(s),c=r(41664),m=r.n(c),x=r(11163),u=r(9008),g=r.n(u),h=r(29323),f=r(89459),b=r(35941),w=r(28275),v=r(71191),y=r(33555),j=r(13633),S={backgroundWrapper:"background-wrapper absolute top-95px lg:top-95 w-full",content:{pageTitle:"page-title relative text-center text-white pb-13 pt-18 lg:pt-30 lg:pb-20 xl:min-h-104 font-montserratSemiBold font-semibold text-30 lg:text-50 leading-wider lg:leading-leading60 ",bannerSection:"banner-section w-12/12 px-20 lg:px-20 mx-auto relative top-0 md:rounded-rewards",mainWrapper:"mt-10px md:mt-20px xl:mt-17px md:px-20",wrapper:"container mx-auto bg-rewardsBg md:bg-white",contentWrapper:"w-11/12 md:w-full mx-auto pt-15 xl:pt-20 pb-10 lg:pt-15 lg:px-35 text-center ",title:"font-bold text-18 xl:text-28 leading-wider",subTitle:"brand-subtitle font-light pt-10 xl:pt-10 mx-auto md:w-9/12 leading-lightmedium xl:text-18 xl:leading-widest"},bannerPGBrands:{pageTitle:"",bannerSection:"earnBannerWrapper banner-section container w-12/12 px-0 md:px-0 mx-auto relative top-0 md:rounded-rewards"},brandLogos:{brandWrapper:"mx-auto w-11/12 lg:w-9/12 justify-center pb-45 xl:pb-65 flex flex-wrap xl:w-800",logoMainWrapper:"cursor-pointer logo-main-wrapper overflow-hidden rounded-full",logoWrapper:"w-156 h-156 xl:w-200 xl:h-200 logoWrapper overflow-hidden",brandLogoWrapper:"relative flex flex-wrap",heartIconSVG:"absolute left-0 z-1 cursor-pointer xl:left-0 top-0 w-35 h-30 xl:w-38 xl:h-32",flipIconSVG:"absolute z-1 cursor-pointer bottom-0 w-25 h-20 xl:w-20 xl:h-15",logo:"p-15",ctaWrapper:"pt-35 xl:pt-50 w-full flex flex-wrap justify-center",ctaWrapperText:"pt-20 xl:pt-20 w-full flex flex-wrap justify-center",cta:"w-300 flex justify-center items-center min-h-41 lg:min-h-43 btn-brands btn-info-transparent",linkText:"underline font-semibold text-14 leading-lightmedium"},pgBrandsdasboard:{catalogSection:"w-full bg-rewardsBg mx-auto relative container",catalogTitleText:"w-full text-center px-0 md:w-11/12 font-montserratSemiBold font-bold text-18 leading-wider xl:text-28 xl:leading-wider pt-40 pb-10 xl:pt-58 xl:pb-20 mx-auto  text-center ",catalogText:"font-montserratlight text-center font-light w-11/12 md:w-9/12 xl:w-7/12 mx-auto px-15 pb-40 xl:pb-55 xl:text-18 xl:leading-widest leading-lightmedium"},homeContainer:{sectionWrapper:"bg-bgcolor w-full md:px-0 container mx-auto pt-10 lg:pt-17 relative z-10",mainJoinWrapper:"flex flex-wrap w-full md:pt-20 lg:py-20 bg-white",joinusWrapper:"joinusWrapper lg:w-5/12 md:w-8/12 w-full px-30 md:px-0 mx-auto pt-30 pb-40 flex flex-wrap justify-center",joinusIconSVG:"w-79 h-79 xl:w-100 xl:h-100",cta:"w-300 min-h-43 flex justify-center items-center btn-brands btn-primary text-center"}};let L=new String('.PG-fullWrapper p{font-weight:300;padding-top:10px;font-size:16px;line-height:24px}.brand-subtitle a{text-decoration:underline;color:#267EA6}.btn-brands{font-weight:700;padding:5px 25px;font-size:1.25rem;line-height:27px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-appearance:none}.PGBrands-image img,.logoWrapper img,.brandPartnerImage img{position:unset!important;width:100%!important;height:inherit!important}.PGBrands-image span,.logoWrapper span,.brandPartnerImage span{padding:0!important;overflow:hidden}.logoWrapper img{padding:16px!important}.pgbrands-join-us h2{font-weight:700;font-size:1.125rem;line-height:36px;padding-bottom:15px}.textLarge{-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow:hidden;width:290px;white-space:nowrap}.brand-subtitle p{padding-bottom:5px}[type="checkbox"]{opacity:0}[type="checkbox"]+.checkbox-custom-label{position:relative;left:-20px;padding-left:30px;cursor:pointer;display:inline-block;line-height:24px;z-index:-1}[type="checkbox"]+.checkbox-custom-label::before{content:"";position:absolute;left:0;top:0;width:20px;height:20px;border:1px solid#5e5e5e;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}[type="checkbox"]:checked+.checkbox-custom-label::before{content:"";position:absolute;left:0;top:0;width:20px;height:20px;border:1px solid#207f6f;background:#207f6f}[type="checkbox"]:checked+.checkbox-custom-label::after{content:"";position:absolute;left:6px;top:2px;width:8px;height:13px;border:2px solid#fff;border-width:0 2px 2px 0;-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg);-webkit-transform:rotate(45deg);background:#207f6f;opacity:1;-webkit-transition:all.3s ease;-moz-transition:all.3s ease;-o-transition:all.3s ease;transition:all.3s ease}[type="checkbox"]:not(:checked)+.checkbox-custom-label::after{content:"";position:absolute;left:6px;top:2px;width:8px;height:13px;border:2px solid#fff;border-width:0 2px 2px 0;-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg);-webkit-transform:rotate(45deg);background:#207f6f;opacity:0;-moz-transform:scale(0);-ms-transform:scale(0);-o-transform:scale(0);transform:scale(0)}@media screen and (min-width:1280px){.PGBrands-image img{height:388px!important}.PG-fullWrapper p{padding-top:35px;font-size:1.125rem;line-height:30px}.pgbrands-join-us h2{font-size:1.75rem;line-height:36px;padding-bottom:20px}.brand-videoWrapper{min-width:100%;height:inherit;-o-object-fit:fill;object-fit:fill}}');L.__hash="554e45165069f4a6";var A=r(63404),k=r(25411),N=r(19567),E=r(78381),B=r(45029),T=r(94382),_=r(68032),I=r(45275),O=r(75883),C=r(26934),R=r(86661),P=r(8848);let W=e=>{var t,r,i,l,o,d,s,c,x,u,h,W,D,F,G,z,M,Z,V,q;let{pageTitle:H,pageBackground:Y,bannerContent:K,ourFamilyTitle:U,ourFamilyDescription:J,brandCategoryListCollection:X,pgBrandList:Q,showAll:$,showMore:ee,brandPartnershipsTitle:et,brandPartnershipsDescription:er,brandPartnershipListingCollection:en,pgBrandReceiptScanCollection:ea}=e,[ei,el]=(0,a.useState)([]),[eo,ed]=(0,a.useState)(!1),[es,ep]=(0,a.useState)(!1),{isDesktop:ec}=(0,O.Z)(),em=ec?k.DESKTOP_PER_PAGE:k.MOBILE_PER_PAGE,[ex,eu]=(0,a.useState)(),[eg,eh]=(0,a.useState)([]),[ef,eb]=(0,a.useState)(!1),[ew,ev]=(0,a.useState)(!1),[ey,ej]=(0,a.useState)(!1),[eS,eL]=(0,a.useState)(!1),[eA,ek]=(0,a.useState)(!1),[eN,eE]=(0,a.useState)(),eB=null==Q?void 0:null===(t=Q.receiptScanBrandCollectionCollection)||void 0===t?void 0:t.items.length,eT=[];null==Q||null===(r=Q.receiptScanBrandCollectionCollection)||void 0===r||r.items.forEach(e=>{var t;null==e||null===(t=e.brandCategoryCollection)||void 0===t||t.items.forEach(e=>{eT[e.name]=eT[e.name]?eT[e.name]+1:1})});let e_=async()=>{var e,t,r,n;window.innerWidth>=I.deviceWidth.largeScreenStart&&ex===k.MOBILE_PER_PAGE&&eu(k.DESKTOP_PER_PAGE);let a=[];ei.includes(k.CLEAR_ALL)||ei.includes(k.ALL)?ei.includes(k.ALL)?(a=null==Q?void 0:null===(n=Q.receiptScanBrandCollectionCollection)||void 0===n?void 0:null===(r=n.items)||void 0===r?void 0:r.filter(e=>e),eu(eB)):a=[]:(a=null==Q?void 0:null===(t=Q.receiptScanBrandCollectionCollection)||void 0===t?void 0:null===(e=t.items)||void 0===e?void 0:e.filter(e=>{var t,r;return(null==e?void 0:null===(t=e.brandCategoryCollection)||void 0===t?void 0:t.items.some(e=>ei.includes(e.name)))||(null===(r=T.default.profileData.traitFavoriteBrands)||void 0===r?void 0:r.includes(e.brandReferenceId))&&ei.includes("My Favorites")}),eu(ex)),T.default.profileData&&a.map(e=>{var t,r;return(null===(r=T.default.profileData)||void 0===r?void 0:null===(t=r.traitFavoriteBrands)||void 0===t?void 0:t.includes(e.brandReferenceId))?(e.traitValue=e.name,e):""}),eE(a),(0,R.JD)(P.Hve)},eI=async e=>{if(!(0,N.oZ)("localStorage")){T.default.showCookiesDisabledodal=!0;return}if(ej(!0),eb(e.id),ev(!0),T.default.rewardStatus){var t;await (0,C.FZ)();let r=e.brandReferenceId.toString();if(null===(t=T.default.profileData)||void 0===t?void 0:t.traitFavoriteBrands.includes(r)){let t=await (0,N.wY)(r),{traitFavoriteBrands:n}=T.default.profileData;200===t.status?(eN.map(e=>(delete e.traitValue,e)),n=""!==n?n.split(",").filter(e=>e.trim()!==r):"",T.default.profileData.traitFavoriteBrands=n.toString(),(0,R.JD)(P._A2,e,t)):T.default.showErrorModal=!0}else{let t=await (0,N.uf)(r),{traitFavoriteBrands:n}=T.default.profileData;200===t.status?(n=""!==n?n.concat(",".concat(r)):r,T.default.profileData.traitFavoriteBrands=n,(0,R.JD)(P.eNV,e,t)):T.default.showErrorModal=!0}}else T.default.context=k.loginContextText.pgBrandLanding,T.default.showSignInPopup=!0;e_(),ev(!1),eb(null),ej(!1)},eO=e=>{let t=eg.indexOf(e);-1===t?eh([e,...eg]):(eg.splice(t,1),eh([...eg]))},eC=()=>{if(T.default.rewardStatus){var e,t;let r=0;return null==Q||null===(t=Q.receiptScanBrandCollectionCollection)||void 0===t||null===(e=t.items)||void 0===e||e.forEach(e=>{var t;(null===T.default||void 0===T.default?void 0:null===(t=T.default.profileData)||void 0===t?void 0:t.traitFavoriteBrands.includes(null==e?void 0:e.brandReferenceId.toString()))&&(r+=1)}),r}return null},eR=X.items.map((e,t)=>({id:t,value:e.categoryId,name:"".concat(e.categoryTitle),innerText:e.categoryTitle!==k.CLEAR_ALL?"".concat(e.categoryTitle," (").concat(e.categoryTitle===k.ALL?eB:(e.categoryTitle===k.MY_FAVORITES?eC():eT[e.categoryTitle])||0,")"):e.categoryTitle})),eP=e=>{let t=e&&e.getBoundingClientRect();return t&&t.top>=0&&t.left>=0&&Math.floor(t.bottom)<=(window.innerHeight||document.documentElement.clientHeight)&&Math.floor(t.right)<=(window.innerWidth||document.documentElement.clientWidth)},eW=()=>{eP(document.getElementById("loadMoreBrands"))?eL(!0):eL(!1)};return(0,a.useEffect)(()=>(el([k.FEATURED]),e_(),eu(ec?k.DESKTOP_PER_PAGE:k.MOBILE_PER_PAGE),window.addEventListener("scroll",()=>eW()),window.removeEventListener("scroll",()=>eW())),[]),(0,a.useEffect)(()=>{e_()},[T.default.rewardStatus]),(0,a.useEffect)(()=>{e_(),ec?eA?eu(k.DESKTOP_FOR_ALL):eu(k.DESKTOP_PER_PAGE):eA?eu(k.MOBILE_FOR_ALL):eu(k.MOBILE_PER_PAGE)},[ei,ec]),(0,a.useEffect)(()=>{eS&&setTimeout(()=>{(eo||eA)&&(ec?eu(ex+k.DESKTOP_PER_PAGE):eu(ex+k.MOBILE_PER_PAGE)),eL(!1)},1e3)},[eS]),(0,n.jsxs)("div",{className:"",children:[(0,n.jsxs)(g(),{children:[(null==K?void 0:null===(i=K.posterImage)||void 0===i?void 0:i.smartphoneImage)&&(0,n.jsx)("link",{rel:"preload",media:"(max-width: 768px) and (min-width: 300px)",as:"image",href:(0,E.AR)(null==K?void 0:null===(o=K.posterImage)||void 0===o?void 0:null===(l=o.smartphoneImage)||void 0===l?void 0:l.url)}),(null==K?void 0:null===(d=K.posterImage)||void 0===d?void 0:d.desktopImage)&&(0,n.jsx)("link",{rel:"preload",media:"(max-width: 768px) and (min-width: 300px)",as:"image",href:(0,E.AR)(null==K?void 0:null===(c=K.posterImage)||void 0===c?void 0:null===(s=c.desktopImage)||void 0===s?void 0:s.url)}),(null==K?void 0:null===(x=K.posterImage)||void 0===x?void 0:x.tabletImage)&&(0,n.jsx)("link",{rel:"preload",media:"(max-width: 768px) and (min-width: 300px)",as:"image",href:(0,E.AR)(null==K?void 0:null===(h=K.posterImage)||void 0===h?void 0:null===(u=h.tabletImage)||void 0===u?void 0:u.url)}),(null==K?void 0:null===(W=K.image)||void 0===W?void 0:W.smartphoneImage)&&(0,n.jsx)("link",{rel:"preload",media:"(max-width: 768px) and (min-width: 300px)",as:"image",href:(0,E.AR)(null==K?void 0:null===(F=K.image)||void 0===F?void 0:null===(D=F.smartphoneImage)||void 0===D?void 0:D.url)}),(null==K?void 0:null===(G=K.image)||void 0===G?void 0:G.desktopImage)&&(0,n.jsx)("link",{rel:"preload",media:"(min-width: 769px)",as:"image",href:(0,E.AR)(null==K?void 0:null===(M=K.image)||void 0===M?void 0:null===(z=M.desktopImage)||void 0===z?void 0:z.url)}),(null==Y?void 0:Y.smartphoneImage)&&(0,n.jsx)("link",{rel:"preload",media:"(max-width: 768px) and (min-width: 300px)",as:"image",href:(0,E.AR)(null==Y?void 0:null===(Z=Y.smartphoneImage)||void 0===Z?void 0:Z.url)}),(null==Y?void 0:Y.desktopImage)&&(0,n.jsx)("link",{rel:"preload",media:"(min-width: 769px)",as:"image",href:(0,E.AR)(null==Y?void 0:null===(V=Y.desktopImage)||void 0===V?void 0:V.url)}),null==Q?void 0:null===(q=Q.receiptScanBrandCollectionCollection)||void 0===q?void 0:q.items.map((e,t)=>{var r,a;return(0,n.jsx)("link",{rel:"preload",as:"image",href:(0,E.AR)(null==e?void 0:null===(r=e.hoverLogo)||void 0===r?void 0:r.url)},(null==e?void 0:null===(a=e.sys)||void 0===a?void 0:a.id)||t)})]}),(0,n.jsxs)("div",{className:"bg-bgcolor",children:[(0,n.jsx)("div",{className:S.backgroundWrapper||"",children:Y&&(0,n.jsx)(f.Z,{className:"w-full",...Y})}),(0,n.jsx)("div",{className:"bg-primary",children:(0,n.jsx)("div",{className:S.content.pageTitle||"",children:H&&(0,n.jsxs)("h2",{children:[H," "]})})}),(0,n.jsx)("div",{className:S.content.bannerSection||"",children:(()=>{switch(null==K?void 0:K.__typename){case"Callout":case"VideoContent":return(0,n.jsx)("div",{className:S.bannerPGBrands.bannerSection,children:(0,n.jsx)(B.Z,{...K,styles:"PGBrands-feature-Card",pageSource:A.rewardsDashboard})});default:return null}})()}),(0,n.jsxs)("div",{id:"brandListSection",className:S.content.mainWrapper||"",children:[(0,n.jsxs)("div",{className:S.content.wrapper||"",children:[(0,n.jsxs)("div",{className:S.content.contentWrapper||"",children:[(0,n.jsx)("h2",{className:S.content.title||"",children:U}),(0,n.jsx)("div",{className:S.content.subTitle||"",children:(0,n.jsx)(y.Z,{body:null==J?void 0:J.body})})]}),(0,n.jsx)("div",{children:(0,n.jsx)("div",{className:"w-330 mx-auto pb-10",children:(0,n.jsx)(_.Z,{title:ei,list:eR,name:"brandCategory",pageSource:"pgBrandSelect",onSelectChange:(e,t,r,n)=>{(t[e].name===k.ALL||t[e].name!==k.CLEAR_ALL&&t.length===ei.length+3)&&n?(t.map(e=>e.name!==k.CLEAR_ALL?e.name:"").filter(e=>void 0!==e),el([k.ALL]),ed(!0)):t[e].name===k.CLEAR_ALL&&n?el([k.CLEAR_ALL]):!ei.includes(t[e].name)&&n?((ei.includes(k.CLEAR_ALL)||ei.includes(k.ALL))&&ei.splice(ei.indexOf(t[e].name),1),ei.includes(k.FEATURED)&&!es&&(ei.splice(ei.indexOf(t[e].name),1),ep(!0)),el([...ei,t[e].name])):!n&&ei.indexOf(t[e].name)>=0&&(t[e].name===k.ALL||1===ei.length?el([k.FEATURED]):(ei.includes(k.ALL)&&ei.splice(ei.indexOf(k.ALL),1),ei.splice(ei.indexOf(t[e].name),1),el([...ei])))},isCheckBox:!0})})}),(0,n.jsx)("div",{className:S.content.mainWrapper||"",children:(null==eN?void 0:eN.length)>0?(0,n.jsxs)("div",{className:S.brandLogos.brandWrapper||"",children:[null==eN?void 0:eN.map((e,t)=>{var r;let a=-1!==eg.indexOf(e.id);return t<ex?(0,n.jsxs)("div",{className:S.brandLogos.brandLogoWrapper||"",children:[(0,n.jsx)("div",{className:"overflow-hidden absolute h-50 w-40 -left-1 xl:left-8 z-9",children:(0,n.jsxs)(j.Z,{"aria-label":"heart icon",disabled:ew,onClick:()=>eI(e),className:"focus:border-black relative w-40 h-32 top-18",children:[(0,n.jsx)(b.default,{className:S.brandLogos.heartIconSVG,color:(0,w.Z)("Red"),name:"spinner",spanStyle:ey&&ef===e.id?"":"hidden"}),(0,n.jsx)(b.default,{className:S.brandLogos.heartIconSVG,color:(null==e?void 0:e.traitValue)?(0,w.Z)("Red"):"",name:"pgBrandsHeart",spanStyle:ey&&ef===e.id?"hidden":""})]})}),ec?(0,n.jsx)("div",{onMouseEnter:()=>eO(null==e?void 0:e.id),onMouseLeave:()=>eO(null==e?void 0:e.id),className:S.brandLogos.logoMainWrapper||"",children:(0,n.jsx)(f.Z,{className:"".concat(S.brandLogos.logoWrapper),altText:e.name,image:(null==e?void 0:e.hoverLogo)&&a?e.hoverLogo:e.logo,disabled:ew},e.sys.id)}):(0,n.jsx)(j.Z,{className:S.brandLogos.logoMainWrapper,onClick:()=>eO(null==e?void 0:e.id),children:(0,n.jsx)(f.Z,{altText:e.name,className:S.brandLogos.logoWrapper,image:(null==e?void 0:e.hoverLogo)&&a?e.hoverLogo:e.logo,disabled:ew},e.sys.id)}),(0,n.jsx)("div",{className:"overflow-hidden absolute h-45 w-45 z-9 bottom-0 right-0",children:(0,n.jsx)(j.Z,{"aria-label":"flip icon",className:"focus:border-black relative w-20 h-20 -right-16 md:-right-10",onClick:()=>eO(null==e?void 0:e.id),children:(0,n.jsx)(b.default,{className:S.brandLogos.flipIconSVG,name:"pgBrandsFlip"})})})]},"".concat((null==e?void 0:null===(r=e.sys)||void 0===r?void 0:r.id)||t,"-div")):null}),ex<eN.length&&!eA&&!eo&&(0,n.jsx)("div",{className:S.brandLogos.ctaWrapper||"",children:(0,n.jsx)(v.Z,{...ee,handler:()=>{eu(ex+em)},className:S.brandLogos.cta})}),eN.length!==eB&&(0,n.jsx)("div",{className:S.brandLogos.ctaWrapperText||"",children:(0,n.jsx)(v.Z,{...$,handler:()=>{setTimeout(()=>{let e=document.getElementById("brandListSection").getBoundingClientRect().top+window.pageYOffset+-70;window.scrollTo({top:e,behavior:"smooth"})}),ek(!0),el([k.ALL])},className:S.brandLogos.linkText,extraTitle:eB})}),ex<eN.length&&(eA||eo)&&(0,n.jsx)("div",{className:"w-full flex justify-center items-center mx-auto",children:(0,n.jsx)(b.default,{name:"spinnerCoral",className:"mt-20px w-40"})}),(0,n.jsx)("div",{id:"loadMoreBrands"})]}):(0,n.jsx)("div",{className:"w-full px-20 text-center py-30",children:ei.includes(k.MY_FAVORITES)?k.NO_FAV_FOUND:k.NOTHING_TO_SHOW})})]}),(0,n.jsxs)("div",{id:"brandPartnerships",className:"mt-10px md:mt-20px xl:mt-17px md:px-20 bg-rewardsBg pb-50",children:[(0,n.jsx)("h2",{className:S.pgBrandsdasboard.catalogTitleText||"",children:et}),(0,n.jsx)("p",{className:S.pgBrandsdasboard.catalogText||"",children:null==er?void 0:er.body}),(0,n.jsx)("div",{className:"flex flex-wrap relative lg:w-730 w-full md:w-630 mx-auto px-45 pb-40 md:pb-0 md:px-0",children:en.items.map(e=>(0,n.jsxs)("div",{className:"bg-white shadow-rewardsTile items-center w-full lg:w-330 md:w-280 md:mx-8px lg:mx-11px lg:my-11px justify-center my-10px md:my-8px block relative ",children:[(0,n.jsx)("div",{className:"px-0 brandPartnerImage min-h-130 lg:min-h-170 relative",children:(0,n.jsx)(f.Z,{className:"w-full",...e.image})}),(0,n.jsxs)("div",{className:"px-20  min-h-140 xl:px-25 py-20",children:[(0,n.jsxs)("div",{className:"min-h-80 pb-25",children:[(0,n.jsx)("h3",{className:"text-16 leading-widest text-purple font-semibold",children:e.title}),(0,n.jsx)("p",{className:"text-16 leading-light font-semibold",children:e.subTitle})]}),e.callToActionsCollection.items.map((t,r)=>{var a;return(0,n.jsx)("div",{className:"absolute bottom-15",children:(0,n.jsxs)(m(),{href:t.link,children:[(0,n.jsx)("span",{className:"underline text-14 font-semibold leading-lightmedium",children:t.linkText}),(0,n.jsx)(b.default,{name:e.iconName?e.iconName:"arrowHome",className:"inherit ml-10px"})]})},(null==t?void 0:null===(a=t.sys)||void 0===a?void 0:a.id)||r)})]})]},"".concat(e.sys.id,"-brandParter")))})]}),(0,n.jsx)("div",{id:"brandReceiptScan",className:S.homeContainer.sectionWrapper||"",children:(0,n.jsx)("div",{className:S.homeContainer.mainJoinWrapper||"",children:(0,n.jsxs)("div",{className:S.homeContainer.joinusWrapper||"",children:[(0,n.jsx)(b.default,{className:S.homeContainer.joinusIconSVG,name:"scanReceipt"}),ea&&ea.items.map((e,t)=>{switch(e.__typename){case"ContentTypeRichText":return(0,a.createElement)(y.Z,{...e,key:e&&e.sys&&e.sys.id||"".concat(t,"-richtext"),pageSource:A.PGBrands,variant:"pgbrands-join-us"});case"LinkButton":return(0,a.createElement)(v.Z,{...e,className:S.homeContainer.cta,key:e&&e.sys&&e.sys.id||"".concat(t,"-button"),pageSource:A.rewardsDashboard})}return null})]})})})]}),(0,n.jsx)(p(),{id:L.__hash,children:L})]})]})};W.propTypes={pageTitle:l().string.isRequired,pageBackground:l().instanceOf(Object).isRequired,bannerContent:l().instanceOf(Object).isRequired,showAll:l().instanceOf(Object),showMore:l().instanceOf(Object),pgBrandReceiptScanCollection:l().instanceOf(Object).isRequired,brandCategoryListCollection:l().instanceOf(Object).isRequired,pgBrandList:l().instanceOf(Object).isRequired,ourFamilyTitle:l().string,ourFamilyDescription:l().instanceOf(Object),brandPartnershipsTitle:l().string,brandPartnershipsDescription:l().instanceOf(Object),brandPartnershipListingCollection:l().instanceOf(Object),router:l().instanceOf(Object),header:l().oneOfType([l().object]),siteSettings:l().oneOfType([l().object])},W.defaultProps={showAll:null,showMore:null,ourFamilyTitle:null,ourFamilyDescription:null,brandPartnershipsTitle:null,brandPartnershipsDescription:null,brandPartnershipListingCollection:null,router:null,header:null,siteSettings:null};var D=(0,x.withRouter)((0,h.Pi)(W));let F=e=>{let{layoutData:t,page:r}=e;return(0,n.jsxs)(o.Z,{...t,children:[(0,n.jsx)(d.Z,{...r.pageMetaData}),(0,n.jsx)(D,{...r,...t})]})};F.propTypes={layoutData:l().instanceOf(Object).isRequired,page:l().instanceOf(Object).isRequired};var G=!0,z=F}},function(e){e.O(0,[3662,724,1216,5814,1055,3495,1191,6839,6716,8743,7364,7573,5218,5029,2888,9774,179],function(){return e(e.s=93133)}),_N_E=e.O()}]);