"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3097],{VeuN:function(e,t,a){a.d(t,{T:function(){return s}});var r=a("q1tI"),o=a("rBCA"),n=a("OrYH"),l=a("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=r.forwardRef(({height:e,placeholder:t,labelText:a,labelColor:o,id:l,name:s,onChange:c,value:d,className:p,onKeyPress:u,disabled:m=!1},g)=>r.createElement(i,{className:p,style:{"--textarea-height":e||"116px"}},a&&r.createElement(n.L,{size:"label2",style:{color:o||"#595959"},htmlFor:l},a),r.createElement("textarea",{name:s,ref:g,placeholder:t,id:l,onChange:e=>c&&c(e.target.value),onKeyPress:e=>u&&u(e),value:d,disabled:m})))},agy7:function(e,t,a){a.d(t,{D:function(){return DatePicker}});var r=a("ySIk"),o=a("q1tI"),n=a("8vDj"),l=a("gHhT"),i=a("catb"),s=a("KhOF"),c=a("2IpA"),d=a("ypn8"),p=a("rqZo"),u=a("yNk5");let DatePicker=e=>{var t,{value:a,fullWidth:m=!0}=e,g=(0,r._)(e,["value","fullWidth"]);let h=(0,n.rZ)(),v="mb"===h.other.template,x=null===(t=s.I[u.env.UNIFY_LOCALE||p.L.Vietnam])||void 0===t?void 0:t.dateFormat;return o.createElement(i.a,Object.assign({locale:d.M[u.env.UNIFY_LOCALE||p.L.Vietnam],valueFormat:x,size:"md",clearable:!1,popoverProps:m?{styles:{dropdown:{minWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}}}:{},styles:{root:{position:"relative"},rightSection:{pointerEvents:"none",cursor:"default"}},rightSection:o.createElement(l.E,{src:c.C.getAssetPath(v?"MB-calendar.svg":"OutlineCalendar.svg"),width:18,height:18}),value:a,placeholder:x},g,{className:`input-control ${(null==g?void 0:g.className)||""}`}))}},o52H:function(e,t,a){a.d(t,{F:function(){return Footer}});var r=a("q1tI"),o=a("TXjF"),n=a("Wgwc"),l=a.n(n),i=a("SPK5"),s=a("OAL+"),c=a("Eso5"),d=a("Ag88"),p=a("SPEo"),u=a("/MN3"),m=a("rBCA"),g=a("iBNF"),h=a("xrdX"),v=a("O0Wn"),x=a("3E2d");let f=m.Z.footer` background-color: #1b3250; .inner { padding: 64px 24px 98px 24px; margin: 0 auto; } .newsletter { padding: 24px 0; } .footer-logo { max-width: 132px; max-height: 32px; &[data-is-sehat='true'] { max-width: 250px; } img { object-fit: contain; } } .social { margin-top: 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; > .icons { display: flex; gap: 16px; } } hr { height: 1px; border: none; margin: 16px 0 16px 0; background: ${g.r.colors.neutral500}; opacity: 0.1; outline: none; } .footer-menu-column { min-width: 168px; } .footer-menu-title { margin-bottom: 16px; } .footer-menu-link { display: block; } .footer-menu-link-wrapper { display: flex; flex-direction: column; gap: 12px; } .copyright { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; .copyright-content { color: ${g.r.colors.neutral500}; font-size: 12px; } .copyright-image-wrapper { flex-shrink: 0; flex-wrap: wrap; display: flex; gap: 16px; justify-content: flex-end; .copyright-image { align-self: flex-start; img { height: 32px; } } } } .otherSites { display: flex; gap: 16px; align-items: center; padding: 19px 0; border-top: 1px solid ${g.r.colors.neutral100}1a; border-bottom: 1px solid ${g.r.colors.neutral100}1a; .flags { display: flex; gap: 12px; } } .signupButton { display: none; border: none; margin-top: 16px; outline: none; text-transform: uppercase; } ${p.M.mbDown} { .inner { padding: 64px 0; } .social { flex-direction: column; gap: 10px; align-items: start; } hr { margin-top: 0px; } .copyright { align-items: center; text-align: center; } .copyright-image-wrapper { justify-content: center; max-width: unset; } .otherSites { flex-direction: column; padding: 24px 0; .linkTitle { text-align: center; } .flags { flex-wrap: wrap; justify-content: center; } } .footer-menu-title { margin-bottom: 12px; } .footer-menu { display: grid; grid-template-columns: repeat(2, 1fr); > .footer-menu-column { padding: 24px 0; } > .footer-menu-column:first-child { grid-column-start: 1; grid-column-end: 3; border-top: 1px solid ${g.r.colors.neutral100}1a; border-bottom: 1px solid ${g.r.colors.neutral100}1a; > .footer-menu-link-wrapper { display: grid; grid-template-columns: repeat(2, 1fr); } } } .otherSites { margin-bottom: 24px; } } ${p.M.mbUp} { .newsletter > p { max-width: 360px; } .hrMobile { display: none; } .copyright { gap: 24px; flex-direction: row-reverse; align-items: center; justify-content: space-between; } .otherSites { margin-bottom: 40px; } .columns { display: flex; flex-direction: row; width: 100%; gap: 16px; margin-bottom: 40px; > div:nth-child(1) { display: flex; flex-direction: column; flex: 1; } > div:nth-child(2) { display: flex; flex-direction: row; gap: 24px; } } } `,b=m.Z.img` width: 32px; height: 32px; ${p.M.mbDown} { width: 24px; height: 24px; } .country-flag { width: 100%; height: 100%; } `,Flag=({url:e,dataEventCategory:t,dataEventAction:a,dataEventLabel:o})=>r.createElement(b,{loading:"lazy",className:"country-flag",src:e,alt:"Country Flag","data-event-category":t,"data-event-action":a,"data-content-label":o}),FooterMenuColumn=({title:e,items:t,locale:a,index:o})=>{let{isMobile:n}=(0,u.u)();return r.createElement("div",{className:"footer-menu-column"},e?r.createElement(d.T,{size:n?"s4":"s3",className:"footer-menu-title",weight:n?"regular":"semiBold",color:"neutral.6"},e):null,r.createElement("div",{className:"footer-menu-link-wrapper"},null==t?void 0:t.map((e,t)=>r.createElement(d.T,{size:n?"p3":"p4",as:"a","data-event-category":"Footer","data-event-action":e.title,"data-event-label":`https://${h.v[a]}${e.url}`,className:"footer-menu-link",href:e.url,key:t,color:"#fff",weight:n&&0===o?"semiBold":"regular"},e.title))))},DiscoverFooter=({className:e,footerInfo:t,locale:a})=>{var n,i,s,c,p,m,g,h,v,x,b;let{isMobile:y}=(0,u.u)(),w=null==t?void 0:t.menu,E=(null===(i=null===(n=null==t?void 0:t.general)||void 0===n?void 0:n.verified)||void 0===i?void 0:i.filter(Boolean))||[];return r.createElement(f,{className:e},r.createElement(o.C,null,r.createElement("div",{className:"inner"},r.createElement("a",{href:"/"},r.createElement("img",{loading:"lazy",className:"footer-logo",src:null===(s=null==t?void 0:t.general)||void 0===s?void 0:s.logo,alt:"Logo","data-is-sehat":"id-ID"===a})),r.createElement("div",{className:"columns"},r.createElement("div",{className:"newsletter"},r.createElement(d.T,{size:y?"s3":"s4",weight:"semiBold",color:"neutral.0"},null===(c=null==t?void 0:t.general)||void 0===c?void 0:c.content),r.createElement("div",{className:"social"},r.createElement(d.T,{size:"p4",color:"neutral.6"},null===(p=null==t?void 0:t.social)||void 0===p?void 0:p.title),r.createElement("div",{className:"icons"},null===(g=null===(m=null==t?void 0:t.social)||void 0===m?void 0:m.socials)||void 0===g?void 0:g.map((e,t)=>r.createElement("a",{key:t,"data-event-category":"Footer","data-event-action":`Follow us - ${e.name}`,"data-content-label":e.url,href:e.url},r.createElement("img",{loading:"lazy","data-event-category":"Footer","data-event-action":`Follow us - ${e.name}`,"data-content-label":e.url,src:e.icon,alt:"Logo Social",className:"social-icon",width:"24",height:"24"})))))),r.createElement("div",{className:"footer-menu"},w&&r.createElement(r.Fragment,null,null==w?void 0:w.map((e,t)=>r.createElement(FooterMenuColumn,{title:e.menu_title,items:e.items,locale:a,key:t,index:t}))))),r.createElement("div",{className:"otherSites"},r.createElement(d.T,{size:"p4",className:"linkTitle",color:"neutral.6",weight:"regular"},null===(h=null==t?void 0:t.branch)||void 0===h?void 0:h.title),r.createElement("div",{className:"flags"},null===(x=null===(v=null==t?void 0:t.branch)||void 0===v?void 0:v.branch)||void 0===x?void 0:x.map((e,t)=>r.createElement("a",{href:e.url,key:t,"data-event-category":"Footer","data-event-action":e.name,"data-event-label":e.url},r.createElement(Flag,{url:e.flag,dataEventCategory:"Footer",dataEventAction:e.name,dataEventLabel:e.url}))))),r.createElement("div",{className:"copyright"},r.createElement("div",{className:"copyright-image-wrapper"},E.length?E.map((e,t)=>r.createElement("a",{href:e.url,key:t,className:"copyright-image"},r.createElement("img",{loading:"lazy",src:e.image,alt:"DMCA Icon"}))):null),r.createElement(d.T,{size:"n1",className:"copyright-content",as:"div",color:"neutral.6",weight:"regular"},r.createElement("div",{dangerouslySetInnerHTML:{__html:null===(b=null==t?void 0:t.general)||void 0===b?void 0:b.copyright.replace(/{currentYear}/gi,l()().get("year").toString())}}))))))},y=m.Z.footer` position: relative; overflow: hidden; .icons { margin-top: 12px; margin-bottom: 20px; > a:not(:last-child) { margin-right: 16px; } } a { text-decoration: none; } `,w=m.Z.div` position: relative; padding: 80px 0 40px; margin: auto 68px; display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid ${g.r.colors.neutral200}; ${p.M.tdDown} { margin: auto 16px; flex-wrap: wrap; row-gap: 32px; column-gap: 16px; } ${p.M.mbDown} { margin: auto 0; } `,E=m.Z.div` display: flex; justify-content: space-between; gap: 12px; flex-direction: column; ${p.M.mbDown} { flex: 1 1 160px; } .title { padding-bottom: 4px; } `,k=m.Z.div` display: flex; justify-content: space-between; gap: 12px; flex-direction: column; `,C=m.Z.div` background-color: #{map-get($mbColors, 'dark')}; padding: 16px 0; position: relative; img { width: 89px; height: 32px; } .content { display: flex; align-items: center; justify-content: space-between; gap: 174px; margin: auto 68px; ${p.M.tdDown} { margin: auto 16px; } ${p.M.mbDown} { flex-direction: column-reverse; gap: 16px; align-items: flex-start; margin: auto 0; } } .verify { display: flex; align-items: flex-start; gap: 8px; } `,$=m.Z.div` padding: 40px 0; ${p.M.mbUp} { margin: auto 68px; } `,S=m.Z.div` display: flex; gap: 16px; .social-logo { width: 28px; } `,MarryBabyFooter=({logoType:e="marryBaby",footerMenu:t,background:a})=>{var n;if(!t)return null;let{general:p,menu:u,socials:m}=t;return r.createElement(y,{style:{backgroundColor:a||"none"}},r.createElement(o.C,null,r.createElement(w,null,null==u?void 0:u.map(({menu_title:e,items:t},a)=>r.createElement(E,{key:`mbf${a}`},r.createElement(x.M,{className:"title",type:"subtitle-1",color:g.r.mbColors.pink},e),null==t?void 0:t.map(({title:e,url:t},a)=>r.createElement("a",{"data-event-category":"Footer","data-event-action":"Click","data-event-label":`${t}`,className:"link",href:t,key:`footer-links-${a}`},r.createElement(k,{key:`mbitem${a}`},r.createElement(x.M,{type:"bodytext-2",color:g.r.mbColors.gray},e)))))))),r.createElement(o.C,null,r.createElement($,null,r.createElement(i.k,{gap:"24px",sx:e=>({[e.fn.largerThan("sm")]:{".info-item":{flexGrow:1,width:"50%"}},[e.fn.smallerThan("sm")]:{flexDirection:"column"}})},r.createElement(s.K,{spacing:"24px",className:"info-item"},r.createElement(v.L,{className:"logo",type:e}),r.createElement(d.T,{size:"p4",as:"div"},r.createElement("div",{dangerouslySetInnerHTML:{__html:null==p?void 0:p.content}})),r.createElement(S,null,null==m?void 0:m.map(({icon:e,name:t,url:a},o)=>r.createElement("a",{key:`social${o}`,target:"_blank",rel:"noreferrer","data-event-category":"Footer","data-event-action":`Follow us - ${t}`,"data-content-label":t,href:a},r.createElement("img",{className:"social-logo",loading:"lazy",src:e,alt:t}))))),r.createElement(c.x,{className:"info-item",sx:{paddingTop:"7px"}},r.createElement(d.T,{size:"p4",as:"div"},r.createElement("div",{dangerouslySetInnerHTML:{__html:null==p?void 0:p.information}})))))),r.createElement(C,null,r.createElement(o.C,null,r.createElement("div",{className:"content"},r.createElement(d.T,{size:"p5",color:"#fff",as:"div"},r.createElement("div",{dangerouslySetInnerHTML:{__html:null==p?void 0:p.copyright.replace(/{currentYear}/gi,l()().get("year").toString())}})),r.createElement("div",{className:"verify"},null===(n=null==p?void 0:p.verified)||void 0===n?void 0:n.map(({image:e,url:t},a)=>r.createElement("img",{loading:"lazy",key:`imgMbFt${a}`,src:e,alt:t})))))))},Footer=({locale:e,footerInfo:t,siteType:a,background:o})=>"helloSites"===a?r.createElement(DiscoverFooter,{locale:e,footerInfo:t||{}}):r.createElement(MarryBabyFooter,{footerMenu:t,background:o})},XAQb:function(e,t,a){a.d(t,{A:function(){return AddressInput}});var r=a("ySIk"),o=a("q1tI"),n=a("OAL+"),l=a("aDCK"),i=a("c29y"),s=a("KhOF"),c=a("ybaB"),d=a("acje"),p=a("rqZo"),u=a("yNk5");let generateGetAddressDetail=e=>`${s.g}/cities-data-${d.M[e]}.json`,m={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 a={};for(let[,e]of Object.entries(t)){let{id:t}=e;t&&(a[t]=e)}let r={};return e.map(e=>{r[e.name]=a[e.id]}),r},useAddress=({provinces:e})=>{let[t,a]=(0,o.useReducer)(reducer,m),{provinceByName:n,provinces:l,districts:i,wards:s,selectedProvince:c,selectedDistrict:d,selectedWard:g}=t,[h,v]=(0,o.useState)();return(0,o.useEffect)(()=>{(0,r.a)(void 0,void 0,void 0,function*(){var t,r,o;try{let n=yield fetch(generateGetAddressDetail(u.env.UNIFY_LOCALE||p.L.Vietnam)).then(e=>e.json());v(n);let{list:l}=n,i=e?mappingProvinceId(e,l):l,s=Object.keys(i),c=Object.keys((null===(t=l[s[0]])||void 0===t?void 0:t.list)||{}),d=Object.keys((null===(o=null===(r=l[s[0]])||void 0===r?void 0:r[c[0]])||void 0===o?void 0:o.list)||{});a({type:"SET_DATA",payload:{provinceByName:i,provinces:s,districts:c,wards:d}})}catch(e){console.error("Error fetching address data:",e)}})},[u.env.UNIFY_LOCALE]),{provinces:l,districts:i,wards:s,selectedProvince:c,selectedDistrict:d,selectedWard:g,handleProvinceChange:e=>{var t;let r=Object.keys((null===(t=n[e])||void 0===t?void 0:t.list)||{});a({type:"SET_DISTRICTS",payload:r}),a({type:"SET_WARDS",payload:[]}),a({type:"SELECT_PROVINCE",payload:e})},handleDistrictChange:e=>{var t,r;let o=Object.keys((null===(r=null===(t=n[c])||void 0===t?void 0:t.list[e])||void 0===r?void 0:r.list)||{});a({type:"SET_WARDS",payload:o}),a({type:"SELECT_DISTRICT",payload:e})},handleWardChange:e=>{a({type:"SELECT_WARD",payload:e})}}},AddressInput=e=>{var{error:t,provinces:a,placeholder:s}=e,d=(0,r._)(e,["error","provinces","placeholder"]);let{t:p}=(0,c.u)(),{provinces:u,districts:m,wards:g,selectedProvince:h,selectedDistrict:v,selectedWard:x,handleProvinceChange:f,handleDistrictChange:b,handleWardChange:y}=useAddress({provinces:a}),[w,E]=(0,o.useState)("");return(0,o.useEffect)(()=>{h&&v&&x&&w?d.onChange({selectedProvince:h,selectedDistrict:v,selectedWard:x,extraInfo:w}):d.onChange(null)},[h,v,x,w]),o.createElement(i.I.Wrapper,Object.assign({withAsterisk:!0},d),o.createElement(n.K,null,o.createElement(i.S,{placeholder:(null==s?void 0:s.province)||p("onboarding.similac.input.city"),data:a?u:u.sort(),searchable:!0,onChange:f,value:h}),o.createElement(i.S,{placeholder:(null==s?void 0:s.district)||p("onboarding.similac.input.district"),data:m.sort(),searchable:!0,onChange:b,value:v,disabled:!h}),o.createElement(i.S,{placeholder:(null==s?void 0:s.ward)||p("onboarding.similac.input.ward"),searchable:!0,data:g.sort(),value:x,onChange:y,disabled:!h||!v}),o.createElement(i.I,{placeholder:(null==s?void 0:s.address)||p("onboarding.similac.input.no"),disabled:!h||!v||!x,value:w,onChange:E,style:{marginBottom:0}})),o.createElement(l.I.Error,{size:"md"},t))}},Ag88:function(e,t,a){a.d(t,{T:function(){return d}});var r=a("ySIk"),o=a("q1tI"),n=a("/npG"),l=a("8vDj"),i=a("TIp3"),s=a("yQSt"),c=(0,n.k)((e,t)=>{var a,r,o,n,l,i,c,d,p,u;let m=s.a[null==t?void 0:t.customStylesType]||s.a[s.C.NONE],g=null===(a=m.fontSize[null==t?void 0:t.size])||void 0===a?void 0:a[0],h=null===(r=m.lineHeight[null==t?void 0:t.size])||void 0===r?void 0:r[0],v=null!==(l=null===(n=null===(o=m.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,x=null===(i=m.fontSize[null==t?void 0:t.size])||void 0===i?void 0:i[1],f=null===(c=m.lineHeight[null==t?void 0:t.size])||void 0===c?void 0:c[1],b=null!==(u=null===(p=null===(d=m.letterSpacing)||void 0===d?void 0:d[null==t?void 0:t.size])||void 0===p?void 0:p[1])&&void 0!==u?u:0;return{root:Object.assign({},(null==t?void 0:t.size)&&{fontWeight:(null==t?void 0:t.as)==="label"?s.F.semiBold:m.fontWeight[t.weight]||m.fontWeightBySize[null==t?void 0:t.size]||s.F.regular,fontSize:`${g}`,lineHeight:`${h}`,letterSpacing:v,[e.fn.smallerThan("sm")]:{fontSize:`${x}`,lineHeight:`${f}`,letterSpacing:b}})}});let d=(0,o.forwardRef)((e,t)=>{var a,{size:n,color:d,weight:p,as:u="p",styles:m,className:g,dataEventCategory:h,dataEventAction:v,dataEventLabel:x,variant:f}=e,b=(0,r._)(e,["size","color","weight","as","styles","className","dataEventCategory","dataEventAction","dataEventLabel","variant"]);let y=(0,l.rZ)(),w=(0,s.u)(),{classes:E,cx:k}=c({size:n,weight:"caption"===p?"bold":p,as:u,customStylesType:w},{name:"Text",styles:m}),C="string"==typeof y.colors[d]?y.colors[d]:d;return o.createElement(i.x,Object.assign({"data-size":n,className:k(E.root,g),color:C||("label"===u?y.colors.gray[6]:(null===(a=null==y?void 0:y.other)||void 0===a?void 0:a.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:u,"data-event-category":h,"data-event-action":v,"data-event-label":x,classNames:{root:Object.assign(Object.assign({},b.wordWrap?{"word-wrap":b.wordWrap}:void 0),b.isUppercase||"caption"===p?{"text-transform":"uppercase"}:void 0)},ref:t},b))})},"8ZyD":function(e,t,a){a.d(t,{C:function(){return Checkbox},I:function(){return ImageWrapV2},P:function(){return Pagination},S:function(){return y},a:function(){return v},b:function(){return SearchInput},c:function(){return Search2}});var r=a("q1tI"),o=a("rBCA"),n=a("SPEo"),l=a("iBNF"),i=a("ySIk"),s=a("OrYH"),c=a("c29y"),d=a("xBjw");let Search2=e=>r.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 24 25",fill:"none"},e),r.createElement("path",{d:"M11 18.957C14.866 18.957 18 15.823 18 11.957C18 8.09104 14.866 4.95703 11 4.95703C7.13401 4.95703 4 8.09104 4 11.957C4 15.823 7.13401 18.957 11 18.957Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("path",{d:"M20 20.957L16 16.957",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),p=o.Z.div` display: flex; cursor: pointer; &[data-theme='marryBaby'] { input { width: 20px; height: 20px; border: 1.3px solid ${l.r.mbColors.midGray}; border-radius: 9px; cursor: inherit; transition: border-color 0.4s, box-shadow 0.4s; &:hover, &:active { border-color: ${l.r.mbColors.cobalt}; box-shadow: 0 0 2px 2px ${l.r.mbColors.cobalt}; } &:focus-visible { border: 2px solid ${l.r.mbColors.cobalt}; } &:checked { border: 0; background: ${l.r.mbColors.cobalt} url("data:image/svg+xml,%3Csvg width='9' height='7' viewBox='0 0 9 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.5 4L3.45455 6L8 1' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A") no-repeat center center; } } label { max-width: 15rem; margin-left: 8px; width: calc(100% - 24px); cursor: inherit; font-weight: 600; font-size: 12px; line-height: 20px; letter-spacing: -0.2px; color: ${l.r.mbColors.gray}; } } input { width: 20px; height: 20px; border: solid 1px ${l.r.colors.gray500}; border-radius: 2px; cursor: inherit; transition: border-color 0.4s, box-shadow 0.4s; &:hover, &:active { border-color: ${l.r.colors.primaryBase}; box-shadow: 0 0 2px 2px ${l.r.colors.primary200}; } &:focus-visible { border: 2px solid ${l.r.colors.primaryActive}; } &:checked { border: 0; background: ${l.r.colors.primaryBase} url("data:image/svg+xml,%3Csvg width='12' height='9' viewBox='0 0 12 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 1L4.125 8L1 4.81819' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A") no-repeat center center; } } label { max-width: 15rem; margin-left: 8px; font-weight: ${l.r.sizes.fwRegular}; width: calc(100% - 24px); cursor: inherit; ${n.M.mbDown} { font-size: 14px; line-height: 24px; } ${n.M.mbUp} { font-size: 16px; line-height: 22px; } } &[data-is-rectangle] > input { position: relative; width: unset; height: unset; padding: 5px 12px; border: 1px solid ${l.r.colors.neutral100}; border-radius: 32px; &::after { color: ${l.r.colors.gray800}; content: attr(data-label-text); font-size: 13px; } &:checked { border-color: ${l.r.colors.primary50}; &::after { color: ${l.r.colors.primaryBase}; } } &:checked { background: ${l.r.colors.primary50}; } } &[data-disabled] { color: ${l.r.colors.gray300}; cursor: not-allowed; input { border-color: ${l.r.colors.gray300}; &:hover { border-color: ${l.r.colors.gray300}; box-shadow: none; } } } `,Checkbox=({label:e,name:t,checked:a,className:o,isDisabled:n,onChange:l,value:i,isRectangle:s,inputDataTestId:c,siteType:d})=>r.createElement(p,{className:o,"data-disabled":n||void 0,"data-is-rectangle":s||void 0,"data-label-text":e,"data-theme":d},r.createElement("input",{type:"checkbox",checked:a,name:t,onChange:()=>l(i,!a),disabled:n,value:i,id:`${t}-${i}`,"data-label-text":e,"data-testid":c}),!s&&r.createElement("label",{htmlFor:`${t}-${i}`},e)),u=o.Z.div` display: flex; align-items: center; justify-content: space-between; user-select: none; li { transition: all 0.3s ease; } [data-page-active] { background: ${l.r.colors.primaryBase}; color: ${l.r.colors.white}; > a { color: ${l.r.colors.white}; } } `,m=o.Z.div` display: flex; width: 32px; height: 32px; box-sizing: border-box; align-items: center; justify-content: center; border: 1px solid ${l.r.colors.gray200}; margin: 0 2px; border-radius: 4px; color: ${l.r.colors.gray800}; cursor: pointer; font-size: 14px; font-weight: ${l.r.sizes.fwBold}; &[data-last-page] { border: none; background-color: ${l.r.colors.gray100}; cursor: not-allowed; pointer-events: none; svg { path { stroke: ${l.r.colors.gray300}; } } } `,g=o.Z.li` display: flex; width: 32px; height: 32px; align-items: center; justify-content: center; margin: 0 2px; border-radius: 4px; color: ${l.r.colors.gray800}; cursor: pointer; font-size: 14px; font-weight: ${l.r.sizes.fwBold}; > a { color: ${l.r.colors.gray800}; text-decoration: unset; display: block; width: 100%; height: 100%; line-height: 32px; text-align: center; } `,RenderPagiWithDots=({pagesAmount:e,activePage:t,handlePageChange:a,handleClick:o,href:l,queryPageName:i="page"})=>{let s=[...Array(e)].map((e,t)=>t+1),[c,d]=(0,r.useState)(t<=4?s.slice(0,5):t>=s.length-3?s.slice(s.length-5,s.length):s.slice(t-2,t+1));return(0,r.useEffect)(()=>{t<=4?d(s.slice(0,5)):t>=s.length-3?d(s.slice(s.length-5,s.length)):d(s.slice(t-2,t+1))},[t]),r.createElement(r.Fragment,null,t>4&&r.createElement(r.Fragment,null,r.createElement(g,{onClick:()=>a(1)},l?r.createElement("a",{href:l,onClick:o},1):1),r.createElement(g,null,"...")),c.map(e=>r.createElement(g,{key:`pagination+${e}`,"data-page-active":e===t||void 0,onClick:()=>a(e)},l?r.createElement("a",{href:(0,n.f)(l,e,i),onClick:o},e):e)),ta(s.length)},l?r.createElement("a",{href:(0,n.f)(l,s.length,i),onClick:o},s.length):s.length)))},Pagination=({className:e,pagesAmount:t,currentPage:a,onChange:o,onClick:l,style:i,href:s,queryPageName:c="page"})=>{let d=[...Array(t)].map((e,t)=>t+1),[p,h]=(0,r.useState)(a),v=(0,r.useMemo)(()=>s&&s.endsWith("&page=")?s.replace("&page=",""):s,[s]),x=t-1,handlePageChange=e=>{e<=t&&e>0&&(h(e),o(e))},handleClick=e=>{l&&l(e)};return(0,r.useEffect)(()=>{h(a)},[a]),r.createElement(u,{className:e,style:i},r.createElement(m,{className:"prev-page",onClick:()=>handlePageChange(p-1),"data-last-page":1===p||void 0},v?r.createElement("a",{href:(0,n.f)(v,p,c),onClick:handleClick},r.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},r.createElement("path",{d:"M5.5 9L1.5 5L5.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))):r.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},r.createElement("path",{d:"M5.5 9L1.5 5L5.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))),d.length>8?r.createElement(RenderPagiWithDots,{pagesAmount:t,activePage:p,handlePageChange:handlePageChange,handleClick:handleClick,href:v,queryPageName:c}):d.map(e=>r.createElement(g,{key:`pagination+${e}`,"data-page-active":e===p||void 0,onClick:()=>handlePageChange(e)},v?r.createElement("a",{href:(0,n.f)(v,e,c),onClick:handleClick},e):e)),r.createElement(m,{className:"next-page",onClick:()=>handlePageChange(p+1),"data-last-page":p===x+1||void 0},v?r.createElement("a",{href:(0,n.f)(v,p,c),onClick:handleClick},r.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},r.createElement("path",{d:"M1.5 9L5.5 5L1.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))):r.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},r.createElement("path",{d:"M1.5 9L5.5 5L1.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))))},h=o.Z.div` position: relative; width: 100%; &[data-has-error] { input { border-color: ${l.r.colors.red700}; } } input { width: 100%; padding: 12px 16px; border: solid 1px ${l.r.colors.gray200}; border-radius: ${l.r.borderRadius}; &:active, &:focus, .focused & { border-color: ${l.r.colors.primaryBase}; box-shadow: 0px 0px 2px 2px ${l.r.colors.primary200}; } &:disabled { background-color: ${l.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: ${l.r.sizes.fwRegular}; ${n.M.mbDown} { font-size: 22px; line-height: 1.2; } ${n.M.mbUp} { font-size: 26px; line-height: 1.2; } } } &[data-size='md'] { input { font-weight: ${l.r.sizes.fwRegular}; ${n.M.mbDown} { font-size: 14px; line-height: 1.2; } ${n.M.mbUp} { font-size: 16px; line-height: 1.2; } } } &[data-size='sm'] { input { font-weight: ${l.r.sizes.fwRegular}; ${n.M.mbDown} { font-size: 13px; line-height: 1.5; } ${n.M.mbUp} { font-size: 13px; line-height: 1.5; } } } `,v=r.forwardRef((e,t)=>{var{name:a,errorMessage:o,autoComplete:n="off",defaultValue:l,actionIcon:c,displayIcon:d,isDeleteAction:p,onActionClick:u,label:m,placeholder:g,className:v,onChange:x,onKeyPress:f,isDisabled:b,CustomInput:y,size:w,style:E,autoFocus:k,type:C="text",isNumerousKeyboard:$=!1,onFocus:S,enterKeyHint:N,nativeOnChange:z}=e,I=(0,i._)(e,["name","errorMessage","autoComplete","defaultValue","actionIcon","displayIcon","isDeleteAction","onActionClick","label","placeholder","className","onChange","onKeyPress","isDisabled","CustomInput","size","style","autoFocus","type","isNumerousKeyboard","onFocus","enterKeyHint","nativeOnChange"]);let[j,L]=(0,r.useState)(l),handleOnChange=e=>{L(e),x(e)};return r.createElement(h,{"data-size":w,className:v,"data-has-action-icon":!!c||void 0,"data-has-display-icon":!!d||void 0,"data-has-error":o&&o.length>0||void 0,style:E},m&&r.createElement(s.L,{size:"label2",htmlFor:a,className:"inputLabel"},m),r.createElement("div",{style:{position:"relative"}},y||r.createElement("input",Object.assign({id:a,name:a,placeholder:g,onChange:null!=z?z:e=>handleOnChange(e.target.value),onKeyPress:f,type:C,"aria-label":C,disabled:b,value:j,autoComplete:n,ref:t,autoFocus:k,inputMode:$||"number"===C?"numeric":C,pattern:$?"[0-9]*":".*",onFocus:S,enterKeyHint:N},I)),d&&r.createElement(s.S,{className:"displayIcon"},d),c&&r.createElement(s.a,{className:"actionIcon",onClick:()=>{var e;p&&(L(""),null===(e=t.current)||void 0===e||e.focus()),u&&u()}},c)),o&&o.length>0&&r.createElement(s.b,{className:"errorLabel"},o))});v.displayName="PureInput";let x=[320,420,640,750,828,1080,1200,1440,1920,2048],defaultLoader=({src:e,width:t,quality:a})=>{try{let r=new URL(e,"undefined"!=typeof window?window.location.origin:"http://localhost");return r.searchParams.set("w",String(t)),r.searchParams.set("q",String(null!=a?a:75)),r.toString()}catch(t){return e}},ImageWrapV2=e=>{var{alt:t,backupSrc:a,src:o,placeholderSrc:n,style:l,ref:s,unoptimized:c=!1,quality:d,sizes:p,width:u}=e,m=(0,i._)(e,["alt","backupSrc","src","placeholderSrc","style","ref","unoptimized","quality","sizes","width"]);let[g,h]=(0,r.useState)(!1),v=(0,r.useMemo)(()=>c?[]:function(e){if(e.sizes)return x;if(e.width){let t=Math.max(1,Math.round(e.width));return Array.from(new Set([t,Math.min(2*t,2048)])).sort((e,t)=>e-t)}return x}({sizes:p,width:u}),[p,u,c]),b=(0,r.useMemo)(()=>{if(!c)return v.map(e=>`${defaultLoader({src:o,width:e,quality:d})} ${e}w`).join(", ")},[c,v,o,d]),y=(0,r.useMemo)(()=>{if(c)return o;let e=v.length?v[v.length-1]:null!=u?u:1920;return defaultLoader({src:o,width:e,quality:d})},[c,v,o,d,u]);return r.createElement(f,Object.assign({loading:"lazy",alt:t,srcSet:b,onError:()=>!g&&h(!0),src:g?a||y:y||a,style:Object.assign(Object.assign({},n?{backgroundImage:`url(${n})`}:{}),l),"data-has-placeholder":!!n,sizes:p,ref:s},m))},f=o.Z.img` &[data-has-placeholder='true'] { background-position: center; background-repeat: no-repeat; background-size: cover; } `,b=(0,o.Z)(c.I)` box-shadow: 0px 0px 1px 0px #0000000a, 0px 2px 8px 0px #0000000a, 0px 10px 16px 0px #0000000a; border-radius: 0.75rem; overflow: hidden; input.mantine-Input-input { border: none; font-size: 0.8125rem; line-height: 1.25rem; } .close-icon-wrapper { display: none; background-color: ${l.r.colors.gray400}; border-radius: 100%; cursor: pointer; width: 20px; height: 20px; padding: 2px; svg { pointer-events: none; } &[data-is-disabled='true'] { opacity: 0.2; cursor: not-allowed; pointer-events: none; } } input.mantine-Input-input:focus ~ .mantine-Input-rightSection .close-icon-wrapper, input.mantine-Input-input:not(:placeholder-shown) ~ .mantine-Input-rightSection .close-icon-wrapper { display: flex; } `,y=(0,o.Z)(Search2)` color: ${l.r.colors.primaryBase}; width: 20px; height: 20px; `,SearchInput=e=>{let{loading:t,disabled:a,placeholder:o,value:n,onChange:l,icon:s=r.createElement(y,null),className:c,style:p,enableClear:u}=e,m=(0,i._)(e,["loading","disabled","placeholder","value","onChange","icon","className","style","enableClear"]);return r.createElement(b,Object.assign({disabled:t||a,size:"lg",value:n,onChangeRaw:e=>{l(e.currentTarget.value)},type:"text",placeholder:o,className:c,icon:s,style:p,rightSection:u?r.createElement("div",{className:"close-icon-wrapper",onClick:()=>{l("")},"data-is-disabled":!n},r.createElement(d.C,{fill:"white",width:"100%",height:"100%"})):void 0},m,{"data-event-label":n}))}},"2IpA":function(e,t,a){a.d(t,{C:function(){return i}});var r=a("xrdX"),o=a("GOBr"),n=a("yNk5");let isNumeric=e=>!isNaN(parseFloat(e))&&isFinite(e),l="hellosehat.com",i=new class{constructor(){this.baseDomain="",this.subPath="",this.getAssetPath=(e,t,a)=>{let r="https://hhg-common."+[t||this.getBaseDomain(),a||this.subPath,e].join("/");return o.y||n.env.JEST_WORKER_ID?r:r+"?v="+Math.floor(new Date().getTime()/1e3/60/3)}}getBaseDomain(){if(this.baseDomain)return this.baseDomain;if("undefined"!=typeof window){let{host:e}=window.location,t=e.split("."),a=r.v[Object.keys(r.v).find(t=>e.includes(r.v[t]))];return t.includes("localhost")||t.includes("hellohealthgroup")||t.every(e=>isNumeric(e))||!a?l:a}return l}};i.subPath="common",i.baseDomain=r.v["vi-VN"]},bx3X:function(e,t,a){a.d(t,{P:function(){return Popup}});var r=a("q1tI"),o=a("rBCA"),n=a("SPEo"),l=a("iBNF");let i=o.Z.div` position: fixed; left: 50%; padding: 0 16px 32px; background-color: ${l.r.colors.white}; border-radius: ${l.r.borderRadius}; box-shadow: 0px 4px 8px ${l.r.colors.gray200}; transform: translate(-50%, -50%); transition: all 0.5s ease-in-out; visibility: hidden; &[data-open='true'] { z-index: 400; top: 50%; opacity: 1; visibility: visible; } &[data-open='false'] { top: -50%; } &[data-type='lead'] { width: 332px; height: 460px; div { top: -15px; right: -15px; } } &[data-type='form'] { width: 496px; height: 548px; ${n.M.mbDown} { width: 340px; } } &[data-type='confirm'] { ${n.M.mbDown} { width: calc(100% - 32px); } ${n.M.mbUp} { width: 100%; max-width: 407px; } } .popup-content { position: relative; z-index: 111; height: 100%; padding: 16px; } .close-button { position: absolute; top: 16px; right: 0; cursor: pointer; img { width: 100%; height: 100%; border-radius: 50%; } } `,s=o.Z.div` position: fixed; z-index: 110; top: 0; left: 0; width: 100%; height: 100%; align-items: center; background: rgba(38, 38, 38, 0.3); &[data-open='false'] { display: none; } `,Popup=({type:e="lead",closeIcon:t,isOpen:a=!0,onClose:o,children:n,className:l="",enableAnimation:c=!0,disableClickOutside:d=!1})=>r.createElement(r.Fragment,null,r.createElement(i,{"data-open":a,"data-type":e,"data-animation":c},r.createElement("div",{className:`${l||""} popup-content`},!!t&&r.createElement("div",{className:"close-button",onClick:o},t),n)),r.createElement(s,{"data-open":a,onClick:()=>{d||o()}}))}}]);