PageSourceSearch

https://web-assets.myfitnesspal.com/web-main/_next/static/chunks/pages/account/my-goals-4fc37aea61a2d12f.js

js myfitnesspal.com collected 2026-09-24 08:25:12 UTC 14,330 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8541],{3952:(e,s,a)=>{"use strict";a.d(s,{A:()=>g});var r=a(64255),t=a(37124),i=a(79642),o=a(54698),n=a(73202),l=a(98416),d=a(59674),c=a(77856);let g=(0,o.A)(({children:e,loading:s,loadingSpinnerProps:a,ref:o,...n})=>(0,r.jsx)(t.A,{ref:o,LinkComponent:c.A,...n,children:s?(0,r.jsx)(i.A,{color:"inherit",thickness:4,size:24,...a}):e}))((0,n.A)(l.Ay,d.Ay))},16427:(e,s,a)=>{"use strict";a.d(s,{A:()=>i});var r=a(27930),t=a(64255);let i=(0,r.A)((0,t.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z"}),"Lock")},38782:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});var r=a(64255),t=a(1179),i=a(79642),o=a(68559);let n={display:"flex","& > * + *":{marginLeft:2}};function l(e){let s=(0,o.Vb)();return(0,r.jsx)(t.A,{sx:n,children:(0,r.jsx)(i.A,{disableShrink:!0,title:s("circularProgressBarLabel"),...e})})}},48712:(e,s,a)=>{"use strict";a.d(s,{A:()=>i});var r=a(64255),t=a(90110);function i({children:e,...s}){return(0,r.jsx)(t.A,{variant:"Heading/Bold/LG",component:"h1",sx:{mb:4},...s,children:e})}},52216:(e,s,a)=>{"use strict";a.d(s,{S:()=>t,y:()=>i});var r=a(82726);async function t({client:e=r.w}){let{data:s}=await e.get("/api/services/nutrient-goals");return s[0]}async function i({item:e,client:s=r.w}){let{data:a}=await s.post("/api/services/nutrient-goals",{item:e});return a}},58500:(e,s,a)=>{"use strict";a.r(s),a.d(s,{__N_SSP:()=>$,default:()=>G});var r=a(64255),t=a(98825),i=a(1179),o=a(90110),n=a(26081),l=a(16427),d=a(63826),c=a(9243),g=a(83299),u=a(58409),x=a(68690),m=a(68559),y=a(35635),h=a(87373),p=a(52216),_=a(97787),f=a(82423),A=a(33552),j=a(13621),b=a(76095),v=a(48712),w=a(77856),k=a(62455),B=a(3952);let D={my:5},E={my:3.5},M={display:"flex",gap:40,flexDirection:{xs:"column",md:"row"},alignItems:{xs:"center",md:"unset"}},z={display:"flex",flexDirection:"column",alignItems:"center",width:"100%",maxWidth:430},q={mt:{xs:4,md:0}},S={maxWidth:430,width:"100%",bgcolor:"common.neutrals.inverse",borderBottom:"1px solid #E0E0E0",borderLeft:"none",borderRight:"none",pl:.1,pr:.01},P={lineHeight:"18px",py:.5,pr:.5,pl:.5,fontWeight:600},C={borderBottom:"1px solid #E0E0E0",borderLeft:"1px solid #E0E0E0",borderRight:"1px solid #E0E0E0",py:2,px:3.75,display:"flex",justifyContent:"space-between",bgcolor:"#f6f6f6",color:"common.neutrals.primary",width:"100%",maxWidth:430},I={border:"2px solid",borderColor:"common.status.negative"},W={textDecoration:"none",width:"100%"},L={fontWeight:700},H={fontWeight:600},V={color:"common.brand.premium",position:"absolute"},F={"& a":{color:"common.brand.primary",textDecoration:"none","&:hover":{color:"common.status.warning"}}},K={mt:5},N=()=>{let e,s,a,b=(0,m.Vb)(),{locale:N}=(0,c.useRouter)(),{isOpen:$,message:G}=(0,A.d)(),{data:O,isPending:T}=(0,d.I)({queryKey:["user"],queryFn:()=>(0,h.wz)({})}),{data:R,isPending:U}=(0,d.I)({queryKey:["nutrientGoals"],queryFn:()=>(0,p.S)({})}),Q=O?.location_preferences.country_code,{data:X,isPending:Y}=(0,d.I)({queryKey:["subscription",Q,N],queryFn:()=>(0,_.uV)({isoCode:Q,locale:N}),enabled:!!Q});if(T||U||Y)return(0,r.jsx)(f.a,{});let{[j.Fb]:Z,[j.HY]:J,[j.BF]:ee}=(0,j.zt)(X),es={monday:b("monday.abbreviated"),tuesday:b("tuesday.abbreviated"),wednesday:b("wednesday.abbreviated"),thursday:b("thursday.abbreviated"),friday:b("friday.abbreviated"),saturday:b("saturday.abbreviated"),sunday:b("sunday.abbreviated")},ea={energy:"calories"===O.goal_preferences.weekly_exercise_energy.unit?b("mygoals.calories_burned_per_week"):b("mygoals.kilojoules_burned_per_week"),workouts:b("mygoals.workouts_per_week"),minutes:b("mygoals.minutes_per_workout")},er=(e=R.default_goal,g.ts.map(s=>{var a;let r,t;return"energy"===s&&"kilojoules"===O.unit_preferences.energy?{macro:b("kilojoulesCapitalized"),highlight:!0}:"energy"===s&&"calories"===O.unit_preferences.energy?{macro:b("caloriesCapitalized"),highlight:!0}:{macro:b(`${s}`),percentage:(0,x.wg)((a=s,r=R.default_goal[a],t=R.default_goal.energy.value,Math.round(r*g.sK[a]/t*100)))+" %",grams:e[s]+" g"}})),et=$&&G===b("mygoals.new.goals.congratulations");return(0,r.jsxs)(t.A,{component:"main",maxWidth:"lg",children:[(0,r.jsx)(i.A,{sx:D,children:(0,r.jsx)(k.A,{adUnitPath:"MyHome/Goals_0",uniqueID:"MyGoalsIndexTopAd",large:!0})}),(0,r.jsx)(v.A,{children:b("mygoals.your_fitness_goals")}),(0,r.jsx)(o.A,{sx:[F,E],variant:"body2","data-testid":"qa-regression-daily.nutrition-subtitle",children:b("mygoals.setting_up_goals",{link:(0,r.jsx)(w.A,{href:"/account/change-goals-guided",children:b("mygoals.view_guided_setup")})})}),(0,r.jsxs)(i.A,{sx:M,children:[(0,r.jsxs)(i.A,{sx:z,children:[(0,r.jsxs)(i.A,{sx:[C,S],"data-testid":"qa-regression-daily.nutrition-label",children:[(0,r.jsx)(o.A,{component:"h2",sx:L,children:b("mygoals.daily_nutrition_goals")}),(0,r.jsx)(i.A,{children:(0,r.jsx)(B.A,{href:"/account/my-goals/daily-nutrition-goals",sx:P,variant:"text",size:"large",color:"primary",children:b("mygoals.edit")})})]}),er&&er.map((e,s)=>{let a;return(0,r.jsxs)(n.A,{"data-testid":`qa-regression-energy=${e.macro}`,sx:[C,e.highlight&&et&&I],children:[(0,r.jsxs)(i.A,{sx:{display:"flex"}
1,children:[(0,r.jsxs)(o.A,{variant:"Body/Bold/MD",sx:H,children:[e.macro,"\xa0"]}),(0,r.jsx)(o.A,{variant:"caption",sx:{pt:.5},children:"percentage"===O.goal_preferences.macro_goal_format?e.grams:e.percentage})]}),(0,r.jsx)(i.A,{children:(0,r.jsxs)(o.A,{variant:"Body/Bold/MD",sx:H,children:[e.macro===b("caloriesCapitalized")||e.macro===b("kilojoulesCapitalized")?Math.round((a=R.default_goal.energy.value,"kilojoules"===O.unit_preferences.energy&&(a=(0,x.PS)(a)),a)):null,"percentage"===O.goal_preferences.macro_goal_format?e.percentage:e.grams]})})]},s)}),Z?(0,r.jsxs)(n.A,{sx:{...C,mb:5},"data-testid":"qa-regression-custom.daily.goals",children:[(0,r.jsx)(i.A,{children:(0,r.jsx)(o.A,{variant:"Body/Bold/MD",sx:H,children:b("mygoals.custom_daily_goals")})}),(0,r.jsx)(i.A,{children:(0,r.jsx)(o.A,{variant:"Body/Bold/MD",sx:H,children:(0,y.ie)(R)?(s=[],(a=(0,y.Kw)(R)).forEach(e=>{void 0!==a&&s.push(es[e])}),s.join(" ")):b("no")})})]}):(0,r.jsx)(w.A,{"data-testid":"lock-icon-one",sx:W,href:"/premium?f=premium-custom-daily-goals",children:(0,r.jsxs)(n.A,{sx:{...C,mb:5},"data-testid":"qa-regression-custom.daily.goals",children:[(0,r.jsx)(i.A,{children:(0,r.jsx)(o.A,{variant:"Body/Bold/MD",sx:H,children:b("mygoals.custom_daily_goals")})}),(0,r.jsxs)(i.A,{children:[(0,r.jsx)(l.A,{sx:{...V,ml:-6}}),(0,r.jsx)(o.A,{variant:"Body/Bold/MD",sx:H,children:b("no")})]})]})}),(0,r.jsxs)(i.A,{sx:[C,S],"data-testid":"qa-regression-calories.by.meal-section",children:[(0,r.jsx)(o.A,{component:"h2",sx:L,children:"kilojoules"===O.unit_preferences.energy?b("mygoals.kilojoules_by_meal"):b("mygoals.calories_by_meal")}),J?(0,r.jsx)(i.A,{children:O.app_preferences.meal_goals_enabled?(0,r.jsx)(B.A,{href:"/account/my-goals/meal-goals?enabled=true",sx:P,variant:"text",size:"large",color:"primary",children:b("mygoals.edit")}):(0,r.jsx)(B.A,{href:"/account/my-goals/meal-goals",sx:P,variant:"text",size:"large",color:"primary",children:b("mygoals.edit")})}):(0,r.jsx)(i.A,{children:(0,r.jsx)(B.A,{href:"/premium?f=premium-custom-meal-goals",sx:P,variant:"text",size:"large",color:"primary",children:b("mygoals.edit")})})]}),O.diary_preferences.meal_names.map((e,s)=>(0,r.jsxs)(n.A,{sx:C,"data-testid":`qa-regression=${e}`,children:[(0,r.jsx)(i.A,{children:(0,r.jsx)(o.A,{variant:"Body/Bold/MD",sx:H,children:e})}),J?(0,r.jsx)(i.A,{children:(0,y.ie)(R)?(0,r.jsx)(o.A,{sx:{...F,fontWeight:700},variant:"h5",children:O.app_preferences.meal_goals_enabled?(0,r.jsx)(w.A,{href:"/account/my-goals/meal-goals",children:b("mygoals.multi")}):"-"}):(0,r.jsx)(o.A,{sx:{...F,fontWeight:600},variant:"h5",children:O.app_preferences.meal_goals_enabled&&void 0!==R.default_goal.meal_goals?"kilojoules"===O.unit_preferences.energy?R&&Math.round((0,x.PS)(R.default_goal.meal_goals[s]?.energy.value)).toString():R&&Math.round(R.default_goal.meal_goals[s]?.energy.value).toString():"-"})}):(0,r.jsx)(i.A,{children:(0,r.jsx)(w.A,{"data-testid":"lock-icon-two",sx:{textDecoration:"none"},href:"/premium?f=premium-custom-meal-goals",children:(0,r.jsx)(l.A,{sx:{color:"common.brand.premium"}})})})]},s)),(0,r.jsxs)(i.A,{sx:[C,S,{mt:5}],"data-testid":"qa-regression-fitness-section",children:[(0,r.jsx)(o.A,{component:"h2",sx:L,children:b("mygoals.fitness")}),(0,r.jsx)(i.A,{children:(0,r.jsx)(B.A,{href:"/account/my-goals/fitness",sx:P,variant:"text",size:"large",color:"primary",children:b("mygoals.edit")})})]}),Object.keys(ea).map((e,s)=>{let a,t,l;return(0,r.jsxs)(n.A,{"data-testid":`qa-regression=${e}`,sx:[C,"energy"===e&&et&&I],children:[(0,r.jsx)(i.A,{children:(0,r.jsx)(o.A,{variant:"Body/Bold/MD",sx:H,children:ea[e]})}),(0,r.jsx)(i.A,{children:(0,r.jsx)(o.A,{variant:"Body/Bold/MD",sx:H,children:(a=R.default_goal.assign_exercise_energy,t="kilojoules"===O.goal_preferences.weekly_exercise_energy.unit?"kilojoulesCapitalized":"caloriesCapitalized",({energy:(l=O.goal_preferences).weekly_exercise_energy.value+" "+b(t),workouts:l.workouts_per_week+" "+b("mygoals.new.goals.workouts"),minutes:l.weekly_workout_duration,exercise:a})[e])})})]},s)}),ee?(0,r.jsxs)(n.A,{sx:C,"data-testid":`qa-regression-exercise.${O.unit_preferences.energy}`,children:[(0,r.jsx)(i.A,{children:(0,r.jsx)(o.A,{variant:"Body/Bold/
1MD",sx:H,children:"calories"===O.unit_preferences.energy?b("mygoals.exercise_calories"):b("mygoals.exercise_kilojoules")})}),(0,r.jsx)(i.A,{children:(0,r.jsx)(o.A,{variant:"Body/Bold/MD",sx:H,children:R&&"off"===R.default_goal.assign_exercise_energy?b("mygoals.meal.goals.off"):b("mygoals.meal.goals.on")})})]}):(0,r.jsx)(w.A,{"data-testid":"lock-icon-three",sx:W,href:"/premium?f=premium-assign-exercise",children:(0,r.jsxs)(n.A,{sx:C,"data-testid":`qa-regression-exercise.${O.unit_preferences.energy}`,children:[(0,r.jsx)(i.A,{children:(0,r.jsx)(o.A,{variant:"Body/Bold/MD",sx:H,children:"calories"===O.unit_preferences.energy?b("mygoals.exercise_calories"):b("mygoals.exercise_kilojoules")})}),(0,r.jsxs)(i.A,{children:[(0,r.jsx)(l.A,{sx:{...V,ml:-6}}),(0,r.jsx)(o.A,{variant:"Body/Bold/MD",sx:H,children:R&&"off"===R.default_goal.assign_exercise_energy?b("mygoals.meal.goals.off"):b("mygoals.meal.goals.on")})]})]})})]}),(0,r.jsxs)(i.A,{"data-testid":"qa-regression-micronutrients-section",sx:[z,q],children:[(0,r.jsxs)(i.A,{sx:[C,S],children:[(0,r.jsx)(o.A,{component:"h2",sx:L,children:b("mygoals.micronutrients")}),(0,r.jsx)(i.A,{children:(0,r.jsx)(B.A,{href:"/account/my-goals/micronutrients",sx:P,variant:"text",size:"large",color:"primary",children:b("mygoals.edit")})})]}),u.ZE.map((e,s)=>(0,r.jsxs)(n.A,{sx:C,children:[(0,r.jsx)(i.A,{children:(0,r.jsx)(o.A,{variant:"Body/Bold/MD",sx:H,children:b(`${e}`)})}),(0,r.jsx)(i.A,{children:(0,r.jsxs)(o.A,{variant:"Body/Bold/MD",sx:H,children:[(e=>{if(O&&R){let s=R.default_goal;return({saturated_fat:s.saturated_fat,polyunsaturated_fat:s.polyunsaturated_fat,monounsaturated_fat:s.monounsaturated_fat,trans_fat:s.trans_fat,cholesterol:s.cholesterol,sodium:s.sodium,potassium:s.potassium,fiber:s.fiber,sugar:s.sugar,vitamin_a:s.vitamin_a,vitamin_c:s.vitamin_c,calcium:s.calcium,iron:s.iron})[e]}})(e)+" ","%"===g.qn[e]?"%DV":b(g.qn[e])]})})]},s))]})]}),(0,r.jsx)(k.A,{adUnitPath:"MyHome/Goals_1",bottom:!0,sx:K})]})};N.Layout=b.A;var $=!0;let G=N},60017:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/my-goals",function(){return a(58500)}])},62455:(e,s,a)=>{"use strict";a.d(s,{A:()=>g});var r=a(64255),t=a(55714),i=a(1179),o=a(27034),n=a(67230),l=a(68559),d=a(66448);let c={display:"flex",justifyContent:"center"};function g({adUnitPath:e,bottom:s=!1,large:a=!1,uniqueID:u=e,sx:x={},...m}){let y,h,p,_=(0,l.Vb)(),{data:{client:f}}=(0,o.Pj)(n.M_),A=(0,l.al)(),j=(0,t.A)(e=>e.breakpoints.up("lg"),{defaultMatches:"Web"===f}),b=_(s?"adTitleBottom":"adTitleTop");return A?(y="320x50",h=e+"_1",p=u+"_1"):a&&j?(y="970x250",h=e+"_2",p=u+"_2"):(y="728x90",h=e+"_3",p=u+"_3"),(0,r.jsx)(i.A,{sx:[c,...Array.isArray(x)?x:[x??!1]],children:(0,r.jsx)(d.Ay,{adUnitPath:h,size:y,title:b,uniqueID:p,...m})})}},66448:(e,s,a)=>{"use strict";a.d(s,{Ay:()=>m});var r=a(64255),t=a(41695),i=a(1179),o=a(42869),n=a(9243),l=a(95863),d=a(50849),c=a(13621),g=a(61308);let u={bgcolor:"#E0E0E0",overflow:"hidden"},x=e=>Array.isArray(e[0]),m=({adUnitPath:e="",size:s,uniqueID:a,title:m,sx:y={}})=>{let{adsReady:h}=(0,g.g)(),p=l.O.googleAdKey.apiKey+e,_=d.x8[s],[f,A]=x(_)?_.reduce(([e,s],[a,r])=>[Math.max(e,a),Math.max(s,r)],[0,0]):_,{locale:j}=(0,n.useRouter)(),b=(0,o.jE)(),v=b.getQueryData(["user"]),w=v?.location_preferences.country_code,k=b.getQueryData(["subscription",w,j]),{[c.m_]:B}=(0,c.zt)(k);return((0,t.useEffect)(()=>{let e=()=>{},s=e=>{if(!e.getSizes)return void console.error("Unable to fetch ads: Slot does not have sizes");let s=e.getSizes()[0],a={slotID:e.getSlotElementId(),slotName:e.getAdUnitPath(),sizes:[s.width,s.height]};window.apstag?.fetchBids({slots:[a]},function(){window.googletag?.pubads().setForceSafeFrame(!0),window.apstag?.setDisplayBids(),window.googletag?.pubads().refresh([e])})},r=async()=>{window.googletag||Object.assign(window,{googletag:{cmd:[]}});let r=window.googletag;if(r)try{r.cmd.push(async()=>{let t=r.pubads().getSlots().find(e=>e.getSlotElementId()===a);(t&&r.pubadsReady&&s(t),!t)&&(t=r.defineSlot(p,x(_)?_.map(([e,s])=>[e,s]):[_[0],_[1]],a)??void 0)&&(t.addService(r.pubads()),r.pubads().disableInitialLoad(),r.enableServices(),r.display(a),s(t));e=()=>{r.cmd.push(()=>{t&&r.pubads().clear([t])})}})}catch(e){console.warn("Error loading Google Ad:",e)}};return!B&&h&&r(),e},[_,a,p,B,h]),B)?null:(0,r.jsx)(i.A,{title:m,sx:[u,{width:f+"px",height:A+"px"},...Array.isArray(y)?y:[y]],children:(0,r.jsx)(i.A,{id:a})})}},82423:(e,s,a)=>{"use strict";a.d(s,{a:()=>n});var r=a(64255),t=a(1179);a(41695);var i=a(38782);let o={display:"flex",justifyContent:"center",alignItems:"center",minHeight:{xs:"c
1alc(100vh - 283px)",md:"calc(100vh - 240px)"}};function n({sx:e={},size:s=40}){return(0,r.jsx)(t.A,{sx:[o,...Array.isArray(e)?e:[e]],children:(0,r.jsx)(i.A,{size:s})})}}},e=>{e.O(0,[7124,636,6593,8792],()=>e(e.s=60017)),_N_E=e.O()}]);
2//# sourceMappingURL=my-goals-4fc37aea61a2d12f.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.