"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[137],{ZQ3V:function(e,t,r){r.d(t,{T:function(){return c}});var a=r("6eqW"),o=r("q1tI"),n=r("/npG"),l=r("8vDj"),i=r("TIp3"),s=r("LeBD"),d=(0,n.k)((e,t)=>{var r,a,o,n,l,i,d,c,u,p;let g=s.a[null==t?void 0:t.customStylesType]||s.a[s.C.NONE],m=null===(r=g.fontSize[null==t?void 0:t.size])||void 0===r?void 0:r[0],h=null===(a=g.lineHeight[null==t?void 0:t.size])||void 0===a?void 0:a[0],b=null!==(l=null===(n=null===(o=g.letterSpacing)||void 0===o?void 0:o[null==t?void 0:t.size])||void 0===n?void 0:n[0])&&void 0!==l?l:0,v=null===(i=g.fontSize[null==t?void 0:t.size])||void 0===i?void 0:i[1],f=null===(d=g.lineHeight[null==t?void 0:t.size])||void 0===d?void 0:d[1],x=null!==(p=null===(u=null===(c=g.letterSpacing)||void 0===c?void 0:c[null==t?void 0:t.size])||void 0===u?void 0:u[1])&&void 0!==p?p:0;return{root:Object.assign({},(null==t?void 0:t.size)&&{fontWeight:(null==t?void 0:t.as)==="label"?s.F.semiBold:g.fontWeight[t.weight]||g.fontWeightBySize[null==t?void 0:t.size]||s.F.regular,fontSize:`${m}`,lineHeight:`${h}`,letterSpacing:b,[e.fn.smallerThan("sm")]:{fontSize:`${v}`,lineHeight:`${f}`,letterSpacing:x}})}});let c=(0,o.forwardRef)((e,t)=>{var r,{size:n,color:c,weight:u,as:p="p",styles:g,className:m,dataEventCategory:h,dataEventAction:b,dataEventLabel:v,variant:f}=e,x=(0,a._)(e,["size","color","weight","as","styles","className","dataEventCategory","dataEventAction","dataEventLabel","variant"]);let y=(0,l.rZ)(),E=(0,s.u)(),{classes:C,cx:w}=d({size:n,weight:"caption"===u?"bold":u,as:p,customStylesType:E},{name:"Text",styles:g}),k="string"==typeof y.colors[c]?y.colors[c]:c;return o.createElement(i.x,Object.assign({"data-size":n,className:w(C.root,m),color:k||("label"===p?y.colors.gray[6]:(null===(r=null==y?void 0:y.other)||void 0===r?void 0:r.template)==="mb"?y.colors.delftGray[7]:void 0)||("primary"===f?y.colors.gray[9]:"secondary"===f?y.colors.gray[7]:"tertiary"===f?y.colors.gray[4]:"disabled"===f?y.colors.gray[3]:"error"===f?y.colors.red[6]:"success"===f?y.colors.green[6]:void 0)||y.colors.gray[7],component:p,"data-event-category":h,"data-event-action":b,"data-event-label":v,classNames:{root:Object.assign(Object.assign({},x.wordWrap?{"word-wrap":x.wordWrap}:void 0),x.isUppercase||"caption"===u?{"text-transform":"uppercase"}:void 0)},ref:t},x))})},o82T:function(e,t,r){r.d(t,{D:function(){return Drawer}});var a=r("q1tI"),o=r("t/pd"),n=r("K2Xj"),l=r("AeFk"),i=r("rBCA"),s=r("iBNF"),d=r("gI28"),c=r("ZQ3V");let u="600ms",generateStyleBasedOnPlacement=(e,t)=>{switch(e){case"top":return l.iv` top: 0; width: 100%; border-radius: 0px 0px 6px 6px; ${t?l.iv` animation: ${d.a} ${u} ease-in-out forwards; `:null} &.slideOut { animation: ${d.d} ${u} ease-in-out forwards; } `;case"right":return l.iv` right: 0; height: 100%; min-width: 300px; border-radius: 6px 0px 0px 6px; ${t?l.iv` animation: ${d.c} ${u} ease-in-out forwards; `:null} &.slideOut { animation: ${d.g} ${u} ease-in-out forwards; } `;case"bottom":return l.iv` bottom: 0; width: 100%; border-radius: 6px 6px 0px 0px; ${t?l.iv` animation: ${d.s} ${u} ease-in-out forwards; `:null} &.slideOut { animation: ${d.e} ${u} ease-in-out forwards; } `;case"left":return l.iv` left: 0; height: 100%; min-width: 300px; border-radius: 0px 6px 6px 0px; ${t?l.iv` animation: ${d.b} ${u} ease-in-out forwards; `:null} &.slideOut { animation: ${d.f} ${u} ease-in-out forwards; } `;default:return l.iv` left: 0; height: 100%; min-width: 300px; border-radius: 0px 6px 6px 0px; ${t?l.iv` animation: ${d.s} ${u} ease-in-out forwards; `:null} &.slideOut { animation: ${d.e} ${u} ease-in-out forwards; } `}},p=i.Z.div` position: fixed; inset: 0; z-index: ${s.r.zIndexes.drawer}; pointer-events: ${e=>e.open?"auto":"none"}; `,g=i.Z.div` position: fixed; z-index: 300; background: #ffffff; visibility: ${e=>e.open?"visible":"hidden"}; max-height: calc(100vh - 100px); display: flex; flex-direction: column; .title { display: flex; align-items: center; justify-content: space-between; padding: 16px; ${e=>e.hasTitle?l.iv` border-bottom: 1px solid ${s.r.colors.neutral100}; `:null} } .close-button { margin-left: auto; } ${e=>generateStyleBasedOnPlacement(e.placement,e.open)} `,m=i.Z.div` min-height: 200px; padding: 16px; overflow-y: auto; `,h=i.Z.div` position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; overflow-x: hidden; overflow-y: auto; outline: 0; background-color: rgba(38, 38, 38, 0.3); z-index: 1; &[data-open='false'] { visibility: hidden; pointer-events: none; } &[data-open='true'] { visibility: visible; pointer-events: auto; } `,Backdrop=({open:e=!1,onClickOutside:t})=>a.createElement(h,{"data-open":e,onClick:t}),Drawer=({children:e,title:t,onClose:r,open:l=!1,placement:i="left",destroyOnClose:s=!1,isPropagationEvent:d=!0,className:u})=>{let h=(0,a.useRef)();(0,a.useEffect)(()=>((0,n.t)(l),()=>(0,n.t)(!1)),[l]);let onCloseDrawer=()=>{h.current.classList.add("slideOut"),setTimeout(()=>{r()},800)};return!l&&s?null:a.createElement(o.h,null,a.createElement(p,{className:u,open:l},a.createElement(Backdrop,{open:l,onClickOutside:onCloseDrawer}),a.createElement(g,{open:l,placement:i,ref:h,hasTitle:!!t},a.createElement("div",{className:"title"},t&&a.createElement(c.T,{size:"s2",weight:"semiBold"},t),a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:"close-button",onClick:onCloseDrawer},a.createElement("path",{d:"M5.99007 4.99067C5.79114 4.99072 5.59674 5.0501 5.43173 5.16121C5.26672 5.27233 5.1386 5.43013 5.06374 5.61444C4.98889 5.79875 4.9707 6.0012 5.0115 6.1959C5.05231 6.39061 5.15025 6.56872 5.29281 6.70747L10.5858 12.0004L5.29281 17.2934C5.19684 17.3855 5.12021 17.4959 5.06743 17.618C5.01464 17.7402 4.98676 17.8716 4.9854 18.0046C4.98405 18.1377 5.00926 18.2697 5.05954 18.3928C5.10983 18.516 5.1842 18.6279 5.27827 18.722C5.37235 18.8161 5.48426 18.8904 5.60743 18.9407C5.73061 18.991 5.86259 19.0162 5.99563 19.0149C6.12867 19.0135 6.2601 18.9856 6.38223 18.9328C6.50436 18.8801 6.61473 18.8034 6.70687 18.7075L11.9998 13.4145L17.2928 18.7075C17.385 18.8034 17.4953 18.8801 17.6175 18.9328C17.7396 18.9856 17.871 19.0135 18.0041 19.0149C18.1371 19.0162 18.2691 18.991 18.3922 18.9407C18.5154 18.8904 18.6273 18.8161 18.7214 18.722C18.8155 18.6279 18.8899 18.516 18.9401 18.3928C18.9904 18.2697 19.0156 18.1377 19.0143 18.0047C19.0129 17.8716 18.985 17.7402 18.9323 17.618C18.8795 17.4959 18.8028 17.3855 18.7069 17.2934L13.4139 12.0004L18.7069 6.70747C18.8514 6.567 18.9501 6.38616 18.99 6.18864C19.03 5.99112 19.0093 5.78614 18.9308 5.60055C18.8523 5.41497 18.7195 5.25744 18.5499 5.14861C18.3803 5.03978 18.1817 4.98473 17.9803 4.99067C17.7205 4.99841 17.4739 5.10699 17.2928 5.2934L11.9998 10.5864L6.70687 5.2934C6.61368 5.19761 6.50224 5.12146 6.37912 5.06947C6.25601 5.01747 6.12372 4.99068 5.99007 4.99067Z",fill:"#595959"}))),a.createElement(m,{onClick:e=>{d&&e.stopPropagation()}},e&&(a.isValidElement(e)?e:"function"==typeof e?e({internalClose:onCloseDrawer}):null)))))}},"r+dM":function(e,t,r){r.d(t,{R:function(){return RadioImageGroup}});var a=r("q1tI"),o=r("iBNF"),n=r("rBCA"),l=r("sknb"),i=r("fNCy");let s=n.Z.div` display: flex; width: 100%; &[data-direction='vertical'] { flex-direction: column; } &[data-direction='horizontal'] { flex-wrap: wrap; } `,d=n.Z.div` display: flex; padding: 8px; border-radius: ${o.r.borderRadius}; cursor: pointer; & > div { display: flex; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: flex-start; } &[data-is-mb='false'] { &[data-selected='true'] { border: 1px solid #2d87f3; background: white; } &[data-selected='false'] { border: 1px solid #f2f2f2; box-shadow: 0px 5px 12px rgba(40, 74, 117, 0.08); } } &[data-is-mb='true'] { border-radius: 16px; background: white; padding: 16px auto; &[data-selected='true'] { border: 1px solid ${o.r.mbColors.mint}; box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.06); } &[data-selected='false'] { border: none; } } &[data-disabled='true'] { cursor: auto; } .radio-group-item-heading { margin-top: 8px; //height: 48px; text-align: center; } .gender-image { width: 70px; height: 70px; &[data-is-mobile='true'] { width: 40px; height: 40px; } } `,RadioImageGroup=({value:e,options:t,className:r,direction:n="horizontal",onChange:c,isDisabled:u,siteType:p})=>{let[g,m]=(0,a.useState)(e),handleOnChange=e=>{!u&&(m(e),c&&c(e))},h="marryBaby"===p;return a.createElement(s,{className:r,"data-direction":n},t.map((t,r)=>a.createElement(d,{"data-selected":(e||g)===t.value,"data-is-mb":h,"data-disabled":u,key:r,onClick:()=>{handleOnChange(t.value)}},a.createElement("div",null,t.content,t.label&&a.createElement(a.Fragment,null,h?a.createElement(l.M,{type:"subtitle-2",color:(e||g)===t.value?o.r.mbColors.dark:o.r.mbColors.midGray},t.label):a.createElement(i.T,{type:"bold",color:(e||g)===t.value?"#2D87F3":"black",className:"radio-group-item-heading",size:"label1"},t.label))))))}},bkBN:function(e,t,r){r.d(t,{A:function(){return AddressInput}});var a=r("6eqW"),o=r("q1tI"),n=r("OAL+"),l=r("aDCK"),i=r("TH2c"),s=r("Jbia"),d=r("ZKGu"),c=r("kGIx"),u=r("PmKk"),p=r("yNk5");let generateGetAddressDetail=e=>`${s.g}/cities-data-${c.M[e]}.json`,g={provinceByName:{},provinces:[],districts:[],wards:[],selectedProvince:"",selectedDistrict:"",selectedWard:""},reducer=(e,t)=>{switch(t.type){case"SET_DATA":return Object.assign(Object.assign({},e),t.payload);case"SET_DISTRICTS":return Object.assign(Object.assign({},e),{districts:t.payload});case"SET_WARDS":return Object.assign(Object.assign({},e),{wards:t.payload});case"SELECT_PROVINCE":return Object.assign(Object.assign({},e),{selectedProvince:t.payload,selectedDistrict:"",selectedWard:""});case"SELECT_DISTRICT":return Object.assign(Object.assign({},e),{selectedDistrict:t.payload,selectedWard:""});case"SELECT_WARD":return Object.assign(Object.assign({},e),{selectedWard:t.payload});default:return e}},mappingProvinceId=(e,t)=>{let r={};for(let[,e]of Object.entries(t)){let{id:t}=e;t&&(r[t]=e)}let a={};return e.map(e=>{a[e.name]=r[e.id]}),a},useAddress=({provinces:e})=>{let[t,r]=(0,o.useReducer)(reducer,g),{provinceByName:n,provinces:l,districts:i,wards:s,selectedProvince:d,selectedDistrict:c,selectedWard:m}=t,[h,b]=(0,o.useState)();return(0,o.useEffect)(()=>{(0,a.a)(void 0,void 0,void 0,function*(){var t,a,o;try{let n=yield fetch(generateGetAddressDetail(p.env.UNIFY_LOCALE||u.L.Vietnam)).then(e=>e.json());b(n);let{list:l}=n,i=e?mappingProvinceId(e,l):l,s=Object.keys(i),d=Object.keys((null===(t=l[s[0]])||void 0===t?void 0:t.list)||{}),c=Object.keys((null===(o=null===(a=l[s[0]])||void 0===a?void 0:a[d[0]])||void 0===o?void 0:o.list)||{});r({type:"SET_DATA",payload:{provinceByName:i,provinces:s,districts:d,wards:c}})}catch(e){console.error("Error fetching address data:",e)}})},[p.env.UNIFY_LOCALE]),{provinces:l,districts:i,wards:s,selectedProvince:d,selectedDistrict:c,selectedWard:m,handleProvinceChange:e=>{var t;let a=Object.keys((null===(t=n[e])||void 0===t?void 0:t.list)||{});r({type:"SET_DISTRICTS",payload:a}),r({type:"SET_WARDS",payload:[]}),r({type:"SELECT_PROVINCE",payload:e})},handleDistrictChange:e=>{var t,a;let o=Object.keys((null===(a=null===(t=n[d])||void 0===t?void 0:t.list[e])||void 0===a?void 0:a.list)||{});r({type:"SET_WARDS",payload:o}),r({type:"SELECT_DISTRICT",payload:e})},handleWardChange:e=>{r({type:"SELECT_WARD",payload:e})}}},AddressInput=e=>{var{error:t,provinces:r,placeholder:s}=e,c=(0,a._)(e,["error","provinces","placeholder"]);let{t:u}=(0,d.u)(),{provinces:p,districts:g,wards:m,selectedProvince:h,selectedDistrict:b,selectedWard:v,handleProvinceChange:f,handleDistrictChange:x,handleWardChange:y}=useAddress({provinces:r}),[E,C]=(0,o.useState)("");return(0,o.useEffect)(()=>{h&&b&&v&&E?c.onChange({selectedProvince:h,selectedDistrict:b,selectedWard:v,extraInfo:E}):c.onChange(null)},[h,b,v,E]),o.createElement(i.I.Wrapper,Object.assign({withAsterisk:!0},c),o.createElement(n.K,null,o.createElement(i.S,{placeholder:(null==s?void 0:s.province)||u("onboarding.similac.input.city"),data:r?p:p.sort(),searchable:!0,onChange:f,value:h}),o.createElement(i.S,{placeholder:(null==s?void 0:s.district)||u("onboarding.similac.input.district"),data:g.sort(),searchable:!0,onChange:x,value:b,disabled:!h}),o.createElement(i.S,{placeholder:(null==s?void 0:s.ward)||u("onboarding.similac.input.ward"),searchable:!0,data:m.sort(),value:v,onChange:y,disabled:!h||!b}),o.createElement(i.I,{placeholder:(null==s?void 0:s.address)||u("onboarding.similac.input.no"),disabled:!h||!b||!v,value:E,onChange:C,style:{marginBottom:0}})),o.createElement(l.I.Error,{size:"md"},t))}},"4JTe":function(e,t,r){r.d(t,{I:function(){return Input},L:function(){return Label},S:function(){return p},a:function(){return u},b:function(){return c}});var a=r("6eqW"),o=r("q1tI"),n=r("8vDj"),l=r("rBCA"),i=r("iBNF"),s=r("K2Xj");let d=l.Z.div` position: relative; width: 100%; &[data-has-error] { input { border-color: ${i.r.colors.red700}; } } input { width: 100%; padding: 12px 16px; border: solid 1px ${i.r.colors.gray200}; border-radius: ${i.r.borderRadius}; &:active, &:focus, &.focused { border-color: ${e=>e.color}; box-shadow: 0px 0px 2px 2px ${e=>e.shadowColor}; } &:disabled { background-color: ${i.r.colors.gray100}; cursor: not-allowed; } } &[data-has-action-icon] { input { padding: 12px 48px 12px 16px; } } &[data-has-display-icon] { input { padding: 12px 16px 12px 48px; } } &[data-has-action-icon][data-has-display-icon] { input { padding: 12px 48px; } } &[data-size='lg'] { input { font-size: 16px; font-weight: ${i.r.sizes.fwRegular}; ${s.M.mbDown} { font-size: 22px; line-height: 1.2; } ${s.M.mbUp} { font-size: 26px; line-height: 1.2; } } } &[data-size='md'] { input { font-weight: ${i.r.sizes.fwRegular}; line-height: 22px; ${s.M.mbDown} { font-size: 14px; line-height: 1.2; } ${s.M.mbUp} { font-size: 16px; line-height: 1.2; } } } &[data-size='sm'] { input { font-weight: ${i.r.sizes.fwRegular}; line-height: 20px; ${s.M.mbDown} { font-size: 13px; line-height: 1.5; } ${s.M.mbUp} { font-size: 13px; line-height: 1.5; } } } `,c=l.Z.label` color: ${i.r.colors.red700}; font-weight: ${i.r.sizes.fwRegular}; `,u=l.Z.div` position: absolute; top: 50%; right: 16px; cursor: pointer; transform: translateY(-50%); `,p=l.Z.div` position: absolute; top: 50%; left: 16px; display: inline-flex; cursor: default; transform: translateY(-50%); `,Label=({children:e,className:t,style:r,htmlFor:a,size:n})=>o.createElement("label",{"data-size":n,className:`DjBFAbd ${t||""}`,style:r,htmlFor:a},e),Input=e=>{var{name:t,value:r,errorMessage:l,isNumerousKeyboard:i=!1,showErrorMessage:s=!0,actionIcon:g,displayIcon:m,onActionClick:h,label:b,className:v,onChange:f,isDisabled:x,CustomInput:y,size:E,style:C,autoComplete:w="off",type:k="text",inputClassName:j,trackingAttributes:O,enterKeyHint:L}=e,S=(0,a._)(e,["name","value","errorMessage","isNumerousKeyboard","showErrorMessage","actionIcon","displayIcon","onActionClick","label","className","onChange","isDisabled","CustomInput","size","style","autoComplete","type","inputClassName","trackingAttributes","enterKeyHint"]);let I=(0,n.rZ)(),B=(0,o.useMemo)(()=>O?{"data-event-category":O.dataEventCategory,"data-event-action":O.dataEventAction,"data-event-label":O.dataEventLabel}:{},[O]);return o.createElement(d,{"data-size":E,className:v,"data-has-action-icon":!!g||void 0,"data-has-display-icon":!!m||void 0,"data-has-error":l&&l.length>0||void 0,color:I.fn.primaryColor(),shadowColor:I.colors[I.primaryColor][0],style:C},b&&o.createElement(Label,{size:"label2",htmlFor:t,className:"inputLabel"},b),o.createElement("div",{style:{position:"relative"}},y||o.createElement("input",Object.assign({id:t,name:t,onChange:e=>f&&f(e.target.value),type:k,"aria-label":k,value:r,disabled:x,autoComplete:w,inputMode:i||"number"===k?"numeric":k,pattern:i?"[0-9]*":".*",className:j,enterKeyHint:L},B,S)),m&&o.createElement(p,{className:"displayIcon"},m),g&&o.createElement(u,{className:"actionIcon",onClick:h},g)),l&&l.length>0&&s&&o.createElement(c,{className:"errorLabel"},l))}},tqC3:function(e,t,r){r.d(t,{B:function(){return BabyVaccineForm}});var a,o,n=r("6eqW"),l=r("q1tI"),i=r("iuhU"),s=r("8vDj"),d=r("cChf"),c=r("ZFu2"),u=r("7mOA"),p=r("ZQ3V"),g=r("ZKGu"),m=r("yjyv"),h=r("Xlwb"),b=r("Mzyo"),v=r("fkrl");let f=(0,l.createContext)({}),DefaultLayout=e=>{var t=(0,n._)(e,[]);let{t:r}=(0,g.u)(),{currentUrl:a,submitProps:o,form:s}=(0,l.useContext)(f),{classes:d={}}=(0,l.useContext)(m.C);return l.createElement(h.H,Object.assign({formLayout:"default"},t),l.createElement(h.H.FormRow,null,l.createElement(b.G,Object.assign({isBaby:!0},s.getInputProps("gender")))),l.createElement(h.H.FormRow,null,l.createElement(u.D,Object.assign({label:l.createElement(p.T,{size:"p2",weight:"semiBold"},r("babyGrowth.input.birthday")),placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},maxDate:new Date},s.getInputProps("age")))),l.createElement(h.H.FormRow,{className:d.submitWrapper},l.createElement(h.H.Submit,Object.assign({type:"submit",className:(0,i.default)("due-date-calculate-button",d.submitBtn),dataEventCategory:"Health Tool",dataEventAction:"Vaccination Tool",dataEventLabel:a},o),r("dueDatePage.lastPeriod.calculate"))))},InlineLayout=e=>{var t=(0,n._)(e,[]);let{t:r}=(0,g.u)(),{currentUrl:a,submitProps:o,form:s}=(0,l.useContext)(f),{classes:d={}}=(0,l.useContext)(m.C);return l.createElement(h.H,Object.assign({formLayout:"inline"},t),l.createElement(h.H.FormRow,null,l.createElement(h.H.BorderInlineControl,{label:r("tools.selectBabyGender"),width:"none"},l.createElement(b.G,Object.assign({isBaby:!0,hideLabel:!0,type:"radio"},s.getInputProps("gender")))),s.errors.gender&&l.createElement(h.H.Error,null,s.errors.gender)),l.createElement(h.H.FormRow,null,l.createElement(h.H.BorderInlineControl,{label:r("babyGrowth.input.birthday")},l.createElement(u.D,Object.assign({placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},maxDate:new Date},s.getInputProps("age"),{error:null}))),s.errors.age&&l.createElement(h.H.Error,null,s.errors.age)),l.createElement(h.H.FormRow,{className:d.submitWrapper},l.createElement(h.H.Submit,Object.assign({type:"submit",className:(0,i.default)("due-date-calculate-button",d.submitBtn),dataEventCategory:"Health Tool",dataEventAction:"Vaccination Tool",dataEventLabel:a},o),r("dueDatePage.lastPeriod.calculate"))))},MbLayout=e=>{var t=(0,n._)(e,[]);let{t:r}=(0,g.u)(),{currentUrl:a,submitProps:o,form:i}=(0,l.useContext)(f);return l.createElement(h.H,Object.assign({formLayout:"default"},t),l.createElement(h.H.Control,null,l.createElement(b.G,Object.assign({isBaby:!0},i.getInputProps("gender"),{error:null}))),i.errors.gender&&l.createElement(h.H.Error,null,i.errors.gender),l.createElement(h.H.FormRow,null,l.createElement(h.H.BorderBoxControl,{label:r("babyGrowth.input.birthday"),rightSection:l.createElement(v.Z,null)},l.createElement(u.D,Object.assign({placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},maxDate:new Date,rightSection:null},i.getInputProps("age"),{error:null}))),i.errors.age&&l.createElement(h.H.Error,null,i.errors.age)),l.createElement(h.H.Submit,Object.assign({type:"submit",className:"due-date-calculate-button",dataEventCategory:"Health Tool",dataEventAction:"Vaccination Tool",dataEventLabel:a},o),r("dueDatePage.lastPeriod.calculate")))};(a=o||(o={}))[a.trackPeriod=0]="trackPeriod",a[a.conceive=1]="conceive",a[a.avoidPregnancy=2]="avoidPregnancy";let BabyVaccineForm=e=>{var{formLayout:t="default",submitProps:r,currentUrl:a,onSubmit:o}=e,i=(0,n._)(e,["formLayout","submitProps","currentUrl","onSubmit"]);let{t:u}=(0,g.u)(),p=(0,s.rZ)(),m="mb"===p.other.template,h=(0,d.c)({validate:{gender:(0,c.U)(u("validation.error.requiredField")),age:(0,c.U)(u("validation.error.requiredField"))}}),b=Object.assign({onSubmit:h.onSubmit(o)},i);return l.createElement(f.Provider,{value:{submitProps:r,currentUrl:a,form:h}},"inline"===t?l.createElement(InlineLayout,Object.assign({},b)):m?l.createElement(MbLayout,Object.assign({formLayout:t},b)):l.createElement(DefaultLayout,Object.assign({},b)))}},FCPo:function(e,t,r){r.d(t,{A:function(){return ArrowRightBlue},C:function(){return Clinic},D:function(){return DoctorExpertiseItem},I:function(){return InsuranceList},P:function(){return PaymentList},a:function(){return DoctorInfoExpertise}});var a=r("q1tI"),o=r("rBCA"),n=r("iBNF"),l=r("fNCy"),i=r("xXM3"),s=r.n(i),d=r("EDn0"),c=r("ZQ3V");let ArrowRightBlue=e=>a.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 6 10",fill:"none"},e),a.createElement("path",{d:"M1 9L5 5L1 1",stroke:"#2D87F3",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round"})),Clinic=e=>a.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none"},e),a.createElement("path",{d:"M4.89646 16.9996H2.96549C2.43225 16.9996 2 16.5674 2 16.0341V12.6549C2 12.1217 2.43225 11.6895 2.96549 11.6895H4.89646",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M15.0342 11.6895H16.9652C17.4984 11.6895 17.9306 12.1217 17.9306 12.6549V16.0341C17.9306 16.5674 17.4984 16.9996 16.9652 16.9996H15.0342",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M5.86197 3H14.0686C14.6015 3 15.0341 3.43263 15.0341 3.96549V16.9995H4.89648V3.96549C4.89648 3.43263 5.32912 3 5.86197 3Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M11.172 13.6206H8.7583V16.9998H11.172V13.6206Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M9.96533 9.99996V5.65527",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M12.1377 7.82764H7.79297",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})),u=o.Z.ul` display: grid; grid-gap: 16px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); list-style: none; `,p=o.Z.li` p { margin-top: 8px; text-align: center; } .insuranceLogo { display: grid; height: 58px; border: 1px solid ${n.r.colors.neutral200}; border-radius: 6px; place-content: center; > img { width: 93px; height: 43px; object-fit: contain; } } `,InsuranceList=({insurances:e,className:t,isName:r=!0})=>e.length?a.createElement(u,{id:"insurance-list",className:t},e.map(e=>a.createElement(p,{className:"insuranceItem",key:e.id},a.createElement("div",{className:"insuranceLogo"},a.createElement("img",{src:e.logo,alt:e.name||"insurance-logo"})),r&&a.createElement(l.T,{size:"base",color:n.r.colors.gray500,type:"bold"},e.name)))):null,g=o.Z.div` display: flex; flex-wrap: wrap; gap: 7px; &.paymentList { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); justify-content: center; } `,m=o.Z.div` border: 1px solid ${n.r.colors.neutral100}; border-radius: 12px; width: 80px; min-height: 80px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; &.payment-item-mobile { width: 100%; } .logo { position: relative; width: 55px; aspect-ratio: 55 / 32; object-fit: contain; } .txt-caption-1 { font-size: 0.6875rem; line-height: 1rem; color: ${n.r.colors.gray800}; } `,PaymentList=({payments:e,className:t,isName:r=!0,isMobile:o=!1})=>e.length?a.createElement(g,{id:"payment-container",className:s()(t,{paymentList:o&&e.length>=4})},e.map(t=>a.createElement(m,{className:s()("payment-item",{"payment-item-mobile":o&&e.length>=4}),key:t.id},a.createElement(d.I,{className:"logo",src:t.logo,alt:t.name}),r&&a.createElement("div",{className:"txt-caption-1"},t.name)))):null,h=o.Z.div` display: flex; gap: 8px; .icon { width: 1.25rem; height: 1.25rem; color: ${n.r.colors.gray400}; flex-shrink: 0; } .doctor-info-item-content { display: flex; flex-direction: column; gap: 10px; } `;(0,o.Z)(Clinic)` width: 1.25rem; height: 1.25rem; `;let b=o.Z.div` display: flex; flex-direction: column; gap: 4px; `,DoctorExpertiseItem=e=>{let{doctorInfo:t,Icon:r,title:o}=e;return a.createElement(h,null,a.createElement(r,{className:"icon"}),a.createElement(b,null,a.createElement(c.T,{size:"p3",weight:"semiBold",color:"#111111"},o),a.createElement("div",{className:"doctor-info-item-content"},(Array.isArray(t)?t:[t]).map(e=>a.createElement(c.T,{size:"p3",weight:"regular",key:e},e)))))},v=o.Z.div` display: flex; padding: 1rem; width: 100%; justify-content: space-between; `,f=o.Z.div` display: flex; flex-direction: column; gap: 2px; `,DoctorInfoExpertise=e=>{let{name:t,specialty:r,experience:o,profileImage:n}=e;return a.createElement(v,null,a.createElement(f,null,a.createElement(c.T,{size:"title2",weight:"semiBold",color:"#111111"},t),a.createElement("div",null,r&&a.createElement(c.T,{size:"c1",weight:"regular"},r),o&&a.createElement(c.T,{size:"c1",weight:"regular"},o))),a.createElement(d.I,{src:n,alt:t,style:{width:"4.5rem",height:"4.5rem",borderRadius:"50%",objectFit:"cover",flexShrink:0}}))}},B6Ol:function(e,t,r){r.d(t,{A:function(){return AuthorBadge},B:function(){return BookingBtn}});var a=r("6eqW"),o=r("q1tI"),n=r("ZKGu"),l=r("/npG"),i=r("19qx"),s=r("A2eT"),d=r("p3w3"),c=r("4fTT"),u=r("xrdX"),p=r("GOBr"),g=(0,l.k)(e=>({root:{display:"inline-block",flexShrink:0,padding:"2px 0.5rem",marginLeft:"4px",borderRadius:e.radius.xs,fontSize:"12px",fontWeight:400,lineHeight:"18px",'&[data-label-type="admin"]':{background:e.primaryColor[0],color:e.primaryColor[9]},'&[data-label-type="local admin"]':{background:e.primaryColor[8]},'&[data-label-type="ambassador"]':{background:e.colors.green[4]},'&[data-label-type="expert"]':{background:e.colors.yellow[6]},'&[data-label-type="moderator"]':{background:e.colors.red[0],color:e.colors.red[8]},'&[data-label-type="sponsor"]':{background:e.colors.teal[4]},'&[data-label-type="guide"]':{background:e.colors.teal[4]},'&[data-label-type="influencer"]':{background:e.colors.teal[4]}}}));let m={admin:"cardAuthor.admin",moderator:"cardAuthor.moderator",ambassador:"cardAuthor.ambassador",expert:"cardAuthor.expert",sponsor:"cardAuthor.sponsor",guide:"cardAuthor.guide",influencer:"cardAuthor.influencer"},looselyMatchRole=e=>["admin","moderator","ambassador","expert","sponsor","guide","influencer"].find(t=>t===e),AuthorBadge=e=>{var{siteType:t,role:r,title:l,styles:i,className:s}=e,d=(0,a._)(e,["siteType","role","title","styles","className"]);let{t:c}=(0,n.u)(),u=r?looselyMatchRole(r):"",{classes:p,cx:h}=g(void 0,{name:"AuthorBadge",styles:i});return u&&m[u]?o.createElement("div",Object.assign({className:h(p.root,s),"data-label-type":u,"data-is-marrybaby":"marryBaby"===t},d),l||c(m[u])):null},BookingBtn=e=>{var{label:t,bookingId:r,bookingType:l="doctor",locale:g="vi-VN"}=e,m=(0,a._)(e,["label","bookingId","bookingType","locale"]);let{t:h}=(0,n.u)(),[b,v]=(0,o.useState)(!1),f=(0,o.useMemo)(()=>"undefined"!=typeof window?window.location.href:"",[]),x=(0,o.useCallback)(()=>(0,a.a)(void 0,void 0,void 0,function*(){var e,t,a,o,n,d,m,h,b,f,x,y,E,C,w;let k="doctor"===l?i.P.GET_DOCTOR_DETAIL:"hospital"===l?i.P.GET_HOSPITAL_DETAIL:"service"===l?i.P.GET_SERVICE_DETAIL:"";try{v(!0);let i=yield(0,c.c)((0,c.b)(k,{id:r,site:u.v[g]}),"get");if((null==i?void 0:i._status)===1){let r="doctor"===l?{id:null===(t=null===(e=null==i?void 0:i._data)||void 0===e?void 0:e.doctor)||void 0===t?void 0:t.id,slug:null===(o=null===(a=null==i?void 0:i._data)||void 0===a?void 0:a.doctor)||void 0===o?void 0:o.slug,localSlug:null===(n=s.L[g])||void 0===n?void 0:n.DOCTOR}:"hospital"===l?{id:null===(m=null===(d=null==i?void 0:i._data)||void 0===d?void 0:d.branch)||void 0===m?void 0:m.id,slug:null===(b=null===(h=null==i?void 0:i._data)||void 0===h?void 0:h.branch)||void 0===b?void 0:b.slug,localSlug:null===(f=s.L[g])||void 0===f?void 0:f.HOSPITAL}:{id:null===(y=null===(x=null==i?void 0:i._data)||void 0===x?void 0:x.service)||void 0===y?void 0:y.id,slug:null===(C=null===(E=null==i?void 0:i._data)||void 0===E?void 0:E.service)||void 0===C?void 0:C.slug,localSlug:null===(w=s.L[g])||void 0===w?void 0:w.SERVICE};window.location.href=`https://${p.y?"":"discover."}${u.v[g]}/care/${r.localSlug}/${r.slug}-${r.id}/`}else v(!1)}catch(e){console.log(e),v(!1)}}),[]);return r&&l?o.createElement(d.B,Object.assign({dataEventCategory:"Care",dataEventAction:"Comment - Quick Booking",dataEventLabel:f,onClick:x,loading:b},m),t||h("careBooking.bookAnAppointment")):null}},"9E07":function(e,t,r){r.d(t,{M:function(){return MantineProvider}});var a=r("6eqW"),o=r("q1tI"),n=r("8vDj"),l=r("Yoob"),i=r("LeBD");let MantineProvider=e=>{var{children:t,locale:r,template:s="hb",isNotifications:d=!0,customStyleType:c=i.C.NONE}=e,u=(0,a._)(e,["children","locale","template","isNotifications","customStyleType"]);return(0,l.u)(r),o.createElement(n.Me,Object.assign({theme:(0,l.g)(r,s,c)},u),o.createElement(i.T,{variant:c},t,d&&o.createElement(l.N,null)))}},qM2N:function(e,t,r){r.d(t,{T:function(){return Tabs}});var a=r("6eqW"),o=r("q1tI"),n=r("aKYm"),l=r("VLUI"),i=r("/npG"),s=r("mYVa"),d=r("rlLN"),c=r("vaps"),u=r("p3w3"),p=r("ZQ3V"),g=(0,i.k)((e,t)=>{let{variant:r}=t,a={content:"none",top:0,bottom:0,zIndex:1,width:(0,s.h)(56)};return Object.assign({},"inline"===r&&{root:{},tabsList:{gap:(0,s.h)(24),borderBottom:"none",flexWrap:"nowrap"},tab:{padding:`${(0,s.h)(8)} 0`,color:e.colors.gray[4],borderColor:"transparent",borderBottomWidth:(0,s.h)(2),marginBottom:(0,s.h)(-1),transition:"border 0.2s ease","&:hover":{backgroundColor:"initial",borderColor:"transparent"},"&[data-active='true']":{color:e.fn.primaryColor(),borderColor:e.fn.primaryColor()}},tabRightSection:{},tabLabel:{},tabIcon:{},panel:{},scrollArea:{position:"relative","&.prev-bg":{"&:before":Object.assign(Object.assign({},a),{content:'""',position:"absolute",left:0,background:"linear-gradient(90deg, #FFF 0%, rgba(255, 255, 255, 0.00) 100%)"})},"&.next-bg":{"&:after":Object.assign(Object.assign({},a),{content:'""',position:"absolute",right:0,background:"linear-gradient(90deg, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%)"})}},list:{borderBottom:`1px solid ${e.colors.neutral[1]}`},btn:{position:"absolute",top:"50%",zIndex:2,transform:"translate(0, -50%)",width:(0,s.h)(28),height:(0,s.h)(28),padding:0,background:"white",borderRadius:"50%",cursor:"pointer",filter:"drop-shadow(0px 0px 1px rgba(0, 0, 0, 0.04)) drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.04)) drop-shadow(0px 10px 16px rgba(0, 0, 0, 0.04))",".mantine-Button-icon":{display:"flex",alignItems:"center",justifyContent:"center"},"&.disabled":{opacity:0,zIndex:0}},prevBtn:{left:0},nextBtn:{right:0}})});let Tabs=e=>{var t,{variant:r="inline",value:i,styles:s,children:m,dataList:h=[],tabProps:b,listProps:v,panelProps:f,TabComponentDisplay:x,startPadding:y=40,defaultValue:E}=e,C=(0,a._)(e,["variant","value","styles","children","dataList","tabProps","listProps","panelProps","TabComponentDisplay","startPadding","defaultValue"]);let{cx:w,classes:k}=g({variant:r},{name:"Tabs",styles:s}),j=(0,o.useRef)(null),O=(0,o.useRef)([]),[L,S]=(0,o.useState)(E||(null===(t=null==h?void 0:h[0])||void 0===t?void 0:t.value)),[I,B]=(0,o.useState)(0),[T,N]=(0,o.useState)(!1),[A,$]=(0,o.useState)(!0),[z,P]=(0,o.useState)({x:0,y:0}),D=(0,o.useRef)(null),R=Object.assign({defaultValue:E,classNames:k},m?{value:i}:{value:L,onTabChange:e=>S(e)});(0,o.useEffect)(()=>{S(i)},[i]),(0,o.useEffect)(()=>{var e,t,r;null===(e=D.current)||void 0===e||e.scrollTo({left:(null===(r=null===(t=null==O?void 0:O.current)||void 0===t?void 0:t[I])||void 0===r?void 0:r.offsetLeft)-y,behavior:"smooth"})},[I]),(0,o.useEffect)(()=>{B(h.findIndex(e=>e.value==L))},[L]),(0,o.useEffect)(()=>{var e,t;$(0===z.x),N((null===(e=null==D?void 0:D.current)||void 0===e?void 0:e.clientWidth)+z.x===(null===(t=null==D?void 0:D.current)||void 0===t?void 0:t.scrollWidth))},[z]);let TabTextComponent=({text:e,dataEventCategory:t,dataEventAction:r,dataEventLabel:a})=>x?o.createElement(x,null,e):o.createElement(p.T,{size:"s3",color:"inherit",weight:"semiBold","data-event-category":t,"data-event-action":r,"data-event-label":a},e);return o.createElement(d.m,Object.assign({},R,C),m||o.createElement(o.Fragment,null,o.createElement(c.x,{className:w(k.scrollArea,`${A?"":"prev-bg"} ${T?"":"next-bg"}`),scrollbarSize:0,viewportRef:D,onScrollPositionChange:P},o.createElement(d.m.List,Object.assign({className:k.list,ref:j},v),h.map((e,t)=>o.createElement(d.m.Tab,Object.assign({ref:e=>O.current[t]=e,className:k.tab,key:String(e.value),value:String(e.value)},b),o.createElement(TabTextComponent,Object.assign({},e))))),o.createElement(u.B,{className:w(k.btn,k.prevBtn,A?"disabled":""),unstyled:!0,onClick:()=>B(I-1>-1?I-1:0),leftIcon:o.createElement(n.Z,{size:16})}),o.createElement(u.B,{className:w(k.btn,k.nextBtn,T?"disabled":""),unstyled:!0,onClick:()=>B(I+1o.createElement(d.m.Panel,Object.assign({value:String(e.value),key:String(e.value)},f),e.content))))};Tabs.List=d.m.List,Tabs.Tab=d.m.Tab,Tabs.Panel=d.m.Panel},Mzyo:function(e,t,r){r.d(t,{G:function(){return GenderOptionControl}});var a=r("6eqW"),o=r("q1tI"),n=r("OyPk"),l=r("XHvu"),i=r("/npG"),s=r("mYVa"),d=r("Eso5"),c=r("SPK5"),u=r("TH2c"),p=r("i2MM"),g=r("ZQ3V"),m=r("ZKGu");let h={lg:{height:48},md:{height:40},sm:{height:32},xs:{height:32}};var b=(0,i.k)((e,{type:t,gap:r,size:a})=>{let o="mb"===e.other.template,n=h[a]||{},l=n.height;return{root:{},wrapper:Object.assign({gap:(0,s.h)(r||8)},"radio"===t&&{justifyContent:"flex-end",gap:(0,s.h)(r||24)}),groupErr:{fontSize:(0,s.h)(14)},itemRoot:Object.assign({},"button"===t?{flexGrow:1,width:"50%",'&[data-checked="true"]':{".mantine-Radio-label":{borderColor:e.fn.primaryColor()}}}:"radio"===t?{padding:`${(0,s.h)(10)} 0`,margin:0}:{}),itemLabelWrapper:{padding:0,width:"100%"},itemLabel:Object.assign({whiteSpace:"nowrap"},"button"===t?{position:"relative",padding:`${(0,s.h)(2)} ${(0,s.h)(16)}`,border:`1px solid ${o?"#EAEAEC":e.colors.gray[2]}`,backgroundColor:"#fff",borderRadius:(0,s.h)(o?16:4),cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center",height:l,'&[data-disabled="true"]':{background:e.colors.gray[1],color:`${e.colors.gray[4]} !important`,img:{opacity:.5}},img:{height:(0,s.h)("lg"===a?26:22)}}:"radio"===t?{fontSize:(0,s.h)(14)}:{}),itemInner:Object.assign(Object.assign({},"button"===t&&{display:"none"}),"radio"===t&&{alignSelf:"center"}),itemBody:Object.assign({},"radio"===t&&{alignItems:"center"})}});let GenderOptionControl=e=>{var{label:t,availableValue:r,styles:i,isBaby:h,genderValue:v={male:"male",female:"female"},type:f="button",hideLabel:x,labelTextProps:y,labelText:E,gap:C,size:w="md",LabelWrapper:k}=e,j=(0,a._)(e,["label","availableValue","styles","isBaby","genderValue","type","hideLabel","labelTextProps","labelText","gap","size","LabelWrapper"]);let{t:O}=(0,m.u)(),{classes:L,cx:S,theme:I}=b({type:f,gap:C,size:w},{name:"GenderOptionControl",styles:i}),B="mb"===I.other.template,[T,N]=(0,o.useState)(),A=(0,o.useRef)(null),$=k?{}:Object.assign({as:"label",size:"p2",weight:"semiBold",variant:"primary"},y),z=k||g.T,P=(0,o.useMemo)(()=>[{value:v.male,label:h?O("gender.boy"):O("gender.male"),icon:h?B?o.createElement(n.Z,null):p.C.getAssetPath("health-tools/boy-icon.svg"):p.C.getAssetPath("health-tools/male-icon.svg")},{value:v.female,label:h?O("gender.girl"):O("gender.female"),icon:h?B?o.createElement(l.Z,null):p.C.getAssetPath("health-tools/girl-icon.svg"):p.C.getAssetPath("health-tools/female-icon.svg")}],[]);return(0,o.useEffect)(()=>{N(r)},[r]),o.createElement(d.x,{ref:A,className:L.root},o.createElement(u.R.Group,Object.assign({className:"radio-group",label:x?void 0:o.createElement(z,Object.assign({id:"gender-option-control-label"},$),t||(h?O("tools.selectBabyGender"):O("tools.selectGender"))),size:"lg"},j,{classNames:{error:L.groupErr}},"radio"===f&&{error:null}),o.createElement(c.k,{className:S(L.wrapper)},P.map(e=>o.createElement(u.R,Object.assign({className:"gender-item",size:"sm",classNames:{root:L.itemRoot,labelWrapper:L.itemLabelWrapper,label:L.itemLabel,inner:L.itemInner,body:L.itemBody},key:e.value,value:e.value},T&&e.value!==T&&{disabled:!0},{label:o.createElement(c.k,{gap:(0,s.h)(8),align:"center",justify:"center",sx:{zIndex:0}},"button"===f&&("string"==typeof e.icon?o.createElement("img",{src:e.icon,className:"gender-image",alt:"female",loading:"lazy"}):e.icon),o.createElement(g.T,Object.assign({size:"p3"},E),e.label))}))))))}},zggI:function(e,t,r){r.d(t,{C:function(){return Container}});var a=r("q1tI");let Container=({children:e,className:t,style:r,type:o})=>a.createElement("div",{className:`d76E4SH ${t||""}`,style:r,"data-type":o},e)},p3w3:function(e,t,r){r.d(t,{B:function(){return g}});var a=r("6eqW"),o=r("q1tI"),n=r("/npG"),l=r("HC7W"),i=r("8vDj"),s=r("mAfZ"),d=r("T98o"),c=r("LeBD"),u=(0,n.k)((e,t)=>{var r,a,o,n,i,s;let{other:u}=e,{template:p}=u,{size:g,variant:m,skipHover:h,withColorHover:b,isError:v,isSuccess:f,color:x,gradient:y,children:E,theme:C,customStylesType:w}=t,k="mb"===p||"marryBaby"===C,j=x||(C&&k?"mb":e.primaryColor),O=j.startsWith("#"),L=O?e.fn.lighten(x,.9):(null===(a=null===(r=e.colors)||void 0===r?void 0:r[j])||void 0===a?void 0:a[0])||"",S=O?j:null===(n=null===(o=e.colors)||void 0===o?void 0:o[j])||void 0===n?void 0:n[e.fn.primaryShade()],I=O?e.fn.darken(x,.05):null===(s=null===(i=e.colors)||void 0===i?void 0:i[j])||void 0===s?void 0:s[e.fn.primaryShade()+1],B=w===c.C.LEADGEN;return{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({transition:`all ${d.A} ease-in-out`},y&&Object.assign({border:0,position:"relative"},"secondary"===m&&{"&:before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"#fff",borderRadius:"inherit"}})),{"&:focus":{outline:"none"}}),B&&{borderRadius:12}),!E&&{paddingLeft:"10px",paddingRight:"10px",".mantine-Button-icon":{margin:0}}),(()=>{switch(g){case"xl":return Object.assign({height:56,fontWeight:B?c.F.halfBold:c.F.semiBold,fontSize:B?"15px":k?"14px":"16px",lineHeight:"24px"},B&&{letterSpacing:"-0.3px"});case"lg":return Object.assign({height:48,fontWeight:B?c.F.halfBold:c.F.semiBold,fontSize:B?"15px":k?"14px":"16px",lineHeight:"24px"},B&&{letterSpacing:"-0.3px"});case"md":return Object.assign({height:40,fontWeight:B?c.F.halfBold:c.F.semiBold,fontSize:B?"13px":"14px",lineHeight:B?"20px":"22px"},B&&{letterSpacing:"-0.3px"});case"sm":return Object.assign(Object.assign({height:32,fontWeight:B?c.F.halfBold:c.F.semiBold,fontSize:B?"11px":k?"12px":"14px",lineHeight:B?"16px":"22px"},B&&{letterSpacing:"-0.2px"}),{paddingLeft:"16px",paddingRight:"16px"});case"xs":return Object.assign({height:24,fontWeight:B?c.F.halfBold:c.F.semiBold,fontSize:B?"11px":"12px",lineHeight:B?"16px":"18px",paddingLeft:"8px",paddingRight:"8px"},B&&{letterSpacing:"-0.2px"})}})()),(()=>{switch(m){case"primary":return Object.assign(Object.assign({color:e.white},y?{backgroundImage:y,backgroundColor:"initial"}:{backgroundColor:S}),!h&&{"&:hover":{backgroundColor:y?"initial":I}});case"secondary":return Object.assign(Object.assign(Object.assign({color:S,backgroundColor:"transparent",border:`1px solid ${S}`},y&&{backgroundImage:y,borderColor:"transparent"}),!h&&!y&&{"&:hover":{backgroundColor:L,border:`1px solid ${S}`}}),b&&!y&&{"&:hover":{backgroundColor:S,border:`1px solid ${S}`,color:"#fff"}});case"white":return{color:S,backgroundColor:"transparent",border:"1px solid transparent","&:hover":{backgroundColor:"transparent",borderColor:"transparent"}};case"tertiary":return{color:e.colors.gray[8],backgroundColor:e.white,border:`1px solid ${e.colors.neutral[2]}`,"&:hover":Object.assign({},h?{backgroundColor:e.white,border:`1px solid ${e.colors.neutral[2]}`}:{backgroundColor:e.colors.neutral[0],border:`1px solid ${e.colors.neutral[0]}`})};case"light":return{color:S,backgroundColor:L,border:"1px solid transparent","&:hover":Object.assign({},h?{backgroundColor:L,border:"1px solid transparent"}:{backgroundColor:e.white,border:`1px solid ${L}`})};case"ghost":return Object.assign({color:S,backgroundColor:"transparent",border:"1px solid transparent"},!h&&{"&:hover":{backgroundColor:L,border:"1px solid transparent"}})}})()),{"&[data-disabled]":{backgroundColor:e.colors.gray[1],color:e.colors.gray[4]}}),v?Object.assign({color:e.colors.red[6],backgroundColor:e.white,border:`1px solid ${e.colors.red[6]}`},!h&&{"&:hover":{backgroundColor:e.colors.red[0],border:`1px solid ${e.colors.red[6]}`}}):{}),f?Object.assign({color:e.colors.green[8],backgroundColor:e.colors.green[0]},!h&&{"&:hover":{backgroundColor:e.colors.green[0]}}):{}),inner:Object.assign({ref:(0,l.A)("inner")},y&&{position:"relative"}),leftIcon:{marginRight:8},rightIcon:{},label:Object.assign({},y&&"secondary"===m&&{background:y,"-webkit-background-clip":"text","-webkit-text-fill-color":"transparent"})}});let p={primary:"filled",secondary:"outline",tertiary:"default",light:"light",ghost:"subtle",error:"outline",white:"white",success:"subtle"},g=(0,o.forwardRef)((e,t)=>{var r,n;let l=(0,i.rZ)(),d=Object.assign(Object.assign({},null===(n=null===(r=l.components)||void 0===r?void 0:r.Button)||void 0===n?void 0:n.defaultProps),function(e){let t={};return Object.keys(e).filter(t=>void 0!==e[t]).forEach(r=>t[r]=e[r]),t}(e)),{variant:g,size:m,color:h,gradient:b,skipHover:v,withColorHover:f,className:x,dataEventCategory:y,dataEventAction:E,dataEventLabel:C,children:w,theme:k,component:j,styles:O,classNames:L}=d,S=(0,a._)(d,["variant","size","color","gradient","skipHover","withColorHover","className","dataEventCategory","dataEventAction","dataEventLabel","children","theme","component","styles","classNames"]),I="error"===g,B=(0,c.u)(),{classes:T,cx:N}=u({variant:g,size:m,color:h,gradient:b,skipHover:v,withColorHover:f,isError:I,isSuccess:"success"===g,children:w,theme:k,customStylesType:B},{name:"ButtonMantine",styles:O,classNames:L});return o.createElement(s.z,Object.assign({component:j,className:N(x,g),classNames:{root:T.root,inner:T.inner,leftIcon:T.leftIcon,rightIcon:T.rightIcon,label:T.label},variant:p[g],"data-variant":g,"data-event-category":y,"data-event-action":E,"data-event-label":C,ref:t,loaderProps:S.disabled?{color:"currentColor"}:void 0},S),w)})},rsT4:function(e,t,r){r.d(t,{T:function(){return s}});var a=r("q1tI"),o=r("rBCA"),n=r("4JTe"),l=r("iBNF");let i=o.Z.div` textarea { width: 100%; height: var(--textarea-height, 116px); padding: 1rem; border: 1px solid ${l.r.colors.gray200}; border-radius: 6px; color: ${l.r.colors.gray800}; font-size: 14px; resize: none; &:focus { box-shadow: 0px 0px 2px 2px #91caff; } &::placeholder { color: ${l.r.colors.gray500}; } &:disabled { background-color: ${l.r.colors.neutral50}; cursor: not-allowed; } } `,s=a.forwardRef(({height:e,placeholder:t,labelText:r,labelColor:o,id:l,name:s,onChange:d,value:c,className:u,onKeyPress:p,disabled:g=!1},m)=>a.createElement(i,{className:u,style:{"--textarea-height":e||"116px"}},r&&a.createElement(n.L,{size:"label2",style:{color:o||"#595959"},htmlFor:l},r),a.createElement("textarea",{name:s,ref:m,placeholder:t,id:l,onChange:e=>d&&d(e.target.value),onKeyPress:e=>p&&p(e),value:c,disabled:g})))},NgGj:function(e,t,r){r.d(t,{S:function(){return o}});var a=r("2wr/");let o=a.r},GDet:function(e,t,r){r.d(t,{u:function(){return a}});var a=(0,r("/npG").k)(e=>({root:{},inner:{},content:{borderRadius:16},header:{borderBottom:`1px solid ${e.colors.neutral[1]}`,marginRight:0,marginBottom:0,padding:"12px"},overlay:{},title:{fontSize:16,fontWeight:700,lineHeight:1.5},body:{},close:{cursor:"pointer",width:"unset",height:"unset",svg:{width:"24px !important",height:"24px !important"}}}))},iL0O:function(e,t,r){r.d(t,{L:function(){return LabelSorting}});var a,o,n=r("q1tI"),l=r("ZQ3V"),i=r("4fTT"),s=r("vJ0r");(a=o||(o={})).latest="latest",a.oldest="oldest",a.popular="popular";let LabelSorting=({onChange:e,className:t,style:r,leftLabel:a,rightLabel:o,color:d,value:c,choices:u})=>{let{data:{env:{isMarryBaby:p}}}=(0,n.useContext)(i.T);return n.createElement(s.L,{label:a,rightLabel:n.createElement(s.b,{position:"bottom",align:"end",data:{isShowheader:!1,type:"list",list:u.map(t=>({label:t.label,onClick:()=>e&&e(String(t.value)),selected:t.value===c,className:"bold-item"}))},toggleButtonContent:n.createElement("div",{style:{display:"flex"}},n.createElement(l.T,{style:{display:"flex",alignItems:"center",fontWeight:"normal",marginRight:12},size:"p4"},o),n.createElement("img",{src:p?"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%233E3F58' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m8 14 4 4 4-4M16 10l-4-4-4 4'/%3e%3c/svg%3e":"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath fill='%238C8C8C' d='M4.5 7h7a.46.46 0 0 0 .351-.165.56.56 0 0 0 .149-.39q0-.226-.149-.391l-3.5-3.89a.458.458 0 0 0-.703 0l-3.5 3.89a.56.56 0 0 0-.148.39q0 .226.148.391Q4.298 7 4.5 7M11.5 9h-7a.46.46 0 0 0-.352.165.56.56 0 0 0-.148.39q0 .226.148.391l3.5 3.889a.46.46 0 0 0 .703 0l3.5-3.889a.56.56 0 0 0 .149-.39q0-.226-.149-.391A.46.46 0 0 0 11.5 9'/%3e%3c/svg%3e",style:{width:16,height:16,alignSelf:"center"},loading:"lazy"}))}),color:"gray",className:t,style:r})}},"Gc1+":function(e,t,r){r.d(t,{c:function(){return convertLocalizedStringToNumber},f:function(){return formatPhoneNumber},l:function(){return localizeNumberFormat}});var a=r("A9bs");let localizeNumberFormat=(e,t,r=2)=>Intl.NumberFormat(void 0,{maximumFractionDigits:r}).format(e),convertLocalizedStringToNumber=e=>Number(e.replace(/,/gi,".")),formatPhoneNumber=e=>{try{let t=(0,a.parsePhoneNumber)(e,"VN");if(!(null==t?void 0:t.number))throw Error("Invalid number");return(0,a.formatPhoneNumber)(t.number)}catch(t){return console.log("\uD83D\uDE80 ~ formatPhoneNumber ~ error:",t),e}}},H1qm:function(e,t,r){r.d(t,{L:function(){return l}});var a=r("q1tI"),o=r("i2MM"),n=r("EDn0");let l=(0,a.memo)(({type:e,width:t,height:r,isLight:l})=>{let i=(0,a.useMemo)(()=>{switch(e){case"hellobacsi":return{width:t||"107px",height:r||"24px",src:o.C.getAssetPath("logo/hellobacsi.png"),srcLight:o.C.getAssetPath("logo/hellobacsi-light.png")};case"hellodoktor":return{width:t||"127px",height:r||"24px",src:o.C.getAssetPath("logo/hellodoktor.png")};case"hellosehat":return{width:t||"121px",height:r||"27px",src:o.C.getAssetPath("logo/hellosehat.png")};case"hellojiankang":return{width:t||"87px",height:r||"24px",src:o.C.getAssetPath("logo/hellojiankang.png")};case"hellohealth":return{width:t||"123px",height:r||"24px",src:o.C.getAssetPath("logo/hellohealth.png")};case"hellotogether":return{width:t||"150px",height:r||"24px",src:o.C.getAssetPath("logo/hellotogether.png")};case"hellocare":return{width:t||"99px",height:r||"24px",src:o.C.getAssetPath("logo/hellocare.png")};case"hellodoctor":return{width:t||"127px",height:r||"24px",src:o.C.getAssetPath("logo/hellodoctor.png")};case"hellokrupet":return{width:t||"101px",height:r||"24px",src:o.C.getAssetPath("logo/hellokrupet.png")};case"hellosayarwon":return{width:t||"111px",height:r||"24px",src:o.C.getAssetPath("logo/hellosayarwon.png")};case"helloyishi":return{width:t||"89px",height:r||"24px",src:o.C.getAssetPath("logo/helloyishi.png")};case"hellokhunmor":return{width:t||"123px",height:r||"24px",src:o.C.getAssetPath("logo/hellokhunmor.png")};case"helloswasthya":return{width:t||"105px",height:r||"24px",src:o.C.getAssetPath("logo/helloswasthya.png")};case"logomark":return{width:t||"60px",height:r||"57px",src:o.C.getAssetPath("logo/logomark.png")};case"marryBaby":return{width:t||"145px",height:r||"28px",src:o.C.getAssetPath("logo/marrybaby.png")};default:return null}},[e,t,r]),{src:s,width:d,height:c,srcLight:u}=i||{};return a.createElement(n.I,{alt:`${e} logo`,className:"main-logo-icon",src:l&&u||s,style:{width:d,height:c}})})},unQi:function(e,t,r){r.d(t,{Ct:function(){return Badge},fz:function(){return LoadingOverlay},iR:function(){return Slider}});var a=r("TH2c"),o=r("p3w3"),n=r("6eqW"),l=r("q1tI"),i=r("RGvF"),s=r("eZo4"),d=r("iBNF"),c=r("GjY/");r("rBCA"),r("xXM3"),r("Wgwc");let Badge=e=>{var{color:t=d.r.colors.primaryBase,styles:r}=e,a=(0,n._)(e,["color","styles"]);return l.createElement(i.C,Object.assign({variant:"filled",color:t,styles:Object.assign({root:{borderRadius:"2px",background:t,textTransform:"unset"}},r)},a))},LoadingOverlay=e=>(!function(e=!1){l.useEffect(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}(e.visible),l.createElement(s.f,Object.assign({loaderProps:{color:d.r.colors.primaryBase}},e))),Slider=e=>{var{color:t,withControl:r,onChange:i,value:s,min:d,max:u,isStatic:p,containerClassName:g,containerStyle:m}=e,h=(0,n._)(e,["color","withControl","onChange","value","min","max","isStatic","containerClassName","containerStyle"]);let[b,v]=(0,l.useState)(s||d||0),[f]=(0,c.c)(b,a.D);return(0,l.useEffect)(()=>{null==i||i(f)},[f]),(0,l.useEffect)(()=>{v(s)},[s]),l.createElement(a.j,{className:g,style:m},r&&l.createElement(o.B,{type:"button",size:"sm",variant:"ghost",onClick:()=>{v(e=>d&&e===d?e:e-1)}},l.createElement("svg",{width:"10",height:"10",fill:"none",viewBox:"0 0 12 3"},l.createElement("path",{d:"M1 1.004h8",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),l.createElement(a.k,Object.assign({thumbSize:21,labelAlwaysOn:!0,radius:"xl",color:t,value:b,onChange:p?()=>null:v,min:d,max:u},h,{className:"hhg-mantine-slider "+(h.className||"")})),r&&l.createElement(o.B,{type:"button",size:"sm",variant:"ghost",onClick:()=>{v(e=>u&&e===u?e:e+1)}},l.createElement("svg",{width:"16",height:"20",fill:"none",viewBox:"0 0 16 16"},l.createElement("path",{d:"M8 4v8M4 8h8",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))))}}}]);