"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4414],{unQi:function(e,t,a){a.d(t,{Ct:function(){return Badge},fz:function(){return LoadingOverlay},iR:function(){return Slider}});var n=a("fdQd"),r=a("8wjV"),o=a("FRPj"),i=a("q1tI"),l=a("RGvF"),c=a("eZo4"),s=a("iBNF"),m=a("GjY/");a("rBCA"),a("xXM3"),a("Wgwc");let Badge=e=>{var{color:t=s.r.colors.primaryBase,styles:a}=e,n=(0,o._)(e,["color","styles"]);return i.createElement(l.C,Object.assign({variant:"filled",color:t,styles:Object.assign({root:{borderRadius:"2px",background:t,textTransform:"unset"}},a)},n))},LoadingOverlay=e=>(!function(e=!1){i.useEffect(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}(e.visible),i.createElement(c.f,Object.assign({loaderProps:{color:s.r.colors.primaryBase}},e))),Slider=e=>{var{color:t,withControl:a,onChange:l,value:c,min:s,max:d,isStatic:p,containerClassName:u,containerStyle:g}=e,h=(0,o._)(e,["color","withControl","onChange","value","min","max","isStatic","containerClassName","containerStyle"]);let[f,b]=(0,i.useState)(c||s||0),[E]=(0,m.c)(f,n.D);return(0,i.useEffect)(()=>{null==l||l(E)},[E]),(0,i.useEffect)(()=>{b(c)},[c]),i.createElement(n.j,{className:u,style:g},a&&i.createElement(r.B,{type:"button",size:"sm",variant:"ghost",onClick:()=>{b(e=>s&&e===s?e:e-1)}},i.createElement("svg",{width:"10",height:"10",fill:"none",viewBox:"0 0 12 3"},i.createElement("path",{d:"M1 1.004h8",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),i.createElement(n.k,Object.assign({thumbSize:21,labelAlwaysOn:!0,radius:"xl",color:t,value:f,onChange:p?()=>null:b,min:s,max:d},h,{className:"hhg-mantine-slider "+(h.className||"")})),a&&i.createElement(r.B,{type:"button",size:"sm",variant:"ghost",onClick:()=>{b(e=>d&&e===d?e:e+1)}},i.createElement("svg",{width:"16",height:"20",fill:"none",viewBox:"0 0 16 16"},i.createElement("path",{d:"M8 4v8M4 8h8",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))))}},"27Mu":function(e,t,a){a.d(t,{d8:function(){return setCookie},ej:function(){return getCookie},kT:function(){return deleteCookie}});let getCookie=e=>{if("undefined"==typeof window)return;let t=`; ${document.cookie}`,a=t.split(`; ${e}=`);if(2===a.length)return a.pop().split(";").shift()},setCookie=(e,t,a)=>{if("undefined"==typeof window)return;let n="",{days:r,minutes:o,domain:i,path:l}=a||{};if(null==a?void 0:a.expires)n=`; expires=${a.expires}`;else if(r||o){let e=new Date;r?e.setTime(e.getTime()+864e5*r):e.setTime(e.getTime()+6e4*o),n="; expires="+e.toUTCString()}document.cookie=e+"="+(t||"")+n+"; path="+(l||"/")+(i?"; domain="+i:"")},deleteCookie=e=>{"undefined"!=typeof window&&(document.cookie=e+"=; Max-Age=-99999999; path=/")}},gEnE:function(e,t,a){a.d(t,{Z:function(){return setDefaultClass}});var n=a("q1tI");function setDefaultClass(e,t){let a=(0,n.forwardRef)((a,r)=>n.createElement(e,Object.assign({},a,{className:`${t} ${a.className||""}`,ref:r})));return a.classSelector=`.${t}`,a}},"+GCU":function(e,t,a){a.d(t,{E2:function(){return getDynamicHealthToolWithCache},YT:function(){return formatHealthTool},sv:function(){return getDynamicHealthTool}});var n=a("FRPj"),r=a("n/N3"),o=a("i2bO");let formatHealthTool=(e,t)=>{var a,n;if(!e)return{};let r="tl-PH"===t?"/fil":"";return{id:e.id,isSubot:e.is_subot,template:e.template,icon:e.icon,link:(null===(a=e.link)||void 0===a?void 0:a.startsWith("http"))?e.link:`${r}/health-tools`+(null===(n=e.link)||void 0===n?void 0:n.replace(`/${r}/`,"/").replace("/health-tools/","/")),subtitle:e.subtitle,title:e.title}},getDynamicHealthTool=e=>(0,n.a)(void 0,void 0,void 0,function*(){var t,a;try{let n="tl-PH"===e?"lang=fil":"",o=[],i=e.endsWith("_MB");try{let l=yield fetch((0,r.n)((0,r.n)(`${(0,r.c)(e)}/wp-json/api/${i?"health-tools":"healthtools"}?ismenu=0${n?"&"+n:""}`))).then(e=>e.json());o=(null===(a=null===(t=null==l?void 0:l.data)||void 0===t?void 0:t.map)||void 0===a?void 0:a.call(t,t=>formatHealthTool(t,e)))||[]}catch(e){}return o}catch(e){console.error(e)}}),getDynamicHealthToolWithCache=e=>(0,n.a)(void 0,void 0,void 0,function*(){return(yield(0,o.g)("all-health-tools",()=>getDynamicHealthTool(e||"en-PH"),e=>!!(null==e?void 0:e.length),6e4))||[]})},sVb9:function(e,t,a){a.d(t,{b:function(){return getSocialList}});var n=a("q1tI"),r=a("FRPj"),o=a("EiiV"),i=a("EoPH"),l=a("grWN"),c=a("nGnw"),s=a("eosF");a("JIJ2");let Facebook=e=>{var{size:t}=e,a=(0,r._)(e,["size"]);return n.createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),n.createElement("path",{d:"M26.454 0H1.534A1.546 1.546 0 0 0 0 1.546v24.92A1.545 1.545 0 0 0 1.546 28h13.412V17.172h-3.64v-4.239h3.64V9.814c0-3.615 2.209-5.586 5.434-5.586a29 29 0 0 1 3.26.168v3.78h-2.224c-1.755 0-2.097.84-2.097 2.058v2.7h4.189l-.56 4.238h-3.64V28h7.134c.854 0 1.546-.692 1.546-1.546V1.534A1.546 1.546 0 0 0 26.454 0",fill:"#1778F2"}))};Facebook.defaultProps={size:24};let Line=e=>{var{size:t}=e,a=(0,r._)(e,["size"]);return n.createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 32 32"},a),n.createElement("g",{id:"surface1"},n.createElement("path",{fill:"#00cf2e",d:"M26.4 32H5.6A5.6 5.6 0 0 1 0 26.4V5.6A5.6 5.6 0 0 1 5.6 0h20.8A5.6 5.6 0 0 1 32 5.6v20.8a5.6 5.6 0 0 1-5.6 5.6m0 0"}),n.createElement("path",{fill:"#fff",d:"M28.2 14.2c0-4.4-5.2-9.2-12-9.2-6.6 0-12 3.9-12 9.2 0 4.9 4.2 9 10 9.5.4 0 .8.2 1 .6l.2.7a9.3 9.3 0 0 1-.2 1.6.4.4 0 0 0 .2.4.4.4 0 0 0 .4 0c2.8-1.2 12.4-6.3 12.4-12.8m0 0"}),n.createElement("path",{fill:"#00cf2e",d:"M11.8 16.4H10v-4.2a.6.6 0 0 0-.6-.6.6.6 0 0 0-.6.6V17c0 .3.3.6.6.6h2.4c.3 0 .6-.3.6-.6a.6.6 0 0 0-.6-.6m1.6-4.8a.6.6 0 0 0-.6.6V17c0 .3.3.6.6.6s.6-.3.6-.6v-4.8a.6.6 0 0 0-.6-.6m5.6 0a.6.6 0 0 0-.6.6v3l-2.5-3.4a.6.6 0 0 0-.7-.2.6.6 0 0 0-.4.6V17a.6.6 0 0 0 1.2 0v-3l2.5 3.4a.6.6 0 0 0 .5.2.6.6 0 0 0 .6-.6v-4.8a.6.6 0 0 0-.6-.6m4.4 3.6c.3 0 .6-.3.6-.6a.6.6 0 0 0-.6-.6h-1.8v-1.2h1.8a.6.6 0 1 0 0-1.2H21a.6.6 0 0 0-.6.6V17c0 .3.3.6.6.6h2.4a.6.6 0 0 0 0-1.2h-1.8v-1.2Zm0 0"})))};Line.defaultProps={size:24};let Linkedin=e=>{var{size:t}=e,a=(0,r._)(e,["size"]);return n.createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),n.createElement("rect",{width:"32",height:"32",rx:"4",fill:"#0077B5"}),n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.8571 9.07047C10.8349 7.97612 10.1126 7.14258 8.93969 7.14258C7.76679 7.14258 7 7.97612 7 9.07047C7 10.1422 7.74415 10.9997 8.89516 10.9997H8.9171C10.1126 10.9997 10.8571 10.1422 10.8571 9.07047ZM10.8571 12.2861H7V23.8576H10.8571V12.2861ZM20.1512 12.2861C22.9226 12.2861 25.0002 13.9023 25.0002 17.3749L25.0001 23.8572H20.7887V17.8087C20.7887 16.2895 20.1793 15.2527 18.6547 15.2527C17.4912 15.2527 16.7981 15.9516 16.4937 16.6266C16.3824 16.8686 16.355 17.2057 16.355 17.5436V23.8576H12.1431C12.1431 23.8576 12.1986 13.6128 12.1431 12.5519H16.355V14.1532C16.914 13.3835 17.9152 12.2861 20.1512 12.2861Z",fill:"white"}))};Linkedin.defaultProps={size:24};let Telegram=e=>{var{size:t=24}=e,a=(0,r._)(e,["size"]);return n.createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),n.createElement("path",{fill:"#00AEED",d:"M0 0h32v32H0z"}),n.createElement("path",{d:"m7.322 15.653 15.426-5.948c.716-.258 1.342.175 1.11 1.258l.001-.002-2.627 12.375c-.194.877-.716 1.09-1.445.677l-4-2.948-1.93 1.859c-.213.213-.393.393-.806.393l.284-4.07 7.413-6.698c.323-.284-.072-.444-.497-.161l-9.161 5.768-3.95-1.232c-.857-.272-.876-.857.182-1.27",fill:"#fff"}))},TikTok=e=>{var{size:t=24}=e,a=(0,r._)(e,["size"]);return n.createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),n.createElement("path",{d:"M28.19 0H3.81A3.814 3.814 0 0 0 0 3.81v24.38A3.813 3.813 0 0 0 3.81 32h24.38A3.814 3.814 0 0 0 32 28.19V3.81A3.814 3.814 0 0 0 28.19 0m-3.043 13.96a5.71 5.71 0 0 1-5.302-2.555v8.79A6.497 6.497 0 1 1 13.35 13.7c.135 0 .268.012.401.02v3.202c-.133-.016-.264-.04-.401-.04a3.315 3.315 0 1 0 0 6.631c1.831 0 3.449-1.443 3.449-3.274l.032-14.93h3.06a5.705 5.705 0 0 0 5.257 5.094z",fill:"#000"}))},Twitter=e=>{var{size:t}=e,a=(0,r._)(e,["size"]);return n.createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),n.createElement("path",{d:"M21.407 0H2.593A2.593 2.593 0 0 0 0 2.593v18.814A2.593 2.593 0 0 0 2.593 24h18.814A2.593 2.593 0 0 0 24 21.407V2.593A2.593 2.593 0 0 0 21.407 0m-6.099 20.353-4.46-6.491-5.584 6.49H3.821l6.386-7.422-6.386-9.295h4.871l4.223 6.147 5.288-6.147h1.443l-6.09 7.079 6.623 9.638z",fill:"#000"}))};Twitter.defaultProps={size:24};let Viber=e=>{var{size:t=24}=e,a=(0,r._)(e,["size"]);return n.createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),n.createElement("path",{d:"M24 32H8a8 8 0 0 1-8-8V8a8 8 0 0 1 8-8h16a8 8 0 0 1 8 8v16a8 8 0 0 1-8 8",fill:"#785AFA"}),n.createElement("path",{d:"M25 17.684c-.575 4.638-3.97 4.93-4.595 5.13a19 19 0 0 1-5.85.498s-2.32 2.372-3.04 3.1a.4.4 0 0 1-.335.137c-.125-.031-.16-.178-.16-.395.005-.308.02-3.395.02-3.395-4.53-1.257-4.265-5.986-4.215-8.462s.515-4.505 1.9-5.869c2.48-2.248 7.595-1.912 7.595-1.912 4.32.018 6.39 1.319 6.87 1.755 1.59 1.364 2.405 4.628 1.81 9.412m-.62-10.57c-.565-.523-2.86-2.187-7.965-2.21 0 0-6.02-.363-8.955 2.33-1.635 1.633-2.21 4.024-2.27 6.989S4.645 22.743 10 24.25v2.299c0 .587.175 1.451 1.02 1.451.345 0 .835-.132 1.52-.828l2.275-2.193c2.077.109 4.16-.077 6.185-.553.74-.24 4.925-.776 5.605-6.331.7-5.726-.34-9.349-2.225-10.981",fill:"#fff"}),n.createElement("path",{d:"M15.998 9a5.5 5.5 0 0 1 5.5 5.5.501.501 0 0 1-1 0 4.503 4.503 0 0 0-4.5-4.5h-.045a.5.5 0 0 1 0-1z",fill:"#fff"}),n.createElement("path",{d:"M15.998 11a3.5 3.5 0 0 1 3.5 3.5.5.5 0 0 1-1 0 2.5 2.5 0 0 0-2.5-2.5h-.045a.5.5 0 1 1 0-1zm5.288 8.44a.77.77 0 0 0-.105-.951 12.6 12.6 0 0 0-1.98-1.43.88.88 0 0 0-1.115.155l-.405.505c-.51.63-2.07-.315-2.81-1.088-.775-.745-1.72-2.302-1.09-2.813l.505-.401a.88.88 0 0 0 .155-1.117 12 12 0 0 0-1.43-1.98.766.766 0 0 0-.95-.107 4.5 4.5 0 0 0-1.04.845 1.32 1.32 0 0 0-.355 1.357 14.8 14.8 0 0 0 3.21 5.212 14.9 14.9 0 0 0 5.21 3.207 1.32 1.32 0 0 0 1.36-.352q.476-.475.84-1.041",fill:"#fff"}))};function formatShareUrl(e,t,a){let n=e.startsWith("http")?e:`${(0,l.g)(t)}${e}`;return encodeURIComponent(a?(()=>{let e=new URL(n);return e.searchParams.append("cn",a),e.toString()})():n)}let getSocialList=({shareUrl:e,size:t=32,locale:a})=>[{icon:n.createElement(Facebook,{size:t}),name:"Facebook",type:i.S.Facebook,href:`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(formatShareUrl(e,a,i.S.Facebook))}`},{icon:n.createElement("img",{src:c.C.getAssetPath("zalo-mini.png"),alt:"Zalo",style:{maxWidth:t,maxHeight:t},loading:"lazy"}),name:"Zalo",type:i.S.Zalo,href:`https://sp.zalo.me/share?href=${encodeURIComponent(formatShareUrl(e,a,i.S.Zalo))}`,allowedLocales:[s.L.Vietnam]},{icon:n.createElement(Twitter,{size:t}),name:"Twitter",type:i.S.Twitter,href:`https://twitter.com/intent/tweet?url=${formatShareUrl(e,a,i.S.Twitter)}`},{icon:n.createElement(o.W,{size:t}),name:"WhatsApp",type:i.S.WhatsApp,href:`https://wa.me/?text=${formatShareUrl(e,a,i.S.WhatsApp)}`},{icon:n.createElement(Linkedin,{size:t}),name:"LinkedIn",type:i.S.LinkedIn,href:`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(formatShareUrl(e,a,i.S.LinkedIn))}`},{icon:n.createElement(Line,{size:t}),name:"Line",type:i.S.Line,href:`http://line.me/R/msg/text/?${formatShareUrl(e,a,i.S.Line)}`,allowedLocales:[s.L.Taiwan]},{icon:n.createElement(o.I,{size:t}),name:"Instagram",type:i.S.Instagram,href:a===s.L.Taiwan?"https://www.instagram.com/helloyishi/":a===s.L.Malaysia?"https://www.instagram.com/hellodoktor_official/":a===s.L.Thailand?"https://www.instagram.com/hellokhunmor/":a===s.L.Myanmar?"https://www.instagram.com/hellosayarwon/":a===s.L.Cambodia?"https://www.instagram.com/hellokrupetofficial/":a===s.L.Vietnam?"https://www.instagram.com/hellobacsi/":a===s.L.Indonesia?"https://www.instagram.com/hellosehat/":"",allowedLocales:[s.L.Taiwan,s.L.Malaysia,s.L.Myanmar,s.L.Cambodia,s.L.Vietnam,s.L.Indonesia,s.L.Thailand]},{icon:n.createElement(TikTok,{size:t}),name:"TikTok",type:i.S.Tiktok,href:a===s.L.Thailand?"https://www.tiktok.com/@hellokhunmor":a===s.L.Malaysia?"https://www.tiktok.com/@hellodoktor_my":a===s.L.Cambodia?"https://www.tiktok.com/@hellokrupet":a===s.L.Vietnam?"https://www.tiktok.com/@hellobacsi":"",allowedLocales:[s.L.Malaysia,s.L.Cambodia,s.L.Vietnam,s.L.Thailand]},{icon:n.createElement(Telegram,{size:t}),name:"Telegram",type:i.S.Telegram,href:a===s.L.Cambodia?"http://t.me/hellokrupetofficial":a===s.L.Indonesia?"https://www.instagram.com/hellosehat/":"",allowedLocales:[s.L.Cambodia,s.L.Indonesia]},{icon:n.createElement(Viber,{size:t}),name:"Viber",type:i.S.Viber,href:(s.L.Myanmar,""),allowedLocales:[s.L.Myanmar]}]},iFIu:function(e,t,a){a.d(t,{CM:function(){return getWindowSizeGroups},Os:function(){return ScreenSizeContextProvider},eL:function(){return l}});var n=a("q1tI"),r=a("DzJC"),o=a.n(r),i=a("uuQu");let l=(0,n.createContext)({isInit:!0}),getWidthValue=e=>"number"==typeof e?e:"undefined"!=typeof window&&window.innerWidth||0,getWindowSizeGroups=e=>{let t=getWidthValue(e);return{smallMobile:t=i.B.BREAK_POINT_SMALL_MOBILE&&t=i.B.BREAK_POINT_MOBILE&&t=i.B.BREAK_POINT_TABLET&&t=i.B.BREAK_POINT_PC}},ScreenSizeContextProvider=({children:e})=>{let[t,a]=(0,n.useState)(()=>({isInit:!0}));(0,n.useEffect)(()=>{let e=o()(()=>{a({width:window.innerWidth,height:window.innerHeight,isInit:!1})},200);return window.addEventListener("resize",e,{passive:!0}),()=>{window.removeEventListener("resize",e)}},[]);let r=(0,n.useMemo)(()=>getWindowSizeGroups(t.width),[t.width]);return n.createElement(l.Provider,{value:Object.assign(Object.assign({},t),{sizeGroups:r})},e)}},iBNF:function(e,t,a){a.d(t,{f:function(){return r},r:function(){return n}});let n={colors:{primary50:"#e3f2ff",primary100:"#bcdeff",primary200:"#91caff",primary300:"#65b5ff",primary400:"#45a4ff",primary500:"#2b94ff",primary600:"#2d87f3",primary700:"#2c74df",primary800:"#2b62cd",primary900:"#2743ad",primaryBase:"#2d87f3",primaryHover:"#2c74df",primaryActive:"#2b62cd",primaryVisited:"#2743ad",secondaryBase:"#284a75",secondaryDark:"#1b3250",accentLight:"#b1ebf8",accentMain:"#00AECD",success:"#00b16a",error:"#f71210",gray50:"#fafafa",gray100:"#f2f2f2",gray200:"#d9d9d9",gray300:"#bfbfbf",gray400:"#8c8c8c",gray500:"#737373",gray600:"#595959",gray700:"#404040",gray800:"#262626",gray900:"#1a1a1a",gray1000:"#111111",black:"#000000",blue50:"#e3f2ff",blue100:"#bcdeff",blue200:"#91caff",blue300:"#65b5ff",blue400:"#45a4ff",blue500:"#2b94ff",blue600:"#2d87f3",blue700:"#2c74df",blue800:"#2b62cd",blue900:"#2743ad",alertWarning:"#fe921d",green50:"#e0f8ee",green100:"#b3eed5",green200:"#7ce2b9",green300:"#2ed69e",green400:"#00CB8A",green500:"#00C076",green600:"#00B16A",green700:"#009E5C",green800:"#008C50",green900:"#006C39",yellow50:"#fff8e2",yellow100:"#ffecb6",yellow200:"#ffe187",yellow300:"#ffd658",yellow400:"#ffc326",yellow500:"#fe921d",yellow600:"#ffb521",yellow700:"#fea21e",yellow800:"#fe921d",yellow900:"#fc7419",red50:"#fae9e8",red100:"#feccbf",red200:"#FEAA96",red300:"#f44d2c",red400:"#ff6f4d",red500:"#ff5331",red600:"#f44d2c",red700:"#e64728",red800:"#d84023",red900:"#bf331b",neutral50:"#f8f9fc",neutral100:"#e4e8ec",neutral150:"#fafafa",neutral200:"#d2d6dc",neutral300:"#bfc5cc",neutral400:"#adb3bc",neutral500:"#9aa2ac",neutral600:"#87909c",neutral700:"#757f8c",neutral800:"#626d7c",teal50:"#e0f7fc",teal100:"#b1ebf8",teal200:"#7ddff3",teal300:"#44d1ec",teal400:"#00c7e6",teal500:"#00bee0",teal600:"#00aecd",teal700:"#0099b2",teal800:"#008599",teal900:"#00626c",pink50:"#fff1f6",pink100:"#ffdce9",pink200:"#fec7dc",pink300:"#fec2cf",pink400:"#fe9dc2",pink500:"#fd87b4",pink600:"#fd72a7",pink700:"#fc5d9a",pink800:"#fc488d",violet50:"#f5edff",violet100:"#e7d2f7",violet200:"#d8b7f0",violet300:"#ca9ce8",violet400:"#bb82e1",violet500:"#ad67d9",violet600:"#9e4cd1",violet700:"#9031ca",violet800:"#8116c2",indigo700:"#35639c",indigo800:"#284a75",indigo900:"#1b3250",brown50:"#faecde",brown100:"#ecd8c5",brown200:"#dec5ab",brown300:"#d0b192",brown400:"#c39d79",brown500:"#b5895f",brown600:"#a77646",brown700:"#99622c",brown800:"#8b4e13",white:"#fff",mb50:"#FFE9F1",mb100:"#F8CCDC",mb200:"#F5B4CB",mb300:"#F29CBA",mb400:"#EE84AA",mb500:"#EB6B99",mb600:"#E85388",mb700:"#D34C7C",mb800:"#BE446F",mb900:"#A93D63"},mbColors:{pink:"#e85388",cobalt:"#2661ad",dark:"#202135",gray:"#3e3f58",midGray:"#9495a0",lightGray:"#f3f3f3",lightMint:"#f2fcf8",lightPink:"#ffeaf1",lightOrange:"#fffaeb",lightBlue:"#e0e9fc",mint:"#5ec08f",peach:"#ffaaa9",orange:"#fb8c00",ceruleanBlue:"#b6ceff",red:"#eb5757",lightRed:"#fdeeee",yellow:"#ff8a2b",green:"#f2fcf7",blue:"#4096fe",toneYellow:"#fff9eb",toneGreen:"#f2fcf7",toneBlue:"#e0e9fb",tonePink:"#ffeaf1"},sizes:{fwBold:"700",fwSemiBold:"600",fsCaption2:"13px",fsHeading1:"40px",fsHeading2:"28px",fsHeading4:"24px",fsHeading5:"18px",fsHeading6:"16px",fsParagraph3:"16px",fsParagraph4:"14px",fwRegular:"400"},zIndexes:{belowHeader:"1",zIndex100:"100",onTop:"1000",drawer:305},defaultColor:"",borderRadius:"6px"},r=Object.assign(Object.assign({},n),{colors:Object.assign(Object.assign({},n.colors),{primaryBase:"#E85388",primaryHover:"#D34C7C",primaryActive:"#BE446F",primaryVisited:"#5e38ba",primary50:"#FFE9F1",primary100:"#F8CCDC",primary200:"#F5B4CB",primary300:"#F29CBA",primary400:"#EE84AA",primary500:"#EB6B99",primary600:"#E85388",primary700:"#D34C7C",primary800:"#BE446F",primary900:"#A93D63"}),borderRadius:"16px"})},QcYj:function(e,t,a){a.d(t,{K:function(){return MobileBottomNavigation}});var n=a("FRPj"),r=a("q1tI"),o=a("U15T");a("rBCA");let MobileBottomNavigation=e=>{var{children:t,isCollapsed:a=!1,template:i="homepage",refObject:l,height:c=56}=e,s=(0,n._)(e,["children","isCollapsed","template","refObject","height"]);return r.createElement(o.S,Object.assign({height:c,"data-is-collapsed":a,"data-template":i,ref:l},s),t)};MobileBottomNavigation.Icon=o.M},Ztav:function(e,t,a){a.d(t,{T:function(){return ArticleCard}});var n=a("q1tI"),r=a("V6QO"),o=a("nGnw"),i=a("wp0n"),l=a("DEkF"),c=a("iBNF"),s={expertName:"PiqKaXk",anchor:"HgbW6-m",card:"_6lkfLYy",author:"j7c-onH"};let CardAuthor=({avatarImg:e,authorName:t,authorLink:a,uploadTime:r,size:o})=>n.createElement("div",{className:s.author},n.createElement("div",{className:"author"},n.createElement("div",{className:"avatar","data-size":o},e),n.createElement("div",{className:"poster","data-is-disabled-url":!a},n.createElement(i.T,{size:"lg"===o?"p3":"p4"},n.createElement("a",{href:a},n.createElement("span",{className:"name"},t),"•"," "),n.createElement("span",null,r))))),CardExpert=({isMobile:e,avatarImg:t,name:a,link:r,size:o="lg",specialty:m})=>n.createElement("div",{className:s.author},n.createElement("div",{className:"author"},n.createElement("div",{className:"expert-avatar","data-size":o},t),n.createElement("div",{className:"expert","data-is-disabled-url":!r},e?n.createElement("a",{href:r},"lg"===o?n.createElement(n.Fragment,null,n.createElement(l.H,{tag:"h6",className:"expert__name",color:c.r.colors.gray600},a),n.createElement(i.T,{color:c.r.colors.gray500,size:"p3",className:"specialty"},m)):n.createElement(n.Fragment,null,n.createElement(l.H,{tag:"h6",className:"expert__name",color:c.r.colors.gray600},a))):n.createElement("a",{href:r},"lg"===o?n.createElement(n.Fragment,null,n.createElement(l.H,{tag:"h6",className:"expert__name",color:c.r.colors.gray600},a),n.createElement(i.T,{color:c.r.colors.gray500,size:"p3",className:"specialty"},m)):n.createElement(n.Fragment,null,n.createElement("h6",{color:c.r.colors.gray600,className:`${s.expertName} expert__name`},a),n.createElement(i.T,{color:c.r.colors.gray500,size:"p4",className:"specialty"},m)))))),m=(0,n.memo)(()=>n.createElement("div",{className:"shoppable"},n.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},n.createElement("rect",{width:"24",height:"24",rx:"12",fill:"#1B3250"}),n.createElement("path",{d:"M16.6667 8.00033H15.3333C15.3333 6.16033 13.84 4.66699 12 4.66699C10.16 4.66699 8.66667 6.16033 8.66667 8.00033H7.33333C6.6 8.00033 6 8.60033 6 9.33366V17.3337C6 18.067 6.6 18.667 7.33333 18.667H16.6667C17.4 18.667 18 18.067 18 17.3337V9.33366C18 8.60033 17.4 8.00033 16.6667 8.00033ZM12 6.00033C13.1067 6.00033 14 6.89366 14 8.00033H10C10 6.89366 10.8933 6.00033 12 6.00033ZM12 12.667C10.4467 12.667 9.14 11.607 8.77333 10.167C8.66 9.74699 8.98667 9.33366 9.42 9.33366C9.73333 9.33366 9.98667 9.56033 10.0733 9.86699C10.3067 10.7137 11.08 11.3337 12 11.3337C12.92 11.3337 13.6933 10.7137 13.9267 9.86699C14.0133 9.56033 14.2667 9.33366 14.58 9.33366C15.0133 9.33366 15.3333 9.74699 15.2267 10.167C14.86 11.607 13.5533 12.667 12 12.667Z",fill:"white"})))),ArticleCard=({articleLink:e,authorLink:t,authorName:a,avatarImg:c,banner:d,categoryLink:p,categoryName:u,className:g,dataEventActionForBanner:h,dataEventActionForBookmark:f,dataEventActionForCategory:b,dataEventActionForTitle:E,dataEventCategoryForBanner:v,dataEventCategoryForBookmark:w,dataEventCategoryForCategory:y,dataEventCategoryForTitle:C,dataEventLabelForBanner:x,dataEventLabelForBookmark:k,dataEventLabelForCategory:S,dataEventLabelForTitle:B,direction:z="horizontal",hasAffiliate:L,isBookmark:N=!1,isBookmarkDisplayed:O=!0,isMobile:M=!0,onBookmark:T,onClickCategoryName:I,section:P="normal",size:A="md",specialty:_,style:F,styleBanner:j,styleLabel:D,styleTitle:H,text:V,title:Z,type:$="author",uploadTime:R,articleLinkTarget:U,isPremium:W,headingAs:q})=>{let handleClick=e=>{e.stopPropagation(),null==T||T()},G="lg"===A&&"expert"===$?"h4":"lg"===A&&"home"===P?M?"h4":"h3":"lg"===A?"h4":"h5",Y=M||"home"!==P||"lg"!==A||"author"!==$?"c2":"c1";return n.createElement("article",{className:`${s.card} ${g||""}`,"data-size":A,style:F,"data-direction":z,"data-is-expert":"expert"===$||void 0},n.createElement("div",{className:"banner",style:j},n.createElement("a",{className:s.anchor,"data-event-category":v,"data-event-action":h,"data-event-label":x,href:e||"#",target:U},d),W&&n.createElement("img",{loading:"lazy",className:"premium",src:o.C.getAssetPath("premium-crown.svg")}),L&&n.createElement(m,null)),n.createElement("div",{className:"content"},n.createElement("div",{className:"inner-content"},n.createElement(i.T,{style:D,className:"label",size:Y,weight:"caption"},n.createElement("a",{className:s.anchor,"data-event-category":y,"data-event-action":b,"data-event-label":S,href:p||"#",onClick:I},u),O&&n.createElement("a",{className:"bookmark",onClick:handleClick},N?n.createElement(r.Z,{size:18,isActive:!0,"data-event-category":w,"data-event-action":f,"data-event-label":k,activeColor:"#2ED69E"}):n.createElement(r.Z,{size:18,"data-event-category":w,"data-event-action":f,"data-event-label":k}))),n.createElement(l.H,{tag:G,style:H,className:"title",as:q||("lg"===A?"h2":"h3")},n.createElement("a",{className:s.anchor,"data-event-category":C,"data-event-action":E,"data-event-label":B,href:e||"#",target:U},Z)),V&&n.createElement("a",{href:e||"#",target:U},n.createElement(i.T,{size:"lg"===A?"p3":"p4",className:"text"},V))),n.createElement("div",{className:"footer"},"author"===$?n.createElement(CardAuthor,{size:A,avatarImg:c,authorName:a,authorLink:t,uploadTime:R,handleClick:handleClick,isBookmarked:N,dataEventCategoryForBookmark:w,dataEventActionForBookmark:f,dataEventLabelForBookmark:k}):n.createElement(CardExpert,{size:A,isMobile:M,avatarImg:c,specialty:_,name:a,link:t,handleClick:handleClick,isBookmarked:N,dataEventCategoryForBookmark:w,dataEventActionForBookmark:f,dataEventLabelForBookmark:k}))))}},qvfm:function(e,t,a){a.d(t,{T:function(){return ArticleCard}});var n=a("FRPj"),r=a("q1tI"),o=a("dHcq"),i=a("DA0W"),l=a("Eso5"),c=a("SPK5"),s=a("/npG"),m=a("ns0B"),d=a.n(m),p=a("fdQd"),u=a("wp0n"),g=a("R7WV");a("rBCA"),a("xXM3"),a("Wgwc");let _Horizontal=e=>{var t,a,s,{article:m,author:h,authorAvatar:f,badge:b="",hideDescription:E=!1,isBookmarked:v=!1,onBookmark:w,time:y,tracking:C}=e,x=(0,n._)(e,["article","author","authorAvatar","badge","hideDescription","isBookmarked","onBookmark","time","tracking"]);let{isMobile:k}=(0,g.u)();return console.log({article:m}),r.createElement(o.Z,Object.assign({padding:0,radius:0,sx:{display:"flex",flexDirection:"row",gap:24}},x),r.createElement(o.Z.Section,{w:"100%",h:"100%",miw:264,m:0,className:"pointer"},r.createElement("img",{src:(k?m.featureImageMobile:m.featureImage)||m.featureImage,alt:m.postName,style:{width:"100%"},loading:"lazy"})),r.createElement(o.Z.Section,null,r.createElement(i.Z,{position:"apart",mt:16,mb:4},r.createElement(p.b,{href:(null===(t=null==m?void 0:m.primaryCategory)||void 0===t?void 0:t.permalink)||"#"},r.createElement(u.T,{size:"p4",color:"blue.6"},null===(a=null==m?void 0:m.primaryCategory)||void 0===a?void 0:a.displayName)),r.createElement(l.x,{sx:{cursor:"pointer"},role:"button",onClick:w},v?r.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},null==C?void 0:C.bookmark),r.createElement("path",{d:"M6.775 19.7C6.475 19.8333 6.18733 19.8123 5.912 19.637C5.63733 19.4623 5.5 19.2083 5.5 18.875V5.3C5.5 4.8 5.675 4.375 6.025 4.025C6.375 3.675 6.8 3.5 7.3 3.5H16.7C17.2 3.5 17.625 3.675 17.975 4.025C18.325 4.375 18.5 4.8 18.5 5.3V18.875C18.5 19.2083 18.3623 19.4623 18.087 19.637C17.8123 19.8123 17.525 19.8333 17.225 19.7L12 17.45L6.775 19.7Z",fill:"#595959"})):r.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},null==C?void 0:C.bookmark),r.createElement("path",{d:"M7 17.95L12 15.8L17 17.95V5.3C17 5.23333 16.9667 5.16667 16.9 5.1C16.8333 5.03333 16.7667 5 16.7 5H7.3C7.23333 5 7.16667 5.03333 7.1 5.1C7.03333 5.16667 7 5.23333 7 5.3V17.95ZM6.775 19.7C6.475 19.8333 6.18733 19.8123 5.912 19.637C5.63733 19.4623 5.5 19.2083 5.5 18.875V5.3C5.5 4.8 5.675 4.375 6.025 4.025C6.375 3.675 6.8 3.5 7.3 3.5H16.7C17.2 3.5 17.625 3.675 17.975 4.025C18.325 4.375 18.5 4.8 18.5 5.3V18.875C18.5 19.2083 18.3623 19.4623 18.087 19.637C17.8123 19.8123 17.525 19.8333 17.225 19.7L12 17.45L6.775 19.7ZM7 5H17H12H7Z",fill:"#595959"})))),r.createElement(u.T,{size:E?"s2":"s1",mb:8,weight:"semiBold",className:"pointer"},m.postTitle||m.postName||""),!E&&r.createElement(u.T,{size:"p2",mb:16,lineClamp:3,className:"pointer"},d()(m.excerpt||m.description||(null===(s=m.postContent)||void 0===s?void 0:s.split("\r\n")[0])||"")),r.createElement(c.k,{gap:12,align:"center"},r.createElement(p.A,{size:32,src:f,withIndicator:!0,indicatorConfig:{offset:5,size:18,label:r.createElement("img",{loading:"lazy",src:b,alt:""})}},"A"),r.createElement(u.T,{size:"n1",c:"gray.6"},h," • ",y))))};var h=(0,s.k)((e,{})=>({root:{},image:{},title:{},category:{},description:{},author:{}}));let f={DEFAULT:648/440,NO_DESCRIPTION:1.5},_Vertical=e=>{var t,a,s,{article:m,author:b,authorAvatar:E,badge:v="",bannerImageWrapProps:w,hideDescription:y=!1,isBookmarked:C=!1,onBookmark:x,time:k,tracking:S,classNames:B,styles:z,unstyled:L,className:N}=e,O=(0,n._)(e,["article","author","authorAvatar","badge","bannerImageWrapProps","hideDescription","isBookmarked","onBookmark","time","tracking","classNames","styles","unstyled","className"]);let{isMobile:M}=(0,g.u)(),{classes:T,cx:I}=h({},{name:"ArticleCard",classNames:B,styles:z,unstyled:L}),P=(0,r.useMemo)(()=>y?f.NO_DESCRIPTION:f.DEFAULT,[y]);return r.createElement(o.Z,Object.assign({className:I(T.root,N),padding:"lg",radius:0},O),r.createElement(o.Z.Section,{className:I(T.image,"pointer")},r.createElement(p.c,Object.assign({ratio:P},w),r.createElement("img",{src:(M?m.featureImageMobile:m.featureImage)||m.featureImage,alt:m.postName,style:{objectFit:"cover"}}))),r.createElement(o.Z.Section,null,r.createElement(i.Z,{position:"apart",mt:16,mb:4},r.createElement(p.b,{className:T.category,href:(null===(t=null==m?void 0:m.primaryCategory)||void 0===t?void 0:t.permalink)||"#"},r.createElement(u.T,{size:"p4",color:"blue.6"},null===(a=null==m?void 0:m.primaryCategory)||void 0===a?void 0:a.displayName)),r.createElement(l.x,{sx:{cursor:"pointer"},role:"button",onClick:x},C?r.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},null==S?void 0:S.bookmark),r.createElement("path",{d:"M6.775 19.7C6.475 19.8333 6.18733 19.8123 5.912 19.637C5.63733 19.4623 5.5 19.2083 5.5 18.875V5.3C5.5 4.8 5.675 4.375 6.025 4.025C6.375 3.675 6.8 3.5 7.3 3.5H16.7C17.2 3.5 17.625 3.675 17.975 4.025C18.325 4.375 18.5 4.8 18.5 5.3V18.875C18.5 19.2083 18.3623 19.4623 18.087 19.637C17.8123 19.8123 17.525 19.8333 17.225 19.7L12 17.45L6.775 19.7Z",fill:"#595959"})):r.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},null==S?void 0:S.bookmark),r.createElement("path",{d:"M7 17.95L12 15.8L17 17.95V5.3C17 5.23333 16.9667 5.16667 16.9 5.1C16.8333 5.03333 16.7667 5 16.7 5H7.3C7.23333 5 7.16667 5.03333 7.1 5.1C7.03333 5.16667 7 5.23333 7 5.3V17.95ZM6.775 19.7C6.475 19.8333 6.18733 19.8123 5.912 19.637C5.63733 19.4623 5.5 19.2083 5.5 18.875V5.3C5.5 4.8 5.675 4.375 6.025 4.025C6.375 3.675 6.8 3.5 7.3 3.5H16.7C17.2 3.5 17.625 3.675 17.975 4.025C18.325 4.375 18.5 4.8 18.5 5.3V18.875C18.5 19.2083 18.3623 19.4623 18.087 19.637C17.8123 19.8123 17.525 19.8333 17.225 19.7L12 17.45L6.775 19.7ZM7 5H17H12H7Z",fill:"#595959"})))),r.createElement(u.T,{className:I(T.title,"pointer"),size:y?"s2":"s1",mb:8,weight:"semiBold"},m.postTitle||m.postName||""),!y&&r.createElement(u.T,{className:I(T.description,"pointer"),size:"p2",mb:16,lineClamp:3},d()(m.excerpt||m.description||(null===(s=m.postContent)||void 0===s?void 0:s.split("\r\n")[0])||"")),r.createElement(c.k,{className:T.author,gap:12,align:"center"},r.createElement(p.A,{size:32,src:E,withIndicator:!0,indicatorConfig:{offset:5,size:18,label:r.createElement("img",{loading:"lazy",src:v,alt:""})}},"A"),r.createElement(u.T,{size:"n1",c:"gray.6"},b," • ",k))))},ArticleCard=e=>{var{variant:t="vertical"}=e,a=(0,n._)(e,["variant"]);return"horizontal"===t?r.createElement(_Horizontal,Object.assign({},a)):r.createElement(_Vertical,Object.assign({},a))}},hPj0:function(e,t,a){a.d(t,{F:function(){return NavigationLogoutPopup}});var n=a("q1tI"),r=a("t/pd"),o=a("LgdP"),i=a("J8qH"),l=a("Gx+P"),c=a("nGnw"),s=a("rBCA"),m=a("uuQu"),d=a("iBNF");let p=s.Z.div` background-color: white; text-align: center; .cancle-img { margin-top: 24px; ${m.M.mbDown} { width: 80px; height: 80px; } ${m.M.mbUp} { width: 100px; height: 100px; } } h2 { margin-top: 32px; color: ${d.r.colors.gray800}; font-style: normal; font-weight: bold; ${m.M.mbDown} { font-size: 24px; line-height: 32px; } ${m.M.mbUp} { font-size: 32px; line-height: 42px; } } p { margin-top: 8px; color: ${d.r.colors.gray600}; font-style: normal; font-weight: normal; ${m.M.mbDown} { font-size: 16px; line-height: 24px; } ${m.M.mbUp} { font-size: 16px; line-height: 24px; } } `,u=s.Z.div` display: flex; ${m.M.mbDown} { margin-top: 24px; } ${m.M.mbUp} { margin-top: 32px; } justify-content: space-around; button { flex: 1; margin: 4px; } ${e=>"marryBaby"===e.siteType?` .cancel-button { background-color: #E55C8A; } .cancel-button:hover { background-color: #E55C8A !important; } .logout-button { border-color: #E55C8A; color: #E55C8A; } `:""} `,NavigationLogoutPopup=({openLogoutPopup:e,onCloseHandler:t,onLogoutHandler:a,siteType:s="helloSites"})=>{let{t:m}=(0,l.u)();return(0,n.useEffect)(()=>{document.body.classList.toggle("noscroll",e)},[e]),n.createElement(r.h,null,n.createElement(i.P,{type:"confirm",isOpen:e,closeIcon:n.createElement("img",{src:c.C.getAssetPath("closeLight.svg"),style:{width:24,height:24},alt:"close-icon",loading:"lazy"}),onClose:t},n.createElement(p,null,"helloSites"===s&&n.createElement("img",{src:c.C.getAssetPath("arrowDoor.svg"),className:"cancle-img",alt:"close-account",loading:"lazy"}),n.createElement("h2",null,m("helloSites"===s?"logout.popup.ask1":"logout.popup.ask.mb")),n.createElement("p",null,m("logout.popup.ask2")),n.createElement(u,{siteType:s},n.createElement(o.B,{className:"logout-button",color:"tertiary",size:"lg",onClick:a},m("logout.popup.button.logout")),n.createElement(o.B,{className:"cancel-button",color:"primary",size:"lg",onClick:t},m("logout.popup.button.cancel"))))))}},"n/N3":function(e,t,a){a.d(t,{a:function(){return getCurrentSsoUrl},b:function(){return getTogetherApiDomain},c:function(){return getDiscoverApiDomain},d:function(){return getCareApiDomain},e:function(){return normalizeLink},g:function(){return getCurrentBaseUrl},n:function(){return normalizeLinkSlash}});var n=a("xrdX"),r=a("GOBr"),o=a("yNk5");let getCurrentBaseUrl=(e,t)=>{let a=!r.y;return`https://${a?t?"fe.":"discover.":t?"www.":""}${n.v[t?"vi-VN_MB":e]}`},getCurrentSsoUrl=(e,t)=>o.env.UNIFY_SSO_API||`https://${r.y?"id.":"staging-id."}${n.v[t?"vi-VN_MB":e]}`,getTogetherApiDomain=()=>o.env.UNIFY_INTERNAL_TOGETHER_API||o.env.UNIFY_TOGETHER_API||`https://${r.y?"together.":"staging-together."}hellohealthgroup.com`,getDiscoverApiDomain=e=>{let t=e.endsWith("_MB");return t?`https://${r.y?"wp.":"staging."}${n.v[e]}`:o.env.UNIFY_INTERNAL_DISCOVER_API||o.env.UNIFY_DISCOVER_API||`https://${r.y?"wp.":"staging."}${n.v[e]}`},getCareApiDomain=()=>o.env.UNIFY_INTERNAL_CARE_API||o.env.UNIFY_CARE_API||`https://${r.y?"health-care.":"service-health-care."}hellohealthgroup.com`,normalizeLinkSlash=e=>e.replace(/([^:]\/)\/+/g,"$1"),forceEndSlash=e=>e.replace(/\/?$/,"/"),normalizeLink=e=>normalizeLinkSlash(forceEndSlash(e))},xNPh:function(e,t,a){a.d(t,{a:function(){return abbreviateNumber}});let abbreviateNumber=e=>{let t=String(e);if(e>=1e3){let a;let n=["","k","m","b","t"],r=(""+e).length,o=Math.floor(r/3),i=6===r;if(i)a=Math.round(e/1e3);else for(let t=2;t>=1;t--){a=parseFloat((0!=o?e/Math.pow(1e3,o):e).toPrecision(t));let n=(a+"").replace(/[^a-zA-Z 0-9]+/g,"");if(n.length<=2)break}a&&a%1!=0?a=a.toFixed(1):i&&a&&a/1e3>=1&&(o+=1,a/=1e3),t=a+(6===r?n[o-1]:n[o])}return t}},SoOY:function(e,t,a){a.d(t,{TG:function(){return eu}});var n=a("q1tI"),r=a("Eso5"),o=a("aDCK"),i=a("C/sX"),l=a("nWfB"),c=a("7Ci/"),s=a("SPK5"),m=a("mYVa"),d=a("OAL+"),p=a("RZSM"),u=a("fdQd"),g=a("LL/B"),h=a("nGnw"),f=a("wp0n"),b=a("8wjV"),E=a("nCpW"),v=a("jaE6"),w=a("uuQu"),y=a("rCsv"),C=a("U80/"),x=a("Tabs"),k=a("rBCA"),S=a("FRPj"),B=a("Gx+P"),z=a("M2mm"),L=a("u7wK"),N=a("nI2a"),O=a("HR/W"),M=a("DEkF"),T=a("i8i4"),I=a("iBNF"),P=a("R7WV"),A=a("2rdL"),_=a("ft6n"),F=a("DzJC"),j=a.n(F),D=a("MmHG"),H=a("LgdP"),V=a("25AQ"),Z=a("yVya");a("xXM3"),a("Wgwc");var $=a("yNk5");let R=(0,n.createContext)({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1,isMarryBaby:!1,siteType:"helloSites",sharedData:{},setSharedData:()=>!1}),[U,W,q]=(0,C.W)(),G=(0,k.Z)(r.x)` .phone-input { width: 100%; margin-bottom: 32px; ${w.M.mbDown} { margin-bottom: 16px; } .PhoneInput { margin-bottom: 16px; } .PhoneInputCountry { border-radius: 4px 0 0 4px; } .PhoneInputInput { border-radius: 0 4px 4px 0; } } `,DynamicForm=e=>{var{inputOrder:t=["phone"],withSimilac:a=!1,customTerms:r="",formContext:i}=e,l=(0,S._)(e,["inputOrder","withSimilac","customTerms","formContext"]);let{t:c}=(0,B.u)(),s=i||W(),m={phone:e=>{var{label:t,name:r="phone"}=e,i=(0,S._)(e,["label","name"]);return n.createElement(o.I.Wrapper,{className:a?"input-control":"phone-input",withAsterisk:!0,label:t||a?n.createElement(f.T,{size:"s4",weight:"semiBold",as:"span"},t||c("onboarding.similac.input.phone")):void 0},n.createElement(u.P,Object.assign({defaultCountry:y.M[$.env.UNIFY_LOCALE]||"VN"},s.getInputProps(r),i)),n.createElement(o.I.Error,{size:"md"},s.errors.phone))},full_name:e=>{var{label:t,name:a="name"}=e,r=(0,S._)(e,["label","name"]);return n.createElement(u.I,Object.assign({label:n.createElement(f.T,{size:"s4",weight:"semiBold",as:"span"},t||c("onboarding.formEmail.yourName")),withAsterisk:!0},s.getInputProps(a),r))},email:e=>{var{label:t,name:a="email"}=e,r=(0,S._)(e,["label","name"]);return n.createElement(u.I,Object.assign({label:n.createElement(f.T,{size:"s4",weight:"semiBold",as:"span"},t||c("onboarding.formEmail.yourEmail")),withAsterisk:!0},s.getInputProps(a),r))},dob:e=>{var{label:t,name:a="dob"}=e,r=(0,S._)(e,["label","name"]);return n.createElement(L.D,Object.assign({label:n.createElement(f.T,{size:"s4",weight:"semiBold",as:"span"},t||c("onboarding.formEmail.yourBirthday")),placeholder:"DD/MM/YYYY"},s.getInputProps(a),r))},gender:e=>{var{label:t,name:a="gender"}=e,r=(0,S._)(e,["label","name"]);return n.createElement(u.R.Group,Object.assign({className:"radio-group",label:n.createElement(f.T,{size:"s4",weight:"semiBold",as:"span"},t||c("tools.selectGender"))},s.getInputProps(a),r),n.createElement(u.R,{value:"0",label:c("onboarding.formEmail.genderMale")}),n.createElement(u.R,{value:"1",label:c("onboarding.formEmail.genderFemale")}))},otp:({name:e="otp"})=>n.createElement("div",{className:"otp-input"},n.createElement(u.O,Object.assign({enterKeyHint:void 0,nonce:void 0},s.getInputProps(e))),n.createElement(o.I.Error,null,s.errors.otp)),password:({label:e,name:t="password"})=>n.createElement(u.I.Password,Object.assign({label:n.createElement(f.T,{size:"s4",weight:"semiBold",as:"span"},e||c("onboarding.updatePassword.password")),withAsterisk:!0,rightSection:n.createElement(O.V,null)},s.getInputProps(t))),confirm_password:({label:e,name:t="confirmPassword"})=>n.createElement(u.I.Password,Object.assign({label:n.createElement(f.T,{size:"s4",weight:"semiBold",as:"span"},e||c("onboarding.updatePassword.confirmPassword")),withAsterisk:!0,rightSection:n.createElement(O.V,null)},s.getInputProps(t))),term:({name:e="term",className:t=""})=>r?n.createElement("div",{style:{marginBottom:16},className:t},n.createElement(u.d,Object.assign({label:n.createElement(f.T,{size:"p4",as:"span",sx:{a:{color:"#2d87f3",fontWeight:"bold",letterSpacing:0}}},r)},s.getInputProps(e,{type:"checkbox"}),{error:null})),n.createElement(o.I.Error,{size:"md"},s.getInputProps("term",{type:"checkbox"}).error)):null,address:e=>{var{label:t,className:a="",name:r="address"}=e,o=(0,S._)(e,["label","className","name"]);return n.createElement(N.A,Object.assign({className:`${a} input-control`,label:n.createElement(f.T,{size:"s4",weight:"semiBold",as:"span"},t||c("onboarding.similac.input.address"))},s.getInputProps(r),o))}},d=t.map(e=>{var t;let a="string"==typeof e?{inputType:e}:e;return null===(t=m[a.inputType])||void 0===t?void 0:t.call(m,a)});return n.createElement(G,Object.assign({},l),d)},frisoOnboardingSchema=e=>z.Ry().shape({phone:z.Z_().required(e("onboarding.updatePhone.error")).default(""),name:z.Z_().required(e("onboarding.errorMessage.requiredName")),email:z.Z_().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:z.nK().required(e("onboarding.similac.address.error")),term:z.Xg().oneOf([!0],e("validation.error.requiredField"))});var Y=(0,n.forwardRef)((e,t)=>{var{inputOrder:a,onSubmit:o,validateSchema:i,defaultValues:l,isActive:c,customTerms:s,customFormTexts:m}=e,d=(0,S._)(e,["inputOrder","onSubmit","validateSchema","defaultValues","isActive","customTerms","customFormTexts"]);let{nextStep:p,setSharedData:u,sharedData:g}=(0,n.useContext)(R),{t:h}=(0,B.u)(),b=q({initialValues:{term:!1,phone:(null==g?void 0:g.phone)||(null==l?void 0:l.phone)||"",email:(null==g?void 0:g.email)||(null==l?void 0:l.email)||"",name:(null==g?void 0:g.name)||(null==l?void 0:l.name)||""},validate:i||(0,x.X)(frisoOnboardingSchema(h))}),onSubmit=e=>(0,S.a)(void 0,void 0,void 0,function*(){try{yield null==o?void 0:o(e),u(t=>Object.assign(Object.assign({},t),{phone:e.phone,email:e.email,name:e.name})),p()}catch(e){console.error(e)}}),onError=e=>{console.log(e)},handleSubmitForm=()=>{var e;return null===(e=b.onSubmit(onSubmit,onError))||void 0===e?void 0:e()};return(0,n.useImperativeHandle)(t,()=>({submitForm:handleSubmitForm})),n.createElement(r.x,Object.assign({"data-active":c},d),n.createElement(r.x,{sx:e=>({display:"flex",flexDirection:"column",gap:"16px",[e.fn.largerThan("md")]:{gap:"24px"}})},n.createElement(r.x,{sx:{textAlign:"center"}},n.createElement(M.H,{tag:"h4",as:"h2"},null==m?void 0:m.heading),n.createElement(f.T,{size:"p3"},null==m?void 0:m.description)),n.createElement(U,{form:b},n.createElement("form",{className:"friso-form",style:{width:"100%"},onSubmit:b.onSubmit(onSubmit,onError)},n.createElement(r.x,{sx:{".friso-form":{display:"flex",flexWrap:"wrap",gap:"8px",".input-control":{width:"100%",marginBottom:0},".phone-input":{marginBottom:"0 !important",".PhoneInput":{marginBottom:"0 !important"}}}}},n.createElement(DynamicForm,{inputOrder:a,customTerms:s,className:"friso-form"}))))))});let K=k.Z.div` position: fixed; inset: 0; z-index: 1000; background: white; overflow-y: auto; `,X=k.Z.div` height: 100%; ${w.M.lgPcUp} { display: table; width: 100%; height: calc(100% - 25px); } `,Q=k.Z.div` padding: 16px; ${w.M.mbUp} { padding: 48px 24px 24px; } &[data-similac='true'][data-has-banner='true'] { ${w.M.mbDown} { background: white; border-top-left-radius: 1rem; border-top-right-radius: 1rem; margin-top: -1rem; } } `,J=k.Z.div` width: 640px; padding: 16px 16px 0 16px; display: none; ${w.M.mbUp} { width: 640px; display: table-cell; } `,ee=k.Z.div` background-color: ${I.r.colors.primary50}; border-radius: 12px; height: 100%; display: flex; flex-direction: column; justify-content: space-between; &[data-is-marry-baby='true'] { background-color: ${I.r.mbColors.tonePink}; } `,et=k.Z.div` margin-top: 40px; padding: 24px 40px; `,ea=k.Z.div` width: 100%; display: block; img { width: 100%; height: auto; } &.similac { min-width: 1px; img { width: 100%; height: 100%; object-fit: contain; } ${w.M.mbUp} { position: sticky; top: 0; height: 100vh; } } `,en=k.Z.div` margin-top: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; &.similac { margin-top: 16px; } `,er=(0,k.Z)(c.W)` &.hhg-comp-onboarding-container.hhg-comp-onboarding-container { display: flex; flex-direction: column; align-items: center; height: 100%; width: 100%; max-width: 520px; } .header { margin-bottom: 32px; text-align: center; ${w.M.mbDown} { margin-bottom: 16px; } } .input-control { width: 100%; } .radio-group, .input-control { margin-bottom: 16px; } .form { width: 100%; } /* .form-error { margin-top: 32px; font-size: 14px; } .field-error { margin-top: 10px; font-size: 14px; } */ .form-button { width: 100%; } `,eo=k.Z.img` margin-bottom: 38px; `,Onboarding$1=e=>{var t,{heading:a,description:r,children:o,className:i,imgSrc:c,hiddenLogo:s=!1}=e,m=(0,S._)(e,["heading","description","children","className","imgSrc","hiddenLogo"]);let{isMarryBaby:d,siteType:p}=(0,n.useContext)(R);return n.createElement(er,Object.assign({},m,{className:`hhg-comp-onboarding-container ${i}`,size:"sm"}),!s&&n.createElement(A.L,{type:d?p:(null===(t=g.L[$.env.UNIFY_LOCALE])||void 0===t?void 0:t.LOGO_TYPE)||"hellobacsi"}),n.createElement(en,{className:s?"similac":""},c&&n.createElement(eo,{src:c,loading:"lazy"}),(a||r)&&n.createElement("div",{className:"header"},a&&n.createElement(l.D,{order:3},a),r&&n.createElement(f.T,{size:"p3",mt:8,color:I.r.colors.gray600},r)),o))},ei=(0,k.Z)(Onboarding$1)` .phone-input { width: 100%; margin-bottom: 32px; ${w.M.mbDown} { margin-bottom: 16px; } .PhoneInput { margin-bottom: 16px; } .PhoneInputCountry { border-radius: 4px 0 0 4px; } .PhoneInputInput { border-radius: 0 4px 4px 0; } } &:not([data-active='true']) { display: none !important; } `,onboardingSchema=e=>z.Ry().shape({phone:z.Z_().required(e("onboarding.updatePhone.error")).default("")}),el=(0,k.Z)(Onboarding$1)` .otp-input { margin-bottom: 36px; ${w.M.mbDown} { margin-bottom: 20px; } .otpContainer { margin-bottom: 16px; } } .resend { display: flex; gap: 6px; margin-bottom: 32px; ${w.M.mbDown} { margin-bottom: 16px; } a { text-decoration: underline; cursor: pointer; } } .phone-description { margin-left: 2px; margin-top: 2px; } .otp-description-edit-icon { cursor: pointer; vertical-align: bottom; /* height: 100%; */ margin-bottom: 3px; margin-left: 3px; } `,otpSchema=e=>z.Ry().shape({otp:z.Z_().required(e("onboarding.otpForm.error")).length(6,e("onboarding.otpForm.error")).default("")}),onboardingEmailSchema=e=>z.Ry().shape({email:z.Z_().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),name:z.Z_().required(e("onboarding.errorMessage.requiredName"))}),ec=k.Z.div` margin-top: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; &.similac { margin-top: 16px; } `,es=(0,k.Z)(c.W)` &.hhg-comp-onboarding-container.hhg-comp-onboarding-container { display: flex; flex-direction: column; align-items: center; height: 100%; width: 100%; max-width: 520px; } .header { margin-bottom: 32px; text-align: center; ${w.M.mbDown} { margin-bottom: 16px; } } .input-control { width: 100%; } .radio-group, .input-control { margin-bottom: 16px; } .form { width: 100%; } /* .form-error { margin-top: 32px; font-size: 14px; } .field-error { margin-top: 10px; font-size: 14px; } */ .form-button { width: 100%; } `,em=k.Z.img` margin-bottom: 38px; `,OnboardingUI=e=>{var t,{heading:a,description:r,children:o,className:i,imgSrc:c,hiddenLogo:s=!1}=e,m=(0,S._)(e,["heading","description","children","className","imgSrc","hiddenLogo"]);let{isMarryBaby:d,siteType:p}=(0,n.useContext)(R);return n.createElement(es,Object.assign({},m,{className:`hhg-comp-onboarding-container ${i}`,size:"sm"}),!s&&n.createElement(A.L,{type:d?p:(null===(t=g.L[$.env.UNIFY_LOCALE])||void 0===t?void 0:t.LOGO_TYPE)||"hellobacsi"}),n.createElement(ec,{className:s?"similac":""},c&&n.createElement(em,{src:c,loading:"lazy"}),n.createElement("div",{className:"header"},n.createElement(l.D,{order:3},a),n.createElement(f.T,{size:"p3",mt:8,color:I.r.colors.gray600},r)),o))},ed=(0,k.Z)(Onboarding$1)` .phone-input { width: 100%; margin-bottom: 32px; ${w.M.mbDown} { margin-bottom: 16px; } .PhoneInput { margin-bottom: 16px; } .PhoneInputCountry { border-radius: 4px 0 0 4px; } .PhoneInputInput { border-radius: 0 4px 4px 0; } } &:not([data-active='true']) { display: none !important; } `,similacOnboardingSchema=(e,t)=>z.Ry().shape({phone:z.Z_().required(e("onboarding.updatePhone.error")).default(""),name:z.Z_().required(e("onboarding.errorMessage.requiredName")),email:z.Z_().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:z.nK().required(e("onboarding.similac.address.error")),term:t?z.Xg():z.Xg().oneOf([!0],e("validation.error.requiredField"))}),ep=(0,k.Z)(Onboarding$1)` .phone-input { width: 100%; margin-bottom: 32px; ${w.M.mbDown} { margin-bottom: 16px; } .PhoneInput { margin-bottom: 16px; } .PhoneInputCountry { border-radius: 4px 0 0 4px; } .PhoneInputInput { border-radius: 0 4px 4px 0; } } &:not([data-active='true']) { display: none !important; } `,onboardingUpdatePasswordSchema=e=>z.Ry().shape({password:z.Z_().required(e("onboarding.errorMessage.requiredPassword")).min(8,e("onboarding.errorMessage.minLength",{length:8})).matches(/.*[A-Z].*/,e("onboarding.errorMessage.passWithPattern")).default(""),confirmPassword:z.Z_().required(e("onboarding.errorMessage.requiredConfirmPassword")).oneOf([z.iH("password"),null],e("onboarding.errorMessage.passNotMatch")).default("")}),eu={Provider:({children:e,siteType:t,setSharedData:a})=>{let[r,o]=(0,n.useState)(0),[i,l]=(0,n.useState)(0),[c,s]=(0,n.useState)({});return(0,n.useEffect)(()=>{null==a||a(c)},[c,a]),n.createElement(R.Provider,{value:{currentStep:r,setCurrentStep:o,setMaxStep:l,nextStep:()=>r+1<=i&&o(r+1),prevStep:()=>r-1>=0&&o(r-1),siteType:t,isMarryBaby:"marryBaby"===t,sharedData:c,setSharedData:s}},e)},Modal:e=>{var{children:t,withSimilac:a,banner:r,withPortal:o}=e,c=(0,S._)(e,["children","withSimilac","banner","withPortal"]);let{isMobile:s}=(0,P.u)(),{isMarryBaby:m}=(0,n.useContext)(R),{t:d}=(0,B.u)();if(o&&"undefined"==typeof window)return null;let p=n.createElement(K,Object.assign({},c),n.createElement(X,null,n.createElement(i.r,{sx:{[w.M.mbDown]:{margin:0},".mantine-Grid-col":{[w.M.mbDown]:{padding:0}}}},n.createElement(i.r.Col,{span:("object"==typeof r||a)&&!s?6:12,order:a?2:1,orderMd:a?1:2,sx:{zIndex:a?99:void 0}},n.createElement(Q,{"data-similac":a,"data-has-banner":"object"==typeof r},t)),r&&"object"==typeof r&&!a&&n.createElement(i.r.Col,{span:s?12:6,order:1,orderMd:2},n.createElement(J,null,n.createElement(ee,{"data-is-marry-baby":m},n.createElement(et,null,r.heading&&n.createElement(l.D,{order:1,mb:24},r.heading),r.description&&n.createElement(f.T,{size:"p1",color:I.r.colors.gray800},d("onboarding.welcomeScreen.content"))),n.createElement(ea,null,r.imgSrc?n.createElement("img",{src:r.imgSrc,loading:"lazy"}):r.imgComponent?r.imgComponent:null)))),r&&"object"==typeof r&&a&&(r.imgSrc||r.imgComponent)&&n.createElement(i.r.Col,{span:"auto",order:1,orderMd:2},n.createElement(ea,{className:"similac"},r.imgSrc?n.createElement("img",{src:r.imgSrc,loading:"lazy"}):r.imgComponent?r.imgComponent:null)))));return o?(0,T.createPortal)(p,(0,w.a)()):p},Form:({onClose:e,onSubmit:t,canSkip:a=!0,customFormTexts:r,isActive:o,submitProps:i,submitLabel:l,skipProps:c,isWhatsApp:s})=>{let{t:m}=(0,B.u)(),{sharedData:d,setSharedData:p,nextStep:u}=(0,n.useContext)(R),g=q({initialValues:{phone:(null==d?void 0:d.phone)||""},validate:(0,x.X)(onboardingSchema(m))});return n.createElement(ei,{heading:(null==r?void 0:r.heading)||m("onboarding.updatePhone.heading"),description:(null==r?void 0:r.description)||m(s?"onboarding.updateWhatsapp.description":"onboarding.updatePhone.description"),"data-active":o},n.createElement(U,{form:g},n.createElement("form",{onSubmit:g.onSubmit(e=>(0,S.a)(void 0,void 0,void 0,function*(){try{p(t=>Object.assign(Object.assign({},t),{phone:e.phone}));let a=yield null==t?void 0:t(e.phone);a||u()}catch(e){console.error(e)}}),e=>{console.log(e)})},n.createElement(DynamicForm,{inputOrder:["phone"]}),n.createElement(b.B,Object.assign({variant:"primary",fullWidth:!0,size:"lg"},s&&{leftIcon:n.createElement(_.I.WhatsApp,{size:18,useCurrentColor:!0})},i,{type:"submit","data-event-category":s?"OTP":"Sign Up","data-event-action":s?"Whatsapp - Fill phone and continue Click":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"}),l||m(s?"onboarding.updateWhatsapp.submitLabel":"onboarding.button.continue")),a&&n.createElement(b.B,Object.assign({variant:"ghost",fullWidth:!0,size:"lg"},s&&{dataEventCategory:"OTP",dataEventAction:"Whatsapp - Skip fill phone Click",dataEventLabel:"undefined"!=typeof window?window.location.href:""},c,{onClick:e,type:"button"}),m("onboarding.button.skip")))))},OtpForm:{Email:({onSubmit:e,email:t,onResendCode:a,otpError:r,onClose:o,loading:i,canSkip:l})=>{let{sharedData:{email:c,retryEmailCount:s},setSharedData:m,prevStep:d,siteType:p,isMarryBaby:u,nextStep:g}=(0,n.useContext)(R),h=t||c||"",[f,b]=(0,n.useState)(30),w=(0,E.Y)(()=>b(e=>e-1),1e3),[C,k]=(0,v.C)(0,{min:0,max:3}),z=(0,n.useRef)(!0),{t:L}=(0,B.u)();(0,n.useEffect)(()=>(w.start(),w.stop),[]),(0,n.useEffect)(()=>{0===f&&(w.stop(),z.current=!1)},[f]);let N=q({initialValues:{otp:""},validate:(0,x.X)(otpSchema(L))});(0,n.useEffect)(()=>{r&&N.setFieldError("otp",r)},[r]);let O=(0,n.useMemo)(()=>j()(()=>{z.current||(k.increment(),b(30),null==a||a(h),w.start(),z.current=!0)},1e3,{trailing:!1}),[h,a,w]);return n.createElement(el,{heading:L("onboarding.otpForm.heading"),description:n.createElement(n.Fragment,null,n.createElement("span",{dangerouslySetInnerHTML:{__html:L("onboarding.otpForm.descriptionEmail",{email:`${(0,y.h)(h)}`})}}),!(s>=2)&&n.createElement("svg",{onClick:()=>{s>=2||(m(e=>Object.assign(Object.assign({},e),{retryEmailCount:e.retryEmailCount+1})),d())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"otp-description-edit-icon"},n.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},n.createElement(U,{form:N},n.createElement("form",{onSubmit:N.onSubmit(t=>(0,S.a)(void 0,void 0,void 0,function*(){try{k.increment();let a=yield null==e?void 0:e(t.otp);a||g()}catch(e){console.error(e)}}),e=>{console.log(e)})},n.createElement(DynamicForm,{inputOrder:["otp"]}),n.createElement("div",{className:"resend"},n.createElement(D.T,{size:"p4",color:I.r.colors.gray400},L("onboarding.otpForm.notReceiveOTP")),n.createElement(D.T,{as:"a",size:"p4",color:u?I.r.mbColors.pink:I.r.colors.primaryBase,onClick:O},0===f?L("onboarding.otpForm.resendCode"):L("onboarding.otpForm.resendCodeWithSeconds",{seconds:f}))),n.createElement(H.B,{theme:p,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:i,disabled:i,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},L("onboarding.button.continue")),l&&C>=3&&n.createElement(H.B,{theme:p,color:"ghost",isBlock:!0,size:"lg",onClick:o,type:"button"},L("onboarding.button.skip")))))},Phone:({onSubmit:e,phone:t,onResendCode:a,otpError:r,onClose:o,loading:i,canSkip:l,isWhatsApp:c})=>{let{sharedData:{phone:d,retryPhoneCount:p},setSharedData:u,prevStep:g,siteType:b,isMarryBaby:w,nextStep:y}=(0,n.useContext)(R),C=t||d||"",[k,z]=(0,n.useState)(30),L=(0,E.Y)(()=>z(e=>e-1),1e3),[N,O]=(0,v.C)(0,{min:0,max:3}),M=(0,n.useRef)(!0),{t:T}=(0,B.u)();(0,n.useEffect)(()=>(L.start(),L.stop),[]),(0,n.useEffect)(()=>{0===k&&(L.stop(),M.current=!1)},[k]);let P=q({initialValues:{otp:""},validate:(0,x.X)(otpSchema(T))});(0,n.useEffect)(()=>{r&&P.setFieldError("otp",r)},[r]);let A=(0,n.useMemo)(()=>j()(()=>{M.current||(O.increment(),z(30),null==a||a(C),L.start(),M.current=!0)},1e3,{trailing:!1}),[C,a,L]),_=`${C.slice(0,-3).replace(/./g,"x").concat(C.slice(-3))}`;return n.createElement(el,{heading:c?n.createElement(s.k,{align:"center",justify:"center",gap:(0,m.h)(8)},n.createElement("img",{style:{width:(0,m.h)(24)},loading:"lazy",src:h.C.getAssetPath("whatsapp.svg"),alt:"whatsapp"}),n.createElement("span",null,T("onboarding.otpWhatsapps.heading"))):T("onboarding.otpForm.heading"),description:n.createElement(n.Fragment,null,n.createElement("span",{dangerouslySetInnerHTML:{__html:T(c?"onboarding.otpWhatsapps.description":"onboarding.otpForm.description",{phone:_})}}),!(p>=2)&&n.createElement("svg",{onClick:()=>{p>=2||(u(e=>Object.assign(Object.assign({},e),{retryPhoneCount:e.retryPhoneCount+1})),g())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"otp-description-edit-icon"},n.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},n.createElement(U,{form:P},n.createElement("form",{onSubmit:P.onSubmit(t=>(0,S.a)(void 0,void 0,void 0,function*(){try{O.increment();let a=yield null==e?void 0:e(t.otp);a||y()}catch(e){console.error(e)}}),e=>{console.log(e)})},n.createElement(DynamicForm,{inputOrder:["otp"]}),n.createElement("div",{className:"resend"},n.createElement(f.T,{size:"p4",color:I.r.colors.gray400},T("onboarding.otpForm.notReceiveOTP")),n.createElement(f.T,{as:"a",size:"p4",color:w?I.r.mbColors.pink:I.r.colors.primaryBase,onClick:A},0===k?T("onboarding.otpForm.resendCode"):T("onboarding.otpForm.resendCodeWithSeconds",{seconds:k}))),n.createElement(H.B,{theme:b,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:i,disabled:i,"data-event-category":c?"OTP":"Sign Up","data-event-action":c?"Whatsapp - OTP verified Click":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},T("onboarding.button.continue")),l&&N>=3&&n.createElement(H.B,{theme:b,color:"ghost",isBlock:!0,size:"lg",onClick:o,type:"button"},T("onboarding.button.skip")))))}},PersonalInfoForm:({onClose:e,onSubmit:t,canSkip:a,loading:r,errorMessage:o,initialData:i})=>{let{t:l,locale:c}=(0,B.u)(),{siteType:s,isMarryBaby:m,setSharedData:d,nextStep:p}=(0,n.useContext)(R),u=q({validate:(0,x.X)(onboardingEmailSchema(l))});return(0,n.useEffect)(()=>{u.setValues(Object.assign(Object.assign({gender:"0"},i),(null==i?void 0:i.birthday)&&{birthday:new Date(i.birthday)}))},[i]),(0,n.useEffect)(()=>{o&&u.setFieldError("email",o)},[o]),n.createElement(OnboardingUI,{heading:l("onboarding.formEmail.heading"),description:l("onboarding.formEmail.description",{site:m?"Marry Baby":g.L[c].SITE_NAME_FORMATTED})},n.createElement(U,{form:u},n.createElement("form",{className:"form",onSubmit:u.onSubmit(e=>(0,S.a)(void 0,void 0,void 0,function*(){d(t=>Object.assign(Object.assign({},t),e));let a=yield null==t?void 0:t(Object.assign(Object.assign({},e),{birthday:e.birthday&&(0,V.Z)(e.birthday,"yyyy-MM-dd")}));a||p()}),e=>{console.log({fieldErrors:e})})},n.createElement(DynamicForm,{inputOrder:["full_name","email","dob","gender"]}),n.createElement(H.B,{color:"primary",isBlock:!0,size:"lg",type:"submit",theme:s,isLoading:r,disabled:r},l("onboarding.button.continue")),a&&n.createElement(H.B,{theme:s,color:"ghost",isBlock:!0,size:"lg",onClick:e,type:"button"},l("onboarding.button.skip")))))},ResultScreen:e=>{var{onClose:t}=e,a=(0,S._)(e,["onClose"]);let{t:r}=(0,B.u)(),{siteType:o}=(0,n.useContext)(R);return n.createElement(OnboardingUI,Object.assign({},a),n.createElement(H.B,{theme:o,size:"lg",onClick:t,className:"form-button"},r("onboarding.button.continue")))},SimilacForm:e=>{var{onClose:t,onSubmit:a,canSkip:r=!0,customFormTexts:o,customTerms:i,defaultValues:l,isActive:c}=e,s=(0,S._)(e,["onClose","onSubmit","canSkip","customFormTexts","customTerms","defaultValues","isActive"]);let{t:m}=(0,B.u)(),{nextStep:d,setSharedData:p,sharedData:u}=(0,n.useContext)(R),{isMobile:g}=(0,P.u)(),h=q({initialValues:{term:!1,phone:(null==u?void 0:u.phone)||(null==l?void 0:l.phone)||"",email:(null==u?void 0:u.email)||(null==l?void 0:l.email)||"",name:(null==u?void 0:u.name)||(null==l?void 0:l.name)||""},validate:(0,x.X)(similacOnboardingSchema(m,!i))}),f=(null==l?void 0:l.email)?["full_name","phone","address","term"]:["full_name","email","phone","address","term"];return n.createElement(ed,Object.assign({heading:(null==o?void 0:o.heading)||m("onboarding.updatePhone.heading"),description:(null==o?void 0:o.description)||m("onboarding.updatePhone.description"),hiddenLogo:g,"data-active":c},s),n.createElement(U,{form:h},n.createElement("form",{style:{width:"100%"},onSubmit:h.onSubmit(e=>(0,S.a)(void 0,void 0,void 0,function*(){try{yield null==a?void 0:a(e),p(t=>Object.assign(Object.assign({},t),{phone:e.phone,email:e.email,name:e.name})),d()}catch(e){console.error(e)}}),e=>{console.log(e)})},n.createElement(DynamicForm,{inputOrder:f,withSimilac:!0,customTerms:i}),n.createElement(b.B,{fullWidth:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},m("onboarding.button.continue")),r&&n.createElement(b.B,{variant:"ghost",fullWidth:!0,size:"lg",onClick:t,type:"button"},m("onboarding.button.skip")))))},FrisoForm:Y,UpdatePasswordForm:({onClose:e,onSubmit:t,canSkip:a,errorMessage:r,loading:i})=>{let{t:l}=(0,B.u)(),{nextStep:c}=(0,n.useContext)(R),s=q({initialValues:{password:"",confirmPassword:""},validate:(0,x.X)(onboardingUpdatePasswordSchema(l))});return n.createElement(OnboardingUI,{heading:l("onboarding.updatePassword.heading"),description:l("onboarding.updatePassword.description")},n.createElement(U,{form:s},n.createElement("form",{className:"form",onSubmit:s.onSubmit(e=>(0,S.a)(void 0,void 0,void 0,function*(){yield t((null==e?void 0:e.password)||""),r||c()}),e=>{console.log({fieldErrors:e})})},n.createElement(DynamicForm,{inputOrder:["password","confirm_password"]}),n.createElement(H.B,{color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:i,disabled:i},l("onboarding.button.continue")),a&&n.createElement(H.B,{color:"ghost",isBlock:!0,size:"lg",onClick:e},l("onboarding.button.skip")),r&&n.createElement(o.I.Error,{className:"form-error"},r))))},StepRenderer:({children:e,onStepChange:t})=>{let{currentStep:a,setMaxStep:r}=(0,n.useContext)(R),o=n.Children.count(e);return(0,n.useEffect)(()=>{null==t||t(a)},[a]),(0,n.useEffect)(()=>{r(o-1)},[o]),n.createElement(n.Fragment,null,(0,Z.Z)(e).map((e,t)=>{let r=t===a;return n.createElement(n.Fragment,{key:t},n.isValidElement(e)?e.props.alwaysRender||r?n.cloneElement(e,{isActive:t===a,stepIndex:t}):null:r?e:null)}))},ThankYou:e=>{var{onClose:t,thanksPageInfo:a,isActive:r}=e,o=(0,S._)(e,["onClose","thanksPageInfo","isActive"]);let{t:i}=(0,B.u)(),{isMobile:l}=(0,P.u)();return n.createElement(ep,Object.assign({heading:"",description:"",hiddenLogo:l,"data-active":r},o),n.createElement(c.W,{fluid:!0},n.createElement(d.K,{align:"center",spacing:8,w:"100%",ta:"center"},n.createElement(p.o,{ratio:1,w:{base:120,md:160}},n.createElement("svg",{width:"160",height:"160",viewBox:"0 0 160 160",fill:"none"},n.createElement("mask",{id:"mask0_4580_96805",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"160",height:"160"},n.createElement("circle",{cx:"80",cy:"80",r:"80",fill:"url(#paint0_radial_4580_96805)"})),n.createElement("g",{mask:"url(#mask0_4580_96805)",fill:"#E0F8EE"},n.createElement("path",{d:"m71.594.46 5.382 37.677c.035 0 .106 0 .141-.035l5.242 36.901 5.207-36.936h.07l5.207-37.043A81 81 0 0 0 80.002 0c-2.85 0-5.664.141-8.408.46m59.556 18.08a79.7 79.7 0 0 0-17.977-11.336L97.87 41.068c.035 0 .07.036.07.036L82.46 75.286z"}),n.createElement("path",{d:"M46.439 64.833 82.11 75.321h-.14l.352.106h.035l.035-.035.035.035h-.035l.035.035h.035l.14.071-.105-.07 35.849 10.523c0 .035 0 .035-.035.07l39.789 11.76a81.6 81.6 0 0 0 1.9-17.48c0-1.66-.071-3.355-.141-4.98h-40.035v.071l-37.362.035v-.035l.176-.035-.14.07.316-.106h-.176l72.858-21.717a81 81 0 0 0-9.885-19.35L82.639 75.285h-.14l.07-.07-.106.07.035-.212-.07.141v.036l-.035.035v-.035h-.07v-.036l-.07-.141.034.177-.07-.036.035.036h-.14l-66.35-42.834A80.5 80.5 0 0 0 4.854 52.615zm35.884 10.559v.035l-.106-.07z"}),n.createElement("path",{d:"M57.803 46.93 82.29 75.25 66.774 41.105 50.556 5.614c-6.895 2.72-13.298 6.392-19.103 10.842zm56.074 48.872L82.531 75.568l24.451 28.286c-.036 0-.036.035-.071.035l29.094 33.758a81.7 81.7 0 0 0 14.037-18.468zM82.32 75.427v.036h.036zh.036z"}),n.createElement("path",{d:"m82.286 75.462.035-.035h-.035l-.142.07zm-.07.106L50.941 95.944c-.035-.036-.035-.071-.07-.106L11.328 121.51c4.151 6.991 9.358 13.277 15.374 18.68l35.884-41.74zM46.438 86.056l35.849-10.664-82.146.106A72 72 0 0 0 0 80.3c0 6.498.774 12.818 2.216 18.892zq0 .052 0 0M82.25 75.71 47 153.467c7.282 3.319 15.127 5.544 23.395 6.533zm.21 0 11.892 83.619a78.2 78.2 0 0 0 22.586-7.769zm-.14-.142.036.283.07-.283-.07-.07z"})),n.createElement("path",{d:"m124.694 61.2.292.973c.097.486.486.778.973.972l.972.292-.972.39c-.39.096-.779.485-.876.874l-.389 1.07-.389-1.07a1.9 1.9 0 0 0-.875-.875l-.973-.292.973-.291c.389-.098.681-.487.875-.876z",fill:"#2D87F3"}),n.createElement("path",{d:"m104.744 34.286.171.571c.058.286.286.457.572.572l.571.17-.571.23a.77.77 0 0 0-.514.514l-.229.628-.229-.628a1.1 1.1 0 0 0-.514-.515l-.571-.17.571-.172c.229-.057.4-.286.514-.515z",fill:"#00B16A"}),n.createElement("path",{d:"m118.345 38 .743 2.4c.343 1.086 1.2 1.943 2.229 2.229l2.4.742-2.458.858c-1.028.342-1.771 1.142-2.114 2.114l-.857 2.457-.971-2.571c-.343-.972-1.143-1.715-2.115-2.058l-2.343-.8 2.286-.8c.972-.342 1.714-1.085 2.114-2z",fill:"#FFB521"}),n.createElement("path",{d:"m41.885 98.857.171.572c.057.285.286.457.572.571l.57.171-.57.229a.77.77 0 0 0-.515.514l-.228.629-.229-.629a1.12 1.12 0 0 0-.514-.514l-.572-.171.572-.172c.228-.057.4-.285.514-.514z",fill:"#00B16A"}),n.createElement("path",{d:"m64.572 125.314.742 2.4c.343 1.086 1.2 1.943 2.23 2.229l2.4.743-2.458.857c-1.029.343-1.772 1.143-2.114 2.114l-.858 2.457-.97-2.571c-.344-.972-1.144-1.715-2.115-2.057l-2.343-.8 2.286-.8c.971-.343 1.714-1.086 2.114-2z",fill:"#FFB521"}),n.createElement("path",{d:"m80.97 120.343.287.971c.114.457.514.8.914.914l1.028.286-1.028.343c-.4.114-.743.457-.857.857l-.343 1.029-.4-1.086c-.172-.4-.457-.743-.857-.857l-.972-.343.972-.343c.4-.114.685-.457.857-.8z",fill:"#2D87F3"}),n.createElement("path",{d:"m130.307 98.286.222.757c.09.356.401.623.713.712l.801.223-.801.267a1 1 0 0 0-.668.668l-.267.801-.312-.846c-.133-.311-.356-.579-.668-.668l-.757-.267.757-.267c.312-.09.535-.356.668-.623z",fill:"#00B16A"}),n.createElement("path",{d:"m36.592 64 .223.757c.089.356.4.623.712.712l.802.223-.802.267a1 1 0 0 0-.668.668l-.267.802-.312-.846c-.133-.312-.356-.58-.668-.668l-.757-.268.757-.267c.312-.089.535-.356.668-.623z",fill:"#FFB521"}),n.createElement("path",{d:"m67.382 26.857.291.973c.098.486.487.778.973.973l.973.291-.973.39c-.389.097-.778.486-.875.875l-.39 1.07-.388-1.07a1.9 1.9 0 0 0-.876-.876l-.973-.291.973-.292c.39-.098.681-.487.876-.876z",fill:"#2D87F3"}),n.createElement("path",{d:"M80.001 108.572c15.78 0 28.572-12.792 28.572-28.572S95.781 51.43 80.001 51.43 51.43 64.22 51.43 80 64.222 108.572 80 108.572",fill:"#00B16A"}),n.createElement("path",{d:"M78.58 89.145a9.28 9.28 0 0 1-6.576-2.717l-3.365-3.366a2.444 2.444 0 0 1 3.455-3.455l3.365 3.367a4.377 4.377 0 0 0 6.189 0l21.336-19.283a2.445 2.445 0 0 1 3.408.213 2.44 2.44 0 0 1-.134 3.412L85.005 86.514a9.05 9.05 0 0 1-6.424 2.632",fill:"#fff"}),n.createElement("defs",null,n.createElement("radialGradient",{id:"paint0_radial_4580_96805",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"rotate(90 0 80)scale(80)"},n.createElement("stop",null),n.createElement("stop",{offset:"1"}))))),n.createElement(M.H,{tag:"h3"},null==a?void 0:a.title),n.createElement(f.T,{size:"p3",color:"gray.6"},null==a?void 0:a.description),n.createElement(b.B,{mt:{base:16,md:24},fullWidth:l,size:"lg",onClick:t},i("similac.thankYou.done")))))}}}}]);