"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4125],{ELtV:function(e,t,a){a.d(t,{H:function(){return HealthToolCardWrapper},T:function(){return ToolsBannerCard}});var n=a("T/vS"),l=a("q1tI"),r=a("/npG"),o=a("mYVa"),i=a("8vDj"),s=a("Eso5"),c=a("SPK5"),d=a("vaps"),m=a("CmQM"),p=a("UlxI"),u=a("dDw1"),g=a("HC5J"),h=a("Z+18"),b=a("un+D"),v=a("cHPQ");let f=(0,r.k)((e,{isRevamp:t,isPregTool:a,bannerColor:n,isMarryBaby:l})=>({wrapper:{position:"relative",width:"100%",height:"100%",display:"flex",gap:(0,o.h)(24),alignItems:"center",justifyContent:"space-between",padding:(0,o.h)(16),[e.fn.smallerThan("sm")]:{gap:(0,o.h)(12)}},container:{width:"100%",backgroundColor:n||(l?e.colors.mb[1]:a?e.colors.pink[1]:e.colors.blue[1]),position:"relative",display:"flex",gap:24,alignItems:"center",justifyContent:"space-between",padding:(0,o.h)(16),[e.fn.smallerThan("sm")]:{padding:`${(0,o.h)(12)} ${(0,o.h)(16)}`},a:{textDecoration:"none",color:"inherit"},'&[data-site="marryBaby"]':{a:{textDecoration:"underline"},[b.M.mbDown]:{paddingBottom:0}},[b.M.tdDown]:{height:"auto",".hhgcomp-toolbanner-wrapper":{".hhgcomp-toolbanner-inner":{display:"flex",alignItems:"center",[b.M.mbDown]:{justifyContent:"space-between"},".hhgcomp-toolbanner-iconcontainer":{position:"relative",right:(0,o.h)(-50),bottom:(0,o.h)(-20),width:(0,o.h)(110),minWidth:0,height:"auto",minHeight:0,alignSelf:"flex-end",marginBottom:(0,o.h)(-20),[b.M.mbDown]:{right:"unset"}}}}},".embedded-review":{gap:(0,o.h)(12),display:"flex",alignItems:"center"},".embedded-review__avatar":{position:"relative",minWidth:(0,o.h)(32),img:{width:(0,o.h)(32),height:(0,o.h)(32),display:"block",borderRadius:"100%"},svg:{bottom:0,right:0,position:"absolute"}}},headingWrapper:{display:"flex",flexDirection:"column",gap:t?(0,o.h)(8):0,[e.fn.smallerThan("sm")]:{gap:4}},avatarWrapper:{position:"relative",img:{maxWidth:(0,o.h)(48),maxHeight:(0,o.h)(48)},".embedded-review__avatar":{position:"relative"}},reviewText:{a:{textDecoration:"underline",textUnderlineOffset:"2px"}},iconWrapper:{display:"flex",justifyContent:"center",alignItems:"center",width:(0,o.h)(80),height:(0,o.h)(80),borderRadius:"50%",backgroundColor:"#fff",flexShrink:0,img:{maxWidth:(0,o.h)(48),maxHeight:(0,o.h)(48)},[e.fn.smallerThan("sm")]:{width:(0,o.h)(64),height:(0,o.h)(64),img:{maxWidth:(0,o.h)(40),maxHeight:(0,o.h)(40)}}},heading:{},disclaimerIcon:{flexShrink:0}})),ToolsBannerCard=e=>{var{className:t,classNames:a,heading:r,bannerColor:o,medicalReview:d={link:"#",reviewer:"",date:""},icon:g,style:b,isPregTool:v,isRevamp:E,disclaimer:x,styles:y}=e,w=(0,n.a)(e,["className","classNames","heading","bannerColor","medicalReview","icon","style","isPregTool","isRevamp","disclaimer","styles"]);let{t:C}=(0,h.u)(),k=(0,i.rZ)(),S="mb"===k.other.template,N=S?"marryBaby":"helloSites",{classes:T,cx:P}=f({isRevamp:E,isPregTool:v,bannerColor:o,isMarryBaby:S},{name:"ToolsBannerCard",styles:y,classNames:a}),z=(null==d?void 0:d.reviewer)?l.createElement(u.T,{size:"label2",as:"div",className:T.reviewText},d.avatar&&l.createElement("div",{className:"embedded-review__avatar"},l.createElement(s.x,{className:T.avatarWrapper},l.createElement("img",{src:d.avatar,alt:d.reviewer,loading:"lazy"}),l.createElement(p.Z,{size:14}))),l.createElement("div",{dangerouslySetInnerHTML:{__html:C("toolPage.toolReviewer",{expert_name:`${d.reviewer.trim()}`,date:d.date})}})):null;return l.createElement(s.x,Object.assign({className:P(t,T.container),style:b,"data-site":N},w),l.createElement(c.k,{className:T.headingWrapper},l.createElement(u.T,{className:P(T.heading,"heading"),size:"h4",as:"h2"},r),z&&l.createElement(u.T,{size:"n1"},z),x&&l.createElement(c.k,{gap:4},l.createElement(m.Z,{size:16,color:k.colors.yellow[8],className:T.disclaimerIcon}),l.createElement(u.T,{size:"c1",variant:"secondary"},x))),l.createElement(c.k,{className:T.iconWrapper},g))};var E=(0,r.k)(()=>({root:{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}})),x=(0,r.k)(e=>({root:{paddingTop:16,borderRadius:"inherit",[e.fn.smallerThan("sm")]:{paddingTop:8}}})),y=(0,r.k)((e,{isPregTool:t,variant:a})=>{let n="mb"===e.other.template;return{root:Object.assign(Object.assign(Object.assign({display:"flex",flexDirection:"column",borderRadius:(0,o.h)(n?16:8)},"default"===a&&{backgroundColor:"#fff",border:`1px solid ${n?e.colors.mb[2]:t?e.colors.pink[1]:e.colors.blue[2]}`}),"gray"===a&&{backgroundColor:e.colors.neutral[0]}),"violet"===a&&{backgroundColor:e.colors.violet[0]}),submitBtn:{},bodyWrapper:{},scrollAreaWrapper:{},bannerWrapper:Object.assign(Object.assign({},"gray"===a&&{backgroundColor:"transparent",padding:`${(0,o.h)(16)} ${(0,o.h)(16)} 0`}),"violet"===a&&{backgroundColor:"transparent",padding:`${(0,o.h)(16)} ${(0,o.h)(16)} 0`}),bannerHeading:Object.assign({},("gray"===a||"violet"===a)&&{fontSize:(0,o.h)(20),lineHeight:(0,o.h)(28),fontWeight:g.F.semiBold,[e.fn.smallerThan("sm")]:{fontSize:(0,o.h)(17),lineHeight:(0,o.h)(24)}}),bannerReviewText:Object.assign({},("gray"===a||"violet"===a)&&{fontSize:(0,o.h)(14),lineHeight:(0,o.h)(22),[e.fn.smallerThan("sm")]:{fontSize:(0,o.h)(12),lineHeight:(0,o.h)(18)}}),submitWrapper:Object.assign(Object.assign({[e.fn.smallerThan("sm")]:{button:{width:"100%"}},[e.fn.largerThan("sm")]:{textAlign:"right"}},"gray"===a&&{backgroundColor:e.colors.neutral[0],button:{marginTop:10}}),"violet"===a&&{backgroundColor:e.colors.violet[0],button:{marginTop:10}}),newsletterBlock:Object.assign(Object.assign({},"gray"===a&&{backgroundColor:e.colors.neutral[0]}),"violet"===a&&{backgroundColor:e.colors.violet[0]})}});let HealthToolCardWrapper=e=>{var{children:t,styles:a,classNames:r,className:o,isPregTool:i,variant:c="default",hasBodyScroll:d}=e,m=(0,n.a)(e,["children","styles","classNames","className","isPregTool","variant","hasBodyScroll"]);let{classes:p,cx:u}=y({isPregTool:i,variant:c},{name:"HealthToolCardWrapper",styles:a,classNames:r});return l.createElement(g.T,{variant:g.C.LEADGEN},l.createElement(v.C.Provider,{value:{isPregTool:i,classes:p,variant:c,hasBodyScroll:d}},l.createElement(s.x,Object.assign({className:u(o,p.root)},m),t)))};HealthToolCardWrapper.Body=e=>{var{children:t,className:a,styles:r,classNames:o}=e,i=(0,n.a)(e,["children","className","styles","classNames"]);let{classes:c,hasBodyScroll:m}=(0,l.useContext)(v.C),{classes:p,cx:u}=x(void 0,{name:"HealthToolCardWrapper__Body",styles:r,classNames:o});return l.createElement(s.x,Object.assign({className:u(a,p.root,c.bodyWrapper)},i),m?l.createElement(d.x,{h:"100%",type:"auto",scrollbarSize:8,className:c.scrollAreaWrapper},t):t)},HealthToolCardWrapper.Banner=e=>{var{className:t,classNames:a,styles:r}=e,o=(0,n.a)(e,["className","classNames","styles"]);let{classes:i}=(0,l.useContext)(v.C),{isPregTool:s}=(0,l.useContext)(v.C),{classes:c,cx:d}=E(void 0,{name:"HealthToolCardWrapper__Banner",classNames:a,styles:r});return l.createElement(ToolsBannerCard,Object.assign({isPregTool:s,classNames:{container:i.bannerWrapper,heading:i.bannerHeading,reviewText:i.bannerReviewText},className:d(t,c.root)},o))}},"4CTk":function(e,t,a){a.d(t,{M:function(){return Modal}});var n=a("q1tI"),l=a("zyTH"),r=a("i8i4"),o=a("rBCA"),i=a("un+D"),s=a("gEnE"),c=a("iBNF");let d=(0,s.Z)(o.Z.div` position: relative; z-index: 200; background-color: ${c.r.colors.white}; border-radius: ${c.r.borderRadius}; box-shadow: 0px 8px 40px 0px #0000001a; &[data-site-type='marryBaby'] { border-radius: 16px; .hhg-modal__content { position: relative; z-index: 111; height: 100%; padding: 24px; } } .hhg-modal__content { position: relative; z-index: 111; height: 100%; padding: 16px; } .hhg-modal__video { position: relative; z-index: 111; height: 100%; background-color: none; box-shadow: none; } `,"hhgcomp-modal-modal"),m=o.Z.div` position: fixed; top: 0; left: 0; z-index: 201; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; overflow-x: hidden; overflow-y: auto; outline: 0; visibility: hidden; opacity: 0; background-color: rgba(0, 0, 0, 0.6); transition: opacity 0.3s ease-in-out; .hhg-modal__close { position: absolute; top: 16px; right: 16px; cursor: pointer; img { width: 100%; height: 100%; border-radius: 50%; } } &[data-type='video'] { z-index: 1001; } &[data-open='true'] { opacity: 1; visibility: visible; } ${d.classSelector} { transition: transform 0.3s ease-in-out; } &.slideTop { ${d.classSelector} { transform: translate(0, -100vh); } &[data-open='true'] { ${d.classSelector} { transform: translate(0); } } } &.scaleUp { ${d.classSelector} { transform: scale(0.9); } &[data-open='true'] { ${d.classSelector} { transform: scale(1); } } } &[data-type='tail'] { justify-content: flex-end; ${d.classSelector} { width: 420px; height: 100%; border-radius: 0; overflow: hidden auto; } } &[data-type='form'] { ${d.classSelector} { width: 496px; height: 548px; max-height: 100%; overflow-y: auto; ${i.M.mbDown} { width: 340px; } } } &[data-type='video'] { ${d.classSelector} { height: 100%; max-height: 539px; ${i.M.mbDown} { height: 192px; width: 100%; height: 100%; border-radius: ${c.r.borderRadius}; max-height: 192px; } } } &[data-type='confirm'] { ${d.classSelector} { width: 100%; max-width: 407px; ${i.M.mbDown} { width: calc(100% - 32px); max-width: calc(100% - 32px); } } } `,p=o.Z.div` position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; align-items: center; &[data-open='false'] { display: none; } &[data-type='video'] { background-color: ${c.r.colors.secondaryDark}; } `,u="hhg-modals",getModalsRoot=()=>{let e=document.getElementById(u);return e||((e=document.createElement("div")).setAttribute("id",u),document.body.append(e)),e},cleanUpModalShow=()=>{let e=document.querySelectorAll('.hhg-modal[data-open="true"]');e.length<1&&document.body.classList.remove("hhc-modal-show")},cleanUpDisabledScroll=()=>{let e=document.querySelectorAll('.hhg-modal[data-open="true"]');e.length<1&&(document.body.style.overflow="",document.body.style.paddingRight="",document.body.classList.remove("hhc-disabled-scroll"))},Modal=({type:e="lead",closeIcon:t,isOpen:a=!0,onClose:o,children:i,className:s="",animationType:c="scaleUp",isStaticBackdrop:u=!1,siteType:g})=>{let[h,b]=(0,n.useState)(!1),v=(0,n.useRef)(null),{width:f}=(0,l.u)();if(!v.current&&h&&(v.current=document.createElement("div")),(0,n.useEffect)(()=>(b(!0),()=>{b(!1),cleanUpModalShow(),cleanUpDisabledScroll()}),[]),(0,n.useEffect)(()=>{if(h){let e=getModalsRoot();return e.appendChild(v.current),()=>{e.removeChild(v.current)}}},[h]),(0,n.useEffect)(()=>{a?document.body.classList.add("hhc-modal-show"):cleanUpModalShow()},[a]),(0,n.useEffect)(()=>{a?(document.body.style.overflow="hidden",document.body.style.paddingRight=f+"px",document.body.classList.add("hhc-disabled-scroll")):cleanUpDisabledScroll()},[a,f]),!h)return null;let E=["hhg-modal__wrapper",s,c].filter(e=>e).join(" ");return(0,r.createPortal)(n.createElement(m,{className:E,"data-open":a,"data-type":e},!u&&n.createElement(p,{"data-open":a,onClick:o,"data-type":e}),!u&&"video"===e&&!!t&&n.createElement("div",{className:"hhg-modal__close",onClick:o},t),n.createElement(d,{className:"hhg-modal","data-open":a,"data-site-type":g},n.createElement("div",{className:"video"===e?"hhg-modal__video":"hhg-modal__content"},!!t&&"video"!==e&&n.createElement("div",{className:"hhg-modal__close",onClick:o},t),i))),v.current)}},RCJj:function(e,t,a){a.d(t,{B:function(){return BmiForm},F:function(){return FitnessToolUnitPicker},H:function(){return I},N:function(){return NewsletterCheckbox},Q:function(){return Question1Label},a:function(){return Question2Label},b:function(){return Question2Description}});var n=a("T/vS"),l=a("q1tI"),r=a("wUmw"),o=a("iAc4"),i=a("OzIV"),s=a("/npG"),c=a("SPK5"),d=a("Eso5"),m=a("8vDj"),p=a("Zo/N"),u=a("mYVa"),g=a("lSJj"),h=a("TIp3"),b=a("OAL+"),v=a("iuhU"),f=a("C/sX"),E=a("SMDy"),x=a("dDw1"),y=a("HC5J"),w=a("Z+18"),C=a("w8P6"),k=a("VAe8"),S=a("cHPQ"),N=a("pSDa"),T=a("375z"),P=a("xrdX"),z=a("mx4j");let Question1Label=e=>{var{LabelWrapper:t}=e,a=(0,n.a)(e,["LabelWrapper"]);let{t:r}=(0,w.u)(),o=t?{}:Object.assign({size:"p2"},a),i=t||x.T;return l.createElement(i,Object.assign({},o),r("bmi.question.weightLossSupport"))},Question2Label=e=>{var{LabelWrapper:t}=e,a=(0,n.a)(e,["LabelWrapper"]);let{t:r}=(0,w.u)(),o=t?{}:Object.assign({size:"p2"},a),i=t||x.T;return l.createElement(i,Object.assign({},o),r("bmi.question.glp1Awareness"))},Question2Description=e=>{var{LabelWrapper:t}=e,a=(0,n.a)(e,["LabelWrapper"]);let{t:r}=(0,w.u)(),o=t?{}:Object.assign({size:"p2"},a),i=t||x.T;return l.createElement(i,Object.assign({},o),r("bmi.question.glp1Awareness.desc"))},D=(0,l.createContext)({});var O=(0,s.k)(()=>({label:{marginTop:2,cursor:"pointer",userSelect:"none"}}));let NewsletterCheckbox=e=>{var{labelTextProps:t,checked:a,LabelWrapper:r,useCollapse:o=!0}=e,i=(0,n.a)(e,["labelTextProps","checked","LabelWrapper","useCollapse"]);let{t:s}=(0,w.u)(),[m,p]=(0,l.useState)(!o),[u,g]=(0,l.useState)(!0),[h,b]=(0,l.useState)(a),v=r?{}:Object.assign({size:"p3"},t),f=r||x.T,{classes:y}=O(void 0,{name:"NewsletterCheckbox"});return l.createElement(c.k,{gap:8,align:"flex-start"},l.createElement(E.d,Object.assign({},i,{label:void 0,size:"sm",checked:h,onChange:e=>{u?g(!1):b(e.currentTarget.checked)},styles:{labelWrapper:{display:"none"}}})),l.createElement(d.x,null,l.createElement(f,Object.assign({},v,{onClick:()=>{o&&p(e=>!e)},className:y.label,lineClamp:m?void 0:1}),s("bmi.newsletter.label"))))},FitnessToolUnitPicker=({displayValue:e,field:t,onChange:a})=>{let n=(0,m.rZ)(),r=n.colors.gray[1],o="height"===t?[{label:"cm",system:"metric"},{label:"ft",system:"imperial"}]:[{label:"kg",system:"metric"},{label:"lbs",system:"imperial"}];return l.createElement(p.v,{position:"bottom-end",withinPortal:!0,offset:0,styles:{dropdown:{backgroundColor:n.white,border:`${(0,u.h)(1)} solid ${r}`,borderRadius:12,boxShadow:"0px 0px 1px 0px #0000000A,0px 2px 8px 0px #0000000A,0px 10px 16px 0px #0000000A",padding:(0,u.h)(4),minWidth:(0,u.h)(90)},item:{fontSize:n.fontSizes.sm,lineHeight:1.4,padding:`${(0,u.h)(6)} ${(0,u.h)(10)}`,borderRadius:n.radius.xs,color:n.colors.dark[9],"&[data-hovered]":{backgroundColor:"transparent"}}}},l.createElement(p.v.Target,null,l.createElement(g.k,{type:"button",sx:e=>({height:"100%",display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%",paddingRight:e.spacing.xs,gap:4})},l.createElement(h.x,{component:"span",size:"sm",sx:{lineHeight:1}},e),l.createElement(k.C,{style:{width:18,height:18}}))),l.createElement(p.v.Dropdown,null,o.map(r=>{let o=e===r.label;return l.createElement(p.v.Item,{key:r.label,onClick:()=>a(r.system,t),sx:{backgroundColor:o?n.colors.gray[1]:void 0,"&[data-hovered]":{backgroundColor:o?n.colors.gray[1]:"transparent"}}},r.label)})))},DefaultForm=e=>{var t,a,o,i,s,m,p;let{t:u,locale:g}=(0,w.u)(),{classes:h={}}=(0,l.useContext)(S.C),{control:f,bmiGenerated:x,linkTool:y,submitProps:k,withAdditionalQuestion:N,classes:z={},enableUnitPicker:O,unitSystem:L,unitHeight:j,unitWeight:F,onUnitChange:A}=(0,l.useContext)(D),$={body:{alignItems:"center"}};return l.createElement(C.H,Object.assign({formLayout:"default"},e),l.createElement(I,{isMobile:e.isMobile,gutter:4},l.createElement(b.K,{spacing:4,px:16},l.createElement(r.Qr,{name:"gender",control:f,rules:null===(t=x.gender)||void 0===t?void 0:t.rule,render:({field:{onChange:e},fieldState:{error:t}})=>l.createElement("div",null,l.createElement(I.GenderControl,{LabelWrapper:I.Label,error:void 0,onChange:e,gap:4}),(null==t?void 0:t.message)&&l.createElement(I.Error,{label:t.message}))}),l.createElement(r.Qr,{name:"age",control:f,rules:null===(a=x.age)||void 0===a?void 0:a.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement("div",null,l.createElement(I.InputNumber,{label:l.createElement(I.Label,null,u("bmi.ageInput")),placeholder:u("tools.inputPlaceholder",{content:"25"}),name:e,value:t,onChange:a,min:0,rightSection:u("bmi.ageInput.desc"),classNames:{rightSection:z.inputRightSection}}),(null==n?void 0:n.message)&&l.createElement(I.Error,{label:n.message}))}),l.createElement(r.Qr,{name:"height",control:f,rules:null===(o=x.height)||void 0===o?void 0:o.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement("div",null,l.createElement(I.InputNumber,{label:l.createElement(I.Label,null,u("bmi.heightInput")),placeholder:u("tools.inputPlaceholder",{content:"imperial"===L?6:170}),name:e,value:t,onChange:a,min:0,precision:1,inputMode:"decimal",rightSection:O?l.createElement(FitnessToolUnitPicker,{displayValue:j,field:"height",onChange:A}):u("bmi.heightInput.desc"),rightSectionWidth:70,classNames:{rightSection:z.inputRightSection},styles:O?void 0:()=>({rightSection:{paddingRight:0}})}),(null==n?void 0:n.message)&&l.createElement(I.Error,{label:n.message}))}),l.createElement(r.Qr,{name:"weight",control:f,rules:null===(i=x.weight)||void 0===i?void 0:i.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement("div",null,l.createElement(I.InputNumber,{label:l.createElement(I.Label,null,u("bmi.weightInput")),placeholder:u("tools.inputPlaceholder",{content:"imperial"===L?130:60}),name:e,value:t,onChange:a,precision:1,inputMode:"decimal",min:0,rightSection:O?l.createElement(FitnessToolUnitPicker,{displayValue:F,field:"weight",onChange:A}):u("bmi.weightInput.desc"),rightSectionWidth:70,classNames:{rightSection:z.inputRightSection},styles:O?void 0:()=>({rightSection:{paddingRight:0}})}),(null==n?void 0:n.message)&&l.createElement(I.Error,{label:n.message}))})),N?l.createElement(l.Fragment,null,l.createElement(b.K,{spacing:4,px:16},l.createElement(r.Qr,{name:"question1",control:f,rules:null===(s=x.question1)||void 0===s?void 0:s.rule,render:({field:{value:e,onChange:t,name:a},fieldState:{error:n}})=>l.createElement("div",null,l.createElement(E.R.Group,{name:a,value:e,onChange:t,sx:{flex:1},label:l.createElement(Question1Label,{LabelWrapper:I.Label}),size:"lg"},l.createElement(c.k,{gap:"lg"},l.createElement(E.R,{size:"sm",value:"1",label:l.createElement(I.OptionLabel,null,u("switchBtn.yes")),styles:$}),l.createElement(E.R,{size:"sm",value:"0",label:l.createElement(I.OptionLabel,null,u("switchBtn.no")),styles:$}))),(null==n?void 0:n.message)&&l.createElement(I.Error,{label:n.message}))}),l.createElement(r.Qr,{name:"question2",control:f,rules:null===(m=x.question2)||void 0===m?void 0:m.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement("div",null,l.createElement(E.R.Group,{name:e,value:t,onChange:a,sx:{flex:1},label:l.createElement(Question2Label,{LabelWrapper:I.Label}),size:"lg",description:g!==T.L.Malaysia&&l.createElement(Question2Description,{LabelWrapper:I.SubLabel})},l.createElement(c.k,{gap:"lg"},l.createElement(E.R,{size:"sm",value:"1",label:l.createElement(I.OptionLabel,null,u("switchBtn.yes")),styles:$}),l.createElement(E.R,{size:"sm",value:"0",label:l.createElement(I.OptionLabel,null,u("switchBtn.no")),styles:$}))),(null==n?void 0:n.message)&&l.createElement(I.Error,{label:n.message}))})),l.createElement(d.x,{className:(0,v.default)(z.newsletterBlock,h.newsletterBlock)},l.createElement(b.K,{spacing:8,px:16,py:12},l.createElement(r.Qr,{name:"newsletter",control:f,rules:null===(p=x.newsletter)||void 0===p?void 0:p.rule,render:e=>{var t=e.field,{value:a,onChange:r,name:o}=t,i=(0,n.a)(t,["value","onChange","name"]);return l.createElement(NewsletterCheckbox,Object.assign({size:"sm",onChange:e=>r(e.currentTarget.checked),name:o,checked:!!a},i))}}),l.createElement(C.H.Submit,Object.assign({className:"bmi-btn bmi--btn-submit",dataEventCategory:"Health Tool",dataEventAction:"BMI",dataEventLabel:`https://${P.v[g]}/${y}`,type:"submit",fullWidth:!0},k),u("bmi.submit"))))):l.createElement(d.x,{px:16,sx:{paddingBottom:8}},l.createElement(C.H.Submit,Object.assign({className:"bmi-btn bmi--btn-submit",dataEventCategory:"Health Tool",dataEventAction:"BMI",dataEventLabel:`https://${P.v[g]}/${y}`,type:"submit",fullWidth:!0},k),u("bmi.submit")))))};var L=(0,s.k)(e=>({newsletterBlock:{backgroundColor:e.colors.neutral[0],borderBottomLeftRadius:"inherit",borderBottomRightRadius:"inherit",".bmi-btn":{marginTop:0}},inputRightSection:{fontSize:(0,u.h)(13),lineHeight:(0,u.h)(24),color:e.colors.gray[4],justifyContent:"flex-end",paddingRight:8,whiteSpace:"nowrap"}}));let InlineForm=e=>{var t,a,o,i,s,m,p,g;let{t:h,locale:f}=(0,w.u)(),{control:y,bmiGenerated:k,isTouched:z,linkTool:O,submitProps:L,withAdditionalQuestion:j,enableUnitPicker:I,unitSystem:F,unitHeight:A,unitWeight:$,onUnitChange:B}=(0,l.useContext)(D),{classes:H={},variant:M}=(0,l.useContext)(S.C),{classes:_={}}=(0,l.useContext)(D);return l.createElement(C.H,Object.assign({formLayout:"inline"},e),l.createElement(r.Qr,{name:"gender",control:y,rules:null===(t=k.gender)||void 0===t?void 0:t.rule,render:({field:{onChange:e},fieldState:{error:t}})=>l.createElement(C.H.FormRow,null,l.createElement(C.H.BorderInlineControl,{label:h("tools.selectGender"),width:"none",errorMess:z&&(null==t?void 0:t.message)},l.createElement(N.G,{type:"radio",hideLabel:!0,error:z?l.createElement(l.Fragment,null):"",onChange:e})))}),l.createElement(r.Qr,{name:"age",control:y,rules:null===(a=k.age)||void 0===a?void 0:a.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement(C.H.FormRow,null,l.createElement(C.H.BorderInlineControl,{label:h("bmi.ageInput"),errorMess:z&&(null==n?void 0:n.message)},l.createElement(E.I.Number,{placeholder:h("tools.inputPlaceholder",{content:"25"}),name:e,value:t,onChange:a,error:z&&(null==n?void 0:n.message)?l.createElement(l.Fragment,null):"",min:0,rightSection:l.createElement(C.H.Unit,null,h("tools.yearsOld")),styles:()=>({rightSection:{width:"auto"}})})))}),l.createElement(r.Qr,{name:"height",control:y,rules:null===(o=k.height)||void 0===o?void 0:o.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement(C.H.FormRow,null,l.createElement(C.H.BorderInlineControl,{label:h("bmi.heightInput"),errorMess:z&&(null==n?void 0:n.message)},l.createElement(E.I.Number,{placeholder:h("tools.inputPlaceholder",{content:"imperial"===F?6:170}),name:e,value:t,onChange:a,min:0,precision:1,inputMode:"decimal",error:z&&(null==n?void 0:n.message)?l.createElement(l.Fragment,null):"",rightSection:I?l.createElement(FitnessToolUnitPicker,{displayValue:A,field:"height",onChange:B}):l.createElement(C.H.Unit,{styles:{root:{paddingRight:0}}},h("bmi.heightInput.desc")),rightSectionWidth:70,styles:I?void 0:()=>({rightSection:{paddingRight:0}})})))}),l.createElement(r.Qr,{name:"weight",control:y,rules:null===(i=k.weight)||void 0===i?void 0:i.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement(C.H.FormRow,null,l.createElement(C.H.BorderInlineControl,{label:h("bmi.weightInput"),errorMess:z&&(null==n?void 0:n.message)},l.createElement(E.I.Number,{placeholder:h("tools.inputPlaceholder",{content:"imperial"===F?130:60}),name:e,value:t,onChange:a,error:z&&(null==n?void 0:n.message)?l.createElement(l.Fragment,null):"",precision:1,inputMode:"decimal",min:0,rightSection:I?l.createElement(FitnessToolUnitPicker,{displayValue:$,field:"weight",onChange:B}):l.createElement(C.H.Unit,{styles:{root:{paddingRight:0}}},h("bmi.weightInput.desc")),rightSectionWidth:70,styles:I?void 0:()=>({rightSection:{paddingRight:0}})})))}),j?l.createElement(l.Fragment,null,l.createElement(r.Qr,{name:"question1",control:y,rules:null===(s=k.question1)||void 0===s?void 0:s.rule,render:({field:{value:e,onChange:t,name:a},fieldState:{error:n}})=>l.createElement(C.H.FormRow,null,l.createElement(E.R.Group,{name:a,value:e,onChange:t,sx:{flex:1},label:l.createElement(x.T,{size:"s4",weight:"semiBold",span:!0},h("bmi.question.weightLossSupport")),size:"lg"},l.createElement(c.k,{gap:"lg",sx:{paddingTop:(0,u.h)(8)}},l.createElement(E.R,{size:"sm",value:"1",label:h("switchBtn.yes")}),l.createElement(E.R,{size:"sm",value:"0",label:h("switchBtn.no")}))),z&&(null==n?void 0:n.message)&&l.createElement(E.e,{label:n.message,textProps:{size:"p4"},sx:{marginTop:6}}))}),l.createElement(r.Qr,{name:"question2",control:y,rules:null===(m=k.question2)||void 0===m?void 0:m.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement(C.H.FormRow,null,l.createElement(E.R.Group,{name:e,value:t,onChange:a,sx:{flex:1},label:l.createElement(x.T,{size:"s4",weight:"semiBold",span:!0},h("bmi.question.glp1Awareness")),size:"lg",description:f!==T.L.Malaysia&&l.createElement(x.T,{style:{fontSize:"10px"},span:!0},h("bmi.question.glp1Awareness.desc"))},l.createElement(c.k,{gap:"lg",sx:{paddingTop:(0,u.h)(8)}},l.createElement(E.R,{size:"sm",value:"1",label:h("switchBtn.yes")}),l.createElement(E.R,{size:"sm",value:"0",label:h("switchBtn.no")}))),z&&(null==n?void 0:n.message)&&l.createElement(E.e,{label:n.message,textProps:{size:"p4"},sx:{marginTop:6}}))}),"gray"===M||"violet"===M?l.createElement(l.Fragment,null,l.createElement(r.Qr,{name:"newsletter",control:y,rules:null===(p=k.newsletter)||void 0===p?void 0:p.rule,render:e=>{var t=e.field,{value:a,onChange:r,name:o}=t,i=(0,n.a)(t,["value","onChange","name"]);return l.createElement(C.H.FormRow,null,l.createElement(E.d,Object.assign({size:"sm",label:l.createElement(x.T,{size:"p3"},h("bmi.newsletter.label")),onChange:e=>r(e.currentTarget.checked),name:o,checked:!!a},i)))}}),l.createElement(C.H.FormRow,{className:(0,v.default)(H.submitWrapper)},l.createElement(C.H.Submit,Object.assign({className:(0,v.default)("bmi-btn bmi--btn-submit",H.submitBtn),dataEventCategory:"Health Tool",dataEventAction:"BMI",dataEventLabel:`https://${P.v[f]}/${O}`,type:"submit"},L),h("bmi.submit")))):l.createElement(C.H.FormRow,{py:16,className:(0,v.default)(_.newsletterBlock,H.newsletterBlock)},l.createElement(b.K,{spacing:16},l.createElement(r.Qr,{name:"newsletter",control:y,rules:null===(g=k.newsletter)||void 0===g?void 0:g.rule,render:e=>{var t=e.field,{value:a,onChange:r,name:o}=t,i=(0,n.a)(t,["value","onChange","name"]);return l.createElement(NewsletterCheckbox,Object.assign({size:"sm",labelTextProps:{size:"p4"},onChange:e=>r(e.currentTarget.checked),name:o,checked:!!a,useCollapse:!1},i))}}),l.createElement(d.x,{className:(0,v.default)(H.submitWrapper)},l.createElement(C.H.Submit,Object.assign({className:(0,v.default)("bmi-btn bmi--btn-submit",H.submitBtn),dataEventCategory:"Health Tool",dataEventAction:"BMI",dataEventLabel:`https://${P.v[f]}/${O}`,type:"submit"},L),h("bmi.submit")))))):l.createElement(C.H.FormRow,{className:(0,v.default)(H.submitWrapper)},l.createElement(C.H.Submit,Object.assign({className:"bmi-btn bmi--btn-submit",dataEventCategory:"Health Tool",dataEventAction:"BMI",dataEventLabel:`https://${P.v[f]}/${O}`,type:"submit"},L),h("bmi.submit"))))},BmiForm=e=>{var{value:t,onChange:a,onSubmit:s,bmiGenerated:c,bmiUnit:d,defaultUnitSystem:m,enableUnitPicker:p=!0,formLayout:u="default",submitProps:g,withAdditionalQuestion:h,isMobile:b}=e,v=(0,n.a)(e,["value","onChange","onSubmit","bmiGenerated","bmiUnit","defaultUnitSystem","enableUnitPicker","formLayout","submitProps","withAdditionalQuestion","isMobile"]);let{classes:f}=L(void 0,{name:"BmiForm"}),{locale:E}=(0,w.u)(),[x,C]=(0,l.useState)(!1),k=(0,l.useMemo)(()=>m||"metric",[m]),[S,N]=(0,l.useState)(k),{control:T,handleSubmit:P,setValue:O,watch:j}=(0,r.cI)({defaultValues:{question1:void 0,question2:void 0,newsletter:!0}}),I=j(),{getHealthToolLink:F}=(0,o.u)(E),A=(0,l.useMemo)(()=>F(i.H.OVULATION),[F]),$="imperial"===S?"ft":"cm",B="imperial"===S?"lbs":"kg",convertHeightToCm=e=>"imperial"===S?30.48*e:e,convertWeightToKg=e=>"imperial"===S?.45359237*e:e,onInValid=()=>{C(!0)};(0,l.useEffect)(()=>{Object.keys(t||{}).forEach(e=>{O(e,null==t?void 0:t[e],{shouldTouch:!1,shouldDirty:!1,shouldValidate:!1})})},[t]),(0,l.useEffect)(()=>{a&&a(I)},[I]),(0,l.useEffect)(()=>{N(k)},[k]);let H=Object.assign({onSubmit:P(e=>(0,n._)(void 0,void 0,void 0,function*(){let t="number"==typeof e.height?e.height:Number(e.height),a="number"==typeof e.weight?e.weight:Number(e.weight),n=p?Object.assign(Object.assign({},e),{bmi:(0,z.F)({height:convertHeightToCm(t),weight:convertWeightToKg(a)}),unit:S}):(()=>{let n=d.heightConvert(t),l=d.weightConvert(a);return Object.assign(Object.assign({},e),{height:n,weight:l,bmi:(0,z.F)({height:n,weight:l})})})();onInValid(),s&&s(n)}),onInValid)},v);return l.createElement(y.T,{variant:y.C.LEADGEN},l.createElement(D.Provider,{value:{control:T,bmiGenerated:c,isTouched:x,linkTool:A,submitProps:g,withAdditionalQuestion:h,classes:f,enableUnitPicker:p,unitSystem:S,unitHeight:$,unitWeight:B,onUnitChange:(e,t)=>{p&&e!==S&&(N(e),O("height","",{shouldDirty:!0,shouldValidate:!1}),O("weight","",{shouldDirty:!0,shouldValidate:!1}))}}},"inline"===u?l.createElement(InlineForm,Object.assign({},H)):l.createElement(DefaultForm,Object.assign({},H,{isMobile:b}))))},j=(0,l.createContext)({}),Error=e=>{let{errorLabelSize:t}=(0,l.useContext)(j);return l.createElement(E.e,Object.assign({textProps:{size:t},sx:{marginTop:5}},e))};var I=Object.assign(e=>{var t,a,r,o,i,s,{children:c,isMobile:d}=e,m=(0,n.a)(e,["children","isMobile"]);let p=Object.assign({isMobile:d,labelSize:null!==(t=m.labelSize)&&void 0!==t?t:d?"p2":"s4",subLabelSize:null!==(a=m.subLabelSize)&&void 0!==a?a:"subText",optionLabelSize:null!==(r=m.optionLabelSize)&&void 0!==r?r:d?"p2":"s4",inputSize:null!==(o=m.inputSize)&&void 0!==o?o:d?"sm":"md",gutter:null!==(i=m.gutter)&&void 0!==i?i:d?4:12,errorLabelSize:null!==(s=m.errorLabelSize)&&void 0!==s?s:"p3"},m);return l.createElement(j.Provider,{value:p},c)},{Row:e=>{var{children:t}=e,a=(0,n.a)(e,["children"]);let{gutter:r}=(0,l.useContext)(j);return l.createElement(f.r,Object.assign({gutter:r},a),t)},Col:e=>{var{children:t}=e,a=(0,n.a)(e,["children"]);return l.createElement(f.r.Col,Object.assign({span:12},a),t)},SubLabel:e=>{var{children:t}=e,a=(0,n.a)(e,["children"]);let{subLabelSize:r}=(0,l.useContext)(j);return l.createElement(x.T,Object.assign({size:r},a),t)},Label:e=>{var{children:t}=e,a=(0,n.a)(e,["children"]);let{labelSize:r}=(0,l.useContext)(j);return l.createElement(x.T,Object.assign({size:r,weight:"semiBold"},a,{span:!0}),t)},OptionLabel:e=>{var{children:t}=e,a=(0,n.a)(e,["children"]);let{optionLabelSize:r}=(0,l.useContext)(j);return l.createElement(x.T,Object.assign({size:r,weight:"regular"},a,{span:!0}),t)},Input:E.I,InputNumber:e=>{var{error:t}=e,a=(0,n.a)(e,["error"]);let{inputSize:r}=(0,l.useContext)(j);return l.createElement("div",null,l.createElement(E.I.Number,Object.assign({size:r},a)),t&&l.createElement(Error,{label:t}))},GenderControl:e=>{let{inputSize:t}=(0,l.useContext)(j);return l.createElement(N.G,Object.assign({size:t},e))},Error})},w8P6:function(e,t,a){a.d(t,{H:function(){return HealthToolFormWrapper}});var n=a("T/vS"),l=a("q1tI"),r=a("/npG"),o=a("mYVa"),i=a("Eso5"),s=a("aDCK"),c=a("9n+W"),d=a("8vDj"),m=a("SPK5"),p=a("2wr/"),u=a("dDw1"),g=a("RlpF"),h=a("Z+18"),b=a("yVya"),v=a("iBNF"),f=(0,r.k)(()=>({root:{justifyContent:"flex-start"},group:{display:"flex",alignItems:"stretch",gap:(0,o.h)(8)},item:{flex:"1 1 0px"},icon:{flexShrink:0}}));let E=(0,l.createContext)({}),x=(0,r.k)(()=>({root:{display:"flex",flexDirection:"column",gap:(0,o.h)(8),paddingLeft:16,paddingRight:16,"&:last-child":{paddingBottom:16}}}));var y=(0,r.k)((e,{formLayout:t})=>({root:{display:"flex",flexDirection:"column",gap:(0,o.h)("inline"===t?8:16),borderRadius:"inherit",".mantine-Input-input::placeholder, .mantine-Input-input[data-invalid]::placeholder":{color:"#8C8C8C"},[e.fn.smallerThan("sm")]:Object.assign({"input, .mantine-DatePickerInput-input":{fontSize:(0,o.h)(14)}},"default"===t&&{gap:8})},control:{width:(0,o.h)(180),flexShrink:1,"&.error":{"button, input":{borderColor:e.colors.red[7]}}}}));let w=(0,r.k)((e,{formLayout:t})=>{let a="mb"===e.other.template;return{root:Object.assign(Object.assign({minWidth:(0,o.h)(180)},"inline"===t&&{alignSelf:"flex-end",marginTop:(0,o.h)(16)}),"default"===t&&Object.assign({},a&&{alignSelf:"center"}))}}),C=(0,r.k)(e=>({root:{color:e.colors.gray[6],whiteSpace:"nowrap",paddingRight:(0,o.h)(16)}}));var k=(0,r.k)(()=>({root:{display:"flex",gap:(0,o.h)(8),border:"1px solid #EAEAEC",borderRadius:(0,o.h)(16),padding:"10px 16px 12px 16px",flex:"1 1 0px",".mantine-Input-input":{border:0,paddingLeft:0,height:"22px",borderRadius:0,"&:focus":{outline:0,boxShadow:"none"}}},info:{display:"flex",flexDirection:"column",gap:0,flex:"1 1 0px"},label:{color:"#7C7C8F",fontWeight:"normal"},content:{},rightSection:{display:"flex",alignItems:"center",textTransform:"lowercase",color:"#3E3F58"}})),S=(0,r.k)((e,{width:t,direction:a})=>{let n="mb"===e.other.template;return{root:{display:"flex",flexDirection:"column",gap:(0,o.h)(8)},row:{display:"flex",flexDirection:a,alignItems:"stretch",justifyContent:"space-between",gap:(0,o.h)(16),minHeight:(0,o.h)(40)},labelWrapper:Object.assign({flex:"1 1 0px",display:"flex",alignItems:"center"},"row"===a&&{borderBottom:`1px solid ${e.colors.neutral[1]}`}),label:{fontSize:(0,o.h)(14),lineHeight:(0,o.h)(22),color:e.colors.gray[6]},content:{display:"flex",alignItems:"center",gap:(0,o.h)(8),input:{backgroundColor:"#fff"}},control:{width:"number"==typeof t?(0,o.h)(t):t,flexShrink:1,input:Object.assign({},n&&{borderRadius:(0,o.h)(12)}),"&.error":{"button, input":{borderColor:e.colors.red[7]}}},error:{color:"red",textAlign:"right"}}});let N=(0,r.k)(()=>({root:{color:"red",textAlign:"right",width:"auto"}}));var T=(0,r.k)(e=>{let t="mb"===e.other.template;return{root:{label:Object.assign({},t&&{color:v.r.mbColors.midGray,fontSize:(0,o.h)(12),fontWeight:"normal"})}}});let HealthToolFormWrapper=e=>{var{children:t,formLayout:a,styles:r,classNames:o,className:s,component:c="form"}=e,d=(0,n.a)(e,["children","formLayout","styles","classNames","className","component"]);let m=a||"default",{classes:p,cx:u}=y({formLayout:m},{name:"HealthToolFormWrapper",styles:r,classNames:o});return l.createElement(E.Provider,{value:{formLayout:m}},l.createElement(i.x,Object.assign({component:c,className:u(s,p.root)},d),t))};HealthToolFormWrapper.Control=e=>{var{className:t,styles:a,classNames:r}=e,o=(0,n.a)(e,["className","styles","classNames"]);let{classes:s,cx:c}=T(void 0,{name:"HealthToolFormWrapper__Control",styles:a,classNames:r});return l.createElement(i.x,Object.assign({className:c(t,s.root)},o))},HealthToolFormWrapper.BorderInlineControl=({label:e,children:t,styles:a,classNames:n,direction:r="row",width:o=180,errorMess:s})=>{let{classes:c}=S({width:o,direction:r},{name:"HealthToolFormWrapper__BorderInlineControl",styles:a,classNames:n});return l.createElement(i.x,{className:c.root},l.createElement(i.x,{className:c.row},l.createElement(i.x,{className:c.labelWrapper},e&&l.createElement("label",{className:c.label,htmlFor:"gender"},e)),l.createElement(i.x,{className:c.content},(0,b.Z)(t).map((e,t)=>l.createElement(i.x,{key:t,className:c.control},e)))),s&&l.createElement(u.T,{size:"p4",className:c.error},s))},HealthToolFormWrapper.BorderBoxControl=e=>{var{label:t,rightSection:a,children:r,styles:o,className:s,classNames:c}=e,d=(0,n.a)(e,["label","rightSection","children","styles","className","classNames"]);let{classes:m,cx:p}=k(void 0,{name:"HealthToolFormWrapper__BorderBoxControl",styles:o,classNames:c});return l.createElement(i.x,Object.assign({className:p(m.root,s)},d),l.createElement(i.x,{className:m.info},t&&l.createElement(u.T,{size:"n1",as:"label",className:m.label},t),l.createElement(i.x,{className:m.content},l.isValidElement(r)?l.cloneElement(r,Object.assign(Object.assign({},r.props),{size:"sm",error:null})):null)),a&&l.createElement(i.x,{className:m.rightSection},"string"==typeof a?l.createElement(u.T,{size:"p4"},a):l.isValidElement(a)?l.cloneElement(a,{size:24}):null))},HealthToolFormWrapper.Error=e=>{var{styles:t,classNames:a,className:r}=e,o=(0,n.a)(e,["styles","classNames","className"]);let{classes:i,cx:s}=N(void 0,{name:"HealthToolFormWrapper__UnitText",styles:t,classNames:a});return l.createElement(u.T,Object.assign({size:"p4",className:s(r,i.root)},o))},HealthToolFormWrapper.FormRow=e=>{var{styles:t,classNames:a,className:r,children:o}=e,s=(0,n.a)(e,["styles","classNames","className","children"]);let{classes:c,cx:d}=x(void 0,{name:"HealthToolFormWrapper__FormRow",styles:t,classNames:a});return l.createElement(i.x,Object.assign({className:d(r,c.root)},s),o)},HealthToolFormWrapper.Submit=e=>{var{styles:t,classNames:a,className:r}=e,o=(0,n.a)(e,["styles","classNames","className"]);let{formLayout:i}=(0,l.useContext)(E),{classes:s,cx:c}=w({formLayout:i},{name:"HealthToolFormWrapper__SubmitBtn",styles:t,classNames:a});return l.createElement(g.B,Object.assign({className:c("submit-btn",r,s.root)},o,{variant:"primary",size:"md"}))},HealthToolFormWrapper.Unit=e=>{var{styles:t,classNames:a,className:r}=e,o=(0,n.a)(e,["styles","classNames","className"]);let{classes:i,cx:s}=C(void 0,{name:"HealthToolFormWrapper__UnitText",styles:t,classNames:a});return l.createElement(u.T,Object.assign({size:"p4",className:s(r,i.root)},o))},HealthToolFormWrapper.Switching=e=>{var{label:t}=e,a=(0,n.a)(e,["label"]);let{t:r}=(0,h.u)(),i=(0,d.rZ)(),s="mb"===i.other.template;return l.createElement(m.k,{gap:(0,o.h)(4),sx:()=>({justifyContent:"space-between",alignItems:"center"})},t&&l.createElement(u.T,{size:s?"p4":"s4",color:"gray.6"},t),l.createElement(p.r,Object.assign({labelPosition:"left",onLabel:r("switchBtn.yes"),offLabel:r("switchBtn.no")},a,{styles:e=>({trackLabel:{fontSize:(0,o.h)(12)},track:{cursor:"pointer"},body:{[e.fn.largerThan("sm")]:{flexDirection:"column",alignItems:"flex-start"},[e.fn.smallerThan("sm")]:{justifyContent:"space-between"}},labelWrapper:{[e.fn.smallerThan("sm")]:{display:"flex",justifyContent:"center"}}})})))},HealthToolFormWrapper.ChipGroup=e=>{var{data:t=[],label:a,isMobile:r,layout:d="horizonal",classNames:m,styles:p}=e,g=(0,n.a)(e,["data","label","isMobile","layout","classNames","styles"]);let{classes:h,theme:b}=f(void 0,{name:"ChipGroup",classNames:m,styles:p}),v="mb"===b.other.template,E=r?48:v?32:"vertical"===d?32:18;return l.createElement(i.x,null,l.createElement(s.I.Wrapper,{label:a&&l.createElement(u.T,{size:"p3",weight:"semiBold"},a)},l.createElement(c.A.Group,Object.assign({},g),l.createElement(i.x,{className:h.group},t.map((e,t)=>l.createElement(c.A,{className:h.item,key:t,value:String(e.value),styles:{iconWrapper:{display:"none"},label:{width:"100%",borderRadius:(0,o.h)(v?12:8),padding:0,border:`1px solid ${v?"#EAEAEC":b.colors.neutral[2]}`,height:"100%","&[data-checked]":{padding:0,backgroundColor:v?"#FFE9F1":b.colors.blue[0],border:`1px solid ${v?"#F5B4CB":b.colors.blue[1]}`},[b.fn.smallerThan("sm")]:{alignItems:"flex-start"}}}},l.createElement(i.x,{sx:Object.assign(Object.assign(Object.assign({width:"100%",display:"flex",gap:(0,o.h)(v?2:8),padding:"8px 16px 8px 12px",justifyContent:"center",alignItems:"center"},v&&{flexDirection:"column"}),"vertical"===d&&{flexDirection:"column",padding:"16px 8px 8px"}),{[b.fn.smallerThan("sm")]:{flexDirection:"column",padding:"16px 8px 8px"}})},l.isValidElement(e.icon)?l.cloneElement(e.icon,{size:E,isMarryBaby:v,className:h.icon}):null,l.createElement(u.T,{size:"p4",styles:{root:Object.assign(Object.assign({},v&&{textAlign:"center"}),{whiteSpace:"normal",[b.fn.smallerThan("sm")]:{fontSize:(0,o.h)(12),lineHeight:(0,o.h)(18),textAlign:"center"}})}},e.label))))))))}},fiLA:function(e,t,a){a.d(t,{S:function(){return Spoiler}});var n=a("T/vS"),l=a("q1tI"),r=a("uCoU"),o=a("dDw1"),i=a("Z+18"),s=a("iBNF");let Spoiler=e=>{var{children:t,line:a,lineHeight:c,trackingAttributes:d,maxHeight:m,customExpandFn:p}=e,u=(0,n.a)(e,["children","line","lineHeight","trackingAttributes","maxHeight","customExpandFn"]);let{t:g}=(0,i.u)(),h=(0,l.useMemo)(()=>m||(a&&c?a*c:(console.error("[HHG-Comp]:[Spoiler] Please provide maxHeight, or line with lineHeight"),0)),[]);t||console.error("[HHG-Comp]:[Spoiler] Please provide children");let b=(0,l.useMemo)(()=>d?{"data-event-category":d.dataEventCategory,"data-event-action":d.dataEventAction,"data-event-label":d.dataEventLabel}:{},[d]);return l.createElement(r.o,Object.assign({showLabel:l.createElement(o.T,Object.assign({size:"p3",color:s.r.colors.primaryBase},b,{onClick:p}),g("articlePage.readMore")),hideLabel:l.createElement(o.T,Object.assign({size:"p3",color:s.r.colors.primaryBase},b),g("articlePage.showLess"))},u,{maxHeight:h}),t)}},OZ05:function(e,t,a){a.d(t,{C:function(){return CardAuthor},P:function(){return PopupExpert},a:function(){return PopupDoctor},b:function(){return PopupHospital},c:function(){return ProfileDetailModal},d:function(){return CardAuthor$1}});var n=a("q1tI"),l=a("Frvz"),r=a("daqB"),o=a("/npG"),i=a("Eso5"),s=a("SPK5"),c=a("mAfZ"),d=a("mYVa"),m=a("Wgwc"),p=a.n(m),u=a("QgiU"),g=a.n(u),h=a("Z+18"),b=a("un+D"),v=a("F3Or"),f=a("flyO"),E=a("T/vS"),x=a("slYB"),y=a("FfBq"),w=a("0dn/"),C=a("GAI/"),k=a("WTZ1"),S=a("dDw1"),N=a("iBNF"),T=a("rBCA"),P=a("IQVP"),z=a("iLR0"),D=a("Mjd7"),O=a("L3Nj"),L=a("xrdX");let MainText=({children:e,className:t=""})=>n.createElement("div",{className:`tMiOKib ${t}`},e),SubText=({children:e,className:t=""})=>n.createElement("div",{className:`uDcqD-2 ${t}`},e);var j={container:"sTU4T4I",info:"tCql9Je",avatarWrapper:"_3j7uYhH",avatarIcon:"PHABgoT"};let CardAuthor$1=({avatarProps:e,title:t,subTitle:a,children:l,className:r="",style:o,onAvatarClick:i,avatarIcon:s,dataEventCategory:c,dataEventAction:d,dataEventLabel:m})=>n.createElement("div",{className:`${j.container} ${r}`,style:o},n.createElement("div",{className:j.avatarWrapper,onClick:i,"data-event-category":c,"data-event-action":d,"data-event-label":m},n.createElement(x.U,Object.assign({},e)),s&&n.createElement("div",{className:j.avatarIcon},s)),n.createElement("div",{className:`${j.info} ${r}`,style:{minHeight:`${(null==e?void 0:e.size)||40}px`}},l||n.createElement(n.Fragment,null,t&&n.createElement(MainText,null,t),a&&n.createElement(SubText,null,a))));CardAuthor$1.MainText=MainText,CardAuthor$1.SubText=SubText,CardAuthor$1.SubDivider=({className:e=""})=>n.createElement("span",{className:`m-HVXw1 ${e}`}),CardAuthor$1.Row=({children:e,className:t=""})=>n.createElement("div",{className:`dZWeHns ${t} row`},e),CardAuthor$1.ColLeft=({children:e,className:t=""})=>n.createElement("div",{className:`${t} col-left`},e),CardAuthor$1.ColRight=({children:e,className:t=""})=>n.createElement("div",{className:`${t} col-right`},e),CardAuthor$1.SubTextRow=e=>{var{children:t,className:a=""}=e,l=(0,E.a)(e,["children","className"]);return n.createElement("div",Object.assign({className:`pDlsows ${a}`},l),t)};var I=(0,o.k)(()=>({root:{verticalAlign:"bottom"}}));let F=(0,n.createContext)({}),AuthorBadgeItem=({styles:e,className:t,classNames:a})=>{let{role:l,siteType:r,title:o}=(0,n.useContext)(F),{cx:i,classes:s}=I(void 0,{name:"AuthorBadgeItem",styles:e,classNames:a});return l?n.createElement(v.A,{className:i(s.root,t),siteType:r,role:l,title:o}):null};var A=(0,o.k)(()=>({root:{}}));let $=T.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${N.r.colors.white}; border-radius: ${N.r.borderRadius}; box-shadow: 0px 0px 4px ${N.r.colors.gray200}; transform: translate(-50%, -50%); transition: all 0.5s ease-in-out; ${b.M.tdUp} { width: 750px; } &[data-animation='true'] { transition: all 0.5s ease-in-out; } &[data-open='true'] { z-index: 400; top: 50%; opacity: 1; visibility: visible; } &[data-open='false'] { top: -50%; } .popup-content { ${b.M.mbDown} { display: block; } display: flex; position: relative; z-index: 111; height: 100%; .button-see-more { margin: 32px 0; padding: 0; > * { display: inline-block; } } .close-button { position: absolute; z-index: 100; top: 10px; right: 10px; cursor: pointer; width: unset; height: unset; img { width: 100%; height: 100%; border-radius: 50%; } } } .main-info { padding-bottom: 32px; background-color: ${N.r.colors.primary50}; border-radius: ${N.r.borderRadius}; .btn-booking { display: flex; margin: 12px auto; } .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,B=T.Z.div` position: fixed; z-index: 110; top: 0; left: 0; width: 100%; height: 100%; align-items: center; background: rgba(38, 38, 38, 0.3); &[data-open='false'] { display: none; } `,H=T.Z.div` .image-container { .badge-avatar { position: absolute; right: 0; bottom: 0; top: 0; } } display: flex; justify-content: center; padding-bottom: 15px; text-align: center; .profile-image { width: 100px; min-width: 100px; height: 100px; min-height: 100px; border-radius: 50%; object-fit: cover; } .badge-avatar { width: 24px; height: 24px; } `,M=T.Z.div` position: relative; z-index: 9; .specialty { display: flex; flex-wrap: wrap; justify-content: center; } padding: 0px 16px; text-align: center; .specialty { justify-content: center; } .experience { padding: 16px 0px 32px; text-align: left; .btn-wrapper { margin-top: 24px; } } p { max-width: 100%; -webkit-line-clamp: 4; -webkit-box-orient: vertical; text-overflow: ellipsis; overflow: hidden; } `,_=T.Z.ul` padding-left: 18px; li { list-style-type: disc; } `;var R="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%23262626' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M18 6 6 18M6 6l12 12'/%3e%3c/svg%3e",W="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none'%3e%3cpath fill='white' stroke='%23E4E8EC' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M9 17A8 8 0 1 0 9 1a8 8 0 0 0 0 16'/%3e%3cpath fill='%23FF5331' d='M10.333 7.667V5H7.667v2.667H5v2.667h2.667V13h2.666v-2.666H13V7.667z'/%3e%3c/svg%3e";let PopupDoctor=({isOpen:e=!0,onClose:t,enableAnimation:a=!0,doctorId:l,locale:r,isMobile:o,overwriteProfileProps:i,avatarFallback:s=w.C.getAssetPath("avatar.jpg"),trackingCategory:c="Together"})=>{var d,m,p;let{t:u}=(0,h.u)(),[g,b]=(0,n.useState)(null),[v,f]=(0,n.useState)(!1);(0,n.useEffect)(()=>{if(e&&l&&String(null==g?void 0:g.id)!==String(l)){f(!0);try{b(null),(0,C.c)((0,C.b)(P.tC.GET_DOCTOR_INFO,{doctorId:l,website_url:C.m[r]}),"get").then(e=>{b(Object.assign(Object.assign({},null==e?void 0:e._data.doctor),i))})}catch(e){console.error(e)}f(!1)}},[e,l,null==g?void 0:g.id]);let E=(null==g?void 0:g.experiences)||[],x=(null==g?void 0:g.specialties)||[],T=x.map(e=>(null==e?void 0:e.name)||e).join(" • "),D=E.map(e=>{try{return JSON.parse(e.description)}catch(t){return e.description}}).filter(e=>e.content),renderExperienceText=e=>(null==e?void 0:e.year)?`${e.year} ${null==e?void 0:e.content}`:(null==e?void 0:e.content)?e.content:"string"==typeof e?e:"";return n.createElement(n.Fragment,null,n.createElement($,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},v||!g?n.createElement(z.L,null):n.createElement("div",{className:"popup-content"},n.createElement("div",{className:"close-button",onClick:t},n.createElement("img",{src:R,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),n.createElement("div",{className:"main-info"},n.createElement("div",{className:"border-banner"}),n.createElement("div",{className:"avatar-title"},n.createElement(H,null,n.createElement("div",{className:"image-container"},n.createElement("div",{style:{position:"relative"}},n.createElement(y.I,{src:null==g?void 0:g.avatar,backupSrc:s,className:"profile-image",alt:"avatar"}),n.createElement("img",{className:"badge-avatar",src:W,alt:"badge",loading:"lazy"})))),n.createElement(M,null,n.createElement(S.T,{size:"s3",weight:"semiBold",className:"full-name"},null==g?void 0:g.name),n.createElement("div",{className:"specialty"},T&&n.createElement(n.Fragment,null,n.createElement(S.T,{size:"p4",color:N.r.colors.gray800},T," • ")),n.createElement("a",{href:(0,C.n)({id:null===(d=null==g?void 0:g.organization)||void 0===d?void 0:d.id,name:null===(m=null==g?void 0:g.organization)||void 0===m?void 0:m.name,slug:null===(p=null==g?void 0:g.organization)||void 0===p?void 0:p.slug,locale:r}),className:"organisation",target:"_blank",rel:"noreferrer"},n.createElement(S.T,{size:"p4",className:"organisation",color:N.r.colors.gray800,style:{textDecoration:"underline"}},null==g?void 0:g.organization.name))))),!o&&n.createElement("div",{className:"btn-wrapper"},n.createElement("a",{href:(0,C.o)({name:g.name,id:g.id,locale:r})},n.createElement(k.B,{color:"primary",size:"md",className:"btn-booking"},u("careBooking.bookAnAppointment"))))),D&&n.createElement(M,null,n.createElement("div",{className:"experience"},n.createElement(S.T,{weight:"bold",size:"s3",color:N.r.colors.gray800,style:{paddingBottom:16}},u("expert.content.description").toUpperCase()),n.createElement(_,null,D.map((e,t)=>n.createElement("li",{key:t},n.createElement(S.T,{size:"p2"},renderExperienceText(e))))),o?n.createElement("div",{className:"btn-wrapper"},n.createElement("a",{href:(0,C.o)({name:g.name,id:g.id,locale:r})},n.createElement(k.B,{color:"primary",size:"md",className:"btn-booking"},u("careBooking.bookAnAppointment")))):n.createElement("a",{href:(0,C.o)({name:g.name,id:g.id,locale:r})},n.createElement(S.T,{size:"s4",color:"#2D87F3",style:{paddingTop:24},"data-event-category":c,"data-event-action":"See Full Doctor Profile","data-event-label":(0,C.l)(r)+(0,C.o)({name:g.name,id:g.id,locale:r})},u("home.seeExpert"))))))),n.createElement(B,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))},V=T.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${N.r.colors.white}; border-radius: ${N.r.borderRadius}; box-shadow: 0px 0px 4px ${N.r.colors.gray200}; transform: translate(-50%, -50%); transition: all 0.5s ease-in-out; ${b.M.tdUp} { width: 750px; } &[data-animation='true'] { transition: all 0.5s ease-in-out; } &[data-open='true'] { z-index: 400; top: 50%; opacity: 1; visibility: visible; } &[data-open='false'] { top: -50%; } .popup-content { ${b.M.mbDown} { display: block; } display: flex; position: relative; z-index: 111; height: 100%; .button-see-more { margin: 32px 0; padding: 0; > * { display: inline-block; } } .close-button { position: absolute; z-index: 100; top: 10px; right: 10px; cursor: pointer; width: unset; height: unset; img { width: 100%; height: 100%; border-radius: 50%; } } } .main-info { padding-bottom: 32px; background-color: ${N.r.colors.primary50}; border-radius: ${N.r.borderRadius}; .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,U=T.Z.div` position: fixed; z-index: 110; top: 0; left: 0; width: 100%; height: 100%; align-items: center; background: rgba(38, 38, 38, 0.3); &[data-open='false'] { display: none; } `,Z=T.Z.div` .image-container { .badge-avatar { position: absolute; right: 0; bottom: 0; top: 0; } } display: flex; justify-content: center; padding-bottom: 15px; text-align: center; .profile-image { width: 100px; min-width: 100px; height: 100px; min-height: 100px; border-radius: 50%; object-fit: cover; } .badge-avatar { width: 24px; height: 24px; } `,q=T.Z.div` position: relative; z-index: 9; .specialty { display: flex; flex-wrap: wrap; justify-content: center; } padding: 0px 16px; text-align: center; .specialty { justify-content: center; } .experience { padding: 16px 0px 32px; text-align: left; .btn-wrapper { margin-top: 24px; } } p { max-width: 100%; -webkit-line-clamp: 4; -webkit-box-orient: vertical; text-overflow: ellipsis; overflow: hidden; } `,Y=T.Z.div` display: flex; margin-top: 8px; .bullet-point { width: 24px; height: 24px; } `;var G="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath fill='%2345A4FF' d='M12 24c6.627 0 12-5.373 12-12S18.627 0 12 0 0 5.373 0 12s5.373 12 12 12'/%3e%3cpath fill='%232D87F3' d='M24 12a12 12 0 0 0-.128-1.758l-5.077-5.077L5.041 18.958l4.858 4.858c.682.12 1.384.184 2.1.184 6.628 0 12-5.373 12-12Z'/%3e%3cpath fill='white' d='M9.014 17.824 5.04 18.959l1.135-3.973 2.368.47z'/%3e%3cpath fill='%23F7F9FC' d='M8.544 15.456 5.041 18.96l3.972-1.135z'/%3e%3cpath fill='%23E4E8EC' d='M6.467 18.552 5.45 17.533l-.41 1.427 1.426-.407Z'/%3e%3cpath fill='%23D2D6DC' d='m5.957 18.043-.916.916 1.426-.407z'/%3e%3cpath fill='%23FFD658' d='m15.828 5.331 2.837 2.837-9.651 9.652-2.838-2.837z'/%3e%3cpath fill='%23FFC326' d='m7.594 16.404 9.651-9.651 1.419 1.418-9.652 9.652z'/%3e%3cpath fill='%23FF5331' d='m18.312 8.525-2.837-2.838 1.123-1.123c.44-.44 1.154-.44 1.595 0l1.243 1.243c.44.44.44 1.154 0 1.594z'/%3e%3cpath fill='%23F44D2C' d='m18.816 5.186-1.921 1.92 1.418 1.419 1.124-1.124c.44-.44.44-1.154 0-1.594l-.622-.621Z'/%3e%3c/svg%3e";let Q={author:G,edtior:G,expert:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3ccircle cx='12' cy='12' r='12' fill='%23FFCB37'/%3e%3ccircle cx='12' cy='12' r='10.5' fill='%23FE921D'/%3e%3cpath fill='white' d='M11.443 5.137a.6.6 0 0 1 1.114 0l1.436 3.577a.6.6 0 0 0 .516.375l3.846.26a.6.6 0 0 1 .344 1.06l-2.958 2.471a.6.6 0 0 0-.197.607l.94 3.738a.6.6 0 0 1-.9.655l-3.265-2.05a.6.6 0 0 0-.638 0l-3.265 2.05a.6.6 0 0 1-.9-.655l.94-3.738a.6.6 0 0 0-.198-.607L5.3 10.41a.6.6 0 0 1 .344-1.06l3.846-.26a.6.6 0 0 0 .517-.375z'/%3e%3c/svg%3e","fact-check":"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath fill='%2300C076' d='M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16'/%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='m11.946 5.466-5.28 4.8-2.4-2.182'/%3e%3c/svg%3e",medical:W},PopupExpert=({trackingCategory:e="Together",locale:t,isOpen:a=!0,onClose:l,enableAnimation:r=!0,expertId:o,overwriteProfileProps:i,avatarFallback:s=w.C.getAssetPath("avatar.jpg")})=>{let{t:c}=(0,h.u)(),[d,m]=(0,n.useState)(null),[p,u]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{if(a&&o&&String(null==d?void 0:d.user_id)!==String(o)){u(!0);try{m(null),(0,C.c)((0,C.g)(P.D9.GET_EXPERT_BY_ID,{id:o}),"get").then(e=>{m(Object.assign(Object.assign({},null==e?void 0:e.data),i))})}catch(e){console.error(e)}u(!1)}},[a,o,null==d?void 0:d.user_id]),n.createElement(n.Fragment,null,n.createElement(V,{"data-open":a,"data-animation":r,onClick:e=>e.stopPropagation()},p||!d?n.createElement(z.L,null):n.createElement("div",{className:"popup-content"},n.createElement("div",{className:"close-button",onClick:l},n.createElement("img",{src:R,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),n.createElement("div",{className:"main-info"},n.createElement("div",{className:"border-banner"}),n.createElement("div",{className:"avatar-title"},n.createElement(Z,null,n.createElement("div",{className:"image-container"},n.createElement("div",{style:{position:"relative"}},n.createElement(y.I,{src:null==d?void 0:d.avatar,className:"profile-image",alt:"avatar",backupSrc:s}),n.createElement("img",{className:"badge-avatar",src:Q[null==d?void 0:d.role],alt:"badge",loading:"lazy"})))),n.createElement(q,null,n.createElement(S.T,{size:"s3",className:"full-name",weight:"semiBold"},null==d?void 0:d.display_name),n.createElement("div",null,n.createElement(S.T,{size:"p4",color:N.r.colors.gray800},null==d?void 0:d.specialty," • "),n.createElement("a",{href:null==d?void 0:d.organisation_url,className:"organisation",target:"_blank",rel:"noreferrer"},n.createElement(S.T,{size:"p4",className:"organisation",color:N.r.colors.gray800,style:{textDecoration:"underline"}},null==d?void 0:d.organisation)))))),n.createElement(q,null,n.createElement("div",{className:"experience"},n.createElement(S.T,{weight:"bold",size:"p4",color:N.r.colors.gray800,style:{paddingBottom:16}},c("expert.content.description").toUpperCase()),n.createElement("div",{className:"list-items"},null!=d&&!!d.experiences&&d.experiences.filter(e=>!!(e&&(e.title||e.organization))).slice(0,3).map((e,t)=>n.createElement(Y,{key:t},n.createElement("img",{className:"bullet-point",src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3ccircle cx='12' cy='12' r='2' fill='%232D87F3'/%3e%3c/svg%3e",alt:"point",loading:"lazy"}),n.createElement("div",{className:"text-contain"},n.createElement(D.H,{tag:"h6",color:N.r.colors.gray800},null==e?void 0:e.title),n.createElement(S.T,{size:"p2",color:N.r.colors.gray500},null==e?void 0:e.organization))))),n.createElement("a",{href:null==d?void 0:d.profile_url,style:{display:"inline-block",paddingTop:24}},n.createElement(S.T,{as:"span",size:"s4",color:"#2D87F3","data-event-category":e,"data-event-action":"See Full Doctor Profile","data-event-label":(0,C.l)(t)+(null==d?void 0:d.profile_url)},c("home.seeExpert"))))))),n.createElement(U,{"data-open":a,onClick:e=>{e.stopPropagation(),l()}}))},K=T.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${N.r.colors.white}; border-radius: ${N.r.borderRadius}; box-shadow: 0px 0px 4px ${N.r.colors.gray200}; transform: translate(-50%, -50%); transition: all 0.5s ease-in-out; ${b.M.tdUp} { width: 750px; } &[data-animation='true'] { transition: all 0.5s ease-in-out; } &[data-open='true'] { z-index: 400; top: 50%; opacity: 1; visibility: visible; } &[data-open='false'] { top: -50%; } .popup-content { ${b.M.mbDown} { display: block; } display: flex; position: relative; z-index: 111; height: 100%; .button-see-more { margin: 32px 0; padding: 0; > * { display: inline-block; } } .close-button { position: absolute; z-index: 100; top: 10px; right: 10px; cursor: pointer; width: unset; height: unset; img { width: 100%; height: 100%; border-radius: 50%; } } } .main-info { padding-bottom: 32px; background-color: ${N.r.colors.primary50}; border-radius: ${N.r.borderRadius}; .btn-booking { display: flex; margin: 12px auto; } .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,X=T.Z.div` position: fixed; z-index: 110; top: 0; left: 0; width: 100%; height: 100%; align-items: center; background: rgba(38, 38, 38, 0.3); &[data-open='false'] { display: none; } `,J=T.Z.div` .image-container { .badge-avatar { position: absolute; right: 0; bottom: 0; top: 0; } } display: flex; justify-content: center; padding-bottom: 15px; text-align: center; .profile-image { width: 100px; min-width: 100px; height: 100px; min-height: 100px; border-radius: 50%; object-fit: cover; } .badge-avatar { width: 24px; height: 24px; } `,ee=T.Z.div` position: relative; z-index: 9; .specialty { display: block; min-width: 240px; } padding: 0px 16px; text-align: center; .specialty { justify-content: center; } .experience { padding: 16px 0px 32px; text-align: left; .btn-wrapper { margin-top: 24px; } } p { max-width: 100%; } `,PopupHospital=({isOpen:e=!0,onClose:t,enableAnimation:a=!0,hospitalId:l,locale:r,isMobile:o,overwriteProfileProps:i,avatarFallback:s=w.C.getAssetPath("avatar.jpg"),trackingCategory:c="Together"})=>{let{t:d}=(0,h.u)(),[m,p]=(0,n.useState)(null),[u,g]=(0,n.useState)(!1);(0,n.useEffect)(()=>{if(e&&l&&String(null==m?void 0:m.id)!==String(l)){g(!0);try{p(null),(0,C.c)((0,C.b)(P.tC.GET_HOSPITAL_INFO,{hospital_branch_id:l,website_url:C.m[r]}),"get").then(e=>{p(Object.assign(Object.assign({},null==e?void 0:e._data.branch),i))})}catch(e){console.error(e)}g(!1)}},[e,l,null==m?void 0:m.id]);let b=(null==m?void 0:m.specialties)||[],v=(0,n.useMemo)(()=>b.map(e=>e.name),[b]);return n.createElement(n.Fragment,null,n.createElement(K,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},u||!m?n.createElement(z.L,null):n.createElement("div",{className:"popup-content"},n.createElement("div",{className:"close-button",onClick:t},n.createElement("img",{src:R,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),n.createElement("div",{className:"main-info"},n.createElement("div",{className:"border-banner"}),n.createElement("div",{className:"avatar-title"},n.createElement(J,null,n.createElement("div",{className:"image-container"},n.createElement("div",{style:{position:"relative"}},n.createElement(y.I,{src:null==m?void 0:m.logo,className:"profile-image",alt:"avatar",backupSrc:s}),n.createElement("img",{className:"badge-avatar",src:W,alt:"badge",loading:"lazy"})))),n.createElement(ee,null,n.createElement(S.T,{size:"s3",weight:"semiBold",className:"full-name"},null==m?void 0:m.name),n.createElement("div",{className:"specialty"},b&&n.createElement(S.T,{size:"p4",color:N.r.colors.gray800},v.join(" • "),"•"),n.createElement("a",{href:(0,C.n)({id:m.id,name:m.name,slug:m.slug,locale:r}),className:"organisation",target:"_blank",rel:"noreferrer"},n.createElement(S.T,{size:"p4",className:"organisation",color:N.r.colors.gray800,style:{textDecoration:"underline"}},null==m?void 0:m.name))))),!o&&n.createElement("a",{href:(0,C.n)({id:m.id,name:m.name,slug:m.slug,locale:r})},n.createElement("div",{className:"btn-wrapper"},n.createElement(k.B,{color:"primary",size:"md",className:"btn-booking"},d("careBooking.bookAnAppointment"))))),n.createElement(ee,null,n.createElement("div",{className:"experience"},n.createElement(S.T,{weight:"bold",size:"s3",color:N.r.colors.gray800,style:{paddingBottom:16}},d("hospital.content.description").toUpperCase()),n.createElement(S.T,{size:"p2",color:N.r.colors.gray500},m.about),o?n.createElement("a",{href:(0,C.n)({id:m.id,name:m.name,slug:m.slug,locale:r})},n.createElement("div",{className:"btn-wrapper"},n.createElement(k.B,{color:"primary",size:"md",className:"btn-booking"},d("careBooking.bookAnAppointment")))):n.createElement("a",{href:(0,C.n)({id:m.id,name:m.name,slug:m.slug,locale:r})},n.createElement(S.T,{size:"s4",color:"#2D87F3",as:"span","data-event-category":c,"data-event-action":"See Full Hospital Profile","data-event-label":(0,C.l)(r)+(0,C.n)({id:m.id,name:m.name,slug:m.slug,locale:r})},d("home.seeHospital"))))))),n.createElement(X,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))},ProfileDetailModal=({open:e,onClose:t,children:a,profileModalProps:l})=>{let{t:r}=(0,h.u)();return n.createElement(O.M,Object.assign({title:r("profilePanel.modal.heading"),titleProps:!0,className:"_2UKyiK1",opened:e,onClose:t,overlayOpacity:.2,overflow:"inside",transitionProps:{transition:"slide-left"},styles:{header:{borderBottom:0},inner:{padding:0,justifyContent:"flex-end"},modal:{height:"100%",borderRadius:0},body:{maxHeight:"100%"},content:{maxHeight:"100%",height:"100%",borderRadius:0}}},l),a)};p().extend(g());let CardAuthor=e=>{let{className:t="",community:o,name:m,username:p,url:u,avatar:g,role:E,title:x,userType:k="user",expertId:S,specialty:T,organisation:P,isMarryBaby:z,doctorId:D,hospitalId:O,hasQuickBooking:j,handleMakeAppointment:I,communityTrackingAttr:$,isAnonymous:B,showDetailPopup:H,showChatbotButton:M=!1,subLine:_,authActionWrapper:R,profileProps:W,profileModalProps:V,extendEle:U,avatarProps:Z,hideInfo:q,timeText:Y,onCloseFromPost:G,onChatWithBot:Q,avatarIcon:K,badgeIconSize:X,hideBackground:J,children:ee,styles:et,dataEventCategory:ea,dataEventAction:en,dataEventLabel:el}=e,{data:{locale:er,router:eo,env:{isMarryBaby:ei,togetherBasePath:es}}}=(0,n.useContext)(C.T),{isMobile:ec}=(0,y.u)(),{t:ed}=(0,h.u)(),{classes:em}=A(void 0,{name:"CardAuthor",styles:et}),ep="boolean"==typeof z?z:ei,eu=ep?"marryBaby":"helloSites",eg=B?ed("cardPost.anonymous"):m||p||"",eh=B?w.C.getAssetPath("avatar.jpg"):g,eb=B?void 0:E,[ev,ef]=(0,n.useState)(!1),{asPath:eE}=eo||{},ex=`https://${L.v[er]}${eE}`,onAuthorClick=()=>{if(B)return!1;H?ew(!0):u&&(window.location.href=u)};(0,n.useEffect)(()=>{(0,b.t)(ev)},[ev]);let[ey,ew]=(0,n.useState)(!1),eC=(null==e?void 0:e.role)==="expert",ek=!!(D||O),eS=["expert"===eb&&P&&n.createElement("span",null,P),"expert"===eb&&T&&n.createElement("span",null,T),!("expert"===eb&&T&&P)&&(null==o?void 0:o.name)&&n.createElement("a",Object.assign({href:(null==o?void 0:o.slug)&&o.isActive&&!o.isHidden?`${es}/${null==o?void 0:o.slug}/`:void 0,className:"author-community-name"},$),`${null==o?void 0:o.name}`),Y&&n.createElement("span",null,Y)].filter(Boolean),[eN,eT]=(0,n.useState)(null);return(0,n.useEffect)(()=>{ey&&!eN&&("chatbot"===k?Promise.all([a.e(5231),a.e(8299),a.e(9265),a.e(5454),a.e(106),a.e(9803),a.e(5349),a.e(4148),a.e(2509),a.e(1533),a.e(1108),a.e(9124),a.e(4190),a.e(6535),a.e(4447),a.e(6509),a.e(8261),a.e(8674),a.e(4125),a.e(1657),a.e(7730),a.e(137),a.e(4414),a.e(1079),a.e(7613),a.e(8098),a.e(3416),a.e(3012),a.e(1570),a.e(6192),a.e(6918),a.e(5965),a.e(3301),a.e(1413)]).then(a.bind(a,"m3fh")).then(e=>{eT(()=>e.ProfileChatbot)}):Promise.all([a.e(9409),a.e(6259),a.e(1818),a.e(7519),a.e(761),a.e(2189),a.e(5231),a.e(8299),a.e(9265),a.e(5454),a.e(106),a.e(9803),a.e(5349),a.e(4148),a.e(2509),a.e(1533),a.e(1108),a.e(9124),a.e(4190),a.e(6535),a.e(4447),a.e(6509),a.e(8261),a.e(8674),a.e(4125),a.e(1657),a.e(7730),a.e(137),a.e(4414),a.e(1079),a.e(7613),a.e(8098),a.e(3416),a.e(3012),a.e(1570),a.e(6192),a.e(6918),a.e(5965),a.e(3301),a.e(1413)]).then(a.bind(a,"aUqw")).then(e=>{eT(()=>e.ProfileDetail)}))},[ey,k]),n.createElement(F.Provider,{value:{displayName:eg,title:x,role:eb,siteType:eu,handleMakeAppointment:I,doctorId:D,hospitalId:O,currentUrl:ex}},n.createElement(ProfileDetailModal,{open:ey,onClose:()=>ew(!1),profileModalProps:V},eN&&n.createElement(eN,Object.assign({currentPageUrl:el,authActionWrapper:R,onCloseFromPost:()=>{ew(!1),null==G||G()},onChatWithBot:Q},W,{authorProps:Object.assign({userId:null==e?void 0:e.userId,avatar:eh,name:null==e?void 0:e.name,role:null==e?void 0:e.role,title:null==e?void 0:e.title,doctorId:D,hospitalId:O,hasQuickBooking:j,userType:k},null==W?void 0:W.authorProps)}))),"expert"===eb&&S?n.createElement(PopupExpert,{isOpen:ev,onClose:()=>ef(!1),expertId:S}):null,"expert"===eb&&D?n.createElement(PopupDoctor,{isOpen:ev,onClose:()=>ef(!1),doctorId:D,locale:er}):null,"expert"===eb&&O?n.createElement(PopupHospital,{isOpen:ev,onClose:()=>ef(!1),hospitalId:O,locale:er}):null,n.createElement("div",{className:`hhg-card-author ${em.root} ${t} ${eC?"expert-author":""}`,"data-background":!J&&eC,"data-is-marrybaby":ep},n.createElement(CardAuthor$1,{dataEventCategory:ea,dataEventAction:en,dataEventLabel:el,onAvatarClick:onAuthorClick,avatarProps:Object.assign(Object.assign({avatar:B?w.C.getAssetPath(ep?"anomyous-avatar-1.svg":"anomyous-avatar.svg"):eh,username:eg},Z),{style:{cursor:!B&&(u||H)?"pointer":"default"}}),avatarIcon:K||eC&&n.createElement(l.Z,{size:X||15})},ee?n.createElement("div",{onClick:onAuthorClick},ee):!q&&n.createElement(CardAuthor$1.Row,null,n.createElement(CardAuthor$1.ColLeft,null,n.createElement(s.k,{align:"center",onClick:onAuthorClick},n.createElement(CardAuthor$1.MainText,{onClick:onAuthorClick},eg,"chatbot"===k?n.createElement(n.Fragment,null," ",n.createElement(r.Z,{color:N.r.colors.primaryBase,size:16,style:{display:"inline-block",transform:"translate(0, 2px)"}}),M&&n.createElement("div",{style:{marginTop:"8px"}},n.createElement(c.z,{color:"primary",size:"xs",variant:"filled",type:"button",leftIcon:n.createElement(f.I.App,{size:16}),onClick:()=>{null==Q||Q()}},ed("chatbot.with.me")))):n.createElement(AuthorBadgeItem,null))),_||n.createElement(CardAuthor$1.SubTextRow,{style:j?{position:"relative"}:{}},eS.map((e,t)=>n.createElement(n.Fragment,null,0!==t&&n.createElement(CardAuthor$1.SubDivider,null),n.createElement(CardAuthor$1.SubText,null,e))),j&&ek&&n.createElement(i.x,{sx:{marginTop:(0,d.h)(5)}},n.createElement(v.B,{bookingId:D||O,bookingType:D?"doctor":O?"hospital":void 0,size:ec?"xs":"sm"})))))),U&&U))};CardAuthor.MainText=CardAuthor$1.MainText,CardAuthor.SubText=CardAuthor$1.SubText,CardAuthor.SubTextRow=CardAuthor$1.SubTextRow,CardAuthor.SubDivider=CardAuthor$1.SubDivider,CardAuthor.AuthorBadge=AuthorBadgeItem,CardAuthor.DisplayName=()=>{let{displayName:e}=(0,n.useContext)(F);return n.createElement(i.x,null,e)}},"1HPA":function(e,t,a){a.d(t,{B:function(){return u},F:function(){return h},G:function(){return g},S:function(){return d},a:function(){return fetchSSOV2ApiJson},c:function(){return checkUserExist},f:function(){return fetchSSOV2Api},g:function(){return getUserInfo},h:function(){return handleAuthSuccess},l:function(){return m},r:function(){return resetPassword},u:function(){return updateUserInfo},w:function(){return p}});var n=a("T/vS"),l=a("GOBr"),r=a("Rnw3"),o=a("qFhO"),i=a("27Mu"),s=a("375z"),c=a("xrdX");let d={LOGIN_BY_SOCIAL:"member/social-login",EMAIL:{REGISTER_BY_SEND_OTP:"login/login-with-email",LOGIN_BY_PASSWORD:"member/login",VERIFY_BY_OTP:"login/email-verify-code",SEND_OTP:"login/email-resend-otp-code"},PHONE:{REGISTER_BY_SEND_OTP:"login/login-with-sms",SEND_OTP:"login/sms/sent-otp",VERIFY_BY_OTP:"login/phone-verify-code",LOGIN_BY_PASSWORD:"member/login-by-phone",UPDATE_PHONE_SEND_OTP:"login/sms-social/sent-otp",UPDATE_PHONE_VERIFY_OTP:"login/sms-social/phone-verify-code"},WHATSAPP:{LOGIN_OTP_WHATSAPP:"login/login-otp-whatsapp",REGISTER_BY_SEND_OTP:"login/login-with-whatsapp",SEND_OTP:"login/whatsapp/sent-otp",UPDATE_PHONE_SEND_OTP:"login/sms-social/whatsapp/sent-otp",UPDATE_PHONE_VERIFY_OTP:"login/sms-social/whatsapp-verify-code",VERIFY_BY_OTP:"login/whatsapp-verify-code"},ZALO:{REGISTER_BY_SEND_OTP:"login/login-with-zalo",SEND_OTP:"login/zalo/sent-otp",VERIFY_BY_OTP:"login/zalo-verify-code",UPDATE_PHONE_SEND_OTP:"login/sms-social/zalo/sent-otp",UPDATE_PHONE_VERIFY_OTP:"login/sms-social/zalo-verify-code"},RESET_PASSWORD:"login/reset-password",CHECK_USER_EXIST:"member/check-user-exist",UPDATE_USER_INFO:"login/update-first-info",SETUP_USER_INFO:"login/setup-first-info",ECOM_CARE:{SEND_OTP:"login/ecom-care/send-email-otp-code",VERIFY_OTP:"login/ecom-care/email-verify-code",RESEND_OTP:"login/ecom-care/resend-email-otp-code"}},m="vi-VN",p={[s.L.Vietnam]:"1",[s.L.Indonesia]:"2",[s.L.Malaysia]:"3"}[m];o.L[m].PHONE;let getSSOV2ApiUrl=e=>(0,r.e)(`${(0,r.a)(m)}/api/v2/${e}`),getSSOApiUrl=e=>(0,r.e)(`${(0,r.a)(m)}/api/${e}`),u="hhg_user_token",fetchSSOV2Api=(e,t={},a)=>(0,n._)(void 0,void 0,void 0,function*(){var n;let l;let r=a?"":null===(n=document.cookie.split("; ").find(e=>e.startsWith(u)))||void 0===n?void 0:n.split("=")[1];try{t.body instanceof FormData&&(t.body.append("ga_client_id",(0,i.ej)("_ga")||""),t.body.append("referrer",window.location.href)),l=yield fetch(getSSOV2ApiUrl(e),r?Object.assign(Object.assign({},t),{headers:Object.assign({Authorization:`Bearer ${r}`},null==t?void 0:t.headers)}):t)}catch(e){return console.error(e),null}return null==l?void 0:l.json()}),fetchSSOV2ApiJson=(e,t,a)=>(0,n._)(void 0,void 0,void 0,function*(){var n;let l;let r=a?"":null===(n=document.cookie.split("; ").find(e=>e.startsWith(u)))||void 0===n?void 0:n.split("=")[1];try{l=yield fetch(getSSOV2ApiUrl(e),{method:"POST",headers:Object.assign({Accept:"application/json","Content-Type":"application/json"},r?{Authorization:`Bearer ${r}`}:{}),body:JSON.stringify(t)})}catch(e){return console.error(e),null}return null==l?void 0:l.json()}),fetchSSOApi=(e,t={},a)=>(0,n._)(void 0,void 0,void 0,function*(){var n;let l;let r=a?"":null===(n=document.cookie.split("; ").find(e=>e.startsWith(u)))||void 0===n?void 0:n.split("=")[1];try{l=yield fetch(getSSOApiUrl(e),r?Object.assign(Object.assign({},t),{headers:Object.assign({Authorization:`Bearer ${r}`},null==t?void 0:t.headers)}):t)}catch(e){return console.error(e),null}return null==l?void 0:l.json()}),resetPassword=(e,t)=>(0,n._)(void 0,void 0,void 0,function*(){let a=new FormData;return a.append("password",e),a.append("confirm-password",t),fetchSSOV2Api(d.RESET_PASSWORD,{method:"POST",body:a})}),checkUserExist=({email:e,phone:t})=>(0,n._)(void 0,void 0,void 0,function*(){let a=new FormData;return e?a.append("email",e):a.append("phone_number",t),fetchSSOV2Api(d.CHECK_USER_EXIST,{method:"POST",body:a})}),updateUserInfo=e=>(0,n._)(void 0,void 0,void 0,function*(){let t=new FormData;return Object.keys(e).forEach(a=>{let n=e[a];null!=n&&("string"!=typeof n||n.trim())&&t.append(a,e[a])}),fetchSSOV2Api(d.SETUP_USER_INFO,{method:"POST",body:t})}),g=l.y?"289442006438-040a42cbidr6v5d178f3iqi9q95821r3.apps.googleusercontent.com":"289442006438-cihobuq1h3r4426pur7u0e43fqdnep59.apps.googleusercontent.com",h="2759888574045636",getUserInfo=()=>(0,n._)(void 0,void 0,void 0,function*(){return fetchSSOApi("user/profile",{method:"POST"})}),handleAuthSuccess=e=>{(null==e?void 0:e.token)&&(0,i.d8)(u,e.token,{domain:"localhost"===window.location.hostname?"localhost":`.${c.v[m]}`,expires:new Date(1e3*e.expire_in).toUTCString()}),(null==e?void 0:e.refresh_token)&&(0,i.d8)(o.k,e.refresh_token,{domain:"localhost"===window.location.hostname?"localhost":`.${c.v[m]}`})}},t280:function(e,t,a){a.d(t,{P:function(){return PillCarousel}});var n=a("T/vS"),l=a("q1tI"),r=a("rBCA"),o=a("0dn/"),i=a("iBNF"),s=a("FfBq"),c=a("cFN4"),d=a("375z"),m=a("SMDy");let p=r.Z.div` display: inline-flex; overflow: hidden; width: ${e=>e.size}px; height: ${e=>e.size}px; box-sizing: border-box; align-items: center; justify-content: center; border: 1px solid #e4e8ec; background-color: ${e=>e.backgroundColor||i.r.colors.white}; border-radius: ${e=>e.borderRadius||"50%"}; & > * { width: ${e=>e.iconSize}px; height: ${e=>e.iconSize}px; } `,u=r.Z.div` display: inline-block; height: 108px; background-color: ${i.r.colors.white}; border-radius: 60px; cursor: pointer; &.selected-week-pill { background-color: ${i.r.colors.pink100}; } & > div:first-child { margin: 4px 4px 0; } & > p { margin-top: 8px; text-align: center; } & > * { pointer-events: none; } `,g=[d.L.Myanmar,d.L.Taiwan],h=(0,r.Z)(e=>{var{icon:t,name:a,className:r,locale:d="en-PH",dataEventCategory:m,dataEventAction:h,dataEventLabel:b,onSelect:v}=e,f=(0,n.a)(e,["icon","name","className","locale","dataEventCategory","dataEventAction","dataEventLabel","onSelect"]);let E=(0,l.useMemo)(()=>null==r?void 0:r.includes("selected-week-pill"),[r]);return l.createElement(u,Object.assign({onClick:v,className:r?"week-pill".concat(" non-pointer-event-child ",r):"week-pill non-pointer-event-child","data-event-category":m,"data-event-action":h,"data-event-label":b},f),l.createElement(p,{size:64,iconSize:40,backgroundColor:i.r.colors.white},l.createElement(s.I,{src:t||o.C.getAssetPath("week_default.png"),alt:`week ${a}`})),E?l.createElement(c.T,Object.assign({type:"semiBold",size:"n1",color:i.r.colors.gray800},g.includes(d)&&{style:{fontSize:"10px"}}),a):l.createElement(c.T,Object.assign({size:"n1",color:i.r.colors.gray600},g.includes(d)&&{style:{fontSize:"10px"}}),a))})` box-shadow: 0px 0px 24px rgba(0, 0, 0, 0.08); `,b=(0,r.Z)(m.f.Slide)` cursor: pointer; > div * { pointer-events: none; } `,v=(0,r.Z)(m.f)` .centerred-pill-wrapper { padding: 16px 0; } `,PillCarousel=e=>{var{data:t,isMobile:a,onSlideChange:r,pillProps:o,locale:i=d.L.Vietnam,blurFromIndex:s,blurLength:c}=e,m=(0,n.a)(e,["data","isMobile","onSlideChange","pillProps","locale","blurFromIndex","blurLength"]);let[p,u]=(0,l.useState)("");return(0,l.useEffect)(()=>{u(window.location.href)},[]),l.createElement(v,Object.assign({},{withControls:!a,slideGap:16,blurFromCenter:!0,blurFromIndex:s||(a?2:4),blurLength:c||(a?1:3),onSlideChange:r},m,{selectSlideWhenClick:!0,previousControlIcon:l.createElement(Arrow,{currentUrl:p}),nextControlIcon:l.createElement(Arrow,{currentUrl:p,isRight:!0})}),e=>t.map((t,a)=>l.createElement(b,Object.assign({key:a,onClick:r,"data-event-category":"Health Tool","data-event-action":"Pregnancy Week Click","data-event-label":p,innerSlideProps:{"data-event-category":"Health Tool","data-event-action":"Pregnancy Week Click","data-event-label":p}},o),l.createElement("div",{className:"centerred-pill-wrapper"},l.createElement(h,{"data-event-category":"Health Tool","data-event-action":"Fetal Week Click","data-event-label":p,locale:i,name:t.name,icon:t.icon,className:a===e?"selected-week-pill pointer-event-child-none":"pointer-event-child-none"})))))},Arrow=({isRight:e,currentUrl:t})=>l.createElement("svg",{viewBox:"0 0 15 15",fill:"none",width:"16",height:"16",style:e?{transform:"rotate(-90deg)"}:{transform:"rotate(90deg)"},"data-event-category":"Health Tool","data-event-action":"Pregnancy Week Arrow Click","data-event-label":t,className:"pointer-event-child-none"},l.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))},hEXI:function(e,t,a){a.d(t,{A:function(){return ArrowRightBlue},C:function(){return Clinic},D:function(){return DoctorExpertiseItem},I:function(){return InsuranceList},P:function(){return PaymentList},a:function(){return DoctorInfoExpertise}});var n=a("q1tI"),l=a("rBCA"),r=a("iBNF"),o=a("cFN4"),i=a("xXM3"),s=a.n(i),c=a("FfBq"),d=a("dDw1");let ArrowRightBlue=e=>n.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 6 10",fill:"none"},e),n.createElement("path",{d:"M1 9L5 5L1 1",stroke:"#2D87F3",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round"})),Clinic=e=>n.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none"},e),n.createElement("path",{d:"M4.89646 16.9996H2.96549C2.43225 16.9996 2 16.5674 2 16.0341V12.6549C2 12.1217 2.43225 11.6895 2.96549 11.6895H4.89646",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("path",{d:"M15.0342 11.6895H16.9652C17.4984 11.6895 17.9306 12.1217 17.9306 12.6549V16.0341C17.9306 16.5674 17.4984 16.9996 16.9652 16.9996H15.0342",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("path",{d:"M5.86197 3H14.0686C14.6015 3 15.0341 3.43263 15.0341 3.96549V16.9995H4.89648V3.96549C4.89648 3.43263 5.32912 3 5.86197 3Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("path",{d:"M11.172 13.6206H8.7583V16.9998H11.172V13.6206Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("path",{d:"M9.96533 9.99996V5.65527",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("path",{d:"M12.1377 7.82764H7.79297",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})),m=l.Z.ul` display: grid; grid-gap: 16px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); list-style: none; `,p=l.Z.li` p { margin-top: 8px; text-align: center; } .insuranceLogo { display: grid; height: 58px; border: 1px solid ${r.r.colors.neutral200}; border-radius: 6px; place-content: center; > img { width: 93px; height: 43px; object-fit: contain; } } `,InsuranceList=({insurances:e,className:t,isName:a=!0})=>e.length?n.createElement(m,{id:"insurance-list",className:t},e.map(e=>n.createElement(p,{className:"insuranceItem",key:e.id},n.createElement("div",{className:"insuranceLogo"},n.createElement("img",{src:e.logo,alt:e.name||"insurance-logo"})),a&&n.createElement(o.T,{size:"base",color:r.r.colors.gray500,type:"bold"},e.name)))):null,u=l.Z.div` display: flex; flex-wrap: wrap; gap: 7px; &.paymentList { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); justify-content: center; } `,g=l.Z.div` border: 1px solid ${r.r.colors.neutral100}; border-radius: 12px; width: 80px; min-height: 80px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; &.payment-item-mobile { width: 100%; } .logo { position: relative; width: 55px; aspect-ratio: 55 / 32; object-fit: contain; } .txt-caption-1 { font-size: 0.6875rem; line-height: 1rem; color: ${r.r.colors.gray800}; } `,PaymentList=({payments:e,className:t,isName:a=!0,isMobile:l=!1})=>e.length?n.createElement(u,{id:"payment-container",className:s()(t,{paymentList:l&&e.length>=4})},e.map(t=>n.createElement(g,{className:s()("payment-item",{"payment-item-mobile":l&&e.length>=4}),key:t.id},n.createElement(c.I,{className:"logo",src:t.logo,alt:t.name}),a&&n.createElement("div",{className:"txt-caption-1"},t.name)))):null,h=l.Z.div` display: flex; gap: 8px; .icon { width: 1.25rem; height: 1.25rem; color: ${r.r.colors.gray400}; flex-shrink: 0; } .doctor-info-item-content { display: flex; flex-direction: column; gap: 10px; } `;(0,l.Z)(Clinic)` width: 1.25rem; height: 1.25rem; `;let b=l.Z.div` display: flex; flex-direction: column; gap: 4px; `,DoctorExpertiseItem=e=>{let{doctorInfo:t,Icon:a,title:l}=e;return n.createElement(h,null,n.createElement(a,{className:"icon"}),n.createElement(b,null,n.createElement(d.T,{size:"p3",weight:"semiBold",color:"#111111"},l),n.createElement("div",{className:"doctor-info-item-content"},(Array.isArray(t)?t:[t]).map(e=>n.createElement(d.T,{size:"p3",weight:"regular",key:e},e)))))},v=l.Z.div` display: flex; padding: 1rem; width: 100%; justify-content: space-between; `,f=l.Z.div` display: flex; flex-direction: column; gap: 2px; `,DoctorInfoExpertise=e=>{let{name:t,specialty:a,experience:l,profileImage:r}=e;return n.createElement(v,null,n.createElement(f,null,n.createElement(d.T,{size:"title2",weight:"semiBold",color:"#111111"},t),n.createElement("div",null,a&&n.createElement(d.T,{size:"c1",weight:"regular"},a),l&&n.createElement(d.T,{size:"c1",weight:"regular"},l))),n.createElement(c.I,{src:r,alt:t,style:{width:"4.5rem",height:"4.5rem",borderRadius:"50%",objectFit:"cover",flexShrink:0}}))}},CqaS:function(e,t,a){a.d(t,{C:function(){return Checkbox},I:function(){return ImageWrapV2},P:function(){return Pagination},S:function(){return w},a:function(){return f},b:function(){return SearchInput},c:function(){return Search2}});var n=a("q1tI"),l=a("rBCA"),r=a("un+D"),o=a("iBNF"),i=a("T/vS"),s=a("NIaq"),c=a("xrdX"),d=a("Z+18"),m=a("SMDy"),p=a("3rb+");let Search2=e=>n.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 24 25",fill:"none"},e),n.createElement("path",{d:"M11 18.957C14.866 18.957 18 15.823 18 11.957C18 8.09104 14.866 4.95703 11 4.95703C7.13401 4.95703 4 8.09104 4 11.957C4 15.823 7.13401 18.957 11 18.957Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("path",{d:"M20 20.957L16 16.957",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),u=l.Z.div` display: flex; cursor: pointer; &[data-theme='marryBaby'] { input { width: 20px; height: 20px; border: 1.3px solid ${o.r.mbColors.midGray}; border-radius: 9px; cursor: inherit; transition: border-color 0.4s, box-shadow 0.4s; &:hover, &:active { border-color: ${o.r.mbColors.cobalt}; box-shadow: 0 0 2px 2px ${o.r.mbColors.cobalt}; } &:focus-visible { border: 2px solid ${o.r.mbColors.cobalt}; } &:checked { border: 0; background: ${o.r.mbColors.cobalt} url("data:image/svg+xml,%3Csvg width='9' height='7' viewBox='0 0 9 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.5 4L3.45455 6L8 1' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A") no-repeat center center; } } label { max-width: 15rem; margin-left: 8px; width: calc(100% - 24px); cursor: inherit; font-weight: 600; font-size: 12px; line-height: 20px; letter-spacing: -0.2px; color: ${o.r.mbColors.gray}; } } input { width: 20px; height: 20px; border: solid 1px ${o.r.colors.gray500}; border-radius: 2px; cursor: inherit; transition: border-color 0.4s, box-shadow 0.4s; &:hover, &:active { border-color: ${o.r.colors.primaryBase}; box-shadow: 0 0 2px 2px ${o.r.colors.primary200}; } &:focus-visible { border: 2px solid ${o.r.colors.primaryActive}; } &:checked { border: 0; background: ${o.r.colors.primaryBase} url("data:image/svg+xml,%3Csvg width='12' height='9' viewBox='0 0 12 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 1L4.125 8L1 4.81819' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A") no-repeat center center; } } label { max-width: 15rem; margin-left: 8px; font-weight: ${o.r.sizes.fwRegular}; width: calc(100% - 24px); cursor: inherit; ${r.M.mbDown} { font-size: 14px; line-height: 24px; } ${r.M.mbUp} { font-size: 16px; line-height: 22px; } } &[data-is-rectangle] > input { position: relative; width: unset; height: unset; padding: 5px 12px; border: 1px solid ${o.r.colors.neutral100}; border-radius: 32px; &::after { color: ${o.r.colors.gray800}; content: attr(data-label-text); font-size: 13px; } &:checked { border-color: ${o.r.colors.primary50}; &::after { color: ${o.r.colors.primaryBase}; } } &:checked { background: ${o.r.colors.primary50}; } } &[data-disabled] { color: ${o.r.colors.gray300}; cursor: not-allowed; input { border-color: ${o.r.colors.gray300}; &:hover { border-color: ${o.r.colors.gray300}; box-shadow: none; } } } `,Checkbox=({label:e,name:t,checked:a,className:l,isDisabled:r,onChange:o,value:i,isRectangle:s,inputDataTestId:c,siteType:d})=>n.createElement(u,{className:l,"data-disabled":r||void 0,"data-is-rectangle":s||void 0,"data-label-text":e,"data-theme":d},n.createElement("input",{type:"checkbox",checked:a,name:t,onChange:()=>o(i,!a),disabled:r,value:i,id:`${t}-${i}`,"data-label-text":e,"data-testid":c}),!s&&n.createElement("label",{htmlFor:`${t}-${i}`},e)),g=l.Z.div` display: flex; align-items: center; justify-content: space-between; user-select: none; li { transition: all 0.3s ease; } [data-page-active] { background: ${o.r.colors.primaryBase}; color: ${o.r.colors.white}; > a { color: ${o.r.colors.white}; } } `,h=l.Z.div` display: flex; width: 32px; height: 32px; box-sizing: border-box; align-items: center; justify-content: center; border: 1px solid ${o.r.colors.gray200}; margin: 0 2px; border-radius: 4px; color: ${o.r.colors.gray800}; cursor: pointer; font-size: 14px; font-weight: ${o.r.sizes.fwBold}; &[data-last-page] { border: none; background-color: ${o.r.colors.gray100}; cursor: not-allowed; pointer-events: none; svg { path { stroke: ${o.r.colors.gray300}; } } } `,b=l.Z.li` display: flex; width: 32px; height: 32px; align-items: center; justify-content: center; margin: 0 2px; border-radius: 4px; color: ${o.r.colors.gray800}; cursor: pointer; font-size: 14px; font-weight: ${o.r.sizes.fwBold}; > a { color: ${o.r.colors.gray800}; text-decoration: unset; display: block; width: 100%; height: 100%; line-height: 32px; text-align: center; } `,RenderPagiWithDots=({pagesAmount:e,activePage:t,handlePageChange:a,handleClick:l,href:o,queryPageName:i="page"})=>{let s=[...Array(e)].map((e,t)=>t+1),[c,d]=(0,n.useState)(t<=4?s.slice(0,5):t>=s.length-3?s.slice(s.length-5,s.length):s.slice(t-2,t+1));return(0,n.useEffect)(()=>{t<=4?d(s.slice(0,5)):t>=s.length-3?d(s.slice(s.length-5,s.length)):d(s.slice(t-2,t+1))},[t]),n.createElement(n.Fragment,null,t>4&&n.createElement(n.Fragment,null,n.createElement(b,{onClick:()=>a(1)},o?n.createElement("a",{href:o,onClick:l},1):1),n.createElement(b,null,"...")),c.map(e=>n.createElement(b,{key:`pagination+${e}`,"data-page-active":e===t||void 0,onClick:()=>a(e)},o?n.createElement("a",{href:(0,r.f)(o,e,i),onClick:l},e):e)),ta(s.length)},o?n.createElement("a",{href:(0,r.f)(o,s.length,i),onClick:l},s.length):s.length)))},Pagination=({className:e,pagesAmount:t,currentPage:a,onChange:l,onClick:o,style:i,href:s,queryPageName:c="page"})=>{let d=[...Array(t)].map((e,t)=>t+1),[m,p]=(0,n.useState)(a),u=(0,n.useMemo)(()=>s&&s.endsWith("&page=")?s.replace("&page=",""):s,[s]),v=t-1,handlePageChange=e=>{e<=t&&e>0&&(p(e),l(e))},handleClick=e=>{o&&o(e)};return(0,n.useEffect)(()=>{p(a)},[a]),n.createElement(g,{className:e,style:i},n.createElement(h,{className:"prev-page",onClick:()=>handlePageChange(m-1),"data-last-page":1===m||void 0},u?n.createElement("a",{href:(0,r.f)(u,m,c),onClick:handleClick},n.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},n.createElement("path",{d:"M5.5 9L1.5 5L5.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))):n.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},n.createElement("path",{d:"M5.5 9L1.5 5L5.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))),d.length>8?n.createElement(RenderPagiWithDots,{pagesAmount:t,activePage:m,handlePageChange:handlePageChange,handleClick:handleClick,href:u,queryPageName:c}):d.map(e=>n.createElement(b,{key:`pagination+${e}`,"data-page-active":e===m||void 0,onClick:()=>handlePageChange(e)},u?n.createElement("a",{href:(0,r.f)(u,e,c),onClick:handleClick},e):e)),n.createElement(h,{className:"next-page",onClick:()=>handlePageChange(m+1),"data-last-page":m===v+1||void 0},u?n.createElement("a",{href:(0,r.f)(u,m,c),onClick:handleClick},n.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},n.createElement("path",{d:"M1.5 9L5.5 5L1.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))):n.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},n.createElement("path",{d:"M1.5 9L5.5 5L1.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))))},v=l.Z.div` position: relative; width: 100%; &[data-has-error] { input { border-color: ${o.r.colors.red700}; } } input { width: 100%; padding: 12px 16px; border: solid 1px ${o.r.colors.gray200}; border-radius: ${o.r.borderRadius}; &:active, &:focus, .focused & { border-color: ${o.r.colors.primaryBase}; box-shadow: 0px 0px 2px 2px ${o.r.colors.primary200}; } &:disabled { background-color: ${o.r.colors.gray100}; cursor: not-allowed; } } &[data-has-action-icon] { input { padding: 12px 48px 12px 16px; } } &[data-has-display-icon] { input { padding: 12px 16px 12px 48px; } } &[data-has-action-icon][data-has-display-icon] { input { padding: 12px 48px; } } &[data-size='lg'] { input { font-size: 16px; font-weight: ${o.r.sizes.fwRegular}; ${r.M.mbDown} { font-size: 22px; line-height: 1.2; } ${r.M.mbUp} { font-size: 26px; line-height: 1.2; } } } &[data-size='md'] { input { font-weight: ${o.r.sizes.fwRegular}; ${r.M.mbDown} { font-size: 14px; line-height: 1.2; } ${r.M.mbUp} { font-size: 16px; line-height: 1.2; } } } &[data-size='sm'] { input { font-weight: ${o.r.sizes.fwRegular}; ${r.M.mbDown} { font-size: 13px; line-height: 1.5; } ${r.M.mbUp} { font-size: 13px; line-height: 1.5; } } } `,f=n.forwardRef((e,t)=>{var{name:a,errorMessage:l,autoComplete:r="off",defaultValue:o,actionIcon:c,displayIcon:d,isDeleteAction:m,onActionClick:p,label:u,placeholder:g,className:h,onChange:b,onKeyPress:f,isDisabled:E,CustomInput:x,size:y,style:w,autoFocus:C,type:k="text",isNumerousKeyboard:S=!1,onFocus:N,enterKeyHint:T,nativeOnChange:P}=e,z=(0,i.a)(e,["name","errorMessage","autoComplete","defaultValue","actionIcon","displayIcon","isDeleteAction","onActionClick","label","placeholder","className","onChange","onKeyPress","isDisabled","CustomInput","size","style","autoFocus","type","isNumerousKeyboard","onFocus","enterKeyHint","nativeOnChange"]);let[D,O]=(0,n.useState)(o),handleOnChange=e=>{O(e),b(e)};return n.createElement(v,{"data-size":y,className:h,"data-has-action-icon":!!c||void 0,"data-has-display-icon":!!d||void 0,"data-has-error":l&&l.length>0||void 0,style:w},u&&n.createElement(s.L,{size:"label2",htmlFor:a,className:"inputLabel"},u),n.createElement("div",{style:{position:"relative"}},x||n.createElement("input",Object.assign({id:a,name:a,placeholder:g,onChange:null!=P?P:e=>handleOnChange(e.target.value),onKeyPress:f,type:k,"aria-label":k,disabled:E,value:D,autoComplete:r,ref:t,autoFocus:C,inputMode:S||"number"===k?"numeric":k,pattern:S?"[0-9]*":".*",onFocus:N,enterKeyHint:T},z)),d&&n.createElement(s.S,{className:"displayIcon"},d),c&&n.createElement(s.a,{className:"actionIcon",onClick:()=>{var e;m&&(O(""),null===(e=t.current)||void 0===e||e.focus()),p&&p()}},c)),l&&l.length>0&&n.createElement(s.b,{className:"errorLabel"},l))});f.displayName="PureInput";let E=[320,420,640,750,828,1080,1200,1440,1920,2048],defaultLoader=({src:e,width:t,quality:a,locale:n})=>{try{let l="undefined"!=typeof window?window.location.origin:c.v[n]?`https://${c.v[n]}`:"";if(!l)return e;let r=new URL(e,l);return r.searchParams.set("w",String(t)),r.searchParams.set("q",String(null!=a?a:75)),r.toString()}catch(t){return e}},ImageWrapV2=e=>{var{alt:t,backupSrc:a,src:l,placeholderSrc:r,style:o,ref:s,unoptimized:c=!1,quality:m,sizes:p,width:u}=e,g=(0,i.a)(e,["alt","backupSrc","src","placeholderSrc","style","ref","unoptimized","quality","sizes","width"]);let[h,b]=(0,n.useState)(!1),{locale:v="vi-VN"}=(0,d.u)(),f=(0,n.useMemo)(()=>c?[]:function(e){if(e.sizes)return E;if(e.width){let t=Math.max(1,Math.round(e.width));return Array.from(new Set([t,Math.min(2*t,2048)])).sort((e,t)=>e-t)}return E}({sizes:p,width:u}),[p,u,c]),y=(0,n.useMemo)(()=>{if(!c)return f.map(e=>`${defaultLoader({src:l,width:e,quality:m,locale:v})} ${e}w`).join(", ")},[c,f,l,m]),w=(0,n.useMemo)(()=>{if(c)return l;let e=f.length?f[f.length-1]:null!=u?u:1920;return defaultLoader({src:l,width:e,quality:m,locale:v})},[c,f,l,m,u]);return n.createElement(x,Object.assign({loading:"lazy",alt:t,srcSet:y,onError:()=>!h&&b(!0),src:h?a||w:w||a,style:Object.assign(Object.assign({},r?{backgroundImage:`url(${r})`}:{}),o),"data-has-placeholder":!!r,sizes:p,ref:s},g))},x=l.Z.img` &[data-has-placeholder='true'] { background-position: center; background-repeat: no-repeat; background-size: cover; } `,y=(0,l.Z)(m.I)` box-shadow: 0px 0px 1px 0px #0000000a, 0px 2px 8px 0px #0000000a, 0px 10px 16px 0px #0000000a; border-radius: 0.75rem; overflow: hidden; input.mantine-Input-input { border: none; font-size: 0.8125rem; line-height: 1.25rem; } .close-icon-wrapper { display: none; background-color: ${o.r.colors.gray400}; border-radius: 100%; cursor: pointer; width: 20px; height: 20px; padding: 2px; svg { pointer-events: none; } &[data-is-disabled='true'] { opacity: 0.2; cursor: not-allowed; pointer-events: none; } } input.mantine-Input-input:focus ~ .mantine-Input-rightSection .close-icon-wrapper, input.mantine-Input-input:not(:placeholder-shown) ~ .mantine-Input-rightSection .close-icon-wrapper { display: flex; } `,w=(0,l.Z)(Search2)` color: ${o.r.colors.primaryBase}; width: 20px; height: 20px; `,SearchInput=e=>{let{loading:t,disabled:a,placeholder:l,value:r,onChange:o,icon:s=n.createElement(w,null),className:c,style:d,enableClear:m}=e,u=(0,i.a)(e,["loading","disabled","placeholder","value","onChange","icon","className","style","enableClear"]);return n.createElement(y,Object.assign({disabled:t||a,size:"lg",value:r,onChangeRaw:e=>{o(e.currentTarget.value)},type:"text",placeholder:l,className:c,icon:s,style:d,rightSection:m?n.createElement("div",{className:"close-icon-wrapper",onClick:()=>{o("")},"data-is-disabled":!r},n.createElement(p.C,{fill:"white",width:"100%",height:"100%"})):void 0},u,{"data-event-label":r}))}},XZux:function(e,t,a){a.d(t,{O:function(){return OvulationForm}});var n,l,r=a("T/vS"),o=a("q1tI"),i=a("/npG"),s=a("mYVa"),c=a("iuhU"),d=a("8vDj"),m=a("cChf"),p=a("ZFu2"),u=a("1Ntl"),g=a("SMDy"),h=a("mrUg"),b=a("dDw1"),v=a("Z+18"),f=a("cHPQ"),E=a("w8P6"),x=a("fkrl");let AvoidPregnancy=e=>{var{isMarryBaby:t,size:a=24}=e,n=(0,r.a)(e,["isMarryBaby","size"]);let l=Object.assign({width:a,height:a},n);return t?o.createElement("svg",Object.assign({viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),o.createElement("path",{d:"M16.5 27.133c1.298 0 2.596-.149 3.868-.447a9.15 9.15 0 0 0 6.818-6.818 16.94 16.94 0 0 0 0-7.736 9.15 9.15 0 0 0-6.818-6.818 16.94 16.94 0 0 0-7.736 0 9.15 9.15 0 0 0-6.818 6.818A17 17 0 0 0 5.367 16a.867.867 0 0 1-1.734 0c0-1.43.165-2.862.494-4.264a10.88 10.88 0 0 1 8.109-8.11 18.7 18.7 0 0 1 8.528 0 10.88 10.88 0 0 1 8.11 8.11 18.7 18.7 0 0 1 0 8.528 10.88 10.88 0 0 1-8.11 8.11 18.7 18.7 0 0 1-4.264.493.867.867 0 0 1 0-1.734",fill:"#3E3F58"}),o.createElement("path",{d:"M12.5 16a4 4 0 1 1 8 0 4 4 0 0 1-8 0",fill:"#fff"}),o.createElement("path",{d:"M11.633 16a4.867 4.867 0 1 1 9.734 0 4.867 4.867 0 0 1-9.734 0m4.867-3.133a3.133 3.133 0 1 0 0 6.266 3.133 3.133 0 0 0 0-6.266m-4 9.8a2.667 2.667 0 1 1-5.333 0 2.667 2.667 0 0 1 5.333 0",fill:"#3E3F58"}),o.createElement("path",{d:"M10.305 22.195c.26.26.26.683 0 .943l-1.91 1.91c-.36.36-.562.847-.562 1.355a3.25 3.25 0 0 1-1.796 2.907l-1.239.62a.667.667 0 1 1-.596-1.193l1.238-.62a1.92 1.92 0 0 0 1.06-1.714c0-.862.342-1.688.952-2.298l1.91-1.91c.26-.26.682-.26.943 0",fill:"#3E3F58"}),o.createElement("path",{d:"M3.874 4.788a1 1 0 0 1 1.414-1.414l23.099 23.098a1 1 0 1 1-1.415 1.415z",fill:"#E85388"})):o.createElement("svg",Object.assign({viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),o.createElement("g",{clipPath:"url(#clip0_1530_7251)"},o.createElement("path",{d:"M8.983 10.87a.23.23 0 0 1 .049-.16c.08-.114.156-.229.207-.36.1-.166.168-.348.233-.528.246-.668.397-1.36.508-2.062.036-.235.076-.471.09-.71.065-.511.101-1.024.095-1.541.004-.015.011-.03.011-.044a13 13 0 0 0-.089-1.62c-.023-.196-.093-.335-.298-.406-.293-.1-.48-.316-.568-.615a2.7 2.7 0 0 0-.217-.566c-.123-.222-.29-.391-.54-.47-.057-.018-.088-.016-.106.052q-.045.165-.073.336c-.005.044 0 .058.048.058q.122.005.244.017c.127.009.21.09.202.196-.011.111-.108.179-.239.166-.065-.007-.133-.009-.198-.016-.058-.008-.077.016-.067.072q.027.165.052.332c.006.043.031.053.07.053.078 0 .147-.03.218-.057.104-.042.2-.004.242.093.04.09.004.187-.093.235-.13.063-.27.113-.411.085a.23.23 0 0 0-.235.077c-.04-.084-.106-.146-.167-.211-.46-.475-.55-1.194-.235-1.82.18-.359.45-.627.828-.776A.4.4 0 0 0 8.69.595c.33-.317.734-.477 1.172-.55.641-.11 1.25-.024 1.819.3.41.233.728.566.942.983.131.253.188.535.246.814.16.762.233 1.538.293 2.313q.108 1.411.213 2.826c.055.712.13 1.422.24 2.128.066.428.175.846.26 1.27.097.479.039.941-.24 1.358a1.2 1.2 0 0 1-.517.428c-.163.05-.327.105-.491.155-.178.052-.302-.059-.268-.239a4.6 4.6 0 0 0 .077-.72 13.6 13.6 0 0 0-.133-2.225c-.03-.196-.055-.395-.087-.591-.07-.43-.151-.857-.257-1.28l-.015-.07a16 16 0 0 0-.282-1.03c-.012-.039-.025-.079-.076-.075-.038.003-.053.034-.058.07l-.146 1.105c-.05.219-.094.437-.158.652a5.5 5.5 0 0 1-.806 1.654l-.091.113c-.308.382-.654.719-1.094.95-.122.06-.177.048-.252-.063",fill:"#1B3250"}),o.createElement("path",{d:"M12.304 9.435c.1.737.154 1.477.133 2.224a4.6 4.6 0 0 1-.077.72c-.034.182.09.293.268.239q.246-.075.491-.155c.053.226.126.448.17.675q.09.452.129.912c.025.302.043.603.032.905q-.015.483-.065.964a14 14 0 0 1-.299 1.707c-.02.086-.045.17-.065.255-.02.09-.068.12-.16.12L8.789 18H7.781c-.111 0-.117-.011-.13-.124a3 3 0 0 0-.361-1.121c-.132-.235-.297-.448-.415-.692a3.14 3.14 0 0 1-.324-1.521c.233.07.418.001.571-.184q.236-.281.477-.559c.07-.08.136-.164.244-.193.315-.087.631-.166.94-.262.665-.207 1.324-.43 1.917-.804.251-.159.475-.344.595-.63.237-.564.415-1.147.592-1.733.085-.28.184-.55.417-.742",fill:"#2D87F3"}),o.createElement("path",{d:"M12.304 9.435c-.233.194-.33.462-.413.74-.177.585-.355 1.169-.592 1.733-.12.286-.344.471-.595.63-.593.375-1.254.597-1.916.804-.312.097-.628.177-.941.262-.11.031-.177.113-.244.193q-.24.277-.477.559c-.153.184-.34.253-.571.184a.87.87 0 0 1-.44-.54.64.64 0 0 1 .045-.503 1 1 0 0 0 .094-.31.47.47 0 0 1 .392-.405c.132-.03.269-.039.404-.053a.4.4 0 0 0 .114-.024c.115-.009.21-.069.31-.12.322-.167.646-.328.966-.497q.586-.308 1.192-.571a.78.78 0 0 0 .473-.524q.09-.305.177-.608c.047-.171.113-.337.14-.514a5.5 5.5 0 0 0 .806-1.654c.064-.215.108-.433.159-.652a.63.63 0 0 1 .342-.054c.08.013.156.036.237.054.105.423.187.85.256 1.28q.039.292.082.59m-4.19-5.947a.23.23 0 0 1 .235-.076c.142.025.282-.022.411-.086.097-.047.133-.143.093-.234-.042-.095-.138-.133-.242-.093-.071.027-.14.056-.218.056-.039 0-.062-.009-.07-.053q-.024-.165-.052-.33-.017-.082.067-.074c.066.008.133.01.198.017.131.013.228-.053.239-.166.01-.105-.073-.187-.202-.196-.082-.006-.162-.015-.244-.017-.046 0-.053-.014-.047-.058.016-.115.043-.224.072-.337.017-.067.05-.069.106-.05.25.078.417.247.54.469.1.178.16.371.217.566.087.298.273.515.568.615.206.07.275.21.298.406.066.539.091 1.08.09 1.62 0 .014-.008.029-.011.043-.272-.016-.525.075-.783.133a1.4 1.4 0 0 1-.513.031.5.5 0 0 1-.433-.36 2.3 2.3 0 0 1-.091-.46c.154-.024.309-.048.451-.124.1-.055.135-.148.09-.242a.18.18 0 0 0-.24-.084 1 1 0 0 1-.376.087 1.3 1.3 0 0 0-.326-.482c-.096-.093-.096-.215-.013-.319.06-.07.126-.134.186-.202",fill:"#FCCAAF"}),o.createElement("path",{d:"M10.069 7.052c-.013.239-.053.473-.09.71-.11.7-.261 1.394-.507 2.062-.066.18-.135.362-.233.528a.46.46 0 0 0-.235-.4c-.328-.21-.544-.508-.599-.898a.86.86 0 0 1 .242-.742c.237-.244.504-.459.761-.683.188-.162.37-.327.555-.493.033-.031.064-.064.106-.084m.349 2.818c-.025.176-.093.341-.14.513-.057.204-.119.404-.177.608a.78.78 0 0 1-.473.524q-.607.261-1.192.571c-.32.17-.646.33-.966.497-.099.051-.195.111-.31.12.066-.15.177-.266.277-.387.273-.334.615-.596.932-.881q.306-.28.611-.565c.077.11.13.124.251.06.439-.229.787-.567 1.094-.95z",fill:"#2D87F3"}),o.createElement("path",{d:"M8.271 4.49a1 1 0 0 0 .377-.088.183.183 0 0 1 .239.084c.047.095.01.187-.09.242-.14.076-.296.1-.45.124z",fill:"#FF6F4D"}),o.createElement("path",{d:"M11.96 7.563c-.079-.018-.157-.041-.237-.054a.65.65 0 0 0-.342.054l.146-1.104c.005-.037.02-.068.058-.071.05-.006.063.034.076.074q.159.511.282 1.03.01.036.017.071",fill:"#2D87F3"}),o.createElement("path",{d:"M9.834 1.004a7.996 7.996 0 1 0 0 15.992 7.996 7.996 0 0 0 0-15.992M9.465 2.26c1.606-.09 3.191.4 4.467 1.378a.282.282 0 0 1 .03.424l-9.066 9.066a.283.283 0 0 1-.424-.03A6.749 6.749 0 0 1 9.465 2.26m.369 13.49a6.72 6.72 0 0 1-4.016-1.325.284.284 0 0 1-.032-.426l9.046-9.047a.283.283 0 0 1 .427.032A6.75 6.75 0 0 1 9.834 15.75",fill:"#F44D2C"}),o.createElement("path",{d:"M10.159 5.509c.005.517 2.997-1.054 2.997-1.054s-.133-1.55-.293-2.313c-.058-.279-.114-.56-.245-.814a2.35 2.35 0 0 0-.943-.983c-.568-.324-1.178-.41-1.818-.3-.44.073-.843.233-1.173.55a.4.4 0 0 1-.147.085c-.379.15-.648.417-.828.776-.315.626-.224 1.345.235 1.82.062.065.127.127.167.21a.23.23 0 0 1 .235-.076c.142.028.282-.022.411-.085.097-.048.133-.144.093-.235-.042-.097-.138-.135-.242-.093-.071.027-.14.057-.218.057-.039 0-.064-.01-.07-.053q-.024-.165-.052-.332c-.01-.056.009-.08.067-.072.066.007.133.009.198.016.131.013.228-.055.239-.166.009-.105-.075-.187-.202-.196h-.007q-.118-.013-.237-.017c-.047 0-.053-.014-.047-.058.016-.114.043-.225.072-.336.019-.068.05-.07.106-.051.25.078.417.247.54.47.099.178.16.37.217.565.087.299.275.515.568.615.206.071.275.21.298.406.066.539.091 1.078.09 1.62z",fill:"#1B3250"}),o.createElement("path",{d:"M8.107 3.488a.23.23 0 0 1 .235-.076c.142.025.282-.022.411-.086.097-.047.133-.143.093-.234-.042-.095-.138-.133-.242-.093-.07.027-.14.056-.218.056-.038 0-.062-.009-.07-.053q-.024-.165-.052-.33-.017-.082.067-.074c.066.008.133.01.199.017.13.013.227-.053.238-.166.01-.105-.073-.187-.202-.196-.082-.006-.162-.015-.244-.017-.045 0-.053-.014-.047-.058.016-.115.043-.224.073-.337.016-.067.049-.069.105-.05.25.078.417.247.54.469.1.178.16.371.217.566.088.298.273.515.568.615.206.07.275.21.298.406.066.539.091 1.08.09 1.62 0 .014-.008.029-.011.043-.271-.016-.524.075-.783.133a1.4 1.4 0 0 1-.513.031.5.5 0 0 1-.433-.36 2.3 2.3 0 0 1-.091-.46c.154-.024.31-.048.451-.124.1-.055.135-.148.09-.242a.18.18 0 0 0-.24-.084 1 1 0 0 1-.376.087 1.3 1.3 0 0 0-.326-.482c-.096-.093-.096-.215-.012-.319.06-.07.125-.134.185-.202",fill:"#FCCAAF"}),o.createElement("path",{d:"M8.265 4.49a1 1 0 0 0 .376-.088.183.183 0 0 1 .239.084c.047.095.01.187-.09.242-.14.076-.296.1-.45.124z",fill:"#FF6F4D"})),o.createElement("defs",null,o.createElement("clipPath",{id:"clip0_1530_7251"},o.createElement("path",{fill:"#fff",d:"M.834 0h18v18h-18z"}))))},TryConceive=e=>{var{isMarryBaby:t,size:a=24}=e,n=(0,r.a)(e,["isMarryBaby","size"]);let l=Object.assign({width:a,height:a},n);return t?o.createElement("svg",Object.assign({viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),o.createElement("path",{d:"M14.018 9.155c-1.422 1.066-1.777 1.777-1.067 2.843.57.853 2.133 2.488 3.2 3.554-.712 2.133-6.753 1.422-6.753 1.422l-.711 1.421-1.067 3.199c-1.066 0-3.198.142-3.198.71 0 .712 2.843 2.844 3.554 2.844.569 0 1.658-2.132 2.132-3.199 1.54 1.777 5.474 4.905 8.885 3.199 4.265-2.132 6.398-5.331 5.687-7.819-.274-.959-.284-1.495-.132-1.813a4.62 4.62 0 0 0 3.438-2.3c.715-1.108.78-2.417.397-3.652-.41-1.663-1.15-2.955-2.637-3.252-3.423-.685-6.397 1.016-6.397 4.62a4.6 4.6 0 0 0 .971 2.834c-1.184.316-2.414-.236-6.302-4.611",fill:"#fff"}),o.createElement("path",{d:"M29.3 10.825A5.235 5.235 0 0 0 24.077 5.6c-2.876 0-5.245 2.348-5.245 5.224 0 .36.275.634.634.634.36 0 .635-.275.635-.634 0-2.179 1.776-3.955 3.976-3.955s3.954 1.776 3.954 3.955a3.947 3.947 0 0 1-3.531 3.933.8.8 0 0 0-.381-.021c-.042.021-.085.021-.106.042a.64.64 0 0 0-.57.635c0 .254.147.465.359.57.105.487.148.995.148 1.502a7.175 7.175 0 0 1-7.17 7.17 7.22 7.22 0 0 1-5.773-2.898l-.02-.021c.507-.317 1.902-.17 2.41-.106a.637.637 0 0 0 .698-.57.637.637 0 0 0-.571-.699c-1.184-.148-3.384-.38-3.891 1.164-.064.19-.127.401-.19.592-.318.994-.74 2.347-1.27 2.58-.634.063-2.918-1.587-3.172-2.284.212-.275 1.248-.444 2.623 0 .169.063.36.042.507-.064s.275-.232.296-.423c.571-2.707.74-3.278.74-3.299v-.021c.212-.888.867-.973 2.538-.93 1.523.042 3.384.084 4.674-1.46a7.8 7.8 0 0 0 3.235.994h.043a.643.643 0 0 0 .634-.592c.021-.36-.232-.655-.57-.677-4.4-.36-6.028-4.652-6.091-4.842 0 0 0-.022-.022-.022-.274-.634-.063-1.036.19-1.163.17-.105.445-.105.614.17 1.248 2.008 2.432 3.32 3.574 4.018.021 0 .042.02.042.02.677.34 2.052.762 3.596-.295.296-.19.359-.592.169-.889-.19-.296-.592-.36-.889-.169-.951.635-1.776.487-2.305.233-.93-.571-1.988-1.777-3.108-3.574-.508-.783-1.48-1.036-2.284-.613-.762.401-1.312 1.438-.762 2.77.085.254.93 2.368 2.898 3.934a2.7 2.7 0 0 1-.614.486c-.02 0-.02 0-.042-.021-8.205-2.517-8.86-8.586-8.924-9.77a.61.61 0 0 0-.656-.614.63.63 0 0 0-.592.656c.042 1.226.655 7.084 7.74 10.172h-.508c-1.48-.042-3.34-.085-3.806 1.882-.021.106-.17.677-.613 2.707-1.587-.36-3.194-.127-3.574 1.036-.19.55.126 1.206.972 2.01.571.549 2.263 1.902 3.447 1.902.149 0 .297-.02.423-.063.952-.36 1.438-1.544 1.861-2.813a8.48 8.48 0 0 0 6.324 2.855c4.652 0 8.438-3.785 8.438-8.438 0-.507-.043-1.015-.148-1.522a5.264 5.264 0 0 0 4.23-5.16",fill:"#3E3F58"}),o.createElement("rect",{x:"23.005",y:"8.444",width:"1.942",height:"1.422",rx:".711",transform:"rotate(34.869 23.005 8.444)",fill:"#FB8C00"})):o.createElement("svg",Object.assign({viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),o.createElement("path",{d:"M13.996 8.62v3.221c1.054.035 1.682-.705 1.845-1.467.209-.977-.444-2.041-1.845-1.754",fill:"#FEAA96"}),o.createElement("path",{d:"M14.055 10.67a.21.21 0 0 1-.2-.277c.166-.508.594-.69.92-.644a.21.21 0 1 1-.059.418c-.163-.023-.37.079-.461.358a.21.21 0 0 1-.2.145",fill:"#FF886C"}),o.createElement("path",{d:"M2.16 10.374c.162.762.79 1.502 1.844 1.467V8.62c-1.4-.287-2.054.777-1.845 1.754",fill:"#FEAA96"}),o.createElement("path",{d:"M3.98 10.67a.21.21 0 0 1-.2-.145c-.093-.28-.299-.381-.462-.358a.21.21 0 0 1-.21-.102.21.21 0 0 1 .152-.316c.326-.046.753.136.92.644a.21.21 0 0 1-.2.277",fill:"#FF886C"}),o.createElement("path",{d:"M9 15.831c1.325 0 3.365-.561 4.534-2.292 1.057-1.563.436-4.144.462-5.169.053-2.079-1.447-4.78-4.996-4.78s-5.05 2.7-4.996 4.78c.026 1.025-.595 3.606.461 5.169 1.17 1.73 3.21 2.292 4.535 2.292",fill:"#FECCBF"}),o.createElement("path",{d:"M6.881 10.535a.56.56 0 1 0 0-1.121.56.56 0 0 0 0 1.121",fill:"#A35961"}),o.createElement("path",{d:"M7.114 9.777a.21.21 0 0 1-.188-.116c-.049-.097-.205-.122-.27-.129-.225-.022-.44.056-.477.104a.211.211 0 1 1-.347-.241c.149-.215.53-.306.831-.285.306.021.533.15.64.362a.21.21 0 0 1-.189.305",fill:"#8C2F39"}),o.createElement("path",{d:"M11.119 10.535a.56.56 0 1 0 0-1.121.56.56 0 0 0 0 1.121",fill:"#A35961"}),o.createElement("path",{d:"M9 13.329c.777 0 .994-.61 1.046-.92.031-.185-.132-.35-.34-.35H8.293c-.208 0-.371.165-.34.35.052.31.27.92 1.047.92",fill:"#D84023"}),o.createElement("path",{d:"M10.763 7.94a.2.2 0 0 1-.107-.03.33.33 0 0 0-.18-.029.21.21 0 1 1-.07-.416.74.74 0 0 1 .464.081.211.211 0 0 1-.107.393m-3.526 0a.21.21 0 0 1-.107-.393.74.74 0 0 1 .463-.08.211.211 0 1 1-.07.415.3.3 0 0 0-.18.029.2.2 0 0 1-.106.029",fill:"#FEAA96"}),o.createElement("path",{d:"M10.887 9.777a.21.21 0 0 1-.189-.305c.107-.212.334-.34.64-.362.3-.021.682.07.83.285a.211.211 0 0 1-.346.24c-.038-.048-.252-.125-.477-.103-.065.007-.221.032-.27.129a.21.21 0 0 1-.188.116",fill:"#8C2F39"}),o.createElement("path",{d:"M9.284 11.02a.21.21 0 0 1-.22-.15.07.07 0 0 0-.063-.05H9a.07.07 0 0 0-.064.05.21.21 0 0 1-.22.15.22.22 0 0 1-.192-.244c.018-.221.213-.379.476-.379.264 0 .458.158.476.38a.22.22 0 0 1-.192.244",fill:"#FEAA96"}),o.createElement("path",{d:"M9.55 12.06h-1.1l-.003.054a.552.552 0 1 0 1.102-.055m2.041-.774-.29.53a.1.1 0 0 1-.041.04l-.53.29a.1.1 0 0 0-.053.09.1.1 0 0 0 .053.09l.53.29q.026.015.04.04l.29.53a.103.103 0 0 0 .18 0l.29-.53a.1.1 0 0 1 .041-.04l.53-.29a.103.103 0 0 0 0-.18l-.53-.29a.1.1 0 0 1-.04-.04l-.29-.53a.1.1 0 0 0-.143-.039.1.1 0 0 0-.038.04",fill:"#fff"}),o.createElement("path",{d:"M11.055 2.193c-.147-.422-.524-.698-1.01-.738a.9.9 0 0 0-.535.154c-.206.155-.37.358-.478.592a.036.036 0 0 1-.066 0 1.55 1.55 0 0 0-.475-.592.9.9 0 0 0-.537-.154c-.485.04-.862.316-1.008.739a1.03 1.03 0 0 0 .259 1.09c.479.447 1.156.518 1.543.518h.502c.387 0 1.066-.07 1.545-.517a1.03 1.03 0 0 0 .26-1.092M8.79 3.243a.13.13 0 0 1-.134.135c-.316-.012-.821-.084-1.163-.402a.61.61 0 0 1-.148-.644.66.66 0 0 1 .438-.417c.242-.078.404-.006.456.033.446.33.539.932.551 1.295m1.718-.267c-.342.319-.847.39-1.163.402a.13.13 0 0 1-.135-.135c.013-.362.105-.964.551-1.295a.47.47 0 0 1 .25-.073c.318.027.554.193.645.457a.61.61 0 0 1-.149.644",fill:"#2D87F3"}),o.createElement("path",{d:"M8.998 3.338a.21.21 0 0 1 .122.383l-.04.028c-.16.118-.957.76-.991 1.758-.027.78.403 1.132.814 1.202.367.062.831-.096.985-.59a.415.415 0 0 0-.211-.52c-.136-.069-.32-.076-.425.064a.211.211 0 0 1-.337-.253c.215-.287.607-.363.954-.186a.836.836 0 0 1 .422 1.02 1.28 1.28 0 0 1-1.458.88c-.56-.095-1.202-.58-1.166-1.631.046-1.334 1.17-2.093 1.222-2.125a.2.2 0 0 1 .109-.03",fill:"#BA8288"}))},y=(0,o.createContext)({});var w=(0,i.k)(e=>({inputRightSection:{fontSize:(0,s.h)(13),lineHeight:(0,s.h)(24),color:e.colors.gray[4],justifyContent:"flex-end",paddingRight:8}}));let DefaultLayout=e=>{var t=(0,r.a)(e,[]);let{t:a}=(0,v.u)(),{currentUrl:n,submitProps:l,form:i,calculatingMethods:s,isMobile:d}=(0,o.useContext)(y),{classes:m={}}=(0,o.useContext)(f.C),{classes:p}=w(void 0,{name:"OvulationTool__DefaultLayout"});return o.createElement(E.H,Object.assign({formLayout:"default"},t),o.createElement(E.H.FormRow,null,o.createElement(E.H.Control,null,o.createElement(E.H.ChipGroup,Object.assign({data:s,label:a("dueDatePage.calculationMethod"),isMobile:d},i.getInputProps("calculatorType"))))),o.createElement(E.H.FormRow,null,o.createElement(h.D,Object.assign({placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},label:o.createElement(b.T,{size:"p2",weight:"semiBold"},` (${a("dueDatePage.lastPeriod.lastPeriodLabel")})`),maxDate:new Date},i.getInputProps("lastPeriodDate")))),o.createElement(E.H.FormRow,null,o.createElement(g.I.Number,Object.assign({label:o.createElement(b.T,{size:"p2",weight:"semiBold"},a("ovulationPage.cycleLength")),rightSection:a("ovulationPage.dayUnit"),min:21,max:45,defaultValue:1},i.getInputProps("cycleLength"),{classNames:{rightSection:p.inputRightSection}}))),o.createElement(E.H.FormRow,null,o.createElement(g.I.Number,Object.assign({label:o.createElement(b.T,{size:"p2",weight:"semiBold"},a("ovulationPage.periodDuration")),rightSection:a("ovulationPage.dayUnit"),min:1,max:15,defaultValue:1},i.getInputProps("periodLength"),{classNames:{rightSection:p.inputRightSection}}))),o.createElement(E.H.FormRow,{className:m.submitWrapper},o.createElement(E.H.Submit,Object.assign({type:"submit",className:(0,c.default)("due-date-calculate-button",m.submitBtn),dataEventCategory:"Health Tool",dataEventAction:"Ovulation",dataEventLabel:n},l),a("dueDatePage.lastPeriod.calculate"))))},InlineLayout=e=>{var t=(0,r.a)(e,[]);let{t:a}=(0,v.u)(),{currentUrl:n,submitProps:l,form:i,calculatingMethods:s}=(0,o.useContext)(y),{classes:d={}}=(0,o.useContext)(f.C);return o.createElement(E.H,Object.assign({formLayout:"inline"},t),o.createElement(E.H.FormRow,null,o.createElement(E.H.BorderInlineControl,{label:a("dueDatePage.calculationMethod"),direction:"column",width:"100%"},o.createElement(E.H.ChipGroup,Object.assign({data:s},i.getInputProps("calculatorType"))))),o.createElement(E.H.FormRow,null,o.createElement(E.H.BorderInlineControl,{label:a("dueDatePage.lastPeriod.lastPeriodLabel")},o.createElement(h.D,Object.assign({placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},maxDate:new Date},i.getInputProps("lastPeriodDate"))))),o.createElement(E.H.FormRow,null,o.createElement(E.H.BorderInlineControl,{label:a("ovulationPage.cycleLength")+" "+a("ovulationPage.dayUnit")},o.createElement(g.I.Number,Object.assign({min:21,max:45,defaultValue:1},i.getInputProps("cycleLength"),{error:null}))),i.errors.cycleLength&&o.createElement(E.H.Error,null,i.errors.cycleLength)),o.createElement(E.H.FormRow,null,o.createElement(E.H.BorderInlineControl,{label:a("ovulationPage.periodDuration")+" "+a("ovulationPage.dayUnit")},o.createElement(g.I.Number,Object.assign({min:1,max:15,defaultValue:1},i.getInputProps("periodLength"),{error:null}))),i.errors.periodLength&&o.createElement(E.H.Error,null,i.errors.periodLength)),o.createElement(E.H.FormRow,{className:d.submitWrapper},o.createElement(E.H.Submit,Object.assign({type:"submit",className:(0,c.default)("due-date-calculate-button",d.submitBtn),dataEventCategory:"Health Tool",dataEventAction:"Ovulation",dataEventLabel:n},l),a("dueDatePage.lastPeriod.calculate"))))},MbLayout=e=>{var t=(0,r.a)(e,[]);let{t:a}=(0,v.u)(),{currentUrl:n,submitProps:l,form:i,calculatingMethods:s}=(0,o.useContext)(y);return o.createElement(E.H,Object.assign({formLayout:"inline"},t),o.createElement(E.H.Control,null,o.createElement(g.I.Wrapper,{label:o.createElement(b.T,{size:"p4",sx:{fontWeight:"normal"}},a("dueDatePage.calculationMethod"))},o.createElement(E.H.ChipGroup,Object.assign({data:s},i.getInputProps("calculatorType"))))),o.createElement(E.H.BorderBoxControl,{label:a("dueDatePage.lastPeriod.lastPeriodLabel"),rightSection:o.createElement(x.Z,null)},o.createElement(h.D,Object.assign({placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},maxDate:new Date,rightSection:null},i.getInputProps("lastPeriodDate")))),o.createElement(E.H.BorderBoxControl,{label:a("ovulationPage.cycleLength"),rightSection:a("ovulationPage.dayUnit")},o.createElement(g.I.Number,Object.assign({min:21,max:45,defaultValue:1},i.getInputProps("cycleLength")))),i.errors.cycleLength&&o.createElement(E.H.Error,null,i.errors.cycleLength),o.createElement(E.H.BorderBoxControl,{label:a("ovulationPage.periodDuration"),rightSection:a("ovulationPage.dayUnit")},o.createElement(g.I.Number,Object.assign({min:1,max:15,defaultValue:1},i.getInputProps("periodLength")))),i.errors.periodLength&&o.createElement(E.H.Error,null,i.errors.periodLength),o.createElement(E.H.Submit,Object.assign({type:"submit",className:"due-date-calculate-button",dataEventCategory:"Health Tool",dataEventAction:"Ovulation",dataEventLabel:n},l),a("dueDatePage.lastPeriod.calculate")))};(n=l||(l={}))[n.trackPeriod=0]="trackPeriod",n[n.conceive=1]="conceive",n[n.avoidPregnancy=2]="avoidPregnancy";let OvulationForm=e=>{var{formLayout:t="default",submitProps:a,currentUrl:n,isMobile:i,onSubmit:s}=e,c=(0,r.a)(e,["formLayout","submitProps","currentUrl","isMobile","onSubmit"]);let g=(0,d.rZ)(),{t:h}=(0,v.u)(),b="mb"===g.other.template,f=(0,m.c)({initialValues:{calculatorType:String(l.trackPeriod),periodLength:7,cycleLength:28,lastPeriodDate:new Date},validate:{periodLength:(0,p.U)(h("validation.error.requiredField")),cycleLength:(0,p.U)(h("validation.error.requiredField"))}}),E=Object.assign({onSubmit:f.onSubmit(s)},c),x=[{label:h("ovulationPage.trackPeriod"),value:l.trackPeriod,icon:o.createElement(u.L,null)},{label:h("ovulationPage.conceive"),value:l.conceive,icon:o.createElement(TryConceive,null)},{label:h("ovulationPage.avoidPregnancy"),value:l.avoidPregnancy,icon:o.createElement(AvoidPregnancy,null)}];return o.createElement(y.Provider,{value:{submitProps:a,currentUrl:n,form:f,isMobile:i,calculatingMethods:x}},"inline"===t?o.createElement(InlineLayout,Object.assign({},E)):b?o.createElement(MbLayout,Object.assign({formLayout:t},E)):o.createElement(DefaultLayout,Object.assign({},E)))}},su2a:function(e,t,a){a.d(t,{L:function(){return Logo}});var n=a("q1tI"),l=a("375z"),r=a("0dn/"),o=a("rBCA"),i=a("un+D"),s=a("TsRu"),c=a("FfBq");let d=o.Z.div` position: relative; display: inline-flex; align-items: center; z-index: 0; .main-logo-icon { object-fit: contain; } &[data-logo-is-light] { > svg path { fill: #fff; } img { filter: brightness(0) invert(1); } } &[data-has-badge] { @supports (display: flex) and (gap: 1em) { gap: 0.5rem; } @supports not ((display: flex) and (gap: 1em)) { > img { margin-left: 0.25rem; } } } .common-logo-seasonal-left, .common-logo-seasonal-right { z-index: -1; max-width: unset; max-height: unset; pointer-events: none; } .common-logo-seasonal-left { position: absolute; top: 50%; left: 0; transform: translateY(-50%); pointer-events: none; } .common-logo-seasonal-right { position: absolute; top: 50%; right: 0; transform: translateY(-50%); } &[data-seasonal='christmas'] { padding-left: 37px; padding-right: 22px; .common-logo-seasonal-left { width: 125px; height: 56px; } .common-logo-seasonal-right { width: 23px; height: 17px; } ${i.M.mbDown} { padding-left: 30px; padding-right: 16px; .common-logo-seasonal-left { // width: 125px; height: 46px; } .common-logo-seasonal-right { // width: 23px; height: 12px; } } } &[data-seasonal='new-year'] { padding-right: 85px; .common-logo-seasonal-left { top: 35%; width: 100px; height: 56px; } .common-logo-seasonal-right { width: 85px; height: 54px; } ${i.M.mbDown} { padding-right: 0; .common-logo-seasonal-right { display: none; } } } &[data-seasonal='lunar-new-year'] { padding-left: 30px; padding-right: 35px; .common-logo-seasonal-left { width: 33px; height: 41px; } .common-logo-seasonal-right { width: 37px; height: 54px; } } &[data-seasonal='ramadan'] { &[data-type='hellosehat'] { padding-right: 35px; .common-logo-seasonal-left { width: 165px; height: unset; left: 6px; } .common-logo-seasonal-right { width: 33px; height: unset; } } &[data-type='hellodoktor'] { padding-right: 66px; .common-logo-seasonal-left { width: 133px; height: unset; left: 6px; } .common-logo-seasonal-right { width: 63px; height: unset; } } } &[data-seasonal='hung-king'] { &[data-type='hellobacsi'] { .common-logo-seasonal-left { width: 134px; height: unset; left: 50%; top: 50%; transform: translate(-50%, -50%); } } &[data-type='marryBaby'] { .common-logo-seasonal-left { width: 145px; height: unset; left: 50%; top: 50%; transform: translate(-50%, -50%); } } } &[data-seasonal='vn-independent-day'] { &[data-type='hellobacsi'], &[data-type='marryBaby'] { .common-logo-seasonal-left.desktop-only { width: unset; height: 56px; left: 65%; top: 50%; transform: translate(-50%, -50%); } } &[data-type='marryBaby'] { .common-logo-seasonal-left.desktop-only { left: 50%; z-index: 1; } } &[data-type='hellobacsi'], &[data-type='marryBaby'] { .common-logo-seasonal-left.mobile-only { width: unset; height: 56px; left: 60%; top: 50%; transform: translate(-50%, -50%); } } &[data-type='marryBaby'] { .common-logo-seasonal-left.mobile-only { left: 40%; z-index: 1; } } } .desktop-only { ${i.M.mbDown} { display: none; } } .mobile-only { ${i.M.mbUp} { display: none; } } `,m=o.Z.img` height: 16px; width: unset; margin-bottom: 4px; margin-left: -3px; `,isChristmas=e=>{let t=e.getDate(),a=e.getMonth();return 11===a&&t>=16&&t<=25},p={2023:[22,0],2024:[10,1],2025:[29,0],2026:[17,1],2027:[6,1],2028:[26,0],2029:[13,1],2030:[3,1],2031:[23,0],2032:[11,1],2033:[31,0],2034:[19,1],2035:[8,1],2036:[28,0],2037:[15,1],2038:[4,1],2039:[24,0],2040:[12,1]},u=[l.L.Vietnam,l.L.Taiwan,l.L.Indonesia,l.L.Malaysia],isLunarNewYear=e=>{let t=e.getFullYear(),a=p[t];if(!a)return!1;let n=new Date(t,a[1],a[0]),l=new Date(n);l.setDate(n.getDate()-7);let r=new Date(n);return r.setDate(n.getDate()+5),l<=e&&e<=r},isNewYear=e=>{let t=e.getDate(),a=e.getMonth();return 11===a&&t>=26||0===a&&t<=15},g=[{year:2024,start:[10,2],end:[8,3]},{year:2025,start:[1,2],end:[30,2]},{year:2026,start:[18,1],end:[19,2]},{year:2027,start:[8,1],end:[9,2]},{year:2028,start:[28,0],end:[26,1]},{year:2029,start:[16,0],end:[14,1]},{year:2030,start:[6,0],end:[4,1]},{year:2030,start:[26,11],end:[24,0,2031]},{year:2031,start:[15,11],end:[13,0,2032]},{year:2032,start:[4,11],end:[2,0,2033]}],isRamadan=e=>{let t=e.getFullYear(),a=g.filter(e=>e.year===t);return!!a.length&&a.some(a=>{let n=a.start[2]||t,l=new Date(n,a.start[1],a.start[0]),r=new Date(n,a.end[1],a.end[0]);return l<=e&&e<=r})},h={2024:[18,3],2025:[7,3],2026:[26,3],2027:[16,3],2028:[4,3],2029:[23,3],2030:[12,3],2031:[1,3],2032:[19,3],2033:[9,3],2034:[28,3],2035:[17,3]},isVNHungKing=e=>{let t=e.getFullYear(),a=h[t];if(!a)return!1;let n=new Date(t,a[1],a[0]),l=new Date(n);l.setDate(n.getDate()-1);let r=new Date(n);return r.setDate(n.getDate()+1),l<=e&&e<=r},isVN3004=e=>{let t=e.getFullYear(),a=new Date(t,3,30),n=new Date(a);n.setDate(a.getDate()-1);let l=new Date(a);return l.setDate(a.getDate()+2),n<=e&&e<=l},isLabourDay=e=>{let t=e.getFullYear(),a=new Date(t,4,1),n=new Date(a);n.setDate(a.getDate()-1);let l=new Date(a);return l.setDate(a.getDate()+1),n<=e&&e<=l},isVNIndependentDay=e=>{let t=e.getFullYear(),a=new Date(t,8,2),n=new Date(a);n.setDate(a.getDate()-1);let l=new Date(a);return l.setDate(a.getDate()+1),n<=e&&e<=l},Logo=({type:e,className:t,style:a,isLightLogo:o,customSize:i,badge:p,locale:g,dateForSeasonal:h,isPro:b})=>{let[v,f]=(0,n.useState)({isChristmas:!1,isLunarNewYear:!1,isNewYear:!1,isRamadan:!1,isVNHungKing:!1,isVN3004:!1,isLabourDay:!1,isVNIndependentDay:!1});return(0,n.useEffect)(()=>{if(!h||isNaN(new Date(h).getTime()))return;let e=new Date(h),t=isChristmas(e),a=u.includes(g)&&isLunarNewYear(e),n=!a&&isNewYear(e),r=isRamadan(e),o=g===l.L.Vietnam&&isVNHungKing(e),i=g===l.L.Vietnam&&isVN3004(e),s=g===l.L.Vietnam&&isLabourDay(e),c=g===l.L.Vietnam&&isVNIndependentDay(e);f({isChristmas:t,isLunarNewYear:a,isNewYear:n,isRamadan:r,isVNHungKing:o,isVN3004:i,isLabourDay:s,isVNIndependentDay:c})},[g,new Date(h).getDate()]),n.createElement(d,{className:t,style:a,"data-logo-is-light":o||void 0,"data-has-badge":!!p,"data-seasonal":v.isRamadan?"ramadan":v.isChristmas?"christmas":v.isLunarNewYear?"lunar-new-year":v.isNewYear?"new-year":v.isVNHungKing?"hung-king":v.isVN3004?"30-04":v.isLabourDay?"labour-day":v.isVNIndependentDay?"vn-independent-day":void 0,"data-type":e},v.isChristmas?n.createElement(n.Fragment,null,n.createElement(c.I,{alt:"left xmas logo",src:r.C.getAssetPath("logo/xmas-left.png"),className:"common-logo-seasonal-left"}),n.createElement(c.I,{alt:"right xmas logo",src:r.C.getAssetPath("logo/xmas-right.png"),className:"common-logo-seasonal-right"})):v.isNewYear?n.createElement(n.Fragment,null,n.createElement(c.I,{alt:"left new year logo",src:r.C.getAssetPath("logo/new-year-left.png"),className:"common-logo-seasonal-left"}),n.createElement(c.I,{alt:"right new year logo",src:r.C.getAssetPath("logo/new-year-right.png"),className:"common-logo-seasonal-right"})):v.isLunarNewYear?n.createElement(n.Fragment,null,n.createElement(c.I,{alt:"left lunar new year logo",loading:"lazy",src:r.C.getAssetPath("logo/lunar-new-year-left.png"),className:"common-logo-seasonal-left"}),n.createElement(c.I,{alt:"right lunar new year logo",loading:"lazy",src:r.C.getAssetPath("logo/lunar-new-year-right.png"),className:"common-logo-seasonal-right"})):v.isRamadan&&"hellosehat"===e?n.createElement(n.Fragment,null,n.createElement(c.I,{alt:"left ramadan logo",loading:"lazy",src:r.C.getAssetPath("logo/ramadan-sehat-left.png"),className:"common-logo-seasonal-left"}),n.createElement(c.I,{alt:"right ramadan logo",loading:"lazy",src:r.C.getAssetPath("logo/ramadan-sehat-right.png"),className:"common-logo-seasonal-right"})):v.isRamadan&&"hellodoktor"===e?n.createElement(n.Fragment,null,n.createElement(c.I,{alt:"left ramadan logo",loading:"lazy",src:r.C.getAssetPath("logo/ramadan-doktor-left.png"),className:"common-logo-seasonal-left"}),n.createElement(c.I,{alt:"right ramadan logo",loading:"lazy",src:r.C.getAssetPath("logo/ramadan-doktor-right.png"),className:"common-logo-seasonal-right"})):v.isVNHungKing&&("hellobacsi"===e||"marryBaby"===e)?n.createElement(n.Fragment,null,n.createElement(c.I,{alt:"Hung King logo",loading:"lazy",src:r.C.getAssetPath("logo/hung-king-bg.png"),className:"common-logo-seasonal-left"})):v.isVNIndependentDay&&("hellobacsi"===e||"marryBaby"===e)?n.createElement(n.Fragment,null,n.createElement(c.I,{alt:"VN Independent day logo",loading:"lazy",src:r.C.getAssetPath("logo/vn-independence-desktop.png"),className:"common-logo-seasonal-left desktop-only"}),n.createElement(c.I,{alt:"VN Independent day logo",loading:"lazy",src:r.C.getAssetPath("logo/vn-independence-mobile.png"),className:"common-logo-seasonal-left mobile-only"})):null,n.createElement(s.L,{type:e,width:null==i?void 0:i.width,height:null==i?void 0:i.height,isLight:o}),b?n.createElement(m,{src:r.C.getAssetPath("logo/pro-suffix.svg")}):null,p)}},pYTx:function(e,t,a){a.d(t,{T:function(){return s}});var n=a("q1tI"),l=a("rBCA"),r=a("NIaq"),o=a("iBNF");let i=l.Z.div` textarea { width: 100%; height: var(--textarea-height, 116px); padding: 1rem; border: 1px solid ${o.r.colors.gray200}; border-radius: 6px; color: ${o.r.colors.gray800}; font-size: 14px; resize: none; &:focus { box-shadow: 0px 0px 2px 2px #91caff; } &::placeholder { color: ${o.r.colors.gray500}; } &:disabled { background-color: ${o.r.colors.neutral50}; cursor: not-allowed; } } `,s=n.forwardRef(({height:e,placeholder:t,labelText:a,labelColor:l,id:o,name:s,onChange:c,value:d,className:m,onKeyPress:p,disabled:u=!1},g)=>n.createElement(i,{className:m,style:{"--textarea-height":e||"116px"}},a&&n.createElement(r.L,{size:"label2",style:{color:l||"#595959"},htmlFor:o},a),n.createElement("textarea",{name:s,ref:g,placeholder:t,id:o,onChange:e=>c&&c(e.target.value),onKeyPress:e=>p&&p(e),value:d,disabled:u})))}}]);