"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4190],{"3Sxx":function(e,t,r){r.d(t,{T:function(){return v},a:function(){return h},b:function(){return getUserIdFromCookie},c:function(){return checkUntilFinished},d:function(){return getSubotCookieId},e:function(){return getUserInfoFromCookie},f:function(){return getWindowId},g:function(){return getHelloSitesUrl},h:function(){return checkMobile},i:function(){return clickAndOpenInNewTab},j:function(){return formatUrlWithEncrypedGa},k:function(){return isFakeEmail},l:function(){return getHhgIdFromCookie},o:function(){return overrideParamsByQuery},s:function(){return ssoIntents}});var n=r("qFhO"),i=r("YRXs"),o=r("JIJ2"),a=r("hHL7"),l=r("GOBr"),s=r("xrdX"),c=Object.prototype.toString,d=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,p=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,u=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,m=/^[\u0020-\u003A\u003D-\u007E]*$/;function startIndex(e,t,r){do{var n=e.charCodeAt(t);if(32!==n&&9!==n)return t}while(++tr;){var n=e.charCodeAt(--t);if(32!==n&&9!==n)return t+1}return r}function decode(e){return -1!==e.indexOf("%")?decodeURIComponent(e):e}var h={parse:function(e,t){if("string"!=typeof e)throw TypeError("argument str must be a string");var r={},n=e.length;if(n<2)return r;var i=t&&t.decode||decode,o=0,a=0,l=0;do{if(-1===(a=e.indexOf("=",o)))break;if(-1===(l=e.indexOf(";",o)))l=n;else if(a>l){o=e.lastIndexOf(";",a-1)+1;continue}var s=startIndex(e,o,a),c=endIndex(e,a,s),d=e.slice(s,c);if(!r.hasOwnProperty(d)){var p=startIndex(e,a+1,l),u=endIndex(e,l,p);34===e.charCodeAt(p)&&34===e.charCodeAt(u-1)&&(p++,u--);var m=e.slice(p,u);r[d]=function(e,t){try{return t(e)}catch(t){return e}}(m,i)}o=l+1}while(o{let r=Object.keys(t);return r.map(r=>{let n=t[r];if("source"===r){e.is_new="first_login"===n;return}if(b.includes(r)){if(g.includes(r)){try{e[r]=JSON.parse(n)}catch(e){}return}if("account_id"===r||"current_score"===r||"bot_id"===r){e[r]=parseInt(n);return}e[r]=n}}),e},ssoIntents=e=>[{id:(0,a.Z)(),label:JSON.stringify({title:"",description:""}),type:i.N.SSO_INTENT,url:""},{id:(0,a.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:i.N.SSO_INTENT,url:"/images/subot/my-health.svg"},{id:(0,a.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:i.N.SSO_INTENT,url:"/images/subot/file-storage.svg"},{id:(0,a.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:i.N.SSO_INTENT,url:"/images/subot/shield.svg"}];function checkUntilFinished(e){let t=e.condition,r=e.finished,n=e.timeout||3e3,i=new Date().getTime(),o=setInterval(()=>{let e=new Date().getTime();(e-i>n||t())&&(clearInterval(o),r())},300)}let getHhgIdFromCookie=e=>{let t=h.parse(e||""),r=t["hhg-id"];return r||o.Z.get("hhg-id")||""},getSubotCookieId=e=>{if(e)return o.Z.set("hhg-id",e),e;let t=getHhgIdFromCookie();if(t)return t;let r=(0,a.Z)();return o.Z.set("hhg-id",r),r},getUserIdFromCookie=e=>{let t=h.parse(e||""),r=t[n.B],i=r||o.Z.get(n.B)||"";try{let e=i.split(".")[1],t=e.replace(/-/g,"+").replace(/_/g,"/"),r=decodeURIComponent(atob(t).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(r).sub}catch(e){return""}},getUserInfoFromCookie=e=>{let t=h.parse(e||""),r=t[n.B],i=r||o.Z.get(n.B)||"";try{let e=i.split(".")[1],t=e.replace(/-/g,"+").replace(/_/g,"/"),r=decodeURIComponent(atob(t).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join("")),n=JSON.parse(r);return{email:n.email,id:n.sub}}catch(e){return{email:"",id:0}}},f=(0,a.Z)(),getWindowId=()=>f,getHelloSitesUrl=(e,t)=>{let r=!t&&"undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname);return r?"http://localhost":`https://${l.y?"":"discover."}${s.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()},v=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 r=new URL(e),n=r.searchParams;return n.get("hhgclid")?(n.delete("hhgclid"),n.set("hhgclid",t),`${r.origin}${r.pathname}?${n.toString()}`):e}},CfhL:function(e,t,r){r.d(t,{S:function(){return i}});var n=r("2wr/");let i=n.r},mBNd:function(e,t,r){r.d(t,{C:function(){return ChoiceField},T:function(){return TextField},i:function(){return I},u:function(){return h}});var n=r("/npG"),i=r("iuhU"),o=r("Eso5"),a=r("8vDj"),l=r("HC5J"),s=r("T/vS"),c=r("q1tI"),d=r("ChHM"),p=r("AeFk"),u=r("rBCA"),m=r("iBNF"),h=(0,n.k)(e=>(0,l.G)(e)[l.C.LEADGEN]);let g=(0,c.createContext)({}),b=p.iv` height: 100% !important; min-height: calc(var(--container-height, 56px) * 24 / 56); line-height: calc(var(--container-height, 56px) * 24 / 56); border: none !important; border-radius: 0 !important; outline: none !important; box-shadow: none !important; padding: 0; cursor: pointer; /* opacity: 0; */ ::placeholder { color: ${m.r.colors.gray400}; } `,f=p.iv` height: auto !important; cursor: text; opacity: 1; transition: 0.1s ease-in-out all; `,v=p.iv` position: absolute; top: calc(var(--container-height) / 2); left: var(--space-x, 16px); margin: 0; z-index: 1; cursor: pointer; transform: translateY(-50%); transition: 0.125s ease-in all; right: 0; // auto grow width `,y=p.iv` top: var(--space-y-shrink, 6px); transform: translateY(0); transition: 0.125s ease-out all; right: 0; // auto grow width `,x=p.iv` min-height: var(--container-height, 56px); display: flex; align-items: flex-end; border: 1px solid ${m.r.colors.gray200}; border-radius: 8px; background-color: #fff; padding-inline: var(--space-x, 16px); padding-block: var(--space-y-not-shrink, 16px); cursor: pointer; pointer-events: none; &:has(.mantine-Input-rightSection) { padding-right: var(--container-height, 56px); } .mantine-Input-icon { display: none; } .mantine-NumberInput-control { border-color: ${m.r.colors.gray200}; } `,w=p.iv` height: auto; min-height: var(--container-height, 56px); padding-block: var(--space-y-shrink, 6px); cursor: text; pointer-events: auto; `,k=p.iv` color: ${m.r.colors.red800}; font-size: 12px; line-height: 1.5; `,E=u.Z.div` --space-x: 16px; --space-y-not-shrink: 15px; --space-y-shrink: 6px; --container-height: 56px; --label-not-shrink: 16px; --label-shrink: 12px; --input: 15px; position: relative; min-width: 100px; max-width: 100%; display: inline-block; .textField_wrapper { display: inline-block; width: 100%; cursor: pointer; } .mantine-InputWrapper-root { &[data-invalid='true'] { .mantine-Input-wrapper { border-color: ${m.r.colors.red400}; } } .mantine-Input-wrapper { &:has([data-invalid]) { border-color: ${m.r.colors.red400}; } } } .mantine-InputWrapper-label { ${v} } .mantine-Input-wrapper { ${x} + .mantine-Popover-dropdown[data-position="bottom-start"] { left: 0 !important; } + .mantine-Popover-dropdown[data-position='top-start'] { top: unset !important; left: 0 !important; bottom: 100% !important; } } .mantine-Input-input { ${b} } &.textField_shrink { .mantine-InputWrapper-label { ${y} } .mantine-Input-wrapper { ${w} &.mantine-Select-wrapper { .mantine-Select-rightSection { pointer-events: auto !important; } } } .mantine-Input-input { ${f} } &:has(.PhoneInput) { .mantine-InputWrapper-label { left: var(--space-x, 16px); } .PhoneInput { .PhoneInputInput { opacity: 1; } } } } &:focus-within { .mantine-Input-wrapper { transition: 0.25s linear border; border-color: ${m.r.colors.primary600}; box-shadow: 0 0 4px ${m.r.colors.primary200}; } } .PhoneInput { --phone-select: 75px; --phone-input-space-x: 8px; width: 100%; opacity: 1; border: none; .PhoneInputCountry { background-color: transparent; border: none; padding: 0; width: var(--phone-select, 75px); } .PhoneInputInput { flex: 1; min-width: 0; line-height: 1.5; outline: none !important; border: none; box-shadow: none; font-size: var(--input, 15px); padding: 0 var(--phone-input-space-x, 8px); /* opacity: 0; */ color: ${m.r.colors.gray800} !important; :focus { color: ${m.r.colors.gray800} !important; } } } &:has(.PhoneInput) { .mantine-InputWrapper-label { left: calc( var(--space-x, 16px) + var(--phone-select, 75px) + var(--phone-input-space-x, 8px) ); } } .icon { position: absolute; top: calc(var(--container-height) / 2); right: var(--space-x, 16px); transform: translateY(-50%); transition: 0.125s ease-in all; &.shrink { top: calc(var(--container-height) / 2 - 4px); transform: translateY(0); } } `,C=u.Z.div` &.leadgen-form_checkbox, &.leadgen-form_radio { width: 100%; } &.leadgen-form_dropdown { width: calc(50% - 12px); } .mantine-InputWrapper-root { display: block; } .mantine-InputWrapper-label { margin-bottom: 0.5rem; color: ${m.r.colors.gray800}; font-size: 16px; font-weight: 400; line-height: 1.5; } .mantine-Radio-root, .mantine-Checkbox-root { gap: 8px; min-width: calc(50% - 4px); // input[type='radio'], // input[type='checkbox'] { // border-color: ${m.r.colors.gray600}; // width: 18px; // height: 18px; // } // input[type='checkbox'] { // border-radius: 4px; // } // &[data-checked='true'] { // input[type='radio'], // input[type='checkbox'] { // border-color: ${m.r.colors.primary600}; // } // input[type='radio'] { // background-color: white; // } // } .mantine-Checkbox-input { &:checked { border-color: ${m.r.colors.primary600}; } } } .leadgen-choiceContainer { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; } .mantine-InputWrapper-error { ${k} } `;u.Z.div` position: absolute; top: calc(var(--container-height) / 2); right: var(--space-x, 16px); `;let TextField=e=>{let{shrink:t,onChangeShrink:r,children:n,className:o}=e,a=(0,s.a)(e,["shrink","onChangeShrink","children","className"]),[l,d]=(0,c.useState)(t),[p,u]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{d(t)},[t]),c.createElement(g.Provider,Object.assign({value:{shrinkProps:t,shrink:l,setShrink:d,onChangeShrink:r,hasIcon:p,setHasIcon:u}},a),c.createElement(E,Object.assign({shrink:l,className:(0,i.default)(o,"textField",{textField_shrink:!!l})},a),n))},TextFieldControl=e=>{let{shrink:t,shrinkProps:r,onChangeShrink:n,setShrink:i,hasIcon:a}=(0,c.useContext)(g),{children:l,htmlFor:s}=e,p=(0,d.O)(()=>{r||(i(!1),null==n||n(!1))}),focusInput=e=>{setTimeout(()=>{let t=e.querySelectorAll('input:not([disabled]):not([type="submit"]),select:not([disabled]),textarea:not([disabled])'),r=t.item(t.length-1);r&&r.focus({preventScroll:!0})},150)},u=(0,c.useCallback)(e=>{if(t){focusInput(e.currentTarget);return}i(!0),null==n||n(!0),focusInput(e.currentTarget)},[t]);return(0,c.useEffect)(()=>{i(r)},[r]),c.createElement(o.x,{ref:p,onClick:u,className:"textField_wrapper",component:s?"label":"div",htmlFor:s},"function"==typeof l?l({shrink:!!t,hasIcon:a}):l)},TextFieldIcon=({Icon:e})=>{let{shrink:t,setHasIcon:r}=(0,c.useContext)(g),n=(0,a.rZ)();return(0,c.useEffect)(()=>{e&&r(!0)},[]),e?c.createElement(e,{className:`icon ${t?"shrink":""}`,shrink:t,size:24,color:n.colors.gray[9]}):null};TextField.Control=TextFieldControl,TextField.Icon=TextFieldIcon;let ChoiceField=e=>{let{children:t,className:r}=e,n=(0,s.a)(e,["children","className"]);return c.createElement(C,Object.assign({className:(0,i.default)(r,"choiceField")},n),t)};var I=Object.freeze({__proto__:null,TextField:TextField,TextFieldControl:TextFieldControl,TextFieldIcon:TextFieldIcon,ChoiceField:ChoiceField})},sMww:function(e,t,r){r.d(t,{B:function(){return BlueWhiteLogin},N:function(){return NavigationProfileButton},U:function(){return UserPlain},a:function(){return C},b:function(){return NavigationProvider},u:function(){return useCSSFocusPopupHelper}});var n=r("T/vS"),i=r("q1tI"),o=r("nmRb"),a=r("5QTd"),l=r("SMDy"),s=r("RlpF"),c=r("dDw1"),d=r("Z+18"),p=r("0dn/"),u=r("iBNF"),m=r("rBCA"),h=r("un+D"),g=r("gEnE"),b=r("xXM3"),f=r.n(b),v=r("qFhO"),y=r("GAI/"),x=r("Rnw3"),w=r("xrdX"),k=r("QHxc"),E=r("hPj0");let BlueWhiteLogin=e=>i.createElement("svg",Object.assign({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),i.createElement("rect",{y:"0.5",width:"31",height:"31",rx:"15.5",fill:"white"}),i.createElement("path",{d:"M15.4999 14.3797C16.9062 14.3797 18.0462 13.2397 18.0462 11.8334C18.0462 10.4271 16.9062 9.28711 15.4999 9.28711C14.0936 9.28711 12.9536 10.4271 12.9536 11.8334C12.9536 13.2397 14.0936 14.3797 15.4999 14.3797Z",stroke:"#2743AD",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M19.9092 22.0335C20.7055 21.7825 21.124 20.9029 20.786 20.1399C19.8879 18.1112 17.861 16.6946 15.4999 16.6946C13.1388 16.6946 11.112 18.1112 10.2138 20.1399C9.87585 20.9038 10.2944 21.7825 11.0907 22.0335C12.2249 22.3909 13.7258 22.7131 15.4999 22.7131C17.274 22.7131 18.7749 22.3909 19.9092 22.0335Z",stroke:"#2743AD",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})),UserPlain=e=>i.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),i.createElement("path",{d:"M9.99991 8.3797C11.4062 8.3797 12.5462 7.23969 12.5462 5.83341C12.5462 4.42712 11.4062 3.28711 9.99991 3.28711C8.59363 3.28711 7.45361 4.42712 7.45361 5.83341C7.45361 7.23969 8.59363 8.3797 9.99991 8.3797Z",stroke:"white",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M14.4092 16.0335C15.2055 15.7825 15.624 14.9029 15.286 14.1399C14.3879 12.1112 12.361 10.6946 9.99992 10.6946C7.63881 10.6946 5.61196 12.1112 4.71381 14.1399C4.37585 14.9038 4.79436 15.7825 5.59066 16.0335C6.72492 16.3909 8.22584 16.7131 9.99992 16.7131C11.774 16.7131 13.2749 16.3909 14.4092 16.0335Z",stroke:"white",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})),useNavConfig=({locale:e,projectType:t,siteType:r,enableBookingBtn:n})=>{let o=(0,i.useMemo)(()=>{let i="discover"===t||"together"===t||"marryBaby"===t||"profile"===t&&"marryBaby"===r,o="marryBaby"!==r&&"marryBaby"!==t&&v.C.includes(e),a=n&&"marryBaby"!==t&&"discover"===t&&"marryBaby"!==r&&v.d.includes(e),l="marryBaby"===t||v.a.includes(e),s="marryBaby"!==r&&v.E.includes(e),c="marryBaby"!==r&&v.E.includes(e),d=v.V.includes(e),p=v.H.includes(e),u=v.e.includes(e),m=(0,x.g)(e,"marryBaby"===r),h=m;"undefined"!=typeof window&&(h.includes("//id.")&&(h=h.replace("id.","")),h.includes("//staging-id.")&&(h=h.replace("staging-id.","discover.")));let g=(0,x.a)(e,"marryBaby"===r),b={HOME_PAGE_URL:h,CARE_URL_FE:`${h}/care`,TOGETHER_URL_FE:`${h}/community`,VIDEO_URL_FE:`${h}/videos`,SSO_URL:g,TOGETHER_API:(0,x.b)(),DISCOVER_API:(0,x.c)(e)};return{enableSearchBar:i,enableNavCare:o,enableNavCareBooking:a,enableNavTogether:l,enableNavEcom:s,enableProfileEcom:c,enableNavVideo:d,enableProfileMyHealth:!0,enableNavDiscover:!0,enableNavHealthTools:!0,enableProfileMySaved:!0,statics:b,enableNavClinityDownload:p,enableNavCartCare:u}},[]);return o},C=i.createContext({}),NavigationProvider=e=>{var{children:t}=e,r=(0,n.a)(e,["children"]);let[o,a]=i.useState(()=>r.currentUrl||`https://${"marryBaby"===r.siteType?y.d[r.locale||"en-PH"]:w.v[r.locale||"en-PH"]}${"together"===r.projectType?"/community":"ecom"===r.projectType?"/ecom":"care"===r.projectType?"/care":""}/`);(0,i.useEffect)(()=>{let update=()=>{a(window.location.href)};return window.addEventListener("popstate",update),update(),()=>{window.removeEventListener("popstate",update)}},[]);let l=useNavConfig({locale:r.locale,projectType:r.projectType,siteType:r.siteType,enableBookingBtn:r.enableBookingBtn});return i.createElement(C.Provider,{value:Object.assign(Object.assign({},r),{customClasses:r.customClasses||{},configs:Object.assign(Object.assign({},l),r.configs),currentUrl:r.currentUrl||o})},t)},useCSSFocusPopupHelper=e=>{let{allowBgScroll:t}=e||{},r=(0,i.useRef)();return{containerRef:r,onContainerFocus:()=>{t||(document.documentElement.style.overflow="hidden")},onContainerBlur:()=>{t||(document.documentElement.style.overflow="")},onButtonMouseDown:e=>{r.current&&(document.activeElement===r.current||r.current.contains(document.activeElement))&&(r.current.blur(),document.activeElement.blur(),e.preventDefault())},onClose:()=>{r.current&&(document.activeElement===r.current||r.current.contains(document.activeElement))&&(r.current.blur(),document.activeElement.blur())}}},I=(0,g.Z)(m.Z.div` position: absolute; right: 0; transition: all 0.5s ease-in-out; overflow-y: auto; &[data-open='true'] { z-index: 200; top: 120%; opacity: 1; visibility: visible; } &[data-open='false'] { display: none; } .popup-content { z-index: 111; height: 100%; border: 1px solid #0000001a; border-radius: 16px; border-top-left-radius: 0; border-top-right-radius: 0; } /* min-height: 415px; */ ${h.M.mbUp} { width: 320px; } ${h.M.mbDown} { position: fixed; left: 0; width: 100%; padding-bottom: 70px; } `,"hhgcomp-navprofilebutton-popup"),S=(0,g.Z)(m.Z.div` position: fixed; z-index: 150; top: var(--header-bottom, 56px); left: 0; width: 100%; height: 100%; align-items: center; ${h.M.mbUp} { background-color: transparent; &[data-type='welcome'] { background: rgba(38, 38, 38, 0.3); } &[data-type='due-date'] { background: rgba(38, 38, 38, 0.3); } } ${h.M.mbDown} { background: rgba(38, 38, 38, 0.3); } &[data-type='welcome'] { top: 0; } &[data-open='false'] { display: none; } `,"hhgcomp-navprofilebutton-popupwrapper"),N=m.Z.div` width: 36px; height: 36px; cursor: pointer; img { border-radius: 50%; } .avatar { width: 36px; height: 36px; object-fit: cover; } .avatar-default { display: flex; align-items: center; justify-content: center; background-color: ${u.r.colors.secondaryBase}; border-radius: 50%; color: white; font-size: 20px; font-weight: bold; } `,B=m.Z.div` display: inline-flex; position: relative; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; text-decoration: none; flex-shrink: 0; cursor: pointer; .user-close-icon { display: none; } &:focus-within { .user-close-icon { display: block; } .user-avatar { display: none; } ${I.classSelector} { z-index: 200; top: 120%; opacity: 1; visibility: visible; display: initial; ${h.M.mbDown} { top: 100%; } } ${S.classSelector} { display: initial; } } `,_=m.Z.a` display: inline-flex; .login-btn[data-color='tertiary'][data-size='md'] { padding-left: 12px; padding-right: 12px; } .mobile-only { ${h.M.mbUp} { display: none; } } .login-btn { display: none; ${h.M.mbUp} { display: block; border: 1px solid ${u.r.colors.neutral100}; } } &[data-win-cash-back-theme='true'] { .login-btn { ${h.M.mbUp} { color: ${u.r.colors.white}; } } } `,ProfilePopup=({isOpen:e,userInfo:t,closePopup:r,siteType:n="helloSites",dispatchLogout:o})=>{let{customClasses:a={},configs:{enableProfileFindMyBooking:l}}=(0,i.useContext)(C);return i.createElement(I,{className:a.profilePopup,"data-open":e},i.createElement("div",{className:f()("popup-content",a.profilePopupContent)},i.createElement(k.l,{siteType:n,onLogout:()=>{o&&(o(),r())},userInfo:t,configs:{enableProfileFindMyBooking:l}})))},NavigationProfileButton=({userInfo:e,siteType:t,onLoginClick:r,currentUrl:m,isMinifyLogin:h,onLogout:g,style:b,isLoading:f,isMobile:v,className:y})=>{let{isWinCashBackTheme:x}=(0,i.useContext)(C),{t:w}=(0,d.u)(),[k,I]=(0,i.useState)(!1),S=(null==e?void 0:e.name)||(null==e?void 0:e.username),{containerRef:T,onContainerFocus:F,onContainerBlur:O,onButtonMouseDown:$,onClose:z}=useCSSFocusPopupHelper(),P=(0,i.useMemo)(()=>Object.assign(Object.assign({},b),{pointerEvents:"auto"}),[b]),M=(0,i.useMemo)(()=>v&&"helloSites"===t,[v,t]);return f?M?i.createElement(a.S,null):i.createElement(s.B,{size:"sm",color:"transparent",loading:!0}):(null==e?void 0:e.id)?i.createElement(i.Fragment,null,i.createElement(B,{ref:T,style:P,tabIndex:0,onBlur:O,onFocus:()=>{var e;F();let t=null===(e=T.current)||void 0===e?void 0:e.querySelector("#navigation-v2 .hhgcomp-navprofilebutton-popup");if(t){let e=t.getBoundingClientRect(),r=e.top,n=`calc(100vh - ${r}px)`;t.setAttribute("style",`max-height: ${n};`)}},className:y},i.createElement("div",{onMouseDown:$},i.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:"user-close-icon"},i.createElement("path",{d:"M18 6L6 18M18 18L6 6",stroke:"#3E3F58",strokeWidth:"1.3",strokeLinecap:"round"})),i.createElement(l.A,{size:32,className:"user-avatar",src:null==e?void 0:e.avatar,color:"marryBaby"===t?u.r.mbColors.pink:u.r.colors.secondaryBase,placeholderText:S&&S.length?S[0].toUpperCase():"A"})),i.createElement(ProfilePopup,{dispatchLogout:()=>{z(),I(!0)},isOpen:!1,closePopup:z,siteType:t,userInfo:e})),i.createElement(E.F,{openLogoutPopup:k,onCloseHandler:()=>{document.body.classList.toggle("noscroll",!1),I(!1)},siteType:t,onLogoutHandler:()=>(0,n._)(void 0,void 0,void 0,function*(){I(!1),document.body.classList.toggle("noscroll",!1),yield g()})})):i.createElement(_,{style:Object.assign({textDecoration:"none"},P),"data-event-category":"Sign Up","data-event-action":"Button Click","data-event-label":m,"data-win-cash-back-theme":x,"data-site-type":t,onClick:r},h?i.createElement(N,null,i.createElement("img",{src:p.C.getAssetPath("lock.png"),className:"avatar",loading:"lazy",alt:"avatar"})):i.createElement(i.Fragment,null,"helloSites"===t&&(M?x?i.createElement(BlueWhiteLogin,{className:"mobile-only",style:{cursor:"pointer",width:32,height:32,flexShrink:0}}):i.createElement("img",{className:"mobile-only",src:p.C.getAssetPath("login.svg"),style:{cursor:"pointer",height:24,width:24}}):i.createElement(s.B,{className:"mobile-only",size:"sm",leftIcon:i.createElement(o.Z,{color:"currentColor",isSolid:!0,size:22}),sx:{paddingLeft:"8px",paddingRight:"12px"},styles:{leftIcon:{marginRight:4}}},w("navigation.loginJoin"))),"marryBaby"===t&&i.createElement("div",{className:"mobile-only",style:{paddingLeft:16}},i.createElement(c.T,{size:"p3",color:u.r.mbColors.pink},w("navigation.loginJoin"))),"marryBaby"===t?i.createElement(s.B,{className:"login-btn",size:"md",leftIcon:i.createElement(o.Z,{color:"currentColor",isSolid:!0,size:22})},w("navigation.loginJoin")):i.createElement(s.B,{className:"login-btn",size:"md",leftIcon:x?i.createElement(UserPlain,{style:{flexShrink:0,width:20,height:20}}):i.createElement(o.Z,{color:"#595959",isSolid:!0,size:22}),variant:"ghost",color:"#262626",sx:{fontWeight:500,fontSize:14,lineHeight:22}},w("navigation.loginJoin"))))}},InBK:function(e,t,r){r.d(t,{C:function(){return i}});var n=r("q1tI");let i=(0,n.forwardRef)(function(e,t){return n.createElement("circle",Object.assign({},e,{ref:t}),n.createElement("animate",{attributeName:"r",values:"4;8;4",dur:"2s",begin:"0s",repeatCount:"indefinite"}))})},FfBq:function(e,t,r){r.d(t,{I:function(){return ImageWrap},u:function(){return useScreenSize}});var n=r("q1tI"),i=r("un+D"),o=r("T/vS"),a=r("rBCA");let getIsMobile=()=>"undefined"!=typeof window&&window.innerWidth"undefined"!=typeof window&&window.innerWidth>=i.B.BREAK_POINT_MOBILE&&window.innerWidth{let[e,t]=(0,n.useState)(getIsMobile()),[r,i]=(0,n.useState)(getIsLargeMobile());return(0,n.useEffect)(()=>{let handleResize=()=>{t(getIsMobile()),i(getIsLargeMobile())};return window.addEventListener("resize",handleResize,{passive:!0}),()=>{window.removeEventListener("resize",handleResize)}},[]),{isMobile:e,isLargeMobile:r}},ImageWrap=e=>{var{alt:t,backupSrc:r,src:i,placeholderSrc:a,style:s,ref:c}=e,d=(0,o.a)(e,["alt","backupSrc","src","placeholderSrc","style","ref"]);let[p,u]=(0,n.useState)(!1);return n.createElement(l,Object.assign({loading:"lazy",alt:t,onError:()=>!p&&u(!0),src:p?r||i:i||r,style:Object.assign(Object.assign({},a?{backgroundImage:`url(${a})`}:{}),s),"data-has-placeholder":!!a,ref:c},d))},l=a.Z.img` &[data-has-placeholder='true'] { background-position: center; background-repeat: no-repeat; background-size: cover; } `},"7eXN":function(e,t,r){r.d(t,{R:function(){return RadioImageGroup}});var n=r("q1tI"),i=r("iBNF"),o=r("rBCA"),a=r("h12z"),l=r("cFN4");let s=o.Z.div` display: flex; width: 100%; &[data-direction='vertical'] { flex-direction: column; } &[data-direction='horizontal'] { flex-wrap: wrap; } `,c=o.Z.div` display: flex; padding: 8px; border-radius: ${i.r.borderRadius}; cursor: pointer; & > div { display: flex; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: flex-start; } &[data-is-mb='false'] { &[data-selected='true'] { border: 1px solid #2d87f3; background: white; } &[data-selected='false'] { border: 1px solid #f2f2f2; box-shadow: 0px 5px 12px rgba(40, 74, 117, 0.08); } } &[data-is-mb='true'] { border-radius: 16px; background: white; padding: 16px auto; &[data-selected='true'] { border: 1px solid ${i.r.mbColors.mint}; box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.06); } &[data-selected='false'] { border: none; } } &[data-disabled='true'] { cursor: auto; } .radio-group-item-heading { margin-top: 8px; //height: 48px; text-align: center; } .gender-image { width: 70px; height: 70px; &[data-is-mobile='true'] { width: 40px; height: 40px; } } `,RadioImageGroup=({value:e,options:t,className:r,direction:o="horizontal",onChange:d,isDisabled:p,siteType:u})=>{let[m,h]=(0,n.useState)(e),handleOnChange=e=>{!p&&(h(e),d&&d(e))},g="marryBaby"===u;return n.createElement(s,{className:r,"data-direction":o},t.map((t,r)=>n.createElement(c,{"data-selected":(e||m)===t.value,"data-is-mb":g,"data-disabled":p,key:r,onClick:()=>{handleOnChange(t.value)}},n.createElement("div",null,t.content,t.label&&n.createElement(n.Fragment,null,g?n.createElement(a.M,{type:"subtitle-2",color:(e||m)===t.value?i.r.mbColors.dark:i.r.mbColors.midGray},t.label):n.createElement(l.T,{type:"bold",color:(e||m)===t.value?"#2D87F3":"black",className:"radio-group-item-heading",size:"label1"},t.label))))))}},JeQm:function(e,t,r){r.d(t,{D:function(){return DrawerBottom}});var n=r("T/vS"),i=r("q1tI"),o=r("iuhU"),a=r("h8tX"),l=r("3rb+"),s=r("rSBk"),c=r("rBCA"),d=r("iBNF"),p=r("qFhO");(0,c.Z)(l.D)` /* max-height: 100vh; max-height: 100dvh; */ background-color: white; &[data-vaul-drawer-direction='bottom'] { top: initial !important; border-top-left-radius: 16px !important; border-top-right-radius: 16px !important; padding-bottom: 32px; padding-left: 20px; padding-right: 20px; } .drawer__handle { width: 44px; height: 3px; background-color: ${d.r.colors.neutral500}; margin: 16px auto; flex-shrink: 0; } `;let u=(0,c.Z)(s.dy.Content)` position: fixed; z-index: ${p.c-9e6+1}; inset: 0; background-color: #fff; outline: none !important; &[data-is-linear='true'] { background: linear-gradient(180deg, #c3e3ff 1.86%, #fff 20%) !important; } &::-webkit-scrollbar { width: 6px; height: 6px; } &::-webkit-scrollbar-track { background-color: transparent; } &::-webkit-scrollbar-thumb { background-color: rgba(0, 0, 0, 0.4); border-radius: 6px; } &[data-vaul-drawer-direction='bottom'] { top: initial; border-top-left-radius: 16px; border-top-right-radius: 16px; /* padding-bottom: 16px; */ } ${e=>e.isDragging&&` input { caret-color: transparent; } `} `,m=(0,c.Z)(s.dy.Overlay)` position: fixed; inset: 0; z-index: ${p.c-9e6}; width: 100%; max-height: 100%; background-color: rgb(0, 0, 0, 0.4); `,h=(0,c.Z)(s.dy.Handle)` &[data-vaul-handle] { width: 44px; height: 3px; background-color: ${d.r.colors.neutral500}; margin: 16px auto; flex-shrink: 0; } `;function DrawerBottom(e){var{children:t,onClose:r,isOpen:c,onOpenChange:d,isMobile:p,classNames:g,isLinear:b,overlayClassName:f,contentClassName:v,handlerClassName:y,drawerOverlayProps:x}=e,w=(0,n.a)(e,["children","onClose","isOpen","onOpenChange","isMobile","classNames","isLinear","overlayClassName","contentClassName","handlerClassName","drawerOverlayProps"]);let{isDragging:k,handleDragStart:E,handleDragEnd:C}=(0,l.u)(),{onDrag:I,onRelease:S}=w,N=(0,n.a)(w,["onDrag","onRelease"]);return p?i.createElement(s.dy.Root,Object.assign({},N,{open:c,onOpenChange:d,onClose:r,onDrag:(e,t)=>{E(),null==I||I(e,t)},onRelease:(e,t)=>{C(),null==S||S(e,t)}}),i.createElement(s.dy.Portal,null,i.createElement(m,Object.assign({className:(0,o.default)(f,"drawer__overlay")},x)),i.createElement(u,{isDragging:k,className:(0,o.default)(v,"drawer__content"),"data-is-linear":b},i.createElement(s.dy.Title,{style:{display:"none"}}),i.createElement(h,{className:(0,o.default)(y,"drawer__handle")}),t))):i.createElement(a.u,Object.assign({withCloseButton:!0,centered:!0,zIndex:500,size:"auto",classNames:g,radius:"lg"},w,{onClose:r,opened:c,styles:{root:{maxHeight:"400px"},body:{background:b?"linear-gradient(180deg, #A5D4FF 0%, #FFFFFF 20%)":void 0}}}),t)}}}]);