"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4190],{rnEe:function(e,t,a){a.d(t,{I:function(){return Indicator}});var o=a("SwpR"),i=a("q1tI"),n=a("QJsO"),l=a("iBNF");let Indicator=e=>{var{styles:t,color:a=l.r.colors.red700}=e,r=(0,o._)(e,["styles","color"]);return i.createElement(n.z,Object.assign({inline:!0,position:"top-end",offset:4,styles:Object.assign({processing:{animationDirection:"alternate"}},t),color:a},r))}},"GP+g":function(e,t,a){a.d(t,{M:function(){return MantineProvider}});var o=a("SwpR"),i=a("q1tI"),n=a("8vDj"),l=a("9s1y"),r=a("pfEW");let MantineProvider=e=>{var{children:t,locale:a,template:s="hb",isNotifications:c=!0,customStyleType:d=r.C.NONE}=e,p=(0,o._)(e,["children","locale","template","isNotifications","customStyleType"]);return(0,l.u)(a),i.createElement(n.Me,Object.assign({theme:(0,l.g)(a,s,d)},p),i.createElement(r.T,{variant:d},t,c&&i.createElement(l.N,null)))}},o61I:function(e,t,a){a.d(t,{D:function(){return Dropdown}});var o=a("q1tI"),i=a("8vDj"),n=a("rBCA"),l=a("iBNF");let r=n.Z.div` --dropdown-padding: 12px 18px 12px 16px; position: relative; box-sizing: border-box; border: 1px solid ${l.r.colors.gray200}; background: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23595959' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A") no-repeat; background-position: right 16px center; border-radius: ${l.r.borderRadius}; &[data-disabled='true'], :disabled { background-color: #f2f2f2; cursor: not-allowed; } &[data-size='sm'] { font-size: 13px; line-height: 20px; } &[data-size='md'] { font-size: 14px; line-height: 21px; } &[data-size='lg'] { font-size: 16px; line-height: 24px; } &[data-has-icons='true'] { border: none; background: ${l.r.colors.gray100}; img, svg { display: inline-block; max-width: 16px; margin-right: 6px; } span { display: inline-block; vertical-align: middle; } &:hover { box-shadow: none; } > div { position: relative; display: flex; width: 100%; box-sizing: border-box; align-items: center; } > div::after { position: absolute; top: 50%; right: 12px; width: 10px; height: 8px; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23595959' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); background-repeat: no-repeat; content: ''; transform: translateY(-50%); } } &:hover { box-shadow: 0 0 2px 2px ${e=>e.shadowColor}; } &[data-is-native='true'] { padding: var(--dropdown-padding); line-height: 24px; &:focus { box-shadow: 0px 0px 2px 2px ${e=>e.shadowColor}; } } `,s=n.Z.div` padding: var(--dropdown-padding); cursor: pointer; &.with-label { padding-top: 34px; padding-bottom: 12px; } &[data-dropdown-open] { padding: 11px 15px 11px 15px; border: 1px solid ${e=>e.color}; border-radius: ${l.r.borderRadius}; box-shadow: 0 0 2px 2px ${e=>e.shadowColor}; } `,c=n.Z.ul` position: absolute; top: 100%; /* right: 0; */ min-width: 100%; left: 0; display: block; margin-top: 4px; background: ${l.r.colors.white}; border-radius: ${l.r.borderRadius}; box-shadow: -1px 1px 2px rgba(67, 70, 74, 0.0001), -2px 2px 5px rgba(67, 86, 100, 0.123689); cursor: pointer; &[data-has-icons='true'] { border: 1px solid ${l.r.colors.gray200}; background: white; box-shadow: none; filter: drop-shadow(0px 10px 16px rgba(0, 0, 0, 0.04)); } `,d=n.Z.li` display: flex; padding: 12px 18px 12px 16px; &[data-disabled='true'] { cursor: not-allowed; color: #bfbfbf; & > * { pointer-events: none; } } &:hover, :active { background: ${l.r.colors.gray100}; } `,p=n.Z.div` max-width: 16px; margin-right: 8px; `,u=n.Z.div` position: absolute; top: 12px; left: 16px; pointer-events: none; `,Dropdown=({className:e,value:t,options:a,onChange:n=()=>void 0,id:l,placeholderIcon:h,placeholder:g,style:m,size:E="lg",groupedWithLabel:y,disabled:b,dropdownLabelTrackingAttributes:f={},isNativeSelect:I=!1})=>{let x=(0,i.rZ)(),[C,O]=o.useState(!1),showDropdown=()=>!b&&O(!C);if(I){let e="object"==typeof(null==t?void 0:t.value)&&t.value instanceof Date?t.value.toString():null==t?void 0:t.value;return o.createElement(r,{color:x.fn.primaryColor(),shadowColor:x.colors[x.primaryColor][2],as:"select","data-is-native":"true",value:e||void 0,disabled:b,onChange:e=>{if("string"==typeof e.target.value){let t=a.find(t=>t.value===e.target.value);t&&n(t)}}},g&&o.createElement("option",{value:g,disabled:!0,selected:!0},g),a.map(e=>o.createElement("option",{key:`${l}-${e.value}`,value:e.value,disabled:!!e.disabled&&e.disabled},e.label)))}return o.createElement(r,{color:x.fn.primaryColor(),shadowColor:x.colors[x.primaryColor][2],className:e,"data-dropdown-open":C||void 0,"data-size":E,id:l,"data-has-icons":!!h,style:m,onBlur:()=>O(!1),tabIndex:0,"data-disabled":b},!!y&&o.createElement(u,null,y),o.createElement(s,Object.assign({color:x.fn.primaryColor(),shadowColor:x.colors[x.primaryColor][2],onClick:showDropdown,className:y&&"with-label"},f),h," ",o.createElement("span",null,t&&t.value?t.label:g)),C&&o.createElement(c,{onClick:showDropdown,"data-has-icons":!!h},a.map(e=>o.createElement(d,{key:`${l}-${e.value}`,"data-selected":t&&t.value===e.value||void 0,onClick:()=>!e.disabled&&!b&&(null==n?void 0:n(e)),"data-disabled":!!e.disabled&&e.disabled},e.icon&&o.createElement(p,null,e.icon),e.label))))}},"0Pmq":function(e,t,a){a.d(t,{T:function(){return Text}});var o=a("SwpR"),i=a("q1tI"),n=a("2YCo");let Text=e=>{var{size:t="base",type:a="regular"}=e,l=(0,o._)(e,["size","type"]);return i.createElement(n.T,Object.assign({size:t,weight:"caption"===a?"bold":a,"data-size":t,"data-type":a,"data-word-wrap":l.wordWrap,"data-is-uppercase":l.isUppercase},l))}},HKEf:function(e,t,a){a.d(t,{T:function(){return TextArea}});var o=a("SwpR"),i=a("q1tI"),n=a("0qvZ"),l=a("Biuj"),r=a("pfEW");let TextArea=e=>{var{styles:t}=e,a=(0,o._)(e,["styles"]);let s=(0,r.u)(),{classes:c}=(0,l.u)({variantStyle:s},{name:"MantineTextarea",styles:t});return i.createElement(n.g,Object.assign({classNames:{input:c.input},minRows:2,maxRows:4},a))}},f4gb:function(e,t,a){a.d(t,{L:function(){return Logo}});var o=a("q1tI"),i=a("XgXa"),n=a("Ejk3"),l=a("rBCA"),r=a("eePC"),s=a("B++p"),c=a("9S3P");let d=l.Z.div` position: relative; display: inline-flex; align-items: center; z-index: 0; .main-logo-icon { object-fit: contain; } &[data-logo-is-light] { > svg path { fill: #fff; } img { filter: brightness(0) invert(1); } } &[data-has-badge] { @supports (display: flex) and (gap: 1em) { gap: 0.5rem; } @supports not ((display: flex) and (gap: 1em)) { > img { margin-left: 0.25rem; } } } .common-logo-seasonal-left, .common-logo-seasonal-right { z-index: -1; max-width: unset; max-height: unset; pointer-events: none; } .common-logo-seasonal-left { position: absolute; top: 50%; left: 0; transform: translateY(-50%); pointer-events: none; } .common-logo-seasonal-right { position: absolute; top: 50%; right: 0; transform: translateY(-50%); } &[data-seasonal='christmas'] { padding-left: 37px; padding-right: 22px; .common-logo-seasonal-left { width: 125px; height: 56px; } .common-logo-seasonal-right { width: 23px; height: 17px; } ${r.M.mbDown} { padding-left: 30px; padding-right: 16px; .common-logo-seasonal-left { // width: 125px; height: 46px; } .common-logo-seasonal-right { // width: 23px; height: 12px; } } } &[data-seasonal='new-year'] { padding-right: 85px; .common-logo-seasonal-left { top: 35%; width: 100px; height: 56px; } .common-logo-seasonal-right { width: 85px; height: 54px; } ${r.M.mbDown} { padding-right: 0; .common-logo-seasonal-right { display: none; } } } &[data-seasonal='lunar-new-year'] { padding-left: 30px; padding-right: 35px; .common-logo-seasonal-left { width: 33px; height: 41px; } .common-logo-seasonal-right { width: 37px; height: 54px; } } &[data-seasonal='ramadan'] { &[data-type='hellosehat'] { padding-right: 35px; .common-logo-seasonal-left { width: 165px; height: unset; left: 6px; } .common-logo-seasonal-right { width: 33px; height: unset; } } &[data-type='hellodoktor'] { padding-right: 66px; .common-logo-seasonal-left { width: 133px; height: unset; left: 6px; } .common-logo-seasonal-right { width: 63px; height: unset; } } } &[data-seasonal='hung-king'] { &[data-type='hellobacsi'] { .common-logo-seasonal-left { width: 134px; height: unset; left: 50%; top: 50%; transform: translate(-50%, -50%); } } &[data-type='marryBaby'] { .common-logo-seasonal-left { width: 145px; height: unset; left: 50%; top: 50%; transform: translate(-50%, -50%); } } } &[data-seasonal='vn-independent-day'] { &[data-type='hellobacsi'], &[data-type='marryBaby'] { .common-logo-seasonal-left.desktop-only { width: unset; height: 56px; left: 65%; top: 50%; transform: translate(-50%, -50%); } } &[data-type='marryBaby'] { .common-logo-seasonal-left.desktop-only { left: 50%; z-index: 1; } } &[data-type='hellobacsi'], &[data-type='marryBaby'] { .common-logo-seasonal-left.mobile-only { width: unset; height: 56px; left: 60%; top: 50%; transform: translate(-50%, -50%); } } &[data-type='marryBaby'] { .common-logo-seasonal-left.mobile-only { left: 40%; z-index: 1; } } } .desktop-only { ${r.M.mbDown} { display: none; } } .mobile-only { ${r.M.mbUp} { display: none; } } `,p=l.Z.img` height: 16px; width: unset; margin-bottom: 4px; margin-left: -3px; `,isChristmas=e=>{let t=e.getDate(),a=e.getMonth();return 11===a&&t>=16&&t<=25},u={2023:[22,0],2024:[10,1],2025:[29,0],2026:[17,1],2027:[6,1],2028:[26,0],2029:[13,1],2030:[3,1],2031:[23,0],2032:[11,1],2033:[31,0],2034:[19,1],2035:[8,1],2036:[28,0],2037:[15,1],2038:[4,1],2039:[24,0],2040:[12,1]},h=[i.L.Vietnam,i.L.Taiwan,i.L.Indonesia,i.L.Malaysia],isLunarNewYear=e=>{let t=e.getFullYear(),a=u[t];if(!a)return!1;let o=new Date(t,a[1],a[0]),i=new Date(o);i.setDate(o.getDate()-7);let n=new Date(o);return n.setDate(o.getDate()+5),i<=e&&e<=n},isNewYear=e=>{let t=e.getDate(),a=e.getMonth();return 11===a&&t>=26||0===a&&t<=15},g=[{year:2024,start:[10,2],end:[8,3]},{year:2025,start:[1,2],end:[30,2]},{year:2026,start:[18,1],end:[19,2]},{year:2027,start:[8,1],end:[9,2]},{year:2028,start:[28,0],end:[26,1]},{year:2029,start:[16,0],end:[14,1]},{year:2030,start:[6,0],end:[4,1]},{year:2030,start:[26,11],end:[24,0,2031]},{year:2031,start:[15,11],end:[13,0,2032]},{year:2032,start:[4,11],end:[2,0,2033]}],isRamadan=e=>{let t=e.getFullYear(),a=g.filter(e=>e.year===t);return!!a.length&&a.some(a=>{let o=a.start[2]||t,i=new Date(o,a.start[1],a.start[0]),n=new Date(o,a.end[1],a.end[0]);return i<=e&&e<=n})},m={2024:[18,3],2025:[7,3],2026:[26,3],2027:[16,3],2028:[4,3],2029:[23,3],2030:[12,3],2031:[1,3],2032:[19,3],2033:[9,3],2034:[28,3],2035:[17,3]},isVNHungKing=e=>{let t=e.getFullYear(),a=m[t];if(!a)return!1;let o=new Date(t,a[1],a[0]),i=new Date(o);i.setDate(o.getDate()-1);let n=new Date(o);return n.setDate(o.getDate()+1),i<=e&&e<=n},isVN3004=e=>{let t=e.getFullYear(),a=new Date(t,3,30),o=new Date(a);o.setDate(a.getDate()-1);let i=new Date(a);return i.setDate(a.getDate()+2),o<=e&&e<=i},isLabourDay=e=>{let t=e.getFullYear(),a=new Date(t,4,1),o=new Date(a);o.setDate(a.getDate()-1);let i=new Date(a);return i.setDate(a.getDate()+1),o<=e&&e<=i},isVNIndependentDay=e=>{let t=e.getFullYear(),a=new Date(t,8,2),o=new Date(a);o.setDate(a.getDate()-1);let i=new Date(a);return i.setDate(a.getDate()+1),o<=e&&e<=i},Logo=({type:e,className:t,style:a,isLightLogo:l,customSize:r,badge:u,locale:g,dateForSeasonal:m,isPro:E})=>{let[y,b]=(0,o.useState)({isChristmas:!1,isLunarNewYear:!1,isNewYear:!1,isRamadan:!1,isVNHungKing:!1,isVN3004:!1,isLabourDay:!1,isVNIndependentDay:!1});return(0,o.useEffect)(()=>{if(!m||isNaN(new Date(m).getTime()))return;let e=new Date(m),t=isChristmas(e),a=h.includes(g)&&isLunarNewYear(e),o=!a&&isNewYear(e),n=isRamadan(e),l=g===i.L.Vietnam&&isVNHungKing(e),r=g===i.L.Vietnam&&isVN3004(e),s=g===i.L.Vietnam&&isLabourDay(e),c=g===i.L.Vietnam&&isVNIndependentDay(e);b({isChristmas:t,isLunarNewYear:a,isNewYear:o,isRamadan:n,isVNHungKing:l,isVN3004:r,isLabourDay:s,isVNIndependentDay:c})},[g,new Date(m).getDate()]),o.createElement(d,{className:t,style:a,"data-logo-is-light":l||void 0,"data-has-badge":!!u,"data-seasonal":y.isRamadan?"ramadan":y.isChristmas?"christmas":y.isLunarNewYear?"lunar-new-year":y.isNewYear?"new-year":y.isVNHungKing?"hung-king":y.isVN3004?"30-04":y.isLabourDay?"labour-day":y.isVNIndependentDay?"vn-independent-day":void 0,"data-type":e},y.isChristmas?o.createElement(o.Fragment,null,o.createElement(c.I,{alt:"left xmas logo",src:n.C.getAssetPath("logo/xmas-left.png"),className:"common-logo-seasonal-left"}),o.createElement(c.I,{alt:"right xmas logo",src:n.C.getAssetPath("logo/xmas-right.png"),className:"common-logo-seasonal-right"})):y.isNewYear?o.createElement(o.Fragment,null,o.createElement(c.I,{alt:"left new year logo",src:n.C.getAssetPath("logo/new-year-left.png"),className:"common-logo-seasonal-left"}),o.createElement(c.I,{alt:"right new year logo",src:n.C.getAssetPath("logo/new-year-right.png"),className:"common-logo-seasonal-right"})):y.isLunarNewYear?o.createElement(o.Fragment,null,o.createElement(c.I,{alt:"left lunar new year logo",loading:"lazy",src:n.C.getAssetPath("logo/lunar-new-year-left.png"),className:"common-logo-seasonal-left"}),o.createElement(c.I,{alt:"right lunar new year logo",loading:"lazy",src:n.C.getAssetPath("logo/lunar-new-year-right.png"),className:"common-logo-seasonal-right"})):y.isRamadan&&"hellosehat"===e?o.createElement(o.Fragment,null,o.createElement(c.I,{alt:"left ramadan logo",loading:"lazy",src:n.C.getAssetPath("logo/ramadan-sehat-left.png"),className:"common-logo-seasonal-left"}),o.createElement(c.I,{alt:"right ramadan logo",loading:"lazy",src:n.C.getAssetPath("logo/ramadan-sehat-right.png"),className:"common-logo-seasonal-right"})):y.isRamadan&&"hellodoktor"===e?o.createElement(o.Fragment,null,o.createElement(c.I,{alt:"left ramadan logo",loading:"lazy",src:n.C.getAssetPath("logo/ramadan-doktor-left.png"),className:"common-logo-seasonal-left"}),o.createElement(c.I,{alt:"right ramadan logo",loading:"lazy",src:n.C.getAssetPath("logo/ramadan-doktor-right.png"),className:"common-logo-seasonal-right"})):y.isVNHungKing&&("hellobacsi"===e||"marryBaby"===e)?o.createElement(o.Fragment,null,o.createElement(c.I,{alt:"Hung King logo",loading:"lazy",src:n.C.getAssetPath("logo/hung-king-bg.png"),className:"common-logo-seasonal-left"})):y.isVNIndependentDay&&("hellobacsi"===e||"marryBaby"===e)?o.createElement(o.Fragment,null,o.createElement(c.I,{alt:"VN Independent day logo",loading:"lazy",src:n.C.getAssetPath("logo/vn-independence-desktop.png"),className:"common-logo-seasonal-left desktop-only"}),o.createElement(c.I,{alt:"VN Independent day logo",loading:"lazy",src:n.C.getAssetPath("logo/vn-independence-mobile.png"),className:"common-logo-seasonal-left mobile-only"})):null,o.createElement(s.L,{type:e,width:null==r?void 0:r.width,height:null==r?void 0:r.height,isLight:l}),E?o.createElement(p,{src:n.C.getAssetPath("logo/pro-suffix.svg")}):null,u)}},Wrz4:function(e,t,a){a.d(t,{T:function(){return h},a:function(){return getUserIdFromCookie},b:function(){return getSubotCookieId},c:function(){return getUserInfoFromCookie},d:function(){return getWindowId},e:function(){return checkUntilFinished},f:function(){return checkMobile},g:function(){return getHelloSitesUrl},h:function(){return clickAndOpenInNewTab},i:function(){return formatUrlWithEncrypedGa},j:function(){return isFakeEmail},k:function(){return getHhgIdFromCookie},o:function(){return overrideParamsByQuery},s:function(){return ssoIntents}});var o=a("nZRJ"),i=a("UqOp"),n=a("x0JV"),l=a("JIJ2"),r=a("hHL7"),s=a("GOBr"),c=a("xrdX");let d=["form_submit_meta","selected_actions","current_selected","current_keys","current_polls"],p=["bot_id","node_id","action_id","action_value","current_score","gtm_id","ga_client_id","is_new","title_url","url","window_id",...d],overrideParamsByQuery=(e,t)=>{let a=Object.keys(t);return a.map(a=>{let o=t[a];if("source"===a){e.is_new="first_login"===o;return}if(p.includes(a)){if(d.includes(a)){try{e[a]=JSON.parse(o)}catch(e){}return}if("account_id"===a||"current_score"===a||"bot_id"===a){e[a]=parseInt(o);return}e[a]=o}}),e},ssoIntents=e=>[{id:(0,r.Z)(),label:JSON.stringify({title:"",description:""}),type:n.N.SSO_INTENT,url:""},{id:(0,r.Z)(),label:JSON.stringify({title:e({id:"subot.myHealth.title",defaultMessage:"My Health"}),description:e({id:"subot.myHealth.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:n.N.SSO_INTENT,url:"/images/subot/my-health.svg"},{id:(0,r.Z)(),label:JSON.stringify({title:e({id:"subot.saveData.title",defaultMessage:"Save Data"}),description:e({id:"subot.saveData.description",defaultMessage:"Hellobacsi would like to learn from your data to provide better healthcare for you"})}),type:n.N.SSO_INTENT,url:"/images/subot/file-storage.svg"},{id:(0,r.Z)(),label:JSON.stringify({title:e({id:"subot.productYourIdentifiers.title",defaultMessage:"Protect your identifiers"}),description:e({id:"subot.productYourIdentifiers.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:n.N.SSO_INTENT,url:"/images/subot/shield.svg"}];function checkUntilFinished(e){let t=e.condition,a=e.finished,o=e.timeout||3e3,i=new Date().getTime(),n=setInterval(()=>{let e=new Date().getTime();(e-i>o||t())&&(clearInterval(n),a())},300)}let getHhgIdFromCookie=e=>{let t=o.c.parse(e||""),a=t["hhg-id"];return a||l.Z.get("hhg-id")||""},getSubotCookieId=e=>{if(e)return l.Z.set("hhg-id",e),e;let t=getHhgIdFromCookie();if(t)return t;let a=(0,r.Z)();return l.Z.set("hhg-id",a),a},getUserIdFromCookie=e=>{let t=o.c.parse(e||""),a=t[i.B],n=a||l.Z.get(i.B)||"";try{let e=n.split(".")[1],t=e.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(atob(t).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(a).sub}catch(e){return""}},getUserInfoFromCookie=e=>{let t=o.c.parse(e||""),a=t[i.B],n=a||l.Z.get(i.B)||"";try{let e=n.split(".")[1],t=e.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(atob(t).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join("")),o=JSON.parse(a);return{email:o.email,id:o.sub}}catch(e){return{email:"",id:0}}},u=(0,r.Z)(),getWindowId=()=>u,getHelloSitesUrl=(e,t)=>{let a=!t&&"undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname);return a?"http://localhost":`https://${s.y?"":"discover."}${c.v[e]}`},checkMobile=e=>{let t=e||("undefined"==typeof navigator?"":navigator.userAgent);return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substring(0,4)))},clickAndOpenInNewTab=e=>{let t=document.createElement("a");t.href=e,t.target="_blank",t.click()},h=30,isFakeEmail=e=>(null==e?void 0:e.endsWith("@hhg.com"))||(null==e?void 0:e.endsWith("@facebook.com"));function formatUrlWithEncrypedGa(e="",t=""){if(!e.startsWith("https://")||!t)return"";let a=new URL(e),o=a.searchParams;return o.get("hhgclid")?(o.delete("hhgclid"),o.set("hhgclid",t),`${a.origin}${a.pathname}?${o.toString()}`):e}},epzi:function(e,t,a){a.d(t,{C:function(){return Checkbox},I:function(){return ImageWrapV2},P:function(){return Pagination},S:function(){return I},a:function(){return E},b:function(){return SearchInput},c:function(){return Search2}});var o=a("q1tI"),i=a("rBCA"),n=a("eePC"),l=a("iBNF"),r=a("SwpR"),s=a("EBmB"),c=a("Biuj"),d=a("WoTe");let Search2=e=>o.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 24 25",fill:"none"},e),o.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"}),o.createElement("path",{d:"M20 20.957L16 16.957",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),p=i.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:i,isDisabled:n,onChange:l,value:r,isRectangle:s,inputDataTestId:c,siteType:d})=>o.createElement(p,{className:i,"data-disabled":n||void 0,"data-is-rectangle":s||void 0,"data-label-text":e,"data-theme":d},o.createElement("input",{type:"checkbox",checked:a,name:t,onChange:()=>l(r,!a),disabled:n,value:r,id:`${t}-${r}`,"data-label-text":e,"data-testid":c}),!s&&o.createElement("label",{htmlFor:`${t}-${r}`},e)),u=i.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}; } } `,h=i.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=i.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:i,href:l,queryPageName:r="page"})=>{let s=[...Array(e)].map((e,t)=>t+1),[c,d]=(0,o.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,o.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]),o.createElement(o.Fragment,null,t>4&&o.createElement(o.Fragment,null,o.createElement(g,{onClick:()=>a(1)},l?o.createElement("a",{href:l,onClick:i},1):1),o.createElement(g,null,"...")),c.map(e=>o.createElement(g,{key:`pagination+${e}`,"data-page-active":e===t||void 0,onClick:()=>a(e)},l?o.createElement("a",{href:(0,n.f)(l,e,r),onClick:i},e):e)),ta(s.length)},l?o.createElement("a",{href:(0,n.f)(l,s.length,r),onClick:i},s.length):s.length)))},Pagination=({className:e,pagesAmount:t,currentPage:a,onChange:i,onClick:l,style:r,href:s,queryPageName:c="page"})=>{let d=[...Array(t)].map((e,t)=>t+1),[p,m]=(0,o.useState)(a),E=(0,o.useMemo)(()=>s&&s.endsWith("&page=")?s.replace("&page=",""):s,[s]),y=t-1,handlePageChange=e=>{e<=t&&e>0&&(m(e),i(e))},handleClick=e=>{l&&l(e)};return(0,o.useEffect)(()=>{m(a)},[a]),o.createElement(u,{className:e,style:r},o.createElement(h,{className:"prev-page",onClick:()=>handlePageChange(p-1),"data-last-page":1===p||void 0},E?o.createElement("a",{href:(0,n.f)(E,p,c),onClick:handleClick},o.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},o.createElement("path",{d:"M5.5 9L1.5 5L5.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))):o.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},o.createElement("path",{d:"M5.5 9L1.5 5L5.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))),d.length>8?o.createElement(RenderPagiWithDots,{pagesAmount:t,activePage:p,handlePageChange:handlePageChange,handleClick:handleClick,href:E,queryPageName:c}):d.map(e=>o.createElement(g,{key:`pagination+${e}`,"data-page-active":e===p||void 0,onClick:()=>handlePageChange(e)},E?o.createElement("a",{href:(0,n.f)(E,e,c),onClick:handleClick},e):e)),o.createElement(h,{className:"next-page",onClick:()=>handlePageChange(p+1),"data-last-page":p===y+1||void 0},E?o.createElement("a",{href:(0,n.f)(E,p,c),onClick:handleClick},o.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},o.createElement("path",{d:"M1.5 9L5.5 5L1.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))):o.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},o.createElement("path",{d:"M1.5 9L5.5 5L1.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))))},m=i.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; } } } `,E=o.forwardRef((e,t)=>{var{name:a,errorMessage:i,autoComplete:n="off",defaultValue:l,actionIcon:c,displayIcon:d,isDeleteAction:p,onActionClick:u,label:h,placeholder:g,className:E,onChange:y,onKeyPress:b,isDisabled:f,CustomInput:I,size:x,style:C,autoFocus:O,type:v="text",isNumerousKeyboard:T=!1,onFocus:S,enterKeyHint:w,nativeOnChange:_}=e,k=(0,r._)(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[N,L]=(0,o.useState)(l),handleOnChange=e=>{L(e),y(e)};return o.createElement(m,{"data-size":x,className:E,"data-has-action-icon":!!c||void 0,"data-has-display-icon":!!d||void 0,"data-has-error":i&&i.length>0||void 0,style:C},h&&o.createElement(s.L,{size:"label2",htmlFor:a,className:"inputLabel"},h),o.createElement("div",{style:{position:"relative"}},I||o.createElement("input",Object.assign({id:a,name:a,placeholder:g,onChange:null!=_?_:e=>handleOnChange(e.target.value),onKeyPress:b,type:v,"aria-label":v,disabled:f,value:N,autoComplete:n,ref:t,autoFocus:O,inputMode:T||"number"===v?"numeric":v,pattern:T?"[0-9]*":".*",onFocus:S,enterKeyHint:w},k)),d&&o.createElement(s.S,{className:"displayIcon"},d),c&&o.createElement(s.a,{className:"actionIcon",onClick:()=>{var e;p&&(L(""),null===(e=t.current)||void 0===e||e.focus()),u&&u()}},c)),i&&i.length>0&&o.createElement(s.b,{className:"errorLabel"},i))});E.displayName="PureInput";let y=[320,420,640,750,828,1080,1200,1440,1920,2048],defaultLoader=({src:e,width:t,quality:a})=>{try{let o=new URL(e,"undefined"!=typeof window?window.location.origin:"http://localhost");return o.searchParams.set("w",String(t)),o.searchParams.set("q",String(null!=a?a:75)),o.toString()}catch(t){return e}},ImageWrapV2=e=>{var{alt:t,backupSrc:a,src:i,placeholderSrc:n,style:l,ref:s,unoptimized:c=!1,quality:d,sizes:p,width:u}=e,h=(0,r._)(e,["alt","backupSrc","src","placeholderSrc","style","ref","unoptimized","quality","sizes","width"]);let[g,m]=(0,o.useState)(!1),E=(0,o.useMemo)(()=>c?[]:function(e){if(e.sizes)return y;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 y}({sizes:p,width:u}),[p,u,c]),f=(0,o.useMemo)(()=>{if(!c)return E.map(e=>`${defaultLoader({src:i,width:e,quality:d})} ${e}w`).join(", ")},[c,E,i,d]),I=(0,o.useMemo)(()=>{if(c)return i;let e=E.length?E[E.length-1]:null!=u?u:1920;return defaultLoader({src:i,width:e,quality:d})},[c,E,i,d,u]);return o.createElement(b,Object.assign({loading:"lazy",alt:t,srcSet:f,onError:()=>!g&&m(!0),src:g?a||I:I||a,style:Object.assign(Object.assign({},n?{backgroundImage:`url(${n})`}:{}),l),"data-has-placeholder":!!n,sizes:p,ref:s},h))},b=i.Z.img` &[data-has-placeholder='true'] { background-position: center; background-repeat: no-repeat; background-size: cover; } `,f=(0,i.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; } `,I=(0,i.Z)(Search2)` color: ${l.r.colors.primaryBase}; width: 20px; height: 20px; `,SearchInput=e=>{let{loading:t,disabled:a,placeholder:i,value:n,onChange:l,icon:s=o.createElement(I,null),className:c,style:p,enableClear:u}=e,h=(0,r._)(e,["loading","disabled","placeholder","value","onChange","icon","className","style","enableClear"]);return o.createElement(f,Object.assign({disabled:t||a,size:"lg",value:n,onChangeRaw:e=>{l(e.currentTarget.value)},type:"text",placeholder:i,className:c,icon:s,style:p,rightSection:u?o.createElement("div",{className:"close-icon-wrapper",onClick:()=>{l("")},"data-is-disabled":!n},o.createElement(d.C,{fill:"white",width:"100%",height:"100%"})):void 0},h,{"data-event-label":n}))}},UqOp:function(e,t,a){a.d(t,{A:function(){return z},B:function(){return H},C:function(){return P},D:function(){return M},E:function(){return R},F:function(){return G},G:function(){return B},H:function(){return L},I:function(){return j},L:function(){return w},Q:function(){return r},S:function(){return k},U:function(){return S},V:function(){return Y},Z:function(){return U},a:function(){return K},b:function(){return v},c:function(){return N},d:function(){return D},e:function(){return A},f:function(){return Z},g:function(){return F},h:function(){return W},i:function(){return X},j:function(){return $},k:function(){return V},l:function(){return T},m:function(){return _},r:function(){return d},s:function(){return q}});var o,i,n,l,r,s,c,d,p=a("EikE"),u=a("OT65"),h=a("G2RZ"),g=a("YNYf"),m=a("R43W"),E=a("+xLi"),y=a("tO2/"),b=a("YJaS"),f=a("tiWT"),I=a("xrdX"),x=a("UIg8"),C=a("GOBr"),O=a("XgXa");let v="",T="https://id.hellobacsi.com/",S="userGeoLocationCoordinates",w={"vi-VN":{PHONE:"+84",LOGO_TYPE:"hellobacsi",SITE_NAME:"HelloBacsi",SITE_NAME_FORMATTED:"Hello Bacsi",HOMEPAGE_IMAGE:"https://hellobacsi.com/images/country-thumbnails/VN.png",SITE_ID:"1",INSIDER_TAG:"//hellobacsivn.api.useinsider.com/ins.js?id=10003798",TOOLTIP_IMAGE:"/images/tooltips-vn.png",PREGNANCY_WEIGHT_GAIN:"cong-cu-tinh-can-nang-khi-mang-thai",BABY_POOP:"phan-tre-so-sinh-nhu-the-nao-la-tot",VACCINATION_TOOL:"lich-tiem-chung"},"en-PH":{PHONE:"+63",LOGO_TYPE:"hellodoctor",SITE_NAME:"HelloDoctor",HOMEPAGE_IMAGE:"https://hellodoctor.com.ph/images/country-thumbnails/PH.png",SITE_NAME_FORMATTED:"Hello Doctor",SITE_ID:"9",CATEGORIES_TYPE:"short",INSIDER_TAG:"//hellodoctorph.api.useinsider.com/ins.js?id=10004527",TOOLTIP_IMAGE:"/images/tooltips-ph.png",PREGNANCY_WEIGHT_GAIN:"pregnancy-weight-gain-calculator",BABY_POOP:"a-visual-guide-on-baby-poop",VACCINATION_TOOL:"vaccination-tool"},"th-TH":{PHONE:"+66",LOGO_TYPE:"hellokhunmor",SITE_NAME:"HelloKhunmor",HOMEPAGE_IMAGE:"https://hellokhunmor.com/images/country-thumbnails/TH.png",SITE_NAME_FORMATTED:"Hello Khunmor",SITE_ID:"3",CATEGORIES_TYPE:"long",INSIDER_TAG:"//hellokhunmor.api.useinsider.com/ins.js?id=10004524",TOOLTIP_IMAGE:"/images/tooltips-th.png",PREGNANCY_WEIGHT_GAIN:"เครื่องคำนวณน้ำหนักตัว",BABY_POOP:"สีอุจจาระของลูก-บอกถึงส",VACCINATION_TOOL:"vaccination-tool"},"km-KH":{PHONE:"+855",LOGO_TYPE:"hellokrupet",SITE_NAME:"HelloKrupet",HOMEPAGE_IMAGE:"https://hellokrupet.com/images/country-thumbnails/KH.JPG",SITE_NAME_FORMATTED:"Hello Krupet",SITE_ID:"4",CATEGORIES_TYPE:"long",INSIDER_TAG:"//hellokrupet.api.useinsider.com/ins.js?id=10004523",TOOLTIP_IMAGE:"/images/tooltips-kh.png",PREGNANCY_WEIGHT_GAIN:"រង្វាស់សុខភាព/គណនាទម្ងន់ស្ត្រីពពោះ",BABY_POOP:"រង្វាស់សុខភាព/អត្ថន័យពណ៌-និងរូបរាងលាម",VACCINATION_TOOL:"រង្វាស់សុខភាព/កាលវិភាគចាក់ថ្នាំបង្កា"},"my-MM":{PHONE:"+95",LOGO_TYPE:"hellosayarwon",SITE_NAME:"HelloSayarwon",HOMEPAGE_IMAGE:"https://hellosayarwon.com/images/country-thumbnails/PH.png",SITE_NAME_FORMATTED:"Hello Sayarwon",SITE_ID:"7",INSIDER_TAG:"//hellosayarwon.api.useinsider.com/ins.js?id=10004522"},"zh-TW":{PHONE:"+886",LOGO_TYPE:"helloyishi",SITE_NAME:"HelloYishi",HOMEPAGE_IMAGE:"https://helloyishi.com.tw/images/country-thumbnails/TW.png",SITE_NAME_FORMATTED:"Hello Yishi",SITE_ID:"6",INSIDER_TAG:"//helloyishi.api.useinsider.com/ins.js?id=10004526",TOOLTIP_IMAGE:"/images/tooltips-tw.png",PREGNANCY_WEIGHT_GAIN:"pregnancy-weight-gain-calculator",BABY_POOP:"how-does-babies-poop-look-like",VACCINATION_TOOL:"vaccination-tool"},"zh-SG":{PHONE:"",LOGO_TYPE:"hellojiankang",SITE_NAME:"Hello健康",HOMEPAGE_IMAGE:"",SITE_NAME_FORMATTED:"Hello 健康",SITE_ID:"12",INSIDER_TAG:"",TOOLTIP_IMAGE:"",PREGNANCY_WEIGHT_GAIN:"pregnancy-weight-gain-calculator",BABY_POOP:"how-does-babies-poop-look-like",VACCINATION_TOOL:"vaccination-tool"},"id-ID":{PHONE:"+62",LOGO_TYPE:"hellosehat",SITE_NAME:"HelloSehat",HOMEPAGE_IMAGE:"https://hellosehat.com/images/country-thumbnails/ID.png",SITE_NAME_FORMATTED:"Hello Sehat",SITE_ID:"2",INSIDER_TAG:"//hellosehat.api.useinsider.com/ins.js?id=10003799",TOOLTIP_IMAGE:"/images/tooltips-id.png",PREGNANCY_WEIGHT_GAIN:"kalkulator-kenaikan-berat-badan-ibu-hamil",BABY_POOP:"warna-feses-bayi-normal",VACCINATION_TOOL:"jadwal-imunisasi"},"hi-IN":{PHONE:"+91",LOGO_TYPE:"helloswasthya",SITE_NAME:"HelloSwasthya",HOMEPAGE_IMAGE:"https://helloswasthya.com/images/country-thumbnails/IN.png",SITE_NAME_FORMATTED:"हैलो स्वास्थ्य",SITE_ID:"8",CATEGORIES_TYPE:"long",INSIDER_TAG:"//helloswasthya.api.useinsider.com/ins.js?id=10004498",TOOLTIP_IMAGE:"/images/tooltips-in.png",PREGNANCY_WEIGHT_GAIN:"garbhavastha-weight-calculator",BABY_POOP:"visual-guide-on-baby-poop",VACCINATION_TOOL:"vaccination-tool"},"ms-MY":{PHONE:"+60",LOGO_TYPE:"hellodoktor",SITE_NAME:"HelloDoktor",HOMEPAGE_IMAGE:"https://hellodoktor.com/images/country-thumbnails/MY.png",SITE_NAME_FORMATTED:"Hello Doktor",SITE_ID:"5",INSIDER_TAG:"//hellodoktor.api.useinsider.com/ins.js?id=10004525",TOOLTIP_IMAGE:"/images/tooltips-my.png",PREGNANCY_WEIGHT_GAIN:"kalkulator-tambah-berat-badan-hamil",BABY_POOP:"kenali-najis-bayi-anda",VACCINATION_TOOL:"alat-kesihatan-vaksin"},"tl-PH":{PHONE:"+63",LOGO_TYPE:"hellodoctor",SITE_NAME:"HelloDoctor",HOMEPAGE_IMAGE:"https://hellodoctor.com.ph/images/country-thumbnails/PH.png",SITE_NAME_FORMATTED:"Hello Doctor",SITE_ID:"9",CATEGORIES_TYPE:"short",INSIDER_TAG:"//hellodoctorph.api.useinsider.com/ins.js?id=10004527",TOOLTIP_IMAGE:"/fil/images/tooltips-ph.png",PREGNANCY_WEIGHT_GAIN:"pregnancy-weight-gain-calculator",BABY_POOP:"a-visual-guide-on-baby-poop",VACCINATION_TOOL:"vaccination-tool",ABOUT_US_IMAGE:"/fil/images/aboutus/PH.png"}},_=[{countryCode:"VN",countryName:"Việt Nam",languageCode:"vi"},{countryCode:"PH",countryName:"Philippines",languageCode:"en"},{countryCode:"TH",countryName:"ประเทศไทย",languageCode:"th"},{countryCode:"KH",countryName:"កម្ពុជា",languageCode:"km"},{countryCode:"MM",countryName:"မြန်မာ",languageCode:"my"},{countryCode:"TW",countryName:"台灣",languageCode:"zh"},{countryCode:"SG",countryName:"新加坡",languageCode:"zh"},{countryCode:"ID",countryName:"Indonesia",languageCode:"id"},{countryCode:"IN",countryName:"भारत",languageCode:"hi"},{countryCode:"MY",countryName:"Malaysia",languageCode:"ms"}],k={"vi-VN":{PRIVACY:"/privacy",TERM_OF_USE:"/dieu-khoan-su-dung",PRIVACY_POLICY:"/chinh-sach-quyen-rieng-tu",EDITORIAL_CORRECTIONS_POLICY:"/chinh-sach-bien-tap-chinh-sua",ADVERTISING_SPONSOR_POLICY:"/chinh-sach-quang-cao-tai-tro",POLICIES:"/chinh-sach",FAQS:"/thong-tin-quan-trong",SITEMAP:"/sitemap",ABOUT_US:"/about-us",ADVERTISEMENT:"/quang-cao-voi-chung-toi",CONTACT_US:"/lien-he",ABOUT_GO_CARE:"/about-go-care",HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/hello-bacsi/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:"/tieu-chuan-cong-dong",TOGETHER:"/community",CLINITY_DOWNLOAD_LINK:"https://clinity.app.link/GxlKjAMGvWb"},"km-KH":{POLICIES:"/policies",TERM_OF_USE:"/ខនិងលក្ខខណ្ឌ",PRIVACY_POLICY:"/គោលការណ៍ឯកជនភាព",EDITORIAL_CORRECTIONS_POLICY:"/គោលការណ៍ខ្លឹមសារមាតិកា",ADVERTISING_SPONSOR_POLICY:"/គោលការណ៍ផ្សាយពាណិជ្ជកម",FAQS:"/faqs",SITEMAP:"/sitemap",ABOUT_US:"/about-us",ADVERTISEMENT:"/advertisement",CONTACT_US:"/contact-us",ABOUT_GO_CARE:"/about-go-care",HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"/#",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:"/គោលការណ៍ណែនាំសហគមន៍",TOGETHER:"/community",CLINITY_DOWNLOAD_LINK:"https://clinity.app.link/T0Op0XUtt0b"},"en-PH":{POLICIES:"/policies",TERM_OF_USE:"/terms-of-use",PRIVACY_POLICY:"/privacy-policy",EDITORIAL_CORRECTIONS_POLICY:"/editorial-and-corrections-policy",ADVERTISING_SPONSOR_POLICY:"/advertising-and-sponsor-policy",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:null,CONTACT_US:"/contact-us",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/management-team/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:"/community-guidelines",TOGETHER:"/community",CLINITY_DOWNLOAD_LINK:"https://clinity.app.link/gRQNJoDHvWb"},"my-MM":{POLICIES:"/polisi-terma-syarat",TERM_OF_USE:"/terms-of-use",PRIVACY_POLICY:"/privacy-policy",EDITORIAL_CORRECTIONS_POLICY:"/editorial-policy",ADVERTISING_SPONSOR_POLICY:"/advertising-policy",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:"/pengiklanan",CONTACT_US:"/hubungi-kami",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:" https://hellohealthgroup.com/hello-doktor/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:"/panduan-komuniti",TOGETHER:"/community",CLINITY_DOWNLOAD_LINK:""},"zh-TW":{POLICIES:"/policies",TERM_OF_USE:"/terms-of-use",PRIVACY_POLICY:"/privacy-policy",EDITORIAL_CORRECTIONS_POLICY:"/editorial-and-corrections-policy",ADVERTISING_SPONSOR_POLICY:"/advertising-and-sponsor-policy",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:"/advertising",CONTACT_US:"/contact-us",ABOUT_GO_CARE:null,FACILITY:"/facility",HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/management-team/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:null,TOGETHER:"/community",CLINITY_DOWNLOAD_LINK:"https://clinity.app.link/Zi0O2HxIvWb"},"zh-SG":{POLICIES:"/policies",TERM_OF_USE:"/terms-of-use",PRIVACY_POLICY:"/privacy-policy",EDITORIAL_CORRECTIONS_POLICY:"/editorial-and-corrections-policy",ADVERTISING_SPONSOR_POLICY:"/advertising-and-sponsor-policy",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:"/advertising",CONTACT_US:"/contact-us",ABOUT_GO_CARE:null,FACILITY:"/facility",HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/management-team/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:null,TOGETHER:"/community",CLINITY_DOWNLOAD_LINK:"https://clinity.app.link/eyzYCiacZ0b"},"id-ID":{POLICIES_EN:"/policies",TERM_OF_USE:"/kebijakan-pengguna",PRIVACY_POLICY:"/kebijakan-privasi",EDITORIAL_CORRECTIONS_POLICY:"/kebijakan-editorial",ADVERTISING_SPONSOR_POLICY:"/kebijakan-iklan",POLICIES:"/kebijakan",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:null,CONTACT_US:"/kontak-kami",CONTACT_EN:"/contact",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/hello-sehat/",RECRUITMENT:"https://hellohealthgroup.com/careers/",EDITORIAL_POLICY:"/edit-id",EDITORIAL_POLICY_EN:"/edit-en",COMMUNITY_GUIDELINE:"/panduan-komunitas",TOGETHER:"/community",CLINITY_DOWNLOAD_LINK:"https://clinity.app.link/5zzz90iHvWb"},"hi-IN":{POLICIES:"/policies",TERM_OF_USE:"/terms-of-use",PRIVACY_POLICY:"/privacy-policy",EDITORIAL_CORRECTIONS_POLICY:"/editorial-and-corrections-policy",ADVERTISING_SPONSOR_POLICY:"/advertising-and-sponsor-policy",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:null,CONTACT_US:"/contact-us",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/management-team/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:null,TOGETHER:"/community",CLINITY_DOWNLOAD_LINK:""},"ms-MY":{POLICIES:"/polisi-terma-syarat",TERM_OF_USE:"/terma-dan-syarat",PRIVACY_POLICY:"/polisi-privasi",EDITORIAL_CORRECTIONS_POLICY:"/polisi-editorial",ADVERTISING_SPONSOR_POLICY:"/polisi-pengiklanan",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:"/pengiklanan",CONTACT_US:"/hubungi-kami",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:" https://hellohealthgroup.com/hello-doktor/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:"/panduan-komuniti",TOGETHER:"/community",CLINITY_DOWNLOAD_LINK:"https://clinity.app.link/DgSznupHvWb"},"th-TH":{POLICIES_EN:"/policies",TERM_OF_USE:"/เงื่อนใขการใช้งาน",PRIVACY_POLICY:"/นโยบายความเป็นส่วนตัว",EDITORIAL_CORRECTIONS_POLICY:"/นโยบายบรรณธิการ",ADVERTISING_SPONSOR_POLICY:"/นโยบายการโฆษณาและผู้สนับสนุน",POLICIES:"/นโยบาย",FAQS:"/คำถามที่พบบ่อย",SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:"/ลงโฆษณากับเรา",CONTACT_US:"/contact-us",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/management-team/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:null,TOGETHER:"/community",CLINITY_DOWNLOAD_LINK:"https://clinity.app.link/F8yihqrIvWb"},"tl-PH":{POLICIES:"/policies",TERM_OF_USE:"/terms-of-use",PRIVACY_POLICY:"/privacy-policy",EDITORIAL_CORRECTIONS_POLICY:"/editorial-and-corrections-policy",ADVERTISING_SPONSOR_POLICY:"/advertising-and-sponsor-policy",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:null,CONTACT_US:"/contact-us",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/management-team/",RECRUITMENT:"https://hellohealthgroup.com/careers/",COMMUNITY_GUIDELINE:"/community-guidelines",TOGETHER:"/community",CLINITY_DOWNLOAD_LINK:"https://clinity.app.link/gRQNJoDHvWb"}},N=[O.L.Vietnam,O.L.Indonesia,O.L.Thailand,O.L.Malaysia,O.L.Myanmar],L=[O.L.Indonesia,O.L.Cambodia,O.L.PhilippinesEnglish,O.L.PhilippinesTagalog,O.L.Thailand,O.L.Singapore],A=[O.L.Vietnam],R=["vi-VN"],M=["id-ID"],P=["vi-VN","id-ID","en-PH","tl-PH","ms-MY","th-TH"],D=["vi-VN","id-ID"],Y=[O.L.Vietnam,O.L.Taiwan],G={"vi-VN":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"km-KH":[{type:"link",rel:"icon",href:"/by-locales/km-KH/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/km-KH/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/km-KH/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/km-KH/icon-270x270.png"}],"en-PH":[{type:"link",rel:"icon",href:"/by-locales/en-PH/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/en-PH/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon",href:"/by-locales/en-PH/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/en-PH/icon-270x270.png"}],"id-ID":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"ms-MY":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"th-TH":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"my-MM":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"zh-TW":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"hi-IN":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],marryBaby:[{type:"link",rel:"shortcut icon",href:"/favicons/favicon.ico"},{type:"link",rel:"icon",href:"/favicons/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/favicons/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/favicons/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/favicons/icon-180x180.png"}]};(o=r||(r={})).bmi="mi",o.gender="gndr",o.age="ge",o.slug="slug",o.resultId="resultId",o.bmr="mr",o.height="gt",o.weight="wght",o.source="surc",o.type="tp",o.startDate="sd",o.additional="tnl",o.week="wk",o.twins="twn",o.weightBefore="wb",o.yourself="yrslf",o.intensity="sy",o.rate="rt",o.method="mthd",o.day="dy",o.pwg="pwg",o.cycle="le",o.period="prd",o.access_token="tkn",o.name="nm",o.id="id",o.activityLevel="actl",o.status="status",o.birthday="brd",o.withImperialUnit="lbs";let j={[O.L.Vietnam]:{dateFormat:"DD/MM/YYYY",separator:","},[O.L.Cambodia]:{dateFormat:"DD/MM/YYYY",separator:"."},[O.L.India]:{dateFormat:"DD/MM/YYYY",separator:"."},[O.L.Indonesia]:{dateFormat:"DD/MM/YYYY",separator:","},[O.L.Malaysia]:{dateFormat:"DD/MM/YYYY",separator:"."},[O.L.Thailand]:{dateFormat:"DD/MM/YYYY",separator:"."},[O.L.Taiwan]:{dateFormat:"YYYY/MM/DD",separator:","},[O.L.Singapore]:{dateFormat:"YYYY/MM/DD",separator:","},[O.L.PhilippinesTagalog]:{dateFormat:"MM/DD/YYYY",separator:"."},[O.L.PhilippinesEnglish]:{dateFormat:"MM/DD/YYYY",separator:"."},[O.L.Myanmar]:{dateFormat:"DD/MM/YYYY",separator:","}},H="hhg_user_token",V="hhg_user_refresh_token",$={[O.L.PhilippinesEnglish]:p.Z,[O.L.Vietnam]:u.default,[O.L.Cambodia]:h.Z,[O.L.India]:g.Z,[O.L.Indonesia]:m.Z,[O.L.Myanmar]:p.Z,[O.L.Malaysia]:E.Z,[O.L.Thailand]:y.Z,[O.L.Taiwan]:b.Z},F="https://cdn.hellohealthgroup.com/countries",B="_ga",z="YYYY-MM-DD",U=9999999,K=305,Z="video_item_detail",W="hhg_cart_care_store_key";(i=s||(s={}))[i.UNAVAILABLE=0]="UNAVAILABLE",i[i.AVAILABLE=1]="AVAILABLE",(n=c||(c={}))[n.FIXED=1]="FIXED",n[n.STARTING=2]="STARTING",n[n.RANGE=3]="RANGE",(l=d||(d={})).VACCINE="VACCINE",l.IVF="IVF",l.EGG_FREEZING="EGG_FREEZING",l.HEALTH_SCREENER="HEALTH_SCREENER";let q={vaccine:d.VACCINE,ivf:d.IVF,"egg-freezing":d.EGG_FREEZING,screener:d.HEALTH_SCREENER},Q={[d.VACCINE]:"vaccine",[d.IVF]:"ivf",[d.EGG_FREEZING]:"egg-freezing",[d.HEALTH_SCREENER]:"screener"};var X=Object.freeze({__proto__:null,basePath:v,SSO_URL:T,USER_GEOLOCATION_COORDINATES_COOKIE:S,LOCALE_SPECS:w,COUNTRY_LIST:_,STATIC_PAGES:k,UP_BASEPATH:"user",LOCALE_HAS_COMMUNITY_SITE:N,HAS_CLINITY_DOWNLOAD_SITE:L,LOCALE_HAS_CART_CARE_SITE:A,ECOM_LOCALES:R,DATA_PRIVACY_LOCALES:M,CARE_LOCALES:P,CARE_BOOKING_LOCALES:D,VIDEO_LOCALES:Y,FAVICONS:G,get QUERY_HEALTH_TOOL(){return r},ISO_FORMAT:j,BEARER_TOKEN_COOKIE:H,BEARER_REFRESH_TOKEN_COOKIE:V,DATE_FNS_LOCALE:$,CDN_ADDRESS:F,GA_TOKEN_COOKIE:B,API_DATE_FORMAT:z,DATE_FNS_DATE_FORMAT:"dd-MM-yyyy",ZINDEX_SSO:U,ZINDEX_HEADER:K,VIDEO_DETAIL_TEMP_STORAGE:Z,HHG_CART_CARE_STORE_KEY:W,get EMERGENCY_STATUS(){return s},get ServicePrice(){return c},get SERVICE_TYPE(){return d},serviceTypeByProductType:q,productTypeByServiceType:Q,siteHost:f.Cf,siteOptions:f.x9,COUNTRY_CURRENCY_SYMBOL:f.Z5,domainLocales:I.v,MAP_DOMAIN_BY_LOCALE:I.f,get RISK_SCREENER_NAME(){return x.t},RISK_SCREENER_SLUG:x.n,isProduction:C.y})},DVdB:function(e,t,a){a.d(t,{B:function(){return BookingSearchBarV3},T:function(){return TextDivider}});var o,i,n,l,r=a("q1tI"),s=a("VZtU"),c=a("0D4Z"),d=a("iuhU"),p=a("Eso5"),u=a("aDCK"),h=a("mYVa"),g=a("vaps"),m=a("8vDj"),E=a("OAL+"),y=a("SPK5"),b=a("TIp3"),f=a("CmzK"),I=a("NEaA"),x=a("rlLN"),C=a("Iblh"),O=a("FRfQ"),v=a("1KiD"),T=a("5DIC"),S=a("sEfC"),w=a.n(S),_=a("mU1U"),k=a("rBCA"),N=a("iBNF"),L=a("eePC"),A=a("wGWh"),R=a("2YCo"),M=a("ACwe"),P=a("SwpR"),D=a("D6YN"),Y=a("YED8"),G=a("6HjK"),j=a("4cu0");let H=k.Z.div``,V=k.Z.div` background-color: ${N.r.colors.neutral50}; padding-bottom: 1px; ${L.M.mbDown} { padding: 0; } `,$=(0,k.Z)(A.C)` padding: 0 16px; ${L.M.mbDown} { padding: 0; } `,F=k.Z.div` padding: 24px 56px; border-radius: 16px; background-color: ${N.r.colors.white}; box-shadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.04), 0px 0px 2px 0px rgba(0, 0, 0, 0.06), 0px 4px 8px 0px rgba(0, 0, 0, 0.04); ${L.M.mbDown} { padding: 16px; border-radius: 0; } .flex-search-input { flex-direction: row; ${L.M.mbDown} { flex-direction: column; } } `,B={"en-PH":3,"tl-PH":2,"id-ID":3,"vi-VN":2,"zh-TW":0,"ms-MY":2,"th-TH":2},z={isMobile:!1,isDebug:!1,navigateTo:null,geoLocationPermission:"unset",geoLocationCoordinates:null,focused:"none",focusedSpecialty:"none",searchLocationKeywords:"",searchSpecialtyKeywords:"",searchKeywords:"",selectedLocation:null,selectedSpecialty:null,defaultCity:null,initialCities:[],cities:[],searchResults:{},initialSearchResults:{},isLoadingCities:!1,isLoadingSearchResults:!1,isMobileModalOpened:!1,initialSelectedCity:null,autoCompleteDisabled:!1,inputSearchPlaceholder:"",locale:"vi-VN",allSpecialties:[],popularKeys:[]};function resetSearchLocationKeywords(e){let{selectedLocation:t,searchLocationKeywords:a}=e;return t&&a!==t.name?Object.assign(Object.assign({},e),{searchLocationKeywords:t.name}):e}function reducer(e,t){var a,o;switch(e.isDebug&&console.log("bookingSearchBarV3",{action:t,state:e}),t.type){case n.NavigateTo:return Object.assign(Object.assign({},e),{navigateTo:t.payload,focused:"none",isMobileModalOpened:!1});case n.ClickOutsideInputLocation:if("location"!==e.focused)return e;return resetSearchLocationKeywords(Object.assign(Object.assign({},e),{focused:"none"}));case n.ClickOutsideInputSpecialty:if("specialty"!==e.focused)return e;return resetSearchLocationKeywords(Object.assign(Object.assign({},e),{focused:"none"}));case n.ClickOutsideInputSearch:if("search"!==e.focused)return e;return Object.assign(Object.assign({},e),{focused:"none"});case n.ClickOutsideInputSearchSpecialty:if("search"!==e.focusedSpecialty)return e;return Object.assign(Object.assign({},e),{focusedSpecialty:"none"});case n.FocusInputLocation:{let t=Object.assign(Object.assign({},e),{focused:"location"});return(null===(a=e.selectedLocation)||void 0===a?void 0:a.id)===_.a&&(t.searchLocationKeywords=""),t}case n.FocusInputSpecialty:{let t=Object.assign(Object.assign({},e),{focused:"specialty"});return(null===(o=e.selectedLocation)||void 0===o?void 0:o.id)===_.a&&(t.searchLocationKeywords=""),t}case n.FocusInputSearch:let i=Object.assign(Object.assign({},e),{focused:"search"});if(e.isMobile)return resetSearchLocationKeywords(i);return i;case n.FocusInputSearchSpecialty:{let t=Object.assign(Object.assign({},e),{focusedSpecialty:"search"});return t}case n.ChangeInputLocation:return Object.assign(Object.assign({},e),{searchLocationKeywords:t.payload});case n.ChangeInputSearch:{let a=t.payload;return Object.assign(Object.assign({},e),{searchKeywords:a,isLoadingSearchResults:a.trim().length>B[e.locale]})}case n.SelectCurrentLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name});case n.ClearInputLocation:return Object.assign(Object.assign({},e),{focused:"location",cities:e.initialCities,searchLocationKeywords:""});case n.ClearInputSearch:return Object.assign(Object.assign({},e),{focused:"search",searchKeywords:""});case n.SelectLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name,searchResults:{}});case n.SelectSpecialty:return Object.assign(Object.assign({},e),{focused:"none",selectedSpecialty:t.payload,searchResults:{}});case n.SelectSearchResult:return Object.assign(Object.assign({},e),{searchKeywords:t.payload.name,isMobileModalOpened:!1,focused:"none",navigateTo:t.payload.url});case n.FetchCitiesStart:return Object.assign(Object.assign({},e),{isLoadingCities:!0});case n.FetchCitiesFinish:return Object.assign(Object.assign({},e),{isLoadingCities:!1});case n.FetchSearchResultsStart:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!0});case n.FetchSearchResultsFinish:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!1});case n.FetchSearchResultsComplete:{let a=Object.assign(Object.assign({},e),{searchResults:Object.assign(Object.assign({},e.searchResults),{[t.payload.key]:t.payload.searches})});return a}case n.FetchCitiesByGeoIpComplete:{let{cities:a}=t.payload,{default:o}=t.payload;a=a.filter(e=>e.id!==o.id),o&&a.unshift(o),e.initialSelectedCity&&!a.find(t=>t.id===e.initialSelectedCity.id)&&a.unshift(e.initialSelectedCity);let i=Object.assign(Object.assign({},e),{defaultCity:o,initialCities:a,cities:a});return"denied"!==e.geoLocationPermission||e.initialSelectedCity||(i.selectedLocation=o,i.searchLocationKeywords=o.name),i}case n.FetchCitiesByKeywordComplete:return Object.assign(Object.assign({},e),{cities:t.payload});case n.DisplayInitialCities:return Object.assign(Object.assign({},e),{cities:e.initialCities});case n.DisplayInitialSearchResults:{let t=e.searchKeywords.trim(),a=B[e.locale],o=t.length>0&&t.length<=a;return Object.assign(Object.assign({},e),{searchResults:o?{}:e.initialSearchResults,isLoadingSearchResults:!1})}case n.UpdateInitialSearchResults:return Object.assign(Object.assign({},e),{initialSearchResults:Object.assign(Object.assign({},e.initialSearchResults),{[t.payload.key]:t.payload.searches})});case n.GrantGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"granted",geoLocationCoordinates:t.payload});case n.DenyGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"denied",geoLocationCoordinates:null});case n.OpenMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!0});case n.CloseMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!1});case n.UpdateInitialSearchValue:return Object.assign(Object.assign({},e),{searchKeywords:t.payload});case n.SetInputSearchPlaceholder:return Object.assign(Object.assign({},e),{inputSearchPlaceholder:t.payload});case n.FetchAllSpecialties:return Object.assign(Object.assign({},e),{allSpecialties:t.payload});case n.FetchPopularKeys:return Object.assign(Object.assign({},e),{popularKeys:t.payload});default:return e}}(o=n||(n={})).NavigateTo="navigate to url",o.ClickOutsideInputLocation="click outside input location",o.ClickOutsideInputSearch="click outside input search",o.ClickOutsideInputSearchSpecialty="click outside input search specialty",o.ClickOutsideInputSpecialty="click outside input specialty",o.SelectCurrentLocation="select current location",o.FocusInputLocation="focus input location",o.FocusInputSearch="focus input search",o.FocusInputSearchSpecialty="focus input search specialty",o.ChangeInputLocation="change input location",o.ChangeInputSearch="change input search",o.ClearInputLocation="clear input location",o.ClearInputSearch="clear input search",o.SelectLocation="select location",o.SelectSpecialty="select specialty",o.FetchCitiesStart="fetch cities start",o.FetchCitiesFinish="fetch cities finish",o.FetchSearchResultsStart="fetch search results start",o.FetchSearchResultsComplete="fetch search results complete",o.FetchSearchResultsFinish="fetch search results finish",o.FetchCitiesByGeoIpComplete="fetch cities by geo IP finish",o.FetchCitiesByKeywordComplete="fetch cities by keyword finish",o.DisplayInitialCities="display initial cities",o.DisplayInitialSearchResults="display initial search results",o.UpdateInitialSearchResults="update initial search results",o.GrantGeoLocationPermission="grant geolocation permission",o.DenyGeoLocationPermission="deny geolocation permission",o.OpenMobileModal="open mobile modal",o.CloseMobileModal="close mobile modal",o.UpdateInitialSearchValue="update initial search value",o.SelectSearchResult="select search result",o.SetInputSearchPlaceholder="set input search placeholder",o.FocusInputSpecialty="focus input specialty",o.FetchAllSpecialties="fetch all specialty",o.FetchPopularKeys="fetch popular key by type";let U=k.Z.div` flex: 1; position: relative; ${L.M.mbDown} { width: 100%; } `,K=k.Z.div` background: #f7f9fc; border-radius: 12px; height: 48px; display: flex; align-items: center; padding: 4px 12px 4px 4px; gap: 16px; ${L.M.mbDown} { height: 48px; width: 100%; } `,Z=k.Z.div` display: flex; align-items: center; flex-shrink: 0; color: #8c8c8c; svg { width: 18px; height: 18px; } `,W=k.Z.div` position: absolute; top: calc(100% + 2px); width: 100%; border-radius: 4px; background: ${N.r.colors.white}; box-shadow: 0px 8px 40px 0px rgba(0, 0, 0, 0.1); z-index: 10; ${L.M.mbDown} { width: calc(100% + 64px); left: -32px; } `,q=k.Z.div``;k.Z.div` display: flex; justify-content: space-between; align-item: center; padding: 9px 14px 9px 22px; background: #f7f9fc; .title { color: ${N.r.colors.gray800}; font-size: 14px; font-weight: 600; line-height: 22px; } .btn-see-all { color: ${N.r.colors.blue600}; font-size: 14px; line-height: 22px; cursor: pointer; } `;let Q=k.Z.div` padding: 10px 16px; max-height: 400px; overflow: auto; `,X=k.Z.div` display: flex; gap: 12px; align-items: center; cursor: pointer; ${L.M.mbUp} { &:hover { background-color: ${N.r.colors.blue50}; } } .image-item { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; img { object-fit: contain; width: 100%; height: 100%; border-radius: 50%; } } .infor { overflow: hidden; padding: 12px 0; flex: 1; border-bottom: 1px solid ${N.r.colors.neutral100}; .title { color: ${N.r.colors.gray800}; font-size: 16px; font-weight: 600; line-height: 24px; } .description { overflow: hidden; color: ${N.r.colors.gray600}; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 18px; display: flex; gap: 8px; align-items: center; margin-top: 5px; svg { flex: 0 0 16px; } .sub-description { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 1; } } } &.last-item { .infor { border-bottom: none; } } `;k.Z.div` padding: 0 16px 16px; .search-detail-btn { color: ${N.r.colors.blue600}; font-size: 14px; line-height: 22px; cursor: pointer; } `;let SearchResult=({state:e,type:t,results:a,isLoading:o,typeInformation:i,dispatch:l})=>{let{t:s}=(0,T.u)(),{selectedLocation:p}=e,u=(0,r.useMemo)(()=>i[t].slug,[i,t]),handleOnClick=e=>{let a="";switch(t){case"service":a=`/${p.slug}/${u}/${e.slug}`;break;case"doctor":case"hospital":a=`/${u}/${e.slug}-${e.id}`}a&&l({type:n.NavigateTo,payload:a})};return null===a?null:r.createElement(q,null,r.createElement(Q,{className:"search-results__body"},o&&r.createElement("div",{className:"skeleton-result"},[,,,].fill(void 0).map((e,a)=>r.createElement(X,{key:t+"loading"+a,className:2===a?"last-item":""},r.createElement("div",{className:"image-item"},r.createElement(c.O,{height:48,circle:!0,mb:"xl",animate:!0})),r.createElement("div",{className:"infor"},r.createElement("div",{className:"title"},r.createElement(c.O,{height:8,mt:10,radius:"xl",animate:!0})),r.createElement("div",{className:"description"},r.createElement("div",{className:"sub-description"},r.createElement(c.O,{height:8,mt:10,radius:"xl",width:"80%",animate:!0}))))))),!o&&a&&a.length>0&&r.createElement(r.Fragment,null,a.map((e,o)=>{var n,l;let s=a.length>4&&3===o||a.length<=4&&o===a.length-1,c="";return("hospital"===t&&(c=(null==e?void 0:e.address)||""),"doctor"===t&&(c=(null===(n=null==e?void 0:e.specialties)||void 0===n?void 0:n.join(", "))||""),"service"===t&&(c=(null===(l=null==e?void 0:e.hospital_branch)||void 0===l?void 0:l.name)||""),o>=4)?r.createElement(r.Fragment,null):r.createElement(X,{key:e.id,className:(0,d.default)(s?"last-item":"","result-item"),onClick:()=>handleOnClick(e)},r.createElement("div",{className:"image-item"},r.createElement("img",{src:e.logo||e.avatar,alt:e.name})),r.createElement("div",{className:"infor"},r.createElement("div",{className:"title"},e.name),r.createElement("div",{className:"description"},i[t].icon,r.createElement("div",{className:"sub-description"},c))))})),!o&&(null==a?void 0:a.length)===0&&r.createElement(R.T,{size:"sm",color:N.r.colors.gray400,className:"noresult-block"},s("booking.searchBar.noResults"))))},SearchResultContent=({state:e,type:t,isLoading:a,clientSlug:o,typeInformation:i,dispatch:n})=>{var l;return"search"!==e.focused?null:r.createElement(SearchResult,{type:t,state:e,results:(null===(l=e.searchResults)||void 0===l?void 0:l[t])||null,location:e.selectedLocation.name,dispatch:n,isLoading:a,typeInformation:i,clientSlug:o})},J=k.Z.div` position: relative; flex-shrink: 0; ${L.M.mbDown} { width: 100%; display: flex; flex-direction: column; gap: 12px; } &.compact { ${L.M.mbDown} { width: auto; display: block; } } `,ee=k.Z.div` position: absolute; top: calc(100% + 4px); left: 0; min-width: 264px; background: white; border-radius: 12px; box-shadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.04), 0px 2px 8px 0px rgba(0, 0, 0, 0.04), 0px 10px 16px 0px rgba(0, 0, 0, 0.04); z-index: 10; overflow: hidden; &.mobile { min-width: 280px; } `,et=k.Z.div` cursor: pointer; padding: 12px 16px; display: flex; align-items: center; gap: 12px; outline: none; .image-item { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex-shrink: 0; img { width: 100%; height: 100%; object-fit: contain; } svg { width: 24px; height: 24px; } } .item-label { font-size: 15px; font-weight: 400; line-height: 24px; letter-spacing: -0.3px; color: ${N.r.colors.gray800}; } &:hover { background-color: ${N.r.colors.neutral50}; } &.selected { background-color: ${N.r.colors.neutral50}; } &:last-child { border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; } `,DoctorIcon=()=>r.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},r.createElement("path",{d:"M8.983 14.333q-1.666 0-2.833-1.166Q4.983 12 4.983 10.333v-.366a3.48 3.48 0 0 1-2.258-1.2 3.57 3.57 0 0 1-.909-2.434V3.1a.58.58 0 0 1 .175-.425.58.58 0 0 1 .425-.175h1.4v-.167a.486.486 0 0 1 .5-.5q.217 0 .36.142a.5.5 0 0 1 .14.358v1.334a.485.485 0 0 1-.5.5.484.484 0 0 1-.5-.5V3.5h-1v2.833q0 1.1.784 1.884Q4.383 9 5.483 9t1.883-.783.784-1.884V3.5h-1v.167a.485.485 0 0 1-.5.5.484.484 0 0 1-.5-.5V2.333a.486.486 0 0 1 .5-.5q.217 0 .358.142a.5.5 0 0 1 .142.358V2.5h1.4a.58.58 0 0 1 .425.175.58.58 0 0 1 .175.425v3.233q0 1.4-.908 2.434a3.5 3.5 0 0 1-2.259 1.2v.366q0 1.25.875 2.126a2.9 2.9 0 0 0 2.125.874q1.25 0 2.125-.874a2.9 2.9 0 0 0 .875-2.126V9.25a1.74 1.74 0 0 1-.858-.609 1.6 1.6 0 0 1-.342-1.008q0-.716.5-1.216t1.2-.5q.716 0 1.217.5.5.5.5 1.216 0 .567-.342 1.008t-.875.609v1.083q0 1.667-1.167 2.834-1.166 1.166-2.833 1.166m3.5-6q.3 0 .509-.208a.67.67 0 0 0 .208-.492q0-.3-.208-.508a.7.7 0 0 0-.509-.208q-.3 0-.5.208a.7.7 0 0 0-.2.508q0 .284.2.492t.5.208",fill:"#595959"})),ServiceIcon=()=>r.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},r.createElement("path",{d:"M6.868 9.265v.974q0 .405.284.69.284.283.69.283t.69-.284.284-.69v-.973h.973q.405 0 .69-.284a.94.94 0 0 0 .284-.689.94.94 0 0 0-.284-.69.94.94 0 0 0-.69-.284h-.973v-.974a.94.94 0 0 0-.284-.69.94.94 0 0 0-.69-.284.94.94 0 0 0-.689.284.94.94 0 0 0-.285.69v.974h-.973a.94.94 0 0 0-.69.283.94.94 0 0 0-.284.69q0 .405.284.69.285.284.69.284zm-3.46 4.868q-.581 0-.994-.413A1.36 1.36 0 0 1 2 12.725v-6.65a1.4 1.4 0 0 1 .563-1.127l4.434-3.333q.369-.282.844-.282.474 0 .846.282l4.434 3.333q.264.193.413.493.15.3.15.633v6.651q0 .58-.414.995a1.36 1.36 0 0 1-.994.413zm0-1.168h8.868q.105 0 .172-.068a.23.23 0 0 0 .068-.172v-6.65a.2.2 0 0 0-.027-.11.3.3 0 0 0-.07-.085L7.983 2.554a.2.2 0 0 0-.142-.052.2.2 0 0 0-.142.052L3.266 5.88a.3.3 0 0 0-.071.086.2.2 0 0 0-.027.108v6.651q0 .105.068.172a.23.23 0 0 0 .172.068",fill:"#595959"})),HospitalIcon=()=>r.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},r.createElement("path",{d:"M8 8q.55 0 .941-.392.393-.391.392-.941 0-.55-.392-.942A1.28 1.28 0 0 0 8 5.333q-.55 0-.942.392a1.28 1.28 0 0 0-.391.942q0 .55.391.941Q7.45 8 8 8m0 4.9q2.032-1.866 3.017-3.392Q12 7.983 12 6.8q0-1.817-1.158-2.975Q9.682 2.667 8 2.667T5.158 3.825Q4 4.983 4 6.8q0 1.184.983 2.708Q5.966 11.034 8 12.9m0 1.517a.8.8 0 0 1-.5-.183q-2.433-2.151-3.633-3.992T2.667 6.8q0-2.5 1.608-3.983Q5.883 1.332 8 1.333q2.116 0 3.725 1.484T13.333 6.8q0 1.6-1.2 3.442-1.2 1.841-3.633 3.991a.8.8 0 0 1-.5.184",fill:"#8C8C8C"})),SpecialtyIcon=()=>r.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},r.createElement("path",{d:"M3.833.5a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667M10.5.5c-.92 0-1.667.746-1.667 1.667V5.5c0 .92.746 1.667 1.667 1.667h3.333c.921 0 1.667-.746 1.667-1.667V2.167C15.5 1.246 14.754.5 13.833.5zM3.833 8.833a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667m8.334 0a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667",fill:"#9AA2AC"})),SearchSpecialty=({state:e,isMobile:t,onSpecialtyClick:a,dispatch:o,isCompact:i=!1})=>{let{t:l,locale:c}=(0,T.u)(),d=(0,r.useRef)(null),m=(0,r.useRef)(null),E=(0,r.useMemo)(()=>_.L[c],[c]),[y,b]=(0,r.useState)(""),[f,{close:I,toggle:x}]=(0,C.q)(!1);(0,v.a)(d,()=>{I(),b(""),o({type:n.ClickOutsideInputSpecialty})});let O=(0,r.useMemo)(()=>[{name:l("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:E.SPECIALTIES},...e.allSpecialties],[e.allSpecialties,l,E.SPECIALTIES]),S=(0,r.useMemo)(()=>y.trim()?O.filter(e=>e.name.toLowerCase().includes(y.toLowerCase().trim())):O,[O,y]),w=(0,r.useMemo)(()=>e.selectedSpecialty?e.selectedSpecialty.name:"",[e.selectedSpecialty]),k=(0,r.useCallback)(e=>{a({id:e.id,name:e.name,slug:e.slug,thumbnail:e.thumbnail||"",total_doctor:0}),I(),b("")},[a,I]),L=(0,r.useCallback)(()=>{x(),f&&b("")},[x,f]);return r.createElement(J,{ref:d,className:i?"compact":""},r.createElement(p.x,{onClick:L,className:f?"dropdown-trigger-open":"",sx:{cursor:"pointer",position:"relative",width:i?t?96:160:"100%",flexShrink:0}},r.createElement(u.I,{readOnly:!0,value:w,placeholder:l("booking.searchPopup.specialties"),rightSection:r.createElement(M.C,{style:{width:20,height:20}}),styles:Object.assign({input:{cursor:"pointer",outline:"none","&:focus":{outline:"none"},"&:not(.mantine-Textarea-input)":{height:i?40:t?40:46,fontSize:i?(0,h.h)(14):t?(0,h.h)(14):(0,h.h)(16),paddingLeft:i?12:16,paddingRight:30,background:i?"white":"transparent",border:i?`1px solid ${N.r.colors.gray200}`:"none",borderRadius:8,letterSpacing:"-0.2px",color:N.r.colors.gray800,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}},rightSection:{width:30,pointerEvents:"none"}},!i&&{wrapper:{position:"relative","&:after":{content:'""',width:"1px",height:"20px",backgroundColor:N.r.colors.neutral100,position:"absolute",right:0,top:"50%",transform:"translateY(-50%)"}}})})),f&&r.createElement(ee,{className:t?"mobile":""},r.createElement(p.x,{sx:{padding:"12px 12px 8px"}},r.createElement(u.I,{ref:m,icon:r.createElement(s.Z,{size:18,color:N.r.colors.gray300}),placeholder:l("booking.searchBar.placeholder.specialty"),value:y,onChange:e=>b(e.target.value),size:"md",styles:{input:{height:40,fontSize:(0,h.h)(15),paddingLeft:36,"&::placeholder":{color:N.r.colors.gray400}},icon:{width:36}}})),r.createElement(g.x.Autosize,{mah:300},0===S.length?r.createElement(p.x,{sx:{padding:"12px 16px",color:N.r.colors.gray400,fontSize:14}},l("common.noResult")):S.map(t=>{var a,o;return r.createElement(et,{key:t.id,tabIndex:0,role:"option","aria-selected":(null===(a=e.selectedSpecialty)||void 0===a?void 0:a.id)===t.id,className:(null===(o=e.selectedSpecialty)||void 0===o?void 0:o.id)===t.id?"selected":"",onClick:()=>k(t),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),k(t))}},r.createElement("div",{className:"image-item"},t.thumbnail?r.createElement("img",{src:t.thumbnail,alt:t.name}):r.createElement(SpecialtyIcon,null)),r.createElement("span",{className:"item-label"},t.name))}))))},ea=(0,r.forwardRef)(({state:e,type:t,isMobile:a,isLoading:o,initalSearchValue:i,typeInformation:l,debouncedFetchSearchResults:c,trackingAttributes:d,hideSpecialtySelection:p=!1,clientSlug:g="",onSearch:m,onFocusInput:E,onEnterSearch:y,dispatch:b,onlyShowSearchBox:f,onChangeSpecialty:I},x)=>{let{t:C}=(0,T.u)(),O=(0,r.useRef)(null),S=(0,r.useRef)(null);(0,r.useImperativeHandle)(x,()=>({focus:()=>{var e;null===(e=S.current)||void 0===e||e.focus()}}));let w=(0,r.useMemo)(()=>d?{"data-event-category":d.dataEventCategory,"data-event-action":d.dataEventAction,"data-event-label":d.dataEventLabel}:{},[d]),_=(0,r.useMemo)(()=>"doctor"===t?C("booking.searchBar.placeholder.doctor"):"service"===t?C("booking.searchBar.placeholder.service"):"hospital"===t?C("booking.searchBar.placeholder.hospital"):"specialty"===t?C("booking.searchBar.placeholder.specialty"):"",[t,C]),k="specialty"!==t&&"service"!==t&&!p&&!f,L=(0,r.useMemo)(()=>({input:{border:"none",background:"transparent",height:"100%",fontSize:(0,h.h)(16),color:N.r.colors.gray800,padding:"0","&::placeholder":{color:N.r.colors.gray400},"&:focus":{outline:"none",boxShadow:"none"},[a?"@media (max-width: 767px)":""]:a?{fontSize:(0,h.h)(16)}:{}},wrapper:{flex:1}}),[a]);(0,v.a)(O,()=>{a||b({type:n.ClickOutsideInputSearch})});let A=(0,r.useCallback)(function(a){b({type:n.ChangeInputSearch,payload:a}),"function"!=typeof m&&(a.trim().length>B[e.locale]||i||0===a.trim().length)&&c(a.trim(),e,t,g)},[b,e,t,i,c,g,m]),R=(0,r.useCallback)(function(e){var t;b({type:n.SelectSpecialty,payload:e}),null==I||I(e),a||null===(t=S.current)||void 0===t||t.focus()},[b,I]),M=(0,r.useCallback)(e=>{"Enter"===e.key&&(e.stopPropagation(),e.preventDefault(),y&&y())},[y]);return r.createElement(U,{ref:O},r.createElement(K,null,k&&r.createElement(SearchSpecialty,{state:e,isMobile:a,dispatch:b,debouncedFetchSearchResults:c,onSpecialtyClick:R,isCompact:!0}),r.createElement(Z,null,r.createElement(s.Z,null)),r.createElement(u.I,Object.assign({ref:S,variant:"unstyled",size:a?"md":"lg",placeholder:_,styles:L,value:e.searchKeywords,name:"search-results",autoComplete:"off",onFocus:()=>{b({type:n.FocusInputSearch}),null==E||E()},onChange:e=>{A(e.target.value)},onKeyDown:M},w))),!a&&"specialty"!==t&&r.createElement(W,null,r.createElement(SearchResultContent,{type:t,state:e,dispatch:b,isLoading:o,typeInformation:l,clientSlug:g})))});ea.displayName="SearchInputs";let ModalSearchResult=e=>{var{searchInputEle:t,closeModal:a,children:o}=e,i=(0,P._)(e,["searchInputEle","closeModal","children"]);let n=(0,m.rZ)();return r.createElement(Y.M,Object.assign({},i,{zIndex:310,fullScreen:!0,styles:{content:{borderRadius:0,height:"100%",".search-results__body":{padding:0},".result-item":{paddingLeft:16,paddingRight:16},".noresult-block":{padding:16},".skeleton-result":{padding:16}},header:{display:"none"}}}),r.createElement(E.K,{spacing:16,sx:{paddingTop:16}},r.createElement(y.k,{align:"center",gap:12},r.createElement(D.Z,{size:28,onClick:a,color:n.fn.primaryColor()}),r.createElement(p.x,{sx:{width:"100%"}},t)),o))},eo=k.Z.div` position: relative; width: 240px; flex-shrink: 0; ${L.M.mbDown} { width: 100%; } `;k.Z.div` position: absolute; top: calc(100% + 2px); width: 100%; border-radius: 4px; background: ${N.r.colors.white}; box-shadow: 0px 8px 40px 0px rgba(0, 0, 0, 0.1); z-index: 10; ${L.M.mbDown} { width: calc(100% + 64px); left: -32px; } `;let ei=k.Z.div` position: relative; cursor: pointer; padding: 12px 18px; display: flex; align-items: center; gap: 14px; overflow: hidden; & + li::before { content: ''; position: absolute; left: 18px; right: 18px; top: 0; height: 1px; background-color: ${N.r.colors.neutral100}; } &:not([data-is-denied='true']):hover { background-color: ${N.r.colors.neutral50}; } &:last-child:hover { border-bottom-right-radius: 6px; border-bottom-left-radius: 6px; } &:first-child:hover { border-top-right-radius: 6px; border-top-left-radius: 6px; } &[data-is-denied='true'] { cursor: not-allowed; } `,en=(0,k.Z)(O.P)` width: 12px; height: 18px; flex: 0 0 12px; `,el=(0,r.forwardRef)((e,t)=>{var{label:a,value:o}=e,i=(0,P._)(e,["label","value"]);return r.createElement("div",Object.assign({ref:t},i),r.createElement(ei,{key:o,role:"button",tabIndex:0,"aria-label":`Select ${a} as location`,className:"location-item"},r.createElement(en,{color:N.r.colors.neutral400}),r.createElement(b.x,{size:"md"},a)))}),SearchLocation=({state:e,debouncedFetchCitiesByKeyword:t,selectedLocation:a,trackingAttributes:o,onLocationClick:i,dispatch:l})=>{var s;let{t:c,locale:d}=(0,T.u)(),p=(0,r.useRef)(null),u=(0,r.useMemo)(()=>{var t;return[{name:c("booking.searchBar.allLocations"),id:_.I,slug:null===(t=_.L[d])||void 0===t?void 0:t.ALL},...e.cities]},[e.cities,c,d]),g=(0,r.useMemo)(()=>o?{"data-event-category":o.dataEventCategory,"data-event-action":o.dataEventAction,"data-event-label":o.dataEventLabel}:{},[o]),m=(0,r.useCallback)(function(a){l({type:n.ChangeInputLocation,payload:a}),a.trim().length>B[e.locale]?t(a.trim()):(t.cancel(),l({type:n.DisplayInitialCities}))},[t,l,e.locale]);(0,v.a)(p,()=>{l({type:n.ClickOutsideInputLocation})});let E=null!==(s=null==a?void 0:a.id)&&void 0!==s?s:null,y=null===E?void 0:String(E);return r.createElement(eo,{ref:p},r.createElement(f.Ph,Object.assign({key:null!=y?y:"no-selected-location",defaultValue:y,placeholder:c("booking.searchBar.allLocations"),searchable:!0,onSearchChange:e=>{m(e)},onFocus:()=>{l({type:n.DisplayInitialCities})},onDropdownClose:()=>{t.cancel(),l({type:n.DisplayInitialCities})},nothingFound:c("common.noResult"),maxDropdownHeight:340,dropdownPosition:"bottom",icon:r.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.createElement("path",{d:"M9.99908 10.8332C11.2264 10.8332 12.2213 9.83764 12.2213 8.61097C12.2213 7.3843 11.2264 6.38875 9.99908 6.38875C8.77174 6.38875 7.77686 7.3843 7.77686 8.61097C7.77686 9.83764 8.77174 10.8332 9.99908 10.8332Z",stroke:"#111111",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),r.createElement("path",{d:"M9.99919 18.0554C11.7584 17.4999 16.6659 13.611 16.6659 8.61097C16.6659 4.93097 13.6811 1.94431 9.99919 1.94431C6.3173 1.94431 3.33252 4.93097 3.33252 8.61097C3.33252 13.611 8.23996 17.4999 9.99919 18.0554Z",stroke:"#111111",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),rightSection:r.createElement(M.C,{style:{width:20,height:20}})},g,{styles:()=>({item:{padding:0,"&[data-selected]":{"&, &:hover":{backgroundColor:"#F7F9FC",color:"inherit"},".location-item":{"&::after":{content:O.i,top:"50%",right:19,position:"absolute",transform:"translateY(-50%)"}}},"&[data-hovered]":{backgroundColor:"transparent"}},root:{width:"100%"},wrapper:{width:"100%"},input:{"&:not(.mantine-Textarea-input)":{height:48,fontSize:(0,h.h)(15),fontWeight:400,letterSpacing:"-0.3px",color:N.r.colors.gray1000,paddingLeft:44,paddingRight:40,background:"white",border:`1px solid ${N.r.colors.gray200}`,borderRadius:12}},icon:{width:44,paddingLeft:12},rightSection:{width:40,paddingRight:12},itemsWrapper:{padding:0},dropdown:{left:"0 !important",border:0,marginTop:4,borderRadius:12,overflow:"hidden",boxShadow:"0px 0px 1px 0px rgba(0, 0, 0, 0.04), 0px 2px 8px 0px rgba(0, 0, 0, 0.04), 0px 10px 16px 0px rgba(0, 0, 0, 0.04)","& ::-webkit-scrollbar":{width:"6px",height:"6px"}}}),itemComponent:el,filter:()=>!0,onChange:e=>{if(null==e)return;let a=u.find(t=>String(t.id)===e);a&&(i(a),t.cancel(),l({type:n.DisplayInitialCities}),setTimeout(()=>{var e,t;null===(t=null===(e=p.current)||void 0===e?void 0:e.querySelector("input"))||void 0===t||t.blur()},0))},data:u.map(e=>({value:String(e.id),label:e.name,city:e}))})))},er=k.Z.div` display: flex; flex-wrap: wrap; row-gap: 8px; column-gap: 20px; ${L.M.mbDown} { margin-top: 12px; } `,es=k.Z.div` display: flex; align-items: center; border-radius: 8px; border: 1px solid ${N.r.colors.neutral100}; background: ${N.r.colors.white}; padding: 8px 12px 8px 8px; flex: 0 0 calc(33.3% - 13px); gap: 12px; cursor: pointer; &:hover { background: ${N.r.colors.blue50}; } ${L.M.tdDown} { flex: 0 0 calc(50% - 10px); } ${L.M.mbDown} { flex: 0 0 100%; border: none; } .image-item { display: flex; align-items: center; width: 40px; height: 40px; img { width: 100%; object-fit: cover; } } .infor { flex: 1; .title { color: ${N.r.colors.gray800}; font-size: 14px; font-style: normal; font-weight: 400; line-height: 22px; } .description { color: ${N.r.colors.gray600}; font-size: 12px; font-weight: 400; line-height: 18px; } } `,ec=(0,k.Z)(I.i)` margin: 24px 0 !important; `,ed=k.Z.div` display: flex; justify-content: center; margin-top: 24px; .show-more { border-radius: 4px; border: 1px solid ${N.r.colors.neutral200}; padding: 12px 16px; cursor: pointer; display: inline-block; color: ${N.r.colors.gray800}; font-size: 16px; font-weight: 600; line-height: 24px; ${L.M.mbDown} { width: 100%; text-align: center; } } `,SearchResultSpecialties=({state:e,isMobile:t,specialties:a,isLoading:o,dispatch:i})=>{let{t:l,locale:s}=(0,T.u)(),{selectedLocation:d}=e,p=(0,r.useMemo)(()=>_.L[s],[s]),handleOnClick=e=>{let t="";e===_.S?(t=`/${d.slug}/${p.HOSPITAL}/${_.C.GSK}/`,i({type:n.ClickOutsideInputSearchSpecialty})):t=`/${d.slug}/${p.DOCTOR}/${e}`,i({type:n.NavigateTo,payload:t})},u=(0,r.useMemo)(()=>a.length>=9||e.searchKeywords.trim().length<=B[e.locale],[e.searchKeywords,a]);return r.createElement(r.Fragment,null,!t&&r.createElement(ec,{color:"#E4E8EC"}),r.createElement(er,null,a.length>0&&!o&&r.createElement(r.Fragment,null,a.map((e,t)=>t>=9?r.createElement(r.Fragment,null):r.createElement(es,{key:e.id,onClick:()=>handleOnClick(e.slug)},r.createElement("div",{className:"image-item"},r.createElement("img",{src:e.thumbnail,alt:e.name})),r.createElement("div",{className:"infor"},r.createElement("div",{className:"title"},e.name))))),0===a.length&&!o&&r.createElement(R.T,{size:"sm",color:N.r.colors.gray400},l("booking.searchBar.noResults")),o&&Array(6).fill(void 0).map((e,t)=>r.createElement(es,{key:"loading"+t},r.createElement("div",{className:"image-item"},r.createElement(c.O,{height:40,animate:!0})),r.createElement("div",{className:"infor"},r.createElement("div",{className:"title"},r.createElement(c.O,{height:20,radius:"sm",animate:!0})))))),u&&r.createElement(ed,null,r.createElement("div",{className:"show-more",onClick:()=>{let e=`/${p.SPECIALTIES}`;i({type:n.NavigateTo,payload:e})}},l("home.seeAll"))))},ep=k.Z.div` display: flex; gap: 5px; margin-top: 16px; flex-wrap: wrap; `,eu=k.Z.div` color: ${N.r.colors.gray600}; font-size: 14px; font-weight: 600; line-height: 22px; padding: 4px 12px; background: ${N.r.colors.white}; border-radius: 32px; cursor: pointer; border: 1px solid ${N.r.colors.white}; margin-bottom: 5px; border-color: ${N.r.colors.neutral100}; background: #f7f9fc; &.view-all { border-radius: 32px; border-color: ${N.r.colors.blue50}; background: ${N.r.colors.blue50}; color: ${N.r.colors.blue600}; &:hover { border-color: ${N.r.colors.blue50}; background: ${N.r.colors.blue50}; color: ${N.r.colors.blue600}; } } &:hover { border-color: ${N.r.colors.neutral100}; background: #f7f9fc; } `,eh=k.Z.div` color: ${N.r.colors.gray600}; font-size: 14px; font-weight: 600; line-height: 22px; padding: 4px 0; background: ${N.r.colors.white}; border-radius: 32px; border: 1px solid ${N.r.colors.white}; margin-bottom: 5px; margin-right: 7px; `,SearchTag=({state:e,type:t,typeInformation:a,dispatch:o})=>{let{t:i}=(0,T.u)(),{selectedLocation:l}=e,s=(0,r.useMemo)(()=>a[t].slug,[a,t]),handleClickKeyword=e=>{e.url&&(window.location.href=e.url)};return r.createElement(ep,null,r.createElement(eh,null,i("booking.searchBar.popularKey")),e.popularKeys.map(e=>r.createElement(eu,{key:e.id,onClick:()=>handleClickKeyword(e)},e.keyword)),r.createElement(eu,{className:"view-all",onClick:()=>{let e=`/${l.slug}/${s}`;e&&o({type:n.NavigateTo,payload:e})}},i("booking.searchBar.viewAll")))},eg=k.Z.div` background: rgba(255, 255, 255, 0.64); backdrop-filter: blur(12px); border-bottom: 1px solid ${N.r.colors.neutral100}; `,em=(0,k.Z)(A.C)` padding: 0 16px; `,TabSearch=({currentTab:e,hideTabBookingSearch:t=[],hideSpecialtyTab:a,isMobile:o,setCurrentTab:i})=>{let{t:n}=(0,T.u)(),l=(0,r.useMemo)(()=>({root:{overflowY:o?"hidden":"initial",overflowX:o?"auto":"initial"},tabsList:{background:"rgba(255, 255, 255, 0)",borderBottom:"none",flexWrap:"nowrap",".mantine-Tabs-tab":{"&:last-child":{"&:after":{display:"none"}}}},tab:{padding:o?"12px 16px 12px 16px":"15px 40px 15px 40px",borderTop:"2px solid transparent",borderBottom:"none",margin:0,borderRadius:0,position:"relative",width:"auto",'&[data-active="true"]':{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:after":{display:"none"},"&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:hover":{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:after":{content:'""',width:"1px",height:"24px",backgroundColor:"#E4E8EC",position:"absolute",right:"-1px"}},tabLabel:{color:"#595959",fontSize:o?"14px":"16px",fontWeight:600,lineHeight:o?"22px":"24px"}}),[o]),s=(0,r.useMemo)(()=>[{value:"hospital",label:n("booking.searchPopup.hospitals")},{value:"doctor",label:n("booking.searchPopup.doctors")},{value:"service",label:n("booking.searchPopup.services")},...a?[]:[{value:"specialty",label:n("booking.searchPopup.specialties")}]],[a]),c=(0,r.useMemo)(()=>s.filter(e=>!t.includes(e.value))||[],[t,s]);return r.createElement(eg,{className:"booking-search-tab"},r.createElement(em,null,r.createElement(x.m,{value:e,onTabChange:e=>{i(e)},styles:l},r.createElement(x.m.List,null,c.map(e=>r.createElement(x.m.Tab,{value:e.value,key:e.value},e.label))))))};(i=l||(l={})).doctor="doctor",i.service="hospital_service",i.hospital="hospital_branch";let ignoreCacarSpecialty=e=>e.filter(e=>"string"==typeof e?"cacar-api"!==e:(null==e?void 0:e.id)!==232),BookingSearchBarV3=({isMobile:e,careApiDomain:t,geoLocationPermission:a,geoLocationCoordinates:o,initialSelectedCity:i,initialSearchValue:c="",initTypeSearch:d="hospital",initSpecialty:u,careFrontDomain:h="/care",isDebug:g=!1,gaTrackingSearchBar:m,gaTrackingLocationSearch:E,autoCompleteDisabled:b=!1,inputSearchPlaceholder:f="",hideTabBookingSearch:I=[],hideSpecialtySelection:x=!1,hideSpecialtyTab:S=!1,hidePopularSearchKeys:k=!1,clientSlug:N="",triggerSearchWhenChangeFilter:L,routerPush:A,onGeoLocationPermissionChange:R,onChangeLocation:M})=>{var P;let{locale:D,t:Y}=(0,T.u)(),U=(0,r.useRef)(null),K=(0,r.useRef)(null),Z=(0,r.useRef)(null),W=(0,r.useRef)(null),[q,Q]=(0,r.useState)(d),{geoLocationPermission:X,geoLocationCoordinates:J}=(0,O.u)(),[ee,et]=(0,r.useReducer)(reducer,z,t=>Object.assign(Object.assign({},t),{isDebug:g,isMobile:e,geoLocationPermission:a||X||"unset",geoLocationCoordinates:o||J||null,searchKeywords:c,initialSelectedCity:i||null,selectedLocation:i||t.selectedLocation||null,searchLocationKeywords:(null==i?void 0:i.name)||t.searchLocationKeywords,autoCompleteDisabled:b,inputSearchPlaceholder:f,locale:D})),{navigateTo:eo,focusedSpecialty:ei,searchKeywords:en,geoLocationPermission:el,selectedLocation:er,initialSelectedCity:es,searchResults:ec,isLoadingSearchResults:ed}=ee,{fetchCitiesByLocation:ep,fetchCitiesByKeyword:eu,fetchSearchResults:eh,fetchAllSpecialties:eg,fetchPopularKeys:em}=function({dispatch:e,careApiDomain:t,locale:a="vi-VN",client:o=""}){let i=(0,r.useCallback)(function(o,i={}){let l=`${t}${o}`;return e({type:n.FetchCitiesStart}),fetch((0,O.h)(l,i,a),{method:"GET"}).then(e=>e.json()).then(e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e))).finally(()=>e({type:n.FetchCitiesFinish}))},[a]),s=(0,r.useCallback)(function({coordinates:t}){let l={},r={};t&&(l={lat:t.lat,lng:t.lng}),"ms-MY"===a&&(r.noPaging=1);let s=[i(G.P.GET_CITY_BY_IP,Object.assign(Object.assign(Object.assign({},l),r),{hospitalActive:1,client:_.C.MSD===o?"":o}))];return"zh-TW"===a?s.push(i(G.P.GET_CITIES_LIST,{noPaging:1,hospitalActive:1,client:_.C.MSD===o?"":o})):s.push(i(G.P.GET_CITIES_LIST,{noPaging:1,hospitalActive:1})),Promise.all(s).then(([t,a])=>{let o=Object.assign({},t);if(a){let e=o.cities.map(e=>e.id);o.cities=o.cities.concat(a.cities.filter(t=>!e.includes(t.id)))}e({type:n.FetchCitiesByGeoIpComplete,payload:o})}).catch(e=>console.error("error loading cities by location",e))},[a,t,e]),c=(0,r.useCallback)(function(t){return i(G.P.GET_CITIES_LIST,{keyword:t,client:o}).then(t=>{e({type:n.FetchCitiesByKeywordComplete,payload:t.cities})}).catch(e=>console.error("error loading cities by keyword",e))},[a,t,e]),d=(0,r.useCallback)(function(i,l,r,s,c){let d="specialty"===r?`${t}${G.P.GET_SEARCH_SPECIALTY}`:`${t}${G.P.GET_SEARCH_V2}`;e({type:n.FetchSearchResultsStart});let{selectedLocation:p,geoLocationCoordinates:u,selectedSpecialty:h}=l,g="";if(!p){e({type:n.FetchSearchResultsFinish});return}g=p.id===_.I?"":p.id;let m=(null==u?void 0:u.lat)||"",E=(null==u?void 0:u.lng)||"",y=(null==h?void 0:h.id)>0?null==h?void 0:h.id:"",b=i.trim().length>B[a]?i.trim():"";return fetch((0,O.h)(d,Object.assign({domain:t,searchType:r||"global",keyword:b,city:g===_.a?"":g,lat:m,lng:E,specialty_id:y,client_slug:_.C.MSD===s?"":s,msd:_.C.MSD===o?1:""},"doctor"===r&&{skipBooking:1}),a),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then(e=>e.json()).then(e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e)).then(t=>{let a=[];"specialty"!==r&&(a="doctor"===r?t.searches.map(e=>Object.assign(Object.assign({},e),{specialties:ignoreCacarSpecialty((null==e?void 0:e.specialties)||[])})):t.searches),"specialty"===r&&(a=b?ignoreCacarSpecialty((null==t?void 0:t.specialties)||[]):ignoreCacarSpecialty((null==t?void 0:t.default)||[])),e({type:n.FetchSearchResultsComplete,payload:{key:r,searches:a||[]}}),c&&e({type:n.UpdateInitialSearchResults,payload:{key:r,searches:a||[]}})}).catch(e=>{console.log("error loading search results",{url:d,error:e})}).finally(()=>e({type:n.FetchSearchResultsFinish}))},[a,t,e]),p=(0,r.useCallback)(function(){let i=`${t}${G.P.GET_SEARCH_SPECIALTY}`;return fetch((0,O.h)(i,{domain:t,searchType:"",msd:_.C.MSD===o?1:""},a),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then(e=>e.json()).then(e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e)).then(t=>{e({type:n.FetchAllSpecialties,payload:ignoreCacarSpecialty(t.specialties||[])})}).catch(e=>{console.log("error loading search results",{url:i,error:e})})},[a,t,e]),u=(0,r.useCallback)(function(o){let i=`${t}${G.P.GET_SEARCH_POPULAR_KEY}`;return fetch((0,O.h)(i,{domain:t,searchType:l[o],sort_by:"display_order",sort_order:"asc"},a)).then(e=>e.json()).then(e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e)).then(t=>{e({type:n.FetchPopularKeys,payload:t.popular_searches||[]})}).catch(e=>{console.log("error loading search results",{url:i,error:e})})},[a,t,e]);return{fetchCitiesByLocation:s,fetchCitiesByKeyword:c,fetchSearchResults:d,fetchAllSpecialties:p,fetchPopularKeys:u}}({dispatch:et,locale:D,careApiDomain:t,client:N}),eE=(0,r.useMemo)(()=>_.L[D],[D]),[ey,{close:eb,open:ef}]=(0,C.q)(!1),eI=(0,r.useMemo)(()=>Object.assign({doctor:{name:Y("booking.searchPopup.doctors"),icon:r.createElement(DoctorIcon,null),slug:eE.DOCTOR},service:{name:Y("booking.searchPopup.services"),icon:r.createElement(ServiceIcon,null),slug:eE.SERVICE},hospital:{name:Y("booking.searchPopup.hospitals"),icon:r.createElement(HospitalIcon,null),slug:eE.HOSPITAL}},!S&&{specialty:{name:Y("booking.searchPopup.specialties"),icon:r.createElement(SpecialtyIcon,null),slug:eE.SPECIALTIES}}),[q]),ex=(0,r.useMemo)(()=>w()(eu,400),[eu]),eC=(0,r.useMemo)(()=>w()(eh,400),[eh]),eO=(0,r.useCallback)(function({locationSlug:e,specialtyId:t}={}){var a;eb();let o="",{slug:i}=eI[q],l="",r=_.M[D][N],s=t||(null===(a=ee.selectedSpecialty)||void 0===a?void 0:a.id)||-1,c=e||(null==er?void 0:er.slug)||"";("doctor"===q||"hospital"===q)&&s>0&&(l=`&specialtyId=${s}`),o="specialty"===q?`/${i}`:`/${c}/${i}`,r&&(o+=`/${r}`),(o+=`?q=${en}${l}`)&&et({type:n.NavigateTo,payload:o})},[N,eb,q,et,D,en,null==er?void 0:er.slug,null===(P=ee.selectedSpecialty)||void 0===P?void 0:P.id,eI]),ev=(0,r.useCallback)(function(e){L&&eO({locationSlug:e.slug}),et({type:n.SelectLocation,payload:e}),M&&M(e)},[et,e,M,eO,L]);(0,v.a)(W,()=>{e||et({type:n.ClickOutsideInputSearchSpecialty})}),(0,r.useEffect)(()=>{var t;"denied"===el||es||et({type:n.SelectLocation,payload:{name:Y("booking.searchBar.allLocations"),id:_.I,slug:null===(t=_.L[D])||void 0===t?void 0:t.ALL}}),R&&R(el,ee.geoLocationCoordinates),e&&"granted"===el&&er&&et({type:n.FocusInputSearch}),ep({coordinates:ee.geoLocationCoordinates})},[el]),(0,r.useEffect)(()=>{var e;let t=u||{name:Y("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:eE.SPECIALTIES};if(u){(null===(e=ee.selectedSpecialty)||void 0===e?void 0:e.id)!==u.id&&et({type:n.SelectSpecialty,payload:u});return}ee.selectedSpecialty&&ee.selectedSpecialty.id===t.id||et({type:n.SelectSpecialty,payload:t})},[u,eE.SPECIALTIES,Y]),(0,r.useEffect)(()=>{eg()},[]),(0,r.useEffect)(()=>{em(q)},[q]),(0,r.useEffect)(()=>{eo&&(A?A(eo):window.location.href=`${h}${eo}`)},[eo]),(0,r.useEffect)(()=>{eh(ee.searchKeywords,ee,q,N,!0)},[q]),(0,r.useEffect)(()=>{if(ey&&e){let e=setTimeout(()=>{var e;null===(e=Z.current)||void 0===e||e.focus()},150);return()=>clearTimeout(e)}},[ey,e]);let eT={type:q,isMobile:e,state:ee,dispatch:et,debouncedFetchSearchResults:eC,initalSearchValue:c,onEnterSearch:eO,typeInformation:eI,trackingAttributes:m,isLoading:ed,hideSpecialtySelection:x||S,clientSlug:N,triggerSearchWhenChangeFilter:L,onChangeSpecialty:e=>L&&eO({specialtyId:e.id})};return r.createElement(r.Fragment,null,r.createElement(H,{ref:U},r.createElement(TabSearch,{currentTab:q,setCurrentTab:Q,isMobile:e,hideTabBookingSearch:I,hideSpecialtyTab:S}),r.createElement(V,{className:"booking-search-container"},r.createElement($,null,r.createElement(F,{className:"booking-search-content"},r.createElement("div",{ref:W},r.createElement(y.k,{gap:"12px",align:"center",className:"flex-search-input"},r.createElement(ea,Object.assign({},eT,{ref:K,onFocusInput:()=>e&&ef()})),"specialty"!==q&&r.createElement(SearchLocation,{state:ee,isMobile:e,dispatch:et,debouncedFetchCitiesByKeyword:ex,selectedLocation:er,onLocationClick:ev,trackingAttributes:E}),!e&&r.createElement(j.B,{size:"lg",variant:"primary",onClick:()=>eO(),styles:{root:{height:"48px",minWidth:"120px",borderRadius:"12px"}}},Y("booking.searchBar.searchButton"))),!k&&"specialty"!==q&&ee.popularKeys.length>0&&r.createElement(SearchTag,{type:q,state:ee,typeInformation:eI,dispatch:et}),"specialty"===q&&"search"===ei&&r.createElement(SearchResultSpecialties,{state:ee,isMobile:e,dispatch:et,specialties:(null==ec?void 0:ec.specialty)||[],isLoading:ed})))))),e&&r.createElement(ModalSearchResult,{keepMounted:!0,opened:ey,onClose:eb,closeModal:eb,searchInputEle:r.createElement(y.k,{align:"center",gap:8},r.createElement(ea,Object.assign({},eT,{onlyShowSearchBox:!0,ref:Z})),r.createElement(j.B,{variant:"primary",leftIcon:r.createElement(s.Z,{size:20,color:"#fff"}),onClick:()=>eO(),styles:{root:{borderRadius:"12px"}}}))},r.createElement(p.x,{sx:{marginLeft:-16,marginRight:-16}},r.createElement(SearchResultContent,{type:q,state:ee,dispatch:et,isLoading:ed,typeInformation:eI,clientSlug:N}))))},eE=k.Z.div` background-color: var(--neutral50); padding: 12px 0; box-shadow: inset 0px 1px 0px #e4e8ec; > * { display: grid; grid-template-columns: 32px 1fr; align-content: center; p { font-weight: 600; } } .icon-wrapper { display: flex; align-items: center; } `,TextDivider=({children:e,icon:t,className:a,style:o})=>r.createElement(eE,{style:o,className:a},r.createElement(A.C,null,r.createElement("div",{className:"icon-wrapper"},t),r.createElement(R.T,{size:"c1",color:"var(--neutral800)"},e)))},McdJ:function(e,t,a){a.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 o=a("q1tI"),i=a("rBCA"),n=a("iBNF"),l=a("0Pmq"),r=a("xXM3"),s=a.n(r),c=a("9S3P"),d=a("2YCo");let ArrowRightBlue=e=>o.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 6 10",fill:"none"},e),o.createElement("path",{d:"M1 9L5 5L1 1",stroke:"#2D87F3",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round"})),Clinic=e=>o.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none"},e),o.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"}),o.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"}),o.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"}),o.createElement("path",{d:"M11.172 13.6206H8.7583V16.9998H11.172V13.6206Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M9.96533 9.99996V5.65527",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M12.1377 7.82764H7.79297",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})),p=i.Z.ul` display: grid; grid-gap: 16px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); list-style: none; `,u=i.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:a=!0})=>e.length?o.createElement(p,{id:"insurance-list",className:t},e.map(e=>o.createElement(u,{className:"insuranceItem",key:e.id},o.createElement("div",{className:"insuranceLogo"},o.createElement("img",{src:e.logo,alt:e.name||"insurance-logo"})),a&&o.createElement(l.T,{size:"base",color:n.r.colors.gray500,type:"bold"},e.name)))):null,h=i.Z.div` display: flex; flex-wrap: wrap; gap: 7px; &.paymentList { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); justify-content: center; } `,g=i.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:a=!0,isMobile:i=!1})=>e.length?o.createElement(h,{id:"payment-container",className:s()(t,{paymentList:i&&e.length>=4})},e.map(t=>o.createElement(g,{className:s()("payment-item",{"payment-item-mobile":i&&e.length>=4}),key:t.id},o.createElement(c.I,{className:"logo",src:t.logo,alt:t.name}),a&&o.createElement("div",{className:"txt-caption-1"},t.name)))):null,m=i.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,i.Z)(Clinic)` width: 1.25rem; height: 1.25rem; `;let E=i.Z.div` display: flex; flex-direction: column; gap: 4px; `,DoctorExpertiseItem=e=>{let{doctorInfo:t,Icon:a,title:i}=e;return o.createElement(m,null,o.createElement(a,{className:"icon"}),o.createElement(E,null,o.createElement(d.T,{size:"p3",weight:"semiBold",color:"#111111"},i),o.createElement("div",{className:"doctor-info-item-content"},(Array.isArray(t)?t:[t]).map(e=>o.createElement(d.T,{size:"p3",weight:"regular",key:e},e)))))},y=i.Z.div` display: flex; padding: 1rem; width: 100%; justify-content: space-between; `,b=i.Z.div` display: flex; flex-direction: column; gap: 2px; `,DoctorInfoExpertise=e=>{let{name:t,specialty:a,experience:i,profileImage:n}=e;return o.createElement(y,null,o.createElement(b,null,o.createElement(d.T,{size:"title2",weight:"semiBold",color:"#111111"},t),o.createElement("div",null,a&&o.createElement(d.T,{size:"c1",weight:"regular"},a),i&&o.createElement(d.T,{size:"c1",weight:"regular"},i))),o.createElement(c.I,{src:n,alt:t,style:{width:"4.5rem",height:"4.5rem",borderRadius:"50%",objectFit:"cover",flexShrink:0}}))}}}]);