@hhgtech/hhg-components 1.25.8 → 1.25.10
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.js +1 -1
- package/build/components/atoms/alert/index.d.ts +3 -0
- package/build/components/atoms/avatar/index.d.ts +3 -0
- package/build/components/atoms/badge/index.d.ts +3 -0
- package/build/components/atoms/button/index.d.ts +3 -0
- package/build/components/atoms/checkbox/index.d.ts +3 -0
- package/build/components/atoms/container/index.d.ts +3 -0
- package/build/components/atoms/divider/index.d.ts +3 -0
- package/build/components/atoms/drawer/index.d.ts +3 -0
- package/build/components/atoms/grid/index.d.ts +3 -0
- package/build/components/atoms/input/index.d.ts +3 -0
- package/build/components/atoms/input/index.styled.d.ts +4 -1
- package/build/components/atoms/label/index.d.ts +3 -0
- package/build/components/atoms/marryBabyText/index.d.ts +3 -0
- package/build/components/atoms/pureInput/index.d.ts +3 -0
- package/build/components/atoms/radio/index.d.ts +3 -0
- package/build/components/atoms/text/index.d.ts +3 -0
- package/build/components/atoms/textArea/index.d.ts +3 -0
- package/build/components/atoms/toggle/index.d.ts +3 -0
- package/build/components/atoms/underlinedLink/index.d.ts +3 -0
- package/build/components/atoms/uploader/index.d.ts +3 -0
- package/build/components/mantine/anchor/index.d.ts +9 -5
- package/build/components/mantine/anchor/index.styles.d.ts +9 -0
- package/build/components/mantine/button/index.d.ts +4 -2
- package/build/components/mantine/button/index.styles.d.ts +13 -0
- package/build/components/mantine/text/index.d.ts +7 -6
- package/build/components/mantine/text/index.styles.d.ts +10 -0
- package/build/components/molecules/carousel/index.d.ts +3 -0
- package/build/components/molecules/datePicker/index.d.ts +3 -0
- package/build/components/molecules/dateRangePicker/index.d.ts +3 -0
- package/build/components/molecules/dropdown/index.d.ts +3 -0
- package/build/components/molecules/dropdown/index.styled.d.ts +8 -2
- package/build/components/molecules/dropdownSearch/index.d.ts +3 -0
- package/build/components/molecules/modal/index.d.ts +3 -0
- package/build/components/molecules/pillCarousel/index.d.ts +3 -0
- package/build/components/molecules/scrollList/index.d.ts +3 -0
- package/build/components/molecules/tabs/index.d.ts +13 -13
- package/build/components/molecules/tabs/index.styles.d.ts +2 -2
- package/build/components.js +1 -1
- package/build/constants.js +1 -1
- package/build/{core-3eb73a90.js → core-7967b08d.js} +1 -1
- package/build/{dataTransform-adda3623.js → dataTransform-ebd46330.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.js +1 -1
- package/build/esm/components.js +1 -1
- package/build/esm/constants.js +1 -1
- package/build/esm/{core-9e507348.js → core-e22919ef.js} +1 -1
- package/build/esm/{dataTransform-d83f8410.js → dataTransform-874d3c5d.js} +1 -1
- package/build/esm/ecom.js +1 -1
- package/build/esm/footer.js +1 -1
- package/build/esm/gAssets.js +1 -1
- package/build/esm/{getDynamicHealthTool-ddf5402e.js → getDynamicHealthTool-01160a8f.js} +1 -1
- package/build/esm/{getSocialList-bbf52a7a.js → getSocialList-671369dc.js} +1 -1
- package/build/esm/hooks.js +1 -1
- package/build/esm/i18n.js +1 -1
- package/build/esm/{index-b8a7373c.js → index-0455edb8.js} +2 -2
- package/build/esm/index-29646938.js +1 -0
- package/build/esm/index-479281a9.js +1 -0
- package/build/esm/{index-346d4995.js → index-4cd5df82.js} +1 -1
- package/build/esm/{index-40ef106d.js → index-4e089cd4.js} +1 -1
- package/build/esm/{index-91dd7297.js → index-6efee064.js} +1 -1
- package/build/esm/index-750a9af3.js +1 -0
- package/build/esm/{index-f1029275.js → index-81d4ec35.js} +1 -1
- package/build/esm/index-838e9439.js +1 -0
- package/build/esm/index-898bf8a0.js +1 -0
- package/build/esm/{index-ef2111b2.js → index-8cf73e87.js} +1 -1
- package/build/esm/index-a97b336f.js +1 -0
- package/build/esm/index-aac9f702.js +1 -0
- package/build/esm/index-b717db96.js +1 -0
- package/build/esm/{index-46ae67bc.js → index-bae2777b.js} +1 -1
- package/build/esm/{index-05358d37.js → index-bbd649b7.js} +1 -1
- package/build/esm/{index-f900276a.js → index-d95d161c.js} +1 -1
- package/build/esm/index-db7918d6.js +1 -0
- package/build/esm/{index-d39eb350.js → index-dc680745.js} +1 -1
- package/build/esm/index-e91dbbc6.js +1 -0
- package/build/esm/{index-c2e45d61.js → index-ede22843.js} +1 -1
- package/build/esm/{index-c644dedc.js → index-ee118547.js} +1 -1
- package/build/esm/{index-3a18e414.js → index-eec33795.js} +1 -1
- package/build/esm/index.css +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/{index.styled-28ec3a94.js → index.styled-0386b48b.js} +1 -1
- package/build/esm/{index.styled-7ba08c7b.js → index.styled-044c2b0b.js} +1 -1
- package/build/esm/{index.styled-0375e1ac.js → index.styled-330afbe2.js} +5 -5
- package/build/esm/{index.styled-da1f6fc3.js → index.styled-630eb409.js} +15 -15
- package/build/esm/{index.styled-19fe427f.js → index.styled-86d605ed.js} +175 -178
- package/build/esm/{index.styled-e94e7231.js → index.styled-98501b33.js} +1 -1
- package/build/esm/{index.styled-3b073749.js → index.styled-e9aa1463.js} +3 -4
- package/build/esm/{index-c915fcde.js → index.styles-2938320c.js} +11 -24
- 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/onboarding.js +1 -1
- package/build/esm/pwg.js +1 -1
- package/build/esm/{routing-0c7cb8d9.js → routing-c0c9da64.js} +1 -1
- package/build/esm/{screenSizeContext-7a09b9a6.js → screenSizeContext-a1fa9bf6.js} +1 -1
- package/build/esm/together.js +1 -1
- package/build/esm/{translationsProvider-42f4ca02.js → translationsProvider-2c7431e2.js} +1 -1
- package/build/esm/{types-f61b51cb.js → types-75d1c06a.js} +37 -37
- package/build/esm/{types-2b4faaf7.js → types-d63e7de1.js} +70 -70
- package/build/esm/types.js +1 -1
- package/build/esm/useHealthToolCache-a6b1236e.js +1 -0
- package/build/esm/{useRafState-938bb51c.js → useRafState-b4b5a1c2.js} +1 -1
- package/build/esm/useScreenSize-4c953d4a.js +1 -0
- package/build/esm/{useTranslations-0252ace4.js → useTranslations-b7d3f852.js} +1 -1
- package/build/esm/vaccination.js +1 -1
- package/build/footer.js +1 -1
- package/build/gAssets.js +1 -1
- package/build/{getDynamicHealthTool-452bd905.js → getDynamicHealthTool-f7eb291a.js} +1 -1
- package/build/{getSocialList-82a643a5.js → getSocialList-9b36de9d.js} +1 -1
- package/build/hooks.js +1 -1
- package/build/i18n.js +1 -1
- package/build/{index-f2a6c1c0.js → index-01f86f68.js} +1 -1
- package/build/index-02da947b.js +1 -0
- package/build/index-076e818c.js +1 -0
- package/build/{index-5100b89a.js → index-0ff0cf94.js} +1 -1
- package/build/{index-2b84e1db.js → index-2a25ed39.js} +1 -1
- package/build/index-2fd8bfe9.js +1 -0
- package/build/{index-d83601ab.js → index-325fcced.js} +1 -1
- package/build/index-5e6ffd37.js +1 -0
- package/build/{index-8de936fb.js → index-680ae62f.js} +1 -1
- package/build/index-6c105c55.js +1 -0
- package/build/{index-447e7263.js → index-6d8ad857.js} +1 -1
- package/build/index-6fbb91c3.js +1 -0
- package/build/{index-fb7de03f.js → index-9b350e60.js} +1 -1
- package/build/index-a7cda1c5.js +1 -0
- package/build/index-a7e0e27c.js +1 -0
- package/build/{index-27d451dd.js → index-affe1781.js} +1 -1
- package/build/{index-117f7e28.js → index-b0a612ce.js} +1 -1
- package/build/index-b9f6ab96.js +1 -0
- package/build/{index-965fced2.js → index-be7ce870.js} +3 -3
- package/build/{index-d04e582d.js → index-c3a94487.js} +1 -1
- package/build/{index-8ea81525.js → index-d453ed07.js} +1 -1
- package/build/{index-ed822e8e.js → index-dd639b43.js} +1 -1
- package/build/index-fe5ed80c.js +1 -0
- package/build/index.css +1 -1
- package/build/index.js +1 -1
- package/build/{index.styled-6f7cc9a4.js → index.styled-4c5d702a.js} +14 -14
- package/build/{index.styled-c93747db.js → index.styled-4e2bcd47.js} +6 -6
- package/build/{index.styled-c2b23b28.js → index.styled-7c8e01d4.js} +8 -9
- package/build/{index.styled-b7cd5f1e.js → index.styled-9ef5555d.js} +1 -1
- package/build/{index.styled-8498ef7f.js → index.styled-a85cf2d8.js} +19 -22
- package/build/{index.styled-61982153.js → index.styled-bad57cdc.js} +1 -1
- package/build/{index.styled-30ee4ed0.js → index.styled-e37b0ba5.js} +1 -1
- package/build/index.styles-31c72cd1.js +115 -0
- 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/onboarding.js +1 -1
- package/build/pwg.js +3 -3
- package/build/{routing-33dd3614.js → routing-f8d94930.js} +1 -1
- package/build/screenSizeContext-e33a9eca.js +81 -0
- package/build/together/components/molecules/postContent/index.d.ts +8 -6
- package/build/together/components/molecules/postContent/index.styled.d.ts +3 -1
- package/build/together/components/molecules/postContent/index.styles.d.ts +6 -0
- package/build/together.js +1 -1
- package/build/{translationsProvider-7b5443c8.js → translationsProvider-c15860e2.js} +1 -1
- package/build/{types-9b46e0c4.js → types-55dcb621.js} +1 -1
- package/build/{types-231c4f9d.js → types-edd858ee.js} +79 -79
- package/build/types.js +1 -1
- package/build/{useHealthToolCache-a0e9cd93.js → useHealthToolCache-541d32b1.js} +1 -1
- package/build/{useRafState-5eb5f73f.js → useRafState-b1869767.js} +1 -1
- package/build/{useScreenSize-1aef4a73.js → useScreenSize-fcaa1f70.js} +1 -1
- package/build/{useTranslations-12079e07.js → useTranslations-f0911067.js} +1 -1
- package/build/vaccination.js +1 -1
- package/package.json +1 -1
- package/build/esm/index-0dd8d8cc.js +0 -1
- package/build/esm/index-3943a4ee.js +0 -1
- package/build/esm/index-4aa230ae.js +0 -1
- package/build/esm/index-5b495a39.js +0 -1
- package/build/esm/index-73b8f2ef.js +0 -1
- package/build/esm/index-84e548f3.js +0 -1
- package/build/esm/index-bf25487f.js +0 -1
- package/build/esm/index-dfd4f6fe.js +0 -1
- package/build/esm/index-e05c0257.js +0 -1
- package/build/esm/useHealthToolCache-0908f395.js +0 -1
- package/build/esm/useScreenSize-62c19865.js +0 -1
- package/build/index-5ed28706.js +0 -128
- package/build/index-5ed63889.js +0 -1
- package/build/index-660e2d94.js +0 -1
- package/build/index-7279d356.js +0 -1
- package/build/index-76a61628.js +0 -1
- package/build/index-9c753bfa.js +0 -1
- package/build/index-ab2a2ed6.js +0 -1
- package/build/index-b830a90b.js +0 -1
- package/build/index-ca36b41b.js +0 -1
- package/build/index-ff8c7c71.js +0 -1
- package/build/screenSizeContext-cb07b904.js +0 -81
- /package/build/{BMI_BOYS.percentile.monthly-ec9bf9a2.js → BMI_BOYS.percentile.monthly-f36155bb.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-9d1da9ec.js → BMI_BOYS.percentile.weekly-493d724e.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-cc8bb08f.js → BMI_BOYS.percentile.yearly-ec6debb5.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-163fc5f5.js → BMI_BOYS.zscore.monthly-18ca095a.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-e6c1b4fc.js → BMI_BOYS.zscore.weekly-35ff9ca1.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-f9b8dff7.js → BMI_BOYS.zscore.yearly-69affc58.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-3e28b5fb.js → BMI_GIRLS.percentile.monthly-a5b90363.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-d4a8e075.js → BMI_GIRLS.percentile.weekly-4c1d5327.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-f778434d.js → BMI_GIRLS.percentile.yearly-4c2ea39e.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-5e76a8a8.js → BMI_GIRLS.zscore.monthly-643871e1.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-d5edd254.js → BMI_GIRLS.zscore.weekly-34c3e533.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-29b85ba3.js → BMI_GIRLS.zscore.yearly-52fd8f77.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-d577b05a.js → HEAD CIRCUM_BOYS.percentile.monthly-abc8532d.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-736ba5ae.js → HEAD CIRCUM_BOYS.percentile.weekly-373a6481.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-88283d34.js → HEAD CIRCUM_BOYS.percentile.yearly-9f98e181.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-22dd8d89.js → HEAD CIRCUM_BOYS.zscore.monthly-a4e9f6df.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-7fc89687.js → HEAD CIRCUM_BOYS.zscore.weekly-ac4ee6ca.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-89fedf3f.js → HEAD CIRCUM_BOYS.zscore.yearly-93fb4c15.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-bf06b955.js → HEAD CIRCUM_GIRLS.percentile.monthly-620c6a20.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-775e2803.js → HEAD CIRCUM_GIRLS.percentile.weekly-c4d43bd0.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-9b6ea573.js → HEAD CIRCUM_GIRLS.percentile.yearly-5fc979ae.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-5ec57b76.js → HEAD CIRCUM_GIRLS.zscore.monthly-384accc5.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-fc7ee4fb.js → HEAD CIRCUM_GIRLS.zscore.weekly-64036d9c.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-3217ec4c.js → HEAD CIRCUM_GIRLS.zscore.yearly-e608f161.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-fbe8bd35.js → HEIGHT_BOYS.percentile.monthly-c384e437.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-e2609993.js → HEIGHT_BOYS.percentile.weekly-5f91157e.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-f3ae91e1.js → HEIGHT_BOYS.percentile.yearly-fa34dd85.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-7d054e77.js → HEIGHT_BOYS.zscore.monthly-ae6458ca.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-a9dd2ff5.js → HEIGHT_BOYS.zscore.weekly-0e57b8e7.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-b906215f.js → HEIGHT_BOYS.zscore.yearly-6b8ab8b4.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-53829380.js → HEIGHT_GIRLS.percentile.monthly-eec76eec.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-b0f5cd39.js → HEIGHT_GIRLS.percentile.weekly-ff18a739.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-d47eed23.js → HEIGHT_GIRLS.percentile.yearly-3a58c352.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-60d65154.js → HEIGHT_GIRLS.zscore.monthly-b1e5d32d.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-8577fddc.js → HEIGHT_GIRLS.zscore.weekly-51b61c07.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-1d3af54d.js → HEIGHT_GIRLS.zscore.yearly-1ce4b6ac.js} +0 -0
- /package/build/{Onboarding-6a93948f.js → Onboarding-dd23dcac.js} +0 -0
- /package/build/{Visible-f47dbb69.js → Visible-3ab5298b.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-42acf975.js → WEIGHT_BOYS.percentile.monthly-eea3c7a7.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-0b9deb7d.js → WEIGHT_BOYS.percentile.weekly-563c5fc8.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-69eec7f3.js → WEIGHT_BOYS.percentile.yearly-4855d68d.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-dfd575ea.js → WEIGHT_BOYS.zscore.monthly-1e1fe207.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-71a6992c.js → WEIGHT_BOYS.zscore.weekly-1e79991b.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-509805a3.js → WEIGHT_BOYS.zscore.yearly-b87ef30f.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-3d2539c9.js → WEIGHT_GIRLS.percentile.monthly-5bf03be3.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-0276f67e.js → WEIGHT_GIRLS.percentile.weekly-27b48626.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-4dfd5b80.js → WEIGHT_GIRLS.percentile.yearly-7aab4de6.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-de970453.js → WEIGHT_GIRLS.zscore.monthly-6dc04c63.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-54fffe53.js → WEIGHT_GIRLS.zscore.weekly-aefb21a3.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-9831b02f.js → WEIGHT_GIRLS.zscore.yearly-f3a0638e.js} +0 -0
- /package/build/{constants-655575eb.js → constants-3a3cba3e.js} +0 -0
- /package/build/{cookieHelper-afab3a2a.js → cookieHelper-11d465fb.js} +0 -0
- /package/build/{dataTransform-d91898b6.js → dataTransform-ad96adb7.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-ac821089.js → BMI_BOYS.percentile.monthly-aa2dead4.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-e7c5d331.js → BMI_BOYS.percentile.weekly-a4c340cc.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-ab929bd1.js → BMI_BOYS.percentile.yearly-6abb5973.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-12574fe0.js → BMI_BOYS.zscore.monthly-8fb8f911.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-b4c12ba7.js → BMI_BOYS.zscore.weekly-127cc474.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-816b479f.js → BMI_BOYS.zscore.yearly-39444147.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-086694b8.js → BMI_GIRLS.percentile.monthly-001ee761.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-d3bf0c8f.js → BMI_GIRLS.percentile.weekly-148e406b.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-ed1e1131.js → BMI_GIRLS.percentile.yearly-a5dd74be.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-75511331.js → BMI_GIRLS.zscore.monthly-618da57b.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-73162770.js → BMI_GIRLS.zscore.weekly-84043a70.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-98afde16.js → BMI_GIRLS.zscore.yearly-2c151852.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-5a172571.js → HEAD CIRCUM_BOYS.percentile.monthly-59e987e7.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-1c4ee2fa.js → HEAD CIRCUM_BOYS.percentile.weekly-84696f87.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-6a397384.js → HEAD CIRCUM_BOYS.percentile.yearly-b8e2924a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-6a7247eb.js → HEAD CIRCUM_BOYS.zscore.monthly-6931c20d.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-24033572.js → HEAD CIRCUM_BOYS.zscore.weekly-1813b7cf.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-9401c6fd.js → HEAD CIRCUM_BOYS.zscore.yearly-721b83e4.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-24e2ff47.js → HEAD CIRCUM_GIRLS.percentile.monthly-eee6dc50.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-65ca2d01.js → HEAD CIRCUM_GIRLS.percentile.weekly-3b4a36dd.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-843df12b.js → HEAD CIRCUM_GIRLS.percentile.yearly-e97092a8.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-12b63acd.js → HEAD CIRCUM_GIRLS.zscore.monthly-c646aa4b.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-aa1c68d5.js → HEAD CIRCUM_GIRLS.zscore.weekly-bbc583f6.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-213cc084.js → HEAD CIRCUM_GIRLS.zscore.yearly-d70f1f59.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-32380fd3.js → HEIGHT_BOYS.percentile.monthly-06b3ca93.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-541cca14.js → HEIGHT_BOYS.percentile.weekly-7d89958e.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-b7116466.js → HEIGHT_BOYS.percentile.yearly-688d9faa.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-a61554a3.js → HEIGHT_BOYS.zscore.monthly-39b7e0f2.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-1b7a5ea6.js → HEIGHT_BOYS.zscore.weekly-2f2aa629.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-d18c9b51.js → HEIGHT_BOYS.zscore.yearly-d771804a.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-1d0727df.js → HEIGHT_GIRLS.percentile.monthly-5836540d.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-591f92dd.js → HEIGHT_GIRLS.percentile.weekly-c6bb8644.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-304ff1b9.js → HEIGHT_GIRLS.percentile.yearly-94b85b35.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-d85d7865.js → HEIGHT_GIRLS.zscore.monthly-b7489388.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-e05d0a51.js → HEIGHT_GIRLS.zscore.weekly-a1c23d63.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-07fcdaa0.js → HEIGHT_GIRLS.zscore.yearly-a88a1287.js} +0 -0
- /package/build/esm/{Onboarding-67bbb6b4.js → Onboarding-425ce5e0.js} +0 -0
- /package/build/esm/{Visible-556a6913.js → Visible-07963bb9.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-affc5486.js → WEIGHT_BOYS.percentile.monthly-d52bbd68.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-0b939fd3.js → WEIGHT_BOYS.percentile.weekly-763cad4e.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-f223db23.js → WEIGHT_BOYS.percentile.yearly-12b2e89f.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-53aaffc1.js → WEIGHT_BOYS.zscore.monthly-f171ddb6.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-8c41b1f6.js → WEIGHT_BOYS.zscore.weekly-c036a53a.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-8e178887.js → WEIGHT_BOYS.zscore.yearly-6ddc20d0.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-1c3848ec.js → WEIGHT_GIRLS.percentile.monthly-537e50af.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-5ff12481.js → WEIGHT_GIRLS.percentile.weekly-feaf29cd.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-7bb93c90.js → WEIGHT_GIRLS.percentile.yearly-4f3b9d83.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-944d9db7.js → WEIGHT_GIRLS.zscore.monthly-dd2fdb0d.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-cf21c917.js → WEIGHT_GIRLS.zscore.weekly-be8eb223.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-a3bad8ba.js → WEIGHT_GIRLS.zscore.yearly-2cf879f1.js} +0 -0
- /package/build/esm/{constants-df5d1670.js → constants-ece5a399.js} +0 -0
- /package/build/esm/{cookieHelper-8ff54d02.js → cookieHelper-65c10ff9.js} +0 -0
- /package/build/esm/{dataTransform-2eb04963.js → dataTransform-e58b894e.js} +0 -0
- /package/build/esm/{index-daced1c3.js → index-2b0fc3cc.js} +0 -0
- /package/build/esm/{index-baaafb28.js → index-d62c8590.js} +0 -0
- /package/build/esm/{isProduction-f5c96b47.js → isProduction-d29de9ea.js} +0 -0
- /package/build/esm/{localizeNumberFormat-23ee7f45.js → localizeNumberFormat-346e0c33.js} +0 -0
- /package/build/esm/{normalizeLink-8b5607fc.js → normalizeLink-53b5813b.js} +0 -0
- /package/build/esm/{theme-5e7b10c4.js → theme-595172c3.js} +0 -0
- /package/build/esm/{translationsContext-afbcd08a.js → translationsContext-09290db2.js} +0 -0
- /package/build/esm/{tslib.es6-e5891de7.js → tslib.es6-1122f43e.js} +0 -0
- /package/build/esm/{types-74bfd5de.js → types-a7634411.js} +0 -0
- /package/build/esm/{useIsInit-7cd12dbe.js → useIsInit-5040250f.js} +0 -0
- /package/build/esm/{useOutsideClick-f7715e31.js → useOutsideClick-8c195b0c.js} +0 -0
- /package/build/esm/{useScrollbarSize-a94199ee.js → useScrollbarSize-98a8f29b.js} +0 -0
- /package/build/esm/{useUniqueId-5b433e76.js → useUniqueId-efa31f3c.js} +0 -0
- /package/build/esm/{utils-7125e1e4.js → utils-dd45ebd6.js} +0 -0
- /package/build/{index-e7a438ca.js → index-4007dc43.js} +0 -0
- /package/build/{index-7adf7ca0.js → index-a7d96b4b.js} +0 -0
- /package/build/{isProduction-53bfc0ca.js → isProduction-ca7a0d51.js} +0 -0
- /package/build/{localizeNumberFormat-4e5d8e20.js → localizeNumberFormat-f87e3703.js} +0 -0
- /package/build/{normalizeLink-4ad75d55.js → normalizeLink-3220421b.js} +0 -0
- /package/build/{theme-6c7a193c.js → theme-7b182b51.js} +0 -0
- /package/build/{translationsContext-88404bec.js → translationsContext-4d46297e.js} +0 -0
- /package/build/{tslib.es6-7ea40a63.js → tslib.es6-4bd6bd01.js} +0 -0
- /package/build/{types-d5534dbb.js → types-f31cdf47.js} +0 -0
- /package/build/{useIsInit-326f6473.js → useIsInit-8d4e3d7c.js} +0 -0
- /package/build/{useOutsideClick-615765d9.js → useOutsideClick-011ff769.js} +0 -0
- /package/build/{useScrollbarSize-9538a8a5.js → useScrollbarSize-1232a288.js} +0 -0
- /package/build/{useUniqueId-e2b3cb6e.js → useUniqueId-0c883ec8.js} +0 -0
- /package/build/{utils-0857c803.js → utils-475916e4.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as t}from"./tslib.es6-
|
|
1
|
+
import{_ as t}from"./tslib.es6-1122f43e.js";import e from"react";import i from"styled-components";const p=i((i=>{var{type:p}=i,n=t(i,["type"]);return e.createElement(p,n)}))`
|
|
2
2
|
color: var(--text-color, ${t=>t.theme.mbColors.dark});
|
|
3
3
|
font-family: Krub;
|
|
4
4
|
font-weight: 600;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from"react";import{M as t}from"./utils-
|
|
1
|
+
import e from"react";import{M as t}from"./utils-dd45ebd6.js";import o from"styled-components";var i="DjBFAbd";const a=({children:t,className:o,style:a,htmlFor:s,size:r})=>e.createElement("label",{"data-size":r,className:`${i} ${o||""}`,style:a,htmlFor:s},t),s=o.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
width: 100%;
|
|
4
4
|
|
|
@@ -17,9 +17,8 @@ import e from"react";import{M as t}from"./utils-7125e1e4.js";import o from"style
|
|
|
17
17
|
&:active,
|
|
18
18
|
&:focus,
|
|
19
19
|
&.focused {
|
|
20
|
-
border-color: ${e=>e.
|
|
21
|
-
box-shadow: 0px 0px 2px 2px
|
|
22
|
-
${e=>e.theme.colors.primary200};
|
|
20
|
+
border-color: ${e=>e.color};
|
|
21
|
+
box-shadow: 0px 0px 2px 2px ${e=>e.shadowColor};
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
&:disabled {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import*as e from"react";import t,{useState as a,useEffect as
|
|
1
|
+
import*as e from"react";import t,{useState as a,useEffect as r,forwardRef as n,Component as l,useRef as o,useCallback as i,useImperativeHandle as s}from"react";import{Image as c,createStyles as m,Textarea as h,Modal as d,Accordion as p,Indicator as g,Avatar as v,createEmotionCache as u,FileInput as f,NumberInput as z,PasswordInput as E,TextInput as b,Input as w,Checkbox as y,Slider as x,Radio as M,Flex as H}from"@mantine/core";import{CommonGAssets as j}from"./gAssets.js";import{DatePicker as k,DateRangePicker as C}from"@mantine/dates";import S,{css as O}from"styled-components";import $ from"dayjs";import"./screenSizeContext-a1fa9bf6.js";import{t as P}from"./theme-595172c3.js";import{s as I}from"./index-4e089cd4.js";import{M as L}from"./utils-dd45ebd6.js";import"./isProduction-d29de9ea.js";import{L as A}from"./Onboarding-425ce5e0.js";import{_ as B,a as N}from"./tslib.es6-1122f43e.js";import{useDebouncedValue as T}from"@mantine/hooks";import{Carousel as D}from"@mantine/carousel";const W=S(k)`
|
|
2
2
|
position: relative;
|
|
3
3
|
${e=>e.fullWidth&&O`
|
|
4
4
|
.mantine-DatePicker-dropdown {
|
|
@@ -8,7 +8,7 @@ import*as e from"react";import t,{useState as a,useEffect as n,forwardRef as l,C
|
|
|
8
8
|
align-items: center;
|
|
9
9
|
}
|
|
10
10
|
`}
|
|
11
|
-
`,
|
|
11
|
+
`,V=S(C)`
|
|
12
12
|
position: relative;
|
|
13
13
|
${e=>e.fullWidth&&O`
|
|
14
14
|
.mantine-DateRangePicker-dropdown {
|
|
@@ -18,32 +18,19 @@ import*as e from"react";import t,{useState as a,useEffect as n,forwardRef as l,C
|
|
|
18
18
|
align-items: center;
|
|
19
19
|
}
|
|
20
20
|
`}
|
|
21
|
-
`,R=e=>t.createElement(
|
|
22
|
-
&.mantine-Text-root {
|
|
23
|
-
font-weight: ${e=>F.fontWeight[e["data-weight"]]};
|
|
24
|
-
font-size: ${e=>F.fontSize[e["data-size"]][0]}px;
|
|
25
|
-
line-height: ${e=>F.lineHeight[e["data-size"]][0]}px;
|
|
26
|
-
letter-spacing: ${e=>{var t,a,n;return null!==(n=null===(a=null===(t=F.letterSpacing)||void 0===t?void 0:t[e["data-size"]])||void 0===a?void 0:a[0])&&void 0!==n?n:0}}px;
|
|
27
|
-
|
|
28
|
-
${L.mbDown} {
|
|
29
|
-
font-size: ${e=>F.fontSize[e["data-size"]][1]}px;
|
|
30
|
-
line-height: ${e=>F.lineHeight[e["data-size"]][1]}px;
|
|
31
|
-
letter-spacing: ${e=>{var t,a,n;return null!==(n=null===(a=null===(t=F.letterSpacing)||void 0===t?void 0:t[e["data-size"]])||void 0===a?void 0:a[1])&&void 0!==n?n:0}}px;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
`,U="100ms",X={"&:hover":{border:`1px solid ${$.colors.primaryBase}`}},Y=S(h)`
|
|
21
|
+
`,R=e=>t.createElement(W,Object.assign({size:"md",clearable:!1,fullWidth:!0,styles:{rightSection:{pointerEvents:"none",cursor:"default"}},rightSection:t.createElement(c,{src:j.getAssetPath(e.isMB?"MB-calendar.svg":"OutlineCalendar.svg"),width:16,height:16})},e,{className:`input-control ${(null==e?void 0:e.className)||""}`}));R.Range=e=>t.createElement(V,Object.assign({size:"md",clearable:!1,fullWidth:!0,styles:{rightSection:{pointerEvents:"none",cursor:"default"}},rightSection:t.createElement(c,{src:j.getAssetPath("OutlineCalendar.svg"),width:16,height:16})},e));const F=Object.assign({},{fontSize:{base:[16,16],lg:[18,16],md:[18,16],sm:[16,14],xs:[14,12],s1:[22,18],s2:[18,16],s3:[16,14],s4:[14,12],s5:[12,12],p1:[18,16],p2:[16,16],p3:[16,14],p4:[14,12],c1:[16,14],c2:[14,12],n1:[12,12],label1:[14,14],label2:[12,12]},lineHeight:{base:[24,24],lg:[32,28],md:[32,28],sm:[24,22],xs:[24,18],s1:[32,26],s2:[28,24],s3:[24,24],s4:[22,18],s5:[18,18],p1:[32,28],p2:[24,24],p3:[24,22],p4:[22,18],c1:[24,22],c2:[22,18],n1:[18,18],label1:[22,22],label2:[18,18]},letterSpacing:{lg:[-.2,0],md:[-.2,0],sm:[0,-.2],s1:[-.6,-.6],s2:[-.4,-.2],s3:[0,-.2],s4:[0,-.2],p1:[-.2,-.2],p2:[0,-.2],p3:[0,-.2],p4:[-.2,0],label1:[0,-.2]},fontWeight:{regular:400,semiBold:600,bold:700}});var G=m(((e,t)=>{var a,r,n,l,o,i,s,c,m,h;const d=null===(a=F.fontSize[null==t?void 0:t.size])||void 0===a?void 0:a[0],p=null===(r=F.lineHeight[null==t?void 0:t.size])||void 0===r?void 0:r[0],g=null!==(o=null===(l=null===(n=F.letterSpacing)||void 0===n?void 0:n[null==t?void 0:t.size])||void 0===l?void 0:l[0])&&void 0!==o?o:0,v=null===(i=F.fontSize[null==t?void 0:t.size])||void 0===i?void 0:i[1],u=null===(s=F.lineHeight[null==t?void 0:t.size])||void 0===s?void 0:s[1],f=null!==(h=null===(m=null===(c=F.letterSpacing)||void 0===c?void 0:c[null==t?void 0:t.size])||void 0===m?void 0:m[1])&&void 0!==h?h:0;return{root:{fontWeight:F.fontWeight[t.weight],fontSize:`${d}px`,lineHeight:`${p}px`,letterSpacing:g,[e.fn.smallerThan("sm")]:{fontSize:`${v}px`,lineHeight:`${u}px`,letterSpacing:f}}}}));const U="100ms",X={"&:hover":{border:`1px solid ${P.colors.primaryBase}`}};var Y=m(((e,t)=>{const{size:a,variant:r,skipHover:n,isError:l,color:o}=t;return{rootCustom:Object.assign(Object.assign(Object.assign(Object.assign({transition:`all ${U} ease-in-out`},(()=>{switch(a){case"lg":return{height:48,fontWeight:600,fontSize:"16px",lineHeight:"24px"};case"md":return{height:40,fontWeight:600,fontSize:"14px",lineHeight:"22px"};case"sm":return{height:32,fontWeight:600,fontSize:"14px",lineHeight:"22px"}}})()),(()=>{var t,a;switch(r){case"primary":return Object.assign({color:e.white,backgroundColor:e.fn.primaryColor()},!n&&{"&:hover":{backgroundColor:e.colors[e.primaryColor][7]}});case"secondary":return Object.assign({color:e.fn.primaryColor(),backgroundColor:e.white,border:`1px solid ${e.fn.primaryColor()}`},!n&&{"&:hover":{backgroundColor:e.colors[e.primaryColor][0],border:`1px solid ${e.fn.primaryColor()}`}});case"tertiary":return{color:P.colors.gray800,backgroundColor:e.white,border:`1px solid ${P.colors.neutral200}`,"&:hover":Object.assign({},n?{backgroundColor:e.white,border:`1px solid ${P.colors.neutral200}`}:{backgroundColor:P.colors.neutral50,border:`1px solid ${P.colors.neutral50}`})};case"light":{const r=o||e.primaryColor;return{color:null===(a=null===(t=e.colors)||void 0===t?void 0:t[r])||void 0===a?void 0:a[Number(e.primaryShade)],backgroundColor:e.colors[r][0],border:"1px solid transparent","&:hover":Object.assign({},n?{backgroundColor:e.colors[r][0],border:"1px solid transparent"}:{backgroundColor:e.white,border:`1px solid ${e.colors[r][0]}`})}}case"ghost":return Object.assign({color:e.primaryColor,backgroundColor:"transparent",border:"1px solid transparent"},!n&&{"&:hover":{backgroundColor:e.colors[e.primaryColor][0],border:"1px solid transparent"}})}})()),{"&[data-disabled]":{backgroundColor:P.colors.gray100,color:P.colors.gray400}}),l?Object.assign({color:P.colors.red600,backgroundColor:e.white,border:`1px solid ${P.colors.red600}`},!n&&{"&:hover":{backgroundColor:P.colors.red50,border:`1px solid ${P.colors.red600}`}}):{})}}));const Z=S(h)`
|
|
35
22
|
.mantine-Textarea-input {
|
|
36
23
|
padding: 12px 16px;
|
|
37
24
|
background: #ffffff;
|
|
38
|
-
border: 1px solid ${
|
|
25
|
+
border: 1px solid ${P.colors.gray200};
|
|
39
26
|
border-radius: 4px;
|
|
40
27
|
}
|
|
41
|
-
`,
|
|
28
|
+
`,K=S(d)`
|
|
42
29
|
.mantine-Modal-modal {
|
|
43
30
|
padding: 0;
|
|
44
31
|
}
|
|
45
32
|
.mantine-Modal-header {
|
|
46
|
-
border-bottom: 1px solid ${
|
|
33
|
+
border-bottom: 1px solid ${P.colors.neutral100};
|
|
47
34
|
margin-right: 0;
|
|
48
35
|
margin-bottom: 0;
|
|
49
36
|
padding: 16px;
|
|
@@ -60,7 +47,7 @@ import*as e from"react";import t,{useState as a,useEffect as n,forwardRef as l,C
|
|
|
60
47
|
width: 24px;
|
|
61
48
|
height: 24px;
|
|
62
49
|
}
|
|
63
|
-
`,
|
|
50
|
+
`,_=S(p)`
|
|
64
51
|
.mantine-Accordion-control {
|
|
65
52
|
&:hover {
|
|
66
53
|
background-color: transparent;
|
|
@@ -90,7 +77,7 @@ import*as e from"react";import t,{useState as a,useEffect as n,forwardRef as l,C
|
|
|
90
77
|
.mantine-Accordion-content {
|
|
91
78
|
white-space: pre-wrap;
|
|
92
79
|
}
|
|
93
|
-
`,
|
|
80
|
+
`,q=e=>{var{children:a}=e,r=B(e,["children"]);return t.createElement(_,Object.assign({chevron:t.createElement("div",null),disableChevronRotation:!0,transitionDuration:300},r),a)};q.Control=p.Control,q.Item=p.Item,q.Panel=p.Panel;const Q=j.getAssetPath("avatar.jpg"),J=e=>{var{withIndicator:a=!1,indicatorConfig:r=null,size:n=56,children:l,styles:o}=e,i=B(e,["withIndicator","indicatorConfig","size","children","styles"]);const s=()=>t.createElement(v,Object.assign({size:n,radius:"xl"},i,{imageProps:Object.assign({loading:"lazy"},i.imageProps)}),l||t.createElement("img",{loading:"lazy",src:Q,width:n}));return a?t.createElement(g,Object.assign({inline:!0,position:"bottom-end",offset:9},r,{styles:Object.assign({indicator:{backgroundColor:t.isValidElement(r.label)&&"transparent",zIndex:1}},o)}),s()):s()},ee=300,te=u({key:"mantine",prepend:!1}),ae=e=>{var{value:n,onChange:l}=e,o=B(e,["value","onChange"]);const[i,s]=a(n),[c]=T(i,300);return r((()=>{null==l||l(c)}),[c]),r((()=>{s(n)}),[n]),t.createElement(z,Object.assign({size:"md",stepHoldDelay:500,stepHoldInterval:e=>Math.max(1e3/Math.pow(e,2),25),onChange:s,hideControls:!0,min:0,formatter:e=>0===Number(e)?e:e||"",removeTrailingZeros:!0,value:i},o))},re=j.getAssetPath("EyeVisible.svg"),ne=j.getAssetPath("EyeHidden.svg"),le=n(((e,a)=>{const{size:r="md",visibilityToggleIcon:n}=e,l=B(e,["size","visibilityToggleIcon"]),o=n||(({reveal:e,size:a})=>e?t.createElement("img",{src:re,width:a}):t.createElement("img",{src:ne,width:a}));return t.createElement(E,Object.assign({ref:a,size:r,visibilityToggleIcon:o},l,{className:`input-control ${(null==l?void 0:l.className)||""}`}))})),oe=n(((e,n)=>{var{value:l,onChange:o,onChangeRaw:i}=e,s=B(e,["value","onChange","onChangeRaw"]);const[c,m]=a(l||""),[h]=T(c,300);return r((()=>{null==o||o(h)}),[h]),r((()=>{m(l)}),[l]),t.createElement(b,Object.assign({ref:n,size:"md",onChange:e=>{null==i||i(e),m(e.currentTarget.value)},value:c},s,{className:`input-control ${(null==s?void 0:s.className)||""}`}))}));oe.File=e=>t.createElement(f,Object.assign({size:"md"},e)),oe.Password=le,oe.Number=ae,oe.Wrapper=w.Wrapper;class ie extends l{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.error("Uncaught error:",e,t)}render(){return this.state.hasError?this.props.fallback||t.createElement(t.Fragment,null):this.props.children}}const se=e=>{var{slidesToShow:a=1,children:r}=e,n=B(e,["slidesToShow","children"]);return(Array.isArray(r)?r.length:1)?t.createElement(ie,null,t.createElement(D,Object.assign({slideSize:String(Math.floor(1/a*100))+"%",containScroll:"trimSnaps"},n),r)):null};se.Slide=D.Slide;const ce=e=>t.createElement(y,Object.assign({},e));ce.Group=y.Group;const me=S(x)`
|
|
94
81
|
${e=>{const t=e.color||e.theme.colors.primaryBase;return`\n .mantine-Slider-bar {\n background-color: ${t};\n }\n .mantine-Slider-thumb {\n border-color: ${t};\n color: ${t};\n }\n `}}
|
|
95
82
|
[data-theme='marryBaby'] & {
|
|
96
83
|
${e=>{const t=e.color||e.theme.mbColors.pink;return`\n .mantine-Slider-bar {\n background-color: ${t};\n }\n .mantine-Slider-thumb {\n border-color: ${t};\n color: ${t};\n }\n `}}
|
|
@@ -102,7 +89,7 @@ import*as e from"react";import t,{useState as a,useEffect as n,forwardRef as l,C
|
|
|
102
89
|
font-size: 14px;
|
|
103
90
|
font-weight: bold;
|
|
104
91
|
}
|
|
105
|
-
`,
|
|
92
|
+
`,he=S.div`
|
|
106
93
|
display: flex;
|
|
107
94
|
align-items: center;
|
|
108
95
|
.hhg-mantine-slider {
|
|
@@ -120,9 +107,9 @@ import*as e from"react";import t,{useState as a,useEffect as n,forwardRef as l,C
|
|
|
120
107
|
}
|
|
121
108
|
}
|
|
122
109
|
}
|
|
123
|
-
`,
|
|
110
|
+
`,de=e=>{var{color:a,styles:r}=e,n=B(e,["color","styles"]);return t.createElement(M,Object.assign({size:"sm"},n,{styles:e=>Object.assign(Object.assign({},r),{icon:{color:e.colors[e.primaryColor][e.primaryShade]}})}))};de.Group=M.Group;const pe={[A.Vietnam]:"vi",[A.Cambodia]:"km",[A.India]:"hi",[A.Indonesia]:"id",[A.Malaysia]:"ms",[A.Thailand]:"th",[A.Taiwan]:"zh-tw",[A.PhilippinesTagalog]:"tl-ph",[A.PhilippinesEnglish]:"en",[A.Myanmar]:"my"},ge={[A.Vietnam]:()=>import("dayjs/locale/vi.js"),[A.Cambodia]:()=>import("dayjs/locale/km.js"),[A.India]:()=>import("dayjs/locale/hi.js"),[A.Indonesia]:()=>import("dayjs/locale/id.js"),[A.Malaysia]:()=>import("dayjs/locale/ms.js"),[A.Thailand]:()=>import("dayjs/locale/th.js"),[A.Taiwan]:()=>import("dayjs/locale/zh-tw.js"),[A.PhilippinesTagalog]:()=>import("dayjs/locale/tl-ph.js"),[A.PhilippinesEnglish]:()=>import("dayjs/locale/en.js"),[A.Myanmar]:()=>import("dayjs/locale/my.js")},ve=e=>{const[t,n]=a(!1);return r((()=>{N(void 0,void 0,void 0,(function*(){var t;n(!1),yield null===(t=ge[e])||void 0===t?void 0:t.call(ge),$.locale(pe[e]),n(!0)}))}),[e]),{isLoaded:t}},ue=[{size:40,lineHeight:"52px",letterSpacing:"-1.2px"},{size:32,lineHeight:"42px",letterSpacing:"-1px"},{size:26,lineHeight:"36px",letterSpacing:"-0.8px"},{size:22,lineHeight:"32px",letterSpacing:"-0.6px"},{size:18,lineHeight:"28px",letterSpacing:"-0.2px"},{size:16,lineHeight:"24px",letterSpacing:0}],fe=[{size:26,lineHeight:"534px",letterSpacing:"-0.9px"},{size:24,lineHeight:"32px",letterSpacing:"-0.8px"},{size:20,lineHeight:"26px",letterSpacing:"-0.7px"},{size:18,lineHeight:"26px",letterSpacing:"-0.6px"},{size:16,lineHeight:"24px",letterSpacing:"-0.2px"},{size:14,lineHeight:"22px",letterSpacing:"-0.2px"}],ze=(e=!1)=>Object.fromEntries((e?fe:ue).map(((e,t)=>[`&:is(h${t+1})`,{fontSize:e.size,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing}]))),Ee={Title:{styles:{root:Object.assign(Object.assign({fontWeight:F.fontWeight.bold},ze()),{[`&${L.mbDown}`]:Object.assign({},ze(!0))})}}},be={Radio:{styles:{radio:Object.assign(Object.assign({backgroundColor:"#ffffff"},X),{"&:checked":{backgroundColor:"#ffffff"}})}}},we={Tabs:{styles:{tabsList:{gap:16,borderBottom:"none"},tab:{padding:0,paddingBottom:8,color:P.colors.gray400,"&:hover":{backgroundColor:"initial",border:"initial"},"&[data-active='true']":{color:P.colors.primaryBase,borderColor:P.colors.primaryBase}}}}};var ye="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function xe(e){var t={exports:{}};return e(t,t.exports),t.exports
|
|
124
111
|
/*!
|
|
125
112
|
Copyright (c) 2018 Jed Watson.
|
|
126
113
|
Licensed under the MIT License (MIT), see
|
|
127
114
|
http://jedwatson.github.io/classnames
|
|
128
|
-
*/}var ye=xe((function(e){!function(){var t={}.hasOwnProperty;function a(){for(var e=[],n=0;n<arguments.length;n++){var l=arguments[n];if(l){var r=typeof l;if("string"===r||"number"===r)e.push(l);else if(Array.isArray(l)){if(l.length){var i=a.apply(null,l);i&&e.push(i)}}else if("object"===r){if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]")){e.push(l.toString());continue}for(var o in l)t.call(l,o)&&l[o]&&e.push(o)}}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):window.classNames=a}()}));function Me(e,t=6){const a=new Array(t).fill("");if(e){const t=e.toString().split("");a.map(((e,n)=>{t[n]&&(a[n]=t[n]||"")}))}return a}function He(e){return e.join("")}var je="_2iQs0sk",ke="Ia6IojY";const Ce=l(((e,a)=>{const{maxLength:n=1,placeholder:l,className:r}=e,i=B(e,["maxLength","placeholder","className"]);return t.createElement("input",Object.assign({maxLength:n,className:ye(ke,"otpInput",r),placeholder:l,type:"number"},i,{ref:a}))})),Se=l(((e,l)=>{const{valueLength:r=6,type:s="number",value:m,defaultValue:h,onChange:d,onBlur:p}=e,g=i(new Array(r).fill(null)),[v,f]=a(h||m),[u,z]=a(-1),[E,b]=a((()=>Me(v,r))),w=o((()=>{if(-1===u)return;const e=g.current[u];if(e){e.value="";const t=E;t[u]="",b(t),f((()=>He(t))),null==d||d(He(t))}}),[u,d,E]),x=o((()=>{if(0===u)return;const e=g.current[u];e&&e.blur();const t=g.current[u-1];t&&t.focus()}),[u]),y=o((()=>{if(u===r-1)return;const e=g.current[u];e&&e.blur();const t=g.current[u+1];t&&t.focus()}),[u,r]),M=o((e=>{const t=e.target,a=t.value.toString().slice(0,1),n=g.current.findIndex((e=>e===t));if(-1!==n){const e=E;e[n]=a,b(e),f((()=>He(e))),null==d||d(He(e))}y()}),[y,d,E]),j=o((e=>{const t=e.target,a=g.current.findIndex((e=>e===t));"number"===s?t.select():t.setSelectionRange(0,t.value.length,"backward"),-1!==a&&z(a)}),[]),k=o((e=>{const t=Me(e.clipboardData.getData("text/plain"),r),a=He(t);b(t),f(a),null==d||d(a)}),[d,s,r]),C=o((e=>{8===e.keyCode||"Backspace"===e.key?(e.preventDefault(),w(),x()):46===e.keyCode||"Delete"===e.key?(e.preventDefault(),w()):37===e.keyCode||"ArrowLeft"===e.key?(e.preventDefault(),x()):39===e.keyCode||"ArrowRight"===e.key?(e.preventDefault(),y()):32!==e.keyCode&&" "!==e.key&&"Spacebar"!==e.key&&"Space"!==e.key||e.preventDefault()}),[w,y,x]);return c(l,(()=>g.current[0]),[]),n((()=>{b((()=>Me(m,r))),f(m)}),[r,m]),t.createElement(H,{justify:"center",columnGap:8,className:ye(je,"otpContainer")},E.map(((e,a)=>t.createElement(Ce,{ref:e=>{g.current[a]=e},key:""+a,value:e,type:s,onChange:M,onFocus:j,onKeyDown:C,onPaste:k,onBlur:p}))))})),Oe=t=>e.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 8 5",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},t),e.createElement("path",{d:"M4 5L0.535898 0.5L7.4641 0.5L4 5Z"})),Pe=t=>e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",id:"flag-icons-kh",viewBox:"0 0 640 480",width:"1em",height:"1em"},t),e.createElement("path",{fill:"#032ea1",d:"M0 0h640v480H0z"}),e.createElement("path",{fill:"#e00025",d:"M0 120h640v240H0z"}),e.createElement("g",{fill:"#fff",stroke:"#000",transform:"matrix(1.2 0 0 1.2 85.6 -522)"},e.createElement("g",{strokeLinejoin:"bevel"},e.createElement("path",{d:"M139 623.5h113.8v43.8H139z"}),e.createElement("path",{d:"M247 647.6h3.5v16.5H247zm-108-8.1h113.8v5H139zm0-7h113.8v4.6H139z"}),e.createElement("path",{strokeWidth:.9,d:"M139 625.7h113.8v4.3H139z"}),e.createElement("path",{d:"M169 647.6h3.6v16.5H169zm49 0h3.6v16.5H218zm-78 0h3.5v16.5H140zm7 0h3.5v16.5H147zm7.5 0h3.5v16.5h-3.5zm7.5 0h3.5v16.5H162zm62.8 0h3.6v16.5h-3.6zm7.5 0h3.6v16.5h-3.6zm7.5 0h3.6v16.5h-3.6z"}),e.createElement("path",{strokeLinejoin:"miter",d:"M94.5 669.5a9.3 9.3 0 0 0 4.4-5.3H292a9.3 9.3 0 0 0 4.4 5.3z"})),e.createElement("path",{d:"M193 556.8s-.1-4.1 2.3-4.2c2.3 0 2.2 4.2 2.2 4.2zm-12.5 54.5v-5.5c0-2.8-2.8-3-2.8-5 0 0-.4-3 .4-4.4 1.1 4 3 3.3 3 1.6 0-1.4-1-2.8-3.3-6.3-.8-1.1-.3-4.6.7-5.9.4 3 .9 4.5 2.2 4.5.8 0 1.4-.5 1.4-2 0-2-1.3-3-2-4.8a5 5 0 0 1 1.1-5.3c.5 3 .4 4.2 1.7 4.2 2.7-.9 0-4.8-.6-5.8-.6-1.1 1-3.4 1-3.4.8 2.7 1 2.9 2 2.6 1.2-.3 1-2-.4-3.4-.9-1-.8-2.3.2-3.3 1 1.9 2.2 1.8 2.3.6l-.8-4.4H204l-.9 4.3c-.2 1.2 1.4 1.5 2.4-.5 1 1 1.1 2.4.2 3.3-1.4 1.4-1.6 3.1-.4 3.4 1 .3 1.2 0 2-2.6 0 0 1.5 1.5 1 3.4-.6 1-3.3 5-.6 5.8 1.3 0 1.2-1.2 1.7-4.2a5 5 0 0 1 1 5.3c-.6 1.8-2 2.8-2 4.8 0 1.5.7 2 1.5 2 1.3 0 1.8-1.4 2.2-4.5 1 1.3 1.5 4.8.7 6-2.3 3.4-3.4 4.8-3.4 6.2 0 1.7 2 2.4 3-1.6.9 1.4.5 4.4.5 4.4 0 2-2.7 2.2-2.8 5v5.5zm7.2-46-.4-3.1h15.9l-.4 3.1zm1-3.2-.2-2.5H202l-.3 2.5zm2.3-2.6-.3-2.6h9l-.1 2.6zm33 110c-2-.7-5-2.9-5-5v-24.3l2.6-3.4H169l2.5 3.4v24.3c0 2.1-2 4.3-4 5z"}),e.createElement("path",{strokeLinejoin:"bevel",d:"M178.2 647.6h3.6v16.5h-3.6zm30.4 0h3.6v16.5h-3.6z"}),e.createElement("path",{d:"M168 609.2v27.6h54v-27.6a4.2 4.2 0 0 0-2.6 2.8v11.8h-48.7V612s-.6-2-2.8-2.8z"}),e.createElement("path",{d:"M214.6 669.5c-1.8-.7-5.6-2.9-5.6-5v-27.2c.4-1.5 2.4-2.4 3.7-3.4H177c1.7 1 3.6 1.7 4.3 3.4v27.2c0 2.1-3 4.3-4.8 5z"}),e.createElement("path",{d:"M219.4 634.2v-19.6h-4.9v-1.9h-38.8v2h-5v19.5zM207 669.5c-1.8-.7-4.3-2.9-4.3-5v-23.2l1.4-2.1h-17.7l1.5 2v23.3c0 2.1-2.6 4.3-4.3 5z"}),e.createElement("path",{d:"M190.7 639.2h9v30.3h-9z"}),e.createElement("path",{strokeLinejoin:"bevel",d:"M204.4 632.5c0-2 5.8-2.1 8.8-3.8h-36c3 1.7 8.7 1.8 8.7 3.8l1.2 3.9 15 .6z"}),e.createElement("path",{d:"M211.4 611.3c0-4.9.2-6.7 1.7-6.7V620c-3.7 1.4-6.3 6-6.3 6h-23.2s-2.6-4.6-6.3-6v-15.5c1.8 0 1.8 2 1.8 6.7zm1.7-2c0-5.6 4.9-6.2 4.9-6.2v5c-1.9-.1-2.8 1.6-2.8 4 0 2.5 1.5 2.5 1.5 2.5v14.2h-3.6z"}),e.createElement("path",{d:"M177.3 609.3c0-5.6-4.9-6.2-4.9-6.2v5c1.9-.1 2.8 1.6 2.8 4 0 2.5-1.5 2.5-1.5 2.5v14.2h3.6z"}),e.createElement("g",{fill:"none",strokeWidth:.8},e.createElement("path",{d:"M186.8 570.6H204m-19.2 5.4h21m-23 6.5h24.9m-27 7.9h29.5m-30.2 9h30.4"}),e.createElement("path",{strokeWidth:1,d:"M170.8 629h48.6m-33.2 0h18v6.6h-18z"})),e.createElement("path",{d:"M184 614.2c3 3.6 2.6 9.7 2.6 13.3H204c0-3.6-.4-9.7 2.6-13.3zm9.7-41-2.4-1.3v-3.5c1 .3 2 .4 2.2 2 .3-2.3 1-2.1 1.9-3 1 .9 1.5.7 1.9 3 0-1.6 1.2-1.7 2.1-2v3.5l-2.3 1.2z"}),e.createElement("path",{d:"m193.5 578.9-4-2.8V573c1.5.3 3 .5 3.2 2.2.4-2.5 1.3-3.7 2.7-4.7 1.3 1 2.2 2.2 2.7 4.7.1-1.7 1.7-1.9 3-2.2v3.2l-3.9 2.7z"}),e.createElement("path",{d:"m193.2 587.8-4.5-4v-4.7c1.6.4 3.4.6 3.6 3.1.5-3.5 1.5-5.4 3-6.8 1.6 1.4 2.6 3.3 3.2 6.8.2-2.5 2-2.7 3.6-3.1v4.7l-4.6 4zm8.4 5.3-4 5.7h-4.7l-4.1-5.7zm-15.2 9.5c2 1.1 2.8 3.4 3 7.6H201c.2-4.2 1-6.5 3-7.6z"}),e.createElement("path",{strokeLinejoin:"bevel",d:"M204.2 593v-5.6a5.2 5.2 0 0 0-3.8 3.3c0-2-2.5-6.3-5.2-8.5-2.7 2.4-5.3 6.4-5.2 8.4-.5-1.5-1.8-2.7-3.8-3.2v5.7z"}),e.createElement("path",{strokeLinejoin:"bevel",d:"M205 602.6V597c-2.1.6-3.5 1.7-4.1 3.3 0-2-2.7-6.3-5.7-8.5-3 2.5-5.8 6.4-5.7 8.5-.5-1.5-2-2.7-4.1-3.3v5.7z"}),e.createElement("path",{strokeLinejoin:"bevel",d:"M207.4 614.3v-6.6a9.6 9.6 0 0 0-5.1 3.8c0-3.5-4-9-7.1-10.7-3.2 1.8-7.1 7.4-7.1 10.7a9.7 9.7 0 0 0-5.2-3.8v6.6z"}),e.createElement("path",{strokeLinejoin:"bevel",d:"M206 629v-6.8c-2.4.9-3 3.1-3.8 4.7.3-6.9-3.8-14.2-7-16.1-3.2 1.9-7.4 9.4-7 16-.8-1.4-1.5-3.7-3.8-4.6v6.7z"}),e.createElement("path",{d:"M204.4 639.2v-6.8c-2.5.6-2.6 1.5-3.4 3 .3-4.1-2.6-8.8-5.8-10.6-3.2 1.8-6 6.5-5.8 10.6-.8-1.5-.9-2.4-3.4-3v6.8z"}),e.createElement("g",{id:"a"},e.createElement("path",{d:"M99 664.2v-20.4c-.7-2.6-3-5-4.6-5.4v-18l3.7 2 4.3 18.9v23z"}),e.createElement("path",{d:"M99 664.3v-20.5c-.7-2.6-3-5-4.6-5.4v-19.2c2.5 0 3.7 3.2 3.7 3.2l4.3 18.9v22.9z"}),e.createElement("path",{d:"M96.3 669.5c1.7-.7 4.2-2.9 4.2-5v-25.6l-1.2-2H143l-1.7 2v25.6a6 6 0 0 0 3.4 5z"}),e.createElement("path",{d:"M135.8 669.5c-1.7-.7-4.2-2.9-4.2-5v-24.3l3.6-3.4h-29.6l3.6 3.4v24.3c0 2.1-2.5 4.3-4.2 5z"}),e.createElement("path",{d:"M131.7 669.5c-1.7-.7-4.3-2.9-4.3-5v-22l2.4-3.3H111l2.4 3.3v22c0 2.1-2.5 4.3-4.3 5z"}),e.createElement("path",{d:"M116 639.2h8.9v30.4h-9z"}),e.createElement("path",{strokeLinejoin:"bevel",d:"M103.7 647.6h3.6v16.5h-3.6zm30.8 0h3.5v16.5h-3.6zm-33.9-27.8h4.4v17h-4.4zm0-3.2h4.3v3.2h-4.3zm35.6 6.9h6.1v13h-6.1z"}),e.createElement("path",{d:"M104.9 636.6v-29c1.2 0 1.4 4.3 4.2 4.3 1.5 0 1.4-1.8.5-3.2-.7-1.3-1.6-3-.4-6.3.9 2.5 3.1 3.3 2.7 1.8-.7-2.7-2.8-3.2-1.2-7.3.5 3.4 2.7 3.3 2.2 1.3-.6-2.3-1.9-3.3-.3-6.5.9 3.7 2 3.5 2 1.2 0-3.4 0-7 4.2-8.3 0 0 .3-3 1.9-3 1.5 0 1.8 3 1.8 3 4.3 1.3 4.2 5 4.2 8.3 0 2.3 1.1 2.5 2-1.2 1.6 3.2.3 4.2-.3 6.5-.5 2 1.7 2.1 2.2-1.3 1.6 4.1-.5 4.6-1.2 7.3-.4 1.5 1.8.7 2.7-1.8 1.2 3.3.3 5-.4 6.3-.8 1.4-1 3.2.5 3.2 2.8 0 3-4.2 4.2-4.2v28.9zM98 614.7v22.1h2.5v-22.1c-.9-.5-1.7-.5-2.5 0z"}),e.createElement("path",{d:"M98.2 629c3.1 1.6 6.2 3.5 7 7.8h-7zm43.2-6.6v14.4h2v-14.4c-.6-.3-1.5-.4-2 0z"}),e.createElement("path",{d:"M143.4 629c-3.1 1.5-6.2 3.3-7 7.7h7zm-20.6-33.7 1.8-1.5v-2c-.6 0-1 .3-1.5 1a5 5 0 0 0-2.5-3 5 5 0 0 0-2.6 2.9c-.5-.7-.8-.8-1.5-1v2l1.8 1.6z"}),e.createElement("path",{d:"m123.8 600.2.8-1.9v-2.5c-.6 0-1 .3-1.5 1a5 5 0 0 0-2.5-3 5 5 0 0 0-2.6 2.9c-.5-.7-.8-.8-1.5-.9v2.5l.8 1.9z"}),e.createElement("path",{d:"m124 606.8 2.6-3.3v-3.2c-1 0-1.5.5-2.2 1.6-.7-2.3-2-2.7-3.8-3.8-1.9 1-3.2 1.5-3.8 3.7-.8-1.1-1.3-1.4-2.3-1.5v3.2l2.7 3.3z"}),e.createElement("path",{d:"M124.7 613.3s3.2-2.7 3.3-4.2v-3.5c-1.2.1-2.3.4-3.2 1.9-.8-2.9-2-3.7-4.2-5-2.3 1.3-3.5 2.1-4.2 5-1-1.5-2-1.8-3.3-2v3.6a15 15 0 0 0 3.3 4.2z"}),e.createElement("path",{d:"M126 625.3s4.4-4.7 4.5-6.6v-5.4c-1.6.2-3.2 1.3-4.4 3.6-1-4.5-2.6-7.6-5.5-9.8-3 2.2-4.6 5.3-5.6 9.8-1.2-2.3-2.7-3.4-4.3-3.6v5.4c.3 1.9 4.4 6.6 4.4 6.6z"}),e.createElement("path",{d:"M126 632.4s3.7-3.7 4.5-5.3v-5.4c-1.6.2-3.2 1.3-4.4 3.5a14 14 0 0 0-5.5-9.2c-3 2.2-4.6 4.7-5.6 9.2-1.2-2.2-2.7-3.3-4.3-3.5v5.4c1 1.6 4.4 5.3 4.4 5.3z"}),e.createElement("path",{d:"M127.5 636.6c-1-4.7-2-8.2-7.1-11.7-5.2 3.5-6.1 7-7.2 11.7z"}),e.createElement("path",{d:"M130.2 639.2v-6.8c-2.4 1-4.5 2.3-5.3 3.8-.8-3.8-2.5-5.4-4.6-7.7-2.1 2.3-3.5 4-4.4 7.7-.8-1.5-2.9-2.9-5.2-3.8v6.8z"})),e.createElement("use",{xlinkHref:"#a",width:"100%",height:"100%",transform:"matrix(-1 0 0 1 390.7 0)"}),e.createElement("path",{d:"M72.7 694.3H318v12.5H72.7zm-6.5 12.5h258.3v12.5H66.2zm19.4-31.3H305v8.1H85.6z"}),e.createElement("path",{d:"M79.2 683.6h232.4v10.6H79.2zm10.2-14.3h212v6.2h-212z"}),e.createElement("path",{d:"M112.4 669.3h16v50h-16z"}),e.createElement("path",{d:"M116 669.3h8.9v50h-9zm71 0h16v50h-16z"}),e.createElement("path",{d:"M190.7 669.3h9v50h-9zm71.5 0h16v50h-16z"}),e.createElement("path",{d:"M265.7 669.3h9v50h-9z"}),e.createElement("path",{fill:"none",d:"M99 664.2h193M115.8 713h9.2m-9.2-6.3h9.2m-9.2-6.2h9.2m-9.2-6.3h9.2m-9.2-6.2h9.2m-9.2-6.3h9.2m-9.2-6.2h9.2m65.8 37.5h8.6m-8.6-6.3h8.6m-8.6-6.2h8.6m-8.6-6.3h8.6m-8.6-6.2h8.6m-8.6-6.3h8.6m-8.6-6.2h8.6m66.2 37.5h9.2m-9.2-6.3h9.2m-9.2-6.2h9.2m-9.2-6.3h9.2m-9.2-6.2h9.2m-9.2-6.3h9.2m-9.2-6.2h9.2"}))),$e=t=>e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",id:"flag-icons-in",viewBox:"0 0 640 480",width:"1em",height:"1em"},t),e.createElement("path",{fill:"#f93",d:"M0 0h640v160H0z"}),e.createElement("path",{fill:"#fff",d:"M0 160h640v160H0z"}),e.createElement("path",{fill:"#128807",d:"M0 320h640v160H0z"}),e.createElement("g",{transform:"matrix(3.2 0 0 3.2 320 240)"},e.createElement("circle",{r:20,fill:"#008"}),e.createElement("circle",{r:17.5,fill:"#fff"}),e.createElement("circle",{r:3.5,fill:"#008"}),e.createElement("g",{id:"d"},e.createElement("g",{id:"c"},e.createElement("g",{id:"b"},e.createElement("g",{id:"a",fill:"#008"},e.createElement("circle",{r:.9,transform:"rotate(7.5 -8.8 133.5)"}),e.createElement("path",{d:"M0 17.5.6 7 0 2l-.6 5L0 17.5z"})),e.createElement("use",{xlinkHref:"#a",width:"100%",height:"100%",transform:"rotate(15)"})),e.createElement("use",{xlinkHref:"#b",width:"100%",height:"100%",transform:"rotate(30)"})),e.createElement("use",{xlinkHref:"#c",width:"100%",height:"100%",transform:"rotate(60)"})),e.createElement("use",{xlinkHref:"#d",width:"100%",height:"100%",transform:"rotate(120)"}),e.createElement("use",{xlinkHref:"#d",width:"100%",height:"100%",transform:"rotate(-120)"}))),Ie=t=>e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",id:"flag-icons-id",viewBox:"0 0 640 480",width:"1em",height:"1em"},t),e.createElement("g",{fillRule:"evenodd",strokeWidth:"1pt"},e.createElement("path",{fill:"#e70011",d:"M0 0h640v249H0z"}),e.createElement("path",{fill:"#fff",d:"M0 240h640v240H0z"}))),Le=t=>e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",id:"flag-icons-my",viewBox:"0 0 640 480",width:"1em",height:"1em"},t),e.createElement("path",{fill:"#c00",d:"M0 0h640v480H0z"}),e.createElement("path",{fill:"#fff",d:"M.5 39.9h639v38.4H.5zM.5 118.6h639V157H.5zM.5 197.4h639v38.4H.5z"}),e.createElement("path",{fill:"#006",d:"M0 .5h320v280H0Z"}),e.createElement("path",{fill:"#fc0",d:"m207.5 73.8 6 40.7 23-34-12.4 39.2 35.5-20.8-28.1 30 41-3.2-38.3 14.8 38.3 14.8-41-3.2 28.1 30-35.5-20.8 12.3 39.3-23-34.1-6 40.7-5.9-40.7-23 34 12.4-39.2-35.5 20.8 28-30-41 3.2 38.4-14.8-38.3-14.8 41 3.2-28.1-30 35.5 20.8-12.4-39.3 23 34.1zm-33.3 1.7a71.1 71.1 0 1 0 0 130 80 80 0 1 1 0-130z"}),e.createElement("path",{fill:"#fff",d:"M.5 276.2h639v38.4H.5zM.5 354.4h639v38.4H.5zM0 441.6h639V480H0z"})),Ae=t=>e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",id:"flag-icons-mm",viewBox:"0 0 640 480",width:"1em",height:"1em"},t),e.createElement("path",{fill:"#fecb00",d:"M0 0h640v480H0z"}),e.createElement("path",{fill:"#34b233",d:"M0 160h640v320H0z"}),e.createElement("path",{fill:"#ea2839",d:"M0 320h640v160H0z"}),e.createElement("g",{transform:"translate(320 256.9) scale(176.87999)"},e.createElement("path",{id:"a",fill:"#fff",d:"m0-1 .3 1h-.6z"}),e.createElement("use",{xlinkHref:"#a",width:"100%",height:"100%",transform:"rotate(-144)"}),e.createElement("use",{xlinkHref:"#a",width:"100%",height:"100%",transform:"rotate(-72)"}),e.createElement("use",{xlinkHref:"#a",width:"100%",height:"100%",transform:"rotate(72)"}),e.createElement("use",{xlinkHref:"#a",width:"100%",height:"100%",transform:"rotate(144)"}))),Be=t=>e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",id:"flag-icons-ph",viewBox:"0 0 640 480",width:"1em",height:"1em"},t),e.createElement("path",{fill:"#0038a8",d:"M0 0h640v240H0z"}),e.createElement("path",{fill:"#ce1126",d:"M0 240h640v240H0z"}),e.createElement("path",{fill:"#fff",d:"M415.7 240 0 480V0"}),e.createElement("path",{fill:"#fcd116",d:"M26.7 42.4 41 55l16.6-9.2-7.4 17.5 14 13-19-1.6-8.1 17.2-4.3-18.5L14 71l16.3-10zm323.8 172.3.4 19 18 6.3-18 6.2-.4 19-11.5-15.1-18.2 5.5 10.8-15.6-10.8-15.6 18.2 5.5zM37.2 388.1l8 17.2 19-1.6-13.9 13 7.4 17.5-16.6-9.1-14.4 12.4 3.6-18.7L14 409l18.9-2.4zm114.2-249-6.2 6.2 3.1 47-3 .3-5.7-42.9-5.1 5 7.6 38.4a47.5 47.5 0 0 0-17.2 7.1l-21.7-32.4H96l26.4 34.3a48 48 0 0 0-2.4 2l-31.1-35.5h-8.8v8.8l35.4 31-2 2.5-34.3-26.3v7.1l32.5 21.7c-3.4 5.2-5.9 11-7.1 17.2L66.3 223l-5.1 5 42.9 5.7c-.2 1-.3 2.1-.3 3.1l-47-3-6.2 6.2 6.2 6.2 47-3.1.3 3.1-42.9 5.7 5 5 38.4-7.6a47.5 47.5 0 0 0 7.1 17.2l-32.5 21.7v7.2l34.3-26.3a48 48 0 0 0 2 2.4l-35.4 31v8.8H89l31-35.4 2.5 2L96 312.2h7.2l21.7-32.5c5.1 3.4 11 5.9 17.2 7.1l-7.6 38.4 5 5 5.7-42.9c1 .2 2 .3 3.1.3l-3 47 6.1 6.2 6.3-6.2-3.1-47 3-.3 5.7 43 5.1-5.1-7.6-38.4a47.5 47.5 0 0 0 17.2-7.1l21.7 32.5h7.2l-26.4-34.3a48 48 0 0 0 2.4-2l31.1 35.4h8.8v-8.8l-35.4-31 2-2.4 34.3 26.3v-7.2l-32.5-21.7c3.4-5.1 5.9-11 7.1-17.2l38.3 7.6 5.1-5-42.9-5.7c.2-1 .3-2 .3-3.1l47 3 6.2-6.1-6.2-6.2-47 3-.3-3 42.9-5.7-5-5-38.4 7.5a47.5 47.5 0 0 0-7.1-17.2l32.5-21.7v-7.1l-34.3 26.3a48 48 0 0 0-2-2.4l35.4-31v-8.9H214l-31 35.5a48 48 0 0 0-2.5-2l26.4-34.3h-7.2L178 200.2c-5.1-3.4-11-5.9-17.2-7.1l7.6-38.3-5-5-5.7 42.8-3.1-.3 3-47z"})),Ne=t=>e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",id:"flag-icons-tw",viewBox:"0 0 640 480",width:"1em",height:"1em"},t),e.createElement("clipPath",{id:"a"},e.createElement("path",{d:"M0 0h640v480H0z"})),e.createElement("g",{clipPath:"url(#a)"},e.createElement("path",{fill:"red",d:"M0 0h720v480H0z"}),e.createElement("path",{fill:"#000095",d:"M0 0h360v240H0z"}),e.createElement("g",{fill:"#fff"},e.createElement("path",{d:"m154 126.9-2.5 9.6 9.4 2.6-1.8-7.1zm46.9 5.1-1.8 7.1 9.4-2.6-2.5-9.6zm-41.8-24-5.1 5.1 1.9 6.9z"}),e.createElement("path",{d:"m155.9 120-1.9 6.9 5.1 5.1z"}),e.createElement("path",{d:"m154 113.1-6.9 6.9 6.9 6.9 1.9-6.9zm14 27.8 5.1 5.1 6.9-1.9zm18.9 5.1 9.6 2.5 2.6-9.4-7.1 1.8z"}),e.createElement("path",{d:"m192 140.9 7.1-1.8 1.8-7.1zm-31.1-1.8 2.6 9.4 9.6-2.5-5.1-5.1zm19.1 5 6.9 1.9 5.1-5.1z"}),e.createElement("path",{d:"m173.1 146 6.9 6.9 6.9-6.9-6.9-1.9zm-12.2-45.1-9.4 2.6 2.5 9.6 5.1-5.1zm-1.8 31.1 1.8 7.1 7.1 1.8zm45-12 1.9-6.9-5.1-5.1z"}),e.createElement("path",{d:"m168 99.1-7.1 1.8-1.8 7.1zm32.9 8.9-1.8-7.1-7.1-1.8zm5.1 18.9 6.9-6.9-6.9-6.9-1.9 6.9z"}),e.createElement("path",{d:"m200.9 108-8.9-8.9-12-3.2-12 3.2-8.9 8.9-3.2 12 3.2 12 8.9 8.9 12 3.2 12-3.2 8.9-8.9 3.2-12z"}),e.createElement("path",{d:"m200.9 132 5.1-5.1-1.9-6.9zm5.1-18.9 2.5-9.6-9.4-2.6 1.8 7.1zm-6.9-12.2-2.6-9.4-9.6 2.5 5.1 5.1zm-26-6.9-9.6-2.5-2.6 9.4 7.1-1.8zm6.9 1.9-6.9-1.9-5.1 5.1z"}),e.createElement("path",{d:"m186.9 94-6.9-6.9-6.9 6.9 6.9 1.9z"}),e.createElement("path",{d:"m192 99.1-5.1-5.1-6.9 1.9zM173.1 146l-9.6 2.5 4.5 16.6 12-12.2zm-5.1 19.1 12 44.9 12-44.9-12-12.2zm-7.1-26-9.4-2.6-4.4 16.4 16.4-4.4z"}),e.createElement("path",{d:"m147.1 152.9-12 45.1 32.9-32.9-4.5-16.6zm-12-20.9L102 165.1l45.1-12.2 4.4-16.4z"}),e.createElement("path",{d:"m154 126.9-6.9-6.9-12 12 16.4 4.5zm0-13.8-2.5-9.6-16.4 4.5 12 12z"}),e.createElement("path",{d:"M135.1 108 90 120l45.1 12 12-12zm90 24-16.6 4.5 4.4 16.4 45.1 12.2z"}),e.createElement("path",{d:"m199.1 139.1-2.6 9.4 16.4 4.4-4.4-16.4zm-12.2 6.9-6.9 6.9 12 12.2 4.5-16.6zm19.1-19.1 2.5 9.6 16.6-4.5-12.2-12z"}),e.createElement("path",{d:"m192 165.1 33.1 32.9-12.2-45.1-16.4-4.4zm7.1-64.2 9.4 2.6 4.4-16.4-16.4 4.4z"}),e.createElement("path",{d:"M225.1 108 258 75.1l-45.1 12-4.4 16.4zm-12.2-20.9L225.1 42 192 75.1l4.5 16.4zm12.2 44.9 44.9-12-44.9-12-12.2 12z"}),e.createElement("path",{d:"m206 113.1 6.9 6.9 12.2-12-16.6-4.5zm-38-38L135.1 42l12 45.1 16.4 4.4z"}),e.createElement("path",{d:"m160.9 100.9 2.6-9.4-16.4-4.4 4.4 16.4z"}),e.createElement("path",{d:"m147.1 87.1-45.1-12 33.1 32.9 16.4-4.5zm39.8 6.9 9.6-2.5-4.5-16.4-12 12z"}),e.createElement("path",{d:"M192 75.1 180 30l-12 45.1 12 12z"}),e.createElement("path",{d:"m173.1 94 6.9-6.9-12-12-4.5 16.4z"})),e.createElement("circle",{cx:180,cy:120,r:51.1,fill:"#000095"}),e.createElement("circle",{cx:180,cy:120,r:45.1,fill:"#fff"}))),De=t=>e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",id:"flag-icons-th",viewBox:"0 0 640 480",width:"1em",height:"1em"},t),e.createElement("g",{fillRule:"evenodd"},e.createElement("path",{fill:"#f4f5f8",d:"M0 0h640v480H0z"}),e.createElement("path",{fill:"#2d2a4a",d:"M0 162.5h640v160H0z"}),e.createElement("path",{fill:"#a51931",d:"M0 0h640v82.5H0zm0 400h640v80H0z"}))),Te=t=>e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",id:"flag-icons-vn",viewBox:"0 0 640 480",width:"1em",height:"1em"},t),e.createElement("defs",null,e.createElement("clipPath",{id:"a"},e.createElement("path",{fillOpacity:.7,d:"M-85.3 0h682.6v512H-85.3z"}))),e.createElement("g",{fillRule:"evenodd",clipPath:"url(#a)",transform:"translate(80) scale(.9375)"},e.createElement("path",{fill:"#da251d",d:"M-128 0h768v512h-768z"}),e.createElement("path",{fill:"#ff0",d:"M349.6 381 260 314.3l-89 67.3L204 272l-89-67.7 110.1-1 34.2-109.4L294 203l110.1.1-88.5 68.4 33.9 109.6z"}))),Ve=Object.values(I).reduce(((e,{phoneCountry:t})=>(e.includes(t)||e.push(t),e)),[]),We={PH:Be,KH:Pe,ID:$e,IN:Ie,MM:Ae,MY:Le,TH:De,TW:Ne,VN:Te};var Re={phoneInput:"i-9Ibox",error:"YDWHh9b"};const Fe=l(((e,l)=>{const{isError:r,defaultCountry:i,countries:o=Ve,countryCallingCodeEditable:c=!1,defaultValue:s,value:m,onChange:h,className:d}=e,p=B(e,["isError","defaultCountry","countries","countryCallingCodeEditable","defaultValue","value","onChange","className"]),[g,v]=a(s||m),[f,u]=a(null);return n((()=>{v(m)}),[m]),n((()=>{N(void 0,void 0,void 0,(function*(){const e=yield import("react-phone-number-input");u(e)}))}),[]),f?t.createElement(f.default,Object.assign({ref:l,value:g,onChange:e=>{v(e),null==h||h(e)},countries:o,defaultCountry:i,countryCallingCodeEditable:c,className:ye(Re.phoneInput,{isError:r,[Re.error]:r},d),flagUrl:void 0,flagComponent:e=>{const{country:a,countryName:n,flagUrl:l}=e,r=B(e,["country","countryName","flagUrl"]),i=We[a],o=a?`(+${f.getCountryCallingCode(a)})`:"";return i?t.createElement(t.Fragment,null,t.createElement(i,Object.assign({title:n},r)),t.createElement("span",{className:ye(Re.callingCode,"PhoneInputCountryIconCallingCode")},o)):t.createElement(t.Fragment,null)},countrySelectProps:{arrowComponent:()=>t.createElement("div",{className:ye(Re.arrowSelect,"PhoneInputArrowContainer")},t.createElement(Oe,null))}},p)):null}));export{U as A,Oe as C,J as D,Ee as G,$e as I,Le as M,te as N,Se as O,Be as P,he as R,me as S,Ne as T,Te as V,Pe as a,Ie as b,Ae as c,De as d,re as e,xe as f,we as g,se as h,Z as i,R as j,G as k,Fe as l,Y as m,X as n,de as o,ze as p,be as q,_ as r,Q as s,oe as t,ge as u,ce as v,ee as w,F as x};
|
|
115
|
+
*/}var Me=xe((function(e){!function(){var t={}.hasOwnProperty;function a(){for(var e=[],r=0;r<arguments.length;r++){var n=arguments[r];if(n){var l=typeof n;if("string"===l||"number"===l)e.push(n);else if(Array.isArray(n)){if(n.length){var o=a.apply(null,n);o&&e.push(o)}}else if("object"===l){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var i in n)t.call(n,i)&&n[i]&&e.push(i)}}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):window.classNames=a}()}));function He(e,t=6){const a=new Array(t).fill("");if(e){const t=e.toString().split("");a.map(((e,r)=>{t[r]&&(a[r]=t[r]||"")}))}return a}function je(e){return e.join("")}var ke="_2iQs0sk",Ce="Ia6IojY";const Se=n(((e,a)=>{const{maxLength:r=1,placeholder:n,className:l}=e,o=B(e,["maxLength","placeholder","className"]);return t.createElement("input",Object.assign({maxLength:r,className:Me(Ce,"otpInput",l),placeholder:n,type:"number"},o,{ref:a}))})),Oe=n(((e,n)=>{const{valueLength:l=6,type:c="number",value:m,defaultValue:h,onChange:d,onBlur:p}=e,g=o(new Array(l).fill(null)),[v,u]=a(h||m),[f,z]=a(-1),[E,b]=a((()=>He(v,l))),w=i((()=>{if(-1===f)return;const e=g.current[f];if(e){e.value="";const t=E;t[f]="",b(t),u((()=>je(t))),null==d||d(je(t))}}),[f,d,E]),y=i((()=>{if(0===f)return;const e=g.current[f];e&&e.blur();const t=g.current[f-1];t&&t.focus()}),[f]),x=i((()=>{if(f===l-1)return;const e=g.current[f];e&&e.blur();const t=g.current[f+1];t&&t.focus()}),[f,l]),M=i((e=>{const t=e.target,a=t.value.toString().slice(0,1),r=g.current.findIndex((e=>e===t));if(-1!==r){const e=E;e[r]=a,b(e),u((()=>je(e))),null==d||d(je(e))}x()}),[x,d,E]),j=i((e=>{const t=e.target,a=g.current.findIndex((e=>e===t));"number"===c?t.select():t.setSelectionRange(0,t.value.length,"backward"),-1!==a&&z(a)}),[]),k=i((e=>{const t=He(e.clipboardData.getData("text/plain"),l),a=je(t);b(t),u(a),null==d||d(a)}),[d,c,l]),C=i((e=>{8===e.keyCode||"Backspace"===e.key?(e.preventDefault(),w(),y()):46===e.keyCode||"Delete"===e.key?(e.preventDefault(),w()):37===e.keyCode||"ArrowLeft"===e.key?(e.preventDefault(),y()):39===e.keyCode||"ArrowRight"===e.key?(e.preventDefault(),x()):32!==e.keyCode&&" "!==e.key&&"Spacebar"!==e.key&&"Space"!==e.key||e.preventDefault()}),[w,x,y]);return s(n,(()=>g.current[0]),[]),r((()=>{b((()=>He(m,l))),u(m)}),[l,m]),t.createElement(H,{justify:"center",columnGap:8,className:Me(ke,"otpContainer")},E.map(((e,a)=>t.createElement(Se,{ref:e=>{g.current[a]=e},key:""+a,value:e,type:c,onChange:M,onFocus:j,onKeyDown:C,onPaste:k,onBlur:p}))))})),$e=t=>e.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 8 5",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},t),e.createElement("path",{d:"M4 5L0.535898 0.5L7.4641 0.5L4 5Z"})),Pe=t=>e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",id:"flag-icons-kh",viewBox:"0 0 640 480",width:"1em",height:"1em"},t),e.createElement("path",{fill:"#032ea1",d:"M0 0h640v480H0z"}),e.createElement("path",{fill:"#e00025",d:"M0 120h640v240H0z"}),e.createElement("g",{fill:"#fff",stroke:"#000",transform:"matrix(1.2 0 0 1.2 85.6 -522)"},e.createElement("g",{strokeLinejoin:"bevel"},e.createElement("path",{d:"M139 623.5h113.8v43.8H139z"}),e.createElement("path",{d:"M247 647.6h3.5v16.5H247zm-108-8.1h113.8v5H139zm0-7h113.8v4.6H139z"}),e.createElement("path",{strokeWidth:.9,d:"M139 625.7h113.8v4.3H139z"}),e.createElement("path",{d:"M169 647.6h3.6v16.5H169zm49 0h3.6v16.5H218zm-78 0h3.5v16.5H140zm7 0h3.5v16.5H147zm7.5 0h3.5v16.5h-3.5zm7.5 0h3.5v16.5H162zm62.8 0h3.6v16.5h-3.6zm7.5 0h3.6v16.5h-3.6zm7.5 0h3.6v16.5h-3.6z"}),e.createElement("path",{strokeLinejoin:"miter",d:"M94.5 669.5a9.3 9.3 0 0 0 4.4-5.3H292a9.3 9.3 0 0 0 4.4 5.3z"})),e.createElement("path",{d:"M193 556.8s-.1-4.1 2.3-4.2c2.3 0 2.2 4.2 2.2 4.2zm-12.5 54.5v-5.5c0-2.8-2.8-3-2.8-5 0 0-.4-3 .4-4.4 1.1 4 3 3.3 3 1.6 0-1.4-1-2.8-3.3-6.3-.8-1.1-.3-4.6.7-5.9.4 3 .9 4.5 2.2 4.5.8 0 1.4-.5 1.4-2 0-2-1.3-3-2-4.8a5 5 0 0 1 1.1-5.3c.5 3 .4 4.2 1.7 4.2 2.7-.9 0-4.8-.6-5.8-.6-1.1 1-3.4 1-3.4.8 2.7 1 2.9 2 2.6 1.2-.3 1-2-.4-3.4-.9-1-.8-2.3.2-3.3 1 1.9 2.2 1.8 2.3.6l-.8-4.4H204l-.9 4.3c-.2 1.2 1.4 1.5 2.4-.5 1 1 1.1 2.4.2 3.3-1.4 1.4-1.6 3.1-.4 3.4 1 .3 1.2 0 2-2.6 0 0 1.5 1.5 1 3.4-.6 1-3.3 5-.6 5.8 1.3 0 1.2-1.2 1.7-4.2a5 5 0 0 1 1 5.3c-.6 1.8-2 2.8-2 4.8 0 1.5.7 2 1.5 2 1.3 0 1.8-1.4 2.2-4.5 1 1.3 1.5 4.8.7 6-2.3 3.4-3.4 4.8-3.4 6.2 0 1.7 2 2.4 3-1.6.9 1.4.5 4.4.5 4.4 0 2-2.7 2.2-2.8 5v5.5zm7.2-46-.4-3.1h15.9l-.4 3.1zm1-3.2-.2-2.5H202l-.3 2.5zm2.3-2.6-.3-2.6h9l-.1 2.6zm33 110c-2-.7-5-2.9-5-5v-24.3l2.6-3.4H169l2.5 3.4v24.3c0 2.1-2 4.3-4 5z"}),e.createElement("path",{strokeLinejoin:"bevel",d:"M178.2 647.6h3.6v16.5h-3.6zm30.4 0h3.6v16.5h-3.6z"}),e.createElement("path",{d:"M168 609.2v27.6h54v-27.6a4.2 4.2 0 0 0-2.6 2.8v11.8h-48.7V612s-.6-2-2.8-2.8z"}),e.createElement("path",{d:"M214.6 669.5c-1.8-.7-5.6-2.9-5.6-5v-27.2c.4-1.5 2.4-2.4 3.7-3.4H177c1.7 1 3.6 1.7 4.3 3.4v27.2c0 2.1-3 4.3-4.8 5z"}),e.createElement("path",{d:"M219.4 634.2v-19.6h-4.9v-1.9h-38.8v2h-5v19.5zM207 669.5c-1.8-.7-4.3-2.9-4.3-5v-23.2l1.4-2.1h-17.7l1.5 2v23.3c0 2.1-2.6 4.3-4.3 5z"}),e.createElement("path",{d:"M190.7 639.2h9v30.3h-9z"}),e.createElement("path",{strokeLinejoin:"bevel",d:"M204.4 632.5c0-2 5.8-2.1 8.8-3.8h-36c3 1.7 8.7 1.8 8.7 3.8l1.2 3.9 15 .6z"}),e.createElement("path",{d:"M211.4 611.3c0-4.9.2-6.7 1.7-6.7V620c-3.7 1.4-6.3 6-6.3 6h-23.2s-2.6-4.6-6.3-6v-15.5c1.8 0 1.8 2 1.8 6.7zm1.7-2c0-5.6 4.9-6.2 4.9-6.2v5c-1.9-.1-2.8 1.6-2.8 4 0 2.5 1.5 2.5 1.5 2.5v14.2h-3.6z"}),e.createElement("path",{d:"M177.3 609.3c0-5.6-4.9-6.2-4.9-6.2v5c1.9-.1 2.8 1.6 2.8 4 0 2.5-1.5 2.5-1.5 2.5v14.2h3.6z"}),e.createElement("g",{fill:"none",strokeWidth:.8},e.createElement("path",{d:"M186.8 570.6H204m-19.2 5.4h21m-23 6.5h24.9m-27 7.9h29.5m-30.2 9h30.4"}),e.createElement("path",{strokeWidth:1,d:"M170.8 629h48.6m-33.2 0h18v6.6h-18z"})),e.createElement("path",{d:"M184 614.2c3 3.6 2.6 9.7 2.6 13.3H204c0-3.6-.4-9.7 2.6-13.3zm9.7-41-2.4-1.3v-3.5c1 .3 2 .4 2.2 2 .3-2.3 1-2.1 1.9-3 1 .9 1.5.7 1.9 3 0-1.6 1.2-1.7 2.1-2v3.5l-2.3 1.2z"}),e.createElement("path",{d:"m193.5 578.9-4-2.8V573c1.5.3 3 .5 3.2 2.2.4-2.5 1.3-3.7 2.7-4.7 1.3 1 2.2 2.2 2.7 4.7.1-1.7 1.7-1.9 3-2.2v3.2l-3.9 2.7z"}),e.createElement("path",{d:"m193.2 587.8-4.5-4v-4.7c1.6.4 3.4.6 3.6 3.1.5-3.5 1.5-5.4 3-6.8 1.6 1.4 2.6 3.3 3.2 6.8.2-2.5 2-2.7 3.6-3.1v4.7l-4.6 4zm8.4 5.3-4 5.7h-4.7l-4.1-5.7zm-15.2 9.5c2 1.1 2.8 3.4 3 7.6H201c.2-4.2 1-6.5 3-7.6z"}),e.createElement("path",{strokeLinejoin:"bevel",d:"M204.2 593v-5.6a5.2 5.2 0 0 0-3.8 3.3c0-2-2.5-6.3-5.2-8.5-2.7 2.4-5.3 6.4-5.2 8.4-.5-1.5-1.8-2.7-3.8-3.2v5.7z"}),e.createElement("path",{strokeLinejoin:"bevel",d:"M205 602.6V597c-2.1.6-3.5 1.7-4.1 3.3 0-2-2.7-6.3-5.7-8.5-3 2.5-5.8 6.4-5.7 8.5-.5-1.5-2-2.7-4.1-3.3v5.7z"}),e.createElement("path",{strokeLinejoin:"bevel",d:"M207.4 614.3v-6.6a9.6 9.6 0 0 0-5.1 3.8c0-3.5-4-9-7.1-10.7-3.2 1.8-7.1 7.4-7.1 10.7a9.7 9.7 0 0 0-5.2-3.8v6.6z"}),e.createElement("path",{strokeLinejoin:"bevel",d:"M206 629v-6.8c-2.4.9-3 3.1-3.8 4.7.3-6.9-3.8-14.2-7-16.1-3.2 1.9-7.4 9.4-7 16-.8-1.4-1.5-3.7-3.8-4.6v6.7z"}),e.createElement("path",{d:"M204.4 639.2v-6.8c-2.5.6-2.6 1.5-3.4 3 .3-4.1-2.6-8.8-5.8-10.6-3.2 1.8-6 6.5-5.8 10.6-.8-1.5-.9-2.4-3.4-3v6.8z"}),e.createElement("g",{id:"a"},e.createElement("path",{d:"M99 664.2v-20.4c-.7-2.6-3-5-4.6-5.4v-18l3.7 2 4.3 18.9v23z"}),e.createElement("path",{d:"M99 664.3v-20.5c-.7-2.6-3-5-4.6-5.4v-19.2c2.5 0 3.7 3.2 3.7 3.2l4.3 18.9v22.9z"}),e.createElement("path",{d:"M96.3 669.5c1.7-.7 4.2-2.9 4.2-5v-25.6l-1.2-2H143l-1.7 2v25.6a6 6 0 0 0 3.4 5z"}),e.createElement("path",{d:"M135.8 669.5c-1.7-.7-4.2-2.9-4.2-5v-24.3l3.6-3.4h-29.6l3.6 3.4v24.3c0 2.1-2.5 4.3-4.2 5z"}),e.createElement("path",{d:"M131.7 669.5c-1.7-.7-4.3-2.9-4.3-5v-22l2.4-3.3H111l2.4 3.3v22c0 2.1-2.5 4.3-4.3 5z"}),e.createElement("path",{d:"M116 639.2h8.9v30.4h-9z"}),e.createElement("path",{strokeLinejoin:"bevel",d:"M103.7 647.6h3.6v16.5h-3.6zm30.8 0h3.5v16.5h-3.6zm-33.9-27.8h4.4v17h-4.4zm0-3.2h4.3v3.2h-4.3zm35.6 6.9h6.1v13h-6.1z"}),e.createElement("path",{d:"M104.9 636.6v-29c1.2 0 1.4 4.3 4.2 4.3 1.5 0 1.4-1.8.5-3.2-.7-1.3-1.6-3-.4-6.3.9 2.5 3.1 3.3 2.7 1.8-.7-2.7-2.8-3.2-1.2-7.3.5 3.4 2.7 3.3 2.2 1.3-.6-2.3-1.9-3.3-.3-6.5.9 3.7 2 3.5 2 1.2 0-3.4 0-7 4.2-8.3 0 0 .3-3 1.9-3 1.5 0 1.8 3 1.8 3 4.3 1.3 4.2 5 4.2 8.3 0 2.3 1.1 2.5 2-1.2 1.6 3.2.3 4.2-.3 6.5-.5 2 1.7 2.1 2.2-1.3 1.6 4.1-.5 4.6-1.2 7.3-.4 1.5 1.8.7 2.7-1.8 1.2 3.3.3 5-.4 6.3-.8 1.4-1 3.2.5 3.2 2.8 0 3-4.2 4.2-4.2v28.9zM98 614.7v22.1h2.5v-22.1c-.9-.5-1.7-.5-2.5 0z"}),e.createElement("path",{d:"M98.2 629c3.1 1.6 6.2 3.5 7 7.8h-7zm43.2-6.6v14.4h2v-14.4c-.6-.3-1.5-.4-2 0z"}),e.createElement("path",{d:"M143.4 629c-3.1 1.5-6.2 3.3-7 7.7h7zm-20.6-33.7 1.8-1.5v-2c-.6 0-1 .3-1.5 1a5 5 0 0 0-2.5-3 5 5 0 0 0-2.6 2.9c-.5-.7-.8-.8-1.5-1v2l1.8 1.6z"}),e.createElement("path",{d:"m123.8 600.2.8-1.9v-2.5c-.6 0-1 .3-1.5 1a5 5 0 0 0-2.5-3 5 5 0 0 0-2.6 2.9c-.5-.7-.8-.8-1.5-.9v2.5l.8 1.9z"}),e.createElement("path",{d:"m124 606.8 2.6-3.3v-3.2c-1 0-1.5.5-2.2 1.6-.7-2.3-2-2.7-3.8-3.8-1.9 1-3.2 1.5-3.8 3.7-.8-1.1-1.3-1.4-2.3-1.5v3.2l2.7 3.3z"}),e.createElement("path",{d:"M124.7 613.3s3.2-2.7 3.3-4.2v-3.5c-1.2.1-2.3.4-3.2 1.9-.8-2.9-2-3.7-4.2-5-2.3 1.3-3.5 2.1-4.2 5-1-1.5-2-1.8-3.3-2v3.6a15 15 0 0 0 3.3 4.2z"}),e.createElement("path",{d:"M126 625.3s4.4-4.7 4.5-6.6v-5.4c-1.6.2-3.2 1.3-4.4 3.6-1-4.5-2.6-7.6-5.5-9.8-3 2.2-4.6 5.3-5.6 9.8-1.2-2.3-2.7-3.4-4.3-3.6v5.4c.3 1.9 4.4 6.6 4.4 6.6z"}),e.createElement("path",{d:"M126 632.4s3.7-3.7 4.5-5.3v-5.4c-1.6.2-3.2 1.3-4.4 3.5a14 14 0 0 0-5.5-9.2c-3 2.2-4.6 4.7-5.6 9.2-1.2-2.2-2.7-3.3-4.3-3.5v5.4c1 1.6 4.4 5.3 4.4 5.3z"}),e.createElement("path",{d:"M127.5 636.6c-1-4.7-2-8.2-7.1-11.7-5.2 3.5-6.1 7-7.2 11.7z"}),e.createElement("path",{d:"M130.2 639.2v-6.8c-2.4 1-4.5 2.3-5.3 3.8-.8-3.8-2.5-5.4-4.6-7.7-2.1 2.3-3.5 4-4.4 7.7-.8-1.5-2.9-2.9-5.2-3.8v6.8z"})),e.createElement("use",{xlinkHref:"#a",width:"100%",height:"100%",transform:"matrix(-1 0 0 1 390.7 0)"}),e.createElement("path",{d:"M72.7 694.3H318v12.5H72.7zm-6.5 12.5h258.3v12.5H66.2zm19.4-31.3H305v8.1H85.6z"}),e.createElement("path",{d:"M79.2 683.6h232.4v10.6H79.2zm10.2-14.3h212v6.2h-212z"}),e.createElement("path",{d:"M112.4 669.3h16v50h-16z"}),e.createElement("path",{d:"M116 669.3h8.9v50h-9zm71 0h16v50h-16z"}),e.createElement("path",{d:"M190.7 669.3h9v50h-9zm71.5 0h16v50h-16z"}),e.createElement("path",{d:"M265.7 669.3h9v50h-9z"}),e.createElement("path",{fill:"none",d:"M99 664.2h193M115.8 713h9.2m-9.2-6.3h9.2m-9.2-6.2h9.2m-9.2-6.3h9.2m-9.2-6.2h9.2m-9.2-6.3h9.2m-9.2-6.2h9.2m65.8 37.5h8.6m-8.6-6.3h8.6m-8.6-6.2h8.6m-8.6-6.3h8.6m-8.6-6.2h8.6m-8.6-6.3h8.6m-8.6-6.2h8.6m66.2 37.5h9.2m-9.2-6.3h9.2m-9.2-6.2h9.2m-9.2-6.3h9.2m-9.2-6.2h9.2m-9.2-6.3h9.2m-9.2-6.2h9.2"}))),Ie=t=>e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",id:"flag-icons-in",viewBox:"0 0 640 480",width:"1em",height:"1em"},t),e.createElement("path",{fill:"#f93",d:"M0 0h640v160H0z"}),e.createElement("path",{fill:"#fff",d:"M0 160h640v160H0z"}),e.createElement("path",{fill:"#128807",d:"M0 320h640v160H0z"}),e.createElement("g",{transform:"matrix(3.2 0 0 3.2 320 240)"},e.createElement("circle",{r:20,fill:"#008"}),e.createElement("circle",{r:17.5,fill:"#fff"}),e.createElement("circle",{r:3.5,fill:"#008"}),e.createElement("g",{id:"d"},e.createElement("g",{id:"c"},e.createElement("g",{id:"b"},e.createElement("g",{id:"a",fill:"#008"},e.createElement("circle",{r:.9,transform:"rotate(7.5 -8.8 133.5)"}),e.createElement("path",{d:"M0 17.5.6 7 0 2l-.6 5L0 17.5z"})),e.createElement("use",{xlinkHref:"#a",width:"100%",height:"100%",transform:"rotate(15)"})),e.createElement("use",{xlinkHref:"#b",width:"100%",height:"100%",transform:"rotate(30)"})),e.createElement("use",{xlinkHref:"#c",width:"100%",height:"100%",transform:"rotate(60)"})),e.createElement("use",{xlinkHref:"#d",width:"100%",height:"100%",transform:"rotate(120)"}),e.createElement("use",{xlinkHref:"#d",width:"100%",height:"100%",transform:"rotate(-120)"}))),Le=t=>e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",id:"flag-icons-id",viewBox:"0 0 640 480",width:"1em",height:"1em"},t),e.createElement("g",{fillRule:"evenodd",strokeWidth:"1pt"},e.createElement("path",{fill:"#e70011",d:"M0 0h640v249H0z"}),e.createElement("path",{fill:"#fff",d:"M0 240h640v240H0z"}))),Ae=t=>e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",id:"flag-icons-my",viewBox:"0 0 640 480",width:"1em",height:"1em"},t),e.createElement("path",{fill:"#c00",d:"M0 0h640v480H0z"}),e.createElement("path",{fill:"#fff",d:"M.5 39.9h639v38.4H.5zM.5 118.6h639V157H.5zM.5 197.4h639v38.4H.5z"}),e.createElement("path",{fill:"#006",d:"M0 .5h320v280H0Z"}),e.createElement("path",{fill:"#fc0",d:"m207.5 73.8 6 40.7 23-34-12.4 39.2 35.5-20.8-28.1 30 41-3.2-38.3 14.8 38.3 14.8-41-3.2 28.1 30-35.5-20.8 12.3 39.3-23-34.1-6 40.7-5.9-40.7-23 34 12.4-39.2-35.5 20.8 28-30-41 3.2 38.4-14.8-38.3-14.8 41 3.2-28.1-30 35.5 20.8-12.4-39.3 23 34.1zm-33.3 1.7a71.1 71.1 0 1 0 0 130 80 80 0 1 1 0-130z"}),e.createElement("path",{fill:"#fff",d:"M.5 276.2h639v38.4H.5zM.5 354.4h639v38.4H.5zM0 441.6h639V480H0z"})),Be=t=>e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",id:"flag-icons-mm",viewBox:"0 0 640 480",width:"1em",height:"1em"},t),e.createElement("path",{fill:"#fecb00",d:"M0 0h640v480H0z"}),e.createElement("path",{fill:"#34b233",d:"M0 160h640v320H0z"}),e.createElement("path",{fill:"#ea2839",d:"M0 320h640v160H0z"}),e.createElement("g",{transform:"translate(320 256.9) scale(176.87999)"},e.createElement("path",{id:"a",fill:"#fff",d:"m0-1 .3 1h-.6z"}),e.createElement("use",{xlinkHref:"#a",width:"100%",height:"100%",transform:"rotate(-144)"}),e.createElement("use",{xlinkHref:"#a",width:"100%",height:"100%",transform:"rotate(-72)"}),e.createElement("use",{xlinkHref:"#a",width:"100%",height:"100%",transform:"rotate(72)"}),e.createElement("use",{xlinkHref:"#a",width:"100%",height:"100%",transform:"rotate(144)"}))),Ne=t=>e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",id:"flag-icons-ph",viewBox:"0 0 640 480",width:"1em",height:"1em"},t),e.createElement("path",{fill:"#0038a8",d:"M0 0h640v240H0z"}),e.createElement("path",{fill:"#ce1126",d:"M0 240h640v240H0z"}),e.createElement("path",{fill:"#fff",d:"M415.7 240 0 480V0"}),e.createElement("path",{fill:"#fcd116",d:"M26.7 42.4 41 55l16.6-9.2-7.4 17.5 14 13-19-1.6-8.1 17.2-4.3-18.5L14 71l16.3-10zm323.8 172.3.4 19 18 6.3-18 6.2-.4 19-11.5-15.1-18.2 5.5 10.8-15.6-10.8-15.6 18.2 5.5zM37.2 388.1l8 17.2 19-1.6-13.9 13 7.4 17.5-16.6-9.1-14.4 12.4 3.6-18.7L14 409l18.9-2.4zm114.2-249-6.2 6.2 3.1 47-3 .3-5.7-42.9-5.1 5 7.6 38.4a47.5 47.5 0 0 0-17.2 7.1l-21.7-32.4H96l26.4 34.3a48 48 0 0 0-2.4 2l-31.1-35.5h-8.8v8.8l35.4 31-2 2.5-34.3-26.3v7.1l32.5 21.7c-3.4 5.2-5.9 11-7.1 17.2L66.3 223l-5.1 5 42.9 5.7c-.2 1-.3 2.1-.3 3.1l-47-3-6.2 6.2 6.2 6.2 47-3.1.3 3.1-42.9 5.7 5 5 38.4-7.6a47.5 47.5 0 0 0 7.1 17.2l-32.5 21.7v7.2l34.3-26.3a48 48 0 0 0 2 2.4l-35.4 31v8.8H89l31-35.4 2.5 2L96 312.2h7.2l21.7-32.5c5.1 3.4 11 5.9 17.2 7.1l-7.6 38.4 5 5 5.7-42.9c1 .2 2 .3 3.1.3l-3 47 6.1 6.2 6.3-6.2-3.1-47 3-.3 5.7 43 5.1-5.1-7.6-38.4a47.5 47.5 0 0 0 17.2-7.1l21.7 32.5h7.2l-26.4-34.3a48 48 0 0 0 2.4-2l31.1 35.4h8.8v-8.8l-35.4-31 2-2.4 34.3 26.3v-7.2l-32.5-21.7c3.4-5.1 5.9-11 7.1-17.2l38.3 7.6 5.1-5-42.9-5.7c.2-1 .3-2 .3-3.1l47 3 6.2-6.1-6.2-6.2-47 3-.3-3 42.9-5.7-5-5-38.4 7.5a47.5 47.5 0 0 0-7.1-17.2l32.5-21.7v-7.1l-34.3 26.3a48 48 0 0 0-2-2.4l35.4-31v-8.9H214l-31 35.5a48 48 0 0 0-2.5-2l26.4-34.3h-7.2L178 200.2c-5.1-3.4-11-5.9-17.2-7.1l7.6-38.3-5-5-5.7 42.8-3.1-.3 3-47z"})),Te=t=>e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",id:"flag-icons-tw",viewBox:"0 0 640 480",width:"1em",height:"1em"},t),e.createElement("clipPath",{id:"a"},e.createElement("path",{d:"M0 0h640v480H0z"})),e.createElement("g",{clipPath:"url(#a)"},e.createElement("path",{fill:"red",d:"M0 0h720v480H0z"}),e.createElement("path",{fill:"#000095",d:"M0 0h360v240H0z"}),e.createElement("g",{fill:"#fff"},e.createElement("path",{d:"m154 126.9-2.5 9.6 9.4 2.6-1.8-7.1zm46.9 5.1-1.8 7.1 9.4-2.6-2.5-9.6zm-41.8-24-5.1 5.1 1.9 6.9z"}),e.createElement("path",{d:"m155.9 120-1.9 6.9 5.1 5.1z"}),e.createElement("path",{d:"m154 113.1-6.9 6.9 6.9 6.9 1.9-6.9zm14 27.8 5.1 5.1 6.9-1.9zm18.9 5.1 9.6 2.5 2.6-9.4-7.1 1.8z"}),e.createElement("path",{d:"m192 140.9 7.1-1.8 1.8-7.1zm-31.1-1.8 2.6 9.4 9.6-2.5-5.1-5.1zm19.1 5 6.9 1.9 5.1-5.1z"}),e.createElement("path",{d:"m173.1 146 6.9 6.9 6.9-6.9-6.9-1.9zm-12.2-45.1-9.4 2.6 2.5 9.6 5.1-5.1zm-1.8 31.1 1.8 7.1 7.1 1.8zm45-12 1.9-6.9-5.1-5.1z"}),e.createElement("path",{d:"m168 99.1-7.1 1.8-1.8 7.1zm32.9 8.9-1.8-7.1-7.1-1.8zm5.1 18.9 6.9-6.9-6.9-6.9-1.9 6.9z"}),e.createElement("path",{d:"m200.9 108-8.9-8.9-12-3.2-12 3.2-8.9 8.9-3.2 12 3.2 12 8.9 8.9 12 3.2 12-3.2 8.9-8.9 3.2-12z"}),e.createElement("path",{d:"m200.9 132 5.1-5.1-1.9-6.9zm5.1-18.9 2.5-9.6-9.4-2.6 1.8 7.1zm-6.9-12.2-2.6-9.4-9.6 2.5 5.1 5.1zm-26-6.9-9.6-2.5-2.6 9.4 7.1-1.8zm6.9 1.9-6.9-1.9-5.1 5.1z"}),e.createElement("path",{d:"m186.9 94-6.9-6.9-6.9 6.9 6.9 1.9z"}),e.createElement("path",{d:"m192 99.1-5.1-5.1-6.9 1.9zM173.1 146l-9.6 2.5 4.5 16.6 12-12.2zm-5.1 19.1 12 44.9 12-44.9-12-12.2zm-7.1-26-9.4-2.6-4.4 16.4 16.4-4.4z"}),e.createElement("path",{d:"m147.1 152.9-12 45.1 32.9-32.9-4.5-16.6zm-12-20.9L102 165.1l45.1-12.2 4.4-16.4z"}),e.createElement("path",{d:"m154 126.9-6.9-6.9-12 12 16.4 4.5zm0-13.8-2.5-9.6-16.4 4.5 12 12z"}),e.createElement("path",{d:"M135.1 108 90 120l45.1 12 12-12zm90 24-16.6 4.5 4.4 16.4 45.1 12.2z"}),e.createElement("path",{d:"m199.1 139.1-2.6 9.4 16.4 4.4-4.4-16.4zm-12.2 6.9-6.9 6.9 12 12.2 4.5-16.6zm19.1-19.1 2.5 9.6 16.6-4.5-12.2-12z"}),e.createElement("path",{d:"m192 165.1 33.1 32.9-12.2-45.1-16.4-4.4zm7.1-64.2 9.4 2.6 4.4-16.4-16.4 4.4z"}),e.createElement("path",{d:"M225.1 108 258 75.1l-45.1 12-4.4 16.4zm-12.2-20.9L225.1 42 192 75.1l4.5 16.4zm12.2 44.9 44.9-12-44.9-12-12.2 12z"}),e.createElement("path",{d:"m206 113.1 6.9 6.9 12.2-12-16.6-4.5zm-38-38L135.1 42l12 45.1 16.4 4.4z"}),e.createElement("path",{d:"m160.9 100.9 2.6-9.4-16.4-4.4 4.4 16.4z"}),e.createElement("path",{d:"m147.1 87.1-45.1-12 33.1 32.9 16.4-4.5zm39.8 6.9 9.6-2.5-4.5-16.4-12 12z"}),e.createElement("path",{d:"M192 75.1 180 30l-12 45.1 12 12z"}),e.createElement("path",{d:"m173.1 94 6.9-6.9-12-12-4.5 16.4z"})),e.createElement("circle",{cx:180,cy:120,r:51.1,fill:"#000095"}),e.createElement("circle",{cx:180,cy:120,r:45.1,fill:"#fff"}))),De=t=>e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",id:"flag-icons-th",viewBox:"0 0 640 480",width:"1em",height:"1em"},t),e.createElement("g",{fillRule:"evenodd"},e.createElement("path",{fill:"#f4f5f8",d:"M0 0h640v480H0z"}),e.createElement("path",{fill:"#2d2a4a",d:"M0 162.5h640v160H0z"}),e.createElement("path",{fill:"#a51931",d:"M0 0h640v82.5H0zm0 400h640v80H0z"}))),We=t=>e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",id:"flag-icons-vn",viewBox:"0 0 640 480",width:"1em",height:"1em"},t),e.createElement("defs",null,e.createElement("clipPath",{id:"a"},e.createElement("path",{fillOpacity:.7,d:"M-85.3 0h682.6v512H-85.3z"}))),e.createElement("g",{fillRule:"evenodd",clipPath:"url(#a)",transform:"translate(80) scale(.9375)"},e.createElement("path",{fill:"#da251d",d:"M-128 0h768v512h-768z"}),e.createElement("path",{fill:"#ff0",d:"M349.6 381 260 314.3l-89 67.3L204 272l-89-67.7 110.1-1 34.2-109.4L294 203l110.1.1-88.5 68.4 33.9 109.6z"}))),Ve=Object.values(I).reduce(((e,{phoneCountry:t})=>(e.includes(t)||e.push(t),e)),[]),Re={PH:Ne,KH:Pe,ID:Ie,IN:Le,MM:Be,MY:Ae,TH:De,TW:Te,VN:We};var Fe={phoneInput:"i-9Ibox",error:"YDWHh9b"};const Ge=n(((e,n)=>{const{isError:l,defaultCountry:o,countries:i=Ve,countryCallingCodeEditable:s=!1,defaultValue:c,value:m,onChange:h,className:d}=e,p=B(e,["isError","defaultCountry","countries","countryCallingCodeEditable","defaultValue","value","onChange","className"]),[g,v]=a(c||m),[u,f]=a(null);return r((()=>{v(m)}),[m]),r((()=>{N(void 0,void 0,void 0,(function*(){const e=yield import("react-phone-number-input");f(e)}))}),[]),u?t.createElement(u.default,Object.assign({ref:n,value:g,onChange:e=>{v(e),null==h||h(e)},countries:i,defaultCountry:o,countryCallingCodeEditable:s,className:Me(Fe.phoneInput,{isError:l,[Fe.error]:l},d),flagUrl:void 0,flagComponent:e=>{const{country:a,countryName:r,flagUrl:n}=e,l=B(e,["country","countryName","flagUrl"]),o=Re[a],i=a?`(+${u.getCountryCallingCode(a)})`:"";return o?t.createElement(t.Fragment,null,t.createElement(o,Object.assign({title:r},l)),t.createElement("span",{className:Me(Fe.callingCode,"PhoneInputCountryIconCallingCode")},i)):t.createElement(t.Fragment,null)},countrySelectProps:{arrowComponent:()=>t.createElement("div",{className:Me(Fe.arrowSelect,"PhoneInputArrowContainer")},t.createElement($e,null))}},p)):null}));var Ue=m(((e,t)=>({root:{color:t.color||("hb"===e.primaryColor?"hb.6":e.fn.primaryColor())}})));export{U as A,$e as C,ee as D,be as G,Ie as I,Ae as M,ae as N,Oe as O,Ne as P,de as R,he as S,Te as T,We as V,Pe as a,Le as b,Be as c,De as d,oe as e,xe as f,ye as g,G as h,me as i,K as j,Ue as k,R as l,Ge as m,Z as n,X as o,pe as p,Ee as q,we as r,ve as s,q as t,Y as u,J as v,se as w,ce as x,te as y,F as z};
|
package/build/esm/lead.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,a as t}from"./tslib.es6-e5891de7.js";import a,{createContext as l,useState as n,useEffect as o,useMemo as i,useRef as r,useContext as s}from"react";import d from"lodash/debounce";import{createPortal as c}from"react-dom";import{T as m}from"./translationsContext-afbcd08a.js";import{g as u,s as p}from"./cookieHelper-8ff54d02.js";import{b as h,a as g}from"./utils-7125e1e4.js";import{v1 as v}from"uuid";import{u as b}from"./useTranslations-0252ace4.js";import"./index.styled-28ec3a94.js";import{B as y}from"./index-05358d37.js";import{CommonGAssets as f}from"./gAssets.js";import"./index.styled-3b073749.js";import"./index-ef2111b2.js";import{t as k}from"./theme-5e7b10c4.js";import"@mantine/core";import"./index.styled-e94e7231.js";import"string-format";import"./index-baaafb28.js";import{e as _,R as E,v as w,j as C,l as N,N as S}from"./index-c915fcde.js";import T from"dayjs";import"./screenSizeContext-7a09b9a6.js";import"styled-components";import"./index-40ef106d.js";import"./isProduction-f5c96b47.js";import"./Onboarding-67bbb6b4.js";import"./index-f1029275.js";import"@mantine/hooks";import"./index.styled-19fe427f.js";import"date-fns";import"react-day-picker/DayPickerInput";import"./index.styled-7ba08c7b.js";import"./index-b8a7373c.js";import"lodash/throttle";import"keen-slider/react";import"./types-74bfd5de.js";import"react-hook-form";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-0375e1ac.js";import{S as x}from"./index-f900276a.js";import{M as O}from"./index.styled-da1f6fc3.js";import{createFormContext as j}from"@mantine/form";import"yup";import{T as P}from"./index-46ae67bc.js";import{H as B}from"./index-3a18e414.js";import"@mantine/dates";import"@mantine/carousel";import"./index-c644dedc.js";import"./index-bf25487f.js";import"@hookform/resolvers/yup";import"./index-91dd7297.js";import"./useUniqueId-5b433e76.js";import"./index-d39eb350.js";import"./index-4aa230ae.js";import"slugify";import"./routing-0c7cb8d9.js";import"dayjs/plugin/relativeTime";import"./index-dfd4f6fe.js";import"./Visible-556a6913.js";const L={LINKS:1,TAGS:2};let $="https://dev.leadgen.hellobacsi.com/";const I={MOBILE:1,DESKTOP:2};let A="";$.includes("localhost")&&($="https://dev.leadgen.hellobacsi.com/"),location.hostname.includes("marrybaby.vn")&&(A="pink");let U="https://"+location.hostname+location.pathname+location.search;U=U.toLowerCase(),sessionStorage.getItem("insider_object")&&(window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")));const D={"vi-VN":{popupLang:"vi",countryCode:"vn",countryCodeNumber:84},"id-ID":{popupLang:"id",countryCode:"id",countryCodeNumber:62},"th-TH":{popupLang:"th",countryCode:"th",countryCodeNumber:66},"ms-MY":{popupLang:"ms",countryCode:"my",countryCodeNumber:60},"zh-TW":{popupLang:"zh",countryCode:"tw",countryCodeNumber:886},"km-KH":{popupLang:"km",countryCode:"kh",countryCodeNumber:855},"my-MM":{popupLang:"my",countryCode:"mm",countryCodeNumber:95},"hi-IN":{popupLang:"hi",countryCode:"in",countryCodeNumber:91}},M=D[document.documentElement.lang]||D["vi-VN"];const R={1:"Asia/Ho_Chi_Minh",10:"Asia/Ho_Chi_Minh",11:"Asia/Ho_Chi_Minh",12:"Asia/Ho_Chi_Minh",2:"Asia/Jakarta",3:"Asia/Bangkok",4:"Asia/Phnom_Penh",5:"Asia/Kuala_Lumpur",6:"Asia/Taipei",7:"Asia/Yangon",8:"Asia/Kolkata",9:"Asia/Manila"};var H={"validator.required":"This field is required.","validator.remote":"Please fix this field.","validator.email":"Please enter a valid email address.","validator.phone":"Please input correct phone number.","validator.url":"Please enter a valid URL.","validator.date":"Please enter a valid date.","validator.dateISO":"Please enter a valid date (ISO).","validator.number":"Please enter a valid number.","validator.digits":"Please enter only digits.","validator.creditcard":"Please enter a valid credit card number.","validator.equalTo":"Please enter the same value again.","validator.accept":"Please enter a value with a valid extension.","validator.maxlength":"jQuery.validator.format('Please enter no more than {0} characters.","validator.minlength":"jQuery.validator.format('Please enter at least {0} characters.","validator.rangelength":"jQuery.validator.format('Please enter a value between {0} and {1} characters long.","validator.range":"jQuery.validator.format('Please enter a value between {0} and {1}.","validator.max":"jQuery.validator.format('Please enter a value less than or equal to {0}.","validator.min":"jQuery.validator.format('Please enter a value greater than or equal to {0}.","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"};const F={"en-PH":H,"vi-VN":{"validator.required":"Vui lòng điền mục này","validator.email":"Vui lòng điền email có thật.","validator.number":"Vui lòng điền số có thật","validator.digits":"Vui lòng chỉ điền số","validator.maxlength":"Vui lòng điền dưới {0} số","validator.minlength":"Vui lòng điền hơn {0} số","validator.remote":"Hãy sửa cho đúng.","validator.url":"Hãy nhập URL.","validator.date":"Hãy nhập ngày.","validator.dateISO":"Hãy nhập ngày (ISO).","validator.creditcard":"Hãy nhập số thẻ tín dụng.","validator.equalTo":"Hãy nhập thêm lần nữa.","validator.extension":"Phần mở rộng không đúng.","validator.rangelength":"Hãy nhập từ {0} đến {1} kí tự.","validator.range":"Hãy nhập từ {0} đến {1}.","validator.max":"Hãy nhập từ {0} trở xuống.","validator.min":"Hãy nhập từ {0} trở lên.","validator.phone":"Nhập đúng định dạng số điện thoại","validator.emailUsed":"Email này đã được sử dụng cho chiến dịch.","validator.phoneUsed":"Số điện thoại này đã được sử dụng cho chiến dịch.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"hi-IN":{"validator.required":"इस क्षेत्र की आवश्यकता है।","validator.email":"कृपया एक मान्य ईमेल पता दर्ज करें","validator.number":"कृपया एक वैध संख्या दर्ज करें","validator.digits":"कृपया केवल अंक दर्ज करें","validator.maxlength":"कृपया {0} अक्षर से अधिक दर्ज न करें","validator.minlength":"कृपया कम से कम {0} अक्षर दर्ज करें","validator.phone":"कृपया एक वैध संख्या दर्ज करें","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"id-ID":{"validator.required":"Kolom ini wajib diisi","validator.email":"Tolong daftarkan email yang valid","validator.number":"Tolong daftarkan nomor telepon yang valid","validator.digits":"Tolong masukkan angka saja","validator.maxlength":"Jangan memasukkan lebih dari {0} karakter","validator.minlength":"Tolong ketik sedikitnya {0} karakter","validator.phone":"Tolong daftarkan nomor telepon yang valid","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"ms-MY":{"validator.required":"Bahagian ini wajib diisi.","validator.email":"Sila masukkan alamat emel yang sah.","validator.number":"Sila masukkan no telefon yang sah.","validator.digits":"Sila masukkan nombor digit sahaja.","validator.maxlength":"Sila masukkan tidak lebih dari {0} aksara","validator.minlength":"Sila masukkan sekurang-kurangnya {0} aksara","validator.phone":"Sila masukkan no telefon yang sah.","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"my-MM":{"validator.required":"ဒီနေရာမှာ ဖြည့်ဖို့ လိုအပ်ပါတယ်","validator.email":"မှန်ကန်သော အီးမေးလ်လိပ်စာထည့်သွင်းပါ","validator.number":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.digits":"နံပါတ်များသာဖြည့်ပါ","validator.maxlength":"ကျေးဇူးပြု၍ {0} ထပ်မပိုသော ဂဏန်းများသာဖြည့်ပါ","validator.minlength":"ကျေးဇူးပြု၍ အနည်းဆုံး {0} ဂဏန်းဖြည့်ပါ","validator.phone":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"km-KH":{"validator.required":"ព័ត៌មានចាំបាច់ដែលត្រូវបំពេញ","validator.email":"សូមវាយអាសយដ្ឋានអ៊ីម៉ែលឲ្យបានត្រឹមត្រូវ","validator.number":"សូមវាយបញ្ចូលលេខឲ្យបានត្រឹមត្រូវ","validator.digits":"វាយបញ្ចូលបានតែលេខប៉ុណ្ណោះ","validator.maxlength":"សូមវាយបញ្ចូលកុំឲ្យលើស {0} តួអក្សរ","validator.minlength":"សូមវាយបញ្ចូលតិចបំផុត {0} តួអក្ស","validator.phone":"សូមវាយបញ្ចូលលេខឲ្យបានត្រឹមត្រូវ","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"zh-TW":{"validator.required":"此為必填欄位","validator.email":"請填入有效的 email 地址","validator.number":"請填入有效的電話號碼","validator.digits":"此欄位僅能輸入數字","validator.maxlength":"請輸入少於 {0} 位數","validator.minlength":"請輸入至少 {0} 位數","validator.phone":"請填入有效的電話號碼","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"th-TH":{"validator.required":"ต้องระบุข้อมูลในช่องนี้","validator.email":"กรุณาใส่อีเมล์ที่ถูกต้อง","validator.number":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.digits":"กรุณาส่เฉพาะตัวเลข","validator.maxlength":"กรุณาใส่ตัวเลขมากกว่า {0} หลัก","validator.minlength":"กรุณาใส่ตัวเลขอย่างน้อย {0} หลัก","validator.phone":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"tl-PH":H},W=e=>{const t=F[e];return t||F["en-PH"]},V=l({}),q=e=>{const[t,a]=n(16),[l,i]=n(9),[r,s]=n(!1);return o((()=>{if(s(!1),e){const t=new Image;t.addEventListener("load",(()=>{a(t.naturalWidth),i(t.naturalHeight),s(!0)})),t.addEventListener("error",(()=>{a(16),i(9),s(!0)})),t.src=e}else a(16),i(9),s(!0)}),[e]),{loaded:r,width:t,height:l}},Y=({onClose:e,containerClassName:t,svgClassName:l})=>a.createElement("button",{onClick:e,className:`le-newbuilder-close-button js-modal__close ${t||""}`},a.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:l},a.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"white"}),a.createElement("path",{d:"M16 17.05L10.925 22.125C10.7917 22.2584 10.621 22.329 10.413 22.337C10.2044 22.3457 10.025 22.275 9.87502 22.125C9.72502 21.975 9.65002 21.8 9.65002 21.6C9.65002 21.4 9.72502 21.225 9.87502 21.075L14.95 16L9.87502 10.925C9.74169 10.7917 9.67102 10.6207 9.66302 10.412C9.65436 10.204 9.72502 10.025 9.87502 9.87502C10.025 9.72502 10.2 9.65002 10.4 9.65002C10.6 9.65002 10.775 9.72502 10.925 9.87502L16 14.95L21.075 9.87502C21.2084 9.74169 21.3794 9.67069 21.588 9.66202C21.796 9.65402 21.975 9.72502 22.125 9.87502C22.275 10.025 22.35 10.2 22.35 10.4C22.35 10.6 22.275 10.775 22.125 10.925L17.05 16L22.125 21.075C22.2584 21.2084 22.329 21.379 22.337 21.587C22.3457 21.7957 22.275 21.975 22.125 22.125C21.975 22.275 21.8 22.35 21.6 22.35C21.4 22.35 21.225 22.275 21.075 22.125L16 17.05Z",fill:"#595959"}))),J=({popupId:e,url:t,newTab:l,imageDestkop:n,imageMobile:o,onClose:i,onOtherSubmit:r})=>{const{width:s,height:d,loaded:c}=q(o),{width:m,height:u,loaded:p}=q(n);return c&&p?a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"center_tab"},a.createElement("div",{className:"le-center-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{className:"js-popup-other-submit",href:t,target:l?"blank":"_parent",onClick:r},a.createElement("img",{className:"le-only-mobile",src:o,style:{aspectRatio:`${s}/${d}`}}),a.createElement("img",{className:"le-only-desktop",src:n,style:{aspectRatio:`${m}/${u}`}})),a.createElement(Y,{onClose:i,containerClassName:"close-button-top-right"})))):null},z=({popupId:e,url:t,title:l,urlText:n,titleAlign:o,subtitle:i,subtitleAlign:r,newTab:s,imageDesktop:d,imageMobile:c,onClose:m,onOtherSubmit:u})=>{const{width:p,height:h,loaded:g}=q(c),{width:v,height:b,loaded:y}=q(d);return g&&y?a.createElement("div",{id:e,className:"lead-modal-wrapper lead-floating-wrapper","data-popup-url":location.pathname,"data-popup-type":"floating"},a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:"le-floating-desktop"},a.createElement("div",{className:"le-floating-desktop-wrap",style:{position:"relative",background:"#fff"}},d?a.createElement("div",null,a.createElement("img",{style:{maxWidth:120,borderTopLeftRadius:5,borderBottomLeftRadius:5,aspectRatio:`${v}/${b}`},src:d})):null,a.createElement("div",{style:{padding:20}},a.createElement("div",{className:`le-floating-desktop-title le-text-align-${o}`},l),a.createElement("div",{className:`le-floating-desktop-desc le-text-align-${r}`},i)),a.createElement("a",{target:s?"blank":"_parent",style:{marginLeft:35,textDecoration:"none"},href:t},a.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},n)),a.createElement(Y,{onClose:m,containerClassName:"close-button-top-right"})))),a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-floating-mobile"},a.createElement("div",{className:"le-floating-mobile-wrap",style:{position:"relative",background:"#fff"}},a.createElement("aside",{style:{display:"flex",justifyContent:"space-between"}},a.createElement("div",null,a.createElement("div",{className:`le-floating-mobile-title le-text-align-${o}`},l),a.createElement("div",{className:`le-floating-mobile-desc le-text-align-${r}`},i)),c?a.createElement("div",null,a.createElement("img",{style:{marginLeft:15,marginTop:4,maxWidth:100,aspectRatio:`${p}/${h}`},src:c})):null),a.createElement("div",{style:{textAlign:"center",marginTop:10}},a.createElement("a",{target:s?"blank":"_parent",href:t,style:{textDecoration:"none"}},a.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},n))),a.createElement(Y,{onClose:m,containerClassName:"close-button-top-right"}))))):null},K=({title:e,titleAlign:t,subtitle:l,subtitleAlign:n,link:o,linkNewTab:i,linkText:r,image:s})=>{const{width:d,height:c,loaded:m}=q(s);return m?a.createElement("div",{className:"lead-modal__thank-you"},a.createElement("div",{style:{width:"100%"}},a.createElement("img",{src:s,style:{maxHeight:162,objectFit:"cover",aspectRatio:`${d}/${c}`}}),e&&a.createElement("h1",{className:`le-thankyou-title le-text-align-${t}`},e),l&&a.createElement("p",{className:`le-thankyou-subtitle le-text-align-${n}`},l),r&&a.createElement("div",null,a.createElement("a",{href:o,target:i?"_blank":"parrent",rel:"noreferrer"},a.createElement("button",{className:`lead-modal__btn ${A}`},r))))):null};const G=new class{constructor(){this.apiLeadUrl="https://dev.leadgen.hellobacsi.com/",this.apiSubotUrl="https://staging-service-subot.hellohealthgroup.com/"}},Q={call(t){var{url:a,data:l}=t,n=e(t,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${G.apiLeadUrl}${a}`,n).then((e=>e.json())).catch((e=>({})))}},X={call(t){var{url:a,data:l}=t,n=e(t,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${G.apiSubotUrl}${a}`,n).then((e=>e.json())).catch((e=>({})))}},Z=({bot_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),X.call({url:"frontend/api/subot-campaign/check",method:"post",data:{bot_id:e,email:t,phone:l}})},ee=({campaign_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),Q.call({url:"api/subot-campaign/check",method:"post",data:{campaign_id:e,email:t,phone:l}})},te=({phone:e})=>Q.call({url:"api/sms/otp",method:"post",data:{phone_number:e.replace("+","")}}),ae=({phone:e,otp:t})=>Q.call({url:"api/sms/verify",method:"post",data:{otp_code:t,phone_number:e.replace("+","")}}),le={email:{},phone:{}},ne=(e,a,l)=>t(void 0,void 0,void 0,(function*(){const n="email"in l?"email":"phone",o="email"in l?l.email:l.phone,i="email"in l?"validator.emailUsed":"validator.phoneUsed";if(le[n][o]){if(le[n][o].value)return i;if(!le[n][o].value&&le[n][o].expire>Date.now())return""}const r=yield((e,a,l)=>t(void 0,void 0,void 0,(function*(){const t="email"in l?"email":"phone",n="email"in l?l.email:l.phone,o="email"in l?"validator.emailUsed":"validator.phoneUsed",i=yield ee({campaign_id:[e],[t]:n});return"SubmitLeadWithBotId_ERR_001"===i._errorCode||"SubmitLeadWithBotId_ERR_002"===i._errorCode||a.length&&"CheckSuBotLeadTool_ERR_001"===(yield Z({bot_id:a,[t]:n}))._errorCode?o:void 0})))(e,a,l);return le[n][o]=r?{value:!0}:{value:!1,expire:Date.now()+6e4},r})),oe=({content:e,inlinePosition:t})=>{const a=i((()=>{if(!t)return null;const e=document.querySelectorAll(`[data-url="${location.pathname}"] .body-content`),a=Array.from(e).reduce(((e,t)=>[...e,...Array.from(t.children)]),[]);if(null==a?void 0:a.length){const e=a.filter((e=>"P"===e.nodeName)),l=a.filter((e=>"H2"===e.nodeName));let n=null;switch(t){case"1th":n=e[0];break;case"2th":n=e[1];break;case"3th":n=e[2];break;case"4th":n=e[3];break;case"5th":n=e[4];break;case"6th":n=e[5];break;case"7th":n=e[6];break;case"8th":n=e[7];break;case"9th":n=e[8];break;case"10th":n=e[9];break;case"11th":n=e[10];break;case"12th":n=e[11];break;case"lastP":n=e[e.length-1];break;case"1thH2":n=l[0];break;case"2thH2":n=l[1];break;case"3thH2":n=l[2];break;case"4thH2":n=l[3];break;case"5thH2":n=l[4];break;case"6thH2":n=l[5];break;case"7thH2":n=l[6];break;case"8thH2":n=l[7];break;case"9thH2":n=l[8];break;case"10thH2":n=l[9];break;case"lastH2":n=l[l.length-1]}if(n){if(n.parentElement.querySelector(".inline-lead-wrapper"))return n.parentElement.querySelector(".inline-lead-wrapper");{const e=document.createElement("div");return e.classList.add("inline-lead-wrapper"),n.nextElementSibling?n.parentElement.insertBefore(e,n.nextElementSibling):n.parentElement.appendChild(e),e}}}}),[t]);return t&&a?c(e,a):null},ie=({content:e})=>{const t=i((()=>{const e=Array.from(document.querySelectorAll(".hc2-sidebar-with-ads,.page-main-col .right-col.f-right,.hhg-lead-sidebar"));return e.forEach((e=>{if(e.querySelector(".sidebar-lead-modal-wrapper"))return;const t=document.createElement("div");t.classList.add("sidebar-lead-modal-wrapper"),e.prepend(t)})),e.map((e=>e.querySelector(".sidebar-lead-modal-wrapper")))}),[]);return a.createElement(a.Fragment,null,t.map((t=>c(e,h(t,"sidebar-lead-modal-wrapper")))))},[re,se,de]=j(),ce="undefined"==typeof window,me={VN:"vi",ID:"id",TH:"th",MY:"ms",TW:"zh-TW",KH:"km",MM:"my",IN:"hi",PH:"en"},ue=(e="",a="",l="",i=500)=>{const[r,s]=n([]),[d,c]=n(!1);return o((()=>{let n;return e?n=window.setTimeout((()=>t(void 0,void 0,void 0,(function*(){var n;if(e)try{c(!0);const o=yield((e="",a="",l="vi")=>t(void 0,void 0,void 0,(function*(){return new Promise(((t,n)=>{if(!e)return n("Need valid text input");if(ce)return n("Need valid window object");try{(new window.google.maps.places.AutocompleteService).getPlacePredictions(Object.assign(Object.assign({input:e},a?{componentRestrictions:{country:a}}:{}),{language:me[l]}),t)}catch(e){n(e)}}))})))(e,a,l);s(!(n=o)||n.length<1?[]:n.map((e=>({placeId:e.place_id,description:e.description}))))}catch(e){console.error(e)}finally{c(!1)}else s([])}))),i):r.length&&s([]),()=>{window.clearTimeout(n)}}),[e,i,a]),{isLoading:d,predictions:r}},pe=["places"],he=({name:e,placeholder:t,locale:l})=>{var s;const d=se(),[c,m]=n(""),[u,p]=n(""),{predictions:h}=ue(c||"15 Lê","","tl-PH"===l?"en":null===(s=null==l?void 0:l.split("-"))||void 0===s?void 0:s[0]),[g,v]=n(null),[b,y]=n(!1),f=r(Math.random().toString(36).substring(7)),k=i((()=>{const e=h.map((e=>({value:e.description,label:e.description}))),t=e.find((e=>e.value===u));return!u||t?e:[{value:u,label:u}].concat(e)}),[h,u]);return o((()=>{var e,t,a;(null===(a=null===(t=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.maps)||void 0===t?void 0:t.places)||void 0===a?void 0:a.AutocompleteService)?y(!0):import("@react-google-maps/api").then((e=>{v((()=>e.LoadScript)),setTimeout((()=>{y(!0)}),200)}))}),[]),b?a.createElement(a.Fragment,null,g&&a.createElement(g,{googleMapsApiKey:"AIzaSyB9QmhfEYcy2wj5X3Fl38aCD5UkET6n82M",libraries:pe,loadingElement:a.createElement(a.Fragment,null)}),a.createElement("div",{style:{display:"none"},"data-extra":!0,"data-name":e,"data-control":"text"}),a.createElement(x,Object.assign({className:"lead-modal__form-control",label:t,placeholder:t,withAsterisk:!0,name:e,data:k,searchValue:c,onSearchChange:e=>{m(e)},filter:()=>!0,clearable:!0,searchable:!0,onChange:e=>p(e||""),icon:a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M9.99999 9.79167C10.4028 9.79167 10.7467 9.64944 11.0317 9.365C11.3161 9.08 11.4583 8.73611 11.4583 8.33333C11.4583 7.93056 11.3161 7.58667 11.0317 7.30167C10.7467 7.01722 10.4028 6.875 9.99999 6.875C9.59721 6.875 9.25332 7.01722 8.96832 7.30167C8.68388 7.58667 8.54166 7.93056 8.54166 8.33333C8.54166 8.73611 8.68388 9.08 8.96832 9.365C9.25332 9.64944 9.59721 9.79167 9.99999 9.79167ZM9.99999 17.875C9.90277 17.875 9.80555 17.8611 9.70832 17.8333C9.6111 17.8056 9.52082 17.7569 9.43749 17.6875C7.46527 15.8958 5.98971 14.2361 5.01082 12.7083C4.03138 11.1806 3.54166 9.77778 3.54166 8.5C3.54166 6.48611 4.1911 4.87833 5.48999 3.67667C6.78832 2.47556 8.29166 1.875 9.99999 1.875C11.7083 1.875 13.2119 2.47556 14.5108 3.67667C15.8092 4.87833 16.4583 6.48611 16.4583 8.5C16.4583 9.77778 15.9689 11.1806 14.99 12.7083C14.0105 14.2361 12.5347 15.8958 10.5625 17.6875C10.4792 17.7569 10.3889 17.8056 10.2917 17.8333C10.1944 17.8611 10.0972 17.875 9.99999 17.875Z",fill:"#8C8C8C"})),autoComplete:"no-auto-complete-"+f.current,rightSection:a.createElement(a.Fragment,null)},d.getInputProps(e)))):a.createElement("div",{style:{height:73}})},ge=({children:e,align:t})=>a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(t||"")} ${A}`},e),ve=({children:e,align:t})=>a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(t||"")} ${A}`},e),be=({listBlockAdded:e,popupId:t,locale:l,onClose:n,onOtherSubmit:o})=>{const i=se();return a.createElement(a.Fragment,null,e.map(((e,r)=>{const{name:s="",data:d={}}=e||{},{placeholder:c,value:m,align:u,listQuestion:p,isSendMailChimp:h=!1,newtab:g,url:v}=d;switch(s){case"TitleBlock":return a.createElement(ve,{key:r,align:u},m);case"SubtitleBlock":return a.createElement(ge,{key:r,align:u},m);case"TextBlock":return a.createElement(_,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"text",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"text",name:m},i.getInputProps(m)));case"NumberBlock":return a.createElement(S,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"number",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"number",name:m},i.getInputProps(m)));case"EmailBlock":return a.createElement(_,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"email",name:m},i.getInputProps(m)));case"PhoneOtpBlock":case"PhoneBlock":{const e=t+"-"+m+"-"+r;return a.createElement(_.Wrapper,Object.assign({size:"md",withAsterisk:!0,key:r,label:c,className:"lead-modal__form-control",labelProps:{htmlFor:e}},i.getInputProps(m)),a.createElement(N,{name:m,spellCheck:!1,type:"tel",placeholder:c,onChange:e=>{i.setFieldValue(m,e)},id:e,defaultCountry:l&&O[l]||"VN","data-control":"tel"}))}case"LocationBlock":return a.createElement(he,{key:r,name:m,placeholder:c,locale:l});case"DateBlock":return a.createElement(C,Object.assign({withAsterisk:!0,key:r,type:"date",name:m,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"date"},i.getInputProps(m)));case"LinkButtonBlock":return a.createElement("div",{key:r},a.createElement("a",{target:g?"blank":"parrent",href:v,style:{textDecoration:"none"}},a.createElement(y,{type:"button",size:"md",className:`lead-modal__btn ${A}`,onClick:()=>{null==n||n(),null==o||o()}},m)));case"CheckboxBlock":return a.createElement(a.Fragment,null,h&&a.createElement("div",{style:{display:"none"},"data-name":m+"-mailchimp"}),a.createElement(w.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md"},i.getInputProps(m)),p.map(((e,t)=>a.createElement(w,{name:m,key:t,value:e.value,label:e.placeholder,"data-control":"checkbox"})))));case"RadioBlock":return a.createElement(a.Fragment,null,h&&a.createElement(_,{type:"hidden",name:m+"-mailchimp",value:h}),a.createElement(E.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md"},i.getInputProps(m)),p.map(((e,t)=>a.createElement(E,{name:m,key:t,value:e.value,label:e.placeholder,"data-control":"radio"})))));case"DropdownBlock":return a.createElement(a.Fragment,null,a.createElement("div",{style:{display:"none"},"data-extra":!0,"data-name":m,"data-control":"dropdown"}),a.createElement(x,Object.assign({key:r,className:"lead-modal__form-control",label:c,withAsterisk:!0,name:m,data:p.map((e=>({value:e.value,label:e.placeholder})))},i.getInputProps(m))))}return null})))},ye=({phone:e,onSuccess:l,autoSendWhenOpen:i})=>{const{t:s}=b(),[d,c]=n(""),[m,u]=n(!1),[p,h]=n(0),g=r(null),[v,f]=n(),[E,w]=n(""),C=r();o((()=>{t(void 0,void 0,void 0,(function*(){var t;if(!C.current){const e=yield import("react-phone-number-input");C.current=e.formatPhoneNumberIntl}w((null===(t=C.current)||void 0===t?void 0:t.call(C,e))||e)}))}),[e]);const N=()=>t(void 0,void 0,void 0,(function*(){var t;if(!e)return;const a=yield te({phone:e}),n=null===(t=null==a?void 0:a._messages)||void 0===t?void 0:t[0];"Send sms successfully"===n?(h(60),setTimeout((()=>{g.current&&(g.current.focus(),g.current.scrollIntoView({block:"center"}))}),100)):"This phone number was verified"===n?l():f(n||"something Wrong")}));return o((()=>{setTimeout((()=>{p>0&&h((e=>e-1))}),1e3)}),[p]),o((()=>{i&&!p&&N()}),[]),a.createElement(a.Fragment,null,a.createElement("form",{onSubmit:a=>{a.preventDefault(),t(void 0,void 0,void 0,(function*(){if(!e||!d)return;const t=yield ae({phone:e,otp:d}),a=null==t?void 0:t._messages[0];"Verify successfully"===a||"This phone number was verified"===a?l():f(a||"something Wrong")}))},className:"lead-phone-otp-form"},a.createElement(B,{tag:"h3",fontWeight:"bold",style:{marginBottom:4}},s("lead.otp.title")),a.createElement(P,{size:"p1",color:k.colors.gray600},s("lead.otp.desc",{phone:E})),a.createElement(_,{ref:g,name:"_"+name+"-otp",spellCheck:!1,type:"number",placeholder:"Enter OTP",className:"lead-modal__form-control",label:"Phone OTP","data-control":"otp",withAsterisk:!0,pattern:"[0-9]*",value:d,onChange:e=>{u(!0),c(e),f(m&&!e?"OTP is required":void 0)},error:m?v:void 0}),a.createElement(y,{size:"md",color:"primary",className:`lead-modal__btn ${A}`,disabled:!d},s("lead.otp.verify")),a.createElement(y,{type:"button",size:"md",color:"transparent",className:`lead-modal__btn lead-phone-otp-button ${A}`,onClick:()=>{N()},disabled:!!p},s("lead.otp.resend",{timer:p?` (${p}s)`:""}))))},fe=({popupId:e,extraFields:t,onClose:l,onOtherSubmit:s,imageMobile:d,imageDesktop:c,imageOverlayMobile:m,imageOverlayDesktop:u,imageBackground:p,currentLayout:h,title:g,onSubmit:v,showThankyou:k,campaignId:_,campaign_subot_id:E,locale:w})=>{var C,N,S;const T=JSON.parse(t.listBlockAdded),x=JSON.parse(t.actionBlocks),O=JSON.parse(t.textBlocks),j=x.submitBlock.data.url,P=x.submitBlock.data.text,B=x.submitBlock.data.text2,L=x.submitBlock.data.value,$=location.pathname,I=h.includes("Inline")||"Sidebar"===h,U="Slider"===h,[D,R]=n(!0),[H,F]=n(""),W=r(),V=()=>{H?F(""):null==l||l()};if(window.innerWidth<769&&["Fullscreen","Slider"].includes(h))return console.log("😎 Not show fullscreen, slider on mobile "),null;o((()=>{(h.includes("LightBox")||"Fullscreen"==h)&&document.body.classList.add("noscroll"),window.intlTelInputUtils||require("intl-tel-input/build/js/utils"),le.email={},le.phone={}}),[]);const J=r(!1),z=r(!1),{form:G,validateObj:Q}=(({listBlockAdded:e=[],validatingPhoneRef:t,validatingEmailRef:a,campaignId:l,campaign_subot_id:n=[]})=>{const{t:o}=b(),s=i((()=>{const i=["TextBlock","NumberBlock","EmailBlock","PhoneBlock","DateBlock","CheckboxBlock","RadioBlock","DropdownBlock","PhoneOtpBlock","LocationBlock"],r=(e,t)=>a=>{if(c.current.isTouched(e))return void 0===a||""===a||Array.isArray(a)&&0===a.length?o("validator.required"):null==t?void 0:t(a)};return e.filter((e=>i.includes(e.name))).reduce(((e,i)=>"NumberBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(isNaN(Number(e)))return o("validator.number")}))}):"EmailBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e))return o("validator.email");a.current=!0,setTimeout((()=>{c.current.setFieldError(i.data.value,"Validating..."),ne(l,n,{email:e}).then((e=>{e?c.current.setFieldError(i.data.value,o(e)):c.current.clearFieldError(i.data.value),a.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(i.data.value,e.message||"Something went wrong"),a.current=!1}))}),200)}))}):"PhoneBlock"===i.name||"PhoneOtpBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(window.intlTelInputUtils&&!window.intlTelInputUtils.isValidNumber(String(e),M.countryCode))return o("validator.phone");t.current=!0,setTimeout((()=>{c.current.setFieldError(i.data.value,"Validating..."),ne(l,n,{phone:e}).then((e=>{e?c.current.setFieldError(i.data.value,o(e)):c.current.clearFieldError(i.data.value),t.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(i.data.value,e.message||"Something went wrong"),t.current=!1}))}),200)}))}):"DateBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(isNaN(Date.parse(e)))return o("validator.date")}))}):Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value)})),{})}),[e.map((e=>e.name)).join(",")]),d=de({validateInputOnChange:!0,clearInputErrorOnChange:!0,validate:s}),c=r(d);return c.current=d,{form:d,validateObj:s}})({listBlockAdded:T,validatingPhoneRef:J,validatingEmailRef:z,campaignId:_,campaign_subot_id:E}),{width:X,height:Z,loaded:ee}=q(p),{width:te,height:ae,loaded:se}=q(d),{width:ce,height:me,loaded:ue}=q(c),pe=se&&ue&&("Fullscreen"!=h||ee),he=a.createElement(a.Fragment,null,a.createElement("style",{dangerouslySetInnerHTML:{__html:`\n .le-newbuilder-overlay {\n background-repeat: no-repeat;\n background-size: cover;\n }\n ${m?`\n .le-newbuilder-overlay {\n background: url(${m}) ;\n }`:""}\n ${u?`\n @media screen and (min-width:768px) {\n .le-newbuilder-overlay {\n background: url(${u}) ;\n }\n }`:""}`}}),a.createElement("div",{id:e,"data-popup-url":$,"data-popup-type":"lightbox-inline",className:`lead-modal lead-modal-wrapper modal--animate-scale ${I?"le-buider-inline":""} ${U?"le-buider-slider":""}`},"Fullscreen"==h?a.createElement("img",{className:"le-only-desktop le-fullscreen-img",draggable:!1,src:p||"",style:{aspectRatio:`${X}/${Z}`}}):null,a.createElement("div",{className:`lead-modal__wrapper le-newbuilder-wrap-${h}`},a.createElement("div",{className:`lead-modal__content le-newbuilder-${h}`},k?a.createElement(K,{title:k.title,titleAlign:k.titleAlign,subtitle:k.subtitle,subtitleAlign:k.subtitleAlign,link:k.link,linkNewTab:k.linkNewTab,linkText:k.linkText,image:k.image}):a.createElement(a.Fragment,null,a.createElement("header",{className:"lead-modal__header"},H?a.createElement("img",{src:f.getAssetPath("lead-otp-thumb.png"),draggable:"false",alt:"",style:{width:"100%"}}):a.createElement(a.Fragment,null,["LightBoxA","InlineA","Sidebar","Slider"].includes(h)?d?a.createElement("img",{draggable:"false",className:"lead-modal__image lead-modal-image-cover",src:d,style:{aspectRatio:`${te}/${ae}`},alt:""}):null:a.createElement(a.Fragment,null,c?a.createElement("img",{draggable:"false",className:"le-only-desktop lead-modal__image lead-modal-image-cover",style:{height:"100%",objectFit:"cover",aspectRatio:`${ce}/${me}`},src:c,alt:""}):null,d?a.createElement("img",{draggable:"false",className:"le-only-mobile lead-modal__image lead-modal-image-cover",src:d,alt:"",style:{aspectRatio:`${te}/${ae}`}}):null))),H&&a.createElement(ye,{phone:H,autoSendWhenOpen:!0,onSuccess:()=>{null==v||v(W.current,G.values)}}),a.createElement("div",{"data-hidden":!!H,className:"lead-modal__body le-newbuilder-overlay"},a.createElement(re,{form:G},a.createElement("form",{ref:W,className:`lead-modal__form ${e}`,onSubmit:e=>{e.preventDefault(),G.setTouched(Object.keys(Q).reduce(((e,t)=>(e[t]=!0,e)),{})),z.current||J.current||setTimeout((()=>{G.onSubmit((e=>{var t,a,l;if(!Object.keys(G.errors).length){if(T.findIndex((e=>"PhoneOtpBlock"===e.name))>-1){const n=null===(a=null===(t=T.find((e=>"PhoneOtpBlock"===e.name)))||void 0===t?void 0:t.data)||void 0===a?void 0:a.value;if(null===(l=e[n])||void 0===l?void 0:l.startsWith("+84"))return void F(e[n])}null==v||v(W.current,e)}}))(e)}),100)}},a.createElement("div",{style:{marginBottom:20}},a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(null===(C=O.titleBlock.data)||void 0===C?void 0:C.align)} ${A}`},g),a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(null===(N=O.titleBlock.data)||void 0===N?void 0:N.align)} ${A}`},O.subtitleBlock.data.value)),a.createElement("div",{className:"lead-modal__form-control-wrapper"},a.createElement(be,{listBlockAdded:T,popupId:e,locale:w,onClose:V,onOtherSubmit:s})),(null===(S=null==x?void 0:x.submitBlock)||void 0===S?void 0:S.isHide)?null:a.createElement(a.Fragment,null,a.createElement("div",{className:`lead-modal__checkbox-wrapper ${A}`},a.createElement("div",{className:"lead-modal__checkbox"},a.createElement("input",{id:"lead-term-checkbox",className:`lead-modal__checkbox__input ${A}`,type:"checkbox","aria-label":"Checkbox label",checked:D,onChange:e=>R(e.currentTarget.checked)}),a.createElement("div",{className:"lead-modal__checkbox__control","aria-hidden":"true"})),a.createElement("label",{htmlFor:"checkbox",className:"lead-modal__checkbox__label"},P," ",a.createElement("span",{style:{fontWeight:"bold"}},a.createElement("a",{target:"blank",href:j||"https://hellobacsi.com/chinh-sach",rel:"noopener noreferrer",style:{textDecoration:"none"}},B)))),a.createElement(y,{size:"md",id:"lead-submit",type:"submit",className:`lead-modal__btn ${A}`,disabled:!D},L))))))),!h.includes("Inline")&&a.createElement(Y,{onClose:V,containerClassName:"close-button-top-right"}))));return pe?h.includes("LightBox")||"Fullscreen"==h||"Slider"==h?he:"Sidebar"==h?a.createElement(ie,{content:he}):h.includes("Inline")?a.createElement(oe,{content:he,inlinePosition:t.popupInlinePosition}):null:null},ke=({popupId:e,link:t,linkText:l,linkNewTab:n,onClose:o,imageMobile:i,imageDesktop:r,currentLayout:s,onOtherSubmit:d})=>{const c=location.pathname,{width:m,height:u,loaded:p}=q(i),{width:h,height:g,loaded:v}=q(r);return p&&v?a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":c,"data-popup-type":"skin_ab"},"SkinA"==s?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:"le-skin-a-desktop"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:r,style:{aspectRatio:`${h}/${g}`}}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn js-popup-other-submit"},l)),a.createElement(Y,{onClose:o,containerClassName:"close-button-top-right"})))):"SkinB"==s?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:""},a.createElement("div",{style:{position:"relative",zIndex:1e4}},a.createElement("img",{src:r,style:{width:"100%",aspectRatio:`${h}/${g}`}}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"100%"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(Y,{containerClassName:"close-button-top-right",onClose:o})))):null,a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-skin-mobile"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:i,style:{width:"100%",aspectRatio:`${m}/${u}`}}),a.createElement("a",{style:{position:"absolute",top:"82%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",maxWidth:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(Y,{containerClassName:"close-button-top-right",svgClassName:"le-mobile-btn",onClose:o}))))):null},_e=({popupId:e,url:t,newTab:l,image:n,onClose:o,onOtherSubmit:i})=>{const{width:r,height:s,loaded:d}=q(n);return d?a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"tab"},a.createElement("div",{className:"le-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{href:t,target:l?"blank":"_parent",onClick:i},a.createElement("img",{className:"js-popup-other-submit",src:n,style:{aspectRatio:`${r}/${s}`}})),a.createElement(Y,{onClose:o,containerClassName:"close-button-top-right"})))):null},Ee=[],we=[],Ce=[];const Ne=e=>{const t=[...e];for(let e=t.length-1;e>0;e--){const a=Math.floor(Math.random()*(e+1)),l=t[e];t[e]=t[a],t[a]=l}return t},Se=(e="UTC")=>{const t=new Date;return new Date(t.toLocaleString("en-US",{timeZone:e}))},Te=e=>{try{const[t,a]=e.split(" "),[l,n,o]=t.split("-").map(Number),[i,r,s]=a.split(":").map(Number);return new Date(l,n-1,o,i,r,s)}catch(e){return null}};const xe=e=>1===e.formatted_status?function(e){var t;if(1===e.forever)return!0;const a=e.started_at,l=e.ended_at,n=Te(a),o=Te(l);if(!n||!o)return!0;const i=(null===(t=e.site)||void 0===t?void 0:t.id)||1,r=R[i];return!(Se(r).getTime()>o.getTime()&&(Ce.push(e),1))}(e):0===e.formatted_status&&(Ee.push(e),(e=>{var t;const a=(null===(t=e.site)||void 0===t?void 0:t.id)||1,l=e.started_at,n=e.ended_at,o=Te(l),i=Te(n);if(!o||!i)return!1;const r=R[a],s=Se(r).getTime();return s<=i.getTime()&&s>=o.getTime()&&(we.push(e),!0)})(e));let Oe=null;function je({leadApi:e,leadSiteId:t,leadDomain:a,onShowPopup:l,DEBUG_URL:n}){const o=n||("https://"+location.hostname+location.pathname+location.search).toLowerCase();fetch(e+"api/campaign/"+t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:o,ga_client_id:u("_ga")||null})}).then((e=>e.json())).then((e=>{var t,n,i,r,s;if(Pe("List campagin: ",e),U="https://"+location.hostname+location.pathname+location.search,1==e._status){const d=(null===(n=null===(t=e._data)||void 0===t?void 0:t.campaigns)||void 0===n?void 0:n.filter(xe))||[];u("hhg-id")||(p("hhg-id",v(),{domain:"."+a,path:"/"}),Pe("😍 Set HHG ID cookie"));let c=[];c=/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)?d.filter((e=>e.device_types.some((e=>e.id==I.MOBILE)))):d.filter((e=>e.device_types.some((e=>e.id==I.DESKTOP)))),Pe("👓 campaignsDevice",c),Pe("--listCampaignScheduled",Ee),Pe("--listCampaignScheduledToActivated",we),Pe("--listCampaignActiveButExpired",Ce);let m=c.map(((e,t)=>e.targets.filter((e=>e.type==L.LINKS)).map((e=>Object.assign(Object.assign({},e),{campaignIndex:t}))))).flat(1);m=m.filter((e=>{const t=new URL(String(e.target).toLowerCase());if("exact_match"==e.option)return Boolean(o===t.href);if("start_with"==e.option){if(o.includes(String(e.target))){return!e.sub_target.filter((e=>"excluding"==e.option)).map((e=>e.value)).includes(o.split("?")[0])}return!1}}));const h=Array.from(document.getElementsByTagName("META")).filter((e=>"article:tag"==e.getAttribute("property"))).map((e=>e.content));let g=[],b=[];h&&h.length&&(g=c.map(((e,t)=>e.targets.filter((e=>e.type==L.TAGS)).map((e=>Object.assign(Object.assign({},e),{campaignIndex:t}))))).flat(1),b=g.filter((e=>h.includes(e.target))));const y=[...m,...b],f=document.cookie.split("; ").map((e=>e.split("=")[0])),k=f.filter((e=>e.includes("lead_submited")));Pe("--listCampaignCodeSubmited",k);const _=f.filter((e=>e.includes("lead_closed")));Pe("--listCampaignCodeClosed",_);const E=[...k,..._],w=y.filter((e=>!E.some((t=>t.includes(c[e.campaignIndex].code))))),C=Ne(w);if(Pe("--listCampaignValid : ",C),C&&C.length){const e=c[C[0].campaignIndex];Pe("CAMPAIGN_SHOW",e);const{rules:t}=e,a=Number(null===(i=t.find((e=>"time"==e.rule)))||void 0===i?void 0:i.value);Pe("timeoutRule",a);const n=Number(null===(r=t.find((e=>"scroll"==e.rule)))||void 0===r?void 0:r.value);Pe("scrollRule",n);const o=Number(null===(s=t.find((e=>"exclude_sponsored"==e.rule)))||void 0===s?void 0:s.value);Pe("excludeSponsored",o);const d=Boolean(document.querySelector(".hhg-disclaimer-text"));if(Pe("💎 LEAD current page isSponsored",d),d&&o)return;let m="TIME";if(Number.isInteger(a)&&(m="TIME",Pe("✨ SHOW AWESOME POPUP AFTER: ",a," seconds"),Oe&&clearTimeout(Oe),Oe=setTimeout((()=>{null==l||l(e,m)}),1e3*a)),Number.isInteger(n)){m="SCROLL",Pe("✨ SHOW AWESOME AFTER: SCROLL",n," %");const t=document.querySelector(`[data-url="${location.pathname}"]`)||document.querySelector("body"),a=t.getBoundingClientRect().top,o=t.offsetHeight;Pe("👓 Element check scroll: ",t);const i=function(){const t=window.pageYOffset||document.documentElement.scrollTop;let r=0;t>=a&&(r=Math.round((t-a)/(o-innerHeight)*100)),Pe("---Scroll",r,n),r>=n&&(window.removeEventListener("scroll",i),null==l||l(e,m))};window.addEventListener("scroll",i,{passive:!0})}}else Pe("🚧 No lead campaigns on current URL, tags")}})).catch((e=>{Pe("Lead error: ",e)}))}const Pe=(...e)=>{("production"!==process.env.NODE_ENV||process.env.NEXT_PUBLIC_DEPLOY_ENV&&"production"!==process.env.NEXT_PUBLIC_DEPLOY_ENV||"undefined"!=typeof localStorage&&"true"===localStorage.getItem("hhg_debug"))&&console.log(...e)};const Be=({campaign:e,action:t,onSubmit:l,onClose:n,showThankyou:i,locale:d})=>{var c,m;b();const{apiUrl:h,siteDomain:g}=s(V);o((()=>{const e=u("_ga")||null;fetch(`${h}api/campaign/${_}/impression`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:t,url:location.href.toLowerCase(),title_article:document.title,cookie_id:u("hhg-id"),ga_client_id:e})})}),[]);const{extra_fields:y,image:f,image_desktop:k,code:_,image_background:E,image_overlay_mobile:w,image_overlay_desktop:C}=e,{currentLayout:N}=y,S=y.imageBlocks?JSON.parse(y.imageBlocks):{},T=JSON.parse(y.actionBlocks),x=JSON.parse(y.textBlocks);let O=(null===(m=null===(c=null==x?void 0:x.titleBlock)||void 0===c?void 0:c.data)||void 0===m?void 0:m.value)||"";const j={1:{},2:{},3:{}},P=r("lead-modal-"+v()),B=function(e="Xin chao {{category_2}} extra"){if(e.includes("{{category_")){const t="{{category_".length,a=e.search("{{category_");return+e.charAt(t+a)}return null}(O);if(B){Pe("⚡️ Has categoryLevel",B);const e=Array.from(document.getElementsByTagName("META")),t=e.find((e=>e.name===`content_category_${B}`)),a=e.find((e=>e.name===`content_category_en_${B}`));if(!t||!a)return Pe("⚡️ No META TAG for categoryLevel, not show popup",B),null;j[B]={value:t.content,value_en:a.content},O=O.replace(`{{category_${B}}}`,t.content),Pe("⚡️ Set categoryData ",B)}else Pe("⚡️ No categoryLevel",B);const L=()=>{var t,a,l,o;if(Pe("👌 Other submit click"),document.body.classList.remove("noscroll"),N.includes("Skin")){const e=document.querySelector("#masthead");e&&(e.style.top="0px !important;")}const i=Number(null!==(a=null===(t=e.rules.find((e=>"days_to_show_again"==e.rule)))||void 0===t?void 0:t.value)&&void 0!==a?a:7),r=Number(null!==(o=null===(l=e.rules.find((e=>"show_again_after_submit"==e.rule)))||void 0===l?void 0:l.value)&&void 0!==o?o:0);0===r&&(Pe("⛔ Popup never show again!"),p(`lead_submited_${_}`,`target_${y.popupVersion}`,{domain:"."+g,path:"/"})),1==r&&(Pe(`⌛ Popup will show again after ${i} days!`),p(`lead_submited_${_}`,`target_${y.popupVersion}`,{domain:"."+g,days:i,path:"/"}));const s=u("_ga")||null,d={url:location.href.toLowerCase(),title_article:document.title,meta:[],cookie_id:u("hhg-id"),ga_client_id:s};B&&(d.category=j[B].value_en),fetch(`${h}api/campaign/${_}/lead`,{method:"POST",body:JSON.stringify(d),headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then((e=>e.json())).then((e=>{"error"===e.status&&Pe(e)})).catch((e=>{Pe("Error:",e)})),null==n||n()};return"CenterTab"===N?a.createElement(J,{popupId:P.current,url:S.imageMobile.data.url,newTab:S.imageMobile.data.newtab,imageMobile:f,imageDestkop:k,onClose:n,onOtherSubmit:L}):"Tab"===N?a.createElement(_e,{popupId:P.current,url:S.imageMobile.data.url,newTab:S.imageMobile.data.newtab,image:f,onClose:n,onOtherSubmit:L}):"Floating"===N?a.createElement(z,{popupId:P.current,title:O,titleAlign:x.titleBlock.data.align,subtitle:x.subtitleBlock.data.value,subtitleAlign:x.subtitleBlock.data.align,url:T.linkButtonBlock.data.url,urlText:T.linkButtonBlock.data.value,newTab:T.linkButtonBlock.data.newtab,imageMobile:f,imageDesktop:k,onClose:n,onOtherSubmit:L}):N.includes("LightBox")||N.includes("Inline")||"Fullscreen"==N||"Sidebar"==N||"Slider"==N?a.createElement(fe,{popupId:P.current,extraFields:y,onClose:n,onOtherSubmit:L,imageMobile:f,imageDesktop:k,imageBackground:E,currentLayout:N,title:O,onSubmit:(e,t)=>l(e,t,B,j),key:N,imageOverlayDesktop:C,imageOverlayMobile:w,showThankyou:i,campaignId:e.id,campaign_subot_id:e.bot_id||[],locale:d}):N.includes("Skin")?a.createElement(ke,{popupId:P.current,link:T.linkButtonBlock.data.url,linkNewTab:!!T.linkButtonBlock.data.newtab,linkText:T.linkButtonBlock.data.value,onClose:n,onOtherSubmit:L,imageMobile:f,imageDesktop:k,currentLayout:N}):null},Le=({apiUrl:e,siteDomain:l,siteId:s,locale:h,apiSubotUrl:v,DEBUG_URL:b})=>{var y;const f=r(),k=r(Date.now()),{apiUrl:_}=i((()=>{let t=e;return t.includes("localhost")&&(t="https://dev.leadgen.hellobacsi.com/"),{apiUrl:t}}),[e,l,s]),[E,w]=n(null),[C,N]=n(""),[S,x]=n(null);o((()=>{G.apiLeadUrl=_,G.apiSubotUrl=v}),[_,v]);const O=(e,t)=>{w(e),N(t)},j=()=>{var e,t;if(!E)return;Pe(`👋👋👋 CLOSE POPUP ${E.code} 👋👋👋`);const a=Number(null===(e=E.rules.find((e=>"show_again_after_exit"==e.rule)))||void 0===e?void 0:e.value),n=Number(null===(t=E.rules.find((e=>"days_to_show_again"==e.rule)))||void 0===t?void 0:t.value);0==a&&p(`lead_closed_${E.code}`,`target_${E.extra_fields.popupVersion}`,n?{domain:"."+l,days:n,path:"/"}:{domain:"."+l,path:"/"}),document.body.classList.remove("noscroll"),fetch(`${_}api/campaign/${E.code}/popup_exit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"CLICK",url:location.href.toLowerCase(),title_article:document.title,cookie_id:u("hhg-id"),duration:Math.ceil((Date.now()-k.current)/1e3)})}),w(null),x(null)};o((()=>{if(window.next){const e=d((e=>{Pe("--🌻 routeChangeComplete",e,Date.now());const t=location.pathname;j(),document.querySelectorAll(`[data-popup-url="${t}"]`).length?Pe("🔥 This URL page has show popup!"):(Pe("--Process checkShowPopup"),je({leadApi:_,leadDomain:l,leadSiteId:s,onShowPopup:O,DEBUG_URL:b})),f.current&&window.removeEventListener("scroll",f.current)}),500);window.next.router.events.on("routeChangeComplete",e)}je({leadApi:_,leadDomain:l,leadSiteId:s,onShowPopup:O,DEBUG_URL:b})}),[]);return o((()=>{E&&(k.current=Date.now())}),[E]),a.createElement(V.Provider,{value:{apiUrl:_,siteDomain:l,siteId:s,locale:h}},a.createElement(m.Provider,{value:{locale:h,values:W(h)}},c(a.createElement(a.Fragment,null,"2.1"===(null===(y=null==E?void 0:E.extra_fields)||void 0===y?void 0:y.popupVersion)&&a.createElement(Be,{campaign:E,action:C,onSubmit:(e,a,n,o)=>t(void 0,void 0,void 0,(function*(){var t,i,r,s,d,c,m,h,g,v,b;if(!a)return;Pe("submitHandler",n,o);const y=Object.keys(a).map((e=>({name:e,value:String(a[e])}))),f=u("_ga")||null;window.intlTelInputUtils||(yield require("intl-tel-input/build/js/utils"));const k={url:location.href.toLowerCase(),title_article:document.title,meta:y.map((t=>{var a,l;const n=(null===(a=e.querySelector(`*[name="${t.name}"]`))||void 0===a?void 0:a.getAttribute("data-control"))||(null===(l=e.querySelector(`*[data-extra][data-name="${t.name}"]`))||void 0===l?void 0:l.getAttribute("data-control"))||"text",o="tel"===n?window.intlTelInputUtils.formatNumber(String(t.value),null==M?void 0:M.countryCodeNumber,2).replace(/\s+/g,""):"date"===n?T(t.value).format("YYYY-MM-DD"):t.value;return{key:t.name,value:o,control:n,is_sent_mailchimp:e.querySelector(`div[data-name="${t.name}-mailchimp"]`)?"true":"false"}})),cookie_id:u("hhg-id"),ga_client_id:f};n&&o[n].value_en&&(k.category=o[n].value_en);const w=Number((null===(i=null===(t=E.rules)||void 0===t?void 0:t.find((e=>"days_to_show_again"===e.rule)))||void 0===i?void 0:i.value)||7),C=Number((null===(s=null===(r=E.rules)||void 0===r?void 0:r.find((e=>"show_again_after_submit"===e.rule)))||void 0===s?void 0:s.value)||0);if(0==C&&(Pe("⛔ Popup never show again!"),p(`lead_submited_${E.code}`,`target_${E.extra_fields.targetType}`,{domain:"."+l,path:"/"})),1==C&&(Pe(`⌛ Popup will show again after ${w} days!`),p(`lead_submited_${E.code}`,`target_${E.extra_fields.targetType}`,{domain:"."+l,days:w,path:"/"})),fetch(`${_}api/campaign/${E.code}/lead`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)}),"notshow"==E.extra_fields.popupShowThankYou)return j(),void document.body.classList.remove("noscroll");let N=!0;const S=E.thank_you_image||`${_}admin/img/thanksyou.png`;let O,P,B=E.extra_fields.popupThankyouTitle||"Thank you.",L=E.extra_fields.popupThankyouDesc||"We appreciate your time!",$="",I="",A="";if("2.1"==E.extra_fields.popupVersion){const e=E.extra_fields,t=JSON.parse(e.listBlockThankyou),a=t.find((e=>"TitleBlock"==e.name)),l=t.find((e=>"SubtitleBlock"==e.name)),n=t.find((e=>"LinkButtonBlock"==e.name));B=(null===(d=null==a?void 0:a.data)||void 0===d?void 0:d.value)||"",$=(null===(c=null==a?void 0:a.data)||void 0===c?void 0:c.align)||"",L=(null===(m=null==l?void 0:l.data)||void 0===m?void 0:m.value)||"",I=(null===(h=null==l?void 0:l.data)||void 0===h?void 0:h.align)||"",O=(null===(g=null==n?void 0:n.data)||void 0===g?void 0:g.value)||"",P=(null===(v=null==n?void 0:n.data)||void 0===v?void 0:v.newtab)||!1,A=(null===(b=null==n?void 0:n.data)||void 0===b?void 0:b.url)||"";const o=E.extra_fields.currentLayout;["SkinA","SkinB","Floating","Tab","CenterTab"].includes(o)&&(N=!1)}x(N?{title:B,titleAlign:$,subtitle:L,subtitleAlign:I,link:A,linkNewTab:P,linkText:O,image:S}:null),sessionStorage.getItem("insider_object")?window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")):window.insider_object={user:{email:"",phone_number:"",gdpr_optin:!0,sms_optin:!0,email_optin:!0}},y.map((e=>{const t=e.name,a=e.value;"tel"==t?window.insider_object.user.phone_number=a:"email"==t&&(window.insider_object.user.email=a)})),sessionStorage.setItem("insider_object",JSON.stringify(window.insider_object))})),onClose:j,showThankyou:S,locale:h})),g())))};export{Le as LeadGen};
|
|
1
|
+
import{_ as e,a as t}from"./tslib.es6-1122f43e.js";import a,{createContext as l,useState as n,useEffect as o,useMemo as i,useRef as r,useContext as s}from"react";import d from"lodash/debounce";import{createPortal as c}from"react-dom";import{T as m}from"./translationsContext-09290db2.js";import{g as u,s as p}from"./cookieHelper-65c10ff9.js";import{b as h,a as g}from"./utils-dd45ebd6.js";import{v1 as v}from"uuid";import{u as b}from"./useTranslations-b7d3f852.js";import"./index.styled-0386b48b.js";import{B as y}from"./index-bbd649b7.js";import{CommonGAssets as f}from"./gAssets.js";import"@mantine/core";import"./index.styled-e9aa1463.js";import"./index-8cf73e87.js";import{t as k}from"./theme-595172c3.js";import"./index.styled-98501b33.js";import"string-format";import"./index-d62c8590.js";import{e as _,R as E,x as w,l as C,m as N,N as S}from"./index.styles-2938320c.js";import T from"dayjs";import"./screenSizeContext-a1fa9bf6.js";import"styled-components";import"./index-4e089cd4.js";import"./isProduction-d29de9ea.js";import"./Onboarding-425ce5e0.js";import"./index-81d4ec35.js";import"@mantine/hooks";import"./index.styled-86d605ed.js";import"date-fns";import"react-day-picker/DayPickerInput";import"./index.styled-044c2b0b.js";import"./index-0455edb8.js";import"lodash/throttle";import"keen-slider/react";import"./types-a7634411.js";import"react-hook-form";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-330afbe2.js";import{S as x}from"./index-d95d161c.js";import{M as O}from"./index.styled-630eb409.js";import{createFormContext as j}from"@mantine/form";import"yup";import{T as P}from"./index-bae2777b.js";import{H as B}from"./index-eec33795.js";import"@mantine/dates";import"@mantine/carousel";import"./index-ee118547.js";import"./index-479281a9.js";import"@hookform/resolvers/yup";import"./index-6efee064.js";import"./useUniqueId-efa31f3c.js";import"./index-dc680745.js";import"./index-750a9af3.js";import"slugify";import"./routing-c0c9da64.js";import"dayjs/plugin/relativeTime";import"./index-b717db96.js";import"./Visible-07963bb9.js";const L={LINKS:1,TAGS:2};let $="https://dev.leadgen.hellobacsi.com/";const I={MOBILE:1,DESKTOP:2};let A="";$.includes("localhost")&&($="https://dev.leadgen.hellobacsi.com/"),location.hostname.includes("marrybaby.vn")&&(A="pink");let U="https://"+location.hostname+location.pathname+location.search;U=U.toLowerCase(),sessionStorage.getItem("insider_object")&&(window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")));const D={"vi-VN":{popupLang:"vi",countryCode:"vn",countryCodeNumber:84},"id-ID":{popupLang:"id",countryCode:"id",countryCodeNumber:62},"th-TH":{popupLang:"th",countryCode:"th",countryCodeNumber:66},"ms-MY":{popupLang:"ms",countryCode:"my",countryCodeNumber:60},"zh-TW":{popupLang:"zh",countryCode:"tw",countryCodeNumber:886},"km-KH":{popupLang:"km",countryCode:"kh",countryCodeNumber:855},"my-MM":{popupLang:"my",countryCode:"mm",countryCodeNumber:95},"hi-IN":{popupLang:"hi",countryCode:"in",countryCodeNumber:91}},M=D[document.documentElement.lang]||D["vi-VN"];const R={1:"Asia/Ho_Chi_Minh",10:"Asia/Ho_Chi_Minh",11:"Asia/Ho_Chi_Minh",12:"Asia/Ho_Chi_Minh",2:"Asia/Jakarta",3:"Asia/Bangkok",4:"Asia/Phnom_Penh",5:"Asia/Kuala_Lumpur",6:"Asia/Taipei",7:"Asia/Yangon",8:"Asia/Kolkata",9:"Asia/Manila"};var H={"validator.required":"This field is required.","validator.remote":"Please fix this field.","validator.email":"Please enter a valid email address.","validator.phone":"Please input correct phone number.","validator.url":"Please enter a valid URL.","validator.date":"Please enter a valid date.","validator.dateISO":"Please enter a valid date (ISO).","validator.number":"Please enter a valid number.","validator.digits":"Please enter only digits.","validator.creditcard":"Please enter a valid credit card number.","validator.equalTo":"Please enter the same value again.","validator.accept":"Please enter a value with a valid extension.","validator.maxlength":"jQuery.validator.format('Please enter no more than {0} characters.","validator.minlength":"jQuery.validator.format('Please enter at least {0} characters.","validator.rangelength":"jQuery.validator.format('Please enter a value between {0} and {1} characters long.","validator.range":"jQuery.validator.format('Please enter a value between {0} and {1}.","validator.max":"jQuery.validator.format('Please enter a value less than or equal to {0}.","validator.min":"jQuery.validator.format('Please enter a value greater than or equal to {0}.","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"};const F={"en-PH":H,"vi-VN":{"validator.required":"Vui lòng điền mục này","validator.email":"Vui lòng điền email có thật.","validator.number":"Vui lòng điền số có thật","validator.digits":"Vui lòng chỉ điền số","validator.maxlength":"Vui lòng điền dưới {0} số","validator.minlength":"Vui lòng điền hơn {0} số","validator.remote":"Hãy sửa cho đúng.","validator.url":"Hãy nhập URL.","validator.date":"Hãy nhập ngày.","validator.dateISO":"Hãy nhập ngày (ISO).","validator.creditcard":"Hãy nhập số thẻ tín dụng.","validator.equalTo":"Hãy nhập thêm lần nữa.","validator.extension":"Phần mở rộng không đúng.","validator.rangelength":"Hãy nhập từ {0} đến {1} kí tự.","validator.range":"Hãy nhập từ {0} đến {1}.","validator.max":"Hãy nhập từ {0} trở xuống.","validator.min":"Hãy nhập từ {0} trở lên.","validator.phone":"Nhập đúng định dạng số điện thoại","validator.emailUsed":"Email này đã được sử dụng cho chiến dịch.","validator.phoneUsed":"Số điện thoại này đã được sử dụng cho chiến dịch.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"hi-IN":{"validator.required":"इस क्षेत्र की आवश्यकता है।","validator.email":"कृपया एक मान्य ईमेल पता दर्ज करें","validator.number":"कृपया एक वैध संख्या दर्ज करें","validator.digits":"कृपया केवल अंक दर्ज करें","validator.maxlength":"कृपया {0} अक्षर से अधिक दर्ज न करें","validator.minlength":"कृपया कम से कम {0} अक्षर दर्ज करें","validator.phone":"कृपया एक वैध संख्या दर्ज करें","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"id-ID":{"validator.required":"Kolom ini wajib diisi","validator.email":"Tolong daftarkan email yang valid","validator.number":"Tolong daftarkan nomor telepon yang valid","validator.digits":"Tolong masukkan angka saja","validator.maxlength":"Jangan memasukkan lebih dari {0} karakter","validator.minlength":"Tolong ketik sedikitnya {0} karakter","validator.phone":"Tolong daftarkan nomor telepon yang valid","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"ms-MY":{"validator.required":"Bahagian ini wajib diisi.","validator.email":"Sila masukkan alamat emel yang sah.","validator.number":"Sila masukkan no telefon yang sah.","validator.digits":"Sila masukkan nombor digit sahaja.","validator.maxlength":"Sila masukkan tidak lebih dari {0} aksara","validator.minlength":"Sila masukkan sekurang-kurangnya {0} aksara","validator.phone":"Sila masukkan no telefon yang sah.","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"my-MM":{"validator.required":"ဒီနေရာမှာ ဖြည့်ဖို့ လိုအပ်ပါတယ်","validator.email":"မှန်ကန်သော အီးမေးလ်လိပ်စာထည့်သွင်းပါ","validator.number":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.digits":"နံပါတ်များသာဖြည့်ပါ","validator.maxlength":"ကျေးဇူးပြု၍ {0} ထပ်မပိုသော ဂဏန်းများသာဖြည့်ပါ","validator.minlength":"ကျေးဇူးပြု၍ အနည်းဆုံး {0} ဂဏန်းဖြည့်ပါ","validator.phone":"မှန်ကန်သော ဖုန်းနံပါတ်ထည့်သွင်းပါ","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"km-KH":{"validator.required":"ព័ត៌មានចាំបាច់ដែលត្រូវបំពេញ","validator.email":"សូមវាយអាសយដ្ឋានអ៊ីម៉ែលឲ្យបានត្រឹមត្រូវ","validator.number":"សូមវាយបញ្ចូលលេខឲ្យបានត្រឹមត្រូវ","validator.digits":"វាយបញ្ចូលបានតែលេខប៉ុណ្ណោះ","validator.maxlength":"សូមវាយបញ្ចូលកុំឲ្យលើស {0} តួអក្សរ","validator.minlength":"សូមវាយបញ្ចូលតិចបំផុត {0} តួអក្ស","validator.phone":"សូមវាយបញ្ចូលលេខឲ្យបានត្រឹមត្រូវ","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"zh-TW":{"validator.required":"此為必填欄位","validator.email":"請填入有效的 email 地址","validator.number":"請填入有效的電話號碼","validator.digits":"此欄位僅能輸入數字","validator.maxlength":"請輸入少於 {0} 位數","validator.minlength":"請輸入至少 {0} 位數","validator.phone":"請填入有效的電話號碼","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"th-TH":{"validator.required":"ต้องระบุข้อมูลในช่องนี้","validator.email":"กรุณาใส่อีเมล์ที่ถูกต้อง","validator.number":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.digits":"กรุณาส่เฉพาะตัวเลข","validator.maxlength":"กรุณาใส่ตัวเลขมากกว่า {0} หลัก","validator.minlength":"กรุณาใส่ตัวเลขอย่างน้อย {0} หลัก","validator.phone":"กรุณาใส่ตัวเลขที่ถูกต้อง","validator.emailUsed":"Email already in use for this campaign.","validator.phoneUsed":"Your phone number already in use for this campaign.","lead.otp.title":"Enter OTP","lead.otp.desc":"We have sent an OTP to your mobile number {phone}","lead.otp.verify":"Verify","lead.otp.resend":"Resend OTP{timer}"},"tl-PH":H},W=e=>{const t=F[e];return t||F["en-PH"]},V=l({}),q=e=>{const[t,a]=n(16),[l,i]=n(9),[r,s]=n(!1);return o((()=>{if(s(!1),e){const t=new Image;t.addEventListener("load",(()=>{a(t.naturalWidth),i(t.naturalHeight),s(!0)})),t.addEventListener("error",(()=>{a(16),i(9),s(!0)})),t.src=e}else a(16),i(9),s(!0)}),[e]),{loaded:r,width:t,height:l}},Y=({onClose:e,containerClassName:t,svgClassName:l})=>a.createElement("button",{onClick:e,className:`le-newbuilder-close-button js-modal__close ${t||""}`},a.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:l},a.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"white"}),a.createElement("path",{d:"M16 17.05L10.925 22.125C10.7917 22.2584 10.621 22.329 10.413 22.337C10.2044 22.3457 10.025 22.275 9.87502 22.125C9.72502 21.975 9.65002 21.8 9.65002 21.6C9.65002 21.4 9.72502 21.225 9.87502 21.075L14.95 16L9.87502 10.925C9.74169 10.7917 9.67102 10.6207 9.66302 10.412C9.65436 10.204 9.72502 10.025 9.87502 9.87502C10.025 9.72502 10.2 9.65002 10.4 9.65002C10.6 9.65002 10.775 9.72502 10.925 9.87502L16 14.95L21.075 9.87502C21.2084 9.74169 21.3794 9.67069 21.588 9.66202C21.796 9.65402 21.975 9.72502 22.125 9.87502C22.275 10.025 22.35 10.2 22.35 10.4C22.35 10.6 22.275 10.775 22.125 10.925L17.05 16L22.125 21.075C22.2584 21.2084 22.329 21.379 22.337 21.587C22.3457 21.7957 22.275 21.975 22.125 22.125C21.975 22.275 21.8 22.35 21.6 22.35C21.4 22.35 21.225 22.275 21.075 22.125L16 17.05Z",fill:"#595959"}))),J=({popupId:e,url:t,newTab:l,imageDestkop:n,imageMobile:o,onClose:i,onOtherSubmit:r})=>{const{width:s,height:d,loaded:c}=q(o),{width:m,height:u,loaded:p}=q(n);return c&&p?a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"center_tab"},a.createElement("div",{className:"le-center-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{className:"js-popup-other-submit",href:t,target:l?"blank":"_parent",onClick:r},a.createElement("img",{className:"le-only-mobile",src:o,style:{aspectRatio:`${s}/${d}`}}),a.createElement("img",{className:"le-only-desktop",src:n,style:{aspectRatio:`${m}/${u}`}})),a.createElement(Y,{onClose:i,containerClassName:"close-button-top-right"})))):null},z=({popupId:e,url:t,title:l,urlText:n,titleAlign:o,subtitle:i,subtitleAlign:r,newTab:s,imageDesktop:d,imageMobile:c,onClose:m,onOtherSubmit:u})=>{const{width:p,height:h,loaded:g}=q(c),{width:v,height:b,loaded:y}=q(d);return g&&y?a.createElement("div",{id:e,className:"lead-modal-wrapper lead-floating-wrapper","data-popup-url":location.pathname,"data-popup-type":"floating"},a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:"le-floating-desktop"},a.createElement("div",{className:"le-floating-desktop-wrap",style:{position:"relative",background:"#fff"}},d?a.createElement("div",null,a.createElement("img",{style:{maxWidth:120,borderTopLeftRadius:5,borderBottomLeftRadius:5,aspectRatio:`${v}/${b}`},src:d})):null,a.createElement("div",{style:{padding:20}},a.createElement("div",{className:`le-floating-desktop-title le-text-align-${o}`},l),a.createElement("div",{className:`le-floating-desktop-desc le-text-align-${r}`},i)),a.createElement("a",{target:s?"blank":"_parent",style:{marginLeft:35,textDecoration:"none"},href:t},a.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},n)),a.createElement(Y,{onClose:m,containerClassName:"close-button-top-right"})))),a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-floating-mobile"},a.createElement("div",{className:"le-floating-mobile-wrap",style:{position:"relative",background:"#fff"}},a.createElement("aside",{style:{display:"flex",justifyContent:"space-between"}},a.createElement("div",null,a.createElement("div",{className:`le-floating-mobile-title le-text-align-${o}`},l),a.createElement("div",{className:`le-floating-mobile-desc le-text-align-${r}`},i)),c?a.createElement("div",null,a.createElement("img",{style:{marginLeft:15,marginTop:4,maxWidth:100,aspectRatio:`${p}/${h}`},src:c})):null),a.createElement("div",{style:{textAlign:"center",marginTop:10}},a.createElement("a",{target:s?"blank":"_parent",href:t,style:{textDecoration:"none"}},a.createElement("button",{className:"le-joinbow-floating-btn js-popup-other-submit",onClick:u},n))),a.createElement(Y,{onClose:m,containerClassName:"close-button-top-right"}))))):null},K=({title:e,titleAlign:t,subtitle:l,subtitleAlign:n,link:o,linkNewTab:i,linkText:r,image:s})=>{const{width:d,height:c,loaded:m}=q(s);return m?a.createElement("div",{className:"lead-modal__thank-you"},a.createElement("div",{style:{width:"100%"}},a.createElement("img",{src:s,style:{maxHeight:162,objectFit:"cover",aspectRatio:`${d}/${c}`}}),e&&a.createElement("h1",{className:`le-thankyou-title le-text-align-${t}`},e),l&&a.createElement("p",{className:`le-thankyou-subtitle le-text-align-${n}`},l),r&&a.createElement("div",null,a.createElement("a",{href:o,target:i?"_blank":"parrent",rel:"noreferrer"},a.createElement("button",{className:`lead-modal__btn ${A}`},r))))):null};const G=new class{constructor(){this.apiLeadUrl="https://dev.leadgen.hellobacsi.com/",this.apiSubotUrl="https://staging-service-subot.hellohealthgroup.com/"}},Q={call(t){var{url:a,data:l}=t,n=e(t,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${G.apiLeadUrl}${a}`,n).then((e=>e.json())).catch((e=>({})))}},X={call(t){var{url:a,data:l}=t,n=e(t,["url","data"]);return n.body=JSON.stringify(l),n.headers={"Content-Type":"application/json"},fetch(`${G.apiSubotUrl}${a}`,n).then((e=>e.json())).catch((e=>({})))}},Z=({bot_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),X.call({url:"frontend/api/subot-campaign/check",method:"post",data:{bot_id:e,email:t,phone:l}})},ee=({campaign_id:e,email:t,phone:a})=>{let l=a;return l&&l.startsWith("0")&&(l=l.substring(1)),Q.call({url:"api/subot-campaign/check",method:"post",data:{campaign_id:e,email:t,phone:l}})},te=({phone:e})=>Q.call({url:"api/sms/otp",method:"post",data:{phone_number:e.replace("+","")}}),ae=({phone:e,otp:t})=>Q.call({url:"api/sms/verify",method:"post",data:{otp_code:t,phone_number:e.replace("+","")}}),le={email:{},phone:{}},ne=(e,a,l)=>t(void 0,void 0,void 0,(function*(){const n="email"in l?"email":"phone",o="email"in l?l.email:l.phone,i="email"in l?"validator.emailUsed":"validator.phoneUsed";if(le[n][o]){if(le[n][o].value)return i;if(!le[n][o].value&&le[n][o].expire>Date.now())return""}const r=yield((e,a,l)=>t(void 0,void 0,void 0,(function*(){const t="email"in l?"email":"phone",n="email"in l?l.email:l.phone,o="email"in l?"validator.emailUsed":"validator.phoneUsed",i=yield ee({campaign_id:[e],[t]:n});return"SubmitLeadWithBotId_ERR_001"===i._errorCode||"SubmitLeadWithBotId_ERR_002"===i._errorCode||a.length&&"CheckSuBotLeadTool_ERR_001"===(yield Z({bot_id:a,[t]:n}))._errorCode?o:void 0})))(e,a,l);return le[n][o]=r?{value:!0}:{value:!1,expire:Date.now()+6e4},r})),oe=({content:e,inlinePosition:t})=>{const a=i((()=>{if(!t)return null;const e=document.querySelectorAll(`[data-url="${location.pathname}"] .body-content`),a=Array.from(e).reduce(((e,t)=>[...e,...Array.from(t.children)]),[]);if(null==a?void 0:a.length){const e=a.filter((e=>"P"===e.nodeName)),l=a.filter((e=>"H2"===e.nodeName));let n=null;switch(t){case"1th":n=e[0];break;case"2th":n=e[1];break;case"3th":n=e[2];break;case"4th":n=e[3];break;case"5th":n=e[4];break;case"6th":n=e[5];break;case"7th":n=e[6];break;case"8th":n=e[7];break;case"9th":n=e[8];break;case"10th":n=e[9];break;case"11th":n=e[10];break;case"12th":n=e[11];break;case"lastP":n=e[e.length-1];break;case"1thH2":n=l[0];break;case"2thH2":n=l[1];break;case"3thH2":n=l[2];break;case"4thH2":n=l[3];break;case"5thH2":n=l[4];break;case"6thH2":n=l[5];break;case"7thH2":n=l[6];break;case"8thH2":n=l[7];break;case"9thH2":n=l[8];break;case"10thH2":n=l[9];break;case"lastH2":n=l[l.length-1]}if(n){if(n.parentElement.querySelector(".inline-lead-wrapper"))return n.parentElement.querySelector(".inline-lead-wrapper");{const e=document.createElement("div");return e.classList.add("inline-lead-wrapper"),n.nextElementSibling?n.parentElement.insertBefore(e,n.nextElementSibling):n.parentElement.appendChild(e),e}}}}),[t]);return t&&a?c(e,a):null},ie=({content:e})=>{const t=i((()=>{const e=Array.from(document.querySelectorAll(".hc2-sidebar-with-ads,.page-main-col .right-col.f-right,.hhg-lead-sidebar"));return e.forEach((e=>{if(e.querySelector(".sidebar-lead-modal-wrapper"))return;const t=document.createElement("div");t.classList.add("sidebar-lead-modal-wrapper"),e.prepend(t)})),e.map((e=>e.querySelector(".sidebar-lead-modal-wrapper")))}),[]);return a.createElement(a.Fragment,null,t.map((t=>c(e,h(t,"sidebar-lead-modal-wrapper")))))},[re,se,de]=j(),ce="undefined"==typeof window,me={VN:"vi",ID:"id",TH:"th",MY:"ms",TW:"zh-TW",KH:"km",MM:"my",IN:"hi",PH:"en"},ue=(e="",a="",l="",i=500)=>{const[r,s]=n([]),[d,c]=n(!1);return o((()=>{let n;return e?n=window.setTimeout((()=>t(void 0,void 0,void 0,(function*(){var n;if(e)try{c(!0);const o=yield((e="",a="",l="vi")=>t(void 0,void 0,void 0,(function*(){return new Promise(((t,n)=>{if(!e)return n("Need valid text input");if(ce)return n("Need valid window object");try{(new window.google.maps.places.AutocompleteService).getPlacePredictions(Object.assign(Object.assign({input:e},a?{componentRestrictions:{country:a}}:{}),{language:me[l]}),t)}catch(e){n(e)}}))})))(e,a,l);s(!(n=o)||n.length<1?[]:n.map((e=>({placeId:e.place_id,description:e.description}))))}catch(e){console.error(e)}finally{c(!1)}else s([])}))),i):r.length&&s([]),()=>{window.clearTimeout(n)}}),[e,i,a]),{isLoading:d,predictions:r}},pe=["places"],he=({name:e,placeholder:t,locale:l})=>{var s;const d=se(),[c,m]=n(""),[u,p]=n(""),{predictions:h}=ue(c||"15 Lê","","tl-PH"===l?"en":null===(s=null==l?void 0:l.split("-"))||void 0===s?void 0:s[0]),[g,v]=n(null),[b,y]=n(!1),f=r(Math.random().toString(36).substring(7)),k=i((()=>{const e=h.map((e=>({value:e.description,label:e.description}))),t=e.find((e=>e.value===u));return!u||t?e:[{value:u,label:u}].concat(e)}),[h,u]);return o((()=>{var e,t,a;(null===(a=null===(t=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.maps)||void 0===t?void 0:t.places)||void 0===a?void 0:a.AutocompleteService)?y(!0):import("@react-google-maps/api").then((e=>{v((()=>e.LoadScript)),setTimeout((()=>{y(!0)}),200)}))}),[]),b?a.createElement(a.Fragment,null,g&&a.createElement(g,{googleMapsApiKey:"AIzaSyB9QmhfEYcy2wj5X3Fl38aCD5UkET6n82M",libraries:pe,loadingElement:a.createElement(a.Fragment,null)}),a.createElement("div",{style:{display:"none"},"data-extra":!0,"data-name":e,"data-control":"text"}),a.createElement(x,Object.assign({className:"lead-modal__form-control",label:t,placeholder:t,withAsterisk:!0,name:e,data:k,searchValue:c,onSearchChange:e=>{m(e)},filter:()=>!0,clearable:!0,searchable:!0,onChange:e=>p(e||""),icon:a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M9.99999 9.79167C10.4028 9.79167 10.7467 9.64944 11.0317 9.365C11.3161 9.08 11.4583 8.73611 11.4583 8.33333C11.4583 7.93056 11.3161 7.58667 11.0317 7.30167C10.7467 7.01722 10.4028 6.875 9.99999 6.875C9.59721 6.875 9.25332 7.01722 8.96832 7.30167C8.68388 7.58667 8.54166 7.93056 8.54166 8.33333C8.54166 8.73611 8.68388 9.08 8.96832 9.365C9.25332 9.64944 9.59721 9.79167 9.99999 9.79167ZM9.99999 17.875C9.90277 17.875 9.80555 17.8611 9.70832 17.8333C9.6111 17.8056 9.52082 17.7569 9.43749 17.6875C7.46527 15.8958 5.98971 14.2361 5.01082 12.7083C4.03138 11.1806 3.54166 9.77778 3.54166 8.5C3.54166 6.48611 4.1911 4.87833 5.48999 3.67667C6.78832 2.47556 8.29166 1.875 9.99999 1.875C11.7083 1.875 13.2119 2.47556 14.5108 3.67667C15.8092 4.87833 16.4583 6.48611 16.4583 8.5C16.4583 9.77778 15.9689 11.1806 14.99 12.7083C14.0105 14.2361 12.5347 15.8958 10.5625 17.6875C10.4792 17.7569 10.3889 17.8056 10.2917 17.8333C10.1944 17.8611 10.0972 17.875 9.99999 17.875Z",fill:"#8C8C8C"})),autoComplete:"no-auto-complete-"+f.current,rightSection:a.createElement(a.Fragment,null)},d.getInputProps(e)))):a.createElement("div",{style:{height:73}})},ge=({children:e,align:t})=>a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(t||"")} ${A}`},e),ve=({children:e,align:t})=>a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(t||"")} ${A}`},e),be=({listBlockAdded:e,popupId:t,locale:l,onClose:n,onOtherSubmit:o})=>{const i=se();return a.createElement(a.Fragment,null,e.map(((e,r)=>{const{name:s="",data:d={}}=e||{},{placeholder:c,value:m,align:u,listQuestion:p,isSendMailChimp:h=!1,newtab:g,url:v}=d;switch(s){case"TitleBlock":return a.createElement(ve,{key:r,align:u},m);case"SubtitleBlock":return a.createElement(ge,{key:r,align:u},m);case"TextBlock":return a.createElement(_,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"text",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"text",name:m},i.getInputProps(m)));case"NumberBlock":return a.createElement(S,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,type:"number",placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"number",name:m},i.getInputProps(m)));case"EmailBlock":return a.createElement(_,Object.assign({key:r,withAsterisk:!0,spellCheck:!1,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"email",name:m},i.getInputProps(m)));case"PhoneOtpBlock":case"PhoneBlock":{const e=t+"-"+m+"-"+r;return a.createElement(_.Wrapper,Object.assign({size:"md",withAsterisk:!0,key:r,label:c,className:"lead-modal__form-control",labelProps:{htmlFor:e}},i.getInputProps(m)),a.createElement(N,{name:m,spellCheck:!1,type:"tel",placeholder:c,onChange:e=>{i.setFieldValue(m,e)},id:e,defaultCountry:l&&O[l]||"VN","data-control":"tel"}))}case"LocationBlock":return a.createElement(he,{key:r,name:m,placeholder:c,locale:l});case"DateBlock":return a.createElement(C,Object.assign({withAsterisk:!0,key:r,type:"date",name:m,placeholder:c,className:"lead-modal__form-control",label:c,"data-control":"date"},i.getInputProps(m)));case"LinkButtonBlock":return a.createElement("div",{key:r},a.createElement("a",{target:g?"blank":"parrent",href:v,style:{textDecoration:"none"}},a.createElement(y,{type:"button",size:"md",className:`lead-modal__btn ${A}`,onClick:()=>{null==n||n(),null==o||o()}},m)));case"CheckboxBlock":return a.createElement(a.Fragment,null,h&&a.createElement("div",{style:{display:"none"},"data-name":m+"-mailchimp"}),a.createElement(w.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md"},i.getInputProps(m)),p.map(((e,t)=>a.createElement(w,{name:m,key:t,value:e.value,label:e.placeholder,"data-control":"checkbox"})))));case"RadioBlock":return a.createElement(a.Fragment,null,h&&a.createElement(_,{type:"hidden",name:m+"-mailchimp",value:h}),a.createElement(E.Group,Object.assign({withAsterisk:!0,className:"lead-modal__form-control",key:r,label:c,size:"md"},i.getInputProps(m)),p.map(((e,t)=>a.createElement(E,{name:m,key:t,value:e.value,label:e.placeholder,"data-control":"radio"})))));case"DropdownBlock":return a.createElement(a.Fragment,null,a.createElement("div",{style:{display:"none"},"data-extra":!0,"data-name":m,"data-control":"dropdown"}),a.createElement(x,Object.assign({key:r,className:"lead-modal__form-control",label:c,withAsterisk:!0,name:m,data:p.map((e=>({value:e.value,label:e.placeholder})))},i.getInputProps(m))))}return null})))},ye=({phone:e,onSuccess:l,autoSendWhenOpen:i})=>{const{t:s}=b(),[d,c]=n(""),[m,u]=n(!1),[p,h]=n(0),g=r(null),[v,f]=n(),[E,w]=n(""),C=r();o((()=>{t(void 0,void 0,void 0,(function*(){var t;if(!C.current){const e=yield import("react-phone-number-input");C.current=e.formatPhoneNumberIntl}w((null===(t=C.current)||void 0===t?void 0:t.call(C,e))||e)}))}),[e]);const N=()=>t(void 0,void 0,void 0,(function*(){var t;if(!e)return;const a=yield te({phone:e}),n=null===(t=null==a?void 0:a._messages)||void 0===t?void 0:t[0];"Send sms successfully"===n?(h(60),setTimeout((()=>{g.current&&(g.current.focus(),g.current.scrollIntoView({block:"center"}))}),100)):"This phone number was verified"===n?l():f(n||"something Wrong")}));return o((()=>{setTimeout((()=>{p>0&&h((e=>e-1))}),1e3)}),[p]),o((()=>{i&&!p&&N()}),[]),a.createElement(a.Fragment,null,a.createElement("form",{onSubmit:a=>{a.preventDefault(),t(void 0,void 0,void 0,(function*(){if(!e||!d)return;const t=yield ae({phone:e,otp:d}),a=null==t?void 0:t._messages[0];"Verify successfully"===a||"This phone number was verified"===a?l():f(a||"something Wrong")}))},className:"lead-phone-otp-form"},a.createElement(B,{tag:"h3",fontWeight:"bold",style:{marginBottom:4}},s("lead.otp.title")),a.createElement(P,{size:"p1",color:k.colors.gray600},s("lead.otp.desc",{phone:E})),a.createElement(_,{ref:g,name:"_"+name+"-otp",spellCheck:!1,type:"number",placeholder:"Enter OTP",className:"lead-modal__form-control",label:"Phone OTP","data-control":"otp",withAsterisk:!0,pattern:"[0-9]*",value:d,onChange:e=>{u(!0),c(e),f(m&&!e?"OTP is required":void 0)},error:m?v:void 0}),a.createElement(y,{size:"md",color:"primary",className:`lead-modal__btn ${A}`,disabled:!d},s("lead.otp.verify")),a.createElement(y,{type:"button",size:"md",color:"transparent",className:`lead-modal__btn lead-phone-otp-button ${A}`,onClick:()=>{N()},disabled:!!p},s("lead.otp.resend",{timer:p?` (${p}s)`:""}))))},fe=({popupId:e,extraFields:t,onClose:l,onOtherSubmit:s,imageMobile:d,imageDesktop:c,imageOverlayMobile:m,imageOverlayDesktop:u,imageBackground:p,currentLayout:h,title:g,onSubmit:v,showThankyou:k,campaignId:_,campaign_subot_id:E,locale:w})=>{var C,N,S;const T=JSON.parse(t.listBlockAdded),x=JSON.parse(t.actionBlocks),O=JSON.parse(t.textBlocks),j=x.submitBlock.data.url,P=x.submitBlock.data.text,B=x.submitBlock.data.text2,L=x.submitBlock.data.value,$=location.pathname,I=h.includes("Inline")||"Sidebar"===h,U="Slider"===h,[D,R]=n(!0),[H,F]=n(""),W=r(),V=()=>{H?F(""):null==l||l()};if(window.innerWidth<769&&["Fullscreen","Slider"].includes(h))return console.log("😎 Not show fullscreen, slider on mobile "),null;o((()=>{(h.includes("LightBox")||"Fullscreen"==h)&&document.body.classList.add("noscroll"),window.intlTelInputUtils||require("intl-tel-input/build/js/utils"),le.email={},le.phone={}}),[]);const J=r(!1),z=r(!1),{form:G,validateObj:Q}=(({listBlockAdded:e=[],validatingPhoneRef:t,validatingEmailRef:a,campaignId:l,campaign_subot_id:n=[]})=>{const{t:o}=b(),s=i((()=>{const i=["TextBlock","NumberBlock","EmailBlock","PhoneBlock","DateBlock","CheckboxBlock","RadioBlock","DropdownBlock","PhoneOtpBlock","LocationBlock"],r=(e,t)=>a=>{if(c.current.isTouched(e))return void 0===a||""===a||Array.isArray(a)&&0===a.length?o("validator.required"):null==t?void 0:t(a)};return e.filter((e=>i.includes(e.name))).reduce(((e,i)=>"NumberBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(isNaN(Number(e)))return o("validator.number")}))}):"EmailBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e))return o("validator.email");a.current=!0,setTimeout((()=>{c.current.setFieldError(i.data.value,"Validating..."),ne(l,n,{email:e}).then((e=>{e?c.current.setFieldError(i.data.value,o(e)):c.current.clearFieldError(i.data.value),a.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(i.data.value,e.message||"Something went wrong"),a.current=!1}))}),200)}))}):"PhoneBlock"===i.name||"PhoneOtpBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(window.intlTelInputUtils&&!window.intlTelInputUtils.isValidNumber(String(e),M.countryCode))return o("validator.phone");t.current=!0,setTimeout((()=>{c.current.setFieldError(i.data.value,"Validating..."),ne(l,n,{phone:e}).then((e=>{e?c.current.setFieldError(i.data.value,o(e)):c.current.clearFieldError(i.data.value),t.current=!1})).catch((e=>{console.error(e),c.current.setFieldError(i.data.value,e.message||"Something went wrong"),t.current=!1}))}),200)}))}):"DateBlock"===i.name?Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value,(e=>{if(isNaN(Date.parse(e)))return o("validator.date")}))}):Object.assign(Object.assign({},e),{[i.data.value]:r(i.data.value)})),{})}),[e.map((e=>e.name)).join(",")]),d=de({validateInputOnChange:!0,clearInputErrorOnChange:!0,validate:s}),c=r(d);return c.current=d,{form:d,validateObj:s}})({listBlockAdded:T,validatingPhoneRef:J,validatingEmailRef:z,campaignId:_,campaign_subot_id:E}),{width:X,height:Z,loaded:ee}=q(p),{width:te,height:ae,loaded:se}=q(d),{width:ce,height:me,loaded:ue}=q(c),pe=se&&ue&&("Fullscreen"!=h||ee),he=a.createElement(a.Fragment,null,a.createElement("style",{dangerouslySetInnerHTML:{__html:`\n .le-newbuilder-overlay {\n background-repeat: no-repeat;\n background-size: cover;\n }\n ${m?`\n .le-newbuilder-overlay {\n background: url(${m}) ;\n }`:""}\n ${u?`\n @media screen and (min-width:768px) {\n .le-newbuilder-overlay {\n background: url(${u}) ;\n }\n }`:""}`}}),a.createElement("div",{id:e,"data-popup-url":$,"data-popup-type":"lightbox-inline",className:`lead-modal lead-modal-wrapper modal--animate-scale ${I?"le-buider-inline":""} ${U?"le-buider-slider":""}`},"Fullscreen"==h?a.createElement("img",{className:"le-only-desktop le-fullscreen-img",draggable:!1,src:p||"",style:{aspectRatio:`${X}/${Z}`}}):null,a.createElement("div",{className:`lead-modal__wrapper le-newbuilder-wrap-${h}`},a.createElement("div",{className:`lead-modal__content le-newbuilder-${h}`},k?a.createElement(K,{title:k.title,titleAlign:k.titleAlign,subtitle:k.subtitle,subtitleAlign:k.subtitleAlign,link:k.link,linkNewTab:k.linkNewTab,linkText:k.linkText,image:k.image}):a.createElement(a.Fragment,null,a.createElement("header",{className:"lead-modal__header"},H?a.createElement("img",{src:f.getAssetPath("lead-otp-thumb.png"),draggable:"false",alt:"",style:{width:"100%"}}):a.createElement(a.Fragment,null,["LightBoxA","InlineA","Sidebar","Slider"].includes(h)?d?a.createElement("img",{draggable:"false",className:"lead-modal__image lead-modal-image-cover",src:d,style:{aspectRatio:`${te}/${ae}`},alt:""}):null:a.createElement(a.Fragment,null,c?a.createElement("img",{draggable:"false",className:"le-only-desktop lead-modal__image lead-modal-image-cover",style:{height:"100%",objectFit:"cover",aspectRatio:`${ce}/${me}`},src:c,alt:""}):null,d?a.createElement("img",{draggable:"false",className:"le-only-mobile lead-modal__image lead-modal-image-cover",src:d,alt:"",style:{aspectRatio:`${te}/${ae}`}}):null))),H&&a.createElement(ye,{phone:H,autoSendWhenOpen:!0,onSuccess:()=>{null==v||v(W.current,G.values)}}),a.createElement("div",{"data-hidden":!!H,className:"lead-modal__body le-newbuilder-overlay"},a.createElement(re,{form:G},a.createElement("form",{ref:W,className:`lead-modal__form ${e}`,onSubmit:e=>{e.preventDefault(),G.setTouched(Object.keys(Q).reduce(((e,t)=>(e[t]=!0,e)),{})),z.current||J.current||setTimeout((()=>{G.onSubmit((e=>{var t,a,l;if(!Object.keys(G.errors).length){if(T.findIndex((e=>"PhoneOtpBlock"===e.name))>-1){const n=null===(a=null===(t=T.find((e=>"PhoneOtpBlock"===e.name)))||void 0===t?void 0:t.data)||void 0===a?void 0:a.value;if(null===(l=e[n])||void 0===l?void 0:l.startsWith("+84"))return void F(e[n])}null==v||v(W.current,e)}}))(e)}),100)}},a.createElement("div",{style:{marginBottom:20}},a.createElement("h2",{className:`lead-modal__title ${"le-text-align-"+(null===(C=O.titleBlock.data)||void 0===C?void 0:C.align)} ${A}`},g),a.createElement("p",{className:`lead-modal__description ${"le-text-align-"+(null===(N=O.titleBlock.data)||void 0===N?void 0:N.align)} ${A}`},O.subtitleBlock.data.value)),a.createElement("div",{className:"lead-modal__form-control-wrapper"},a.createElement(be,{listBlockAdded:T,popupId:e,locale:w,onClose:V,onOtherSubmit:s})),(null===(S=null==x?void 0:x.submitBlock)||void 0===S?void 0:S.isHide)?null:a.createElement(a.Fragment,null,a.createElement("div",{className:`lead-modal__checkbox-wrapper ${A}`},a.createElement("div",{className:"lead-modal__checkbox"},a.createElement("input",{id:"lead-term-checkbox",className:`lead-modal__checkbox__input ${A}`,type:"checkbox","aria-label":"Checkbox label",checked:D,onChange:e=>R(e.currentTarget.checked)}),a.createElement("div",{className:"lead-modal__checkbox__control","aria-hidden":"true"})),a.createElement("label",{htmlFor:"checkbox",className:"lead-modal__checkbox__label"},P," ",a.createElement("span",{style:{fontWeight:"bold"}},a.createElement("a",{target:"blank",href:j||"https://hellobacsi.com/chinh-sach",rel:"noopener noreferrer",style:{textDecoration:"none"}},B)))),a.createElement(y,{size:"md",id:"lead-submit",type:"submit",className:`lead-modal__btn ${A}`,disabled:!D},L))))))),!h.includes("Inline")&&a.createElement(Y,{onClose:V,containerClassName:"close-button-top-right"}))));return pe?h.includes("LightBox")||"Fullscreen"==h||"Slider"==h?he:"Sidebar"==h?a.createElement(ie,{content:he}):h.includes("Inline")?a.createElement(oe,{content:he,inlinePosition:t.popupInlinePosition}):null:null},ke=({popupId:e,link:t,linkText:l,linkNewTab:n,onClose:o,imageMobile:i,imageDesktop:r,currentLayout:s,onOtherSubmit:d})=>{const c=location.pathname,{width:m,height:u,loaded:p}=q(i),{width:h,height:g,loaded:v}=q(r);return p&&v?a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":c,"data-popup-type":"skin_ab"},"SkinA"==s?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:"le-skin-a-desktop"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:r,style:{aspectRatio:`${h}/${g}`}}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn js-popup-other-submit"},l)),a.createElement(Y,{onClose:o,containerClassName:"close-button-top-right"})))):"SkinB"==s?a.createElement("aside",{className:"le-only-desktop"},a.createElement("div",{className:""},a.createElement("div",{style:{position:"relative",zIndex:1e4}},a.createElement("img",{src:r,style:{width:"100%",aspectRatio:`${h}/${g}`}}),a.createElement("a",{style:{position:"absolute",top:"75%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",width:"100%"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(Y,{containerClassName:"close-button-top-right",onClose:o})))):null,a.createElement("aside",{className:"le-only-mobile"},a.createElement("div",{className:"le-skin-mobile"},a.createElement("div",{style:{position:"relative"}},a.createElement("img",{src:i,style:{width:"100%",aspectRatio:`${m}/${u}`}}),a.createElement("a",{style:{position:"absolute",top:"82%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center",maxWidth:"calc(100% - 15px)"},href:t,target:n?"blank":"_parent"},a.createElement("button",{onClick:d,className:"le-joinbow-btn-mobile js-popup-other-submit"},l)),a.createElement(Y,{containerClassName:"close-button-top-right",svgClassName:"le-mobile-btn",onClose:o}))))):null},_e=({popupId:e,url:t,newTab:l,image:n,onClose:o,onOtherSubmit:i})=>{const{width:r,height:s,loaded:d}=q(n);return d?a.createElement("div",{id:e,className:"lead-modal-wrapper","data-popup-url":location.pathname,"data-popup-type":"tab"},a.createElement("div",{className:"le-tab-popup"},a.createElement("div",{style:{position:"relative"}},a.createElement("a",{href:t,target:l?"blank":"_parent",onClick:i},a.createElement("img",{className:"js-popup-other-submit",src:n,style:{aspectRatio:`${r}/${s}`}})),a.createElement(Y,{onClose:o,containerClassName:"close-button-top-right"})))):null},Ee=[],we=[],Ce=[];const Ne=e=>{const t=[...e];for(let e=t.length-1;e>0;e--){const a=Math.floor(Math.random()*(e+1)),l=t[e];t[e]=t[a],t[a]=l}return t},Se=(e="UTC")=>{const t=new Date;return new Date(t.toLocaleString("en-US",{timeZone:e}))},Te=e=>{try{const[t,a]=e.split(" "),[l,n,o]=t.split("-").map(Number),[i,r,s]=a.split(":").map(Number);return new Date(l,n-1,o,i,r,s)}catch(e){return null}};const xe=e=>1===e.formatted_status?function(e){var t;if(1===e.forever)return!0;const a=e.started_at,l=e.ended_at,n=Te(a),o=Te(l);if(!n||!o)return!0;const i=(null===(t=e.site)||void 0===t?void 0:t.id)||1,r=R[i];return!(Se(r).getTime()>o.getTime()&&(Ce.push(e),1))}(e):0===e.formatted_status&&(Ee.push(e),(e=>{var t;const a=(null===(t=e.site)||void 0===t?void 0:t.id)||1,l=e.started_at,n=e.ended_at,o=Te(l),i=Te(n);if(!o||!i)return!1;const r=R[a],s=Se(r).getTime();return s<=i.getTime()&&s>=o.getTime()&&(we.push(e),!0)})(e));let Oe=null;function je({leadApi:e,leadSiteId:t,leadDomain:a,onShowPopup:l,DEBUG_URL:n}){const o=n||("https://"+location.hostname+location.pathname+location.search).toLowerCase();fetch(e+"api/campaign/"+t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:o,ga_client_id:u("_ga")||null})}).then((e=>e.json())).then((e=>{var t,n,i,r,s;if(Pe("List campagin: ",e),U="https://"+location.hostname+location.pathname+location.search,1==e._status){const d=(null===(n=null===(t=e._data)||void 0===t?void 0:t.campaigns)||void 0===n?void 0:n.filter(xe))||[];u("hhg-id")||(p("hhg-id",v(),{domain:"."+a,path:"/"}),Pe("😍 Set HHG ID cookie"));let c=[];c=/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Kindle|Silk|Opera Mini/i.test(navigator.userAgent)?d.filter((e=>e.device_types.some((e=>e.id==I.MOBILE)))):d.filter((e=>e.device_types.some((e=>e.id==I.DESKTOP)))),Pe("👓 campaignsDevice",c),Pe("--listCampaignScheduled",Ee),Pe("--listCampaignScheduledToActivated",we),Pe("--listCampaignActiveButExpired",Ce);let m=c.map(((e,t)=>e.targets.filter((e=>e.type==L.LINKS)).map((e=>Object.assign(Object.assign({},e),{campaignIndex:t}))))).flat(1);m=m.filter((e=>{const t=new URL(String(e.target).toLowerCase());if("exact_match"==e.option)return Boolean(o===t.href);if("start_with"==e.option){if(o.includes(String(e.target))){return!e.sub_target.filter((e=>"excluding"==e.option)).map((e=>e.value)).includes(o.split("?")[0])}return!1}}));const h=Array.from(document.getElementsByTagName("META")).filter((e=>"article:tag"==e.getAttribute("property"))).map((e=>e.content));let g=[],b=[];h&&h.length&&(g=c.map(((e,t)=>e.targets.filter((e=>e.type==L.TAGS)).map((e=>Object.assign(Object.assign({},e),{campaignIndex:t}))))).flat(1),b=g.filter((e=>h.includes(e.target))));const y=[...m,...b],f=document.cookie.split("; ").map((e=>e.split("=")[0])),k=f.filter((e=>e.includes("lead_submited")));Pe("--listCampaignCodeSubmited",k);const _=f.filter((e=>e.includes("lead_closed")));Pe("--listCampaignCodeClosed",_);const E=[...k,..._],w=y.filter((e=>!E.some((t=>t.includes(c[e.campaignIndex].code))))),C=Ne(w);if(Pe("--listCampaignValid : ",C),C&&C.length){const e=c[C[0].campaignIndex];Pe("CAMPAIGN_SHOW",e);const{rules:t}=e,a=Number(null===(i=t.find((e=>"time"==e.rule)))||void 0===i?void 0:i.value);Pe("timeoutRule",a);const n=Number(null===(r=t.find((e=>"scroll"==e.rule)))||void 0===r?void 0:r.value);Pe("scrollRule",n);const o=Number(null===(s=t.find((e=>"exclude_sponsored"==e.rule)))||void 0===s?void 0:s.value);Pe("excludeSponsored",o);const d=Boolean(document.querySelector(".hhg-disclaimer-text"));if(Pe("💎 LEAD current page isSponsored",d),d&&o)return;let m="TIME";if(Number.isInteger(a)&&(m="TIME",Pe("✨ SHOW AWESOME POPUP AFTER: ",a," seconds"),Oe&&clearTimeout(Oe),Oe=setTimeout((()=>{null==l||l(e,m)}),1e3*a)),Number.isInteger(n)){m="SCROLL",Pe("✨ SHOW AWESOME AFTER: SCROLL",n," %");const t=document.querySelector(`[data-url="${location.pathname}"]`)||document.querySelector("body"),a=t.getBoundingClientRect().top,o=t.offsetHeight;Pe("👓 Element check scroll: ",t);const i=function(){const t=window.pageYOffset||document.documentElement.scrollTop;let r=0;t>=a&&(r=Math.round((t-a)/(o-innerHeight)*100)),Pe("---Scroll",r,n),r>=n&&(window.removeEventListener("scroll",i),null==l||l(e,m))};window.addEventListener("scroll",i,{passive:!0})}}else Pe("🚧 No lead campaigns on current URL, tags")}})).catch((e=>{Pe("Lead error: ",e)}))}const Pe=(...e)=>{("production"!==process.env.NODE_ENV||process.env.NEXT_PUBLIC_DEPLOY_ENV&&"production"!==process.env.NEXT_PUBLIC_DEPLOY_ENV||"undefined"!=typeof localStorage&&"true"===localStorage.getItem("hhg_debug"))&&console.log(...e)};const Be=({campaign:e,action:t,onSubmit:l,onClose:n,showThankyou:i,locale:d})=>{var c,m;b();const{apiUrl:h,siteDomain:g}=s(V);o((()=>{const e=u("_ga")||null;fetch(`${h}api/campaign/${_}/impression`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:t,url:location.href.toLowerCase(),title_article:document.title,cookie_id:u("hhg-id"),ga_client_id:e})})}),[]);const{extra_fields:y,image:f,image_desktop:k,code:_,image_background:E,image_overlay_mobile:w,image_overlay_desktop:C}=e,{currentLayout:N}=y,S=y.imageBlocks?JSON.parse(y.imageBlocks):{},T=JSON.parse(y.actionBlocks),x=JSON.parse(y.textBlocks);let O=(null===(m=null===(c=null==x?void 0:x.titleBlock)||void 0===c?void 0:c.data)||void 0===m?void 0:m.value)||"";const j={1:{},2:{},3:{}},P=r("lead-modal-"+v()),B=function(e="Xin chao {{category_2}} extra"){if(e.includes("{{category_")){const t="{{category_".length,a=e.search("{{category_");return+e.charAt(t+a)}return null}(O);if(B){Pe("⚡️ Has categoryLevel",B);const e=Array.from(document.getElementsByTagName("META")),t=e.find((e=>e.name===`content_category_${B}`)),a=e.find((e=>e.name===`content_category_en_${B}`));if(!t||!a)return Pe("⚡️ No META TAG for categoryLevel, not show popup",B),null;j[B]={value:t.content,value_en:a.content},O=O.replace(`{{category_${B}}}`,t.content),Pe("⚡️ Set categoryData ",B)}else Pe("⚡️ No categoryLevel",B);const L=()=>{var t,a,l,o;if(Pe("👌 Other submit click"),document.body.classList.remove("noscroll"),N.includes("Skin")){const e=document.querySelector("#masthead");e&&(e.style.top="0px !important;")}const i=Number(null!==(a=null===(t=e.rules.find((e=>"days_to_show_again"==e.rule)))||void 0===t?void 0:t.value)&&void 0!==a?a:7),r=Number(null!==(o=null===(l=e.rules.find((e=>"show_again_after_submit"==e.rule)))||void 0===l?void 0:l.value)&&void 0!==o?o:0);0===r&&(Pe("⛔ Popup never show again!"),p(`lead_submited_${_}`,`target_${y.popupVersion}`,{domain:"."+g,path:"/"})),1==r&&(Pe(`⌛ Popup will show again after ${i} days!`),p(`lead_submited_${_}`,`target_${y.popupVersion}`,{domain:"."+g,days:i,path:"/"}));const s=u("_ga")||null,d={url:location.href.toLowerCase(),title_article:document.title,meta:[],cookie_id:u("hhg-id"),ga_client_id:s};B&&(d.category=j[B].value_en),fetch(`${h}api/campaign/${_}/lead`,{method:"POST",body:JSON.stringify(d),headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then((e=>e.json())).then((e=>{"error"===e.status&&Pe(e)})).catch((e=>{Pe("Error:",e)})),null==n||n()};return"CenterTab"===N?a.createElement(J,{popupId:P.current,url:S.imageMobile.data.url,newTab:S.imageMobile.data.newtab,imageMobile:f,imageDestkop:k,onClose:n,onOtherSubmit:L}):"Tab"===N?a.createElement(_e,{popupId:P.current,url:S.imageMobile.data.url,newTab:S.imageMobile.data.newtab,image:f,onClose:n,onOtherSubmit:L}):"Floating"===N?a.createElement(z,{popupId:P.current,title:O,titleAlign:x.titleBlock.data.align,subtitle:x.subtitleBlock.data.value,subtitleAlign:x.subtitleBlock.data.align,url:T.linkButtonBlock.data.url,urlText:T.linkButtonBlock.data.value,newTab:T.linkButtonBlock.data.newtab,imageMobile:f,imageDesktop:k,onClose:n,onOtherSubmit:L}):N.includes("LightBox")||N.includes("Inline")||"Fullscreen"==N||"Sidebar"==N||"Slider"==N?a.createElement(fe,{popupId:P.current,extraFields:y,onClose:n,onOtherSubmit:L,imageMobile:f,imageDesktop:k,imageBackground:E,currentLayout:N,title:O,onSubmit:(e,t)=>l(e,t,B,j),key:N,imageOverlayDesktop:C,imageOverlayMobile:w,showThankyou:i,campaignId:e.id,campaign_subot_id:e.bot_id||[],locale:d}):N.includes("Skin")?a.createElement(ke,{popupId:P.current,link:T.linkButtonBlock.data.url,linkNewTab:!!T.linkButtonBlock.data.newtab,linkText:T.linkButtonBlock.data.value,onClose:n,onOtherSubmit:L,imageMobile:f,imageDesktop:k,currentLayout:N}):null},Le=({apiUrl:e,siteDomain:l,siteId:s,locale:h,apiSubotUrl:v,DEBUG_URL:b})=>{var y;const f=r(),k=r(Date.now()),{apiUrl:_}=i((()=>{let t=e;return t.includes("localhost")&&(t="https://dev.leadgen.hellobacsi.com/"),{apiUrl:t}}),[e,l,s]),[E,w]=n(null),[C,N]=n(""),[S,x]=n(null);o((()=>{G.apiLeadUrl=_,G.apiSubotUrl=v}),[_,v]);const O=(e,t)=>{w(e),N(t)},j=()=>{var e,t;if(!E)return;Pe(`👋👋👋 CLOSE POPUP ${E.code} 👋👋👋`);const a=Number(null===(e=E.rules.find((e=>"show_again_after_exit"==e.rule)))||void 0===e?void 0:e.value),n=Number(null===(t=E.rules.find((e=>"days_to_show_again"==e.rule)))||void 0===t?void 0:t.value);0==a&&p(`lead_closed_${E.code}`,`target_${E.extra_fields.popupVersion}`,n?{domain:"."+l,days:n,path:"/"}:{domain:"."+l,path:"/"}),document.body.classList.remove("noscroll"),fetch(`${_}api/campaign/${E.code}/popup_exit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"CLICK",url:location.href.toLowerCase(),title_article:document.title,cookie_id:u("hhg-id"),duration:Math.ceil((Date.now()-k.current)/1e3)})}),w(null),x(null)};o((()=>{if(window.next){const e=d((e=>{Pe("--🌻 routeChangeComplete",e,Date.now());const t=location.pathname;j(),document.querySelectorAll(`[data-popup-url="${t}"]`).length?Pe("🔥 This URL page has show popup!"):(Pe("--Process checkShowPopup"),je({leadApi:_,leadDomain:l,leadSiteId:s,onShowPopup:O,DEBUG_URL:b})),f.current&&window.removeEventListener("scroll",f.current)}),500);window.next.router.events.on("routeChangeComplete",e)}je({leadApi:_,leadDomain:l,leadSiteId:s,onShowPopup:O,DEBUG_URL:b})}),[]);return o((()=>{E&&(k.current=Date.now())}),[E]),a.createElement(V.Provider,{value:{apiUrl:_,siteDomain:l,siteId:s,locale:h}},a.createElement(m.Provider,{value:{locale:h,values:W(h)}},c(a.createElement(a.Fragment,null,"2.1"===(null===(y=null==E?void 0:E.extra_fields)||void 0===y?void 0:y.popupVersion)&&a.createElement(Be,{campaign:E,action:C,onSubmit:(e,a,n,o)=>t(void 0,void 0,void 0,(function*(){var t,i,r,s,d,c,m,h,g,v,b;if(!a)return;Pe("submitHandler",n,o);const y=Object.keys(a).map((e=>({name:e,value:String(a[e])}))),f=u("_ga")||null;window.intlTelInputUtils||(yield require("intl-tel-input/build/js/utils"));const k={url:location.href.toLowerCase(),title_article:document.title,meta:y.map((t=>{var a,l;const n=(null===(a=e.querySelector(`*[name="${t.name}"]`))||void 0===a?void 0:a.getAttribute("data-control"))||(null===(l=e.querySelector(`*[data-extra][data-name="${t.name}"]`))||void 0===l?void 0:l.getAttribute("data-control"))||"text",o="tel"===n?window.intlTelInputUtils.formatNumber(String(t.value),null==M?void 0:M.countryCodeNumber,2).replace(/\s+/g,""):"date"===n?T(t.value).format("YYYY-MM-DD"):t.value;return{key:t.name,value:o,control:n,is_sent_mailchimp:e.querySelector(`div[data-name="${t.name}-mailchimp"]`)?"true":"false"}})),cookie_id:u("hhg-id"),ga_client_id:f};n&&o[n].value_en&&(k.category=o[n].value_en);const w=Number((null===(i=null===(t=E.rules)||void 0===t?void 0:t.find((e=>"days_to_show_again"===e.rule)))||void 0===i?void 0:i.value)||7),C=Number((null===(s=null===(r=E.rules)||void 0===r?void 0:r.find((e=>"show_again_after_submit"===e.rule)))||void 0===s?void 0:s.value)||0);if(0==C&&(Pe("⛔ Popup never show again!"),p(`lead_submited_${E.code}`,`target_${E.extra_fields.targetType}`,{domain:"."+l,path:"/"})),1==C&&(Pe(`⌛ Popup will show again after ${w} days!`),p(`lead_submited_${E.code}`,`target_${E.extra_fields.targetType}`,{domain:"."+l,days:w,path:"/"})),fetch(`${_}api/campaign/${E.code}/lead`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)}),"notshow"==E.extra_fields.popupShowThankYou)return j(),void document.body.classList.remove("noscroll");let N=!0;const S=E.thank_you_image||`${_}admin/img/thanksyou.png`;let O,P,B=E.extra_fields.popupThankyouTitle||"Thank you.",L=E.extra_fields.popupThankyouDesc||"We appreciate your time!",$="",I="",A="";if("2.1"==E.extra_fields.popupVersion){const e=E.extra_fields,t=JSON.parse(e.listBlockThankyou),a=t.find((e=>"TitleBlock"==e.name)),l=t.find((e=>"SubtitleBlock"==e.name)),n=t.find((e=>"LinkButtonBlock"==e.name));B=(null===(d=null==a?void 0:a.data)||void 0===d?void 0:d.value)||"",$=(null===(c=null==a?void 0:a.data)||void 0===c?void 0:c.align)||"",L=(null===(m=null==l?void 0:l.data)||void 0===m?void 0:m.value)||"",I=(null===(h=null==l?void 0:l.data)||void 0===h?void 0:h.align)||"",O=(null===(g=null==n?void 0:n.data)||void 0===g?void 0:g.value)||"",P=(null===(v=null==n?void 0:n.data)||void 0===v?void 0:v.newtab)||!1,A=(null===(b=null==n?void 0:n.data)||void 0===b?void 0:b.url)||"";const o=E.extra_fields.currentLayout;["SkinA","SkinB","Floating","Tab","CenterTab"].includes(o)&&(N=!1)}x(N?{title:B,titleAlign:$,subtitle:L,subtitleAlign:I,link:A,linkNewTab:P,linkText:O,image:S}:null),sessionStorage.getItem("insider_object")?window.insider_object=JSON.parse(sessionStorage.getItem("insider_object")):window.insider_object={user:{email:"",phone_number:"",gdpr_optin:!0,sms_optin:!0,email_optin:!0}},y.map((e=>{const t=e.name,a=e.value;"tel"==t?window.insider_object.user.phone_number=a:"email"==t&&(window.insider_object.user.email=a)})),sessionStorage.setItem("insider_object",JSON.stringify(window.insider_object))})),onClose:j,showThankyou:S,locale:h})),g())))};export{Le as LeadGen};
|