"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 r=a("9uQI"),n=a("G7ij"),i=a("LufY"),o=a("q1tI"),l=a("RGvF"),c=a("eZo4"),s=a("iBNF"),d=a("GjY/");a("rBCA"),a("xXM3"),a("Wgwc");let Badge=e=>{var{color:t=s.r.colors.primaryBase,styles:a}=e,r=(0,i._)(e,["color","styles"]);return o.createElement(l.C,Object.assign({variant:"filled",color:t,styles:Object.assign({root:{borderRadius:"2px",background:t,textTransform:"unset"}},a)},r))},LoadingOverlay=e=>(!function(e=!1){o.useEffect(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}(e.visible),o.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:m,isStatic:p,containerClassName:u,containerStyle:h}=e,g=(0,i._)(e,["color","withControl","onChange","value","min","max","isStatic","containerClassName","containerStyle"]);let[f,v]=(0,o.useState)(c||s||0),[b]=(0,d.c)(f,r.D);return(0,o.useEffect)(()=>{null==l||l(b)},[b]),(0,o.useEffect)(()=>{v(c)},[c]),o.createElement(r.j,{className:u,style:h},a&&o.createElement(n.B,{type:"button",size:"sm",variant:"ghost",onClick:()=>{v(e=>s&&e===s?e:e-1)}},o.createElement("svg",{width:"10",height:"10",fill:"none",viewBox:"0 0 12 3"},o.createElement("path",{d:"M1 1.004h8",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),o.createElement(r.k,Object.assign({thumbSize:21,labelAlwaysOn:!0,radius:"xl",color:t,value:f,onChange:p?()=>null:v,min:s,max:m},g,{className:"hhg-mantine-slider "+(g.className||"")})),a&&o.createElement(n.B,{type:"button",size:"sm",variant:"ghost",onClick:()=>{v(e=>m&&e===m?e:e+1)}},o.createElement("svg",{width:"16",height:"20",fill:"none",viewBox:"0 0 16 16"},o.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 r="",{days:n,minutes:i,domain:o,path:l}=a||{};if(null==a?void 0:a.expires)r=`; expires=${a.expires}`;else if(n||i){let e=new Date;n?e.setTime(e.getTime()+864e5*n):e.setTime(e.getTime()+6e4*i),r="; expires="+e.toUTCString()}document.cookie=e+"="+(t||"")+r+"; path="+(l||"/")+(o?"; domain="+o:"")},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 r=a("q1tI");function setDefaultClass(e,t){let a=(0,r.forwardRef)((a,n)=>r.createElement(e,Object.assign({},a,{className:`${t} ${a.className||""}`,ref:n})));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 r=a("LufY"),n=a("LdDg"),i=a("Udpq");let formatHealthTool=(e,t)=>{var a,r;if(!e)return{};let n="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:`${n}/health-tools`+(null===(r=e.link)||void 0===r?void 0:r.replace(`/${n}/`,"/").replace("/health-tools/","/")),subtitle:e.subtitle,title:e.title}},getDynamicHealthTool=e=>(0,r.a)(void 0,void 0,void 0,function*(){var t,a;try{let r="tl-PH"===e?"lang=fil":"",i=[],o=e.endsWith("_MB");try{let l=yield fetch((0,n.n)((0,n.n)(`${(0,n.c)(e)}/wp-json/api/${o?"health-tools":"healthtools"}?ismenu=0${r?"&"+r:""}`))).then(e=>e.json());i=(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 i}catch(e){console.error(e)}}),getDynamicHealthToolWithCache=e=>(0,r.a)(void 0,void 0,void 0,function*(){return(yield(0,i.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 r=a("q1tI"),n=a("LufY"),i=a("i6cE"),o=a("dn/s"),l=a("Vi/3"),c=a("UbCi"),s=a("gFo6");a("JIJ2");let Facebook=e=>{var{size:t}=e,a=(0,n._)(e,["size"]);return r.createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),r.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,n._)(e,["size"]);return r.createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 32 32"},a),r.createElement("g",{id:"surface1"},r.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"}),r.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"}),r.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,n._)(e,["size"]);return r.createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),r.createElement("rect",{width:"32",height:"32",rx:"4",fill:"#0077B5"}),r.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,n._)(e,["size"]);return r.createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),r.createElement("path",{fill:"#00AEED",d:"M0 0h32v32H0z"}),r.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,n._)(e,["size"]);return r.createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),r.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,n._)(e,["size"]);return r.createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),r.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,n._)(e,["size"]);return r.createElement("svg",Object.assign({width:t,height:t,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),r.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"}),r.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"}),r.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"}),r.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 r=e.startsWith("http")?e:`${(0,l.g)(t)}${e}`;return encodeURIComponent(a?(()=>{let e=new URL(r);return e.searchParams.append("cn",a),e.toString()})():r)}let getSocialList=({shareUrl:e,size:t=32,locale:a})=>[{icon:r.createElement(Facebook,{size:t}),name:"Facebook",type:o.S.Facebook,href:`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(formatShareUrl(e,a,o.S.Facebook))}`},{icon:r.createElement("img",{src:c.C.getAssetPath("zalo-mini.png"),alt:"Zalo",style:{maxWidth:t,maxHeight:t},loading:"lazy"}),name:"Zalo",type:o.S.Zalo,href:`https://sp.zalo.me/share?href=${encodeURIComponent(formatShareUrl(e,a,o.S.Zalo))}`,allowedLocales:[s.L.Vietnam]},{icon:r.createElement(Twitter,{size:t}),name:"Twitter",type:o.S.Twitter,href:`https://twitter.com/intent/tweet?url=${formatShareUrl(e,a,o.S.Twitter)}`},{icon:r.createElement(i.W,{size:t}),name:"WhatsApp",type:o.S.WhatsApp,href:`https://wa.me/?text=${formatShareUrl(e,a,o.S.WhatsApp)}`},{icon:r.createElement(Linkedin,{size:t}),name:"LinkedIn",type:o.S.LinkedIn,href:`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(formatShareUrl(e,a,o.S.LinkedIn))}`},{icon:r.createElement(Line,{size:t}),name:"Line",type:o.S.Line,href:`http://line.me/R/msg/text/?${formatShareUrl(e,a,o.S.Line)}`,allowedLocales:[s.L.Taiwan]},{icon:r.createElement(i.I,{size:t}),name:"Instagram",type:o.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:r.createElement(TikTok,{size:t}),name:"TikTok",type:o.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:r.createElement(Telegram,{size:t}),name:"Telegram",type:o.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:r.createElement(Viber,{size:t}),name:"Viber",type:o.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 r=a("q1tI"),n=a("DzJC"),i=a.n(n),o=a("kO4G");let l=(0,r.createContext)({isInit:!0}),getWidthValue=e=>"number"==typeof e?e:"undefined"!=typeof window&&window.innerWidth||0,getWindowSizeGroups=e=>{let t=getWidthValue(e);return{smallMobile:t=o.B.BREAK_POINT_SMALL_MOBILE&&t=o.B.BREAK_POINT_MOBILE&&t=o.B.BREAK_POINT_TABLET&&t=o.B.BREAK_POINT_PC}},ScreenSizeContextProvider=({children:e})=>{let[t,a]=(0,r.useState)(()=>({isInit:!0}));(0,r.useEffect)(()=>{let e=i()(()=>{a({width:window.innerWidth,height:window.innerHeight,isInit:!1})},200);return window.addEventListener("resize",e,{passive:!0}),()=>{window.removeEventListener("resize",e)}},[]);let n=(0,r.useMemo)(()=>getWindowSizeGroups(t.width),[t.width]);return r.createElement(l.Provider,{value:Object.assign(Object.assign({},t),{sizeGroups:n})},e)}},iBNF:function(e,t,a){a.d(t,{f:function(){return n},r:function(){return r}});let r={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"},n=Object.assign(Object.assign({},r),{colors:Object.assign(Object.assign({},r.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 r=a("LufY"),n=a("q1tI"),i=a("/syn");a("rBCA");let MobileBottomNavigation=e=>{var{children:t,isCollapsed:a=!1,template:o="homepage",refObject:l,height:c=56}=e,s=(0,r._)(e,["children","isCollapsed","template","refObject","height"]);return n.createElement(i.S,Object.assign({height:c,"data-is-collapsed":a,"data-template":o,ref:l},s),t)};MobileBottomNavigation.Icon=i.M},Ztav:function(e,t,a){a.d(t,{T:function(){return ArticleCard}});var r=a("q1tI"),n=a("V6QO"),i=a("UbCi"),o=a("rrs9"),l=a("h7+k"),c=a("iBNF"),s={expertName:"PiqKaXk",anchor:"HgbW6-m",card:"_6lkfLYy",author:"j7c-onH"};let CardAuthor=({avatarImg:e,authorName:t,authorLink:a,uploadTime:n,size:i})=>r.createElement("div",{className:s.author},r.createElement("div",{className:"author"},r.createElement("div",{className:"avatar","data-size":i},e),r.createElement("div",{className:"poster","data-is-disabled-url":!a},r.createElement(o.T,{size:"lg"===i?"p3":"p4"},r.createElement("a",{href:a},r.createElement("span",{className:"name"},t),"•"," "),r.createElement("span",null,n))))),CardExpert=({isMobile:e,avatarImg:t,name:a,link:n,size:i="lg",specialty:d})=>r.createElement("div",{className:s.author},r.createElement("div",{className:"author"},r.createElement("div",{className:"expert-avatar","data-size":i},t),r.createElement("div",{className:"expert","data-is-disabled-url":!n},e?r.createElement("a",{href:n},"lg"===i?r.createElement(r.Fragment,null,r.createElement(l.H,{tag:"h6",className:"expert__name",color:c.r.colors.gray600},a),r.createElement(o.T,{color:c.r.colors.gray500,size:"p3",className:"specialty"},d)):r.createElement(r.Fragment,null,r.createElement(l.H,{tag:"h6",className:"expert__name",color:c.r.colors.gray600},a))):r.createElement("a",{href:n},"lg"===i?r.createElement(r.Fragment,null,r.createElement(l.H,{tag:"h6",className:"expert__name",color:c.r.colors.gray600},a),r.createElement(o.T,{color:c.r.colors.gray500,size:"p3",className:"specialty"},d)):r.createElement(r.Fragment,null,r.createElement("h6",{color:c.r.colors.gray600,className:`${s.expertName} expert__name`},a),r.createElement(o.T,{color:c.r.colors.gray500,size:"p4",className:"specialty"},d)))))),d=(0,r.memo)(()=>r.createElement("div",{className:"shoppable"},r.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},r.createElement("rect",{width:"24",height:"24",rx:"12",fill:"#1B3250"}),r.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:m,categoryLink:p,categoryName:u,className:h,dataEventActionForBanner:g,dataEventActionForBookmark:f,dataEventActionForCategory:v,dataEventActionForTitle:b,dataEventCategoryForBanner:E,dataEventCategoryForBookmark:y,dataEventCategoryForCategory:w,dataEventCategoryForTitle:C,dataEventLabelForBanner:k,dataEventLabelForBookmark:x,dataEventLabelForCategory:B,dataEventLabelForTitle:M,direction:S="horizontal",hasAffiliate:L,isBookmark:A=!1,isBookmarkDisplayed:N=!0,isMobile:I=!0,onBookmark:P,onClickCategoryName:z,section:_="normal",size:$="md",specialty:F,style:O,styleBanner:T,styleLabel:D,styleTitle:Z,text:j,title:H,type:U="author",uploadTime:V,articleLinkTarget:W,isPremium:R,headingAs:q})=>{let handleClick=e=>{e.stopPropagation(),null==P||P()},Y="lg"===$&&"expert"===U?"h4":"lg"===$&&"home"===_?I?"h4":"h3":"lg"===$?"h4":"h5",G=I||"home"!==_||"lg"!==$||"author"!==U?"c2":"c1";return r.createElement("article",{className:`${s.card} ${h||""}`,"data-size":$,style:O,"data-direction":S,"data-is-expert":"expert"===U||void 0},r.createElement("div",{className:"banner",style:T},r.createElement("a",{className:s.anchor,"data-event-category":E,"data-event-action":g,"data-event-label":k,href:e||"#",target:W},m),R&&r.createElement("img",{loading:"lazy",className:"premium",src:i.C.getAssetPath("premium-crown.svg")}),L&&r.createElement(d,null)),r.createElement("div",{className:"content"},r.createElement("div",{className:"inner-content"},r.createElement(o.T,{style:D,className:"label",size:G,weight:"caption"},r.createElement("a",{className:s.anchor,"data-event-category":w,"data-event-action":v,"data-event-label":B,href:p||"#",onClick:z},u),N&&r.createElement("a",{className:"bookmark",onClick:handleClick},A?r.createElement(n.Z,{size:18,isActive:!0,"data-event-category":y,"data-event-action":f,"data-event-label":x,activeColor:"#2ED69E"}):r.createElement(n.Z,{size:18,"data-event-category":y,"data-event-action":f,"data-event-label":x}))),r.createElement(l.H,{tag:Y,style:Z,className:"title",as:q||("lg"===$?"h2":"h3")},r.createElement("a",{className:s.anchor,"data-event-category":C,"data-event-action":b,"data-event-label":M,href:e||"#",target:W},H)),j&&r.createElement("a",{href:e||"#",target:W},r.createElement(o.T,{size:"lg"===$?"p3":"p4",className:"text"},j))),r.createElement("div",{className:"footer"},"author"===U?r.createElement(CardAuthor,{size:$,avatarImg:c,authorName:a,authorLink:t,uploadTime:V,handleClick:handleClick,isBookmarked:A,dataEventCategoryForBookmark:y,dataEventActionForBookmark:f,dataEventLabelForBookmark:x}):r.createElement(CardExpert,{size:$,isMobile:I,avatarImg:c,specialty:F,name:a,link:t,handleClick:handleClick,isBookmarked:A,dataEventCategoryForBookmark:y,dataEventActionForBookmark:f,dataEventLabelForBookmark:x}))))}},qvfm:function(e,t,a){a.d(t,{T:function(){return ArticleCard}});var r=a("LufY"),n=a("q1tI"),i=a("dHcq"),o=a("DA0W"),l=a("Eso5"),c=a("SPK5"),s=a("/npG"),d=a("ns0B"),m=a.n(d),p=a("9uQI"),u=a("rrs9"),h=a("UpS/");a("rBCA"),a("xXM3"),a("Wgwc");let _Horizontal=e=>{var t,a,s,{article:d,author:g,authorAvatar:f,badge:v="",hideDescription:b=!1,isBookmarked:E=!1,onBookmark:y,time:w,tracking:C}=e,k=(0,r._)(e,["article","author","authorAvatar","badge","hideDescription","isBookmarked","onBookmark","time","tracking"]);let{isMobile:x}=(0,h.u)();return console.log({article:d}),n.createElement(i.Z,Object.assign({padding:0,radius:0,sx:{display:"flex",flexDirection:"row",gap:24}},k),n.createElement(i.Z.Section,{w:"100%",h:"100%",miw:264,m:0,className:"pointer"},n.createElement("img",{src:(x?d.featureImageMobile:d.featureImage)||d.featureImage,alt:d.postName,style:{width:"100%"},loading:"lazy"})),n.createElement(i.Z.Section,null,n.createElement(o.Z,{position:"apart",mt:16,mb:4},n.createElement(p.b,{href:(null===(t=null==d?void 0:d.primaryCategory)||void 0===t?void 0:t.permalink)||"#"},n.createElement(u.T,{size:"p4",color:"blue.6"},null===(a=null==d?void 0:d.primaryCategory)||void 0===a?void 0:a.displayName)),n.createElement(l.x,{sx:{cursor:"pointer"},role:"button",onClick:y},E?n.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},null==C?void 0:C.bookmark),n.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"})):n.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},null==C?void 0:C.bookmark),n.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"})))),n.createElement(u.T,{size:b?"s2":"s1",mb:8,weight:"semiBold",className:"pointer"},d.postTitle||d.postName||""),!b&&n.createElement(u.T,{size:"p2",mb:16,lineClamp:3,className:"pointer"},m()(d.excerpt||d.description||(null===(s=d.postContent)||void 0===s?void 0:s.split("\r\n")[0])||"")),n.createElement(c.k,{gap:12,align:"center"},n.createElement(p.A,{size:32,src:f,withIndicator:!0,indicatorConfig:{offset:5,size:18,label:n.createElement("img",{loading:"lazy",src:v,alt:""})}},"A"),n.createElement(u.T,{size:"n1",c:"gray.6"},g," • ",w))))};var g=(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:d,author:v,authorAvatar:b,badge:E="",bannerImageWrapProps:y,hideDescription:w=!1,isBookmarked:C=!1,onBookmark:k,time:x,tracking:B,classNames:M,styles:S,unstyled:L,className:A}=e,N=(0,r._)(e,["article","author","authorAvatar","badge","bannerImageWrapProps","hideDescription","isBookmarked","onBookmark","time","tracking","classNames","styles","unstyled","className"]);let{isMobile:I}=(0,h.u)(),{classes:P,cx:z}=g({},{name:"ArticleCard",classNames:M,styles:S,unstyled:L}),_=(0,n.useMemo)(()=>w?f.NO_DESCRIPTION:f.DEFAULT,[w]);return n.createElement(i.Z,Object.assign({className:z(P.root,A),padding:"lg",radius:0},N),n.createElement(i.Z.Section,{className:z(P.image,"pointer")},n.createElement(p.c,Object.assign({ratio:_},y),n.createElement("img",{src:(I?d.featureImageMobile:d.featureImage)||d.featureImage,alt:d.postName,style:{objectFit:"cover"}}))),n.createElement(i.Z.Section,null,n.createElement(o.Z,{position:"apart",mt:16,mb:4},n.createElement(p.b,{className:P.category,href:(null===(t=null==d?void 0:d.primaryCategory)||void 0===t?void 0:t.permalink)||"#"},n.createElement(u.T,{size:"p4",color:"blue.6"},null===(a=null==d?void 0:d.primaryCategory)||void 0===a?void 0:a.displayName)),n.createElement(l.x,{sx:{cursor:"pointer"},role:"button",onClick:k},C?n.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},null==B?void 0:B.bookmark),n.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"})):n.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},null==B?void 0:B.bookmark),n.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"})))),n.createElement(u.T,{className:z(P.title,"pointer"),size:w?"s2":"s1",mb:8,weight:"semiBold"},d.postTitle||d.postName||""),!w&&n.createElement(u.T,{className:z(P.description,"pointer"),size:"p2",mb:16,lineClamp:3},m()(d.excerpt||d.description||(null===(s=d.postContent)||void 0===s?void 0:s.split("\r\n")[0])||"")),n.createElement(c.k,{className:P.author,gap:12,align:"center"},n.createElement(p.A,{size:32,src:b,withIndicator:!0,indicatorConfig:{offset:5,size:18,label:n.createElement("img",{loading:"lazy",src:E,alt:""})}},"A"),n.createElement(u.T,{size:"n1",c:"gray.6"},v," • ",x))))},ArticleCard=e=>{var{variant:t="vertical"}=e,a=(0,r._)(e,["variant"]);return"horizontal"===t?n.createElement(_Horizontal,Object.assign({},a)):n.createElement(_Vertical,Object.assign({},a))}},hPj0:function(e,t,a){a.d(t,{F:function(){return NavigationLogoutPopup}});var r=a("q1tI"),n=a("t/pd"),i=a("OaJP"),o=a("XXp2"),l=a("J5bt"),c=a("UbCi"),s=a("rBCA"),d=a("kO4G"),m=a("iBNF");let p=s.Z.div` background-color: white; text-align: center; .cancle-img { margin-top: 24px; ${d.M.mbDown} { width: 80px; height: 80px; } ${d.M.mbUp} { width: 100px; height: 100px; } } h2 { margin-top: 32px; color: ${m.r.colors.gray800}; font-style: normal; font-weight: bold; ${d.M.mbDown} { font-size: 24px; line-height: 32px; } ${d.M.mbUp} { font-size: 32px; line-height: 42px; } } p { margin-top: 8px; color: ${m.r.colors.gray600}; font-style: normal; font-weight: normal; ${d.M.mbDown} { font-size: 16px; line-height: 24px; } ${d.M.mbUp} { font-size: 16px; line-height: 24px; } } `,u=s.Z.div` display: flex; ${d.M.mbDown} { margin-top: 24px; } ${d.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:d}=(0,l.u)();return(0,r.useEffect)(()=>{document.body.classList.toggle("noscroll",e)},[e]),r.createElement(n.h,null,r.createElement(o.P,{type:"confirm",isOpen:e,closeIcon:r.createElement("img",{src:c.C.getAssetPath("closeLight.svg"),style:{width:24,height:24},alt:"close-icon",loading:"lazy"}),onClose:t},r.createElement(p,null,"helloSites"===s&&r.createElement("img",{src:c.C.getAssetPath("arrowDoor.svg"),className:"cancle-img",alt:"close-account",loading:"lazy"}),r.createElement("h2",null,d("helloSites"===s?"logout.popup.ask1":"logout.popup.ask.mb")),r.createElement("p",null,d("logout.popup.ask2")),r.createElement(u,{siteType:s},r.createElement(i.B,{className:"logout-button",color:"tertiary",size:"lg",onClick:a},d("logout.popup.button.logout")),r.createElement(i.B,{className:"cancel-button",color:"primary",size:"lg",onClick:t},d("logout.popup.button.cancel"))))))}},LdDg: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 r=a("xrdX"),n=a("GOBr"),i=a("yNk5");let getCurrentBaseUrl=(e,t)=>{let a=!n.y;return`https://${a?t?"fe.":"discover.":t?"www.":""}${r.v[t?"vi-VN_MB":e]}`},getCurrentSsoUrl=(e,t)=>i.env.UNIFY_SSO_API||`https://${n.y?"id.":"staging-id."}${r.v[t?"vi-VN_MB":e]}`,getTogetherApiDomain=()=>i.env.UNIFY_INTERNAL_TOGETHER_API||i.env.UNIFY_TOGETHER_API||`https://${n.y?"together.":"staging-together."}hellohealthgroup.com`,getDiscoverApiDomain=e=>{let t=e.endsWith("_MB");return t?`https://${n.y?"wp.":"staging."}${r.v[e]}`:i.env.UNIFY_INTERNAL_DISCOVER_API||i.env.UNIFY_DISCOVER_API||`https://${n.y?"wp.":"staging."}${r.v[e]}`},getCareApiDomain=()=>i.env.UNIFY_INTERNAL_CARE_API||i.env.UNIFY_CARE_API||`https://${n.y?"health-care.":"service-health-care."}hellohealthgroup.com`,normalizeLinkSlash=e=>e.replace(/([^:]\/)\/+/g,"$1"),forceEndSlash=e=>e.replace(/\/?$/,"/"),normalizeLink=e=>normalizeLinkSlash(forceEndSlash(e))},gjhv:function(e,t,a){a.d(t,{a:function(){return abbreviateNumber}});let abbreviateNumber=e=>{let t=String(e);if(e>=1e3){let a;let r=["","k","m","b","t"],n=(""+e).length,i=Math.floor(n/3),o=6===n;if(o)a=Math.round(e/1e3);else for(let t=2;t>=1;t--){a=parseFloat((0!=i?e/Math.pow(1e3,i):e).toPrecision(t));let r=(a+"").replace(/[^a-zA-Z 0-9]+/g,"");if(r.length<=2)break}a&&a%1!=0?a=a.toFixed(1):o&&a&&a/1e3>=1&&(i+=1,a/=1e3),t=a+(6===n?r[i-1]:r[i])}return t}},SoOY:function(e,t,a){a.d(t,{TG:function(){return eu}});var r=a("q1tI"),n=a("Eso5"),i=a("aDCK"),o=a("C/sX"),l=a("nWfB"),c=a("7Ci/"),s=a("SPK5"),d=a("mYVa"),m=a("OAL+"),p=a("RZSM"),u=a("9uQI"),h=a("L6+J"),g=a("UbCi"),f=a("rrs9"),v=a("G7ij"),b=a("nCpW"),E=a("jaE6"),y=a("kO4G"),w=a("3IxE"),C=a("U80/"),k=a("Tabs"),x=a("rBCA"),B=a("LufY"),M=a("J5bt"),S=a("M2mm"),L=a("HRfS"),A=a("8CJX"),N=a("7LRr"),I=a("h7+k"),P=a("i8i4"),z=a("iBNF"),_=a("UpS/"),$=a("xubg"),F=a("ShI9"),O=a("DzJC"),T=a.n(O),D=a("vaiB"),Z=a("OaJP"),j=a("25AQ"),H=a("yVya");a("xXM3"),a("Wgwc");var U=a("yNk5");let V=(0,r.createContext)({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1,isMarryBaby:!1,siteType:"helloSites",sharedData:{},setSharedData:()=>!1}),[W,R,q]=(0,C.W)(),Y=(0,x.Z)(n.x)` .phone-input { width: 100%; margin-bottom: 32px; ${y.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:n="",formContext:o}=e,l=(0,B._)(e,["inputOrder","withSimilac","customTerms","formContext"]);let{t:c}=(0,M.u)(),s=o||R(),d={phone:e=>{var{label:t,name:n="phone"}=e,o=(0,B._)(e,["label","name"]);return r.createElement(i.I.Wrapper,{className:a?"input-control":"phone-input",withAsterisk:!0,label:t||a?r.createElement(f.T,{size:"s4",weight:"semiBold",as:"span"},t||c("onboarding.similac.input.phone")):void 0},r.createElement(u.P,Object.assign({defaultCountry:w.M[U.env.UNIFY_LOCALE]||"VN"},s.getInputProps(n),o)),r.createElement(i.I.Error,{size:"md"},s.errors.phone))},full_name:e=>{var{label:t,name:a="name"}=e,n=(0,B._)(e,["label","name"]);return r.createElement(u.I,Object.assign({label:r.createElement(f.T,{size:"s4",weight:"semiBold",as:"span"},t||c("onboarding.formEmail.yourName")),withAsterisk:!0},s.getInputProps(a),n))},email:e=>{var{label:t,name:a="email"}=e,n=(0,B._)(e,["label","name"]);return r.createElement(u.I,Object.assign({label:r.createElement(f.T,{size:"s4",weight:"semiBold",as:"span"},t||c("onboarding.formEmail.yourEmail")),withAsterisk:!0},s.getInputProps(a),n))},dob:e=>{var{label:t,name:a="dob"}=e,n=(0,B._)(e,["label","name"]);return r.createElement(L.D,Object.assign({label:r.createElement(f.T,{size:"s4",weight:"semiBold",as:"span"},t||c("onboarding.formEmail.yourBirthday")),placeholder:"DD/MM/YYYY"},s.getInputProps(a),n))},gender:e=>{var{label:t,name:a="gender"}=e,n=(0,B._)(e,["label","name"]);return r.createElement(u.R.Group,Object.assign({className:"radio-group",label:r.createElement(f.T,{size:"s4",weight:"semiBold",as:"span"},t||c("tools.selectGender"))},s.getInputProps(a),n),r.createElement(u.R,{value:"0",label:c("onboarding.formEmail.genderMale")}),r.createElement(u.R,{value:"1",label:c("onboarding.formEmail.genderFemale")}))},otp:({name:e="otp"})=>r.createElement("div",{className:"otp-input"},r.createElement(u.O,Object.assign({enterKeyHint:void 0,nonce:void 0},s.getInputProps(e))),r.createElement(i.I.Error,null,s.errors.otp)),password:({label:e,name:t="password"})=>r.createElement(u.I.Password,Object.assign({label:r.createElement(f.T,{size:"s4",weight:"semiBold",as:"span"},e||c("onboarding.updatePassword.password")),withAsterisk:!0,rightSection:r.createElement(N.V,null)},s.getInputProps(t))),confirm_password:({label:e,name:t="confirmPassword"})=>r.createElement(u.I.Password,Object.assign({label:r.createElement(f.T,{size:"s4",weight:"semiBold",as:"span"},e||c("onboarding.updatePassword.confirmPassword")),withAsterisk:!0,rightSection:r.createElement(N.V,null)},s.getInputProps(t))),term:({name:e="term",className:t=""})=>n?r.createElement("div",{style:{marginBottom:16},className:t},r.createElement(u.d,Object.assign({label:r.createElement(f.T,{size:"p4",as:"span",sx:{a:{color:"#2d87f3",fontWeight:"bold",letterSpacing:0}}},n)},s.getInputProps(e,{type:"checkbox"}),{error:null})),r.createElement(i.I.Error,{size:"md"},s.getInputProps("term",{type:"checkbox"}).error)):null,address:e=>{var{label:t,className:a="",name:n="address"}=e,i=(0,B._)(e,["label","className","name"]);return r.createElement(A.A,Object.assign({className:`${a} input-control`,label:r.createElement(f.T,{size:"s4",weight:"semiBold",as:"span"},t||c("onboarding.similac.input.address"))},s.getInputProps(n),i))}},m=t.map(e=>{var t;let a="string"==typeof e?{inputType:e}:e;return null===(t=d[a.inputType])||void 0===t?void 0:t.call(d,a)});return r.createElement(Y,Object.assign({},l),m)},frisoOnboardingSchema=e=>S.Ry().shape({phone:S.Z_().required(e("onboarding.updatePhone.error")).default(""),name:S.Z_().required(e("onboarding.errorMessage.requiredName")),email:S.Z_().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:S.nK().required(e("onboarding.similac.address.error")),term:S.Xg().oneOf([!0],e("validation.error.requiredField"))});var G=(0,r.forwardRef)((e,t)=>{var{inputOrder:a,onSubmit:i,validateSchema:o,defaultValues:l,isActive:c,customTerms:s,customFormTexts:d}=e,m=(0,B._)(e,["inputOrder","onSubmit","validateSchema","defaultValues","isActive","customTerms","customFormTexts"]);let{nextStep:p,setSharedData:u,sharedData:h}=(0,r.useContext)(V),{t:g}=(0,M.u)(),v=q({initialValues:{term:!1,phone:(null==h?void 0:h.phone)||(null==l?void 0:l.phone)||"",email:(null==h?void 0:h.email)||(null==l?void 0:l.email)||"",name:(null==h?void 0:h.name)||(null==l?void 0:l.name)||""},validate:o||(0,k.X)(frisoOnboardingSchema(g))}),onSubmit=e=>(0,B.a)(void 0,void 0,void 0,function*(){try{yield null==i?void 0:i(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=v.onSubmit(onSubmit,onError))||void 0===e?void 0:e()};return(0,r.useImperativeHandle)(t,()=>({submitForm:handleSubmitForm})),r.createElement(n.x,Object.assign({"data-active":c},m),r.createElement(n.x,{sx:e=>({display:"flex",flexDirection:"column",gap:"16px",[e.fn.largerThan("md")]:{gap:"24px"}})},r.createElement(n.x,{sx:{textAlign:"center"}},r.createElement(I.H,{tag:"h4",as:"h2"},null==d?void 0:d.heading),r.createElement(f.T,{size:"p3"},null==d?void 0:d.description)),r.createElement(W,{form:v},r.createElement("form",{className:"friso-form",style:{width:"100%"},onSubmit:v.onSubmit(onSubmit,onError)},r.createElement(n.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"}}}}},r.createElement(DynamicForm,{inputOrder:a,customTerms:s,className:"friso-form"}))))))});let K=x.Z.div` position: fixed; inset: 0; z-index: 1000; background: white; overflow-y: auto; `,X=x.Z.div` height: 100%; ${y.M.lgPcUp} { display: table; width: 100%; height: calc(100% - 25px); } `,J=x.Z.div` padding: 16px; ${y.M.mbUp} { padding: 48px 24px 24px; } &[data-similac='true'][data-has-banner='true'] { ${y.M.mbDown} { background: white; border-top-left-radius: 1rem; border-top-right-radius: 1rem; margin-top: -1rem; } } `,Q=x.Z.div` width: 640px; padding: 16px 16px 0 16px; display: none; ${y.M.mbUp} { width: 640px; display: table-cell; } `,ee=x.Z.div` background-color: ${z.r.colors.primary50}; border-radius: 12px; height: 100%; display: flex; flex-direction: column; justify-content: space-between; &[data-is-marry-baby='true'] { background-color: ${z.r.mbColors.tonePink}; } `,et=x.Z.div` margin-top: 40px; padding: 24px 40px; `,ea=x.Z.div` width: 100%; display: block; img { width: 100%; height: auto; } &.similac { min-width: 1px; img { width: 100%; height: 100%; object-fit: contain; } ${y.M.mbUp} { position: sticky; top: 0; height: 100vh; } } `,er=x.Z.div` margin-top: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; &.similac { margin-top: 16px; } `,en=(0,x.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; ${y.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%; } `,ei=x.Z.img` margin-bottom: 38px; `,Onboarding$1=e=>{var t,{heading:a,description:n,children:i,className:o,imgSrc:c,hiddenLogo:s=!1}=e,d=(0,B._)(e,["heading","description","children","className","imgSrc","hiddenLogo"]);let{isMarryBaby:m,siteType:p}=(0,r.useContext)(V);return r.createElement(en,Object.assign({},d,{className:`hhg-comp-onboarding-container ${o}`,size:"sm"}),!s&&r.createElement($.L,{type:m?p:(null===(t=h.L[U.env.UNIFY_LOCALE])||void 0===t?void 0:t.LOGO_TYPE)||"hellobacsi"}),r.createElement(er,{className:s?"similac":""},c&&r.createElement(ei,{src:c,loading:"lazy"}),(a||n)&&r.createElement("div",{className:"header"},a&&r.createElement(l.D,{order:3},a),n&&r.createElement(f.T,{size:"p3",mt:8,color:z.r.colors.gray600},n)),i))},eo=(0,x.Z)(Onboarding$1)` .phone-input { width: 100%; margin-bottom: 32px; ${y.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=>S.Ry().shape({phone:S.Z_().required(e("onboarding.updatePhone.error")).default("")}),el=(0,x.Z)(Onboarding$1)` .otp-input { margin-bottom: 36px; ${y.M.mbDown} { margin-bottom: 20px; } .otpContainer { margin-bottom: 16px; } } .resend { display: flex; gap: 6px; margin-bottom: 32px; ${y.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=>S.Ry().shape({otp:S.Z_().required(e("onboarding.otpForm.error")).length(6,e("onboarding.otpForm.error")).default("")}),onboardingEmailSchema=e=>S.Ry().shape({email:S.Z_().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),name:S.Z_().required(e("onboarding.errorMessage.requiredName"))}),ec=x.Z.div` margin-top: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; &.similac { margin-top: 16px; } `,es=(0,x.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; ${y.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%; } `,ed=x.Z.img` margin-bottom: 38px; `,OnboardingUI=e=>{var t,{heading:a,description:n,children:i,className:o,imgSrc:c,hiddenLogo:s=!1}=e,d=(0,B._)(e,["heading","description","children","className","imgSrc","hiddenLogo"]);let{isMarryBaby:m,siteType:p}=(0,r.useContext)(V);return r.createElement(es,Object.assign({},d,{className:`hhg-comp-onboarding-container ${o}`,size:"sm"}),!s&&r.createElement($.L,{type:m?p:(null===(t=h.L[U.env.UNIFY_LOCALE])||void 0===t?void 0:t.LOGO_TYPE)||"hellobacsi"}),r.createElement(ec,{className:s?"similac":""},c&&r.createElement(ed,{src:c,loading:"lazy"}),r.createElement("div",{className:"header"},r.createElement(l.D,{order:3},a),r.createElement(f.T,{size:"p3",mt:8,color:z.r.colors.gray600},n)),i))},em=(0,x.Z)(Onboarding$1)` .phone-input { width: 100%; margin-bottom: 32px; ${y.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)=>S.Ry().shape({phone:S.Z_().required(e("onboarding.updatePhone.error")).default(""),name:S.Z_().required(e("onboarding.errorMessage.requiredName")),email:S.Z_().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:S.nK().required(e("onboarding.similac.address.error")),term:t?S.Xg():S.Xg().oneOf([!0],e("validation.error.requiredField"))}),ep=(0,x.Z)(Onboarding$1)` .phone-input { width: 100%; margin-bottom: 32px; ${y.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=>S.Ry().shape({password:S.Z_().required(e("onboarding.errorMessage.requiredPassword")).min(8,e("onboarding.errorMessage.minLength",{length:8})).matches(/.*[A-Z].*/,e("onboarding.errorMessage.passWithPattern")).default(""),confirmPassword:S.Z_().required(e("onboarding.errorMessage.requiredConfirmPassword")).oneOf([S.iH("password"),null],e("onboarding.errorMessage.passNotMatch")).default("")}),eu={Provider:({children:e,siteType:t,setSharedData:a})=>{let[n,i]=(0,r.useState)(0),[o,l]=(0,r.useState)(0),[c,s]=(0,r.useState)({});return(0,r.useEffect)(()=>{null==a||a(c)},[c,a]),r.createElement(V.Provider,{value:{currentStep:n,setCurrentStep:i,setMaxStep:l,nextStep:()=>n+1<=o&&i(n+1),prevStep:()=>n-1>=0&&i(n-1),siteType:t,isMarryBaby:"marryBaby"===t,sharedData:c,setSharedData:s}},e)},Modal:e=>{var{children:t,withSimilac:a,banner:n,withPortal:i}=e,c=(0,B._)(e,["children","withSimilac","banner","withPortal"]);let{isMobile:s}=(0,_.u)(),{isMarryBaby:d}=(0,r.useContext)(V),{t:m}=(0,M.u)();if(i&&"undefined"==typeof window)return null;let p=r.createElement(K,Object.assign({},c),r.createElement(X,null,r.createElement(o.r,{sx:{[y.M.mbDown]:{margin:0},".mantine-Grid-col":{[y.M.mbDown]:{padding:0}}}},r.createElement(o.r.Col,{span:("object"==typeof n||a)&&!s?6:12,order:a?2:1,orderMd:a?1:2,sx:{zIndex:a?99:void 0}},r.createElement(J,{"data-similac":a,"data-has-banner":"object"==typeof n},t)),n&&"object"==typeof n&&!a&&r.createElement(o.r.Col,{span:s?12:6,order:1,orderMd:2},r.createElement(Q,null,r.createElement(ee,{"data-is-marry-baby":d},r.createElement(et,null,n.heading&&r.createElement(l.D,{order:1,mb:24},n.heading),n.description&&r.createElement(f.T,{size:"p1",color:z.r.colors.gray800},m("onboarding.welcomeScreen.content"))),r.createElement(ea,null,n.imgSrc?r.createElement("img",{src:n.imgSrc,loading:"lazy"}):n.imgComponent?n.imgComponent:null)))),n&&"object"==typeof n&&a&&(n.imgSrc||n.imgComponent)&&r.createElement(o.r.Col,{span:"auto",order:1,orderMd:2},r.createElement(ea,{className:"similac"},n.imgSrc?r.createElement("img",{src:n.imgSrc,loading:"lazy"}):n.imgComponent?n.imgComponent:null)))));return i?(0,P.createPortal)(p,(0,y.a)()):p},Form:({onClose:e,onSubmit:t,canSkip:a=!0,customFormTexts:n,isActive:i,submitProps:o,submitLabel:l,skipProps:c,isWhatsApp:s})=>{let{t:d}=(0,M.u)(),{sharedData:m,setSharedData:p,nextStep:u}=(0,r.useContext)(V),h=q({initialValues:{phone:(null==m?void 0:m.phone)||""},validate:(0,k.X)(onboardingSchema(d))});return r.createElement(eo,{heading:(null==n?void 0:n.heading)||d("onboarding.updatePhone.heading"),description:(null==n?void 0:n.description)||d(s?"onboarding.updateWhatsapp.description":"onboarding.updatePhone.description"),"data-active":i},r.createElement(W,{form:h},r.createElement("form",{onSubmit:h.onSubmit(e=>(0,B.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)})},r.createElement(DynamicForm,{inputOrder:["phone"]}),r.createElement(v.B,Object.assign({variant:"primary",fullWidth:!0,size:"lg"},s&&{leftIcon:r.createElement(F.I.WhatsApp,{size:18,useCurrentColor:!0})},o,{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||d(s?"onboarding.updateWhatsapp.submitLabel":"onboarding.button.continue")),a&&r.createElement(v.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"}),d("onboarding.button.skip")))))},OtpForm:{Email:({onSubmit:e,email:t,onResendCode:a,otpError:n,onClose:i,loading:o,canSkip:l})=>{let{sharedData:{email:c,retryEmailCount:s},setSharedData:d,prevStep:m,siteType:p,isMarryBaby:u,nextStep:h}=(0,r.useContext)(V),g=t||c||"",[f,v]=(0,r.useState)(30),y=(0,b.Y)(()=>v(e=>e-1),1e3),[C,x]=(0,E.C)(0,{min:0,max:3}),S=(0,r.useRef)(!0),{t:L}=(0,M.u)();(0,r.useEffect)(()=>(y.start(),y.stop),[]),(0,r.useEffect)(()=>{0===f&&(y.stop(),S.current=!1)},[f]);let A=q({initialValues:{otp:""},validate:(0,k.X)(otpSchema(L))});(0,r.useEffect)(()=>{n&&A.setFieldError("otp",n)},[n]);let N=(0,r.useMemo)(()=>T()(()=>{S.current||(x.increment(),v(30),null==a||a(g),y.start(),S.current=!0)},1e3,{trailing:!1}),[g,a,y]);return r.createElement(el,{heading:L("onboarding.otpForm.heading"),description:r.createElement(r.Fragment,null,r.createElement("span",{dangerouslySetInnerHTML:{__html:L("onboarding.otpForm.descriptionEmail",{email:`${(0,w.h)(g)}`})}}),!(s>=2)&&r.createElement("svg",{onClick:()=>{s>=2||(d(e=>Object.assign(Object.assign({},e),{retryEmailCount:e.retryEmailCount+1})),m())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"otp-description-edit-icon"},r.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"})))},r.createElement(W,{form:A},r.createElement("form",{onSubmit:A.onSubmit(t=>(0,B.a)(void 0,void 0,void 0,function*(){try{x.increment();let a=yield null==e?void 0:e(t.otp);a||h()}catch(e){console.error(e)}}),e=>{console.log(e)})},r.createElement(DynamicForm,{inputOrder:["otp"]}),r.createElement("div",{className:"resend"},r.createElement(D.T,{size:"p4",color:z.r.colors.gray400},L("onboarding.otpForm.notReceiveOTP")),r.createElement(D.T,{as:"a",size:"p4",color:u?z.r.mbColors.pink:z.r.colors.primaryBase,onClick:N},0===f?L("onboarding.otpForm.resendCode"):L("onboarding.otpForm.resendCodeWithSeconds",{seconds:f}))),r.createElement(Z.B,{theme:p,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:o,disabled:o,"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&&r.createElement(Z.B,{theme:p,color:"ghost",isBlock:!0,size:"lg",onClick:i,type:"button"},L("onboarding.button.skip")))))},Phone:({onSubmit:e,phone:t,onResendCode:a,otpError:n,onClose:i,loading:o,canSkip:l,isWhatsApp:c})=>{let{sharedData:{phone:m,retryPhoneCount:p},setSharedData:u,prevStep:h,siteType:v,isMarryBaby:y,nextStep:w}=(0,r.useContext)(V),C=t||m||"",[x,S]=(0,r.useState)(30),L=(0,b.Y)(()=>S(e=>e-1),1e3),[A,N]=(0,E.C)(0,{min:0,max:3}),I=(0,r.useRef)(!0),{t:P}=(0,M.u)();(0,r.useEffect)(()=>(L.start(),L.stop),[]),(0,r.useEffect)(()=>{0===x&&(L.stop(),I.current=!1)},[x]);let _=q({initialValues:{otp:""},validate:(0,k.X)(otpSchema(P))});(0,r.useEffect)(()=>{n&&_.setFieldError("otp",n)},[n]);let $=(0,r.useMemo)(()=>T()(()=>{I.current||(N.increment(),S(30),null==a||a(C),L.start(),I.current=!0)},1e3,{trailing:!1}),[C,a,L]),F=`${C.slice(0,-3).replace(/./g,"x").concat(C.slice(-3))}`;return r.createElement(el,{heading:c?r.createElement(s.k,{align:"center",justify:"center",gap:(0,d.h)(8)},r.createElement("img",{style:{width:(0,d.h)(24)},loading:"lazy",src:g.C.getAssetPath("whatsapp.svg"),alt:"whatsapp"}),r.createElement("span",null,P("onboarding.otpWhatsapps.heading"))):P("onboarding.otpForm.heading"),description:r.createElement(r.Fragment,null,r.createElement("span",{dangerouslySetInnerHTML:{__html:P(c?"onboarding.otpWhatsapps.description":"onboarding.otpForm.description",{phone:F})}}),!(p>=2)&&r.createElement("svg",{onClick:()=>{p>=2||(u(e=>Object.assign(Object.assign({},e),{retryPhoneCount:e.retryPhoneCount+1})),h())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"otp-description-edit-icon"},r.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"})))},r.createElement(W,{form:_},r.createElement("form",{onSubmit:_.onSubmit(t=>(0,B.a)(void 0,void 0,void 0,function*(){try{N.increment();let a=yield null==e?void 0:e(t.otp);a||w()}catch(e){console.error(e)}}),e=>{console.log(e)})},r.createElement(DynamicForm,{inputOrder:["otp"]}),r.createElement("div",{className:"resend"},r.createElement(f.T,{size:"p4",color:z.r.colors.gray400},P("onboarding.otpForm.notReceiveOTP")),r.createElement(f.T,{as:"a",size:"p4",color:y?z.r.mbColors.pink:z.r.colors.primaryBase,onClick:$},0===x?P("onboarding.otpForm.resendCode"):P("onboarding.otpForm.resendCodeWithSeconds",{seconds:x}))),r.createElement(Z.B,{theme:v,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:o,disabled:o,"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"},P("onboarding.button.continue")),l&&A>=3&&r.createElement(Z.B,{theme:v,color:"ghost",isBlock:!0,size:"lg",onClick:i,type:"button"},P("onboarding.button.skip")))))}},PersonalInfoForm:({onClose:e,onSubmit:t,canSkip:a,loading:n,errorMessage:i,initialData:o})=>{let{t:l,locale:c}=(0,M.u)(),{siteType:s,isMarryBaby:d,setSharedData:m,nextStep:p}=(0,r.useContext)(V),u=q({validate:(0,k.X)(onboardingEmailSchema(l))});return(0,r.useEffect)(()=>{u.setValues(Object.assign(Object.assign({gender:"0"},o),(null==o?void 0:o.birthday)&&{birthday:new Date(o.birthday)}))},[o]),(0,r.useEffect)(()=>{i&&u.setFieldError("email",i)},[i]),r.createElement(OnboardingUI,{heading:l("onboarding.formEmail.heading"),description:l("onboarding.formEmail.description",{site:d?"Marry Baby":h.L[c].SITE_NAME_FORMATTED})},r.createElement(W,{form:u},r.createElement("form",{className:"form",onSubmit:u.onSubmit(e=>(0,B.a)(void 0,void 0,void 0,function*(){m(t=>Object.assign(Object.assign({},t),e));let a=yield null==t?void 0:t(Object.assign(Object.assign({},e),{birthday:e.birthday&&(0,j.Z)(e.birthday,"yyyy-MM-dd")}));a||p()}),e=>{console.log({fieldErrors:e})})},r.createElement(DynamicForm,{inputOrder:["full_name","email","dob","gender"]}),r.createElement(Z.B,{color:"primary",isBlock:!0,size:"lg",type:"submit",theme:s,isLoading:n,disabled:n},l("onboarding.button.continue")),a&&r.createElement(Z.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,B._)(e,["onClose"]);let{t:n}=(0,M.u)(),{siteType:i}=(0,r.useContext)(V);return r.createElement(OnboardingUI,Object.assign({},a),r.createElement(Z.B,{theme:i,size:"lg",onClick:t,className:"form-button"},n("onboarding.button.continue")))},SimilacForm:e=>{var{onClose:t,onSubmit:a,canSkip:n=!0,customFormTexts:i,customTerms:o,defaultValues:l,isActive:c}=e,s=(0,B._)(e,["onClose","onSubmit","canSkip","customFormTexts","customTerms","defaultValues","isActive"]);let{t:d}=(0,M.u)(),{nextStep:m,setSharedData:p,sharedData:u}=(0,r.useContext)(V),{isMobile:h}=(0,_.u)(),g=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,k.X)(similacOnboardingSchema(d,!o))}),f=(null==l?void 0:l.email)?["full_name","phone","address","term"]:["full_name","email","phone","address","term"];return r.createElement(em,Object.assign({heading:(null==i?void 0:i.heading)||d("onboarding.updatePhone.heading"),description:(null==i?void 0:i.description)||d("onboarding.updatePhone.description"),hiddenLogo:h,"data-active":c},s),r.createElement(W,{form:g},r.createElement("form",{style:{width:"100%"},onSubmit:g.onSubmit(e=>(0,B.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})),m()}catch(e){console.error(e)}}),e=>{console.log(e)})},r.createElement(DynamicForm,{inputOrder:f,withSimilac:!0,customTerms:o}),r.createElement(v.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"},d("onboarding.button.continue")),n&&r.createElement(v.B,{variant:"ghost",fullWidth:!0,size:"lg",onClick:t,type:"button"},d("onboarding.button.skip")))))},FrisoForm:G,UpdatePasswordForm:({onClose:e,onSubmit:t,canSkip:a,errorMessage:n,loading:o})=>{let{t:l}=(0,M.u)(),{nextStep:c}=(0,r.useContext)(V),s=q({initialValues:{password:"",confirmPassword:""},validate:(0,k.X)(onboardingUpdatePasswordSchema(l))});return r.createElement(OnboardingUI,{heading:l("onboarding.updatePassword.heading"),description:l("onboarding.updatePassword.description")},r.createElement(W,{form:s},r.createElement("form",{className:"form",onSubmit:s.onSubmit(e=>(0,B.a)(void 0,void 0,void 0,function*(){yield t((null==e?void 0:e.password)||""),n||c()}),e=>{console.log({fieldErrors:e})})},r.createElement(DynamicForm,{inputOrder:["password","confirm_password"]}),r.createElement(Z.B,{color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:o,disabled:o},l("onboarding.button.continue")),a&&r.createElement(Z.B,{color:"ghost",isBlock:!0,size:"lg",onClick:e},l("onboarding.button.skip")),n&&r.createElement(i.I.Error,{className:"form-error"},n))))},StepRenderer:({children:e,onStepChange:t})=>{let{currentStep:a,setMaxStep:n}=(0,r.useContext)(V),i=r.Children.count(e);return(0,r.useEffect)(()=>{null==t||t(a)},[a]),(0,r.useEffect)(()=>{n(i-1)},[i]),r.createElement(r.Fragment,null,(0,H.Z)(e).map((e,t)=>{let n=t===a;return r.createElement(r.Fragment,{key:t},r.isValidElement(e)?e.props.alwaysRender||n?r.cloneElement(e,{isActive:t===a,stepIndex:t}):null:n?e:null)}))},ThankYou:e=>{var{onClose:t,thanksPageInfo:a,isActive:n}=e,i=(0,B._)(e,["onClose","thanksPageInfo","isActive"]);let{t:o}=(0,M.u)(),{isMobile:l}=(0,_.u)();return r.createElement(ep,Object.assign({heading:"",description:"",hiddenLogo:l,"data-active":n},i),r.createElement(c.W,{fluid:!0},r.createElement(m.K,{align:"center",spacing:8,w:"100%",ta:"center"},r.createElement(p.o,{ratio:1,w:{base:120,md:160}},r.createElement("svg",{width:"160",height:"160",viewBox:"0 0 160 160",fill:"none"},r.createElement("mask",{id:"mask0_4580_96805",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"160",height:"160"},r.createElement("circle",{cx:"80",cy:"80",r:"80",fill:"url(#paint0_radial_4580_96805)"})),r.createElement("g",{mask:"url(#mask0_4580_96805)",fill:"#E0F8EE"},r.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"}),r.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"}),r.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"}),r.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"})),r.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"}),r.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"}),r.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"}),r.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"}),r.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"}),r.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"}),r.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"}),r.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"}),r.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"}),r.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"}),r.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"}),r.createElement("defs",null,r.createElement("radialGradient",{id:"paint0_radial_4580_96805",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"rotate(90 0 80)scale(80)"},r.createElement("stop",null),r.createElement("stop",{offset:"1"}))))),r.createElement(I.H,{tag:"h3"},null==a?void 0:a.title),r.createElement(f.T,{size:"p3",color:"gray.6"},null==a?void 0:a.description),r.createElement(v.B,{mt:{base:16,md:24},fullWidth:l,size:"lg",onClick:t},o("similac.thankYou.done")))))}}},JopB:function(e,t,a){a.d(t,{P:function(){return r}});let r={GET_CITIES_LIST:"api/lists/cities?keyword={keyword}&country_id={countryId}&site={domain}&_nopaging={noPaging}&client={client}",GET_CITY:"api/lists/cities?ids={ids}&site={domain}&longitude={longitude}&latitude={latitude}",GET_HOME_SEARCH:"api/search/?_home=1&city_id={city}&keyword={keyword}&site={domain}&latitude={lat}&longitude={lng}",GET_SEARCH_V2:"api/v2/search/?site={domain}&type={searchType}&keyword={keyword}&city_id={city}&latitude={lat}&longitude={lng}&specialty_id={specialty_id}&client_slug={client_slug}&msd={msd}",GET_CITY_BY_IP:"api/geobyip?site={domain}&latitude={lat}&longitude={lng}&_nopaging={noPaging}&client={client}",GET_DOCTOR_DETAIL:"api/doctors/{id}?site={site}",GET_HOSPITAL_DETAIL:"api/hospital/branch/{id}?site={site}",GET_SERVICE_DETAIL:"api/hospital/service/{id}?site={site}",GET_SEARCH_SPECIALTY:"api/v2/specialties/?site={domain}&type={searchType}&keyword={keyword}&city_id={city}&latitude={lat}&longitude={lng}&msd={msd}",GET_SEARCH_POPULAR_KEY:"api/search/keywords?site={domain}&sort_by={sort_by}&sort_order={sort_order}&type={searchType}"}},"8/zt":function(e,t,a){a.d(t,{A:function(){return s},L:function(){return c},a:function(){return removeEdittedBannedWord},b:function(){return decodePostUrl},c:function(){return reformatUrl},d:function(){return decodeMention},e:function(){return escapeRegExp},f:function(){return fixMalformedMention},g:function(){return getUrlsFromEditorString},h:function(){return highlightBadWords},i:function(){return getMentionIdsFromString},j:function(){return removeBannedWordWrapper},k:function(){return encodePostContent},r:function(){return removeFontFormat},u:function(){return uploadAndGetSrc},w:function(){return wrapAnchorAroundUrls},y:function(){return youtubeVidIdGetter}});var r=a("LufY"),n=a("IQVP"),i=a("Y8gQ");let o={edit:/]*)data-url="true"[^<>]*>(.*?)<\/mocka>/gim,url:/((?:=")|(?:data-url="true">)|)(https?:\/\/(www\.)?(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))/gim,encodedUrl:/\[a\+href="/([^<"]+)"(?:\+text=\"([^<"]+)")?\]/gim,editorMention:/]*data-id="([^<"]+)"[^>]*>([^<]+)<\/mention>/gim,editorFullMention:/]*data-id="([^<"]+)" [^\>]*data-name="([^<"]+)"[^>]*>([^<]+)<\/mention>/gim,savedMention:/\[mention\+id="([^<"]+)"([^\]]*)\]/gim,rawUrl:/^(https?:\/\/(www\.)?(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))$/gim,optionalProtocol:/^((https?:\/\/)?(www\.)?(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))$/gim,encodedUrl2:/]*href="/([^>"]+)"[^>]*>([^<]+)<\/a>/gim},l=/]*data-bad-word="[^\"]*" [^\>]*data-error="true"[^\>]*>(.*?)<\/mocka>/gim,encodePostUrl=(e,t=e=>e)=>{var a;return t(null===(a=e.replace(/(\ )+/g," ").replace(/(\&)+/g,"&"))||void 0===a?void 0:a.replace(/(\u200c|‌)+/g,"").replace(o.url,(e,t,a)=>'="'!==t&&'data-url="true">'!==t?`${a}`:e).replace(o.edit,(e,t,a)=>{var r;let n=null===(r=t.match(/data-href="/([^"]*)"/im))||void 0===r?void 0:r[1];return n?`${a}`:`${a}`}))},encodeMention=e=>e.replace(o.editorMention,(e,t,a)=>`[mention+id="${t}"+name="${a}"]`),getAnchorHtml=({url:e,text:t,method:a})=>{let r=t.indexOf(t.trimStart()),n=t.trimEnd().length,i=t.substring(0,r),o=t.substring(r,n),l=t.substring(n);return"edit"===a?`${i}${o}${l}`:"display"===a&&(e.startsWith("http://")||e.startsWith("https://"))?`${i}${o}${l}`:t},decodePostUrl=(e,t)=>e.replace(o.encodedUrl,(e,a,r)=>{let n=r||a;return getAnchorHtml({text:n,url:a,method:t})}).replace(o.encodedUrl2,(e,a,r)=>{let n=r||a;return getAnchorHtml({text:n,url:a,method:t})}),decodeMention=(e,t=[])=>e.replace(o.savedMention,(e,a,r)=>{let n=t.find(e=>String(e.id)===a);if(!n){if(!r)return"";let e="";return r.replace(/\+name="([^<"]+)"/i,(t,a)=>(e=a,t)),`${e}`}return`${n.name}`}),getUrlsFromString=e=>{let t=[];return e.replace(/(\&)+/g,"&").replace(o.url,(e,a,r)=>('="'!==a&&'data-url="true">'!==a&&t.push(r),e)),t},c=30,getMentionIdsFromString=(e,t)=>{let a=[];return(e.replace(o.editorMention,(e,t)=>(a.push(t),e)).replace(o.savedMention,(e,t)=>(a.push(t),e)),t)?a:Array.from(new Set(a)).slice(0,c)},getUrlsFromEditorString=e=>{var t;return[...getUrlsFromString(e),...(null===(t=e.match(o.edit))||void 0===t?void 0:t.map(e=>{var t,a;let r=null===(t=e.match(/data-href="/([^"]*)"/im))||void 0===t?void 0:t[1],n=null===(a=e.match(/>(.*?)<\/mocka>/im))||void 0===a?void 0:a[1];return r||n}))||[]].filter(e=>!!e)},escapeRegExp=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),wrapAnchorAroundUrls=e=>{var t,a;return null===(a=null===(t=e.replace(/(\ )+/g," "))||void 0===t?void 0:t.replace(/(\u200c|‌)+/g,""))||void 0===a?void 0:a.replace(o.edit,(e,t,a)=>{var r;let n=null===(r=t.match(/data-href="/([^"]*)"/im))||void 0===r?void 0:r[1];return!n||n===a||a.match(o.rawUrl)?a:n?`${a}`:`${a}`}).replace(o.url,(e,t,a)=>{if('="'!==t&&'data-url="true">'!==t){let e=a.toLowerCase(),t=e.startsWith("http")?"":" https://",r=`${t}${e}`;return getAnchorHtml({text:r,url:r,method:"edit"})}return e}).replace(o.encodedUrl2,(e,t,a)=>getAnchorHtml({text:a||t,url:t,method:"edit"}))},removeEdittedBannedWord=e=>e.replace(l,(e,t)=>{let a=document.createElement("div");a.innerHTML=e;let r=a.firstChild;return(null==r?void 0:r.innerText)!==(null==r?void 0:r.getAttribute("data-bad-word"))?t:e}),removeBannedWordWrapper=e=>e.replace(l,"$1"),removeFontFormat=e=>e.replace(/]*>(.+)<\/font>/gim,(e,t)=>t.replace(/]*>(.+)<\/u>/gim,"$1")),encodePostContent=(e,t=e=>e)=>encodePostUrl(encodeMention(removeBannedWordWrapper(e)),t),s=["hellobacsi.com","hellosehat.com","hellodoktor.com","hellokrupet.com","hellodoctor.com.ph","hellokhunmor.com","hellosayarwon.com","helloyishi.com.tw","helloswasthya.com","marrybaby.vn"],reformatUrl=e=>e.match(o.optionalProtocol)?e.startsWith("https://")||e.startsWith("http://")?e:`https://${e}`:"",highlightBadWords=(e,t)=>{let a=t.filter(Boolean);if(e&&a.length>0){let t=removeBannedWordWrapper(e);return t.replace(RegExp(`\\b(${a.map(e=>escapeRegExp(e)).join("|")})\\b`,"gi"),(e,t)=>{let a=document.createElement("mocka");return a.setAttribute("data-bad-word",t),a.setAttribute("data-error","true"),a.innerText=t,`${a.outerHTML}`})}return e},fixMalformedMention=e=>e.replace(o.editorFullMention,(e,t,a,r)=>{if(r!==a){let e=a.split(" "),n=e.findIndex((t,a)=>{let n=e.slice(0,a+1).join(" ");return!r.startsWith(n)});if(0===n)return`@${r}`;{let a=(n<0?e:e.slice(0,n)).join(" "),i=r.slice(a.length).trim();return console.log(n,a,i),`${a} ${i} `}}return e}),youtubeVidIdGetter=e=>{var t;return e.includes("youtu")&&(null===(t=/(.*?)(^|\/|v=)([a-z0-9_-]{11})(.*)?/gim.exec(e))||void 0===t?void 0:t[3])||""},uploadAndGetSrc=(e,t,o)=>"string"==typeof e?Promise.resolve(e):(0,r.a)(void 0,void 0,void 0,function*(){var r;let l=new FormData;if(e.type.startsWith("image/gif"))l.append("image",e);else{let t=yield Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.bind(a,"xsNn")),r=yield t.default(e,{maxSizeMB:.4,maxWidthOrHeight:1536,useWebWorker:!0});l.append("image",r)}let c=o?i.q:i.b,s=yield c((0,i.e)(o?n.qf.COMMENT.IMAGE_UPLOAD:n.yy.COMMENT.IMAGE_UPLOAD,{_locale:t}),"POST",{data:l});return(null===(r=null==s?void 0:s.data)||void 0===r?void 0:r.image)||""})},QHxc:function(e,t,a){a.d(t,{l:function(){return ProfileNavigation}});var r=a("q1tI"),n=a("L6+J"),i=a("9uQI"),o=a("UbCi"),l=a("rrs9"),c=a("J5bt"),s=a("vssm"),d=a("LdDg"),m=a("AeFk"),p=a("rBCA"),u=a("iBNF");a("xXM3"),a("Wgwc");let NavBookingIcon=e=>r.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e),r.createElement("path",{d:"M2.5 6.5a3.2 3.2 0 0 1 3.2-3.2h7.9a3.2 3.2 0 0 1 3.19 3.2v4.72a3.2 3.2 0 0 1-3.2 3.2H5.7a3.2 3.2 0 0 1-3.19-3.2V6.49Z",fill:"#E3F2FF"}),r.createElement("path",{d:"M2.5 5.68A2.38 2.38 0 0 1 4.88 3.3h9.52a2.38 2.38 0 0 1 2.39 2.38z",fill:"#2D87F3"}),r.createElement("path",{d:"M13.6 2.5h-.03c-.36 0-.65.3-.65.65V4.2c0 .36.3.65.65.65h.03c.36 0 .65-.3.65-.65V3.15a.65.65 0 0 0-.65-.65M5.27 4.86h.03c.36 0 .65-.3.65-.65V3.15a.65.65 0 0 0-.65-.65h-.03c-.36 0-.65.3-.65.65V4.2c0 .36.3.65.65.65Z",fill:"#2743AD"}),r.createElement("path",{d:"M5.56 8.17h-.5a.4.4 0 0 0-.4.4v.59c0 .22.18.4.4.4h.5a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.41m2.7 0h-.5a.4.4 0 0 0-.4.4v.59c0 .22.18.4.4.4h.5a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.41m2.7 0h-.5a.4.4 0 0 0-.4.4v.59c0 .22.18.4.4.4h.5a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.41m2.87 0h-.49a.4.4 0 0 0-.4.4v.59c0 .22.18.4.4.4h.49a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.41m-8.3 2.52h-.5a.4.4 0 0 0-.4.4v.58c0 .23.18.4.4.4h.5a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.4m2.7 0h-.5a.4.4 0 0 0-.4.4v.58c0 .23.18.4.4.4h.5a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.4m2.7 0h-.49a.4.4 0 0 0-.4.4v.58c0 .23.18.4.4.4h.5a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.4Zm2.87 0h-.49a.4.4 0 0 0-.4.4v.58c0 .23.18.4.4.4h.5a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.4Z",fill:"#2D87F3"}),r.createElement("path",{d:"M16 16.8a3.17 3.17 0 1 0 0-6.36 3.17 3.17 0 0 0 0 6.35Z",fill:"#FE921D"}),r.createElement("path",{d:"M15.78 13.62v-1.36a.21.21 0 0 1 .42 0v1.26l.48.4a.21.21 0 0 1-.01.33.21.21 0 0 1-.26-.01l-.55-.46-.02-.01a.2.2 0 0 1-.06-.15",fill:"#fff"})),NavCommunityIcon=e=>r.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e),r.createElement("path",{d:"M7.06 4.97h-2.3a3.12 3.12 0 0 0-3.1 3.1v.43a3.12 3.12 0 0 0 3.1 3.1h1.39s1.47 1.11 1.5.97c.03-.22-.23-.99-.23-.99a3.13 3.13 0 0 0 2.72-3.09v-.41a3.12 3.12 0 0 0-3.08-3.11m-2.7 3.55a.23.23 0 1 1 0-.46.23.23 0 0 1 0 .46m1.35.4a.33.33 0 1 1 0-.66.33.33 0 0 1 0 .65Zm1.57-.05",fill:"#2D87F3"}),r.createElement("path",{d:"M12.88 9.52a3.53 3.53 0 0 0-1.35 6.8s-.23 1.03-.2 1.25c.03.14 1.55-.99 1.55-.99a3.53 3.53 0 0 0 0-7.06m-1.33 4.24a.48.48 0 1 1 0-.97.48.48 0 0 1 0 .97m1.58.04a.33.33 0 1 1 0-.66.33.33 0 0 1 0 .66m1.34-.39a.23.23 0 1 1 0-.46.23.23 0 0 1 0 .46",fill:"#FFB521"}),r.createElement("path",{d:"M16.45 1.67h-3.87a1.88 1.88 0 0 0-1.88 2.06l.22 2.29a1.88 1.88 0 0 0 1.73 1.7s-.17.94-.14 1.16c.02.14 1.66-1.13 1.66-1.13l1.92-.03a1.88 1.88 0 0 0 1.86-1.59l.36-2.29a1.88 1.88 0 0 0-1.86-2.17M13.1 5.23a.48.48 0 1 1 .34-.14c-.1.1-.22.14-.34.14m1.57.05a.33.33 0 1 1 .23-.1.33.33 0 0 1-.23.1m1.34-.4a.23.23 0 1 1 .1-.01.2.2 0 0 1-.1.02Z",fill:"#91CAFF"})),NavDotIcon=e=>r.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e),r.createElement("rect",{x:"8.333",y:"8.333",width:"3.333",height:"3.333",rx:"1.667",fill:"#2D87F3"})),NavEshopIcon=e=>r.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e),r.createElement("path",{d:"m3.18 7.06 1.6 1.6 4.33-4.69a.72.72 0 0 0-.03-.99l-.22-.22a.72.72 0 0 0-.99-.02zm13.64 0-1.6 1.6-4.33-4.69a.72.72 0 0 1 .02-.99l.23-.22a.72.72 0 0 1 .99-.02z",fill:"#2743AD"}),r.createElement("path",{d:"M15.04 16.7H4.9a.78.78 0 0 1-.77-.7l-.7-6.67h13.09l-.7 6.67a.78.78 0 0 1-.78.7",fill:"#2D87F3"}),r.createElement("path",{d:"M6.23 15.7a.23.23 0 0 1-.23-.22l-.3-4.46a.23.23 0 1 1 .47-.04l.3 4.47a.23.23 0 0 1-.22.25zm2.39 0a.23.23 0 0 1-.23-.23L8.3 11a.23.23 0 1 1 .47 0l.07 4.46a.23.23 0 0 1-.22.24h-.01Zm5.15 0h-.02a.23.23 0 0 1-.2-.16.2.2 0 0 1-.02-.09l.3-4.47a.24.24 0 0 1 .25-.22.23.23 0 0 1 .22.26l-.3 4.46a.23.23 0 0 1-.23.22m-2.39 0a.23.23 0 0 1-.23-.23l.07-4.47a.24.24 0 0 1 .24-.23.23.23 0 0 1 .23.23l-.08 4.47a.23.23 0 0 1-.23.23",fill:"#2743AD"}),r.createElement("path",{d:"M16.04 18.12a2.01 2.01 0 1 0 0-4.03 2.01 2.01 0 0 0 0 4.03",fill:"#FE921D"}),r.createElement("path",{d:"M16.97 15.87h-.7v-.7a.23.23 0 0 0-.46 0v.7h-.7a.23.23 0 1 0 0 .47h.7v.69a.23.23 0 1 0 .47 0v-.7h.69a.23.23 0 1 0 0-.46",fill:"#fff"}),r.createElement("path",{d:"M16.58 9.48H3.42a.8.8 0 0 1-.78-.7l-.13-1.1a.8.8 0 0 1 .78-.88h13.42a.8.8 0 0 1 .78.88l-.13 1.1a.8.8 0 0 1-.78.7",fill:"#BCDEFF"})),NavHelpIcon=e=>r.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e),r.createElement("path",{d:"M10 1.667c-4.595 0-8.333 3.738-8.333 8.333 0 4.595 3.738 8.333 8.333 8.333 4.595 0 8.333-3.738 8.333-8.333 0-4.595-3.738-8.333-8.333-8.333Zm0 13.194a.695.695 0 1 1 0-1.39.695.695 0 0 1 0 1.39Zm1.1-4.415a.698.698 0 0 0-.405.631v.312a.694.694 0 1 1-1.39 0v-.312c0-.81.477-1.553 1.213-1.893.707-.326 1.218-1.19 1.218-1.615 0-.956-.778-1.736-1.736-1.736s-1.736.78-1.736 1.736a.694.694 0 1 1-1.389 0A3.129 3.129 0 0 1 10 4.444a3.129 3.129 0 0 1 3.125 3.125c0 .939-.814 2.318-2.026 2.877Z",fill:"#FF6F4D"})),NavLogOutIcon=e=>r.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e),r.createElement("path",{d:"M11.116 1.72 5.488.85a1.898 1.898 0 0 0-2.155 1.856v14.588a1.898 1.898 0 0 0 2.158 1.855l5.625-.869a1.865 1.865 0 0 0 1.592-1.855V3.575a1.87 1.87 0 0 0-1.592-1.855",fill:"#2D87F3"}),r.createElement("path",{d:"M17.642 9.584a.6.6 0 0 1-.232.472l-1.964 1.518a.446.446 0 0 1-.719-.353v-.51l-2.118-.01a.225.225 0 0 1-.223-.225v-1.8a.225.225 0 0 1 .224-.225l2.12.002-.004-.506a.446.446 0 0 1 .719-.354l1.965 1.52a.6.6 0 0 1 .232.471",fill:"#FF6F4D"}),r.createElement("path",{d:"M17.642 9.584a.6.6 0 0 1-.232.472l-1.964 1.518a.446.446 0 0 1-.719-.353v-.51l-2.118-.01a.225.225 0 0 1-.223-.225v-1.8a.225.225 0 0 1 .224-.225l2.12.002-.004-.506a.446.446 0 0 1 .719-.354l1.965 1.52a.6.6 0 0 1 .232.471m-7.603-.908v1.802c0 .124.1.225.224.225h1.257c.124 0 .225-.1.225-.225V8.676c0-.124-.1-.224-.225-.224h-1.257c-.124 0-.224.1-.224.224m-.673 1.809a.224.224 0 0 1-.225.225h-.407a.61.61 0 0 1-.609-.61V9.069a.61.61 0 0 1 .61-.61h.406a.224.224 0 0 1 .225.225z",fill:"#FF6F4D"})),NavMyHealthIcon=e=>r.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e),r.createElement("path",{d:"M6.114 3.333a4.64 4.64 0 0 1 3.565 1.708.412.412 0 0 0 .642 0 4.64 4.64 0 0 1 3.565-1.708c2.646 0 4.447 2.302 4.447 5.142 0 1.698-.904 4.446-2.675 6.102-2.522 2.358-4.665 2.965-5.392 3.11a1.3 1.3 0 0 1-.53 0c-.728-.146-2.871-.752-5.393-3.11-1.772-1.656-2.676-4.404-2.676-6.102 0-2.84 1.801-5.142 4.447-5.142",fill:"#FF6F4D"}),r.createElement("path",{d:"M13.298 11.226v-.829a1.205 1.205 0 0 0-1.202-1.204h-.208a.26.26 0 0 1-.261-.259v-.208a1.205 1.205 0 0 0-1.201-1.204h-.832A1.205 1.205 0 0 0 8.39 8.726v.205a.26.26 0 0 1-.259.261h-.207a1.2 1.2 0 0 0-1.202 1.202v.834a1.204 1.204 0 0 0 1.202 1.201h.207a.26.26 0 0 1 .259.262v.205A1.205 1.205 0 0 0 9.594 14.1h.832a1.204 1.204 0 0 0 1.201-1.204v-.208a.26.26 0 0 1 .261-.258h.208a1.205 1.205 0 0 0 1.202-1.204",fill:"#fff"})),NavSaveIcon=e=>r.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e),r.createElement("path",{d:"M4.767 17.236a1.36 1.36 0 0 0 1.256.188l4.097-1.397a.37.37 0 0 1 .28 0l4.097 1.397q.22.071.45.075c.29.002.573-.09.807-.263a1.43 1.43 0 0 0 .6-1.171V3.935A1.417 1.417 0 0 0 14.946 2.5H5.573a1.416 1.416 0 0 0-1.406 1.434v12.13a1.43 1.43 0 0 0 .6 1.172",fill:"#00CB8A"})),NavSettingsIcon=e=>r.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e),r.createElement("path",{d:"M17.339 8.075a2.177 2.177 0 0 1-1.717-2.944 1.02 1.02 0 0 0-.305-1.15 8.2 8.2 0 0 0-2.445-1.417 1.03 1.03 0 0 0-1.16.323 2.173 2.173 0 0 1-3.423 0 1.03 1.03 0 0 0-1.161-.323A8.2 8.2 0 0 0 4.85 3.842a1.03 1.03 0 0 0-.322 1.183 2.167 2.167 0 0 1-1.806 2.978 1.03 1.03 0 0 0-.9.828 8 8 0 0 0-.05 2.861 1.03 1.03 0 0 0 .906.861 2.166 2.166 0 0 1 1.767 3.061 1.01 1.01 0 0 0 .283 1.211A8.2 8.2 0 0 0 7.15 18.22q.17.059.35.061a1.02 1.02 0 0 0 .833-.433 2.15 2.15 0 0 1 1.778-.934 2.18 2.18 0 0 1 1.745.878 1.02 1.02 0 0 0 1.2.339 8.3 8.3 0 0 0 2.222-1.328 1.03 1.03 0 0 0 .3-1.172 2.167 2.167 0 0 1 1.739-2.995 1.03 1.03 0 0 0 .872-.844 8 8 0 0 0 .144-1.405q0-.749-.138-1.484a1.02 1.02 0 0 0-.856-.828m-4.561 2.312a2.778 2.778 0 1 1-5.556 0 2.778 2.778 0 0 1 5.556 0",fill:"#2D87F3"})),NavUserIcon=e=>r.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e),r.createElement("path",{d:"M10 19.167A9.167 9.167 0 1 0 10 .833a9.167 9.167 0 0 0 0 18.334",fill:"#BCDEFF"}),r.createElement("path",{d:"M17.356 15.463a9.188 9.188 0 0 0-14.716-.005 9.155 9.155 0 0 0 14.716.005",fill:"#2D87F3"}),r.createElement("path",{d:"M10 10.591a3.548 3.548 0 1 0 0-7.096 3.548 3.548 0 0 0 0 7.096",fill:"#2D87F3"})),VaccinationIcon=e=>r.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r.createElement("path",{d:"M1.11848 19.1667C1.19427 19.1666 1.26693 19.1365 1.32049 19.0829L4.30733 16.0962C4.36096 16.0426 4.3911 15.9699 4.39111 15.8941C4.39113 15.8183 4.36103 15.7455 4.30743 15.6919C4.25383 15.6383 4.18112 15.6081 4.1053 15.6081C4.02948 15.6081 3.95675 15.6382 3.90313 15.6918L0.916285 18.6787C0.876281 18.7186 0.849035 18.7696 0.837994 18.825C0.826954 18.8805 0.832614 18.938 0.854261 18.9903C0.875908 19.0425 0.912567 19.0872 0.9596 19.1186C1.00663 19.15 1.06193 19.1667 1.11848 19.1667Z",fill:"#626D7C"}),r.createElement("path",{d:"M7.71853 15.4925H7.72043L15.3384 7.87534L12.1272 4.66228L4.45021 12.3366C5.39488 13.2971 7.71853 15.4925 7.71853 15.4925Z",fill:"#2D87F3"}),r.createElement("path",{d:"M3.18097 14.9702L5.02953 16.8187C5.19838 16.9989 5.43172 17.1049 5.67851 17.1135C5.9253 17.122 6.16544 17.0325 6.34638 16.8645L7.71851 15.4923L4.50736 12.2793L3.13524 13.6514C2.96661 13.8324 2.87671 14.073 2.88529 14.3203C2.89386 14.5675 3.00021 14.8013 3.18097 14.9702Z",fill:"#BCDEFF"}),r.createElement("path",{d:"M17.7683 3.58334L16.4183 2.2333L13.5601 5.09143L14.9102 6.44147L17.7683 3.58334Z",fill:"#2B62CD"}),r.createElement("path",{d:"M7.71889 15.7783C7.77545 15.7783 7.83074 15.7616 7.87778 15.7301C7.92481 15.6987 7.96147 15.6541 7.98312 15.6018C8.00476 15.5496 8.01042 15.4921 7.99938 15.4366C7.98834 15.3811 7.9611 15.3302 7.92109 15.2902L4.70861 12.0779C4.65452 12.0268 4.58261 11.9988 4.50818 11.9998C4.43375 12.0009 4.36267 12.0309 4.31005 12.0836C4.25742 12.1362 4.22741 12.2073 4.22639 12.2817C4.22538 12.3562 4.25343 12.4281 4.3046 12.4821L7.51689 15.6944C7.54337 15.721 7.57485 15.7421 7.60952 15.7565C7.64419 15.7709 7.68136 15.7783 7.71889 15.7783Z",fill:"#BCDEFF"}),r.createElement("path",{d:"M9.48781 11.3095C9.54746 11.3096 9.60653 11.2978 9.66161 11.2749C9.71669 11.252 9.76669 11.2184 9.80874 11.1761L9.83847 11.1462L9.86819 11.1758C9.95336 11.2609 10.0689 11.3088 10.1893 11.3088C10.3098 11.3088 10.4253 11.2609 10.5104 11.1758L10.8535 10.8327C10.8957 10.7905 10.9291 10.7404 10.952 10.6853C10.9748 10.6302 10.9866 10.5711 10.9866 10.5114C10.9866 10.4517 10.9748 10.3926 10.952 10.3375C10.9291 10.2824 10.8957 10.2323 10.8535 10.1901L10.8232 10.1625L10.8531 10.1326C10.9382 10.0474 10.9861 9.93182 10.9861 9.81135C10.9861 9.69087 10.9382 9.57533 10.8531 9.49014L10.51 9.14711C10.4679 9.10487 10.4179 9.07136 10.3628 9.0485C10.3077 9.02563 10.2486 9.01386 10.1889 9.01386C10.1293 9.01386 10.0702 9.02563 10.0151 9.0485C9.96 9.07136 9.90995 9.10487 9.86781 9.14711L9.83808 9.17664L9.80836 9.14692C9.72313 9.06179 9.6076 9.01397 9.48715 9.01397C9.36669 9.01397 9.25116 9.06179 9.16594 9.14692L8.8229 9.48995C8.73774 9.57511 8.6899 9.69062 8.6899 9.81106C8.6899 9.9315 8.73774 10.047 8.8229 10.1322L8.85282 10.1621L8.82329 10.1918C8.73826 10.2771 8.69052 10.3925 8.69052 10.5129C8.69052 10.6333 8.73826 10.7488 8.82329 10.8341L9.16632 11.1771C9.2085 11.2193 9.25863 11.2528 9.31381 11.2755C9.36899 11.2982 9.42813 11.3098 9.48781 11.3095Z",fill:"white"}),r.createElement("path",{d:"M12.6184 3.4438L16.5573 7.38277C16.8001 7.6255 16.8001 8.01905 16.5573 8.26178C16.3146 8.50451 15.921 8.50451 15.6783 8.26178L11.7393 4.32281C11.4966 4.08008 11.4966 3.68653 11.7393 3.4438C11.9821 3.20107 12.3756 3.20107 12.6184 3.4438Z",fill:"#BCDEFF"}),r.createElement("path",{d:"M16.4563 1.22324L18.7767 3.54364C18.9921 3.75907 18.9921 4.10834 18.7767 4.32376C18.5613 4.53918 18.212 4.53918 17.9966 4.32376L15.6762 2.00336C15.4608 1.78793 15.4608 1.43866 15.6762 1.22324C15.8916 1.00782 16.2409 1.00782 16.4563 1.22324Z",fill:"#BCDEFF"})),h=p.Z.div` padding: 16px; border-radius: 16px; background-color: white; hr { border-color: ${u.r.colors.neutral100}; border-bottom-width: 0px; border-style: solid; } .profile-nav-item-group { background-color: white; border-radius: 8px; } `,g=p.Z.div` display: block; border: 1px solid transparent; transition: all 300ms linear; cursor: pointer; position: relative; ${e=>e.hasSubmenu&&m.iv` cursor: pointer; `} &[data-is-open='true'] { & + div { margin-top: 8px; } } border-left-width: 0; border-right-width: 0; &[data-is-open='true'] { & + div { margin-top: 0; } .nav-menu-item:last-child { border-bottom-color: ${u.r.colors.neutral100}; } } .nav-menu-item { background-color: ${u.r.colors.neutral50}; } .nav-menu-item { padding-left: 38px; } `,f=p.Z.div` display: flex; align-items: center; height: 48px; border: 1px solid transparent; transition: all 300ms; border-radius: 8px; &:hover { background-color: ${u.r.colors.neutral150}; } &[data-active='true'] { background-color: ${u.r.colors.blue50}; } `,v=p.Z.div` margin-left: auto; svg { fill: ${u.r.colors.gray600}; transition: transform 300ms; } &[data-is-open='true'] svg { transform: rotate(180deg); } `,b=p.Z.div` overflow: hidden; max-height: 0; transition: max-height 0.3s ease-out; [data-is-open='true'] & { max-height: 500px; transition-timing-function: ease-in; } `,E={helloSites:{member:()=>o.C.getAssetPath("userProfileNav/helloSites/icon-rank-member.svg"),ambassador:()=>o.C.getAssetPath("userProfileNav/helloSites/icon-rank-ambassador.svg"),doctor:()=>o.C.getAssetPath("userProfileNav/helloSites/icon-rank-doctor.svg"),expert:()=>o.C.getAssetPath("userProfileNav/helloSites/icon-rank-expert.svg"),influencer:()=>o.C.getAssetPath("userProfileNav/helloSites/icon-rank-influencer.svg")},marryBaby:{member:()=>o.C.getAssetPath("userProfileNav/marryBaby/icon-rank-member.svg"),ambassador:()=>o.C.getAssetPath("userProfileNav/marryBaby/icon-rank-ambassador.svg"),doctor:()=>o.C.getAssetPath("userProfileNav/marryBaby/icon-rank-doctor.svg"),expert:()=>o.C.getAssetPath("userProfileNav/marryBaby/icon-rank-expert.svg"),influencer:()=>o.C.getAssetPath("userProfileNav/marryBaby/icon-rank-influencer.svg")}},Rank=({rank:e,siteType:t="helloSites"})=>{let a=(0,r.useMemo)(()=>{var a,r;return(null===(r=null===(a=E[t])||void 0===a?void 0:a[e])||void 0===r?void 0:r.call(a))||""},[e,t]),{t:n}=(0,c.u)();return r.createElement("div",{style:{display:"inline-flex",height:"fit-content",alignItems:"center",padding:"5px 12px",gap:"4px",borderRadius:16,border:`1px solid ${"helloSites"===t?u.r.colors.blue100:u.r.colors.mb100}`}},r.createElement("img",{src:a,alt:e,style:{height:16,width:16}}),r.createElement(l.T,{size:"s5",color:"gray.8",weight:"semiBold"},n(`userProfile.userRank.${e}`)))},UserInfoSection=({siteType:e="helloSites",userInfo:t})=>(null==t?void 0:t.id)?r.createElement(r.Fragment,null,r.createElement("div",{style:{display:"flex",width:"100%",justifyContent:"space-between"}},r.createElement(i.A,{src:t.avatar,alt:t.name,size:48,style:{marginBottom:8}}),r.createElement(Rank,{rank:"member",siteType:e})),r.createElement(l.T,{size:"s3",weight:"semiBold",color:"gray.8",style:{marginBottom:4}},t.name),r.createElement(l.T,{size:"n1",weight:"regular",color:"helloSites"===e?"hb.6":"mb.6"},"@",t.username),r.createElement("hr",null)):null,ProfileNavigation=({className:e,activeItem:t,navMenuItems:a,style:i,onLogout:o,siteType:l="helloSites",userInfo:s,onNavigate:m,configs:p={}})=>{let{enableProfileFindMyBooking:u=!1}=p,{locale:g}=(0,c.u)(),[f,v]=(0,r.useState)(),b="string"==typeof t?t:f,E=(0,d.n)((0,d.a)(g,"marryBaby"===l)+"/"),y=(0,d.n)((0,d.g)(g,"marryBaby"===l)+"/"),w=a||[[{key:"userProfile.nav.header.viewProfile",icon:r.createElement(NavUserIcon,{width:"24",height:"24"}),value:"profile",tracking:{action:"Profile Click"},link:`${E}user/profile/`},{key:"userProfile.nav.card.myHealth",icon:r.createElement(NavMyHealthIcon,{width:"24",height:"24"}),value:"myHealth",tracking:{action:"My Health Click"},link:`${E}user/health/`},{key:"userProfile.nav.card.mySaved",icon:r.createElement(NavSaveIcon,{width:"24",height:"24"}),iconColor:"green_300",value:"saved",tracking:{action:"Bookmarks Click"},link:`${E}user/saved/`},!!u&&{key:"navigation.find_my_booking",icon:r.createElement(VaccinationIcon,{width:"24",height:"24"}),value:"find_my_booking",tracking:{action:"Find My Booking"},link:`${y}care/find-my-booking`},{key:"userProfile.nav.card.myBooking",icon:r.createElement(NavBookingIcon,{width:"24",height:"24"}),value:"booking",disabled:!n.C.includes(g),tracking:{action:"Manage Booking Click"},link:`${E}user/booking/`},{key:"userProfile.nav.card.myCommunity",icon:r.createElement(NavCommunityIcon,{width:"24",height:"24"}),value:"myCommunities",disabled:!n.c.includes(g),tracking:{action:"Community Click"},link:`${E}user/my-communities/`}],...n.E.includes(g)?[[{key:"userProfile.nav.card.eCom",icon:r.createElement(NavEshopIcon,{width:"24",height:"24"}),value:"eCom",disabled:!n.E.includes(g),subMenu:[{key:"userProfile.nav.card.ecom.manageOrders",value:"eCom-manageOrders",icon:r.createElement(NavDotIcon,{width:"24",height:"24"}),link:`${y}shop/ho-so/quan-li-don-hang/`,tracking:{action:"Order Management Click"}},{key:"userProfile.nav.card.ecom.DeliveryAddress",value:"eCom-manageAddress",icon:r.createElement(NavDotIcon,{width:"24",height:"24"}),link:`${y}shop/ho-so/dia-chi-giao-hang/`,tracking:{action:"Address Management Click"}},{key:"userProfile.nav.card.ecom.voucher",value:"eCom-voucher",icon:r.createElement(NavDotIcon,{width:"24",height:"24"}),link:`${y}shop/ho-so/khuyen-mai/`,tracking:{action:"Voucher Click"}}]}]]:[],[{key:"userProfile.nav.menu.accountSettings",icon:r.createElement(NavSettingsIcon,{width:"24",height:"24"}),subMenu:[{key:"userProfile.nav.menu.password",value:"password",icon:r.createElement(NavDotIcon,{width:"24",height:"24"}),tracking:{action:"Set Password Click"},link:`${E}user/password/`},{key:"userProfile.nav.menu.disableAccount",value:"disable-account",icon:r.createElement(NavDotIcon,{width:"24",height:"24"}),tracking:{action:"Disable Account Click"},link:`${E}user/disable-account/`},...n.D.includes(g)?[{key:"userProfile.nav.menu.dataPrivacy",value:"data-privacy",icon:r.createElement(NavDotIcon,{width:"24",height:"24"}),tracking:{action:"Data Privacy Click"},link:`${E}user/data-privacy/`}]:[]]}],[{key:"userProfile.nav.menu.help",icon:r.createElement(NavHelpIcon,{width:"24",height:"24"}),value:"help",link:`${E}user/help`,tracking:{action:"Support Click"}},{key:"userProfile.nav.menu.logout",icon:r.createElement(NavLogOutIcon,{width:"24",height:"24"}),value:"logout",tracking:{action:"Sign Out Click"}}]];return r.createElement(h,{className:e,style:i},r.createElement(UserInfoSection,{userInfo:s,siteType:l}),w.map((e,t)=>r.createElement(r.Fragment,{key:t},r.createElement("div",{className:"profile-nav-item-group",key:t},e.map(e=>e?r.createElement(NavMenuItem,{key:e.key,item:e,activeKey:b||"",onLogout:o,onClick:()=>v(t=>t===e.key?void 0:e.key),siteType:l,onNavigate:m}):null)),t!==w.length-1&&r.createElement("hr",null))))},NavMenuItem=({item:e,activeKey:t,forceOpen:a,onLogout:n,onClick:i,siteType:o="helloSites",onNavigate:d})=>{var m,p;let[u,h]=(0,r.useState)(!1),E=(0,r.useMemo)(()=>"undefined"!=typeof window?window.location.href:"",[]);if(e.disabled)return null;let{t:y}=(0,c.u)(),w=null===(m=e.subMenu)||void 0===m?void 0:m.some(e=>e.key===t),C=t===e.key;(0,r.useEffect)(()=>{(w||C)&&h(!0)},[w,C]);let k="boolean"==typeof a?a:u;return r.createElement(g,{as:e.subMenu?void 0:"a","data-is-open":k,key:e.key,hasSubmenu:!!e.subMenu,onClick:()=>{null==i||i(),e.subMenu&&!a?h(e=>!e):"logout"===e.value?null==n||n():e.link&&(d?d(e.link):window.location.href=e.link)},"data-event-category":"Ecommerce","data-event-action":(null===(p=null==e?void 0:e.tracking)||void 0===p?void 0:p.action)||"","data-event-label":E},r.createElement(f,{"data-active":C},e.icon,r.createElement(l.T,{size:"p3",style:{marginLeft:e.icon?24:48,transition:"color 300ms"},color:C?"helloSites"===o?"hb.6":"mb.6":"gray.8"},y(e.key)),e.subMenu&&r.createElement(v,{"data-is-open":k},r.createElement(s.C,{width:14}))),e.subMenu&&r.createElement(b,null,e.subMenu.map(e=>r.createElement(NavMenuItem,{key:e.key,item:e,activeKey:t,onLogout:n,siteType:o}))))}},e6Kn:function(e,t,a){a.d(t,{k:function(){return ProgressBar}});var r=a("LufY"),n=a("q1tI"),i=a("DzJC"),o=a.n(i),l=a("rBCA"),c=a("iBNF");let s=l.Z.div` position: relative; width: 100%; & div[role='slider'] { -webkit-text-size-adjust: none; -webkit-user-select: none; &:focus { outline: none; } } `,d=l.Z.div` position: absolute; top: 19px; width: 24px; height: 24px; color: ${c.r.colors.white}; border: 2px solid ${c.r.colors.white}; border-radius: 50%; transform: translateY(-50%) translateX(-50%); display: flex; align-items: center; justify-content: center; cursor: pointer; background-color: ${c.r.colors.white}; color: ${c.r.colors.gray300}; border: 1px solid ${c.r.colors.gray300}; &[data-is-active='true'] { background-color: ${c.r.colors.primaryBase}; color: ${c.r.colors.white}; border: none; } `,m=l.Z.div` display: flex; width: 100%; height: 36px; &[data-track-type='detail'] { margin-top: 0; } &[data-track-type='detail'][data-step-passed='true'] > div { border: 1px solid ${c.r.colors.primaryBase}; height: 0px; } &[data-track-type='detail'] > div { border: 1px solid ${c.r.colors.gray200}; height: 0px; } `,p=l.Z.div` width: 100%; height: 5px; align-self: center; border-radius: 4px; background-color: ${c.r.colors.gray200}; `,u=l.Z.div` position: absolute; top: 32px; min-width: 100px; text-align: center; color: ${c.r.colors.gray500}; font-size: ${c.r.sizes.fsCaption2}; font-weight: ${c.r.sizes.fwBold}; &[data-step-passed='true'] { color: ${c.r.colors.gray800}; } `,h=l.Z.div` display: flex; align-items: center; `,g=l.Z.div` display: flex; align-items: center; font-size: ${c.r.sizes.fsCaption2}; font-weight: ${c.r.sizes.fwBold}; color: ${c.r.colors.gray500}; cursor: pointer; & > svg { height: 10px; width: 10px; margin: 0 14px; } & > svg > path { stroke: ${c.r.colors.gray500}; } &[data-selected='true'] { color: ${c.r.colors.primaryBase}; } `,f=l.Z.div` position: absolute; left: 0; top: 19px; height: 24px; cursor: pointer; transform: translateY(-50%); display: flex; align-items: center; padding: 8px; background-color: ${c.r.colors.white}; `,v=l.Z.div` min-width: 24px; height: 24px; border: 2px solid ${c.r.colors.white}; border-radius: 50%; margin-right: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; background-color: ${c.r.colors.white}; color: ${c.r.colors.gray300}; border: 1px solid ${c.r.colors.gray300}; &[data-is-active='true'] { border: none; background-color: ${c.r.colors.primaryBase}; color: ${c.r.colors.white}; } `,b=l.Z.div` display: flex; align-items: center; justify-content: center; & > svg { height: 20px; width: 20px; margin-right: 8px; & > path { stroke: ${c.r.colors.gray500}; } } `,E=l.Z.div` color: ${c.r.colors.gray400}; font-size: ${c.r.sizes.fsCaption2}; font-weight: ${c.r.sizes.fwBold}; margin-right: 8px; flex: 0 0 auto; &[data-step-passed='true'] { color: ${c.r.colors.gray800}; } `,y=l.Z.div` position: absolute; top: 32px; font-weight: ${c.r.sizes.fwRegular}; color: ${c.r.colors.gray400}; padding-right: 16px; `,ProgressBar=({type:e,numberOfStep:t,activeStep:a,labelPrefix:i,detailSteps:l,className:c,onChange:w})=>{let[C,k]=(0,n.useState)(0),Track=e=>{var{trackClassName:t}=e,a=(0,r._)(e,["trackClassName"]);return n.createElement(m,Object.assign({},a,{className:t}),n.createElement(p,null))},x=n.createElement(s,{className:c+" progress-bar"},n.createElement(Track,null),n.createElement(({trackLength:e,activeStep:a,labelPrefix:r="Step",onChange:i})=>n.createElement(n.Fragment,null,Array.from({length:t},(e,t)=>t).map((o,l)=>n.createElement(d,{"data-is-active":l===a,"data-label":l,style:{left:l*e/(t-1)},onClick:()=>{i&&i(l)},key:l},l+1,n.createElement(u,{"data-step-passed":l<=a},r+" "+(l+1))))),{trackLength:C,activeStep:a,labelPrefix:i,onChange:w})),B=n.createElement("svg",{"data-name":"Layer 1",viewBox:"0 0 5.5 9.5"},n.createElement("title",null,"chevron-right"),n.createElement("path",{d:"M.75 8.75l4-4-4-4",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5})),M=n.createElement(h,null,l&&Array.from({length:l.length},(e,t)=>t).map((e,t)=>{var r;return n.createElement(g,{key:t,"data-selected":t===a,onClick:()=>{w&&w(t)}},null===(r=l[t])||void 0===r?void 0:r.text," ",tn.createElement(n.Fragment,null,Array.from({length:e.length},(e,t)=>t).map((r,i)=>n.createElement(f,{key:i,style:{left:100/e.length*i+"%",width:100/e.length+"%"},onClick:()=>{a&&a(i)}},e[i].icon?n.createElement(b,{onClick:()=>{a&&a(i)}},e[i].icon):n.createElement(v,{"data-is-active":i===t,"data-label":r,onClick:()=>{a&&a(i)},key:i},i+1),n.createElement(E,{"data-step-passed":i{let e=document.querySelector(".progress-bar");e&&k(e.offsetWidth)},1e3),[]);return(0,n.useEffect)(()=>{let e=document.querySelector(".progress-bar");return k(null==e?void 0:e.offsetWidth),window.addEventListener("resize",L,{passive:!0}),()=>{window.removeEventListener("resize",L)}},[]),"step-track"===e&&x||"breadcrumb"===e&&M||"detail-track"===e&&S}}}]);