PageSourceSearch

https://www.hellofresh.de/_next/static/chunks/89073-5844571a250dc224.js

js hellofresh.de collected 2026-09-25 23:37:09 UTC 184,165 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[89073,71249,15778,25208,64800,58295],{989840:function(e,t,n){n.d(t,{B:function(){return f}});var r,o,i=n(456552),a=n(671718),l=n(447178),u=n(699219),c=n(140224);function s(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}var d=(r=function(e,t){var n,r,o,i,l,u=arguments;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}(this,function(c){switch(c.label){case 0:return n=e.state,r=e.subscriptionId,o=e.systemCountry,i=e.locale,l=e.parentSpan,[4,(u.length>2&&void 0!==u[2]?u[2]:a.Z)("/loyalty/enrollments",t,{query:{locale:i,country:o,subscription:r,state:n||"in-progress,completed"},parentSpan:l,fetchSpanAttributes:{"request.backend_service":"customer-achievements-service","request.backend_action":"get-enrollments"}})];case 1:return[2,c.sent().json()]}})},o=function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function a(e){s(i,n,o,a,l,"next",e)}function l(e){s(i,n,o,a,l,"throw",e)}a(void 0)})},function(e,t){return o.apply(this,arguments)}),f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{enabled:!0},n=(0,l.Z)().fetch,r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e,(0,c.O)()),o=[u.Z["customer-achievements.enrollments"],r];return(0,i.useQuery)(o,function(){return d(r,o,n)},t)}},909058:function(e,t,n){n.d(t,{Tv:function(){return g}});var r,o,i=n(456552),a=n(671718),l=n(447178),u=n(367481),c=n(449134),s=n(140224),d=n(699219);function f(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var p=d.Z["loyalty.v3.rewards.overview"],y=d.Z["loyalty.v3.rewards.activeRewards"],b=d.Z["loyalty.v3.rewards.catalog"],m=d.Z["loyalty.v3.rewards.pointsSummary"],h=(r=function(e,t){var n,r,o,i,l,u,c,s=arguments;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}(this,function(d){switch(d.label){case 0:return n=s.length>2&&void 0!==s[2]?s[2]:a.Z,r=e.systemCountry,o=e.locale,i=e.planId,l=e.include,u=e.catalogScope,c=e.parentSpan,[4,n("/loyalty/v3/rewards/overview",t,{method:"GET",query:v({country:r,locale:o,planId:i},l&&{include:l},u&&{catalogScope:u},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["systemCountry","locale","planId","include","catalogScope","parentSpan"])),parentSpan:c,fetchSpanAttributes:{"request.backend_service":"loyalty-rewards-service","request.backend_action":"get-rewards-overview"}})];case 1:return[2,d.sent().json()]}})},o=function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function a(e){f(i,n,o,a,l,"next",e)}function l(e){f(i,n,o,a,l,"throw",e)}a(void 0)})},function(e,t){return o.apply(this,arguments)}),g=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=(0,i.useQueryClient)(),a=(0,l.Z)().fetch,d=v({},e,(0,s.O)()),f=[p,d];return(0,u.Z)(f,c.pr,function(){return h(d,f,a)},(t=v({},r),n=n={onSuccess:function(e){var t;if(void 0!==e.activeRewards){var n=[y,{planId:d.planId,systemCountry:d.systemCountry,locale:d.locale,subscriptionId:d.subscriptionId}];o.setQueryData(n,e.activeRewards,{updatedAt:Date.now()})}if(void 0!==e.catalog){var i=[b,{planId:d.planId,catalogScope:d.catalogScope,systemCountry:d.systemCountry,locale:d.locale,subscriptionId:d.subscriptionId}];o.setQueryData(i,e.catalog,{updatedAt:Date.now()})}if(void 0!==e.pointsSummary){var a=[m,{planId:d.planId,systemCountry:d.systemCountry,locale:d.locale,subscriptionId:d.subscriptionId}];o.setQueryData(a,e.pointsSummary,{updatedAt:Date.now()})}null===(t=r.onSuccess)||void 0===t||t.call(r,e)}},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))}},915888:function(e,t,n){n.d(t,{B:function(){return f}});var r,o,i=n(456552),a=n(671718),l=n(447178),u=n(881821),c=n(591183);function s(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}var d=(r=function(e,t){var n,r,o,i,l,c=arguments;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}(this,function(s){switch(s.label){case 0:n=e.parentSpan,r=e.subscriberId,o=c.length>2&&void 0!==c[2]?c[2]:a.Z,s.label=1;case 1:return s.trys.push([1,4,,5]),[4,o("/cps/users/".concat(r,"/channels"),t,{parentSpan:n,fetchSpanAttributes:{"request.backend_service":"subscriber-preferences-service","request.backend_action":"get-channels"}})];case 2:return[4,s.sent().json()];case 3:return[2,null!==(l=null==(i=s.sent())?void 0:i.filter(function(e){return!(0,u.dT)(null==e?void 0:e.slug)}))&&void 0!==l?l:[]];case 4:return s.sent(),[2,[]];case 5:return[2]}})},o=function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function a(e){s(i,n,o,a,l,"next",e)}function l(e){s(i,n,o,a,l,"throw",e)}a(void 0)})},function(e,t){return o.apply(this,arguments)}),f=function(e,t){var n=(0,l.Z)().fetch,r=(0,c.Hg)(e.subscriberId);return(0,i.useQuery)(r,function(){return d(e,r,n)},t)}},833516:function(e,t,n){n.d(t,{Ds:function(){return u},QY:function(){return l},XT:function(){return y},ZV:function(){return s},jK:function(){return a},og:function(){return f},qi:function(){return p},ri:function(){return v},sB:function(){return d},zY:function(){return c}});var r,o=n(26730);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=["push-notification"],l="unified_email_preferences_design_crmengine",u="sms",c="outbound-call",s="direct-mail",d=(i(r={},s,{description:"channels.direct_mail.description",name:"channels.direct_mail.name",title:"silo.direct_mail_preferences.title"}),i(r,c,{description:"channels.outbound_call.description",name:"channels.outbound_call.name",title:"silo.outbound_call_preferences.title"}),r),f=[o.Z.US],v=[o.Z.FR,o.Z.NL,o.Z.BE,o.Z.TT,o.Z.TO],p=[o.Z.AU,o.Z.AO,o.Z.NZ,o.Z.YE,o.Z.GB,o.Z.GN,o.Z.IE,o.Z.DE,o.Z.AT,o.Z.CH,o.Z.FR,o.Z.BE,o.Z.NL,o.Z.NO,o.Z.SE,o.Z.DK,o.Z.US,o.Z.FJ,o.Z.CG,o.Z.GQ,o.Z.ER],y={default:"yDPjo8N9r8la2XNFwHjS",reactivation:"MYzLP3ozjCaquKyb51q6",menu:"VENuHiVOZuGXZqdQZh6E",planSettings:"AMvqWFukTszsnoCxBvyn",cancellation:"ZXTXzRfdvAgQxJhMci1V",website_payment:"website_payment"}},446593:function(e,t,n){n.d(t,{x:function(){return d}});var r,o,i=n(671718),a=n(26124),l=n(140224),u=n(699219);function c(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}var s=(r=function(e,t){var n,r,o,a,l=arguments;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}
1(this,function(u){switch(u.label){case 0:n=e.country,r=e.customerId,o=e.parentSpan,a=l.length>2&&void 0!==l[2]?l[2]:i.Z,u.label=1;case 1:return u.trys.push([1,3,,4]),[4,a("/cps/users/".concat(r,"/").concat(n),t,{parentSpan:o,fetchSpanAttributes:{"request.backend_service":"subscriber-preferences-service","request.backend_action":"get-notification-info"}})];case 2:return[2,u.sent().json()];case 3:return u.sent(),[3,4];case 4:return[2]}})},o=function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function a(e){c(i,n,o,a,l,"next",e)}function l(e){c(i,n,o,a,l,"throw",e)}a(void 0)})},function(e,t){return o.apply(this,arguments)}),d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,l.O)().systemCountry,r=[u.Z["communication-preferences.notificationInfo"],e];return(0,a.Z)(r,function(t){var o,i;return s((o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),i=i={country:n.toLowerCase()},Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(i)).forEach(function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(i,e))}),o),r,t)},t)}},292262:function(e,t,n){n.d(t,{o:function(){return v}});var r,o,i=n(456552),a=n(671718),l=n(447178),u=n(881821),c=n(833516),s=n(591183);function d(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}var f=(r=function(e,t){var n,r,o,i,l,c,s,d=arguments;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}(this,function(f){switch(f.label){case 0:n=e.excludeChannels,r=e.parentSpan,o=e.subscriberId,i=d.length>2&&void 0!==d[2]?d[2]:a.Z,f.label=1;case 1:return f.trys.push([1,4,,5]),l=n&&n.length>0?{exclude_channels:n}:void 0,[4,i("/cps/users/".concat(o,"/silos"),t,{parentSpan:r,query:l,fetchSpanAttributes:{"request.backend_service":"subscriber-preferences-service","request.backend_action":"get-silos"}})];case 2:return[4,f.sent().json()];case 3:return[2,null!==(s=null==(c=f.sent())?void 0:c.filter(function(e){return!(0,u.dT)(null==e?void 0:e.slug)}))&&void 0!==s?s:[]];case 4:return f.sent(),[2,[]];case 5:return[2]}})},o=function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function a(e){d(i,n,o,a,l,"next",e)}function l(e){d(i,n,o,a,l,"throw",e)}a(void 0)})},function(e,t){return o.apply(this,arguments)}),v=function(e,t){var n=e.excludeChannels,r=void 0===n?c.jK:n,o=e.subscriberId,a=(0,l.Z)().fetch,u=(0,s.Gt)(o,r);return(0,i.useQuery)(u,function(){return f({excludeChannels:r,subscriberId:o},u,a)},t)}},591183:function(e,t,n){n.d(t,{Cy:function(){return s},Gt:function(){return c},H5:function(){return i},Hg:function(){return l},Pe:function(){return a},_H:function(){return f},he:function(){return d},us:function(){return u}});var r=n(833516),o=n(699219),i=function(e){return e.filter(function(e){return e.active})},a=function(e,t){return Object.fromEntries(e.filter(function(e){return!r.jK.includes(e)}).map(function(e){return[e,t]}))},l=function(e){return[o.Z["communication-preferences.channels"],{subscriberId:e}]},u=function(e){return e.map(function(e){return e.slug})},c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.jK;return[o.Z["communication-preferences.silos"],{excludeChannels:t,subscriberId:e}]},s=function(e){return e.map(function(e){return e.slug})},d=function(e){return e.filter(function(e){return!e.hidden})},f=function(e){return e.filter(function(e){return e.display})}},141849:function(e,t,n){n.d(t,{Z:function(){return f}});var r,o,i=n(761453),a=n(827378),l=(0,a.createContext)({isReady:!1,isSDKReady:!1}),u=function(){var e=(0,a.useContext)(i.hl).optimizely;if(!e)throw Error("call this hook within OptimizelySDKProvider");return e},c=n(981083);n(674867),n(416651);
1var s=[],d=function(){s.forEach(function(e){var t,n;null===(t=(n=e.cache).clear)||void 0===t||t.call(n)})};n(456552);var f=function(){var e=u(),t=(0,a.useContext)(l).isReady;return r!==t&&(t&&"INVALID_EXPERIMENT_USER_ID"!==e.user.id?(o=Object.create(e),d()):o=c._,r=t),[o,t,o.user]}},739126:function(e,t,n){function r(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}n.d(t,{Cv:function(){return l},f3:function(){return a}});var o,i=(0,n(575085).Z)("loyalty-program-feature-config",(o=function(){return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}(this,function(e){switch(e.label){case 0:return[4,n.e(62669).then(n.bind(n,862669))];case 1:return[2,e.sent().config]}})},function(){var e=this,t=arguments;return new Promise(function(n,i){var a=o.apply(e,t);function l(e){r(a,n,i,l,u,"next",e)}function u(e){r(a,n,i,l,u,"throw",e)}l(void 0)})})),a=i.useConfig,l=(i.configMiddleware,i.ProjectConfigProvider)},394114:function(e,t,n){var r=n(827378),o=n(910195),i=n(141323),a=n(953137),l=n(999767),u=n(492489),c=n.n(u),s=function(e){if(e){var t=e.milestones;return null==t?void 0:t.find(function(e){return e.type===o.ei.normal&&e.data.status===o._W.upcoming})}},d=function(e){if(!e)return 0;var t,n=null===(t=s(e))||void 0===t?void 0:t.at_progress;return n?n-e.progress:0},f=function(e){var t=(null==e?void 0:e.milestones)||[];return c()(t,function(e){return e.type===o.ei.normal&&e.data.status===o._W.reached})};t.ZP=function(){var e,t,n,u,c,v,p,y=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=y.includeMilestoneData,m=(0,i.j)({},{suspense:!1}).data,h=(0,a.u)({},{suspense:!1}).data,g=null==h?void 0:null===(e=h.items)||void 0===e?void 0:e[0],w=(0,l.y)().payload,O=w.enrollment,k=w.optIn,_=null==O?void 0:O.data,S=(0,r.useMemo)(function(){return null==_?void 0:_.milestones.find(function(e){return e.type===o.ei.normal&&e.data.status===o._W.reached})},[null==_?void 0:_.milestones]),Z=(0,r.useMemo)(function(){var e,t,n,r;return _?{orders_next_milestone:d(_),next_milestone:null!==(n=null===(e=s(_))||void 0===e?void 0:e.id)&&void 0!==n?n:"",active_milestone:null!==(r=null===(t=f(_))||void 0===t?void 0:t.id)&&void 0!==r?r:""}:{orders_next_milestone:0,next_milestone:"",active_milestone:""}},[_]);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({version:"beta",program_id:(null==_?void 0:_.id)||(null==k?void 0:null===(t=k.data)||void 0===t?void 0:t.program_id)||"",progress:null!==(u=(null==_?void 0:_.progress)||(null==k?void 0:null===(n=k.data)||void 0===n?void 0:n.progress))&&void 0!==u?u:"",milestone_id:null!==(c=null==S?void 0:S.id)&&void 0!==c?c:"",gaEventCategory:"loyaltyProgram",customer_id:null!==(v=null==m?void 0:m.id)&&void 0!==v?v:"",subscription_id:null!==(p=null==g?void 0:g.id)&&void 0!==p?p:""},void 0!==b&&b&&_&&Z)}},363913:function(e,t,n){n.d(t,{f:function(){return o},w:function(){return i}});var r=n(827378),o=(0,r.createContext)(null),i=function(){var e=(0,r.useContext)(o);if(!e)throw Error("useCurrentContext must be used within ChallengeProvider");return e}},500005:function(e,t,n){n.d(t,{B:function(){return u},s:function(){return l}});var r=n(399649),o=n(268481),i=n(537691),a=n(963847),l=function(e){var t=e.device,n=e.reward,o=e.challenge,i=e.milestoneStep,l=e.rewardStepNumber,u=(0,a.f2)(o),c=(0,a.GA)(o),s=n||(0,a.Xp)(i),d=null==o?void 0:o.milestone_steps[(null==c?void 0:c.length)-1],f=(o||{}).challenge_name,v=(0,a.pt)(o),p=(0,a.dY)(o),y=(0,a.I1)(o),b=null==s?void 0:s.voucher_type,m=(null==v?void 0:v.length)||0,h=(null==p?void 0:p.length)||0,g=(null==y?void 0:y.length)||0,w=u===r.RP.InProgress?"ongoing":u;return{device:t,gaEventLabel:f?"".concat(f,"|").concat(d,"|").concat(w,"|").concat(h,"|").concat(g,"|").concat(m).concat(b?"|".concat(b):""):void 0,challenge_name:f,challenge_status:w,reward_number:l,voucher_type:b,reward_id:null==s?void 0:s.id,rewards_used:m,gaEventCategory:"loyaltyChallenge",rewards_unlocked:h,rewards_activated:g,highest_milestone:d}},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.reward,n=e.milestoneStep,r=e.rewardStepNumber,a=(0,i.L)();return l({device:(0,o.Sj)(),reward:t,challenge:a,milestoneStep:n,rewardStepNumber:r})}},909626:function(e,t,n){n.d(t,{v:function(){return o}});var r=n(953137),o=function(e){var t,n,o=e.subscriptionId,i=e.enabled,a=(0,r.u)({},{suspense:!1,enabled:void 0===i||i}).data;return(null==a?void 0:null===(t=a.items)||void 0===t?void 0:t.find(function(e){return Number(null==e?void 0:e.id)===Number(o)}))||(null==a?void 0:null===(n=a.items)||void 0===n?void 0:n.find(function(e){return null==e?void 0:e.isActive}))||{}}},537691:function(e,t,n){n.d(t,{L:function(){return o}});var r=n(363913),o=function(){return(0,r.w)().current}},811369:function(e,t,n){n.d(t,{k:function(){return v}});var r,o=n(989840),i=n(827378),a=n(399649);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u=(l(r={},a.RP.InProgress,1),l(r,a.RP.Completed,2),l(r,a.RP.Incomplete,3),l(r,a.RP.Cancelled,4),r),c=n(963847),s={enabled:!0,subscriptionId:null},d=function(e,t){return u[null==e?void 0:e.state]-u[null==t?void 0:t.state]},f=function(e,t){return new Date(null==t?void 0:t.start_date).getTime()-new Date(null==e?void 0:e.start_date).getTime()},v=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,r=n.enabled,a=n.subscriptionId,l=n.suspense,u=n.state,v=(0,o.B)({state:void 0===u?"in-progress,completed,incomplete":u,subscriptionId:Number(a)},{suspense:void 0!==l&&l,enabled:!!a&&(void 0===r||r),retry:1}),p=v.data,y=void 0===p?[]:p,b=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(v,["data"]),m=(0,i.useMemo)(function(){return y.sort(f).sort(d).filter(c.aK)},[y]);return e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},b),t=t={challenges:m},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}},193825:function(e,t,n){var r=n(705205),o=n.n(r),i=n(301813);t.Z=function(e){var t=(0,i.Z)(e);if(!t)return!1;var n=t.year,r=t.week;return o()(new Date(n,6))>=r}},376707:function(e,t,n){n.d(t,{w:function(){return a}});var r=n(687800),o=n(807947),i=n(660802),a=function(e){var t=e.location,n=(0,i.Z)(),a=n.getVariation,l=(0,n.getTranslationKey)(a(),t);return(0,r.tZ)(o.Z,{group:"wallet",applangaKey:l})}},509370:function(e,t,n){var r,o,i,a;n.d(t,{u:function(){return r},y:function(){return o}}),(i=r||(r={})).WALLET="control",i.PROMOS="variation_1",i.OFFERS="variation_2",(a=o||(o={})).STANDALONE_TITLE="standaloneTitle",a.HEADER_TITLE="headerTitle",a.NAVIGATION_LINK="navigationLink"},660802:function(e,t,n){n.d(t,{Z:function(){return f}});var r,o=n(966622),i=n(943701),a=n(233477),l=n(913940),u=n(827378),c=n(509370);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=(s(r={},c.u.WALLET,{standaloneTitle:"wallet.standalone.title",headerTitle:"wallet.page-header.title",navigationLink:"wallet.drawer.gotoWallet.link"}),s(r,c.u.PROMOS,{standaloneTitle:"wallet.standalone.promos.title",headerTitle:"wallet.page-header.promos.title",navigationLink:"wallet.drawer.gotoWallet.promos.link"}),s(r,c.u.OFFERS,{standaloneTitle:"wallet.standalone.offers.title",headerTitle:"wallet.page-header.offers.title",navigationLink:"wallet.drawer.gotoWallet.offers.link"}),r),f=function(){var e=(0,o.py)(),t=e.decide,n=e.isReady,r=(0,i.R)(),s=r.id,f=r.isReady,v=(0,a.F)();return{getVariation:(0,u.useCallback)(function(){return n&&f&&t(l.mj.ABTEST,{experimentKey:"wallet_naming_test",experimentationUserId:s,experimentationUserAttributes:v}).variationKey||c.u.WALLET},[t,v,s,n,f]),getTranslationKey:function(e,t){return d[e][t]}}}},108919:function(e,t,n){n.d(t,{w:function(){return i}});var r=n(953137),o=n(695743),i=function(){var e,t,n,i=(0,r.u)({}).data,a=(0,o.z)("website").data,l=null==a?void 0:null===(e=a.features)||void 0===e?void 0:e.standaloneWallet,u=t=!!(null==l?void 0:l.enabled),c=n=!!(null==l?void 0:l.rollout);return(null==i?void 0:i.items.filter(function(e){return e.isActive}).length)===1&&(u||c)}},197809:function(e,t,n){function r(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}n.d(t,{Eg:function(){return a},Yg:function(){return l}});var o,i=(0,n(575085).Z)("hf.customer-header",(o=function(){return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}(this,function(e){switch(e.label){case 0:return[4,n.e(98400).then(n.bind(n,998400))];case 1:return[2,e.sent().config]}})},function(){var e=this,t=arguments;return new Promise(function(n,i){var a=o.apply(e,t);function l(e){r(a,n,i,l,u,"next",e)}function u(e){r(a,n,i,l,u,"throw",e)}l(void 0)})})),a=i.ProjectConfigProvider,l=(i.configMiddleware,i.useConfig)},389073:function(e,t,n){n.r(t),n.d(t,{default:function(){return iS}});var r,o,i,a,l=n(687800),u=n(827378),c=n(768587),s=n(313954),d=n(184883),f=n(527157),v=n(543790),p=n(739126),y=n(602307),b=n(231140),m=n(169821),h=n(377380),g=n(882493),w=n(186e3),O=n(190341),k=n(141323),_=n(837324),S=n(228001),Z=function(){var e=(0,S.Z)().isDesktop;return(0,l.tZ)(c.xu,{"data-test-id":"menu-dot",position:"absolute",top:"10px",left:e?"35px":"30px",width:"14px",height:"14px",backgroundColor:"error.600",borderRadius:"border-radius-circle"})},x=n(564020),P=n(43011),j=function(){var e=(0,p.f3)().isProgramEnabled,t=(0,P.Z)(),n=(0,x.k)({},{enabled:e&&t,suspense:!1}).data;return{show:!!(null==n?void 0:n.loyalty_program_onboarding_show_label)}},C=n(446593),A=function(){var e=(0,k.j)({},{suspense:!1}).data,t=null==e?void 0:e.id,n=(0,C.x)({customerId:t},{enabled:!!t,suspense:!1}).data;return null==n?void 0:n.token},I=n(783244),E=n(141849),D=n(292262),T=n(915888);function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return R(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var N=function(e){var t="variation_1"===L((0,E.Z)(),1)[0].getVariation("cbty_sms_opt_in_v2"),n=L((0,I.Z)("hf_re_sms_opt_in_notification_viewed"),2),r=n[0],o=n[1],i=(0,D.o)({subscriberId:e},{enabled:!!e}).data,a=(0,T.B)({subscriberId:e},{enabled:!!e}).data,l=!!(null==a?void 0:a.some(function(e){return"sms"===e.slug&&!1===e.hidden&&!1===e.active})),u=!!(null==a?void 0:a.some(function(e){return"email"===e.slug&&!1===e.hidden&&!1===e.active})),c=!!(null==i?void 0:i.some(function(e){return"special-offers"===e.slug&&!0===e.display&&!1===e.active})),s=t&&"false"===r&&(l||u||c);return{showNotificationBubble:s,handleRemoveNotificationBubble:function(){s&&o("true")}}},B=n(933843),M=function(e){var t=e.onClick,n=e.showDrawer,r=N(A()).showNotificationBubble,o=(0,k.j)({},{suspense:!1}).data,i=(0,B.H)()("profile-menu-text"),a="".concat((null==i?void 0:i.value)||"Profile menu"," for ").concat((null==o?void 0:o.firstName)||"user"),u=j().show;return(0,l.tZ)(c.xu,{as:"button","data-test-id":"customer-header-menu-hamburger","aria-label":a,"aria-haspopup":"true","aria-expanded":n,"aria-controls":"profile-menu",onClick:t,backgroundColor:"transparent",borderWidth:"0",cursor:"pointer",alignItems:"center",height:"100%",pseudo:{":hover":{backgroundColor:"primary.200"}},paddingX:"xs",children:(0,l.BX)(c.xu,{paddingX:"xs",children:[(0,l.tZ)(c.JO,{icon:(0,l.tZ)(_.default,{}),color:"neutral.800"}),(r||u)&&(0,l.tZ)(Z,{})]})})},V=n(138354),q=n.n(V),H=n(581340),F=n(953137),U=n(958042),W=n(839444),X=n(140224),z=n(760014),G=(0,c.q)(c.xu),Y=function(e){var t=e.handleCloseMenu,n=e.style;return(0,l.tZ)(G,{"aria-hidden":"true","data-test-id":"customer-header-drawer-overlay",style:n,backgroundColor:"neutral.800",position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:4,height:"100%",width:"100%",overflowX:"hidden",cursor:"pointer",onClick:t})},J=n(718583);function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function K(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Q="menuNotifications",ee=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,u.useState)(!1))||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),2!==i.length);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return $(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $(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.")}(),r=n[0],o=n[1],i=function(e){return!e.hasNotification||a&&!!a[e.id]},l=null==e?void 0:e.map(function(e){return(0,B.f)(e)});return(0,u.useEffect)(function(){l&&o(l.some(function(e){var t;return null==e?void 0:null===(t=e.links)||void 0===t?void 0:t.some(function(e){return(null==e?void 0:e.hasNotification)&&!i(e)})}))},[l,a]),(0,u.useEffect)(function(){a||(a=JSON.parse(J.ZP.getItem(Q)||"{}"))},[]),{isLinkAlreadyVisited:i,setLinkAsVisited:function(e){var t,n;e.hasNotification&&(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){K(e,t,n[t])})}return e}({},a),n=null!=(n=K({},e.id,!0))?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),a=t,J.ZP.setItem(Q,JSON.stringify(a)))},hasNotificationInSegments:r}},et=n(881821),en=function(e,t){var n=er(e);n.push(t),ei(e,n)},er=function(e){var t=[];try{t=JSON.parse(eo(e)||"")||[]}catch(e){console.log(e)}return t},eo=function(e){return J.ZP.getItem(e)},ei=function(e,t){return ea(e,JSON.stringify(t))},ea=function(e,t){return J.ZP.setItem(e,t)},el=function(e){return e&&0!==e.length?e.filter(function(e){return!e.canceledAt}):[]},eu=function(e){return e&&0!==e.length?e.filter(function(e){return e.canceledAt}):[]},ec=function(e){return el(e).length>0},es=function(e){return eu(e).length>0},ed=function(e){return el(e).filter(function(e){return e.isActive&&!e.isBlocked}).map(function(e){return e.product.sku})},ef=function(e){return eu(e).map(function(e){return e.product.sku})},ev=function(e){return e.map(function(e){return ey(ep(e))})},ep=function(e){return e.deliveryInterval},ey=function(e){switch(e){case 2:return"bi-weekly";case 4:return"monthly";default:return"weekly"}},eb=function(e,t){return e.some(function(e){return e.productType.family.tags.includes(t)})},em=function(e,t){en("DelayedDataLayerEvents",{event:"gaEventTrigger",gaEventCategory:"navigation",gaEventAction:e,gaEventLabel:t})},eh=function(e){var t,n,r=e.subscriptions,o=e.customerInfo,i=e.subBrand,a=o.id,l=o.firstName,u=o.lastName,c=o.email,s=o.createdAt,d=o.boxesReceived,f=r.filter(function(e){return e.isActive}).map(function(e){return e.product.sku}).join(","),v=void 0!==i?et.kO:et.kH,p=null!==(n=null===(t=r.filter(v)[0])||void 0===t?void 0:t.id)&&void 0!==n?n:"",y=!i&&r.some(function(e){var t,n,r;return null===(r=e.productType)||void 0===r?void 0:null===(n=r.family)||void 0===n?void 0:null===(t=n.tags)||void 0===t?void 0:t.includes("is_program_weightloss")});return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({event:"customerUpdateEvent",subscriptions:r,activeSubscriptionId:p,activeSubscriptionSkus:f,subscriptionsCount:r.length,hasActiveSubscription:ec(r),hasInactiveSubscription:es(r),plan:ed(r).join(","),inactivePlan:ef(r).join(","),deliveryInterval:ev(r).join(","),hasTrialBox:eb(r,"is_trial"),customerLoyalty:d,customerId:a,hfUid:a,firstName:l,lastName:u,email:c,createdAt:s,squad:"rte-vms",tribe:"rte-expansion"},y?{plan_type:"prog_weightloss"}:{})},eg=function(e){var t=e.subscriptions,n=e.customerInfo,r=n.id,o=n.firstName,i=n.lastName,a=n.email,l=n.createdAt,u=n.boxesReceived,c=n.freeAddOnSubscriptions;return{event:"customerUpdateEvent",subscriptions:t,hasActiveSubscription:ec(t),hasInactiveSubscription:es(t),plan:ed(t).join(","),inactivePlan:ef(t).join(","),deliveryInterval:ev(t).join(","),hasTrialBox:eb(t,"is_trial"),customerLoyalty:u,customerId:r,hfUid:r,firstName:o,lastName:i,email:a,createdAt:l,freeAddOnSubscriptions:c}},ew=n(894326),eO=n(638617),ek=function(){var e=(0,B.H)(),t=(0,eO.At)().whitelabel,n=(0,ew.h)(),r=!t||!!(null==t?void 0:t.isTranslationToggleEnabled),o=e("login"),i=!!n&&n.length>=3;return{loginTranslation:(null==o?void 0:o.value)||"",renderLanguageToggle:!!n&&n.length>1&&r,availableLocales:n||[],isTranslationDropdownEnabled:i}},e_=n(960453),eS=n(527421),eZ=n.n(eS),ex=function(e){var t;return!!(null==e?void 0:null===(t=e.tags)||void 0===t?void 0:t.includes(e_.Z))},eP=function(e){var t;return!!ex(null==e?void 0:null===(t=e.productType)||void 0===t?void 0:t.family)},ej=function(e){return!e.canceledAt},eC=function(e){return eP(e)&&ej(e)},eA=function(e){if(0!==e.length)return e.reduce(function(e,t){return eZ()(e.canceledAt,t.canceledAt)>0?e:t})};function eI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var eE=["/program-dashboard","/program","/program-cancellation","/program-post-cancellation"],eD=function(){var e,t=(function(e){if(Array.isArray(e))return e}(e=(0,I.Z)("hf_has_programs_product_post_checkout"))||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),1!==i.length);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,1)||function(e,t){if(e){if("string"==typeof e)return eI(e,1);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eI(e,1)}}
1(e,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],n=(0,H.t)().asPath,r=(0,f.Z)()===v.Z.factor&&eE.some(function(e){return n.includes(e)})||t,o=(0,F.u)({},{suspense:!1,enabled:!r}).data;if(r)return!0;var i=(null==o?void 0:o.items)||[],a=null==i?void 0:i.some(ej);return i.some(eC)||!a&&eP(eA(i))},eT=n(249273),eR=function(e){var t,n,r,o=(0,k.j)({},{suspense:!1,useErrorBoundary:!1}).data,i=null!==(r=null==o?void 0:o.uuid)&&void 0!==r?r:"",a=(0,eT.x)({customerUUID:i},{suspense:!1}).data,l=(0,eO.At)();if(!e)return{discountWithShippingFee:void 0,creditForCustomer:void 0};var u=(null===(t=l.checkout)||void 0===t?void 0:t.shippingAmount)||0,c=a&&JSON.parse(a.discount_campaign_settings||"{}"),s=null==a?void 0:a.reward_value,d=(null===(n=(c||{}).discount_rule)||void 0===n?void 0:n.box_rule)||[],f=d?Object.values(d).reduce(function(e,t){var n=t.discount_value;return e+("both"===t.applicable_to?u+n:n)},0):0;return{discountWithShippingFee:f?parseFloat((f/100).toFixed(0)):0,creditForCustomer:s}},eL=n(579894),eN=n.n(eL),eB=n(92465),eM=n.n(eB),eV=n(887824),eq=n(909626),eH=n(811369),eF=n(500005),eU=n(292282),eW=n(785462),eX=n(867610),ez=n(513719),eG=n(660061),eY=n(296865),eJ=n(211337),e$=n(369414),eK=n(306228),eQ=n(465800),e0=n(8699),e1=n(275946),e2=n(659707),e3=n(310333),e8=n(581779),e6=n(563359),e4=n(750866),e5=n(707905),e7=n(845818),e9=n(156380),te=n(725208),tt=n(15778),tn=n(848699),tr={"my-deliveries":(0,l.tZ)(e1.default,{}),"settings-v1":(0,l.tZ)(eY.default,{}),"favorite-recipes":(0,l.tZ)(e0.default,{}),"past-deliveries-favs":(0,l.tZ)(e0.default,{}),"cookbook-menu":(0,l.tZ)(e3.default,{}),"social-bridge-cookbook":(0,l.tZ)(tn.default,{}),recycling:(0,l.tZ)(eX.default,{}),"our-plans":(0,l.tZ)(e1.default,{}),"how-it-works":(0,l.tZ)(eX.default,{}),"our-menus":(0,l.tZ)(e1.default,{}),"log-out":(0,l.tZ)(eK.default,{}),"invite-friends":(0,l.tZ)(eQ.default,{}),"getting-started":(0,l.tZ)(eG.default,{}),"fresh-achievements":(0,l.tZ)(e8.default,{}),notifications:(0,l.tZ)(eW.default,{}),"our-products":(0,l.tZ)(e3.default,{}),dashboard:(0,l.tZ)(eJ.default,{}),"pet-profile":(0,l.tZ)(e$.default,{}),"my-health":(0,l.tZ)(e0.default,{}),"loyalty-program":(0,l.tZ)(e8.default,{}),"loyalty-program-v2":(0,l.tZ)(tt.default,{}),faq:(0,l.tZ)(ez.default,{}),"contact-us":(0,l.tZ)(e2.default,{}),wallet:(0,l.tZ)(e9.default,{}),"my-plan":(0,l.tZ)(e6.default,{}),"contact-us-goc-variation":(0,l.tZ)(e4.default,{}),sourcing:(0,l.tZ)(e5.default,{}),"gift-cards":(0,l.tZ)(e7.default,{}),"past-orders":(0,l.tZ)(eU.default,{}),"past-orders-goc":(0,l.tZ)(e3.default,{}),"food-profile":(0,l.tZ)(te.default,{})},to=n(318066),ti=(r={},o=v.Z.factor,i={"loyalty-program-v2":(0,l.tZ)(to.ZP,{fetchFormat:"svg",src:"/hellofresh_website/loyalty/images/factor-v2/logo/icon.svg",alt:"",role:"presentation",width:24,height:24})},o in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,r),ta=n(567921),tl=n.n(ta),tu=n(733071),tc=n(208924),ts=function(){var e,t=(0,B.H)();return(0,l.tZ)(c.xu,{"data-test-id":"loyalty-program-menu-nudge",display:"flex",alignContent:"center",justifyContent:"center",backgroundColor:"error.600",px:"xs",py:"xxs",marginLeft:["xxs","sm-1"],borderRadius:"border-radius-pill",children:(0,l.tZ)(c.xv,{type:"body-xs-regular",color:"neutral.100",children:null===(e=t("loyalty-program-menu-nudge"))||void 0===e?void 0:e.value})})},td=n(349646),tf=function(e){var t=e.number;return(0,l.tZ)(c.xu,{width:"16px",height:"16px",backgroundColor:"error.500",borderRadius:"border-radius-circle",display:"flex",alignItems:"center",justifyContent:"center",mx:"xxs",children:(0,l.tZ)(c.xv,{color:"neutral.100",type:"body-xs-regular",children:t})})},tv=function(e){var t,n=e.link,r=e.isAccountSettings,o=e.hasNudge,i=e.onClick,a=void 0===i?function(){}:i,u=e.onMenuItemClick,s=e.showNotificationDot,d=n.target,f=(0,H.t)().asPath,v=(0,td.vg)(d,f),p=(0,td.CX)(f,d),y=function(e,t){em("navbarClick","".concat(e.name,"|").concat(e.target)),null==u||u(t),!t.defaultPrevented&&(a(),v&&r&&(window.location.href=p))},b=n.icon,m=(0,B.H)(),h=tr[b],g=null===(t=m(n.label))||void 0===t?void 0:t.value;return g?(0,l.tZ)(c.i9.Item,{href:p,id:n.label,title:g,selected:v,onClick:function(e){return y(n,e)},icon:h?(0,l.tZ)(c.JO,{icon:h,"data-test-id":"nav-element-icon",color:"inherit"}):void 0,children:(0,l.BX)(c.xu,{as:"span","data-test-id":n.testId,display:"flex",width:"100%",alignItems:"center",minWidth:0,children:[g,(0,l.tZ)(c.xu,{flexGrow:1}),o&&(0,l.tZ)(ts,{}),void 0!==s&&s&&(0,l.tZ)(tf,{number:1})]})}):null},tp=function(){var e=(0,tu.a)(),t=e.mutate,n=e.isSuccess,r=u.useMemo(function(){return tl().get("apiV2Auth")},[]),o=(0,X.O)(),i=o.locale,a=o.systemCountry;return u.useEffect(function(){n&&(window.location.href="/login")},[n]),(0,l.tZ)(c.xu,{fontWeight:"body-bold","data-test-id":"logout",children:(0,l.tZ)(c.xu,{tabIndex:-1,
1children:(0,l.tZ)(c.i9.Stacked,{children:(0,l.tZ)(tv,{link:{name:"Log Out",icon:"log-out",label:"log-out",id:"dropdown-btn-logout",target:"/login?locale=".concat(i,"&country=").concat(a),testId:"customer-button-log-out"},onMenuItemClick:function(e){if(e.preventDefault(),!r)throw Error("Cookie is not defined.");var n=JSON.parse(r);tl().remove("hf_i"),tl().remove("hf_has_active_sub"),tl().remove("apiV2Auth"),tl().remove("StoredReactivationCouponCode"),tl().set("hf_lo","1"),(0,tc.k)(),t({refresh_token:null==n?void 0:n.refresh_token})}})})})})},ty=n(50488),tb=n(966622),tm=n(943701),th=function(){var e=(0,tb.py)({runUsingStatsig:!0}),t=e.isReady,n=e.decide,r=(0,tm.R)({runUsingStatsig:!0}),o=r.isReady;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({decide:n,isReady:t&&o},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(r,["isReady"]))},tg=n(548295),tw=n(931710),tO=function(e){var t=e.link,n=e.href,r=e.isActive,o=(0,tw.t)({entryPointComponent:"topNav"}).trackNavElementClickEvent,i=u.useCallback(function(){o()},[o]);return(0,l.tZ)(l.HY,{children:(0,l.tZ)(eN(),{href:n,passHref:!0,prefetch:!1,legacyBehavior:!0,children:(0,l.tZ)("a",{id:t.id,"data-test-id":t.id,title:null==t?void 0:t.name,href:n,onClick:i,children:(0,l.tZ)(c.xu,{tabIndex:-1,children:(0,l.tZ)(c.xu,{display:"inline-block",position:"relative",paddingLeft:"xs",width:"100%",backgroundColor:r?"alias.selected.background.secondary.default":"transparent",borderLeftStyle:"solid",borderLeftColor:r?"alias.interactive.border.default":"transparent",borderLeftWidth:"4px",color:r?"primary.600":"neutral.800",pseudo:{":hover":{backgroundColor:"alias.accent.alternative.hover",borderLeftStyle:"solid",borderLeftColor:r?"alias.interactive.border.default":"transparent",borderLeftWidth:"4px"},":focus":{backgroundColor:"alias.selected.background.secondary.default",borderLeftStyle:"solid",borderLeftColor:r?"alias.interactive.border.default":"transparent",borderLeftWidth:"4px"},":active":{borderLeftColor:r?"alias.interactive.border.default":"transparent",borderLeftStyle:"solid",borderLeftWidth:"4px",backgroundColor:"alias.accent.alternative.pressed"}},children:(0,l.tZ)(c.xu,{id:t.id,"data-test-id":t.testId,textAlign:"left",paddingLeft:"xs",paddingRight:"sm-2",paddingY:"sm-2",display:"flex",alignItems:"center",children:(0,l.tZ)(c.xv,{type:r?"body-md-bold":"body-md-regular",color:"inherit",children:(0,l.tZ)(tg.Z,{componentName:"xsell-enrolment-nav-element-mobile",attributes:{"xsell-entry-point":"nav-element-mobile"},children:(0,l.BX)(c.xu,{display:"flex",gap:"global.xs",children:[(0,l.tZ)(c.xu,{"aria-label":"Factor",children:(0,l.tZ)(to.ZP,{alt:"",height:20,src:"/hellofresh_website/fj/assets/factor-logo.svg",title:"Factor",width:20})}),(0,l.tZ)(c.xu,{children:"x"}),(0,l.tZ)(c.xu,{"aria-label":"HelloFresh",children:(0,l.tZ)(to.ZP,{alt:"",height:20,src:"/hellofresh_website/us/icons/lime-square.svg",title:"HelloFresh",width:20})})]})})})})})})})})})},tk=n(929037),t_=function(e){var t=e.dataTestId,n=e.linkName,r=e.showExternalLinkArrow,o=e.showNudge,i=e.showNotificationDot,a=e.showNewBadge;return(0,l.BX)(c.xu,{as:"span","data-test-id":t,display:"flex",width:"100%",alignItems:"center",minWidth:0,children:[n,r&&(0,l.tZ)(c.xu,{as:"span",paddingLeft:"xs",children:(0,l.tZ)(tk.default,{width:"14px",height:"14px",color:"inherit"})}),(0,l.tZ)(c.xu,{flexGrow:1}),(o||a)&&(0,l.tZ)(c.xu,{as:"span","aria-hidden":"true",children:(0,l.tZ)(ts,{})}),i&&(0,l.tZ)(c.xu,{as:"span","aria-hidden":"true",children:(0,l.tZ)(tf,{number:1})})]})},tS=function(e){var t,n;return(null==e?void 0:null===(t=e.name)||void 0===t?void 0:t.includes("HelloFriends"))?"referrals-navigation-link-header-mobile-menu":null!==(n=e.id)&&void 0!==n?n:""},tZ=n(164377),tx=function(){var e=(0,eV.Z)().push;return(0,u.useCallback)(function(t){var n=t.label,r=t.tribe,o=t.squad,i=t.element,a=t.isShopifyRedirect;e(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({event:"gaEventTrigger",event_name:"Header_Navigation",gaEventCategory:"Header_Navigation",gaEventAction:"click",user_action:"click",gaEventLabel:"".concat(n).concat(null!=a?a?"|shopify":"|internal":""),tribe:void 0===r?"RTE":r,squad:void 0===o?"rte-engagement":o},i?{element:i}:{}))},[e])},tP=n(799969),tj=n(860853),tC=n(594719),tA=n(177496),tI=n(976555);function tE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}var tD={event:"gaEventTrigger",tribe:"Conversions",squad:"reactivation",gaEventCategory:"Reactivation"},tT=function(){var e,t=(0,eV.Z)().push,n=(0,f.Z)(),r=(0,tI.Z)(),o=(0,F.u)({},{suspense:!1}).data,i=null==o?void 0:null===(e=o.items)||void 0===e?void 0:e.find(function(e){return null==e?void 0:e.canceledAt}),a=(0,tb.py)({runUsingStatsig:!0}).track,l=(0,tm.R)({runUsingStatsig:!0}),u=l.id,c=l.attributes,s=function(e){a({eventName:e.eventName,experimentationUserId:null!=u?u:"",experimentationUserAttributes:c,eventTags:tE({brand:n,tribe:"Conversions",EventCategory:"Reactivation"},e.eventTags)})};return{trackFormerViewMenuClick:function(){var e,o,a,l,u,c,d,f,v,p,y,b;i&&(t((e=tE({},tD),o=o={brand:n,event_name:"Reactivate_viewMenuClick",gaEventAction:"Reactivate_viewMenuClick",gaEventLabel:"",subscription_id:null!==(v=null==i?void 0:i.id)&&void 0!==v?v:"",hf_week:"".concat(r),customer_id:"".concat(null==i?void 0:null===(a=i.customer)||void 0===a?void 0:a.id),loyalty:null!==(p=null==i?void 0:null===(u=i.customer)||void 0===u?void 0:null===(l=u.loyalty)||void 0===l?void 0:l.value)&&void 0!==p?p:""},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}
1)(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}),e)),s({eventName:"Reactivate_viewMenuClick",eventTags:{EventAction:"Reactivate_viewMenuClick",EventLabel:"",brand:n,subscription_id:null!==(y=null==i?void 0:i.id)&&void 0!==y?y:"",hf_week:"".concat(r),customer_id:"".concat(null==i?void 0:null===(c=i.customer)||void 0===c?void 0:c.id),loyalty:String(null!==(b=null==i?void 0:null===(f=i.customer)||void 0===f?void 0:null===(d=f.loyalty)||void 0===d?void 0:d.value)&&void 0!==b?b:"")}}))}}},tR=n(914838),tL=function(){var e,t,n,r,o,i=(0,z.Z)().payloadV2,a=(0,H.t)().query,l=null==i?void 0:i.enrollment,u=null==i?void 0:i.optIn,c=(null==l?void 0:null===(e=l.data)||void 0===e?void 0:e.store_points)||0;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({event:"gaEventTrigger"},(null==l?void 0:null===(t=l.extra)||void 0===t?void 0:t.isEnrolled)&&{enrollment_id:"".concat(null===(n=l.data)||void 0===n?void 0:n.id),enrollment_state:"enrolled",points_balance:c},(null==u?void 0:null===(r=u.extra)||void 0===r?void 0:r.canOptIn)&&{program_id:"".concat(null==u?void 0:null===(o=u.data)||void 0===o?void 0:o.program_id),enrollment_state:"not_enrolled"},a.utm_medium&&{entry_point:"deeplink",utm_medium:a.utm_medium})},tN=n(60074),tB=n(721469),tM=n(52130),tV=function(){var e=(0,tM.L3)().trackJanusEvent;return{trackButtonImpression:(0,u.useCallback)(function(t){var n,r,o,i,a,l,u=null==t?void 0:t.enrollment,c=null==t?void 0:t.optIn,s=null!==(r=null==u?void 0:null===(n=u.extra)||void 0===n?void 0:n.isEnrolled)&&void 0!==r&&r;try{e(tB.be.janusEvent(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({event:tB.be.event({impressionType:tB.w7.NavigatedTo,visibilityThreshold:tB.Mc.Major}),loyaltyProgramIdentity:tB.be.loyaltyProgramIdentity({enrollmentId:s?"".concat(null==u?void 0:null===(o=u.data)||void 0===o?void 0:o.id):null,enrollmentState:s?tB.T_.Enrolled:tB.T_.NotEnrolled,programId:(null==c?void 0:null===(i=c.data)||void 0===i?void 0:i.program_id)?"".concat(c.data.program_id):null})},s&&{loyaltyProgramPointsStatusEntities:[tB.be.loyaltyProgramPointsStatus({pointsBalance:null!==(l=null==u?void 0:null===(a=u.data)||void 0===a?void 0:a.store_points)&&void 0!==l?l:0})]})))}catch(e){(0,tN.Tb)(e,{tags:{event:"MyOrders_Button_LoyaltyEntryPoint_Impression",component:"useMyOrdersButtonLoyaltyEntryPointImpressionSnowplowEvent"}})}},[e])}},tq=n(115856),tH=function(){var e=(0,tM.L3)().trackJanusEvent;return{trackRewardsHubButtonClick:(0,u.useCallback)(function(t){var n,r,o,i,a,l,u=null==t?void 0:t.enrollment,c=null==t?void 0:t.optIn,s=null!==(r=null==u?void 0:null===(n=u.extra)||void 0===n?void 0:n.isEnrolled)&&void 0!==r&&r;try{e(tq.P1.janusEvent(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({loyaltyProgramIdentity:tq.P1.loyaltyProgramIdentity({enrollmentId:s?"".concat(null==u?void 0:null===(o=u.data)||void 0===o?void 0:o.id):null,enrollmentState:s?tq.T_.Enrolled:tq.T_.NotEnrolled,programId:(null==c?void 0:null===(i=c.data)||void 0===i?void 0:i.program_id)?"".concat(c.data.program_id):null}
1),uiModal:tq.P1.uiModal({uiModalName:tq.E5.Reward})},s&&{loyaltyProgramPointsStatusEntities:[tq.P1.loyaltyProgramPointsStatus({pointsBalance:null!==(l=null==u?void 0:null===(a=u.data)||void 0===a?void 0:a.store_points)&&void 0!==l?l:0})]})))}catch(e){(0,tN.Tb)(e,{tags:{event:"MyOrders_View_RewardsHub_Button_Click",component:"useMyOrdersViewRewardsHubButtonClickSnowplowEvent"}})}},[e])}};function tF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function tU(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var tW=function(e){var t,n=e.icon,r=(0,f.Z)(),o=n&&(null===(t=ti[r])||void 0===t?void 0:t[n])||tr[n];return o?(0,l.tZ)(c.JO,{icon:o,color:"inherit"}):null},tX=function(e){var t,n=e.links,r=e.tagFilterList,o=e.availableLocales,i=e.parameterList,a=e.currentLocale,s=e.asPath,d=e.onClick,f=e.showDrawer,v=(0,eO.At)().isLoyaltyChallengeEnabled,y=th(),b=tT().trackFormerViewMenuClick,m=tx(),h=(0,ty.OX)({links:n,availableLocales:o,tagFilterList:r,currentLocale:a,parameterList:i,experimentationOptions:y}),g=(0,eV.Z)().push,w=(0,H.t)(),O=w.query,k=w.push,_=(0,x.h)().mutate,S=j().show,Z=(0,p.f3)().isProgramEnabled,P=(0,z.Z)(),C=P.isVisible,A=P.isV2Visible,I=P.isFetched,E=P.payloadV2,D=tL(),T=tV().trackButtonImpression,R=tH().trackRewardsHubButtonClick,L=N(null==i?void 0:i.token),B=L.showNotificationBubble,M=L.handleRemoveNotificationBubble,V=!!(v&&f&&Z),q=(0,eq.v)({enabled:V,subscriptionId:Number(null==O?void 0:O.subscriptionId)}),F=(0,eH.k)({subscriptionId:null==q?void 0:q.id,enabled:V}).challenges,U=(0,eF.s)({challenge:null==F?void 0:F[0]}),W=null!==(t=null==h?void 0:h.some(function(e){var t;return null==e?void 0:null===(t=e.id)||void 0===t?void 0:t.includes("link_loyalty-program-v2_mobile")}))&&void 0!==t&&t;(0,u.useEffect)(function(){f&&W&&I&&A&&(g(tF({event_name:"Loyalty_EP_SideNav_RewardsButtonDisplay",gaEventCategory:"loyaltyProgram",gaEventAction:"display",gaEventLabel:"EntryPointSideNav_RewardsButton",element:"loyaltyProgramSideNav_RewardsButton",squad:"missions",tribe:"loyalty-and-virality"},D)),T(E))},[f,W,I,A]);var X=(0,tZ.H)()(),G=X.isReady,Y=X.isEnabled,J=X.welcomeSpacePath,$=(0,tP.xY)(),K=(0,tC.m)(),Q=K.isReady,ee=K.shouldRedirect,et=Q&&ee,en=(0,tA.Q)({utmContent:"header_subnavigation"}),er={onLinkClick:d,pushGTM:function(e){var t=e.isFreshAchievements,n=e.isLoyaltyProgram,r=e.isLoyaltyProgramV2,o=e.id,i=e.name,a=o.split("_")[1];if(t)return g(tU(tF({},U),{tribe:"WAC",brand:"HelloFresh",new_label:S,user_action:"click",event:"gaEventTrigger",element:"freshAchievements",gaEventCategory:"loyaltyChallenge",gaEventAction:"freshAchievements|click",event_name:"Achievements_FreshAchievements"}));if(n)return g({event:"gaEventTrigger",gaEventCategory:"navigation",gaEventAction:"navbarClick",tribe:"habit-building",squad:"loyalty-program",brand:"HelloFresh",page:"Loyalty Program",event_name:"Navigation_NavbarClick",page_path:s.split("?")[0]});if(r){g(tF({event_name:"Loyalty_EP_SideNav_RewardsButtonClick",gaEventCategory:"loyaltyProgram",gaEventAction:"click",gaEventLabel:"EntryPointSideNav_RewardsButton",element:"loyaltyProgramSideNav_RewardsButton",click_target:"RewardsHub",entry_point:"side_nav_rewards_click",squad:"missions",tribe:"loyalty-and-virality"},D)),R(E);return}if(!eM()(a))return m({label:a,element:i,isShopifyRedirect:ee})},trackFormerViewMenuClick:b,hasWelcomeSpaceExperiment:!!(G&&Y),welcomeSpacePath:J,routerPush:k,hasNudge:S,mutate:_,handleRemoveNotificationBubble:M};return(0,l.tZ)(c.i9.Stacked,{semantic:!0,children:null==h?void 0:h.map(function(e){var t,n,r,o,i,a,u,f,v,p,y,b,m,h=(0,td.CX)(s,e.target),g=(0,td.vg)(e.target,s),w=null==e?void 0:null===(n=e.id)||void 0===n?void 0:n.includes("link_fresh-achievements_mobile"),O=null==e?void 0:null===(r=e.id)||void 0===r?void 0:r.includes("link_notifications_en-US"),k=(null==e?void 0:null===(o=e.id)||void 0===o?void 0:o.includes("link_loyalty-program_mobile"))||(null==e?void 0:null===(i=e.id)||void 0===i?void 0:i.includes("link_loyalty-program-rewards_mobile")),_=null==e?void 0:null===(a=e.id)||void 0===a?void 0:a.includes("link_loyalty-program-v2_mobile");_&&(h=(0,td.CX)("?rewards_hub_entry_point=side_nav_rewards_click",h));var Z=!!((null==e?void 0:e.target)&&(e.target.indexOf("/my-account/deliveries/menu")>=0||e.target.indexOf("/my-deliveries")>=0)),x=null==e?void 0:null===(u=e.id)||void 0===u?void 0:u.includes("link_getting-started"),P=w&&S,j=_&&A&&(null==E?void 0:null===(v=E.optIn)||void 0===v?void 0:null===(f=v.extra)||void 0===f?void 0:f.canOptIn),I=null==e?void 0:null===(p=e.tags)||void 0===p?void 0:p.includes("x-sell");if(e.id&&e.id.includes("link_log-out"))return(0,l.tZ)(c.xu,{as:"li",listStyle:"none",children:(0,l.tZ)(tp,{})},e.id);if($===tj.M.factorform&&e.subLinks&&e.subLinks.length>0)return(0,l.BX)(l.HY,{children:[e.subLinks.map(function(e){var t,n=et&&(null===(t=e.target)||void 0===t?void 0:t.startsWith("/factorform")),r=n?en:e.target;return(0,l.tZ)(c.xu,{"data-test-id":"".concat(e.testId),as:"li",children:(0,l.tZ)(eN(),{href:r,passHref:!0,prefetch:!1,legacyBehavior:!0,children:(0,l.tZ)("a",tU(tF({href:r,id:e.id,"data-test-id":e.id,title:null==e?void 0:e.name},n&&{target:"_blank",rel:"noopener noreferrer"}),{onClick:function(){d(e,e.target)}
1,children:(0,l.tZ)(c.xu,{tabIndex:-1,children:(0,l.tZ)(c.xu,{display:"inline-block",position:"relative",paddingLeft:"xs",width:"100%",backgroundColor:g?"alias.selected.background.secondary.default":"transparent",color:g?"primary.600":"neutral.800",borderLeftStyle:"solid",borderLeftColor:g?"alias.interactive.border.default":"transparent",borderLeftWidth:"4px",pseudo:{":hover":{backgroundColor:"alias.accent.alternative.hover",borderLeftStyle:"solid",borderLeftColor:g?"alias.interactive.border.default":"transparent",borderLeftWidth:"4px"},":focus":{backgroundColor:"alias.selected.background.secondary.default",borderLeftStyle:"solid",borderLeftColor:g?"alias.interactive.border.default":"transparent",borderLeftWidth:"4px"},":active":{borderLeftColor:g?"alias.accent.alternative.pressed":"transparent",borderLeftStyle:"solid",borderLeftWidth:"4px",backgroundColor:"alias.accent.alternative.pressed"}},children:(0,l.tZ)(c.xu,{id:e.id,"data-test-id":e.testId,textAlign:"left",paddingLeft:"xs",paddingRight:"sm-2",paddingY:"sm-2",children:(0,l.tZ)(c.xv,{type:g?"body-md-bold":"body-md-regular",color:"inherit",children:e.name})})})})}))},e.id)},e.id)}),(0,l.tZ)(c.xu,{as:"li","aria-hidden":"true",borderTopWidth:1,borderTopStyle:"solid",borderTopColor:"neutral.300"})]});if(I)return(0,l.tZ)(c.xu,{as:"li",listStyle:"none",children:(0,l.tZ)(tR.$,{children:(0,l.tZ)(tO,{link:e,href:h,isActive:g})})},e.id);var D=et&&(null===(y=e.target)||void 0===y?void 0:y.startsWith("/factorform")),T=D?en:h,R=et&&$!==tj.M.factorform&&!!(null===(b=e.target)||void 0===b?void 0:b.startsWith("/factorform"));return(0,l.tZ)(c.i9.Item,{id:e.id,href:T,title:e.name,selected:g,icon:tW&&(0,l.tZ)(tW,{icon:e.icon}),onClick:(t={link:e,href:h,finalHref:T,shouldUseShopifyUrl:D,isFreshAchievements:w,isLoyaltyProgram:k,isLoyaltyProgramV2:_,isFormerViewingMenu:Z,isGettingStarted:x,isNotificationsUs:O},function(e){var n,r,o=er.onLinkClick,i=er.pushGTM,a=er.trackFormerViewMenuClick,l=er.hasWelcomeSpaceExperiment,u=er.welcomeSpacePath,c=er.routerPush,s=er.hasNudge,d=er.mutate,f=er.handleRemoveNotificationBubble,v=t.link,p=t.href,y=t.finalHref,b=t.shouldUseShopifyUrl,m=t.isFreshAchievements,h=t.isLoyaltyProgram,g=t.isLoyaltyProgramV2,w=t.isFormerViewingMenu,O=t.isGettingStarted,k=t.isNotificationsUs;o(v,p),i({isFreshAchievements:m,isLoyaltyProgram:h,isLoyaltyProgramV2:g,id:null!==(n=null==v?void 0:v.id)&&void 0!==n?n:"",name:null!==(r=null==v?void 0:v.name)&&void 0!==r?r:""}),w&&a(),O&&l&&null!=u&&""!==u&&(e.preventDefault(),c({pathname:u})),h&&null!=v.target&&""!==v.target&&(e.preventDefault(),c(v.target)),m&&s&&d({loyalty_program_onboarding_show_label:!1}),k&&f(),b&&!e.defaultPrevented&&(e.preventDefault(),window.open(y,"_blank","noopener,noreferrer"))}),children:(0,l.tZ)(t_,{dataTestId:tS(e),linkName:null!==(m=e.name)&&void 0!==m?m:"",showExternalLinkArrow:!!R,showNudge:!!((null==e?void 0:e.hasNudge)||P||k&&C||j),showNewBadge:!!(null==e?void 0:e.hasNotification),showNotificationDot:!!(O&&B)})},e.id)})})},tz=n(518448),tG=n(882482),tY=n(108919),tJ=n(127639),t$=n(479922),tK=function(){var e=(0,tb.py)({runUsingStatsig:!0}),t=e.decide,n=e.isReady,r=(0,tm.R)({runUsingStatsig:!0}),o=r.id,i=r.attributes,a=r.isReady,l=(0,t$.Z)(),c=(0,u.useRef)(!1);return n&&a?{isReady:!0,isAllocatedToVariation:function(e){var n=(t({experimentKey:"xsell_mvp_multi_subscription_hf",experimentationUserId:o,experimentationUserAttributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},i,e)})||{}).variationKey;return n&&(null==l?void 0:l.setAttributes)&&!c.current&&(l.setAttributes({experiment_key:"xsell_mvp_multi_subscription_hf",variation_key:n}),c.current=!0),!!n&&"control"!==n}}:{isReady:!1}},tQ=n(722818),t0=function(){var e=tK(),t=(0,tQ.Z)({experimentReady:e.isReady});return!!e.isReady&&!!t.passesAllEligibilityChecks&&e.isAllocatedToVariation(t.decisionParams)},t1=n(32074),t2=function(){var e=(0,f.Z)()===v.Z.goodchop,t=(0,t1.CR)({},{suspense:!1,enabled:e}),n=t.data,r=t.isLoading,o=t.isError,i=(0,F.u)({},{suspense:!1}).data,a=!!(n&&n.length>0),l=i&&i.count>0;return{shouldShow:e&&a&&!l,isLoading:r,isError:o}},t3=n(346962),t8=n(250982),t6=n(789586),t4=n(788248),t5=n(463171);function t7(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t9(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function ne(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function nt(e){return function(e){if(Array.isArray(e))return t7(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return t7(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t7(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var nn=(0,c.q)(c.xu),nr={as:"ul",margin:"global.none",padding:"global.none",listStyle:"none"},no=function(e){var t=e.showDrawer,n=e.setShowDrawer,r=(0,k.j)({},{suspense:!1}).data,o=th(),i=(0,t5.Z)("cookbook_web_preview_enabled").isEnabled,a=(0,z.Z)(),s=a.isVisible,d=a.isV2Visible,f=(0,tP.xY)(),v=(0,tY.w)(),p=(0,t3.x)().isMealShakeEnabled,y=(0,t8.P)().isCreatineEnabled,b=null==r?void 0:r.id,m=(0,C.x)({customerId:b},{enabled:!!b,suspense:!1}).data,h=eR(!0),g=h.discountWithShippingFee,w=h.creditForCustomer,O=(0,F.u)({},{suspense:!1}),_=O.isFetched,S=O.data,Z=S&&S.count>0,x=eD(),P=(0,B.f)("mobile-navigation-customer-no-subscriptions"),j=(0,B.f)("mobile-navigation-customer",{token:(null==m?void 0:m.token)||"",discountForFriend:g||"",creditForCustomer:w||""},o),A=(0,B.f)("mobile-navigation-weight-loss-program-customer"),I=_&&!Z?P:j,E=null==I?void 0:I.links;if(f===tj.M.factorform){var D,T,R,L,N,M,V=tJ.RK,G=V[1],J=null!==(M=G.subLinks)&&void 0!==M?M:[],$=nt(p?[tJ.Um]:[]).concat(nt(y?[tJ.QJ]:[]));E=nt(V.slice(0,1)).concat([ne(t9({},G),{subLinks:nt(J).concat(nt($))})],nt(V.slice(2))).filter(function(e){var t;return!!Z||!(null===(t=e.tags)||void 0===t?void 0:t.includes("logged_in"))})}x&&(E=(null==A?void 0:A.links)||[]);var K=(0,B.f)("extra-navigation"),Q=(0,B.f)("extra-navigation-weight-loss-program"),et=x?null==Q?void 0:Q.links:null==K?void 0:K.links,en=ek(),er=en.availableLocales,eo=en.renderLanguageToggle,ei=en.isTranslationDropdownEnabled,ea=(0,X.O)().locale,el=(0,U.Z)(),eu=(0,H.t)().asPath,ec=(0,B.H)(),es=null===(D=ec("xsell-top-nav-link"))||void 0===D?void 0:D.value,ed=null===(T=ec("otp-top-nav-link"))||void 0===T?void 0:T.value,ef=t0(),ev=t2().shouldShow,ep=u.useMemo(function(){return ef&&(null==et?void 0:et.length)&&es?nt(et).concat([{brand:"hellofresh",id:"link_my-menu_cross-sell_hf-factor",name:es,icon:"none",iconDesktop:"none",tags:["x-sell","factor"],target:"/x-sell-factor/landing?entry-point=navigationItem",groupIndex:void 0}]):et},[ef,es,et]),ey=u.useMemo(function(){return ev&&E&&ed?[{brand:"goodchop",id:"link_one-time-orders_good-chop_mobile",name:ed,icon:"my-deliveries",iconDesktop:"none",tags:[],target:"/one-time-deliveries",testId:"OneTimeOrdersLinkMobile","aria-label":"Navigate to ".concat(ed," page")}].concat(nt(E)):E},[ev,E,ed]),eb=(null==r?void 0:r.freebiesNotSentCount)&&(null==r?void 0:r.freebiesNotSentCount)>0,eh=((null==r?void 0:r.boxesReceived)||0)>0;(0,u.useEffect)(function(){t?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[t]),(0,u.useEffect)(function(){return window.addEventListener("keydown",eg),function(){return window.removeEventListener("keydown",eg)}},[]);var eg=function(e){"keydown"===e.type&&"Escape"===e.key&&n(!1)},ew=function(){n(!1)},eO=ee().setLinkAsVisited,e_=function(e,t){em("navbarClick","".concat(e.name,"|").concat(t||e.target)),t&&"/account-settings/subscription-settings"===e.target&&(window.location.href=t),eO(e),ew()},eS=q()(ep,function(e){return e.groupIndex}),eZ=ec("greetings-v1"),ex=(0,c.Yz)(t,c.uT.slideRight),eP=(0,c.Yz)(t,{from:{opacity:0}
1,enter:{opacity:.4},leave:{opacity:0},config:{duration:200}}),ej=(0,t6.s)(),eC=(0,t4.f)().isPremiumFamily,eA=null==S?void 0:null===(R=S.items)||void 0===R?void 0:R.find(function(e){return null==e?void 0:e.isActive}),eI=null==eA?void 0:null===(N=eA.productType)||void 0===N?void 0:null===(L=N.family)||void 0===L?void 0:L.handle;return(0,l.BX)(l.HY,{children:[ex(function(e,n){return n&&(0,l.BX)(nn,{"data-test-id":"customer-header-drawer-container",position:"fixed",top:"0",left:"0",bottom:"0",height:"100%",backgroundColor:"alias.elevation.base",boxShadow:"shadow-md",overflowX:"hidden",width:"250px",zIndex:5,transform:"translate3d(0%, 0, 0)",style:e,children:[(0,l.tZ)(tG._,{label:"".concat(null==eZ?void 0:eZ.value).concat((null==r?void 0:r.firstName)?el===W.Z.jaJP?(null==r?void 0:r.lastName)?", ".concat(null==r?void 0:r.lastName,"様"):"":", ".concat(null==r?void 0:r.firstName):""),shouldShowPremiumBadge:ej&&eC(eI)}),(0,l.tZ)(c.xu,ne(t9({id:_&&!Z?"mobile-drawer-links-navigation-customer-no-subscriptions":"mobile-drawer-links-navigation-customer"},nr),{as:"div",children:(0,l.tZ)(tX,{showDrawer:t,links:ey,asPath:eu,onClick:e_,tagFilterList:{recycling:"de"===el.toLowerCase(),with_freebies:!!eb,no_freebies:!eb,loyalty_program_rewards:s,loyalty_program_v2:d,no_loyalty_program:!s&&!d,show_wallet:(s||d)&&(v||!f),show_past_orders:eh,social_bridge_cookbook:i},parameterList:{token:null==m?void 0:m.token},availableLocales:er,currentLocale:ea})})),(0,l.tZ)(c.xu,{borderTopWidth:1,borderTopStyle:"solid",borderTopColor:"neutral.300"}),(0,l.tZ)(c.xu,{children:Object.keys(eS).map(function(e){var n=eS[e];return(0,l.tZ)(c.xu,ne(t9({borderWidth:1,borderTopStyle:"solid",borderTopColor:"neutral.300",pseudo:{":first-of-type":{borderTopWidth:0}}},nr),{as:"div",children:(0,l.tZ)(tX,{links:n,asPath:eu,onClick:e_,showDrawer:t,tagFilterList:{with_freebies:!!eb,no_freebies:!eb},availableLocales:er,currentLocale:ea})}),e)})}),eo&&(0,l.tZ)(c.xu,{display:["block","block","flex"],padding:"sm-1",width:"250px",alignItems:"center",justifyContent:"center",children:(0,l.tZ)(tz.Z,{renderLanguageToggle:eo,availableLocales:er,asPath:eu,currentLocale:ea,mergeQueryParams:td.CX,sendNavigationEvent:em,isTranslationDropdownEnabled:ei,dataTestId:"customer-header-menu-item-translation-button-mobile"})})]})}),eP(function(e,t){return t&&(0,l.tZ)(Y,{handleCloseMenu:ew,style:e})})]})},ni=function(){return(0,l.tZ)(c.xu,{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"-5px",right:"-5px",width:"14px",height:"14px",backgroundColor:"error.600",borderRadius:"border-radius-circle",zIndex:1,p:"global.xs"})};function na(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var nl=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,I.Z)("hf_saw_entry_notification_viewed"))||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),2!==i.length);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return na(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return na(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.")}(),n=t[0],r=t[1],o=(0,u.useCallback)(function(){"true"!==n&&r("true")},[n,r]);return{isNotificationVisible:(0,u.useCallback)(function(){return"true"!==n},[n])(),handleRemoveWalletNotificationDot:o}},nu=n(660802),nc=n(509370),ns=n(376707),nd=n(271249),nf=n(264800),nv=n(66077),np=n(26730),ny={customEntryPoint:"wallet",overrides:[{brand:v.Z.hellofresh,values:{customEntryPoint:"percentage"}},{systemCountry:np.Z.MR,values:{customEntryPoint:"tag"}}]},nb=(0,nv.Z)("wl.custom-wallet-entrypoint",ny).useConfig,nm=function(){switch(nb().customEntryPoint){case"tag":return(0,l.tZ)(c.JO,{icon:(0,l.tZ)(nf.default,{}),color:"inherit"});case"percentage":return(0,l.tZ)(c.JO,{icon:(0,l.tZ)(nd.default,{}),color:"inherit"});default:return(0,l.tZ)(c.JO,{icon:(0,l.tZ)(e9.default,{}),color:"inherit"})}},nh=n(648696),ng=function(){var e,t,n=(0,f.Z)()===v.Z.goodchop,r=(0,nh.w)(n),o=(0,F.u)({},{suspense:!1,enabled:n}).data;if(!n)return!1;
1var i=(null==r?void 0:null===(e=r.promises[0])||void 0===e?void 0:e.voucherCode)||"",a=(null==o?void 0:null===(t=o.items[0])||void 0===t?void 0:t.firstBoxDelivered)||!1;return i.startsWith("TB")&&!a},nw=n(164528);function nO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var nk=function(e){var t,n=e.isDesktop,r=(0,f.Z)(),o=(0,H.t)(),i=(0,eV.Z)().push,a=(0,tY.w)(),u=(0,nu.Z)(),d=u.getVariation,p=u.getTranslationKey,y=(0,nw.ZP)("wallet").translateRaw,b=(0,z.Z)(),m=b.isVisible,h=b.isV2Visible,g=b.isEnabled,w=b.isV2Enabled,O=b.isFetched,k=nl(),_=k.isNotificationVisible,S=k.handleRemoveWalletNotificationDot,Z=r===v.Z.hellofresh?"/my-account/wallet":"/wallet",x=function(e){if(Array.isArray(e))return e}(t=o.asPath.split("?"))||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),2!==i.length);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return nO(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nO(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.")}(),P=(x[0],x[1]),j=P?"".concat(Z,"?").concat(P):Z,C=o.asPath.indexOf(Z)>-1,A=(0,tP.xY)(),I=ng(),E=y(p(d(),nc.y.HEADER_TITLE));return!a||A||(g||w)&&!O||m||h||I?null:(0,l.tZ)(s.Z,{componentName:"wallet-entry-point",children:(0,l.tZ)(c.i9.Inline,{children:(0,l.tZ)(c.i9.Item,{id:void 0!==n&&n?"wallet-navigation-link-desktop":"wallet-navigation-link-mobile",href:j,selected:C,title:E,onClick:function(){S(),i({event:"gaEventTrigger",event_name:"Navigation_walletNavbar",gaEventCategory:"navigation",gaEventAction:"navbarClick",gaEventLabel:"wallet"})},icon:(0,l.BX)(c.xu,{position:"relative",display:"inline-block",verticalAlign:"middle",children:[_&&(0,l.tZ)(ni,{}),(0,l.tZ)(nm,{})]}),children:(0,l.tZ)(c.xu,{as:"span",display:["none","none","block"],children:(0,l.tZ)(ns.w,{location:nc.y.HEADER_TITLE})})})})})};function n_(){return(n_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var nS=function(e){var t=n_({},function(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}(e));return(0,l.tZ)(m.Z,{suspense:!0,children:(0,l.tZ)(nk,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},t))})},nZ=n(268481),nx=n(612771),nP=n(58295),nj=n(394114);function nC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var nA="hf_loyalty_program_beta_notification_dismissed",nI=function(){var e,t,n=(0,z.Z)().payload.optIn,r=function(e){if(Array.isArray(e))return e}(e=(0,I.Z)("hf_loyalty_program_beta_notification_dismissed_count"))||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),2!==i.length);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return nC(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nC(e,2)}}
1(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.")}(),o=r[0],i=void 0===o?"0":o,a=r[1],l=function(){try{return"true"===sessionStorage.getItem(nA)}catch(e){return!1}};return{show:!l()&&3>Number(i)&&(null===(t=n.extra)||void 0===t?void 0:t.canOptIn),dismissNotification:function(){l()||a("".concat(Number(i)+1));try{sessionStorage.setItem(nA,"true")}catch(e){}}}},nE=function(){var e,t=(0,H.t)().asPath,n=(0,eV.Z)().push,r=(0,nZ.Sj)()===nx.P.desktop,o=(0,f.Z)()===v.Z.hellofresh,i=(0,B.H)(),a=nI(),u=a.show,s=a.dismissNotification,d=null===(e=i("loyalty-program-rewards"))||void 0===e?void 0:e.value,p=o?"/my-account/loyalty":"/loyalty",y=(0,td.vg)(t,p),b=(0,nj.ZP)(),m=b.customer_id,h=b.subscription_id;return d?(0,l.tZ)(tg.Z,{componentName:o?"loyalty-program.hellofresh.v1.navigation":"loyalty-program.whitelabel.navigation",children:(0,l.tZ)(c.rU,{href:p,"data-test-id":r?"loyalty-program-navigation-link-desktop":"loyalty-program-navigation-link-mobile",textDecorationLine:"none",noStyle:!0,onClick:function(){n({event:"gaEventTrigger",gaEventCategory:"navigation",gaEventAction:"navbarClick",page:"Loyalty Program",event_name:"Navigation_NavbarClick",gaEventLabel:"loyaltyProgram",user_action:"navbarClick",element:"loyaltyProgram",customer_id:m,subscription_id:h}),s()},title:d,"aria-label":d,children:(0,l.tZ)(c.xu,{position:"relative",children:(0,l.BX)(c.xu,{px:"sm-2",position:"relative",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:["60px","56px"],color:y?"primary.600":"neutral.800",lineHeight:"line-height-md-1",borderBottomColor:y?"primary.600":"transparent",borderBottomStyle:"solid",fontWeight:y?"body-bold":"body-regular",borderBottomWidth:y?4:0,pt:y?"xxs":"zero",pseudo:{":hover":{backgroundColor:"alias.elevation.background.level-1.hover"},":active":{backgroundColor:"alias.elevation.background.level-1.press"}},backgroundColor:y?"alias.selected.background.secondary.default":"alias.elevation.base",children:[(0,l.BX)(c.xu,{position:"relative",display:"inline-block",verticalAlign:"middle",children:[u&&(0,l.tZ)(c.xu,{position:"absolute",top:"-8px",right:"-6px",width:"16px",height:"16px",backgroundColor:"error.600",borderRadius:"border-radius-circle",zIndex:1}),(0,l.tZ)(c.JO,{icon:y?(0,l.tZ)(nP.default,{"data-test-id":"trophy-icon-active"}):(0,l.tZ)(e8.default,{"data-test-id":"trophy-icon"}),color:"inherit"})]}),(0,l.tZ)(c.xu,{ml:"xs",display:["none","none","block"],children:d})]})})})}):null},nD=n(53337),nT=n(285087);function nR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nL(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function nN(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){nL(i,r,o,a,l,"next",e)}function l(e){nL(i,r,o,a,l,"throw",e)}a(void 0)})}}function nB(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return nR(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nR(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nM(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}var nV="hf_loyalty_program_nav_animation_completed",nq={duration:300,easing:c.Gk.easeInOutCubic},nH={duration:600,easing:c.Gk.linear},nF="-100%",nU="".concat(554.5454545454546,"%"),nW=function(e){var t=e.shouldAnimate,n=e.shouldForce,r=(0,nZ.Sj)()===nx.P.desktop,o=(0,nT.l)(),i=o.getItem,a=o.setItem,l=nB((0,I.Z)("hf_loyalty_program_nav_animation_count",{defaultValue:"0"}),2),u=l[0],s=l[1],d=Number(u)||0,f=!!i(nV),v=n||t&&!f&&d<10,p=nB((0,c.q_)(function(){var e;return{from:{scale:1}
1,to:v?(e=nN(function(e){return nM(this,function(t){switch(t.label){case 0:return[4,e({scale:1,delay:1e3,config:{duration:0}})];case 1:return t.sent(),[4,e({scale:r?1.2:1.3,config:nq})];case 2:return t.sent(),[4,e({scale:1,config:nq})];case 3:return t.sent(),[2]}})}),function(t){return e.apply(this,arguments)}):{scale:1,config:{duration:0}}}},[v]),1)[0],y=nB((0,c.q_)(function(){var e;return{from:{x:nF},to:v?(e=nN(function(e){return nM(this,function(t){switch(t.label){case 0:return[4,e({x:nF,delay:1e3,config:{duration:0}})];case 1:return t.sent(),[4,e({x:nU,config:nH,onRest:function(){a(nV,!0),s(String(d+1))}})];case 2:return t.sent(),[2]}})}),function(t){return e.apply(this,arguments)}):{x:f?nU:nF,immediate:!0}}},[v,f,d]),1)[0];return{sizeAnimatedStyle:p,shimmerAnimatedStyle:{width:"".concat(22,"%"),transform:y.x.to(function(e){return"translateX(".concat(e,")")})}}},nX=function(){var e=(0,tM.L3)().trackJanusEvent;return{trackButtonImpression:(0,u.useCallback)(function(t){var n,r,o,i,a,l,u=null==t?void 0:t.enrollment,c=null==t?void 0:t.optIn,s=null!==(r=null==u?void 0:null===(n=u.extra)||void 0===n?void 0:n.isEnrolled)&&void 0!==r&&r;try{e(tB.be.janusEvent(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({event:tB.be.event({impressionType:tB.w7.NavigatedTo,visibilityThreshold:tB.Mc.Major}),loyaltyProgramIdentity:tB.be.loyaltyProgramIdentity({enrollmentId:s?"".concat(null==u?void 0:null===(o=u.data)||void 0===o?void 0:o.id):null,enrollmentState:s?tB.T_.Enrolled:tB.T_.NotEnrolled,programId:(null==c?void 0:null===(i=c.data)||void 0===i?void 0:i.program_id)?"".concat(c.data.program_id):null})},s&&{loyaltyProgramPointsStatusEntities:[tB.be.loyaltyProgramPointsStatus({pointsBalance:null!==(l=null==u?void 0:null===(a=u.data)||void 0===a?void 0:a.store_points)&&void 0!==l?l:0})]})))}catch(e){(0,tN.Tb)(e,{tags:{event:"MyOrders_Button_LoyaltyEntryPoint_Impression",component:"useMyOrdersButtonLoyaltyEntryPointImpressionSnowplowEvent"}})}},[e])}},nz=n(801587),nG=function(){var e=(0,tM.L3)().trackJanusEvent,t=(0,z.Z)().payloadV2;return{trackPointsNudgeImpression:(0,u.useCallback)(function(){var n,r,o,i,a,l,u=null==t?void 0:t.enrollment,c=null==t?void 0:t.optIn,s=null!==(r=null==u?void 0:null===(n=u.extra)||void 0===n?void 0:n.isEnrolled)&&void 0!==r&&r;try{e(nz.GV.janusEvent({event:nz.GV.event({impressionType:nz.w7.Popup,visibilityThreshold:nz.Mc.Major}),loyaltyProgramIdentity:nz.GV.loyaltyProgramIdentity({enrollmentId:s?"".concat(null==u?void 0:null===(o=u.data)||void 0===o?void 0:o.id):null,enrollmentState:s?nz.T_.Enrolled:nz.T_.NotEnrolled,programId:(null==c?void 0:null===(i=c.data)||void 0===i?void 0:i.program_id)?"".concat(c.data.program_id):null}),loyaltyProgramPointsStatus:nz.GV.loyaltyProgramPointsStatus({pointsBalance:null!==(l=null==u?void 0:null===(a=u.data)||void 0===a?void 0:a.store_points)&&void 0!==l?l:0})}))}catch(e){(0,tN.Tb)(e,{tags:{event:"MyOrders_Modal_LoyaltyPointsNudge_Impression",component:"useMyOrdersModalLoyaltyPointsNudgeImpressionSnowplowEvent"}})}},[e,t])}},nY=n(82700),nJ=function(){var e=(0,tM.L3)().trackJanusEvent;return{trackRewardsHubButtonClick:(0,u.useCallback)(function(t){var n,r,o,i,a,l,u=null==t?void 0:t.enrollment,c=null==t?void 0:t.optIn,s=null!==(r=null==u?void 0:null===(n=u.extra)||void 0===n?void 0:n.isEnrolled)&&void 0!==r&&r;try{e(nY.P1.janusEvent(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({loyaltyProgramIdentity:nY.P1.loyaltyProgramIdentity({enrollmentId:s?"".concat(null==u?void 0:null===(o=u.data)||void 0===o?void 0:o.id):null,enrollmentState:s?nY.T_.Enrolled:nY.T_.NotEnrolled,programId:(null==c?void 0:null===(i=c.data)||void 0===i?void 0:i.program_id)?"".concat(c.data.program_id):null}
1),uiModal:nY.P1.uiModal({uiModalName:nY.E5.LoyaltyEntryPoint})},s&&{loyaltyProgramPointsStatusEntities:[nY.P1.loyaltyProgramPointsStatus({pointsBalance:null!==(l=null==u?void 0:null===(a=u.data)||void 0===a?void 0:a.store_points)&&void 0!==l?l:0})]})))}catch(e){(0,tN.Tb)(e,{tags:{event:"MyOrders_View_RewardsHub_Button_Click",component:"useMyOrdersViewRewardsHubButtonClickSnowplowEvent"}})}},[e])}};function n$(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nK(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function nQ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return n$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return n$(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var n0={duration:600,easing:c.Gk.easeInOutCubic},n1=function(e){var t=e.pointsBalance,n=e.shouldAnimate,r=(0,U.Z)(),o=nQ((0,I.Z)("hf_loyalty_program_nav_previous_points",{defaultValue:"0"}),2),i=o[0],a=o[1],l=Number(i||0),s=Number.isFinite(l)?l:t,d=n&&s!==t,f=t<s,v=d&&!f,p=Intl.NumberFormat(r),y=f?-100:100,b=f?100:-100,m=nQ((0,c.q_)(function(){var e,n;return{from:{outgoingY:0,incomingY:d?y:0,outgoingOpacity:1,incomingOpacity:d?0:1},to:d?(e=function(e){return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}(this,function(n){switch(n.label){case 0:return[4,e({outgoingY:b,incomingY:0,outgoingOpacity:0,incomingOpacity:1,delay:1e3,config:n0,onRest:function(){a(String(t))}})];case 1:return n.sent(),[2]}})},n=function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){nK(i,r,o,a,l,"next",e)}function l(e){nK(i,r,o,a,l,"throw",e)}a(void 0)})},function(e){return n.apply(this,arguments)}):{outgoingY:0,incomingY:0,outgoingOpacity:1,incomingOpacity:1,config:{duration:0}}}},[d]),1)[0],h=(0,u.useMemo)(function(){return{transform:m.outgoingY.to(function(e){return"translateY(".concat(e,"%)")}),opacity:m.outgoingOpacity}},[m.outgoingOpacity,m.outgoingY]),g=(0,u.useMemo)(function(){return{transform:m.incomingY.to(function(e){return"translateY(".concat(e,"%)")}),opacity:m.incomingOpacity}},[m.incomingOpacity,m.incomingY]),w=d?p.format(s):p.format(t);return{isAnimating:d,isAnimatingIncrease:v,previousPointsFormatted:w,newPointsFormatted:p.format(t),previousPointsStyle:h,newPointsStyle:g}},n2=(0,c.q)(c.xu),n3=function(e){var t=e.canOptIn,n=e.pointsBalance,r=e.rewardsLabel,o=e.shouldAnimate,i=e.isWhatsNewAnimating,a=e.whatsNewPointsStyle,u=e.whatsNewTextStyle,s=e.whatsNewText,d=e.lineHeight,f=n1({pointsBalance:n,shouldAnimate:o}),v=f.isAnimating,p=f.newPointsFormatted,y=f.previousPointsFormatted,b=f.previousPointsStyle,m=f.newPointsStyle;return(0,l.tZ)(c.xu,{"data-test-id":"loyalty-program-pill-points",ml:"global.xxs",display:["none","none","block"],lineHeight:d,children:t||0===n?r:void 0!==i&&i&&a&&u?(0,l.BX)(c.xu,{as:"span",display:"inline-grid",lineHeight:d,overflow:"hidden",
1whiteSpace:"nowrap",children:[(0,l.tZ)(n2,{as:"span",gridArea:"1 / 1",display:"flex",alignItems:"center",justifyContent:"center",zIndex:2,style:a,children:p}),(0,l.tZ)(n2,{as:"span",gridArea:"1 / 1",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1,style:u,children:s})]}):v?(0,l.BX)(c.xu,{as:"span",display:"inline-grid",lineHeight:d,overflow:"hidden",whiteSpace:"nowrap",children:[(0,l.tZ)(n2,{as:"span",gridArea:"1 / 1",display:"flex",alignItems:"center",justifyContent:"flex-start",zIndex:2,style:b,children:y}),(0,l.tZ)(n2,{as:"span",gridArea:"1 / 1",display:"flex",alignItems:"center",justifyContent:"flex-start",zIndex:1,style:m,children:p})]}):p})},n8=["global.transparent","global.transparent","global.factor-cyan.800"],n6={isRedesignEnabled:!1,rewardsRoute:"/rewards",backgroundColor:"global.hellofresh.loyalty-purple.600",redesignBackgroundColor:"#662D55",borderRadius:"global.pill",paddingX:["global.xxs","global.xxs","global.xs"],paddingY:"global.xxs",lineHeight:"line-height-md-1",iconPath:null,iconSize:[16,16,16],overrides:[{brand:v.Z.factor,values:{isRedesignEnabled:!0,rewardsRoute:"/loyalty#use",backgroundColor:n8,redesignBackgroundColor:n8,borderRadius:"alias.tag-action",paddingX:["zero","zero","alias.tag.md.padding-x"],paddingY:["zero","zero","global.xxs"],lineHeight:"line-height-md-2",iconPath:"/hellofresh_website/loyalty/images/factor-v2/logo/icon.svg",iconSize:[32,32,16]}}]},n4=(0,nv.Z)("loyalty-program-v2.component-config.navigation",n6).useConfig,n5=n(340332),n7=n(449551),n9=function(){var e=(0,n7.Z)(),t=(0,U.Z)();return function(n){return(0,n5.xG)(n,{locale:t,decimals:0,country:e})}},re=n(249372),rt=function(){var e=(0,tM.L3)().trackJanusEvent,t=(0,z.Z)().payloadV2;return{trackRewardsStoreLinkClick:(0,u.useCallback)(function(){var n,r,o,i,a,l,u=null==t?void 0:t.enrollment,c=null==t?void 0:t.optIn,s=null!==(r=null==u?void 0:null===(n=u.extra)||void 0===n?void 0:n.isEnrolled)&&void 0!==r&&r;try{e(re.IZ.janusEvent({loyaltyProgramIdentity:re.IZ.loyaltyProgramIdentity({enrollmentId:s?"".concat(null==u?void 0:null===(o=u.data)||void 0===o?void 0:o.id):null,enrollmentState:s?re.T_.Enrolled:re.T_.NotEnrolled,programId:(null==c?void 0:null===(i=c.data)||void 0===i?void 0:i.program_id)?"".concat(c.data.program_id):null}),loyaltyProgramPointsStatus:re.IZ.loyaltyProgramPointsStatus({pointsBalance:null!==(l=null==u?void 0:null===(a=u.data)||void 0===a?void 0:a.store_points)&&void 0!==l?l:0})}))}catch(e){(0,tN.Tb)(e,{tags:{event:"MyOrders_View_RewardsStore_Link_Click",component:"useMyOrdersViewRewardsStoreLinkClickSnowplowEvent"}})}},[e,t])}};function rn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return rn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rn(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ro=function(e){var t=e.points,n=(0,nw.ZP)("loyalty").translateRaw,r=n4().rewardsRoute,o=n9(),i=(0,eV.Z)().push,a=(0,H.t)(),l=rt().trackRewardsStoreLinkClick,c=rr((0,u.useState)(!0),2),s=c[0],d=c[1],f=null==t?null:t>=6e3?"6k":t>=1e3?"1k":null,v=rr((0,I.Z)("hf_loyalty_v2_rewards_tooltip_shown_1k"),2),p=v[0],y=v[1],b=rr((0,I.Z)("hf_loyalty_v2_rewards_tooltip_shown_6k"),2),m=b[0],h=b[1],g=s&&null!==f&&("6k"===f?m:p)!=="true",w=(0,u.useCallback)(function(){"6k"===f?h("true"):"1k"===f&&y("true")}
1,[f,y,h]),O=(0,u.useCallback)(function(e,n){null!=f&&null!=t&&i({event:e,eventCategory:"loyaltyProgram",eventAction:n,eventLabel:"",trigger_type:"6k"===f?"6000":"1000",points_balance:t,platform:"web"})},[i,f,t]),k=(0,u.useRef)(null);(0,u.useEffect)(function(){g&&null!=f&&k.current!==f&&(k.current=f,O("Loyalty_Tooltip_Nudge_Shown","shown"))},[g,f,O]);var _=(0,u.useCallback)(function(e,t){O(e,t),w(),d(!1)},[O,w]),S=(0,u.useCallback)(function(){_("Loyalty_Tooltip_Nudge_CTA_Tapped","cta_tapped"),l(),a.push(r)},[_,a,l,r]),Z=(0,u.useCallback)(function(){_("Loyalty_Tooltip_Nudge_Dismissed","dismissed")},[_]),x=o(3e3);return{shouldShow:g,pointsTier:f,tooltipProps:{visible:g,message:"6k"===f?n("loyalty.rewards_store.tooltip_6k_message",{discount:x}):n("loyalty.rewards_store.tooltip_1k_message"),ctaText:n("6k"===f?"loyalty.rewards_store.tooltip_6k_cta":"loyalty.rewards_store.tooltip_1k_cta"),onPress:S,onDismiss:Z,a11y:{dismissLabel:n("loyalty.rewards_store.tooltip_dismiss_label"),dismissHint:n("loyalty.rewards_store.tooltip_dismiss_hint"),contentHint:n("loyalty.rewards_store.tooltip_content_hint")},testId:"rewards-tooltip"}}};function ri(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ra=function(e,t){var n,r=function(e){if(Array.isArray(e))return e}(n=(0,u.useState)(0))||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),2!==i.length);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(n,2)||function(e,t){if(e){if("string"==typeof e)return ri(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ri(e,2)}}(n,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=r[0],i=r[1];return(0,u.useEffect)(function(){var n,r=e.current;if(t&&r){var o=r.getBoundingClientRect(),a=function(){var e=r.getBoundingClientRect();(e.top!==o.top||e.left!==o.left)&&(o=e,i(function(e){return e+1})),n=requestAnimationFrame(a)};return n=requestAnimationFrame(a),function(){return cancelAnimationFrame(n)}}},[e,t]),o},rl=function(e){var t,n,r=e.children,o=e.onVisibilityChange,i=(0,z.Z)().payloadV2,a=ro({points:null==i?void 0:null===(n=i.enrollment)||void 0===n?void 0:null===(t=n.data)||void 0===t?void 0:t.store_points}),s=a.shouldShow,d=a.pointsTier,f=a.tooltipProps,v=f.visible,p=f.message,y=f.ctaText,b=f.onPress,m=f.onDismiss,h=f.a11y,g=f.testId,w=(0,u.useRef)(null),O=ra(w,v);if((0,u.useEffect)(function(){null==o||o(s)},[s,o]),!s)return(0,l.tZ)(l.HY,{children:r});var k=(0,l.tZ)(tg.Z,{componentName:"loyalty-program.v2.navigation.tooltip",attributes:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},d&&{"loyalty-component-type":d}),children:(0,l.BX)(c.xu,{display:"flex",flexDirection:"column",gap:"xs",minWidth:"15.0625rem",children:[(0,l.tZ)(c.xv,{type:"body-md-regular",children:p}),(0,l.tZ)(c.rU,{href:" ",onClick:function(e){e.stopPropagation(),e.preventDefault(),b()},"aria-label":"".concat(y," ").concat(h.contentHint),"data-testid":"".concat(g,"-cta"),type:"body-sm-regular",lineHeight:"line-height-sm-1",children:y})]})});return(0,l.tZ)(c.pM,{ref:w,asChild:!0,swapComponent:k,trigger:r,triggerStyles:{padding:0},position:"bottom",placement:"start",isVisible:v,onOpenAutoFocus:function(e){return e.preventDefault()},onOpenChange:function(e){e||m()}
1,onInteractOutside:!1,ariaControlsNudgeId:g||"","data-testid":g,sideOffset:-8},O)},ru=function(e){var t=e.children,n=e.onVisibilityChange;return(0,t5.Z)("rewards_tooltip_home").isEnabled?(0,l.tZ)(rl,{onVisibilityChange:n,children:t}):(0,l.tZ)(l.HY,{children:t})},rc=n(909058);function rs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rd(e){return function(e){if(Array.isArray(e))return rs(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return rs(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rs(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var rf="hf_loyalty_seen_new_reward_ids",rv="hf_loyalty_seen_new_goal_ids",rp=function(e){try{var t=J.ZP.getItem(e);if(!t)return[];var n=JSON.parse(t);return Array.isArray(n)?n:[]}catch(e){return[]}},ry=function(e,t){try{J.ZP.setItem(e,JSON.stringify(t))}catch(e){}},rb=function(){var e,t,n,r=(0,z.Z)(),o=r.payloadV2,i=r.isFetched,a=(0,F.u)({},{suspense:!1}),l=a.data,c=a.isLoading,s=null==l?void 0:null===(e=l.items)||void 0===e?void 0:e.find(function(e){return e.isActive}),d=(null==s?void 0:s.customerPlanId)||"",f=Number((null==s?void 0:s.id)||""),v=(0,rc.Tv)({planId:d,include:["catalog"],catalogScope:"preview",subscriptionId:f},{suspense:!1,enabled:!!d&&!!f}),p=v.data,y=v.isLoading,b=(0,u.useRef)(!1),m={seenRewardIds:(0,u.useMemo)(function(){return rp(rf)},[]),seenGoalIds:(0,u.useMemo)(function(){return rp(rv)},[]),markRewardsAsSeen:(0,u.useCallback)(function(e){var t=rd(new Set(rd(rp(rf)).concat(rd(e))));ry(rf,t)},[]),markGoalsAsSeen:(0,u.useCallback)(function(e){var t=rd(new Set(rd(rp(rv)).concat(rd(e))));ry(rv,t)},[]),cleanupStaleIds:(0,u.useCallback)(function(e,t){var n=rp(rf),r=rp(rv),o=n.filter(function(t){return e.includes(t)}),i=r.filter(function(e){return t.includes(e)});ry(rf,o),ry(rv,i)},[])},h=m.seenRewardIds,g=m.seenGoalIds,w=m.markRewardsAsSeen,O=m.markGoalsAsSeen,k=m.cleanupStaleIds,_=(0,u.useMemo)(function(){return((null==p?void 0:p.catalog)||[]).filter(function(e){var t;return null===(t=e.labels)||void 0===t?void 0:t.includes("new")}).map(function(e){return e.id})},[null==p?void 0:p.catalog]),S=(0,u.useMemo)(function(){var e,t;return((null==o?void 0:null===(t=o.enrollment)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.missions)||[]).filter(function(e){return"not_started"===e.current_progress.status}).map(function(e){return e.id})},[null==o?void 0:null===(n=o.enrollment)||void 0===n?void 0:null===(t=n.data)||void 0===t?void 0:t.missions]),Z=(0,u.useMemo)(function(){return _.filter(function(e){return!h.includes(e)})},[_,h]),x=(0,u.useMemo)(function(){return S.filter(function(e){return!g.includes(e)})},[S,g]),P=Z.length>0||x.length>0,j=!i||c||y;(0,u.useEffect)(function(){j||b.current||(b.current=!0,k(_,S))},[j,_,S,k]);var C=(0,u.useCallback)(function(){Z.length>0&&w(Z),x.length>0&&O(x)},[Z,x,w,O]);return{hasUnseenItems:P,unseenRewardIds:Z,unseenGoalIds:x,newRewardIds:_,newGoalIds:S,markAllAsSeen:C,isLoading:j}};function rm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rh(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function rg(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){rh(i,r,o,a,l,"next",e)}function l(e){rh(i,r,o,a,l,"throw",e)}a(void 0)})}}function rw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return rm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rm(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rO(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}var rk={duration:300,easing:c.Gk.easeInOutCubic},r_={duration:400,easing:c.Gk.easeInOutCubic},rS=function(e){var t=e.shouldAnimate,n=e.isTooltipVisible,r=e.onAnimationComplete,o=(0,u.useRef)(!1),i=rw((0,u.useState)(!1),2),a=i[0],l=i[1],s=rw((0,u.useState)(!1),2),d=s[0],f=s[1],v=rw((0,u.useState)(!0),2),p=v[0],y=v[1];(0,u.useEffect)(function(){var e=function(){y("visible"===document.visibilityState)};return document.addEventListener("visibilitychange",e),function(){document.removeEventListener("visibilitychange",e)}},[]);var b=t&&!n&&p&&!o.current;(0,u.useEffect)(function(){if(b){o.current=!0;var e=setTimeout(function(){f(!0)},2e3);return function(){clearTimeout(e)}}},[b]),(0,u.useEffect)(function(){if(d){var e=setTimeout(function(){f(!1),l(!0),null==r||r()},5e3);return function(){clearTimeout(e)}}},[d,r]);var m=rw((0,c.q_)(function(){var e;return{from:{pointsOpacity:1,newOpacity:0},to:d?(e=rg(function(e){return rO(this,function(t){switch(t.label){case 0:return[4,e({pointsOpacity:0,newOpacity:1,config:rk})];case 1:return t.sent(),[2]}})}),function(t){return e.apply(this,arguments)}):{pointsOpacity:1,newOpacity:0,config:rk}}},[d]),1)[0],h=Math.floor(6.25),g=rw((0,c.q_)(function(){var e;return{from:{scale:1},to:d?(e=rg(function(e){var t;return rO(this,function(n){switch(n.label){case 0:t=0,n.label=1;case 1:if(!(t<h))return[3,5];return[4,e({scale:1.1,config:r_})];case 2:return n.sent(),[4,e({scale:1,config:r_})];case 3:n.sent(),n.label=4;case 4:return t++,[3,1];case 5:return[2]}})}),function(t){return e.apply(this,arguments)}):{scale:1,immediate:!0}}},[d,h]),1)[0];return{isAnimating:d,hasAnimationPlayed:a,pointsTextStyle:(0,u.useMemo)(function(){return{opacity:m.pointsOpacity}},[m.pointsOpacity]),newTextStyle:(0,u.useMemo)(function(){return{opacity:m.newOpacity}},[m.newOpacity]),breathingStyle:(0,u.useMemo)(function(){return{scale:g.scale.to(function(e){return e})}},[g.scale])}};function rZ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function rP(e){return function(e){if(Array.isArray(e))return rZ(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||rj(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rj(e,t){if(e){if("string"==typeof e)return rZ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rZ(e,t)}}var rC=(0,c.q)(c.xu),rA=function(e){var t,n,r,o,i,a,s,d,p=e.isDesktop,y=void 0!==p&&p,b=(0,eV.Z)().push,m=(0,nZ.Sj)()===nx.P.desktop,h=(0,f.Z)()===v.Z.hellofresh,g=n4(),w=(0,B.H)(),O=tL(),k=nX().trackButtonImpression,_=nJ().trackRew
1ardsHubButtonClick,S=nG().trackPointsNudgeImpression,Z=(0,nw.ZP)("loyalty_dashboard").translateRaw,x=(0,t5.Z)("loyalty_what_is_new_nudge").isEnabled,P=function(e){if(Array.isArray(e))return e}(t=(0,u.useState)(!1))||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),2!==i.length);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(t,2)||rj(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.")}(),j=P[0],C=P[1],A=(0,u.useCallback)(function(e){C(e)},[]),I=null===(o=w("loyalty-program-rewards"))||void 0===o?void 0:o.value,E=(0,z.Z)(),D=E.isFetched,T=E.payloadV2,R=!!(null==T?void 0:null===(a=T.optIn)||void 0===a?void 0:null===(i=a.extra)||void 0===i?void 0:i.canOptIn),L=(null==T?void 0:null===(d=T.enrollment)||void 0===d?void 0:null===(s=d.data)||void 0===s?void 0:s.store_points)||0,N=!!(I&&D),M=N&&m&&!R,V=N&&R,q=rb(),H=q.hasUnseenItems,F=q.markAllAsSeen,W=q.isLoading,X=rS({shouldAnimate:x&&H&&!W&&N&&!R,isTooltipVisible:j}),G=X.isAnimating,Y=X.hasAnimationPlayed,J=X.pointsTextStyle,$=X.newTextStyle,K=X.breathingStyle,Q=Z("loyalty_dashboard.missions.pill_text"),ee=(0,U.Z)(),et=Intl.NumberFormat(ee).format(L),en=!R&&L>0,er=I&&en?"".concat(I," ").concat(et):I,eo=nW({shouldAnimate:V,shouldForce:n1({pointsBalance:L,shouldAnimate:M&&!G}).isAnimatingIncrease}),ei=eo.sizeAnimatedStyle,ea=eo.shimmerAnimatedStyle,el=G?{scale:K.scale}:ei,eu=g.isRedesignEnabled?g.redesignBackgroundColor:g.backgroundColor;return((0,u.useEffect)(function(){N&&y&&(b(rx({event_name:"Loyalty_EP_TopNav_RewardsButtonDisplay",gaEventCategory:"loyaltyProgram",gaEventAction:"display",gaEventLabel:"EntryPointTopNav_RewardsButton",element:"loyaltyProgramTopNav_RewardsButton"},O)),k(T))},[D]),(0,u.useEffect)(function(){j&&y&&S()},[j,y]),N)?(0,l.tZ)(tg.Z,{componentName:"loyalty-program.v2.navigation",children:(0,l.tZ)(ru,{onVisibilityChange:A,children:(0,l.tZ)(c.rU,{href:h?"/my-account/loyalty?rewards_hub_entry_point=top_nav_rewards_click":"/loyalty","data-test-id":m?"loyalty-program-navigation-link-desktop":"loyalty-program-navigation-link-mobile",textDecorationLine:"none",noStyle:!0,onClick:function(){b(rx({event_name:"Loyalty_EP_TopNav_RewardsButtonClick",gaEventCategory:"loyaltyProgram",gaEventAction:"click",gaEventLabel:"EntryPointTopNav_RewardsButton",element:"loyaltyProgramTopNav_RewardsButton",entry_point:"top_nav_rewards_click",click_target:"RewardsHub"},O)),_(T),Y&&F()},title:I,"aria-label":er,children:(0,l.tZ)(c.xu,{position:"relative",children:(0,l.tZ)(c.xu,{px:"sm-2",position:"relative",display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:["60px","56px"],color:"neutral.800",lineHeight:"line-height-md-1",fontWeight:"body-bold",pseudo:{":hover":{backgroundColor:"alias.elevation.background.level-1.hover"},":active":{backgroundColor:"alias.elevation.background.level-1.press"}},backgroundColor:"alias.elevation.base",children:(0,l.BX)(rC,{"data-test-id":"loyalty-program-pill",color:"global.white",backgroundColor:eu,pseudo:{":hover":{backgroundColor:eu}},display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",px:g.paddingX,py:g.paddingY,borderRadius:g.borderRadius,lineHeight:g.lineHeight,overflow:"hidden",position:"relative",transformOrigin:"center",style:el,children:[(0,l.BX)(c.xu,{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",position:"relative",zIndex:1,children:[(0,l.tZ)(c.xu,{position:"relative",display:"inline-block",verticalAlign:"middle",width:g.iconSize.map(function(e){return"".concat(e,"px")}),height:g.iconSize.map(function(e){return"".concat(e,"px")}),children:g.iconPath?(0,l.tZ)(to.ZP,{"data-test-id":"loyalty-program-pill-icon",fetchFormat:"svg",src:g.iconPath,alt:"",width:(n=Math).max.apply(n,rP(g.iconSize)),height:(r=Math).max.apply(r,rP(g.iconSize)),style:{display:"block",width:"100%",height:"100%"}}):(0,l.tZ)(c.JO,{icon:(0,l.tZ)(nD.Z,{}),color:"inherit"})}
1),(0,l.tZ)(n3,{lineHeight:g.lineHeight,canOptIn:R,pointsBalance:L,rewardsLabel:I,shouldAnimate:M&&!G,isWhatsNewAnimating:G,whatsNewPointsStyle:J,whatsNewTextStyle:$,whatsNewText:Q})]}),(0,l.tZ)(rC,{"aria-hidden":!0,position:"absolute",top:0,left:0,height:"100%",pointerEvents:"none",zIndex:2,backgroundImage:"linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 35%, rgba(255,255,255,0.55) 50%, rgba(255,255,255,0.2) 65%, rgba(255,255,255,0) 100%)",style:ea})]})})})})})}):null},rI=function(e){var t=e.isDesktop,n=(0,z.Z)(),r=n.isVisible,o=n.isV2Visible;return r||o?(0,l.tZ)(y.Z,{claim:{name:"loyalty",githubTeam:"hellofresh/squad-loyalty-web",tribe:"loyalty-and-virality",alliance:"consumer",jiraPrefix:"LOYA",slackChannel:"#squad-loyalty",slackAlertsChannel:"#squad-loyalty-web-alerts",skipLabelsOnPR:!1,teamIdentifier:"loyalty"},children:(0,l.tZ)(d.Z,{scope:"loyalty-program.beta.navigation-entry-point",fallback:(0,l.tZ)(l.HY,{}),children:(0,l.tZ)(m.Z,{suspense:!0,children:o?(0,l.tZ)(rA,{isDesktop:void 0!==t&&t}):(0,l.tZ)(nE,{})})})}):null},rE=function(e){var t=e.isDesktop,n=(0,z.Z)(),r=n.isEnabled,o=n.isV2Enabled,i=(0,tP.xY)();return(r||o)&&!i?(0,l.tZ)(rI,{isDesktop:void 0!==t&&t}):null},rD=n(200770);function rT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var rR=function(){var e,t=(0,H.t)(),n=t.query,r=t.asPath,o=(0,rD.Z)(),i=(0,tb.py)({runUsingStatsig:!0}),a=i.decide,l=i.isReady,c=(0,tm.R)({runUsingStatsig:!0}),s=c.id,d=c.attributes,f=c.isReady,v=l&&f,p=function(e){if(Array.isArray(e))return e}(e=(0,I.Z)("hf_has_visited_welcome_back_step"))||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),2!==i.length);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return rT(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rT(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.")}(),y=p[0],b=p[1],m=(0,F.u)({},{suspense:!1}).data,h=!!(null==m?void 0:m.count),g=(0,u.useMemo)(function(){return!!(J.ZP.getItem("StoredCouponCode")||J.ZP.getItem("StoredReactivationCouponCode")||J.ZP.getItem("url_coupon_code")||tl().get("StoredReactivationCouponCode")||tl().get("url_coupon_code")||(null==n?void 0:n.c))},[null==n?void 0:n.c]),w=(null==n?void 0:n.utm_medium)==="email"&&o===np.Z.US;if(!((null==r?void 0:r.startsWith("/reactivate"))||(null==r?void 0:r.includes("/account-settings/subscription-settings/reactivate")))||!h||w)return{shouldSeeWelcomeBackStep:!1,isReady:v};if(n.welcomeBack)return{shouldSeeWelcomeBackStep:!0,isReady:v};if(!g)return y||b("1"),{shouldSeeWelcomeBackStep:!1,isReady:v};if(y)return{shouldSeeWelcomeBackStep:!1,isReady:v};if(v){var O=a({experimentKey:"re-3412_dynamic_journey_sprig_wbs",experimentationUserId:s,experimentationUserAttributes:d,options:{disableStickyVariations:!0}}).variationKey;return{shouldSeeWelcomeBackStep:"variation_1"===(void 0===O?"control":O),isReady:v}}return{shouldSeeWelcomeBackStep:!1,isReady:v}},rL=n(998788),rN=n(530099),rB=n.n(rN);function rM(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var rV=function(){var e=(0,F.u)({},{suspense:!1,retry:1}).data;return(0,u.useMemo)(function(){var t;return rq(null!==(t=null==e?void 0:e.items)&&void 0!==t?t:[])},[e])},rq=function(e){if(0!==e.length)return((function(e){if(Array.isArray(e))return rM(e)})(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return rM(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rM(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).sort(function(e,t){return e.canceledAt&&t.canceledAt?rB()(new Date(e.canceledAt),new Date(t.canceledAt)):e.canceledAt?1:t.canceledAt?-1:rB()(new Date(e.createdAt),new Date(t.createdAt))})[0]};function rH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function rF(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var rU={padding:"zero",lineHeight:"line-height-lg-2",display:"flex",alignItems:"center",height:"100%"},rW={height:"100%",paddingTop:"xxs",paddingRight:"sm-2",alignItems:"center"},rX=function(e){var t,n=e.isMobile,r=(0,H.t)(),o=(0,eO.At)(),i=o.logo,a=o.logoRedirectionUrl,u=(null===(t=r.query)||void 0===t?void 0:t.locale)||"",s=rV(),d=(0,tZ.H)(),v=(0,tP.xY)(),p=(0,f.Z)(),y=(0,rL.qc)({isMobile:n,logo:i}),b=y.logoProps,m=y.logoTestId,h=function(){if(v)return a;if(!s)return"/";if(s.productType.family.tags.includes(e_.Z))return"/program-dashboard";var e=d(),t=e.isEnabled,n=e.isReady,r=e.welcomeSpacePath;return t&&n?r:u?"".concat(a,"?locale=").concat(u):a}(),g=rR().shouldSeeWelcomeBackStep;return(0,l.tZ)(c.xu,rF(rH({},rW),{children:g?(0,l.tZ)(c.xu,{"data-test-id":"logo","aria-label":p,children:(0,l.tZ)("img",rF(rH({},b),{alt:"","data-test-id":m}))}):(0,l.tZ)(c.rU,rF(rH({href:h,"data-test-id":"logo","aria-label":p},rU),{prefetch:!1,children:(0,l.tZ)("img",rF(rH({},b),{alt:"","data-test-id":m}))}))}))}
1,rz=n(358351),rG=n(628392),rY=n(37017),rJ=n(636152);function r$(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rK(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return r$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r$(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var rQ=(0,rY.cn)(!1),r0=function(){var e=rK((0,rY.KO)(rQ),2),t=e[0],n=e[1],r=rK((0,I.Z)("hf_hide_raf_nudge",{defaultValue:"false"}),2)[1],o=(0,u.useCallback)(function(){n(!1),r("true")},[n,r]),i=(0,u.useCallback)(function(){n(!1),r("true")},[n,r]);return(0,l.tZ)(rJ.Z,{isOpen:t,onClose:o,onSuccess:i,source:"referrals"})},r1=function(){var e=(0,k.j)({},{suspense:!1}).data,t=null==e?void 0:e.id,n=(null==e?void 0:e.boxesReceived)||0,r=(0,tI.Z)()||"";return function(e){return{event:"gaEventTrigger",event_name:"RAF_LL1EntrypointDashboard",loyalty:n,customer_id:t,hf_week:r,gaEventCategory:"RAFEntrypoint",gaEventAction:"Dashboard",gaEventLabel:e}}},r2=n(151881),r3=n(277425),r8=function(e){var t=e.onLearnMoreClick,n=e.onInviteClick,r=e.onClose,o=(0,r2.b)().translateReferralPromotion;return(0,l.BX)(c.xu,{children:[(0,l.tZ)(c.xu,{display:"flex",justifyContent:"end",children:(0,l.tZ)(c.PZ,{placement:"stand-alone",onClick:r})}),(0,l.BX)(c.xu,{display:"flex",flexDirection:"row",alignSelf:"flex-start",gap:"sm-1",children:[(0,l.tZ)(to.ZP,{height:64,width:64,src:(0,r3.Z)("https://hf-website-live.s3.eu-west-1.amazonaws.com/mr/assets/RafGiftsIllustration.png"),alt:"Gifts Illustration"}),(0,l.BX)(c.xu,{display:"flex",flexDirection:"column",gap:"xs",alignContent:"center",children:[(0,l.BX)(c.xu,{display:"flex",flexDirection:"column",children:[(0,l.tZ)(c.xv,{type:"body-xs-bold",color:"reward.600",children:o("referrals.share.raf-header.nudge.title",{showLoader:!1}).toUpperCase()}),(0,l.tZ)(c.xv,{type:"body-md-bold",children:o("referrals.share.raf-header.nudge.subtitle",{showLoader:!1})})]}),(0,l.tZ)(c.xv,{type:"body-sm-regular",color:"neutral.600",children:o("referrals.share.raf-header.nudge.text",{showLoader:!1})})]})]}),(0,l.BX)(c.xu,{mt:"xs",display:"flex",flexDirection:"row",justifyContent:"end",py:"sm-1",pr:["xxs","sm-1"],gap:["sm-1","md-3"],children:[(0,l.tZ)(c.zx.Tertiary,{size:"sm",width:"auto",onClick:t,children:o("referrals.share.raf-header.nudge.learn-more.cta",{showLoader:!1})}),(0,l.tZ)(c.zx.Primary,{size:"sm",width:"auto",onClick:n,children:o("referrals.share.raf-header.nudge.invite.cta",{showLoader:!1})})]})]})};function r6(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function r4(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return r6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r6(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var r5=function(){var e,t=r4((0,I.Z)("hf_hide_raf_nudge",{defaultValue:"false"}),1)[0],n=t&&JSON.parse(t),r=r4((0,I.Z)("hf_is_reactivation_in_progress"),1)[0],o=(0,k.j)({},{suspense:!1}).data,i=(null==o?void 0:o.boxesReceived)||0,a=(0,H.t)(),l=/\/my-deliveries/.test(a.asPath),u=/\/edit/.test(a.asPath),c=/\/withMenuAddOns/.test(a.asPath),s=l&&!u&&!c,d=(0,F.u)({},{suspense:!1}).data,f=null==d?void 0:null===(e=d.items)||void 0===e?void 0:e[0].reactivationCount;return f&&f>=1?i>=1&&s&&!(r&&r)&&!n:i>
1=1&&s&&!n};function r7(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function r9(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return r7(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r7(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var oe=function(){return r5()?(0,l.tZ)(ot,{}):null},ot=function(){var e=r9((0,I.Z)("hf_hide_raf_nudge",{defaultValue:"false"}),2)[1],t=r9((0,u.useState)(!1),2),n=t[0],r=t[1],o=r9((0,rY.KO)(rQ),2)[1];(0,u.useEffect)(function(){setTimeout(function(){r(!0)},8e3)},[]);var i=(0,H.t)().push,a=(0,eV.Z)(),s=r1();return(0,l.BX)(c.xu,{children:[(0,l.tZ)(c.pM,{maxWidth:"350px",ariaControlsNudgeId:"wl-raf-header-nudge",position:"bottom",placement:"end",layout:"horizontal",trigger:(0,l.tZ)(l.HY,{}),defaultOpen:!0,onInteractOutside:!1,isVisible:n,onOpenChange:function(){return r(!n)},hasCloseButton:!1,avoidCollisions:!1,alignOffset:16,py:"xs",swapComponent:(0,l.tZ)(r8,{onLearnMoreClick:function(){i("/referral"),a.push(s("learnMore")),e("true")},onInviteClick:function(){o(!0),a.push(s("sendABox"))},onClose:function(){e("true"),a.push(s("close"))}})}),(0,l.tZ)(r0,{})]})},on=function(){return(0,l.tZ)(y.Z,{claim:{name:"good-chop-growth",githubTeam:"hellofresh/good-chop-growth",tribe:"new-ventures",alliance:"consumer",jiraPrefix:"GOC",slackChannel:"#squad-nv-good-chop",slackAlertsChannel:"#good-chop-alerts",skipLabelsOnPR:!1,teamIdentifier:"good-chop-growth"},children:(0,l.tZ)(d.Z,{scope:"raf-header-nudge",fallback:(0,l.tZ)(l.HY,{}),children:(0,l.tZ)(oe,{})})})},or=n(868179),oo=n(536150),oi=function(e,t){var n,r=(0,oo.m)({},{suspense:!1,enabled:null===(n=null==t?void 0:t.enabled)||void 0===n||n}).data,o=null==e?void 0:e.boxesReceived;if(null!=o)return o;var i=null==r?void 0:r.boxes_received;return null!=i?i:0},oa=function(){var e,t=(0,t5.Z)("raf_page_enabled").isEnabled,n=(0,rD.Z)(),r=(0,eO.At)().raf,o=r.enableLoyaltyRulesForEntryPoint,i=void 0!==o&&o,a=r.loyaltyLevelToEnableEntryPointAllCustomers,l=r.loyaltyLevelToEnableEntryPointTBCustomers,u=(0,k.j)({},{suspense:!1,retry:1,enabled:i}).data,c=(0,F.u)({},{suspense:!1,retry:1,enabled:i}).data,s=null==c?void 0:c.items.find(function(e){return null==e?void 0:e.isActive}),d=oi(null!=u?u:void 0,{enabled:i}),f=(null==s?void 0:s.id)||"",v=(null==s?void 0:s.firstDeliveryWeek)||"",p=(0,or.G)({week:v,subscriptionId:f},{suspense:!1,retry:1,enabled:i&&!!f&&!!v}).data,y=null==p?void 0:null===(e=p.product)||void 0===e?void 0:e.handle,b=/MR-TB/.test(y||"");return!!t&&"GQ"!==n&&(!i||!!s&&(b?d>=(void 0===l?0:l):d>=(void 0===a?0:a)))},ol=n(783045);function ou(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var oc=function(){var e,t=(0,h.yY)(),n=function(e){if(Array.isArray(e))return e}(e=u.useState(!1))||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),2!==i.length);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return ou(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ou(e,2)}}
1(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.")}(),r=n[0],o=n[1],i=(0,eO.At)().raf.showRafHeaderNudge,a=oa(),s=!!((null==t?void 0:t.segment.length)&&(null==t?void 0:t.label.length)),d=(0,w.q)();g.m.WhiteLabelMealKits&&d&&(s=!1);var f=(0,O.G)().mobileWebView;((null==f?void 0:f.active)||d)&&(s=!1);var v=rR().shouldSeeWelcomeBackStep,p=(0,ol.zv)(),y=!eD()&&s&&!v;return(0,l.BX)(l.HY,{children:[(0,l.BX)(c.xu,{role:"navigation",minHeight:"60px",width:"100%",backgroundColor:"alias.elevation.base",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",boxShadow:p?"global.none":"shadow-md",position:"relative",children:[s&&!v&&(0,l.tZ)(l.HY,{children:(0,l.tZ)(c.xu,{zIndex:1,position:"absolute",left:"zero",top:"zero",bottom:"zero",children:(0,l.tZ)(m.Z,{suspense:!0,fallback:null,children:(0,l.tZ)(c.xu,{display:"flex",alignItems:"center",height:"100%",children:(0,l.tZ)(M,{onClick:function(e){e&&e.preventDefault(),o(!0)},showDrawer:r})})})})}),(0,l.tZ)(c.xu,{position:"absolute",display:"flex",right:"0",left:"0",justifyContent:"center",children:(0,l.tZ)(c.xu,{display:"flex",height:"60%",children:(0,l.tZ)(rX,{isMobile:!0})})}),y&&(0,l.tZ)(c.xu,{zIndex:1,position:"absolute",right:"zero",top:"zero",bottom:"zero",children:(0,l.BX)(c.xu,{display:"flex",children:[(0,l.tZ)(nS,{}),(0,l.tZ)(rE,{}),a&&(0,l.BX)(l.HY,{children:[(0,l.tZ)(rz.Z,{}),i&&(0,l.tZ)(on,{})]})]})})]}),(0,l.tZ)(m.Z,{suspense:!0,children:(0,l.tZ)(c.xu,{"data-testid":"sub-brand-cart-customer-mobile-header",position:"absolute",right:"zero",top:"zero",bottom:"zero",children:(0,l.tZ)(rG.Z,{})})}),s&&(0,l.tZ)(m.Z,{suspense:!0,children:(0,l.tZ)(no,{showDrawer:r,setShowDrawer:o})})]})},os=n(52566),od=n(856083),of=n(886120),ov=function(e){var t=e.children,n=e.isActive,r=e.href,o=e.title,i=e.icon,a=e.onClick,u=e.id,s=e.message;return(0,l.tZ)(c.i9.Item,{id:u,href:r,onClick:a,selected:n,icon:i,title:o,children:s?(0,l.tZ)(c.u,{trigger:(0,l.tZ)(c.xv,{as:"span",name:o,color:"inherit",children:t}),isVisible:!0,variant:"light",position:"bottom",placement:"start",content:s}):t})},op=function(e){var t=e.links,n=e.onClick,r=(0,H.t)().asPath,o=(0,k.j)({},{suspense:!1}).data,i=ek().availableLocales,a=(0,X.O)().locale,u=(null==o?void 0:o.freebiesNotSentCount)&&(null==o?void 0:o.freebiesNotSentCount)>0;return(0,l.tZ)(tX,{links:t,asPath:r,onClick:n,tagFilterList:{with_freebies:!!u,no_freebies:!u},availableLocales:i,currentLocale:a})},oy=function(e){var t,n=e.id,r=e.testId,o=e.links,i=e.name,a=e.onClick,u=(0,B.H)();return(0,l.tZ)(c.i9.DropdownItem,{label:i,id:n,"data-test-id":r,"aria-label":"".concat(null===(t=u("collapse-text"))||void 0===t?void 0:t.value," ").concat(i),children:(0,l.tZ)(op,{links:o,onClick:a})})},ob=n(607445),om=function(){return(0,l.tZ)(c.xu,{position:"relative",children:(0,l.tZ)(c.xu,{position:"absolute",right:"-20px",top:"-12px",width:"24px",height:"24px",backgroundColor:"neutral.100",borderRadius:"border-radius-circle","data-test-id":"promo-icon-test-id",children:(0,l.tZ)(c.JO,{icon:(0,l.tZ)(ob.default,{}),color:"error.600"})})})};function oh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var og=function(){var e,t=(function(e){if(Array.isArray(e))return e}(e=(0,E.Z)())||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),1!==i.length);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,1)||function(e,t){if(e){if("string"==typeof e)return oh(e,1);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oh(e,1)}}(e,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],n=(0,rD.Z)(),r=(0,eV.Z)().push,o=(0,k.j)({},{suspense:!1}).data,i=null==o?void 0:o.id,a=null==o?void 0:o.boxesReceived,l=null==o?void 0:o.activeSubscriptionId,c=null==t?void 0:t.activate("market_deals_entry_point_".concat(n));return{experimentActive:null!==c&&"control"!==c,showPromoIcon:"variation_2"===c,trackMarketDealsClicked:(0,u.useCallback)(function(){r({event:"gaEventTrigger",event_name:"Addons_ClickNavigationBar",gaEventCategory:"AddonDealsNavigationBar",gaEventAction:"navbarClick",gaEventLabel:"AddOnsPage|land|NavBar|DealsSection",tribe:"Market",screen:"My Deliveries",loyalty:a,customer_id:i,subscription_id:l})},[r,a,i,l])}},ow=function(){var e=(0,eV.Z)().push,t=(0,k.j)({},{suspense:!1}).data,n=null==t?void 0:t.id,r=null==t?void 0:t.activeSubscriptionId;return{trackPastDeliveryHeaderClick:function(){var t=(0,tI.Z)();e({event:"gaEventTrigger",event_name:"PastDeliveries_HeaderClick",tribe:"Culinary",screen:"Past Deliveries",squad:"culinary-feedback",gaEventCategory:"MyPastDeliveriesNavigation",gaEventAction:"HeaderClick",gaEventLabel:"".concat(t,"|").concat(n),subscription_id:"".concat(r),current_hf_week:"".concat(t),customer_id:"".concat(n)})}}},oO={IconConfetti24:(0,l.tZ)(od.default,{}),IconGlassOrange24:(0,l.tZ)(of.default,{})},ok=function(e){var t=e.href,n=e.link,r=e.onClick,o=e.isActive,i=e.isXSellEntry,a=og(),s=a.showPromoIcon,d=a.experimentActive,f=a.trackMarketDealsClicked,v=ow().trackPastDeliveryHeaderClick,p=tT().trackFormerViewMenuClick,y=tx(),b=(0,(0,nw.ZP)("loyalty_dashboard").translateRaw)("loyalty_dashboard.missions.pill_text"),m=n.subLinks,h=n.iconDesktop,g=n.id,w=n.testId,O=n.name,k=n.anchorTarget,_=n.message,S=n.target,Z=n.hasNotification,x=(0,u.useCallback)(function(){var e,t=(null!==(e=null==n?void 0:n.id)&&void 0!==e?e:"").split("_")[1];return d&&"marketDeals"===h?f():S&&S.indexOf("/my-account/deliveries/past-deliveries")>=0?v():S&&(S.indexOf("/my-account/deliveries/menu")>=0||S.indexOf("/my-deliveries")>=0)?p():eM()(t)?void 0:y({label:t})},[null==n?void 0:n.id,d,h,S,f,v,p,y]),P=(0,u.useCallback)(function(){x(),r(n,t)},[x,r,n,t]);if(m&&m.length)return(0,l.tZ)(oy,{id:g,testId:w,links:m,name:O,onClick:r});var j=oO[h];return(0,l.tZ)(l.HY,{children:(0,l.tZ)(ov,{isActive:o,target:k,title:O,id:g,href:t,onClick:P,message:_,"data-test-id":w,icon:s&&"marketDeals"===h?(0,l.tZ)(om,{}):j,children:i?(0,l.BX)(c.xu,{display:"flex",gap:"global.xs",children:[(0,l.tZ)(c.xu,{children:(0,l.tZ)(to.ZP,{alt:"Factor_",he
1ight:20,src:"/hellofresh_website/fj/assets/factor-logo.svg",title:"Factor_",width:20})}),(0,l.tZ)(c.xu,{children:"x"}),(0,l.tZ)(c.xu,{children:(0,l.tZ)(to.ZP,{alt:"HelloFresh",height:20,src:"/hellofresh_website/us/icons/lime-square.svg",title:"HelloFresh",width:20})})]}):(0,l.BX)(c.xu,{display:"flex",alignItems:"center",gap:"global.xs",children:[O,Z&&(0,l.tZ)(c.Ct,{content:b,size:"xs",variant:"error"})]})})})},o_=function(e){var t=e.link,n=t.target,r=(0,H.t)().asPath,o=(0,td.CX)(r,n),i=(0,td.vg)(n,r),a=(0,tw.t)({entryPointComponent:"topNav"}).trackNavElementClickEvent,c=u.useCallback(function(){a()},[a]);return(0,l.tZ)(tg.Z,{componentName:"xsell-enrolment-nav-element-desktop",attributes:{"xsell-entry-point":"nav-element-desktop"},children:(0,l.tZ)(ok,{link:t,href:o,isActive:i,onClick:c,isXSellEntry:!0})})},oS=function(e){var t,n,r,o,i,a,c,s=e.link,d=s.target,p=s.tags,y=(0,H.t)().asPath,b=(0,td.CX)(y,d),m=(0,td.vg)(d,y),h=u.useCallback(function(e){em("navbarClick","".concat(e.name,"|").concat(e.target))},[]),g=(0,F.u)({},{suspense:!1}).data,w=null==p?void 0:p.includes("x-sell"),O=null!==(c=null==g?void 0:g.items.some(function(e){return e.firstBoxDelivered}))&&void 0!==c&&c,k=(0,f.Z)()===v.Z.goodchop,_=(0,tZ.H)(),S=null==s?void 0:null===(i=s.id)||void 0===i?void 0:i.includes("link_getting-started"),Z=null==s?void 0:null===(a=s.id)||void 0===a?void 0:a.includes("link_past-orders");return k&&Z&&!O?null:w?(0,l.tZ)(tR.$,{children:(0,l.tZ)(o_,{link:s})}):(0,l.tZ)(ok,{link:s,href:(n=(t=_()).isEnabled,r=t.isReady,o=t.welcomeSpacePath,S&&n&&r?o:b),isActive:m,onClick:h})};function oZ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ox(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function oP(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function oj(e){return function(e){if(Array.isArray(e))return oZ(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return oZ(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oZ(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var oC=function(e){var t=e.segment,n=e.hasSubscriptions;return t?(0,l.BX)(c.i9.Inline,{"data-test-id":"navigation",id:n?"links-left-navigation-customer":"links-left-navigation-customer-no-subscriptions",height:"56px",overflow:"hidden",flexWrap:"wrap",children:[(0,l.tZ)(c.xu,{display:"flex",as:"li",role:"menuitem",children:(0,l.tZ)(rX,{})}),t.links.map(function(e){return(0,l.tZ)(oS,{link:e},e.id)})]}):null},oA=function(){var e,t,n,r=th(),o=(0,F.u)({},{suspense:!1}),i=o.isFetched,a=o.data,c=t0(),s=a&&a.count>0,d=eD(),f=(0,B.H)(),v=null===(e=f("xsell-top-nav-link"))||void 0===e?void 0:e.value,p=null===(t=f("otp-top-nav-link"))||void 0===t?void 0:t.value,y=t2().shouldShow,b=(0,B.f)("left-navigation-customer-no-subscriptions"),m=(0,B.f)("left-navigation-customer",{},r),h=(0,B.f)("left-navigation-weight-loss-program-customer"),g=d?h:i&&!s?b:m,w=u.useMemo(function(){return c&&g&&v?oP(ox({},g),{links:oj(g.links).concat([{brand:"hellofresh",id:"link_my-menu_cross-sell_hf-factor",name:v,target:"/x-sell-factor/landing?entry-point=navigationItem",tags:["x-sell","factor"],icon:"none",iconDesktop:"none"}])}):g},[c,g,v]),O=u.useMemo(function(){return y&&w&&p?oP(ox({},w),{links:[{brand:"goodchop",id:"link_one-time-orders_good-chop",name:p,target:"/one-time-deliveries",tags:[],icon:"none",iconDesktop:"none",testId:"OneTimeOrdersLink","aria-label":"Navigate to ".concat(p," page")}].concat(oj(w.links))}):w},[y,w,p]);return!g||(null===(n=g.links)||void 0===n?void 0:n.length)?(0,l.tZ)(oC,{segment:O,hasSubscriptions:!!s}):null},oI=function(){var e=(0,k.j)({},{suspense:!1}).data,t=(0,U.Z)(),n=(0,B.H)();return function(){if(!(null==e?void 0:e.firstName)){var r;return(null===(r=n("menu-header.no-first-name"))||void 0===r?void 0:r.value)||"user"}return t===W.Z.jaJP?(null==e?void 0:e.lastName)?"".concat(null==e?void 0:e.lastName,"様"):"":null==e?void 0:e.firstName}()},oE=function(){var e,t,n,r=(0,F.u)({},{suspense:!1}).data,o=(0,t4.f)().isPremiumFamily,i=(0,nw.ZP)("account-area.my-deliveries").translateRaw,a=oI(),u=null==r?void 0:null===(e=r.items)||void 0===e?void 0:e.find(function(e){return null==e?void 0:e.isActive}),s=o(null==u?void 0:null===(n=u.productType)||void 0===n?void 0:null===(t=n.family)||void 0===t?void 0:t.handle);return(0,l.BX)(c.xu,{className:"notranslate",display:["none","none","flex"],flexDirection:"column",ml:"xs",children:[(0,l.tZ)(c.xv,{id:"navigation-customer-name",color:"neutral.800",children:a}),s&&(0,l.tZ)(c.xu,{as:"span",role:"status","aria-label":i("premium.profile.tag"),children:(0,l.tZ)(c.Vp.Static,{size:"xs",variant:"primary",backgroundColor:"alias.tag.background.strong.v5",color:"alias.tag.foreground.strong.v5",content:i("premium.profile.tag").toLocaleUpperCase(),"aria-hidden":"true"})})]})},oD=function(){return(0,l.tZ)(tv,{link:{name:"My Favorites",icon:"past-deliveries-favs",label:"past-deliveries-favs",id:"dropdown-btn-past-deliveries-favs",testId:"customer-dropdown-button-past-deliveries-favs",target:"/my-account/deliveries/favorites"}})},oT=n(97901),oR=function(){var e=(0,eO.At)().accountSettingUrl,t=(0,f.Z)()===v.Z.factor,n=(0,oT.Z)({},{suspense:!1}).data,r=null==n?void 0:n.items.find(et.kO),o=t&&(null==r?void 0:r.id)!==void 0;return(0,l.tZ)(tv,{link:{name:"Account Settings",icon:"settings-v1",label:"settings-v1",id:"dropdown-btn-account-settings",testId:"customer-dropdown-button-account-settings",target:o?"/factorform/settings/subscription":e},isAccountSettings:!0})},oL=function(){return(0,l.tZ)(tv,{link:{name:"Favorite Recipes",icon:"favorite-recipes",label:"favorite-recipes",id:"dropdown-btn-favorite-recipes",testId:"customer-dropdown-button-favorite-recipes",target:"/recipes/favorites"}})},oN=function(){return(0,l.tZ)(tv,{link:{name:"Cookbook",icon:"cookbook-menu",label:"cookbook-menu",id:"dropdown-btn-cookbook",testId:"customer-dropdown-button-cookbook",target:"/recipes"}})},oB=function(){var e=(0,eV.Z)().push,t=(0,H.t)().query,n=(0,x.h)().mutate,r=j().show,o=(0,p.f3)().isProgramEnabled,i=(0,eq.v)({enabled:o,subscriptionId:Number(null==t?void 0:t.subscriptionId)}),a=(0,eH.k)({subscriptionId:null==i?void 0:i.id,enabled:o}).challenges,u=(0,eF.s)({challenge:null==a?void 0:a[0]});return(0,l.tZ)(tv,{hasNudge:r,onClick:function(){var t,o;r&&n({loyalty_program_onboarding_show_label:!1}),e((t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},u),o=o={tribe:"WAC",brand:"HelloFresh",new_label:r,user_action:"click",event:"gaEventTrigger",element:"freshAchievements",gaEventCategory:"loyaltyChallenge",gaEventAction:"freshAchievements|click",event_name:"Achievements_FreshAchievements"},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}
1)(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}),t))},link:{name:"Fresh Achievements",icon:"fresh-achievements",label:"hello-numbers",id:"dropdown-btn-fresh-achievements",testId:"customer-dropdown-button-fresh-achievements",target:"/my-account/deliveries/achievements"}})},oM=function(){var e=(0,z.Z)(),t=e.isVisible,n=e.isV2Visible;return t||n?null:(0,l.tZ)(s.Z,{componentName:"loyalty-program.header.navigation.achievements.desktop",children:(0,l.tZ)(oB,{})})},oV=function(){var e=A(),t=N(e),n=t.showNotificationBubble,r=t.handleRemoveNotificationBubble;return(0,l.tZ)(tv,{link:{name:"Customer Notifications",icon:"notifications",label:"customer-notifications",id:"dropdown-btn-customer-notifications",testId:"customer-dropdown-button-customer-notifications",target:"/mail/settings?token=".concat(e)},showNotificationDot:n,onClick:r})},oq=n(681943),oH=function(){var e=(0,eV.Z)().push,t=(0,H.t)().asPath,n=(0,f.Z)(),r=(0,tP.xY)(),o=(0,tY.w)(),i=(0,oq.Z)().isFactorPlusFallback,a=(0,z.Z)(),u=a.isVisible,c=a.isV2Visible,s=n===v.Z.hellofresh?"/my-account/wallet":"/wallet";return(o||i)&&!r&&(i||u||c)?(0,l.tZ)(tv,{onClick:function(){e({event:"gaEventTrigger",gaEventCategory:"navigation",gaEventAction:"navbarClick",tribe:"customer-benefits",squad:"price-and-benefits-communication",page:"Wallet",event_name:"Navigation_NavbarClick",page_path:t.split("?")[0]})},link:{name:"wallet",icon:"wallet",label:"wallet",id:"dropdown-btn-wallet",testId:"customer-dropdown-button-wallet",target:s}}):null},oF=n(725379),oU=function(){return(0,oF.K)()?(0,l.tZ)(tv,{hasNudge:!0,link:{name:"food-profile",icon:"food-profile",label:"food-profile",id:"dropdown-btn-food-profile",testId:"customer-dropdown-button-food-profile",target:"/food-profile"}}):null},oW=n(197809),oX=function(){return(0,t5.Z)("cookbook_web_preview_enabled").isEnabled?(0,l.tZ)(tv,{link:{name:"Social Bridge Cookbook",icon:"social-bridge-cookbook",label:"social-bridge-cookbook",id:"dropdown-btn-social-bridge-cookbook",testId:"customer-dropdown-button-social-bridge-cookbook",target:"/cookbook/import"}}):null},oz=function(){var e,t,n=(0,f.Z)(),r=(0,eO.At)(),o=(0,oW.Yg)().customerNotificationsLink,i=n===v.Z.hellofresh,a=(0,B.H)(),u=null===(e=r.pastDeliveries)||void 0===e?void 0:e.favoritesEnabled,s=!!(null===(t=a("hello-numbers"))||void 0===t?void 0:t.value),d=(0,t5.Z)("web_nav_inspire_cookbook-restructure").isEnabled;return i?(0,l.tZ)(c.xu,{"data-test-id":"customer-header-dropdown-links","data-test-header":"full-submenu",children:(0,l.BX)(c.i9.Stacked,{children:[u&&(0,l.tZ)(oD,{}),(0,l.tZ)(oR,{}),(0,l.tZ)(oU,{}),(0,l.tZ)(oH,{}),!u&&!d&&(0,l.tZ)(oL,{}),(0,l.tZ)(oN,{}),!d&&(0,l.tZ)(oX,{}),s&&(0,l.tZ)(oM,{}),!!o&&(0,l.tZ)(oV,{})]})}):(0,l.tZ)(c.xu,{"data-test-id":"customer-header-dropdown-links","data-test-header":"no-submenu",children:(0,l.BX)(c.i9.Stacked,{children:[(0,l.tZ)(oR,{}),(0,l.tZ)(oH,{})]})})},oG=function(e){var t,n=e.isDropdownOpen,r=eD(),o=(0,B.f)("extra-navigation"),i=(0,B.f)("extra-navigation-weight-loss-program"),a=r?null==i?void 0:i.links:null==o?void 0:o.links,s=!(null===(t=(0,eO.At)().pastDeliveries)||void 0===t?void 0:t.favoritesEnabled),d=q()(a,function(e){return e.groupIndex}),f=(0,H.t)().asPath,v=(0,k.j)({},{suspense:!1}).data,p=(null==v?void 0:v.freebiesNotSentCount)&&(null==v?void 0:v.freebiesNotSentCount)>0,y=ee().setLinkAsVisited,b=(0,u.useCallback)(function(e,t){y(e),em("navbarClick","".concat(e.name,"|").concat(t||e.target))},[y]),m=ek().availableLocales,h=(0,X.O)().locale;return n?(0,l.BX)(c.xu,{minWidth:"225px",backgroundColor:"alias.elevation.level-1",boxShadow:"shadow-xl",position:"absolute",borderRadius:"border-radius-md",overflow:"hidden",right:0,top:"55px",zIndex:1,children:[(0,l.tZ)(oz,{}),Object.keys(d).map(function(e){var t=d[e];return(0,l.tZ)(c.xu,{children:(0,l.tZ)(tX,{links:t,asPath:f,onClick:b,tagFilterList:{with_freebies:!!p,no_freebies:!p,favorite_recipes:!s,past_deliveries_favorites:s},availableLocales:m,currentLocale:h})},e)}),(0,l.tZ)(tp,{})]}):null},oY=n(533048),oJ=n(493522);function o$(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var oK=function(){return(0,l.tZ)(c.xu,{display:["block","none","block"],width:"60px",height:"20px",backgroundColor:"neutral.300",ml:["sm-1","zero","sm-1"]})},oQ=function(){var e,t=(0,H.t)(),n=function(e){if(Array.isArray(e))return e}(e=u.useState(!1))||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),2!==i.length);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return o$(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o$(e,2)}}
1(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.")}(),r=n[0],o=n[1],i=u.useRef(null);u.useEffect(function(){r&&d()},[t.asPath]);var a=function(){document.addEventListener("click",f),o(!0)},s=function(){document.removeEventListener("click",f),o(!1)},d=function(){r?s():a()},f=function(e){var t;(null===(t=i.current)||void 0===t?void 0:t.contains(e.target))||s()},v=N(A()).showNotificationBubble,p=j().show;return(0,l.BX)(c.xu,{"data-test-id":"nav-settings-dropdown",ref:i,display:"flex",px:"sm-2",alignItems:"center",role:"button",tabIndex:0,onMouseEnter:a,onMouseLeave:s,onClick:function(e){e.stopPropagation(),a()},onKeyDown:function(e){switch(e.key){case"Escape":return s();case" ":return e.preventDefault(),d();case"Enter":return d();default:return}},"aria-haspopup":"true","aria-expanded":r,position:"relative",height:"56px",pseudo:{":hover":{backgroundColor:"alias.elevation.background.level-1.hover"}},children:[(0,l.tZ)(c.JO,{icon:(0,l.tZ)(oJ.default,{}),color:"neutral.800"}),(v||p)&&(0,l.tZ)(Z,{}),(0,l.tZ)(m.Z,{suspense:!0,fallback:(0,l.tZ)(oK,{}),children:(0,l.tZ)(oE,{})}),(0,l.tZ)(c.xu,{display:"flex",alignItems:"center",justifyContent:"center",transformOrigin:"center",transform:r?"rotate(-180deg)":"rotate(0deg)",transition:"transform 0.3s",children:(0,l.tZ)(c.JO,{icon:(0,l.tZ)(oY.default,{}),color:"neutral.800"})}),(0,l.tZ)(m.Z,{suspense:!0,fallback:null,children:(0,l.tZ)(oG,{isDropdownOpen:r})})]})},o0=function(){var e,t,n=(0,f.Z)(),r=(0,H.t)(),o=(0,F.u)({}).data,i=(0,eO.At)().isRightNavRewardsLinkEnabled,a=n===v.Z.hellofresh?"/my-account/deliveries/achievements":"/achievements",u=r.asPath.indexOf(a)>-1,s=null===(e=(0,B.H)()("rewards-link"))||void 0===e?void 0:e.value,d=null==o?void 0:null===(t=o.items)||void 0===t?void 0:t[0],p=(0,z.Z)(),y=p.isEnabled,b=p.isV2Enabled,m=p.isFetched,h=p.isVisible,g=p.isV2Visible;return!(i&&d)||h||g||(y||b)&&!m?null:(0,l.tZ)(c.rU,{href:a,"data-test-id":"rewards-navigation-link-desktop",textDecorationLine:"none",noStyle:!0,children:(0,l.BX)(c.xu,{display:"flex",alignItems:"center",gap:"xs",borderBottomWidth:u?4:0,pt:u?"xxs":"zero",borderBottomColor:"alias.interactive.border.default",borderBottomStyle:"solid",backgroundColor:u?"alias.selected.background.secondary.default":"alias.elevation.base",color:u?"primary.600":"neutral.800",px:"sm-2",height:["60px","56px"],position:"relative",pseudo:{":hover":{backgroundColor:"alias.elevation.background.level-1.hover"},":active":{backgroundColor:"alias.elevation.background.level-1.press"}},children:[(0,l.tZ)(c.JO,{icon:(0,l.tZ)(e8.default,{}),color:"inherit"}),(0,l.tZ)(c.xu,{display:["none","none","block"],children:(0,l.tZ)(c.xv,{type:u?"body-md-bold":"body-md-regular",color:"inherit",children:s})})]})})},o1=function(){return(0,l.tZ)(m.Z,{suspense:!0,children:(0,l.tZ)(o0,{})})},o2=n(919597),o3=function(){var e=ek(),t=e.availableLocales,n=e.renderLanguageToggle,r=e.isTranslationDropdownEnabled,o=(0,H.t)().asPath,i=(0,X.O)().locale,a=(0,eO.At)().raf.showRafHeaderNudge,u=rR().shouldSeeWelcomeBackStep,s=oa();return(0,l.BX)(c.xu,{display:"flex",flexWrap:"nowrap",alignItems:"center",height:"100%",children:[(0,l.tZ)(tz.Z,{renderLanguageToggle:n,availableLocales:t,asPath:o,currentLocale:i,dataTestId:"customer-header-menu-item-translation-button-desktop",mergeQueryParams:td.CX,sendNavigationEvent:em,isTranslationDropdownEnabled:r}),(0,l.tZ)(o2.s,{}),(0,l.tZ)(o1,{}),(0,l.tZ)(nS,{isDesktop:!0}),(0,l.tZ)(rE,{isDesktop:!0}),!u&&s&&(0,l.tZ)(rz.Z,{isDesktop:!0}),s&&a&&(0,l.tZ)(on,{}),(0,l.tZ)(rG.Z,{}),(0,l.tZ)(m.Z,{suspense:!0,fallback:null,children:(0,l.tZ)(oQ,{})})]})},o8=function(){var e=ek(),t=e.availableLocales,n=e.renderLanguageToggle,r=e.isTranslationDropdownEnabled,o=(0,H.t)().asPath,i=(0,X.O)().locale;return(0,l.BX)(c.xu,{display:"flex",flexWrap:"nowrap",alignItems:"center",height:"100%",children:[(0,l.tZ)(tz.Z,{renderLanguageToggle:n,availableLocales:t,asPath:o,currentLocale:i,dataTestId:"customer-header-menu-item-translation-button-desktop",mergeQueryParams:td.CX,sendNavigationEvent:em,isTranslationDropdownEnabled:r}),(0,l.tZ)(rG.Z,{}),(0,l.tZ)(m.Z,{suspense:!0,fallback:null,children:(0,l.tZ)(oQ,{})})]})},o6=function(){var e=(0,os.cg)().fullWidth,t=(0,h.yY)(),n=!!((null==t?void 0:t.segment.length)&&(null==t?void 0:t.label.length)),r=rR().shouldSeeWelcomeBackStep,o=eD();return(0,l.tZ)(c.xu,{position:"relative",backgroundColor:"alias.elevation.base",height:"3.5rem",boxShadow:"alias.box.md",children:(0,l.BX)(c.xu,{display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:e?"100%":["100%","960px","1144px"],mx:"auto",paddingX:e?"sm-2":["sm-2","sm-2","zero"],children:[(0,l.tZ)(c.xu,{id:"left-navigation-customer",display:"inline-flex",children:!r&&(0,l.tZ)(oA,{})}),n&&(0,l.tZ)(m.Z,{fallback:null,children:o?(0,l.tZ)(o8,{}):(0,l.tZ)(o3,{})})]})})},o4=n(510856);function o5(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var o7=function(){var e,t="variation_1"===((function(e){if(Array.isArray(e))return e})(e=(0,E.Z)())||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),1!==i.length);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,1)||function(e,t){if(e){if("string"==typeof e)return o5(e,1);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o5(e,1)}}
1(e,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].activate("cbty_sms_opt_in_v2");(0,I.Z)("hf_re_sms_opt_in_notification_viewed",{defaultValue:t?"false":""})},o9=n(913940),ie=function(){var e=(0,tb.py)(),t=e.decide,n=e.isReady,r=(0,tm.R)(),o=r.id,i=r.attributes,a="control";if(n){var l,u,c={experimentKey:"usreeng_landing_page_v2",experimentationUserId:o,experimentationUserAttributes:(l=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},i),u=u={$opt_experiment_bucket_map:{}},Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(u)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(u)).forEach(function(e){Object.defineProperty(l,e,Object.getOwnPropertyDescriptor(u,e))}),l)},s=t(o9.mj.ABTEST,c).variationKey;s&&(a=s)}return{reactivationLpRedirectV2Variation:a,isReady:n}},it=n(736026),ir=n(759839);function io(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ii=function(){var e=(0,H.t)(),t=J.ZP.getItem("StoredReactivationCouponCode")||J.ZP.getItem("url_coupon_code")||tl().get("StoredReactivationCouponCode")||tl().get("url_coupon_code")||e.query.c||"",n=(0,it.D)({code:null==t?void 0:t.toString()},{suspense:!1}).data,r=null==n?void 0:n.discount_type,o=(null==n?void 0:n.discount_value)||0,i=(null==n?void 0:null===(p=n.discount_settings)||void 0===p?void 0:p.box_count)||1,a=(0,P.Z)(),l=(0,ir.t)({},{enabled:a,suspense:!1}).data,u=(null==l?void 0:null===(b=l.subscription)||void 0===b?void 0:null===(y=b.product)||void 0===y?void 0:y.unitPrice)||0;if("New"===(null==n?void 0:n.customer_status))return{voucherCode:"",singleBoxVoucher:!1,discountDollars:0};var c="percent"===r?o/100*u/100:o;if(i>1&&"percent"===r){var s=(null==n?void 0:null===(h=n.discount_settings)||void 0===h?void 0:null===(m=h.discount_rule)||void 0===m?void 0:m.box_rule)||{};c=0;var d=!0,f=!1,v=void 0;try{for(var p,y,b,m,h,g,w=Object.entries(s)[Symbol.iterator]();!(d=(g=w.next()).done);d=!0){var O,k=(O=g.value,function(e){if(Array.isArray(e))return e}(O)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),2!==i.length);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(O,2)||function(e,t){if(e){if("string"==typeof e)return io(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return io(e,2)}}(O,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.")}())[1].discount_value;c+=k/1e4*u/100}}catch(e){f=!0,v=e}finally{try{d||null==w.return||w.return()}finally{if(f)throw v}}}return{voucherCode:c>0?t.toString():"",singleBoxVoucher:1===i,discountDollars:Math.round(c)}},ia=n(468891),il=n(90104),iu=n.n(il);function ic(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function is(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var id={variation_1:"flex",variation_2:"wallet",variation_3:"rte"},iv=function(e){return"/pages/reactivate".concat(iu()(e)?"":"?".concat((0,ia.stringify)(e||{})))},ip=function(e){return id[e]},iy=function(e){return(null==e?void 0:e.startsWith("/reactivate"))||(null==e?void 0:e.includes("/account-settings/subscription-settings/reactivate"))||!1},ib=function(){var e,t,n=ie().reactivationLpRedirectV2Variation,r=(0,H.t)(),o=r.asPath,i=r.query.fromLP,a=ii(),l=a.voucherCode,c=a.discountDollars,s=a.singleBoxVoucher,d=(0,k.j)({},{suspense:!1}).data,f=(null==d?void 0:d.firstName)||"",v=(e=r.asPath,t=u.useRef(null),u.useEffect(function(){t.current=e},[e]),t.current),p=(0,u.useMemo)(function(){return"control"!==n&&(!v||iy(v))&&!i&&iy(o)},[n,v,i,o]);u.useEffect(function(){p&&void 0!==l&&window.location.replace((null==l?void 0:l.length)?s?iv(is(ic({},r.query),{fromLP:"".concat(ip(n),"_voucher"),utm_name:f,c:l,c_discount:c,utm_boxes:1})):iv(is(ic({},r.query),{fromLP:"".concat(ip(n),"_voucher"),utm_name:f,c:l,c_discount:c})):iv(is(ic({},r.query),{fromLP:"".concat(ip(n),"_organic"),utm_name:f,c:"O8-AGPMM"})))},[p,l])},im=function(){return ib(),null},ih=function(){var e=ie().reactivationLpRedirectV2Variation;return e&&"control"!==e?(0,l.tZ)(im,{}):null},ig=n(497249);function iw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var iO=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=u.useState(!1))||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),2!==i.length);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return iw(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iw(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.")}(),n=t[0],r=t[1],o=(0,eV.Z)().push,i=(0,ig.T)(),a=(0,oW.Yg)().enableSubBrandCustomerUpdateEventSchema,l=(0,tP.xY)(),c=(0,k.j)({},{suspense:!1}).data,s=(0,F.u)({},{suspense:!1}),d=s.isFetched,f=s.data,v=(0,oT.Z)({},{suspense:!1,enabled:a}),p=v.isFetched,y=v.data,b=a&&p,m=!a||p;u.useEffect(function(){var e=null==f?void 0:f.items;if(c&&d&&m&&e&&!n){var t=eg({subscriptions:e,customerInfo:c});if(b){var a,u=null!==(a=null==y?void 0:y.items)&&void 0!==a?a:[];t=eh({subscriptions:e.concat(u),customerInfo:c,subBrand:l})}o(t),i.startSpan("customer-update-event").setAttribute("customer.id",c.id).end(),r(!0)}},[c,d,f,n,m,b,y,p,l,o,i])},ik=n(72804),i_=function(){iO(),o7();var e=(0,f.Z)()===v.Z.hellofresh;return(0,l.BX)(l.HY,{children:[(0,l.tZ)(o4.u,{}),(0,l.tZ)(ik.j,{}),(0,l.BX)(c.xu,{id:"header-particle","data-new-header":"true","data-header-mounted":"true","data-test-id":"customer-header",as:"header",children:[(0,l.tZ)(c.xu,{"data-test-id":"customer-header-desktop",id:"desktop-navigation",display:["none","block"],children:(0,l.tZ)(o6,{})}),(0,l.tZ)(c.xu,{"data-test-id":"customer-header-mobile",display:["block","none"],children:(0,l.tZ)(oc,{})}),e&&(0,l.tZ)(ih,{})]})]})},iS=function(){return(0,l.tZ)(y.Z,{claim:{name:"activations-rte",githubTeam:"hellofresh/activations-rte",tribe:"conversions",alliance:"growth",jiraPrefix:"USCRO",slackChannel:"#squad-curation",slackAlertsChannel:"#squad-curation",skipLabelsOnPR:!1,teamIdentifier:"activations-rte"},children:(0,l.tZ)(s.Z,{componentName:"customer-header",children:(0,l.tZ)(d.Z,{scope:"customer-header",children:(0,l.tZ)(eO.sR,{children:(0,l.tZ)(oW.Eg,{children:(0,l.tZ)(p.Cv,{children:(0,l.tZ)(b.Z,{children:(0,l.tZ)(i_,{})})})})})})})})}},722818:function(e,t,n){n.d(t,{Z:function(){return I}});var r=n(827378),o=n(193825),i=n(617947),a=n(581340),l=n(497249),u=n(200770),c=n(26730),s=n(396887),d=n(647220),f=n(783244),v=n(117608),p=n(953137),y=function(e){var t=(0,p.u)({},{enabled:e,suspense:!1,retry:1}),n=t.data,r=t.status;if(!e)return{queryStatus:"idle"};
1if("error"===r)return{queryStatus:"invalid",invalidReason:"backend-error",subscription:null};if("success"===r){if(!Array.isArray(n.items)||0===n.items.length)return{queryStatus:"invalid",invalidReason:"empty-subscriptions",subscription:null};if(n.items.length>1)return{queryStatus:"invalid",invalidReason:"multiple-subscriptions",subscription:null};var o,i,a=n.items[0];return a.canceledAt?{queryStatus:"invalid",invalidReason:"inactive-subscription",subscription:a}:2>((null===(i=a.customer)||void 0===i?void 0:null===(o=i.loyalty)||void 0===o?void 0:o.value)||0)?{queryStatus:"invalid",invalidReason:"loyalty-level-not-met",subscription:a}:{queryStatus:"success",subscription:a}}return{queryStatus:r}},b=n(747012),m=function(e,t){var n,r,o,i=null==t?void 0:null===(n=t.shippingAddress)||void 0===n?void 0:n.postcode,a=(0,b.Sj)({postcode:null!=i?i:"",family:"rte",numDeliveries:3},{enabled:e&&!!t&&!!i,retry:1,suspense:!1}),l=a.data,u=a.status;return e?"error"===u?{queryStatus:"invalid",invalidReason:"backend-error"}:"success"===u?(null!==(o=null==l?void 0:null===(r=l.items)||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0?{queryStatus:"success",deliveryOptions:l.items}:{queryStatus:"invalid",invalidReason:"undeliverable-zip"}:{queryStatus:u}:{queryStatus:"idle"}},h=n(868179),g=function(e){if(!(null==e?void 0:null===(i=e.items)||void 0===i?void 0:i.length))return[];var t=[],n=!0,r=!1,o=void 0;try{for(var i,a,l=e.items[Symbol.iterator]();!(n=(a=l.next()).done);n=!0){var u=a.value,c=null===(v=u.deliveryDate)||void 0===v?void 0:v.deliveryDate;if((null===(p=u.deliveryOptions)||void 0===p?void 0:p.length)&&c){var s=!0,d=!1,f=void 0;try{for(var v,p,y,b=u.deliveryOptions[Symbol.iterator]();!(s=(y=b.next()).done);s=!0){var m=y.value;t.push({option:m,deliveryDate:c})}}catch(e){d=!0,f=e}finally{try{s||null==b.return||b.return()}finally{if(d)throw f}}}}}catch(e){r=!0,o=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw o}}return t},w=function(e,t){var n,r=g(t);if(!r.length)return{option:null,deliveryDate:null,error:"NO_OPTIONS_AVAILABLE"};if(!e)return{option:null,deliveryDate:null,error:"NO_EXISTING_DELIVERY"};var o=(n=e.cutoffDate)&&r.find(function(e){return e.option.cutoffDate===n})||null;return o?{option:o.option,deliveryDate:o.deliveryDate}:{option:null,deliveryDate:null,error:"NO_CUTOFF_MATCH"}},O=function(e,t,n,r){var o=(0,h.G)({subscriptionId:(null==t?void 0:t.id)||"",week:r},{enabled:e&&!!t&&!!n,suspense:!1}),i=o.data,a=o.status;if(!e)return{queryStatus:"idle"};if("error"===a)return{queryStatus:"invalid",invalidReason:"backend-error",hellofreshDelivery:null};if("success"===a){var l=w(i,{items:n||[]});return!l.error&&l.option?{queryStatus:"success",hellofreshDelivery:i}:{queryStatus:"invalid",invalidReason:"no-matching-delivery-option-in-base-brand",hellofreshDelivery:i}}return{queryStatus:a}},k=n(486598),_=n(184151),S=function(e){var t=y(e),n="success"===t.queryStatus?t.subscription.product.sku:"",r=(0,k.X)({sku:n},{retry:1,enabled:e&&!!n,suspense:!1}),o=r.data,i=r.status;return e?"loading"===t.queryStatus||"idle"===t.queryStatus?{queryStatus:"loading"}:"invalid"===t.queryStatus?{queryStatus:"invalid",invalidReason:t.invalidReason}:n?"error"===i?{queryStatus:"invalid",invalidReason:"backend-error"}:"idle"===i?{queryStatus:"idle"}:"success"===i?(null==o?void 0:o.opt_in_status)===_.t.optedIn?{queryStatus:"invalid",invalidReason:"enrolled-to-loyalty-programs"}:(null==o?void 0:o.opt_in_status)===_.t.notOptedIn?{queryStatus:"invalid",invalidReason:"opted-in-to-loyalty-programs"}:{queryStatus:"success"}:{queryStatus:"loading"}:{queryStatus:"loading"}:{queryStatus:"idle"}},Z=n(273656),x=function(e){var t,n=e.forWeek,r=e.enabled,o=(0,Z.rS)({weeks:n||"",exclude:[]},{suspense:!1,useErrorBoundary:!1,enabled:!!n&&r}),i=o.data,a=o.status,l=!1,u=void 0,c=a;return r?("error"===a&&(u="backend-menu-error"),"success"!==a||(l=!!n&&(null==i?void 0:null===(t=i.items)||void 0===t?void 0:t.some(function(e){return"rte"===e.product})))||(c="invalid",u="no-rte-menu"),{hasRteMenu:l,invalidReason:u,validationStatus:c}):{hasRteMenu:l,invalidReason:u,validationStatus:c="idle"}},P=function(e){var t,n=e.forWeek,r=e.subscription,o=null!==(t=null==r?void 0:r.nextModifiableDeliveryWeek)&&void 0!==t?t:"";return!n||!o||n>=o};function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var C=function(e){var t=(0,a.t)().query.week,n=Array.isArray(t)?t[0]:t,r=(null==e?void 0:e.nextModifiableDeliveryWeek)||void 0;return n&&(0,o.Z)(n)?n:r||(0,i.Z)()},A=["config-off","experiment-not-ready","logged-out"],I=function(e){var t,n=(0,d.e)(),o=(0,u.Z)(),i=(0,s.ew)(),a=e.isEnabledInConfig,p=e.experimentReady,b={xsell_config_enabled:!1,single_subscription:!1,has_matching_delivery_option_in_base_brand:!1,loyalty_enrolled:!1},h=(0,v.Z)(),g=(function(e){if(Array.isArray(e))return e}(t=(0,f.Z)("hf_cross_sell_force_eligibility"))||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),1!==i.length);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(t,1)||function(e,t){if(e){if("string"==typeof e)return j(e,1);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j(e,1)}}
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],w=(0,l.T)(),k=(0,r.useRef)(!1),_=(void 0===a||a)&&o===c.Z.US;b.xsell_config_enabled=_;var Z=void 0,I=n;_||(Z="config-off",I=!1),Z||(void 0===p||p)&&n||(Z="experiment-not-ready",I=!1),Z||h||(Z="logged-out",I=!1);var E=null,D=null,T=null,R=y(I);"success"===R.queryStatus?(b.single_subscription=!0,E=R.subscription):(I=!1,"invalid"===R.queryStatus&&(Z=R.invalidReason,E=R.subscription));var L=C(E),N=x({forWeek:L,enabled:I});"success"===N.validationStatus&&I?I=!0:(I=!1,N.invalidReason&&(Z=N.invalidReason)),!P({forWeek:L,subscription:E})&&I&&(Z="cutoff-date-passed",I=!1);var B=m(I,E);"success"===B.queryStatus?D=B.deliveryOptions:(I=!1,"invalid"===B.queryStatus&&(Z=B.invalidReason));var M=O(I,E,D,L);"success"===M.queryStatus?(b.has_matching_delivery_option_in_base_brand=!0,T=M.hellofreshDelivery):(I=!1,"invalid"===M.queryStatus&&(Z=M.invalidReason,T=M.hellofreshDelivery));var V=S(I);return"success"===V.queryStatus?b.loyalty_enrolled=!0:(I=!1,"invalid"===V.queryStatus&&(b.loyalty_enrolled=!0,Z=V.invalidReason)),Z||I||(Z="experiment-not-ready"),(0,r.useEffect)(function(){if(!(k.current||Z&&A.includes(Z))){var e,t,n,r,o,i=w.startSpan("xsell-eligibility-result");i.setAttribute("eligible",!Z),i.setAttribute("week",L),Z?(i.setAttribute("ineligibility-reason",Z),i.setAttribute("span.display_name","xsell-eligibility-result | ineligible | ".concat(Z))):i.setAttribute("span.display_name","xsell-eligibility-result | eligible"),T&&i.setAttributes({cutoff_date:T.cutoffDate,delivery_date:T.deliveryDate,delivery_option_handle:null===(e=T.deliveryOption)||void 0===e?void 0:e.handle,delivery_option_day:null===(t=T.deliveryOption)||void 0===t?void 0:t.deliveryDay,delivery_status:T.status,delivery_id:T.id}),E&&i.setAttributes({subscription_id:E.id,customer_id:E.customer.id,shipping_address_postcode:null===(n=E.shippingAddress)||void 0===n?void 0:n.postcode,loyalty_level:(null===(o=E.customer)||void 0===o?void 0:null===(r=o.loyalty)||void 0===r?void 0:r.value)||0,next_modifiable_week:E.nextModifiableDeliveryWeek}),i.end(),k.current=!0}},[Z]),(0,r.useMemo)(function(){var e=i.NEXT_PUBLIC_SERVER_ENV!==s.Xe.live&&!A.includes(null!=Z?Z:"");if(Z&&"true"!==g){var t={passesAllEligibilityChecks:!1,decisionParams:b,reason:Z};return e&&console.log("useCrossSellEligibility",t),t}var n={passesAllEligibilityChecks:!0,decisionParams:b};return e&&console.log("useCrossSellEligibility",n),n},[Z])}},271249:function(e,t,n){n.r(t);var r=n(687800);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}n(827378),t.default=function(e){var t=e.title,n=e.titleId,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["title","titleId"]);return(0,r.BX)("svg",i(o(i(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":n}),a),{children:[t?(0,r.tZ)("title",{id:n,children:t}):null,(0,r.tZ)("path",{d:"M9.5 11a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM16 14.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM15.293 7.293l-8 8 1.414 1.414 8-8-1.414-1.414Z",fill:"currentColor"}),(0,r.tZ)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-2 0a8 8 0 1 1-16 0 8 8 0 0 1 16 0Z",fill:"currentColor"})]}))}},15778:function(e,t,n){n.r(t);var r=n(687800);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}n(827378),t.default=function(e){var t=e.title,n=e.titleId,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["title","titleId"]);return(0,r.BX)("svg",i(o(i(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":n}),a),{children:[t?(0,r.tZ)("title",{id:n,children:t}):null,(0,r.tZ)("path",{d:"M17.151 9.581c-.086.924-.32 1.546-.636 1.99-.262.368-.602.643-1.019.87l.451-2.86h1.204ZM8.793 12.416a2.873 2.873 0 0 1-.974-.845c-.316-.444-.55-1.066-.636-1.99h1.164l.446 2.835Z",fill:"currentColor"}),(0,r.tZ)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2ZM8.185 8.549H6.167l.016.532c.04 1.365.333 2.367.864 3.113.53.746 1.253 1.176 2.035 1.484l.081.031h.014c.394.7 1.105 1.24 1.97 1.48v2.096c0 .723-1.87.544-1.87.544V19l2.805-.007 2.807.007v-1.17s-1.87.178-1.87-.545l-.001-.01v-2.05c.93-.217 1.697-.778 2.113-1.517l.045-.001.076-.03c.782-.307 1.504-.737 2.034-1.483.53-.746.826-1.748.865-3.113l.016-.532h-2.058L16.353 7H7.94l.245 1.549Z",fill:"currentColor"})]}))}},725208:function(e,t,n){n.r(t);var r=n(687800);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}n(827378),t.default=function(e){var t=e.title,n=e.titleId,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["title","titleId"]);return(0,r.BX)("svg",i(o(i(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":n}),a),{children:[t?(0,r.tZ)("title",{id:n,children:t}):null,(0,r.tZ)("path",{d:"M12 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM12 10a5 5 0 0 0-5 5h2a3 3 0 0 1 3-3v-2Z",fill:"currentColor"}),(0,r.tZ)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 6a9 9 0 0 0-9 9v2H2v2h20v-2h-1v-2a9 9 0 0 0-9-9Zm7 9v2H5v-2a7 7 0 1 1 14 0Z",fill:"currentColor"})]}))}},264800:function(e,t,n){n.r(t);var r=n(687800);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}n(827378),t.default=function(e){var t=e.title,n=e.titleId,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["title","titleId"]);return(0,r.BX)("svg",i(o(i(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":n}),a),{children:[t?(0,r.tZ)("title",{id:n,children:t}):null,(0,r.tZ)("path",{d:"M9.973 11.405a.918.918 0 1 0 1.3-1.3.918.918 0 0 0-1.3 1.3ZM9.973 16.6a.918.918 0 1 0 1.3-1.299.918.918 0 0 0-1.3 1.298ZM13.87 14.041H7.376v-1.377h6.494v1.377Z",fill:"currentColor"}),(0,r.tZ)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.432 3.27a.918.918 0 0 1 1.299 1.298l-1.097 1.098.815 5.471-9.85 9.85L3 13.39l9.85-9.85 5.495.818 1.087-1.087Zm-3.247 3.247.584-.584-3.29-.49-7.946 7.946 5.066 5.066 7.946-7.946-.487-3.267-.574.573a.918.918 0 0 1-1.299-1.298Z",fill:"currentColor"})]}))}},58295:function(e,t,n){n.r(t);var r=n(687800);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}n(827378),t.default=function(e){var t=e.title,n=e.titleId,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["title","titleId"]);return(0,r.BX)("svg",i(o(i(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":n}),a),{children:[t?(0,r.tZ)("title",{id:n,children:t}):null,(0,r.tZ)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.494 2h13.012l.003.977.005 1.006h3.392c.14 1.244.176 2.43-.27 3.627a4.93 4.93 0 0 1-1.46 2.097c-.58.481-1.304.851-2.197 1.063-.594 2.704-1.837 5.009-4.42 5.816.496 1.564 1.757 3.373 4.446 3.373V22H5.995v-2.041c2.69 0 3.95-1.81 4.445-3.373-2.582-.807-3.825-3.112-4.419-5.816-.892-.212-1.618-.582-2.196-1.063A4.929 4.929 0 0 1 2.363 7.61c-.445-1.196-.409-2.383-.27-3.627h3.394c0-.345.002-.681.004-1.006L5.494 2Zm.016 3.966H4.013c.037.294.106.626.23.959.173.465.446.91.87 1.264.156.13.34.253.56.363a34.15 34.15 0 0 1-.163-2.586Zm12.98 0h1.497a4.302 4.302 0 0 1-.23.959 2.95 2.95 0 0 1-.87 1.264c-.156.13-.34.253-.56.363.091-.863.14-1.735.163-2.586Z",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.