@hhgtech/hhg-components 1.27.131 → 1.27.133
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/{Onboarding-c8bb506e.js → Onboarding-b1d559e7.js} +1 -1
- package/build/babyGrowth.js +2 -2
- package/build/cache.js +1 -1
- package/build/care.js +1 -1
- package/build/components.js +1 -1
- package/build/constants.js +1 -1
- package/build/{core-28cc133f.js → core-c17c06fa.js} +1 -1
- package/build/ecom.js +1 -1
- package/build/esm/{Onboarding-714707dc.js → Onboarding-fd579f72.js} +1 -1
- package/build/esm/babyGrowth.js +2 -2
- package/build/esm/cache.js +1 -1
- package/build/esm/care.js +1 -1
- package/build/esm/components.js +1 -1
- package/build/esm/constants.js +1 -1
- package/build/esm/{core-1fe9e0e1.js → core-751de8a0.js} +1 -1
- package/build/esm/ecom.js +1 -1
- package/build/esm/footer.js +1 -1
- package/build/esm/gAssets.js +1 -1
- package/build/esm/getDynamicHealthTool-7b5571b2.js +1 -0
- package/build/esm/{getSocialList-5f18bc48.js → getSocialList-7b4c63b0.js} +1 -1
- package/build/esm/hooks.js +1 -1
- package/build/esm/i18n.js +1 -1
- package/build/esm/i18nV2.js +1 -1
- package/build/esm/index-0007c24c.js +1 -0
- package/build/esm/{index-7606cde1.js → index-2d562f92.js} +3 -3
- package/build/esm/{index-5d46c5eb.js → index-2e2b0db2.js} +3 -3
- package/build/esm/index-499f276f.js +1 -0
- package/build/esm/{index-956c9363.js → index-739bb5e8.js} +1 -1
- package/build/esm/{index-400700a4.js → index-777eabad.js} +1 -1
- package/build/esm/{index-6cb4ad81.js → index-7e6ef4fe.js} +1 -1
- package/build/esm/{index-a1b1ce42.js → index-8fd63502.js} +1 -1
- package/build/esm/{index-dc2bb732.js → index-9ff731cc.js} +1 -1
- package/build/esm/{index-3bdb350a.js → index-a2534c7c.js} +1 -1
- package/build/esm/{index-5c5071de.js → index-b1d38b58.js} +1 -1
- package/build/esm/{index-d6fb058a.js → index-ba4ada7c.js} +1 -1
- package/build/esm/{index-6f32aca3.js → index-ba50e0db.js} +1 -1
- package/build/esm/{index-b26a3e2c.js → index-bb913b1c.js} +1 -1
- package/build/esm/{index-0c146277.js → index-cc1aff02.js} +1 -1
- package/build/esm/index-cff1d249.js +1 -0
- package/build/esm/{index-d34eb108.js → index-d40900aa.js} +1 -1
- package/build/esm/{index-d3315581.js → index-efc99972.js} +6 -6
- package/build/esm/index.js +1 -1
- package/build/esm/{index.styled-ffc8460b.js → index.styled-39a47f05.js} +1 -1
- package/build/esm/{index.styles-1a0b666d.js → index.styles-e345cd05.js} +1 -1
- package/build/esm/interfaces/types/BabyGrowth.d.ts +4 -4
- package/build/esm/lead.js +1 -1
- package/build/esm/mantine.js +1 -1
- package/build/esm/misc.js +1 -1
- package/build/esm/navigation.js +1 -1
- package/build/esm/onboardingV2.js +1 -1
- package/build/esm/pwg.js +3 -3
- package/build/esm/{routing-16d0a1ac.js → routing-351976df.js} +1 -1
- package/build/esm/together.js +1 -1
- package/build/esm/{types-6729b4d5.js → types-1a608206.js} +2 -2
- package/build/esm/{types-eb8d5e73.js → types-ef0b0b06.js} +1 -1
- package/build/esm/types.js +1 -1
- package/build/esm/{useCategory-59deb479.js → useCategory-07fae2b9.js} +1 -1
- package/build/esm/useHealthToolCache-fb9195d3.js +1 -0
- package/build/esm/{useRafState-df8fc032.js → useRafState-76de05f2.js} +1 -1
- package/build/esm/{useTranslations-d4fe7335.js → useTranslations-10e9f360.js} +1 -1
- package/build/esm/{utils-1662dd17.js → utils-0f296d7f.js} +1 -1
- package/build/esm/vaccination.js +11 -11
- package/build/footer.js +1 -1
- package/build/gAssets.js +1 -1
- package/build/{getDynamicHealthTool-15091d2d.js → getDynamicHealthTool-51439008.js} +1 -1
- package/build/{getSocialList-9db85323.js → getSocialList-f8eaad9b.js} +1 -1
- package/build/hooks.js +1 -1
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/{index-e148b00a.js → index-195b5014.js} +1 -1
- package/build/{index-5c6a38b5.js → index-2fe1dfe5.js} +4 -4
- package/build/{index-b2074851.js → index-3ade7964.js} +1 -1
- package/build/{index-0ef5f1eb.js → index-3eb8ea9e.js} +1 -1
- package/build/{index-0466645b.js → index-41a28d6b.js} +1 -1
- package/build/{index-d20cbf30.js → index-4b6fc508.js} +1 -1
- package/build/{index-de17954f.js → index-5c19c607.js} +1 -1
- package/build/{index-afc90142.js → index-781b5c02.js} +1 -1
- package/build/{index-7e2d4b5f.js → index-81deb983.js} +1 -1
- package/build/index-8f601a7e.js +1 -0
- package/build/{index-a92ea0bf.js → index-90194f1f.js} +1 -1
- package/build/{index-bd5f38af.js → index-ae441a45.js} +2 -2
- package/build/{index-ee69e637.js → index-b2c74982.js} +1 -1
- package/build/{index-5e4d7657.js → index-b736e1ed.js} +1 -1
- package/build/{index-bc5e8db6.js → index-b8645633.js} +1 -1
- package/build/{index-e9a2e84e.js → index-bffe21f2.js} +3 -3
- package/build/index-e64aa768.js +1 -0
- package/build/{index-22f8ba37.js → index-fb7fe95d.js} +1 -1
- package/build/index.js +1 -1
- package/build/{index.styled-f95e4dda.js → index.styled-a22002f5.js} +1 -1
- package/build/{index.styles-cc0d6867.js → index.styles-7e65e8b3.js} +1 -1
- package/build/interfaces/types/BabyGrowth.d.ts +4 -4
- package/build/lead.js +1 -1
- package/build/mantine.js +1 -1
- package/build/misc.js +1 -1
- package/build/navigation.js +1 -1
- package/build/onboardingV2.js +1 -1
- package/build/pwg.js +1 -1
- package/build/{routing-c0fa0910.js → routing-c79a1161.js} +1 -1
- package/build/together.js +1 -1
- package/build/{types-ccd5cdf4.js → types-44e9d732.js} +2 -2
- package/build/{types-6a963910.js → types-7a936692.js} +1 -1
- package/build/types.js +1 -1
- package/build/{useCategory-ed52e9c5.js → useCategory-bf65c1d4.js} +1 -1
- package/build/{useHealthToolCache-68af9eaa.js → useHealthToolCache-f54a0e23.js} +1 -1
- package/build/{useRafState-513fce0d.js → useRafState-d0b3c83d.js} +1 -1
- package/build/{useTranslations-fb9c16a7.js → useTranslations-548041ba.js} +1 -1
- package/build/{utils-e77b305b.js → utils-ae95453a.js} +1 -1
- package/build/vaccination.js +5 -5
- package/package.json +1 -1
- package/build/esm/getDynamicHealthTool-23dcf075.js +0 -1
- package/build/esm/index-8e39b4c0.js +0 -1
- package/build/esm/index-b6ef09c4.js +0 -1
- package/build/esm/index-c405b16d.js +0 -1
- package/build/esm/useHealthToolCache-0321fd3a.js +0 -1
- package/build/index-74c19995.js +0 -1
- package/build/index-fa46c3de.js +0 -1
- /package/build/{BMI_BOYS.percentile.monthly-2b1a5ae8.js → BMI_BOYS.percentile.monthly-d3476448.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-800c4760.js → BMI_BOYS.percentile.weekly-b2869713.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-4d7d6b94.js → BMI_BOYS.percentile.yearly-0cf5ddcd.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-7e9e1370.js → BMI_BOYS.zscore.monthly-c4c943b7.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-69f6ed87.js → BMI_BOYS.zscore.weekly-ab4785f0.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-988fa59f.js → BMI_BOYS.zscore.yearly-0622848a.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-3f883c5a.js → BMI_GIRLS.percentile.monthly-a6c23ca8.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-5b579719.js → BMI_GIRLS.percentile.weekly-7fa7d98e.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-7104f2c2.js → BMI_GIRLS.percentile.yearly-d08140fe.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-f80e898b.js → BMI_GIRLS.zscore.monthly-abe8a404.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-52272146.js → BMI_GIRLS.zscore.weekly-d8ff3087.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-9d155790.js → BMI_GIRLS.zscore.yearly-7c1f0a47.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-08c6b385.js → HEAD CIRCUM_BOYS.percentile.monthly-1a2ccdbe.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-76a3b1b9.js → HEAD CIRCUM_BOYS.percentile.weekly-556d9756.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-e7343880.js → HEAD CIRCUM_BOYS.percentile.yearly-934846ef.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-1607b14d.js → HEAD CIRCUM_BOYS.zscore.monthly-b1830af8.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-e33ad04b.js → HEAD CIRCUM_BOYS.zscore.weekly-0d8c4db0.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-a920c997.js → HEAD CIRCUM_BOYS.zscore.yearly-13d2a05d.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-cb1168be.js → HEAD CIRCUM_GIRLS.percentile.monthly-1494d067.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-ee9145e4.js → HEAD CIRCUM_GIRLS.percentile.weekly-8495fb92.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-b1c1a733.js → HEAD CIRCUM_GIRLS.percentile.yearly-dedf8639.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-158ef89c.js → HEAD CIRCUM_GIRLS.zscore.monthly-57b2f684.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-db58ea50.js → HEAD CIRCUM_GIRLS.zscore.weekly-8bf235ac.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-60df52d2.js → HEAD CIRCUM_GIRLS.zscore.yearly-33407c58.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-6b3d0569.js → HEIGHT_BOYS.percentile.monthly-fcb2ad58.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-280180c9.js → HEIGHT_BOYS.percentile.weekly-9e4ab926.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-39b53203.js → HEIGHT_BOYS.percentile.yearly-5d81ff55.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-bc3251cc.js → HEIGHT_BOYS.zscore.monthly-d9307ca1.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-213b19c0.js → HEIGHT_BOYS.zscore.weekly-bbd07e44.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-3fe5f7b6.js → HEIGHT_BOYS.zscore.yearly-4020447e.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-706cfe46.js → HEIGHT_GIRLS.percentile.monthly-8af4d78a.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-6fb91b43.js → HEIGHT_GIRLS.percentile.weekly-965e6633.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-24c48777.js → HEIGHT_GIRLS.percentile.yearly-a47f4c9a.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-58960f49.js → HEIGHT_GIRLS.zscore.monthly-729a8bb5.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-a99939b1.js → HEIGHT_GIRLS.zscore.weekly-f94a5348.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-1a7701a6.js → HEIGHT_GIRLS.zscore.yearly-a9ab73f8.js} +0 -0
- /package/build/{Visible-ea7438c2.js → Visible-5628232f.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-4ad32bdc.js → WEIGHT_BOYS.percentile.monthly-3872ff0c.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-8d74c1e2.js → WEIGHT_BOYS.percentile.weekly-98caba45.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-4a734d3b.js → WEIGHT_BOYS.percentile.yearly-f5726dec.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-0e92e232.js → WEIGHT_BOYS.zscore.monthly-78907fac.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-21bfd25e.js → WEIGHT_BOYS.zscore.weekly-87742630.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-0928ee37.js → WEIGHT_BOYS.zscore.yearly-6c42a27c.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-fd5cdfcc.js → WEIGHT_GIRLS.percentile.monthly-737cdae7.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-d6b27040.js → WEIGHT_GIRLS.percentile.weekly-9b337ca5.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-65c1013d.js → WEIGHT_GIRLS.percentile.yearly-c3f0bf40.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-a6563a93.js → WEIGHT_GIRLS.zscore.monthly-30d18d7b.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-73c42eee.js → WEIGHT_GIRLS.zscore.weekly-e62e35bc.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-f27bace0.js → WEIGHT_GIRLS.zscore.yearly-68025da5.js} +0 -0
- /package/build/{constants-8ebfa9cc.js → constants-747308e3.js} +0 -0
- /package/build/{cookieHelper-d26a5e75.js → cookieHelper-84a6a64e.js} +0 -0
- /package/build/{dataTransform-a930593d.js → dataTransform-38950674.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-a3c3f842.js → BMI_BOYS.percentile.monthly-a41b0df5.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-5a76a7bd.js → BMI_BOYS.percentile.weekly-5cb93233.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-42f96876.js → BMI_BOYS.percentile.yearly-7acab009.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-de3cecd1.js → BMI_BOYS.zscore.monthly-06fc44ed.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-29cf96ac.js → BMI_BOYS.zscore.weekly-3b078181.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-168bb119.js → BMI_BOYS.zscore.yearly-7635211d.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-a2058343.js → BMI_GIRLS.percentile.monthly-55339604.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-21dcc807.js → BMI_GIRLS.percentile.weekly-e2611fc7.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-6780d86b.js → BMI_GIRLS.percentile.yearly-329b3569.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-5f00f5ba.js → BMI_GIRLS.zscore.monthly-3b1a5c93.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-4343ad0d.js → BMI_GIRLS.zscore.weekly-8378decd.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-a39ff00d.js → BMI_GIRLS.zscore.yearly-52cc14cb.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-a8766765.js → HEAD CIRCUM_BOYS.percentile.monthly-61d7fe7f.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-2675fbd0.js → HEAD CIRCUM_BOYS.percentile.weekly-7b726611.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-99e8d1b8.js → HEAD CIRCUM_BOYS.percentile.yearly-4cc976a8.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-7cd1810a.js → HEAD CIRCUM_BOYS.zscore.monthly-e7e49ca1.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-2d64c079.js → HEAD CIRCUM_BOYS.zscore.weekly-d70c1eae.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-79e8a0fa.js → HEAD CIRCUM_BOYS.zscore.yearly-e033ecfe.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-10072522.js → HEAD CIRCUM_GIRLS.percentile.monthly-46829c05.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-9fc8b016.js → HEAD CIRCUM_GIRLS.percentile.weekly-0364573c.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-0a52d8db.js → HEAD CIRCUM_GIRLS.percentile.yearly-f1b5739a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-1d5fdc8d.js → HEAD CIRCUM_GIRLS.zscore.monthly-4f617935.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-3b1f18f7.js → HEAD CIRCUM_GIRLS.zscore.weekly-98031837.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-20197312.js → HEAD CIRCUM_GIRLS.zscore.yearly-0513f8e5.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-cd6be793.js → HEIGHT_BOYS.percentile.monthly-0feff9f6.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-811299eb.js → HEIGHT_BOYS.percentile.weekly-974ec4ca.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-90e51744.js → HEIGHT_BOYS.percentile.yearly-962d1b63.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-bd0d83b6.js → HEIGHT_BOYS.zscore.monthly-a110c21a.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-895acf84.js → HEIGHT_BOYS.zscore.weekly-5d5a66c8.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-331091af.js → HEIGHT_BOYS.zscore.yearly-6b40fe58.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-4024238c.js → HEIGHT_GIRLS.percentile.monthly-c88cdfb5.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-3a88633c.js → HEIGHT_GIRLS.percentile.weekly-10589f87.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-1eff662e.js → HEIGHT_GIRLS.percentile.yearly-06416dce.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-6aeaf9c8.js → HEIGHT_GIRLS.zscore.monthly-6b6b8944.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-4a51b608.js → HEIGHT_GIRLS.zscore.weekly-05b8b1e8.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-bfdde97f.js → HEIGHT_GIRLS.zscore.yearly-0d1754a8.js} +0 -0
- /package/build/esm/{Visible-827e687c.js → Visible-87dd55d4.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-745f624f.js → WEIGHT_BOYS.percentile.monthly-d0422149.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-08516090.js → WEIGHT_BOYS.percentile.weekly-c39d2f84.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-0a75ce2b.js → WEIGHT_BOYS.percentile.yearly-5ae01058.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-8683d89d.js → WEIGHT_BOYS.zscore.monthly-0124c542.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-2650b609.js → WEIGHT_BOYS.zscore.weekly-9ef5a25f.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-cf1f8552.js → WEIGHT_BOYS.zscore.yearly-fb69bbc5.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-acf985d8.js → WEIGHT_GIRLS.percentile.monthly-3dd2ec93.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-21fa3d64.js → WEIGHT_GIRLS.percentile.weekly-6ad06231.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-a1c3e409.js → WEIGHT_GIRLS.percentile.yearly-f19bf1ca.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-f7a49e70.js → WEIGHT_GIRLS.zscore.monthly-9b2c414a.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-c517ad71.js → WEIGHT_GIRLS.zscore.weekly-21b23f91.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-9d93e018.js → WEIGHT_GIRLS.zscore.yearly-2e67337b.js} +0 -0
- /package/build/esm/{constants-858c8d6d.js → constants-126b1bf1.js} +0 -0
- /package/build/esm/{cookieHelper-abd8b287.js → cookieHelper-6c64533f.js} +0 -0
- /package/build/esm/{dataTransform-f7656bef.js → dataTransform-99b1cf6a.js} +0 -0
- /package/build/esm/{index-367ff39c.js → index-46ca8299.js} +0 -0
- /package/build/esm/{isProduction-e8f9317b.js → isProduction-ee053516.js} +0 -0
- /package/build/esm/{localizeNumberFormat-ba649148.js → localizeNumberFormat-5a52ff92.js} +0 -0
- /package/build/esm/{normalizeLink-044ab489.js → normalizeLink-e3ff1c11.js} +0 -0
- /package/build/esm/{number-0131947a.js → number-895411ae.js} +0 -0
- /package/build/esm/{paths-fff15507.js → paths-8848792b.js} +0 -0
- /package/build/esm/{screenSizeContext-1621f036.js → screenSizeContext-9a12cff0.js} +0 -0
- /package/build/esm/{theme-f466747e.js → theme-552e8fb4.js} +0 -0
- /package/build/esm/{translationsContext-f046abf8.js → translationsContext-cd4c35ad.js} +0 -0
- /package/build/esm/{tslib.es6-66e2786c.js → tslib.es6-ff502d3f.js} +0 -0
- /package/build/esm/{types-9ad7db7e.js → types-543400b8.js} +0 -0
- /package/build/esm/{useIsInit-dcb9d118.js → useIsInit-8814c69e.js} +0 -0
- /package/build/esm/{useOutsideClick-facdcc49.js → useOutsideClick-eb1e8600.js} +0 -0
- /package/build/esm/{useScrollbarSize-6cac3dfe.js → useScrollbarSize-45acc65f.js} +0 -0
- /package/build/{index-995af0ce.js → index-79f5bb6a.js} +0 -0
- /package/build/{isProduction-9a7c74b1.js → isProduction-162f7f61.js} +0 -0
- /package/build/{localizeNumberFormat-9766b508.js → localizeNumberFormat-904473e8.js} +0 -0
- /package/build/{normalizeLink-323314f9.js → normalizeLink-4f491971.js} +0 -0
- /package/build/{number-17e68600.js → number-0eeeecf7.js} +0 -0
- /package/build/{paths-f2859c03.js → paths-60a0f975.js} +0 -0
- /package/build/{screenSizeContext-4a23b97a.js → screenSizeContext-99e2010b.js} +0 -0
- /package/build/{theme-4eeabcb9.js → theme-b23d8bfb.js} +0 -0
- /package/build/{translationsContext-95d16869.js → translationsContext-ba58eaf1.js} +0 -0
- /package/build/{tslib.es6-8c6ec5f9.js → tslib.es6-16ffcffb.js} +0 -0
- /package/build/{types-b96d56d6.js → types-e49fce99.js} +0 -0
- /package/build/{useIsInit-cf4544e6.js → useIsInit-e651aafb.js} +0 -0
- /package/build/{useOutsideClick-093bd476.js → useOutsideClick-553f8660.js} +0 -0
- /package/build/{useScrollbarSize-b6eab9a0.js → useScrollbarSize-086d4a91.js} +0 -0
package/build/navigation.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("./tslib.es6-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("./tslib.es6-16ffcffb.js"),require("react"),require("./core-c17c06fa.js");var e=require("./index-5c19c607.js");require("./index-41a28d6b.js"),require("./normalizeLink-4f491971.js"),require("./routing-c79a1161.js"),require("./index-bffe21f2.js"),require("./isProduction-162f7f61.js"),require("./index.styles-7e65e8b3.js"),require("@mantine/core"),require("./index-81deb983.js"),require("./screenSizeContext-99e2010b.js"),require("styled-components"),require("lodash/throttle"),require("./theme-b23d8bfb.js"),require("dayjs"),require("./Onboarding-b1d559e7.js"),require("./gAssets.js"),require("date-fns/locale"),require("./useTranslations-548041ba.js"),require("./translationsContext-ba58eaf1.js"),require("string-format"),require("@mantine/hooks"),require("@mantine/dates"),require("@mantine/carousel"),require("react-keyed-flatten-children"),require("lodash/debounce"),require("./useCategory-bf65c1d4.js"),require("./cookieHelper-84a6a64e.js"),require("slugify"),require("./index-4b6fc508.js"),require("./index-3eb8ea9e.js"),require("./constants-747308e3.js"),require("./index-e64aa768.js"),require("./useIsInit-e651aafb.js"),require("dayjs/plugin/relativeTime"),exports.NavigationV2=e.NavigationV2,exports.getNavMenuContent=e.getNavMenuContent,exports.getNavMenuContentWithCache=e.getNavMenuContentWithCache;
|
package/build/onboardingV2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("./tslib.es6-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("./tslib.es6-16ffcffb.js"),a=require("@mantine/core"),n=require("./index.styles-7e65e8b3.js"),r=require("./index-b736e1ed.js"),o=require("./index-81deb983.js");require("dayjs");var i=require("./screenSizeContext-99e2010b.js"),l=require("styled-components"),s=require("./theme-b23d8bfb.js"),d=require("./index-41a28d6b.js");require("./isProduction-162f7f61.js"),require("./Onboarding-b1d559e7.js");var u=require("./gAssets.js"),m=require("./useTranslations-548041ba.js"),c=require("@mantine/hooks"),p=require("./index-fb7fe95d.js");require("lodash/debounce"),require("./useCategory-bf65c1d4.js");var f=require("./Visible-5628232f.js"),g=require("@mantine/form"),h=require("./utils-ae95453a.js");require("@mantine/dates");var b=require("yup"),E=require("react-dom");require("./translationsContext-ba58eaf1.js"),require("string-format");var x=require("lodash/throttle"),C=require("./index-3eb8ea9e.js"),v=require("./index-8f601a7e.js"),L=require("date-fns"),y=require("react-keyed-flatten-children");function w(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function S(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}require("@mantine/carousel"),require("./cookieHelper-84a6a64e.js"),require("slugify"),require("date-fns/locale");var M=w(e),P=w(l),O=S(b),_=w(x),j=w(y);const T=e.createContext({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1,isMarryBaby:!1,siteType:"helloSites",sharedData:{},setSharedData:()=>!1}),[k,B,F]=g.createFormContext(),q=P.default(a.Box)`
|
|
2
2
|
.phone-input {
|
|
3
3
|
width: 100%;
|
|
4
4
|
margin-bottom: 32px;
|
package/build/pwg.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("./index-90194f1f.js"),r=require("./index-81deb983.js"),a=require("./index-2fe1dfe5.js"),l=require("./useTranslations-548041ba.js"),n=require("./theme-b23d8bfb.js"),o=require("recharts"),i=require("./index.styles-7e65e8b3.js"),s=require("./useOutsideClick-553f8660.js"),c=require("styled-components"),d=require("./tslib.es6-16ffcffb.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("@mantine/core"),require("./screenSizeContext-99e2010b.js"),require("lodash/throttle"),require("dayjs"),require("./index-41a28d6b.js"),require("date-fns/locale"),require("./Onboarding-b1d559e7.js"),require("./isProduction-162f7f61.js"),require("./gAssets.js"),require("./index-8f601a7e.js"),require("@mantine/dates"),require("./translationsContext-ba58eaf1.js"),require("string-format"),require("@mantine/hooks"),require("@mantine/carousel"),require("react-keyed-flatten-children"),require("lodash/debounce"),require("./useCategory-bf65c1d4.js"),require("./cookieHelper-84a6a64e.js"),require("slugify");var m=u(e),f=u(c);const p=e=>{const{x:t,y:r,payload:a,activeWeek:l}=e;return l===a.value?m.default.createElement("g",{transform:`translate(${t},${r})`},m.default.createElement("circle",{r:12,fill:"marryBaby"===e.siteType?n.theme.mbColors.pink:n.theme.colors.primaryBase}),m.default.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:n.theme.colors.white,fontFamily:"Inter",fontWeight:"600",fontSize:"12px"},a.value)):m.default.createElement("g",{transform:`translate(${t},${r})`},m.default.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:n.theme.colors.gray600,fontFamily:"Inter",fontWeight:"400",fontSize:"12px"},a.value))},g=f.default.div`
|
|
2
2
|
/* position: absolute; */
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./index-
|
|
1
|
+
"use strict";var e=require("./index-41a28d6b.js"),o=require("./isProduction-162f7f61.js");exports.getCareApiDomain=()=>process.env.UNIFY_INTERNAL_CARE_API||process.env.UNIFY_CARE_API||`https://${o.isProduction?"health-care.":"service-health-care."}hellohealthgroup.com`,exports.getCurrentBaseUrl=(t,s)=>{if("undefined"!=typeof window)return window.location.origin;const r="development"===process.env.NEXT_PUBLIC_DEPLOY_ENV,i=!r&&!o.isProduction;return r?"http://localhost:3000":`https://${i?s?"fe.":"discover.":s?"www.":""}${e.domainLocales[s?"vi-VN_MB":t]}`},exports.getCurrentSsoUrl=(t,s)=>process.env.UNIFY_SSO_API||`https://${o.isProduction?"id.":"staging-id."}${e.domainLocales[s?"vi-VN_MB":t]}`,exports.getDiscoverApiDomain=t=>process.env.UNIFY_DISCOVER_API||`https://${o.isProduction?"wp.":"staging."}${e.domainLocales[t]}`,exports.getTogetherApiDomain=()=>process.env.UNIFY_INTERNAL_TOGETHER_API||process.env.UNIFY_TOGETHER_API||`https://${o.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("./index.styled-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./index.styled-a22002f5.js"),r=require("./index-bffe21f2.js"),t=require("./types-7a936692.js"),o=require("./index.styles-7e65e8b3.js");require("react"),require("@mantine/core"),require("./screenSizeContext-99e2010b.js"),require("styled-components"),require("lodash/throttle"),require("./tslib.es6-16ffcffb.js"),require("./useTranslations-548041ba.js"),require("./translationsContext-ba58eaf1.js"),require("string-format"),require("./index-3eb8ea9e.js"),require("./index-81deb983.js"),require("./theme-b23d8bfb.js"),require("dayjs"),require("./index-41a28d6b.js"),require("date-fns/locale"),require("./Onboarding-b1d559e7.js"),require("./isProduction-162f7f61.js"),require("./gAssets.js"),require("./index-b8645633.js"),require("@mantine/dates"),require("./number-0eeeecf7.js"),require("@mantine/hooks"),require("date-fns"),require("./routing-c79a1161.js"),require("dayjs/plugin/relativeTime"),require("./paths-60a0f975.js"),require("./constants-747308e3.js"),require("lodash/debounce"),require("./useCategory-bf65c1d4.js"),require("./index-3ade7964.js"),require("innertext"),require("./cookieHelper-84a6a64e.js"),require("react-contenteditable"),require("react-dom"),require("@mantine/carousel"),require("react-keyed-flatten-children"),require("slugify"),exports.CardAuthor=e.CardAuthor,exports.CardReactions=e.CardReactions,exports.LabelSortPin=e.LabelSortPin,exports.LabelSorting=e.LabelSorting,exports.Loading=e.Loading,exports.PopoverMenu=e.PopoverMenu,exports.PopupDoctor=e.PopupDoctor,exports.PopupExpert=e.PopupExpert,exports.PopupFrame=e.PopupFrame,exports.PopupHospital=e.PopupHospital,exports.PostContent=e.PostContent,exports.ProfileDetail=e.ProfileDetail,exports.ProfileDetailModal=e.ProfileDetailModal,exports.ShareBox=e.ShareBox,exports.SharePopup=e.SharePopup,exports.SourceList=e.SourceList,Object.defineProperty(exports,"TabNameInProfileDetail",{enumerable:!0,get:function(){return e.TabName}}),exports.TagTopic=e.TagTopic,exports.TogetherAuthConfigContext=e.TogetherAuthConfigContext,exports.TogetherAuthConfigContextProvider=e.TogetherAuthConfigContextProvider,exports.useTogetherAuthRequiredAction=e.useTogetherAuthRequiredAction,exports.TogetherDataTransforms=r.dataTransform,exports.UserAvatar=r.UserAvatar,exports.CardLink=t.CardLink,exports.CardPost=t.CardPost,exports.CardPostPopoverMore=t.CardPostPopoverMore,exports.CardReply=t.CardReply,exports.CardReplyPopover=t.CardReplyPopover,exports.CreateNewPostContent=t.CreateNewPostContent,exports.CreatePostDescription=t.CreatePostDescription,exports.CreatePostTitle=t.CreatePostTitle,exports.ImagePreviewPopup=t.ImagePreviewPopup,exports.InputCommentBar=t.InputCommentBar,exports.LabelPin=t.LabelPin,exports.PopupDanger=t.PopupDanger,exports.PostImagePreview=t.PostImagePreview,exports.PostSingleImageViewPopup=t.PostSingleImageViewPopup,exports.SkipQuestionOfExpertBtn=t.SkipQuestionOfExpertBtn,exports.SocialLinkPreview=t.SocialLinkPreview,exports.SubmitReportForm=t.SubmitReportForm,exports.TogetherTypes=t.types,exports.TopicSelectList=t.TopicSelectList,exports.VerifiedTag=t.VerifiedTag,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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var e=require("./tslib.es6-
|
|
1
|
+
"use strict";var e=require("./tslib.es6-16ffcffb.js"),t=require("react"),a=require("./useTranslations-548041ba.js"),i=require("lodash/debounce"),o=require("./constants-747308e3.js"),l=require("./index-b8645633.js"),n=require("styled-components"),s=require("./index-81deb983.js"),r=require("./theme-b23d8bfb.js"),c=require("./screenSizeContext-99e2010b.js"),d=require("react-loading-skeleton"),u=require("lodash/shuffle"),p=require("./useOutsideClick-553f8660.js"),h=require("./paths-60a0f975.js"),g=require("@mantine/core"),f=require("./index-41a28d6b.js"),m=require("./cookieHelper-84a6a64e.js"),C=require("string-format");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function y(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,i.get?i:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var v=y(t),x=b(t),E=b(i),S=b(n),w=b(d),L=b(u),O=b(C);const k=e=>v.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),v.createElement("path",{d:"M7.99969 9.38055L5.45236 6.83322C5.17636 6.55722 4.72836 6.55722 4.45236 6.83322C4.17636 7.10922 4.17636 7.55722 4.45236 7.83322L7.52836 10.9092C7.78903 11.1699 8.21103 11.1699 8.47103 10.9092L11.547 7.83322C11.823 7.55722 11.823 7.10922 11.547 6.83322C11.271 6.55722 10.823 6.55722 10.547 6.83322L7.99969 9.38055Z"}));function I(){const[e,a]=t.useState((()=>{if("undefined"==typeof window)return"unset";if(m.getCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE))return"granted";const e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),[i,o]=t.useState((()=>{if("undefined"==typeof window)return null;const e=m.getCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=t.useCallback((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((e=>{const t={lat:""+Math.round(1e7*e.coords.latitude)/1e7,lng:""+Math.round(1e7*e.coords.longitude)/1e7};m.setCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE,JSON.stringify(t),{minutes:15}),o(t),a("granted")}),(()=>{m.deleteCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE),a("denied")}))}),[]);return t.useMemo((()=>({geoLocationPermission:e,geoLocationCoordinates:i,requestGeoLocation:l})),[e,i])}const T=S.default.div``,j=S.default.div`
|
|
2
2
|
--searchbar-z-index: 305;
|
|
3
3
|
&[data-is-modal='true'] {
|
|
4
4
|
position: fixed;
|
|
@@ -756,4 +756,4 @@
|
|
|
756
756
|
background: rgba(255, 255, 255, 0.64);
|
|
757
757
|
backdrop-filter: blur(12px);
|
|
758
758
|
border-bottom: 1px solid ${r.theme.colors.neutral100};
|
|
759
|
-
`,Pt=({currentTab:e,hideTabBookingSearch:i=[],isMobile:o,setCurrentTab:l})=>{const{t:n}=a.useTranslations(),r=t.useMemo((()=>({root:{overflowY:o?"hidden":"initial",overflowX:o?"auto":"initial"},tabsList:{background:"rgba(255, 255, 255, 0)",borderBottom:"none",flexWrap:"nowrap",".mantine-Tabs-tab":{"&:last-child":{"&:after":{display:"none"}}}},tab:{padding:o?"12px 16px 12px 16px":"15px 40px 15px 40px",borderTop:"2px solid transparent",borderBottom:"none",margin:0,borderRadius:0,position:"relative",width:"auto",'&[data-active="true"]':{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:after":{display:"none"},"&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:hover":{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:after":{content:'""',width:"1px",height:"24px",backgroundColor:"#E4E8EC",position:"absolute",right:"-1px"}},tabLabel:{color:"#595959",fontSize:o?"14px":"16px",fontWeight:600,lineHeight:o?"22px":"24px"}})),[o]),c=(()=>{const{t:e}=a.useTranslations();return[{value:"hospital",label:e("booking.searchPopup.hospitals")},{value:"doctor",label:e("booking.searchPopup.doctors")},{value:"service",label:e("booking.searchPopup.services")},{value:"specialty",label:e("booking.searchPopup.specialties")}]})(),d=t.useMemo((()=>c.filter((e=>!i.includes(e.value)))||[]),[i,c]);return x.default.createElement(Nt,{className:"booking-search-tab"},x.default.createElement(s.Container,null,x.default.createElement(g.Tabs,{value:e,onTabChange:e=>{l(e)},styles:r},x.default.createElement(g.Tabs.List,null,d.map((e=>x.default.createElement(g.Tabs.Tab,{value:e.value,key:e.value},n(e.label))))))))};var _t;!function(e){e.doctor="doctor",e.service="hospital_service",e.hospital="hospital_branch"}(_t||(_t={}));var Ft;!function(e){e[e.SPECIALTY=1]="SPECIALTY",e[e.DOCTOR=2]="DOCTOR",e[e.CLINIC=3]="CLINIC",e[e.SERVICE=4]="SERVICE"}(Ft||(Ft={}));var $t=Object.freeze({__proto__:null,get RedirectType(){return Ft}});exports.BookingSearchBar=({isMobile:i,careApiDomain:l,geoLocationPermission:n,geoLocationCoordinates:s,initialSelectedCity:r,initialSearchValue:c="",careFrontDomain:d="/care",isDebug:u=!1,askForGeolocationPermission:p=!1,gaTrackingSearchBar:g,gaTrackingLocationSearch:f,autoCompleteDisabled:m=!1,inputSearchPlaceholder:C="",isOptionAllLocation:b=!1,hideResults:y=[],isNavResultItem:v=!0,routerPush:S,onGeoLocationPermissionChange:w,onSearch:L,onChangeLocation:O})=>{const{t:k,locale:A}=a.useTranslations(),P=t.useRef(null),_=t.useRef(null),[F,$]=t.useState(void 0),[D,B]=t.useState(!1),{geoLocationPermission:V,geoLocationCoordinates:K,requestGeoLocation:H}=I(),[z,Z]=t.useReducer(me,he,(e=>Object.assign(Object.assign({},e),{isDebug:u,isMobile:i,geoLocationPermission:n||V||"unset",geoLocationCoordinates:s||K||null,searchKeywords:c,initialSelectedCity:r||null,selectedLocation:r||e.selectedLocation||null,searchLocationKeywords:(null==r?void 0:r.name)||e.searchLocationKeywords,autoCompleteDisabled:m,inputSearchPlaceholder:C,locale:A}))),{navigateTo:U,focused:Q,isLoadingCities:q,cities:Y,searchKeywords:W,geoLocationPermission:J,selectedLocation:X,initialSelectedCity:ee,defaultCity:te,searchResults:ae,isLoadingSearchResults:ie,isMobileModalOpened:oe,inputSearchPlaceholder:ne}=z,{fetchCitiesByLocation:se,fetchCitiesByKeyword:re,fetchSearchResults:ce}=function({dispatch:e,careApiDomain:a,locale:i="vi-VN"}){const l=t.useCallback((function(t,o={}){const l=`${a}${t}`;return e({type:ge.FetchCitiesStart}),fetch(qe(l,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:ge.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:t.useCallback((function({coordinates:t}){let a={};const o={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(o.noPaging=1);const n=[l(h.PATHS.GET_CITY_BY_IP,Object.assign(Object.assign({},a),o))];return"zh-TW"===i&&n.push(l(h.PATHS.GET_CITIES_LIST,{noPaging:1})),Promise.all(n).then((([t,a])=>{const i=Object.assign({},t);if(a){const e=i.cities.map((e=>e.id));i.cities=i.cities.concat(a.cities.filter((t=>!e.includes(t.id))))}e({type:ge.FetchCitiesByGeoIpComplete,payload:i})})).catch((e=>console.error("error loading cities by location",e)))}),[i,a,e]),fetchCitiesByKeyword:t.useCallback((function(t){return l(h.PATHS.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:ge.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,a,e]),fetchSearchResults:t.useCallback((function(t,l){const n=`${a}${h.PATHS.GET_SEARCH_V2}`;e({type:ge.FetchSearchResultsStart});const{defaultCity:s,selectedLocation:r,geoLocationCoordinates:c}=l;let d="";if(!r||!s)return void e({type:ge.FetchSearchResultsFinish});r.id===o.ID_OPTION_CURRENT_LOCATION?c||(d=s.id):d=r.id===o.ID_OPTION_ALL_LOCATION?"":r.id;const u=(null==c?void 0:c.lat)||"",p=(null==c?void 0:c.lng)||"";return fetch(qe(n,{domain:a,searchType:"global",keyword:t.trim().length>pe[i]?t.trim():"",city:d===o.ID_OPTION_CURRENT_LOCATION?"":d,lat:u,lng:p},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>e({type:ge.FetchSearchResultsComplete,payload:t}))).catch((e=>{console.log("error loading search results",{url:n,error:e})})).finally((()=>e({type:ge.FetchSearchResultsFinish})))}),[i,a,e])}}({dispatch:Z,locale:A,careApiDomain:l}),de=t.useMemo((()=>{var e;return{id:o.ID_OPTION_CURRENT_LOCATION,name:k("booking.searchBar.currentLocation"),slug:null===(e=o.LOCALIZED_SLUGS[A])||void 0===e?void 0:e.CURRENT}}),[k,A]),fe=t.useMemo((()=>E.default(re,400)),[re]),Ce=t.useMemo((()=>E.default(ce,400)),[ce]);t.useEffect((()=>{""!==c&&c!==z.searchKeywords&&Z({type:ge.UpdateInitialSearchValue,payload:c})}),[c]),t.useEffect((()=>{p&&(null==X?void 0:X.id)===o.ID_OPTION_CURRENT_LOCATION&&"unset"===J&&H()}),[p,X,J]),t.useEffect((()=>{n||J===V||("granted"===V&&K?Z({type:ge.GrantGeoLocationPermission,payload:K}):"denied"===V&&Z({type:ge.DenyGeoLocationPermission}))}),[J,V,K,n]),t.useEffect((()=>{U&&(S?S(U):window.location.href=`${d}${U}`)}),[U]);const be=t.useCallback((function(){Z({type:ge.SelectCurrentLocation,payload:de})}),[k,Z]);t.useEffect((()=>{var e;"denied"===J||ee||Z({type:ge.SelectLocation,payload:{name:k("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(e=o.LOCALIZED_SLUGS[A])||void 0===e?void 0:e.ALL}}),w&&w(J,z.geoLocationCoordinates),i&&"granted"===J&&X&&Z({type:ge.FocusInputSearch}),se({coordinates:z.geoLocationCoordinates})}),[J]),t.useEffect((()=>{X&&te&&ce(z.searchKeywords,z)}),[X,te]),t.useEffect((()=>{C!==ne&&Z({type:ge.SetInputSearchPlaceholder,payload:C})}),[C,ne]),t.useEffect((()=>{oe?document.body.classList.add("care-popup-open"):document.body.classList.remove("care-popup-open")}),[oe]);const ye=t.useCallback((function(e){"ms-MY"===A&&B(!0),Z({type:ge.SelectLocation,payload:e}),"ms-MY"!==A&&Ee(),O&&O(e)}),[k,Z]);function ve(){"ms-MY"===A&&B(!0),i&&"granted"!==z.geoLocationPermission?H():(be(),"ms-MY"!==A&&Ee())}function xe(){var e;P.current&&(null===(e=P.current.querySelector('input[name="search-location"]'))||void 0===e||e.focus())}function Ee(){var e;P.current&&(null===(e=P.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function Se(){Z({type:ge.CloseMobileModal})}function we(){return"location"!==Q?null:x.default.createElement(G,{isLoading:q,cities:Y,onLocationClick:ye,onCurrentLocationClick:ve,isLocationLoading:q,geoLocationPermission:J,selectedLocation:X,isOptionAllLocation:b})}function ke(){return"search"!==Q?null:z.autoCompleteDisabled?i?x.default.createElement(Le,{onClick:()=>{L({cityId:z.selectedLocation.id,keyword:W}),Se()}}):null:x.default.createElement(Qe,{data:ae,state:z,dispatch:Z,isMobile:!1,keyword:W,isLoading:ie,hideResults:y,isNavResultItem:v})}function Ie(){return x.default.createElement(Oe,{isMobile:i,state:z,dispatch:Z,debouncedFetchCitiesByKeyword:fe,debouncedFetchSearchResults:Ce,focusLocationInput:xe,focusSearchInput:Ee,renderLocationResults:we,renderSearchResults:ke,trackingAttributes:g,locationTrackingAttributes:f,onSearch:L,initalSearchValue:c})}return t.useEffect((()=>{if(window.visualViewport){const e=e=>{const t=e.target;$(null==t?void 0:t.height)};return window.visualViewport.addEventListener("resize",e,{passive:!0}),()=>{window.visualViewport.removeEventListener("resize",e)}}}),[$]),t.useEffect((()=>{if(X&&D&&"ms-MY"===A){const e=`/${X.slug}/hospital`;Z({type:ge.NavigateTo,payload:e}),B(!1)}}),[D,A,X]),i?x.default.createElement(x.default.Fragment,null,x.default.createElement(N,null),x.default.createElement(R,{ref:_}),x.default.createElement(j,{id:"booking-search-bar",ref:P,"data-is-modal":i&&oe,style:{"--mobile-care-searchbar-height":oe&&F?`${F}px`:"100%"}},oe?x.default.createElement(x.default.Fragment,null,x.default.createElement(M,null,x.default.createElement(ue,{headingText:k("booking.searchBar.searchButton"),onLeftClick:Se}),Ie()),we(),ke()):x.default.createElement(le,{onClick:function(){var t;return e.__awaiter(this,void 0,void 0,(function*(){_.current&&_.current.focus(),Z({type:ge.OpenMobileModal}),yield Promise.resolve(),P.current&&(null===(t=P.current.querySelector('input[name="search-location"]'))||void 0===t||t.focus())}))},focused:Q,value:W,trackingAttributes:g,inputSearchPlaceholder:C}))):x.default.createElement(T,{id:"booking-search-bar",ref:P},Ie())},exports.BookingSearchBarV2=({isMobile:e,careApiDomain:i,geoLocationPermission:l,geoLocationCoordinates:n,initialSelectedCity:s,initialSearchValue:r="",initTypeSearch:c="hospital",initSpecialty:d,careFrontDomain:u="/care",isDebug:f=!1,gaTrackingSearchBar:m,gaTrackingLocationSearch:C,autoCompleteDisabled:b=!1,inputSearchPlaceholder:y="",hideTabBookingSearch:v=[],hideSpecialtySelection:S=!1,hidePopularSearchKeys:w=!1,clientSlug:L="",routerPush:O,onGeoLocationPermissionChange:k,onChangeLocation:T})=>{const{locale:j,t:M}=a.useTranslations(),R=t.useRef(null),A=t.useRef(null),[N,P]=t.useState(c),{geoLocationPermission:_,geoLocationCoordinates:F}=I(),[$,D]=t.useReducer(it,et,(t=>Object.assign(Object.assign({},t),{isDebug:f,isMobile:e,geoLocationPermission:l||_||"unset",geoLocationCoordinates:n||F||null,searchKeywords:r,initialSelectedCity:s||null,selectedLocation:s||t.selectedLocation||null,searchLocationKeywords:(null==s?void 0:s.name)||t.searchLocationKeywords,autoCompleteDisabled:b,inputSearchPlaceholder:y,locale:j}))),{navigateTo:B,focusedSpecialty:V,searchKeywords:K,geoLocationPermission:H,selectedLocation:z,selectedSpecialty:G,initialSelectedCity:Z,searchResults:U,isLoadingSearchResults:Q}=$,{fetchCitiesByLocation:q,fetchCitiesByKeyword:Y,fetchSearchResults:W,fetchAllSpecialties:J,fetchPopularKeys:X}=function({dispatch:e,careApiDomain:a,locale:i="vi-VN",client:l=""}){const n=t.useCallback((function(t,o={}){const l=`${a}${t}`;return e({type:tt.FetchCitiesStart}),fetch(qe(l,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:tt.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:t.useCallback((function({coordinates:t}){let a={};const o={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(o.noPaging=1);const s=[n(h.PATHS.GET_CITY_BY_IP,Object.assign(Object.assign(Object.assign({},a),o),{client:l}))];return"zh-TW"===i&&s.push(n(h.PATHS.GET_CITIES_LIST,{noPaging:1,client:l})),Promise.all(s).then((([t,a])=>{const i=Object.assign({},t);if(a){const e=i.cities.map((e=>e.id));i.cities=i.cities.concat(a.cities.filter((t=>!e.includes(t.id))))}e({type:tt.FetchCitiesByGeoIpComplete,payload:i})})).catch((e=>console.error("error loading cities by location",e)))}),[i,a,e]),fetchCitiesByKeyword:t.useCallback((function(t){return n(h.PATHS.GET_CITIES_LIST,{keyword:t,client:l}).then((t=>{e({type:tt.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,a,e]),fetchSearchResults:t.useCallback((function(t,l,n,s,r){const c="specialty"===n?`${a}${h.PATHS.GET_SEARCH_SPECIALTY}`:`${a}${h.PATHS.GET_SEARCH_V2}`;e({type:tt.FetchSearchResultsStart});const{selectedLocation:d,geoLocationCoordinates:u,selectedSpecialty:p}=l;let g="";if(!d)return void e({type:tt.FetchSearchResultsFinish});g=d.id===o.ID_OPTION_ALL_LOCATION?"":d.id;const f=(null==u?void 0:u.lat)||"",m=(null==u?void 0:u.lng)||"",C=(null==p?void 0:p.id)>0?null==p?void 0:p.id:"",b=t.trim().length>Xe[i]?t.trim():"";return fetch(qe(c,{domain:a,searchType:n||"global",keyword:b,city:g===o.ID_OPTION_CURRENT_LOCATION?"":g,lat:f,lng:m,specialty_id:C,client_slug:s},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{let a=[];"specialty"!==n&&(a=t.searches),"specialty"===n&&(a=b?t.specialties:t.default),e({type:tt.FetchSearchResultsComplete,payload:{key:n,searches:a||[]}}),r&&e({type:tt.UpdateInitialSearchResults,payload:{key:n,searches:a||[]}})})).catch((e=>{console.log("error loading search results",{url:c,error:e})})).finally((()=>e({type:tt.FetchSearchResultsFinish})))}),[i,a,e]),fetchAllSpecialties:t.useCallback((function(){const t=`${a}${h.PATHS.GET_SEARCH_SPECIALTY}`;return fetch(qe(t,{domain:a,searchType:""},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:tt.FetchAllSpecialties,payload:t.specialties||[]})})).catch((e=>{console.log("error loading search results",{url:t,error:e})}))}),[i,a,e]),fetchPopularKeys:t.useCallback((function(t){const o=`${a}${h.PATHS.GET_SEARCH_POPULAR_KEY}`;return fetch(qe(o,{domain:a,searchType:_t[t],sort_by:"display_order",sort_order:"asc"},i)).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:tt.FetchPopularKeys,payload:t.popular_searches||[]})})).catch((e=>{console.log("error loading search results",{url:o,error:e})}))}),[i,a,e])}}({dispatch:D,locale:j,careApiDomain:i,client:L}),ee=t.useMemo((()=>o.LOCALIZED_SLUGS[j]),[j]),te=t.useMemo((()=>({doctor:{name:M("booking.searchPopup.doctors"),icon:x.default.createElement(gt,null),slug:ee.DOCTOR},service:{name:M("booking.searchPopup.services"),icon:x.default.createElement(ft,null),slug:ee.SERVICE},hospital:{name:M("booking.searchPopup.hospitals"),icon:x.default.createElement(mt,null),slug:ee.HOSPITAL},specialty:{name:M("booking.searchPopup.specialties"),icon:x.default.createElement(Ct,null),slug:ee.SPECIALTIES}})),[N]),ae=t.useMemo((()=>E.default(Y,400)),[Y]),ie=t.useMemo((()=>E.default(W,400)),[W]),oe=t.useCallback((function(e){D({type:tt.SelectLocation,payload:e}),le(),T&&T(e)}),[M,D]);function le(){var e;R.current&&(null===(e=R.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}return p.useOutsideClick(A,(()=>{D({type:tt.ClickOutsideInputSearchSpecialty})})),t.useEffect((()=>{var t;"denied"===H||Z||D({type:tt.SelectLocation,payload:{name:M("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(t=o.LOCALIZED_SLUGS[j])||void 0===t?void 0:t.ALL}}),k&&k(H,$.geoLocationCoordinates),e&&"granted"===H&&z&&D({type:tt.FocusInputSearch}),q({coordinates:$.geoLocationCoordinates})}),[H]),t.useEffect((()=>{const e=d||{name:M("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:ee.SPECIALTIES};$.selectedSpecialty||D({type:tt.SelectSpecialty,payload:e})}),[d,$.selectedSpecialty]),t.useEffect((()=>{J()}),[]),t.useEffect((()=>{X(N)}),[N]),t.useEffect((()=>{B&&(O?O(B):window.location.href=`${u}${B}`)}),[B]),t.useEffect((()=>{W($.searchKeywords,$,N,L,!0)}),[z,G,N]),x.default.createElement(Ye,{ref:R},x.default.createElement(Pt,{currentTab:N,setCurrentTab:P,isMobile:e,hideTabBookingSearch:v}),x.default.createElement(We,{className:"booking-search-container"},x.default.createElement(Je,null,x.default.createElement("div",{ref:A},x.default.createElement(g.Flex,{gap:"12px",justify:"space-between",align:"center",direction:e?"column":"row",className:"flex-search-input"},"specialty"!==N&&x.default.createElement(wt,{state:$,isMobile:e,dispatch:D,debouncedFetchCitiesByKeyword:ae,selectedLocation:z,onLocationClick:oe,trackingAttributes:C}),x.default.createElement(yt,{type:N,isMobile:e,state:$,dispatch:D,debouncedFetchSearchResults:ie,initalSearchValue:r,focusSearchInput:le,typeInformation:te,trackingAttributes:m,isLoading:Q,hideSpecialtySelection:S,clientSlug:L}),x.default.createElement(g.Button,{size:e?"md":"lg",fullWidth:e,onClick:function(){let e="";const{slug:t}=te[N];let a="";("doctor"===N||"hospital"===N)&&$.selectedSpecialty.id>0&&(a=`&specialtyId=${$.selectedSpecialty.id}`),e="specialty"===N?`/${t}`:`/${z.slug}/${t}`,L===o.CLIENT_GSK&&(e+=`/${L}`),e+=`?q=${K}${a}`,e&&D({type:tt.NavigateTo,payload:e})},styles:{root:{height:e?"40px":"48px"}}},M("booking.searchBar.searchButton"))),!w&&"specialty"!==N&&$.popularKeys.length>0&&x.default.createElement(At,{type:N,state:$,typeInformation:te,dispatch:D}),"specialty"===N&&"search"===V&&x.default.createElement(Tt,{state:$,isMobile:e,dispatch:D,specialties:(null==U?void 0:U.specialty)||[],isLoading:Q})))))},exports.ChevronDown=k,exports.types=$t;
|
|
759
|
+
`,Pt=({currentTab:e,hideTabBookingSearch:i=[],isMobile:o,setCurrentTab:l})=>{const{t:n}=a.useTranslations(),r=t.useMemo((()=>({root:{overflowY:o?"hidden":"initial",overflowX:o?"auto":"initial"},tabsList:{background:"rgba(255, 255, 255, 0)",borderBottom:"none",flexWrap:"nowrap",".mantine-Tabs-tab":{"&:last-child":{"&:after":{display:"none"}}}},tab:{padding:o?"12px 16px 12px 16px":"15px 40px 15px 40px",borderTop:"2px solid transparent",borderBottom:"none",margin:0,borderRadius:0,position:"relative",width:"auto",'&[data-active="true"]':{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:after":{display:"none"},"&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:hover":{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:after":{content:'""',width:"1px",height:"24px",backgroundColor:"#E4E8EC",position:"absolute",right:"-1px"}},tabLabel:{color:"#595959",fontSize:o?"14px":"16px",fontWeight:600,lineHeight:o?"22px":"24px"}})),[o]),c=(()=>{const{t:e}=a.useTranslations();return[{value:"hospital",label:e("booking.searchPopup.hospitals")},{value:"doctor",label:e("booking.searchPopup.doctors")},{value:"service",label:e("booking.searchPopup.services")},{value:"specialty",label:e("booking.searchPopup.specialties")}]})(),d=t.useMemo((()=>c.filter((e=>!i.includes(e.value)))||[]),[i,c]);return x.default.createElement(Nt,{className:"booking-search-tab"},x.default.createElement(s.Container,null,x.default.createElement(g.Tabs,{value:e,onTabChange:e=>{l(e)},styles:r},x.default.createElement(g.Tabs.List,null,d.map((e=>x.default.createElement(g.Tabs.Tab,{value:e.value,key:e.value},n(e.label))))))))};var _t;!function(e){e.doctor="doctor",e.service="hospital_service",e.hospital="hospital_branch"}(_t||(_t={}));var Ft;!function(e){e[e.SPECIALTY=1]="SPECIALTY",e[e.DOCTOR=2]="DOCTOR",e[e.CLINIC=3]="CLINIC",e[e.SERVICE=4]="SERVICE"}(Ft||(Ft={}));var $t=Object.freeze({__proto__:null,get RedirectType(){return Ft}});exports.BookingSearchBar=({isMobile:i,careApiDomain:l,geoLocationPermission:n,geoLocationCoordinates:s,initialSelectedCity:r,initialSearchValue:c="",careFrontDomain:d="/care",isDebug:u=!1,askForGeolocationPermission:p=!1,gaTrackingSearchBar:g,gaTrackingLocationSearch:f,autoCompleteDisabled:m=!1,inputSearchPlaceholder:C="",isOptionAllLocation:b=!1,hideResults:y=[],isNavResultItem:v=!0,routerPush:S,onGeoLocationPermissionChange:w,onSearch:L,onChangeLocation:O})=>{const{t:k,locale:A}=a.useTranslations(),P=t.useRef(null),_=t.useRef(null),[F,$]=t.useState(void 0),[D,B]=t.useState(!1),{geoLocationPermission:V,geoLocationCoordinates:K,requestGeoLocation:H}=I(),[z,Z]=t.useReducer(me,he,(e=>Object.assign(Object.assign({},e),{isDebug:u,isMobile:i,geoLocationPermission:n||V||"unset",geoLocationCoordinates:s||K||null,searchKeywords:c,initialSelectedCity:r||null,selectedLocation:r||e.selectedLocation||null,searchLocationKeywords:(null==r?void 0:r.name)||e.searchLocationKeywords,autoCompleteDisabled:m,inputSearchPlaceholder:C,locale:A}))),{navigateTo:U,focused:Q,isLoadingCities:q,cities:Y,searchKeywords:W,geoLocationPermission:J,selectedLocation:X,initialSelectedCity:ee,defaultCity:te,searchResults:ae,isLoadingSearchResults:ie,isMobileModalOpened:oe,inputSearchPlaceholder:ne}=z,{fetchCitiesByLocation:se,fetchCitiesByKeyword:re,fetchSearchResults:ce}=function({dispatch:e,careApiDomain:a,locale:i="vi-VN"}){const l=t.useCallback((function(t,o={}){const l=`${a}${t}`;return e({type:ge.FetchCitiesStart}),fetch(qe(l,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:ge.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:t.useCallback((function({coordinates:t}){let a={};const o={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(o.noPaging=1);const n=[l(h.PATHS.GET_CITY_BY_IP,Object.assign(Object.assign({},a),o))];return"zh-TW"===i&&n.push(l(h.PATHS.GET_CITIES_LIST,{noPaging:1})),Promise.all(n).then((([t,a])=>{const i=Object.assign({},t);if(a){const e=i.cities.map((e=>e.id));i.cities=i.cities.concat(a.cities.filter((t=>!e.includes(t.id))))}e({type:ge.FetchCitiesByGeoIpComplete,payload:i})})).catch((e=>console.error("error loading cities by location",e)))}),[i,a,e]),fetchCitiesByKeyword:t.useCallback((function(t){return l(h.PATHS.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:ge.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,a,e]),fetchSearchResults:t.useCallback((function(t,l){const n=`${a}${h.PATHS.GET_SEARCH_V2}`;e({type:ge.FetchSearchResultsStart});const{defaultCity:s,selectedLocation:r,geoLocationCoordinates:c}=l;let d="";if(!r||!s)return void e({type:ge.FetchSearchResultsFinish});r.id===o.ID_OPTION_CURRENT_LOCATION?c||(d=s.id):d=r.id===o.ID_OPTION_ALL_LOCATION?"":r.id;const u=(null==c?void 0:c.lat)||"",p=(null==c?void 0:c.lng)||"";return fetch(qe(n,{domain:a,searchType:"global",keyword:t.trim().length>pe[i]?t.trim():"",city:d===o.ID_OPTION_CURRENT_LOCATION?"":d,lat:u,lng:p},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>e({type:ge.FetchSearchResultsComplete,payload:t}))).catch((e=>{console.log("error loading search results",{url:n,error:e})})).finally((()=>e({type:ge.FetchSearchResultsFinish})))}),[i,a,e])}}({dispatch:Z,locale:A,careApiDomain:l}),de=t.useMemo((()=>{var e;return{id:o.ID_OPTION_CURRENT_LOCATION,name:k("booking.searchBar.currentLocation"),slug:null===(e=o.LOCALIZED_SLUGS[A])||void 0===e?void 0:e.CURRENT}}),[k,A]),fe=t.useMemo((()=>E.default(re,400)),[re]),Ce=t.useMemo((()=>E.default(ce,400)),[ce]);t.useEffect((()=>{""!==c&&c!==z.searchKeywords&&Z({type:ge.UpdateInitialSearchValue,payload:c})}),[c]),t.useEffect((()=>{p&&(null==X?void 0:X.id)===o.ID_OPTION_CURRENT_LOCATION&&"unset"===J&&H()}),[p,X,J]),t.useEffect((()=>{n||J===V||("granted"===V&&K?Z({type:ge.GrantGeoLocationPermission,payload:K}):"denied"===V&&Z({type:ge.DenyGeoLocationPermission}))}),[J,V,K,n]),t.useEffect((()=>{U&&(S?S(U):window.location.href=`${d}${U}`)}),[U]);const be=t.useCallback((function(){Z({type:ge.SelectCurrentLocation,payload:de})}),[k,Z]);t.useEffect((()=>{var e;"denied"===J||ee||Z({type:ge.SelectLocation,payload:{name:k("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(e=o.LOCALIZED_SLUGS[A])||void 0===e?void 0:e.ALL}}),w&&w(J,z.geoLocationCoordinates),i&&"granted"===J&&X&&Z({type:ge.FocusInputSearch}),se({coordinates:z.geoLocationCoordinates})}),[J]),t.useEffect((()=>{X&&te&&ce(z.searchKeywords,z)}),[X,te]),t.useEffect((()=>{C!==ne&&Z({type:ge.SetInputSearchPlaceholder,payload:C})}),[C,ne]),t.useEffect((()=>{oe?document.body.classList.add("care-popup-open"):document.body.classList.remove("care-popup-open")}),[oe]);const ye=t.useCallback((function(e){"ms-MY"===A&&B(!0),Z({type:ge.SelectLocation,payload:e}),"ms-MY"!==A&&Ee(),O&&O(e)}),[k,Z]);function ve(){"ms-MY"===A&&B(!0),i&&"granted"!==z.geoLocationPermission?H():(be(),"ms-MY"!==A&&Ee())}function xe(){var e;P.current&&(null===(e=P.current.querySelector('input[name="search-location"]'))||void 0===e||e.focus())}function Ee(){var e;P.current&&(null===(e=P.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function Se(){Z({type:ge.CloseMobileModal})}function we(){return"location"!==Q?null:x.default.createElement(G,{isLoading:q,cities:Y,onLocationClick:ye,onCurrentLocationClick:ve,isLocationLoading:q,geoLocationPermission:J,selectedLocation:X,isOptionAllLocation:b})}function ke(){return"search"!==Q?null:z.autoCompleteDisabled?i?x.default.createElement(Le,{onClick:()=>{L({cityId:z.selectedLocation.id,keyword:W}),Se()}}):null:x.default.createElement(Qe,{data:ae,state:z,dispatch:Z,isMobile:!1,keyword:W,isLoading:ie,hideResults:y,isNavResultItem:v})}function Ie(){return x.default.createElement(Oe,{isMobile:i,state:z,dispatch:Z,debouncedFetchCitiesByKeyword:fe,debouncedFetchSearchResults:Ce,focusLocationInput:xe,focusSearchInput:Ee,renderLocationResults:we,renderSearchResults:ke,trackingAttributes:g,locationTrackingAttributes:f,onSearch:L,initalSearchValue:c})}return t.useEffect((()=>{if(window.visualViewport){const e=e=>{const t=e.target;$(null==t?void 0:t.height)};return window.visualViewport.addEventListener("resize",e,{passive:!0}),()=>{window.visualViewport.removeEventListener("resize",e)}}}),[$]),t.useEffect((()=>{if(X&&D&&"ms-MY"===A){const e=`/${X.slug}/hospital`;Z({type:ge.NavigateTo,payload:e}),B(!1)}}),[D,A,X]),i?x.default.createElement(x.default.Fragment,null,x.default.createElement(N,null),x.default.createElement(R,{ref:_}),x.default.createElement(j,{id:"booking-search-bar",ref:P,"data-is-modal":i&&oe,style:{"--mobile-care-searchbar-height":oe&&F?`${F}px`:"100%"}},oe?x.default.createElement(x.default.Fragment,null,x.default.createElement(M,null,x.default.createElement(ue,{headingText:k("booking.searchBar.searchButton"),onLeftClick:Se}),Ie()),we(),ke()):x.default.createElement(le,{onClick:function(){var t;return e.__awaiter(this,void 0,void 0,(function*(){_.current&&_.current.focus(),Z({type:ge.OpenMobileModal}),yield Promise.resolve(),P.current&&(null===(t=P.current.querySelector('input[name="search-location"]'))||void 0===t||t.focus())}))},focused:Q,value:W,trackingAttributes:g,inputSearchPlaceholder:C}))):x.default.createElement(T,{id:"booking-search-bar",ref:P},Ie())},exports.BookingSearchBarV2=({isMobile:e,careApiDomain:i,geoLocationPermission:l,geoLocationCoordinates:n,initialSelectedCity:s,initialSearchValue:r="",initTypeSearch:c="hospital",initSpecialty:d,careFrontDomain:u="/care",isDebug:f=!1,gaTrackingSearchBar:m,gaTrackingLocationSearch:C,autoCompleteDisabled:b=!1,inputSearchPlaceholder:y="",hideTabBookingSearch:v=[],hideSpecialtySelection:S=!1,hidePopularSearchKeys:w=!1,clientSlug:L="",routerPush:O,onGeoLocationPermissionChange:k,onChangeLocation:T})=>{const{locale:j,t:M}=a.useTranslations(),R=t.useRef(null),A=t.useRef(null),[N,P]=t.useState(c),{geoLocationPermission:_,geoLocationCoordinates:F}=I(),[$,D]=t.useReducer(it,et,(t=>Object.assign(Object.assign({},t),{isDebug:f,isMobile:e,geoLocationPermission:l||_||"unset",geoLocationCoordinates:n||F||null,searchKeywords:r,initialSelectedCity:s||null,selectedLocation:s||t.selectedLocation||null,searchLocationKeywords:(null==s?void 0:s.name)||t.searchLocationKeywords,autoCompleteDisabled:b,inputSearchPlaceholder:y,locale:j}))),{navigateTo:B,focusedSpecialty:V,searchKeywords:K,geoLocationPermission:H,selectedLocation:z,selectedSpecialty:G,initialSelectedCity:Z,searchResults:U,isLoadingSearchResults:Q}=$,{fetchCitiesByLocation:q,fetchCitiesByKeyword:Y,fetchSearchResults:W,fetchAllSpecialties:J,fetchPopularKeys:X}=function({dispatch:e,careApiDomain:a,locale:i="vi-VN",client:l=""}){const n=t.useCallback((function(t,o={}){const l=`${a}${t}`;return e({type:tt.FetchCitiesStart}),fetch(qe(l,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:tt.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:t.useCallback((function({coordinates:t}){let a={};const o={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(o.noPaging=1);const s=[n(h.PATHS.GET_CITY_BY_IP,Object.assign(Object.assign(Object.assign({},a),o),{client:l}))];return"zh-TW"===i&&s.push(n(h.PATHS.GET_CITIES_LIST,{noPaging:1,client:l})),Promise.all(s).then((([t,a])=>{const i=Object.assign({},t);if(a){const e=i.cities.map((e=>e.id));i.cities=i.cities.concat(a.cities.filter((t=>!e.includes(t.id))))}e({type:tt.FetchCitiesByGeoIpComplete,payload:i})})).catch((e=>console.error("error loading cities by location",e)))}),[i,a,e]),fetchCitiesByKeyword:t.useCallback((function(t){return n(h.PATHS.GET_CITIES_LIST,{keyword:t,client:l}).then((t=>{e({type:tt.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,a,e]),fetchSearchResults:t.useCallback((function(t,l,n,s,r){const c="specialty"===n?`${a}${h.PATHS.GET_SEARCH_SPECIALTY}`:`${a}${h.PATHS.GET_SEARCH_V2}`;e({type:tt.FetchSearchResultsStart});const{selectedLocation:d,geoLocationCoordinates:u,selectedSpecialty:p}=l;let g="";if(!d)return void e({type:tt.FetchSearchResultsFinish});g=d.id===o.ID_OPTION_ALL_LOCATION?"":d.id;const f=(null==u?void 0:u.lat)||"",m=(null==u?void 0:u.lng)||"",C=(null==p?void 0:p.id)>0?null==p?void 0:p.id:"",b=t.trim().length>Xe[i]?t.trim():"";return fetch(qe(c,{domain:a,searchType:n||"global",keyword:b,city:g===o.ID_OPTION_CURRENT_LOCATION?"":g,lat:f,lng:m,specialty_id:C,client_slug:s},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{let a=[];"specialty"!==n&&(a=t.searches),"specialty"===n&&(a=b?t.specialties:t.default),e({type:tt.FetchSearchResultsComplete,payload:{key:n,searches:a||[]}}),r&&e({type:tt.UpdateInitialSearchResults,payload:{key:n,searches:a||[]}})})).catch((e=>{console.log("error loading search results",{url:c,error:e})})).finally((()=>e({type:tt.FetchSearchResultsFinish})))}),[i,a,e]),fetchAllSpecialties:t.useCallback((function(){const t=`${a}${h.PATHS.GET_SEARCH_SPECIALTY}`;return fetch(qe(t,{domain:a,searchType:""},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:tt.FetchAllSpecialties,payload:t.specialties||[]})})).catch((e=>{console.log("error loading search results",{url:t,error:e})}))}),[i,a,e]),fetchPopularKeys:t.useCallback((function(t){const o=`${a}${h.PATHS.GET_SEARCH_POPULAR_KEY}`;return fetch(qe(o,{domain:a,searchType:_t[t],sort_by:"display_order",sort_order:"asc"},i)).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:tt.FetchPopularKeys,payload:t.popular_searches||[]})})).catch((e=>{console.log("error loading search results",{url:o,error:e})}))}),[i,a,e])}}({dispatch:D,locale:j,careApiDomain:i,client:L}),ee=t.useMemo((()=>o.LOCALIZED_SLUGS[j]),[j]),te=t.useMemo((()=>({doctor:{name:M("booking.searchPopup.doctors"),icon:x.default.createElement(gt,null),slug:ee.DOCTOR},service:{name:M("booking.searchPopup.services"),icon:x.default.createElement(ft,null),slug:ee.SERVICE},hospital:{name:M("booking.searchPopup.hospitals"),icon:x.default.createElement(mt,null),slug:ee.HOSPITAL},specialty:{name:M("booking.searchPopup.specialties"),icon:x.default.createElement(Ct,null),slug:ee.SPECIALTIES}})),[N]),ae=t.useMemo((()=>E.default(Y,400)),[Y]),ie=t.useMemo((()=>E.default(W,400)),[W]),oe=t.useCallback((function(e){D({type:tt.SelectLocation,payload:e}),le(),T&&T(e)}),[M,D]);function le(){var e;R.current&&(null===(e=R.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}return p.useOutsideClick(A,(()=>{D({type:tt.ClickOutsideInputSearchSpecialty})})),t.useEffect((()=>{var t;"denied"===H||Z||D({type:tt.SelectLocation,payload:{name:M("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(t=o.LOCALIZED_SLUGS[j])||void 0===t?void 0:t.ALL}}),k&&k(H,$.geoLocationCoordinates),e&&"granted"===H&&z&&D({type:tt.FocusInputSearch}),q({coordinates:$.geoLocationCoordinates})}),[H]),t.useEffect((()=>{const e=d||{name:M("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:ee.SPECIALTIES};$.selectedSpecialty||D({type:tt.SelectSpecialty,payload:e})}),[d,$.selectedSpecialty]),t.useEffect((()=>{J()}),[]),t.useEffect((()=>{X(N)}),[N]),t.useEffect((()=>{B&&(O?O(B):window.location.href=`${u}${B}`)}),[B]),t.useEffect((()=>{W($.searchKeywords,$,N,L,!0)}),[z,G,N]),x.default.createElement(Ye,{ref:R},x.default.createElement(Pt,{currentTab:N,setCurrentTab:P,isMobile:e,hideTabBookingSearch:v}),x.default.createElement(We,{className:"booking-search-container"},x.default.createElement(Je,null,x.default.createElement("div",{ref:A},x.default.createElement(g.Flex,{gap:"12px",justify:"space-between",align:"center",direction:e?"column":"row",className:"flex-search-input"},"specialty"!==N&&x.default.createElement(wt,{state:$,isMobile:e,dispatch:D,debouncedFetchCitiesByKeyword:ae,selectedLocation:z,onLocationClick:oe,trackingAttributes:C}),x.default.createElement(yt,{type:N,isMobile:e,state:$,dispatch:D,debouncedFetchSearchResults:ie,initalSearchValue:r,focusSearchInput:le,typeInformation:te,trackingAttributes:m,isLoading:Q,hideSpecialtySelection:S,clientSlug:L}),x.default.createElement(g.Button,{size:e?"md":"lg",color:"#2D87F3",fullWidth:e,variant:"filled",onClick:function(){let e="";const{slug:t}=te[N];let a="";("doctor"===N||"hospital"===N)&&$.selectedSpecialty.id>0&&(a=`&specialtyId=${$.selectedSpecialty.id}`),e="specialty"===N?`/${t}`:`/${z.slug}/${t}`,L===o.CLIENT_GSK&&(e+=`/${L}`),e+=`?q=${K}${a}`,e&&D({type:tt.NavigateTo,payload:e})},styles:{root:{height:e?"40px":"48px"}}},M("booking.searchBar.searchButton"))),!w&&"specialty"!==N&&$.popularKeys.length>0&&x.default.createElement(At,{type:N,state:$,typeInformation:te,dispatch:D}),"specialty"===N&&"search"===V&&x.default.createElement(Tt,{state:$,isMobile:e,dispatch:D,specialties:(null==U?void 0:U.specialty)||[],isLoading:Q})))))},exports.ChevronDown=k,exports.types=$t;
|