"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2574],{"/Vif":function(e,t,a){a.r(t),a.d(t,{ArticleAudioPlayer:function(){return ArticleAudioPlayer}});var i=a("BGKE"),r=a("q1tI"),l=a("MmHG"),n=a("dDsW"),o=a("/5DW"),d=a("g/tz"),s=a("KX2h"),c=a("hXNO"),u=a("P5LW"),h=a("rEaw"),g=a("o0qI"),p=a("iBNF"),m=a("wp0n"),v=a("HleM"),b=a("0Wzj"),f=a("mhIR"),y=a("Eso5"),x=a("FQtM"),w=a("TSYQ"),Z=a.n(w),C=a("05Ua"),k=a("aNTj");let M={};function track(e,t){let a=M[e];if(a){var i;i={action:t,post_id:a.postId,duration:a.currentTime,total_duration:a.duration,voice_type:a.voiceType},"dataLayer"in window&&window.dataLayer.push({event:"audio",...i})}}var I=a("rBCA"),B=a("uuQu");let T=(0,I.Z)("div",{target:"ebob4tu0"})("display:flex;min-height:48px;height:48px;background-color:",p.r.colors.primary50,";border-radius:4px;align-items:center;padding:8px 12px;margin-bottom:24px;user-select:none;gap:16px;",B.M.mbDown,"{background-color:#ffffff;border-radius:0;padding:0;flex-direction:column;min-height:initial;height:initial;gap:4px;margin:0;}"),L=(0,I.Z)("img",{target:"ebob4tu1"})("width:24px;height:24px;cursor:pointer;/* margin-left:-2px;*/"),A=(0,I.Z)("div",{target:"ebob4tu2"})("&.hidden{display:none;}"),P=(0,I.Z)("div",{target:"ebob4tu3"})("flex:1;",B.M.mbDown,"{max-width:85px;.mobile-navigation-label{width:70px;text-align:center;font-weight:500;font-size:10px;line-height:16px;color:",null===p.r||void 0===p.r?void 0:p.r.colors.gray600,";overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",B.M.mbDown,"{max-width:70px;}}}"),N=(0,I.Z)("div",{target:"ebob4tu4"})("height:4px;width:100%;background-color:",p.r.colors.white,";border-radius:4px;position:relative;overflow:hidden;cursor:pointer;"),S=(0,I.Z)("div",{target:"ebob4tu5"})("background-color:",p.r.colors.primaryBase,";position:absolute;top:0;bottom:0;left:0;"),E=(0,I.Z)("div",{target:"ebob4tu6"})("display:flex;gap:16px;align-items:center;"),z=(0,I.Z)(l.T,{target:"ebob4tu7"})("font-variant-numeric:tabular-nums;white-space:nowrap;"),pad=e=>e<10?"0".concat(e):e.toString(),formatTime=e=>"".concat(pad(Math.floor(e/60)),":").concat(pad(Math.round(e%60))),H=(0,r.forwardRef)(function(e,t){let{percent:a,onClick:r}=e;return(0,i.tZ)(N,{ref:t,onClick:r,children:(0,i.tZ)(S,{style:{width:"".concat(a,"%")}})})});function AudioTrackProgress(e){let{articleId:t}=e,{percentComplete:a,position:l,seek:n,duration:d}=(0,o.E)(),s=(0,r.useRef)(null),u=(0,c.d)(),h=(0,r.useMemo)(()=>formatTime(d),[d]),g=(0,r.useMemo)(()=>Math.round(a*d/100),[a,d]),p=(0,r.useCallback)(e=>{let{pageX:a}=e;k.E.measure(()=>{if(s.current){let{x:e,width:i}=s.current.getBoundingClientRect(),r=(a-e)/i*d;n(r);let l=M[t];l&&(l.currentTime=Math.round(r),track(t,"forward"))}})},[d,n,t]);return(0,r.useEffect)(()=>{let e=M[t];e&&(e.currentTime=g)},[g,t]),(0,i.BX)(E,{children:[(0,i.BX)(z,{size:u?"xs":"p3",className:"mobile-navigation-label",children:[formatTime(l)," / ",h]}),!u&&(0,i.tZ)(H,{onClick:p,ref:s,percent:a})]})}var audioSidebar=e=>{let{articleId:t,audioPlayerState:a,onClickPlay:l,children:d}=e,s=(0,c.d)(),{formatMessage:u}=(0,n.Z)(),{play:h,pause:w}=(0,o.xm)(),{dispatch:k}=(0,r.useContext)(g.I),{position:M,duration:I}=(0,o.E)(),B=(0,r.useMemo)(()=>formatTime(I),[I]),T=(0,r.useMemo)(()=>formatTime(M),[M,B]),L=(0,r.useMemo)(()=>({tooltip:{fontSize:12,padding:"8px",color:p.r.colors.gray600,"::before":{content:'""',position:"absolute",width:"0.5rem",height:"0.5rem",backgroundColor:p.r.colors.white,left:"-3px",top:"50%",transform:"translateY(-50%) rotate(45deg)",zIndex:0}},arrow:{transform:"none !important",top:"0 !important",left:"0 !important",height:"100% !important",width:"100% !important",borderRadius:"4px !important",zIndex:-1,backgroundColor:p.r.colors.white,boxShadow:"1px 0px 11px 0px rgba(0, 0, 0, 0.1)"}}),[p.r]),handleClickPlay=()=>{l(),h(),k({type:C.H.PLAY_ARTICLE,payload:{id:t}})},A="playing"===a,P="paused"===a,N=A?{icon:(0,i.tZ)(v.Z,{}),onClick:()=>{w()}}:P?{icon:(0,i.tZ)(b.Z,{}),onClick:()=>{handleClickPlay()}}:{icon:(0,i.tZ)(f.Z,{}),onClick:handleClickPlay},S=(0,r.useMemo)(()=>({"data-event-category":s?"Sticky Bottom":"Audio","data-event-action":s?"Audio - article":"Request Article Audio","data-event-label":A?"Paused":P?"Play":"Start"}),[A,P,s]),E=(0,i.BX)(y.x,{onClick:N.onClick,className:Z()("w-10 h-10 p-2 relative cursor-pointer pointer-event-child-none",{"rounded-lg hover:bg-gray100":!s,"bg-gray100":A&&!s}),...S,children:[N.icon,d]}),z=!!["playing","paused"].includes(a)||void 0;return s?(0,i.BX)(y.x,{className:"flex items-center",children:[E,z&&(0,i.tZ)(m.T,{size:"n1",color:p.r.colors.gray800,children:T})]}):(0,i.tZ)(x.u,{opened:z,position:"right",withArrow:!0,styles:L,label:(0,i.tZ)(m.T,{size:"n1",color:p.r.colors.gray800,children:A||P?T:u({id:"Listen to this article",defaultMessage:"Listen to this article"})}),children:E})},F=a("8wjV"),R=a("mYVa"),V=a("raAP");function AudioPlayerControls(e){let{articleId:t,audioPlayerState:a,className:l,onClickPlay:n}=e,{play:d,pause:s}=(0,o.xm)(),{dispatch:u}=(0,r.useContext)(g.I),h=(0,V.U)(),p=(0,c.d)();return(0,i.BX)(A,{className:l,children:[["idle","paused","ended"].includes(a)&&(0,i.tZ)(F.B,{size:"md",type:"button",variant:"primary",id:"test-play",onClick:function(){null==n||n(),d(),u({type:C.H.PLAY_ARTICLE,payload:{id:t}})},dataEventCategory:"Audio",dataEventAction:"Request Article Audio",dataEventLabel:h,styles:e=>({root:{padding:0,borderRadius:"50%",width:"".concat((0,R.h)(32)," !important"),height:"".concat((0,R.h)(32)," !important"),backgroundColor:e.colors.primaryBase,img:{width:"20px",height:"20px"},[e.fn.smallerThan("md")]:{backgroundColor:"initial",width:"".concat((0,R.h)(24)," !important"),height:"".concat((0,R.h)(22)," !important")}}}),children:p?(0,i.tZ)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,i.tZ)("path",{d:"M9.75 9.625V14.375C9.75 14.7417 9.90833 15.0127 10.225 15.188C10.5417 15.3627 10.85 15.3417 11.15 15.125L14.875 12.75C15.1583 12.5833 15.3 12.3333 15.3 12C15.3 11.6667 15.1583 11.4167 14.875 11.25L11.15 8.875C10.85 8.65833 10.5417 8.63733 10.225 8.812C9.90833 8.98733 9.75 9.25833 9.75 9.625ZM12 21.5C10.6833 21.5 9.446 21.25 8.288 20.75C7.12933 20.25 6.125 19.575 5.275 18.725C4.425 17.875 3.75 16.8707 3.25 15.712C2.75 14.554 2.5 13.3167 2.5 12C2.5 10.6833 2.75 9.44567 3.25 8.287C3.75 7.129 4.425 6.125 5.275 5.275C6.125 4.425 7.12933 3.75 8.288 3.25C9.446 2.75 10.6833 2.5 12 2.5C13.3167 2.5 14.5543 2.75 15.713 3.25C16.871 3.75 17.875 4.425 18.725 5.275C19.575 6.125 20.25 7.129 20.75 8.287C21.25 9.44567 21.5 10.6833 21.5 12C21.5 13.3167 21.25 14.554 20.75 15.712C20.25 16.8707 19.575 17.875 18.725 18.725C17.875 19.575 16.871 20.25 15.713 20.75C14.5543 21.25 13.3167 21.5 12 21.5Z",fill:"#2D87F3"})}):(0,i.tZ)(L,{width:"24",height:"24",src:"/svg/player-play.svg"})}),"playing"===a&&(0,i.tZ)(F.B,{size:"md",type:"button",onClick:function(){s()},variant:"primary",styles:e=>({root:{padding:"0 !important",[e.fn.largerThan("md")]:{borderRadius:"50%",width:"".concat((0,R.h)(32)," !important"),height:"".concat((0,R.h)(32)," !important"),backgroundColor:e.colors.primaryBase,display:"flex",alignItems:"center",gap:(0,R.h)(4),margin:0,span:{display:"none"},"&:before, &:after":{content:'""',height:"15px",width:"4px",borderRadius:"4px",backgroundColor:e.fn.primaryColor(),marginTop:"1px"}},[e.fn.smallerThan("md")]:{width:"".concat((0,R.h)(24)," !important"),height:"".concat((0,R.h)(24)," !important"),backgroundImage:'url(\'data:image/svg+xml;charset=UTF-8,\')',backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundColor:"transparent"}}})})]})}function Player(e){let{url:t,setAudioPlayerState:a,articleId:i}=e,{state:{articlePlayingId:l}}=(0,r.useContext)(g.I),{playing:n,pause:d,duration:s}=(0,o.xm)({src:t,format:"mp3",autoplay:!0,onplay:()=>{a("playing"),track(i,"play")},onpause:()=>{a("paused"),track(i,"pause")},onend:()=>{a("ended"),track(i,"finished")}});return(0,r.useEffect)(()=>{let e="female",t=M[i];s>0&&(!t||t.voiceType!==e)&&(M[i]={postId:i,voiceType:e,duration:s,currentTime:0})},[i,s]),(0,r.useEffect)(()=>{n&&i!==l&&d()},[i,l,n,d]),null}let ArticleAudioPlayerInner=e=>{let{articleId:t="0",articleContent:a="",isPremium:u,onError:h,onLoading:p,isSidebar:m,...v}=e,{formatMessage:b}=(0,n.Z)(),f=(0,c.d)(),{state:{isLoggedIn:y}}=(0,r.useContext)(g.I),[x,w]=(0,r.useState)("loading"),Z=(0,r.useRef)(null),[C,k]=(0,r.useState)(""),[M,I]=(0,r.useState)(""),[B,L]=(0,r.useState)(0),A=["generating","loading"].includes(x);if((0,r.useEffect)(()=>{"error"===x&&(null==h||h(Z.current)),A&&(null==p||p(!A,Z.current))},[x]),(0,r.useEffect)(()=>{var e;let t=document.createElement("div");t.innerHTML=a;let i=(null===(e=t.textContent)||void 0===e?void 0:e.trim().replace(/\[.*\]/g,""))||"";i.length||console.debug("[ArticleAudioPlayer] hidden because of empty article content"),L(i.length)},[a]),(0,r.useEffect)(()=>{fetch("/api/read-article/".concat(t,"?t=").concat(Math.floor(Date.now()/30/60/1e3))).then(e=>e.json()).then(e=>{e.url?(k(e.url),w("idle")):w("error")})},[t]),0===B)return(0,i.tZ)(T,{});let onClickPlay=()=>{I(C)};return m?(0,i.BX)(o.Vt,{children:[(0,i.tZ)(audioSidebar,{articleId:Number(t),onClickPlay:onClickPlay,audioPlayerState:x}),M&&(0,i.tZ)(Player,{articleId:Number(t),setAudioPlayerState:w,url:M})]}):(0,i.tZ)(o.Vt,{children:(0,i.BX)(T,{ref:Z,onClickCapture:e=>{u&&!y&&((0,d.p0)(window.location.href),e.stopPropagation())},...v,children:[!A&&"error"!==x&&(0,i.tZ)(AudioPlayerControls,{articleId:Number(t),audioPlayerState:x,onClickPlay:onClickPlay}),"error"===x&&(0,i.tZ)(l.T,{size:f?"xs":"p3",children:b({id:"player.error",defaultMessage:"Error reading article"})}),(0,i.BX)(P,{children:[A&&(0,i.tZ)(s.g,{}),M&&(0,i.tZ)(Player,{articleId:Number(t),setAudioPlayerState:w,url:M}),"idle"===x&&(0,i.tZ)(l.T,{style:{whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},size:f?"p4":"p3",className:"mobile-navigation-label",children:b({id:"player.readArticle",defaultMessage:"Read Article"})}),["playing","paused","ended"].includes(x)&&(0,i.tZ)(AudioTrackProgress,{articleId:Number(t)})]})]})})};function ArticleAudioPlayer(e){let{articleEnableAudio:t,articleTurnOffArticleVoice:a,...l}=e,{locale:n}=(0,u.h)(),o=a||!t,d=(0,r.useMemo)(()=>[h.MV.Vietnam,h.MV.Indonesia].includes(n)&&!o,[n,o]);return d?(0,i.tZ)(ArticleAudioPlayerInner,{...l},l.articleId):null}},huhZ:function(e,t,a){a.r(t),a.d(t,{ArticleAuthorDesktop:function(){return Z},ArticleAuthorHistory:function(){return k},ArticleAuthorMobile:function(){return C},withArticleAuthor:function(){return withArticleAuthor}});var i=a("BGKE"),r=a("q1tI"),l=a("dDsW"),n=a("rIrU"),o=a("iBNF"),d=a("fdQd"),s=a("wp0n"),c=a("8wjV"),u=a("CJtR"),h=a("raAP"),g=a("P5LW"),p=a("tQmg"),m=a("rBCA"),v=a("uuQu");let b=(0,m.Z)("div",{target:"e87sfag0"})("contain-intrinsic-size:200px;padding:12px;border:1px solid ",null===o.r||void 0===o.r?void 0:o.r.colors.neutral100,";border-radius:4px;.expert{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:4px;.information{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center;}}.divider{background-color:",null===o.r||void 0===o.r?void 0:o.r.colors.neutral100,";height:1px;border:none;margin-block:8px;}",v.M.mbUp,"{&[data-mobile='true']{display:none;}}",v.M.mbDown,"{&[data-mobile='false']{display:none;}padding-block:8px;margin-bottom:16px;.expert{padding:0;padding-block:6px;flex-direction:row;align-items:center;justify-content:start;}.divider{margin-top:0;}}");var f=a("MmHG"),y=a("OAL+"),x=a("E+oP"),w=a.n(x);function withArticleAuthor(e){let t=e.displayName||e.name||"Component",ComponentWithArticleAuthor=t=>{var a;let{articleReviewed:o}=t,{formatMessage:d}=(0,l.Z)(),s=null==o?void 0:null===(a=o.expert)||void 0===a?void 0:a.authorOnCare,{title:c,name:u,location:h,isExpertSameAsAuthor:g}=(0,r.useMemo)(()=>{if(void 0!==o){let{expert:e,editor:t,is_author:a}=o;if(e){let t={name:e.display_name,location:e.organisation,authorOnCare:s};return a?{title:d({id:"articleAuthor.title.written-by",defaultMessage:"Written by"}),isExpertSameAsAuthor:!0,...t}:"expert"===e.role?{title:d({id:"articleAuthor.title.expert",defaultMessage:"Expertly reviewed by"}),...t}:{title:d({id:"articleAuthor.title.medical",defaultMessage:"Medically reviewed by"}),...t}}if(t)return{title:d({id:"articleAuthor.title.fact-check",defaultMessage:"Fact-checked by"}),name:t.display_name}}return{title:null,name:null,location:null,authorOnCare:null,isExpertSameAsAuthor:!1}},[o]),{reviewerUrl:p,authorUrl:m}=(0,r.useMemo)(()=>{if(void 0!==o){let{expert:e,editor:t,is_author:a,author:i}=o;if(e){let t={reviewerUrl:!e.turn_off_profile&&e.profile_url,authorUrl:null};return a?t:{...t,authorUrl:!(null==i?void 0:i.turn_off_profile)&&(null==i?void 0:i.profile_url)}}if(t)return{reviewerUrl:!t.turn_off_profile&&t.profile_url,authorUrl:!(null==i?void 0:i.turn_off_profile)&&(null==i?void 0:i.profile_url)}}return{reviewerUrl:null,authorUrl:null}},[o]),v=(0,r.useMemo)(()=>(null==o?void 0:o.expert)&&(null==o?void 0:o.is_author),[o]),{avatar:b,badge:f}=(0,r.useMemo)(()=>{if(void 0!==o){let{expert:e,editor:t,fact_check:a,author:i}=o,r=(null==t?void 0:t.user_id)===(null==i?void 0:i.user_id),l=r?a:t;if(e)return{avatar:e.avatar_thumbnail||"",avatarLink:e.profile_url,badge:e.role||""};if(t)return{avatar:t.avatar_thumbnail||"",avatarLink:t.profile_url||"",badge:"fact-check"};if(l)return{avatar:l.avatar_thumbnail||"",avatarLink:l.profile_url||"",badge:"fact-check"}}return{avatar:"".concat(n.Nr,"/hhg-logo.png"),badge:"fact-check"}},[o]);return void 0===o?null:(0,i.tZ)(e,{title:c,name:u,location:h,authorOnCare:s,reviewerUrl:p,authorUrl:m,shouldHideAuthor:v,avatar:b,badge:f,isExpertSameAsAuthor:g,...t})};return ComponentWithArticleAuthor.displayName="withTheme(".concat(t,")"),ComponentWithArticleAuthor}let Z=r.memo(withArticleAuthor(e=>{var t,a,m,v,f,y;let{reviewer:x,articleReviewed:w,author:Z,expert:C,updatedAt:k,title:M,name:I,location:B,reviewerUrl:T,authorUrl:L,shouldHideAuthor:A,avatar:P,badge:N,authorOnCare:S,...E}=e,{formatMessage:z}=(0,l.Z)(),{locale:H}=(0,g.h)(),F=(0,h.U)(),R=(0,r.useMemo)(()=>{var e,t,a;return(null==S?void 0:S.type)==="service"?null===(e=n.a8[H])||void 0===e?void 0:e.SERVICE:(null==S?void 0:S.type)==="hospital"?null===(t=n.a8[H])||void 0===t?void 0:t.HOSPITAL:null===(a=n.a8[H])||void 0===a?void 0:a.DOCTOR},[null==S?void 0:S.type,H]);return(0,i.BX)(b,{"data-mobile":"false",...E,children:[(0,i.BX)("div",{className:"expert",children:[(0,i.tZ)("a",{"data-event-category":"Reviewer Name","data-event-action":I,"data-event-label":"".concat((0,u.UC)(H)).concat(T),href:T||"#",children:(0,i.tZ)(d.A,{src:P||(null==C?void 0:C.thumbnailAvatar)||(null==x?void 0:x.thumbnailAvatar)||(null==Z?void 0:Z.thumbnailAvatar),withIndicator:!!N,indicatorConfig:N?{size:18,label:(0,i.tZ)("img",{loading:"lazy",width:"18",height:"18",src:"".concat(n.Nr,"/article-").concat(N,".svg"),alt:""})}:void 0})}),(0,i.BX)("div",{className:"information",children:[M&&(0,i.tZ)(s.T,{size:"n1",color:o.r.colors.gray600,children:M}),I&&(0,i.tZ)("a",{"data-event-category":"Reviewer Name","data-event-action":I,"data-event-label":"".concat((0,u.UC)(H)).concat(T),href:T||"#",children:(0,i.tZ)(s.T,{size:"base",color:o.r.colors.gray800,weight:"semiBold",children:I})}),(B||(null==w?void 0:null===(t=w.expert)||void 0===t?void 0:t.specialty))&&(0,i.tZ)(s.T,{size:"n1",color:o.r.colors.gray600,children:"".concat((null==w?void 0:null===(a=w.expert)||void 0===a?void 0:a.specialty)&&(null==w?void 0:null===(m=w.expert)||void 0===m?void 0:m.specialty)).concat(B&&" \xb7 ".concat(B))})]}),S&&(0,i.tZ)(c.B,{size:"md",fullWidth:!0,type:"button","data-event-category":"Care","data-event-action":"Embedded Booking Button","data-event-label":F,onClick:()=>window.location.href="/care/".concat(R,"/").concat(null==S?void 0:S.slug,"-").concat(null==S?void 0:S.id,"/"),children:z({id:"articleAuthor.button",defaultMessage:"Book now"})})]}),(0,i.tZ)("hr",{className:"divider"}),(0,i.BX)(s.T,{className:"author",size:"n1",color:o.r.colors.gray600,style:{textAlign:A?"center":"left"},children:[!A&&(0,i.BX)(s.T,{as:"span",size:"n1",children:[z({id:"articlePage.articleWrittenBy",defaultMessage:"Written by {name}"},{name:L?(0,i.tZ)("a",{"data-event-category":"Author Name","data-event-action":null==w?void 0:null===(v=w.author)||void 0===v?void 0:v.display_name,"data-event-label":"".concat((0,u.UC)(H)).concat(L),href:L,children:(0,i.tZ)(s.T,{as:"span",size:"s5",color:o.r.colors.gray600,weight:"semiBold",children:null==w?void 0:null===(f=w.author)||void 0===f?void 0:f.display_name})}):(0,i.tZ)(s.T,{as:"span",size:"s5",color:o.r.colors.gray600,weight:"semiBold",children:null==w?void 0:null===(y=w.author)||void 0===y?void 0:y.display_name})})," ","\xb7"," "]}),z({id:"articlePage.articleUpdatedDate",defaultMessage:"Updated {date}"},{date:(0,p.m)(k,H)})]})]})})),C=r.memo(withArticleAuthor(e=>{var t,a,m,v;let{reviewer:f,articleReviewed:y,author:x,expert:w,updatedAt:Z,title:C,name:k,location:M,reviewerUrl:I,authorUrl:B,shouldHideAuthor:T,avatar:L,badge:A,authorOnCare:P,...N}=e,{formatMessage:S}=(0,l.Z)(),{locale:E}=(0,g.h)(),z=(0,h.U)(),H=(0,r.useMemo)(()=>{var e,t,a;return(null==P?void 0:P.type)==="service"?null===(e=n.a8[E])||void 0===e?void 0:e.SERVICE:(null==P?void 0:P.type)==="hospital"?null===(t=n.a8[E])||void 0===t?void 0:t.HOSPITAL:null===(a=n.a8[E])||void 0===a?void 0:a.DOCTOR},[null==P?void 0:P.type,E]);return(0,i.BX)(b,{"data-mobile":"true",...N,children:[(0,i.BX)("div",{className:"expert",children:[(0,i.tZ)("a",{"data-event-category":"Reviewer Name","data-event-action":k,"data-event-label":"".concat((0,u.UC)(E)).concat(I),href:I||"#",children:(0,i.tZ)(d.A,{src:L||(null==w?void 0:w.thumbnailAvatar)||(null==f?void 0:f.thumbnailAvatar)||(null==x?void 0:x.thumbnailAvatar),size:40,withIndicator:!!A,indicatorConfig:A?{size:16,label:(0,i.tZ)("img",{loading:"lazy",width:"16",height:"16",src:"".concat(n.Nr,"/article-").concat(A,".svg"),alt:""})}:void 0})}),(0,i.BX)(s.T,{size:"n1",color:o.r.colors.gray600,children:[C&&(0,i.tZ)(s.T,{as:"span",size:"n1",children:C})," ",k&&(0,i.tZ)("a",{"data-event-category":"Reviewer Name","data-event-action":k,"data-event-label":"".concat((0,u.UC)(E)).concat(I),href:I||"#",children:(0,i.tZ)(s.T,{as:"span",size:"s4",color:o.r.colors.gray800,weight:"semiBold",children:k})}),(null==y?void 0:null===(t=y.expert)||void 0===t?void 0:t.specialty)&&(0,i.BX)(s.T,{as:"span",size:"n1",color:o.r.colors.gray600,children:[" ","\xb7 ",y.expert.specialty]}),M&&(0,i.BX)(s.T,{as:"span",size:"n1",color:o.r.colors.gray600,children:[" ","\xb7 ",M]})]})]}),P&&(0,i.tZ)("a",{href:"/care/".concat(H,"/").concat(null==P?void 0:P.slug,"-").concat(null==P?void 0:P.id,"/"),children:(0,i.tZ)(c.B,{size:"sm",fullWidth:!0,type:"button",mt:8,"data-event-category":"Care","data-event-action":"Embedded Booking Button","data-event-label":z,children:S({id:"articleAuthor.button",defaultMessage:"Book now"})})}),(0,i.tZ)("hr",{className:"divider"}),(0,i.BX)(s.T,{className:"author",size:"n1",color:o.r.colors.gray600,style:{textAlign:T?"center":"left"},children:[!T&&(0,i.BX)(s.T,{as:"span",size:"n1",children:[S({id:"articlePage.articleWrittenBy",defaultMessage:"Written by {name}"},{name:B?(0,i.tZ)("a",{"data-event-category":"Author Name","data-event-action":null==y?void 0:null===(a=y.author)||void 0===a?void 0:a.display_name,"data-event-label":"".concat((0,u.UC)(E)).concat(B),href:B,children:(0,i.tZ)(s.T,{as:"span",size:"s4",color:o.r.colors.gray600,weight:"semiBold",children:null==y?void 0:null===(m=y.author)||void 0===m?void 0:m.display_name})}):(0,i.tZ)(s.T,{as:"span",size:"s4",color:o.r.colors.gray600,weight:"semiBold",children:null==y?void 0:null===(v=y.author)||void 0===v?void 0:v.display_name})})," ","\xb7"," "]}),S({id:"articlePage.articleUpdatedDate",defaultMessage:"Updated {date}"},{date:(0,p.m)(Z,E)})]})]})})),k=r.memo(withArticleAuthor(e=>{var t;let{articleReviewed:a,title:r,name:n,updater:d,isExpertSameAsAuthor:s}=e,{formatMessage:c}=(0,l.Z)();return(0,i.BX)(y.K,{spacing:4,children:[!s&&(0,i.tZ)(f.T,{size:"p3",color:o.r.colors.gray600,children:c({id:"articlePage.articleWrittenBy",defaultMessage:"Written by {name}"},{name:(0,i.tZ)(f.T,{as:"span",size:"p3",color:o.r.colors.gray800,children:null==a?void 0:null===(t=a.author)||void 0===t?void 0:t.display_name})})}),(0,i.BX)(f.T,{size:"p3",color:o.r.colors.gray600,children:[r&&(0,i.tZ)(f.T,{as:"span",size:"p3",children:r})," ",n&&(0,i.tZ)(f.T,{as:"span",size:"p3",color:o.r.colors.gray800,children:n})]}),d&&!w()(d)&&(0,i.tZ)(f.T,{size:"p3",color:o.r.colors.gray600,children:c({id:"articlePage.history.updatedBy",defaultMessage:"Updated by: {name}"},{name:(0,i.tZ)(f.T,{as:"span",size:"p3",color:o.r.colors.gray800,children:null==d?void 0:d.displayName})})})]})}))},zwb3:function(e,t,a){a.d(t,{E:function(){return d},J8:function(){return s},e0:function(){return n},zB:function(){return o}});var i=a("rBCA"),r=a("Ztav"),l=a("iBNF");let n=(0,i.Z)("div",{target:"essgep40"})("position:relative;width:100%;height:100%;img{border-radius:50%;object-fit:cover;}.badge{position:absolute;right:0;bottom:0;display:flex;}"),o=(0,i.Z)("div",{target:"essgep41"})("width:12px;height:12px;"),d=(0,i.Z)(r.T,{target:"essgep42"})(".author .poster p span:not(.author-name){font-weight:400;}.author .poster p span:not(.name){color:",l.r.colors.gray800,";}.author-name{font-weight:600;}"),s=(0,i.Z)("div",{target:"essgep43"})("width:100%;height:100%;position:relative;")},"1KiM":function(e,t,a){a.r(t),a.d(t,{ArticleCardWrapper:function(){return ArticleCardWrapper}});var i=a("BGKE"),r=a("q1tI"),l=a("bVHi"),n=a("ns0B"),o=a.n(n),d=a("YFqc"),s=a.n(d),c=a("09QT"),u=a("oQBk"),h=a("CJtR"),g=a("UJaG"),p=a("S3OL"),m=a("FhrT"),v=a("iv2E"),b=a("hXNO"),f=a("P5LW"),y=a("Skvs"),x=a("rIrU"),w=a("rEaw"),Z=a("o0qI"),C=a("KBam"),k=a("tQmg"),M=a("zwb3"),I=a("05Ua");let ArticleCardWrapper=e=>{var t,a,n,d,B,T,L,A,P,N;let{article:S,avatarImg:E,authorName:z,authorLink:H,title:F,text:R,disabledBadge:V=!0,className:q,uploadTime:_,isLazyLoad:D,bannerImageWrapProps:X,authorImageWrapProps:W,banner:O,hideBookmark:U,dataEventCategoryForReviewer:K,dataEventActionForReviewer:G,...j}=e,{state:{userInfo:Y},dispatch:Q}=(0,r.useContext)(Z.I),J=(0,b.d)(),{isLargeMobile:$}=(0,y.eI)(),{bookmarks:ee=[]}=Y||{},[et,ea]=(0,r.useState)(-1!==ee.indexOf(S.id)),[ei,er]=(0,r.useState)(!1),{locale:el=w.MV.PhilippinesEnglish}=(0,f.h)(),en=(0,C.kO)({article:S,locale:el,version:"short"}),bookmarkArticle=e=>{if(null==Y?void 0:Y.id)ea(e=>!e),et?(async()=>{let{_status:t}=await (0,c.d)(u.y.SSO.DELETE_BOOKMARK,{method:"DELETE",data:{host_name:v.domainLocales[el],post_ids:[e]}},"sso");1===t&&Q({type:I.H.REMOVE_BOOKMARKS,payload:{bookmarks:[e],bookmarkId:e}})})():(async()=>{let{_status:t,_data:a}=await (0,c.d)(u.y.SSO.CREATE_BOOKMARK,{method:"POST",data:{host_name:v.domainLocales[el],post_ids:[e]}},"sso");1===t&&Q({type:I.H.ADD_BOOKMARKS,payload:{bookmarks:[e],bookmarkId:e,isFirstTimeBookmark:a.first_time_bookmark}})})();else{let t=window.location.href,a=encodeURIComponent("".concat(t).concat(t.includes("?")?"&":"?","source=bookmark,").concat(e));x.Ew?l.u.getState().triggerLogin({source:"bookmark,".concat(e)}):window.location.href=x.MO?"".concat(x.MO,"?returnUrl=").concat(a):t}};(0,r.useEffect)(()=>{er(!U)},[]),(0,r.useEffect)(()=>{ea(-1!==ee.indexOf(S.id))},[ee.length]);let eo=en.avatar_permalink?s():"span",ed=en.avatar_permalink?(0,h.UC)(el,!0)+en.avatar_permalink:"",es=(0,i.tZ)(M.E,{isPremium:el!==w.MV.Vietnam&&S.isPremium,isMobile:J,className:q,dataEventCategoryForBookmark:"Bookmark",dataEventActionForBookmark:"Click",dataEventLabelForBookmark:"https://".concat(v.domainLocales[el]).concat(S.permalinkDecode),dataEventLabelForTitle:"https://".concat(v.domainLocales[el]).concat(S.permalinkDecode),dataEventLabelForCategory:"https://".concat(v.domainLocales[el]).concat(S.category.permalinkDecode),dataEventLabelForBanner:"https://".concat(v.domainLocales[el]).concat(S.permalinkDecode),hasAffiliate:S.hasAffiliate,articleLink:S.permalink,categoryLink:S.category.permalink||"#",categoryName:(null===(t=S.category)||void 0===t?void 0:t.displayName)||(null===(a=S.category)||void 0===a?void 0:a.name)||(null===(d=S.categories)||void 0===d?void 0:null===(n=d[0])||void 0===n?void 0:n.displayName)||(null===(T=S.categories)||void 0===T?void 0:null===(B=T[0])||void 0===B?void 0:B.name)||"",banner:O||(0,i.tZ)(p.R,{src:(J?S.featureImageMobile:S.featureImage)||S.featureImage||x.YS,fill:!0,alt:S.postName,...X}),specialty:(null===(L=S.expert)||void 0===L?void 0:L.specialty)||(null===(A=S.author)||void 0===A?void 0:A.specialty),...j,uploadTime:(0,k.m)(_||S.modifiedTime,el)||_||S.modifiedTime,title:o()(F||S.postTitle||S.postName||"")||"",text:void 0!==R?o()(R||""):S.excerpt||S.description||S.postContent?o()(S.excerpt||S.description||(null===(P=S.postContent)||void 0===P?void 0:P.split("\r\n")[0])||""):"",avatarImg:(0,i.tZ)(eo,{href:en.avatar_permalink,className:"pointer-event-child-none","data-event-category":K,"data-event-action":G,"data-event-label":ed,prefetch:!1,children:(0,i.BX)(M.e0,{children:[(0,i.tZ)(M.J8,{children:(0,i.tZ)(p.R,{className:"avatar",src:en.avatar||x.DP,alt:en.avatar_alt,..."lg"!==j.size||J||$?{width:24,height:24}:{width:32,height:32},placeholder:void 0,blurDataURL:void 0,...W})}),!V&&en.indicator&&(0,i.tZ)(M.zB,{className:"badge",children:(0,i.tZ)("img",{src:en.indicator,loading:"lazy",alt:"badge",width:12,height:12})})]})}),authorName:(0,i.BX)("span",{"data-event-category":K,"data-event-action":G,"data-event-label":ed,className:"pointer-event-child-none",children:[(0,i.tZ)(g.x,{...en,formatOptionsProps:{expert_display_name:{href:""}}}),"\xa0"]}),authorLink:en.avatar_permalink,isBookmarkDisplayed:ei,isBookmark:et,onBookmark:()=>bookmarkArticle(S.id),styleLabel:{color:(null===(N=S.category)||void 0===N?void 0:N.textColor)||"#008C50",...j.styleLabel}});return D?(0,i.tZ)(m.Z,{placeholder:(0,i.BX)("div",{style:{opacity:0,pointerEvents:"none",height:180},children:[(0,i.tZ)("a",{href:en.avatar_permalink,children:en.avatar_permalink}),(0,i.tZ)("a",{href:en.avatar_permalink,children:(0,i.tZ)("img",{"data-src":en.avatar,alt:en.avatar_alt})}),(0,i.tZ)("div",{children:(0,i.tZ)(g.x,{...en,formatOptionsProps:{expert_display_name:{"data-event-category":K,"data-event-action":G,"data-event-label":ed}}})}),(0,i.BX)("a",{href:j.articleLink,children:[(0,i.tZ)("img",{"data-src":S.featureImage,alt:S.postTitle}),(0,i.tZ)("img",{"data-src":S.featureImageMobile,alt:S.postTitle}),(0,i.tZ)("img",{"data-src":S.featureImageMobileXs,alt:S.postTitle}),(0,i.tZ)("div",{children:j.categoryName}),(0,i.tZ)("div",{children:_}),(0,i.tZ)("div",{children:F||""}),(0,i.tZ)("div",{children:R||""})]})]}),children:es}):es}},tssu:function(e,t,a){a.r(t),a.d(t,{ArticleFeedback:function(){return ArticleFeedback},FeedbackStatus:function(){return r}});var i,r,l=a("BGKE"),n=a("q1tI"),o=a("MmHG"),d=a("LgdP"),s=a("IoIb"),c=a("fNFL"),u=a("dDsW"),h=a("a5vB"),g=a("09QT"),p=a("oQBk"),m=a("CJtR"),v=a("g/tz"),b=a("raAP"),f=a("hXNO"),y=a("P5LW"),x=a("rEaw"),w=a("o0qI"),Z=a("tjQ2"),C=a("iBNF"),k=a("oOS+"),M=a("cChf"),I=a("Tabs"),B=a("q0An");let T=B.Ry().shape({status:B.Rx().notRequired(),message:B.Z_().notRequired().default("")});var L=a("rBCA"),A=a("uuQu");let P=(0,L.Z)("div",{target:"e1qrz8ed0"})("display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;gap:24px;width:100%;height:184px;/* Neutral/Neutral-100 */\n\n border:1px solid ",C.r.colors.neutral100,";border-radius:8px;.button-group{display:flex;gap:16px;}"),N=(0,L.Z)("form",{target:"e1qrz8ed1"})("display:flex;flex-direction:column;align-items:flex-start;padding:0px;gap:8px;.feedback-status{cursor:pointer;display:flex;align-items:center;padding:12px;gap:10px;width:100%;min-height:52px;/* Gray/Gray-50 */\n border:1px solid transparent;background:",C.r.colors.gray50,";border-radius:",C.r.borderRadius,";transition:all 300ms ease-in-out;&.active{background:",C.r.colors.primary50,";border:1px solid ",C.r.colors.primary200,";}}.feedback-disclaimer{display:flex;gap:4px;",A.M.mbDown,"{margin-bottom:16px;}}");var S=a("0VOb");let FeedbackForm=e=>{let{onSubmit:t,...a}=e,{formatMessage:i}=(0,u.Z)(),{state:{isLoggedIn:s}}=(0,n.useContext)(w.I),{currentArticle:c,setIsDisliked:b}=(0,Z.WM)(e=>({currentArticle:e.currentArticle,setIsDisliked:e.setIsDisliked}),h.X),B=(0,f.d)(),{locale:L}=(0,y.h)(),A=(0,M.c)({initialValues:{message:"",status:r.Other},validate:(0,I.X)(T)}),onSubmit=async e=>{var a;if(!s){(0,v.p0)("".concat((0,m.UC)(L)).concat(null==c?void 0:c.permalink,"?feedback=").concat(x.lo.DisLike,"&feedback_stat=").concat(e.status,"&message=").concat(e.message),"reaction");return}let i=await (0,g.d)(p.y.SSO.SSO_FEEDBACK,{method:"POST",data:{post_id:null==c?void 0:c.id,feedback:x.lo.DisLike,feedback_stat:e.status,message:e.message}},"sso");(null==i?void 0:null===(a=i._data)||void 0===a?void 0:a.total)&&b(!0),t()};return(0,l.BX)(N,{onSubmit:A.onSubmit(onSubmit,e=>{Object.values(e).forEach(e=>(0,S.c)({type:"danger",message:e||"",title:i({id:"babyGrowth.error.title",defaultMessage:"Invalid data"})}))}),...a,children:[(0,l.BX)("div",{className:"feedback-status ".concat(A.values.status===r.Inaccurate?"active":""),onClick:()=>{A.setFieldValue("status",r.Inaccurate)},children:[(0,l.tZ)("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",children:(0,l.tZ)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 24C8.48 24 4 19.52 4 14C4 8.48 8.48 4 14 4C19.52 4 24 8.48 24 14C24 19.52 19.52 24 14 24ZM14 9C13.45 9 13 9.45 13 10V14C13 14.55 13.45 15 14 15C14.55 15 15 14.55 15 14V10C15 9.45 14.55 9 14 9ZM13 17H15V19H13V17Z",fill:"#FE921D"})}),(0,l.tZ)(o.T,{size:"p3",color:C.r.colors.gray800,children:i({id:"feedback.status.inaccurate",defaultMessage:"This article contains incorrect information"})})]}),(0,l.BX)("div",{className:"feedback-status ".concat(A.values.status===r.NoRelated?"active":""),onClick:()=>{A.setFieldValue("status",r.NoRelated)},children:[(0,l.tZ)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,l.tZ)("path",{d:"M11.6777 21.9957C11.2556 21.9571 10.8798 21.6495 10.7793 21.2047L10.2246 18.7594L7.51367 15.7477C7.18267 15.3807 7 14.9038 7 14.4098V5.17739C7 4.07239 7.895 3.17739 9 3.17739H17.0312C17.7723 3.17739 18.4431 3.61367 18.7441 4.29067L21.7461 11.0465C21.9131 11.4205 22 11.826 22 12.236V13.1774C22 14.2774 21.1 15.1774 20 15.1774H13C13 15.1774 14 17.5481 14 19.3141C14 20.9271 12.9624 21.6331 12.1074 21.9411C11.9647 21.9928 11.8184 22.0086 11.6777 21.9957ZM3.5 15.1774C2.672 15.1774 2 14.5054 2 13.6774V4.67739C2 3.84939 2.672 3.17739 3.5 3.17739C4.328 3.17739 5 3.84939 5 4.67739V13.6774C5 14.5054 4.328 15.1774 3.5 15.1774Z",fill:"#2D87F3"})}),(0,l.tZ)(o.T,{size:"p3",color:C.r.colors.gray800,children:i({id:"feedback.status.noRelated",defaultMessage:"This article doesn't have the information I'm looking for"})})]}),(0,l.tZ)(k.T,{w:"100%",placeholder:i({id:"feedback.message.placeholder",defaultMessage:"Please tell us what was incorrect"}),...A.getInputProps("message")}),(0,l.BX)("div",{className:"feedback-disclaimer",children:[(0,l.tZ)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",style:{width:"32px"},children:(0,l.tZ)("path",{d:"M14.8256 12.3007L8.96093 2.544C8.75626 2.20333 8.39693 2 7.9996 2C7.60226 2 7.24293 2.20333 7.03893 2.54333L1.1736 12.3007C0.965597 12.6467 0.960264 13.0793 1.15893 13.4307C1.35693 13.782 1.73093 14 2.13493 14H13.8649C14.2683 14 14.6429 13.782 14.8409 13.4307C15.0396 13.0793 15.0336 12.6467 14.8256 12.3007ZM8.33293 12H7.66626C7.48226 12 7.33293 11.8507 7.33293 11.6667V11C7.33293 10.816 7.48226 10.6667 7.66626 10.6667H8.33293C8.51693 10.6667 8.66626 10.816 8.66626 11V11.6667C8.66626 11.8507 8.51693 12 8.33293 12ZM7.9996 9.33333C7.6316 9.33333 7.33293 9.03467 7.33293 8.66667V6.66667C7.33293 6.29867 7.6316 6 7.9996 6C8.3676 6 8.66626 6.29867 8.66626 6.66667V8.66667C8.66626 9.03467 8.3676 9.33333 7.9996 9.33333Z",fill:"#FE921D"})}),(0,l.tZ)(o.T,{size:"n1",color:C.r.colors.gray600,children:i({id:"articlePage.disclaimer",defaultMessage:"Hello Health Group does not provide medical advice, diagnosis or treatment."})})]}),(0,l.tZ)(d.B,{size:"lg",color:"primary",isBlock:B,children:i({id:"feedback.submit",defaultMessage:"Submit"})})]})};(i=r||(r={}))[i.Inaccurate=1]="Inaccurate",i[i.NoRelated=2]="NoRelated",i[i.Other=3]="Other";let ArticleFeedback=e=>{let{formatMessage:t}=(0,u.Z)(),{currentArticle:a,isLiked:i,isDisliked:r,setIsLiked:C}=(0,Z.WM)(e=>({currentArticle:e.currentArticle,isLiked:e.isLiked,isDisliked:e.isDisliked,setIsLiked:e.setIsLiked}),h.X),{state:{isLoggedIn:k}}=(0,n.useContext)(w.I),{locale:M}=(0,y.h)(),[I,B]=(0,n.useState)(!1),T=(0,f.d)(),L=(0,b.U)();if(i||r)return null;let handleReaction=async e=>{if(e===x.lo.DisLike){B(!0);return}if(k){var t;let e=await (0,g.d)(p.y.SSO.SSO_FEEDBACK,{method:"POST",data:{post_id:null==a?void 0:a.id,feedback:x.lo.Like}},"sso");(null==e?void 0:null===(t=e._data)||void 0===t?void 0:t.total)&&C(!0)}else(0,v.p0)("".concat((0,m.UC)(M)).concat(null==a?void 0:a.permalink,"?feedback=").concat(x.lo.Like,"&postId=").concat(null==a?void 0:a.id),"reaction")};return(0,l.BX)(l.HY,{children:[(0,l.BX)(P,{...e,children:[(0,l.tZ)(o.T,{size:"s2",type:"semiBold",children:t({id:"feedback.title",defaultMessage:"Was this article helpful?"})}),(0,l.BX)("div",{className:"button-group",children:[(0,l.tZ)(d.B,{size:"sm",color:"transparent",onClick:()=>handleReaction(x.lo.Like),"data-event-category":"FeedbackIcon","data-event-action":"Yes","data-event-label":L,className:"pointer-event-child-none",children:(0,l.BX)("svg",{width:"49",height:"48",viewBox:"0 0 49 48",fill:"none",children:[(0,l.tZ)("rect",{x:"0.5",width:"48",height:"48",rx:"4",fill:"#00CB8A"}),(0,l.tZ)("path",{d:"M32.4803 17.9902C32.2205 17.9979 31.9739 18.1065 31.7928 18.2929L21.4998 28.5859L18.2069 25.2929C18.1147 25.1969 18.0044 25.1203 17.8822 25.0675C17.7601 25.0147 17.6287 24.9869 17.4956 24.9855C17.3626 24.9842 17.2306 25.0094 17.1074 25.0597C16.9843 25.1099 16.8724 25.1843 16.7783 25.2784C16.6842 25.3725 16.6098 25.4844 16.5595 25.6075C16.5093 25.7307 16.484 25.8627 16.4854 25.9957C16.4868 26.1288 16.5146 26.2602 16.5674 26.3823C16.6202 26.5045 16.6968 26.6148 16.7928 26.707L20.7928 30.707C20.9804 30.8944 21.2347 30.9998 21.4998 30.9998C21.765 30.9998 22.0193 30.8944 22.2069 30.707L33.2069 19.707C33.3514 19.5665 33.4501 19.3857 33.49 19.1882C33.53 18.9906 33.5093 18.7857 33.4308 18.6001C33.3523 18.4145 33.2195 18.2569 33.0499 18.1481C32.8803 18.0393 32.6817 17.9842 32.4803 17.9902Z",fill:"white"})]})}),(0,l.tZ)(d.B,{size:"sm",color:"transparent",onClick:()=>handleReaction(x.lo.DisLike),"data-event-category":"FeedbackIcon","data-event-action":"No","data-event-label":L,className:"pointer-event-child-none",children:(0,l.BX)("svg",{width:"49",height:"48",viewBox:"0 0 49 48",fill:"none",children:[(0,l.tZ)("rect",{x:"0.5",width:"48",height:"48",rx:"4",fill:"#FF6F4D"}),(0,l.tZ)("path",{d:"M18.4901 16.9902C18.2911 16.9902 18.0967 17.0496 17.9317 17.1607C17.7667 17.2718 17.6386 17.4296 17.5637 17.614C17.4889 17.7983 17.4707 18.0007 17.5115 18.1954C17.5523 18.3901 17.6502 18.5682 17.7928 18.707L23.0858 23.9999L17.7928 29.2929C17.6968 29.3851 17.6202 29.4954 17.5674 29.6176C17.5146 29.7397 17.4868 29.8711 17.4854 30.0042C17.484 30.1372 17.5093 30.2692 17.5595 30.3924C17.6098 30.5155 17.6842 30.6274 17.7783 30.7215C17.8724 30.8156 17.9843 30.89 18.1074 30.9402C18.2306 30.9905 18.3626 31.0157 18.4956 31.0144C18.6287 31.013 18.7601 30.9851 18.8822 30.9324C19.0044 30.8796 19.1147 30.803 19.2069 30.707L24.4998 25.414L29.7928 30.707C29.885 30.803 29.9953 30.8796 30.1175 30.9324C30.2396 30.9851 30.371 31.013 30.5041 31.0144C30.6371 31.0157 30.7691 30.9905 30.8922 30.9402C31.0154 30.89 31.1273 30.8156 31.2214 30.7215C31.3155 30.6274 31.3899 30.5155 31.4401 30.3924C31.4904 30.2692 31.5156 30.1372 31.5143 30.0042C31.5129 29.8711 31.485 29.7397 31.4323 29.6176C31.3795 29.4954 31.3028 29.3851 31.2069 29.2929L25.9139 23.9999L31.2069 18.707C31.3514 18.5665 31.4501 18.3857 31.49 18.1882C31.53 17.9906 31.5093 17.7857 31.4308 17.6001C31.3523 17.4145 31.2195 17.2569 31.0499 17.1481C30.8803 17.0393 30.6817 16.9842 30.4803 16.9902C30.2205 16.9979 29.9739 17.1065 29.7928 17.2929L24.4998 22.5859L19.2069 17.2929C19.1137 17.1971 19.0022 17.121 18.8791 17.069C18.756 17.017 18.6237 16.9902 18.4901 16.9902Z",fill:"white"})]})})]})]}),T?(0,l.tZ)(s.D,{title:t({id:"feedback.modal.title",defaultMessage:"How can we improve it?"}),open:I,onClose:()=>B(!1),placement:"bottom",children:(0,l.tZ)(FeedbackForm,{onSubmit:()=>B(!1)},Number(I))}):(0,l.tZ)(c.M,{size:500,opened:I,onClose:()=>B(!1),centered:!0,title:(0,l.tZ)(o.T,{size:"s2",type:"semiBold",children:t({id:"feedback.modal.title",defaultMessage:"How can we improve it?"})}),children:(0,l.tZ)(FeedbackForm,{onSubmit:()=>B(!1)},Number(I))})]})}},uyDu:function(e,t,a){a.r(t),a.d(t,{ArticleRecommendation:function(){return ArticleRecommendation}});var i=a("BGKE");a("q1tI");var r=a("DEkF"),l=a("rIrU"),n=a("rBCA"),o=a("iBNF");let d=(0,n.Z)("div",{target:"e1pihn4y0"})("padding:16px;background:url('",l.Nr,"/recommendation-bg.svg}') bottom right\n no-repeat;background-color:#faf6ff;border-radius:",o.r.borderRadius,";margin:16px 0;.title{display:flex;align-items:center;img{margin-right:12px;width:28px;height:28px;}}.content{margin-top:16px;line-height:28px;font-size:16px;li{position:relative;padding-left:20px;margin-bottom:16px;font-size:16px;line-height:24px;&:before{position:absolute;top:0;left:0;color:",o.r.colors.violet600,";content:'•';font-size:30px;}*:first-of-type{display:initial;}}}"),ArticleRecommendation=e=>{let{title:t,content:a}=e;return(0,i.BX)(d,{children:[t&&(0,i.BX)("div",{className:"title",children:[(0,i.tZ)("img",{src:"".concat(l.uQ,"/recommendation-icon.svg"),alt:"Recommendation Icon",loading:"lazy"}),(0,i.tZ)(r.H,{tag:"h6",as:"h3",fontWeight:"bold",color:"#9E4CD1",style:{textTransform:"uppercase"},children:t})]}),(0,i.tZ)("div",{className:"content",children:(0,i.tZ)("span",{dangerouslySetInnerHTML:{__html:a}})})]})}},D8zg:function(e,t,a){a.d(t,{Z:function(){return babyGrowthTabActionButton}});var i=a("BGKE"),r=a("q1tI"),l=a("qQsD"),n=a("LgdP"),o=a("1HUI"),d=a("mYVa"),s=a("SPK5"),c=a("p46w"),u=a.n(c),h=a("dDsW"),g=a("sKr0"),p=a("iv2E"),m=a("raAP"),v=a("hXNO"),b=a("P5LW"),f=a("rIrU"),y=a("r2Jg"),x=a("8vdq"),w=a("o0qI"),Z=a("JiVP"),C=a("6DcS"),k=a("rBCA"),M=a("uuQu");let I=(0,k.Z)("div",{target:"e12wa0kz0"})(".save{width:100%;margin-bottom:8px;}.inline-button{display:flex;gap:8px;justify-content:center;.grow{width:100%;flex-grow:1;}.share span{display:flex;align-items:center;}",M.M.mbUp,"{margin-top:32px;gap:16px;align-items:center;flex-basis:0;> *{flex-basis:50%;}.save{width:initial;margin-bottom:0;}}}");var B=a("Psub"),T=a("0VOb"),babyGrowthTabActionButton=()=>{var e,t,a;let c=(0,m.U)(),k=(0,v.d)(),{locale:M}=(0,b.h)(),{formatMessage:L}=(0,h.Z)(),{getHealthToolLink:A}=(0,o.u)(M),P=(0,r.useMemo)(()=>"".concat(window.location.origin).concat(f.sb).concat(A(x.QO.BABY_GROWTH)),[A]),{state:{isLoggedIn:N}}=(0,r.useContext)(w.I),{state:{name:S,isNewBaby:E,currentBaby:z,bmi:H,birthday:F,gender:R,head:V,height:q,weight:_,age:D,measurementDate:X,babyGrowthContent:W}}=(0,r.useContext)(Z.p),O=(0,r.useCallback)(()=>{u().remove(y.Tx),window.location.href=P},[P]),U=(0,r.useCallback)(()=>N&&S&&!E?L({id:"babyGrowth.save.loggedIn",defaultMessage:"See Baby's Growth Tracker"},{name:(0,C.f)(S)}):L({id:"babyGrowth.save",defaultMessage:"Save the measurement"}),[N,S]),handleSave=()=>{u().set(y.DX,JSON.stringify({bmi:H,birthday:F,gender:R,head:V,height:q,weight:_,age:D,measurementDate:X,name:S}),{domain:".".concat(p.domainLocales[M])}),!E&&(null==z?void 0:z.id)?window.location.href="/".concat(f.MO,"user/health/parenting?baby_id=").concat(null==z?void 0:z.id):window.location.href="/".concat(f.MO,"user/health/parenting?action=create-new-baby")},[K,G]=(0,r.useState)(!1);return(0,i.BX)(i.HY,{children:[(0,i.tZ)(l.j,{locale:M,url:P,open:K,onClose:()=>G(!1),onCopied:()=>{(0,T.c)({type:"success",title:"Success",message:"Link copied successfully"})},onShared:()=>G(!1)}),(0,i.tZ)(B.j,{heading:null==W?void 0:W.additionalInfo.title,content:null==W?void 0:W.additionalInfo.description,ctaUrl:null==W?void 0:null===(e=W.additionalInfo)||void 0===e?void 0:e.ctaUrl,ctaTitle:null==W?void 0:null===(t=W.additionalInfo)||void 0===t?void 0:t.ctaTitle,image:null==W?void 0:null===(a=W.additionalInfo)||void 0===a?void 0:a.image,styles:{root:{marginBottom:(0,d.h)(24)}}}),k?(0,i.BX)(I,{children:[!f.Mw&&(0,i.tZ)(n.B,{size:"lg",color:"primary",className:"save",onClick:handleSave,"data-event-category":"Health Tool","data-event-action":"Baby Growth Profile","data-event-label":c,children:U()}),(0,i.tZ)("div",{className:"inline-button",children:(0,i.tZ)(n.B,{size:"lg",color:"secondary",className:"grow",onClick:O,"data-event-category":"Health Tool","data-event-action":"Baby Growth Recalculation","data-event-label":c,children:L({id:"tools.recalculate",defaultMessage:"Re-calculate"})})})]}):(0,i.BX)(I,{children:[(0,i.tZ)(s.k,{justify:"center",children:(0,i.tZ)(g.n.BottomNavHorizonal,{shareUrl:P,showFull:!0,iconSize:24,styles:{heading:{fontSize:12}}})}),(0,i.BX)("div",{className:"inline-button",children:[!f.Mw&&(0,i.tZ)(n.B,{size:"lg",className:"save",onClick:handleSave,"data-event-category":"Health Tool","data-event-action":"Baby Growth Profile","data-event-label":c,children:U()}),(0,i.tZ)(n.B,{size:"lg",color:"secondary",onClick:O,"data-event-category":"Health Tool","data-event-action":"Baby Growth Recalculation","data-event-label":c,children:L({id:"tools.recalculate",defaultMessage:"Re-calculate"})})]})]})]})}},nLRR:function(e,t,a){a.r(t),a.d(t,{BmiUnitValidationBase:function(){return u},bmiUnitValidation:function(){return h},convertCmToFt:function(){return convertCmToFt},convertFtToCm:function(){return convertFtToCm},convertKgToLbs:function(){return convertKgToLbs},convertLbsToKg:function(){return convertLbsToKg},generateBmiRules:function(){return generateBmiRules},generateSchema:function(){return generateSchema},getBmi:function(){return getBmi},syncParamsToUseOnSSOForm:function(){return syncParamsToUseOnSSOForm}});var i=a("LL/B"),r=a("Wgwc"),l=a.n(r),n=a("q0An"),o=a("vAgI"),d=a("rIrU"),s=a("rEaw"),c=a("9L6u");function convertLbsToKg(e){return .45359237*e}function convertKgToLbs(e){return e/.45359237}function convertFtToCm(e){return 30.48*e}function convertCmToFt(e){return e/30.48}let u={minAge:18,maxAge:100,minHeight:1,maxHeight:300,minWeight:1,maxWeight:500,heightConvert:e=>e,weightConvert:e=>e},h={[s.MV.PhilippinesEnglish]:u,[s.MV.India]:u,[s.MV.Indonesia]:u,[s.MV.Cambodia]:u,[s.MV.Malaysia]:u,[s.MV.Myanmar]:{...u,minHeight:convertCmToFt(1),maxHeight:convertCmToFt(300),minWeight:convertKgToLbs(1),maxWeight:convertKgToLbs(500),heightConvert:convertFtToCm,weightConvert:convertLbsToKg},[s.MV.Thailand]:u,[s.MV.PhilippinesTagalog]:u,[s.MV.Vietnam]:u,[s.MV.Taiwan]:u,[s.MV.Singapore]:u},getBmi=async e=>await (0,o.ZD)(e).then(e=>{var t,a;return(null==e?void 0:null===(a=e.data)||void 0===a?void 0:null===(t=a.bmi)||void 0===t?void 0:t.bmi)||0}),generateSchema=(e,t)=>n.Ry().shape({gender:n.Z_().required(e({id:"tools.genderInput.error",defaultMessage:"Please select gender"})),birthday:n.hT().required(e({id:"bmi.ageInput.error",defaultMessage:"Please enter a valid age"})),height:n.Rx().typeError(e({id:"bmi.heightInput.error",defaultMessage:"Please enter a valid height"})).required(e({id:"bmi.heightInput.error",defaultMessage:"Please enter a valid height"})).min(h[t].minHeight,e({id:"bmi.heightInput.error",defaultMessage:"Please enter a valid height"})).max(h[t].maxHeight,e({id:"bmi.heightInput.error",defaultMessage:"Please enter a valid height"})),weight:n.Rx().typeError(e({id:"bmi.weightInput.error",defaultMessage:"Please enter a valid weight"})).required(e({id:"bmi.weightInput.error",defaultMessage:"Please enter a valid weight"})).min(h[t].minWeight,e({id:"bmi.weightInput.error",defaultMessage:"Please enter a valid weight"})).max(h[t].maxWeight,e({id:"bmi.weightInput.error",defaultMessage:"Please enter a valid weight"})),question1:n.Z_().required(e({id:"bmi.question.error",defaultMessage:"We need your input here to continue"})),question2:n.Z_().required(e({id:"bmi.question.error",defaultMessage:"We need your input here to continue"})),newsletter:n.O7().optional()}),generateBmiRules=e=>{let{f:t,locale:a}=e;return{gender:{label:t({id:"bmi.selectGender",defaultMessage:"What is your gender?"}),rule:{required:t({id:"validation.error.requiredField",defaultMessage:"This field is required"})}},age:{label:t({id:"bmi.ageInput",defaultMessage:"How old are you?"})+" "+t({id:"bmi.ageInput.desc",defaultMessage:"(years)"}),rule:{required:t({id:"validation.error.requiredField",defaultMessage:"This field is required"}),min:{value:h[a].minAge,message:t({id:"tools.errorMess.ageRange",defaultMessage:"Please enter age from {min} to {max}"},{min:h[a].minAge,max:h[a].maxAge})},max:{value:h[a].maxAge,message:t({id:"tools.errorMess.ageRange",defaultMessage:"Please enter age from {min} to {max}"},{min:h[a].minAge,max:h[a].maxAge})}}},height:{label:t({id:"bmi.heightInput",defaultMessage:"How tall are you?"}),rule:{required:t({id:"validation.error.requiredField",defaultMessage:"This field is required"}),min:{value:h[a].minHeight,message:t({id:"bmi.heightInput.error",defaultMessage:"Please enter a valid height"})},max:{value:h[a].maxHeight,message:t({id:"bmi.heightInput.error",defaultMessage:"Please enter a valid height"})}}},weight:{label:t({id:"bmi.weightInput",defaultMessage:"How much do you weight?"}),rule:{required:t({id:"validation.error.requiredField",defaultMessage:"This field is required"}),min:{value:h[a].minWeight,message:t({id:"bmi.weightInput.error",defaultMessage:"Please enter a valid weight"})},max:{value:h[a].maxWeight,message:t({id:"bmi.weightInput.error",defaultMessage:"Please enter a valid weight"})}}},objective:{label:t({id:"bmi.objective",defaultMessage:"Objectives"})},isCheckYourself:{label:""},bmi:{label:""},activityLevel:{label:t({id:"bmr.selectActivityLevel"})},question1:{rule:{required:t({id:"validation.error.requiredField",defaultMessage:"This field is required"})}},question2:{rule:{required:t({id:"validation.error.requiredField",defaultMessage:"This field is required"})}}}},syncParamsToUseOnSSOForm=(e,t)=>{let a=new URLSearchParams(window.location.search);a.set(i.Q.gender,(0,c.QX)(e.gender)),(null==e?void 0:e.birthday)?(null==e?void 0:e.birthday)&&a.set(i.Q.birthday,encodeURIComponent(l()(e.birthday).format(d.e4))):a.delete(i.Q.birthday),window.history.replaceState({},"","".concat(t.asPath.split("?")[0],"?").concat(a.toString()))}},ouLS:function(e,t,a){a.d(t,{W:function(){return BmiForm},P:function(){return B}});var i=a("BGKE"),r=a("q1tI"),l=a("C8b5"),n=a("ZLal"),o=a("fdQd"),d=a("8wjV"),s=a("eosF"),c=a("Eso5"),u=a("SPK5"),h=a("cChf"),g=a("Tabs"),p=a("Wgwc"),m=a.n(p),v=a("dDsW"),b=a("w99c"),f=a("YFSc"),y=a("F8ib"),x=a("raAP"),w=a("hXNO"),Z=a("P5LW"),C=a("rIrU"),k=a("8vdq"),M=a("o0qI"),I=a("9O6x"),B=a("nLRR"),T=(0,a("/npG").k)(e=>({root:{},form:{},actions:{},btn:{minWidth:220,[e.fn.smallerThan("sm")]:{width:"100%"}}}));let BmiForm=e=>{var t,a,p;let{onSubmit:L,loading:A,className:P,styles:N,classNames:S,...E}=e,{classes:z,cx:H}=T(void 0,{name:"BmiForm",styles:N,classNames:S}),{state:{userInfo:F,isLoggedIn:R}}=(0,r.useContext)(M.I),{locale:V}=(0,Z.h)(),{formatMessage:q}=(0,v.Z)(),{isCheckYourself:_,setIsCheckYourself:D,checkAvailableGenderOpt:X}=(0,y.K)(),W=(0,h.c)({validate:(0,g.X)(B.generateSchema(q,V)),initialValues:{height:"",weight:"",age:"",gender:"",question1:"",question2:"",newsletter:!0,activityLevel:k.p1.LOW_INTENSITY}}),O=(0,x.U)(),U=B.generateBmiRules({f:q,locale:V}),K=(0,w.d)();return(0,r.useEffect)(()=>{_?((null==F?void 0:F.gender)!==-1&&W.setFieldValue("gender",(0,I.Ko)((null==F?void 0:F.gender)||0)),(null==F?void 0:F.birthday)&&(W.setFieldValue("birthday",m()(null==F?void 0:F.birthday,C.yJ).toDate()),W.setFieldValue("age",String(m()().diff(m()(null==F?void 0:F.birthday,C.yJ),"year")))),(null==F?void 0:F.height)&&W.setFieldValue("height",null==F?void 0:F.height),(null==F?void 0:F.weight)&&W.setFieldValue("weight",null==F?void 0:F.weight),W.setFieldValue("activityLevel",(null==F?void 0:F.activity_level)||k.p1.LOW_INTENSITY)):(W.reset(),W.setFieldValue("activityLevel",k.p1.LOW_INTENSITY))},[_,null==F?void 0:F.id]),(0,r.useEffect)(()=>{R&&D(!0)},[R]),(0,i.tZ)(n.T,{variant:n.C.LEADGEN,children:(0,i.tZ)(c.x,{...E,className:H(P,z.root),children:(0,i.BX)("form",{className:z.form,onSubmit:W.onSubmit(e=>L(e)),children:[(0,i.tZ)(l.H,{isMobile:K,children:(0,i.BX)(l.H.Row,{children:[(0,i.BX)(l.H.Col,{children:[(0,i.tZ)(b.u,{...W.getInputProps("birthday"),LabelWrapper:l.H.Label,disableSSOAge:!_,onChange:e=>{W.setFieldValue("age",String(m()().diff(e,"year"))),W.setFieldValue("birthday",e)},error:void 0}),W.getInputProps("birthday").error&&(0,i.tZ)(l.H.Error,{label:W.getInputProps("birthday").error})]}),R&&(0,i.tZ)(l.H.Col,{children:(0,i.tZ)(f.X,{checked:_,LabelWrapper:l.H.Label,onChange:e=>D(e.currentTarget.checked)})}),(0,i.BX)(l.H.Col,{children:[(0,i.tZ)(l.H.GenderControl,{label:null===(t=U.gender)||void 0===t?void 0:t.label,LabelWrapper:l.H.Label,availableValue:X(W.getInputProps("gender").value),...W.getInputProps("gender"),error:void 0,styles:{wrapper:{gap:K?4:16}}}),W.getInputProps("gender").error&&(0,i.tZ)(l.H.Error,{label:W.getInputProps("gender").error})]}),(0,i.tZ)(l.H.Col,{md:6,children:(0,i.tZ)(l.H.InputNumber,{label:(0,i.tZ)(l.H.Label,{children:null===(a=U.height)||void 0===a?void 0:a.label}),name:"height",...W.getInputProps("height"),value:W.getInputProps("height").value?Number(W.getInputProps("height").value):"",min:0,precision:1,inputMode:"decimal",rightSection:q({id:"bmi.heightInput.desc",defaultMessage:"(cm)"}),rightSectionWidth:60,placeholder:q({id:"tools.inputPlaceholder"},{content:V===s.L.Myanmar?6:170})})}),(0,i.tZ)(l.H.Col,{md:6,children:(0,i.tZ)(l.H.InputNumber,{label:(0,i.tZ)(l.H.Label,{children:null===(p=U.weight)||void 0===p?void 0:p.label}),name:"weight",...W.getInputProps("weight"),value:W.getInputProps("weight").value?Number(W.getInputProps("weight").value):"",precision:1,inputMode:"decimal",min:0,rightSection:q({id:"bmi.weightInput.desc",defaultMessage:"(kg)"}),rightSectionWidth:60,placeholder:q({id:"tools.inputPlaceholder"},{content:V===s.L.Myanmar?130:60})})}),(0,i.tZ)(l.H.Col,{children:(0,i.tZ)(o.R.Group,{className:H("question1"),name:"question1",sx:{flex:1},label:(0,i.tZ)(l.Q,{LabelWrapper:l.H.Label}),...W.getInputProps("question1"),error:W.getInputProps("question1").error&&(0,i.tZ)(l.H.Error,{label:W.getInputProps("question1").error}),children:(0,i.BX)(u.k,{gap:"lg",children:[(0,i.tZ)(o.R,{size:"sm",value:"1",label:q({id:"bmi.answer.yes",defaultMessage:"Yes"})}),(0,i.tZ)(o.R,{size:"sm",value:"0",label:(0,i.tZ)(l.H.OptionLabel,{children:q({id:"bmi.answer.no",defaultMessage:"No"})})})]})})}),(0,i.tZ)(l.H.Col,{children:(0,i.tZ)(o.R.Group,{className:H("question2"),name:"question2",sx:{flex:1},label:(0,i.tZ)(l.a,{LabelWrapper:l.H.Label}),size:"lg",description:V!==s.L.Malaysia&&(0,i.tZ)(l.b,{LabelWrapper:l.H.SubLabel}),...W.getInputProps("question2"),error:W.getInputProps("question2").error&&(0,i.tZ)(l.H.Error,{label:W.getInputProps("question2").error}),children:(0,i.BX)(u.k,{gap:"lg",children:[(0,i.tZ)(o.R,{size:"sm",value:"1",label:(0,i.tZ)(l.H.OptionLabel,{children:q({id:"bmi.answer.yes",defaultMessage:"Yes"})})}),(0,i.tZ)(o.R,{size:"sm",value:"0",label:(0,i.tZ)(l.H.OptionLabel,{children:q({id:"bmi.answer.no",defaultMessage:"No"})})})]})})}),(0,i.tZ)(l.H.Col,{children:(0,i.tZ)(c.x,{className:H("bmi-newsletter"),sx:{justifyContent:"space-between",alignItems:"center"},children:(0,i.tZ)(l.N,{...W.getInputProps("newsletter",{type:"checkbox"}),size:"sm"})})})]})}),(0,i.tZ)(c.x,{className:z.actions,children:(0,i.tZ)(d.B,{loading:A,size:"md",type:"submit",color:"blue",className:H("bmi-btn bmi--btn-submit",z.btn),"data-event-category":"Health Tool","data-event-action":"BMI","data-event-label":O,children:q({id:"bmi.submit",defaultMessage:"Calculate"})})})]})})})}},HgWy:function(e,t,a){a.d(t,{M:function(){return BmiIllustrator}});var i,r,l=a("BGKE"),n=a("q1tI"),o=a("wp0n"),d=a("8vDj"),s=a("Eso5"),c=a("SPK5"),u=a("0D4Z"),h=a("OAL+"),g=a("TSYQ"),p=a.n(g),m=a("dDsW"),v=a("OWiU"),b=a("raAP"),f=a("hXNO"),y=a("rBCA"),x=a("iBNF"),w=a("uuQu");let Z=(0,y.Z)("div",{target:"e1k664qp0"})("&.bmi{color:",null===(i=x.r.colors)||void 0===i?void 0:i.white,";}&.milestone{color:",null===(r=x.r.colors)||void 0===r?void 0:r.gray400,";}"),C=(0,y.Z)("img",{target:"e1k664qp2"})("width:auto;height:100%;object-fit:contain;"),k=(0,y.Z)("div",{target:"e1k664qp3"})("height:100%;flex:1;"),M=(0,y.Z)("div",{target:"e1k664qp4"})("display:flex;min-width:20%;height:100%;flex-direction:column;text-align:center;&.mobile{display:none;}&.active{cursor:pointer;}",w.M.mbDown,"{min-width:108px;&.mobile{display:block;}}"),I=(0,y.Z)("div",{target:"e1k664qp5"})("display:flex;&::-webkit-scrollbar{width:5px;height:5px;}&::-webkit-scrollbar-track{background-color:transparent;}&::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,0.2);border-radius:5px;transition:0.25s linear all;}"),B=(0,y.Z)("div",{target:"e1k664qp6"})("position:absolute;top:0;left:0;width:56px;padding:0 5px;background-color:",e=>e["data-color"],";border-radius:4px;opacity:0;text-align:center;transform:translateX(-15px);transition:0.5s ease-out all;&:before{position:absolute;top:100%;left:15px;width:5px;height:5px;background-color:",e=>e["data-color"],";content:'';transform:translate(-50%,-50%) rotate(45deg);transform-origin:center;}&.active{width:auto;white-space:nowrap;left:min(",e=>{let{left:t}=e;return t},",calc(100% - 41px));opacity:1;}",w.M.mbDown,"{width:50px;&.active{left:min(",e=>{let{left:t}=e;return t},",calc(100% - 35px));}}");x.r.colors.neutral100;let T=(0,y.Z)("div",{target:"e1k664qp8"})("width:100%;height:10px;background-color:",e=>{let{bgColor:t}=e;return t},";"),L=(0,y.Z)("div",{target:"e1k664qp9"})("flex:0 0 ",e=>{let{flexWidth:t}=e;return t},";&:nth-child(2){",T,"{border-radius:16px 0 0 16px;}}&:last-child{",T,"{border-radius:0 16px 16px 0;}}"),A=(0,y.Z)("div",{target:"e1k664qp10"})("position:relative;display:flex;width:100%;padding-top:35px;",w.M.tdDown,"{padding-top:40px;}"),P=(0,y.Z)("div",{target:"e1k664qp11"})();var N=(0,a("/npG").k)(e=>({root:{display:"flex",alignItems:"center"},illus:{width:174,flexShrink:0,display:"flex",justifyContent:"center",[e.fn.smallerThan("sm")]:{display:"none"}},body:{display:"flex",flexDirection:"column",gap:16,width:"100%",[e.fn.smallerThan("sm")]:{overflow:"hidden"},[e.fn.largerThan("sm")]:{paddingBottom:10,gap:24}},info:{display:"flex",flexDirection:"column",gap:8},title:{[e.fn.smallerThan("sm")]:{textAlign:"center"}}}));let BmiIllustrator=e=>{let{bmi:t,conditions:a,activePercent:i,isDisabledRange:r,isDisabledIlluRange:g,activeCond:y,styles:x,className:w,classNames:S,loading:E,...z}=e,{classes:H,cx:F}=N(void 0,{name:"BmiIllustrator"}),{formatMessage:R}=(0,m.Z)(),V=(0,d.rZ)(),q=(0,f.d)(),_=(0,b.U)(),D=(0,n.useRef)(null),X=(0,n.useRef)(null),W=(0,n.useMemo)(()=>null==y?void 0:y.color,[y]);return(0,n.useEffect)(()=>{requestAnimationFrame(()=>{var e,t;null===(t=D.current)||void 0===t||null===(e=t.querySelector(".bmi-illustrator--item.active"))||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})})},[]),(0,n.useEffect)(()=>{function setLeftForRangeNumber(){if(X.current){let e=window.scrollY,t=window.innerHeight;e+t/2>=X.current.scrollTop?X.current.classList.add("active"):window.removeEventListener("scroll",setLeftForRangeNumber)}}return setLeftForRangeNumber(),window.addEventListener("scroll",setLeftForRangeNumber,{passive:!0}),()=>window.removeEventListener("scroll",setLeftForRangeNumber)},[]),(0,l.BX)(s.x,{className:F(w,H.root),...z,children:[(0,l.tZ)(s.x,{className:H.illus,children:(0,l.tZ)(I,{ref:D,className:"bmi-illustrator",children:E?(0,l.tZ)(M,{children:(0,l.tZ)(k,{children:(0,l.tZ)(C,{src:"/images/bmi-healthy-male-inactive.svg"})})}):a.map(e=>e.isActive?(0,l.tZ)(M,{className:p()("bmi-illustrator--item",{active:e.isActive},e.isActive?"pointer-event-child-none":""),...e.isActive&&{"data-event-category":"Health Tool","data-event-action":"Illustrator Click","data-event-label":_,onClick:()=>(0,v.rE)({hash:"result-panel",isMobile:q})},children:(0,l.tZ)(k,{children:(0,l.tZ)(C,{src:e.image})})},e.value):null)})}),(0,l.BX)(s.x,{className:H.body,children:[(0,l.BX)(s.x,{className:H.info,children:[E?(0,l.tZ)(c.k,{justify:"center",children:(0,l.tZ)(u.O,{height:39,width:"70%"})}):(0,l.tZ)(o.T,{size:"h2",as:"h1",className:H.title,children:(0,l.tZ)("span",{dangerouslySetInnerHTML:{__html:R({id:"bmi.result.title.embedded",defaultMessage:"Your BMI is {BMI}"},{BMI:'').concat(t,"")})}})}),E?(0,l.BX)(h.K,{sx:{width:"100%"},spacing:8,children:[(0,l.tZ)(u.O,{height:18,width:"100%"}),(0,l.tZ)(u.O,{height:18,width:"100%"}),(0,l.tZ)(u.O,{height:18,width:"100%"}),(0,l.tZ)(u.O,{height:18,width:"30%"})]}):(0,l.tZ)(o.T,{size:"p4",children:R({id:"bmiPage.resultDesc"},{type:null==y?void 0:y.title})})]}),!r&&!g&&!E&&(0,l.tZ)(P,{children:(0,l.BX)(A,{children:[(0,l.tZ)(B,{ref:X,left:"".concat(i,"%"),"data-color":W,children:(0,l.tZ)(Z,{className:"bmi",children:(0,l.tZ)(o.T,{size:"s4",color:"#fff",children:null==y?void 0:y.title})})}),a.map((e,t)=>(0,l.tZ)(L,{flexWidth:"".concat(e.percent,"%"),children:(0,l.tZ)(T,{bgColor:e.color})},t))]})})]})]})}},Bd17:function(e,t,a){a.d(t,{v:function(){return BmrForm}});var i=a("BGKE"),r=a("q1tI"),l=a("C8b5"),n=a("ZLal"),o=a("fdQd"),d=a("8wjV"),s=a("eosF"),c=a("Eso5"),u=a("mYVa"),h=a("cChf"),g=a("Tabs"),p=a("Wgwc"),m=a.n(p),v=a("dDsW"),b=a("w99c"),f=a("YFSc"),y=a("F8ib"),x=a("raAP"),w=a("hXNO"),Z=a("P5LW"),C=a("rIrU"),k=a("8vdq"),M=a("o0qI"),I=a("9O6x"),B=a("q0An"),T=a("vAgI"),L=a("rEaw");function convertKgToLbs(e){return e/.45359237}let A={minAge:18,maxAge:100,minHeight:1,maxHeight:300,minWeight:1,maxWeight:500,heightConvert:e=>e,weightConvert:e=>e},P={[L.MV.PhilippinesEnglish]:A,[L.MV.India]:A,[L.MV.Indonesia]:A,[L.MV.Cambodia]:A,[L.MV.Malaysia]:A,[L.MV.Myanmar]:{...A,minHeight:.03280839895013123,maxHeight:9.84251968503937,minWeight:convertKgToLbs(1),maxWeight:convertKgToLbs(500),heightConvert:function(e){return 30.48*e},weightConvert:function(e){return .45359237*e}},[L.MV.Thailand]:A,[L.MV.PhilippinesTagalog]:A,[L.MV.Vietnam]:A,[L.MV.Taiwan]:A,[L.MV.Singapore]:A},getBmr=async e=>await (0,T.ZD)(e).then(e=>{var t,a;return(null==e?void 0:null===(a=e.data)||void 0===a?void 0:null===(t=a.bmr)||void 0===t?void 0:t.bmr)||0}),generateSchema=(e,t)=>B.Ry().shape({gender:B.Z_().required(e({id:"tools.genderInput.error",defaultMessage:"Please select gender"})),birthday:B.hT().required(e({id:"bmi.ageInput.error",defaultMessage:"Please enter a valid age"})),height:B.Rx().typeError(e({id:"bmi.heightInput.error",defaultMessage:"Please enter a valid height"})).required(e({id:"bmi.heightInput.error",defaultMessage:"Please enter a valid height"})).min(P[t].minHeight,e({id:"bmi.heightInput.error",defaultMessage:"Please enter a valid height"})).max(P[t].maxHeight,e({id:"bmi.heightInput.error",defaultMessage:"Please enter a valid height"})),weight:B.Rx().typeError(e({id:"bmi.weightInput.error",defaultMessage:"Please enter a valid weight"})).required(e({id:"bmi.weightInput.error",defaultMessage:"Please enter a valid weight"})).min(P[t].minWeight,e({id:"bmi.weightInput.error",defaultMessage:"Please enter a valid weight"})).max(P[t].maxWeight,e({id:"bmi.weightInput.error",defaultMessage:"Please enter a valid weight"}))}),generateBmrRules=e=>{let{f:t,locale:a}=e;return{gender:{label:t({id:"bmi.selectGender",defaultMessage:"What is your gender?"})},age:{label:t({id:"bmi.ageInput",defaultMessage:"How old are you?"})+" "+t({id:"bmi.ageInput.desc",defaultMessage:"(years)"}),rule:{required:t({id:"bmi.ageInput.error",defaultMessage:"Please enter a valid age"}),min:{value:P[a].minAge,message:t({id:"bmi.ageInput.error",defaultMessage:"Please enter a valid age"})},max:{value:P[a].maxAge,message:t({id:"bmi.ageInput.error",defaultMessage:"Please enter a valid age"})}}},height:{label:t({id:"bmi.heightInput",defaultMessage:"How tall are you?"}),rule:{required:t({id:"bmi.heightInput.error",defaultMessage:"Please enter a valid height"}),min:{value:P[a].minHeight,message:t({id:"bmi.heightInput.error",defaultMessage:"Please enter a valid height"})},max:{value:P[a].maxHeight,message:t({id:"bmi.heightInput.error",defaultMessage:"Please enter a valid height"})}}},weight:{label:t({id:"bmi.weightInput",defaultMessage:"How much do you weight?"}),rule:{required:t({id:"bmi.weightInput.error",defaultMessage:"Please enter a valid weight"}),min:{value:P[a].minWeight,message:t({id:"bmi.weightInput.error",defaultMessage:"Please enter a valid weight"})},max:{value:P[a].maxWeight,message:t({id:"bmi.weightInput.error",defaultMessage:"Please enter a valid weight"})}}},objective:{label:t({id:"bmi.objective",defaultMessage:"Objectives"})},bmr:{label:""},isCheckYourself:{label:""},activityLevel:{label:t({id:"bmr.selectActivityLevel"})}}};var N=(0,a("/npG").k)(e=>({root:{},form:{},actions:{},btn:{minWidth:220,[e.fn.smallerThan("sm")]:{width:"100%"}}}));let BmrForm=e=>{var t,a,p,B;let{onSubmit:T,loading:L,className:A,classNames:S,styles:E,...z}=e,{classes:H,cx:F}=N(void 0,{name:"BmrForm",styles:E,classNames:S}),{state:{userInfo:R,isLoggedIn:V}}=(0,r.useContext)(M.I),{locale:q}=(0,Z.h)(),{formatMessage:_}=(0,v.Z)(),{isCheckYourself:D,setIsCheckYourself:X,checkAvailableGenderOpt:W}=(0,y.K)(),O=(0,h.c)({validate:(0,g.X)(generateSchema(_,q)),initialValues:{height:"",weight:"",age:"",gender:""}}),U=(0,x.U)(),K=generateBmrRules({f:_,locale:q}),G=P[q],j=(0,w.d)(),onValid=async e=>{let t=G.heightConvert(Number(e.height)),a=G.weightConvert(Number(e.weight)),{age:i="",activityLevel:r=k.p1.LOW_INTENSITY,gender:l}=e,n={gender:e.gender,age:e.age,height:t.toString(),weight:a.toString(),activityLevel:e.activityLevel,bmr:await getBmr({height:t,weight:a,age:i,gender:l,activityLevel:r}),isCheckYourself:D};null==T||T(n)};return(0,r.useEffect)(()=>{D?((null==R?void 0:R.gender)!==-1&&O.setFieldValue("gender",(0,I.Ko)((null==R?void 0:R.gender)||0)),(null==R?void 0:R.height)&&O.setFieldValue("height",null==R?void 0:R.height),(null==R?void 0:R.weight)&&O.setFieldValue("weight",null==R?void 0:R.weight),O.setFieldValue("activityLevel",(null==R?void 0:R.activity_level)||k.p1.LOW_INTENSITY),(null==R?void 0:R.birthday)&&(O.setFieldValue("birthday",m()(null==R?void 0:R.birthday,C.yJ).toDate()),O.setFieldValue("age",String(m()().diff(m()(null==R?void 0:R.birthday,C.yJ),"year"))))):O.reset()},[D,R]),(0,r.useEffect)(()=>{V&&X(!0)},[V]),(0,i.tZ)(n.T,{variant:n.C.LEADGEN,children:(0,i.tZ)(c.x,{...z,className:F(A,H.root),children:(0,i.BX)("form",{className:H.form,onSubmit:O.onSubmit(onValid),children:[(0,i.tZ)(l.H,{isMobile:j,children:(0,i.BX)(l.H.Row,{children:[(0,i.BX)(l.H.Col,{children:[(0,i.tZ)(b.u,{...O.getInputProps("birthday"),LabelWrapper:l.H.Label,disableSSOAge:!D,onChange:e=>{O.setFieldValue("age",String(m()().diff(e,"year"))),O.setFieldValue("birthday",e)},error:void 0}),O.getInputProps("birthday").error&&(0,i.tZ)(l.H.Error,{label:O.getInputProps("birthday").error})]}),V&&(0,i.tZ)(l.H.Col,{children:(0,i.tZ)(f.X,{checked:D,onChange:e=>X(e.currentTarget.checked)})}),(0,i.BX)(l.H.Col,{children:[(0,i.tZ)(l.H.GenderControl,{label:null===(t=K.gender)||void 0===t?void 0:t.label,LabelWrapper:l.H.Label,availableValue:W(O.getInputProps("gender").value),...O.getInputProps("gender"),error:void 0,styles:{wrapper:{gap:12}}}),O.getInputProps("gender").error&&(0,i.tZ)(l.H.Error,{label:O.getInputProps("gender").error})]}),(0,i.tZ)(l.H.Col,{children:(0,i.tZ)(l.H.InputNumber,{label:(0,i.tZ)(l.H.Label,{children:null===(a=K.height)||void 0===a?void 0:a.label}),placeholder:_({id:"tools.inputPlaceholder"},{content:q===s.L.Myanmar?6:170}),name:"height",...O.getInputProps("height"),value:O.getInputProps("height").value?Number(O.getInputProps("height").value):"",min:0,precision:1,inputMode:"decimal",rightSection:_({id:"bmi.heightInput.desc",defaultMessage:"(cm)"}),rightSectionWidth:60})}),(0,i.tZ)(l.H.Col,{children:(0,i.tZ)(l.H.InputNumber,{label:(0,i.tZ)(l.H.Label,{children:null===(p=K.weight)||void 0===p?void 0:p.label}),name:"weight",...O.getInputProps("weight"),value:O.getInputProps("weight").value?Number(O.getInputProps("weight").value):"",placeholder:_({id:"tools.inputPlaceholder"},{content:q===s.L.Myanmar?130:60}),precision:1,inputMode:"decimal",min:0,rightSection:_({id:"bmi.weightInput.desc",defaultMessage:"(kg)"}),rightSectionWidth:60})}),(0,i.tZ)(l.H.Col,{sx:{".mantine-Select-item":{fontSize:(0,u.h)(15),wordBreak:"normal"},".mantine-MantineSelect-input::placeholder":{fontSize:(0,u.h)(15)}},children:(0,i.tZ)(o.S,{label:(0,i.tZ)(l.H.Label,{children:null===(B=K.activityLevel)||void 0===B?void 0:B.label}),data:(0,k.qC)(_),placeholder:_({id:"common.placeholder"}),...O.getInputProps("activityLevel")})})]})}),(0,i.tZ)(c.x,{className:H.actions,children:(0,i.tZ)(d.B,{loading:L,size:"md",type:"submit",className:F("bmi-btn bmi--btn-submit",H.btn),"data-event-category":"Health Tool","data-event-action":"BMR","data-event-label":U,children:_({id:"bmi.submit",defaultMessage:"Calculate"})})})]})})})}},wnYK:function(e,t,a){a.d(t,{f:function(){return Calendar}});var i=a("BGKE"),r=a("q1tI"),l=a("dndX"),n=a("9/EM"),o=a("aetl"),d=a("9ig3"),s=a("1unF"),c=a("/Eym"),u=a("phiu"),h=a("r4sE"),g=a("dLU1"),p=a("OuL/"),m=a("1i5A"),v=a("YTra"),b=a("TjGc"),f=a("HZtn"),y=a("a4op"),x=a("hXNO"),w=a("rBCA"),Z=a("iBNF"),C=a("uuQu");let k=(0,w.Z)("div",{target:"e1szvkax0"})("text-align:center;position:relative;&[data-toaster-visible='true'][data-cal-mode='yearly']{padding-bottom:88px;}"),M=(0,w.Z)("div",{target:"e1szvkax1"})("position:relative;padding:16px 0;& + div::before{content:'';position:absolute;background-color:",Z.r.colors.neutral100,";[data-cal-mode='monthly'] &{width:1px;top:24px;bottom:24px;left:0;}[data-cal-mode='yearly'] &{height:1px;top:0;left:16px;right:16px;}}[data-cal-mode='monthly'] &{flex:1;padding-bottom:0;}"),I=(0,w.Z)("div",{target:"e1szvkax2"})("display:flex;"),B=(0,w.Z)("div",{target:"e1szvkax3"})("font-size:20px;font-weight:700;"),T=(0,w.Z)("div",{target:"e1szvkax4"})("margin:0 auto;[data-cal-mode='monthly'] &{padding:24px;}"),L=(0,w.Z)("div",{target:"e1szvkax5"})("display:grid;grid-template-columns:repeat(7,1fr);[data-cal-mode='weekly'] &{padding:0 32px;}padding:0 28px;"),A=(0,w.Z)(L,{target:"e1szvkax6"})("background-color:white;height:46px;border-radius:0px 0px 6px 6px;position:sticky;top:0;left:0;right:0;z-index:10;"),P=(0,w.Z)(L,{target:"e1szvkax7"})(),N=(0,w.Z)("div",{target:"e1szvkax8"})("font-size:12px;display:flex;justify-content:center;align-items:center;color:",Z.r.colors.gray400,";"),S=(0,w.Z)("div",{target:"e1szvkax9"})("position:relative;display:flex;justify-content:center;align-items:center;margin-top:8px;",C.M.mbDown,"{height:36px;}",C.M.mbUp,"{height:40px;}&[data-is-range='true']::before{content:'';position:absolute;top:0;bottom:0;left:0;right:0;background-color:",e=>{var t;return(null===(t=e.range)||void 0===t?void 0:t.backgroundColor)||"rgba(0,0,0,0.1)"},";z-index:0;}&[data-is-range-first='true']::before{border-radius:40px 0 0 40px;left:calc(50% - 20px);",C.M.mbUp,"{[data-cal-mode='monthly'] &{left:0;}}}&[data-is-range-last='true']::before{border-radius:0 40px 40px 0;right:calc(50% - 20px);",C.M.mbUp,"{[data-cal-mode='monthly'] &{right:0;}}}&[data-is-today='true'][data-is-range='true']::before{",C.M.mbUp,"{[data-cal-mode='monthly'] &{right:0;}}}&[data-is-today='true'][data-is-selected='false'] > div::before{content:'';width:9px;height:9px;border-radius:",Z.r.borderRadius,";border:1px solid ",Z.r.colors.white,";position:absolute;background-color:",e=>{var t;return(null===(t=e.range)||void 0===t?void 0:t.color)||Z.r.colors.primaryBase},";left:0;right:0;bottom:0;margin-left:auto;margin-right:auto;/* z-index:20;*/}&[data-is-today='true'][data-is-selected='true'] > div{color:white;background-color:",e=>{var t;return(null===(t=e.range)||void 0===t?void 0:t.color)||Z.r.colors.violet800},";}",e=>e.range&&"color: ".concat(e.range.color,";")),E=(0,w.Z)("div",{target:"e1szvkax10"})("position:relative;",C.M.mbDown,"{width:32px;height:32px;}",C.M.mbUp,"{width:36px;height:36px;}display:flex;justify-content:center;align-items:center;cursor:pointer;line-height:1;[data-is-today='true'] &{font-weight:",Z.r.sizes.fwBold,";}[data-is-selected='true'] &{border:1px solid ",Z.r.colors.neutral500,";border-radius:32px;}[data-is-selected='true'][data-is-today='true'] &{border-color:transparent;}"),z=(0,w.Z)("img",{target:"e1szvkax11"})("position:absolute;width:20px;height:20px;object-fit:contain;z-index:11;top:16px;cursor:pointer;",C.M.mbUp,"{width:16px;height:16px;}[data-cal-mode='monthly'] &{width:24px;height:24px;border-radius:12px;padding:0;}&.cal-nav-prev{left:16px;}&.cal-nav-next{right:16px;transform:rotateZ(180deg);}"),H=(0,w.Z)("div",{target:"e1szvkax12"})("position:absolute;width:85%;height:85%;border-radius:50%;border:1px dashed;"),F=(0,w.Z)("div",{target:"e1szvkax13"})("position:absolute;z-index:10;top:37px;left:0;box-shadow:0px 16px 24px rgba(0,0,0,0.06),0px 2px 8px rgba(0,0,0,0.04),0px 0px 1px rgba(0,0,0,0.04);border-radius:",Z.r.borderRadius,";background-color:white;padding:8px 8px 8px 32px;p{white-space:nowrap;}&:hover{display:none;}"),R=(0,w.Z)("div",{target:"e1szvkax14"})("position:absolute;top:12px;left:8px;"),V=(0,w.Z)("div",{target:"e1szvkax15"})("text-align:left;p .rate.highlighted{color:",Z.r.colors.primaryBase,";/* font-weight:700;*/}"),q=(0,w.Z)("div",{target:"e1szvkax16"})("position:fixed;bottom:0;left:-16px;right:-16px;height:88px;padding:16px 56px;box-shadow:0px 8px 40px rgba(0,0,0,0.1);background-color:white;"),_=(0,w.Z)("div",{target:"e1szvkax17"})("position:absolute;left:30px;top:18px;"),D=(0,w.Z)("img",{target:"e1szvkax18"})("position:absolute;top:16px;right:32px;width:24px;height:24px;cursor:pointer;");function Calendar(e){let{mode:t,start:a=new Date,selected:w=null,onChangeStart:Z,onChangeSelected:C,ranges:L=[],markers:X=[],className:W,renderTooltip:O,from:U}=e,{localize:K}=(0,y.k)(),G=(0,x.d)(),[j,Y]=(0,r.useState)(()=>"yearly"===t&&!!O),[Q,J]=(0,r.useState)(null);(0,r.useEffect)(()=>{w&&U&&(0,l.Z)(w,U)&&(C&&C(U),Z&&Z(U))},[w,U]);let $=(0,r.useMemo)(()=>K?[1,2,3,4,5,6,0].map(e=>K.day(e,{width:"narrow"})):[],[K]),ee=(0,r.useMemo)(()=>"weekly"===t?(0,n.Z)((0,o.Z)(a),1):"monthly"===t?(0,d.Z)(a):(0,s.Z)(a),[a,t]);function renderWeekDays(){return(0,i.tZ)(A,{children:$.map((e,t)=>(0,i.tZ)(N,{children:e},"".concat(e,"-").concat(t)))})}function renderMonth(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ee.getFullYear();if(!K)return null;let r=(0,p.Z)(new Date(a,e)),l=[];for(let t=1;t<=r;t++)l.push(new Date(a,e,t));let n=l[0]?l[0].getDay():0;if(1!==n){let e=0===n?6:n-1;for(let t=0;t(0,v.Z)(e,{start:t.startDate,end:t.endDate})),d=(0,b.Z)(e),s=null!=o&&!!o.startDate&&(0,m.Z)(e,o.startDate),c=null!=o&&!!o.endDate&&(0,m.Z)(e,o.endDate),u=X.find(t=>(0,m.Z)(t.date,e)),h=!!Q&&(0,m.Z)(e,Q);return(0,i.tZ)(S,{"data-is-today":d,"data-is-past":!d&&(0,f.Z)(e),"data-is-selected":n,"data-is-range":!!o,"data-is-range-first":s,"data-is-range-last":c,range:o,onMouseEnter:()=>{U&&(0,l.Z)(e,U)||J(e)},onMouseLeave:()=>J(null),children:(0,i.BX)(E,{onClick:()=>{!(U&&(0,l.Z)(e,U))&&(j||Y(!0),C&&C(e))},children:[r,!!u&&(0,i.tZ)(H,{color:d&&n?"white":u&&u.color}),(0,i.tZ)("div",{children:"monthly"===t&&O&&h&&(0,i.BX)(F,{children:[(0,i.tZ)(R,{children:renderInfoIcon()}),(0,i.tZ)(V,{children:O(e)})]})})]})},r)}function renderInfoIcon(){return(0,i.tZ)("img",{loading:"lazy",src:"/svg/info-light.svg",alt:""})}return(0,i.BX)(k,{className:W,"data-cal-mode":t,"data-toaster-visible":j,children:["yearly"===t&&renderWeekDays(),("weekly"===t||"monthly"===t)&&(0,i.BX)(i.HY,{children:[(0,i.tZ)(z,{className:"cal-nav-prev",src:G?"/svg/chevron-left-gray.svg":"/svg/long-gray-left-arrow.svg",width:16,height:16,onClick:function(){Z&&("weekly"===t?Z((0,c.Z)(ee,1)):"monthly"===t&&Z((0,u.Z)(ee,1)))}}),(0,i.tZ)(z,{className:"cal-nav-next",src:G?"/svg/chevron-left-gray.svg":"/svg/long-gray-left-arrow.svg",width:16,height:16,onClick:function(){Z&&("weekly"===t?Z((0,h.Z)(ee,1)):"monthly"===t&&Z((0,g.Z)(ee,1)))}})]}),"weekly"===t&&function(){let e=[];if("weekly"===t)for(let t=0;t<7;t++)e.push((0,n.Z)(ee,t));return(0,i.BX)(T,{children:[renderWeekDays(),(0,i.tZ)(P,{children:e.map(renderDay)})]})}(),"yearly"===t&&Array(12).fill(void 0).map((e,t)=>renderMonth(t)),"monthly"===t&&function(){let e=(0,g.Z)(ee,1);return(0,i.BX)(I,{children:[renderMonth(ee.getMonth(),ee.getFullYear()),renderMonth(e.getMonth(),e.getFullYear())]})}(),(0,i.tZ)("div",{children:"yearly"===t&&O&&w&&j&&(0,i.BX)(q,{children:[(0,i.tZ)(_,{children:renderInfoIcon()}),(0,i.tZ)(V,{children:O(w)}),(0,i.tZ)(D,{src:"/images/close.svg",onClick:()=>Y(!1)})]})})]})}}}]);