PageSourceSearch

https://www.guadalupes.com/_next/static/chunks/pages/account/rewards-fa1c65afe01a044f.js

js guadalupes.com collected 2026-10-10 01:58:44 UTC 33,254 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[581],{63312:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/rewards",function(){return t(52168)}])},52168:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return e5}});var n=t(52322),i=t(2784),a=t(5732),o=t(56580),s=t(39097),l=t.n(s),c=t(87749),d=t(63974),u=t(5288),x=t(97421),m=t(90736);let h=e=>{let{label:r}=e;return(0,n.jsx)(l(),{href:{pathname:m.Z6.STORES},passHref:!0,legacyBehavior:!0,children:(0,n.jsx)(x.Db,{"data-css-override":"StyledPrimaryButton","aria-label":"Go to the store locator page",onClick:()=>{(0,c.O)(d.x.GENERIC__CTA,{name:d.V.ORDER_NOW,details:r})},children:(0,n.jsx)(u.Z,{accessor:"rewards.order_now_button"})})})};var p=t(53237),_=t(37085),g=t(926),f=t(73695),j=t(46956);function b(e){let{name:r,description:t,image_url:i,onClick:a,id:o,isSelected:s}=e,{primary_border_color:l,border_radius:c,primary_active_color:d}=(0,f.$E)("global"),{primary_font:u}=(0,f.$E)("text"),{color:x}=(0,j.l)(u);return(0,n.jsxs)(g.Kq,{"data-testid":"social-cause-item",onClick:()=>{s?a():a(o)},direction:"vertical",align:"center",position:"center",css:{padding:"$4",border:"1px solid ".concat(s?d:l),borderRadius:"".concat(c,"px"),color:null!=x?x:"inherit",width:"100%"},children:[(0,n.jsxs)(g.Kq,{align:"center",position:"leading",gap:"$4",css:{width:"100%"},children:[i?(0,n.jsx)(_.E,{src:i,width:50,height:50,alt:"".concat(null!=r?r:""," social cause icon")}):null,(0,n.jsx)("h3",{children:r})]}),(0,n.jsx)(w,{children:t})]})}let w=(0,p.zo)("p",{margin:0});var v=t(40024),y=t(47661),E=t(62350),R=t(69780),C=t(38801),T=t(15066),S=t(17609),k=t(97549),Z=t(20496),I=t(50370),P=t(59706);let O=()=>{let e=(0,S.d9)({origin:(0,k.P$)(window.location.host)});return(0,y.a)({queryKey:["social-causes"],queryFn:()=>(0,v.sX)({client:e}),refetchOnWindowFocus:!1})},D=()=>{let{dispatch:e,displayErrorToast:r,displayToast:t}=(0,C.xP)(),n=(0,R.E)(),i=(0,S.d9)({origin:(0,k.P$)(window.location.host)});return(0,E.D)(e=>(0,v.rJ)(e.socialCause.id,e.donation,{client:i}),{onError:async t=>{Z.Tb(t),e(r((await (0,I.Xr)((0,P.bc)(n,"rewards.donate_reward_error_text"),t)).message))},onSuccess:(r,i)=>{e(T.default.fetchRedeemables()),e(T.default.fetchOffers()),e(T.default.fetchLoyaltyState()),e(t((0,P.bc)(n,"rewards.donate_reward_success_text",{socialCauseName:i.socialCause.name})))}})};var A=t(23643),z=t(74115),N=t(75470);function F(e){let{toggle:r,onSubmit:t,isLoading:a}=e,{data:o,status:s}=O(),{label:l}=(0,N.v9)(e=>e.app.organization.organization),[c,d]=(0,i.useState)(),{dispatch:m,displayErrorToast:h}=(0,C.xP)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(A.u.Title,{children:(0,n.jsx)(u.Z,{accessor:"rewards.donate_reward_modal_header",dataObj:{brand:l}})}),(0,n.jsx)(A.u.Content,{children:(0,n.jsxs)(g.Kq,{direction:"vertical",gap:"$4",children:[(0,n.jsx)(z.H,{condition:"loading"===s,children:(0,n.jsx)(H,{children:"Fetching Social Causes..."})}),(0,n.jsx)(z.H,{condition:!!((null==o?void 0:o.data)&&0===o.data.length),children:(0,n.jsx)(H,{children:" Sorry, there are no Social Causes available "})}),(0,n.jsx)(z.H,{condition:!!((null==o?void 0:o.data)&&o.data.length>0),children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(L,{children:(0,n.jsx)(u.Z,{accessor:"rewards.donate_reward_modal_subheader"})}),(0,n.jsx)(g.Kq,{position:"center",css:{flexWrap:"wrap"},children:null==o?void 0:o.data.map(e=>(0,n.jsx)(b,{isSelected:e.id===c,...e,onClick:d},e.id))})]})})]})}),(0,n.jsxs)(A.u.Footer,{children:[(0,n.jsx)(A.u.Cancel,{children:"Cancel"}),(0,n.jsx)(x.Db,{"data-css-override":"StyledPrimaryButton",disabled:!c||a||"loading"===s,onClick:async()=>{if(!c)return;let e=null==o?void 0:o.data.find(e=>e.id===c);if(e)await t({id:e.id,name:e.name}),r();else{let e=Error("Social Cause not found");Z.Tb(e),m(h((await (0,I.Xr)("Social Cause not found. Please try again.",e)).message))}},children:(0,n.jsx)(u.Z,{accessor:"rewards.donate_reward_modal_donate_button"})})]})]})}let L=(0,p.zo)("h2",{margin:0}),H=(0,p.zo)("p",{margin:0,textAlign:"center"});var G=t(81334),U=t(92240);function $(e){var r;let{donation:t,rewardName:i}
1=e,a=(0,f.JR)(),o=(0,N.v9)(U.F5),{mutateAsync:s,isLoading:l}=D();return(null===(r=o.loyalty.features)||void 0===r?void 0:r.supportsSocialCauses)&&a.rewards.donatable_rewards?(0,n.jsx)(A.u.Container,{trigger:e=>(0,n.jsx)(Y,{onClick:e,"aria-label":"Click to donate reward ".concat(i),children:(0,n.jsx)(u.Z,{accessor:"rewards.donate_reward_button"})}),children:e=>(0,n.jsx)(F,{...t,toggle:e,onSubmit:async e=>await s({socialCause:e,donation:t}),isLoading:l})}):null}let Y=(0,p.zo)(G.UN,{alignSelf:"center",width:"100%"});var W=t(63602),B=t(65413),M=t(34737),q=t(88373),V=t(92122),K=t(22427);function X(e){let{initialAmount:r,rewardActionType:t,onSubmit:i,isLoading:a}=e,o=(0,K.DV)(r),s="redeem"===t?"Redemption":"Donation",l=(0,B.Ry)({amount:(0,B.Rx)().required().max(Number(o),"Please enter an amount up to $".concat((0,K.DV)(r))).min(0,"".concat(s," amount must be more than $0"))});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(A.u.Title,{children:"".concat((0,P.fm)(t)," Your Reward")}),(0,n.jsx)(q.K,{align:"center",direction:"vertical",gap:"$4",css:{minHeight:"100%",textAlign:"center"},children:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(W.J9,{validateOnBlur:!0,validateOnChange:!0,initialValues:{amount:(0,K.DV)(r)},onSubmit:(e,r)=>{let{amount:t}=e,{resetForm:n}=r;i(100*Number(t)),n()},validationSchema:l,children:e=>{let{isValid:i}=e;return(0,n.jsxs)(W.l0,{children:[(0,n.jsxs)(Q,{children:[(0,n.jsx)(J,{children:"You have $".concat((0,K.DV)(r)," available to ").concat(t,".")}),(0,n.jsxs)(M.x,{css:{display:"flex",alignItems:"center"},children:[(0,n.jsx)("i",{style:{position:"relative",left:"1rem",fontStyle:"normal"},children:"$"}),(0,n.jsx)(V.I,{style:{paddingLeft:"1.125rem"},placeholder:"0.00",pattern:"[0-9.]*",type:"number",step:"0.01",autoFocus:!0,id:"amount",name:"amount",min:"0",label:"Enter amount of rewards available to ".concat(t)})]})]}),(0,n.jsxs)(A.u.Footer,{children:[(0,n.jsx)(A.u.Cancel,{children:"Close"}),(0,n.jsx)(x.Db,{"data-css-override":"StyledPrimaryButton",disabled:!i||a,$buttonTheme:"secondary",type:"submit",children:(0,P.fm)(t)})]})]})}})})})]})}let J=(0,p.zo)("p",{fontSize:"1rem",margin:0}),Q=(0,p.zo)(A.u.Content,{display:"flex",flexDirection:"column",gap:"1rem",position:"relative",overflowY:"auto"});var ee=t(17335),er=t.n(ee),et=t(12929);let en=()=>{let{myOffers:e,redemptions:r}=(0,N.v9)(et.G),t=e.map(e=>{var r;return null===(r=e.redemption)||void 0===r?void 0:r.id}).filter(e=>void 0!==e),n=r.map(e=>null==e?void 0:e.id),i=er()(n,t);return r.find(e=>e.id===i[0])};var ei=t(29782),ea=t(43580),eo=t(80295),es=t(50584);let el=e=>{let{id:r,type:t,memberCode:a,memberId:o,onError:s}=e,{activeRedemption:l,loading:c,error:d}=(0,N.v9)(et.G),{organization:x}=(0,N.v9)(e=>e.app.organization),m=(0,N.I0)(),h=l?l.tracking_code:a,p=a?"Member Code":null==l?void 0:l.label;return(0,i.useEffect)(()=>{r&&t&&m(T.default.createRedemption(r,t))},[]),(0,i.useEffect)(()=>{d&&s()},[d]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(A.u.Title,{children:(0,n.jsx)(u.Z,{accessor:a?"rewards.earn_in_store_modal_header":"rewards.redeem_in_store_modal_header",html:!0,dataObj:{brand:x.label}})}),(0,n.jsx)(A.u.Content,{children:(0,n.jsx)(eo.K,{align:"center",direction:"vertical",gap:"var(--size-4)",overrides:{minHeight:"100%",textAlign:"center"},children:c&&r&&t?(0,n.jsx)(ex,{children:"loading..."}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{children:[p&&(0,n.jsx)(ec,{children:p}),(null==l?void 0:l.expiring_at)&&(0,n.jsxs)(ed,{children:["Expires: ",(0,es.vh)(l.expiring_at)]})]}),h&&(0,n.jsx)(ei.tv,{value:h,size:160}),(null==l?void 0:l.tracking_code)&&(0,n.jsxs)("span",{children:["Tracking Code: ",l.tracking_code]}),o&&(0,n.jsxs)("span",{children:["Member Id: ",o]}),(0,n.jsx)(eu,{children:(0,n.jsx)(u.Z,{accessor:a?"rewards.earn_in_store_instructional_text":"rewards.redeem_in_store_instructional_text",html:!0})})]})})}),(0,n.jsx)(A.u.Footer,{children:(0,n.jsx)(A.u.Cancel,{children:"Close"})})]})},ec=ea.ZP.h2.withConfig({componentId:"sc-568cf4e1-0"})(["margin:0;"]),ed=ea.ZP.span.withConfig({componentId:"sc-568cf4e1-1"})(["display:block;padding-block-start:var(--size-2);opacity:0.75;"]),eu=ea.ZP.div.withConfig({componentId:"sc-568cf4e1-2"})(["font-size:0.675rem;"]),ex=ea.ZP.span.withConfig({componentId:"sc-568cf4e1-3"})(["margin:auto 0;"]);var em=t(87557);let eh=e=>{let{onClose:r,initialAmount:t}=e,a=(0,o.useDispatch)(),{data:s,activeRedemption:l}=(0,o.useSelector)(et.G),{isLoading:c,isSuccess:d,mutate:u}=(0,E.D)({mutationFn:e=>{let{amount:r,client:t}=e;return(0,v.HB)(r,t)},onError:e=>{a(T.default.createRedemptionFailure(e,em.Hx.REWARD))},onSuccess:e=>{a(T.default.createRedemptionSuccess(e,em.Hx.REWARD))}}),x=en();return(0,i.useEffect)(()=>{x&&!l&&a(T.default.createRedemptionSuccess(x,em.Hx.REWARD))},[x,l]),(0,i.useEffect)(()=>()=>{a(T.default.clearActiveRedemption())},[]),d||l?(0,n.jsx)(el,{type:em.Hx.REWARD,memberId:null==s?void 0:s.external_user_fk,onError:r}):(0,n.jsx)(X,{onSubmit:e=>u({amount:e,client:{client:(0,S.d9)({origin:(0,k.P$)(window.location.host)})}}),initialAmount:t,rewardActionType:"redeem",isLoading:c})},ep=()=>{let{loyaltyState:e}
1=(0,o.useSelector)(et.G),r=(0,o.useSelector)(U.F5),t=null==e?void 0:e.banked_currency,i=null==e?void 0:e.banked_currency_expiration_date,a=null==e?void 0:e.banked_currency_expiring;return(null==r?void 0:r.loyalty.program_type)!==em.cI.POINTS_CONVERT_CURRENCY?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(G.EE,{children:[(0,n.jsx)(u.Z,{tag:G.Nc,accessor:"rewards.banked_currency_header",html:!0}),(0,n.jsx)(u.Z,{tag:"p",accessor:"rewards.banked_currency_subheader",html:!0}),(0,n.jsx)(G.Ot,{})]}),(0,n.jsxs)(G.hb,{children:[(0,n.jsxs)(G.cs,{children:[(0,n.jsx)(u.Z,{tag:"h3",accessor:"rewards.banked_currency_card_header",html:!0}),(0,n.jsxs)("h1",{children:["$",(0,K.DV)(t)]}),t?i&&a&&a>0&&(0,n.jsx)(u.Z,{tag:"p",accessor:"rewards.banked_currency_expiration_text",html:!0,dataObj:{currency:"$".concat((0,K.DV)(a)),date:(0,es.vh)(i)}}):(0,n.jsx)(u.Z,{tag:"p",accessor:"rewards.banked_currency_empty_state_text",html:!0})]}),(0,n.jsxs)(G.Z1,{children:[(0,n.jsx)(h,{label:"Rewards - Rewards"}),!!t&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(A.u.Container,{trigger:e=>(0,n.jsx)(x.Db,{"data-css-override":"StyledPrimaryButton",onClick:()=>e(),$buttonTheme:"knockout","aria-label":"Redeem banked currency in store",children:(0,n.jsx)(u.Z,{accessor:"rewards.redeem_in_store_button"})}),children:e=>(0,n.jsx)(eh,{onClose:e,initialAmount:t})})})]}),t?(0,n.jsx)(G.qt,{children:(0,n.jsx)($,{donation:{type:"currency",item:t.toString()},rewardName:"Banked Currency"})}):null]})]})};var e_=t(8782),eg=t(83065);let ef=e=>{let{externalURL:r}=e,{organization:t}=(0,N.v9)(e=>e.app.organization),i=(0,n.jsx)(u.Z,{accessor:"rewards.learn_more_button"}),a="Click to learn how rewards work",o=()=>(0,c.O)(d.x.GENERIC__CTA,{name:d.V.HOW_REWARDS_WORK,details:"Rewards"});return(0,n.jsxs)(G.kx,{children:[(0,n.jsx)(u.Z,{tag:G.$G,accessor:"rewards.learn_more_header",html:!0,dataObj:{brand:t.label}}),r?(0,n.jsx)(x.Db,{"data-css-override":"StyledPrimaryButton","aria-label":a,as:"a",href:r,target:"_blank",onClick:()=>o(),children:i}):(0,n.jsx)(A.u.Container,{trigger:e=>(0,n.jsx)(x.Db,{"data-css-override":"StyledPrimaryButton","aria-label":a,onClick:()=>{e(),o()},children:i}),children:(0,n.jsx)(eg.F,{})})]})},ej=ea.ZP.button.withConfig({componentId:"sc-b09c69c9-0"})(["display:none;@media (max-width:767px){width:64px;height:100px;border-radius:32px;box-shadow:0 0 8px 0 #ccc;border:none;background:",";display:flex;flex-direction:column;justify-content:center;align-items:center;position:relative;p{position:absolute;bottom:0;font-family:",";font-size:16px;color:",";}}"],e=>{let{theme:r}=e;return r.auth_page.background_color},e=>{let{theme:r}=e;return r.primary_font.bold.font_family},e=>{var r;let{theme:t}=e;return(0,e_.mj)(null!==(r=t.auth_page.background_color)&&void 0!==r?r:"#fff",t.global.primary_active_color)>4.5?t.global.primary_active_color:t.auth_page.font.color}),eb=ea.ZP.div.withConfig({componentId:"sc-b09c69c9-1"})(["width:48px;height:48px;border-radius:24px;background:",";display:flex;justify-content:center;align-items:center;position:absolute;top:7px;"],e=>{let{theme:r}=e;return r.global.primary_active_color}),ew=ea.ZP.div.withConfig({componentId:"sc-b09c69c9-2"})(["position:fixed;bottom:var(--safe-offset--descending,0);margin-bottom:var(--size-4);right:var(--size-4);"]),ev=()=>{let{data:e}=(0,o.useSelector)(et.G);return(null==e?void 0:e.qrcode)?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(ew,{children:(0,n.jsx)(A.u.Container,{trigger:e=>(0,n.jsxs)(ej,{"aria-label":"Click to view your membership ID",onClick:()=>e(),children:[(0,n.jsx)(eb,{children:(0,n.jsx)("img",{src:"/static/img/icons/qr.svg",alt:"",role:"presentation"})}),(0,n.jsx)("p",{children:"Scan"})]}),children:()=>(0,n.jsx)(el,{memberCode:e.qrcode,memberId:null==e?void 0:e.external_user_fk})})})}):null},ey=ea.ZP.ul.withConfig({componentId:"sc-f85932d1-0"})(["margin:var(--neg-size-6) 0;padding:0;"]),eE=ea.ZP.li.withConfig({componentId:"sc-f85932d1-1"})(["padding:var(--size-3) 0;display:flex;justify-content:space-between;border-bottom:1px solid ",";h3{font-size:16px;}h2{font-size:16px;","}&:last-of-type{border:none;}"],e=>{let{theme:r}=e;return r.global.primary_border_color},e=>{let{addition:r,theme:t}=e;return r&&"\n    color: ".concat(t.global.primary_active_color,";\n  ")}),eR=ea.ZP.div.withConfig({componentId:"sc-f85932d1-2"})(["h3{font-size:20px;font-family:",";margin:0 auto;}button{width:100%;}"],e=>{let{theme:r}=e;return r.primary_font.bold.font_family});var eC=t(78754),eT=t(23314),eS=t(16251);let ek=()=>{let e=(0,o.useSelector)(e=>e.app.me.rewardsHistory),r=(0,o.useDispatch)(),t=e.length>0;return(0,i.useEffect)(()=>{r(T.default.fetchRewardsHistory())},[]),(0,n.jsxs)(G.kx,{className:eC.Y.LOYALTY_REWARDS_FOOTER.POINTS_HISTORY,children:[(0,n.jsx)(u.Z,{tag:G.$G,accessor:"rewards.point_history_header"}),(0,n.jsx)(A.u.Container,{trigger:e=>(0,n.jsx)(x.Db,{"data-css-override":"StyledPrimaryButton",onClick:e,$buttonTheme:"knockout","aria-label":"Click to view your points history",children:(0,n.jsx)(u.Z,{accessor:"rewards.point_history_button"})}),children:()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(A.u.Title,{children:(0,n.jsx)(u.Z,{accessor:"rewards.point_history_modal_header",html:!0})}),(0,n.jsx)(A.u.Content,{children:t?(0,n.jsx)(ey,{children:e.map((e,r)=>e.value&&(0,n.jsxs)(eE,{addition:e.value.includes("+"),children:[(0,n.jsx)("h3",{children:(0,eS.p6)(e.date,eT.z.MONTH_DAY_YEAR)}),(0,n.jsx)("h2",{children:e.value})]},"".concat(e.date,"-").concat(r)))}):(0,n.jsxs)(eR,{children:[(0,n.jsx)(u.Z,{tag:"h3",accessor:"rewards.points_history_modal_empty_header",html:!0}),(0,n.jsx)(u.Z,{tag:"p",accessor:"rewards.points_history_modal_empty_subheader",html:!0})]})}),(0,n.jsxs)(A.u.Footer,{children:[(0,n.jsx)(A.u.Cancel,{children:"Close"}),!t&&(0,n.jsx)(h,{label:"Rewards - History Modal"})]})]})})]})};var eZ=t(69767),eI=t(30686);let eP=(0,B.Ry)({barcode:(0,B.Z_)()}),eO=()=>{let e=(0,o.useDispatch)(),{receiptBarcodeLoading:r}=(0,o.useSelector)(et.G),t=(0,f.EL)();return(0,n.jsxs)(G.kx,{className:eC.Y.LOYALTY_REWARDS_FOOTER.RECEIPT_BARCODE,children:[(0,n.jsx)(u.Z,{tag:G.$G,accessor:"rewards.enter_barcode_header"}),(0,n.jsx)(A.u.Container,{trigger:e=>(0,n.jsx)(x.Db,{"data-css-override":"StyledPrimaryButton",onClick:e,$buttonTheme:"knockout","aria-label":"Click to redeem rewards from a receipt barcode",children:(0,n.jsx)(u.Z,{accessor:"rewards.enter_barcode_button"})}),children:i=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(A.u.Title,{children:(0,n.jsx)(u.Z,{accessor:"rewards.enter_barcode_modal_header",html:!0})}),(0,n.jsx)(W.J9,{initialValues:{barcode:""},onSubmit:(r,t)=>{let{barcode:n}=r,{resetForm:a}=t;e(T.default.redeemReceiptBarcode(n)),i(),a()},validationSchema:eP,children:e=>{let{dirty:i,isValid:a}=e;return(0,n.jsxs)(W.l0,{children:[(0,n.jsxs)(A.u.Content,{children:[(0,n.jsx)(eD,{children:(0,n.jsx)(u.Z,{accessor:"rewards.enter_barcode_instructional_text",html:!0})}),(0,n.jsx)(eZ.x,{overrides:{marginTop:"var(--size-3)"},children:(0,n.jsx)(V.I,{autoFocus:!0,id:"barcode",name:"barcode",label:(0,P.bc)(t,"rewards.enter_barcode_placeholder_text")})}),(0,n.jsx)(eA,{children:(0,n.jsx)(u.Z,{accessor:"rewards.enter_barcode_disclaimer_text",html:!0})})]}),(0,n.jsxs)(A.u.Footer,{children:[(0,n.jsx)(A.u.Cancel,{children:"Close"}),(0,n.jsx)(x.Db,{"data-css-override":"StyledPrimaryButton",disabled:!i||!a,$submitting:r,$buttonTheme:"secondary",type:"submit",children:"Submit"})]})]})}})]})})]})},eD=ea.ZP.p.withConfig({componentId:"sc-28a083b-0"})(["font-size:1rem;margin:0;"]),eA=ea.ZP.p.withConfig({componentId:"sc-28a083b-1"})(e=>{let{theme:r}=e;return{fontSize:".75rem",margin:0,...(0,j.l)(r.text.primary_font,["color"],{color:e=>e?(0,eI.F)(e_.DZ)("0.1",e):"inherit"})}});var ez=t(79807);function eN(){let{slug:e}=(0,N.v9)(e=>e.app.organization.organization),{webConfig:r,strings:t}=(0,N.v9)(e=>e.app.cmsConfig),i=t.rewards.learn_more_url,o=ez.P.MODAL_HOW_REWARDS_WORK[e];return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eF,{children:(0,n.jsxs)(eL,{children:[(i||o)&&(0,n.jsx)(ef,{externalURL:i}),(0,n.jsx)(a.Z,{checkType:em.Mo.FEATURE,checkName:em.lw.SHOW_LOYALTY_HISTORY,component:(0,n.jsx)(ek,{})}),r.accounts.barcode_scan&&(0,n.jsx)(a.Z,{checkType:em.Mo.FEATURE,checkName:em.lw.CLAIM_REWARDS_BY_RECEIPT,component:(0,n.jsx)(eO,{})})]})}),(0,n.jsx)(a.Z,{checkType:em.Mo.FEATURE,checkName:em.lw.SUPPORTS_QR,component:(0,n.jsx)(ev,{})})]})}let eF=ea.ZP.div.withConfig({componentId:"sc-fdf048e2-0"})(["align-items:center;background:",";justify-content:center;min-width:100%;padding:var(--size-5) var(--size-5) var(--size-32);width:100%;h1{font-family:",";font-size:24px;text-align:left;}button{align-items:center;max-width:75%;@media (max-width:1024px){min-width:100% !important;}}@media (min-width:768px){padding:var(--size-16) var(--size-5);}"],e=>{let{theme:r}=e;return(0,eI.F)(e_.DZ)("0.9",r.global.primary_active_color)},e=>{let{theme:r}=e;return r.primary_font.bold.font_family}),eL=ea.ZP.div.withConfig({componentId:"sc-fdf048e2-1"})(["display:grid;gap:var(--size-12);grid-template-columns:1fr;margin:0 auto;max-width:var(--size-4xl);width:100%;@media (min-width:768px){gap:var(--size-5);grid-template-columns:repeat(3,1fr);}"]);var eH=t(80684),eG=t(85787),eU=t(36525);let e$=ea.ZP.div.withConfig({componentId:"sc-78322357-0"})(["align-items:center;background:",";display:flex;height:400px;justify-content:center;padding:","px;text-align:center;width:100%;> div{width:100%;}h2,h3{font-size:20px;margin:0 0 ","px;@media (max-width:767px){font-size:16px;margin-bottom:","px;}}h3{font-family:",";font-weight:normal;}@media (max-width:767px){height:auto;margin-top:","px;padding:","px ","px;}"],e=>{let{theme:r}=e;return r.global.secondary_body_color},eU._.GUTTER,eU._.GUTTER,eU._.GUTTER/2,e=>{let{theme:r}=e;return r.primary_font.regular.font_family},eU._.LOYALTY_MENU_HEIGHT_MOBILE,2*eU._.GUTTER,eU._.GUTTER),eY=ea.ZP.h1.withConfig({componentId:"sc-78322357-1"})(["font-size:","px;font-family:",";margin:0 0 ","px;@media (max-width:767px){font-size:","px;margin-bottom:","px;}"],e=>e.currentPoints>0?48:32,e=>{let{theme:r}=e;return r.primary_font.bold.font_family},eU._.GUTTER,e=>e.currentPoints>0?38:28,eU._.GUTTER/2),eW=ea.ZP.div.withConfig({componentId:"sc-78322357-2"})(["display:flex;margin:0 0 ","px;justify-content:center;.wrapper{max-width:500px;width:100%;}.progress-bar{width:100%;background:",";border-radius:12px;border:1px solid ",";overflow:hidden;}.progress-bar-fill{display:block;height:24px;transition:width 500ms ease-in-out;background:",";border-radius:12px;}@media (max-width:767px){margin:0 0 ","px;}"],eU._.GUTTER,e=>{let{theme:r}=e;return(0,eI.F)(e_.DZ)(".9",r.global.primary_border_color)},e=>{let{theme:r}=e;return r.global.primary_border_color},e=>{let{theme:r}=e;return r.global.primary_active_color},eU._.GUTTER),eB=ea.ZP.div.withConfig({componentId:"sc-78322357-3"})(["display:flex;justify-content:center;margin:","px;"],eU._.GUTTER);var eM=(0,o.connect)(e=>({loyaltyState:e.app.me.loyaltyState,myRedeemables:e.app.me.redeemables,organization:e.app.organization,strings:e.app.cmsConfig.strings}))(e=>{var r;let{loyaltyState:t,organization:i,myRedeemables:a,strings:o}=e,s=null==t?void 0:t.membership_level_name,l=null!==(r=null==t?void 0:t.points)&&void 0!==r?r:0,c=null==i?void 0:i.loyalty.program_type,d=eH.fH.nextLargestRewardPointValue(c,t,a),x=eH.fH.calculateProgressBarWidth(l,d),m=d-l>0?d-l:0,p=(0,P.fB)((0,P.bc)(o,"rewards.rewards_counter"),1!==m);return(0,n.jsx)(e$,{children:(0,n.jsxs)("div",{children:[(0,n.jsx)(eY,{currentPoints:l,children:((e,r,t)=>{let i=(0,P.fB)((0,P.bc)(o,"rewards.rewards_counter"),t>1);
1return e?r?(0,n.jsxs)(n.Fragment,{children:[e.toLocaleString(),"/",t.toLocaleString()," ",i]}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(u.Z,{accessor:"rewards.maximum_tier_header",html:!0,dataObj:{points:e.toLocaleString()}})}):(0,n.jsx)(u.Z,{accessor:"rewards.no_rewards_header",html:!0})})(l,m,d)}),m>0&&(0,n.jsx)(eW,{children:(0,n.jsx)("div",{className:"wrapper",children:(0,n.jsx)("div",{className:"progress-bar",children:(0,n.jsx)("span",{className:"progress-bar-fill",style:{width:x}})})})}),m>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h2",{children:(0,n.jsx)(u.Z,{accessor:"rewards.points_meter_subheader",html:!0,dataObj:{number:m.toLocaleString(),counter:p,conversionRate:c===em.cI.POINTS_CONVERT_CURRENCY&&"$".concat(null==t?void 0:t.conversion_rate)}})}),(0,n.jsx)(u.Z,{tag:"h3",accessor:"rewards.user_summary_total_available_points_text",html:!0,dataObj:{points:l.toString()}})]}):(0,n.jsx)(u.Z,{tag:"h2",accessor:"rewards.maximum_tier_subheader",html:!0}),!m&&(0,n.jsx)(eB,{children:(0,n.jsx)(eG.qt,{children:(0,n.jsx)(h,{label:"Rewards - Loyalty State"})})}),s&&(0,n.jsxs)(G.LS,{children:[(0,n.jsx)("img",{src:"/static/img/icons/trophy.svg",alt:"Trophy Icon"}),(0,n.jsx)(u.Z,{accessor:"rewards.user_summary_membership_level_text",html:!0,dataObj:{level:s}})]}),(0,n.jsx)(u.Z,{accessor:"rewards.pending_points_disclaimer",html:!0,tag:G.jp})]})})}),eq=t(96748);let eV=()=>{let{myOffers:e}=(0,o.useSelector)(et.G),r=(0,o.useSelector)(U.F5),t=(0,o.useDispatch)(),i=null==r?void 0:r.loyalty.program_type,s=[em.cI.POINTS_CONVERT_REWARDS,em.cI.SP_POINTS_CONVERT_REWARDS],l=(0,n.jsx)(u.Z,{accessor:s.includes(i)?"rewards.my_rewards_header":"rewards.offers_header",html:!0});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(G.EE,{children:[(0,n.jsxs)(G.Nc,{children:[l," (",e.length,")"]}),(0,n.jsx)(G.Ot,{})]}),(0,n.jsx)(G.xc,{children:e.length>0?e.map((e,r)=>{var i;return(0,n.jsxs)(G.i$,{children:[(0,n.jsxs)(G.r7,{children:[(null===(i=e.image)||void 0===i?void 0:i.url)&&(0,n.jsx)("img",{src:e.image.url,alt:e.label}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{children:e.label}),e.expires_at&&(0,n.jsxs)("p",{children:["Expires: ",(0,es.vh)(e.expires_at)]})]})]}),(0,n.jsx)("div",{children:e.description&&e.description.split("\n").map((e,r)=>(0,n.jsx)(G.Fl,{children:e.trim()},"line-".concat(r)))}),(0,n.jsxs)(G.Z1,{children:[(0,n.jsx)(h,{label:"Rewards - Offers"}),(0,n.jsx)(a.Z,{checkType:em.Mo.FEATURE,checkName:em.lw.CREATE_REDEMPTION_USING_REWARD,component:(0,n.jsx)(A.u.Container,{onCancel:()=>t(T.default.clearActiveRedemption()),trigger:r=>(0,n.jsx)(x.Db,{"data-css-override":"StyledPrimaryButton",$buttonTheme:"knockout","aria-label":"Click to redeem reward ".concat(e.label," in store"),onClick:r,children:(0,n.jsx)(u.Z,{accessor:"rewards.redeem_in_store_button"})}),children:r=>(0,n.jsx)(el,{id:e.id,type:em.Hx.OFFER,onError:r})})})]}),(0,n.jsx)(z.H,{condition:e.supports_donation,children:(0,n.jsx)(G.qt,{children:(0,n.jsx)($,{donation:{type:"reward",item:e.id},rewardName:e.label})})})]},r)}):(0,n.jsxs)(G.RX,{children:[(0,n.jsx)(eq.Cu,{}),(0,n.jsx)(u.Z,{tag:"h3",accessor:"rewards.no_offers_header",html:!0}),(0,n.jsx)(u.Z,{tag:"p",accessor:"rewards.no_offers_subheader",html:!0})]})})]})},eK=()=>{let{redeemables:e,loyaltyState:r}=(0,o.useSelector)(et.G),t=(0,f.EL)(),i=(0,o.useSelector)(U.F5),s=(0,o.useDispatch)(),l=null==r?void 0:r.points,c=(0,es.gx)(e,[],l);return(null==i?void 0:i.loyalty.program_type)!==em.cI.POINTS_CONVERT_REDEEMABLES?null:(0,n.jsxs)(n.Fragment,{children:[e&&(0,n.jsxs)(G.EE,{children:[(0,n.jsxs)(G.Nc,{children:[(0,n.jsx)(u.Z,{accessor:"rewards.my_rewards_header",html:!0}),"\xa0(",c,")"]}),(0,n.jsx)(u.Z,{tag:"p",accessor:"rewards.my_rewards_subheader",html:!0}),(0,n.jsx)(G.Ot,{})]}),(0,n.jsx)(G.xc,{children:e.map(e=>{var i;let o=e.points_required>(null==r?void 0:r.points),l=(0,P.fB)((0,P.bc)(t,"rewards.rewards_counter"),e.points_required>1);return(0,n.jsxs)(G.i$,{$inactive:o,children:[(0,n.jsxs)(G.r7,{children:[(null===(i=e.image)||void 0===i?void 0:i.url)&&(0,n.jsx)(G.ID,{$inactive:o,children:(0,n.jsx)("img",{src:e.image.url,alt:e.label})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{children:e.label}
1),(0,n.jsxs)("h4",{children:[e.points_required.toLocaleString()," ",l]})]})]}),(0,n.jsx)("div",{children:e.description&&e.description.split("\n").map((e,r)=>(0,n.jsx)(G.Fl,{children:e.trim()},"line-".concat(r)))}),(0,n.jsxs)(G.Z1,{children:[(0,n.jsx)(h,{label:"Rewards - Rewards"}),(0,n.jsx)(a.Z,{checkType:em.Mo.FEATURE,checkName:em.lw.CREATE_REDEMPTION_USING_REDEEMABLE,component:(0,n.jsx)(A.u.Container,{onCancel:()=>s(T.default.clearActiveRedemption()),trigger:r=>(0,n.jsx)(x.Db,{"data-css-override":"StyledPrimaryButton",$buttonTheme:"knockout","aria-label":"Click to redeem reward ".concat(e.label," in store"),onClick:r,children:(0,n.jsx)(u.Z,{accessor:"rewards.redeem_in_store_button"})}),children:r=>(0,n.jsx)(el,{id:e.id,type:em.Hx.REWARD,onError:r})})})]}),(0,n.jsx)(z.H,{condition:e.supports_donation,children:(0,n.jsx)(G.qt,{children:(0,n.jsx)($,{donation:{type:"redeemable",item:e.id.toString()},rewardName:e.label})})})]},e.id)})})]})};var eX=t(96337),eJ=t(95011),eQ=t(62907),e0=t(29652),e3=t(65470),e1=t(16339),e2=t(20051);let e6="rewards-connection-error",e7=new Set([em.TJ,em.hB,em.vL]);var e5=()=>{let{dispatch:e,fetchRewardsHistory:r,fetchRedeemables:t,fetchOffers:o,fetchLoyaltyState:s,fetchRedemptions:l}=(0,e1.U)(),c=(0,N.v9)(e=>e.app.me.loyaltyState),d=(0,N.v9)(e=>e.app.me.loyaltyConnectionError),u=(0,N.v9)(e=>e.app.global.toast);(0,i.useEffect)(()=>{d&&(null==u?void 0:u.display)&&e7.has(u.message)&&e(e3.Z.dismissToast())},[d,null==u?void 0:u.display,null==u?void 0:u.message,e]);let x=()=>{e(r()),e(t()),e(o()),e(s()),e(l())};return(0,i.useEffect)(()=>{(0,e2.nD)()&&x()},[]),(0,n.jsx)(e0.Q,{children:(0,n.jsx)(eJ.Z,{children:c?(0,n.jsxs)(eX.JP,{children:[d&&(0,n.jsx)(eQ.Gz,{variant:"banner","data-testid":e6,onRetry:x}),(0,n.jsx)(a.Z,{checkType:em.Mo.FEATURE,checkName:em.lw.SHOW_LOYALTY_STATE,component:(0,n.jsx)(eM,{})}),(0,n.jsxs)(eX.Qu,{children:[(0,n.jsx)(a.Z,{checkType:em.Mo.FEATURE,checkName:em.lw.INDEX_REDEEMABLES,component:(0,n.jsx)(eK,{})}),(0,n.jsx)(ep,{}),(0,n.jsx)(a.Z,{checkType:em.Mo.FEATURE,checkName:em.lw.INDEX_MY_REWARDS,component:(0,n.jsx)(eV,{})})]}),(0,n.jsx)(eN,{})]}):d?(0,n.jsx)(eQ.Gz,{"data-testid":e6,onRetry:x}):null})})}},83065:function(e,r,t){"use strict";t.d(r,{F:function(){return s}});var n=t(52322),i=t(79807),a=t(23643),o=t(75470);function s(){let{slug:e}=(0,o.v9)(e=>e.app.organization.organization),r=i.P.MODAL_HOW_REWARDS_WORK[e];return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.u.Title,{children:"How Rewards Work"}),(0,n.jsx)(a.u.Content,{children:r&&(0,n.jsx)(r,{})}),(0,n.jsx)(a.u.Footer,{children:(0,n.jsx)(a.u.Cancel,{children:"Close"})})]})}},96337:function(e,r,t){"use strict";t.d(r,{$3:function(){return _},Dk:function(){return p},Gq:function(){return d},JP:function(){return c},Ji:function(){return g},Ll:function(){return x},Mo:function(){return f},Pw:function(){return l},Qu:function(){return o},UN:function(){return j},VX:function(){return h},aN:function(){return a},fb:function(){return u},t9:function(){return s},yt:function(){return m}});var n=t(43580),i=t(36525);let a=n.ZP.div.withConfig({componentId:"sc-3b6e5b93-0"})({display:"flex",flexDirection:"column",gap:"var(--size-3)",paddingTop:"var(--size-3)","@media (min-width: 768px)":{gap:"var(--size-6)",paddingTop:"var(--size-6)"}}),o=n.ZP.div.withConfig({componentId:"sc-3b6e5b93-1"})({margin:"0 auto",maxWidth:"".concat(i._.MAX_LOYALTY_CONTAINER_WIDTH,"px"),padding:"".concat(2*i._.GUTTER,"px 0"),width:"100%"}),s=n.ZP.div.withConfig({componentId:"sc-3b6e5b93-2"})({maxWidth:"".concat(i._.MAX_LOYALTY_CONTAINER_WIDTH,"px"),margin:"".concat(i._.LOYALTY_MENU_HEIGHT_DESKTOP,"px auto 0"),"@media (max-width: 767px)":{marginTop:"".concat(i._.LOYALTY_MENU_HEIGHT_MOBILE,"px")}}),l=n.ZP.div.withConfig({componentId:"sc-3b6e5b93-3"})({display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}),c=n.ZP.div.withConfig({componentId:"sc-3b6e5b93-4"})({marginTop:"".concat(i._.LOYALTY_MENU_HEIGHT_DESKTOP,"px"),"@media (max-width: 767px)":{marginTop:"".concat(i._.LOYALTY_MENU_HEIGHT_MOBILE,"px")}}),d=n.ZP.form.withConfig({componentId:"sc-3b6e5b93-5"})({alignItems:"center",display:"flex",flexDirection:"column",margin:"0 auto",justifyContent:"center",width:"100%"}),u=n.ZP.div.withConfig({componentId:"sc-3b6e5b93-6"})({alignItems:"center",display:"flex",flexWrap:"wrap",justifyContent:"center",width:"100%"}),x=n.ZP.div.withConfig({componentId:"sc-3b6e5b93-7"})(e=>{let{autoHeight:r,theme:t}=e;return{flex:"1 1 33.333%",height:r?"auto":"".concat(t.forms.field_height+i._.GUTTER,"px"),overflow:"hidden",position:"relative","&:not(:first-child)":{paddingLeft:"".concat(i._.GUTTER,"px"),"@media (max-width: 767px)":{paddingLeft:0}},"@media (max-width: 767px)":{flexBasis:"100%"}}}),m=n.ZP.input.withConfig({componentId:"sc-3b6e5b93-8"})({backgroundColor:"#ffffff",borderRadius:"8px",border:"1px solid #e0ded9",height:"48px",marginBottom:"20px",padding:"0 12px",width:"100%",color:"#231f20",fontSize:"16px",fontFamily:"Jost, Arial, Helvetica"}),h=n.ZP.div.withConfig({componentId:"sc-3b6e5b93-9"})({display:"flex",justifyContent:"right",alignSelf:"flex-end","@media (max-width: 767px)":{display:"flex",flexDirection:"column-reverse",width:"100%",margin:0,button:{width:"100%"},"> div:first-child":{margin:"".concat(i._.GUTTER,"px 0 0 0")}}}),p=(0,n.ZP)(h).withConfig({componentId:"sc-3b6e5b93-10"})({position:"relative",top:"-20px","@media (max-width: 767px)":{top:0}}),_=n.ZP.div.withConfig({componentId:"sc-3b6e5b93-11"})({padding:"".concat(i._.GUTTER,"px"),p:{margin:"".concat(i._.GUTTER/4,"px 0"),fontSize:"16px"}}),g=n.ZP.div.withConfig({componentId:"sc-3b6e5b93-12"})({display:"flex",justifyContent:"space-between",alignItems:"center","@media (max-width: 767px)":{display:"block"}}),f=n.ZP.div.withConfig({componentId:"sc-3b6e5b93-13"})({display:"flex",marginRight:"".concat(i._.GUTTER,"px"),alignItems:"center"}),j=n.ZP.button.withConfig({componentId:"sc-3b6e5b93-14"})(e=>{let{$bold:r,theme:t}=e;return{fontFamily:r?t.primary_font.bold.font_family:t.primary_font.regular.font_family,fontSize:"16px",color:t.global.primary_active_color,background:"none",border:"none",cursor:"pointer",padding:0,"&:hover":{opacity:.8}}})}
1,62907:function(e,r,t){"use strict";t.d(r,{Gz:function(){return u}});var n=t(52322),i=t(2784),a=t(53237),o=t(97421),s=t(20496);let l=s.Rj,c=s.om,d=s.Qn;function u(e){let{onRetry:r,variant:t="panel",heading:a=l,message:u,retryLabel:g=s.j6,retryingLabel:f="Trying again…",isRetrying:j=!1,"data-testid":b,retryTestId:w}=e,v=(0,i.useRef)(!1),y=(0,i.useRef)(null),E=(0,i.useCallback)(()=>{v.current=!1,y.current&&(clearTimeout(y.current),y.current=null)},[]);(0,i.useEffect)(()=>{j||E()},[j,E]),(0,i.useEffect)(()=>E,[E]);let R=r?(0,n.jsx)(o.Db,{"data-css-override":"StyledPrimaryButton",type:"button","data-testid":w,size:"banner"===t?"small":void 0,disabled:j,onClick:()=>{!r||j||v.current||(v.current=!0,y.current=setTimeout(E,1e3),r())},children:j?f:g}):null;return"banner"===t?(0,n.jsxs)(p,{role:"alert","data-testid":b,children:[(0,n.jsx)(_,{children:null!=u?u:d}),R]}):(0,n.jsxs)(x,{role:"alert","data-testid":b,children:[(0,n.jsx)(m,{children:a}),(0,n.jsx)(h,{children:null!=u?u:c}),R]})}let x=(0,a.zo)("div",{display:"flex",flexDirection:"column",alignItems:"center",gap:"$4",padding:"$14",textAlign:"center"}),m=(0,a.zo)("h2",{fontSize:"$text400",fontWeight:"bold",textAlign:"center",margin:0}),h=(0,a.zo)("p",{fontSize:"$text200",textAlign:"center",margin:0}),p=(0,a.zo)("div",{display:"flex",flexDirection:"column",gap:"8px",padding:"12px 16px",marginBottom:"16px",border:"1px solid var(--connection-error__border-color, #d93025)",borderRadius:"4px",backgroundColor:"var(--connection-error__background-color, #fdecea)",color:"var(--connection-error__color, #5f1414)","@sm":{flexDirection:"row",alignItems:"center",justifyContent:"center"}}),_=(0,a.zo)("p",{margin:"0 !important",fontSize:"14px",lineHeight:"20px",whiteSpace:"pre-line",paddingRight:"12px",paddingLeft:"12px"})},16339:function(e,r,t){"use strict";t.d(r,{U:function(){return a}});var n=t(75470),i=t(15066);let a=()=>({dispatch:(0,n.I0)(),...i.default})}},function(e){e.O(0,[688,462,553,270,593,620,807,11,999,888,774,179],function(){return e(e.s=63312)}),_N_E=e.O()}]);
2//# sourceMappingURL=rewards-fa1c65afe01a044f.js.map

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.