"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6885],{ytAX:function(e,t,i){i.d(t,{e_:function(){return p},a1:function(){return addMoreDataBMIAndSendToSidis},W5:function(){return clearBmiGuestPersistedState},LB:function(){return consumeBmiFormStateAfterSso},LM:function(){return generateBmiLevel},eo:function(){return generateBmiRedirect},eO:function(){return generateBmiUrlParamObj},pb:function(){return getBmiAdditionalQNA},v:function(){return getBmiLevel},Ew:function(){return normalizeMetricForPersistence},hZ:function(){return peekBmiSsoPendingForm},ce:function(){return postBmiToOpenHealthTools},XL:function(){return postBmiToSidis},j$:function(){return profileStorageValueToFormUnit},aK:function(){return queryWithoutBmiToolParams},TI:function(){return saveBmiFormStateForSsoRecovery}});var a=i("v7JE"),l=i("nSs0"),o=i("p46w"),n=i.n(o),r=i("NFrr"),s=i.n(r),d=i("cr+I"),c=i("09QT"),u=i("oQBk"),g=i("+ZIF"),m=i("nLRR"),h=i("rIrU"),v=i("9L6u");let BMI_ADDITIONAL_QUESTIONS_BY_NAME=e=>({question1:{id:1,value:e({id:"bmi.question.weightLossSupport",defaultMessage:"Are you interested in weight-loss treatment/support?"})},question2:{id:2,value:e({id:"bmi.question.glp1Awareness",defaultMessage:"Are you aware of GLP-1 treatment?"})},newsletter:{id:3,value:e({id:"bmi.newsletter.label",defaultMessage:"Stay in the loop, shed the weight: Get expert updates on weight loss treatments and support directly to your inbox"})}}),roundPersistedMetric=e=>Math.round(100*e)/100;function normalizeMetricForPersistence(e,t,i,a){if(void 0===t||""===t)return;let l=parseFloat(String(t));if(!Number.isNaN(l))return String(function(e,t,i,a){let l=(0,g.Cj)(e),o=t;return a===l?roundPersistedMetric(o):roundPersistedMetric(o="metric"===l&&"imperial"===a?"height"===i?m.convertFtToCm(o):m.convertLbsToKg(o):"height"===i?m.convertCmToFt(o):m.convertKgToLbs(o))}(e,l,i,a))}function profileStorageValueToFormUnit(e,t,i,a){if(void 0===t||""===t)return"";let l=(0,g.Cj)(e),o=parseFloat(String(t));return Number.isNaN(o)?"":(l===a||("metric"===l&&"imperial"===a?o="height"===i?m.convertCmToFt(o):m.convertKgToLbs(o):"imperial"===l&&"metric"===a&&(o="height"===i?m.convertFtToCm(o):m.convertLbsToKg(o))),String(roundPersistedMetric(o)))}let p="bmis",b={underweight:{id:"bmi.result.underweight",defaultMessage:"Underweight",color:l.t.blue[6],score:1,male:{inactiveImage:"/images/bmi-underweight-male-inactive.svg",activeImage:"/images/bmi-underweight-male-active.svg"},female:{inactiveImage:"/images/bmi-underweight-female-inactive.svg",activeImage:"/images/bmi-underweight-female-active.svg"}},healthy:{id:"bmi.result.healthy",defaultMessage:"Healthy",color:l.t.green[6],score:2,male:{inactiveImage:"/images/bmi-healthy-male-inactive.svg",activeImage:"/images/bmi-healthy-male-active.svg"},female:{inactiveImage:"/images/bmi-healthy-female-inactive.svg",activeImage:"/images/bmi-healthy-female-active.svg"}},overweight:{id:"bmi.result.overweight",defaultMessage:"Overweight",color:l.t.yellow[6],score:3,male:{inactiveImage:"/images/bmi-overweight-male-inactive.svg",activeImage:"/images/bmi-overweight-male-active.svg"},female:{inactiveImage:"/images/bmi-overweight-female-inactive.svg",activeImage:"/images/bmi-overweight-female-active.svg"}},obese_level:{id:"bmi.result.obese",defaultMessage:"Obese",color:l.t.yellow[9],score:4,male:{inactiveImage:"/images/bmi-obese_level_1-male-inactive.svg",activeImage:"/images/bmi-obese_level_1-male-active.svg"},female:{inactiveImage:"/images/bmi-obese_level_1-female-inactive.svg",activeImage:"/images/bmi-obese_level_1-female-active.svg"}},obese_level_1:{id:"bmi.result.obese1",defaultMessage:"Obese 1",color:l.t.yellow[9],score:4,male:{inactiveImage:"/images/bmi-obese_level_1-male-inactive.svg",activeImage:"/images/bmi-obese_level_1-male-active.svg"},female:{inactiveImage:"/images/bmi-obese_level_1-female-inactive.svg",activeImage:"/images/bmi-obese_level_1-female-active.svg"}},obese_level_2:{id:"bmi.result.obese2",defaultMessage:"Obese 2",color:l.t.red[8],score:5,male:{inactiveImage:"/images/bmi-obese_level_2-male-inactive.svg",activeImage:"/images/bmi-obese_level_2-male-active.svg"},female:{inactiveImage:"/images/bmi-obese_level_2-female-inactive.svg",activeImage:"/images/bmi-obese_level_2-female-active.svg"}},obese_level_3:{id:"bmi.result.obese3",defaultMessage:"Obese 3",color:l.t.red[9],score:6,male:{inactiveImage:"/images/bmi-obese_level_3-male-inactive.svg",activeImage:"/images/bmi-obese_level_3-male-active.svg"},female:{inactiveImage:"/images/bmi-obese_level_3-female-inactive.svg",activeImage:"/images/bmi-obese_level_3-female-active.svg"}}},f={underweight:[0,18.5],healthy:[18.5,23],overweight:[23,25],obese_level_1:[25,30],obese_level_2:[30,999]},updateRange=e=>{if(e&&(f={underweight:[0,e.underweight],healthy:[e.underweight,e.healthy],overweight:[e.healthy,e.overweight],obese_level_1:[e.overweight,e.obese_level_1],obese_level_2:[e.obese_level_1,e.obese_level_2||999],...e.obese_level_2?{obese_level_3:[e.obese_level_2,e.obese_level_3||999]}:{}},!(null==e?void 0:e.obese_level_1)&&!(null==e?void 0:e.obese_level_2)&&!(null==e?void 0:e.obese_level_3))){f.obese_level=[e.overweight,999],delete f.obese_level_1,delete f.obese_level_2,delete f.obese_level_3;return}};function getBmiLevel(e,t,i){if(!e||!t)return 1;let a=1;updateRange(i);let l=f;return Object.keys(l).forEach(t=>{let i=l[t];i&&s()(e,i[0],i[1])&&(a=b[t].score)}),a}function generateBmiLevel(e){let{f:t,gender:i,bmiValue:a,bmiRange:l}=e;updateRange(l);let o=f,n=Object.keys(o),r=Object.values(o),s=r[r.length-1][0]-r[0][0]+5,d=[];return{activePercent:Math.floor(void 0!==a?a/s*100:0),conditions:n.map((e,l)=>{let r;let c=o[e],u=b[e],g=l===n.length-1;if(!c)return;let m=c[0].toString(),h=c[1].toString();r=g?"> "+m:"0"===m?"< "+h:"".concat(m).concat(" - ").concat((100*+h-10)/100);let v={isActive:!1,value:c[0],valueKey:e,score:null==u?void 0:u.score,image:"",title:t({id:u.id,defaultMessage:u.defaultMessage}),description:r,color:u.color,percent:0,milestone:m.toString()+(g?"+":"")};v.isActive=void 0!==a&&c[0]<=a&&ae+=t,0))*100)/100),v.percent=p,v}).filter(Boolean)}}function generateBmiUrlParamObj(e){return{result:1,[a.Q.gender]:(0,v.QX)(e.gender),[a.Q.age]:e.age,[a.Q.height]:e.height,[a.Q.weight]:e.weight,joincommunity:1,[a.Q.yourself]:Number(!!e.isCheckYourself),[a.Q.activityLevel]:e.activityLevel,...e.lbs?{lbs:1}:{}}}function generateBmiRedirect(e,t){let i=d.stringifyUrl({url:e,query:generateBmiUrlParamObj(t)},{skipEmptyString:!0,skipNull:!0});return i}let y="hhg_bmi_sso_pending_form";function saveBmiFormStateForSsoRecovery(e,t){try{var i;let a=e.birthday instanceof Date&&!Number.isNaN(e.birthday.getTime())?e.birthday.toISOString():void 0,l=null!==(i=null==t?void 0:t.unit)&&void 0!==i?i:1===Number(e.lbs)?"imperial":"metric",o={gender:e.gender,age:e.age,height:null!=e.height&&""!==e.height?String(e.height):void 0,weight:null!=e.weight&&""!==e.weight?String(e.weight):void 0,activityLevel:e.activityLevel,question1:e.question1,question2:e.question2,newsletter:e.newsletter,lbs:1===Number(e.lbs)?1:void 0,isCheckYourself:e.isCheckYourself,birthday:a,unit:l};sessionStorage.setItem(y,JSON.stringify(o))}catch(e){}}function consumeBmiFormStateAfterSso(){try{let e=sessionStorage.getItem(y);if(!e)return null;sessionStorage.removeItem(y);let t=JSON.parse(e);return t&&"object"==typeof t?t:null}catch(e){return null}}function peekBmiSsoPendingForm(){try{let e=sessionStorage.getItem(y);if(!e)return null;let t=JSON.parse(e);return t&&"object"==typeof t?t:null}catch(e){return null}}function clearBmiGuestPersistedState(){try{sessionStorage.removeItem(y),localStorage.removeItem(p)}catch(e){}}let _=new Set(["result","joincommunity","lbs"]),S=new Set(["slug"]);for(let e of Object.values(a.Q))"string"!=typeof e||S.has(e)||_.add(e);function queryWithoutBmiToolParams(e){let t={...e};for(let e of _)delete t[e];return t}function addMoreDataBMIAndSendToSidis(e,t){let{articleCategories:i,positionType:a,additionalQuestion:l,phone:o,area_code:n,name:r,recaptcha_token:s}=t,d=1===Number(e.lbs)?"imperial":"metric",c=parseFloat(e.height||""),u=parseFloat(e.weight||""),g=Number.isNaN(c)?0:c,m=Number.isNaN(u)?0:u,h={...e,source_url:window.location.href,height:g,weight:m,device_type:"web",phone:o,area_code:n,name:r,...(null==e?void 0:e.isCheckYourself)&&{is_my_self:1},...Array.isArray(l)&&l.length>0&&{additional_questions:l},recaptcha_token:s};return h.lbs=1===Number(e.lbs)?1:void 0,h.unit=d,void 0!==h.isCheckYourself&&delete h.isCheckYourself,i&&(h.categories=i.map(e=>({name:e.name||"",permalink:e.permalink||"",term_id:e.termId||"",text_color:e.textColor||""}))),a&&(h.position_type=a),h}function postBmiToSidis(e,t){let i=(null==t?void 0:t.score_level)||getBmiLevel(null==t?void 0:t.bmi,e),a=(null==t?void 0:t.ga_client_id)||n().get("_ga")||"",l=(null==t?void 0:t.site_id)||parseInt(h.CX[e].SITE_ID),o=(null==t?void 0:t.submited_at)||new Date().toISOString(),r=(null==t?void 0:t.unit)||(1===Number(null==t?void 0:t.lbs)?"imperial":"metric"),s={age:Number(null==t?void 0:t.age),gender:(null==t?void 0:t.gender)==="male",height:null==t?void 0:t.height,weight:null==t?void 0:t.weight,additional_questions:(null==t?void 0:t.additional_questions)||[],objective:1,account_id:t.account_id,ga_client_id:a,site_id:l,email:t.email,score_level:i,score:null==t?void 0:t.bmi,unit:r,submited_at:o,categories:null==t?void 0:t.categories,position_type:null==t?void 0:t.position_type,device_type:null==t?void 0:t.device_type,is_my_self:null==t?void 0:t.is_my_self,active_level:null==t?void 0:t.active_level,url:window.location.href,source_url:null==t?void 0:t.source_url,phone:null==t?void 0:t.phone,area_code:null==t?void 0:t.area_code,name:null==t?void 0:t.name};return(0,c.d)(u.y.SIDIS.POST_SIDIS_BMI,{method:"POST",data:s},"sidis_update")}function getBmiAdditionalQNA(e,t){let i=BMI_ADDITIONAL_QUESTIONS_BY_NAME(e);return["question1","question2","newsletter"].map(e=>{let a=t[e];return{question:i[e],answer:{id:i[e].id,value:"1"===a||!0===a?"Yes":"No"}}})}function postBmiToOpenHealthTools(e,t){var i;let a=(null==t?void 0:t.score_level)||getBmiLevel(null==t?void 0:t.bmi,e),l=(null==t?void 0:t.ga_client_id)||n().get("_ga")||"",o=(null==t?void 0:t.site_id)||parseInt(h.CX[e].SITE_ID),r=(null==t?void 0:t.submitted_at)||new Date().toISOString(),s={age:Number(null==t?void 0:t.age),gender:null==t?void 0:null===(i=t.gender)||void 0===i?void 0:i.toUpperCase(),height:null==t?void 0:t.height,weight:null==t?void 0:t.weight,additional_questions:(null==t?void 0:t.additional_questions)||[],objective:1,ga_client_id:l,site_id:o,score_level:a,score:null==t?void 0:t.bmi,submitted_at:r,categories:null==t?void 0:t.categories,position_type:null==t?void 0:t.position_type,device_type:null==t?void 0:t.device_type,is_my_self:null==t?void 0:t.is_my_self,active_level:null==t?void 0:t.active_level,url:window.location.href,source_url:null==t?void 0:t.source_url,phone:null==t?void 0:t.phone,area_code:null==t?void 0:t.area_code,name:null==t?void 0:t.name,recaptcha_token:null==t?void 0:t.recaptcha_token};return(0,c.d)(u.y.OPEN_HEALTH_TOOLS.BMI_LOG,{method:"POST",data:s},"open_health_tools")}},HmHl:function(e,t,i){i.d(t,{Bc:function(){return n},Ue:function(){return r},XN:function(){return d},jx:function(){return o},vw:function(){return c},wy:function(){return s}});var a=i("rBCA"),l=i("oKqh");let o=(0,a.Z)("div",{target:"e1xh3v8x0"})(l.M.mbUp,"{padding-left:16px;padding-right:16px;}padding-bottom:60px;&.baby-growth{padding-bottom:0;}"),n=(0,a.Z)("div",{target:"e1xh3v8x1"})("& >:not(:last-child){margin-bottom:28px;}"),r=(0,a.Z)("div",{target:"e1xh3v8x2"})(l.M.mbUp,"{padding-left:16px;padding-right:16px;}"),s=(0,a.Z)("div",{target:"e1xh3v8x3"})("padding-top:32px;& > div{margin-bottom:24px;}",l.M.mbUp,"{padding-left:16px;padding-right:16px;}"),d=(0,a.Z)("div",{target:"e1xh3v8x4"})("margin:32px 0 10px 0;"),c=(0,a.Z)("img",{target:"e1xh3v8x5"})("position:absolute;top:0;bottom:0;left:0;width:24px;height:24px;margin:auto;cursor:pointer;")},QXTB:function(e,t,i){i.r(t),i.d(t,{BMIToolPage:function(){return BMIToolPage}});var a=i("BGKE"),l=i("q1tI"),o=i("4vXT"),n=i("v7JE"),r=i("4h+C"),s=i("p46w"),d=i.n(s),c=i("dDsW"),u=i("09QT"),g=i("oQBk"),m=i("CJtR"),h=i("g/tz"),v=i("ouLS"),p=i("Y/XE"),b=i("bLQg"),f=i("gNV7"),y=i("2su4"),_=i("hXNO"),S=i("P5LW"),w=i("rIrU"),T=i("8vdq"),I=i("qyQD"),Z=i("gwk1"),C=i("05Ua"),x=i("o0qI"),B=i("9O6x"),R=i("F/Hd"),k=i("8vDj"),N=i("OAL+"),M=i("K27U"),L=i("0njy");let FAQScreen=e=>{let{bmrData:t}=e,{formatMessage:i}=(0,c.Z)(),l=(0,k.rZ)(),o=null==t?void 0:t.bmiResult,n=null==o?void 0:o.community,r=o.faqs;return n||r?(0,a.BX)(N.K,{children:[n&&(0,a.BX)(N.K,{spacing:24,children:[(0,a.BX)(N.K,{spacing:8,children:[(0,a.tZ)(R.T,{size:"s1",weight:"semiBold",color:l.colors.gray[8],children:null==n?void 0:n.title}),(0,a.tZ)(R.T,{size:"p4",color:l.colors.gray[6],children:null==n?void 0:n.description})]}),(0,a.tZ)(L.EmbeddedCommunity.HealthTool,{community:n,style:{marginTop:0}})]}),r&&r.length>0&&(0,a.tZ)(M.e,{expandFirst:!0,faqs:r,titleProps:{icon:(0,a.tZ)("img",{style:{height:"16px",width:"16px"},src:"".concat(w.Nr,"/info-icon.svg"),alt:"",loading:"lazy"}),headingTitle:i({id:"tools.faqs",defaultMessage:"FAQs"})}})]}):null};var P=i("Eso5"),O=i("mYVa"),A=i("SPK5"),E=i("0D4Z"),F=i("HgWy"),D=i("1+YQ"),W=i("sKr0"),X=i("9L6u"),z=i("Xbyz");let GeneralResultScreen=e=>{var t,i,l,o,r,s,d,c,u;let{loading:g,bmiLink:m,bmiContent:h,bmrData:v}=e,{bmi:p=0,gender:b="male"}=v||{},f=(0,k.rZ)(),y=(0,_.d)(),S="".concat(m,"?").concat(n.Q.bmi,"=").concat(p,"&").concat(n.Q.gender,"=").concat((0,X.QX)(b));return v||g?(0,a.BX)(N.K,{sx:{gap:16},children:[(0,a.BX)(N.K,{spacing:16,children:[(0,a.tZ)(P.x,{sx:{[f.fn.largerThan("sm")]:{backgroundColor:"#fff",borderRadius:12,padding:"".concat((0,O.h)(24)," ").concat((0,O.h)(40)," ").concat((0,O.h)(24))}},children:(0,a.tZ)(F.M,{loading:g,bmi:parseFloat(((null==v?void 0:v.bmi)||"").toString()),conditions:(null==v?void 0:null===(t=v.bmiLevels)||void 0===t?void 0:t.conditions)||[],activePercent:null==v?void 0:null===(i=v.bmiLevels)||void 0===i?void 0:i.activePercent,activeCond:null==v?void 0:v.activeCond})}),!y&&(0,a.tZ)(A.k,{justify:"center",children:g?(0,a.tZ)(E.O,{width:246,height:36,radius:24}):(0,a.tZ)(W.n.BottomNavHorizonal,{bgColor:"#fff",shareUrl:S,showFull:!0,iconSize:24,styles:{heading:{fontSize:12},copyRoot:{input:{border:0}},wrapper:{paddingRight:40},controls:{overflow:"hidden"}}})})]}),(0,a.tZ)(z.k.Bmi,{loading:g,recommendMaxWeight:(null==v?void 0:v.recommendMaxWeight)||"",recommendMinWeight:(null==v?void 0:v.recommendMinWeight)||"",unit:null==v?void 0:v.unit,calories:null==v?void 0:v.calories,ctaText:null==h?void 0:null===(l=h.customWeightGainBanner)||void 0===l?void 0:l.buttonText,ctaColor:null==h?void 0:null===(o=h.customWeightGainBanner)||void 0===o?void 0:o.buttonColor,ctaUrl:null==h?void 0:null===(r=h.customWeightGainBanner)||void 0===r?void 0:r.link,sx:{height:"100%",".mantine-WeightManagement-goalFooter":{height:"100%",justifyContent:"space-between"},".mantine-WeightManagement-btn":{width:"100%"}}}),(null==h?void 0:null===(s=h.additionalInfo)||void 0===s?void 0:s.image)&&(0,a.tZ)(D.M,{loading:g,ctaUrl:null==h?void 0:null===(d=h.additionalInfo)||void 0===d?void 0:d.ctaUrl,image:null==h?void 0:null===(c=h.additionalInfo)||void 0===c?void 0:c.image,imageMobile:null==h?void 0:null===(u=h.additionalInfo)||void 0===u?void 0:u.imageMobile})]}):null};var Q=i("ytAX"),H=i("/npG"),U=(0,H.k)(e=>({root:{[e.fn.largerThan("sm")]:{".mantine-HealthToolFormWrapper__FormRow-root":{paddingLeft:0,paddingRight:0}}},actions:{paddingTop:16,[e.fn.largerThan("sm")]:{position:"sticky",left:0,right:0,bottom:0,backgroundColor:"#fff",zIndex:1,paddingBottom:24,paddingTop:24}},btn:{width:"100%"}})),K=i("WS31"),G=i("6HDN"),q=i("h3Tz"),j=i("mAfZ"),V=i("DA0W"),Y=i("TIp3"),J=i("J8Dw"),$=i("aDCK"),ee=i("i8i4"),et=i("1qWt"),ei=(0,H.k)(e=>({container:{minHeight:"100%",padding:"96px 24px 32px",background:"linear-gradient(180deg, rgba(44, 183, 66, 0.8) 0%, rgba(44, 183, 66, 0.1) 40%, rgba(44, 183, 66, 0) 100%), #ffffff",position:"relative",borderRadius:0,[e.fn.largerThan("sm")]:{minHeight:"auto",padding:16,borderRadius:0,background:"transparent"}},desktopContainer:{minHeight:"auto",padding:16,position:"relative"},desktopOverlay:{position:"fixed",inset:0,backgroundColor:"rgba(0, 0, 0, 0.4)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:320},desktopCard:{width:375,maxWidth:"100%",minHeight:408,borderRadius:16,background:"linear-gradient(180deg, rgba(44, 183, 66, 0.8) 0%, rgba(44, 183, 66, 0.1) 40%, rgba(44, 183, 66, 0) 100%), #ffffff",boxShadow:"0px 4px 8px rgba(0,0,0,0.04), 0px 0px 2px rgba(0,0,0,0.06), 0px 0px 1px rgba(0,0,0,0.04)",overflow:"hidden"},closeWrapper:{alignSelf:"flex-end",zIndex:10},closeButton:{width:40,height:40,borderRadius:999,padding:0,fontSize:22,color:"#262626",boxShadow:"0px 4px 8px rgba(0,0,0,0.04)",border:"1px solid rgba(0,0,0,0.04)",backgroundColor:"#fff",[e.fn.largerThan("sm")]:{width:40,height:40},"&:hover":{backgroundColor:"#fff"}},srOnly:{position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0},headline:{fontSize:17,lineHeight:"24px",letterSpacing:"-0.4px",color:"#111111",margin:0},headerRow:{},title:{display:"block",fontWeight:700,marginBottom:4},subtitle:{display:"block",fontWeight:400,color:"#595959"},avatar:{position:"relative",width:80,height:68,flexShrink:0},avatarBackdrop:{position:"absolute",right:0,top:0,width:56,height:62,borderRadius:7,backgroundColor:"rgba(255, 255, 255, 0.12)",overflow:"hidden"},avatarImage:{position:"relative",width:80,height:68,display:"block",objectFit:"contain",zIndex:1},field:{width:"100%"},phoneWrapper:{".PhoneInput":{"--phone-select":"65px"},".PhoneInputCountry":{marginTop:1,pointerEvents:"none",".PhoneInputArrowContainer":{display:"none"}}},submitButton:{height:48,minHeight:48,width:"100%",borderRadius:8,padding:"12px 16px",backgroundColor:"#00B16A","&:hover":{backgroundColor:"#00a262"}},submitLabel:{lineHeight:"24px",fontSize:16,fontWeight:600,color:"#ffffff"}}));let getLeadgenModalStyles=e=>({overlay:{backgroundColor:"transparent"},inner:{padding:0},content:{backgroundColor:"transparent",boxShadow:"none",height:e?"100%":"auto",width:"100%",borderRadius:0},body:{padding:0,height:e?"100%":"auto"}}),LeadgenModalContent=e=>{let{opened:t,locale:i,title:o,subtitle:n,namePlaceholder:s,whatsappPlaceholder:d,submitLabel:c,closeLabel:u,nameValue:g,whatsappValue:m,errors:h,onClose:v,onSubmit:p,onChangeName:b,onChangeWhatsapp:f,recaptchaSiteKey:y}=e,{classes:S}=ei(),T=(0,_.d)(),[I,Z]=(0,l.useState)(!1),[C,x]=(0,l.useState)(!1),[B,k]=(0,l.useState)(!1),{executeRecaptcha:M}=(0,et.xX)(),{TextField:L}=K.i,O=(0,l.useMemo)(()=>r.M[i]||"MY",[i]),A=(0,l.useCallback)(async e=>{if(null==e||e.preventDefault(),!y){p(e,void 0);return}if(!M){console.error("Execute recaptcha not yet available");return}k(!0);try{let t=await M("leadgen_submit");p(e,t)}catch(t){console.error("reCAPTCHA error:",t),p(e,void 0)}finally{k(!1)}},[M,p,y]);(0,l.useEffect)(()=>{Z(!0);let updateView=()=>{x(window.innerWidth>=768)};return updateView(),window.addEventListener("resize",updateView),()=>{window.removeEventListener("resize",updateView)}},[]);let E=(0,a.tZ)(P.x,{className:C?S.desktopContainer:S.container,children:(0,a.BX)(N.K,{spacing:16,children:[(0,a.tZ)(P.x,{className:S.closeWrapper,children:(0,a.BX)(j.z,{variant:"white",className:S.closeButton,onClick:v,children:[(0,a.tZ)("span",{"aria-hidden":!0,children:"\xd7"}),(0,a.tZ)("span",{className:S.srOnly,children:u})]})}),(0,a.BX)(V.Z,{position:"apart",align:"flex-start",spacing:8,noWrap:!0,className:S.headerRow,children:[(0,a.BX)(Y.x,{className:S.headline,children:[(0,a.tZ)("span",{className:S.title,children:o}),(0,a.tZ)("span",{className:S.subtitle,children:n})]}),(0,a.BX)(P.x,{className:S.avatar,children:[(0,a.tZ)("span",{className:S.avatarBackdrop}),(0,a.tZ)("img",{alt:"",className:S.avatarImage,loading:"lazy",src:"".concat(w.Nr,"/bmi-leadgen/doctor-wa-avatar.png")})]})]}),(0,a.tZ)(P.x,{component:"form",onSubmit:A,children:(0,a.BX)(N.K,{spacing:16,children:[(0,a.BX)(N.K,{spacing:8,children:[(0,a.tZ)(L,{shrink:!!g,className:S.field,children:(0,a.tZ)(L.Control,{children:e=>{let{shrink:t}=e;return(0,a.tZ)(J.o,{spellCheck:!1,withAsterisk:!0,label:(0,a.tZ)(R.T,{size:t?"p3":"p2",variant:"secondary",weight:"halfBold",children:s}),placeholder:" ",inputWrapperOrder:["label","input","description","error"],value:g,onChange:e=>b(e.currentTarget.value),error:h.name&&(0,a.tZ)(G.e,{label:h.name,withIcon:!0})})}})}),(0,a.tZ)(L,{shrink:!!m,className:S.field,children:(0,a.tZ)(L.Control,{children:e=>{let{shrink:t}=e;return(0,a.tZ)($.I.Wrapper,{withAsterisk:!0,label:(0,a.tZ)(R.T,{size:t?"p3":"p2",variant:"secondary",weight:"halfBold",children:d}),inputWrapperOrder:["label","input","description","error"],error:h.whatsapp&&(0,a.tZ)(G.e,{label:h.whatsapp,withIcon:!0}),children:(0,a.tZ)(P.x,{className:"mantine-Input-wrapper ".concat(S.phoneWrapper),children:(0,a.tZ)(G.P,{inputId:"phone-input",className:"mantine-Input-input",spellCheck:!1,type:"tel",placeholder:" ",defaultCountry:O,value:m,onChange:e=>{let t="",i="";if(e){var a;let l=document.getElementById("phone-input");t=(null==l?void 0:null===(a=l.value)||void 0===a?void 0:a.replace(/-/g,""))||"",i=e.replace(t,"")}f(t,i)}})})})}})})]}),h.recaptcha&&(0,a.tZ)(G.e,{label:h.recaptcha,withIcon:!0}),(0,a.tZ)(j.z,{type:"submit",loading:B,classNames:{root:S.submitButton,label:S.submitLabel},children:c})]})})]})});return I&&C?t&&"undefined"!=typeof document?(0,ee.createPortal)((0,a.tZ)(P.x,{className:S.desktopOverlay,onClick:v,children:(0,a.tZ)(P.x,{className:S.desktopCard,onClick:e=>e.stopPropagation(),children:E})}),document.body):null:(0,a.tZ)(q.M,{opened:t,onClose:v,withCloseButton:!1,fullScreen:T,centered:!T,styles:getLeadgenModalStyles(T),zIndex:320,children:E})};var leadgenModal=e=>{let{recaptchaSiteKey:t,...i}=e;return t?(0,a.tZ)(et.pm,{reCaptchaKey:t,children:(0,a.tZ)(LeadgenModalContent,{...i,recaptchaSiteKey:t})}):(0,a.tZ)(LeadgenModalContent,{...i,recaptchaSiteKey:void 0})},ea=i("J+gj"),el=i("Vvt1"),eo=i.n(el),en=i("GnTU"),er=i("0L5m"),es=i("HmHl");let ed=eo()(()=>Promise.all([i.e(2138),i.e(9467),i.e(4467),i.e(6966),i.e(5243),i.e(8132),i.e(1375),i.e(4561),i.e(1448),i.e(5465),i.e(1217),i.e(5480),i.e(731),i.e(2050),i.e(2008),i.e(8469),i.e(8214),i.e(1482),i.e(6817),i.e(467),i.e(5951),i.e(9357),i.e(747),i.e(5675),i.e(6753),i.e(4802),i.e(3046),i.e(5745),i.e(3437),i.e(252),i.e(6839),i.e(9424),i.e(5702),i.e(8922),i.e(6399),i.e(553),i.e(2902),i.e(4969),i.e(3257),i.e(6611),i.e(7538),i.e(6894),i.e(5341),i.e(4846),i.e(2233),i.e(1058),i.e(3295),i.e(1538),i.e(6629),i.e(7152),i.e(5684),i.e(2574),i.e(9884),i.e(7644),i.e(6962),i.e(6638),i.e(7741),i.e(1137),i.e(2433),i.e(5385),i.e(3564),i.e(7082),i.e(3158),i.e(5641),i.e(7454),i.e(7004),i.e(4758),i.e(6219),i.e(17),i.e(8990),i.e(4067),i.e(9487),i.e(9931),i.e(9083),i.e(1520),i.e(270),i.e(7596),i.e(8217),i.e(7543),i.e(2835),i.e(2507),i.e(6885),i.e(7859),i.e(690),i.e(2730),i.e(6287),i.e(7682),i.e(1551),i.e(4870),i.e(9922),i.e(3133),i.e(612),i.e(2002),i.e(1880),i.e(7471),i.e(7165),i.e(5451),i.e(8612)]).then(i.bind(i,"XRSz")).then(e=>e.ToolsChart),{loadableGenerated:{webpack:()=>["XRSz"]},ssr:!1}),ComparisonChart=e=>{var t,i,o,n;let{bmiResult:r,activeCond:s,bmi:d}=e,{formatMessage:u}=(0,c.Z)(),g=(0,k.rZ)(),m=(0,_.d)(),h=(0,l.useMemo)(()=>r.chartData.findIndex(e=>e.bmi+""==Math.round(parseFloat(String(d)))+""),[]),v=(0,l.useMemo)(()=>{var e;return Math.round((null!==(e=r.chartData.reduce((e,t,i)=>i>h?{bmi:t.bmi,percent:e.percent+t.percent}:{bmi:t.bmi,percent:e.percent},{percent:0,bmi:d}).percent)&&void 0!==e?e:0)*100)},[]),p=(0,l.useMemo)(()=>{var e;return Math.round((null!==(e=r.chartData.reduce((e,t,i)=>iu({id:"bmi.result.chart.shortenDescription",defaultMessage:"In a group of people of your sex and age, {higher}% have higher BMI than you and {lower}% have lower BMI than you."},{higher:v,lower:p}),[]),f=[{heading:u({id:"tools.condition"}),content:null==r?void 0:null===(i=r.assessmentData)||void 0===i?void 0:null===(t=i[0])||void 0===t?void 0:t.content,icon:(0,a.tZ)(ea.Z,{size:m?16:20,color:g.fn.primaryColor()})},{icon:(0,a.tZ)(er.Z,{isOutline:!0,size:m?16:20}),heading:u({id:"tools.risks"}),content:null==r?void 0:null===(n=r.assessmentData)||void 0===n?void 0:null===(o=n[1])||void 0===o?void 0:o.content}];return(0,a.BX)(P.x,{children:[r.chartData&&r.chartData.length>0&&(0,a.tZ)(es.Ue,{children:(0,a.tZ)(ed,{highlightBmi:String(d),chartData:r.chartData,chartDescription:b,color:null==s?void 0:s.color})}),(0,a.tZ)(N.K,{spacing:(0,O.h)(16),className:"risk-and-condition",children:m?(0,a.tZ)(M.e,{faqs:f.map(e=>({title:(0,a.BX)(A.k,{gap:8,align:"center",children:[e.icon,(0,a.tZ)(R.T,{size:"title2",children:e.heading})]}),description:e.content}))}):f.map((e,t)=>(0,a.tZ)(en.T,{...e,className:"risk-item"},String(t)))})]})},RiskAndConditionTools=e=>{var t,i,l,o;let{bmrData:n}=e,{locale:r}=(0,S.h)(),s=(0,k.rZ)();if(!n)return null;let d=Number((null===(i=n.calories)||void 0===i?void 0:null===(t=i.bmi)||void 0===t?void 0:t.minWeight)||0).toLocaleString(r),c=Number((null===(o=n.calories)||void 0===o?void 0:null===(l=o.bmi)||void 0===l?void 0:l.maxWeight)||0).toLocaleString(r),u={bmiResult:n.bmiResult,activeCond:n.activeCond,bmi:Number(n.bmi),recommendMinWeight:d,recommendMaxWeight:c};return(0,a.tZ)(P.x,{sx:{[s.fn.largerThan("sm")]:{".risk-and-condition":{flexDirection:"row",marginTop:40},".risk-item":{backgroundColor:"#fff",borderRadius:8,width:"50%"}}},children:(0,a.tZ)(ComparisonChart,{...u})})};var ec=i("AlNH"),eu=i("oKqh"),eg=i("ns0B"),em=i.n(eg),eh=i("MP3q"),ev=i("UJaG"),ep=i("M1QZ"),eb=i("NeDJ"),ef=i("KBam"),ey=i("wCSE");let ArticleListing=e=>{let{listing:t,title:i,description:o}=e,{locale:n}=(0,S.h)(),r=(0,l.useMemo)(()=>(0,m.UC)(n),[n]),s=(0,k.rZ)(),d=(0,_.d)();return 0===t.length?null:(0,a.BX)(a.HY,{children:[(0,a.BX)(N.K,{spacing:24,children:[(0,a.BX)(N.K,{spacing:8,children:[(0,a.tZ)(R.T,{size:"s1",weight:"semiBold",color:s.colors.gray[8],children:i}),(0,a.tZ)(R.T,{size:"p4",color:s.colors.gray[6],children:o})]}),(0,a.tZ)(P.x,{sx:{[s.fn.smallerThan("sm")]:{marginLeft:-16,marginRight:-16}},children:(0,a.tZ)(ep.Z,{alwayShowProgressMobile:!0,slideSize:"100%",slideGap:16,slidesToScroll:1,withControls:!1,breakpoints:[{maxWidth:eu.B.BREAK_POINT_TABLET,slideSize:1===t.length?"100%":"80%",slideGap:24}],styles:e=>({viewport:{[e.fn.smallerThan("sm")]:{paddingLeft:16,paddingRight:16}}}),children:(0,a.BX)(N.K,{spacing:24,children:[(0,a.tZ)(P.x,{sx:{[s.fn.largerThan("sm")]:{backgroundColor:"#fff",borderRadius:16,padding:16}},children:(0,a.tZ)(ep.Z.Body,{children:(0,a.tZ)(eb.C,{itemsPerGroup:3,breakpoints:{base:{itemsPerGroup:1},md:{itemsPerGroup:3}},GroupWrapper:e=>(0,a.tZ)(ep.Z.Slide,{children:e}),items:t.map((e,t)=>{let i=(0,ef.kO)({article:e,locale:n,version:"short"});return(0,a.tZ)(P.x,{sx:{[s.fn.largerThan("sm")]:{...t%3!=0&&{paddingTop:16,marginTop:8,borderTop:"1px solid ".concat(s.colors.neutral[1])},".cardArticleContent":{gap:8}}},children:(0,a.tZ)(eh.p,{disableBookmark:!0,moveAuthorIntoContent:!d,type:d?"vertical":"horizontalFooter",item:{ID:parseInt("".concat(e.id)),image:e.featureImage,image1x1:e.featureImageWithRatio1x1,permalink:e.permalink,title:em()(e.postTitle||e.postName||""),category:e.category,author:{name:(0,a.tZ)(ev.x,{...i,formatOptionsProps:{expert_display_name:{"data-event-category":"Tool Category","data-event-action":"See Doctor","data-event-label":"".concat(r).concat(w.sb).concat(i.avatar_permalink)}}}),avatar:i.avatar,avatarAlt:i.avatar_alt,permalink:i.avatar_permalink,indicator:i.indicator}},itemTracking:{image:{"data-event-category":"Recommend Category","data-event-action":"Category Article Title","data-event-label":"".concat(r).concat(w.sb).concat(e.permalinkDecode)},title:{"data-event-category":"Recommend Category","data-event-action":"Category Article Title","data-event-label":"".concat(r).concat(w.sb).concat(e.permalinkDecode)},category:{"data-event-category":"Recommend Category","data-event-action":"Category Title","data-event-label":"".concat(r).concat(w.sb).concat(e.category.permalinkDecode)},authorAvatar:{"data-event-category":"Recommend Category","data-event-action":"See Doctor","data-event-label":"".concat(r).concat(w.sb).concat(i.avatar_permalink)}}})},"".concat(t))})})})}),(0,a.tZ)(P.x,{sx:{[s.fn.smallerThan("sm")]:{paddingLeft:16,paddingRight:16}},children:(0,a.BX)(ep.Z.Footer,{children:[(0,a.tZ)(ep.Z.Progress,{}),(0,a.BX)(ep.Z.Controls,{children:[(0,a.tZ)(ep.Z.Control,{direction:"prev","data-event-category":"Recommend Category","data-event-action":" See More Article","data-event-label":"".concat(r).concat(w.sb),color:"gray"}),(0,a.tZ)(ep.Z.Control,{direction:"next","data-event-category":"Recommend Category","data-event-action":"See More Article","data-event-label":"".concat(r).concat(w.sb),color:"gray"})]})]})})]})})})]}),(0,a.tZ)(ey.P,{})]})};var e_=i("C/sX"),eS=i("iBNF"),ew=i("iuhU"),eT=i("QM8a"),eI=i("oGOP");let ToolCard=e=>{let{item:t,showIconPhone:i,...l}=e,{link:o,icon:n,title:r}=t,s=!!(null==t?void 0:t.isMobileAppTool),d=(0,k.rZ)();return(0,a.BX)(P.x,{component:"a",href:o,target:"_blank",className:(0,ew.default)("relatedTool--card flex items-center gap-4 p-3 pr-4","relative bg-white rounded-lg","md:flex-col md:items-start md:min-h-[128px] md:h-full","[&+&]:max-md:mt-2"),...l,sx:{transition:"transform 0.2s",[d.fn.largerThan("sm")]:{"&:hover":{transform:"translateY(-5px)"}}},children:[(0,a.tZ)(P.x,{className:(0,ew.default)("relatedTool--icon relative w-10 h-10 bg-neutral50 rounded-[50%] overflow-hidden p-1","max-md:flex max-md:items-center"),children:(0,a.tZ)("img",{loading:"lazy",src:n,alt:r,className:(0,ew.default)("relatedTool--icon_img z-[2] relative")})}),(0,a.BX)("div",{className:(0,ew.default)("relatedTool--card_content","md:min-h-0 md:flex-1 md:flex md:items-center md:flex-wrap"),children:[(0,a.tZ)(R.T,{as:"span",size:"p2",color:eS.r.colors.gray800,className:"m-0 w-full block",children:r}),s&&(0,a.BX)(A.k,{gap:(0,O.h)(6),align:"center",py:(0,O.h)(5),children:[(0,a.tZ)(eT.Z,{className:"text-base leading-none w-[1em] h-[1em]"}),(0,a.tZ)(R.T,{as:"span",size:"n1",color:eS.r.colors.blue800,children:"Hello Bacsi app"})]})]}),s&&i&&(0,a.tZ)(A.k,{w:(0,O.h)(32),h:(0,O.h)(32),align:"center",justify:"center",className:"absolute top-0 right-0 p-[6px] text-xl leading-none",children:(0,a.tZ)(eI.Z,{className:"w-[1em] h-[1em]"})})]})},MoreTool=e=>{let{listing:t,title:i,description:l,color:o}=e,n=(0,k.rZ)();return 0===t.length?null:(0,a.BX)(N.K,{spacing:12,sx:{[n.fn.smallerThan("sm")]:{backgroundColor:n.colors.neutral[0],marginLeft:-16,marginRight:-16,padding:16}},children:[(0,a.BX)(N.K,{spacing:8,children:[(0,a.tZ)(R.T,{size:"s1",weight:"semiBold",color:n.colors.gray[8],children:i}),(0,a.tZ)(R.T,{size:"p4",color:n.colors.gray[6],children:l})]}),(0,a.tZ)(ep.Z,{slideSize:"100%",slideGap:8,slidesToScroll:1,withControls:!0,arrowColor:o,children:(0,a.tZ)(N.K,{spacing:24,children:(0,a.tZ)(ep.Z.Body,{children:(0,a.tZ)(eb.C,{breakpoints:{base:{itemsPerGroup:t.length,GroupWrapper:e=>(0,a.tZ)(ep.Z.Slide,{children:(0,a.tZ)(e_.r,{gutter:8,children:e})}),ItemWrapper:e=>(0,a.tZ)(e_.r.Col,{span:12,children:e})},md:{itemsPerGroup:3,GroupWrapper:e=>(0,a.tZ)(ep.Z.Slide,{sx:{paddingTop:5},children:(0,a.tZ)(e_.r,{gutter:8,children:e})}),ItemWrapper:e=>(0,a.tZ)(e_.r.Col,{span:4,children:e})}},items:t.map((e,t)=>(0,a.tZ)(ToolCard,{item:e},String(t)))})})})})]})};var eZ=i("7ihh"),eC=i("Sin0");let VideoItemListing=e=>{let{videos:t,onlyTypeVideo:i}=e,l=(0,k.rZ)();return(0,a.tZ)(P.x,{sx:{[l.fn.smallerThan("sm")]:{marginLeft:-16,marginRight:-16}},children:(0,a.tZ)(ep.Z,{containScroll:"trimSnaps",slideSize:"auto",slideGap:12,align:"start",withControls:!0,breakpoints:[{maxWidth:eu.B.BREAK_POINT_TABLET,slideSize:1===t.length?"100%":"auto",slideGap:24}],styles:()=>({viewport:{paddingLeft:16,paddingRight:16}}),children:(0,a.tZ)(N.K,{spacing:24,sx:()=>({marginLeft:-16,marginRight:-16}),children:(0,a.tZ)(ep.Z.Body,{children:(t||[]).map((e,t)=>(0,a.tZ)(ep.Z.Slide,{children:(0,a.tZ)(eZ.V,{data:e,dataEventCategory:"Recommend Video",dataEventAction:"Video Click ".concat(t+1),styles:{root:{borderRadius:8,width:e.type===eC.V.SHORTS?103:330,[l.fn.largerThan("sm")]:{width:i?420:e.type===eC.V.SHORTS?160:515}},title:{[l.fn.largerThan("sm")]:{fontSize:(0,O.h)(14),lineHeight:(0,O.h)(22)}}}})},String(t)))})})})})};var ex=i("KX2h");let VideoLibrary=e=>{let{videoList:t}=e,[i,o]=(0,l.useState)([]),[n,r]=(0,l.useState)(!1),s=(0,l.useCallback)(async()=>{try{r(!0);let e=await Promise.all(t.map(e=>(0,u.d)(g.y.TOGETHER.FETCH_PREVIEW,{method:"POST",data:{link:e.urlVideo}},"together")));r(!1);let i=e.map((e,i)=>{let a={id:i,videoId:String(i),url:t[i].urlVideo,title:t[i].videoTitle||e.title,description:"",type:eC.V.VIDEO,totalView:0,createTime:"",duration:0,image:t[i].image||"",imageMedium:t[i].image||"",imageThumbnail:t[i].image||"",active:!1,articleLink:""};return a}).filter(Boolean);i.length>0&&o(i)}catch(e){console.log(e),r(!1)}},[]);return(0,l.useEffect)(()=>{t.length>0&&s()},[t]),n?(0,a.tZ)(ex.g,{}):i.length>0?(0,a.tZ)(a.HY,{children:(0,a.tZ)(VideoItemListing,{onlyTypeVideo:!0,videos:i})}):null},VideoListing=e=>{let{title:t,videos:i=[],videoUrl:l=[]}=e,o=(0,k.rZ)();return 0===i.length&&0===l.length?null:(0,a.BX)(P.x,{sx:{[o.fn.largerThan("sm")]:{backgroundColor:"#fff",borderRadius:16}},children:[(0,a.tZ)(P.x,{sx:{[o.fn.largerThan("sm")]:{padding:"".concat((0,O.h)(10)," ").concat((0,O.h)(16)),borderBottom:"1px solid ".concat(o.colors.neutral[1])}},children:(0,a.tZ)(R.T,{size:"s2",children:t})}),(0,a.tZ)(P.x,{sx:{padding:16},children:i.length>0?(0,a.tZ)(VideoItemListing,{videos:i}):l.length>0?(0,a.tZ)(VideoLibrary,{videoList:l}):null})]})},SuggestToolsAndArticleScreen=e=>{var t,i,l,o,n,r,s;let{bmrData:d,color:c}=e;if(!d)return null;let u=null==d?void 0:null===(t=d.bmiResult)||void 0===t?void 0:t.helpfulTips;return(0,a.BX)(N.K,{spacing:24,children:[(0,a.tZ)(MoreTool,{color:c,title:u.relatedTool.title,description:u.relatedTool.description,listing:u.relatedTool.healthtools||[]}),(0,a.tZ)(ArticleListing,{title:null==d?void 0:null===(i=d.bmiResult.suggestedArticles)||void 0===i?void 0:i.title,description:null==d?void 0:null===(l=d.bmiResult.suggestedArticles)||void 0===l?void 0:l.description,listing:(null==d?void 0:null===(o=d.bmiResult.suggestedArticles)||void 0===o?void 0:o.articles)||[]}),(0,a.tZ)(ec.V,{content:(0,a.tZ)("div",{dangerouslySetInnerHTML:{__html:"C\xe1c b\xe0i viết của Hello Bacsi chỉ c\xf3 t\xednh chất tham khảo, kh\xf4ng thay thế cho việc chẩn đo\xe1n hoặc điều trị y khoa."}})}),(0,a.tZ)(VideoListing,{title:null==u?void 0:null===(n=u.suggestedVideos)||void 0===n?void 0:n.title,videos:null==u?void 0:null===(r=u.suggestedVideos)||void 0===r?void 0:r.video,videoUrl:null==u?void 0:null===(s=u.suggestedVideos)||void 0===s?void 0:s.videoUrl})]})};var eB=i("vAgI"),eR=i("yNk5");let BMIToolPage=e=>{var t;let{type:i,dataNavMenuContent:r,footerInfo:s,bmiContent:R,bmiContentWParams:k,sitewideBanner:N}=e,M=(0,S.h)(),{locale:L,asPath:P,query:O,push:A}=M,{formatMessage:E}=(0,c.Z)(),{dispatch:F}=(0,l.useContext)(x.I),{state:{isLoggedIn:D,userInfo:W}}=(0,l.useContext)(x.I),{classes:X}=U(void 0,{name:"BMIToolPage"}),{getHealthToolLink:z}=(0,o.u)(L),H=(0,l.useMemo)(()=>z(T.QO.BMI),[z]),[K,G]=(0,l.useState)("result"===i),[q,j]=(0,l.useState)("result"===i),[V,Y]=(0,l.useState)((0,b.N)("result"===i?f.h.CalculatingFormBaseSSRParam:f.h.ShowGeneralForm)),[J,$]=(0,l.useState)(null),[ee,et]=(0,l.useState)(!1),ei=(null===(t=O.slug)||void 0===t?void 0:t[0])==="bmi-calculator-en",ea=(0,_.d)(),el=L===I.M.Malaysia,handleResult=async e=>{G(!0),Y((0,b.N)(V.hasResult?f.h.ReCalculatingForm:f.h.CalculatingForm));let{gender:t,age:i,weight:a,height:l,activityLevel:o,lbs:n}=e,r=await (0,Z.$)({gender:t,age:i,weight:a,height:l,activityLevel:o,lbs:n,isEnglishTool:ei,locale:L,f:E});(null==r?void 0:r.bmi)?($(r),Y((0,b.N)(f.h.ShowSuccessResult)),A({pathname:M.pathname,query:(0,Q.eO)(e)},"".concat(H,"?").concat(new URLSearchParams((0,Q.eO)(e))),{shallow:!0})):Y((0,b.N)(f.h.ShowFailResult)),G(!1)};function onRecalculate(){Y((0,b.N)(f.h.RecalculateForm))}let eo=(0,l.useCallback)((e,t)=>{var i,a,l,o;let n=(0,Q.a1)({...e,bmi:Number(null==J?void 0:J.bmi)},{positionType:"landing_page",isMobile:ea,locale:L,phone:null!==(i=null==t?void 0:t.phone)&&void 0!==i?i:(null==W?void 0:W.phone)||"",area_code:null!==(a=null==t?void 0:t.area_code)&&void 0!==a?a:(null==W?void 0:W.area_code)||"",name:null!==(l=null==t?void 0:t.name)&&void 0!==l?l:(null==W?void 0:W.name)||"",recaptcha_token:null!==(o=null==t?void 0:t.recaptcha_token)&&void 0!==o?o:void 0});localStorage.setItem(Q.e_,JSON.stringify(n))},[null==J?void 0:J.bmi,ea,L,null==W?void 0:W.area_code,null==W?void 0:W.name,null==W?void 0:W.phone]),en=useBmiLeadgenFlow({f:E,locale:L,storeSidisData:eo,onSubmitResult:handleResult}),onSubmit=async e=>{if(V.hasResult){var t;null===(t=document.scrollingElement)||void 0===t||t.scrollTo({top:0,behavior:"auto"})}let i={...e,additional_questions:(0,Q.pb)(E,e)};if(!D&&el){en.openLeadgen(i);return}if(eo(i),(null==W?void 0:W.id)&&i.isCheckYourself&&(G(!0),await (0,B.eZ)({userInfo:W,data:i,locale:String(L),heightWeightInputUnit:1===Number(i.lbs)?"imperial":"metric"}),G(!1)),D)await handleResult(i);else if(w.Ew)(0,Q.TI)(e,{unit:1===Number(e.lbs)?"imperial":"metric",locale:String(L)}),v.P.syncParamsToUseOnSSOForm({gender:i.gender,birthday:i.birthday},M),F({type:C.H.ADD_SUCCESS_LOGIN_FN,payload:async()=>{await handleResult(i)}}),(0,h.p0)(void 0,"bmi");else{let t=(0,Q.eo)(window.location.origin+H,i);D||ei?M.push(t):((0,Q.TI)(e,{unit:1===Number(e.lbs)?"imperial":"metric",locale:String(L)}),(0,h.p0)(t,"bmi"))}};return(0,l.useEffect)(()=>()=>{F({type:C.H.ADD_SUCCESS_LOGIN_FN,payload:void 0})},[]),(0,l.useEffect)(()=>{let e=null;return K&&V.hasResult?e=setTimeout(()=>{j(!0)},500):j(!1),()=>{e&&clearTimeout(e)}},[K,V.hasResult]),(0,l.useEffect)(()=>{let e="result"===i&&!O.resultId,t="result"===i&&W&&"string"==typeof O.resultId;async function loadResult(){G(!0),Y((0,b.N)(f.h.CalculatingFormBaseSSRParam));try{let t;if(e)t={gender:"f"===O[n.Q.gender]?"female":"male",age:O[n.Q.age],weight:O[n.Q.weight],height:O[n.Q.height],activityLevel:O[n.Q.activityLevel],lbs:O.lbs?1:void 0,f:E,locale:L,isEnglishTool:ei};else{let e=await (0,u.d)(g.y.SIDIS.GET_SIDIS_BMI,{params:{resultId:O.resultId}},"sidis_frontend");if((null==e?void 0:e._status)!==1||!(null==e?void 0:e._data))throw Error("Result not found");let i=e._data;t={gender:i.gender?"male":"female",age:i.age,weight:i.weight,height:i.height,activityLevel:(0,eB.OA)(i.objective||1),f:E,locale:L,isEnglishTool:ei}}let i=await (0,Z.$)(t);if(!(null==i?void 0:i.bmi))throw Error("BMI calculation failed");$(i),Y((0,b.N)(f.h.ShowSuccessResult))}catch(e){console.error("loadResult error:",e),Y((0,b.N)(f.h.ShowFailResult))}finally{G(!1)}}(e||t)&&loadResult()},[i,W]),(0,l.useEffect)(()=>{let e=d().get("_ga")||"",t=JSON.parse(localStorage.getItem(Q.e_)||"false");t&&J&&(async()=>{try{et(!0),(null==W?void 0:W.id)?await Promise.all([(0,Q.XL)(L,{...t,bmi:null==J?void 0:J.bmi,account_id:W.id||null,ga_client_id:e,email:W.email||null})]):await Promise.all([(0,Q.ce)(L,{...t,bmi:null==J?void 0:J.bmi,ga_client_id:e})]),localStorage.removeItem(Q.e_)}catch(e){}})()},[null==W?void 0:W.id,J]),(0,a.BX)(a.HY,{children:[(0,a.tZ)(p.A,{type:i,showOnboading:ee,className:X.root,loading:K,layoutState:V,onClickRecalculateForm:onRecalculate,onClickBackToResult:()=>Y((0,b.N)(f.h.BackToResult)),toolName:T.HE.BMI,toolInfo:R,extraPayloadValues:{gender:{value:(null==J?void 0:J.gender)||""}},layoutColor:"blue",navigatorProps:{title:E({id:"bmiPage.seoTitle",defaultMessage:"BMI Tool"}),description:E({id:"bmiPage.seoDescription",defaultMessage:"BMI Tool"}),image:"".concat((0,m.UC)(L)).concat(w.Nr,"/bmiThumbnail.png"),SEOData:{schemaData:E({id:"bmiPage.seoSchema",defaultMessage:"BMI Tool"}),apiMetaData:(null==k?void 0:k.metaTag)||(null==R?void 0:R.metaTag),isIndexable:!0},footerInfo:s,isSponsored:null==R?void 0:R.is_sponsored,sponsoredType:"content",sponsoredBy:R.sponsor||void 0,dataNavMenuContent:r,languageOptions:(0,y.c)(L,P),activeMenuService:"tools",isHealthToolResultSharing:!0,sitewideBanner:N},formEle:(0,a.tZ)(v.W,{classNames:{actions:X.actions,btn:X.btn},loading:K,onSubmit:onSubmit}),resultList:[{id:"main-info",label:E({id:"bmiTool.navResult.bmiReveal"}),children:(0,a.tZ)(GeneralResultScreen,{loading:K,bmiLink:H,bmiContent:R,bmrData:J,onRecalculate:onRecalculate})},{id:"statistic",label:E({id:"bmiTool.navResult.statistic"}),children:J&&!q?(0,a.tZ)(RiskAndConditionTools,{bmrData:J}):null},{id:"suggested-tool",label:E({id:"bmiTool.navResult.suggestTool"}),children:J&&!q?(0,a.tZ)(SuggestToolsAndArticleScreen,{bmrData:J,color:R.sponsorTheme}):null},{id:"faq",label:E({id:"faq.title"}),children:J&&!q?(0,a.tZ)(FAQScreen,{bmrData:J}):null}],enabledAd:!!R.enable_ad}),el&&(0,a.tZ)(leadgenModal,{opened:en.isOpen,onClose:en.closeLeadgen,onSubmit:en.handleLeadgenSubmit,title:E({id:"bmiLeadgen.title",defaultMessage:"Get your BMI results!"}),subtitle:E({id:"bmiLeadgen.subtitle",defaultMessage:"Enter your name and WhatsApp number to receive your BMI results."}),namePlaceholder:E({id:"bmiLeadgen.namePlaceholder",defaultMessage:"Your Name"}),whatsappPlaceholder:E({id:"bmiLeadgen.whatsappPlaceholder",defaultMessage:"WhatsApp number"}),submitLabel:E({id:"bmiLeadgen.submit",defaultMessage:"See my BMI results"}),closeLabel:E({id:"leadgen.close",defaultMessage:"Close"}),locale:L,nameValue:en.name,whatsappValue:"".concat(en.whatsapp.areaCode).concat(en.whatsapp.phone),errors:en.errors,onChangeName:en.onChangeName,onChangeWhatsapp:en.onChangeWhatsapp,recaptchaSiteKey:eR.env.NEXT_PUBLIC_GOOGLE_RECAPTCHA_KEY_WHATSAPP_BMI})]})},useBmiLeadgenFlow=e=>{let{f:t,locale:a,storeSidisData:o,onSubmitResult:n}=e,[s,d]=(0,l.useState)(!1),[c,u]=(0,l.useState)(null),[g,m]=(0,l.useState)(""),[h,v]=(0,l.useState)({phone:"",areaCode:""}),[p,b]=(0,l.useState)({}),f=(0,l.useMemo)(()=>r.M[a]||"MY",[a]);(0,l.useEffect)(()=>{window.intlTelInputUtils||(async()=>{await i.e(7034).then(i.t.bind(i,"cfI3",23))})()},[]);let y=(0,l.useCallback)(()=>{d(!1),u(null),b({})},[]),_=(0,l.useCallback)(e=>{u(e),d(!0)},[]),S=(0,l.useCallback)(async(e,i)=>{null==e||e.preventDefault();let a=g.trim(),l=h.phone.trim(),r={};if(a||(r.name=t({id:"bmiLeadgen.errorName",defaultMessage:"Please enter your name"})),l?window.intlTelInputUtils&&!window.intlTelInputUtils.isValidNumber(l,f.toLowerCase())&&(r.whatsapp=t({id:"bmiLeadgen.errorWhatsappInvalid",defaultMessage:"Please enter a valid phone number"})):r.whatsapp=t({id:"bmiLeadgen.errorWhatsapp",defaultMessage:"Please enter your WhatsApp number"}),Object.keys(r).length>0||!c){b(r);return}o(c,{name:a,phone:h.phone,area_code:h.areaCode,recaptcha_token:i}),y(),await n(c)},[y,f,t,g,n,c,o,h]),w=(0,l.useCallback)(e=>{m(e),p.name&&b(e=>({...e,name:void 0}))},[p.name]),T=(0,l.useCallback)((e,t)=>{v({phone:e,areaCode:t}),p.whatsapp&&b(e=>({...e,whatsapp:void 0}))},[p.whatsapp]);return{closeLeadgen:y,errors:p,handleLeadgenSubmit:S,isOpen:s,name:g,onChangeName:w,onChangeWhatsapp:T,openLeadgen:_,whatsapp:h}}},Lxg8:function(e,t,i){i.d(t,{TT:function(){return r},_j:function(){return getBmrKcal},mI:function(){return n},p7:function(){return generateBmrInfoToSendSidis},td:function(){return generateBmrRedirect}});var a=i("v7JE"),l=i("cr+I"),o=i("9L6u");let n="bmrInfo",r={low_intensity:1,moderate_intensity:2,aerobic_intensity:3,vigorous_intensity:4,maximum_intensity:5};function getBmrKcal(e,t){return Math.round(("male"===e?66.47+13.75*parseFloat(t.weight)+5.003*parseFloat(t.height)-6.755*parseFloat(t.age):655.1+9.563*parseFloat(t.weight)+1.85*parseFloat(t.height)-4.676*parseFloat(t.age))*100)/100}function generateBmrRedirect(e,t,i){let n=l.stringifyUrl({url:e,query:{result:1,[a.Q.gender]:(0,o.QX)(t),[a.Q.age]:i.age,[a.Q.height]:i.height,[a.Q.weight]:i.weight,[a.Q.yourself]:Number(!!i.isCheckYourself),[a.Q.activityLevel]:i.activityLevel,joincommunity:1}},{skipEmptyString:!0,skipNull:!0});return n}function generateBmrInfoToSendSidis(e,t,i,a){let{articleCategories:l,positionType:o}=a,n={age:i.age,height:i.height,weight:i.weight,kcal:e,gender:t,position_type:o,device_type:"web",...(null==i?void 0:i.isCheckYourself)&&{is_my_self:1},...(null==i?void 0:i.activityLevel)&&{active_level:(null==r?void 0:r[i.activityLevel])||1},source_url:window.location.href};return l&&(n.categories=l.map(e=>({name:e.name||"",permalink:e.permalink||"",term_id:e.termId||"",text_color:e.textColor||""}))),n}},"1x8x":function(e,t,i){i.r(t),i.d(t,{BMRToolPage:function(){return BMRToolPage}});var a=i("BGKE"),l=i("q1tI"),o=i("4vXT"),n=i("v7JE"),r=i("p46w"),s=i.n(r),d=i("dDsW"),c=i("09QT"),u=i("/tR3"),g=i("9R0S"),m=i("oQBk"),h=i("CJtR"),v=i("g/tz"),p=i("ouLS"),b=i("Bd17"),f=i("Y/XE"),y=i("bLQg"),_=i("gNV7"),S=i("2su4"),w=i("hXNO"),T=i("P5LW"),I=i("rIrU"),Z=i("8vdq"),C=i("05Ua"),x=i("o0qI"),B=i("9O6x"),R=i("F/Hd"),k=i("8vDj"),N=i("OAL+"),M=i("K27U"),L=i("0njy");let FAQScreen=e=>{let{bmrData:t}=e,{formatMessage:i}=(0,d.Z)(),l=(0,k.rZ)(),o=null==t?void 0:t.bmiResult,n=null==o?void 0:o.community,r=o.faqs;return n||r?(0,a.BX)(N.K,{children:[n&&(0,a.BX)(N.K,{spacing:24,children:[(0,a.BX)(N.K,{spacing:8,children:[(0,a.tZ)(R.T,{size:"s1",weight:"semiBold",color:l.colors.gray[8],children:null==n?void 0:n.title}),(0,a.tZ)(R.T,{size:"p4",color:l.colors.gray[6],children:null==n?void 0:n.description})]}),(0,a.tZ)(L.EmbeddedCommunity.HealthTool,{community:n,style:{marginTop:0}})]}),r&&r.length>0&&(0,a.tZ)(M.e,{expandFirst:!0,faqs:r,titleProps:{icon:(0,a.tZ)("img",{style:{height:"16px",width:"16px"},src:"".concat(I.Nr,"/info-icon.svg"),alt:"",loading:"lazy"}),headingTitle:i({id:"tools.faqs",defaultMessage:"FAQs"})}})]}):null};var P=i("SPK5"),O=i("0D4Z"),A=i("sKr0"),E=i("9L6u"),F=i("Xbyz"),D=i("ENYw");let GeneralResultScreen=e=>{var t,i,l,o,r;let{loading:s,bmrLink:d,toolContent:c,bmrData:u}=e,{locale:g}=(0,T.h)(),{bmi:m=0,gender:h="male"}=u||{},v=(0,w.d)(),p="".concat(d,"?").concat(n.Q.bmi,"=").concat(m,"&").concat(n.Q.gender,"=").concat((0,E.QX)(h)),b={gender:null==u?void 0:u.gender,bmrNumber:Number(null==u?void 0:null===(i=u.calories)||void 0===i?void 0:null===(t=i.bmr)||void 0===t?void 0:t.bmr).toLocaleString(g),bmrResult:null==u?void 0:u.bmiResult,bmrContent:c,calories:null==u?void 0:u.calories,activityLevel:null==u?void 0:u.activityLevel,loading:s};return(0,a.BX)(N.K,{sx:{gap:16},children:[(0,a.BX)(N.K,{spacing:16,sx:e=>({[e.fn.smallerThan("sm")]:{".mantine-Bmr__MainInfo-group:last-child":{paddingBottom:0}}}),children:[(0,a.tZ)(D.n,{...b}),!v&&(0,a.tZ)(P.k,{justify:"center",children:s?(0,a.tZ)(O.O,{width:246,height:36,radius:24}):(0,a.tZ)(A.n.BottomNavHorizonal,{bgColor:"#fff",shareUrl:p,showFull:!0,iconSize:24,styles:{heading:{fontSize:12},copyRoot:{input:{border:0}},wrapper:{paddingRight:40},controls:{overflow:"hidden"}}})})]}),(0,a.tZ)(F.k.Bmr,{loading:s,calories:null==u?void 0:u.calories,tdee:Number(null==u?void 0:u.bmiResult.tdeeValue),ctaText:null==c?void 0:null===(l=c.customWeightGainBanner)||void 0===l?void 0:l.buttonText,ctaColor:null==c?void 0:null===(o=c.customWeightGainBanner)||void 0===o?void 0:o.buttonColor,ctaUrl:null==c?void 0:null===(r=c.customWeightGainBanner)||void 0===r?void 0:r.link,sx:()=>({height:"100%",".mantine-WeightManagement-goalFooter":{height:"100%",justifyContent:"space-between"}})})]})};var W=i("Lxg8"),X=(0,i("/npG").k)(e=>({root:{[e.fn.largerThan("sm")]:{".mantine-HealthToolFormWrapper__FormRow-root":{paddingLeft:0,paddingRight:0}}},actions:{paddingTop:16,[e.fn.largerThan("sm")]:{position:"sticky",left:0,right:0,bottom:0,backgroundColor:"#fff",zIndex:1,paddingBottom:24,paddingTop:24}},btn:{width:"100%"}})),z=i("ija2"),Q=i("ckcH"),H=i("ytAX"),U=i("vAgI");let BMRToolPage=e=>{var t;let{type:i,dataNavMenuContent:r,footerInfo:R,bmrContent:k,bmrContentWParams:N,sitewideBanner:M}=e,L=(0,T.h)(),{locale:P,query:O,push:A}=L,{formatMessage:E}=(0,d.Z)(),{dispatch:F}=(0,l.useContext)(x.I),{state:{isLoggedIn:D,userInfo:K}}=(0,l.useContext)(x.I),{classes:G}=X(void 0,{name:"BMIToolPage"}),{getHealthToolLink:q}=(0,o.u)(P),j=(0,l.useMemo)(()=>q(Z.QO.BMR),[q]),[V,Y]=(0,l.useState)("result"===i),[J,$]=(0,l.useState)("result"===i),[ee,et]=(0,l.useState)((0,y.N)("result"===i?_.h.CalculatingFormBaseSSRParam:_.h.ShowGeneralForm)),[ei,ea]=(0,l.useState)(null),[el,eo]=(0,l.useState)(!1),en=(null===(t=O.slug)||void 0===t?void 0:t[0])==="bmi-calculator-en",er=(0,w.d)(),handleResult=async e=>{try{let{gender:t,weight:i,height:a,age:l,activityLevel:o}=e||{};Y(!0),et((0,y.N)(ee.hasResult?_.h.ReCalculatingForm:_.h.CalculatingForm));let n=await calculateData({gender:t,weight:i,height:a,age:l,activityLevel:o});ea({...e,...n,bmrContent:k}),et((0,y.N)(_.h.ShowSuccessResult)),A({pathname:L.pathname,query:(0,H.eO)(e)},"".concat(j,"?").concat(new URLSearchParams((0,H.eO)(e))),{shallow:!0})}catch(e){et((0,y.N)(_.h.ShowFailResult))}finally{Y(!1)}};function onRecalculate(){et((0,y.N)(_.h.RecalculateForm))}let calculateData=async e=>{var t;let{gender:i,weight:a,height:l,age:o,activityLevel:n}=e||{},r=await (0,U.ZD)({gender:i,weight:a,height:l,age:o,activityLevel:n}),s=(null==r?void 0:r.data)||{};if(0===Object.keys(s).length)throw"bmr result failed";let d=null==s?void 0:null===(t=s.bmr)||void 0===t?void 0:t.bmr,h=(0,U.xv)({bmr:d,gender:i}),v=await (0,c.d)(m.y.HEALTH_TOOL.GET_HEALTH_TOOL_BMR_RESULT,{params:{kcals:d,age:o,gender:i,status:h,activityLevel:(null===W.TT||void 0===W.TT?void 0:W.TT[n||""])||1}}),p=(null==v?void 0:v.data)||{};if(0===Object.keys(v).length)throw"bmr result failed";let b=I.Nj.findIndex(e=>e===p.status)+1||1;return{scoreLevel:b,bmiResult:(0,u.Xj)((null==v?void 0:v.data)||{},E({id:"bmr.state.".concat(h)})),calories:(0,g.W)((null==r?void 0:r.data)||{})}},onSubmit=async e=>{ee.hasResult&&requestAnimationFrame(()=>{var e;null===(e=document.scrollingElement)||void 0===e||e.scrollTo({top:0,behavior:"auto"})});let t=(0,W.p7)(e.bmr||0,String(e.gender),e,{isMobile:er,positionType:"landing_page"});if(localStorage.setItem(W.mI,JSON.stringify(t)),(null==K?void 0:K.id)&&e.isCheckYourself&&(Y(!0),await (0,B.eZ)({userInfo:K,data:e,locale:String(P),heightWeightInputUnit:"metric"}),Y(!1)),D)await handleResult(e);else if(I.Ew)p.P.syncParamsToUseOnSSOForm({gender:e.gender,birthday:e.birthday},L),F({type:C.H.ADD_SUCCESS_LOGIN_FN,payload:async()=>{await handleResult(e)}}),(0,v.p0)(void 0,"bmr");else{let t=(0,W.td)(window.location.origin+j,String(e.gender),e);D||en?L.push(t):(0,v.p0)(t,"bmr")}};return(0,l.useEffect)(()=>()=>{F({type:C.H.ADD_SUCCESS_LOGIN_FN,payload:void 0})},[]),(0,l.useEffect)(()=>{let e=null;return V&&ee.hasResult?e=setTimeout(()=>{$(!0)},500):$(!1),()=>{e&&clearTimeout(e)}},[V,ee.hasResult]),(0,l.useEffect)(()=>{let e="result"===i&&!O.resultId,t="result"===i&&K&&"string"==typeof O.resultId;async function loadResult(){Y(!0),et((0,y.N)(_.h.CalculatingFormBaseSSRParam));try{let t;if(e)t={gender:"f"===O[n.Q.gender]?"female":"male",age:O[n.Q.age],weight:O[n.Q.weight],height:O[n.Q.height],activityLevel:O[n.Q.activityLevel],f:E,locale:P,isEnglishTool:en};else{let e=await (0,c.d)(m.y.SIDIS.GET_SIDIS_BMR,{params:{resultId:O.resultId}},"sidis_frontend");if((null==e?void 0:e._status)!==1||!(null==e?void 0:e._data))throw Error("Result not found");let i=e._data;t={gender:i.gender?"male":"female",age:i.age,weight:i.weight,height:i.height,activityLevel:(0,U.OA)(i.objective||1),f:E,locale:P,isEnglishTool:en}}let i=await calculateData(t);ea({...t,...i,bmrContent:k}),et((0,y.N)(_.h.ShowSuccessResult))}catch(e){console.error("loadResult error:",e),et((0,y.N)(_.h.ShowFailResult))}finally{Y(!1)}}(e||t)&&loadResult()},[i,K]),(0,l.useEffect)(()=>{let e=s().get("_ga")||"",t=JSON.parse(localStorage.getItem(W.mI)||"false");t&&ei&&(null==K?void 0:K.id)&&(async()=>{try{var i,a;eo(!0);let l={account_id:(null==K?void 0:K.id)||null,site_id:parseInt(I.CX[P].SITE_ID),email:(null==K?void 0:K.email)||null,ga_client_id:e,gender:"male"===t.gender,height:parseFloat(t.height),weight:parseFloat(t.weight),age:parseInt(t.age),active_level:t.active_level,is_my_self:t.is_my_self,objective:1,kcal:t.kcal,kcal_level:null===(i=ei.bmrContent)||void 0===i?void 0:i.scoreLevel,device_type:"web",position_type:t.position_type||"landing_page",url:window.location.href,source_url:t.source_url||window.location.href,...(null===(a=t.categories)||void 0===a?void 0:a.length)>0&&{categories:t.categories}};await (0,c.d)(m.y.SIDIS.POST_SIDIS_BMR,{method:"POST",data:l},"sidis_update"),localStorage.removeItem(W.mI)}catch(e){}})()},[null==K?void 0:K.id,ei]),(0,a.tZ)(f.A,{type:i,showOnboading:el,className:G.root,loading:V,layoutState:ee,onClickRecalculateForm:onRecalculate,onClickBackToResult:()=>et((0,y.N)(_.h.BackToResult)),toolName:Z.HE.BMR,toolInfo:k,layoutColor:"green",extraPayloadValues:{gender:{value:(null==ei?void 0:ei.gender)||""}},navigatorProps:{title:E({id:"bmrPage.seoTitle",defaultMessage:"BMR Tool"}),description:E({id:"bmrPage.seoDescription",defaultMessage:"BMR Tool"}),image:"".concat((0,h.UC)(P)).concat(I.Nr,"/bmrThumbnail.png?v=1"),SEOData:{schemaData:E({id:"bmrPage.seoSchema",defaultMessage:"BMR Tool"}),apiMetaData:(null==N?void 0:N.metaTag)||(null==k?void 0:k.metaTag),isIndexable:!0},footerInfo:R,sponsoredType:"content",sponsoredBy:(null==k?void 0:k.sponsor)||void 0,isSponsored:k.is_sponsored,dataNavMenuContent:r,languageOptions:(0,S.c)(P,L.asPath),activeMenuService:"tools",isHealthToolResultSharing:!0,sitewideBanner:M},formEle:(0,a.tZ)(b.v,{classNames:{actions:G.actions,btn:G.btn},loading:V,onSubmit:onSubmit}),resultList:[{id:"main-info",label:E({id:"bmrTool.navResult.bmrReveal"}),children:(0,a.tZ)(GeneralResultScreen,{loading:V,bmrLink:j,toolContent:k,bmrData:ei,onRecalculate:onRecalculate})},{id:"statistic",label:E({id:"bmiTool.navResult.statistic"}),children:ei&&!J?(0,a.tZ)(z.P,{toolContent:k,bmrData:ei}):null},{id:"suggested-tool",label:E({id:"bmiTool.navResult.suggestTool"}),children:ei&&!J?(0,a.tZ)(Q.V,{bmrData:ei,color:k.sponsorTheme}):null},{id:"faq",label:E({id:"faq.title"}),children:ei&&!J?(0,a.tZ)(FAQScreen,{bmrData:ei}):null}],enabledAd:!!k.enable_ad})}}}]);