PageSourceSearch

https://www.hellofresh.com/_next/static/chunks/59754-561dd1dd7387d509.js

js hellofresh.com collected 2026-09-24 09:14:20 UTC 44,831 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[59754],{852797:function(e,t,r){r.d(t,{d:function(){return p}});var n,o=r(456552),l=r(671718),i=r(447178),a=r(699219),c=r(140224);function u(e,t,r,n,o,l,i){try{var a=e[l](i),c=a.value}catch(e){r(e);return}a.done?t(c):Promise.resolve(c).then(n,o)}function s(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var l=e.apply(t,r);function i(e){u(l,n,o,i,a,"next",e)}function a(e){u(l,n,o,i,a,"throw",e)}i(void 0)})}}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function f(e,t){var r,n,o,l,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return l={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function a(l){return function(a){return function(l){if(r)throw TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,n=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,a])}}}var h=(n=s(function(e,t){var r,n,o,i,a,c,u=arguments;return f(this,function(s){switch(s.label){case 0:return r=e.enrollment_id,n=e.milestones,o=e.systemCountry,i=e.locale,a=e.parentSpan,[4,(u.length>2&&void 0!==u[2]?u[2]:l.Z)("/loyalty/rewards",t,{method:"POST",data:{enrollment_id:r,milestones:n},query:{country:o,locale:i},parentSpan:a,fetchSpanAttributes:{"request.backend_service":"customer-achievements-service","request.backend_action":"activate-reward"}})];case 1:return[2,null==(c=s.sent())?void 0:c.json()]}})}),function(e,t){return n.apply(this,arguments)}),p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,i.Z)().fetch,r=(0,o.useQueryClient)(),n=(0,c.O)(),l=[a.Z["customer-achievements.rewards"]];return(0,o.useMutation)(function(e){return h(d({},n,e),l,t)},d({onSuccess:function(){setTimeout(s(function(){return f(this,function(e){switch(e.label){case 0:return[4,r.invalidateQueries(a.Z["customer-achievements.enrollments"])];case 1:return e.sent(),[2]}})}),300)},retry:!1},e))}},488694:function(e,t,r){r.d(t,{Z:function(){return eK}});var n,o,l,i,a,c=r(687800),u=r(827378),s=r(203666),d=r(768587),f=r(313954),h=r(631540),p=r(184883),y=r(204912),m=r(399649),v=r(164528),g=r(519193),b=r.n(g),w=r(537691),O=r(963847),C=r(318066),x=r(268481),Z=function(e){var t=e.isLocked,r=e.info,n=e.title,o=e.description;return(0,c.BX)(d.xu,{display:"flex",flexDirection:"column",height:t?"100%":"auto",children:[(0,c.tZ)(d.xu,{display:"flex",flexDirection:"column",pt:"xs",pb:"xxs",maxWidth:"80%",children:(0,c.tZ)(d.xv,{as:"h4",children:n})}),(0,c.tZ)(d.xu,{py:"xxs",wordWrap:"break-word",width:"245px",children:(0,c.tZ)(d.xv,{type:"body-sm-regular",children:o})}),r&&(0,c.tZ)(d.xu,{pt:"sm-1",mt:"auto","data-test-id":"reward-card-info",children:(0,c.BX)(d.xu,{color:"neutral.600",display:"flex",alignItems:"center",gap:"xxs",children:[null==r?void 0:r.icon,(0,c.tZ)(d.xv,{type:"body-sm-regular",color:"neutral.600",children:null==r?void 0:r.text})]})})]})},P=function(e){var t=e.text,r=e.color,n=e.backgroundColor,o=e.isFaded;return(0,c.tZ)(d.xu,{display:"flex",paddingLeft:"xs",paddingTop:"xxs",paddingRight:"xs",paddingBottom:"xxs",alignItems:"center",width:"fit-content",justifyContent:"center",borderRadius:"border-radius-lg",backgroundColor:n,"aria-disabled":o,children:(0,c.tZ)(d.xv,{type:"body-sm-bold",color:r,children:t})})},A=function(e){var t=e.primaryCTALabel,r=e.onPrimaryCTAClick,n=e.isPrimaryCTALoading,o=e.isPrimaryCTADisabled,l=e.detailsCTALabel,i=e.onDetailsCTAClick;return(0,c.BX)(d.xu,{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between",children:[l&&(0,c.tZ)(d.xu,{flex:"1",mr:"xxs",children:(0,c.tZ)(d.zx.Secondary,{size:"sm",onClick:i,disabled:o,"data-test-id":"reward-card-detail
1s-cta",children:l})}),t&&(0,c.tZ)(d.zx.Primary,{size:"sm",onClick:r,loading:n,disabled:o,"data-test-id":"reward-card-primary-cta",children:t})]})},S=r(739126),k=function(e){var t=e.info,r=e.title,n=e.label,o=e.testId,l=e.isLocked,i=e.isExpired,a=e.labelColor,u=e.description,s=e.rewardImageName,f=e.primaryCTALabel,h=e.onPrimaryCTAClick,p=e.isPrimaryCTALoading,y=e.isPrimaryCTADisabled,m=e.labelBackgroundColor,v="mobile"===(0,x.Sj)()?.85:1,g=(0,S.f3)();return(0,c.tZ)(d.xu,{height:"100%","data-test-id":o,width:["100%","100%","360px"],opacity:i?"40%":"100%",children:(0,c.BX)(d.xu,{flex:"1",px:"sm-2",py:"md-1",flexGrow:"1",display:"flex",height:"inherit",overflow:"hidden",position:"relative",alignSelf:"stretch",boxShadow:"shadow-md",flexDirection:"column",backgroundColor:"neutral.100",borderRadius:"border-radius-md",children:[(0,c.tZ)(d.xu,{top:"0",overflow:"hidden",position:"absolute",right:["0","0%","0"],children:(0,c.tZ)(C.ZP,{fetchFormat:"png",role:"presentation","data-test-id":s,width:344*v,height:188*v,alt:s||"reward-card-image",src:"".concat(g.rewardCard.images.topRightBasePath).concat("","/").concat(s)})}),(0,c.BX)(d.xu,{zIndex:1,height:"100%",display:"flex",alignItems:"stretch",flexDirection:"column",justifyContent:"space-between",children:[(0,c.tZ)(d.xu,{mb:"xs",children:(0,c.tZ)(P,{text:n,color:a,backgroundColor:m,isFaded:l||i})}),(0,c.tZ)(d.xu,{height:"100%",display:"flex",position:"relative",flexDirection:"column",children:(0,c.tZ)(Z,{info:t,title:r,isLocked:l,description:u})}),f&&(0,c.tZ)(d.xu,{display:"flex",pt:"md-1",flexDirection:"row",children:(0,c.tZ)(A,{primaryCTALabel:f,onPrimaryCTAClick:h,isPrimaryCTALoading:p,isPrimaryCTADisabled:i||l||y})})]})]})})},j=r(37017),_=r(563522),E=r.n(_),I=r(958042),T=r(295332),B=r(384949),D=r(591329),R=r(320898),N=r(852797),M=r(887824);function L(){return(L=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function X(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}var J=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return z({element:"rewardCard",event:"gaEventTrigger",user_action:"clickChoose",gaEventAction:"rewardCard|clickChoose",event_name:"Achievements_ChallengeAchievementClick"},L({},X(e)))},F=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return z({element:"rewardCard",event:"gaEventTrigger",user_action:"clickActivateNow",gaEventAction:"rewardCard|clickActivateNow",event_name:"Achievements_ChallengeAchievementClick"},L({},X(e)))},V=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return z({event:"gaEventTrigger",user_action:"clickSelectAddon",element:"rewardActivationSuccess",event_name:"Achievements_ChallengeAchievementClick",gaEventAction:"rewardActivationSuccess|clickSelectAddon"},L({},X(e)))},G=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return z({event:"gaEventTrigger",element:"choiceSuccessful",user_action:"clickSelectItems",event_name:"Achievements_ChallengePageClick",gaEventAction:"rewardActivationSuccess|clickSelectAddon"},L({},X(e)))},H=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return z({event:"gaEventTrigger",element:"rewardCard",user_action:"clickSelectPremiumMeals",gaEventAction:"rewardCard|clickSelectPremiumMeals"},L({},X(e)))},U=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return z({event:"gaEventTrigger",element:"rewardCard",user_action:"clickSelectSubscription",gaEventAction:"rewardCard|clickSelectSubscirption",event_name:"Achievements_ChallengeAchievementClick"},L({},X(e)))},W=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return z({event:"gaEventTrigger",user_action:"clickSelectSubscription",element:"rewardActivationSuccess",event_name:"Achievements_ChallengeAchievementClick",gaEventAction:"rewardActivationSuccess|clickSelectSubscription"},L({},X(e)))},Y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return z({event:"gaEventTrigger",element:"rewardCard",user_action:"clickSelectMarketItems",gaEventAction:"rewardCard|clickSelectMarketItems",event_name:"Achievements_ChallengeAchievementClick"},L({},X(e)))},q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return z({event:"gaEventTrigger",user_action:"clickSelectItems",element:"rewardActivationSuccess",event_name:"Achievements_ChallengeAchievementClick",gaEventAction:"rewardActivationSuccess|clickSelectItems"},L({},X(e)))},$=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return z({event:"gaEventTrigger",user_action:"clickSelectPremiumMeals",element:"rewardActivationSuccess",event_name:"Achievements_ChallengeAchievementClick",gaEventAction:"rewardActivationSuccess|rewardActivationSuccess"},L({},X(e)))},K=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return z({event:"gaEventTrigger",gaEventAction:"rewardActivateGenericError|display",user_action:"display",element:"rewardActivateGenericError"},L({},X(e)))},Q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return z({event:"gaEventTrigger",gaEventAction:"rewardActivateConflictError|display",user_action:"display",element:"rewardActivateConflictError"},L({},X(e)))},ee=r(500005),et=r(732526),er=r.n(et),en=function(e){var t={};for(var r in e)t[er()(r)]=e[r];return t}
1,eo=r(705833),el=function(e){var t=e.svgName;return(0,c.tZ)(C.ZP,{alt:"",width:"104",height:"104",fetchFormat:"svg",role:"presentation",src:"/hellofresh_website/loyalty-program/images/reward/".concat(t)})},ei=function(e){var t=e.title,r=e.testId,n=e.isOpen,o=e.onClose,l=e.children,i=e.iconName,a=e.setIsOpen,s=e.primaryButtonText,f=e.onClickPrimaryButton,h=function(){null==o||o(),null==a||a(!1)};return(0,c.tZ)(d.xu,{"data-test-id":r,children:(0,c.tZ)(d.Vq,{headerText:"",isOpen:n,onClose:h,width:["90vw","556px"],onDismiss:h,onConfirm:h,returnFocusRef:u.useRef(null),children:(0,c.BX)(c.HY,{children:[(0,c.BX)(d.xu,{position:"relative",children:[(0,c.BX)(d.xu,{display:"flex",flexDirection:"column",alignItems:"center",children:[(0,c.tZ)(d.xu,{children:(0,c.tZ)(el,{svgName:i})}),(0,c.tZ)(d.xu,{textAlign:"center",mt:"sm-1",children:t})]}),(0,c.tZ)(d.xu,{mt:"sm-2",children:l})]}),(0,c.tZ)(d.xu,{mt:"md-1",children:(0,c.tZ)(d.zx.Primary,{onClick:f,children:s})})]})})})},ea=function(e){var t=e.title;return(0,c.tZ)(d.xv,{as:"h4",children:t})};function ec(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function eu(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(n=o||(o={})).error="reward-error",n.conflictError="reward-conflict-error",n.autoActivationError="reward-auto-activation-error",n.marketItemsAddon="market-items-addon",n.premiumMealsSurcharge="premium-meals-surcharge",n.subscritionVoucher="subscription-voucher";var es=(0,u.createContext)({openRewardModal:function(){return null},closeRewardModal:function(){return null}}),ed=(eu(l={},"reward-error",function(e){var t=e.testId,r=e.isOpen,n=e.onClose,o=e.setIsOpen,l=e.onClickPrimaryButton,i=(0,v.ZP)("loyalty-challenge"),a=i.translate,u=i.translateRaw;return(0,c.tZ)(ei,{testId:t,isOpen:r,onClose:n,setIsOpen:o,iconName:"warm-error.svg",primaryButtonText:u("loyaltyChallenge.achievementsDialog.activateRewardAction.error.voucherOverlap.confirmationButton"),onClickPrimaryButton:function(){null==n||n(),null==l||l()},title:(0,c.tZ)(ea,{title:u("loyaltyChallenge.achievementsDialog.activateRewardAction.error.title")}),children:(0,c.tZ)(d.xv,{children:a("loyaltyChallenge.achievementsDialog.activateRewardAction.error.description")})})}),eu(l,"reward-conflict-error",function(e){var t=e.isOpen,r=e.testId,n=e.onClose,o=e.setIsOpen,l=e.onClickPrimaryButton,i=(0,v.ZP)("loyalty-challenge"),a=i.translate,u=i.translateRaw;return(0,c.tZ)(ei,{testId:r,isOpen:t,onClose:n,setIsOpen:o,primaryButtonText:u("loyaltyChallenge.achievementsDialog.activateRewardAction.error.voucherOverlap.confirmationButton"),iconName:"voucher_warning.svg",onClickPrimaryButton:function(){null==n||n(),null==l||l()},title:(0,c.tZ)(ea,{title:u("loyaltyChallenge.achievementsDialog.activateRewardAction.error.voucherOverlap.title")}),children:(0,c.tZ)(d.xv,{children:a("loyaltyChallenge.achievementsDialog.activateRewardAction.error.voucherOverlap")})})}),eu(l,"market-items-addon",function(e){var t,r=e.testId,n=e.isOpen,o=e.onClose,l=e.setIsOpen,i=e.onClickPrimaryButton,a=e.reward,u=(0,eo.C)().goToAddonMenuEdit,s=(0,v.ZP)("loyalty-challenge").translateRaw,f=(null==a?void 0:null===(t=a.translation_keys)||void 0===t?void 0:t.reward_activated_description)||"";return(0,c.tZ)(ei,{testId:r,isOpen:n,onClose:o,setIsOpen:l,iconName:"trophy_celebration.svg",onClickPrimaryButton:function(){null==i||i(),u()},primaryButtonText:s("loyaltyChallenge.achievementsDialog.activateRewardAction.addon.cta"),title:(0,c.tZ)(ea,{title:s("loyaltyChallenge.achievementsDialog.activateRewardAction.title")}),children:(0,c.tZ)(d.xv,{type:"body-md-regular",textAlign:"left",dangerouslySetInnerHTML:{__html:s(f)}})})}),eu(l,"premium-meals-surcharge",function(e){var t,r=e.testId,n=e.isOpen,o=e.onClose,l=e.setIsOpen,i=e.onClickPrimaryButton,a=e.reward,u=(0,eo.C)().goToMealsMenuEdit,s=(0,v.ZP)("loyalty-challenge").translateRaw,f=(null==a?void 0:null===(t=a.translation_keys)||void 0===t?void 0:t.reward_activated_description)||"";return(0,c.tZ)(ei,{testId:r,isOpen:n,onClose:o,setIsOpen:l,iconName:"trophy_celebration.svg",primaryButtonText:s("loyaltyChallenge.achievementsDialog.activateRewardAction.surcharge.cta"),onClickPrimaryButton:function(){null==i||i(),u()},title:(0,c.tZ)(ea,{title:s("loyaltyChallenge.achievementsDialog.activateRewardAction.title")}),children:(0,c.tZ)(d.xv,{type:"body-md-regular",textAlign:"left",dangerouslySetInnerHTML:{__html:s(f)}})})}),eu(l,"subscription-voucher",function(e){var t,r=e.testId,n=e.isOpen,o=e.onClose,l=e.setIsOpen,i=e.onClickPrimaryButton,a=e.reward,u=(0,eo.C)().goToMealsMenuEdit,s=(0,v.ZP)("loyalty-challenge").translateRaw,f=(null==a?void 0:null===(t=a.translation_keys)||void 0===t?void 0:t.reward_activated_description)||"";return(0,c.tZ)(ei,{testId:r,isOpen:n,onClose:o,setIsOpen:l,iconName:"trophy_celebration.svg",primaryButtonText:s("loyaltyChallenge.achievementsDialog.activateRewardAction.subscription.cta"),onClickPrimaryButton:function(){null==i||i(),u()},title:(0,c.tZ)(ea,{title:s("loyaltyChallenge.achievementsDialog.subscription.title")}),children:(0,c.tZ)(d.xv,{type:"body-md-regular",textAlign:"left",dangerouslySetInnerHTML:{__html:s(f)}})})}),eu(l,"reward-auto-activation-error",function(e){var t=e.isOpen,r=e.testId,n=e.onClose,o=e.setIsOpen,l=e.onClickPrimaryButton,i=(0,v.ZP)("loyalty-challenge"),a=i.translate,u=i.translateRaw;return(0,c.tZ)(ei,{testId:r,isOpen:t,onClose:n,setIsOpen:o,primaryButtonText:u("loyaltyChallenge.achievementsDialog.activateRewardAction.error.voucherOverlap.confirmationButton"),iconName:"warm-error.svg",onClickPrimaryButton:function(){null==n||n(),null==l||l()},title:(0,c.tZ)(ea,{title:u("loyaltyChallenge.optin.error.title")}),children:(0,c.tZ)(d.xu,{textAlign:"center",children:(0,c.tZ)(d.xv,{children:a("loyaltyChallenge.optIn.automaticRewardActivationError.description")})})})}),l),ef=function(e){var t,r=e.children,n=function(e){if(Array.isArray(e))return e}(t=(0,u.useState)({}))||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var l=[],i=!0,a=!1;try{for(o=o.call(e);!(i=(r=o.next()).done)&&(l.push(r.value),2!==l.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==o.return||o.return()}finally{if(a)throw n}}return l}}(t,2)||function(e,t){if(e){if("string"==typeof e)return ec(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ec(e,2)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=n[0],l=n[1],i=ed[null==o?void 0:o.modal]||function(){return null},a=function(){return l({})};return(0,c.BX)(es.Provider,{value:{openRewardModal:function(e){return l(e)},closeRewardModal:a},children:[r,(0,c.tZ)(i,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){eu(e,t,r[t])})}return e}({testId:null==o?void 0:o.modal,isOpen:!!(null==o?void 0:o.modal),onClose:a},(null==o?void 0:o.modalProps)||{}))]})},eh=function(){return(0,u.useContext)(es)};function ep(e,t,r,n,o,l,i){try{var a=e[l](i),c=a.value}catch(e){r(e);return}a.done?t(c):Promise.resolve(c).then(n,o)}var ey=function(e){var t,r,n=e.reward,l=e.challenge,i=e.milestone,a=e.rewardTitle,c=e.rewardStepNumber,s=e.isConceptOfChoice,d=e.conceptOfChoice,f=e.onRewardClaim,h=(0,M.Z)(),p=h.push,y=h.pushAfterPageTransition,v=eh().openRewardModal,g=(0,ee.B)({reward:n,rewardStepNumber:c,milestoneStep:i}),b=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({reward_name:a},en(void 0===d?{}:d),g),w=(0,eo.C)(),O=w.goToMealsMenuEdit,C=w.goToAddonMenuEdit,x=w.goToSurchargeMenuEdit,Z=(0,N.d)(),P=Z.isError,A=Z.isSuccess,S=Z.isLoading,k=Z.mutate,j=Z.error,_=n.voucher_type===m.VZ.Surcharge,E=n.voucher_type===m.VZ.Addon,I=n.voucher_type===m.VZ.Subscription,T=(null==n?void 0:n.action)===m.SR.Redeem;return(0,u.useEffect)(function(){if(P){var e;return 409===(null==j?void 0:null===(e=j.response)||void 0===e?void 0:e.status)?(p(Q(b)),v({modal:o.conflictError,modalProps:{reward:n}})):(p(K(b)),v({modal:o.error,modalProps:{reward:n}}))}if(A){var t=function(){return s?y(V(b)):E?y(q(b)):I?y(W(b)):y($(b))};if(_)return v({modalProps:{reward:n,onClickPrimaryButton:t},modal:o.premiumMealsSurcharge});if(E)return v({modalProps:{reward:n,onClickPrimaryButton:t},modal:o.marketItemsAddon});if(I)return v({modalProps:{reward:n,onClickPrimaryButton:t},modal:o.subscritionVoucher})}},[P,A]),{isLoading:S,claimReward:(t=function(){var e,t;return function(e,t){var r,n,o,l,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return l={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function a(l){return function(a){return function(l){if(r)throw TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,n=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,a])}}}(this,function(r){switch(r.label){case 0:if(e=(null==n?void 0:n.voucher_type)===m.VZ.Addon,t=(null==n?void 0:n.voucher_type)===m.VZ.Surcharge,T){if(p((s?G:e?Y:I?U:H)(b)),f)return[2,f({isAddon:e,isSurcharge:t})];if(e)return[2,C()];if(t)return[2,x()];return[2,O()]}return p(s?J(b):F(b)),[4,k({enrollment_id:l.enrollment_id,milestones:[{id:i.milestone_id,rewards:[n.id]}]})];case 1:return r.sent(),[2]}})},r=function(){var e=this,r=arguments;return new Promise(function(n,o){var l=t.apply(e,r);function i(e){ep(l,n,o,i,a,"next",e)}function a(e){ep(l,n,o,i,a,"throw",e)}i(void 0)})},function(){return r.apply(this,arguments)})}};function em(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ev="0001-01-01T00:00:00+0000",eg=(em(i={}
1,m.Jl.Sent,{labelColor:"#AA097D",labelBackgroundColor:"#F8ECF2"}),em(i,m.Jl.Redeemed,{labelColor:"#AA097D",labelBackgroundColor:"#F8ECF2"}),em(i,m.Jl.Unlocked,{labelColor:"global.orange.700",labelBackgroundColor:"global.orange.100"}),em(i,m.Jl.Locked,{labelColor:"neutral.700",labelBackgroundColor:"neutral.300"}),em(i,m.Jl.Expired,{labelColor:"neutral.700",labelBackgroundColor:"neutral.300"}),em(i,m.Jl.Cancelled,{labelColor:"neutral.700",labelBackgroundColor:"neutral.300"}),em(i,m.Jl.Activated,{labelColor:"#AA097D",labelBackgroundColor:"#F8ECF2"}),i),eb=(0,j.cn)([]),ew=r(527157),eO=r(543790),eC=r(331227),ex=r(882493);function eZ(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function eP(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eA(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){eP(e,t,r[t])})}return e}function eS(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var ek=(eP(a={},m.E4.Gift,"surprise-gift.png"),eP(a,m.E4.Offer,"surprise-gift.png"),eP(a,m.VZ.Addon,"market-addons.png"),eP(a,m.VZ.Surcharge,"meals-surcharge.png"),eP(a,m.VZ.Subscription,"subscription-voucher.png"),eP(a,m.VZ.Delivery,"delivery.png"),a),ej=function(e){if(!e)return 0;var t,r=null==e?void 0:null===(t=e.milestone_steps)||void 0===t?void 0:t.find(function(t){return t>e.progress}),n=r?r-e.progress:0;return n>=0?n:0},e_=function(e){var t,r=e.milestone,n=e.conceptOfChoice,o=e.currentProgress,l=e.rewardStepNumber,i=e.isConceptOfChoice,a=e.reward,u=(0,I.Z)(),s=(0,w.L)(),d=(0,v.ZP)("loyalty-challenge"),f=d.translate,h=d.translateRaw,p=a||(0,O.Xp)(r),y=null==p?void 0:p.translation_keys,g=y.reward_locked_info,b=y.reward_available_cta,C=y.reward_info_description_header,x=y.reward_ticket_description_locked,Z=y.reward_ticket_description_unlocked,P=ej(s),A=function(e){return f(e,{boxNumber:l})},S=A(C),k=(0,ew.Z)()===eO.Z.hellofresh,_=(0,eC.Z)()===ex.m.WhiteLabelMealKits,N=(0,eo.C)().gotoBrowseByCategoriesPage,M=function(e){var t=e.isAddon,r=e.isSurcharge;return t?N({category:"market",subCategory:""}):r?N({category:"dinners",subCategory:"dinners-specials"}):N({category:"dinners",subCategory:""})},L=ey({reward:p,challenge:s,milestone:r,conceptOfChoice:n,rewardStepNumber:l,isConceptOfChoice:i,onRewardClaim:function(){if(k||_)return M}(),rewardTitle:h(C,{boxNumber:l})}),X=L.claimReward,z=L.isLoading,J=(function(e){if(Array.isArray(e))return e}(t=(0,j.KO)(eb))||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var l=[],i=!0,a=!1;try{for(o=o.call(e);!(i=(r=o.next()).done)&&(l.push(r.value),1!==l.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==o.return||o.return()}finally{if(a)throw n}}return l}}(t,1)||function(e,t){if(e){if("string"==typeof e)return eZ(e,1);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eZ(e,1)}}(t,1)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],F=(null==p?void 0:p.action)===m.SR.Redeem,V=(0,O.Gg)(p),G=l>o||p.state===m.Jl.Locked,H=p.type===m.E4.Gift,U=null==p?void 0:p.action_deadline,W=U!==ev&&U&&E()(Date.now(),U),Y=p.state===m.Jl.Expired||W,q=p.state===m.Jl.Redeemed,$=!U||U===ev,K=J.includes(p.id),Q=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:U;return f(e,{date:(0,T.Z)(t,B.Si[u].DATE_FORMAT_FULL)})},ee=Q("loyaltyChallenge.hub.reward.".concat(null==p?void 0:p.state,".info")),et=Q("loyaltyChallenge.hub.conceptOfChoice.reward.unlocked.info"),er=ek[p.type]||ek[p.voucher_type],en=H&&o<l?m.Jl.Locked:null==p?void 0:p.state,el=eS(eA({testId:"reward.".concat(V),rewardImageName:er},eg[en]||{}),{title:S,isPrimaryCTADisabled:K,label:f("loyaltyChallenge.hub.".concat(en,".label")),description:A(Z),info:!H&&!$&&{icon:(0,c.tZ)(D.Z,{}),text:i?et:ee}});if(Y)return eS(eA({},el),{isExpired:Y});if(G)return eS(eA({},el),{isLocked:G,description:A(x),info:{icon:(0,c.tZ)(R.Z,{}),text:g?i?f(g,{step:l}):f(g,{remaining:P}):""}});if(H)return el;if(q)return eS(eA({},el),{testId:"redeemed-reward"});var ei=(null==p?void 0:p.action)===m.SR.None?void 0:F?b&&f(b)||"Select Items":i?f("loyaltyChallenge.hub.conceptOfChoice.rewardCta"):f("loyaltyChallenge.claimableReward.cta");return eS(eA({},el),{primaryCTALabel:ei,onPrimaryCTAClick:X,isPrimaryCTALoading:z,isPrimaryCTADisabled:K})},eE=function(e){var t=e_({reward:e.reward,milestone:e.milestone,conceptOfChoice:e.conceptOfChoice,currentProgress:e.currentProgress,rewardStepNumber:e.rewardStepNumber,isConceptOfChoice:e.isConceptOfChoice});return(0,c.tZ)(k,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},t))},eI=function(){return(0,c.tZ)("span",{"data-test-id":"loyalty-program-reward-card-error"})},eT=function(e){return(0,c.tZ)(p.Z,{fallback:eI,scope:"loyalty-program-hub.reward-card-error",children:(0,c.tZ)(f.Z,{componentName:"loyalty-program-hub.reward-card",children:(0,c.tZ)(eE,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},e))})})},eB=function(e){var t=e.rewardState,r=(0,M.Z)().pushAfterPageTransition,n=(0,v.ZP)("loyalty-challenge").translate,o=(0,eo.C)().goToAddonMenuEdit;return t!==m.Jl.Activated?null:(0,c.tZ)(d.xu,{my:"lg-1","data-test-id":"loyalty-challenge.conceptOfChoice.claimedSection",display:"flex",justifyContent:"center",px:"sm-1",width:"100%",children:(0,c.tZ)(d.xu,{"data-test-id":"loyalty-challenge.conceptOfChoice.rewardAvailableCard",width:"100%",maxWidth:"300px",children:(0,c.tZ)(d.zx.Primary,{size:"sm",onClick:function(){r({element:"choiceSuccessful",user_action:"clickSelectItems",event_name:"Achievements_ChallengePageClick",gaEventAction:"choiceSuccessful|clickSelectItems"}),o()},"data-test-id":"loyalty-challenge.conceptOfChoice.claimedCTA",children:n("loyalty-challenge.conceptOfChoice.rewardAvailableCTA")})})})},eD=r(807947),eR=function(){var e,t=(0,w.L)(),r=(null==t?void 0:null===(e=t.challenge_steps)||void 0===e?void 0:e["step_".concat(null==t?void 0:t.milestone_steps[0])]).rewards[0].state,n=t.state===m.RP.Incomplete||r===m.Jl.Cancelled?m.Jl.Expired:r;return(0,c.tZ)(d.xu,{children:(0,c.tZ)(eD.Z,{group:"loyalty-challenge",applangaKey:"loyaltyChallenge.hub.conceptOfChoice.rewards.subtitle.".concat(n),render:function(e){return e&&(0,c.tZ)(d.xu,{my:"sm-2",children:(0,c.tZ)(d.xv,{as:"h4",children:e})})}})})},eN=r(186133);function eM(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var eL=function(e){var t=null==e?void 0:e.feature_flags.automatic_reward_claim,r=(0,O.jX)(e);return!!t&&r.some(function(e){var t,r=(function(e){if(Array.isArray(e))return e}(t=e.rewards)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var l=[],i=!0,a=!1;try{for(o=o.call(e);!(i=(r=o.next()).done)&&(l.push(r.value),1!==l.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==o.return||o.return()}finally{if(a)throw n}}return l}}(t,1)||function(e,t){if(e){if("string"==typeof e)return eM(e,1);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eM(e,1)}}(t,1)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];return(null==r?void 0:r.state)===m.Jl.Unlocked})};function eX(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var ez=function(){var e,t,r=(0,w.L)(),n=(0,O.mY)(r),l=(0,eN._7)(),i=(0,eN._h)(),a=i.isChooseRewardClaimed,s=i.chooseRewardState,h=(null==n?void 0:n.length)>3,p=(0,O.NX)(r),y=null==n?void 0:n[0],m=null==y?void 0:null===(t=y.step)||void 0===t?void 0:t.rewards,v=function(e){if(Array.isArray(e))return e}(e=(0,u.useState)([]))||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var l=[],i=!0,a=!1;try{for(o=o.call(e);!(i=(r=o.next()).done)&&(l.push(r.value),2!==l.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==o.return||o.return()}finally{if(a)throw n}}return l}}(e,2)||function(e,t){if(e){if("string"==typeof e)return eX(e,2);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eX(e,2)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),g=v[0],C=v[1],x=eh().openRewardModal,Z=eL(r);return((0,u.useEffect)(function(){C(b()((0,eN.mA)(m[0]))),Z&&x({modal:o.autoActivationError})},[Z]),(null==n?void 0:n.length)<1)?null:(0,c.BX)(f.Z,{componentName:"loyalty-program-hub.choose-reward-list-main",children:[l&&(0,c.tZ)(eR,{}),l&&a?(0,c.tZ)(eB,{rewardState:s}):(0,c.tZ)(d.xu,{mt:"sm-2",display:"flex",textAlign:"left","data-test-id":"reward-list",flexDirection:["column","row"],flexWrap:h?"wrap":"nowrap",alignItems:["stretch",h?"center":"stretch"],children:l?(0,c.tZ)(f.Z,{componentName:"loyalty-program-hub.choose-reward-cards",children:null==g?void 0:g.map(function(e,t){return(0,c.tZ)(c.HY,{children:(0,c.tZ)(d.xu,{padding:"xxs",flexGrow:1,flexBasis:0,flex:[1,1,h?"0 0 40%":1],"data-test-id":"choose-reward-item-".concat(null==e?void 0:e.id),children:(0,c.tZ)(eT,{reward:e,isConceptOfChoice:!0,currentProgress:null==r?void 0:r.progress,milestone:null==y?void 0:y.step,rewardStepNumber:null==y?void 0:y.stepNumber,conceptOfChoice:{choiceOrder:t+1,choiceNumber:null==e?void 0:e.choiceNumber}})},"".concat(null==y?void 0:y.stepNumber,"-").concat(null==e?void 0:e.id,"_").concat(t))})})}):p?(0,c.tZ)(f.Z,{componentName:"loyalty-program-hub.choose-reward-cards",children:null==m?void 0:m.map(function(e){return(0,c.tZ)(d.xu,{padding:"xxs",flexGrow:1,flexBasis:0,flex:[1,1,h?"0 0 40%":1],"data-test-id":"choose-reward-item-".concat(null==e?void 0:e.id),children:(0,c.tZ)(eT,{reward:e,currentProgress:null==r?void 0:r.progress,milestone:null==y?void 0:y.step,rewardStepNumber:null==y?void 0:y.stepNumber})},"".concat(null==y?void 0:y.stepNumber,"-").concat(null==e?void 0:e.id))})}):(0,c.tZ)(f.Z,{componentName:"loyalty-program-hub.reward-cards",children:(0,c.tZ)(d.xu,{display:"flex",flexDirection:["column","column","row"],children:null==n?void 0:n.map(function(e){var t=e.step,n=e.stepNumber;return(0,c.tZ)(d.xu,{padding:"xxs",flexGrow:1,flexBasis:0,"data-test-id":"reward-item-".concat(n),flex:[1,1,h?"0 0 40%":1],children:(0,c.tZ)(eT,{milestone:t,rewardStepNumber:n,currentProgress:null==r?void 0:r.progress})},n)})})})})]})},eJ=function(){return(0,c.tZ)("span",{"data-test-id":"loyalty-program-reward-list-error"})},eF=function(){return(0,c.tZ)(p.Z,{fallback:eJ,scope:"loyalty-program-hub.reward-list-error",children:(0,c.tZ)(f.Z,{componentName:"loyalty-program-hub.reward-list",children:(0,c.tZ)(ez,{})})})},eV=function(e){var t=e.titleSize,r=(0,v.ZP)("loyalty-challenge").translate;return(0,c.tZ)(d.xu,{display:"flex",justifyContent:"center",children:"small"===t?(0,c.tZ)(d.xu,{fontSize:["headline-md-desktop","headline-lg-desktop"],textAlign:"center",children:r("loyaltyChallenge.achievements.yourRewards")}):(0,c.tZ)(d.xv,{as:"h2",children:r("loyaltyChallenge.achievements.yourRewards")})})},eG=function(e){return(0,c.tZ)(ef,{children:(0,c.BX)(d.xu,{display:"flex",justifyContent:"center",flexDirection:"column",children:[(0,c.tZ)(eV,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},e)),(0,c.tZ)(eF,{})]})})},eH={event:"gaEventTrigger",event_name:"Achievements_ChallengeAchievementClick",gaEventCategory:"loyaltyChallenge",gaEventAction:"achievements|clickEarnRewards",user_action:"clickEarnRewards"},eU=function(){var e=(0,v.ZP)("loyalty-challenge").translate,t=(0,M.Z)().push;return(0,c.tZ)(d.rU,{href:"/referrals",noStyle:!0,onClick:function(){return t(eH)},children:(0,c.tZ)(d.xu,{bg:"neutral.100",borderRadius:"border-radius-sm",maxWidth:"556px",px:["sm-1","md-1"],py:["sm-1","md-3"],mt:"md-1",backgroundSize:"cover",backgroundPosition:"100% 100%",backgroundImage:"url('https://cdn.hellofresh.com/us/cms/ER/lc-onboarding-background-left.svg')","data-test-id":"loyalty-program.achievements.benef
1its-section",backgroundRepeat:"no-repeat",children:(0,c.BX)(d.xu,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,c.BX)(d.xu,{ml:"sm-2",mt:"sm-2",textAlign:"left",children:[(0,c.tZ)(d.xv,{mb:"sm-1",as:"h4",children:e("loyaltyChallenge.hub.referCard.title")}),(0,c.tZ)(d.xv,{as:"p",mb:"sm-2",children:e("loyaltyChallenge.hub.referCard.description")})]}),(0,c.tZ)(d.xu,{flexShrink:0,ml:["sm-1","md-2","xl-1"],children:(0,c.tZ)(C.ZP,{"data-test-id":"empty-state-image",alt:"",src:"/hellofresh_website/loyalty-program/images/hub/WomanBox.svg",width:"100",height:"87",fetchFormat:"svg",role:"presentation"})})]})})})},eW=function(){var e=(0,v.ZP)("loyalty-challenge").translate;return(0,c.tZ)(f.Z,{componentName:"loyalty-program.achievements.benefits-section",children:(0,c.BX)(d.xu,{py:"lg-1",children:[(0,c.tZ)(d.xv,{as:"h4",children:e("loyaltyChallenge.benefits.title")}),(0,c.tZ)(d.xu,{display:"flex",justifyContent:"center",children:(0,c.tZ)(eU,{})})]})})},eY=function(){return(0,c.tZ)("span",{"data-test-id":"loyalty-program-hub.rewards-section-error"})},eq=function(e){var t=(0,w.L)();if(!t)return null;var r=(0,O.eb)(t);return(0,c.tZ)(p.Z,{fallback:eY,scope:"loyalty-program-hub.rewards-section-error",children:(0,c.tZ)(f.Z,{componentName:"loyalty-program-hub.rewards-section",children:(0,c.tZ)(d.xu,{display:"flex",flexDirection:"column",mb:["auto","sm-2"],children:(null==t?void 0:t.state)===m.RP.InProgress||r!==m.SR.None?(0,c.BX)(c.HY,{children:[(0,c.tZ)(y.Z,{viewports:["mobile"],children:(0,c.tZ)(d.xu,{width:"100%",mt:"-26px",children:(0,c.tZ)(d.iz,{variant:"horizontal"})})}),(0,c.tZ)(eG,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},e))]}):(0,c.BX)(c.HY,{children:[(0,c.tZ)(d.iz,{variant:"horizontal"}),(0,c.tZ)(eW,{})]})})})})},e$=r(929085),eK=function(e){var t=e.showDivider,r=e.rewardTitleSize;return(0,c.tZ)(p.Z,{scope:"loyalty-program-feature-error",children:(0,c.tZ)(f.Z,{componentName:"loyalty-program-feature",children:(0,c.tZ)(h.Z,{values:{feature:"loyalty-program-feature"},children:(0,c.tZ)(S.Cv,{children:(0,c.tZ)(s.Z,{children:(0,c.BX)(d.xu,{display:"flex",alignItems:"center",flexDirection:"column",children:[(0,c.BX)(d.xu,{display:"flex",alignItems:"center",flexDirection:"column",gap:["md-1","md-3"],children:[(0,c.tZ)(e$.Z,{}),(0,c.tZ)(eq,{titleSize:r})]}),t&&(0,c.tZ)(d.xu,{width:["100%"],my:["sm-1","md-2"],children:(0,c.tZ)(d.iz,{variant:"horizontal",my:["20px","sm-2"]})})]})})})})})})}},252207:function(e,t,r){r.d(t,{y:function(){return l}});var n=r(718583),o=r(537691),l=function(){var e=(0,o.L)(),t=((null==e?void 0:e.feature_flags)||{}).concept_of_choice_enabled,r=null===n.ZP||void 0===n.ZP?void 0:n.ZP.getItem("challenge.force.state.conceptOfChoice");return"disabled"!==r&&("enabled"===r||!!t)}},186133:function(e,t,r){r.d(t,{_7:function(){return u},_h:function(){return s},mA:function(){return c}});var n=r(399649),o=r(537691),l=r(252207);function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function a(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var c=function(e){return e?[,,,].fill(null).map(function(t,r){var n=r+1,o="loyaltyChallenge.hub.conceptOfChoice.reward".concat(n,".title");return a(i({},e),{choiceNumber:n,translation_keys:a(i({},e.translation_keys),{reward_ticket_title:o,reward_activation_title:o,reward_how_to_redeem_title:o,reward_info_description_header:o,reward_locked_info:"loyaltyChallenge.hub.conceptOfChoice.reward.locked.info"})})}):e},u=function(){var e,t,r,n,i=(0,o.L)(),a=(0,l.y)(),c=(null==i?void 0:null===(e=i.milestone_steps)||void 0===e?void 0:e.length)===1&&(null==i?void 0:null===(n=i.challenge_steps)||void 0===n?void 0:null===(r=n["step_".concat(null==i?void 0:i.milestone_steps[0])])||void 0===r?void 0:null===(t=r.rewards)||void 0===t?void 0:t.length)===1;return a&&c},s=function(){var e,t=(0,o.L)(),r=(0,l.y)(),i=u(),a=(null==t?void 0:null===(e=t.challenge_steps)||void 0===e?void 0:e["step_".concat(null==t?void 0:t.milestone_steps[0])]).rewards[0].state,c=[n.Jl.Activated,n.Jl.Redeemed,n.Jl.Sent].includes(a);return{isChooseRewardClaimed:r&&i&&c,chooseRewardState:a}}},320898:function(e,t,r){var n=r(687800);function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function l(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(827378),t.Z=function(e){var t=e.title,r=e.titleId,i=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["title","titleId"]);return(0,n.BX)("svg",l(o(l(o({width:"1rem",height:"1rem",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),i),{children:[t?(0,n.tZ)("title",{id:r,children:t}):null,(0,n.tZ)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 3.5A2.5 2.5 0 0 1 10.5 6h-5A2.5 2.5 0 0 1 8 3.5ZM4 6a4 4 0 1 1 8 0h2v8H2V6h2Zm8 1.5H3.5v5h9v-5H12Z",fill:"currentColor"}),(0,n.tZ)("path",{d:"M9 10a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z",fill:"currentColor"})]}))}},23287:function(e,t,r){r.r(t);var n=r(687800);function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function l(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r(827378),t.default=function(e){var t=e.title,r=e.titleId,i=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["title","titleId"]);return(0,n.BX)("svg",l(o(l(o({width:"1.5rem",height:"1.5rem",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t?"img":"graphics-symbol",color:"inherit","aria-hidden":!t},!t&&{focusable:!1}),{"aria-labelledby":r}),i),{children:[t?(0,n.tZ)("title",{id:r,children:t}):null,(0,n.tZ)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Zm5.314-15-7.046 7.045-2.828-2.828L6 12.657l4.242 4.243 8.486-8.486L17.313 7Z",fill:"currentColor"})]}))}}}]);

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.