@hhgtech/hhg-components 1.27.111 → 1.27.113
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/babyGrowth.js +2 -2
- package/build/cache.js +1 -1
- package/build/care/components/organisms/bookingSearchBarV2/index.d.ts +2 -1
- package/build/care/components/organisms/bookingSearchBarV2/searchInputs/index.d.ts +3 -2
- package/build/care/components/organisms/bookingSearchBarV2/searchResult/index.d.ts +2 -1
- package/build/care/components/organisms/bookingSearchBarV2/useSearchBarApi.d.ts +1 -1
- package/build/care/interfaces/constants.d.ts +1 -0
- package/build/care.js +1 -1
- package/build/components/molecules/index.d.ts +3 -3
- package/build/components/molecules/{premiumNewsletterBanner → surveyOrPremiumBanner}/bannerWithOption/index.d.ts +2 -0
- package/build/{esm/components/molecules/premiumNewsletterBanner → components/molecules/surveyOrPremiumBanner}/bannerWithOption/index.styles.d.ts +1 -0
- package/build/components/molecules/{premiumNewsletterBanner → surveyOrPremiumBanner}/constants.d.ts +41 -7
- package/build/components/molecules/{premiumNewsletterBanner → surveyOrPremiumBanner}/context.d.ts +7 -4
- package/build/components/molecules/surveyOrPremiumBanner/index.d.ts +15 -0
- package/build/components/molecules/surveyOrPremiumBanner/surveyBanner.d.ts +3 -0
- package/build/components/molecules/{premiumNewsletterBanner → surveyOrPremiumBanner}/toolBanner.d.ts +1 -0
- package/build/components/molecules/{premiumNewsletterBanner → surveyOrPremiumBanner}/types.d.ts +5 -0
- package/build/components.js +1 -1
- package/build/{constants-549daccd.js → constants-fd82a887.js} +1 -1
- package/build/constants.js +1 -1
- package/build/{core-cf08ddba.js → core-5c4c9018.js} +1 -1
- package/build/ecom.js +1 -1
- package/build/esm/babyGrowth.js +5 -5
- package/build/esm/cache.js +1 -1
- package/build/esm/care/components/organisms/bookingSearchBarV2/index.d.ts +2 -1
- package/build/esm/care/components/organisms/bookingSearchBarV2/searchInputs/index.d.ts +3 -2
- package/build/esm/care/components/organisms/bookingSearchBarV2/searchResult/index.d.ts +2 -1
- package/build/esm/care/components/organisms/bookingSearchBarV2/useSearchBarApi.d.ts +1 -1
- package/build/esm/care/interfaces/constants.d.ts +1 -0
- package/build/esm/care.js +1 -1
- package/build/esm/components/molecules/index.d.ts +3 -3
- package/build/esm/components/molecules/{premiumNewsletterBanner → surveyOrPremiumBanner}/bannerWithOption/index.d.ts +2 -0
- package/build/{components/molecules/premiumNewsletterBanner → esm/components/molecules/surveyOrPremiumBanner}/bannerWithOption/index.styles.d.ts +1 -0
- package/build/esm/components/molecules/{premiumNewsletterBanner → surveyOrPremiumBanner}/constants.d.ts +41 -7
- package/build/esm/components/molecules/{premiumNewsletterBanner → surveyOrPremiumBanner}/context.d.ts +7 -4
- package/build/esm/components/molecules/surveyOrPremiumBanner/index.d.ts +15 -0
- package/build/esm/components/molecules/surveyOrPremiumBanner/surveyBanner.d.ts +3 -0
- package/build/esm/components/molecules/{premiumNewsletterBanner → surveyOrPremiumBanner}/toolBanner.d.ts +1 -0
- package/build/esm/components/molecules/{premiumNewsletterBanner → surveyOrPremiumBanner}/types.d.ts +5 -0
- package/build/esm/components.js +1 -1
- package/build/esm/{constants-9b0dfbff.js → constants-66251709.js} +1 -1
- package/build/esm/constants.js +1 -1
- package/build/esm/{core-d5723cfb.js → core-256cda08.js} +1 -1
- package/build/esm/ecom.js +1 -1
- package/build/esm/{fixedBottomAdBlock-d6fb6721.js → fixedBottomAdBlock-42a0fc3b.js} +1 -1
- package/build/esm/footer.js +1 -1
- package/build/esm/gAssets.js +1 -1
- package/build/esm/{getDynamicHealthTool-29f9213b.js → getDynamicHealthTool-0e9dffaf.js} +1 -1
- package/build/esm/{getSocialList-25ba1828.js → getSocialList-04ad7465.js} +1 -1
- package/build/esm/hooks.js +1 -1
- package/build/esm/i18n-values/vi-VN.js +1 -1
- package/build/esm/i18n-values/vi-VN_MB.js +1 -1
- package/build/esm/i18n.js +1 -1
- package/build/esm/i18nV2.js +1 -1
- package/build/esm/{index-901e79c9.js → index-1f31ee2c.js} +1 -1
- package/build/esm/{index-bc78096c.js → index-2472bb2e.js} +1 -1
- package/build/esm/{index-8f77e3ae.js → index-37ac3e0a.js} +2 -2
- package/build/esm/{index-cdf8cd15.js → index-40352094.js} +23 -23
- package/build/esm/index-404d6f42.js +1 -0
- package/build/esm/{index-e8ef71b5.js → index-4b0913ef.js} +1 -1
- package/build/esm/{index-d1e0f7da.js → index-4ef01662.js} +1 -1
- package/build/esm/{index-3cb58b69.js → index-5b15422c.js} +1 -1
- package/build/esm/{index-3de4e500.js → index-671bebd2.js} +1 -1
- package/build/esm/{index-e6e6e936.js → index-6bfebf91.js} +1 -1
- package/build/esm/{index-48be4929.js → index-79cd66c0.js} +1 -1
- package/build/esm/{index-5cb8c0d8.js → index-7ea25330.js} +1 -1
- package/build/esm/index-9a6cbd76.js +1 -0
- package/build/esm/{index-2c2ab0e9.js → index-9dc3058e.js} +1 -1
- package/build/esm/{index-7ae73b73.js → index-aab6e937.js} +4 -4
- package/build/esm/{index-2f93c125.js → index-c04a8332.js} +1 -1
- package/build/esm/{index-0e498cef.js → index-c20147f5.js} +1 -1
- package/build/esm/{index-0243a82f.js → index-c52c6d1d.js} +1 -1
- package/build/esm/{index-d5f79d3b.js → index-c9c1af14.js} +1 -1
- package/build/esm/{index-119f7391.js → index-d533e676.js} +1 -1
- package/build/esm/{index-7c08eeef.js → index-f9338e27.js} +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/{index.styled-7e34321a.js → index.styled-8ad8796f.js} +1 -1
- package/build/esm/{index.styled-96bddf4c.js → index.styled-c742d0a3.js} +4 -4
- package/build/esm/{index.styled-a4fcd334.js → index.styled-ce98cbc1.js} +1 -1
- package/build/esm/{index.styles-7c303c91.js → index.styles-952b0f4b.js} +1 -1
- 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/{normalizeLink-89628601.js → normalizeLink-58957b47.js} +1 -1
- package/build/esm/onboarding.js +1 -1
- package/build/esm/onboardingV2.js +18 -18
- package/build/esm/paths-46458204.js +1 -0
- package/build/esm/pwg.js +1 -1
- package/build/esm/together.js +1 -1
- package/build/esm/{types-768250f5.js → types-0cbaa281.js} +130 -130
- package/build/esm/{types-24eea7b5.js → types-27c16503.js} +1 -1
- package/build/esm/types.js +1 -1
- package/build/esm/{useCategory-6ce39bff.js → useCategory-bfba2de5.js} +1 -1
- package/build/esm/useHealthToolCache-b9973713.js +1 -0
- package/build/esm/{useRafState-974935f5.js → useRafState-66b5f663.js} +1 -1
- package/build/esm/useTranslations-b2f04ab6.js +1 -0
- package/build/esm/{utils-12e2c810.js → utils-33c4c832.js} +1 -1
- package/build/esm/vaccination.js +12 -12
- package/build/{fixedBottomAdBlock-6d47251b.js → fixedBottomAdBlock-664a6e50.js} +1 -1
- package/build/footer.js +1 -1
- package/build/gAssets.js +1 -1
- package/build/{getDynamicHealthTool-4b545469.js → getDynamicHealthTool-571597e0.js} +1 -1
- package/build/{getSocialList-8f83dc95.js → getSocialList-2d43911c.js} +1 -1
- package/build/hooks.js +1 -1
- package/build/i18n-values/vi-VN.js +1 -1
- package/build/i18n-values/vi-VN_MB.js +1 -1
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/{index-f168badd.js → index-22a4d8ec.js} +1 -1
- package/build/{index-2a0f61e2.js → index-2584fe83.js} +2 -2
- package/build/{index-187e0f1f.js → index-2db33f49.js} +1 -1
- package/build/{index-f2c0dc10.js → index-32d3a385.js} +1 -1
- package/build/{index-7c01f515.js → index-4efa8e7e.js} +1 -1
- package/build/{index-f8421eda.js → index-537bccbe.js} +1 -1
- package/build/{index-203f0a9a.js → index-55a6f97a.js} +1 -1
- package/build/index-58609826.js +1 -0
- package/build/{index-2d3c34aa.js → index-5b7dfda4.js} +1 -1
- package/build/{index-ec7f28e5.js → index-63632fd5.js} +1 -1
- package/build/{index-c3a8adc8.js → index-8383af12.js} +1 -1
- package/build/{index-5014f061.js → index-9669998e.js} +1 -1
- package/build/{index-1740c5b8.js → index-9f6e2696.js} +29 -29
- package/build/{index-55035468.js → index-a89b23de.js} +1 -1
- package/build/{index-8212d168.js → index-b99409f1.js} +1 -1
- package/build/{index-5c07473f.js → index-bc8fcf35.js} +1 -1
- package/build/{index-0b75ad2a.js → index-c57b487f.js} +1 -1
- package/build/{index-615024b7.js → index-dad94e78.js} +2 -2
- package/build/{index-dde6cb12.js → index-e022af07.js} +1 -1
- package/build/{index-ca4a57b8.js → index-e7f2e80f.js} +1 -1
- package/build/{index-410406ae.js → index-f36821a3.js} +1 -1
- package/build/index.js +1 -1
- package/build/{index.styled-a5b7f642.js → index.styled-0d4d68f3.js} +1 -1
- package/build/{index.styled-25fca885.js → index.styled-90c35fc5.js} +1 -1
- package/build/index.styled-b9465af1.js +50 -0
- package/build/{index.styles-64093d61.js → index.styles-9285e23d.js} +1 -1
- 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/{normalizeLink-9a714adb.js → normalizeLink-28258895.js} +1 -1
- package/build/onboarding.js +1 -1
- package/build/onboardingV2.js +5 -5
- package/build/paths-2ac2ae14.js +1 -0
- package/build/pwg.js +1 -1
- package/build/together.js +1 -1
- package/build/{types-40cab689.js → types-90d8b488.js} +4 -4
- package/build/{types-1b10750d.js → types-ffea7b45.js} +1 -1
- package/build/types.js +1 -1
- package/build/{useCategory-fbc07a2d.js → useCategory-971481b4.js} +1 -1
- package/build/{useHealthToolCache-8b40316a.js → useHealthToolCache-10f561aa.js} +1 -1
- package/build/{useRafState-779e60e7.js → useRafState-5cd3ac64.js} +1 -1
- package/build/{useTranslations-424bb567.js → useTranslations-2e7d64aa.js} +1 -1
- package/build/{utils-028b83bf.js → utils-2fb6eb7d.js} +1 -1
- package/build/vaccination.js +1 -1
- package/package.json +1 -1
- package/build/components/molecules/premiumNewsletterBanner/index.d.ts +0 -15
- package/build/components/molecules/premiumNewsletterBanner/testingBanner.d.ts +0 -3
- package/build/esm/components/molecules/premiumNewsletterBanner/index.d.ts +0 -15
- package/build/esm/components/molecules/premiumNewsletterBanner/testingBanner.d.ts +0 -3
- package/build/esm/index-425660a4.js +0 -1
- package/build/esm/index-bcb2f9a4.js +0 -1
- package/build/esm/paths-fa0a821f.js +0 -1
- package/build/esm/useHealthToolCache-e9192e5e.js +0 -1
- package/build/esm/useTranslations-2430a2a0.js +0 -1
- package/build/index-474f4921.js +0 -1
- package/build/index.styled-c6850e52.js +0 -50
- package/build/paths-28b1bd97.js +0 -1
- /package/build/{BMI_BOYS.percentile.monthly-2169926f.js → BMI_BOYS.percentile.monthly-5b917714.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-6d5061c6.js → BMI_BOYS.percentile.weekly-9566eb37.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-5f739100.js → BMI_BOYS.percentile.yearly-db737739.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-75e11545.js → BMI_BOYS.zscore.monthly-86f68a0b.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-b3556b6a.js → BMI_BOYS.zscore.weekly-92d923b0.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-4ebe038f.js → BMI_BOYS.zscore.yearly-4d92f086.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-05e28f78.js → BMI_GIRLS.percentile.monthly-6a6d1837.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-4054b056.js → BMI_GIRLS.percentile.weekly-5589d39f.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-6d9f3e1c.js → BMI_GIRLS.percentile.yearly-15c4d279.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-344ed489.js → BMI_GIRLS.zscore.monthly-667e63fd.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-7577fdd6.js → BMI_GIRLS.zscore.weekly-3fdeccfe.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-0026b96e.js → BMI_GIRLS.zscore.yearly-ea25f63d.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-4770cf38.js → HEAD CIRCUM_BOYS.percentile.monthly-6db968ca.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-51ffefe5.js → HEAD CIRCUM_BOYS.percentile.weekly-2a4e9201.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-8d887c12.js → HEAD CIRCUM_BOYS.percentile.yearly-c566092e.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-f4380098.js → HEAD CIRCUM_BOYS.zscore.monthly-03fc7b94.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-225f6e87.js → HEAD CIRCUM_BOYS.zscore.weekly-faa83c6d.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-1b185e52.js → HEAD CIRCUM_BOYS.zscore.yearly-629071b8.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-d33665c2.js → HEAD CIRCUM_GIRLS.percentile.monthly-fd8e09c4.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-e03ab684.js → HEAD CIRCUM_GIRLS.percentile.weekly-d7bc181c.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-dccddafd.js → HEAD CIRCUM_GIRLS.percentile.yearly-2c18bf98.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-f3770a5a.js → HEAD CIRCUM_GIRLS.zscore.monthly-8d909763.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-f380c4a3.js → HEAD CIRCUM_GIRLS.zscore.weekly-018ebd5c.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-213f9e26.js → HEAD CIRCUM_GIRLS.zscore.yearly-f4da36f0.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-159b23b3.js → HEIGHT_BOYS.percentile.monthly-4bcc65ef.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-dea84dd9.js → HEIGHT_BOYS.percentile.weekly-7c769b89.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-43132dd4.js → HEIGHT_BOYS.percentile.yearly-3f50eba5.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-6386157d.js → HEIGHT_BOYS.zscore.monthly-a78a7a26.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-8c95e60e.js → HEIGHT_BOYS.zscore.weekly-caab37b3.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-a20e1e60.js → HEIGHT_BOYS.zscore.yearly-c2d46f1f.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-c35ca151.js → HEIGHT_GIRLS.percentile.monthly-b3265a7d.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-55efadc3.js → HEIGHT_GIRLS.percentile.weekly-69403da3.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-67a99ecb.js → HEIGHT_GIRLS.percentile.yearly-5f19a816.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-60034a31.js → HEIGHT_GIRLS.zscore.monthly-e56cd9ff.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-637e4002.js → HEIGHT_GIRLS.zscore.weekly-cfbee1ac.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-dff229f7.js → HEIGHT_GIRLS.zscore.yearly-603fd96e.js} +0 -0
- /package/build/{Onboarding-b6d46718.js → Onboarding-2b01db17.js} +0 -0
- /package/build/{Visible-c0d87c4f.js → Visible-7e3703b1.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-5b2fbdb5.js → WEIGHT_BOYS.percentile.monthly-df2b38ad.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-31324827.js → WEIGHT_BOYS.percentile.weekly-017d4587.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-99b220b3.js → WEIGHT_BOYS.percentile.yearly-d98f06d0.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-37df73d8.js → WEIGHT_BOYS.zscore.monthly-3efc2926.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-97539687.js → WEIGHT_BOYS.zscore.weekly-1478e955.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-018cd3f2.js → WEIGHT_BOYS.zscore.yearly-96592d44.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-94194d40.js → WEIGHT_GIRLS.percentile.monthly-7990f762.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-4092c807.js → WEIGHT_GIRLS.percentile.weekly-4b98de90.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-80188db3.js → WEIGHT_GIRLS.percentile.yearly-5686e441.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-aa93af02.js → WEIGHT_GIRLS.zscore.monthly-76c7187f.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-d5f6108b.js → WEIGHT_GIRLS.zscore.weekly-bc5910e8.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-dadd5a9c.js → WEIGHT_GIRLS.zscore.yearly-07b83056.js} +0 -0
- /package/build/components/molecules/{premiumNewsletterBanner → surveyOrPremiumBanner}/bannerLayout.d.ts +0 -0
- /package/build/components/molecules/{premiumNewsletterBanner → surveyOrPremiumBanner}/handlerBanner.d.ts +0 -0
- /package/build/{cookieHelper-5e232b89.js → cookieHelper-47e34efa.js} +0 -0
- /package/build/{dataTransform-e616f86a.js → dataTransform-fe677610.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-a21c2804.js → BMI_BOYS.percentile.monthly-9e7fdff9.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-660eb5a0.js → BMI_BOYS.percentile.weekly-109aa882.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-4472b493.js → BMI_BOYS.percentile.yearly-2f4904a4.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-ef6d5124.js → BMI_BOYS.zscore.monthly-b7818505.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-2850e334.js → BMI_BOYS.zscore.weekly-8a8c6e60.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-7675f189.js → BMI_BOYS.zscore.yearly-259d827f.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-ccb1ae23.js → BMI_GIRLS.percentile.monthly-4c85f2e2.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-01af9f62.js → BMI_GIRLS.percentile.weekly-52780dde.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-3b4ff210.js → BMI_GIRLS.percentile.yearly-d552f7ff.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-78346cd2.js → BMI_GIRLS.zscore.monthly-70736759.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-1354bad8.js → BMI_GIRLS.zscore.weekly-09d9a498.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-123cd996.js → BMI_GIRLS.zscore.yearly-787a71f2.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-b7a46cec.js → HEAD CIRCUM_BOYS.percentile.monthly-3dc23858.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-daadf38b.js → HEAD CIRCUM_BOYS.percentile.weekly-fc90a435.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-c64d87f6.js → HEAD CIRCUM_BOYS.percentile.yearly-d311328c.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-17a992e7.js → HEAD CIRCUM_BOYS.zscore.monthly-a4105e49.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-a858df78.js → HEAD CIRCUM_BOYS.zscore.weekly-1602faff.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-18fce9ea.js → HEAD CIRCUM_BOYS.zscore.yearly-314d87f2.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-7a8b8a72.js → HEAD CIRCUM_GIRLS.percentile.monthly-1755894d.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-4efe8114.js → HEAD CIRCUM_GIRLS.percentile.weekly-eff64869.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-bd019865.js → HEAD CIRCUM_GIRLS.percentile.yearly-ec836bd1.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-5f663a70.js → HEAD CIRCUM_GIRLS.zscore.monthly-45824afc.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-39129ae0.js → HEAD CIRCUM_GIRLS.zscore.weekly-3dda450c.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-b7fee04a.js → HEAD CIRCUM_GIRLS.zscore.yearly-47d31d6a.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-0f86faa9.js → HEIGHT_BOYS.percentile.monthly-8e3e5eea.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-799ce0a2.js → HEIGHT_BOYS.percentile.weekly-4fd1e4f0.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-3f3c2f4d.js → HEIGHT_BOYS.percentile.yearly-a72efc6f.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-40b79033.js → HEIGHT_BOYS.zscore.monthly-bbc5d61a.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-335e16b8.js → HEIGHT_BOYS.zscore.weekly-be4b43d4.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-1052e7c2.js → HEIGHT_BOYS.zscore.yearly-41fab017.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-5c1c2fda.js → HEIGHT_GIRLS.percentile.monthly-5960d7bc.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-185ecd08.js → HEIGHT_GIRLS.percentile.weekly-842b0b35.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-071f0347.js → HEIGHT_GIRLS.percentile.yearly-5e771144.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-7d81ef69.js → HEIGHT_GIRLS.zscore.monthly-a87662f6.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-4bcedfad.js → HEIGHT_GIRLS.zscore.weekly-9974df51.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-3b576a0d.js → HEIGHT_GIRLS.zscore.yearly-036899ae.js} +0 -0
- /package/build/esm/{Onboarding-333aa9dc.js → Onboarding-3631c6d1.js} +0 -0
- /package/build/esm/{Visible-8afbad1e.js → Visible-2bac67a9.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-8674ec9b.js → WEIGHT_BOYS.percentile.monthly-fb78f02c.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-6c8ebad7.js → WEIGHT_BOYS.percentile.weekly-a91de386.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-502a9bab.js → WEIGHT_BOYS.percentile.yearly-ad66fdd2.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-4adc8c4e.js → WEIGHT_BOYS.zscore.monthly-2f39cc76.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-c253912c.js → WEIGHT_BOYS.zscore.weekly-14cc15d4.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-99f50300.js → WEIGHT_BOYS.zscore.yearly-2041fbea.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-8c64fab0.js → WEIGHT_GIRLS.percentile.monthly-3a60ac45.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-44176b94.js → WEIGHT_GIRLS.percentile.weekly-d0fbecca.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-c38faf3c.js → WEIGHT_GIRLS.percentile.yearly-3ae3438e.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-9ce628d3.js → WEIGHT_GIRLS.zscore.monthly-ed2bf2a6.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-77b92300.js → WEIGHT_GIRLS.zscore.weekly-3328de54.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-e12994a8.js → WEIGHT_GIRLS.zscore.yearly-e78ef269.js} +0 -0
- /package/build/esm/components/molecules/{premiumNewsletterBanner → surveyOrPremiumBanner}/bannerLayout.d.ts +0 -0
- /package/build/esm/components/molecules/{premiumNewsletterBanner → surveyOrPremiumBanner}/handlerBanner.d.ts +0 -0
- /package/build/esm/{cookieHelper-198da3c2.js → cookieHelper-2fe90225.js} +0 -0
- /package/build/esm/{dataTransform-c86ebc50.js → dataTransform-532e7457.js} +0 -0
- /package/build/esm/{index-436b7d17.js → index-7df304c0.js} +0 -0
- /package/build/esm/{isProduction-f84e5e5c.js → isProduction-85c6cb19.js} +0 -0
- /package/build/esm/{localizeNumberFormat-f760793d.js → localizeNumberFormat-17475a32.js} +0 -0
- /package/build/esm/{number-ba8724fc.js → number-251f8529.js} +0 -0
- /package/build/esm/{screenSizeContext-26c77dc1.js → screenSizeContext-4ff53e25.js} +0 -0
- /package/build/esm/{theme-cd27574e.js → theme-b5489d82.js} +0 -0
- /package/build/esm/{translationsContext-bf4a1818.js → translationsContext-be2e1844.js} +0 -0
- /package/build/esm/{tslib.es6-830e842d.js → tslib.es6-0405df6a.js} +0 -0
- /package/build/esm/{types-5fdf9e45.js → types-48c94135.js} +0 -0
- /package/build/esm/{useIsInit-c1a1ca52.js → useIsInit-942b94fa.js} +0 -0
- /package/build/esm/{useOutsideClick-7a4c1573.js → useOutsideClick-3450a7a8.js} +0 -0
- /package/build/esm/{useScrollbarSize-cbdd3859.js → useScrollbarSize-11faa525.js} +0 -0
- /package/build/esm/{useUniqueId-159be8a3.js → useUniqueId-d35bf586.js} +0 -0
- /package/build/{index-ba487404.js → index-4046269f.js} +0 -0
- /package/build/{isProduction-d5eaf028.js → isProduction-e1b7813f.js} +0 -0
- /package/build/{localizeNumberFormat-20fdd30c.js → localizeNumberFormat-7424a97a.js} +0 -0
- /package/build/{number-060a39e3.js → number-b3767f34.js} +0 -0
- /package/build/{screenSizeContext-7720eb06.js → screenSizeContext-4d5786c6.js} +0 -0
- /package/build/{theme-177c35d7.js → theme-1a7c14fb.js} +0 -0
- /package/build/{translationsContext-ee716225.js → translationsContext-f962ff63.js} +0 -0
- /package/build/{tslib.es6-fb3ec5b3.js → tslib.es6-0d31715f.js} +0 -0
- /package/build/{types-bee2c39e.js → types-ef750ab6.js} +0 -0
- /package/build/{useIsInit-5e49ad37.js → useIsInit-790b9962.js} +0 -0
- /package/build/{useOutsideClick-6a78771c.js → useOutsideClick-81c62034.js} +0 -0
- /package/build/{useScrollbarSize-dedf0512.js → useScrollbarSize-29ac8766.js} +0 -0
- /package/build/{useUniqueId-6620a12c.js → useUniqueId-86a9e1d4.js} +0 -0
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-0d31715f.js"),a=require("@mantine/core"),n=require("./index.styles-9285e23d.js"),r=require("./index-2db33f49.js");require("dayjs");var o=require("./screenSizeContext-4d5786c6.js"),i=require("styled-components"),l=require("./theme-1a7c14fb.js"),s=require("./index-a89b23de.js");require("./isProduction-e1b7813f.js");var d=require("./Onboarding-2b01db17.js"),u=require("./gAssets.js"),m=require("./useTranslations-2e7d64aa.js");require("./index-dad94e78.js");var c=require("@mantine/hooks"),p=require("./index-4efa8e7e.js");require("lodash/debounce"),require("./useCategory-971481b4.js");var f=require("./Visible-7e3703b1.js"),g=require("@mantine/form"),b=require("./index-5b7dfda4.js");require("@mantine/dates");var h=require("yup"),E=require("react-dom"),C=require("./index-2584fe83.js"),L=require("lodash/throttle"),v=require("./index-e022af07.js"),x=require("./index-b99409f1.js"),y=require("date-fns");require("./translationsContext-f962ff63.js"),require("string-format");var w=require("react-keyed-flatten-children");function S(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function M(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("./useUniqueId-86a9e1d4.js"),require("./cookieHelper-47e34efa.js"),require("slugify"),require("date-fns/locale"),require("./utils-2fb6eb7d.js");var O=S(e),P=S(i),j=M(h),T=S(L),_=S(w);const k=e.createContext({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1,isMarryBaby:!1,siteType:"helloSites",sharedData:{},setSharedData:()=>!1}),[B,q,F]=g.createFormContext(),I=P.default(a.Box)`
|
|
2
2
|
.phone-input {
|
|
3
3
|
width: 100%;
|
|
4
4
|
margin-bottom: 32px;
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
margin-top: -1rem;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
`,W=P.default.div`
|
|
45
45
|
width: 640px;
|
|
46
46
|
padding: 16px 16px 0 16px;
|
|
47
47
|
display: none;
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
width: 640px;
|
|
51
51
|
display: table-cell;
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
`,$=P.default.div`
|
|
54
54
|
background-color: ${l.theme.colors.primary50};
|
|
55
55
|
border-radius: 12px;
|
|
56
56
|
height: 100%;
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
&[data-is-marry-baby='true'] {
|
|
62
62
|
background-color: ${l.theme.mbColors.tonePink};
|
|
63
63
|
}
|
|
64
|
-
`,
|
|
64
|
+
`,U=P.default.div`
|
|
65
65
|
margin-top: 40px;
|
|
66
66
|
padding: 24px 40px;
|
|
67
67
|
`,Q=P.default.div`
|
|
@@ -230,4 +230,4 @@
|
|
|
230
230
|
&:not([data-active='true']) {
|
|
231
231
|
display: none !important;
|
|
232
232
|
}
|
|
233
|
-
`,le=e=>j.object().shape({password:j.string().required(e("onboarding.errorMessage.requiredPassword")).min(8,e("onboarding.errorMessage.minLength",{length:8})).matches(/.*[A-Z].*/,e("onboarding.errorMessage.passWithPattern")).default(""),confirmPassword:j.string().required(e("onboarding.errorMessage.requiredConfirmPassword")).oneOf([j.ref("password"),null],e("onboarding.errorMessage.passNotMatch")).default("")}),se={Provider:({children:t,siteType:a,setSharedData:n})=>{const[r,o]=e.useState(0),[i,l]=e.useState(0),[s,d]=e.useState({});return e.useEffect((()=>{null==n||n(s)}),[s,n]),O.default.createElement(k.Provider,{value:{currentStep:r,setCurrentStep:o,setMaxStep:l,nextStep:()=>r+1<=i&&o(r+1),prevStep:()=>r-1>=0&&o(r-1),siteType:a,isMarryBaby:"marryBaby"===a,sharedData:s,setSharedData:d}},t)},Modal:r=>{var{children:i,withSimilac:s,banner:d,withPortal:u}=r,c=t.__rest(r,["children","withSimilac","banner","withPortal"]);const{isMobile:p}=n.useScreenSize(),{isMarryBaby:f}=e.useContext(k),{t:g}=m.useTranslations();if(u&&"undefined"==typeof window)return null;const b=O.default.createElement(H,Object.assign({},c),O.default.createElement(V,null,O.default.createElement(a.Grid,{sx:{[o.MediaQueries.mbDown]:{margin:0},".mantine-Grid-col":{[o.MediaQueries.mbDown]:{padding:0}}}},O.default.createElement(a.Grid.Col,{span:"object"!=typeof d&&!s||p?12:6,order:s?2:1,orderMd:s?1:2,sx:{zIndex:s?99:void 0}},O.default.createElement(R,{"data-similac":s,"data-has-banner":"object"==typeof d},i)),d&&"object"==typeof d&&!s&&O.default.createElement(a.Grid.Col,{span:p?12:6,order:1,orderMd:2},O.default.createElement($,null,O.default.createElement(U,{"data-is-marry-baby":f},O.default.createElement(W,null,d.heading&&O.default.createElement(a.Title,{order:1,mb:24},d.heading),d.description&&O.default.createElement(n.Text,{size:"p1",color:l.theme.colors.gray800},g("onboarding.welcomeScreen.content"))),O.default.createElement(Q,null,d.imgSrc?O.default.createElement("img",{src:d.imgSrc,loading:"lazy"}):d.imgComponent?d.imgComponent:null)))),d&&"object"==typeof d&&s&&(d.imgSrc||d.imgComponent)&&O.default.createElement(a.Grid.Col,{span:"auto",order:1,orderMd:2},O.default.createElement(Q,{className:"similac"},d.imgSrc?O.default.createElement("img",{src:d.imgSrc,loading:"lazy"}):d.imgComponent?d.imgComponent:null)))));return u?E.createPortal(b,o.getPopupWrapperDom()):b},Form:({onClose:a,onSubmit:r,canSkip:o=!0,customFormTexts:i,isActive:l,submitProps:s,submitLabel:d,skipProps:u,isWhatsApp:c})=>{const{t:p}=m.useTranslations(),{sharedData:f,setSharedData:h,nextStep:E}=e.useContext(k),C=F({initialValues:{phone:(null==f?void 0:f.phone)||""},validate:g.yupResolver(Y(p))});return O.default.createElement(G,{heading:(null==i?void 0:i.heading)||p("onboarding.updatePhone.heading"),description:(null==i?void 0:i.description)||p(c?"onboarding.updateWhatsapp.description":"onboarding.updatePhone.description"),"data-active":l},O.default.createElement(B,{form:C},O.default.createElement("form",{onSubmit:C.onSubmit((e=>t.__awaiter(void 0,void 0,void 0,(function*(){try{h((t=>Object.assign(Object.assign({},t),{phone:e.phone}))),yield null==r?void 0:r(e.phone),E()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},O.default.createElement(D,{inputOrder:["phone"]}),O.default.createElement(n.Button,Object.assign({variant:"primary",fullWidth:!0,size:"lg"},c&&{leftIcon:O.default.createElement(b.Icon.WhatsApp,{size:18,useCurrentColor:!0})},s,{type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"}),d||p(c?"onboarding.updateWhatsapp.submitLabel":"onboarding.button.continue")),o&&O.default.createElement(n.Button,Object.assign({variant:"ghost",fullWidth:!0,size:"lg"},u,{onClick:a,type:"button"}),p("onboarding.button.skip")))))},OtpForm:{Email:({onSubmit:a,email:n,onResendCode:r,otpError:o,onClose:i,loading:s,canSkip:d})=>{const{sharedData:{email:u,retryEmailCount:p},setSharedData:f,prevStep:b,siteType:h,isMarryBaby:E,nextStep:C}=e.useContext(k),L=n||u||"",[y,w]=e.useState(30),S=c.useInterval((()=>w((e=>e-1))),1e3),[M,P]=c.useCounter(0,{min:0,max:3}),j=e.useRef(!0),{t:T}=m.useTranslations();e.useEffect((()=>(S.start(),S.stop)),[]),e.useEffect((()=>{0===y&&(S.stop(),j.current=!1)}),[y]);const q=F({initialValues:{otp:""},validate:g.yupResolver(J(T))});e.useEffect((()=>{o&&q.setFieldError("otp",o)}),[o]);const I=e.useMemo((()=>_.default((()=>{j.current||(P.increment(),w(30),null==r||r(L),S.start(),j.current=!0)}),1e3,{trailing:!1})),[L,r,S]),z=p>=2;return O.default.createElement(K,{heading:T("onboarding.otpForm.heading"),description:O.default.createElement(O.default.Fragment,null,O.default.createElement("span",{dangerouslySetInnerHTML:{__html:T("onboarding.otpForm.descriptionEmail",{email:`<b style="color:${l.theme.colors.gray800}">${A(L)}</b>`})}}),!z&&O.default.createElement("svg",{onClick:()=>{p>=2||(f((e=>Object.assign(Object.assign({},e),{retryEmailCount:e.retryEmailCount+1}))),b())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"otp-description-edit-icon"},O.default.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},O.default.createElement(B,{form:q},O.default.createElement("form",{onSubmit:q.onSubmit((e=>t.__awaiter(void 0,void 0,void 0,(function*(){try{P.increment();!(yield null==a?void 0:a(e.otp))&&C()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},O.default.createElement(D,{inputOrder:["otp"]}),O.default.createElement("div",{className:"resend"},O.default.createElement(v.Text,{size:"p4",color:l.theme.colors.gray400},T("onboarding.otpForm.notReceiveOTP")),O.default.createElement(v.Text,{as:"a",size:"p4",color:E?l.theme.mbColors.pink:l.theme.colors.primaryBase,onClick:I},T("onboarding.otpForm.resendCode",{seconds:y}))),O.default.createElement(x.Button,{theme:h,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:s,disabled:s,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},T("onboarding.button.continue")),d&&M>=3&&O.default.createElement(x.Button,{theme:h,color:"ghost",isBlock:!0,size:"lg",onClick:i,type:"button"},T("onboarding.button.skip")))))},Phone:({onSubmit:n,phone:r,onResendCode:o,otpError:i,onClose:s,loading:d,canSkip:p,isWhatsApp:f})=>{const{sharedData:{phone:b,retryPhoneCount:h},setSharedData:E,prevStep:C,siteType:L,isMarryBaby:y,nextStep:w}=e.useContext(k),S=r||b||"",[M,P]=e.useState(30),j=c.useInterval((()=>P((e=>e-1))),1e3),[T,q]=c.useCounter(0,{min:0,max:3}),I=e.useRef(!0),{t:z}=m.useTranslations();e.useEffect((()=>(j.start(),j.stop)),[]),e.useEffect((()=>{0===M&&(j.stop(),I.current=!1)}),[M]);const A=F({initialValues:{otp:""},validate:g.yupResolver(J(z))});e.useEffect((()=>{i&&A.setFieldError("otp",i)}),[i]);const N=e.useMemo((()=>_.default((()=>{I.current||(q.increment(),P(30),null==o||o(S),j.start(),I.current=!0)}),1e3,{trailing:!1})),[S,o,j]),Z=h>=2,H=`<b style="color:${l.theme.colors.gray800}">${S.slice(0,-3).replace(/./g,"x").concat(S.slice(-3))}</b>`;return O.default.createElement(K,{heading:f?O.default.createElement(a.Flex,{align:"center",justify:"center",gap:a.rem(8)},O.default.createElement("img",{style:{width:a.rem(24)},loading:"lazy",src:u.CommonGAssets.getAssetPath("whatsapp.svg"),alt:"whatsapp"}),O.default.createElement("span",null,z("onboarding.otpWhatsapps.heading"))):z("onboarding.otpForm.heading"),description:O.default.createElement(O.default.Fragment,null,O.default.createElement("span",{dangerouslySetInnerHTML:{__html:z(f?"onboarding.otpWhatsapps.description":"onboarding.otpForm.description",{phone:H})}}),!Z&&O.default.createElement("svg",{onClick:()=>{h>=2||(E((e=>Object.assign(Object.assign({},e),{retryPhoneCount:e.retryPhoneCount+1}))),C())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"otp-description-edit-icon"},O.default.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},O.default.createElement(B,{form:A},O.default.createElement("form",{onSubmit:A.onSubmit((e=>t.__awaiter(void 0,void 0,void 0,(function*(){try{q.increment();!(yield null==n?void 0:n(e.otp))&&w()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},O.default.createElement(D,{inputOrder:["otp"]}),O.default.createElement("div",{className:"resend"},O.default.createElement(v.Text,{size:"p4",color:l.theme.colors.gray400},z("onboarding.otpForm.notReceiveOTP")),O.default.createElement(v.Text,{as:"a",size:"p4",color:y?l.theme.mbColors.pink:l.theme.colors.primaryBase,onClick:N},z("onboarding.otpForm.resendCode",{seconds:M}))),O.default.createElement(x.Button,{theme:L,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:d,disabled:d,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},z("onboarding.button.continue")),p&&T>=3&&O.default.createElement(x.Button,{theme:L,color:"ghost",isBlock:!0,size:"lg",onClick:s,type:"button"},z("onboarding.button.skip")))))}},PersonalInfoForm:({onClose:a,onSubmit:n,canSkip:r,loading:o,errorMessage:i,initialData:l})=>{const{t:d,locale:u}=m.useTranslations(),{siteType:c,isMarryBaby:p,setSharedData:f,nextStep:b}=e.useContext(k),h=F({validate:g.yupResolver(X(d))});return e.useEffect((()=>{h.setValues(Object.assign(Object.assign({gender:"0"},l),(null==l?void 0:l.birthday)&&{birthday:new Date(l.birthday)}))}),[l]),e.useEffect((()=>{i&&h.setFieldError("email",i)}),[i]),O.default.createElement(ne,{heading:d("onboarding.formEmail.heading"),description:d("onboarding.formEmail.description",{site:p?"Marry Baby":s.LOCALE_SPECS[u].SITE_NAME_FORMATTED})},O.default.createElement(B,{form:h},O.default.createElement("form",{className:"form",onSubmit:h.onSubmit((e=>t.__awaiter(void 0,void 0,void 0,(function*(){f((t=>Object.assign(Object.assign({},t),e)));!(yield null==n?void 0:n(Object.assign(Object.assign({},e),{birthday:e.birthday&&y.format(e.birthday,"yyyy-MM-dd")})))&&b()}))),(e=>{console.log({fieldErrors:e})}))},O.default.createElement(D,{inputOrder:["full_name","email","dob","gender"]}),O.default.createElement(x.Button,{color:"primary",isBlock:!0,size:"lg",type:"submit",theme:c,isLoading:o,disabled:o},d("onboarding.button.continue")),r&&O.default.createElement(x.Button,{theme:c,color:"ghost",isBlock:!0,size:"lg",onClick:a,type:"button"},d("onboarding.button.skip")))))},ResultScreen:a=>{var{onClose:n}=a,r=t.__rest(a,["onClose"]);const{t:o}=m.useTranslations(),{siteType:i}=e.useContext(k);return O.default.createElement(ne,Object.assign({},r),O.default.createElement(x.Button,{theme:i,size:"lg",onClick:n,className:"form-button"},o("onboarding.button.continue")))},SimilacForm:a=>{var{onClose:r,onSubmit:o,canSkip:i=!0,customFormTexts:l,customTerms:s,defaultValues:d,isActive:u}=a,c=t.__rest(a,["onClose","onSubmit","canSkip","customFormTexts","customTerms","defaultValues","isActive"]);const{t:p}=m.useTranslations(),{nextStep:f,setSharedData:b,sharedData:h}=e.useContext(k),{isMobile:E}=n.useScreenSize(),C=F({initialValues:{term:!1,phone:(null==h?void 0:h.phone)||(null==d?void 0:d.phone)||"",email:(null==h?void 0:h.email)||(null==d?void 0:d.email)||"",name:(null==h?void 0:h.name)||(null==d?void 0:d.name)||""},validate:g.yupResolver(oe(p,!s))}),L=(null==d?void 0:d.email)?["full_name","phone","address","term"]:["full_name","email","phone","address","term"];return O.default.createElement(re,Object.assign({heading:(null==l?void 0:l.heading)||p("onboarding.updatePhone.heading"),description:(null==l?void 0:l.description)||p("onboarding.updatePhone.description"),hiddenLogo:E,"data-active":u},c),O.default.createElement(B,{form:C},O.default.createElement("form",{style:{width:"100%"},onSubmit:C.onSubmit((e=>t.__awaiter(void 0,void 0,void 0,(function*(){try{yield null==o?void 0:o(e),b((t=>Object.assign(Object.assign({},t),{phone:e.phone,email:e.email,name:e.name}))),f()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},O.default.createElement(D,{inputOrder:L,withSimilac:!0,customTerms:s}),O.default.createElement(n.Button,{fullWidth:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},p("onboarding.button.continue")),i&&O.default.createElement(n.Button,{variant:"ghost",fullWidth:!0,size:"lg",onClick:r,type:"button"},p("onboarding.button.skip")))))},FrisoForm:Z,UpdatePasswordForm:({onClose:n,onSubmit:r,canSkip:o,errorMessage:i,loading:l})=>{const{t:s}=m.useTranslations(),{nextStep:d}=e.useContext(k),u=F({initialValues:{password:"",confirmPassword:""},validate:g.yupResolver(le(s))});return O.default.createElement(ne,{heading:s("onboarding.updatePassword.heading"),description:s("onboarding.updatePassword.description")},O.default.createElement(B,{form:u},O.default.createElement("form",{className:"form",onSubmit:u.onSubmit((e=>t.__awaiter(void 0,void 0,void 0,(function*(){yield r((null==e?void 0:e.password)||""),!i&&d()}))),(e=>{console.log({fieldErrors:e})}))},O.default.createElement(D,{inputOrder:["password","confirm_password"]}),O.default.createElement(x.Button,{color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:l,disabled:l},s("onboarding.button.continue")),o&&O.default.createElement(x.Button,{color:"ghost",isBlock:!0,size:"lg",onClick:n},s("onboarding.button.skip")),i&&O.default.createElement(a.Input.Error,{className:"form-error"},i))))},StepRenderer:({children:t,onStepChange:a})=>{const{currentStep:n,setMaxStep:r}=e.useContext(k),o=O.default.Children.count(t);return e.useEffect((()=>{null==a||a(n)}),[n]),e.useEffect((()=>{r(o-1)}),[o]),O.default.createElement(O.default.Fragment,null,T.default(t).map(((t,a)=>{const r=a===n;return O.default.createElement(e.Fragment,{key:a},O.default.isValidElement(t)?t.props.alwaysRender||r?O.default.cloneElement(t,{isActive:a===n,stepIndex:a}):null:r?t:null)})))},ThankYou:e=>{var{onClose:r,thanksPageInfo:o,isActive:i}=e,l=t.__rest(e,["onClose","thanksPageInfo","isActive"]);const{t:s}=m.useTranslations(),{isMobile:d}=n.useScreenSize();return O.default.createElement(ie,Object.assign({heading:"",description:"",hiddenLogo:d,"data-active":i},l),O.default.createElement(a.Container,{fluid:!0},O.default.createElement(a.Stack,{align:"center",spacing:8,w:"100%",ta:"center"},O.default.createElement(a.AspectRatio,{ratio:1,w:{base:120,md:160}},O.default.createElement("svg",{width:"160",height:"160",viewBox:"0 0 160 160",fill:"none",xmlns:"http://www.w3.org/2000/svg"},O.default.createElement("mask",{id:"mask0_4580_96805",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"160",height:"160"},O.default.createElement("circle",{cx:"80",cy:"80",r:"80",fill:"url(#paint0_radial_4580_96805)"})),O.default.createElement("g",{mask:"url(#mask0_4580_96805)"},O.default.createElement("path",{d:"M71.5938 0.45906L76.9763 38.1373C77.0115 38.1373 77.0819 38.1373 77.1171 38.102L82.3589 75.0033L87.5656 38.0666C87.6008 38.0666 87.636 38.0666 87.636 38.0666L92.8426 1.02406C88.6562 0.353123 84.3642 0 80.0018 0C77.1522 0 74.3378 0.141249 71.5938 0.45906Z",fill:"#E0F8EE"}),O.default.createElement("path",{d:"M131.15 18.5391C125.733 14.0191 119.682 10.1701 113.173 7.20386L97.8699 41.0683C97.9051 41.0683 97.9403 41.1037 97.9403 41.1037L82.4609 75.2859L131.15 18.5391Z",fill:"#E0F8EE"}),O.default.createElement("path",{d:"M46.4386 64.8334L82.1114 75.3212H81.9707L82.3225 75.4271H82.3577L82.3928 75.3918L82.428 75.4271H82.3928L82.428 75.4624H82.4632L82.6039 75.5331L82.4984 75.4624L118.347 85.9855C118.347 86.0208 118.347 86.0208 118.312 86.0561L158.101 97.8151C159.332 92.2005 160.001 86.3386 160.001 80.3355C160.001 78.6758 159.93 76.9809 159.86 75.3565H119.825C119.825 75.3918 119.825 75.3918 119.825 75.4271L82.4632 75.4624V75.4271L82.6391 75.3918L82.4984 75.4624L82.815 75.3565H82.6391L155.497 53.6394C153.07 46.7182 149.728 40.2208 145.612 34.2883L82.6391 75.2859H82.4984L82.5687 75.2152L82.4632 75.2859L82.4984 75.074L82.428 75.2152V75.2506L82.3928 75.2859V75.2506H82.3225V75.2152L82.2521 75.074L82.2873 75.2506L82.2169 75.2152L82.2521 75.2506H82.1114L15.7614 32.4167C11.2231 38.5258 7.52917 45.341 4.85547 52.6154L46.4386 64.8334ZM82.3225 75.3918V75.4271L82.2169 75.3565L82.3225 75.3918Z",fill:"#E0F8EE"}),O.default.createElement("path",{d:"M57.8032 46.9301L82.2887 75.2506L66.7741 41.1036L50.556 5.61475C43.6607 8.33379 37.2579 12.0063 31.4531 16.4556L57.8032 46.9301Z",fill:"#E0F8EE"}),O.default.createElement("path",{d:"M113.877 95.8023L82.5312 75.5684L106.982 103.854C106.946 103.854 106.946 103.889 106.911 103.889L136.005 137.647C141.529 132.209 146.243 125.994 150.042 119.179L113.877 95.8023Z",fill:"#E0F8EE"}),O.default.createElement("path",{d:"M82.3203 75.427V75.4627H82.356L82.3203 75.427H82.356H82.3203Z",fill:"#E0F8EE"}),O.default.createElement("path",{d:"M82.2857 75.4623L82.321 75.427H82.2857L82.1445 75.4976L82.2857 75.4623Z",fill:"#E0F8EE"}),O.default.createElement("path",{d:"M82.2164 75.5684L50.9411 95.9436C50.906 95.9082 50.906 95.8729 50.8708 95.8376L11.3281 121.51C15.4794 128.501 20.6861 134.787 26.7019 140.19L62.5858 98.4507L82.2164 75.5684Z",fill:"#E0F8EE"}),O.default.createElement("path",{d:"M46.438 86.0559L82.2867 75.3916L0.140721 75.4975C0.0351803 77.0866 0 78.6756 0 80.3C0 86.7975 0.773967 93.1184 2.21636 99.1921L46.438 86.0559C46.438 86.0912 46.438 86.0912 46.438 86.0559Z",fill:"#E0F8EE"}),O.default.createElement("path",{d:"M82.2507 75.7095L47 153.467C54.2823 156.786 62.1275 159.011 70.3949 160L82.2507 75.7095Z",fill:"#E0F8EE"}),O.default.createElement("path",{d:"M82.4609 75.7095L94.3519 159.329C102.373 157.881 109.972 155.233 116.938 151.56L82.4609 75.7095Z",fill:"#E0F8EE"}),O.default.createElement("path",{d:"M82.3203 75.5684L82.3556 75.8509L82.4262 75.5684L82.3556 75.4978L82.3203 75.5684Z",fill:"#E0F8EE"})),O.default.createElement("path",{d:"M124.694 61.2L124.986 62.1726C125.083 62.6589 125.472 62.9507 125.959 63.1452L126.931 63.437L125.959 63.8261C125.569 63.9234 125.18 64.3124 125.083 64.7015L124.694 65.7714L124.305 64.7015C124.111 64.3124 123.819 64.0206 123.43 63.8261L122.457 63.5343L123.43 63.2425C123.819 63.1452 124.111 62.7562 124.305 62.3671L124.694 61.2Z",fill:"#2D87F3"}),O.default.createElement("path",{d:"M104.744 34.2856L104.915 34.8571C104.973 35.1428 105.201 35.3142 105.487 35.4285L106.058 35.5999L105.487 35.8285C105.258 35.8856 105.03 36.1142 104.973 36.3428L104.744 36.9714L104.515 36.3428C104.401 36.1142 104.23 35.9428 104.001 35.8285L103.43 35.6571L104.001 35.4856C104.23 35.4285 104.401 35.1999 104.515 34.9714L104.744 34.2856Z",fill:"#00B16A"}),O.default.createElement("path",{d:"M118.345 38L119.088 40.4C119.431 41.4857 120.288 42.3429 121.317 42.6286L123.717 43.3714L121.259 44.2286C120.231 44.5714 119.488 45.3714 119.145 46.3429L118.288 48.8L117.317 46.2286C116.974 45.2571 116.174 44.5143 115.202 44.1714L112.859 43.3714L115.145 42.5714C116.117 42.2286 116.859 41.4857 117.259 40.5714L118.345 38Z",fill:"#FFB521"}),O.default.createElement("path",{d:"M41.8846 98.8572L42.056 99.4286C42.1132 99.7143 42.3417 99.8857 42.6275 100L43.1989 100.171L42.6275 100.4C42.3989 100.457 42.1703 100.686 42.1132 100.914L41.8846 101.543L41.656 100.914C41.5417 100.686 41.3703 100.514 41.1417 100.4L40.5703 100.229L41.1417 100.057C41.3703 100 41.5417 99.7715 41.656 99.5429L41.8846 98.8572Z",fill:"#00B16A"}),O.default.createElement("path",{d:"M64.5717 125.314L65.3145 127.714C65.6574 128.8 66.5145 129.657 67.5431 129.943L69.9431 130.686L67.4859 131.543C66.4574 131.886 65.7145 132.686 65.3717 133.657L64.5145 136.114L63.5431 133.543C63.2002 132.571 62.4002 131.828 61.4288 131.486L59.0859 130.686L61.3717 129.886C62.3431 129.543 63.0859 128.8 63.4859 127.886L64.5717 125.314Z",fill:"#FFB521"}),O.default.createElement("path",{d:"M80.9708 120.343L81.2565 121.314C81.3708 121.771 81.7708 122.114 82.1708 122.228L83.1993 122.514L82.1708 122.857C81.7708 122.971 81.4279 123.314 81.3136 123.714L80.9708 124.743L80.5708 123.657C80.3993 123.257 80.1136 122.914 79.7136 122.8L78.7422 122.457L79.7136 122.114C80.1136 122 80.3993 121.657 80.5708 121.314L80.9708 120.343Z",fill:"#2D87F3"}),O.default.createElement("path",{d:"M130.307 98.2856L130.529 99.0426C130.619 99.3988 130.93 99.666 131.242 99.755L132.043 99.9777L131.242 100.245C130.93 100.334 130.663 100.601 130.574 100.913L130.307 101.714L129.995 100.868C129.862 100.557 129.639 100.289 129.327 100.2L128.57 99.9331L129.327 99.666C129.639 99.5769 129.862 99.3098 129.995 99.0426L130.307 98.2856Z",fill:"#00B16A"}),O.default.createElement("path",{d:"M36.592 64L36.8147 64.757C36.9037 65.1132 37.2154 65.3803 37.5271 65.4694L38.3286 65.692L37.5271 65.9592C37.2154 66.0482 36.9482 66.3154 36.8592 66.6271L36.592 67.4286L36.2803 66.5826C36.1467 66.2709 35.9241 66.0037 35.6124 65.9147L34.8555 65.6475L35.6124 65.3803C35.9241 65.2913 36.1467 65.0241 36.2803 64.757L36.592 64Z",fill:"#FFB521"}),O.default.createElement("path",{d:"M67.3816 26.8572L67.6734 27.8298C67.7707 28.3161 68.1597 28.6079 68.646 28.8025L69.6187 29.0942L68.646 29.4833C68.257 29.5806 67.8679 29.9696 67.7707 30.3587L67.3816 31.4286L66.9926 30.3587C66.798 29.9696 66.5062 29.6778 66.1172 29.4833L65.1445 29.1915L66.1172 28.8997C66.5062 28.8025 66.798 28.4134 66.9926 28.0243L67.3816 26.8572Z",fill:"#2D87F3"}),O.default.createElement("path",{d:"M80.0011 108.572C95.7807 108.572 108.573 95.7797 108.573 80.0001C108.573 64.2206 95.7807 51.4287 80.0011 51.4287C64.2216 51.4287 51.4297 64.2206 51.4297 80.0001C51.4297 95.7797 64.2216 108.572 80.0011 108.572Z",fill:"#00B16A"}),O.default.createElement("path",{d:"M78.5808 89.1451C77.3597 89.147 76.1503 88.908 75.0217 88.4418C73.8932 87.9757 72.8677 87.2914 72.0039 86.4283L68.6389 83.0617C68.1939 82.6009 67.9477 81.9838 67.9532 81.3432C67.9588 80.7027 68.2157 80.0899 68.6687 79.6369C69.1217 79.1839 69.7344 78.927 70.375 78.9214C71.0156 78.9159 71.6327 79.1621 72.0935 79.6071L75.4585 82.9738C75.8649 83.3802 76.3473 83.7025 76.8783 83.9225C77.4093 84.1424 77.9784 84.2556 78.5531 84.2556C79.1278 84.2556 79.6969 84.1424 80.2279 83.9225C80.7589 83.7025 81.2413 83.3802 81.6477 82.9738L102.984 63.6911C103.468 63.2745 104.095 63.0635 104.732 63.1034C105.369 63.1433 105.965 63.4308 106.392 63.9044C106.82 64.3781 107.046 65.0003 107.02 65.6379C106.995 66.2756 106.722 66.8781 106.258 67.3166L85.0046 86.513C84.1599 87.3531 83.1576 88.0181 82.0552 88.4698C80.9528 88.9215 79.7721 89.151 78.5808 89.1451Z",fill:"white"}),O.default.createElement("defs",null,O.default.createElement("radialGradient",{id:"paint0_radial_4580_96805",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(80 80) rotate(90) scale(80)"},O.default.createElement("stop",{stopColor:"#C4C4C4"}),O.default.createElement("stop",{offset:"1",stopColor:"#C4C4C4",stopOpacity:"0"}))))),O.default.createElement(n.Heading,{tag:"h3"},null==o?void 0:o.title),O.default.createElement(n.Text,{size:"p3",color:"gray.6"},null==o?void 0:o.description),O.default.createElement(n.Button,{mt:{base:16,md:24},fullWidth:d,size:"lg",onClick:r},s("similac.thankYou.done")))))}};exports.DynamicForm=D,exports.MAPPED_LOCALE=z,exports.Onboarding=se,exports.OnboardingContext=k;
|
|
233
|
+
`,le=e=>j.object().shape({password:j.string().required(e("onboarding.errorMessage.requiredPassword")).min(8,e("onboarding.errorMessage.minLength",{length:8})).matches(/.*[A-Z].*/,e("onboarding.errorMessage.passWithPattern")).default(""),confirmPassword:j.string().required(e("onboarding.errorMessage.requiredConfirmPassword")).oneOf([j.ref("password"),null],e("onboarding.errorMessage.passNotMatch")).default("")}),se={Provider:({children:t,siteType:a,setSharedData:n})=>{const[r,o]=e.useState(0),[i,l]=e.useState(0),[s,d]=e.useState({});return e.useEffect((()=>{null==n||n(s)}),[s,n]),O.default.createElement(k.Provider,{value:{currentStep:r,setCurrentStep:o,setMaxStep:l,nextStep:()=>r+1<=i&&o(r+1),prevStep:()=>r-1>=0&&o(r-1),siteType:a,isMarryBaby:"marryBaby"===a,sharedData:s,setSharedData:d}},t)},Modal:r=>{var{children:i,withSimilac:s,banner:d,withPortal:u}=r,c=t.__rest(r,["children","withSimilac","banner","withPortal"]);const{isMobile:p}=n.useScreenSize(),{isMarryBaby:f}=e.useContext(k),{t:g}=m.useTranslations();if(u&&"undefined"==typeof window)return null;const b=O.default.createElement(H,Object.assign({},c),O.default.createElement(V,null,O.default.createElement(a.Grid,{sx:{[o.MediaQueries.mbDown]:{margin:0},".mantine-Grid-col":{[o.MediaQueries.mbDown]:{padding:0}}}},O.default.createElement(a.Grid.Col,{span:"object"!=typeof d&&!s||p?12:6,order:s?2:1,orderMd:s?1:2,sx:{zIndex:s?99:void 0}},O.default.createElement(R,{"data-similac":s,"data-has-banner":"object"==typeof d},i)),d&&"object"==typeof d&&!s&&O.default.createElement(a.Grid.Col,{span:p?12:6,order:1,orderMd:2},O.default.createElement(W,null,O.default.createElement($,{"data-is-marry-baby":f},O.default.createElement(U,null,d.heading&&O.default.createElement(a.Title,{order:1,mb:24},d.heading),d.description&&O.default.createElement(n.Text,{size:"p1",color:l.theme.colors.gray800},g("onboarding.welcomeScreen.content"))),O.default.createElement(Q,null,d.imgSrc?O.default.createElement("img",{src:d.imgSrc,loading:"lazy"}):d.imgComponent?d.imgComponent:null)))),d&&"object"==typeof d&&s&&(d.imgSrc||d.imgComponent)&&O.default.createElement(a.Grid.Col,{span:"auto",order:1,orderMd:2},O.default.createElement(Q,{className:"similac"},d.imgSrc?O.default.createElement("img",{src:d.imgSrc,loading:"lazy"}):d.imgComponent?d.imgComponent:null)))));return u?E.createPortal(b,o.getPopupWrapperDom()):b},Form:({onClose:a,onSubmit:r,canSkip:o=!0,customFormTexts:i,isActive:l,submitProps:s,submitLabel:d,skipProps:u,isWhatsApp:c})=>{const{t:p}=m.useTranslations(),{sharedData:f,setSharedData:h,nextStep:E}=e.useContext(k),C=F({initialValues:{phone:(null==f?void 0:f.phone)||""},validate:g.yupResolver(Y(p))});return O.default.createElement(G,{heading:(null==i?void 0:i.heading)||p("onboarding.updatePhone.heading"),description:(null==i?void 0:i.description)||p(c?"onboarding.updateWhatsapp.description":"onboarding.updatePhone.description"),"data-active":l},O.default.createElement(B,{form:C},O.default.createElement("form",{onSubmit:C.onSubmit((e=>t.__awaiter(void 0,void 0,void 0,(function*(){try{h((t=>Object.assign(Object.assign({},t),{phone:e.phone}))),yield null==r?void 0:r(e.phone),E()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},O.default.createElement(D,{inputOrder:["phone"]}),O.default.createElement(n.Button,Object.assign({variant:"primary",fullWidth:!0,size:"lg"},c&&{leftIcon:O.default.createElement(b.Icon.WhatsApp,{size:18,useCurrentColor:!0})},s,{type:"submit","data-event-category":c?"OTP":"Sign Up","data-event-action":c?"Whatsapp - Fill phone and continue Click":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"}),d||p(c?"onboarding.updateWhatsapp.submitLabel":"onboarding.button.continue")),o&&O.default.createElement(n.Button,Object.assign({variant:"ghost",fullWidth:!0,size:"lg"},c&&{dataEventCategory:"OTP",dataEventAction:"Whatsapp - Skip fill phone Click",dataEventLabel:"undefined"!=typeof window?window.location.href:""},u,{onClick:a,type:"button"}),p("onboarding.button.skip")))))},OtpForm:{Email:({onSubmit:a,email:n,onResendCode:r,otpError:o,onClose:i,loading:s,canSkip:d})=>{const{sharedData:{email:u,retryEmailCount:p},setSharedData:f,prevStep:b,siteType:h,isMarryBaby:E,nextStep:C}=e.useContext(k),L=n||u||"",[y,w]=e.useState(30),S=c.useInterval((()=>w((e=>e-1))),1e3),[M,P]=c.useCounter(0,{min:0,max:3}),j=e.useRef(!0),{t:_}=m.useTranslations();e.useEffect((()=>(S.start(),S.stop)),[]),e.useEffect((()=>{0===y&&(S.stop(),j.current=!1)}),[y]);const q=F({initialValues:{otp:""},validate:g.yupResolver(J(_))});e.useEffect((()=>{o&&q.setFieldError("otp",o)}),[o]);const I=e.useMemo((()=>T.default((()=>{j.current||(P.increment(),w(30),null==r||r(L),S.start(),j.current=!0)}),1e3,{trailing:!1})),[L,r,S]),z=p>=2;return O.default.createElement(K,{heading:_("onboarding.otpForm.heading"),description:O.default.createElement(O.default.Fragment,null,O.default.createElement("span",{dangerouslySetInnerHTML:{__html:_("onboarding.otpForm.descriptionEmail",{email:`<b style="color:${l.theme.colors.gray800}">${A(L)}</b>`})}}),!z&&O.default.createElement("svg",{onClick:()=>{p>=2||(f((e=>Object.assign(Object.assign({},e),{retryEmailCount:e.retryEmailCount+1}))),b())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"otp-description-edit-icon"},O.default.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},O.default.createElement(B,{form:q},O.default.createElement("form",{onSubmit:q.onSubmit((e=>t.__awaiter(void 0,void 0,void 0,(function*(){try{P.increment();!(yield null==a?void 0:a(e.otp))&&C()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},O.default.createElement(D,{inputOrder:["otp"]}),O.default.createElement("div",{className:"resend"},O.default.createElement(v.Text,{size:"p4",color:l.theme.colors.gray400},_("onboarding.otpForm.notReceiveOTP")),O.default.createElement(v.Text,{as:"a",size:"p4",color:E?l.theme.mbColors.pink:l.theme.colors.primaryBase,onClick:I},_("onboarding.otpForm.resendCode",{seconds:y}))),O.default.createElement(x.Button,{theme:h,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:s,disabled:s,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},_("onboarding.button.continue")),d&&M>=3&&O.default.createElement(x.Button,{theme:h,color:"ghost",isBlock:!0,size:"lg",onClick:i,type:"button"},_("onboarding.button.skip")))))},Phone:({onSubmit:n,phone:r,onResendCode:o,otpError:i,onClose:s,loading:d,canSkip:p,isWhatsApp:f})=>{const{sharedData:{phone:b,retryPhoneCount:h},setSharedData:E,prevStep:C,siteType:L,isMarryBaby:y,nextStep:w}=e.useContext(k),S=r||b||"",[M,P]=e.useState(30),j=c.useInterval((()=>P((e=>e-1))),1e3),[_,q]=c.useCounter(0,{min:0,max:3}),I=e.useRef(!0),{t:z}=m.useTranslations();e.useEffect((()=>(j.start(),j.stop)),[]),e.useEffect((()=>{0===M&&(j.stop(),I.current=!1)}),[M]);const A=F({initialValues:{otp:""},validate:g.yupResolver(J(z))});e.useEffect((()=>{i&&A.setFieldError("otp",i)}),[i]);const N=e.useMemo((()=>T.default((()=>{I.current||(q.increment(),P(30),null==o||o(S),j.start(),I.current=!0)}),1e3,{trailing:!1})),[S,o,j]),Z=h>=2,H=`<b style="color:${l.theme.colors.gray800}">${S.slice(0,-3).replace(/./g,"x").concat(S.slice(-3))}</b>`;return O.default.createElement(K,{heading:f?O.default.createElement(a.Flex,{align:"center",justify:"center",gap:a.rem(8)},O.default.createElement("img",{style:{width:a.rem(24)},loading:"lazy",src:u.CommonGAssets.getAssetPath("whatsapp.svg"),alt:"whatsapp"}),O.default.createElement("span",null,z("onboarding.otpWhatsapps.heading"))):z("onboarding.otpForm.heading"),description:O.default.createElement(O.default.Fragment,null,O.default.createElement("span",{dangerouslySetInnerHTML:{__html:z(f?"onboarding.otpWhatsapps.description":"onboarding.otpForm.description",{phone:H})}}),!Z&&O.default.createElement("svg",{onClick:()=>{h>=2||(E((e=>Object.assign(Object.assign({},e),{retryPhoneCount:e.retryPhoneCount+1}))),C())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"otp-description-edit-icon"},O.default.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},O.default.createElement(B,{form:A},O.default.createElement("form",{onSubmit:A.onSubmit((e=>t.__awaiter(void 0,void 0,void 0,(function*(){try{q.increment();!(yield null==n?void 0:n(e.otp))&&w()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},O.default.createElement(D,{inputOrder:["otp"]}),O.default.createElement("div",{className:"resend"},O.default.createElement(v.Text,{size:"p4",color:l.theme.colors.gray400},z("onboarding.otpForm.notReceiveOTP")),O.default.createElement(v.Text,{as:"a",size:"p4",color:y?l.theme.mbColors.pink:l.theme.colors.primaryBase,onClick:N},z("onboarding.otpForm.resendCode",{seconds:M}))),O.default.createElement(x.Button,{theme:L,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:d,disabled:d,"data-event-category":f?"OTP":"Sign Up","data-event-action":f?"Whatsapp - OTP verified Click":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},z("onboarding.button.continue")),p&&_>=3&&O.default.createElement(x.Button,{theme:L,color:"ghost",isBlock:!0,size:"lg",onClick:s,type:"button"},z("onboarding.button.skip")))))}},PersonalInfoForm:({onClose:a,onSubmit:n,canSkip:r,loading:o,errorMessage:i,initialData:l})=>{const{t:d,locale:u}=m.useTranslations(),{siteType:c,isMarryBaby:p,setSharedData:f,nextStep:b}=e.useContext(k),h=F({validate:g.yupResolver(X(d))});return e.useEffect((()=>{h.setValues(Object.assign(Object.assign({gender:"0"},l),(null==l?void 0:l.birthday)&&{birthday:new Date(l.birthday)}))}),[l]),e.useEffect((()=>{i&&h.setFieldError("email",i)}),[i]),O.default.createElement(ne,{heading:d("onboarding.formEmail.heading"),description:d("onboarding.formEmail.description",{site:p?"Marry Baby":s.LOCALE_SPECS[u].SITE_NAME_FORMATTED})},O.default.createElement(B,{form:h},O.default.createElement("form",{className:"form",onSubmit:h.onSubmit((e=>t.__awaiter(void 0,void 0,void 0,(function*(){f((t=>Object.assign(Object.assign({},t),e)));!(yield null==n?void 0:n(Object.assign(Object.assign({},e),{birthday:e.birthday&&y.format(e.birthday,"yyyy-MM-dd")})))&&b()}))),(e=>{console.log({fieldErrors:e})}))},O.default.createElement(D,{inputOrder:["full_name","email","dob","gender"]}),O.default.createElement(x.Button,{color:"primary",isBlock:!0,size:"lg",type:"submit",theme:c,isLoading:o,disabled:o},d("onboarding.button.continue")),r&&O.default.createElement(x.Button,{theme:c,color:"ghost",isBlock:!0,size:"lg",onClick:a,type:"button"},d("onboarding.button.skip")))))},ResultScreen:a=>{var{onClose:n}=a,r=t.__rest(a,["onClose"]);const{t:o}=m.useTranslations(),{siteType:i}=e.useContext(k);return O.default.createElement(ne,Object.assign({},r),O.default.createElement(x.Button,{theme:i,size:"lg",onClick:n,className:"form-button"},o("onboarding.button.continue")))},SimilacForm:a=>{var{onClose:r,onSubmit:o,canSkip:i=!0,customFormTexts:l,customTerms:s,defaultValues:d,isActive:u}=a,c=t.__rest(a,["onClose","onSubmit","canSkip","customFormTexts","customTerms","defaultValues","isActive"]);const{t:p}=m.useTranslations(),{nextStep:f,setSharedData:b,sharedData:h}=e.useContext(k),{isMobile:E}=n.useScreenSize(),C=F({initialValues:{term:!1,phone:(null==h?void 0:h.phone)||(null==d?void 0:d.phone)||"",email:(null==h?void 0:h.email)||(null==d?void 0:d.email)||"",name:(null==h?void 0:h.name)||(null==d?void 0:d.name)||""},validate:g.yupResolver(oe(p,!s))}),L=(null==d?void 0:d.email)?["full_name","phone","address","term"]:["full_name","email","phone","address","term"];return O.default.createElement(re,Object.assign({heading:(null==l?void 0:l.heading)||p("onboarding.updatePhone.heading"),description:(null==l?void 0:l.description)||p("onboarding.updatePhone.description"),hiddenLogo:E,"data-active":u},c),O.default.createElement(B,{form:C},O.default.createElement("form",{style:{width:"100%"},onSubmit:C.onSubmit((e=>t.__awaiter(void 0,void 0,void 0,(function*(){try{yield null==o?void 0:o(e),b((t=>Object.assign(Object.assign({},t),{phone:e.phone,email:e.email,name:e.name}))),f()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},O.default.createElement(D,{inputOrder:L,withSimilac:!0,customTerms:s}),O.default.createElement(n.Button,{fullWidth:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},p("onboarding.button.continue")),i&&O.default.createElement(n.Button,{variant:"ghost",fullWidth:!0,size:"lg",onClick:r,type:"button"},p("onboarding.button.skip")))))},FrisoForm:Z,UpdatePasswordForm:({onClose:n,onSubmit:r,canSkip:o,errorMessage:i,loading:l})=>{const{t:s}=m.useTranslations(),{nextStep:d}=e.useContext(k),u=F({initialValues:{password:"",confirmPassword:""},validate:g.yupResolver(le(s))});return O.default.createElement(ne,{heading:s("onboarding.updatePassword.heading"),description:s("onboarding.updatePassword.description")},O.default.createElement(B,{form:u},O.default.createElement("form",{className:"form",onSubmit:u.onSubmit((e=>t.__awaiter(void 0,void 0,void 0,(function*(){yield r((null==e?void 0:e.password)||""),!i&&d()}))),(e=>{console.log({fieldErrors:e})}))},O.default.createElement(D,{inputOrder:["password","confirm_password"]}),O.default.createElement(x.Button,{color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:l,disabled:l},s("onboarding.button.continue")),o&&O.default.createElement(x.Button,{color:"ghost",isBlock:!0,size:"lg",onClick:n},s("onboarding.button.skip")),i&&O.default.createElement(a.Input.Error,{className:"form-error"},i))))},StepRenderer:({children:t,onStepChange:a})=>{const{currentStep:n,setMaxStep:r}=e.useContext(k),o=O.default.Children.count(t);return e.useEffect((()=>{null==a||a(n)}),[n]),e.useEffect((()=>{r(o-1)}),[o]),O.default.createElement(O.default.Fragment,null,_.default(t).map(((t,a)=>{const r=a===n;return O.default.createElement(e.Fragment,{key:a},O.default.isValidElement(t)?t.props.alwaysRender||r?O.default.cloneElement(t,{isActive:a===n,stepIndex:a}):null:r?t:null)})))},ThankYou:e=>{var{onClose:r,thanksPageInfo:o,isActive:i}=e,l=t.__rest(e,["onClose","thanksPageInfo","isActive"]);const{t:s}=m.useTranslations(),{isMobile:d}=n.useScreenSize();return O.default.createElement(ie,Object.assign({heading:"",description:"",hiddenLogo:d,"data-active":i},l),O.default.createElement(a.Container,{fluid:!0},O.default.createElement(a.Stack,{align:"center",spacing:8,w:"100%",ta:"center"},O.default.createElement(a.AspectRatio,{ratio:1,w:{base:120,md:160}},O.default.createElement("svg",{width:"160",height:"160",viewBox:"0 0 160 160",fill:"none",xmlns:"http://www.w3.org/2000/svg"},O.default.createElement("mask",{id:"mask0_4580_96805",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"160",height:"160"},O.default.createElement("circle",{cx:"80",cy:"80",r:"80",fill:"url(#paint0_radial_4580_96805)"})),O.default.createElement("g",{mask:"url(#mask0_4580_96805)"},O.default.createElement("path",{d:"M71.5938 0.45906L76.9763 38.1373C77.0115 38.1373 77.0819 38.1373 77.1171 38.102L82.3589 75.0033L87.5656 38.0666C87.6008 38.0666 87.636 38.0666 87.636 38.0666L92.8426 1.02406C88.6562 0.353123 84.3642 0 80.0018 0C77.1522 0 74.3378 0.141249 71.5938 0.45906Z",fill:"#E0F8EE"}),O.default.createElement("path",{d:"M131.15 18.5391C125.733 14.0191 119.682 10.1701 113.173 7.20386L97.8699 41.0683C97.9051 41.0683 97.9403 41.1037 97.9403 41.1037L82.4609 75.2859L131.15 18.5391Z",fill:"#E0F8EE"}),O.default.createElement("path",{d:"M46.4386 64.8334L82.1114 75.3212H81.9707L82.3225 75.4271H82.3577L82.3928 75.3918L82.428 75.4271H82.3928L82.428 75.4624H82.4632L82.6039 75.5331L82.4984 75.4624L118.347 85.9855C118.347 86.0208 118.347 86.0208 118.312 86.0561L158.101 97.8151C159.332 92.2005 160.001 86.3386 160.001 80.3355C160.001 78.6758 159.93 76.9809 159.86 75.3565H119.825C119.825 75.3918 119.825 75.3918 119.825 75.4271L82.4632 75.4624V75.4271L82.6391 75.3918L82.4984 75.4624L82.815 75.3565H82.6391L155.497 53.6394C153.07 46.7182 149.728 40.2208 145.612 34.2883L82.6391 75.2859H82.4984L82.5687 75.2152L82.4632 75.2859L82.4984 75.074L82.428 75.2152V75.2506L82.3928 75.2859V75.2506H82.3225V75.2152L82.2521 75.074L82.2873 75.2506L82.2169 75.2152L82.2521 75.2506H82.1114L15.7614 32.4167C11.2231 38.5258 7.52917 45.341 4.85547 52.6154L46.4386 64.8334ZM82.3225 75.3918V75.4271L82.2169 75.3565L82.3225 75.3918Z",fill:"#E0F8EE"}),O.default.createElement("path",{d:"M57.8032 46.9301L82.2887 75.2506L66.7741 41.1036L50.556 5.61475C43.6607 8.33379 37.2579 12.0063 31.4531 16.4556L57.8032 46.9301Z",fill:"#E0F8EE"}),O.default.createElement("path",{d:"M113.877 95.8023L82.5312 75.5684L106.982 103.854C106.946 103.854 106.946 103.889 106.911 103.889L136.005 137.647C141.529 132.209 146.243 125.994 150.042 119.179L113.877 95.8023Z",fill:"#E0F8EE"}),O.default.createElement("path",{d:"M82.3203 75.427V75.4627H82.356L82.3203 75.427H82.356H82.3203Z",fill:"#E0F8EE"}),O.default.createElement("path",{d:"M82.2857 75.4623L82.321 75.427H82.2857L82.1445 75.4976L82.2857 75.4623Z",fill:"#E0F8EE"}),O.default.createElement("path",{d:"M82.2164 75.5684L50.9411 95.9436C50.906 95.9082 50.906 95.8729 50.8708 95.8376L11.3281 121.51C15.4794 128.501 20.6861 134.787 26.7019 140.19L62.5858 98.4507L82.2164 75.5684Z",fill:"#E0F8EE"}),O.default.createElement("path",{d:"M46.438 86.0559L82.2867 75.3916L0.140721 75.4975C0.0351803 77.0866 0 78.6756 0 80.3C0 86.7975 0.773967 93.1184 2.21636 99.1921L46.438 86.0559C46.438 86.0912 46.438 86.0912 46.438 86.0559Z",fill:"#E0F8EE"}),O.default.createElement("path",{d:"M82.2507 75.7095L47 153.467C54.2823 156.786 62.1275 159.011 70.3949 160L82.2507 75.7095Z",fill:"#E0F8EE"}),O.default.createElement("path",{d:"M82.4609 75.7095L94.3519 159.329C102.373 157.881 109.972 155.233 116.938 151.56L82.4609 75.7095Z",fill:"#E0F8EE"}),O.default.createElement("path",{d:"M82.3203 75.5684L82.3556 75.8509L82.4262 75.5684L82.3556 75.4978L82.3203 75.5684Z",fill:"#E0F8EE"})),O.default.createElement("path",{d:"M124.694 61.2L124.986 62.1726C125.083 62.6589 125.472 62.9507 125.959 63.1452L126.931 63.437L125.959 63.8261C125.569 63.9234 125.18 64.3124 125.083 64.7015L124.694 65.7714L124.305 64.7015C124.111 64.3124 123.819 64.0206 123.43 63.8261L122.457 63.5343L123.43 63.2425C123.819 63.1452 124.111 62.7562 124.305 62.3671L124.694 61.2Z",fill:"#2D87F3"}),O.default.createElement("path",{d:"M104.744 34.2856L104.915 34.8571C104.973 35.1428 105.201 35.3142 105.487 35.4285L106.058 35.5999L105.487 35.8285C105.258 35.8856 105.03 36.1142 104.973 36.3428L104.744 36.9714L104.515 36.3428C104.401 36.1142 104.23 35.9428 104.001 35.8285L103.43 35.6571L104.001 35.4856C104.23 35.4285 104.401 35.1999 104.515 34.9714L104.744 34.2856Z",fill:"#00B16A"}),O.default.createElement("path",{d:"M118.345 38L119.088 40.4C119.431 41.4857 120.288 42.3429 121.317 42.6286L123.717 43.3714L121.259 44.2286C120.231 44.5714 119.488 45.3714 119.145 46.3429L118.288 48.8L117.317 46.2286C116.974 45.2571 116.174 44.5143 115.202 44.1714L112.859 43.3714L115.145 42.5714C116.117 42.2286 116.859 41.4857 117.259 40.5714L118.345 38Z",fill:"#FFB521"}),O.default.createElement("path",{d:"M41.8846 98.8572L42.056 99.4286C42.1132 99.7143 42.3417 99.8857 42.6275 100L43.1989 100.171L42.6275 100.4C42.3989 100.457 42.1703 100.686 42.1132 100.914L41.8846 101.543L41.656 100.914C41.5417 100.686 41.3703 100.514 41.1417 100.4L40.5703 100.229L41.1417 100.057C41.3703 100 41.5417 99.7715 41.656 99.5429L41.8846 98.8572Z",fill:"#00B16A"}),O.default.createElement("path",{d:"M64.5717 125.314L65.3145 127.714C65.6574 128.8 66.5145 129.657 67.5431 129.943L69.9431 130.686L67.4859 131.543C66.4574 131.886 65.7145 132.686 65.3717 133.657L64.5145 136.114L63.5431 133.543C63.2002 132.571 62.4002 131.828 61.4288 131.486L59.0859 130.686L61.3717 129.886C62.3431 129.543 63.0859 128.8 63.4859 127.886L64.5717 125.314Z",fill:"#FFB521"}),O.default.createElement("path",{d:"M80.9708 120.343L81.2565 121.314C81.3708 121.771 81.7708 122.114 82.1708 122.228L83.1993 122.514L82.1708 122.857C81.7708 122.971 81.4279 123.314 81.3136 123.714L80.9708 124.743L80.5708 123.657C80.3993 123.257 80.1136 122.914 79.7136 122.8L78.7422 122.457L79.7136 122.114C80.1136 122 80.3993 121.657 80.5708 121.314L80.9708 120.343Z",fill:"#2D87F3"}),O.default.createElement("path",{d:"M130.307 98.2856L130.529 99.0426C130.619 99.3988 130.93 99.666 131.242 99.755L132.043 99.9777L131.242 100.245C130.93 100.334 130.663 100.601 130.574 100.913L130.307 101.714L129.995 100.868C129.862 100.557 129.639 100.289 129.327 100.2L128.57 99.9331L129.327 99.666C129.639 99.5769 129.862 99.3098 129.995 99.0426L130.307 98.2856Z",fill:"#00B16A"}),O.default.createElement("path",{d:"M36.592 64L36.8147 64.757C36.9037 65.1132 37.2154 65.3803 37.5271 65.4694L38.3286 65.692L37.5271 65.9592C37.2154 66.0482 36.9482 66.3154 36.8592 66.6271L36.592 67.4286L36.2803 66.5826C36.1467 66.2709 35.9241 66.0037 35.6124 65.9147L34.8555 65.6475L35.6124 65.3803C35.9241 65.2913 36.1467 65.0241 36.2803 64.757L36.592 64Z",fill:"#FFB521"}),O.default.createElement("path",{d:"M67.3816 26.8572L67.6734 27.8298C67.7707 28.3161 68.1597 28.6079 68.646 28.8025L69.6187 29.0942L68.646 29.4833C68.257 29.5806 67.8679 29.9696 67.7707 30.3587L67.3816 31.4286L66.9926 30.3587C66.798 29.9696 66.5062 29.6778 66.1172 29.4833L65.1445 29.1915L66.1172 28.8997C66.5062 28.8025 66.798 28.4134 66.9926 28.0243L67.3816 26.8572Z",fill:"#2D87F3"}),O.default.createElement("path",{d:"M80.0011 108.572C95.7807 108.572 108.573 95.7797 108.573 80.0001C108.573 64.2206 95.7807 51.4287 80.0011 51.4287C64.2216 51.4287 51.4297 64.2206 51.4297 80.0001C51.4297 95.7797 64.2216 108.572 80.0011 108.572Z",fill:"#00B16A"}),O.default.createElement("path",{d:"M78.5808 89.1451C77.3597 89.147 76.1503 88.908 75.0217 88.4418C73.8932 87.9757 72.8677 87.2914 72.0039 86.4283L68.6389 83.0617C68.1939 82.6009 67.9477 81.9838 67.9532 81.3432C67.9588 80.7027 68.2157 80.0899 68.6687 79.6369C69.1217 79.1839 69.7344 78.927 70.375 78.9214C71.0156 78.9159 71.6327 79.1621 72.0935 79.6071L75.4585 82.9738C75.8649 83.3802 76.3473 83.7025 76.8783 83.9225C77.4093 84.1424 77.9784 84.2556 78.5531 84.2556C79.1278 84.2556 79.6969 84.1424 80.2279 83.9225C80.7589 83.7025 81.2413 83.3802 81.6477 82.9738L102.984 63.6911C103.468 63.2745 104.095 63.0635 104.732 63.1034C105.369 63.1433 105.965 63.4308 106.392 63.9044C106.82 64.3781 107.046 65.0003 107.02 65.6379C106.995 66.2756 106.722 66.8781 106.258 67.3166L85.0046 86.513C84.1599 87.3531 83.1576 88.0181 82.0552 88.4698C80.9528 88.9215 79.7721 89.151 78.5808 89.1451Z",fill:"white"}),O.default.createElement("defs",null,O.default.createElement("radialGradient",{id:"paint0_radial_4580_96805",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(80 80) rotate(90) scale(80)"},O.default.createElement("stop",{stopColor:"#C4C4C4"}),O.default.createElement("stop",{offset:"1",stopColor:"#C4C4C4",stopOpacity:"0"}))))),O.default.createElement(n.Heading,{tag:"h3"},null==o?void 0:o.title),O.default.createElement(n.Text,{size:"p3",color:"gray.6"},null==o?void 0:o.description),O.default.createElement(n.Button,{mt:{base:16,md:24},fullWidth:d,size:"lg",onClick:r},s("similac.thankYou.done")))))}};exports.DynamicForm=D,exports.MAPPED_LOCALE=z,exports.Onboarding=se,exports.OnboardingContext=k;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.PATHS={GET_CITIES_LIST:"api/lists/cities?keyword={keyword}&country_id={countryId}&site={domain}&_nopaging={noPaging}",GET_CITY:"api/lists/cities?ids={ids}&site={domain}&longitude={longitude}&latitude={latitude}",GET_HOME_SEARCH:"api/search/?_home=1&city_id={city}&keyword={keyword}&site={domain}&latitude={lat}&longitude={lng}",GET_SEARCH_V2:"api/v2/search/?site={domain}&type={searchType}&keyword={keyword}&city_id={city}&latitude={lat}&longitude={lng}&specialty_id={specialty_id}&client_slug={client_slug}",GET_CITY_BY_IP:"api/geobyip?site={domain}&latitude={lat}&longitude={lng}&_nopaging={noPaging}",GET_DOCTOR_DETAIL:"api/doctors/{id}?site={site}",GET_HOSPITAL_DETAIL:"api/hospital/branch/{id}?site={site}",GET_SERVICE_DETAIL:"api/hospital/service/{id}?site={site}",GET_SEARCH_SPECIALTY:"api/v2/specialties/?site={domain}&type={searchType}&keyword={keyword}&city_id={city}&latitude={lat}&longitude={lng}",GET_SEARCH_POPULAR_KEY:"api/search/keywords?site={domain}&sort_by={sort_by}&sort_order={sort_order}&type={searchType}"};
|
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-55a6f97a.js"),a=require("./index-e022af07.js"),l=require("./index-32d3a385.js"),r=require("./useTranslations-2e7d64aa.js"),n=require("./theme-1a7c14fb.js"),o=require("recharts"),i=require("./index-dad94e78.js"),s=require("./useOutsideClick-81c62034.js"),c=require("styled-components"),d=require("./tslib.es6-0d31715f.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./Onboarding-2b01db17.js"),require("./index.styled-b9465af1.js"),require("./gAssets.js"),require("./index-a89b23de.js"),require("date-fns/locale"),require("./isProduction-e1b7813f.js"),require("./translationsContext-f962ff63.js"),require("string-format"),require("@mantine/carousel"),require("@mantine/core"),require("@mantine/hooks");var m=u(e),f=u(c);const p=e=>{const{x:t,y:a,payload:l,activeWeek:r}=e;return r===l.value?m.default.createElement("g",{transform:`translate(${t},${a})`},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"},l.value)):m.default.createElement("g",{transform:`translate(${t},${a})`},m.default.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:n.theme.colors.gray600,fontFamily:"Inter",fontWeight:"400",fontSize:"12px"},l.value))},g=f.default.div`
|
|
2
2
|
/* position: absolute; */
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
package/build/together.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./index-9f6e2696.js"),r=require("./index.styled-0d4d68f3.js"),t=require("./types-ffea7b45.js"),o=require("./index.styles-9285e23d.js");require("./tslib.es6-0d31715f.js"),require("react"),require("@mantine/core"),require("./index-dad94e78.js"),require("styled-components"),require("@mantine/carousel"),require("@mantine/hooks"),require("./gAssets.js"),require("./index-a89b23de.js"),require("date-fns/locale"),require("./Onboarding-2b01db17.js"),require("./isProduction-e1b7813f.js"),require("./index-5b7dfda4.js"),require("./screenSizeContext-4d5786c6.js"),require("lodash/throttle"),require("./theme-1a7c14fb.js"),require("dayjs"),require("./useUniqueId-86a9e1d4.js"),require("./useTranslations-2e7d64aa.js"),require("./translationsContext-f962ff63.js"),require("string-format"),require("@mantine/dates"),require("./normalizeLink-28258895.js"),require("lodash/debounce"),require("./useCategory-971481b4.js"),require("./cookieHelper-47e34efa.js"),require("./number-b3767f34.js"),require("innertext"),require("date-fns"),require("react-day-picker/DayPickerInput"),require("react-dom"),require("./index-e7f2e80f.js"),require("./index-e022af07.js"),require("./index-55a6f97a.js"),require("./index-8383af12.js"),require("./index-b99409f1.js"),require("./index-537bccbe.js"),require("./types-ef750ab6.js"),require("react-hook-form"),require("@hookform/resolvers/yup"),require("./index-c57b487f.js"),require("date-fns/locale/en-US"),require("date-fns/locale/id"),require("date-fns/locale/vi"),require("date-fns/locale/zh-TW"),require("./index.styled-b9465af1.js"),require("uuid"),require("./utils-2fb6eb7d.js"),require("dayjs/plugin/relativeTime"),require("./paths-2ac2ae14.js"),require("./constants-fd82a887.js"),require("./index-f36821a3.js"),require("react-contenteditable"),require("@mantine/form"),require("./useHealthToolCache-10f561aa.js"),require("./getDynamicHealthTool-571597e0.js"),require("./core-5c4c9018.js"),require("js-cookie"),require("lodash/flatten"),require("lodash/uniqBy"),require("./index-9669998e.js"),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-0d31715f.js"),t=require("react"),a=require("./useTranslations-2e7d64aa.js"),i=require("lodash/debounce"),o=require("./constants-fd82a887.js"),l=require("./index-537bccbe.js"),n=require("styled-components"),s=require("./index-e022af07.js"),r=require("./theme-1a7c14fb.js"),c=require("./screenSizeContext-4d5786c6.js"),d=require("react-loading-skeleton"),u=require("lodash/shuffle"),p=require("./useOutsideClick-81c62034.js"),h=require("./paths-2ac2ae14.js"),g=require("@mantine/core"),f=require("./index-a89b23de.js"),m=require("./cookieHelper-47e34efa.js"),C=require("./index-5b7dfda4.js"),b=require("string-format");function y(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function v(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 x=v(t),E=y(t),S=y(i),w=y(n),L=y(d),O=y(u),k=y(b);const I=e=>x.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),x.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 T(){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 j=w.default.div``,M=w.default.div`
|
|
2
2
|
--searchbar-z-index: 305;
|
|
3
3
|
&[data-is-modal='true'] {
|
|
4
4
|
position: fixed;
|
|
@@ -478,7 +478,7 @@
|
|
|
478
478
|
line-height: 22px;
|
|
479
479
|
cursor: pointer;
|
|
480
480
|
}
|
|
481
|
-
`;const ut=({state:e,type:i,results:
|
|
481
|
+
`;const ut=({state:e,type:i,results:l,location:n,isLoading:c,typeInformation:d,clientSlug:u="",dispatch:p})=>{const{t:h}=a.useTranslations(),{selectedLocation:f}=e,m=t.useMemo((()=>d[i].slug),[d,i]);return E.default.createElement(st,null,E.default.createElement(rt,null,E.default.createElement("div",{className:"title"},h("booking.searchResult.description",{search_type:d[i].name,search_location:n})),l.length>0&&E.default.createElement("div",{className:"btn-see-all",onClick:()=>{let t=`/${f.slug}/${m}`;u===o.CLIENT_GSK&&(t+=`/${u}`),("doctor"===i||"hospital"===i)&&e.selectedSpecialty.id>0&&(t+=`?specialtyId=${e.selectedSpecialty.id}`),t&&p({type:at.NavigateTo,payload:t})}},h("home.seeAll"))),E.default.createElement(ct,null,c&&Array(3).fill(void 0).map(((e,t)=>E.default.createElement(dt,{key:i+"loading"+t,className:2===t?"last-item":""},E.default.createElement("div",{className:"image-item"},E.default.createElement(g.Skeleton,{height:48,circle:!0,mb:"xl",animate:!0})),E.default.createElement("div",{className:"infor"},E.default.createElement("div",{className:"title"},E.default.createElement(g.Skeleton,{height:8,mt:10,radius:"xl",animate:!0})),E.default.createElement("div",{className:"description"},E.default.createElement("div",{className:"sub-description"},E.default.createElement(g.Skeleton,{height:8,mt:10,radius:"xl",width:"80%",animate:!0}))))))),!c&&l&&l.length>0&&E.default.createElement(E.default.Fragment,null,l.map(((e,t)=>{var a,o;const n=l.length>4&&3===t||l.length<=4&&t===l.length-1;let s="";return"hospital"===i&&(s=(null==e?void 0:e.address)||""),"doctor"===i&&(s=(null===(a=null==e?void 0:e.specialties)||void 0===a?void 0:a.join(", "))||""),"service"===i&&(s=(null===(o=null==e?void 0:e.organization)||void 0===o?void 0:o.name)||""),t>=4?E.default.createElement(E.default.Fragment,null):E.default.createElement(dt,{key:e.id,className:n?"last-item":"",onClick:()=>(e=>{let t="";switch(i){case"service":t=`/${f.slug}/${m}/${e.slug}`;break;case"doctor":case"hospital":t=`/${m}/${e.slug}-${e.id}`}t&&p({type:at.NavigateTo,payload:t})})(e)},E.default.createElement("div",{className:"image-item"},E.default.createElement("img",{src:e.logo||e.avatar,alt:e.name})),E.default.createElement("div",{className:"infor"},E.default.createElement("div",{className:"title"},e.name),E.default.createElement("div",{className:"description"},d[i].icon,E.default.createElement("div",{className:"sub-description"},s))))}))),!c&&0===(null==l?void 0:l.length)&&E.default.createElement(s.Text,{size:"sm",color:r.theme.colors.gray400},h("booking.searchBar.noResults"))))},pt=w.default.div`
|
|
482
482
|
position: relative;
|
|
483
483
|
|
|
484
484
|
${c.MediaQueries.mbDown} {
|
|
@@ -559,7 +559,7 @@
|
|
|
559
559
|
`;w.default(_)`
|
|
560
560
|
width: 12px;
|
|
561
561
|
height: 18px;
|
|
562
|
-
`;const ft=()=>E.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},E.default.createElement("path",{d:"M8.98307 14.3333C7.87196 14.3333 6.92752 13.9445 6.14974 13.1667C5.37196 12.3889 4.98307 11.4445 4.98307 10.3333V9.96668C4.08307 9.85557 3.33041 9.45557 2.72507 8.76668C2.1193 8.07779 1.81641 7.26668 1.81641 6.33334V3.10001C1.81641 2.93334 1.87463 2.79157 1.99107 2.67468C2.10796 2.55823 2.24974 2.50001 2.41641 2.50001H3.81641V2.33334C3.81641 2.1889 3.86374 2.06934 3.95841 1.97468C4.05263 1.88045 4.17196 1.83334 4.31641 1.83334C4.46085 1.83334 4.58041 1.88045 4.67507 1.97468C4.7693 2.06934 4.81641 2.1889 4.81641 2.33334V3.66668C4.81641 3.81112 4.7693 3.93045 4.67507 4.02468C4.58041 4.11934 4.46085 4.16668 4.31641 4.16668C4.17196 4.16668 4.05263 4.11934 3.95841 4.02468C3.86374 3.93045 3.81641 3.81112 3.81641 3.66668V3.50001H2.81641V6.33334C2.81641 7.06668 3.07752 7.69445 3.59974 8.21668C4.12196 8.7389 4.74974 9.00001 5.48307 9.00001C6.21641 9.00001 6.84418 8.7389 7.36641 8.21668C7.88863 7.69445 8.14974 7.06668 8.14974 6.33334V3.50001H7.14974V3.66668C7.14974 3.81112 7.10263 3.93045 7.00841 4.02468C6.91374 4.11934 6.79418 4.16668 6.64974 4.16668C6.5053 4.16668 6.38596 4.11934 6.29174 4.02468C6.19707 3.93045 6.14974 3.81112 6.14974 3.66668V2.33334C6.14974 2.1889 6.19707 2.06934 6.29174 1.97468C6.38596 1.88045 6.5053 1.83334 6.64974 1.83334C6.79418 1.83334 6.91374 1.88045 7.00841 1.97468C7.10263 2.06934 7.14974 2.1889 7.14974 2.33334V2.50001H8.54974C8.71641 2.50001 8.85818 2.55823 8.97507 2.67468C9.09152 2.79157 9.14974 2.93334 9.14974 3.10001V6.33334C9.14974 7.26668 8.84707 8.07779 8.24174 8.76668C7.63596 9.45557 6.88307 9.85557 5.98307 9.96668V10.3333C5.98307 11.1667 6.27485 11.8751 6.85841 12.4587C7.44152 13.0418 8.14974 13.3333 8.98307 13.3333C9.81641 13.3333 10.5249 13.0418 11.1084 12.4587C11.6915 11.8751 11.9831 11.1667 11.9831 10.3333V9.25001C11.6386 9.1389 11.3526 8.93601 11.1251 8.64134C10.8971 8.34712 10.7831 8.01112 10.7831 7.63334C10.7831 7.15557 10.9497 6.75001 11.2831 6.41668C11.6164 6.08334 12.0164 5.91668 12.4831 5.91668C12.9609 5.91668 13.3664 6.08334 13.6997 6.41668C14.0331 6.75001 14.1997 7.15557 14.1997 7.63334C14.1997 8.01112 14.086 8.34712 13.8584 8.64134C13.6304 8.93601 13.3386 9.1389 12.9831 9.25001V10.3333C12.9831 11.4445 12.5942 12.3889 11.8164 13.1667C11.0386 13.9445 10.0942 14.3333 8.98307 14.3333ZM12.4831 8.33334C12.6831 8.33334 12.8526 8.26401 12.9917 8.12534C13.1304 7.98623 13.1997 7.82223 13.1997 7.63334C13.1997 7.43334 13.1304 7.26401 12.9917 7.12534C12.8526 6.98623 12.6831 6.91668 12.4831 6.91668C12.2831 6.91668 12.1164 6.98623 11.9831 7.12534C11.8497 7.26401 11.7831 7.43334 11.7831 7.63334C11.7831 7.82223 11.8497 7.98623 11.9831 8.12534C12.1164 8.26401 12.2831 8.33334 12.4831 8.33334Z",fill:"#595959"})),mt=()=>E.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},E.default.createElement("path",{d:"M6.86836 9.26489V10.2386C6.86836 10.509 6.96294 10.7389 7.15209 10.9283C7.34124 11.1176 7.57093 11.2122 7.84114 11.2122C8.11135 11.2122 8.34133 11.1176 8.53106 10.9283C8.7208 10.7389 8.81567 10.509 8.81567 10.2386V9.26489H9.78936C10.0598 9.26489 10.2897 9.17031 10.479 8.98116C10.6684 8.79201 10.763 8.56233 10.763 8.29211C10.763 8.0219 10.6684 7.79192 10.479 7.60219C10.2897 7.41245 10.0598 7.31758 9.78936 7.31758H8.81567V6.34389C8.81567 6.07343 8.72109 5.84354 8.53194 5.65422C8.34279 5.4649 8.11311 5.37024 7.84289 5.37024C7.57268 5.37024 7.3427 5.4649 7.15297 5.65422C6.96323 5.84354 6.86836 6.07343 6.86836 6.34389V7.31758H5.89467C5.62421 7.31758 5.39432 7.41216 5.205 7.60131C5.01568 7.79046 4.92102 8.02014 4.92102 8.29036C4.92102 8.56057 5.01568 8.79055 5.205 8.98028C5.39432 9.17002 5.62421 9.26489 5.89467 9.26489H6.86836ZM3.40809 14.1333C3.02086 14.1333 2.68938 13.9954 2.41364 13.7196C2.13788 13.4439 2 13.1124 2 12.7252V6.07426C2 5.85132 2.04987 5.64011 2.14961 5.44063C2.24936 5.24116 2.38723 5.07689 2.56323 4.94782L6.99718 1.61486C7.24323 1.42712 7.52444 1.33325 7.84081 1.33325C8.15718 1.33325 8.43919 1.42712 8.68685 1.61486L13.1208 4.94782C13.2968 5.07689 13.4347 5.24116 13.5344 5.44063C13.6342 5.64011 13.684 5.85132 13.684 6.07426V12.7252C13.684 13.1124 13.5462 13.4439 13.2704 13.7196C12.9947 13.9954 12.6632 14.1333 12.2759 14.1333H3.40809ZM3.40809 12.9649H12.2759C12.3459 12.9649 12.4033 12.9424 12.4482 12.8974C12.4932 12.8525 12.5156 12.7951 12.5156 12.7252V6.07426C12.5156 6.03431 12.5069 5.99811 12.4894 5.96566C12.4719 5.9332 12.4482 5.90449 12.4183 5.87953L7.98433 2.55406C7.94438 2.51911 7.89694 2.50164 7.84202 2.50164C7.78709 2.50164 7.73965 2.51911 7.69971 2.55406L3.26576 5.87953C3.2358 5.90449 3.21209 5.9332 3.1946 5.96566C3.17712 5.99811 3.16839 6.03431 3.16839 6.07426V12.7252C3.16839 12.7951 3.19086 12.8525 3.2358 12.8974C3.28075 12.9424 3.33818 12.9649 3.40809 12.9649Z",fill:"#595959"})),Ct=()=>E.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},E.default.createElement("path",{d:"M7.99984 8.00004C8.3665 8.00004 8.68039 7.86949 8.9415 7.60837C9.20261 7.34726 9.33317 7.03337 9.33317 6.66671C9.33317 6.30004 9.20261 5.98615 8.9415 5.72504C8.68039 5.46393 8.3665 5.33337 7.99984 5.33337C7.63317 5.33337 7.31928 5.46393 7.05817 5.72504C6.79706 5.98615 6.6665 6.30004 6.6665 6.66671C6.6665 7.03337 6.79706 7.34726 7.05817 7.60837C7.31928 7.86949 7.63317 8.00004 7.99984 8.00004ZM7.99984 12.9C9.35539 11.6556 10.3609 10.525 11.0165 9.50837C11.6721 8.49171 11.9998 7.58893 11.9998 6.80004C11.9998 5.58893 11.6137 4.59726 10.8415 3.82504C10.0693 3.05282 9.12206 2.66671 7.99984 2.66671C6.87761 2.66671 5.93039 3.05282 5.15817 3.82504C4.38595 4.59726 3.99984 5.58893 3.99984 6.80004C3.99984 7.58893 4.32761 8.49171 4.98317 9.50837C5.63873 10.525 6.64428 11.6556 7.99984 12.9ZM7.99984 14.4167C7.91095 14.4167 7.82206 14.4 7.73317 14.3667C7.64428 14.3334 7.5665 14.2889 7.49984 14.2334C5.87761 12.8 4.6665 11.4695 3.8665 10.2417C3.0665 9.01393 2.6665 7.86671 2.6665 6.80004C2.6665 5.13337 3.20261 3.8056 4.27484 2.81671C5.34706 1.82782 6.58873 1.33337 7.99984 1.33337C9.41095 1.33337 10.6526 1.82782 11.7248 2.81671C12.7971 3.8056 13.3332 5.13337 13.3332 6.80004C13.3332 7.86671 12.9332 9.01393 12.1332 10.2417C11.3332 11.4695 10.1221 12.8 8.49984 14.2334C8.43317 14.2889 8.35539 14.3334 8.2665 14.3667C8.17761 14.4 8.08873 14.4167 7.99984 14.4167Z",fill:"#8C8C8C"})),bt=()=>E.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},E.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"})),yt=({state:e,isMobile:i,debouncedFetchSearchResults:l,selectedLocation:n,onSpecialtyClick:r,dispatch:c})=>{var d;const{t:u,locale:h}=a.useTranslations(),f=t.useRef(null),m=t.useMemo((()=>o.LOCALIZED_SLUGS[h]),[h]),C=t.useMemo((()=>({wrapper:{"&:after":{content:'""',width:"1px",height:"20px",backgroundColor:"#E4E8EC",position:"absolute",right:0,top:"13px"}},input:{border:i?"border: 1px solid #d9d9d9":"none",height:i?"40px":"46px !important",paddingRight:"30px","&:focus":{boxShadow:i?"box-shadow: 0px 0px 0px 2px #91caff":"none"}},rightSection:{width:"30px",svg:{fontSize:"20px"}}})),[i]),b=t.useCallback((function(e){console.log(e)}),[l,c]);return p.useOutsideClick(f,(()=>{c({type:at.ClickOutsideInputSpecialty})})),E.default.createElement(pt,{ref:f},E.default.createElement(g.Input.Wrapper,null,E.default.createElement(g.Input,{size:i?"md":"lg",placeholder:u("booking.searchPopup.specialties"),value:(null===(d=null==e?void 0:e.selectedSpecialty)||void 0===d?void 0:d.name)||"",rightSection:E.default.createElement(I,null),styles:C,onFocus:()=>c({type:at.FocusInputSpecialty}),onChange:e=>{b(e.target.value)}})),"specialty"===e.focused&&E.default.createElement(ht,null,E.default.createElement(gt,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{r&&r({name:u("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:m.SPECIALTIES})}},E.default.createElement("div",{className:"image-item"},E.default.createElement(bt,null)),E.default.createElement(s.Text,{size:"md"},u("booking.searchBar.allSpecialties"))),e.allSpecialties.map((e=>E.default.createElement(gt,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),r&&r(Object.assign(Object.assign({},e),{total_doctor:0}))},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==n?void 0:n.id)===e.id},E.default.createElement("div",{className:"image-item"},E.default.createElement("img",{src:e.thumbnail,alt:e.name})),E.default.createElement(s.Text,{size:"md"},e.name))))))},vt=({state:e,type:i,isMobile:o,isLoading:l,initalSearchValue:n,typeInformation:s,debouncedFetchSearchResults:r,trackingAttributes:c,hideSpecialtySelection:d=!1,focusSearchInput:u,onSearch:h,dispatch:f})=>{var m;const{t:b}=a.useTranslations(),y=t.useRef(null),v=t.useMemo((()=>c?{"data-event-category":c.dataEventCategory,"data-event-action":c.dataEventAction,"data-event-label":c.dataEventLabel}:{}),[c]),x=t.useMemo((()=>"doctor"===i?b("booking.searchBar.placeholder.doctor"):"service"===i?b("booking.searchBar.placeholder.service"):"hospital"===i?b("booking.searchBar.placeholder.hospital"):"specialty"===i?b("booking.searchBar.placeholder.specialty"):""),[i]),S=t.useMemo((()=>({root:{flex:1,"&.hide-specialty-selection":{".mantine-Input-rightSection":{display:"none"},input:{paddingLeft:"48px"},".mantine-Input-icon":{left:"0"}}}})),[]),w=t.useMemo((()=>({icon:{left:"165px"},input:{color:"#262626",'&[data-with-icon="true"]':{paddingLeft:"205px",paddingRight:"16px"}},rightSection:{left:0,width:"165px",padding:"1px"}})),[]),L=t.useMemo((()=>({input:{color:"#262626"}})),[]);p.useOutsideClick(y,(()=>{f({type:at.ClickOutsideInputSearch})}));const O=t.useCallback((function(t){f({type:at.ChangeInputSearch,payload:t}),"function"!=typeof h&&(t.trim().length>et[e.locale]||n||0===t.trim().length?r(t.trim(),e,i):(r.cancel(),f({type:at.DisplayInitialSearchResults})))}),[f,e,i]),k=t.useCallback((function(e){f({type:at.SelectSpecialty,payload:e}),u()}),[f]);return E.default.createElement(lt,{ref:y},"specialty"===i?E.default.createElement(g.Input.Wrapper,{styles:S},E.default.createElement(g.Input,{icon:E.default.createElement(C.Icon.Search,null),size:o?"md":"lg",placeholder:x,styles:L,value:e.searchKeywords,onFocus:()=>f({type:at.FocusInputSearchSpecialty}),onChange:e=>{O(e.target.value)}})):E.default.createElement(E.default.Fragment,null,"service"===i?E.default.createElement(g.Input.Wrapper,{styles:S},E.default.createElement(g.Input,{icon:E.default.createElement(C.Icon.Search,null),size:o?"md":"lg",name:"search-results",placeholder:x,onFocus:()=>f({type:at.FocusInputSearch}),value:e.searchKeywords,onChange:e=>{O(e.target.value)}})):E.default.createElement(E.default.Fragment,null,o&&!d?E.default.createElement(E.default.Fragment,null,E.default.createElement(yt,{state:e,isMobile:o,dispatch:f,debouncedFetchSearchResults:r,onSpecialtyClick:k}),E.default.createElement(g.Input.Wrapper,{styles:S},E.default.createElement(g.Input,{icon:E.default.createElement(C.Icon.Search,null),size:"md",placeholder:x,value:e.searchKeywords,name:"search-results",onFocus:()=>f({type:at.FocusInputSearch}),onChange:e=>{O(e.target.value)}}))):E.default.createElement(g.Input.Wrapper,{styles:S,className:d?"hide-specialty-selection":""},E.default.createElement(g.Input,Object.assign({icon:E.default.createElement(C.Icon.Search,null),size:"lg",placeholder:x,styles:w,name:"search-results",autoComplete:"off",value:e.searchKeywords,onChange:e=>{O(e.target.value)},onFocus:()=>f({type:at.FocusInputSearch})},v,{rightSection:d?E.default.createElement(E.default.Fragment,null):E.default.createElement(yt,{state:e,isMobile:o,dispatch:f,debouncedFetchSearchResults:r,onSpecialtyClick:k})})))),"search"===e.focused&&E.default.createElement(nt,null,E.default.createElement(ut,{type:i,state:e,results:(null===(m=e.searchResults)||void 0===m?void 0:m[i])||[],location:e.selectedLocation.name,dispatch:f,isLoading:l,typeInformation:s}))))},xt=w.default.div`
|
|
562
|
+
`;const ft=()=>E.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},E.default.createElement("path",{d:"M8.98307 14.3333C7.87196 14.3333 6.92752 13.9445 6.14974 13.1667C5.37196 12.3889 4.98307 11.4445 4.98307 10.3333V9.96668C4.08307 9.85557 3.33041 9.45557 2.72507 8.76668C2.1193 8.07779 1.81641 7.26668 1.81641 6.33334V3.10001C1.81641 2.93334 1.87463 2.79157 1.99107 2.67468C2.10796 2.55823 2.24974 2.50001 2.41641 2.50001H3.81641V2.33334C3.81641 2.1889 3.86374 2.06934 3.95841 1.97468C4.05263 1.88045 4.17196 1.83334 4.31641 1.83334C4.46085 1.83334 4.58041 1.88045 4.67507 1.97468C4.7693 2.06934 4.81641 2.1889 4.81641 2.33334V3.66668C4.81641 3.81112 4.7693 3.93045 4.67507 4.02468C4.58041 4.11934 4.46085 4.16668 4.31641 4.16668C4.17196 4.16668 4.05263 4.11934 3.95841 4.02468C3.86374 3.93045 3.81641 3.81112 3.81641 3.66668V3.50001H2.81641V6.33334C2.81641 7.06668 3.07752 7.69445 3.59974 8.21668C4.12196 8.7389 4.74974 9.00001 5.48307 9.00001C6.21641 9.00001 6.84418 8.7389 7.36641 8.21668C7.88863 7.69445 8.14974 7.06668 8.14974 6.33334V3.50001H7.14974V3.66668C7.14974 3.81112 7.10263 3.93045 7.00841 4.02468C6.91374 4.11934 6.79418 4.16668 6.64974 4.16668C6.5053 4.16668 6.38596 4.11934 6.29174 4.02468C6.19707 3.93045 6.14974 3.81112 6.14974 3.66668V2.33334C6.14974 2.1889 6.19707 2.06934 6.29174 1.97468C6.38596 1.88045 6.5053 1.83334 6.64974 1.83334C6.79418 1.83334 6.91374 1.88045 7.00841 1.97468C7.10263 2.06934 7.14974 2.1889 7.14974 2.33334V2.50001H8.54974C8.71641 2.50001 8.85818 2.55823 8.97507 2.67468C9.09152 2.79157 9.14974 2.93334 9.14974 3.10001V6.33334C9.14974 7.26668 8.84707 8.07779 8.24174 8.76668C7.63596 9.45557 6.88307 9.85557 5.98307 9.96668V10.3333C5.98307 11.1667 6.27485 11.8751 6.85841 12.4587C7.44152 13.0418 8.14974 13.3333 8.98307 13.3333C9.81641 13.3333 10.5249 13.0418 11.1084 12.4587C11.6915 11.8751 11.9831 11.1667 11.9831 10.3333V9.25001C11.6386 9.1389 11.3526 8.93601 11.1251 8.64134C10.8971 8.34712 10.7831 8.01112 10.7831 7.63334C10.7831 7.15557 10.9497 6.75001 11.2831 6.41668C11.6164 6.08334 12.0164 5.91668 12.4831 5.91668C12.9609 5.91668 13.3664 6.08334 13.6997 6.41668C14.0331 6.75001 14.1997 7.15557 14.1997 7.63334C14.1997 8.01112 14.086 8.34712 13.8584 8.64134C13.6304 8.93601 13.3386 9.1389 12.9831 9.25001V10.3333C12.9831 11.4445 12.5942 12.3889 11.8164 13.1667C11.0386 13.9445 10.0942 14.3333 8.98307 14.3333ZM12.4831 8.33334C12.6831 8.33334 12.8526 8.26401 12.9917 8.12534C13.1304 7.98623 13.1997 7.82223 13.1997 7.63334C13.1997 7.43334 13.1304 7.26401 12.9917 7.12534C12.8526 6.98623 12.6831 6.91668 12.4831 6.91668C12.2831 6.91668 12.1164 6.98623 11.9831 7.12534C11.8497 7.26401 11.7831 7.43334 11.7831 7.63334C11.7831 7.82223 11.8497 7.98623 11.9831 8.12534C12.1164 8.26401 12.2831 8.33334 12.4831 8.33334Z",fill:"#595959"})),mt=()=>E.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},E.default.createElement("path",{d:"M6.86836 9.26489V10.2386C6.86836 10.509 6.96294 10.7389 7.15209 10.9283C7.34124 11.1176 7.57093 11.2122 7.84114 11.2122C8.11135 11.2122 8.34133 11.1176 8.53106 10.9283C8.7208 10.7389 8.81567 10.509 8.81567 10.2386V9.26489H9.78936C10.0598 9.26489 10.2897 9.17031 10.479 8.98116C10.6684 8.79201 10.763 8.56233 10.763 8.29211C10.763 8.0219 10.6684 7.79192 10.479 7.60219C10.2897 7.41245 10.0598 7.31758 9.78936 7.31758H8.81567V6.34389C8.81567 6.07343 8.72109 5.84354 8.53194 5.65422C8.34279 5.4649 8.11311 5.37024 7.84289 5.37024C7.57268 5.37024 7.3427 5.4649 7.15297 5.65422C6.96323 5.84354 6.86836 6.07343 6.86836 6.34389V7.31758H5.89467C5.62421 7.31758 5.39432 7.41216 5.205 7.60131C5.01568 7.79046 4.92102 8.02014 4.92102 8.29036C4.92102 8.56057 5.01568 8.79055 5.205 8.98028C5.39432 9.17002 5.62421 9.26489 5.89467 9.26489H6.86836ZM3.40809 14.1333C3.02086 14.1333 2.68938 13.9954 2.41364 13.7196C2.13788 13.4439 2 13.1124 2 12.7252V6.07426C2 5.85132 2.04987 5.64011 2.14961 5.44063C2.24936 5.24116 2.38723 5.07689 2.56323 4.94782L6.99718 1.61486C7.24323 1.42712 7.52444 1.33325 7.84081 1.33325C8.15718 1.33325 8.43919 1.42712 8.68685 1.61486L13.1208 4.94782C13.2968 5.07689 13.4347 5.24116 13.5344 5.44063C13.6342 5.64011 13.684 5.85132 13.684 6.07426V12.7252C13.684 13.1124 13.5462 13.4439 13.2704 13.7196C12.9947 13.9954 12.6632 14.1333 12.2759 14.1333H3.40809ZM3.40809 12.9649H12.2759C12.3459 12.9649 12.4033 12.9424 12.4482 12.8974C12.4932 12.8525 12.5156 12.7951 12.5156 12.7252V6.07426C12.5156 6.03431 12.5069 5.99811 12.4894 5.96566C12.4719 5.9332 12.4482 5.90449 12.4183 5.87953L7.98433 2.55406C7.94438 2.51911 7.89694 2.50164 7.84202 2.50164C7.78709 2.50164 7.73965 2.51911 7.69971 2.55406L3.26576 5.87953C3.2358 5.90449 3.21209 5.9332 3.1946 5.96566C3.17712 5.99811 3.16839 6.03431 3.16839 6.07426V12.7252C3.16839 12.7951 3.19086 12.8525 3.2358 12.8974C3.28075 12.9424 3.33818 12.9649 3.40809 12.9649Z",fill:"#595959"})),Ct=()=>E.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},E.default.createElement("path",{d:"M7.99984 8.00004C8.3665 8.00004 8.68039 7.86949 8.9415 7.60837C9.20261 7.34726 9.33317 7.03337 9.33317 6.66671C9.33317 6.30004 9.20261 5.98615 8.9415 5.72504C8.68039 5.46393 8.3665 5.33337 7.99984 5.33337C7.63317 5.33337 7.31928 5.46393 7.05817 5.72504C6.79706 5.98615 6.6665 6.30004 6.6665 6.66671C6.6665 7.03337 6.79706 7.34726 7.05817 7.60837C7.31928 7.86949 7.63317 8.00004 7.99984 8.00004ZM7.99984 12.9C9.35539 11.6556 10.3609 10.525 11.0165 9.50837C11.6721 8.49171 11.9998 7.58893 11.9998 6.80004C11.9998 5.58893 11.6137 4.59726 10.8415 3.82504C10.0693 3.05282 9.12206 2.66671 7.99984 2.66671C6.87761 2.66671 5.93039 3.05282 5.15817 3.82504C4.38595 4.59726 3.99984 5.58893 3.99984 6.80004C3.99984 7.58893 4.32761 8.49171 4.98317 9.50837C5.63873 10.525 6.64428 11.6556 7.99984 12.9ZM7.99984 14.4167C7.91095 14.4167 7.82206 14.4 7.73317 14.3667C7.64428 14.3334 7.5665 14.2889 7.49984 14.2334C5.87761 12.8 4.6665 11.4695 3.8665 10.2417C3.0665 9.01393 2.6665 7.86671 2.6665 6.80004C2.6665 5.13337 3.20261 3.8056 4.27484 2.81671C5.34706 1.82782 6.58873 1.33337 7.99984 1.33337C9.41095 1.33337 10.6526 1.82782 11.7248 2.81671C12.7971 3.8056 13.3332 5.13337 13.3332 6.80004C13.3332 7.86671 12.9332 9.01393 12.1332 10.2417C11.3332 11.4695 10.1221 12.8 8.49984 14.2334C8.43317 14.2889 8.35539 14.3334 8.2665 14.3667C8.17761 14.4 8.08873 14.4167 7.99984 14.4167Z",fill:"#8C8C8C"})),bt=()=>E.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},E.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"})),yt=({state:e,isMobile:i,debouncedFetchSearchResults:l,selectedLocation:n,onSpecialtyClick:r,dispatch:c})=>{var d;const{t:u,locale:h}=a.useTranslations(),f=t.useRef(null),m=t.useMemo((()=>o.LOCALIZED_SLUGS[h]),[h]),C=t.useMemo((()=>({wrapper:{"&:after":{content:'""',width:"1px",height:"20px",backgroundColor:"#E4E8EC",position:"absolute",right:0,top:"13px"}},input:{border:i?"border: 1px solid #d9d9d9":"none",height:i?"40px":"46px !important",paddingRight:"30px","&:focus":{boxShadow:i?"box-shadow: 0px 0px 0px 2px #91caff":"none"}},rightSection:{width:"30px",svg:{fontSize:"20px"}}})),[i]),b=t.useCallback((function(e){console.log(e)}),[l,c]);return p.useOutsideClick(f,(()=>{c({type:at.ClickOutsideInputSpecialty})})),E.default.createElement(pt,{ref:f},E.default.createElement(g.Input.Wrapper,null,E.default.createElement(g.Input,{size:i?"md":"lg",placeholder:u("booking.searchPopup.specialties"),value:(null===(d=null==e?void 0:e.selectedSpecialty)||void 0===d?void 0:d.name)||"",rightSection:E.default.createElement(I,null),styles:C,onFocus:()=>c({type:at.FocusInputSpecialty}),onChange:e=>{b(e.target.value)}})),"specialty"===e.focused&&E.default.createElement(ht,null,E.default.createElement(gt,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{r&&r({name:u("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:m.SPECIALTIES})}},E.default.createElement("div",{className:"image-item"},E.default.createElement(bt,null)),E.default.createElement(s.Text,{size:"md"},u("booking.searchBar.allSpecialties"))),e.allSpecialties.map((e=>E.default.createElement(gt,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),r&&r(Object.assign(Object.assign({},e),{total_doctor:0}))},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==n?void 0:n.id)===e.id},E.default.createElement("div",{className:"image-item"},E.default.createElement("img",{src:e.thumbnail,alt:e.name})),E.default.createElement(s.Text,{size:"md"},e.name))))))},vt=({state:e,type:i,isMobile:o,isLoading:l,initalSearchValue:n,typeInformation:s,debouncedFetchSearchResults:r,trackingAttributes:c,hideSpecialtySelection:d=!1,clientSlug:u="",focusSearchInput:h,onSearch:f,dispatch:m})=>{var b;const{t:y}=a.useTranslations(),v=t.useRef(null),x=t.useMemo((()=>c?{"data-event-category":c.dataEventCategory,"data-event-action":c.dataEventAction,"data-event-label":c.dataEventLabel}:{}),[c]),S=t.useMemo((()=>"doctor"===i?y("booking.searchBar.placeholder.doctor"):"service"===i?y("booking.searchBar.placeholder.service"):"hospital"===i?y("booking.searchBar.placeholder.hospital"):"specialty"===i?y("booking.searchBar.placeholder.specialty"):""),[i]),w=t.useMemo((()=>({root:{flex:1,"&.hide-specialty-selection":{".mantine-Input-rightSection":{display:"none"},input:{paddingLeft:"48px"},".mantine-Input-icon":{left:"0"}}}})),[]),L=t.useMemo((()=>({icon:{left:"165px"},input:{color:"#262626",'&[data-with-icon="true"]':{paddingLeft:"205px",paddingRight:"16px"}},rightSection:{left:0,width:"165px",padding:"1px"}})),[]),O=t.useMemo((()=>({input:{color:"#262626"}})),[]);p.useOutsideClick(v,(()=>{m({type:at.ClickOutsideInputSearch})}));const k=t.useCallback((function(t){m({type:at.ChangeInputSearch,payload:t}),"function"!=typeof f&&(t.trim().length>et[e.locale]||n||0===t.trim().length?r(t.trim(),e,i,u):(r.cancel(),m({type:at.DisplayInitialSearchResults})))}),[m,e,i]),I=t.useCallback((function(e){m({type:at.SelectSpecialty,payload:e}),h()}),[m]);return E.default.createElement(lt,{ref:v},"specialty"===i?E.default.createElement(g.Input.Wrapper,{styles:w},E.default.createElement(g.Input,{icon:E.default.createElement(C.Icon.Search,null),size:o?"md":"lg",placeholder:S,styles:O,value:e.searchKeywords,onFocus:()=>m({type:at.FocusInputSearchSpecialty}),onChange:e=>{k(e.target.value)}})):E.default.createElement(E.default.Fragment,null,"service"===i?E.default.createElement(g.Input.Wrapper,{styles:w},E.default.createElement(g.Input,{icon:E.default.createElement(C.Icon.Search,null),size:o?"md":"lg",name:"search-results",placeholder:S,onFocus:()=>m({type:at.FocusInputSearch}),value:e.searchKeywords,onChange:e=>{k(e.target.value)}})):E.default.createElement(E.default.Fragment,null,o&&!d?E.default.createElement(E.default.Fragment,null,E.default.createElement(yt,{state:e,isMobile:o,dispatch:m,debouncedFetchSearchResults:r,onSpecialtyClick:I}),E.default.createElement(g.Input.Wrapper,{styles:w},E.default.createElement(g.Input,{icon:E.default.createElement(C.Icon.Search,null),size:"md",placeholder:S,value:e.searchKeywords,name:"search-results",onFocus:()=>m({type:at.FocusInputSearch}),onChange:e=>{k(e.target.value)}}))):E.default.createElement(g.Input.Wrapper,{styles:w,className:d?"hide-specialty-selection":""},E.default.createElement(g.Input,Object.assign({icon:E.default.createElement(C.Icon.Search,null),size:"lg",placeholder:S,styles:L,name:"search-results",autoComplete:"off",value:e.searchKeywords,onChange:e=>{k(e.target.value)},onFocus:()=>m({type:at.FocusInputSearch})},x,{rightSection:d?E.default.createElement(E.default.Fragment,null):E.default.createElement(yt,{state:e,isMobile:o,dispatch:m,debouncedFetchSearchResults:r,onSpecialtyClick:I})})))),"search"===e.focused&&E.default.createElement(nt,null,E.default.createElement(ut,{type:i,state:e,results:(null===(b=e.searchResults)||void 0===b?void 0:b[i])||[],location:e.selectedLocation.name,dispatch:m,isLoading:l,typeInformation:s,clientSlug:u}))))},xt=w.default.div`
|
|
563
563
|
position: relative;
|
|
564
564
|
|
|
565
565
|
${c.MediaQueries.mbDown} {
|
|
@@ -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
|
-
`,Ft=({currentTab:e,hideTabBookingSearch:i=[],isMobile:o,setCurrentTab:l})=>{const{t:n}=a.useTranslations(),s=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]),r=(()=>{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")}]})(),c=t.useMemo((()=>r.filter((e=>!i.includes(e.value)))||[]),[i,r]);return E.default.createElement(Pt,{className:"booking-search-tab"},E.default.createElement(C.Container,null,E.default.createElement(g.Tabs,{value:e,onTabChange:e=>{l(e)},styles:s},E.default.createElement(g.Tabs.List,null,c.map((e=>E.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 $t;!function(e){e[e.SPECIALTY=1]="SPECIALTY",e[e.DOCTOR=2]="DOCTOR",e[e.CLINIC=3]="CLINIC",e[e.SERVICE=4]="SERVICE"}($t||($t={}));var Dt=Object.freeze({__proto__:null,get RedirectType(){return $t}});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:x,onGeoLocationPermissionChange:w,onSearch:L,onChangeLocation:O})=>{const{t:k,locale:I}=a.useTranslations(),N=t.useRef(null),F=t.useRef(null),[_,$]=t.useState(void 0),[D,B]=t.useState(!1),{geoLocationPermission:V,geoLocationCoordinates:K,requestGeoLocation:H}=T(),[z,G]=t.useReducer(Ce,ge,(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:I}))),{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:le}=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:fe.FetchCitiesStart}),fetch(Ye(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:fe.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:fe.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:fe.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:fe.FetchSearchResultsStart});const{defaultCity:s,selectedLocation:r,geoLocationCoordinates:c}=l;let d="";if(!r||!s)return void e({type:fe.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(Ye(n,{domain:a,searchType:"global",keyword:t.trim().length>he[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:fe.FetchSearchResultsComplete,payload:t}))).catch((e=>{console.log("error loading search results",{url:n,error:e})})).finally((()=>e({type:fe.FetchSearchResultsFinish})))}),[i,a,e])}}({dispatch:G,locale:I,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[I])||void 0===e?void 0:e.CURRENT}}),[k,I]),ue=t.useMemo((()=>S.default(re,400)),[re]),me=t.useMemo((()=>S.default(ce,400)),[ce]);t.useEffect((()=>{""!==c&&c!==z.searchKeywords&&G({type:fe.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?G({type:fe.GrantGeoLocationPermission,payload:K}):"denied"===V&&G({type:fe.DenyGeoLocationPermission}))}),[J,V,K,n]),t.useEffect((()=>{U&&(x?x(U):window.location.href=`${d}${U}`)}),[U]);const be=t.useCallback((function(){G({type:fe.SelectCurrentLocation,payload:de})}),[k,G]);t.useEffect((()=>{var e;"denied"===J||ee||G({type:fe.SelectLocation,payload:{name:k("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(e=o.LOCALIZED_SLUGS[I])||void 0===e?void 0:e.ALL}}),w&&w(J,z.geoLocationCoordinates),i&&"granted"===J&&X&&G({type:fe.FocusInputSearch}),se({coordinates:z.geoLocationCoordinates})}),[J]),t.useEffect((()=>{X&&te&&ce(z.searchKeywords,z)}),[X,te]),t.useEffect((()=>{C!==le&&G({type:fe.SetInputSearchPlaceholder,payload:C})}),[C,le]),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"===I&&B(!0),G({type:fe.SelectLocation,payload:e}),"ms-MY"!==I&&Ee(),O&&O(e)}),[k,G]);function ve(){"ms-MY"===I&&B(!0),i&&"granted"!==z.geoLocationPermission?H():(be(),"ms-MY"!==I&&Ee())}function xe(){var e;N.current&&(null===(e=N.current.querySelector('input[name="search-location"]'))||void 0===e||e.focus())}function Ee(){var e;N.current&&(null===(e=N.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function Se(){G({type:fe.CloseMobileModal})}function we(){return"location"!==Q?null:E.default.createElement(Z,{isLoading:q,cities:Y,onLocationClick:ye,onCurrentLocationClick:ve,isLocationLoading:q,geoLocationPermission:J,selectedLocation:X,isOptionAllLocation:b})}function Le(){return"search"!==Q?null:z.autoCompleteDisabled?i?E.default.createElement(Oe,{onClick:()=>{L({cityId:z.selectedLocation.id,keyword:W}),Se()}}):null:E.default.createElement(qe,{data:ae,state:z,dispatch:G,isMobile:!1,keyword:W,isLoading:ie,hideResults:y,isNavResultItem:v})}function Ie(){return E.default.createElement(ke,{isMobile:i,state:z,dispatch:G,debouncedFetchCitiesByKeyword:ue,debouncedFetchSearchResults:me,focusLocationInput:xe,focusSearchInput:Ee,renderLocationResults:we,renderSearchResults:Le,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"===I){const e=`/${X.slug}/hospital`;G({type:fe.NavigateTo,payload:e}),B(!1)}}),[D,I,X]),i?E.default.createElement(E.default.Fragment,null,E.default.createElement(P,null),E.default.createElement(A,{ref:F}),E.default.createElement(M,{id:"booking-search-bar",ref:N,"data-is-modal":i&&oe,style:{"--mobile-care-searchbar-height":oe&&_?`${_}px`:"100%"}},oe?E.default.createElement(E.default.Fragment,null,E.default.createElement(R,null,E.default.createElement(pe,{headingText:k("booking.searchBar.searchButton"),onLeftClick:Se}),Ie()),we(),Le()):E.default.createElement(ne,{onClick:function(){var t;return e.__awaiter(this,void 0,void 0,(function*(){F.current&&F.current.focus(),G({type:fe.OpenMobileModal}),yield Promise.resolve(),N.current&&(null===(t=N.current.querySelector('input[name="search-location"]'))||void 0===t||t.focus())}))},focused:Q,value:W,trackingAttributes:g,inputSearchPlaceholder:C}))):E.default.createElement(j,{id:"booking-search-bar",ref:N},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:x=!1,hidePopularSearchKeys:w=!1,routerPush:L,onGeoLocationPermissionChange:O,onChangeLocation:k})=>{const{locale:I,t:j}=a.useTranslations(),M=t.useRef(null),R=t.useRef(null),[A,N]=t.useState(c),{geoLocationPermission:P,geoLocationCoordinates:F}=T(),[_,$]=t.useReducer(ot,tt,(t=>Object.assign(Object.assign({},t),{isDebug:f,isMobile:e,geoLocationPermission:l||P||"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:I}))),{navigateTo:D,focusedSpecialty:B,searchKeywords:V,geoLocationPermission:K,selectedLocation:H,selectedSpecialty:z,initialSelectedCity:G,searchResults:Z,isLoadingSearchResults:U}=_,{fetchCitiesByLocation:Q,fetchCitiesByKeyword:q,fetchSearchResults:Y,fetchAllSpecialties:W,fetchPopularKeys:J}=function({dispatch:e,careApiDomain:a,locale:i="vi-VN"}){const l=t.useCallback((function(t,o={}){const l=`${a}${t}`;return e({type:at.FetchCitiesStart}),fetch(Ye(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:at.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:at.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:at.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){const r="specialty"===n?`${a}${h.PATHS.GET_SEARCH_SPECIALTY}`:`${a}${h.PATHS.GET_SEARCH_V2}`;e({type:at.FetchSearchResultsStart});const{selectedLocation:c,geoLocationCoordinates:d,selectedSpecialty:u}=l;let p="";if(!c)return void e({type:at.FetchSearchResultsFinish});p=c.id===o.ID_OPTION_ALL_LOCATION?"":c.id;const g=(null==d?void 0:d.lat)||"",f=(null==d?void 0:d.lng)||"",m=(null==u?void 0:u.id)>0?null==u?void 0:u.id:"",C=t.trim().length>et[i]?t.trim():"";return fetch(Ye(r,{domain:a,searchType:n||"global",keyword:C,city:p===o.ID_OPTION_CURRENT_LOCATION?"":p,lat:g,lng:f,specialty_id:m},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=C?t.specialties:t.default),e({type:at.FetchSearchResultsComplete,payload:{key:n,searches:a||[]}}),s&&e({type:at.UpdateInitialSearchResults,payload:{key:n,searches:a||[]}})})).catch((e=>{console.log("error loading search results",{url:r,error:e})})).finally((()=>e({type:at.FetchSearchResultsFinish})))}),[i,a,e]),fetchAllSpecialties:t.useCallback((function(){const t=`${a}${h.PATHS.GET_SEARCH_SPECIALTY}`;return fetch(Ye(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:at.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(Ye(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:at.FetchPopularKeys,payload:t.popular_searches||[]})})).catch((e=>{console.log("error loading search results",{url:o,error:e})}))}),[i,a,e])}}({dispatch:$,locale:I,careApiDomain:i}),X=t.useMemo((()=>o.LOCALIZED_SLUGS[I]),[I]),ee=t.useMemo((()=>({doctor:{name:j("booking.searchPopup.doctors"),icon:E.default.createElement(ft,null),slug:X.DOCTOR},service:{name:j("booking.searchPopup.services"),icon:E.default.createElement(mt,null),slug:X.SERVICE},hospital:{name:j("booking.searchPopup.hospitals"),icon:E.default.createElement(Ct,null),slug:X.HOSPITAL},specialty:{name:j("booking.searchPopup.specialties"),icon:E.default.createElement(bt,null),slug:X.SPECIALTIES}})),[A]),te=t.useMemo((()=>S.default(q,400)),[q]),ae=t.useMemo((()=>S.default(Y,400)),[Y]),ie=t.useCallback((function(e){$({type:at.SelectLocation,payload:e}),oe(),k&&k(e)}),[j,$]);function oe(){var e;M.current&&(null===(e=M.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}return p.useOutsideClick(R,(()=>{$({type:at.ClickOutsideInputSearchSpecialty})})),t.useEffect((()=>{var t;"denied"===K||G||$({type:at.SelectLocation,payload:{name:j("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(t=o.LOCALIZED_SLUGS[I])||void 0===t?void 0:t.ALL}}),O&&O(K,_.geoLocationCoordinates),e&&"granted"===K&&H&&$({type:at.FocusInputSearch}),Q({coordinates:_.geoLocationCoordinates})}),[K]),t.useEffect((()=>{const e=d||{name:j("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:X.SPECIALTIES};_.selectedSpecialty||$({type:at.SelectSpecialty,payload:e})}),[d,_.selectedSpecialty]),t.useEffect((()=>{W()}),[]),t.useEffect((()=>{J(A)}),[A]),t.useEffect((()=>{D&&(L?L(D):window.location.href=`${u}${D}`)}),[D]),t.useEffect((()=>{Y(_.searchKeywords,_,A,!0)}),[H,z,A]),E.default.createElement(We,{ref:M},E.default.createElement(Ft,{currentTab:A,setCurrentTab:N,isMobile:e,hideTabBookingSearch:v}),E.default.createElement(Je,{className:"booking-search-container"},E.default.createElement(Xe,null,E.default.createElement("div",{ref:R},E.default.createElement(g.Flex,{gap:"12px",justify:"space-between",align:"center",direction:e?"column":"row",className:"flex-search-input"},"specialty"!==A&&E.default.createElement(Lt,{state:_,isMobile:e,dispatch:$,debouncedFetchCitiesByKeyword:te,selectedLocation:H,onLocationClick:ie,trackingAttributes:C}),E.default.createElement(vt,{type:A,isMobile:e,state:_,dispatch:$,debouncedFetchSearchResults:ae,initalSearchValue:r,focusSearchInput:oe,typeInformation:ee,trackingAttributes:m,isLoading:U,hideSpecialtySelection:x}),E.default.createElement(g.Button,{size:e?"md":"lg",fullWidth:e,onClick:function(){let e="";const{slug:t}=ee[A];let a="";("doctor"===A||"hospital"===A)&&_.selectedSpecialty.id>0&&(a=`&specialtyId=${_.selectedSpecialty.id}`),e="specialty"===A?`/${t}?q=${V}${a}`:`/${H.slug}/${t}?q=${V}${a}`,e&&$({type:at.NavigateTo,payload:e})},styles:{root:{height:e?"40px":"48px"}}},j("booking.searchBar.searchButton"))),!w&&"specialty"!==A&&_.popularKeys.length>0&&E.default.createElement(Nt,{type:A,state:_,typeInformation:ee,dispatch:$}),"specialty"===A&&"search"===B&&E.default.createElement(jt,{state:_,isMobile:e,dispatch:$,specialties:(null==Z?void 0:Z.specialty)||[],isLoading:U})))))},exports.ChevronDown=I,exports.types=Dt;
|
|
759
|
+
`,Ft=({currentTab:e,hideTabBookingSearch:i=[],isMobile:o,setCurrentTab:l})=>{const{t:n}=a.useTranslations(),s=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]),r=(()=>{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")}]})(),c=t.useMemo((()=>r.filter((e=>!i.includes(e.value)))||[]),[i,r]);return E.default.createElement(Pt,{className:"booking-search-tab"},E.default.createElement(C.Container,null,E.default.createElement(g.Tabs,{value:e,onTabChange:e=>{l(e)},styles:s},E.default.createElement(g.Tabs.List,null,c.map((e=>E.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 $t;!function(e){e[e.SPECIALTY=1]="SPECIALTY",e[e.DOCTOR=2]="DOCTOR",e[e.CLINIC=3]="CLINIC",e[e.SERVICE=4]="SERVICE"}($t||($t={}));var Dt=Object.freeze({__proto__:null,get RedirectType(){return $t}});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:x,onGeoLocationPermissionChange:w,onSearch:L,onChangeLocation:O})=>{const{t:k,locale:I}=a.useTranslations(),N=t.useRef(null),F=t.useRef(null),[_,$]=t.useState(void 0),[D,B]=t.useState(!1),{geoLocationPermission:V,geoLocationCoordinates:K,requestGeoLocation:H}=T(),[z,G]=t.useReducer(Ce,ge,(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:I}))),{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:le}=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:fe.FetchCitiesStart}),fetch(Ye(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:fe.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:fe.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:fe.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:fe.FetchSearchResultsStart});const{defaultCity:s,selectedLocation:r,geoLocationCoordinates:c}=l;let d="";if(!r||!s)return void e({type:fe.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(Ye(n,{domain:a,searchType:"global",keyword:t.trim().length>he[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:fe.FetchSearchResultsComplete,payload:t}))).catch((e=>{console.log("error loading search results",{url:n,error:e})})).finally((()=>e({type:fe.FetchSearchResultsFinish})))}),[i,a,e])}}({dispatch:G,locale:I,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[I])||void 0===e?void 0:e.CURRENT}}),[k,I]),ue=t.useMemo((()=>S.default(re,400)),[re]),me=t.useMemo((()=>S.default(ce,400)),[ce]);t.useEffect((()=>{""!==c&&c!==z.searchKeywords&&G({type:fe.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?G({type:fe.GrantGeoLocationPermission,payload:K}):"denied"===V&&G({type:fe.DenyGeoLocationPermission}))}),[J,V,K,n]),t.useEffect((()=>{U&&(x?x(U):window.location.href=`${d}${U}`)}),[U]);const be=t.useCallback((function(){G({type:fe.SelectCurrentLocation,payload:de})}),[k,G]);t.useEffect((()=>{var e;"denied"===J||ee||G({type:fe.SelectLocation,payload:{name:k("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(e=o.LOCALIZED_SLUGS[I])||void 0===e?void 0:e.ALL}}),w&&w(J,z.geoLocationCoordinates),i&&"granted"===J&&X&&G({type:fe.FocusInputSearch}),se({coordinates:z.geoLocationCoordinates})}),[J]),t.useEffect((()=>{X&&te&&ce(z.searchKeywords,z)}),[X,te]),t.useEffect((()=>{C!==le&&G({type:fe.SetInputSearchPlaceholder,payload:C})}),[C,le]),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"===I&&B(!0),G({type:fe.SelectLocation,payload:e}),"ms-MY"!==I&&Ee(),O&&O(e)}),[k,G]);function ve(){"ms-MY"===I&&B(!0),i&&"granted"!==z.geoLocationPermission?H():(be(),"ms-MY"!==I&&Ee())}function xe(){var e;N.current&&(null===(e=N.current.querySelector('input[name="search-location"]'))||void 0===e||e.focus())}function Ee(){var e;N.current&&(null===(e=N.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function Se(){G({type:fe.CloseMobileModal})}function we(){return"location"!==Q?null:E.default.createElement(Z,{isLoading:q,cities:Y,onLocationClick:ye,onCurrentLocationClick:ve,isLocationLoading:q,geoLocationPermission:J,selectedLocation:X,isOptionAllLocation:b})}function Le(){return"search"!==Q?null:z.autoCompleteDisabled?i?E.default.createElement(Oe,{onClick:()=>{L({cityId:z.selectedLocation.id,keyword:W}),Se()}}):null:E.default.createElement(qe,{data:ae,state:z,dispatch:G,isMobile:!1,keyword:W,isLoading:ie,hideResults:y,isNavResultItem:v})}function Ie(){return E.default.createElement(ke,{isMobile:i,state:z,dispatch:G,debouncedFetchCitiesByKeyword:ue,debouncedFetchSearchResults:me,focusLocationInput:xe,focusSearchInput:Ee,renderLocationResults:we,renderSearchResults:Le,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"===I){const e=`/${X.slug}/hospital`;G({type:fe.NavigateTo,payload:e}),B(!1)}}),[D,I,X]),i?E.default.createElement(E.default.Fragment,null,E.default.createElement(P,null),E.default.createElement(A,{ref:F}),E.default.createElement(M,{id:"booking-search-bar",ref:N,"data-is-modal":i&&oe,style:{"--mobile-care-searchbar-height":oe&&_?`${_}px`:"100%"}},oe?E.default.createElement(E.default.Fragment,null,E.default.createElement(R,null,E.default.createElement(pe,{headingText:k("booking.searchBar.searchButton"),onLeftClick:Se}),Ie()),we(),Le()):E.default.createElement(ne,{onClick:function(){var t;return e.__awaiter(this,void 0,void 0,(function*(){F.current&&F.current.focus(),G({type:fe.OpenMobileModal}),yield Promise.resolve(),N.current&&(null===(t=N.current.querySelector('input[name="search-location"]'))||void 0===t||t.focus())}))},focused:Q,value:W,trackingAttributes:g,inputSearchPlaceholder:C}))):E.default.createElement(j,{id:"booking-search-bar",ref:N},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:x=!1,hidePopularSearchKeys:w=!1,clientSlug:L="",routerPush:O,onGeoLocationPermissionChange:k,onChangeLocation:I})=>{const{locale:j,t:M}=a.useTranslations(),R=t.useRef(null),A=t.useRef(null),[N,P]=t.useState(c),{geoLocationPermission:F,geoLocationCoordinates:_}=T(),[$,D]=t.useReducer(ot,tt,(t=>Object.assign(Object.assign({},t),{isDebug:f,isMobile:e,geoLocationPermission:l||F||"unset",geoLocationCoordinates:n||_||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"}){const l=t.useCallback((function(t,o={}){const l=`${a}${t}`;return e({type:at.FetchCitiesStart}),fetch(Ye(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:at.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:at.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:at.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:at.FetchSearchResultsStart});const{selectedLocation:d,geoLocationCoordinates:u,selectedSpecialty:p}=l;let g="";if(!d)return void e({type:at.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>et[i]?t.trim():"";return fetch(Ye(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:at.FetchSearchResultsComplete,payload:{key:n,searches:a||[]}}),r&&e({type:at.UpdateInitialSearchResults,payload:{key:n,searches:a||[]}})})).catch((e=>{console.log("error loading search results",{url:c,error:e})})).finally((()=>e({type:at.FetchSearchResultsFinish})))}),[i,a,e]),fetchAllSpecialties:t.useCallback((function(){const t=`${a}${h.PATHS.GET_SEARCH_SPECIALTY}`;return fetch(Ye(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:at.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(Ye(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:at.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}),ee=t.useMemo((()=>o.LOCALIZED_SLUGS[j]),[j]),te=t.useMemo((()=>({doctor:{name:M("booking.searchPopup.doctors"),icon:E.default.createElement(ft,null),slug:ee.DOCTOR},service:{name:M("booking.searchPopup.services"),icon:E.default.createElement(mt,null),slug:ee.SERVICE},hospital:{name:M("booking.searchPopup.hospitals"),icon:E.default.createElement(Ct,null),slug:ee.HOSPITAL},specialty:{name:M("booking.searchPopup.specialties"),icon:E.default.createElement(bt,null),slug:ee.SPECIALTIES}})),[N]),ae=t.useMemo((()=>S.default(Y,400)),[Y]),ie=t.useMemo((()=>S.default(W,400)),[W]),oe=t.useCallback((function(e){D({type:at.SelectLocation,payload:e}),le(),I&&I(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:at.ClickOutsideInputSearchSpecialty})})),t.useEffect((()=>{var t;"denied"===H||Z||D({type:at.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:at.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:at.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]),E.default.createElement(We,{ref:R},E.default.createElement(Ft,{currentTab:N,setCurrentTab:P,isMobile:e,hideTabBookingSearch:v}),E.default.createElement(Je,{className:"booking-search-container"},E.default.createElement(Xe,null,E.default.createElement("div",{ref:A},E.default.createElement(g.Flex,{gap:"12px",justify:"space-between",align:"center",direction:e?"column":"row",className:"flex-search-input"},"specialty"!==N&&E.default.createElement(Lt,{state:$,isMobile:e,dispatch:D,debouncedFetchCitiesByKeyword:ae,selectedLocation:z,onLocationClick:oe,trackingAttributes:C}),E.default.createElement(vt,{type:N,isMobile:e,state:$,dispatch:D,debouncedFetchSearchResults:ie,initalSearchValue:r,focusSearchInput:le,typeInformation:te,trackingAttributes:m,isLoading:Q,hideSpecialtySelection:x,clientSlug:L}),E.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:at.NavigateTo,payload:e})},styles:{root:{height:e?"40px":"48px"}}},M("booking.searchBar.searchButton"))),!w&&"specialty"!==N&&$.popularKeys.length>0&&E.default.createElement(Nt,{type:N,state:$,typeInformation:te,dispatch:D}),"specialty"===N&&"search"===V&&E.default.createElement(jt,{state:$,isMobile:e,dispatch:D,specialties:(null==U?void 0:U.specialty)||[],isLoading:Q})))))},exports.ChevronDown=I,exports.types=Dt;
|