"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7613],{iwkL:function(e,t,r){r.d(t,{x:function(){return PregnancyWeightGainChart}});var a=r("q1tI"),l=r("PbJh"),i=r("srUE"),o=r("DFPy"),n=r("FQi+"),s=r("iBNF"),c=r("ps87"),d=r("S6KQ"),u=r("y9N3"),m=r("hNiv"),p=r("J+eN"),g=r("b+jq"),v=r("BChI"),_=r("wwo5"),E=r("jsvD"),h=r("4XNq"),b=r("rBCA"),y=r("usZY");r("Wgwc"),r("xXM3");let CustomizedAxisTick=e=>{let{x:t,y:r,payload:l,activeWeek:i}=e;return i===l.value?a.createElement("g",{transform:`translate(${t},${r})`},a.createElement("circle",{r:12,fill:"marryBaby"===e.siteType?s.r.mbColors.pink:s.r.colors.primaryBase}),a.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:s.r.colors.white,fontFamily:"Inter",fontWeight:"600",fontSize:"12px"},l.value)):a.createElement("g",{transform:`translate(${t},${r})`},a.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:s.r.colors.gray600,fontFamily:"Inter",fontWeight:"400",fontSize:"12px"},l.value))},f=b.Z.div` /* position: absolute; */ display: flex; flex-direction: column; padding: 8px 12px; gap: 4px; min-width: 145px; max-width: 220px; min-height: 50px; border-radius: 4px; background: rgba(255, 255, 255, 0.2); box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); border: 1px solid rgba(255, 255, 255, 0.3); /* .risk { display: flex; align-items: center; padding: 4px 8px; background: ${s.r.colors.yellow600}; border-radius: 3px; } */ & > * { display: flex; gap: 4px; align-items: center; } .risk { display: inline-flex; padding: 2px 8px; border-radius: 2px; background: #ffffff; } `,T=b.Z.div` position: relative; width: 100%; .custom-chart-label { display: flex; width: 100%; justify-content: space-between; align-items: center; } .chart-legend { display: flex; justify-content: space-between; } `,w=b.Z.div` display: flex; gap: 40px; justify-content: center; margin-bottom: 8px; & > div { display: flex; align-items: center; gap: 4px; } `,S=[{name:"overweight",backgroundColor:s.r.colors.yellow50,color:s.r.colors.yellow900},{name:"underweight",backgroundColor:s.r.colors.yellow50,color:s.r.colors.yellow900},{name:"healthy",backgroundColor:s.r.colors.green50,color:s.r.colors.green900}],CustomizedTooltipLabel=e=>{var t,r,l,o,n;let{payload:c,active:d}=e,u=null===(t=null==c?void 0:c[0])||void 0===t?void 0:t.payload;if(!u||!u.toolTipLabel||!d)return null;let{backgroundColor:m,color:p}=(0,a.useMemo)(()=>S.find(e=>e.name===u.status),[null==u?void 0:u.status]);return a.createElement(f,null,a.createElement("div",null,null===(r=u.toolTipLabel)||void 0===r?void 0:r[0]," ",null===(l=u.toolTipLabel)||void 0===l?void 0:l[1]),a.createElement("div",null,(null===(o=u.toolTipLabel)||void 0===o?void 0:o[2])&&a.createElement(i.T,{as:"span",size:"s3",color:s.r.colors.gray800,weight:"semiBold"},null===(n=u.toolTipLabel)||void 0===n?void 0:n[2]),a.createElement("div",{className:"risk",style:{backgroundColor:m}},a.createElement(i.T,{size:"n1",color:p},u.translatedStatus))))},generatePregnancyWeightGainChartData=({weightByWeek:e,weightBefore:t,toolTipLabel:r,status:a,activeWeek:l,t:i})=>{let o=i(`bmi.result.${a}`),generateAdditionalData=e=>e===l?{toolTipLabel:r,translatedStatus:o,status:a}:{};return e.map(e=>Object.assign({name:e.week,min:t+e.min,difference:e.max-e.min,max:t+e.max},generateAdditionalData(e.week)))},Chart=({weightBefore:e,weightByWeek:t,activeWeek:r,currentWeight:o,toolTipLabel:b=[],status:y,withLine:f=!1,siteType:w})=>{let{t:S}=(0,n.u)(),C="marryBaby"===w,k=(0,a.useMemo)(()=>generatePregnancyWeightGainChartData({weightByWeek:t,weightBefore:e,toolTipLabel:b,status:y,activeWeek:r,t:S}),[t,e,b,y,r]),[O,x]=(0,a.useState)(!1),I=(0,a.useRef)(null);return(0,h.a)(I,()=>x(!1)),a.createElement(T,null,C?a.createElement(l.M,{type:"bodytext-3",color:s.r.mbColors.dark}," ",S("babyGrowth.weight")," ",S("pregnancyWeightGain.weightInput.desc")):a.createElement(i.T,{size:"n1",color:s.r.colors.gray500},S("babyGrowth.weight")," ",S("pregnancyWeightGain.weightInput.desc")),Array.isArray(k)&&k.length>0&&a.createElement(T,null,a.createElement(c.h,{height:388,className:"chart"},a.createElement(d.T,{data:k,margin:{top:16,right:0,left:0}},a.createElement(u.q,{stroke:s.r.colors.neutral100}),a.createElement(m.u,{trigger:"click",content:e=>a.createElement(CustomizedTooltipLabel,Object.assign({active:!f&&O&&void 0!==r&&void 0!==o},e))}),a.createElement(p.K,{type:"number",scale:"linear",ticks:Array.from({length:40},(e,t)=>t+1),dataKey:"name",tickLine:!1,tickMargin:12,tick:e=>a.createElement(CustomizedAxisTick,Object.assign({},e,{activeWeek:r,siteType:w})),domain:["dataMin","dataMax"],interval:"preserveStartEnd",tickCount:1,allowDecimals:!1}),a.createElement(g.B,{domain:[t=>Math.max(t,e-10||t),t=>Math.max(t,e+20||t)],type:"number",scale:"auto",interval:"preserveStartEnd",tickLine:!1,tickMargin:7,width:45,tickCount:10,allowDecimals:!0,tickFormatter:e=>String(Math.round((e+Number.EPSILON)*100)/100),tick:{fontFamily:"Inter",fontWeight:400,fontSize:12,color:s.r.colors.gray600}}),a.createElement(v.u,{connectNulls:!0,type:"monotone",dataKey:"min",stackId:"1",stroke:"transparent",fill:"transparent"}),a.createElement(v.u,{connectNulls:!0,type:"monotone",dataKey:"difference",stackId:"1",stroke:"transparent",fill:C?s.r.mbColors.tonePink:s.r.colors.primary100}),void 0!==r&&void 0!==o&&a.createElement(_.q,{onClick:()=>x(!0),x:0===r?1:r,y:o,r:4,shape:a.createElement(E.C,{ref:I,r:4}),fill:C?s.r.mbColors.pink:s.r.colors.primaryBase,stroke:C?s.r.mbColors.pink:s.r.colors.primaryBase}))),a.createElement("div",{className:"custom-chart-label"},a.createElement("i",null),C?a.createElement(l.M,{type:"bodytext-3",color:s.r.mbColors.dark},S("pregnancy.week")):a.createElement(i.T,{size:"n1",color:s.r.colors.gray500},S("pregnancy.week")))))},Dot=e=>{var{color:t}=e,r=(0,y._)(e,["color"]);return a.createElement("svg",Object.assign({width:"8",height:"8",viewBox:"0 0 8 8",fill:"none"},r),a.createElement("circle",{cx:"4",cy:"4",r:"4",fill:t||s.r.colors.primaryBase}))},ChartLegend=({idealWeight:e,siteType:t})=>{let{t:r}=(0,n.u)(),o="marryBaby"===t;return a.createElement(w,null,a.createElement("div",null,o?a.createElement(a.Fragment,null,a.createElement(Dot,{color:s.r.mbColors.lightPink}),a.createElement(l.M,{type:"bodytext-3",color:s.r.mbColors.dark},r("pregnancyTool.weightSuggested")," ",a.createElement(i.T,{size:"n1",color:s.r.colors.gray800,weight:"bold",as:"span"},e))):a.createElement(a.Fragment,null,a.createElement(Dot,{color:s.r.colors.primary100}),a.createElement(i.T,{size:"n1",color:s.r.colors.gray600},a.createElement(i.T,{size:"n1",as:"span"},r("pregnancyTool.weightSuggested")," "),a.createElement(i.T,{size:"n1",color:s.r.colors.gray800,weight:"bold",as:"span"},e)))),a.createElement("div",null,o?a.createElement(a.Fragment,null,a.createElement(Dot,{color:s.r.mbColors.pink}),a.createElement(l.M,{type:"bodytext-3",color:s.r.mbColors.dark},r("pwg.placeholder.weight"))):a.createElement(a.Fragment,null,a.createElement(Dot,null),a.createElement(i.T,{size:"n1",color:s.r.colors.gray600},r("pwg.placeholder.weight")))))},C=b.Z.div` display: flex; flex-direction: column; align-items: center; padding: 24px 16px; width: 100%; gap: 24px; border: 1px solid ${s.r.colors.neutral100}; border-radius: 8px; .chart-header { text-align: center; } > div { width: 100%; } `,PregnancyWeightGainChart=({chartProps:e,pillCarouselProps:t,idealWeight:r,description:c,siteType:d})=>{let{t:u}=(0,n.u)();return a.createElement(C,null,a.createElement("div",{className:"chart-header"},"marryBaby"===d?a.createElement(l.a,{type:"h3",color:s.r.mbColors.dark},u("pregnancyTool.weightSuggested")):a.createElement(i.T,{size:"s1",weight:"semiBold",color:s.r.colors.gray800},u("pregnancyTool.weightSuggested")),c&&c),a.createElement(o.P,Object.assign({},t)),a.createElement("div",null,a.createElement(ChartLegend,{idealWeight:r,siteType:d}),a.createElement(Chart,Object.assign({},e,{siteType:d}))))}},RvUM:function(e,t,r){r.d(t,{A:function(){return a}});let a="100ms"},sHKU:function(e,t,r){r.d(t,{I:function(){return IS_SSOV2_ENABLED},S:function(){return l},a:function(){return u},b:function(){return isPhoneNotVerifedYet},c:function(){return isLoginWithPhoneNotVerifedYet},d:function(){return isFlowFinishedSetup},i:function(){return isUserFinishedSetup},r:function(){return redirect},u:function(){return m}});var a,l,i=r("usZY"),o=r("VNqU"),n=r("3qph"),s=r("EoE9"),c=r("27Mu"),d=r("yNk5");(a=l||(l={})).FIRST="first",a.EMAIL="email",a.VERIFY_PHONE="verify_phone",a.PASSWORD="password",a.UPDATE_EMAIL="update_email",a.FORGOT_PASSWORD_PHONE="forgot_password_phone",a.FORGOT_PASSWORD_SETUP="forgot_password_setup",a.OTP="otp",a.SETUP_FULL="setup_full";let u=(0,o.Ue)(e=>({currentStepIndex:0,steps:[{type:l.FIRST}],setSteps:t=>e(e=>({steps:"function"==typeof t?t(e.steps):t})),addStep:t=>{e(e=>({steps:[...e.steps,t]}))},goNext:()=>{e(e=>({currentStepIndex:e.currentStepIndex+1}))},goBack:()=>{e(e=>({currentStepIndex:e.currentStepIndex-1,steps:e.steps.slice(0,e.steps.length-1)}))}})),m=(0,o.Ue)()((e,t)=>({userInfo:void 0,abTestFlow:"A",setABTestFlow(t){e({abTestFlow:t})},setUserInfo:t=>e({userInfo:t}),isOpen:!1,setOpen:t=>e({isOpen:t}),returnUrl:void 0,setReturnUrl:t=>e({returnUrl:t}),mounted:!1,setMounted:t=>e({mounted:t}),source:void 0,setSource:t=>e({source:t}),setupSource:void 0,setSetupSource:t=>e({setupSource:t}),setOnCloseProp:t=>e({onCloseProp:t}),triggerLogin:r=>{var a,i;let{source:o,returnUrl:n}=r||{},d=(0,c.ej)(s.B);d?(redirect(null==r?void 0:r.returnUrl,null==r?void 0:r.source,null==r?void 0:r.forceReloadOnClose),e({isOpen:!1}),null===(i=(a=t()).onCloseProp)||void 0===i||i.call(a)):(u.setState({steps:[{type:l.FIRST,config:{legalTextType:((null==n?void 0:n.includes("joincommunity=1"))?"community":null==r?void 0:r.legalTextType)||"default"}}],currentStepIndex:0}),e({isOpen:!0,returnUrl:n,source:o,overrideClose:void 0,forceReloadOnClose:null!=n&&!!n.includes("joincommunity=1")||(null==r?void 0:r.forceReloadOnClose)||!1,flowData:void 0,userInfo:void 0}))},triggerCareEmailPhoneVerify:r=>(0,i.a)(void 0,void 0,void 0,function*(){var a,o,s;let c=yield(0,n.g)();(null===(a=null==c?void 0:c._data)||void 0===a?void 0:a.first_time_login)&&(c._data.first_time_login=0),e({userInfo:null==c?void 0:c._data});let forceUpdatePhoneEmail=a=>(0,i.a)(void 0,void 0,void 0,function*(){var i,o,s,c,d,m,p,g,v,_,E,h,b,y;let f=yield(0,n.g)(),T=!!(null===(i=null==f?void 0:f._data)||void 0===i?void 0:i.phone)&&!!(null===(o=null==f?void 0:f._data)||void 0===o?void 0:o.phone_verified_at),w=!!(null===(s=null==f?void 0:f._data)||void 0===s?void 0:s.email)&&!!(null===(c=null==f?void 0:f._data)||void 0===c?void 0:c.email_verified_at)&&!(null===(m=null===(d=null==f?void 0:f._data)||void 0===d?void 0:d.email)||void 0===m?void 0:m.endsWith("@hhg.com"))&&!(null===(g=null===(p=null==f?void 0:f._data)||void 0===p?void 0:p.email)||void 0===g?void 0:g.endsWith("@facebook.com")),S=!!(null===(v=null==f?void 0:f._data)||void 0===v?void 0:v.name),C=!!(null===(_=null==f?void 0:f._data)||void 0===_?void 0:_.birthday),k="number"==typeof(null===(E=null==f?void 0:f._data)||void 0===E?void 0:E.gender),O=null===(h=null==f?void 0:f._data)||void 0===h?void 0:h.provider;T&&w?(null==r?void 0:r.skipForceSetup)||S&&C&&k?(redirect(null==r?void 0:r.returnUrl,null==r?void 0:r.source,!0),e({isOpen:!1,forceReloadOnClose:!1}),null===(y=(b=t()).onCloseProp)||void 0===y||y.call(b)):(u.setState({steps:[{type:l.SETUP_FULL,config:{userInfo:f._data}}],currentStepIndex:0}),e(e=>Object.assign({source:null==r?void 0:r.source,returnUrl:null==r?void 0:r.returnUrl,isOpen:!0,overrideClose:void 0,forceReloadOnClose:!0},a&&!e.flowData?{flowData:getSSOFlowFromUserProfile(null==f?void 0:f._data)}:{}))):(u.setState({steps:[{type:T?l.UPDATE_EMAIL:l.VERIFY_PHONE,config:T||w?{provider:O,afterAction:(null==r?void 0:r.skipForceSetup)?"done":"setup"}:{provider:O,afterAction:"update-email"}}],currentStepIndex:0}),e(e=>Object.assign({source:null==r?void 0:r.source,returnUrl:null==r?void 0:r.returnUrl,isOpen:!0,overrideClose:void 0,forceReloadOnClose:!0},a&&!e.flowData?{flowData:getSSOFlowFromUserProfile(null==f?void 0:f._data)}:{})))});if(null===(o=null==c?void 0:c._data)||void 0===o?void 0:o.id)forceUpdatePhoneEmail(!0);else{u.setState({steps:[{type:l.FIRST,config:{legalTextType:((null===(s=null==r?void 0:r.returnUrl)||void 0===s?void 0:s.includes("joincommunity=1"))?"community":null==r?void 0:r.legalTextType)||"default"}}],currentStepIndex:0}),e({isOpen:!0,overrideClose:forceUpdatePhoneEmail,source:null==r?void 0:r.source,returnUrl:null==r?void 0:r.returnUrl,forceReloadOnClose:!0,flowData:void 0});return}}),triggerCommunityEmailVerify:r=>(0,i.a)(void 0,void 0,void 0,function*(){var a,o,s;let c=yield(0,n.g)();(null===(a=null==c?void 0:c._data)||void 0===a?void 0:a.first_time_login)&&(c._data.first_time_login=0),e({userInfo:null==c?void 0:c._data});let forceUpdateEmail=a=>(0,i.a)(void 0,void 0,void 0,function*(){var i,o,s,c,d,m,p,g,v,_,E,h;let b=yield(0,n.g)(),y=!!(null===(i=null==b?void 0:b._data)||void 0===i?void 0:i.email)&&!!(null===(o=null==b?void 0:b._data)||void 0===o?void 0:o.email_verified_at)&&!(null===(c=null===(s=null==b?void 0:b._data)||void 0===s?void 0:s.email)||void 0===c?void 0:c.endsWith("@hhg.com"))&&!(null===(m=null===(d=null==b?void 0:b._data)||void 0===d?void 0:d.email)||void 0===m?void 0:m.endsWith("@facebook.com")),f=!!(null===(p=null==b?void 0:b._data)||void 0===p?void 0:p.name),T=!!(null===(g=null==b?void 0:b._data)||void 0===g?void 0:g.birthday),w="number"==typeof(null===(v=null==b?void 0:b._data)||void 0===v?void 0:v.gender),S=null===(_=null==b?void 0:b._data)||void 0===_?void 0:_.provider;y?f&&T&&w?(redirect(null==r?void 0:r.returnUrl,null==r?void 0:r.source,!0),e({isOpen:!1,forceReloadOnClose:!1}),null===(h=(E=t()).onCloseProp)||void 0===h||h.call(E)):(u.setState({steps:[{type:l.SETUP_FULL,config:{userInfo:b._data}}],currentStepIndex:0}),e(e=>Object.assign({source:null==r?void 0:r.source,returnUrl:null==r?void 0:r.returnUrl,isOpen:!0,overrideClose:void 0,forceReloadOnClose:!0},a&&!e.flowData?{flowData:getSSOFlowFromUserProfile(null==b?void 0:b._data)}:{}))):(u.setState({steps:[{type:l.UPDATE_EMAIL,config:{provider:S,afterAction:"setup"}}].filter(Boolean),currentStepIndex:0}),e(e=>Object.assign({source:null==r?void 0:r.source,returnUrl:null==r?void 0:r.returnUrl,isOpen:!0,overrideClose:void 0,forceReloadOnClose:(null==r?void 0:r.forceReloadOnClose)||!1},a&&!e.flowData?{flowData:getSSOFlowFromUserProfile(null==b?void 0:b._data)}:{})))});if(null===(o=null==c?void 0:c._data)||void 0===o?void 0:o.id)forceUpdateEmail(!0);else{u.setState({steps:[{type:l.FIRST,config:{legalTextType:((null===(s=null==r?void 0:r.returnUrl)||void 0===s?void 0:s.includes("joincommunity=1"))?"community":null==r?void 0:r.legalTextType)||"default"}}],currentStepIndex:0}),e({isOpen:!0,overrideClose:forceUpdateEmail,source:null==r?void 0:r.source,returnUrl:null==r?void 0:r.returnUrl,forceReloadOnClose:!0,flowData:void 0});return}}),forceReloadOnClose:!1})),redirect=(e,t,r)=>{if(r){let r;return r=(null==e?void 0:e.startsWith("http"))||(null==e?void 0:e.startsWith("//"))?new URL(e):e?new URL(e,window.location.href):new URL(window.location.href),t&&r.searchParams.set("source",t),window.location.href=r.href,!0}let a=new URL(window.location.href);if(e){let r;r=e.startsWith("http")||e.startsWith("//")?new URL(e):new URL(e,window.location.href);let l=r.searchParams.get("source");a.searchParams.delete("source"),r.searchParams.delete("source");let i=l||t;if(a.href!==r.href)return i&&r.searchParams.set("source",i||""),window.location.href=r.href,!0}if(t){a.searchParams.set("source",t),window.history.replaceState({},"",a.href);return}},p=["vi-VN","id-ID","ms-MY"],IS_SSOV2_ENABLED=e=>!d.env.NEXT_PUBLIC_MARRY_BABY&&p.includes(e||d.env.UNIFY_LOCALE||"vi-VN"),getSSOFlowFromUserProfile=e=>{if(!e)throw Error("userInfo is required");let t=!!(null==e?void 0:e.name),r=!!(null==e?void 0:e.birthday),a="number"==typeof(null==e?void 0:e.gender);return{flow:t&&r&&a?"signup":"login",method:(null==e?void 0:e.provider)||"email"}},isUserFinishedSetup=e=>{if(!e)throw Error("userInfo is required");let t=!!(null==e?void 0:e.name),r=!!(null==e?void 0:e.birthday),a="number"==typeof(null==e?void 0:e.gender);return t&&r&&a},isFlowFinishedSetup=e=>{var t,r,a;return(null===(t=null==e?void 0:e.metaData)||void 0===t?void 0:t.is_gender)&&(null===(r=null==e?void 0:e.metaData)||void 0===r?void 0:r.is_name)&&(null===(a=null==e?void 0:e.metaData)||void 0===a?void 0:a.is_birthday)},isPhoneNotVerifedYet=e=>!(null==e?void 0:e.phone_verified_at)||!(null==e?void 0:e.phone),isLoginWithPhoneNotVerifedYet=(e,t)=>(null==e?void 0:e.flow)==="login"&&(null==t?void 0:t.phone)&&(null==t?void 0:t.area_code)&&!(null==t?void 0:t.phone_verified_at)},WvRR:function(e,t,r){r.d(t,{S:function(){return SurveyQuestionCard},a:function(){return SurveyThankyouCard}});var a,l,i=r("q1tI"),o=r("d53r"),n=r("srUE"),s=r("6Dmq"),c=r("OgrB"),d=r("S3DO"),u=r("rBCA"),m=r("iBNF");let p=u.Z.div` padding: 1rem; background: ${m.r.colors.neutral100}; .survey-inner-wrapper { padding: 1.25rem 1rem 1.5rem; background: ${m.r.colors.white}; border-radius: ${m.r.borderRadius}; .survey-header { border-bottom: 1px solid #dbdfe5; margin-bottom: 12px; .survey-header-text { color: ${m.r.colors.gray500}; } } .survey-contact-submit { width: 100%; margin-bottom: 1.5rem; } .term-policy-container { width: 70%; min-width: 210px; max-width: 100%; margin: 0 auto 1.5rem; text-align: center; } .survey-progress-wrapper { width: calc(100% + 2rem); height: 4px; margin-bottom: 1rem; margin-left: -1rem; background: #e4e8ec; .survey-progress { width: 100%; height: 100%; background: #00b16a; transform: scaleX(0); transform-origin: left; transition: transform ease-in-out 0.3s; } } .survey-button-wrapper { display: flex; justify-content: flex-end; button { justify-content: center; &[data-has-icon='true'] { svg { width: 10px; height: 10px; margin-right: 10px; vertical-align: unset; } } &.survey-next-button { &[data-has-icon='true'] { svg { margin-right: 0; margin-left: 10px; } } } } &[data-center='true'] { justify-content: center; button:only-child { width: 200px; max-width: 80%; } } .survey-prev-button { margin-right: 0.5rem; } } } `,g=u.Z.div` position: relative; display: flex; align-items: center; cursor: pointer; input { position: relative; width: 20px; height: 20px; flex-shrink: 0; border: solid 1px ${m.r.colors.gray500}; margin-right: 8px; border-radius: 100%; cursor: inherit; transition: background 0.4s, border-color 0.4s, box-shadow 0.4s; &:hover, &:active { border-color: ${m.r.colors.primaryBase}; box-shadow: 0 0 2px 2px ${m.r.colors.primary600}; } &:checked { display: flex; align-items: center; justify-content: center; border-color: ${m.r.colors.primaryBase}; &:after { position: absolute; top: 50%; left: 50%; width: 14px; height: 14px; //left: 3px; //position: absolute; //top: 4px; background-color: ${m.r.colors.primaryBase}; border-radius: 50%; content: ''; transform: translate(-50%, -50%); } } } label { width: calc(100% - 24px); cursor: inherit; font-weight: ${m.r.sizes.fwRegular}; } &[data-disabled='true'] { color: ${m.r.colors.gray300}; cursor: not-allowed; input { border-color: ${m.r.colors.gray300}; &:hover { border-color: ${m.r.colors.gray300}; box-shadow: none; } } } padding: 16px 20px; border: 0.5px solid transparent; background: #fafafa; border-radius: ${m.r.borderRadius}; &[data-checked='true'] { border: 0.5px solid #2d87f3; background: #f7f9fc; } input { border: solid 2px #737373; margin-right: 0; background: white; &[type='checkbox'] { &:checked { border: 0; background: ${m.r.colors.primaryBase} url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11 21C16.5228 21 21 16.5228 21 11C21 5.47715 16.5228 1 11 1C5.47715 1 1 5.47715 1 11C1 16.5228 5.47715 21 11 21Z' fill='%232D87F3' stroke='%232D87F3' stroke-width='2'/%3E%3Cpath d='M15.5714 8L9.67857 14L7 11.2727' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A") no-repeat center center; &:after { display: none; } } } } &[data-has-image='true'] { position: relative; display: block; padding: 12px; input { position: absolute; top: 20px; right: 20px; } .choice-image-wrapper { position: relative; padding-top: 56.25%; margin-bottom: 0.75rem; img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: ${m.r.borderRadius}; object-fit: cover; } } } `,v=u.Z.div` position: relative; width: 100%; padding-top: min(400px, 100%); .survey-thankyou-wrapper-inner { position: absolute; top: 0; left: 0; display: flex; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: center; .survey-thankyou-icon { width: 36%; max-height: 50%; margin-bottom: 1.5rem; } .survey-thankyou-title { margin-bottom: 1rem; text-align: center; } .survey-thankyou-subtitle { text-align: center; > * { text-align: center; } } } `,_=u.Z.div` .survey-question-text-wrapper { margin-bottom: 24px; .survey-question-title { margin-bottom: 4px; } .survey-question-subtitle, .survey-question-description { color: ${m.r.colors.gray500}; } } .survey-question-image { width: 100%; margin-bottom: 12px; border-radius: ${m.r.borderRadius}; } .survey-question-answer-wrapper { margin-bottom: 1.5rem; .survey-question-options-wrapper { display: grid; grid-gap: 0.5rem; grid-template-columns: 1fr; &[data-has-image='true'] { grid-gap: 0.8rem; grid-template-columns: 1fr 1fr; } .survey-question-option-item { label { color: #262626; font-size: 16px; font-style: normal; font-weight: normal; line-height: 24px; } } } .survey-contact-input { margin-bottom: 1rem; &:first-child { margin-top: 1rem; } label { font-weight: 700; } input { margin-top: 6px; } } } `,SurveyRadio=({size:e="small",label:t,name:r,checked:a,value:l,className:o,isDisabled:n=!1,onChange:s,hasImage:c,inputType:d,image:u})=>i.createElement(g,{"data-disabled":n,className:o,"data-size":e,"data-checked":a,onClick:()=>{s(l)},"data-has-image":c},c&&i.createElement("div",{className:"choice-image-wrapper"},u&&i.createElement("img",{src:u,loading:"lazy"})),i.createElement("label",{onClick:e=>{e.preventDefault()},htmlFor:`${r}-${l}`},t),i.createElement("input",{type:d,checked:a,name:r,id:`${r}-${l}`,value:l,readOnly:!0})),SurveyQuestionContent=({question:e,description:t,onOptionsChange:r,onTextOptionsChange:a,style:l,className:o})=>{let{type:u,title:m,subtitle:p,image:g,textOptions:v,options:E,name:h,is_multi_select:b}=e,y=!!(null==E?void 0:E.some(e=>e.image)),[f,T]=(0,i.useState)([]),[w,S]=(0,i.useState)(()=>(null==v?void 0:v.slice())||[]);return(0,i.useEffect)(()=>{r&&r(f.slice())},[!!r,f]),(0,i.useEffect)(()=>{a&&a(w)},[!!a,w]),i.createElement(_,{className:o,style:l},i.createElement("div",{className:"survey-question-text-wrapper"},m&&i.createElement(s.H,{"data-nosubtitle":!p,className:"survey-question-title",tag:"h4"},m),p&&i.createElement(n.T,{className:"survey-question-subtitle",size:"p2"},p),t&&i.createElement(n.T,{className:"survey-question-description",size:"p2"},t)),g&&i.createElement("img",{src:g,className:"survey-question-image",loading:"lazy"}),i.createElement("div",{className:"survey-question-answer-wrapper"},"radio"===u&&i.createElement("div",{"data-has-image":y,className:"survey-question-options-wrapper"},E.map(e=>{var t;return i.createElement(SurveyRadio,{inputType:"radio",label:e.label,name:h,key:`${h}-${e.value}`,checked:(null===(t=f[0])||void 0===t?void 0:t.value)===e.value,value:e.value,onChange:e=>{T([E.find(t=>t.value===e)])},className:"survey-question-option-item",image:e.image,hasImage:y})})),"checkbox"===u&&i.createElement("div",{"data-has-image":y,className:"survey-question-options-wrapper"},E.map(e=>i.createElement(SurveyRadio,{inputType:"checkbox",label:e.label,name:h,key:`${h}-${e.value}`,checked:!!f.find(t=>t.value===e.value),value:e.value,onChange:()=>{let t=f.findIndex(t=>t.value===e.value);t>=0?T(e=>(e.splice(t,1),e.slice())):b?T(t=>t.concat(e).slice()):T([e])},className:"survey-question-option-item survey-option-radio",image:e.image,hasImage:y}))),"textbox"===u&&w.map((e,t)=>e.isTextArea?i.createElement(d.T,{key:t,placeholder:e.placeholder,height:"150px",value:e.value,onChange:e=>S(r=>(r[t].value=e,r.slice()))}):i.createElement(c.I,{key:t,value:e.value,name:e.name,size:"md",className:"survey-contact-input",label:e.label,placeholder:e.placeholder,onChange:e=>{S(r=>(r[t].value=e,r.slice()))},type:e.type}))))};(a=l||(l={}))[a.UNLIMITED=0]="UNLIMITED",a[a.EXACT_NUMBER=1]="EXACT_NUMBER",a[a.RANGE=2]="RANGE";let SurveyQuestionCard=({className:e,headerText:t,style:r,question:a,termAndPolicyText:s,prevText:c,nextText:d,isContactForm:u,isDisableNext:m,isDisablePrev:g,onPrevClick:v,onNextClick:_,isSubmitButton:E,isButtonCenter:h,progress:b,descriptionText:y})=>{var f,T,w;let[S,C]=(0,i.useState)([]),{is_multi_select:k,multi_select_option:O,from:x,to:I}=a,N=null==a?void 0:a.type,A="checkbox"===N&&(null===(f=a.options)||void 0===f?void 0:f.length)&&(!S||0===S.length||k&&O===l.RANGE&&(S.lengthI)||k&&O===l.EXACT_NUMBER&&S.length!==x)||"radio"===N&&(null===(T=a.options)||void 0===T?void 0:T.length)&&(!S||0===S.length)||"textbox"===N&&(null===(w=a.textOptions)||void 0===w?void 0:w.length)&&(S.length!e.value)),L="number"==typeof b?b>1?1:b<0?0:Number(b.toFixed(2)):-1,R=(0,i.useRef)(null),reportValidity=()=>"textbox"!==N||R.current.reportValidity();return i.createElement(p,{className:e,style:r},i.createElement("div",{className:"survey-inner-wrapper"},t&&i.createElement("div",{className:"survey-header"},i.createElement(n.T,{className:"survey-header-text",size:"c2"},t)),i.createElement("form",{ref:R,onSubmit:e=>e.preventDefault()},i.createElement(SurveyQuestionContent,{question:a,description:y,onOptionsChange:e=>{C(e)},onTextOptionsChange:e=>{C(e)}})),u&&d&&i.createElement(o.B,{className:"survey-contact-submit",size:"lg",isDisabled:m||A,onClick:()=>reportValidity()&&_&&_(S)},d),s&&i.createElement("div",{className:"term-policy-container"},s),"number"==typeof b&&i.createElement("div",{className:"survey-progress-wrapper"},i.createElement("div",{className:"survey-progress",style:{transform:`scaleX(${L})`}})),(c||d)&&i.createElement("div",{"data-center":h,className:"survey-button-wrapper"},c&&i.createElement(o.B,{className:"survey-prev-button",size:"lg",color:g?"primary":"secondary",isDisabled:g,icon:i.createElement("svg",{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none"},i.createElement("path",{d:"M2.44677 4.99999L5.31252 2.13424C5.62302 1.82374 5.62302 1.31974 5.31252 1.00924C5.00202 0.698742 4.49802 0.698742 4.18752 1.00924L0.727018 4.46974C0.433768 4.76299 0.433768 5.23774 0.727018 5.53024L4.18752 8.99074C4.49802 9.30124 5.00202 9.30124 5.31252 8.99074C5.62302 8.68024 5.62302 8.17624 5.31252 7.86574L2.44677 4.99999Z",fill:g?"#fff":"#2D87F3"})),onClick:v},c),!u&&d&&i.createElement(o.B,{onClick:()=>reportValidity()&&_&&_(S),className:"survey-next-button",size:"lg",isDisabled:m||A},d," ",E?void 0:i.createElement("svg",{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none"},i.createElement("path",{d:"M3.80322 5.19994L0.937465 2.33419C0.626965 2.02369 0.626965 1.51969 0.937465 1.20919C1.24796 0.898693 1.75196 0.898693 2.06246 1.20919L5.52297 4.66969C5.81622 4.96294 5.81622 5.43769 5.52297 5.73019L2.06246 9.19069C1.75196 9.50119 1.24796 9.50119 0.937465 9.19069C0.626965 8.88019 0.626965 8.37619 0.937465 8.06569L3.80322 5.19994Z",fill:"#ffffff"}))))))},SurveyThankyouCard=({thankyou:e,thankyouSubtitle:t,className:r,style:a})=>i.createElement(p,{className:r,style:a},i.createElement("div",{className:"survey-inner-wrapper"},i.createElement(v,null,i.createElement("div",{className:"survey-thankyou-wrapper-inner"},i.createElement("svg",{viewBox:"0 0 122 122",fill:"none",className:"survey-thankyou-icon"},i.createElement("path",{d:"M61.5 122c33.137 0 60-26.863 60-60S94.637 2 61.5 2s-60 26.863-60 60 26.863 60 60 60Z",fill:m.r.colors.primary50}),i.createElement("ellipse",{cx:"61.5",cy:"110.36",rx:"48",ry:"3.36",fill:"#91CAFF"}),i.createElement("path",{d:"M82.905 72.666H101.5L87.597 40H35.403L21.5 72.666h18.595V91H83.08l-.174-18.334Z",fill:"#2C74DF"}),i.createElement("path",{d:"M74.4 15H39.863a5.364 5.364 0 0 0-5.363 5.363v52.214a5.364 5.364 0 0 0 5.363 5.363h43.273a5.364 5.364 0 0 0 5.363-5.363V21a6 6 0 0 0-6-6H74.4Z",fill:"#fff"}),i.createElement("path",{d:"M88.853 80.108H34.147a4.055 4.055 0 0 1-4.087-4.074v-10.65c0-2.27 1.81-4.074 4.087-4.074h54.706a4.055 4.055 0 0 1 4.087 4.074v10.65c0 2.27-1.81 4.074-4.087 4.074Z",fill:"#E4E8EC"}),i.createElement("path",{d:"M90.838 85.451H32.162a4.055 4.055 0 0 1-4.087-4.074v-10.65c0-2.27 1.81-4.074 4.087-4.074H90.78a4.055 4.055 0 0 1 4.087 4.074v10.65c.058 2.27-1.81 4.074-4.029 4.074Z",fill:"#fff"}),i.createElement("path",{d:"M103.748 75.492v30.263c0 1.92-1.576 3.492-3.503 3.492H23.003c-1.927 0-3.503-1.572-3.503-3.492V75.492c0-1.92 1.576-3.492 3.503-3.492h19.384c1.926 0 3.503 1.571 3.503 3.492v5.354c0 .35.233.582.584.582h30.3c.351 0 .585-.233.585-.582v-5.354c0-1.92 1.576-3.492 3.503-3.492h19.383c1.927 0 3.503 1.571 3.503 3.492Z",fill:"#45A4FF"}),i.createElement("path",{stroke:"#2C74DF",d:"M51.954 91.377v3.084c0 1.63 1.285 2.91 2.92 2.91h12.844c1.635 0 2.92-1.28 2.92-2.91v-3.084"}),i.createElement("path",{d:"M120.5 38.025c-2-.246-3.25 1.352-2.375 3.195l.25.737c.75 1.844-.375 3.441-2.375 3.195l-.75-.123c-2-.245-3.25 1.352-2.375 3.195l.375.738c.75 1.843-.375 3.44-2.375 3.195l-.75-.123c-1.5-.123-2.625.737-2.625 1.966",stroke:"#FE921D"}),i.createElement("path",{d:"M1.533 62c-.269 1.413 1.142 2.337 2.82 1.848l.672-.218c1.678-.543 3.089.38 2.82 1.848l-.134.544c-.269 1.413 1.141 2.337 2.82 1.848l.671-.218c1.68-.543 3.09.38 2.82 1.848l-.134.543c-.201 1.087.538 1.848 1.612 1.957M118 92a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM82 3.187l1.188 4.348 4.347-1.188L86.347 2 82 3.187Z",stroke:"#00B16A"}),i.createElement("path",{stroke:"#FE921D",d:"M17 28a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"}),i.createElement("path",{d:"M61.5 26.667c-7.364 0-13.333 5.97-13.333 13.333 0 7.364 5.969 13.333 13.333 13.333S74.833 47.364 74.833 40 68.864 26.667 61.5 26.667Zm7.61 10.276-9.334 9.333a1.33 1.33 0 0 1-1.885 0l-4-4a1.332 1.332 0 1 1 1.885-1.885l3.057 3.057 8.391-8.39a1.332 1.332 0 1 1 1.885 1.885Z",fill:"#00CB8A"})),e&&i.createElement(s.H,{className:"survey-thankyou-title",tag:"h3"},e),t&&i.createElement(n.T,{className:"survey-thankyou-subtitle",size:"p3"},t)))))},IQVP:function(e,t,r){r.d(t,{D9:function(){return i},qf:function(){return o},tC:function(){return l},yy:function(){return a}});let a={BASE_API_PATH:"/",PROFILE:"profile?website_url={website_url}",SEARCH_USER:"profile/search?website_url={website_url}&name={name}",FETCH_PREVIEW:"fetch/preview?website_url={website_url}",FETCH_POST_OR_TOPIC:"fetch/{slug}?website_url={website_url}&community_slug={communitySlug}",POST:{LIST:"post?website_url={website_url}&slug={slug}&pin={pin}&page={page}&community_id={communityId}&topic_id={topicId}&sort_by={sort}&id={id}",DETAIL_BY_ID_OR_SLUG:"post/{idSlug}?website_url={website_url}",CREATE:"post/create?website_url={website_url}",LIKE:"post/{id}/like?website_url={website_url}",DELETE:"post/{id}/delete?website_url={website_url}",REPORT:"post/{id}/report?website_url={website_url}",UPDATE:"post/{id}/update?website_url={website_url}",FOLLOW:"post/{id}/follow?website_url={website_url}",CREATE_ARTICLE_COMMENT:"article-comment/create?website_url={website_url}"},COMMENT:{LIST:"comment?website_url={website_url}&post_id={postId}&page={page}&sort_by={sort}&items_per_page={perPage}&_without_reply={withoutReply}",CREATE:"comment/create?website_url={website_url}",REPLY:"comment/reply?website_url={website_url}",DELETE:"comment/{id}/delete?website_url={website_url}",LIKE:"comment/{id}/like?website_url={website_url}",UNLIKE:"comment/{id}/unlike?website_url={website_url}",IMAGE_UPLOAD:"comment/image/upload?website_url={website_url}"},COMMUNITY:{LIST:"community?website_url={website_url}&page={page}&items_per_page={pageSize}",DETAIL_BY_ID_OR_SLUG:"community/{idSlug}?website_url={website_url}",JOIN:"community/join?website_url={website_url}",LEAVE:"community/leave?website_url={website_url}",GET_UNCATEGORIZED:"community/uncategorized?website_url={website_url}"},TOPIC:{LIST:"topic?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}&page={page}&items_per_page={pageSize}&topic_in={topic_in}",DETAIL_BY_ID_OR_SLUG:"topic/{idSlug}?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}",HEALTH_TOOLS:"tools?topic_id={topicId}&website_url={website_url}",SUBOTS:"subots?topic_id={topicId}&website_url={website_url}",SUGGESTED_POSTS:"suggested-posts?topic_id={topicId}&website_url={website_url}&page={page}",JOIN:"topic/join?website_url={website_url}",LEAVE:"topic/leave?website_url={website_url}"},BOOKMARK:{LIST:"bookmark?user_id={userId}&website_url={website_url}",CREATE:"bookmark/create?website_url={website_url}",DELETE:"bookmark/delete?website_url={website_url}"},UPLOAD_IMAGE:"auth/comment/image/upload?website_url={website_url}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",USER:{DETAIL:"profile/user/detail?website_url={website_url}&user_id={id}",COUNT_TABS:"profile/user/counting?website_url={website_url}&user_id={id}&total_post={post}&total_comment={comment}&total_community={community}&total_reply={reply}&total_question={question}",LIST_POST:"profile/user/posts?website_url={website_url}&user_id={id}&is_anonymous={isAnonymous}&paging=none",LIST_QUESTION_NEED_REPLY:"questions/no-reply?website_url={website_url}",LIST_QUESTION:"question/{id}?website_url={website_url}&is_reply={isReply}&is_question={isQuestion}&is_ignore={isIgnore}&group_by={groupBy}",SKIP_QUESTION:"questions/ignore?website_url={website_url}&question_id={id}",LIST_ANSWERS:"replied/{id}?website_url={website_url}&paging=1&items_per_page={pageSize}"},HEALTH_TOOL:{CREATE:"health-profile/{type}/create?website_url={website_url}",GET_STATUS:"health-profile/get-status-for-user?website_url={website_url}"},CHATBOT:{PROFILE:"chatbox/get-profile?website_url={website_url}",FAQS_LIST:"chatbox/get-faq?website_url={website_url}",GET_SUGGEST_COMMUNITY:"v2/community/topic"}},l={GET_DOCTOR_INFO:"api/doctors/{doctorId}?site={website_url}",GET_HOSPITAL_INFO:"api/hospital/branch/{hospital_branch_id}?site={website_url}"},i={BASE_API_PATH:"/",GET_SEARCH_ARTICLES:"search?s={keyword}&page={page}",GET_ALL_CATEGORIES:"categories?type=all",GET_HOMEPAGE_POSTS:"home/trending-post?type={type}",GET_HOMEPAGE_LATEST_POSTS:"articles?page=1&_islatest=1",GET_ARTICLE_DETAIL:"article/{slug}?skip_ids={skipIds}&_isrelated={isRelated}",GET_CATEGORY_DETAIL:"category/{slug}",GET_CATEGORY_OR_ARTICLE_DETAIL:"fetch/{fullSlug}",GET_PREVIEW_ARTICLE:"fetch/{fullSlug}?preview_nonce={nonce}&preview=true",GET_ARTICLE_OF_CATEGORY:"articles?category_id={categoryId}&page={currentPage}",GET_PAGE_STATIC:"page/{slug}",GET_ALL_HEALTH_TOOLS:"healthtools",GET_ALL_MARRYBABY_HEALTH_TOOLS:"health-tools",GET_HEALTH_TOOLS_BY_CATEGORY:"healthtools?_hasgroup=1",GET_AUTHOR:"author/{slug}",GET_ALL_EXPERTS:"experts",GET_ALL_EXPERTS_PAGING:"experts?page={page}",GET_EXPERT:"expert/{slug}",GET_EXPERT_POST:"expert/article?page={page}",POST_ARTICLE_FEEDBACK:"article/feedback/{id}",GET_AZ_DRUGS:"category/a-z/{category}",GET_HOMEPAGE_MEDICAL_REVIEWED:"home/medical-reviewed",GET_ARTICLES_BY_IDS:"articles?ids={ids}",GET_ARTICLE_OF_CATEGORY_NO_EXPLAINERS:"articles?category_id={categoryId}&page={currentPage}&skip_ids={ids}",GET_EXPERT_OF_CATEGORY:"category/expert/?id={id}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",GET_DUE_DATE_ALL_WEEKS:"health-tools/due-date-calculator/all",GET_DUE_DATE_SUGGESTED_ARTICLES:"health-tools/due-date-calculator/result?from_week={from}&to_week={to}",GET_PROFILE:"user/profile",GET_ADMIN_PROFILE:"GET_ADMIN_PROFILE",GET_FEATURE:"feature",POST_NEW_FEATURE:"feature/update",CREATE_BOOKMARK:"bookmark/create",DELETE_BOOKMARK:"bookmark/delete",DELETE_ALL_BOOKMARK:"bookmark/delete-all",GET_ALL_BOOKMARK:"bookmark",SSO_USER_PROFILE:"user",SSO_USER_BOOKMARKS:"user/bookmarks",SSO_USER_PASSWORD:"user/settings/password",SSO_USER_EMAIL:"user/settings/update-email",SSO_CLOSE_ACCOUNT:"user/settings/close-account",SSO_HELP:"user/settings/help",GET_HEALTH_TOOL_OVULATION_INFO:"health-tools/ovulation-calculator/info",GET_HEALTH_TOOL_OVULATION_SUGGESTED_ARTICLES:"health-tools/ovulation-calculator/result?method={method}",GET_HEALTH_TOOL_BMI_INFO:"health-tools/bmi-calculator/info",GET_HEALTH_TOOL_BMI_RESULT:"health-tools/bmi-calculator/result?gender={gender}&bmi={bmi}&age={age}",GET_HEALTH_TOOL_BMR_INFO:"health-tools/bmr-calculator/info",GET_HEALTH_TOOL_BMR_RESULT:"health-tools/bmr-calculator/result?kcals={kcals}&gender={gender}&age={age}",GET_HEALTH_TOOL_PWG_INFO:"health-tools/preweight-gain-calculator/info",GET_HEALTH_TOOL_THR_INFO:"health-tools/target-heart-rate/info",GET_HEALTH_TOOL_BABY_GROWTH_INFO:"health-tools/baby-growth-tracking/info",POST_UPDATE_LOCATION:"tracking/geo/",GET_SIDIS_DUE_DATE:"frontend/tools/due_date",GET_SIDIS_OVULATION:"frontend/tools/ovulation",GET_SIDIS_BMI:"frontend/tools/bmi",GET_SIDIS_BMR:"frontend/tools/bmr",POST_LOGOUT:"user/logout",OVULATION_CREATE_EVENT:"ovulation/event?method={method}&day={day}&cycle={cycle}&period={period}&token={token}&user_id={user_id}",GET_ALL_SPOTLIGHT:"spotlights?per_page={perPage}&order_by={orderBy}",SSO_UPDATE_FIRST_TIME_BOOKMARK:"bookmark/update-first-time",POST_COMMENT_NOTIFICATION:"comment/notification",GET_ABOUT_US_DATA:"about",POST_LEAD_IMPRESSION:"campaign/{campaignCode}/impression",POST_LEAD_POPUP_EXIT:"campaign/{campaignCode}/popup_exit",POST_LEAD_LEAD:"campaign/{campaignCode}/lead",POST_SSO_VERIFY_TOKEN:"verify-id-token",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",FETCH_URL_DATA:"preview",GET_SPOTLIGHT_LANDING:"spotlight/{slug}",GET_FOOTER_INFO:"footer",CHECK_SSO_EMAIL:"member/check-email",GET_HOMEPAGE_SITEWIDE_BANNER:"home/sitewide-banner",GET_DYNAMIC_FOOTER:"menu/footer",GET_EXPERTS:"experts?page={page}&number={perPage}&s={search}",GET_EXPERT_BY_ID:"expert/{id}"},o={SEARCH_USER:"admin/profile/search?website_url={website_url}&name={name}",COMMENT:{IMAGE_UPLOAD:"admin/comment/image/upload?website_url={website_url}"}}},aUqw:function(e,t,r){r.r(t),r.d(t,{ProfileDetail:function(){return a.a},TabDataInit:function(){return a.b},TabName:function(){return a.T},UserType:function(){return a.U}}),r("q1tI"),r("Wgwc");var a=r("6vOy");r("NmYn"),r("gY0P"),r("rBCA"),r("xXM3"),r("QgiU")},r1A1:function(e,t,r){r.d(t,{T:function(){return l}});var a=r("q1tI");let l=(0,a.createContext)(null)},RHWi:function(e,t,r){r.d(t,{t:function(){return v}}),r("q1tI");var a=r("28jV"),l=r("GSig"),i=r("2mZo"),o=r("pTQe"),n=r("9N6U"),s=r("/VDm"),c=r("ksTz"),d=r("fjxZ"),u=r("dtCp"),m=r("ycZd"),p=r("LdxM"),g=r("oJoJ");let v={"en-PH":a.ZP,"vi-VN":u.ZP,"hi-IN":l.ZP,"id-ID":i.ZP,"ms-MY":n.ZP,"my-MM":s.ZP,"km-KH":o.ZP,"zh-TW":g.ZP,"zh-SG":p.ZP,"th-TH":c.ZP,"tl-PH":d.ZP,"vi-VN_MB":m.ZP}},I8Ab:function(e,t,r){r.d(t,{C:function(){return CardReactions},L:function(){return LabelSortPin},T:function(){return TagTopic},a:function(){return LabelPin},b:function(){return TreePopoverMenu},c:function(){return l}});var a,l,i=r("usZY"),o=r("q1tI"),n=r("FQi+"),s=r("xt28"),c=r("Eso5"),d=r("/npG"),u=r("EoE9"),m=r("srUE"),p=r("iBNF"),g=r("pvoY"),v=r("D0kt"),_=r("XAIn"),E=r("25AQ"),h=r("e6f9"),b=r("rBCA"),y=r("6Dmq"),f=r("pg9j");let T=(0,o.createContext)({});var w={wrapper:"vvR-m49"};let LikeWrapper=e=>{var{children:t,className:r=""}=e,a=(0,i._)(e,["children","className"]);let{isReplied:l,trackingCategory:n,trackingLabel:s,onLikeClick:d}=(0,o.useContext)(T);return o.createElement(c.x,Object.assign({className:`${w.wrapper} ${r}`,"data-event-category":n,"data-event-action":l?"Like Comment Click":"Like Post Click","data-event-label":s},a,{onClick:()=>{null==d||d()}}),t)},ShareWrapper=e=>{var{children:t,className:r=""}=e,a=(0,i._)(e,["children","className"]);let{trackingCategory:l,trackingLabel:n,onShareClick:s}=(0,o.useContext)(T);return o.createElement(c.x,Object.assign({className:`${w.wrapper} ${r}`,"data-event-category":l,"data-event-action":"Share Icon Click","data-event-label":n},a,{onClick:()=>{null==s||s()}}),t)},CommentWrapper=e=>{var{children:t,className:r=""}=e,a=(0,i._)(e,["children","className"]);let{isReplied:l,trackingCategory:n,trackingLabel:s,onCommentClick:d}=(0,o.useContext)(T);return o.createElement(c.x,Object.assign({className:`${w.wrapper} ${r}`,"data-event-category":n,"data-event-action":l?"Reply Comment Click":"Comment Text Click","data-event-label":s},a,{onClick:e=>{e.preventDefault(),e.stopPropagation(),null==d||d()}}),t)},SaveWrapper=e=>{var{children:t,className:r=""}=e,a=(0,i._)(e,["children","className"]);let{trackingCategory:l,trackingLabel:n,onSaveClick:s}=(0,o.useContext)(T);return o.createElement(c.x,Object.assign({className:`${w.wrapper} ${r}`,"data-event-category":l,"data-event-action":"Save Post Click","data-event-label":n},a,{onClick:e=>{e.preventDefault(),e.stopPropagation(),null==s||s()}}),t)};var S={wrapper:"UhiT4m5",inner:"oEfeTkV",iconTxt:"_9GXHCn3",clickableIcon:"HCsrR0N",labelReaction:"Ierg-Fq",actions:"_674BTR4",statistical:"XlkglSM",releatedStatistical:"KyekKc3",statisticalNoAction:"TTfvZpR"};(a=l||(l={}))[a.post=1]="post",a[a.reply=2]="reply";let CardReactions=e=>{var{type:t,viewCount:r=0,loveCount:a=0,replyCount:c=0,replyPadding:d,liked:u,isReplied:g,isSaved:E,onCommentClick:h,onLikeClick:b,onShareClick:y,onSaveClick:f,onGoToUrl:w,className:C,style:k,showingMostEngaging:O,isMarryBaby:x,hasShare:I=!0,hasSave:N=!0,hasActionStatistical:A=!0,hasShowAction:L=!0,isReleatedPost:R=!1,isVertical:P=!1,trackingCategory:D="Together",trackingLabel:M="",children:U}=e,G=(0,i._)(e,["type","viewCount","loveCount","replyCount","replyPadding","liked","isReplied","isSaved","onCommentClick","onLikeClick","onShareClick","onSaveClick","onGoToUrl","className","style","showingMostEngaging","isMarryBaby","hasShare","hasSave","hasActionStatistical","hasShowAction","isReleatedPost","isVertical","trackingCategory","trackingLabel","children"]);let{data:{env:{isMarryBaby:F}}}=(0,o.useContext)(_.T),B=x||F,{t:H}=(0,n.u)(),{isMobile:z}=(0,v.u)(),$=(0,o.useMemo)(()=>r>0||c>0,[r,c]),j=(0,o.useMemo)(()=>r>0||a>0||c>0,[r,a,c]),W=(0,o.useCallback)(()=>o.createElement("div",{className:`${S.releatedStatistical} ${A?"":S.statisticalNoAction} session-statistical`},o.createElement("div",{className:"releated-post-statistical"},o.createElement(m.T,{size:"p3",className:S.iconTxt,as:"div",onClick:()=>{A&&(null==w||w())}},r>0&&o.createElement(o.Fragment,null,o.createElement(s.I.Eye,{size:18,isMarryBaby:B}),o.createElement("div",{className:S.labelReaction},r))),o.createElement(m.T,{size:"p3",className:S.iconTxt,as:"div",onClick:()=>{A&&(null==w||w(c>0?"":"?action=comment"))}},o.createElement("div",{className:S.labelReaction},c>0?H("comment.count",{count:c}):H("comment.now"))))),[$,A,B,r,c]),Z=(0,o.useCallback)(()=>j?o.createElement("div",{className:`${S.statistical} ${A?"":S.statisticalNoAction} session-statistical`},o.createElement(m.T,{size:"p3",className:S.iconTxt,as:"div",onClick:()=>{A&&(null==w||w())}},r>0&&o.createElement(o.Fragment,null,o.createElement(s.I.Eye,{size:18,isMarryBaby:B}),o.createElement("div",{className:S.labelReaction},r))),z||P?o.createElement("div",{className:"wrapper-list-statistical"},a>0?o.createElement(m.T,{className:S.iconTxt,size:"p3",as:"div",onClick:()=>{A&&(null==w||w())}},o.createElement("div",{className:S.labelReaction},a," ",H("cardReactions.like"))):o.createElement("div",null),c>0&&o.createElement(m.T,{size:"p3",className:S.iconTxt,as:"div",onClick:()=>{A&&(null==w||w())}},o.createElement("div",{className:S.labelReaction},c," ",H("cardReactions.comment")))):o.createElement(o.Fragment,null,a>0?o.createElement(m.T,{className:S.iconTxt,size:"p3",as:"div",onClick:()=>{A&&(null==w||w())}},o.createElement(s.I.Heart,{isMarryBaby:B,isSolid:!1,size:18,color:"#737373"}),o.createElement("div",{className:S.labelReaction},a)):o.createElement("div",null),c>0&&o.createElement(m.T,{size:"p3",className:S.iconTxt,as:"div",onClick:()=>{A&&(null==w||w())}},o.createElement(s.I.Comment,{size:18,className:"txt-icon",isMarryBaby:B}),o.createElement("div",{className:S.labelReaction},c)))):"",[j,A,B,z,r,a,c]);return o.createElement(T.Provider,{value:{liked:u,loveCount:a,trackingCategory:D,trackingLabel:M,isReplied:g,onLikeClick:b,onShareClick:y,onCommentClick:h,onSaveClick:f}},U||o.createElement("div",Object.assign({className:`${S.wrapper} ${C}`,"data-show-most-engaging":O,"data-type":t===l.post?"post":"reply","data-reply-padding":t===l.reply&&d,"data-is-marrybaby":B,style:k},G),o.createElement("div",{className:`${S.inner} ${P?"direction-vertical":""}`},L&&o.createElement("div",{className:`${S.actions} session-action`},o.createElement(LikeWrapper,{className:`${S.clickableIcon} wrapper-action`},o.createElement(m.T,{className:S.iconTxt,size:"p3",as:"div"},o.createElement(s.I.Heart,{isMarryBaby:B,isSolid:u,size:18,color:u?B?p.r.mbColors.pink:p.r.colors.red800:"#737373"}),o.createElement("div",{className:S.labelReaction},H("cardReactions.like")))),I&&o.createElement(ShareWrapper,{className:`${S.clickableIcon} wrapper-action`},o.createElement(m.T,{size:"p3",className:S.iconTxt,as:"div"},o.createElement(s.I.Share,{size:18,isMarryBaby:B}),o.createElement("div",{className:S.labelReaction},H("share.title")))),N&&o.createElement(SaveWrapper,{className:`${S.clickableIcon} wrapper-action`},o.createElement(m.T,{size:"p3",className:S.iconTxt,as:"div"},E?o.createElement(s.I.Bookmark,{size:18,isMarryBaby:B,color:B?"#3E3F58":"#737373"}):o.createElement(s.I.Save,{size:18,isMarryBaby:B,color:B?"#3E3F58":"#737373"}),o.createElement("div",{className:S.labelReaction},E?H("cardReactions.unSave"):H("cardReactions.save")))),o.createElement(CommentWrapper,{className:`${S.clickableIcon} wrapper-action`},o.createElement(m.T,{size:"p3",className:S.iconTxt,as:"div"},o.createElement(s.I.Comment,{size:18,className:"txt-icon",isMarryBaby:B}),o.createElement("div",{className:S.labelReaction},H("cardReactions.comment"))))),R?W():Z())))};CardReactions.LikeWrapper=LikeWrapper,CardReactions.ShareWrapper=ShareWrapper,CardReactions.CommentWrapper=CommentWrapper;let C=(0,d.k)(e=>({wrapper:{display:"flex",flexWrap:"wrap",width:"100%",padding:"0.5rem 0",gap:"0.5rem"},item:{position:"relative",whiteSpace:"nowrap",padding:"5px 12px",background:e.colors.gray[0],borderRadius:"2rem",cursor:"pointer","-webkit-user-drag":"none",userSelect:"none",textDecoration:"none","*":{pointerEvents:"none"},"&:first-child":{marginLeft:0}},text:{}})),TagTopic=e=>{var{topics:t=[],onClick:r,className:a,style:l,trackingCategory:s="Together",locale:c="vi-VN",classNames:d,styles:p,unstyled:g,shortenedNumber:v=3,shortenedStyle:b}=e,y=(0,i._)(e,["topics","onClick","className","style","trackingCategory","locale","classNames","styles","unstyled","shortenedNumber","shortenedStyle"]);let{t:f}=(0,n.u)(),{classes:T}=C(void 0,{name:"TagTopic",classNames:d,styles:p,unstyled:g}),{data:{env:{togetherBasePath:w}},action:{sanitizeFunction:S}}=(0,o.useContext)(_.T),[k,O]=(0,o.useState)(!b);return o.createElement("div",Object.assign({onClick:r,className:`${T.wrapper} ${a}`,style:l},y),(k?t:t.slice(0,v)).map((e,t)=>{let r=(null==e?void 0:e.dueDateMonth)&&(null==e?void 0:e.dueDateMonth)!==0&&(null==e?void 0:e.dueDateYear)&&(null==e?void 0:e.dueDateYear)!==0;return o.createElement("a",{className:T.item,key:t,"data-event-category":s,"data-event-action":"Topic in Post Click","data-event-label":`${(0,_.k)(c)}${w}${e.url}`,href:e.isActive&&!e.isHidden?`${w}${e.url}/`:void 0},o.createElement(m.T,{size:"p4"},o.createElement("span",{style:Object.assign({},r&&{textTransform:"capitalize"}),dangerouslySetInnerHTML:{__html:r?`${(0,E.Z)(new Date(2020,Number(e.dueDateMonth)-1,1),"MMMM",{locale:u.j[c]})}${c===h.L.Vietnam?"/":" "}${null==e?void 0:e.dueDateYear}`:(null==S?void 0:S(e.name))||e.name}})))}),!k&&t.length>v&&o.createElement("a",{className:T.item,href:"#",onClick:e=>{e.preventDefault(),O(!0)}},o.createElement(m.T,{size:"p4"},"+",f("tagTopic.moreTopics",{number:t.length-v}))))},k=b.Z.div` display: flex; align-items: center; justify-content: space-between; padding: 16px; cursor: pointer; &[data-color='gray'] { background: ${p.r.colors.neutral50}; } &[data-color='white'] { border-bottom: 1px solid #e4e8ec; background: ${p.r.colors.white}; } .popover-menu__btn { display: flex; min-width: 2rem; height: 2rem; align-items: center; padding: 8px 0 !important; border: none; margin-left: 0.5rem; background: transparent; > span { display: flex; align-items: center; } &:hover { background: transparent !important; } } &.label-pinned { border-radius: ${p.r.borderRadius} 6px 0 0; .label-sort-pin-icon { width: 16px; height: 16px; vertical-align: middle; } } &[data-is-marrybaby='true'] { padding: 0.75rem 1rem; border-radius: 16px 16px 0px 0px; &[data-color='white'] { border-bottom: none; } &[data-color='gray'] { background: #f3f3f3; } .popover-menu__btn { width: unset; } &.label-pinned { border-bottom: none; background: #fff9eb; border-radius: 1rem 1rem 0 0; .label-sort-pin-icon { margin-right: 8px; } .label-sort-pin-heading { color: #fb8c00; } } &.label-sorting { ${g.M.tdUp} { padding-bottom: 1.5rem; margin-bottom: -0.75rem; } } } `,LabelSortPin=({label:e,rightLabel:t,onClick:r,color:a,className:l,style:i})=>{let{data:{env:{isMarryBaby:n}}}=(0,o.useContext)(_.T);return o.createElement(k,{"data-is-marrybaby":n,"data-color":a,onClick:r,className:l,style:i},o.createElement(m.T,{className:"label-sort-pin-heading",size:n?"p4":"p3",weight:"bold"},e),t)},LabelPin=({onClick:e,color:t,className:r,style:a})=>{let{data:{env:{isMarryBaby:l}}}=(0,o.useContext)(_.T),{t:i}=(0,n.u)();return o.createElement(LabelSortPin,{label:o.createElement(o.Fragment,null,l&&o.createElement("img",{className:"label-sort-pin-icon",src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%23FB8C00' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m3.5 20 4.37-4.37'/%3e%3cpath stroke='%23FB8C00' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M4.956 11.294a1 1 0 0 0 0 1.414l2.918 2.918 2.918 2.918a1 1 0 0 0 1.414 0l1.175-1.175a1 1 0 0 0 .293-.707v-3.936l2.9-2.9 2.31.123c.282.015.56-.091.76-.291l.573-.574a1 1 0 0 0 0-1.414l-4.386-4.386a1 1 0 0 0-1.414 0l-.574.574a1 1 0 0 0-.29.76l.122 2.309-2.9 2.9H6.838a1 1 0 0 0-.707.293z' clip-rule='evenodd'/%3e%3cpath stroke='%23FB8C00' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m16.57 9.83-2.9-2.9'/%3e%3c/svg%3e",loading:"lazy"})," ",i("label.pinnedPost")),rightLabel:!l&&o.createElement("img",{className:"label-sort-pin-icon",src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23FEA21E' stroke-linecap='round' d='m7.186 7.682-3.504 6.132'/%3e%3cpath fill='%23FEA21E' stroke='%23FEA21E' stroke-linejoin='round' stroke-width='.5' d='M3.246 7.784a.25.25 0 0 0 .091.342l5.447 3.145a.25.25 0 0 0 .342-.092 3.39 3.39 0 0 0 .11-3.186l1.622-2.808a2.66 2.66 0 0 0 1.606-1.239.25.25 0 0 0-.092-.341l-4.19-2.42a.25.25 0 0 0-.341.092 2.66 2.66 0 0 0-.27 2.01L5.949 6.095a3.39 3.39 0 0 0-2.703 1.69Z'/%3e%3c/svg%3e",loading:"lazy"}),onClick:e,color:"white",className:`label-pinned ${r}`,style:a})},TreePopoverMenu=e=>{var{data:t}=e,r=(0,i._)(e,["data"]);return o.createElement(f.P,Object.assign({},r),({setShow:e})=>o.createElement(Tree,{data:t,setShow:e}))},getCurrentDataFromPath=(e,t)=>{let r=t.split("."),a=e;return r.forEach(e=>{var t,r;e&&a&&(null==a?void 0:a.type)==="list"&&(a=null===(r=null===(t=null==a?void 0:a.list)||void 0===t?void 0:t[Number(e)])||void 0===r?void 0:r.subTree)}),a},Tree=({data:e,setShow:t})=>{var r;let[a,l]=(0,o.useState)(""),i=(0,o.useMemo)(()=>e&&getCurrentDataFromPath(e,a),[e,a]);if(!e||!i)return null;let handleItemClick=(e,{subTree:r,onClick:a=()=>null})=>{a&&a(),r?l(t=>t.split(".").concat(String(e)).join(".")):t&&t(!1)};return o.createElement(f.S,null,i.isShowheader?o.createElement("div",{className:"__header"},a?o.createElement("img",{className:"__back-btn",src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%23262626' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='m15 18-6-6 6-6'/%3e%3c/svg%3e",onClick:()=>l(e=>e.split(".").slice(0,-1).join(".")),loading:"lazy"}):null,i.title?o.createElement(y.H,{className:"__title",tag:"h6"},i.title):null):null,i.description?o.createElement(m.T,{className:"tree-text-description",color:p.r.colors.gray600,size:"p3",weight:"regular"},i.description):null,o.createElement("div",{className:"__content"},"jsx"===i.type?null===(r=null==i?void 0:i.jsxRenderer)||void 0===r?void 0:r.call(i,t):null,"list"===i.type?o.createElement("ul",{className:"__list"},Array.isArray(i.list)?i.list.map((e,t)=>o.createElement("li",{key:t,style:e.style,className:`__item ${e.className}`}," ",o.createElement("div",{className:`__btn ${e.selected?"--checked":""}`,onClick:()=>handleItemClick(t,e),"data-event-category":e.dataEventCategory,"data-event-action":e.dataEventAction,"data-event-label":e.dataEventLabel},e.icon&&o.createElement("img",{className:"__icon",src:e.icon,loading:"lazy"}),o.createElement("span",null,e.label)),e.subTree?o.createElement("img",{className:"__toggle",src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 12 4-4-4-4'/%3e%3c/svg%3e",loading:"lazy"}):null,e.selected?o.createElement("img",{className:"__toggle",src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%238C8C8C' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M13.333 4 6 11.333 2.667 8'/%3e%3c/svg%3e",loading:"lazy"}):null)):null):null))}},usZY:function(e,t,r){function __rest(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r}function __awaiter(e,t,r,a){return new(r||(r=Promise))(function(l,i){function fulfilled(e){try{step(a.next(e))}catch(e){i(e)}}function rejected(e){try{step(a.throw(e))}catch(e){i(e)}}function step(e){var t;e.done?l(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(fulfilled,rejected)}step((a=a.apply(e,t||[])).next())})}r.d(t,{_:function(){return __rest},a:function(){return __awaiter}})},"9kCu":function(e,t,r){r.d(t,{t:function(){return o},w:function(){return a}}),(l=i||(i={}))[l.SPECIALTY=1]="SPECIALTY",l[l.DOCTOR=2]="DOCTOR",l[l.CLINIC=3]="CLINIC",l[l.SERVICE=4]="SERVICE";let a=["mon","tue","wed","thu","fri","sat","sun"];var l,i,o=Object.freeze({__proto__:null,get RedirectType(){return i},workingDays:a})},"/YKb":function(e,t,r){r.d(t,{t:function(){return a}});var a=Object.freeze({__proto__:null})}}]);