@hhgtech/hhg-components 1.20.30 → 1.20.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{ageGenerate-61d17ab5.js → ageGenerate-f9c10d8e.js} +1 -1
- package/build/babyGrowth.js +1 -1
- package/build/care.js +1 -1
- package/build/components/organisms/navigationLayout_deprecated/exportLegacy.d.ts +1 -0
- package/build/components.js +1 -1
- package/build/core.js +1 -1
- package/build/esm/{ageGenerate-18df8869.js → ageGenerate-68676ab3.js} +1 -1
- package/build/esm/babyGrowth.js +1 -1
- package/build/esm/cache.js +1 -1
- package/build/esm/care.js +1 -1
- package/build/esm/components.js +1 -1
- package/build/esm/{core-286f158c.js → core-4aeeac34.js} +1 -1
- package/build/esm/core.js +1 -1
- package/build/esm/i18n.js +1 -1
- package/build/esm/imgHHG.js +1 -0
- package/build/esm/index-11eba8f2.js +1 -0
- package/build/esm/index-131bebf4.js +1 -0
- package/build/esm/{index-70f38364.js → index-3b1f1478.js} +1 -1
- package/build/esm/{index-ab4eb1b2.js → index-54d677a7.js} +1 -1
- package/build/esm/index-5aa2e980.js +1 -0
- package/build/esm/index-85599e21.js +1 -0
- package/build/esm/index-ae28c112.js +1 -0
- package/build/esm/index-d6d7517f.js +1 -0
- package/build/esm/index-eeded213.js +1 -0
- package/build/esm/index.js +1 -1
- package/build/esm/index.styled-92e8c364.js +1 -0
- package/build/esm/index.styled-9f4506c6.js +1 -0
- package/build/esm/navigation.js +1 -1
- package/build/esm/navigationLayout_deprecated.js +1 -1
- package/build/esm/routing-9c5c342b.js +1 -0
- package/build/esm/together.js +1 -1
- package/build/esm/togetherComponentGlobalContext-99aebabc.js +1 -0
- package/build/esm/{translationsProvider-849e1aaa.js → translationsProvider-59f3d200.js} +1 -1
- package/build/esm/{tslib.es6-6ae0d506.js → tslib.es6-ba283c01.js} +1 -1
- package/build/esm/types-56a126cd.js +1 -0
- package/build/esm/types-72e5bcaa.js +1 -0
- package/build/esm/useTranslations-161444d2.js +1 -0
- package/build/esm/zalo-7f0726ae.js +1 -0
- package/build/imgHHG.js +1 -0
- package/build/{index-f2ae348c.js → index-0361370d.js} +1 -1
- package/build/index-30e07fd7.js +1 -0
- package/build/index-3a0aa93f.js +1 -0
- package/build/{index-08022744.js → index-436fb19b.js} +1 -1
- package/build/index-6d20f6ac.js +1 -0
- package/build/{index-235d73eb.js → index-8356c17d.js} +1 -1
- package/build/index-a20e49a2.js +1 -0
- package/build/index-af569996.js +1 -0
- package/build/index-e15eef33.js +1 -0
- package/build/index.js +1 -1
- package/build/index.styled-4c09039d.js +1 -0
- package/build/index.styled-ae584a04.js +1 -0
- package/build/modules/imgHHG/index.d.ts +22 -0
- package/build/navigation.js +1 -1
- package/build/navigationLayout_deprecated.js +1 -1
- package/build/{routing-8dc4c79e.js → routing-36699a3b.js} +1 -1
- package/build/together.js +1 -1
- package/build/togetherComponentGlobalContext-4e633355.js +1 -0
- package/build/types-50f3c6c2.js +1 -0
- package/build/types-dd054004.js +1 -0
- package/build/useTranslations-cb78945d.js +1 -0
- package/build/zalo-e7b9d144.js +1 -0
- package/package.json +4 -1
- package/build/animation-c527178f.js +0 -1
- package/build/esm/animation-0796d25e.js +0 -1
- package/build/esm/index-136ab451.js +0 -1
- package/build/esm/index-13d8821f.js +0 -1
- package/build/esm/index-78e6e950.js +0 -1
- package/build/esm/index-7b032ad1.js +0 -1
- package/build/esm/index-897f7837.js +0 -1
- package/build/esm/index-beb9db0b.js +0 -1
- package/build/esm/index-e68bd90f.js +0 -1
- package/build/esm/index.styled-4ae7aba3.js +0 -1
- package/build/esm/index.styled-81673574.js +0 -1
- package/build/esm/routing-dd4412db.js +0 -1
- package/build/esm/types-3579b4b2.js +0 -1
- package/build/esm/types-daa67348.js +0 -1
- package/build/esm/useTranslations-e4f230ed.js +0 -1
- package/build/index-11032730.js +0 -1
- package/build/index-6e060556.js +0 -1
- package/build/index-9bd68941.js +0 -1
- package/build/index-b356da51.js +0 -1
- package/build/index-c8bfca9c.js +0 -1
- package/build/index-ebaaaca7.js +0 -1
- package/build/index.styled-7332c0fb.js +0 -1
- package/build/index.styled-d6997469.js +0 -1
- package/build/types-43508f23.js +0 -1
- package/build/types-dc624512.js +0 -1
- package/build/useTranslations-9f0f26bc.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("./useTranslations-
|
|
1
|
+
"use strict";var t=require("./useTranslations-cb78945d.js");exports.getCareApiDomain=function(){return"https://".concat(t.isProduction?"health-care.":"service-health-care.","hellohealthgroup.com")},exports.getCurrentBaseUrl=function(o,e){var r="development"===process.env.NEXT_PUBLIC_DEPLOY_ENV,n=!r&&!t.isProduction;return r?"http://localhost:3000":"https://".concat(n?e?"fe.":"discover.":e?"www.":"").concat(t.domainLocales[e?"vi-VN_MB":o])},exports.getCurrentSsoUrl=function(o,e){return"https://".concat(t.isProduction?"id.":"staging-id.").concat(t.domainLocales[e?"vi-VN_MB":o])},exports.getDiscoverApiDomain=function(o){return"https://".concat(t.isProduction?"wp.":"staging.").concat(t.domainLocales[o])},exports.getTogetherApiDomain=function(){return"https://".concat(t.isProduction?"together.":"staging-together.","hellohealthgroup.com")};
|
package/build/together.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./types-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./types-dd054004.js"),r=require("./index-e15eef33.js"),o=require("./togetherComponentGlobalContext-4e633355.js");require("react"),require("./index.styled-ae584a04.js"),require("./tslib.es6-f7929e76.js"),require("styled-components"),require("./useTranslations-cb78945d.js"),require("./translationsContext-e97f3b58.js"),require("string-format"),require("./index-8356c17d.js"),require("./index-6d20f6ac.js"),require("innertext"),require("react-range"),require("react-dom"),require("./index-0361370d.js"),require("lodash/debounce"),require("react-contenteditable"),require("./cookieHelper-612b90fa.js"),require("./number-87b13133.js"),require("lodash"),require("./lazyLoad-0454885d.js"),require("vanilla-lazyload"),require("date-fns"),require("./index-af569996.js"),require("date-fns/locale/en-US"),require("date-fns/locale/hi"),require("date-fns/locale/id"),require("date-fns/locale/ms"),require("date-fns/locale/th"),require("date-fns/locale/vi"),require("date-fns/locale/zh-TW"),require("react-id-generator"),require("slugify"),exports.CardLink=e.CardLink,exports.CardPost=e.CardPost,exports.CardPostPopoverMore=e.CardPostPopoverMore,exports.CardReactions=e.CardReactions,exports.CardReply=e.CardReply,exports.CardReplyPopover=e.CardReplyPopover,exports.CreateNewPostContent=e.CreateNewPostContent,exports.CreatePostDescription=e.CreatePostDescription,exports.CreatePostTitle=e.CreatePostTitle,exports.ImagePreviewPopup=e.ImagePreviewPopup,exports.InputCommentBar=e.InputCommentBar,exports.LabelPin=e.LabelPin,exports.LabelSortPin=e.LabelSortPin,exports.LabelSorting=e.LabelSorting,exports.PopoverMenu=e.PopoverMenu,exports.PopupDanger=e.PopupDanger,exports.PopupFrame=e.PopupFrame,exports.PostContent=e.PostContent,exports.PostImagePreview=e.PostImagePreview,exports.PostSingleImageViewPopup=e.PostSingleImageViewPopup,exports.ShareBox=e.ShareBox,exports.SharePopup=e.SharePopup,exports.SubmitReportForm=e.SubmitReportForm,exports.TagTopic=e.TagTopic,exports.TogetherAuthConfigContext=e.TogetherAuthConfigContext,exports.TogetherAuthConfigContextProvider=e.TogetherAuthConfigContextProvider,exports.TogetherTypes=e.types,exports.TopicSelectList=e.TopicSelectList,exports.useTogetherAuthRequiredAction=e.useTogetherAuthRequiredAction,exports.CardAuthor=r.CardAuthor,exports.Loading=r.Loading,exports.PopupDoctor=r.PopupDoctor,exports.PopupExpert=r.PopupExpert,exports.PopupHospital=r.PopupHospital,exports.TogetherDataTransforms=r.dataTransform,exports.UserAvatar=r.UserAvatar,exports.DefaultComponentGlobalContextData=o.DefaultComponentGlobalContextData,Object.defineProperty(exports,"GlobalData",{enumerable:!0,get:function(){return o.GlobalData}}),exports.TogetherComponentGlobalContext=o.TogetherComponentGlobalContext,exports.TogetherComponentGlobalContextProvider=o.TogetherComponentGlobalContextProvider,exports.TogetherConstants=o.constants;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("react"),t=require("./index.styled-ae584a04.js"),r=require("./tslib.es6-f7929e76.js"),o=require("./useTranslations-cb78945d.js"),a=require("styled-components"),n=require("./cookieHelper-612b90fa.js"),i=require("slugify"),l=require("string-format");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c,u,_=s(e),d=s(a),p=s(i),E=s(l),m={xs:28,small:32,medium:40,large:48,xl:64,xxl:80,xxxl:96},T=d.default.div(c||(c=r.__makeTemplateObject(["\n position: fixed;\n left: 50%;\n\n padding: 0 16px 32px;\n background-color: ",";\n border-radius: 6px;\n box-shadow: 0px 4px 8px ",";\n transform: translate(-50%, -50%);\n transition: all 0.5s ease-in-out;\n visibility: hidden;\n\n &[data-open='true'] {\n z-index: 200;\n top: 50%;\n opacity: 1;\n visibility: visible;\n }\n\n &[data-open='false'] {\n top: -50%;\n }\n\n &[data-type='lead'] {\n width: 332px;\n height: 460px;\n\n div {\n top: -15px;\n right: -15px;\n }\n }\n\n &[data-type='form'] {\n width: 496px;\n height: 548px;\n "," {\n width: 340px;\n }\n }\n\n &[data-type='confirm'] {\n "," {\n width: calc(100% - 32px);\n }\n "," {\n width: 100%;\n max-width: 407px;\n }\n }\n\n .popup-content {\n position: relative;\n z-index: 111;\n height: 100%;\n padding: 16px;\n }\n\n .close-button {\n position: absolute;\n top: 16px;\n right: 0;\n cursor: pointer;\n\n img {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n }\n }\n"],["\n position: fixed;\n left: 50%;\n\n padding: 0 16px 32px;\n background-color: ",";\n border-radius: 6px;\n box-shadow: 0px 4px 8px ",";\n transform: translate(-50%, -50%);\n transition: all 0.5s ease-in-out;\n visibility: hidden;\n\n &[data-open='true'] {\n z-index: 200;\n top: 50%;\n opacity: 1;\n visibility: visible;\n }\n\n &[data-open='false'] {\n top: -50%;\n }\n\n &[data-type='lead'] {\n width: 332px;\n height: 460px;\n\n div {\n top: -15px;\n right: -15px;\n }\n }\n\n &[data-type='form'] {\n width: 496px;\n height: 548px;\n "," {\n width: 340px;\n }\n }\n\n &[data-type='confirm'] {\n "," {\n width: calc(100% - 32px);\n }\n "," {\n width: 100%;\n max-width: 407px;\n }\n }\n\n .popup-content {\n position: relative;\n z-index: 111;\n height: 100%;\n padding: 16px;\n }\n\n .close-button {\n position: absolute;\n top: 16px;\n right: 0;\n cursor: pointer;\n\n img {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n }\n }\n"])),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.gray200}),o.MediaQueries.mbDown,o.MediaQueries.mbDown,o.MediaQueries.mbUp),h=d.default.div(u||(u=r.__makeTemplateObject(["\n position: fixed;\n z-index: 110;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n align-items: center;\n background: rgba(38, 38, 38, 0.3);\n\n &[data-open='false'] {\n display: none;\n }\n"],["\n position: fixed;\n z-index: 110;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n align-items: center;\n background: rgba(38, 38, 38, 0.3);\n\n &[data-open='false'] {\n display: none;\n }\n"]))),g={BASE_API_PATH:"/",PROFILE:"profile?website_url={website_url}",SEARCH_USER:"profile/search?website_url={website_url}&name={name}",FETCH_PREVIEW:"fetch/preview?website_url={website_url}",FETCH_POST_OR_TOPIC:"fetch/{slug}?website_url={website_url}&community_slug={communitySlug}",POST:{LIST:"post?website_url={website_url}&slug={slug}&pin={pin}&page={page}&community_id={communityId}&topic_id={topicId}&sort_by={sort}&id={id}",DETAIL_BY_ID_OR_SLUG:"post/{idSlug}?website_url={website_url}",CREATE:"post/create?website_url={website_url}",LIKE:"post/{id}/like?website_url={website_url}",DELETE:"post/{id}/delete?website_url={website_url}",REPORT:"post/{id}/report?website_url={website_url}",UPDATE:"post/{id}/update?website_url={website_url}",FOLLOW:"post/{id}/follow?website_url={website_url}",CREATE_ARTICLE_COMMENT:"article-comment/create?website_url={website_url}"},COMMENT:{LIST:"comment?website_url={website_url}&post_id={postId}&page={page}&sort_by={sort}&items_per_page={perPage}&_without_reply={withoutReply}",CREATE:"comment/create?website_url={website_url}",REPLY:"comment/reply?website_url={website_url}",DELETE:"comment/{id}/delete?website_url={website_url}",LIKE:"comment/{id}/like?website_url={website_url}",UNLIKE:"comment/{id}/unlike?website_url={website_url}",IMAGE_UPLOAD:"comment/image/upload?website_url={website_url}"},COMMUNITY:{LIST:"community?website_url={website_url}&page={page}",DETAIL_BY_ID_OR_SLUG:"community/{idSlug}?website_url={website_url}",JOIN:"community/join?website_url={website_url}",LEAVE:"community/leave?website_url={website_url}"},TOPIC:{LIST:"topic?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}&page={page}",DETAIL_BY_ID_OR_SLUG:"topic/{idSlug}?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}",HEALTH_TOOLS:"tools?topic_id={topicId}&website_url={website_url}",SUBOTS:"subots?topic_id={topicId}&website_url={website_url}",SUGGESTED_POSTS:"suggested-posts?topic_id={topicId}&website_url={website_url}&page={page}",JOIN:"topic/join?website_url={website_url}",LEAVE:"topic/leave?website_url={website_url}"},BOOKMARK:{LIST:"bookmark?user_id={userId}&website_url={website_url}",CREATE:"bookmark/create?website_url={website_url}",DELETE:"bookmark/delete?website_url={website_url}"},UPLOAD_IMAGE:"auth/comment/image/upload?website_url={website_url}"},b=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");var r={},o=(t||{}).decode||f,a=0;for(;a<e.length;){var n=e.indexOf("=",a);if(-1===n)break;var i=e.indexOf(";",a);if(-1===i)i=e.length;else if(i<n){a=e.lastIndexOf(";",n-1)+1;continue}var l=e.slice(a,n).trim();if(void 0===r[l]){var s=e.slice(n+1,i).trim();34===s.charCodeAt(0)&&(s=s.slice(1,-1)),r[l]=L(s,o)}a=i+1}return r},A=function(e,t,r){var o=r||{},a=o.encode||I;if("function"!=typeof a)throw new TypeError("option encode is invalid");if(!O.test(e))throw new TypeError("argument name is invalid");var n=a(t);if(n&&!O.test(n))throw new TypeError("argument val is invalid");var i=e+"="+n;if(null!=o.maxAge){var l=o.maxAge-0;if(isNaN(l)||!isFinite(l))throw new TypeError("option maxAge is invalid");i+="; Max-Age="+Math.floor(l)}if(o.domain){if(!O.test(o.domain))throw new TypeError("option domain is invalid");i+="; Domain="+o.domain}if(o.path){if(!O.test(o.path))throw new TypeError("option path is invalid");i+="; Path="+o.path}if(o.expires){var s=o.expires;if(!function(e){return"[object Date]"===v.call(e)||e instanceof Date}(s)||isNaN(s.valueOf()))throw new TypeError("option expires is invalid");i+="; Expires="+s.toUTCString()}o.httpOnly&&(i+="; HttpOnly");o.secure&&(i+="; Secure");if(o.priority){switch("string"==typeof o.priority?o.priority.toLowerCase():o.priority){case"low":i+="; Priority=Low";break;case"medium":i+="; Priority=Medium";break;case"high":i+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(o.sameSite){switch("string"==typeof o.sameSite?o.sameSite.toLowerCase():o.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return i},v=Object.prototype.toString,O=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function f(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function I(e){return encodeURIComponent(e)}function L(e,t){try{return t(e)}catch(t){return e}}var w={parse:b,serialize:A},S={DUE_DATE:"DUE_DATE",BMI:"BMI",BMR:"BMR",OVULATION:"OVULATION",IFRAME:"IFRAME",PWG:"PWG",THR:"THR"},R={"id-ID":{"kalkulator-bmi":S.BMI,"kebutuhan-kalori":S.BMR,"kalkulator-hari-perkiraan-lahir":S.DUE_DATE,"kalkulator-masa-subur-2":S.OVULATION,"kalkulator-kenaikan-berat-badan-ibu-hamil":S.PWG,"kalkulator-detak-jantung-saat-olahraga":S.THR},"ms-MY":{"kalkulator-bmi":S.BMI,"kalkulator-bmr":S.BMR,"kalkulator-tarikh-bersalin":S.DUE_DATE,"kalkulator-kesuburan":S.OVULATION,"kalkulator-tambah-berat-badan-hamil":S.PWG,"target-heart-rate-calculator":S.THR},"vi-VN":{"cach-tinh-chi-so-bmi":S.BMI,"tinh-chi-so-bmr":S.BMR,"cong-cu-tinh-ngay-du-sinh":S.DUE_DATE,"tinh-ngay-rung-trung":S.OVULATION,"cong-cu-tinh-can-nang-khi-mang-thai":S.PWG,"cong-cu-do-nhip-tim":S.THR},"zh-TW":{"bmi-calculator":S.BMI,"bmr-calculator":S.BMR,"due-date-calculator":S.DUE_DATE,"ovulation-calculator":S.OVULATION,"pregnancy-weight-gain-calculator":S.PWG,"target-heart-rate-calculator":S.THR},"en-PH":{"bmi-calculator":S.BMI,"bmr-calculator":S.BMR,"due-date-calculator":S.DUE_DATE,"ovulation-calculator":S.OVULATION,"pregnancy-weight-gain-calculator":S.PWG,"target-heart-rate-calculator":S.THR},"th-TH":{"เครื่องคำนวณหา-ค่าดัชนี":S.BMI,"เครื่องคำนวณอัตราการเผาผลาญพลังงาน-bmr":S.BMR,"เครื่องมือคำนวณกำหนดคลอด":S.DUE_DATE,"เครื่องคำนวณการตกไข่-ovulation-calculat":S.OVULATION,"เครื่องคำนวณน้ำหนักตัว":S.PWG,"เครื่องวัดอัตราการเต้น":S.THR},"hi-IN":{"bmi-calculator-en":S.BMI,"bmi-calculator":S.BMI,"bmr-calculator":S.BMR,"delivery-date-calculator":S.DUE_DATE,"ovulation-calculator":S.OVULATION,"pregnancy-weight-gain-calculator":S.PWG,"target-heart-rate-calculator":S.THR},"km-KH":{"គណនា-bmi":S.BMI,"គណនា-bmr":S.BMR,"គណនាថ្ងៃសម្រាលកូន":S.DUE_DATE,"គណនាថ្ងៃមេជីវិតញីទុំធ្លាក់":S.OVULATION,"គណនាទម្ងន់ស្ត្រីពពោះ":S.PWG,"គណនារកចង្វាក់បេះដូងល្អ":S.THR},"my-MM":{"bmi-calculator":S.BMI,"bmr-calculator":S.BMR,"due-date-calendar":S.DUE_DATE,"ovulation-calculator":S.OVULATION,"pregnaancy-weight-calculator":S.PWG,"target-heartrate":S.THR,"pregnancy-weight-calculator":S.PWG,"target-heart-rate":S.THR}},y={report_scam:{label:"morePopover.report.scam",reportReasonText:"morePopover.report.scam"},report_sex:{label:"morePopover.report.sex",reportReasonText:"morePopover.report.sex"},report_offensive:{label:"morePopover.report.offensive",reportReasonText:"morePopover.report.offensive"},report_violence:{label:"morePopover.report.violence",reportReasonText:"morePopover.report.violence"},report_prohibited:{label:"morePopover.report.prohibited",reportReasonText:"morePopover.report.prohibited"},report_spam:{label:"morePopover.report.spam",reportReasonText:"morePopover.report.spam"},report_falseNews:{label:"morePopover.report.falseNews",reportReasonText:"morePopover.report.falseNews"},report_other:{label:"morePopover.report.other",reportReasonText:"morePopover.report.other"}},x={"en-PH":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"vi-VN":{ALL:"tat-ca",HOSPITAL:"benh-vien",SERVICE:"dich-vu",DOCTOR:"bac-si",SEARCH:"tim-kiem",SPECIALTIES:"chuyen-khoa",CURRENT:"vi-tri-hien-tai"},"id-ID":{ALL:"semua",HOSPITAL:"rumah-sakit",SERVICE:"layanan",DOCTOR:"dokter",SEARCH:"cari",SPECIALTIES:"spesialisasi",CURRENT:"posisi-saya-saat-ini"}},P=Object.freeze({__proto__:null,POST_DATE_FORMAT:"dd/MM/yyyy",NORMAL_DATE_FORMAT:"YYYY-MM-DD",DEFAULT_AVATAR_IMG:"/images/avatar.jpg",DEFAULT_RESULT_IMG:"/images/default.png",DEFAULT_IMG:"/images/default-image.jpg",BMI_LEVELS:["underweight","healthy","overweight","obese_level_1","obese_level_2"],BMR_LEVELS:["low","normal","high"],CORAL_TOKEN_COOKE:"coral_together_user_token",HEALTH_TOOL_TYPE:S,LOCALE_HEALTH_TOOLS:R,BEARER_TOKEN_COOKIE:"hhg_user_token",TOGETHER_DISCLAIMER_COOKIE:"hhg_together_disclaimer",BEARER_ADMIN_TOKEN_COOKIE:"together_admin_token",Z_INDEX:{adBlock:48,articleAdContainer:47,headerContainerHome:99,headerContainerPopup:200,headerContainerPopupSUbLevel:300,menuSearchInputPopup:5,menuSearchInputDisplayIcon:6,menuSearchPopup:200},BmrActiveLevels:[{value:"sedentary",icon:"bmr-sedentary",name:"bmr.activeLevel.sedentary",description:"bmr.activeLevel.sedentary.description"},{value:"lightly-active",icon:"bmr-light",name:"bmr.activeLevel.lightlyActive",description:"bmr.activeLevel.lightlyActive.description"},{value:"moderately-active",icon:"bmr-moderately",name:"bmr.activeLevel.moderatelyActive",description:"bmr.activeLevel.moderatelyActive.description"},{value:"intensely-active",icon:"bmr-intensively",name:"bmr.activeLevel.intenselyActive",description:"bmr.activeLevel.intenselyActive.description"},{value:"extremely-active",icon:"bmr-extremely",name:"bmr.activeLevel.extremelyActive",description:"bmr.activeLevel.extremelyActive.description"}],LEAD_CAMPAIGN_CODE:"lmoct7xfr5sv4fv",LEAD_TOKEN_COOKIE:"hhg-id",GA_TOKEN_COOKIE:"_ga",GOOGLE_CALENDAR_AUTH_CLIENT_ID:"1038242799566-esoq4ij201ve5qfp266nbca44scpo3c6.apps.googleusercontent.com",FIND_CARE_IFRAME_URL:"https://www.appsheet.com/start/4ba34ebe-3cb6-4c16-8dd4-d074025a5bb6#appName=DependentDropdowns-2711103&group=%5B%5D&page=card&sort=%5B%5D&table=Menu&view=Menu",REPORT_REASON_MAP:y,MB_SOCIAL_LINKS:{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/marry.baby.vn",INSTAGRAM:"https://www.instagram.com/marrybaby.vn/",TWITTER:"",YOUTUBE:"https://www.youtube.com/channel/UCeZybTkY1VzJ3N7LvPGdKbg",ZALO:"http://zalo.me/806483414530291942"},INTERNAL_ROLES:["admin","moderator","local-admin"],EXTERNAL_ROLES:["ambassador","expert","sponsor","guide","influencer"],INTERNAL_PROFILE_ROLES:["moderator","local-admin"],EXTERNAL_PROFILE_ROLES:["expert","ambassador","sponsor"],RoleDataMap:{moderator:{text:"Moderator",fid:"cardAuthor.moderator",background:"#fe921d"},admin:{text:"Admin",fid:"cardAuthor.admin",background:"#2b62cd"},"local-admin":{text:"Local admin",fid:"cardAuthor.localAdmin",background:"#2b62cd"},expert:{text:"Expert",fid:"cardAuthor.expert",background:"#ff6f4d"},sponsor:{text:"Sponsor",fid:"cardAuthor.sponsor",background:"#00c7e6"},ambassador:{text:"Ambassador",fid:"cardAuthor.ambassador",background:"#00CB8A"}},MAX_IMAGE_UPLOADS:20,LOCALISED_SLUGS:x}),D={"vi-VN":"hellobacsi.com","id-ID":"hellosehat.com","ms-MY":"hellodoktor.com","km-KH":"hellokrupet.com","en-PH":"hellodoctor.com.ph","th-TH":"hellokhunmor.com","my-MM":"hellosayarwon.com","zh-TW":"helloyishi.com.tw","hi-IN":"helloswasthya.com"},G={"vi-VN":"marrybaby.vn"},C=process.env.NEXT_PUBLIC_DEPLOY_LOCALE||"vi-VN",N=function(e){var t=exports.GlobalData.env.isMarryBaby;return"https://".concat(t?G[e]:D[e])},k=function(e){var t=e.indexOf("?");return t>=0?e.slice(0,t+1)+e.slice(t+1).replace(/[^=&]+=(&|$)/g,"").replace(/&$/,""):e},M=function(e){var t=exports.GlobalData.env.isMarryBaby;if("undefined"!=typeof window)return window.location.origin;var r="staging"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return"development"===process.env.NEXT_PUBLIC_DEPLOY_ENV?"http://localhost:3000":"https://".concat(r?t?"fe.":"discover.":t?"www.":"").concat(D[e])},U=function(e,t,o){var a="";o&&(a=Object.keys(o).map((function(e){return e+"="+o[e]})).join("&"));var n=((null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{}).togetherBaseApiUrl,i=void 0===n?"":n,l=E.default(e,r.__assign(r.__assign({},(null==t?void 0:t._locale)?{website_url:N(String(t._locale))}:{}),t));return l+="".concat(l.includes("?")?"&":"?").concat(a),i+"api/v1/"+k(l)},H=function(e){return(null==e?void 0:e.data)&&(e.data instanceof FormData?e.body=e.data:"object"==typeof e.data&&(e.body=JSON.stringify(e.data)),delete e.data),e},B=function(e,t,o,a){return void 0===a&&(a=!1),r.__awaiter(void 0,void 0,void 0,(function(){var n,i,l,s,c;return r.__generator(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,fetch(a?e:(_=e,encodeURI(_).replace(/%5B/g,"[").replace(/%5D/g,"]")),r.__assign({method:t},H(o))).then((function(e){return e.json()}))];case 1:return(n=u.sent())?[2,n]:[3,3];case 2:return i=u.sent(),console.log(i),console.log({url:e,status:null===(l=null==i?void 0:i.response)||void 0===l?void 0:l.status,statusText:null===(s=null==i?void 0:i.response)||void 0===s?void 0:s.statusText}),[2,(null===(c=null==i?void 0:i.response)||void 0===c?void 0:c.data)||null];case 3:return[2,null]}var _}))}))},F=function(e,t,o,a){return r.__awaiter(void 0,void 0,void 0,(function(){var i,l,s,c;return r.__generator(this,(function(u){switch(u.label){case 0:return u.trys.push([0,3,,4]),i=w.parse(a||""),l=i.hhg_user_token,(s=l||n.getCookie("hhg_user_token"))&&s.length?[4,fetch(e,r.__assign(r.__assign({method:t},H(o)),{headers:{Authorization:"Bearer "+s}})).then((function(e){return e.json()}))]:[3,2];case 1:if(c=u.sent())return[2,c];u.label=2;case 2:return[3,4];case 3:return u.sent(),[2,null];case 4:return[2,null]}}))}))};function V(e,t,r){var o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),a=-1!==e.indexOf("?")?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+r+"$2"):e+a+t+"="+r}var K=function(e,t,r,o){return r&&t?"".concat(r,"-").concat(t):"".concat(p.default(e||"",{lower:!0,locale:o||C}),"-").concat(t)},Y={locale:"vi-VN",env:{isMarryBaby:!1,togetherBasePath:"/community"},router:{basePath:"",asPath:"/"}},W=e.createContext({data:Y,action:{pushNotifications:function(e){return e},sanitizeFunction:function(e){return e}}});exports.GlobalData=Y;exports.ADMIN_PATHS={SEARCH_USER:"admin/profile/search?website_url={website_url}&name={name}",COMMENT:{IMAGE_UPLOAD:"admin/comment/image/upload?website_url={website_url}"}},exports.Avatar=function(r){var o=r.type,a=void 0===o?"square":o,n=r.size,i=r.avatarImg,l=r.avatarUrl,s=r.firstLetter,c=r.backgroundColor,u=r.onClick,d=r.style,p=r.className,E=r.isAmp,T=void 0!==E&&E,h=r.width,g=r.height,b=n?m[n]:void 0,A=e.useState(!1),v=A[0],O=A[1];e.useEffect((function(){if(l){var e=document.createElement("img");e.setAttribute("src",l),e.addEventListener("error",(function(){O(!0)}))}}),[l,O]);var f=(!l&&!i||v)&&s;return _.default.createElement(t.StyledAvatar,{style:d,"data-avatar-type":a,onClick:u,className:p,size:T?void 0:b,backgroundColor:c,avatarUrl:l,"data-is-amp":T,width:h,height:g},i,l&&!v&&_.default.createElement("img",{src:l}),f&&s)},exports.BEARER_TOKEN_COOKIE="hhg_user_token",exports.CARE_PATHS={GET_DOCTOR_INFO:"api/doctors/{doctorId}?site={website_url}",GET_HOSPITAL_INFO:"api/hospital/branch/{hospital_branch_id}?site={website_url}"},exports.DEFAULT_AVATAR_IMG="/images/avatar.jpg",exports.DEFAULT_IMG="/images/default-image.jpg",exports.DISCOVER_PATHS={BASE_API_PATH:"/",GET_SEARCH_ARTICLES:"search?s={keyword}&page={page}",GET_ALL_CATEGORIES:"categories?type=all",GET_HOMEPAGE_POSTS:"home/trending-post?type={type}",GET_HOMEPAGE_LATEST_POSTS:"articles?page=1&_islatest=1",GET_ARTICLE_DETAIL:"article/{slug}?skip_ids={skipIds}&_isrelated={isRelated}",GET_CATEGORY_DETAIL:"category/{slug}",GET_CATEGORY_OR_ARTICLE_DETAIL:"fetch/{fullSlug}",GET_PREVIEW_ARTICLE:"fetch/{fullSlug}?preview_nonce={nonce}&preview=true",GET_ARTICLE_OF_CATEGORY:"articles?category_id={categoryId}&page={currentPage}",GET_PAGE_STATIC:"page/{slug}",GET_ALL_HEALTH_TOOLS:"healthtools",GET_ALL_MARRYBABY_HEALTH_TOOLS:"health-tools",GET_HEALTH_TOOLS_BY_CATEGORY:"healthtools?_hasgroup=1",GET_AUTHOR:"author/{slug}",GET_ALL_EXPERTS:"experts",GET_ALL_EXPERTS_PAGING:"experts?page={page}",GET_EXPERT:"expert/{slug}",GET_EXPERT_POST:"expert/article?page={page}",POST_ARTICLE_FEEDBACK:"article/feedback/{id}",GET_AZ_DRUGS:"category/a-z/{category}",GET_HOMEPAGE_MEDICAL_REVIEWED:"home/medical-reviewed",GET_ARTICLES_BY_IDS:"articles?ids={ids}",GET_ARTICLE_OF_CATEGORY_NO_EXPLAINERS:"articles?category_id={categoryId}&page={currentPage}&skip_ids={ids}",GET_EXPERT_OF_CATEGORY:"category/expert/?id={id}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",GET_DUE_DATE_ALL_WEEKS:"health-tools/due-date-calculator/all",GET_DUE_DATE_SUGGESTED_ARTICLES:"health-tools/due-date-calculator/result?from_week={from}&to_week={to}",GET_PROFILE:"user/profile",GET_ADMIN_PROFILE:"GET_ADMIN_PROFILE",GET_FEATURE:"feature",POST_NEW_FEATURE:"feature/update",CREATE_BOOKMARK:"bookmark/create",DELETE_BOOKMARK:"bookmark/delete",DELETE_ALL_BOOKMARK:"bookmark/delete-all",GET_ALL_BOOKMARK:"bookmark",SSO_USER_PROFILE:"user",SSO_USER_BOOKMARKS:"user/bookmarks",SSO_USER_PASSWORD:"user/settings/password",SSO_USER_EMAIL:"user/settings/update-email",SSO_CLOSE_ACCOUNT:"user/settings/close-account",SSO_HELP:"user/settings/help",GET_HEALTH_TOOL_OVULATION_INFO:"health-tools/ovulation-calculator/info",GET_HEALTH_TOOL_OVULATION_SUGGESTED_ARTICLES:"health-tools/ovulation-calculator/result?method={method}",GET_HEALTH_TOOL_BMI_INFO:"health-tools/bmi-calculator/info",GET_HEALTH_TOOL_BMI_RESULT:"health-tools/bmi-calculator/result?gender={gender}&bmi={bmi}&age={age}",GET_HEALTH_TOOL_BMR_INFO:"health-tools/bmr-calculator/info",GET_HEALTH_TOOL_BMR_RESULT:"health-tools/bmr-calculator/result?kcals={kcals}&gender={gender}&age={age}",GET_HEALTH_TOOL_PWG_INFO:"health-tools/preweight-gain-calculator/info",GET_HEALTH_TOOL_THR_INFO:"health-tools/target-heart-rate/info",POST_UPDATE_LOCATION:"tracking/geo/",GET_SIDIS_DUE_DATE:"frontend/tools/due_date",GET_SIDIS_OVULATION:"frontend/tools/ovulation",GET_SIDIS_BMI:"frontend/tools/bmi",GET_SIDIS_BMR:"frontend/tools/bmr",POST_LOGOUT:"user/logout",OVULATION_CREATE_EVENT:"ovulation/event?method={method}&day={day}&cycle={cycle}&period={period}&token={token}&user_id={user_id}",GET_ALL_SPOTLIGHT:"spotlights?per_page={perPage}&order_by={orderBy}",SSO_UPDATE_FIRST_TIME_BOOKMARK:"bookmark/update-first-time",POST_COMMENT_NOTIFICATION:"comment/notification",GET_ABOUT_US_DATA:"about",POST_LEAD_IMPRESSION:"campaign/{campaignCode}/impression",POST_LEAD_POPUP_EXIT:"campaign/{campaignCode}/popup_exit",POST_LEAD_LEAD:"campaign/{campaignCode}/lead",POST_SSO_VERIFY_TOKEN:"verify-id-token",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",FETCH_URL_DATA:"preview",GET_SPOTLIGHT_LANDING:"spotlight/{slug}",GET_FOOTER_INFO:"footer",CHECK_SSO_EMAIL:"member/check-email",GET_HOMEPAGE_SITEWIDE_BANNER:"home/sitewide-banner",GET_DYNAMIC_FOOTER:"menu/footer",GET_EXPERTS:"experts?page={page}&number={perPage}&s={search}",GET_EXPERT_BY_ID:"expert/{id}"},exports.DefaultComponentGlobalContextData=Y,exports.MAX_IMAGE_UPLOADS=20,exports.PATHS=g,exports.Popup=function(e){var t=e.type,r=void 0===t?"lead":t,o=e.closeIcon,a=e.isOpen,n=void 0===a||a,i=e.onClose,l=e.children,s=e.className,c=void 0===s?"":s,u=e.enableAnimation,d=void 0===u||u;return _.default.createElement(_.default.Fragment,null,_.default.createElement(T,{"data-open":n,"data-type":r,"data-animation":d},_.default.createElement("div",{className:"".concat(c||""," popup-content")},!!o&&_.default.createElement("div",{className:"close-button",onClick:i},o),l)),_.default.createElement(h,{"data-open":n,onClick:i}))},exports.REPORT_REASON_MAP=y,exports.TogetherComponentGlobalContext=W,exports.TogetherComponentGlobalContextProvider=function(t){var r=t.locale,o=void 0===r?"vi-VN":r,a=t.children,n=t.userInfo,i=t.router,l=t.env,s=void 0===l?{isMarryBaby:!1,togetherBasePath:"/community"}:l,c=t.sanitizeFunction,u=void 0===c?function(e){return e}:c,d=t.pushNotifications,p=void 0===d?function(){return!1}:d,E=e.useState(),m=E[0],T=E[1];return exports.GlobalData={userInfo:n,locale:o,togetherUserId:m,router:i,env:s},e.useEffect((function(){(null==n?void 0:n.id)&&F(U(g.PROFILE,{_locale:o}),"GET").then((function(e){var t;T(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)}))}),[null==n?void 0:n.id]),_.default.createElement(W.Provider,{value:{data:{userInfo:n,locale:o,togetherUserId:m,router:i,env:s},action:{pushNotifications:p,sanitizeFunction:u}}},a)},exports.callApi=B,exports.callApiWithAdminAuth=function(e,t,o,a){return r.__awaiter(void 0,void 0,void 0,(function(){var i,l,s,c;return r.__generator(this,(function(u){switch(u.label){case 0:return u.trys.push([0,3,,4]),i=w.parse(a||""),l=i.together_admin_token,(s=l||n.getCookie("together_admin_token"))&&s.length?[4,fetch(e,r.__assign(r.__assign({method:t},H(o)),{headers:{Authorization:"Bearer "+s}})).then((function(e){return e.json()}))]:[3,2];case 1:if(c=u.sent())return[2,c];u.label=2;case 2:return[3,4];case 3:return u.sent(),[2,null];case 4:return[2,null]}}))}))},exports.callApiWithAuth=F,exports.callApiWithOptionalAuth=function(e,t,o,a){return void 0===t&&(t="GET"),r.__awaiter(void 0,void 0,void 0,(function(){var i,l,s,c,u,_,d,p,E,m,T,h,g,b;return r.__generator(this,(function(A){switch(A.label){case 0:if(A.trys.push([0,7,,8]),i="string"==typeof e?e:e.url,l="string"==typeof e?e:e.backupUrl,s=w.parse(a||""),c=s.hhg_user_token,!(u=c||n.getCookie("hhg_user_token"))||!u.length)return[3,5];A.label=1;case 1:return A.trys.push([1,3,,4]),[4,fetch(i,r.__assign(r.__assign({method:t},H(o)),{headers:{Authorization:"Bearer "+u}})).then((function(e){return e.json()}))];case 2:return _=A.sent(),(null===(E=null==_?void 0:_.messages)||void 0===E?void 0:E.find((function(e){return"Unauthenticated"===(null==e?void 0:e.toLowerCase())})))?[2,B(l||i,t,o)]:_?[2,_]:[3,4];case 3:return d=A.sent(),console.log({status:null===(m=null==d?void 0:d.response)||void 0===m?void 0:m.status,statusText:null===(T=null==d?void 0:d.response)||void 0===T?void 0:T.statusText}),[2,B(l||i,t,o)];case 4:return[3,6];case 5:return[2,B(l||i,t,o)];case 6:return[3,8];case 7:return p=A.sent(),console.log({status:null===(h=null==p?void 0:p.response)||void 0===h?void 0:h.status,statusText:null===(g=null==p?void 0:p.response)||void 0===g?void 0:g.statusText}),[2,(null===(b=null==p?void 0:p.response)||void 0===b?void 0:b.data)||null];case 8:return[2,null]}}))}))},exports.constants=P,exports.domainLocales=D,exports.getApiPath=U,exports.getCareDoctorUrl=function(e){var t,r=e.name,o=e.id,a=e.locale;return"/care/".concat(null===(t=x[a||"vi-VN"])||void 0===t?void 0:t.DOCTOR,"/").concat(K(r,o))},exports.getCareHospitalUrl=function(e){var t,r=e.name,o=e.id,a=e.slug,n=e.locale;return"/care/".concat(null===(t=x[n||"vi-VN"])||void 0===t?void 0:t.HOSPITAL,"/").concat(K(r,o,a))},exports.getCarePath=function(e,t){var o=((null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{}).careBaseApiUrl;return((void 0===o?"":o)||"https://service-health-care.hellohealthgroup.com/")+k(E.default(e,r.__assign({},t)))},exports.getCurrentBaseUrl=M,exports.getCurrentHref=function(e,t,r){return"undefined"!=typeof window?window.location.href:"".concat(M(e)).concat(t).concat(r)},exports.getDiscoverApiPath=function(e,t){var o=((null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{}).discoverBaseApiUrl;return(void 0===o?"":o)+"wp-json/api/"+k(E.default(e,r.__assign({},t)))},exports.getUrlToSignUp=function(e,t,r){void 0===r&&(r="/community");var o=e||("undefined"!=typeof window?window.location.href:"/"),a="undefined"!=typeof window?window.location.origin:"";return a||e&&(e.startsWith("http://")||e.startsWith("https://"))&&(a=e.split("/").slice(0,3).join("/")),function(e,t){var r=exports.GlobalData.env.publicSSO,o=e||window.location.href;return t&&Object.keys(t).map((function(e){V(o,e,t[e])})),V(o,"source","communities"),r?"".concat(r,"?returnUrl=").concat(encodeURIComponent(o.toString())):o}("".concat(a).concat(r,"/on-boarding?return=").concat(encodeURIComponent(o)),t)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./tslib.es6-f7929e76.js"),t=require("react"),n=require("./constants-ca5ea110.js"),a=require("./useTranslations-cb78945d.js"),i=require("./cookieHelper-612b90fa.js"),o=require("lodash/debounce"),r=require("./index.styled-ae584a04.js"),l=require("./index-0361370d.js");require("react-range"),require("react-dom");var s=require("styled-components"),c=require("react-loading-skeleton"),u=require("react-id-generator"),d=require("lodash/shuffle"),p=require("./useOutsideClick-528bfd6c.js"),h=require("string-format");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=f(t),m=f(o),C=f(s),v=f(c),x=f(d),b=f(h);var y,_,w,E,k,L,S,T,O,I,M,R,A=C.default.div(y||(y=e.__makeTemplateObject([""],[""]))),N=C.default.div(_||(_=e.__makeTemplateObject(["\n --searchbar-z-index: 305;\n &[data-is-modal='true'] {\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n height: var(--mobile-care-searchbar-height, 100%);\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n background-color: white;\n z-index: var(--searchbar-z-index);\n }\n"],["\n --searchbar-z-index: 305;\n &[data-is-modal='true'] {\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n height: var(--mobile-care-searchbar-height, 100%);\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n background-color: white;\n z-index: var(--searchbar-z-index);\n }\n"]))),P=C.default.section(w||(w=e.__makeTemplateObject([""],[""]))),F=C.default.input(E||(E=e.__makeTemplateObject(["\n position: fixed;\n left: -100%;\n top: -100%;\n"],["\n position: fixed;\n left: -100%;\n top: -100%;\n"]))),z=C.default(l.Input)(k||(k=e.__makeTemplateObject(["\n #booking-search-bar & {\n input {\n font-size: 16px;\n }\n }\n"],["\n #booking-search-bar & {\n input {\n font-size: 16px;\n }\n }\n"]))),j=s.createGlobalStyle(L||(L=e.__makeTemplateObject(["\n .care-popup-open {\n overflow: hidden;\n position: fixed;\n &::before {\n content: '';\n inset: 0;\n position: absolute;\n background-color: white;\n min-height: 100vh;\n min-width: 100vw;\n z-index: 2;\n }\n }\n"],["\n .care-popup-open {\n overflow: hidden;\n position: fixed;\n &::before {\n content: '';\n inset: 0;\n position: absolute;\n background-color: white;\n min-height: 100vh;\n min-width: 100vw;\n z-index: 2;\n }\n }\n"]))),B=function(e){var t=e.className,n=e.color;return g.default.createElement("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.default.createElement("path",{d:"M18 6L6 18",stroke:n||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),g.default.createElement("path",{d:"M6 6L18 18",stroke:n||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))},D=function(e){var t=e.className,n=e.color;return g.default.createElement("svg",{width:"14",height:"20",viewBox:"0 0 14 20",className:t},g.default.createElement("path",{d:"M7 0C3.134 0 0 3.134 0 7C0 10.966 4.404 16.82 6.226 19.071C6.626 19.565 7.374 19.565 7.774 19.071C9.596 16.82 14 10.966 14 7C14 3.134 10.866 0 7 0ZM7 9.5C5.619 9.5 4.5 8.381 4.5 7C4.5 5.619 5.619 4.5 7 4.5C8.381 4.5 9.5 5.619 9.5 7C9.5 8.381 8.381 9.5 7 9.5Z",fill:n||"currentColor"}))},H=function(e){var t=e.className,n=e.color;return g.default.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:t},g.default.createElement("path",{d:"M9.99967 6.66658C8.15801 6.66658 6.66634 8.15825 6.66634 9.99992C6.66634 11.8416 8.15801 13.3333 9.99967 13.3333C11.8413 13.3333 13.333 11.8416 13.333 9.99992C13.333 8.15825 11.8413 6.66658 9.99967 6.66658ZM17.4497 9.16658C17.0663 5.69158 14.308 2.93325 10.833 2.54992V1.66659C10.833 1.20825 10.458 0.833252 9.99967 0.833252C9.54134 0.833252 9.16634 1.20825 9.16634 1.66659V2.54992C5.69134 2.93325 2.93301 5.69158 2.54967 9.16658H1.66634C1.20801 9.16658 0.833008 9.54158 0.833008 9.99992C0.833008 10.4583 1.20801 10.8333 1.66634 10.8333H2.54967C2.93301 14.3083 5.69134 17.0666 9.16634 17.4499V18.3333C9.16634 18.7916 9.54134 19.1666 9.99967 19.1666C10.458 19.1666 10.833 18.7916 10.833 18.3333V17.4499C14.308 17.0666 17.0663 14.3083 17.4497 10.8333H18.333C18.7913 10.8333 19.1663 10.4583 19.1663 9.99992C19.1663 9.54158 18.7913 9.16658 18.333 9.16658H17.4497ZM9.99967 15.8333C6.77467 15.8333 4.16634 13.2249 4.16634 9.99992C4.16634 6.77492 6.77467 4.16658 9.99967 4.16658C13.2247 4.16658 15.833 6.77492 15.833 9.99992C15.833 13.2249 13.2247 15.8333 9.99967 15.8333Z",fill:n||"currentColor"}))},V=function(e){var t=e.className,n=e.color;return g.default.createElement("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.default.createElement("path",{d:"M11 18C14.866 18 18 14.866 18 11C18 7.13401 14.866 4 11 4C7.13401 4 4 7.13401 4 11C4 14.866 7.13401 18 11 18Z",stroke:n||"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),g.default.createElement("path",{d:"M20 20L16 16",stroke:n||"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},K=function(e){var t=e.width,n=e.height;return g.default.createElement("svg",{width:t||30,height:n||30,viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.default.createElement("circle",{cx:"15",cy:"15",r:"15",fill:"#F7F9FC"}))},Z=C.default.li(S||(S=e.__makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px 16px;\n\n > :first-child {\n flex: 1;\n }\n\n > :nth-child(2) {\n flex: 6;\n }\n\n & + li::before {\n content: '';\n position: absolute;\n left: 18px;\n right: 18px;\n top: 0;\n height: 1px;\n background-color: ",";\n }\n"],["\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px 16px;\n\n > :first-child {\n flex: 1;\n }\n\n > :nth-child(2) {\n flex: 6;\n }\n\n & + li::before {\n content: '';\n position: absolute;\n left: 18px;\n right: 18px;\n top: 0;\n height: 1px;\n background-color: ",";\n }\n"])),a.theme.colors.neutral100),G=C.default.div(T||(T=e.__makeTemplateObject(["\n display: flex;\n position: absolute;\n top: 48px;\n min-width: 100%;\n box-shadow: 0px 24px 32px rgba(0, 0, 0, 0.04),\n 0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04),\n 0px 0px 1px rgba(0, 0, 0, 0.04);\n border-radius: 6px;\n background-color: white;\n z-index: 30;\n\n "," {\n position: relative;\n top: 0;\n box-shadow: initial;\n }\n"],["\n display: flex;\n position: absolute;\n top: 48px;\n min-width: 100%;\n box-shadow: 0px 24px 32px rgba(0, 0, 0, 0.04),\n 0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04),\n 0px 0px 1px rgba(0, 0, 0, 0.04);\n border-radius: 6px;\n background-color: white;\n z-index: 30;\n\n "," {\n position: relative;\n top: 0;\n box-shadow: initial;\n }\n"])),a.MediaQueries.mbDown),U=C.default.ul(O||(O=e.__makeTemplateObject(["\n width: 100%;\n max-height: 600px;\n overflow-y: auto;\n"],["\n width: 100%;\n max-height: 600px;\n overflow-y: auto;\n"]))),q=C.default(D)(I||(I=e.__makeTemplateObject(["\n width: 12px;\n height: 18px;\n"],["\n width: 12px;\n height: 18px;\n"]))),Q=C.default.li(M||(M=e.__makeTemplateObject(["\n position: relative;\n cursor: pointer;\n padding: 12px 18px;\n display: flex;\n align-items: center;\n gap: 14px;\n overflow: hidden;\n\n ","\n\n & + li::before {\n content: '';\n position: absolute;\n left: 18px;\n right: 18px;\n top: 0;\n height: 1px;\n background-color: ",";\n }\n\n &:not([data-is-denied='true']):hover {\n background-color: ",";\n }\n\n &:last-child:hover {\n border-bottom-right-radius: 6px;\n border-bottom-left-radius: 6px;\n }\n\n &:first-child:hover {\n border-top-right-radius: 6px;\n border-top-left-radius: 6px;\n }\n\n &[data-is-denied='true'] {\n cursor: not-allowed;\n }\n"],["\n position: relative;\n cursor: pointer;\n padding: 12px 18px;\n display: flex;\n align-items: center;\n gap: 14px;\n overflow: hidden;\n\n ","\n\n & + li::before {\n content: '';\n position: absolute;\n left: 18px;\n right: 18px;\n top: 0;\n height: 1px;\n background-color: ",";\n }\n\n &:not([data-is-denied='true']):hover {\n background-color: ",";\n }\n\n &:last-child:hover {\n border-bottom-right-radius: 6px;\n border-bottom-left-radius: 6px;\n }\n\n &:first-child:hover {\n border-top-right-radius: 6px;\n border-top-left-radius: 6px;\n }\n\n &[data-is-denied='true'] {\n cursor: not-allowed;\n }\n"])),(function(e){return e.isSelected&&"\n &::after {\n content: ".concat("url(\"data:image/svg+xml,%3Csvg width='19' height='14' viewBox='0 0 19 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.9803 0.990669C16.7205 0.99841 16.4739 1.10699 16.2928 1.2934L5.99984 11.5864L2.70687 8.2934C2.61473 8.19743 2.50436 8.12081 2.38223 8.06802C2.2601 8.01524 2.12867 7.98735 1.99563 7.986C1.86259 7.98464 1.73061 8.00985 1.60743 8.06014C1.48426 8.11043 1.37235 8.18479 1.27827 8.27887C1.1842 8.37295 1.10983 8.48485 1.05954 8.60803C1.00926 8.73121 0.98405 8.86318 0.985403 8.99622C0.986757 9.12926 1.01464 9.26069 1.06743 9.38282C1.12021 9.50495 1.19684 9.61532 1.29281 9.70747L5.29281 13.7075C5.48035 13.8949 5.73467 14.0002 5.99984 14.0002C6.26501 14.0002 6.51933 13.8949 6.70687 13.7075L17.7069 2.70747C17.8514 2.567 17.9501 2.38616 17.99 2.18864C18.03 1.99112 18.0093 1.78614 17.9308 1.60055C17.8523 1.41497 17.7195 1.25744 17.5499 1.14861C17.3803 1.03978 17.1817 0.984729 16.9803 0.990669Z' fill='%232685F1'/%3E%3C/svg%3E%0A\")",";\n top: 50%;\n right: 18px;\n position: absolute;\n transform: translateY(-50%);\n }\n ")}),a.theme.colors.neutral100,a.theme.colors.neutral50),W=C.default((function(t){var n=t.count,a=t.className,i=u.useId(n);return g.default.createElement(g.default.Fragment,null,e.__spreadArray([],Array(n),!0).map((function(e,t){return g.default.createElement(Z,{className:a,key:i[t]},g.default.createElement(v.default,{count:1,height:32}),g.default.createElement(v.default,{count:1,height:24}))})))}))(R||(R=e.__makeTemplateObject(["\n &:first-child {\n padding-top: 18px;\n }\n"],["\n &:first-child {\n padding-top: 18px;\n }\n"]))),Y=function(e){var t=e.cities,n=e.isLoading,i=e.onLocationClick,o=e.onCurrentLocationClick,l=e.geoLocationPermission,s=void 0===l?"unset":l,c=e.isLocationLoading,u=e.selectedLocation,d=a.useTranslations().t,p="denied"===s,h=function(){return g.default.createElement(Q,{role:"button",tabIndex:0,onClick:function(e){p||(e.nativeEvent.stopImmediatePropagation(),c||o())},"data-is-denied":p},p?g.default.createElement(r.Text,{color:"var(--gray600)",size:"md"},"x"):c?g.default.createElement(v.default,{height:20,width:20}):g.default.createElement(H,{color:a.theme.colors.primaryBase}),g.default.createElement("div",null,p?g.default.createElement(r.Text,{color:"var(--gray600)",size:"sm",style:{lineHeight:1.5}},d("booking.searchBar.grantLocation")):c?g.default.createElement(v.default,{height:20,style:{width:"calc(100% - 16px)"}}):g.default.createElement(r.Text,{size:"md"},d("booking.searchBar.useCurrentLocation"))))};return g.default.createElement(G,{"data-testid":"location-search-results"},g.default.createElement(U,null,n?g.default.createElement(W,{count:5}):!t||t.length<1?g.default.createElement(g.default.Fragment,null,h(),g.default.createElement(Q,{"data-is-denied":"true"},g.default.createElement(r.Text,{size:"sm",color:"#ccc"},d("booking.searchBar.noResults")))):g.default.createElement(g.default.Fragment,null,h(),t.map((function(e){return g.default.createElement(Q,{key:e.id,onClick:function(t){t.nativeEvent.stopImmediatePropagation(),i&&i(e)},role:"button",tabIndex:0,"aria-label":"Select ".concat(e.name," as location"),isSelected:(null==u?void 0:u.id)===e.id},g.default.createElement(q,{color:a.theme.colors.neutral400}),g.default.createElement(r.Text,{size:"md"},e.name))})))))},J="TYPE_CHARACTER",X="REMOVE_CHARACTER",$="REMOVE_ALL",ee="REMOVE_LAST_VISIBLE_NODE",te="PAUSE_FOR",ne="CHANGE_DELETE_SPEED",ae="CHANGE_DELAY",ie="PASTE_STRING",oe=function(e,t){return Math.floor(Math.random()*(t-e+1))+e},re="TEXT_NODE",le=function(){function t(t){var n=this;this.state={lastFrameTime:null,pauseUntil:null,eventQueue:[],eventLoop:null,eventLoopPaused:!1,reverseCalledEvents:[],calledEvents:[],visibleNodes:[],initialOptions:null},this.options={strings:null,delay:"natural",pauseFor:1500,deleteSpeed:"natural",loop:!1,autoStart:!1,stringSplitter:null,onCreateTextNode:null,onRemoveNode:null},this.start=function(){return n.state.eventLoopPaused=!1,n.runEventLoop(),n},this.pause=function(){return n.state.eventLoopPaused=!0,n},this.stop=function(){return n.state.eventLoop&&(window.cancelAnimationFrame(n.state.eventLoop),n.state.eventLoop=null),n},this.pauseFor=function(e){return n.addEventToQueue(te,{ms:e}),n},this.typeOutAllStrings=function(){return"string"==typeof n.options.strings?(n.typeString(n.options.strings).pauseFor(n.options.pauseFor),n):(n.options.strings.forEach((function(e){n.typeString(e).pauseFor(n.options.pauseFor).deleteAll(n.options.deleteSpeed)})),n)},this.typeString=function(e,t){if(void 0===t&&(t=null),e){var a=(n.options||{}).stringSplitter,i="function"==typeof a?a(e):e.split("");n.typeCharacters(i,t)}return n},this.pasteString=function(e,t){return void 0===t&&(t=null),e&&n.addEventToQueue(ie,{character:e,node:t}),n},this.deleteAll=function(e){return void 0===e&&(e="natural"),n.addEventToQueue($,{speed:e}),n},this.changeDeleteSpeed=function(e){if(!e)throw new Error("Must provide new delete speed");return n.addEventToQueue(ne,{speed:e}),n},this.changeDelay=function(e){if(!e)throw new Error("Must provide new delay");return n.addEventToQueue(ae,{delay:e}),n},this.deleteChars=function(e){if(!e)throw new Error("Must provide amount of characters to delete");for(var t=0;t<e;t++)n.addEventToQueue(X);return n},this.typeCharacters=function(e,t){if(void 0===t&&(t=null),!e||!Array.isArray(e))throw new Error("Characters must be an array");return e.forEach((function(e){n.addEventToQueue(J,{character:e,node:t})})),n},this.removeCharacters=function(e){if(!e||!Array.isArray(e))throw new Error("Characters must be an array");return e.forEach((function(){n.addEventToQueue(X)})),n},this.addEventToQueue=function(e,t,a){return void 0===a&&(a=!1),n.addEventToStateProperty(e,t,a,"eventQueue")},this.addReverseCalledEvent=function(e,t,a){return void 0===a&&(a=!1),n.options.loop?n.addEventToStateProperty(e,t,a,"reverseCalledEvents"):n},this.addEventToStateProperty=function(t,a,i,o){void 0===i&&(i=!1);var r={eventName:t,eventArgs:a||{}};return n.state[o]=i?e.__spreadArray([r],n.state[o],!0):e.__spreadArray(e.__spreadArray([],n.state[o],!0),[r],!1),n},this.runEventLoop=function(){n.state.lastFrameTime||(n.state.lastFrameTime=Date.now());var t=Date.now(),a=t-n.state.lastFrameTime;if(!n.state.eventQueue.length){if(!n.options.loop)return;n.state.eventQueue=e.__spreadArray([],n.state.calledEvents,!0),n.state.calledEvents=[],n.options=e.__assign({},n.state.initialOptions)}if(n.state.eventLoop=window.requestAnimationFrame(n.runEventLoop),!n.state.eventLoopPaused){if(n.state.pauseUntil){if(t<n.state.pauseUntil)return;n.state.pauseUntil=null}var i=e.__spreadArray([],n.state.eventQueue,!0),o=i.shift();if(!(a<=(o.eventName===ee||o.eventName===X?"natural"===n.options.deleteSpeed?oe(40,80):n.options.deleteSpeed:"natural"===n.options.delay?oe(120,160):n.options.delay))){var r=o.eventName,l=o.eventArgs;switch(r){case ie:case J:var s=l.character,c=document.createTextNode(s),u=c;n.options.onCreateTextNode&&"function"==typeof n.options.onCreateTextNode&&(u=n.options.onCreateTextNode(s,c)),n.state.visibleNodes=e.__spreadArray(e.__spreadArray([],n.state.visibleNodes,!0),[{type:re,character:s,node:u}],!1);break;case X:i.unshift({eventName:ee,eventArgs:{removingCharacterNode:!0}});break;case te:var d=o.eventArgs.ms;n.state.pauseUntil=Date.now()+parseInt(d);break;case $:var p=n.state.visibleNodes,h=l.speed,f=[];h&&f.push({eventName:ne,eventArgs:{speed:h,temp:!0}});for(var g=0,m=p.length;g<m;g++)f.push({eventName:ee,eventArgs:{removingCharacterNode:!1}});h&&f.push({eventName:ne,eventArgs:{speed:n.options.deleteSpeed,temp:!0}}),i.unshift.apply(i,f);break;case ee:if(n.state.visibleNodes.length){var C=n.state.visibleNodes.pop(),v=C.node;s=C.character;n.options.onRemoveNode&&"function"==typeof n.options.onRemoveNode&&n.options.onRemoveNode({node:v,character:s}),v&&v.parentNode.removeChild(v)}break;case ne:n.options.deleteSpeed=o.eventArgs.speed;break;case ae:n.options.delay=o.eventArgs.delay}n.options.loop&&(o.eventName===ee||o.eventArgs&&o.eventArgs.temp||(n.state.calledEvents=e.__spreadArray(e.__spreadArray([],n.state.calledEvents,!0),[o],!1))),n.state.eventQueue=i,n.state.lastFrameTime=t}}},t&&(this.options=e.__assign(e.__assign({},this.options),t)),this.state.initialOptions=e.__assign({},this.options),this.init()}return t.prototype.init=function(){this.addEventToQueue($,null,!0),!0===this.options.autoStart&&this.options.strings&&this.typeOutAllStrings().start()},t}();function se(e){var n=e.inputRef,i=e.wrapperRef,o=e.disabled,r=a.useTranslations(),l=r.t,s=r.locale,c=t.useMemo((function(){if(o)return[];var e=["booking.searchBar.placeholder.hospital","booking.searchBar.placeholder.doctor"];return"zh-TW"!==s&&e.push("booking.searchBar.placeholder.specialty","booking.searchBar.placeholder.service"),x.default(e).map((function(e){return l(e)}))}),[l,s]);function u(e){var t=p();return t&&(t.placeholder=t.placeholder+e),null}function d(){var e=p();e&&(e.placeholder=e.placeholder.slice(0,-1))}function p(){return n&&n.current?n.current:i&&i.current&&i.current.querySelector("input")||null}t.useEffect((function(){if(!o){var e=p();e&&(e.placeholder="",new le({strings:c,autoStart:!0,loop:!0,delay:32,deleteSpeed:32,pauseFor:1500,onCreateTextNode:u,onRemoveNode:d}))}}),[n,i])}var ce,ue=C.default.div(ce||(ce=e.__makeTemplateObject(["\n user-select: none;\n input {\n pointer-events: none;\n background-color: white;\n }\n"],["\n user-select: none;\n input {\n pointer-events: none;\n background-color: white;\n }\n"])));function de(n){var i=n.focused,o=n.value,r=void 0===o?"":o,l=n.onClick,s=n.trackingAttributes,c=n.inputSearchPlaceholder,u=a.useTranslations().t,d=t.useRef(null);se({wrapperRef:d,disabled:!!c});var p=t.useMemo((function(){return s?{"data-event-category":s.dataEventCategory,"data-event-action":s.dataEventAction,"data-event-label":s.dataEventLabel}:{}}),[s]);return g.default.createElement(ue,e.__assign({onClick:function(){return l&&l()},ref:d},p),g.default.createElement(z,{inputClassName:"location"===i?"focused":void 0,name:"booking-search-placeholder",displayIcon:g.default.createElement(V,{color:a.theme.colors.gray400}),placeholder:u("booking.searchBar.searchInput.placeholder"),value:r,size:"md"}))}var pe,he,fe,ge,me,Ce,ve=C.default.header(pe||(pe=e.__makeTemplateObject(["\n display: flex;\n height: 64px;\n align-items: center;\n justify-content: space-between;\n margin: 0 auto;\n position: sticky;\n z-index: 99;\n background-color: white;\n top: 0;\n left: 0;\n"],["\n display: flex;\n height: 64px;\n align-items: center;\n justify-content: space-between;\n margin: 0 auto;\n position: sticky;\n z-index: 99;\n background-color: white;\n top: 0;\n left: 0;\n"]))),xe=C.default.div(he||(he=e.__makeTemplateObject(["\n display: inline-flex;\n flex: 1;\n justify-content: flex-end;\n cursor: pointer;\n text-decoration: underline;\n"],["\n display: inline-flex;\n flex: 1;\n justify-content: flex-end;\n cursor: pointer;\n text-decoration: underline;\n"]))),be=C.default.div(fe||(fe=e.__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-left: 16px;\n cursor: pointer;\n"],["\n display: flex;\n align-items: center;\n margin-left: 16px;\n cursor: pointer;\n"]))),ye=C.default.div(ge||(ge=e.__makeTemplateObject(["\n width: 100%;\n margin-left: 24px;\n"],["\n width: 100%;\n margin-left: 24px;\n"]))),_e=C.default(r.Text)(me||(me=e.__makeTemplateObject(["\n color: ",";\n text-align: start;\n"],["\n color: ",";\n text-align: start;\n"])),a.theme.colors.secondaryDark),we=function(e){var t=e.className,n=e.onLeftClick,i=e.headingText,o=e.onRightClick,r=e.iconLeft,l=e.textRight;return g.default.createElement(ve,{className:t},g.default.createElement(be,{onClick:n},r||g.default.createElement(B,{color:a.theme.colors.gray800})),g.default.createElement(ye,null,g.default.createElement(_e,{size:"md",type:"bold"},i)),g.default.createElement(xe,{onClick:o},l&&g.default.createElement("p",null,l)))},Ee={"en-PH":3,"tl-PH":2,"id-ID":3,"vi-VN":2,"zh-TW":0},ke={isMobile:!1,isDebug:!1,navigateTo:null,geoLocationPermission:"unset",geoLocationCoordinates:null,focused:"none",searchLocationKeywords:"",searchKeywords:"",selectedLocation:null,defaultCity:null,initialCities:[],cities:[],searchResults:[],initialSearchResults:[],isLoadingCities:!1,isLoadingSearchResults:!1,isMobileModalOpened:!1,initialSelectedCity:null,autoCompleteDisabled:!1,inputSearchPlaceholder:"",locale:"vi-VN"};function Le(t){var n=t.selectedLocation,a=t.searchLocationKeywords;return n&&a!==n.name?e.__assign(e.__assign({},t),{searchLocationKeywords:n.name}):t}function Se(t,a){var i;switch(t.isDebug&&console.log("bookingSearchBar",{action:a,state:t}),a.type){case Ce.NavigateTo:return e.__assign(e.__assign({},t),{navigateTo:a.payload,focused:"none",isMobileModalOpened:!1});case Ce.ClickOutsideInputLocation:return t.isMobile||"location"!==t.focused?t:Le(e.__assign(e.__assign({},t),{focused:"none"}));case Ce.ClickOutsideInputSearch:return t.isMobile||"search"!==t.focused?t:e.__assign(e.__assign({},t),{focused:"none"});case Ce.FocusInputLocation:var o=e.__assign(e.__assign({},t),{focused:"location"});return(null===(i=t.selectedLocation)||void 0===i?void 0:i.id)===n.ID_OPTION_CURRENT_LOCATION&&(o.searchLocationKeywords=""),o;case Ce.FocusInputSearch:var r=e.__assign(e.__assign({},t),{focused:"search"});return t.isMobile?Le(r):r;case Ce.ChangeInputLocation:return e.__assign(e.__assign({},t),{searchLocationKeywords:a.payload});case Ce.ChangeInputSearch:var l=a.payload;return e.__assign(e.__assign({},t),{searchKeywords:l,isLoadingSearchResults:l.trim().length>Ee[t.locale]});case Ce.SelectCurrentLocation:return e.__assign(e.__assign({},t),{focused:"none",selectedLocation:a.payload,searchLocationKeywords:a.payload.name});case Ce.ClearInputLocation:return e.__assign(e.__assign({},t),{focused:"location",cities:t.initialCities,searchLocationKeywords:""});case Ce.ClearInputSearch:return e.__assign(e.__assign({},t),{focused:"search",searchKeywords:""});case Ce.SelectLocation:return e.__assign(e.__assign({},t),{focused:"none",selectedLocation:a.payload,searchLocationKeywords:a.payload.name});case Ce.SelectSearchResult:return e.__assign(e.__assign({},t),{searchKeywords:a.payload.name,isMobileModalOpened:!1,focused:"none",navigateTo:a.payload.url});case Ce.FetchCitiesStart:return e.__assign(e.__assign({},t),{isLoadingCities:!0});case Ce.FetchCitiesFinish:return e.__assign(e.__assign({},t),{isLoadingCities:!1});case Ce.FetchSearchResultsStart:return e.__assign(e.__assign({},t),{isLoadingSearchResults:!0});case Ce.FetchSearchResultsFinish:return e.__assign(e.__assign({},t),{isLoadingSearchResults:!1});case Ce.FetchSearchResultsComplete:var s=e.__assign(e.__assign({},t),{searchResults:a.payload});return 0===t.initialSearchResults.length&&(s.initialSearchResults=a.payload),s;case Ce.FetchCitiesByGeoIpComplete:var c=a.payload.cities,u=a.payload.default;(c=c.filter((function(e){return e.id!==u.id}))).unshift(u),t.initialSelectedCity&&!c.find((function(e){return e.id===t.initialSelectedCity.id}))&&c.unshift(t.initialSelectedCity);var d=e.__assign(e.__assign({},t),{defaultCity:u,initialCities:c,cities:c});return"denied"!==t.geoLocationPermission||t.initialSelectedCity||(d.selectedLocation=u,d.searchLocationKeywords=u.name),d;case Ce.FetchCitiesByKeywordComplete:return e.__assign(e.__assign({},t),{cities:a.payload});case Ce.DisplayInitialCities:return e.__assign(e.__assign({},t),{cities:t.initialCities});case Ce.DisplayInitialSearchResults:return e.__assign(e.__assign({},t),{searchResults:t.initialSearchResults,isLoadingSearchResults:!1});case Ce.GrantGeoLocationPermission:return e.__assign(e.__assign({},t),{geoLocationPermission:"granted",geoLocationCoordinates:a.payload});case Ce.DenyGeoLocationPermission:return e.__assign(e.__assign({},t),{geoLocationPermission:"denied",geoLocationCoordinates:null});case Ce.OpenMobileModal:return e.__assign(e.__assign({},t),{isMobileModalOpened:!0});case Ce.CloseMobileModal:return e.__assign(e.__assign({},t),{isMobileModalOpened:!1});case Ce.UpdateInitialSearchValue:return e.__assign(e.__assign({},t),{searchKeywords:a.payload});case Ce.SetInputSearchPlaceholder:return e.__assign(e.__assign({},t),{inputSearchPlaceholder:a.payload});default:return t}}!function(e){e.NavigateTo="navigate to url",e.ClickOutsideInputLocation="click outside input location",e.ClickOutsideInputSearch="click outside input search",e.SelectCurrentLocation="select current location",e.FocusInputLocation="focus input location",e.FocusInputSearch="focus input search",e.ChangeInputLocation="change input location",e.ChangeInputSearch="change input search",e.ClearInputLocation="clear input location",e.ClearInputSearch="clear input search",e.SelectLocation="select location",e.FetchCitiesStart="fetch cities start",e.FetchCitiesFinish="fetch cities finish",e.FetchSearchResultsStart="fetch search results start",e.FetchSearchResultsComplete="fetch search results complete",e.FetchSearchResultsFinish="fetch search results finish",e.FetchCitiesByGeoIpComplete="fetch cities by geo IP finish",e.FetchCitiesByKeywordComplete="fetch cities by keyword finish",e.DisplayInitialCities="display initial cities",e.DisplayInitialSearchResults="display initial search results",e.GrantGeoLocationPermission="grant geolocation permission",e.DenyGeoLocationPermission="deny geolocation permission",e.OpenMobileModal="open mobile modal",e.CloseMobileModal="close mobile modal",e.UpdateInitialSearchValue="update initial search value",e.SelectSearchResult="select search result",e.SetInputSearchPlaceholder="set input search placeholder"}(Ce||(Ce={}));var Te,Oe,Ie,Me,Re,Ae,Ne,Pe=function(){return g.default.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18"},g.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.97887 8.15493C2.97887 5.29627 5.29627 2.97887 8.15493 2.97887C11.0136 2.97887 13.331 5.29627 13.331 8.15493C13.331 11.0136 11.0136 13.331 8.15493 13.331C5.29627 13.331 2.97887 11.0136 2.97887 8.15493ZM8.15493 1.5C4.47951 1.5 1.5 4.47951 1.5 8.15493C1.5 11.8303 4.47951 14.8099 8.15493 14.8099C9.72624 14.8099 11.1704 14.2653 12.3089 13.3546L15.2377 16.2834C15.5265 16.5722 15.9947 16.5722 16.2834 16.2834C16.5722 15.9947 16.5722 15.5265 16.2834 15.2377L13.3546 12.3089C14.2653 11.1704 14.8099 9.72624 14.8099 8.15493C14.8099 4.47951 11.8303 1.5 8.15493 1.5Z",fill:"white"}))},Fe=C.default.button(Te||(Te=e.__makeTemplateObject(["\n min-height: 100%;\n border-radius: 6px;\n background-color: ",";\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 11px;\n cursor: pointer;\n flex: 0.3;\n\n "," {\n --margin: 16px;\n min-height: 44px;\n margin: var(--margin);\n width: calc(100% - var(--margin) * 2);\n position: absolute;\n bottom: 0;\n }\n\n &:hover {\n background-color: ",";\n }\n\n &:active {\n background-color: ",";\n }\n\n &:focus-visible {\n outline: 1px solid black;\n }\n"],["\n min-height: 100%;\n border-radius: 6px;\n background-color: ",";\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 11px;\n cursor: pointer;\n flex: 0.3;\n\n "," {\n --margin: 16px;\n min-height: 44px;\n margin: var(--margin);\n width: calc(100% - var(--margin) * 2);\n position: absolute;\n bottom: 0;\n }\n\n &:hover {\n background-color: ",";\n }\n\n &:active {\n background-color: ",";\n }\n\n &:focus-visible {\n outline: 1px solid black;\n }\n"])),(function(e){return e.theme.colors.primaryBase}),a.MediaQueries.mbDown,(function(e){return e.theme.colors.primaryHover}),(function(e){return e.theme.colors.primaryActive})),ze=C.default(r.Text)(Oe||(Oe=e.__makeTemplateObject(["\n font-weight: ",";\n"],["\n font-weight: ",";\n"])),(function(e){return e.theme.sizes.fwSemiBold})),je=function(e){var t=e.onClick,n=(0,a.useTranslations().t)("booking.searchBar.searchButton");return g.default.createElement(Fe,{onClick:t,title:n},g.default.createElement(Pe,null),g.default.createElement(ze,{size:"s3",color:"white"},n))},Be=C.default.div(Ie||(Ie=e.__makeTemplateObject(["\n display: flex;\n gap: 16px;\n "," {\n flex-direction: column;\n padding: 14px;\n background-color: ",";\n\n input {\n filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.04))\n drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.06))\n drop-shadow(0px 0px 1px rgba(0, 0, 0, 0.04));\n }\n }\n\n input {\n background-color: white;\n }\n"],["\n display: flex;\n gap: 16px;\n "," {\n flex-direction: column;\n padding: 14px;\n background-color: ",";\n\n input {\n filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.04))\n drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.06))\n drop-shadow(0px 0px 1px rgba(0, 0, 0, 0.04));\n }\n }\n\n input {\n background-color: white;\n }\n"])),a.MediaQueries.mbDown,a.theme.colors.blue50),De=C.default.div(Me||(Me=e.__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"]))),He=C.default(De)(Re||(Re=e.__makeTemplateObject(["\n flex: 1;\n"],["\n flex: 1;\n"]))),Ve=C.default(De)(Ae||(Ae=e.__makeTemplateObject(["\n flex: 2;\n"],["\n flex: 2;\n"]))),Ke=C.default((function(e){var t=e.className,n=e.color;return g.default.createElement("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.default.createElement("rect",{x:"4",y:"4",width:"16",height:"16",rx:"8",fill:"white"}),g.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM8.29289 8.29289C8.68342 7.90237 9.31658 7.90237 9.70711 8.29289L12 10.5858L14.2929 8.29289C14.6834 7.90237 15.3166 7.90237 15.7071 8.29289C16.0976 8.68342 16.0976 9.31658 15.7071 9.70711L13.4142 12L15.7071 14.2929C16.0976 14.6834 16.0976 15.3166 15.7071 15.7071C15.3166 16.0976 14.6834 16.0976 14.2929 15.7071L12 13.4142L9.70711 15.7071C9.31658 16.0976 8.68342 16.0976 8.29289 15.7071C7.90237 15.3166 7.90237 14.6834 8.29289 14.2929L10.5858 12L8.29289 9.70711C7.90237 9.31658 7.90237 8.68342 8.29289 8.29289Z",fill:n||"currentColor"}))}))(Ne||(Ne=e.__makeTemplateObject(["\n display: none;\n &.shown {\n display: block;\n }\n"],["\n display: none;\n &.shown {\n display: block;\n }\n"])));function Ze(e){var i=e.isMobile,o=e.state,r=e.dispatch,l=e.debouncedFetchCitiesByKeyword,s=e.debouncedFetchSearchResults,c=e.focusLocationInput,u=e.focusSearchInput,d=e.renderLocationResults,h=e.renderSearchResults,f=e.locationTrackingAttributes,m=e.trackingAttributes,C=e.onSearch,v=e.initalSearchValue,x=t.useRef(null),b=t.useRef(null),y=o.focused,_=o.searchLocationKeywords,w=o.geoLocationPermission,E=o.selectedLocation,k=o.searchKeywords,L=o.inputSearchPlaceholder,S=a.useTranslations().t;se({wrapperRef:b,disabled:!!L}),p.useOutsideClick(x,(function(){r({type:Ce.ClickOutsideInputLocation})})),p.useOutsideClick(b,(function(){r({type:Ce.ClickOutsideInputSearch})}));var T=t.useMemo((function(){return"granted"===w&&(null==E?void 0:E.id)===n.ID_OPTION_CURRENT_LOCATION?a.theme.colors.primaryBase:a.theme.colors.gray400}),[w,E]),O=t.useCallback((function(e){r({type:Ce.ChangeInputSearch,payload:e}),"function"!=typeof C&&(e.trim().length>Ee[o.locale]||v?s(e.trim(),o):(s.cancel(),r({type:Ce.DisplayInitialSearchResults})))}),[r,o]),I=t.useCallback((function(e){r({type:Ce.ChangeInputLocation,payload:e}),e.trim().length>Ee[o.locale]?l(e.trim()):(l.cancel(),r({type:Ce.DisplayInitialCities}))}),[l,r]);return g.default.createElement(Be,null,g.default.createElement(He,{ref:x},g.default.createElement(z,{inputClassName:"location"===y?"focused":void 0,placeholder:S("booking.searchBar.locationPlaceholder"),autoComplete:"off",name:"search-location",displayIcon:g.default.createElement(D,{className:"location-pin-icon",color:T}),actionIcon:g.default.createElement(Ke,{color:a.theme.colors.gray300,className:""!==_?"shown":""}),onActionClick:function(){r({type:Ce.ClearInputLocation}),l.cancel(),c()},value:_,onChange:I,onFocus:function(){return r({type:Ce.FocusInputLocation})},size:"md",trackingAttributes:f}),!i&&d()),g.default.createElement(Ve,{ref:b},g.default.createElement(z,{placeholder:L||S("booking.searchBar.searchInput.placeholder"),autoComplete:"off",name:"search-results",actionIcon:g.default.createElement(Ke,{color:a.theme.colors.gray300,className:""!==k?"shown":""}),onActionClick:function(){r({type:Ce.ClearInputSearch}),s.cancel(),s("",o),u()},value:k,onChange:O,onFocus:function(){return r({type:Ce.FocusInputSearch})},inputClassName:"search"===y?"focused":void 0,size:"md",trackingAttributes:m,onKeyPress:function(e){o.autoCompleteDisabled&&"Enter"===e.key&&C&&C({cityId:o.selectedLocation.id,keyword:k})},enterKeyHint:o.autoCompleteDisabled?"search":void 0}),!i&&h()),o.autoCompleteDisabled&&!o.isMobile&&g.default.createElement(je,{onClick:function(){C({cityId:o.selectedLocation.id,keyword:k})}}))}var Ge,Ue,qe,Qe,We,Ye,Je,Xe,$e,et,tt,nt,at,it,ot=C.default.li(Ge||(Ge=e.__makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: var(--rowGap);\n cursor: pointer;\n"],["\n display: flex;\n align-items: center;\n gap: var(--rowGap);\n cursor: pointer;\n"]))),rt=C.default.div(Ue||(Ue=e.__makeTemplateObject(["\n --wrapper-size: var(--graphicSize);\n border-radius: calc(var(--wrapper-size) / 2);\n background-color: var(--neutral50);\n width: var(--wrapper-size);\n height: var(--wrapper-size);\n aspect-ratio: 1/1;\n overflow: hidden;\n\n ","\n\n img {\n width: var(--graphicSize);\n height: var(--graphicSize);\n ","\n }\n\n &:focus-visible {\n outline: 1px solid ",";\n }\n"],["\n --wrapper-size: var(--graphicSize);\n border-radius: calc(var(--wrapper-size) / 2);\n background-color: var(--neutral50);\n width: var(--wrapper-size);\n height: var(--wrapper-size);\n aspect-ratio: 1/1;\n overflow: hidden;\n\n ","\n\n img {\n width: var(--graphicSize);\n height: var(--graphicSize);\n ","\n }\n\n &:focus-visible {\n outline: 1px solid ",";\n }\n"])),(function(e){var t=e.type;return t&&"doctors"===t&&"\n border-radius: calc(var(--graphicSize) / 2);\n "}),(function(e){var t=e.type;return t&&"doctors"===t?"\n\n object-fit: cover; \n ":"\n object-fit: contain;\n "}),a.theme.colors.gray600),lt=C.default(r.Text)(qe||(qe=e.__makeTemplateObject(["\n line-height: 22px;\n letter-spacing: -0.2px;\n\n "," {\n &[data-size='p3'] {\n font-size: 14px;\n }\n }\n"],["\n line-height: 22px;\n letter-spacing: -0.2px;\n\n "," {\n &[data-size='p3'] {\n font-size: 14px;\n }\n }\n"])),a.MediaQueries.tdUp),st=C.default.figure(Qe||(Qe=e.__makeTemplateObject(["\n max-width: var(--graphicSize);\n min-width: var(--graphicSize);\n"],["\n max-width: var(--graphicSize);\n min-width: var(--graphicSize);\n"]))),ct=C.default.svg(We||(We=e.__makeTemplateObject(["\n margin: 0 auto;\n display: block;\n"],["\n margin: 0 auto;\n display: block;\n"]))),ut=C.default.div(Ye||(Ye=e.__makeTemplateObject(["\n display: grid;\n place-items: center;\n"],["\n display: grid;\n place-items: center;\n"]))),dt={doctors:function(e){var t=e.width,n=e.height;return g.default.createElement("svg",{width:t||32,height:n||32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.default.createElement("g",{clipPath:"url(#clip0_14712_400114)"},g.default.createElement("rect",{width:"32",height:"32",rx:"16",fill:"#E4E8EC"}),g.default.createElement("path",{d:"M22.065 9.58305C22.1108 9.80952 22.1431 10.0396 22.1614 10.2722C22.3769 13.0522 22.5858 16.1276 22.5727 17.618C22.5306 20.5688 19.708 21.1325 19.4564 21.1769L19.4495 21.5357L19.5228 23.9014C20.8688 23.9341 22.203 24.1759 23.4772 24.6196C24.5264 24.9739 25.4827 25.5591 26.2757 26.332C27.0688 27.105 27.6783 28.0461 28.0594 29.0858L31.9886 39.2068C31.91 39.3048 30.6939 39.6356 29.4888 39.944C30.1695 42.3315 30.4582 44.8142 30.3432 47.2953C30.2991 48.2666 30.1816 49.264 29.7245 50.1211C29.4508 50.6342 29.0319 51.0912 28.5296 51.3753C28.5099 51.4347 28.4864 51.4928 28.4593 51.5495C28.4293 51.6146 28.3908 51.6756 28.3448 51.7307C28.3293 51.7772 28.3232 51.8406 28.3162 51.9135C28.3004 52.0779 28.2799 52.2909 28.1362 52.4685C28.001 52.6373 27.8519 52.7945 27.6905 52.9386C27.6905 52.9386 27.092 52.9667 26.4133 52.9845L26.458 58.4088H5.7492L6.30965 52.9523L5.66093 53.1637C5.07664 53.3528 4.45628 53.4028 3.84925 53.3099C3.24222 53.2169 2.66526 52.9835 2.1643 52.6283C1.61489 52.2388 1.17445 51.715 0.884966 51.1068C0.595484 50.4987 0.46662 49.8266 0.510669 49.1545L0.644528 47.1369L1.41503 38.3366L1.81323 38.4135L-0.914307 37.8437L-0.402886 36.5663C-0.407359 36.5645 -0.411803 36.5627 -0.416214 36.5608C-0.410804 36.56 -0.40538 36.5594 -0.399946 36.5589L2.05995 30.4146C3.00034 28.0825 4.7421 26.1624 6.97187 24.9999C8.56171 24.176 10.3028 23.6861 12.0882 23.5597L11.788 16.5865C11.1882 16.6507 10.0095 16.5266 9.96087 14.954C9.91229 13.3824 11.0457 13.3171 11.6507 13.3961L11.6445 13.2523C11.5785 12.8433 11.5088 12.439 11.4577 12.2132C11.3782 11.8628 11.2611 11.4953 11.1419 11.1207C10.8794 10.2967 10.6061 9.43855 10.697 8.65293C10.697 8.65293 10.6909 8.00438 11.4565 7.24044C11.3707 6.86644 11.3686 6.47786 11.4507 6.10258C11.5366 5.70965 11.7125 5.34199 11.9645 5.02848C12.2165 4.71497 12.5377 4.46414 12.9029 4.29569C13.2682 4.12725 13.6675 4.04577 14.0696 4.05766C14.2277 4.06393 14.3849 4.08493 14.5418 4.10589C14.7932 4.13945 15.0439 4.17294 15.2971 4.14581C15.7708 4.09409 16.177 3.83884 16.5862 3.58167C16.8357 3.42492 17.0863 3.26745 17.354 3.15494C17.9119 2.93744 18.5266 2.91281 19.1002 3.08497C19.6738 3.25713 20.1733 3.61619 20.5192 4.105C20.5943 4.21716 20.6621 4.33678 20.7298 4.45631C20.9035 4.76299 21.077 5.06915 21.373 5.24769C21.5927 5.38236 21.8482 5.42658 22.1057 5.47114C22.2633 5.49842 22.4216 5.52582 22.5728 5.57417C23.0267 5.71015 23.3999 6.0411 23.6319 6.45436C23.6327 6.40753 23.6317 6.36062 23.629 6.31374C23.6502 6.3657 23.6623 6.42092 23.6649 6.47698C23.6661 6.49165 23.667 6.50632 23.6677 6.521C23.8246 6.82609 23.9058 7.17114 23.8885 7.51347C23.8544 7.93447 23.7053 8.33801 23.4574 8.68001C23.2096 9.02201 22.8725 9.28933 22.483 9.45278C22.3469 9.50712 22.2071 9.55061 22.065 9.58305Z",fill:"white"})),g.default.createElement("defs",null,g.default.createElement("clipPath",{id:"clip0_14712_400114"},g.default.createElement("rect",{width:"32",height:"32",rx:"16",fill:"white"}))))},services:function(e){var t=e.width,n=e.height;return g.default.createElement("svg",{width:t||30,height:n||30,viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.default.createElement("circle",{cx:"15",cy:"15",r:"15",fill:"#F7F9FC"}),g.default.createElement("path",{d:"M14.9998 6.66663C12.2752 6.66663 9.85335 7.97848 8.33317 9.99996H10.5988C11.8 8.94527 13.3625 8.33329 14.9998 8.33329C16.6372 8.33329 18.1997 8.94527 19.4009 9.99996H21.6665C20.1463 7.97848 17.7244 6.66663 14.9998 6.66663ZM7.7863 10.8333C7.07666 13.0403 6.6665 15.5989 6.6665 18.3333C6.6665 20.0846 6.82601 21.7675 7.13525 23.3333H22.8644C23.1737 21.7675 23.3332 20.0846 23.3332 18.3333C23.3332 15.5989 22.923 13.0403 22.2134 10.8333H7.7863ZM14.9998 13.3333C17.3013 13.3333 19.1665 15.1985 19.1665 17.5C19.1665 19.8014 17.3013 21.6666 14.9998 21.6666C12.6984 21.6666 10.8332 19.8014 10.8332 17.5C10.8332 15.1985 12.6984 13.3333 14.9998 13.3333ZM14.1665 15V16.6666H12.4998V18.3333H14.1665V20H15.8332V18.3333H17.4998V16.6666H15.8332V15H14.1665Z",fill:"#BFC5CC"}))}},pt=function(e){var n=e.type,i=e.item,o=e.imageUrl,r=e.onClickItem,l=t.useMemo((function(){var e=dt[n]||K;return g.default.createElement(e,{width:32,height:"services"===n?32:24})}),[n]);return g.default.createElement(ot,{onClick:function(){return r&&r(i)},onKeyDown:function(e){"Enter"!==e.key&&"Space"!==e.key||r&&r(i)},tabIndex:0,role:"button"},g.default.createElement(st,null,"hospitals"===n?g.default.createElement(ct,{width:"12",height:"16",viewBox:"0 0 12 16"},g.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 5.94873C0.75 3.04623 3.0975 0.69873 6 0.69873C8.9025 0.69873 11.25 3.04623 11.25 5.94873C11.25 9.07623 7.935 13.3887 6.5775 15.0312C6.2775 15.3912 5.73 15.3912 5.43 15.0312C4.065 13.3887 0.75 9.07623 0.75 5.94873ZM4.125 5.94873C4.125 6.98373 4.965 7.82373 6 7.82373C7.035 7.82373 7.875 6.98373 7.875 5.94873C7.875 4.91373 7.035 4.07373 6 4.07373C4.965 4.07373 4.125 4.91373 4.125 5.94873Z",fill:"#9AA2AC"})):g.default.createElement(rt,{type:n},o?g.default.createElement("img",{src:o,width:32,height:"services"===n?32:24}):l)),g.default.createElement(lt,{color:a.theme.colors.gray800,size:"p3"},i.name))},ht=function(){return g.default.createElement("svg",{width:"14",height:"18",viewBox:"0 0 14 18"},g.default.createElement("path",{d:"M7.00004 0.666992C5.29757 0.666992 3.64067 0.813476 2.52087 1.03158C1.73311 1.18457 1.16671 1.86816 1.16671 2.6722V4.83366C1.16671 5.29264 1.54106 5.66699 2.00004 5.66699H12C12.459 5.66699 12.8334 5.29264 12.8334 4.83366V2.69824C12.8334 1.89421 12.267 1.21061 11.4792 1.05762C10.3562 0.839518 8.69275 0.666992 7.00004 0.666992ZM6.16671 1.50033H7.83337V2.33366H8.66671V4.00033H7.83337V4.83366H6.16671V4.00033H5.33337V2.33366H6.16671V1.50033ZM1.42712 6.50033C1.3197 6.89421 1.24158 7.32389 1.19275 7.77637C1.14718 8.18001 1.05603 9.25423 1.06254 9.36491C0.603556 9.72624 0.333374 10.2861 0.333374 10.9014C0.333374 11.8356 0.977906 12.6364 1.84379 12.8285C2.74548 15.0192 4.55212 17.3337 7.00004 17.3337C9.44796 17.3337 11.2546 14.9964 12.1563 12.8024C13.0222 12.6136 13.6667 11.8356 13.6667 10.9014C13.6667 10.2861 13.3965 9.72624 12.9375 9.36491C12.9441 9.25423 12.8562 8.16048 12.8073 7.75033C12.7552 7.30436 12.6804 6.89095 12.573 6.50033H5.35942C6.52804 8.20606 9.27543 7.18717 11.0365 7.62012C11.5736 8.79199 11.1667 10.4326 11.1667 10.4326L11.8177 10.641C11.9121 10.6702 12 10.7549 12 10.9014C12 11.0576 11.8861 11.1943 11.6875 11.1878L11.0105 11.0837L10.7761 11.7347C9.96554 14.0492 8.4128 15.667 7.00004 15.667C5.58728 15.667 4.03455 14.0492 3.224 11.7347L2.96358 11.0837L2.26046 11.1878C2.11723 11.1878 2.00004 11.0576 2.00004 10.9014C2.00004 10.7549 2.08793 10.6702 2.18233 10.641L2.83337 10.4326C2.73246 10.5531 2.4102 8.7041 2.83337 8.03678C3.59184 7.5127 4.2266 7.87728 5.12504 6.50033H1.42712ZM5.17712 9.05241C4.57166 9.05241 4.08337 9.55371 4.08337 10.1722C4.08337 10.7907 4.57166 11.292 5.17712 11.292C5.78259 11.292 6.27087 10.7907 6.27087 10.1722C6.27087 9.55371 5.78259 9.05241 5.17712 9.05241ZM8.82296 9.05241C8.21749 9.05241 7.72921 9.55371 7.72921 10.1722C7.72921 10.7907 8.21749 11.292 8.82296 11.292C9.42843 11.292 9.91671 10.7907 9.91671 10.1722C9.91671 9.55371 9.42843 9.05241 8.82296 9.05241Z",fill:"#9AA2AC"}))},ft=function(){return g.default.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18"},g.default.createElement("path",{d:"M8.99996 0.666992C6.27535 0.666992 3.85348 1.97884 2.33329 4.00033H4.59892C5.80009 2.94564 7.36259 2.33366 8.99996 2.33366C10.6373 2.33366 12.1998 2.94564 13.401 4.00033H15.6666C14.1464 1.97884 11.7246 0.666992 8.99996 0.666992ZM1.78642 4.83366C1.07678 7.04069 0.666626 9.59928 0.666626 12.3337C0.666626 14.085 0.826131 15.7679 1.13538 17.3337H16.8645C17.1738 15.7679 17.3333 14.085 17.3333 12.3337C17.3333 9.59928 16.9231 7.04069 16.2135 4.83366H1.78642ZM8.99996 7.33366C11.3014 7.33366 13.1666 9.19889 13.1666 11.5003C13.1666 13.8018 11.3014 15.667 8.99996 15.667C6.69853 15.667 4.83329 13.8018 4.83329 11.5003C4.83329 9.19889 6.69853 7.33366 8.99996 7.33366ZM8.16663 9.00033V10.667H6.49996V12.3337H8.16663V14.0003H9.83329V12.3337H11.5V10.667H9.83329V9.00033H8.16663Z",fill:"#9AA2AC"}))},gt=function(){return g.default.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17"},g.default.createElement("path",{d:"M8 0.666992L0.5 5.63533V14.8337C0.5 15.7545 1.24583 16.5003 2.16667 16.5003H13.8333C14.7542 16.5003 15.5 15.7545 15.5 14.8337V5.63533L8 0.666992ZM11.3333 10.667H8.83333V13.167H7.16667V10.667H4.66667V9.00033H7.16667V6.50033H8.83333V9.00033H11.3333V10.667Z",fill:"#9AA2AC"}))},mt=function(){return g.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},g.default.createElement("path",{d:"M3.83333 0.5C2.94928 0.5 2.10143 0.851189 1.47631 1.47631C0.851189 2.10143 0.5 2.94928 0.5 3.83333C0.5 4.71739 0.851189 5.56523 1.47631 6.19036C2.10143 6.81548 2.94928 7.16667 3.83333 7.16667C4.71739 7.16667 5.56523 6.81548 6.19036 6.19036C6.81548 5.56523 7.16667 4.71739 7.16667 3.83333C7.16667 2.94928 6.81548 2.10143 6.19036 1.47631C5.56523 0.851189 4.71739 0.5 3.83333 0.5V0.5ZM10.5 0.5C9.57917 0.5 8.83333 1.24583 8.83333 2.16667V5.5C8.83333 6.42083 9.57917 7.16667 10.5 7.16667H13.8333C14.7542 7.16667 15.5 6.42083 15.5 5.5V2.16667C15.5 1.24583 14.7542 0.5 13.8333 0.5H10.5ZM3.83333 8.83333C2.94928 8.83333 2.10143 9.18452 1.47631 9.80964C0.851189 10.4348 0.5 11.2826 0.5 12.1667C0.5 13.0507 0.851189 13.8986 1.47631 14.5237C2.10143 15.1488 2.94928 15.5 3.83333 15.5C4.71739 15.5 5.56523 15.1488 6.19036 14.5237C6.81548 13.8986 7.16667 13.0507 7.16667 12.1667C7.16667 11.2826 6.81548 10.4348 6.19036 9.80964C5.56523 9.18452 4.71739 8.83333 3.83333 8.83333V8.83333ZM12.1667 8.83333C11.2826 8.83333 10.4348 9.18452 9.80964 9.80964C9.18452 10.4348 8.83333 11.2826 8.83333 12.1667C8.83333 13.0507 9.18452 13.8986 9.80964 14.5237C10.4348 15.1488 11.2826 15.5 12.1667 15.5C13.0507 15.5 13.8986 15.1488 14.5237 14.5237C15.1488 13.8986 15.5 13.0507 15.5 12.1667C15.5 11.2826 15.1488 10.4348 14.5237 9.80964C13.8986 9.18452 13.0507 8.83333 12.1667 8.83333V8.83333Z",fill:"#9AA2AC"}))},Ct=C.default.header(Je||(Je=e.__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n padding: 12px 24px;\n background-color: ",";\n box-shadow: inset 0px 1px 0px #e4e8ec;\n"],["\n display: flex;\n justify-content: space-between;\n padding: 12px 24px;\n background-color: ",";\n box-shadow: inset 0px 1px 0px #e4e8ec;\n"])),a.theme.colors.neutral50),vt=C.default.div(Xe||(Xe=e.__makeTemplateObject(["\n display: grid;\n flex: 2;\n align-items: center;\n gap: 16px;\n grid-template-columns: 16px 1fr;\n"],["\n display: grid;\n flex: 2;\n align-items: center;\n gap: 16px;\n grid-template-columns: 16px 1fr;\n"]))),xt=C.default.p($e||($e=e.__makeTemplateObject(["\n color: ",";\n font-size: 14px;\n font-weight: ",";\n letter-spacing: -0.2px;\n line-height: 22px;\n"],["\n color: ",";\n font-size: 14px;\n font-weight: ",";\n letter-spacing: -0.2px;\n line-height: 22px;\n"])),a.theme.colors.neutral800,a.theme.sizes.fwSemiBold),bt=C.default.button(et||(et=e.__makeTemplateObject(["\n flex: 1;\n cursor: pointer;\n text-align: end;\n"],["\n flex: 1;\n cursor: pointer;\n text-align: end;\n"]))),yt=C.default.section(tt||(tt=e.__makeTemplateObject(["\n padding: 12px 16px;\n --rowGap: 16px;\n --graphicSize: 32px;\n\n "," {\n --rowGap: 8px;\n }\n"],["\n padding: 12px 16px;\n --rowGap: 16px;\n --graphicSize: 32px;\n\n "," {\n --rowGap: 8px;\n }\n"])),a.MediaQueries.tdUp),_t=C.default.ul(nt||(nt=e.__makeTemplateObject(["\n --gap: 16px;\n "," {\n --gap: 8px;\n }\n\n display: grid;\n overflow: hidden;\n gap: var(--gap);\n transition: max-height 0.8s ease-out;\n\n ","\n\n ","\n\n@media (prefers-reduced-motion) {\n transition: none;\n }\n\n "," {\n grid-template-columns: 1fr 1fr;\n } ;\n"],["\n --gap: 16px;\n "," {\n --gap: 8px;\n }\n\n display: grid;\n overflow: hidden;\n gap: var(--gap);\n transition: max-height 0.8s ease-out;\n\n ","\n\n ","\n\n@media (prefers-reduced-motion) {\n transition: none;\n }\n\n "," {\n grid-template-columns: 1fr 1fr;\n } ;\n"])),a.MediaQueries.tdUp,(function(e){return e.isMore&&"\n height: auto;\n max-height: 0;\n margin-top: var(--gap);\n "}),(function(e){return e.isShown&&"\n max-height: 600px;\n "}),a.MediaQueries.tdUp),wt=C.default(r.Text)(at||(at=e.__makeTemplateObject(["\n margin-top: 12px;\n margin-bottom: 8px;\n cursor: pointer;\n text-align: start;\n text-transform: capitalize;\n"],["\n margin-top: 12px;\n margin-bottom: 8px;\n cursor: pointer;\n text-align: start;\n text-transform: capitalize;\n"]))),Et=function(e){var i=e.type,o=e.data,l=e.state,s=e.dispatch,c=e.itemsToShow,u=e.itemsToShowDesktop,d=e.isMobile,p=e.isLoading,h=e.keyword,f=t.useState(!1),m=f[0],C=f[1],x=a.useTranslations(),b=x.t,y=x.locale,_=l.selectedLocation,w=l.searchKeywords,E=t.useMemo((function(){return n.LOCALIZED_SLUGS[y]}),[y]),k=t.useMemo((function(){return{doctors:{name:b("booking.searchPopup.doctors"),icon:g.default.createElement(ht,null),slug:E.DOCTOR},services:{name:b("booking.searchPopup.services"),icon:g.default.createElement(ft,null),slug:E.SERVICE},hospitals:{name:b("booking.searchPopup.hospitals"),icon:g.default.createElement(gt,null),slug:E.HOSPITAL},specialties:{name:b("booking.searchPopup.specialties"),icon:g.default.createElement(mt,null),slug:E.SPECIALTIES}}}),[i,E]),L=t.useMemo((function(){return k[i].slug}),[k]),S=d?c:u;function T(e){var t="";switch(i){case"specialties":t="/".concat(_.slug,"/").concat(k.doctors.slug,"/").concat(e.slug);break;case"services":t="/".concat(_.slug,"/").concat(L,"/").concat(e.slug);break;case"doctors":case"hospitals":t="/".concat(L,"/").concat(e.slug,"-").concat(e.id)}t&&s({type:Ce.SelectSearchResult,payload:{name:e.name,url:t}})}function O(e){return g.default.createElement(pt,{key:e.id,item:e,type:i,imageUrl:e.logo||e.avatar||e.thumbnail,onClickItem:T})}return g.default.createElement("section",null,g.default.createElement(Ct,null,g.default.createElement(vt,null,k[i].icon,g.default.createElement(xt,null,k[i].name)),h.trim().length<=Ee[y]&&g.default.createElement(bt,{onClick:function(){var e="";switch(i){case"specialties":e="/".concat(L);break;case"services":case"doctors":case"hospitals":e="/".concat(_.slug,"/").concat(L)}e&&s({type:Ce.NavigateTo,payload:e})}},g.default.createElement(r.Text,{size:"p3",color:a.theme.colors.primaryBase},b("booking.searchPopup.seeAll")))),(p||o&&o.length>0)&&g.default.createElement(yt,null,g.default.createElement(_t,null,p&&Array(2).fill(void 0).map((function(e,t){return g.default.createElement(ot,{key:i+"loading"+t},g.default.createElement(st,null,g.default.createElement(ut,null,g.default.createElement(v.default,{height:14,width:"hospitals"===i?12:32,style:{maxWidth:"var(--graphicSize)",minHeight:"var(--graphicSize)"}}))),g.default.createElement(v.default,{width:120,height:24}))})),!p&&o&&o.length>0&&o.slice(0,S).map(O)),g.default.createElement(_t,{isShown:m,isMore:!0},o.slice(S,-1).map(O)),"specialties"===i&&S<o.length&&!p&&g.default.createElement("button",{onClick:function(){return C(!m)}},g.default.createElement(wt,{size:"p3",color:a.theme.colors.primaryBase},b(m?"booking.searchPopup.seeLessSpecialties":"booking.searchPopup.seeMoreSpecialties"))),"specialties"!==i&&S<o.length&&!p&&h.trim().length>Ee[y]&&g.default.createElement("button",{onClick:function(){var e=k[i].slug,t="/".concat(_.slug,"/").concat(e,"?q=").concat(w);s({type:Ce.NavigateTo,payload:t})}},g.default.createElement(wt,{size:"p3",color:a.theme.colors.primaryBase},b("booking.searchPopup.searchIn.".concat(i),{name:h})))),!p&&0===(null==o?void 0:o.length)&&g.default.createElement(yt,null,g.default.createElement(r.Text,{size:"sm",color:a.theme.colors.gray400},b("booking.searchBar.noResults"))))},kt=C.default.section(it||(it=e.__makeTemplateObject(["\n background-color: white;\n border-radius: 4px;\n position: absolute;\n width: 100%;\n z-index: 30;\n\n "," {\n box-shadow: 0px 24px 32px rgba(0, 0, 0, 0.04),\n 0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04),\n 0px 0px 1px rgba(0, 0, 0, 0.04);\n }\n"],["\n background-color: white;\n border-radius: 4px;\n position: absolute;\n width: 100%;\n z-index: 30;\n\n "," {\n box-shadow: 0px 24px 32px rgba(0, 0, 0, 0.04),\n 0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04),\n 0px 0px 1px rgba(0, 0, 0, 0.04);\n }\n"])),a.MediaQueries.tdUp),Lt=function(e){var t=e.data,n=e.state,a=e.dispatch,i=e.isMobile,o=e.isLoading,r=e.keyword;return g.default.createElement(kt,null,t&&t.map((function(e){return g.default.createElement(Et,{type:e.type,state:n,dispatch:a,itemsToShow:2,itemsToShowDesktop:4,key:e.type,data:e.results,isMobile:i,isLoading:o,keyword:r})})))},St="api/lists/cities?keyword={keyword}&country_id={countryId}&site={domain}&_nopaging={noPaging}",Tt="api/v2/search/?site={domain}&type={searchType}&keyword={keyword}&city_id={city}&latitude={lat}&longitude={lng}",Ot="api/geobyip?site={domain}&latitude={lat}&longitude={lng}",It=function(t,n,i){return b.default(t,e.__assign(e.__assign({},n),{domain:a.domainLocales[i||"en-PH"]}))};var Mt;!function(e){e[e.SPECIALTY=1]="SPECIALTY",e[e.DOCTOR=2]="DOCTOR",e[e.CLINIC=3]="CLINIC",e[e.SERVICE=4]="SERVICE"}(Mt||(Mt={}));var Rt=Object.freeze({__proto__:null,get RedirectType(){return Mt}});exports.BookingSearchBar=function(o){var r=o.isMobile,l=o.careApiDomain,s=o.geoLocationPermission,c=o.geoLocationCoordinates,u=o.initialSelectedCity,d=o.initialSearchValue,p=void 0===d?"":d,h=o.careFrontDomain,f=void 0===h?"/care":h,C=o.isDebug,v=void 0!==C&&C,x=o.askForGeolocationPermission,b=void 0!==x&&x,y=o.gaTrackingSearchBar,_=o.gaTrackingLocationSearch,w=o.autoCompleteDisabled,E=void 0!==w&&w,k=o.inputSearchPlaceholder,L=void 0===k?"":k,S=o.routerPush,T=o.onGeoLocationPermissionChange,O=o.onSearch,I=o.onChangeLocation,M=a.useTranslations(),R=M.t,z=M.locale,B=t.useRef(null),D=t.useRef(null),H=t.useState(void 0),V=H[0],K=H[1],Z=function(){var e=t.useState((function(){if("undefined"==typeof window)return"unset";if(i.getCookie(a.USER_GEOLOCATION_COORDINATES_COOKIE))return"granted";var e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),n=e[0],o=e[1],r=t.useState((function(){if("undefined"==typeof window)return null;var e=i.getCookie(a.USER_GEOLOCATION_COORDINATES_COOKIE);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=r[0],s=r[1],c=t.useCallback((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((function(e){var t={lat:"".concat(Math.round(1e7*e.coords.latitude)/1e7),lng:"".concat(Math.round(1e7*e.coords.longitude)/1e7)};i.setCookie(a.USER_GEOLOCATION_COORDINATES_COOKIE,JSON.stringify(t),0,15),s(t),o("granted")}),(function(){i.deleteCookie(a.USER_GEOLOCATION_COORDINATES_COOKIE),o("denied")}))}),[]);return t.useMemo((function(){return{geoLocationPermission:n,geoLocationCoordinates:l,requestGeoLocation:c}}),[n,l])}(),G=Z.geoLocationPermission,U=Z.geoLocationCoordinates,q=Z.requestGeoLocation,Q=t.useReducer(Se,ke,(function(t){return e.__assign(e.__assign({},t),{isDebug:v,isMobile:r,geoLocationPermission:s||G||"unset",geoLocationCoordinates:c||U||null,searchKeywords:p,initialSelectedCity:u||null,selectedLocation:u||t.selectedLocation||null,searchLocationKeywords:(null==u?void 0:u.name)||t.searchLocationKeywords,autoCompleteDisabled:E,inputSearchPlaceholder:L,locale:z})})),W=Q[0],J=Q[1],X=W.navigateTo,$=W.focused,ee=W.isLoadingCities,te=W.cities,ne=W.searchKeywords,ae=W.geoLocationPermission,ie=W.selectedLocation,oe=W.initialSelectedCity,re=W.defaultCity,le=W.searchResults,se=W.isLoadingSearchResults,ce=W.isMobileModalOpened,ue=W.inputSearchPlaceholder,pe=function(a){var i=a.dispatch,o=a.careApiDomain,r=a.locale,l=void 0===r?"vi-VN":r,s=t.useCallback((function(e,t){void 0===t&&(t={});var n="".concat(o).concat(e);return i({type:Ce.FetchCitiesStart}),fetch(It(n,t,l),{method:"GET"}).then((function(e){return e.json()})).then((function(e){return 1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e))})).finally((function(){return i({type:Ce.FetchCitiesFinish})}))}),[l]),c=t.useCallback((function(t){var n=t.coordinates,a={};n&&(a={lat:n.lat,lng:n.lng});var o=[s(Ot,a)];return"zh-TW"===l&&o.push(s(St,{noPaging:1})),Promise.all(o).then((function(t){var n=t[0],a=t[1],o=e.__assign({},n);if(a){var r=o.cities.map((function(e){return e.id}));o.cities=o.cities.concat(a.cities.filter((function(e){return!r.includes(e.id)})))}i({type:Ce.FetchCitiesByGeoIpComplete,payload:o})})).catch((function(e){return console.error("error loading cities by location",e)}))}),[l,o,i]);return{fetchCitiesByLocation:c,fetchCitiesByKeyword:t.useCallback((function(e){return s(St,{keyword:e}).then((function(e){i({type:Ce.FetchCitiesByKeywordComplete,payload:e.cities})})).catch((function(e){return console.error("error loading cities by keyword",e)}))}),[l,o,i]),fetchSearchResults:t.useCallback((function(e,t){var a="".concat(o).concat(Tt);i({type:Ce.FetchSearchResultsStart});var r=t.defaultCity,s=t.selectedLocation,c=t.geoLocationCoordinates,u="";if(s&&r){s.id===n.ID_OPTION_CURRENT_LOCATION?c||(u=r.id):u=s.id;var d=(null==c?void 0:c.lat)||"",p=(null==c?void 0:c.lng)||"";return fetch(It(a,{domain:o,searchType:"global",keyword:e.trim().length>Ee[l]?e.trim():"",city:u===n.ID_OPTION_CURRENT_LOCATION?"":u,lat:d,lng:p},l),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((function(e){return e.json()})).then((function(e){return 1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e)})).then((function(e){return i({type:Ce.FetchSearchResultsComplete,payload:e})})).catch((function(e){console.log("error loading search results",{url:a,error:e})})).finally((function(){return i({type:Ce.FetchSearchResultsFinish})}))}i({type:Ce.FetchSearchResultsFinish})}),[l,o,i])}}({dispatch:J,locale:z,careApiDomain:l}),he=pe.fetchCitiesByLocation,fe=pe.fetchCitiesByKeyword,ge=pe.fetchSearchResults,me=t.useMemo((function(){var e;return{id:n.ID_OPTION_CURRENT_LOCATION,name:R("booking.searchBar.currentLocation"),slug:null===(e=n.LOCALIZED_SLUGS[z])||void 0===e?void 0:e.CURRENT}}),[R,z]),ve=t.useMemo((function(){return m.default(fe,400)}),[fe]),xe=t.useMemo((function(){return m.default(ge,400)}),[ge]);t.useEffect((function(){""!==p&&p!==W.searchKeywords&&J({type:Ce.UpdateInitialSearchValue,payload:p})}),[p]),t.useEffect((function(){b&&(null==ie?void 0:ie.id)===n.ID_OPTION_CURRENT_LOCATION&&"unset"===ae&&q()}),[b,ie,ae]),t.useEffect((function(){s||ae===G||("granted"===G&&U?J({type:Ce.GrantGeoLocationPermission,payload:U}):"denied"===G&&J({type:Ce.DenyGeoLocationPermission}))}),[ae,G,U,s]),t.useEffect((function(){X&&(S?S(X):window.location.href="".concat(f).concat(X))}),[X]);var be=t.useCallback((function(){J({type:Ce.SelectCurrentLocation,payload:me})}),[R,J]);t.useEffect((function(){"denied"===ae||oe||be(),T&&T(ae,W.geoLocationCoordinates),r&&"granted"===ae&&ie&&J({type:Ce.FocusInputSearch}),he({coordinates:W.geoLocationCoordinates})}),[ae]),t.useEffect((function(){ie&&re&&ge(W.searchKeywords,W)}),[ie,re]),t.useEffect((function(){L!==ue&&J({type:Ce.SetInputSearchPlaceholder,payload:L})}),[L,ue]),t.useEffect((function(){ce?document.body.classList.add("care-popup-open"):document.body.classList.remove("care-popup-open")}),[ce]);var ye=t.useCallback((function(e){J({type:Ce.SelectLocation,payload:e}),Te(),I&&I(e)}),[R,J]);function _e(){r&&"granted"!==W.geoLocationPermission?q():(be(),Te())}function Le(){var e;B.current&&(null===(e=B.current.querySelector('input[name="search-location"]'))||void 0===e||e.focus())}function Te(){var e;B.current&&(null===(e=B.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function Oe(){J({type:Ce.CloseMobileModal})}function Ie(){return"location"!==$?null:g.default.createElement(Y,{isLoading:ee,cities:te,onLocationClick:ye,onCurrentLocationClick:_e,isLocationLoading:ee,geoLocationPermission:ae,selectedLocation:ie})}function Me(){return"search"!==$?null:W.autoCompleteDisabled?r?g.default.createElement(je,{onClick:function(){O({cityId:W.selectedLocation.id,keyword:ne}),Oe()}}):null:g.default.createElement(Lt,{data:le,state:W,dispatch:J,isMobile:!1,keyword:ne,isLoading:se})}function Re(){return g.default.createElement(Ze,{isMobile:r,state:W,dispatch:J,debouncedFetchCitiesByKeyword:ve,debouncedFetchSearchResults:xe,focusLocationInput:Le,focusSearchInput:Te,renderLocationResults:Ie,renderSearchResults:Me,trackingAttributes:y,locationTrackingAttributes:_,onSearch:O,initalSearchValue:p})}return t.useEffect((function(){if(window.visualViewport){var e=function(e){var t=e.target;K(null==t?void 0:t.height)};return window.visualViewport.addEventListener("resize",e),function(){window.visualViewport.removeEventListener("resize",e)}}}),[K]),r?g.default.createElement(g.default.Fragment,null,g.default.createElement(j,null),g.default.createElement(F,{ref:D}),g.default.createElement(N,{id:"booking-search-bar",ref:B,"data-is-modal":r&&ce,style:{"--mobile-care-searchbar-height":ce&&V?"".concat(V,"px"):"100%"}},ce?g.default.createElement(g.default.Fragment,null,g.default.createElement(P,null,g.default.createElement(we,{headingText:R("booking.searchBar.searchButton"),onLeftClick:Oe}),Re()),Ie(),Me()):g.default.createElement(de,{onClick:function(){var t;return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return D.current&&D.current.focus(),J({type:Ce.OpenMobileModal}),[4,Promise.resolve()];case 1:return e.sent(),B.current&&(null===(t=B.current.querySelector('input[name="search-location"]'))||void 0===t||t.focus()),[2]}}))}))},focused:$,value:ne,trackingAttributes:y,inputSearchPlaceholder:L}))):g.default.createElement(A,{id:"booking-search-bar",ref:B},Re())},exports.types=Rt;
|